[Laszlo-checkins] r17038 - openlaszlo/trunk/lps/includes/source

max@openlaszlo.org max at openlaszlo.org
Wed Jul 21 16:14:38 PDT 2010


Author: max
Date: 2010-07-21 16:14:34 -0700 (Wed, 21 Jul 2010)
New Revision: 17038

Modified:
   openlaszlo/trunk/lps/includes/source/embednew.js
   openlaszlo/trunk/lps/includes/source/flash.js
Log:
Change 20100721-maxcarlson-c by maxcarlson at friendly on 2010-07-21 13:48:03 PDT
    in /Users/maxcarlson/openlaszlo/trunk-clean
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Fix Flash player upgrading

Bugs Fixed: LPP-9218 - Flash upgrade mechanism isn't recognizing Flash versions correctly

Technical Reviewer: hminsky
QA Reviewer: ptw

Details: embednew.js - Set minimum Flash version to 10.1

flash.js - Conditionalize parseFloat() behavior for older versions of the player so isVersionOrAbove(10,1,53) will work.  _detectVersion() makes version in the format 10.1 instead of 10.53.  Update install.needed() to check version, e.g. 10.1 instead of just checking major version number, e.g. 10.

Tests: See LPP-9218



Modified: openlaszlo/trunk/lps/includes/source/embednew.js
===================================================================
--- openlaszlo/trunk/lps/includes/source/embednew.js	2010-07-21 23:12:46 UTC (rev 17037)
+++ openlaszlo/trunk/lps/includes/source/embednew.js	2010-07-21 23:14:34 UTC (rev 17038)
@@ -61,12 +61,12 @@
      * {url: 'myapp.lzx?lzt=swf', bgcolor: '#000000', width: '800', height: '600', id: 'lzapp', accessible: true, history: true/false}
      *
      * @param minimumVersion:Number the version the flash player should 
-     * upgrade to if necessary.  Defaults to 10 for security reasons.
+     * upgrade to if necessary.  Defaults to 10.1 for security reasons.
      */
     ,swf: function (properties, minimumVersion) {
         var embed = lz.embed;
-        // Upgrade to flash player 10 for security reasons
-        if (minimumVersion == null) minimumVersion = 10;
+        // Upgrade to flash player 10.1 for security reasons
+        if (minimumVersion == null) minimumVersion = 10.1;
 
         if (! properties.id) {
             // Generate a unique ID

Modified: openlaszlo/trunk/lps/includes/source/flash.js
===================================================================
--- openlaszlo/trunk/lps/includes/source/flash.js	2010-07-21 23:12:46 UTC (rev 17037)
+++ openlaszlo/trunk/lps/includes/source/flash.js	2010-07-21 23:14:34 UTC (rev 17038)
@@ -556,9 +556,11 @@
         //    Returns true if the player is equal
         //    or above the given version, false otherwise.
         
-        // make the revision a decimal (i.e. transform revision 14 into
-        // 0.14
-        reqVer = parseFloat("." + reqVer);
+        if (this.versionMajor < 9) {
+            // make the revision a decimal (i.e. transform revision 14 into
+            // 0.14
+            reqVer = parseFloat("." + reqVer);
+        }
         
         if(this.versionMajor >= reqMajorVer && this.versionMinor >= reqMinorVer
              && this.versionRevision >= reqVer){
@@ -598,7 +600,7 @@
                 this.versionRevision = versionArray[2];
                 
                 // 7.0r24 == 7.24
-                var versionString = this.versionMajor + "." + this.versionRevision;
+                var versionString = this.versionMajor + "." + this.versionMinor;
                 this.version = parseFloat(versionString);
                 
                 this.capable = true;
@@ -1285,7 +1287,7 @@
         }
 
         // pay attention to the minimum requirements  
-        if (dojo.minimumVersion > dojo.info.versionMajor) {
+        if (dojo.minimumVersion > dojo.info.version) {
             return true;
         }        
 



More information about the Laszlo-checkins mailing list