r85866 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85865‎ | r85866 | r85867 >
Date:06:48, 12 April 2011
Author:mkroetzsch
Status:deferred
Tags:
Comment:
remove old MW 1.14 compatibility flag; we no longer support 1.14 anyway
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_ParseData.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_Setup.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_SetupLight.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/export/SMW_ExportController.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialSearchByProperty.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialSearchByProperty.php
@@ -206,7 +206,7 @@
207207 * @return string HTML with the navigation bar
208208 */
209209 private function getNavigationBar( $count ) {
210 - global $wgUser, $smwgQMaxInlineLimit, $smwgMW_1_14;
 210+ global $wgUser, $smwgQMaxInlineLimit;
211211 $skin = $wgUser->getSkin();
212212
213213 if ( $this->offset > 0 )
@@ -229,7 +229,7 @@
230230 $navigation .= '        (';
231231 $first = false;
232232 } else {
233 - $navigation .= ' ' . ( $smwgMW_1_14 ? wfMsgExt( 'pipe-separator' , 'escapenoentities' ):'|' ) . ' ';
 233+ $navigation .= ' ' . wfMsgExt( 'pipe-separator' , 'escapenoentities' ) . ' ';
234234 }
235235 if ( $l > $smwgQMaxInlineLimit ) {
236236 $l = $smwgQMaxInlineLimit;
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_ParseData.php
@@ -149,7 +149,7 @@
150150 * @todo FIXME: Some job generations here might create too many jobs at once on a large wiki. Use incremental jobs instead.
151151 */
152152 static public function storeData( $parseroutput, Title $title, $makejobs = true ) {
153 - global $smwgEnableUpdateJobs, $wgContLang, $smwgMW_1_14, $smwgDeclarationProperties;
 153+ global $smwgEnableUpdateJobs, $wgContLang, $smwgDeclarationProperties;
154154
155155 $semdata = $parseroutput->mSMWData;
156156 $namespace = $title->getNamespace();
@@ -163,7 +163,7 @@
164164 $pmdat = new SMWDIProperty( '_MDAT' );
165165
166166 if ( count( $semdata->getPropertyValues( $pmdat ) ) == 0 ) { // no article data present yet, add it here
167 - $timestamp = $smwgMW_1_14 ? Revision::getTimeStampFromID( $title, $title->getLatestRevID() ) : Revision::getTimeStampFromID( $title->getLatestRevID() );
 167+ $timestamp = Revision::getTimeStampFromID( $title, $title->getLatestRevID() );
168168 $di = self::getDataItemFromMWTimestamp( $timestamp );
169169 if ( $di !== null ) {
170170 $semdata->addPropertyObjectValue( $pmdat, $di );
Index: trunk/extensions/SemanticMediaWiki/includes/export/SMW_ExportController.php
@@ -371,7 +371,6 @@
372372 * functionality. Is anybody using this?
373373 */
374374 public function printPages( $pages, $recursion = 1, $revisiondate = false ) {
375 - global $smwgMW_1_14;
376375 wfProfileIn( "RDF::PrintPages" );
377376
378377 $linkCache =& LinkCache::singleton();
@@ -383,7 +382,7 @@
384383 $title = Title::newFromText( $page );
385384 if ( null === $title ) continue; // invalid title name given
386385 if ( $revisiondate !== '' ) { // filter page list by revision date
387 - $rev = $smwgMW_1_14 ? Revision::getTimeStampFromID( $title, $title->getLatestRevID() ) : Revision::getTimeStampFromID( $title->getLatestRevID() );
 386+ $rev = Revision::getTimeStampFromID( $title, $title->getLatestRevID() );
388387 if ( $rev < $revisiondate ) continue;
389388 }
390389 $st = new SMWSmallTitle();
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_SetupLight.php
@@ -261,7 +261,7 @@
262262 */
263263 function smwfSetupExtension() {
264264 wfProfileIn( 'smwfSetupExtension (SMW)' );
265 - global $smwgIP, $wgHooks, $wgExtensionCredits, $smwgEnableTemplateSupport, $smwgMasterStore, $smwgIQRunningNumber, $wgLanguageCode, $wgVersion, $smwgToolboxBrowseLink, $smwgMW_1_14;
 265+ global $smwgIP, $wgHooks, $wgExtensionCredits, $smwgEnableTemplateSupport, $smwgMasterStore, $smwgIQRunningNumber, $wgLanguageCode, $wgVersion, $smwgToolboxBrowseLink;
266266
267267 $smwgMasterStore = null;
268268 $smwgIQRunningNumber = 0;
@@ -280,8 +280,6 @@
281281 $wgHooks['ArticleFromTitle'][] = 'smwfOnArticleFromTitle'; // special implementations for property/type articles
282282 $wgHooks['ParserFirstCallInit'][] = 'smwfRegisterParserFunctions';
283283
284 - $smwgMW_1_14 = true; // assume latest 1.14 API
285 -
286284 wfProfileOut( 'smwfSetupExtension (SMW)' );
287285 return true;
288286 }
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_Setup.php
@@ -295,7 +295,7 @@
296296 */
297297 function smwfSetupExtension() {
298298 wfProfileIn( 'smwfSetupExtension (SMW)' );
299 - global $smwgIP, $smwgScriptPath, $wgHooks, $wgFooterIcons, $wgExtensionCredits, $smwgEnableTemplateSupport, $smwgMasterStore, $smwgIQRunningNumber, $wgLanguageCode, $wgVersion, $smwgToolboxBrowseLink, $smwgMW_1_14;
 299+ global $smwgIP, $smwgScriptPath, $wgHooks, $wgFooterIcons, $wgExtensionCredits, $smwgEnableTemplateSupport, $smwgMasterStore, $smwgIQRunningNumber, $wgLanguageCode, $wgVersion, $smwgToolboxBrowseLink;
300300
301301 $smwgMasterStore = null;
302302 $smwgIQRunningNumber = 0;
@@ -324,7 +324,6 @@
325325 && $wgFooterIcons["poweredby"]["semanticmediawiki"]["src"] === null ) {
326326 $wgFooterIcons["poweredby"]["semanticmediawiki"]["src"] = "$smwgScriptPath/skins/images/smw_button.png";
327327 }
328 - $smwgMW_1_14 = true; // assume latest 1.14 API
329328
330329 wfProfileOut( 'smwfSetupExtension (SMW)' );
331330 return true;

Status & tagging log