cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject ios commit: [CB-4277] Revert deleting of <param name="onload" value="true" /> support
Date Thu, 18 Jul 2013 04:22:05 GMT
Updated Branches:
  refs/heads/3.0.x 68f2bc6e4 -> 945927bf4


[CB-4277] Revert deleting of <param name="onload" value="true" /> support

Looks like the syntax isn't documented in plugman's README, but Android
supports this syntax as well.
(cherry picked from commit af180b4a52820bd746fe609b90cae55f1c5abd95)


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/945927bf
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/945927bf
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/945927bf

Branch: refs/heads/3.0.x
Commit: 945927bf451f0c18d7318b48f7b6d4a6d322f3d4
Parents: 68f2bc6
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Thu Jul 18 00:18:38 2013 -0400
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Thu Jul 18 00:21:34 2013 -0400

----------------------------------------------------------------------
 CordovaLib/Classes/CDVConfigParser.m | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/945927bf/CordovaLib/Classes/CDVConfigParser.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVConfigParser.m b/CordovaLib/Classes/CDVConfigParser.m
index c06b7f7..26f4181 100644
--- a/CordovaLib/Classes/CDVConfigParser.m
+++ b/CordovaLib/Classes/CDVConfigParser.m
@@ -58,8 +58,9 @@
         if ([paramName isEqualToString:@"ios-package"]) {
             pluginsDict[featureName] = value;
         }
-        NSString* onload = [attributeDict[@"onload"] lowercaseString];
-        if ([@"true" isEqualToString : onload]) {
+        BOOL paramIsOnload = ([paramName isEqualToString:@"onload"] && [@"true" isEqualToString
: value]);
+        BOOL attribIsOnload = [@"true" isEqualToString : [attributeDict[@"onload"] lowercaseString]];
+        if (paramIsOnload || attribIsOnload) {
             [self.startupPluginNames addObject:featureName];
         }
     } else if ([elementName isEqualToString:@"access"]) {


Mime
View raw message