r25060 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r25059‎ | r25060 | r25061 >
Date:16:41, 22 August 2007
Author:erik
Status:old
Tags:
Comment:
don't execute code when special page doesn't get run
Modified paths:
  • /trunk/extensions/Wikidata/OmegaWiki/SpecialDatasearch.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/Transaction.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Wikidata/OmegaWiki/SpecialDatasearch.php
@@ -35,7 +35,17 @@
3636
3737 function SpecialDatasearch() {
3838 SpecialPage::SpecialPage('Datasearch');
 39+ }
 40+
 41+ function execute($parameter) {
 42+ global
 43+ $wgOut, $wgTitle;
3944
 45+ initializeOmegaWikiAttributes(new ViewInformation());
 46+
 47+ global
 48+ $definedMeaningReferenceType;
 49+
4050 require_once("WikiDataGlobals.php");
4151 require_once("forms.php");
4252 require_once("type.php");
@@ -44,11 +54,6 @@
4555 require_once("OmegaWikiAttributes.php");
4656 require_once("OmegaWikiRecordSets.php");
4757 require_once("OmegaWikiEditors.php");
48 -
49 - initializeOmegaWikiAttributes(new ViewInformation());
50 -
51 - global
52 - $definedMeaningReferenceType;
5358
5459 $this->spellingAttribute = new Attribute("found-word", "Found word", "short-text");
5560 $this->languageAttribute = new Attribute("language", "Language", "language");
@@ -71,11 +76,6 @@
7277 $this->collectionAttribute,
7378 $this->collectionMemberAttribute
7479 );
75 - }
76 -
77 - function execute($parameter) {
78 - global
79 - $wgOut, $wgTitle;
8080
8181 if(array_key_exists('search-text', $_GET)) {
8282 $searchText = ltrim($_GET['search-text']);
Index: trunk/extensions/Wikidata/OmegaWiki/Transaction.php
@@ -235,6 +235,7 @@
236236 $recordLifeSpanStructure = new Structure($o->addTransaction, $o->removeTransaction);
237237 $o->recordLifeSpan = new Attribute('record-life-span', 'Record life span', $recordLifeSpanStructure);
238238
 239+
239240 function getUserName($userId) {
240241 $dbr =& wfGetDB(DB_SLAVE);
241242 $queryResult = $dbr->query("SELECT user_name FROM user WHERE user_id=$userId");

Status & tagging log