Index: branches/js2-work/phase3/includes/OutputPage.php |
— | — | @@ -2860,6 +2860,23 @@ |
2861 | 2861 | } |
2862 | 2862 | |
2863 | 2863 | /** |
| 2864 | + * Get the latest title revision from a title |
| 2865 | + * update the tRev if larger than the current |
| 2866 | + * @param {Number} $currentTitleRev Current latest revision |
| 2867 | + * @param {String} $titleString String of title to check |
| 2868 | + * @return {Number} Latest revision number |
| 2869 | + */ |
| 2870 | + public static function getLatestTitleRev( $titleRev, $titleString ){ |
| 2871 | + $t = Title::newFromText( $titleString ); |
| 2872 | + if( $t && $t->exists() ) { |
| 2873 | + if( $t->getLatestRevID() > $titleRev ){ |
| 2874 | + return $t->getLatestRevID(); |
| 2875 | + } |
| 2876 | + } |
| 2877 | + return $titleRev; |
| 2878 | + } |
| 2879 | + |
| 2880 | + /** |
2864 | 2881 | * Get the unique request ID parameter for the script-loader request |
2865 | 2882 | * @param $classAry Array of classes |
2866 | 2883 | * @return String The unique url id per cache version of js |
— | — | @@ -2899,7 +2916,7 @@ |
2900 | 2917 | }else{ |
2901 | 2918 | // Check for file modified time: |
2902 | 2919 | if( $wgScriptModifiedFileCheck ) { |
2903 | | - $jsPath = jsScriptLoader::getJsPathFromClass( $class ); |
| 2920 | + $jsPath = jsScriptLoader::getPathFromClass( $class ); |
2904 | 2921 | if( $jsPath ) { |
2905 | 2922 | $cur_ftime = filemtime ( $IP ."/". $jsPath ); |
2906 | 2923 | if( $cur_ftime > $ftime ) |