Index: trunk/extensions/Wikidata/OmegaWiki/SpecialDatasearch.php |
— | — | @@ -76,9 +76,13 @@ |
77 | 77 | function execute($parameter) { |
78 | 78 | global |
79 | 79 | $wgOut, $wgTitle; |
80 | | - |
81 | | - $searchText = ltrim($_GET['search-text']); |
82 | 80 | |
| 81 | + if(array_key_exists('search-text', $_GET)) { |
| 82 | + $searchText = ltrim($_GET['search-text']); |
| 83 | + } else { |
| 84 | + $searchText = null; |
| 85 | + } |
| 86 | + |
83 | 87 | if (isset($_GET['go'])) |
84 | 88 | $this->go($searchText); |
85 | 89 | else |
Index: trunk/extensions/Wikidata/OmegaWiki/type.php |
— | — | @@ -63,8 +63,11 @@ |
64 | 64 | function languageIdAsText($languageId) { |
65 | 65 | global $wgUser; |
66 | 66 | $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 | + } |
69 | 72 | } |
70 | 73 | |
71 | 74 | function collectionIdAsText($collectionId) { |