r23712 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23711‎ | r23712 | r23713 >
Date:13:17, 4 July 2007
Author:erik
Status:old
Tags:
Comment:
fix notices
Modified paths:
  • /trunk/extensions/Wikidata/OmegaWiki/SpecialDatasearch.php (modified) (history)
  • /trunk/extensions/Wikidata/OmegaWiki/type.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Wikidata/OmegaWiki/SpecialDatasearch.php
@@ -76,9 +76,13 @@
7777 function execute($parameter) {
7878 global
7979 $wgOut, $wgTitle;
80 -
81 - $searchText = ltrim($_GET['search-text']);
8280
 81+ if(array_key_exists('search-text', $_GET)) {
 82+ $searchText = ltrim($_GET['search-text']);
 83+ } else {
 84+ $searchText = null;
 85+ }
 86+
8387 if (isset($_GET['go']))
8488 $this->go($searchText);
8589 else
Index: trunk/extensions/Wikidata/OmegaWiki/type.php
@@ -63,8 +63,11 @@
6464 function languageIdAsText($languageId) {
6565 global $wgUser;
6666 $owLanguageNames=getOwLanguageNames();
67 - $languageName=$owLanguageNames[$languageId];
68 - return $languageName;
 67+ if(array_key_exists($languageId, $owLanguageNames)) {
 68+ return $owLanguageNames[$languageId];
 69+ } else {
 70+ return null;
 71+ }
6972 }
7073
7174 function collectionIdAsText($collectionId) {

Status & tagging log