NP_WIKIPEDIA => NP_PROJECT, and code readability stuff
authorArne Heizmann <timwi@users.mediawiki.org>
Sat, 28 Aug 2004 17:53:12 +0000 (17:53 +0000)
committerArne Heizmann <timwi@users.mediawiki.org>
Sat, 28 Aug 2004 17:53:12 +0000 (17:53 +0000)
includes/Article.php
includes/Defines.php
includes/Namespace.php
includes/SearchEngine.php
includes/SkinPHPTal.php
includes/SpecialBooksources.php
includes/SpecialUndelete.php
languages/Language.php
languages/LanguageFi.php

index cd3abe6..3bde806 100644 (file)
@@ -1468,7 +1468,7 @@ class Article {
                        $wgOut->setRobotpolicy( 'noindex,nofollow' );
 
                        $sk = $wgUser->getSkin();
-                       $loglink = $sk->makeKnownLink( $wgLang->getNsText( NS_WIKIPEDIA ) .
+                       $loglink = $sk->makeKnownLink( $wgLang->getNsText( NS_PROJECT ) .
                          ':' . wfMsg( 'dellogpage' ), wfMsg( 'deletionlog' ) );
 
                        $text = wfMsg( 'deletedtext', $deleted, $loglink );
index 545de02..e5f5fb7 100644 (file)
@@ -31,8 +31,8 @@ define('NS_CATEGORY_TALK', 15);
 
 # Fix the code and remove these...
 define('NS_WP', NS_PROJECT);
-define('NS_WIKIPEDIA', NS_PROJECT);
 define('NS_WP_TALK', NS_PROJECT_TALK);
+define('NS_WIKIPEDIA', NS_PROJECT);
 define('NS_WIKIPEDIA_TALK', NS_PROJECT_TALK);
 
 ?>
index c8ea57d..5ae927b 100644 (file)
@@ -18,8 +18,8 @@ if( defined( 'MEDIAWIKI' ) ) {
        NS_TALK             => 'Talk',
        NS_USER             => 'User',
        NS_USER_TALK        => 'User_talk',
-       NS_WIKIPEDIA        => 'Project',
-       NS_WIKIPEDIA_TALK   => 'Project_talk',
+       NS_PROJECT          => 'Project',
+       NS_PROJECT_TALK     => 'Project_talk',
        NS_IMAGE            => 'Image',
        NS_IMAGE_TALK       => 'Image_talk',
        NS_MEDIAWIKI        => 'MediaWiki',
@@ -37,7 +37,7 @@ class Namespace {
        /* These functions are deprecated */
        function getSpecial() { return NS_SPECIAL; }
        function getUser() { return NS_USER; }
-       function getWikipedia() { return NS_WP; }
+       function getWikipedia() { return NS_PROJECT; }
        function getImage() { return NS_IMAGE; }
        function getMedia() { return NS_MEDIA; }
        function getCategory() { return NS_CATEGORY; }
@@ -52,13 +52,10 @@ class Namespace {
 
        function isTalk( $index )
        {
-               if ( NS_TALK == $index || NS_USER_TALK == $index || NS_WP_TALK
-       == $index || NS_IMAGE_TALK == $index || NS_MEDIAWIKI_TALK == $index ||
-       NS_TEMPLATE_TALK == $index || NS_HELP_TALK == $index ||
-       NS_CATEGORY_TALK == $index ) {
-                       return true;
-               }
-               return false;
+               return ( $index == NS_TALK           || $index == NS_USER_TALK     ||
+                                $index == NS_PROJECT_TALK   || $index == NS_IMAGE_TALK    ||
+                                $index == NS_MEDIAWIKI_TALK || $index == NS_TEMPLATE_TALK ||
+                                $index == NS_HELP_TALK      || $index == NS_CATEGORY_TALK );
        }
 
        # Get the talk namespace corresponding to the given index
index e0713dc..1f37fe4 100644 (file)
@@ -490,7 +490,7 @@ class SearchEngine {
                $anyhit = false;
                global $wgDisableFuzzySearch;
                if(! $wgDisableFuzzySearch ){
-                       foreach( array(NS_MAIN, NS_WP, NS_USER, NS_IMAGE, NS_MEDIAWIKI) as $namespace){
+                       foreach( array(NS_MAIN, NS_PROJECT, NS_USER, NS_IMAGE, NS_MEDIAWIKI) as $namespace){
                                $anyhit |= SearchEngine::doFuzzyTitleSearch( $this->rawText, $namespace );
                        }
                }
index 7d6e2b9..0e474a6 100644 (file)
@@ -526,8 +526,8 @@ if( defined( "MEDIAWIKI" ) ) {
                                        return 'nstab-media';
                                case NS_SPECIAL:
                                        return 'nstab-special';
-                               case NS_WP:
-                               case NS_WP_TALK:
+                               case NS_PROJECT:
+                               case NS_PROJECT_TALK:
                                        return 'nstab-wp';
                                case NS_IMAGE:
                                case NS_IMAGE_TALK:
index b193067..90262b8 100644 (file)
@@ -41,7 +41,7 @@ class BookSourceList {
                
                # First, see if we have a custom list setup in
                # [[Wikipedia:Book sources]] or equivalent.
-               $bstitle = Title::makeTitleSafe( NS_WIKIPEDIA, wfMsg( "booksources" ) );
+               $bstitle = Title::makeTitleSafe( NS_PROJECT, wfMsg( "booksources" ) );
                $dbr =& wfGetDB( DB_SLAVE );
                $bstext = $dbr->selectField( 'cur', 'cur_text', $bstitle->curCond(), $fname );
                if( $bstext ) { 
index b65d67b..8da3764 100644 (file)
@@ -134,7 +134,7 @@ class UndeleteForm {
        </form>");
 
                $log = $dbr->selectField( "cur", "cur_text", 
-                       array( 'cur_namespace' => NS_WIKIPEDIA, 'cur_title' => wfMsg("dellogpage") ) );
+                       array( 'cur_namespace' => NS_PROJECT, 'cur_title' => wfMsg("dellogpage") ) );
                if(preg_match("/^(.*".
                        preg_quote( ($namespace ? ($wgLang->getNsText($namespace) . ":") : "")
                        . str_replace("_", " ", $title), "/" ).".*)$/m", $log, $m)) {
index 22c000a..5c0c3ff 100644 (file)
@@ -32,8 +32,8 @@ if($wgMetaNamespace === FALSE)
        NS_TALK             => 'Talk',
        NS_USER             => 'User',
        NS_USER_TALK        => 'User_talk',
-       NS_WIKIPEDIA        => $wgMetaNamespace,
-       NS_WIKIPEDIA_TALK   => $wgMetaNamespace . '_talk',
+       NS_PROJECT          => $wgMetaNamespace,
+       NS_PROJECT_TALK     => $wgMetaNamespace . '_talk',
        NS_IMAGE            => 'Image',
        NS_IMAGE_TALK       => 'Image_talk',
        NS_MEDIAWIKI        => 'MediaWiki',
index 6d1e193..20f5931 100644 (file)
@@ -833,10 +833,6 @@ Näissä tapauksissa sivut täytyy siirtää tai yhdistää käsin.",
 require_once( "LanguageUtf8.php" );
 
 class LanguageFi extends LanguageUtf8 {
-       /*function LanguageFi() {
-               global $wgNamespaceNamesFi, $wgMetaNamespace;
-               $wgNamespaceNamesFi[NS_WP_TALK] = 'Keskustelu_' . $this->convertGrammar( $wgMetaNamespace, 'elative' );
-       }*/
 
        function getNamespaces() {
                global $wgNamespaceNamesFi;