Index: trunk/phase3/RELEASE-NOTES-1.19 |
— | — | @@ -117,9 +117,9 @@ |
118 | 118 | * (bug 33456) Show $wgQueryCacheLimit on cached query pages. |
119 | 119 | * (bug 10574) Add an option to allow all pages to be exported by Special:Export. |
120 | 120 | * mediawiki.js Message object constructor is now publicly available as mw.Message. |
121 | | -* (bug 29309) allow CSS class per tooltip (tipsy) |
| 121 | +* (bug 29309) Allow CSS class per tooltip (tipsy). |
122 | 122 | * (bug 33565) Add accesskey/tooltip to submit buttons on Special:EditWatchlist. |
123 | | -* (bug 17959) Inline rendering/thumbnailing for Gimp XCF images |
| 123 | +* (bug 17959) Inline rendering/thumbnailing for Gimp XCF images. |
124 | 124 | * (bug 32341) Add upload by URL domain limitation. |
125 | 125 | |
126 | 126 | === Bug fixes in 1.19 === |
— | — | @@ -292,7 +292,7 @@ |
293 | 293 | been removed from wikibits.js |
294 | 294 | * jquery.mwPrototypes module was renamed to jquery.mwExtension. |
295 | 295 | * The maintenance script populateSha1.php was renamed to the more concise |
296 | | - populateImageSha1.php |
| 296 | + populateImageSha1.php. |
297 | 297 | * The Client-IP header is no longer checked for when trying to resolve a client's |
298 | 298 | real IP address. |
299 | 299 | * (bug 22096) Although IE5.x and below was already unsupported officially, stylesheets |
Index: trunk/phase3/includes/specials/SpecialRecentchangeslinked.php |
— | — | @@ -69,13 +69,14 @@ |
70 | 70 | if ( $target === '' ) { |
71 | 71 | return false; |
72 | 72 | } |
| 73 | + $outputPage = $this->getOutput(); |
73 | 74 | $title = Title::newFromURL( $target ); |
74 | 75 | if( !$title || $title->getInterwiki() != '' ){ |
75 | | - $this->getOutput()->wrapWikiMsg( "<div class=\"errorbox\">\n$1\n</div><br style=\"clear: both\" />", 'allpagesbadtitle' ); |
| 76 | + $outputPage->wrapWikiMsg( "<div class=\"errorbox\">\n$1\n</div><br style=\"clear: both\" />", 'allpagesbadtitle' ); |
76 | 77 | return false; |
77 | 78 | } |
78 | 79 | |
79 | | - $this->getOutput()->setPageTitle( $this->msg( 'recentchangeslinked-title', $title->getPrefixedText() ) ); |
| 80 | + $outputPage->setPageTitle( $this->msg( 'recentchangeslinked-title', $title->getPrefixedText() ) ); |
80 | 81 | |
81 | 82 | /* |
82 | 83 | * Ordinary links are in the pagelinks table, while transclusions are |
— | — | @@ -113,8 +114,9 @@ |
114 | 115 | $query_options, $opts['tagfilter'] ); |
115 | 116 | } |
116 | 117 | |
117 | | - if ( !wfRunHooks( 'SpecialRecentChangesQuery', array( &$conds, &$tables, &$join_conds, $opts, &$query_options, &$select ) ) ) |
| 118 | + if ( !wfRunHooks( 'SpecialRecentChangesQuery', array( &$conds, &$tables, &$join_conds, $opts, &$query_options, &$select ) ) ) { |
118 | 119 | return false; |
| 120 | + } |
119 | 121 | |
120 | 122 | if( $ns == NS_CATEGORY && !$showlinkedto ) { |
121 | 123 | // special handling for categories |
— | — | @@ -125,11 +127,14 @@ |
126 | 128 | // for now, always join on these tables; really should be configurable as in whatlinkshere |
127 | 129 | $link_tables = array( 'pagelinks', 'templatelinks' ); |
128 | 130 | // imagelinks only contains links to pages in NS_FILE |
129 | | - if( $ns == NS_FILE || !$showlinkedto ) $link_tables[] = 'imagelinks'; |
| 131 | + if( $ns == NS_FILE || !$showlinkedto ) { |
| 132 | + $link_tables[] = 'imagelinks'; |
| 133 | + } |
130 | 134 | } |
131 | 135 | |
132 | | - if( $id == 0 && !$showlinkedto ) |
| 136 | + if( $id == 0 && !$showlinkedto ) { |
133 | 137 | return false; // nonexistent pages can't link to any pages |
| 138 | + } |
134 | 139 | |
135 | 140 | // field name prefixes for all the various tables we might want to join with |
136 | 141 | $prefix = array( 'pagelinks' => 'pl', 'templatelinks' => 'tl', 'categorylinks' => 'cl', 'imagelinks' => 'il' ); |
— | — | @@ -140,14 +145,20 @@ |
141 | 146 | $pfx = $prefix[$link_table]; |
142 | 147 | |
143 | 148 | // imagelinks and categorylinks tables have no xx_namespace field, and have xx_to instead of xx_title |
144 | | - if( $link_table == 'imagelinks' ) $link_ns = NS_FILE; |
145 | | - elseif( $link_table == 'categorylinks' ) $link_ns = NS_CATEGORY; |
146 | | - else $link_ns = 0; |
| 149 | + if( $link_table == 'imagelinks' ) { |
| 150 | + $link_ns = NS_FILE; |
| 151 | + } elseif( $link_table == 'categorylinks' ) { |
| 152 | + $link_ns = NS_CATEGORY; |
| 153 | + } else { |
| 154 | + $link_ns = 0; |
| 155 | + } |
147 | 156 | |
148 | 157 | if( $showlinkedto ) { |
149 | 158 | // find changes to pages linking to this page |
150 | 159 | if( $link_ns ) { |
151 | | - if( $ns != $link_ns ) continue; // should never happen, but check anyway |
| 160 | + if( $ns != $link_ns ) { |
| 161 | + continue; |
| 162 | + } // should never happen, but check anyway |
152 | 163 | $subconds = array( "{$pfx}_to" => $dbkey ); |
153 | 164 | } else { |
154 | 165 | $subconds = array( "{$pfx}_namespace" => $ns, "{$pfx}_title" => $dbkey ); |
— | — | @@ -164,12 +175,12 @@ |
165 | 176 | } |
166 | 177 | } |
167 | 178 | |
168 | | - if( $dbr->unionSupportsOrderAndLimit()) |
| 179 | + if( $dbr->unionSupportsOrderAndLimit()) { |
169 | 180 | $order = array( 'ORDER BY' => 'rc_timestamp DESC' ); |
170 | | - else |
| 181 | + } else { |
171 | 182 | $order = array(); |
| 183 | + } |
172 | 184 | |
173 | | - |
174 | 185 | $query = $dbr->selectSQLText( |
175 | 186 | array_merge( $tables, array( $link_table ) ), |
176 | 187 | $select, |
— | — | @@ -185,11 +196,12 @@ |
186 | 197 | $subsql[] = $query; |
187 | 198 | } |
188 | 199 | |
189 | | - if( count($subsql) == 0 ) |
| 200 | + if( count($subsql) == 0 ) { |
190 | 201 | return false; // should never happen |
191 | | - if( count($subsql) == 1 && $dbr->unionSupportsOrderAndLimit() ) |
| 202 | + } |
| 203 | + if( count($subsql) == 1 && $dbr->unionSupportsOrderAndLimit() ) { |
192 | 204 | $sql = $subsql[0]; |
193 | | - else { |
| 205 | + } else { |
194 | 206 | // need to resort and relimit after union |
195 | 207 | $sql = $dbr->unionQueries($subsql, false).' ORDER BY rc_timestamp DESC'; |
196 | 208 | $sql = $dbr->limitResult($sql, $limit, false); |
— | — | @@ -197,12 +209,17 @@ |
198 | 210 | |
199 | 211 | $res = $dbr->query( $sql, __METHOD__ ); |
200 | 212 | |
201 | | - if( $res->numRows() == 0 ) |
| 213 | + if( $res->numRows() == 0 ) { |
202 | 214 | $this->mResultEmpty = true; |
| 215 | + } |
203 | 216 | |
204 | 217 | return $res; |
205 | 218 | } |
206 | 219 | |
| 220 | + /** |
| 221 | + * @param $opts FormOptions |
| 222 | + * @return array |
| 223 | + */ |
207 | 224 | function getExtraOptions( $opts ){ |
208 | 225 | $opts->consumeValues( array( 'showlinkedto', 'target', 'tagfilter' ) ); |
209 | 226 | $extraOpts = array(); |
— | — | @@ -212,8 +229,9 @@ |
213 | 230 | Xml::check( 'showlinkedto', $opts['showlinkedto'], array('id' => 'showlinkedto') ) . ' ' . |
214 | 231 | Xml::label( wfMsg("recentchangeslinked-to"), 'showlinkedto' ) ); |
215 | 232 | $tagFilter = ChangeTags::buildTagFilterSelector( $opts['tagfilter'] ); |
216 | | - if ($tagFilter) |
| 233 | + if ($tagFilter) { |
217 | 234 | $extraOpts['tagfilter'] = $tagFilter; |
| 235 | + } |
218 | 236 | return $extraOpts; |
219 | 237 | } |
220 | 238 | |
Index: trunk/phase3/maintenance/mctest.php |
— | — | @@ -36,8 +36,9 @@ |
37 | 37 | global $wgMemCachedServers; |
38 | 38 | |
39 | 39 | $iterations = $this->getOption( 'i', 100 ); |
40 | | - if ( $this->hasArg() ) |
| 40 | + if ( $this->hasArg() ) { |
41 | 41 | $wgMemCachedServers = array( $this->getArg() ); |
| 42 | + } |
42 | 43 | |
43 | 44 | foreach ( $wgMemCachedServers as $server ) { |
44 | 45 | $this->output( $server . " ", $server ); |