From 0e6c27ae83eaaecb968258477f98f82a1160fec0 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 21 Feb 2005 12:29:31 +0000 Subject: [PATCH] eat a couple more namespace cruft bits --- includes/Namespace.php | 12 ------------ index.php | 4 ++-- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/includes/Namespace.php b/includes/Namespace.php index 360f7e6184..f0992a72d2 100644 --- a/includes/Namespace.php +++ b/includes/Namespace.php @@ -51,18 +51,6 @@ if( defined( 'MEDIAWIKI' ) && is_array( $wgExtraNamespaces ) ) { */ class Namespace { - /**#@+ - * These functions are deprecated - * @deprecated - */ - function getSpecial() { return NS_SPECIAL; } - function getUser() { return NS_USER; } - function getWikipedia() { return NS_PROJECT; } - function getImage() { return NS_IMAGE; } - function getMedia() { return NS_MEDIA; } - function getCategory() { return NS_CATEGORY; } - /**#@-*/ - /** * Check if the given namespace might be moved * @return bool diff --git a/index.php b/index.php index 26bacbf843..0df55418d1 100644 --- a/index.php +++ b/index.php @@ -84,12 +84,12 @@ if( !$wgDisableInternalSearch && !is_null( $search ) && $search !== '' ) { /* redirect to canonical url, make it a 301 to allow caching */ $wgOut->setSquidMaxage( 1200 ); $wgOut->redirect( $wgTitle->getFullURL(), '301'); -} else if ( Namespace::getSpecial() == $wgTitle->getNamespace() ) { +} else if ( NS_SPECIAL == $wgTitle->getNamespace() ) { # actions that need to be made when we have a special pages require_once( 'includes/SpecialPage.php' ); SpecialPage::executePath( $wgTitle ); } else { - if ( Namespace::getMedia() == $wgTitle->getNamespace() ) { + if ( NS_MEDIA == $wgTitle->getNamespace() ) { $wgTitle = Title::makeTitle( NS_IMAGE, $wgTitle->getDBkey() ); } -- 2.20.1