Changeset 65

Show
Ignore:
Timestamp:
07/21/08 15:18:50 (2 months ago)
Author:
bi..@lilyapp.org
Message:

Fix bug from previous checkin

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lily/lily/chrome/content/externals.js

    r64 r65  
    6969        */ 
    7070        add:function(leafName,filePath) { 
    71                 var stripped = LilyUtils.stripExtension(leafName); 
    72                 if(typeof this.objLeaf["_"+stripped]=="undefined") { //no dupes 
    73                         if(LilyUtils.isLegalID(stripped)) { 
    74                                 this.objArray.push({name:leafName,path:filePath}); 
    75                                 this.objLeaf["_"+stripped]=leafName;     
     71                if(!LilyUtils.isHelpPatch(leafName)) { //don't load help patches 
     72                        var stripped = LilyUtils.stripExtension(leafName); 
     73                        if(typeof this.objLeaf["_"+stripped]=="undefined") { //no dupes 
     74                                if(LilyUtils.isLegalID(stripped)) { //check for illegal filenames 
     75                                        this.objArray.push({name:leafName,path:filePath}); 
     76                                        this.objLeaf["_"+stripped]=leafName;     
     77                                } else { 
     78                                        LilyDebugWindow.error("Couldn't load the patch or external "+stripped+" because the name contains illegal characters."); 
     79                                }                
    7680                        } else { 
    77                                 LilyDebugWindow.error("Couldn't load the patch or external "+stripped+" because the name contains illegal characters."); 
    78                         }                
    79                 } else { 
    80                         LilyDebugWindow.error("Couldn't load the patch or external "+stripped+". An object with that name is already exists."); 
     81                                LilyDebugWindow.error("Couldn't load the patch or external "+stripped+". An object with that name is already exists."); 
     82                        }        
    8183                } 
    8284        }, 
  • trunk/lily/lily/chrome/content/utils.js

    r64 r65  
    14221422         
    14231423        /* 
     1424                Method: isHelpPatch 
     1425                        evaluates if a filenmae is a lily help patch. 
     1426         
     1427                Arguments:  
     1428                        str - string to evaluate 
     1429                 
     1430                Returns:  
     1431                        returns boolean- true if help patch. 
     1432        */ 
     1433        isHelpPatch: function(str) { 
     1434                return (/\-help\.json$/.test(str)); 
     1435        },       
     1436         
     1437        /* 
    14241438                Method: extractPatchDesc 
    14251439                        get the patch size without having to eval the patch JSON.