r64776 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r64775‎ | r64776 | r64777 >
Date:06:17, 9 April 2010
Author:dale
Status:deferred
Tags:
Comment:
fixed some bugs with non-debug output missing some method getLatestTitleRev and fixed getPathFromClass call
Modified paths:
  • /branches/js2-work/phase3/includes/OutputPage.php (modified) (history)

Diff [purge]

Index: branches/js2-work/phase3/includes/OutputPage.php
@@ -2860,6 +2860,23 @@
28612861 }
28622862
28632863 /**
 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+ /**
28642881 * Get the unique request ID parameter for the script-loader request
28652882 * @param $classAry Array of classes
28662883 * @return String The unique url id per cache version of js
@@ -2899,7 +2916,7 @@
29002917 }else{
29012918 // Check for file modified time:
29022919 if( $wgScriptModifiedFileCheck ) {
2903 - $jsPath = jsScriptLoader::getJsPathFromClass( $class );
 2920+ $jsPath = jsScriptLoader::getPathFromClass( $class );
29042921 if( $jsPath ) {
29052922 $cur_ftime = filemtime ( $IP ."/". $jsPath );
29062923 if( $cur_ftime > $ftime )

Status & tagging log