Index: trunk/phase3/maintenance/updateCollation.php |
— | — | @@ -43,7 +43,7 @@ |
44 | 44 | up-to-date, it will do nothing. |
45 | 45 | TEXT; |
46 | 46 | |
47 | | - $this->addOption( 'force', 'Run on all rows, even if the collation is ' . |
| 47 | + $this->addOption( 'force', 'Run on all rows, even if the collation is ' . |
48 | 48 | 'supposed to be up-to-date.' ); |
49 | 49 | $this->addOption( 'previous-collation', 'Set the previous value of ' . |
50 | 50 | '$wgCategoryCollation here to speed up this script, especially if your ' . |
— | — | @@ -111,7 +111,7 @@ |
112 | 112 | # This is an old-style row, so the sortkey needs to be |
113 | 113 | # converted. |
114 | 114 | if ( $row->cl_sortkey == $title->getText() |
115 | | - || $row->cl_sortkey == $title->getPrefixedText() ) { |
| 115 | + || $row->cl_sortkey == $title->getPrefixedText() ) { |
116 | 116 | $prefix = ''; |
117 | 117 | } else { |
118 | 118 | # Custom sortkey, use it as a prefix |
— | — | @@ -148,14 +148,14 @@ |
149 | 149 | if ( $force && $row ) { |
150 | 150 | $encFrom = $dbw->addQuotes( $row->cl_from ); |
151 | 151 | $encTo = $dbw->addQuotes( $row->cl_to ); |
152 | | - $batchConds = array( |
| 152 | + $batchConds = array( |
153 | 153 | "(cl_from = $encFrom AND cl_to > $encTo) " . |
154 | 154 | " OR cl_from > $encFrom" ); |
155 | 155 | } |
156 | 156 | |
157 | 157 | $count += $res->numRows(); |
158 | 158 | $this->output( "$count done.\n" ); |
159 | | - |
| 159 | + |
160 | 160 | if ( ++$batchCount % self::SYNC_INTERVAL == 0 ) { |
161 | 161 | $this->output( "Waiting for slaves ... " ); |
162 | 162 | wfWaitForSlaves(); |
Index: trunk/phase3/maintenance/pruneFileCache.php |
— | — | @@ -23,6 +23,9 @@ |
24 | 24 | require_once( dirname( __FILE__ ) . '/Maintenance.php' ); |
25 | 25 | |
26 | 26 | class PruneFileCache extends Maintenance { |
| 27 | + |
| 28 | + protected $minSurviveTimestamp; |
| 29 | + |
27 | 30 | public function __construct() { |
28 | 31 | parent::__construct(); |
29 | 32 | $this->mDescription = "Build file cache for content pages"; |
Index: trunk/phase3/tests/parser/parserTest.inc |
— | — | @@ -766,7 +766,6 @@ |
767 | 767 | } |
768 | 768 | |
769 | 769 | $temporary = $this->useTemporaryTables || $dbType == 'postgres'; |
770 | | - $tables = $this->listTables(); |
771 | 770 | $prefix = $dbType != 'oracle' ? 'parsertest_' : 'pt_'; |
772 | 771 | |
773 | 772 | $this->dbClone = new CloneDatabase( $this->db, $this->listTables(), $prefix ); |
Index: trunk/phase3/includes/StubObject.php |
— | — | @@ -90,8 +90,9 @@ |
91 | 91 | function _unstub( $name = '_unstub', $level = 2 ) { |
92 | 92 | static $recursionLevel = 0; |
93 | 93 | |
94 | | - if ( !($GLOBALS[$this->mGlobal] instanceof StubObject) ) |
| 94 | + if ( !($GLOBALS[$this->mGlobal] instanceof StubObject) ) { |
95 | 95 | return $GLOBALS[$this->mGlobal]; // already unstubbed. |
| 96 | + } |
96 | 97 | |
97 | 98 | if ( get_class( $GLOBALS[$this->mGlobal] ) != $this->mClass ) { |
98 | 99 | $fname = __METHOD__.'-'.$this->mGlobal; |
— | — | @@ -124,6 +125,9 @@ |
125 | 126 | return $this->_call( $name, $args ); |
126 | 127 | } |
127 | 128 | |
| 129 | + /** |
| 130 | + * @return Language |
| 131 | + */ |
128 | 132 | function _newObject() { |
129 | 133 | global $wgLanguageCode; |
130 | 134 | $obj = Language::factory( $wgLanguageCode ); |
— | — | @@ -148,6 +152,9 @@ |
149 | 153 | return $this->_call( $name, $args ); |
150 | 154 | } |
151 | 155 | |
| 156 | + /** |
| 157 | + * @return Language |
| 158 | + */ |
152 | 159 | function _newObject() { |
153 | 160 | return RequestContext::getMain()->getLang(); |
154 | 161 | } |
Index: trunk/phase3/includes/parser/Tidy.php |
— | — | @@ -11,7 +11,7 @@ |
12 | 12 | * we may create a real postprocessor or something that will replace this. |
13 | 13 | * It's called wrapper because for now it basically takes over MWTidy::tidy's task |
14 | 14 | * of wrapping the text in a xhtml block |
15 | | - * |
| 15 | + * |
16 | 16 | * This re-uses some of the parser's UNIQ tricks, though some of it is private so it's |
17 | 17 | * duplicated. Perhaps we should create an abstract marker hiding class. |
18 | 18 | */ |
— | — | @@ -40,7 +40,7 @@ |
41 | 41 | $this->mUniqPrefix = "\x7fUNIQ" . |
42 | 42 | dechex( mt_rand( 0, 0x7fffffff ) ) . dechex( mt_rand( 0, 0x7fffffff ) ); |
43 | 43 | $this->mMarkerIndex = 0; |
44 | | - |
| 44 | + |
45 | 45 | $wrappedtext = preg_replace_callback( ParserOutput::EDITSECTION_REGEX, |
46 | 46 | array( &$this, 'replaceEditSectionLinksCallback' ), $text ); |
47 | 47 | |
— | — | @@ -126,7 +126,7 @@ |
127 | 127 | */ |
128 | 128 | public static function checkErrors( $text, &$errorStr = null ) { |
129 | 129 | global $wgTidyInternal; |
130 | | - |
| 130 | + |
131 | 131 | $retval = 0; |
132 | 132 | if( $wgTidyInternal ) { |
133 | 133 | $errorStr = self::execInternalTidy( $text, true, $retval ); |
— | — | @@ -166,7 +166,7 @@ |
167 | 167 | 2 => array( 'file', wfGetNull(), 'a' ) |
168 | 168 | ); |
169 | 169 | } |
170 | | - |
| 170 | + |
171 | 171 | $readpipe = $stderr ? 2 : 1; |
172 | 172 | $pipes = array(); |
173 | 173 | |
— | — | @@ -217,7 +217,7 @@ |
218 | 218 | if ( !MWInit::classExists( 'tidy' ) ) { |
219 | 219 | wfWarn( "Unable to load internal tidy class." ); |
220 | 220 | $retval = -1; |
221 | | - |
| 221 | + |
222 | 222 | wfProfileOut( __METHOD__ ); |
223 | 223 | return null; |
224 | 224 | } |
— | — | @@ -245,7 +245,7 @@ |
246 | 246 | "\n-->"; |
247 | 247 | } |
248 | 248 | } |
249 | | - |
| 249 | + |
250 | 250 | wfProfileOut( __METHOD__ ); |
251 | 251 | return $cleansource; |
252 | 252 | } |
Index: trunk/phase3/includes/LogEventsList.php |
— | — | @@ -677,9 +677,10 @@ |
678 | 678 | $logBody . |
679 | 679 | $loglist->endLogEventsList(); |
680 | 680 | } else { |
681 | | - if ( $showIfEmpty ) |
| 681 | + if ( $showIfEmpty ) { |
682 | 682 | $s = Html::rawElement( 'div', array( 'class' => 'mw-warning-logempty' ), |
683 | 683 | wfMsgExt( 'logempty', array( 'parseinline' ) ) ); |
| 684 | + } |
684 | 685 | } |
685 | 686 | if( $pager->getNumRows() > $pager->mLimit ) { # Show "Full log" link |
686 | 687 | $urlParam = array(); |
— | — | @@ -706,7 +707,7 @@ |
707 | 708 | $s .= '</div>'; |
708 | 709 | } |
709 | 710 | |
710 | | - if ( $wrap!='' ) { // Wrap message in html |
| 711 | + if ( $wrap != '' ) { // Wrap message in html |
711 | 712 | $s = str_replace( '$1', $s, $wrap ); |
712 | 713 | } |
713 | 714 | |
— | — | @@ -992,7 +993,11 @@ |
993 | 994 | return $info; |
994 | 995 | } |
995 | 996 | |
996 | | - // Checks if $this->mConds has $field matched to a *single* value |
| 997 | + /** |
| 998 | + * Checks if $this->mConds has $field matched to a *single* value |
| 999 | + * @param $field |
| 1000 | + * @return bool |
| 1001 | + */ |
997 | 1002 | protected function hasEqualsClause( $field ) { |
998 | 1003 | return ( |
999 | 1004 | array_key_exists( $field, $this->mConds ) && |
Index: trunk/phase3/includes/specials/SpecialBlock.php |
— | — | @@ -297,7 +297,6 @@ |
298 | 298 | |
299 | 299 | /** |
300 | 300 | * Add header elements like block log entries, etc. |
301 | | - * @return void |
302 | 301 | */ |
303 | 302 | protected function preText(){ |
304 | 303 | $text = $this->msg( 'blockiptext' )->parse(); |
Index: trunk/extensions/ParserFunctions/ParserFunctions.php |
— | — | @@ -69,6 +69,10 @@ |
70 | 70 | |
71 | 71 | $wgHooks['ParserFirstCallInit'][] = 'wfRegisterParserFunctions'; |
72 | 72 | |
| 73 | +/** |
| 74 | + * @param $parser Parser |
| 75 | + * @return bool |
| 76 | + */ |
73 | 77 | function wfRegisterParserFunctions( $parser ) { |
74 | 78 | global $wgPFEnableStringFunctions, $wgPFEnableConvert; |
75 | 79 | |