r19813 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r19812‎ | r19813 | r19814 >
Date:10:34, 7 February 2007
Author:proes
Status:old
Tags:
Comment:
Page title prefixes now can be configured from LocalSettings.php. These page title prefixes are only used when $wgShowClassicPageTitles = false.
Modified paths:
  • /trunk/extensions/Wikidata/OmegaWiki/DefinedMeaning.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/OmegaWiki.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/WikiDataGlobals.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Wikidata/OmegaWiki/DefinedMeaning.php
@@ -116,10 +116,15 @@
117117 }
118118
119119 public function getTitle() {
120 - global
121 - $wgTitle;
122 -
123 - return definedMeaningExpression($this->getDefinedMeaningIdFromTitle($wgTitle->getText()));
 120+ global
 121+ $wgTitle, $wgDefinedMeaningPageTitlePrefix;
 122+
 123+ if ($wgDefinedMeaningPageTitlePrefix != "")
 124+ $prefix = $wgDefinedMeaningPageTitlePrefix . ": ";
 125+ else
 126+ $prefix = "";
 127+
 128+ return $prefix . definedMeaningExpression($this->getDefinedMeaningIdFromTitle($wgTitle->getText()));
124129 }
125130 }
126131
Index: trunk/extensions/Wikidata/OmegaWiki/WikiDataGlobals.php
@@ -146,4 +146,11 @@
147147
148148 $wgGotoSourceTemplates = array(); // Map of collection id => GotoSourceTemplate
149149
 150+global
 151+ $wgDefinedMeaningPageTitlePrefix,
 152+ $wgExpressionPageTitlePrefix;
 153+
 154+$wgDefinedMeaningPageTitlePrefix = "";
 155+$wgExpressionPageTitlePrefix = "Multiple meanings";
 156+
150157 ?>
\ No newline at end of file
Index: trunk/extensions/Wikidata/OmegaWiki/OmegaWiki.php
@@ -10,6 +10,7 @@
1111 require_once('HTMLtable.php');
1212 require_once('OmegaWikiRecordSets.php');
1313 require_once('OmegaWikiEditors.php');
 14+require_once('WikiDataGlobals.php');
1415
1516 /**
1617 * Load and modify content in a OmegaWiki-enabled
@@ -110,9 +111,14 @@
111112
112113 public function getTitle() {
113114 global
114 - $wgTitle;
115 -
116 - return "Disambiguation: " . $wgTitle->getText();
 115+ $wgTitle, $wgExpressionPageTitlePrefix;
 116+
 117+ if ($wgExpressionPageTitlePrefix != "")
 118+ $prefix = $wgExpressionPageTitlePrefix . ": ";
 119+ else
 120+ $prefix = "";
 121+
 122+ return $prefix . $wgTitle->getText();
117123 }
118124
119125 protected function getIdStack() {