Index: branches/MwEmbedStandAlone/includes/noMediaWikiConfig.php |
— | — | @@ -148,7 +148,7 @@ |
149 | 149 | if( !is_file( $msgFile ) ) { |
150 | 150 | throw new MWException( "Missing msgFile: " . htmlspecialchars( $msgFile ) . "\n" ); |
151 | 151 | } |
152 | | - require_once( $msgFile ); |
| 152 | + require( $msgFile ); |
153 | 153 | // Save some time by only including the current language in the cache: |
154 | 154 | if( isset( $messages[ $langKey ] ) ) { |
155 | 155 | $wgMessageCache = array_merge( $wgMessageCache, $messages[ $langKey ] ); |
Index: branches/MwEmbedStandAlone/languages/mw.Language.js |
— | — | @@ -187,7 +187,10 @@ |
188 | 188 | * @param {Array} args An array of string or jquery objects to be swapped in |
189 | 189 | * @return string |
190 | 190 | */ |
191 | | - replaceStringArgs : function() { |
| 191 | + replaceStringArgs : function() { |
| 192 | + if( ! this.arguments ) { |
| 193 | + return ; |
| 194 | + } |
192 | 195 | // Replace Values |
193 | 196 | for ( var v = 0; v < this.arguments.length; v++ ) { |
194 | 197 | if( typeof this.arguments[v] == 'undefined' ) { |
Index: branches/MwEmbedStandAlone/jsScriptLoader.php |
— | — | @@ -131,7 +131,7 @@ |
132 | 132 | |
133 | 133 | // Output the loaders js |
134 | 134 | $loaderJS = jsClassLoader::getCombinedLoaderJs(); |
135 | | - // Transform the loader text to remove debug statments and |
| 135 | + // Transform the loader text to remove debug statements and |
136 | 136 | // update language msgs if any are present |
137 | 137 | $this->output .= $this->transformScriptText( $loaderJS , 'mwEmbed'); |
138 | 138 | |
— | — | @@ -789,6 +789,7 @@ |
790 | 790 | /* |
791 | 791 | * Transform script text with language key substitution |
792 | 792 | * and clear out debug lines if present. |
| 793 | + * @param {String} $scriptText Text string to be transformed |
793 | 794 | */ |
794 | 795 | function transformScriptText( $scriptText , $moduleName){ |
795 | 796 | global $wgEnableScriptLocalization; |
— | — | @@ -801,7 +802,6 @@ |
802 | 803 | if ( $wgEnableScriptLocalization ){ |
803 | 804 | // Get the mw.addMessage javascript from scriptText and moduleName |
804 | 805 | $addMessageJs = $this->getAddMessagesFromScriptText( & $scriptText , $moduleName); |
805 | | - |
806 | 806 | //@@NOTE getAddMessagesFromClass could identify which mode we are in and we would not need to |
807 | 807 | // try each of these search patterns in the same order as before. |
808 | 808 | |
— | — | @@ -1033,7 +1033,7 @@ |
1034 | 1034 | * @param {Array} $jmsg Associative array of message key -> message value pairs |
1035 | 1035 | * @param {String} $langCode Language code override |
1036 | 1036 | */ |
1037 | | - static public function updateMessageValues(& $messegeArray, $langCode = false){ |
| 1037 | + static public function updateMessageValues( & $messegeArray, $langCode = false ){ |
1038 | 1038 | global $wgLang; |
1039 | 1039 | // Check the langCode |
1040 | 1040 | if(!$langCode && $wgLang) { |