r60660 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60659‎ | r60660 | r60661 >
Date:12:04, 5 January 2010
Author:jojo
Status:ok
Tags:
Comment:
disable portlet and box for non-existant pages

Fixes http://code.pediapress.com/wiki/ticket/679
Modified paths:
  • /trunk/extensions/Collection/Collection.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Collection/Collection.hooks.php
@@ -80,6 +80,10 @@
8181 global $wgCollectionFormats;
8282 global $wgCollectionPortletFormats;
8383 global $wgScriptPath;
 84+
 85+ if ( is_null( $wgTitle ) || !$wgTitle->exists() ) {
 86+ return;
 87+ }
8488
8589 $namespace = $wgTitle->getNamespace();
8690
@@ -216,6 +220,10 @@
217221 return true;
218222 }
219223
 224+ if ( is_null( $wgTitle ) || !$wgTitle->exists() ) {
 225+ return true;
 226+ }
 227+
220228 $namespace = $wgTitle->getNamespace();
221229 if ( !in_array( $namespace, $wgCollectionArticleNamespaces )
222230 && $namespace != NS_CATEGORY ) {

Status & tagging log