Add SessionManager
[lhc/web/wiklou.git] / includes / Title.php
index e2c2143..56ba4c7 100644 (file)
@@ -130,12 +130,6 @@ class Title {
         */
        public $mDefaultNamespace = NS_MAIN;
 
-       /**
-        * @var bool Is $wgUser watching this page? null if unfilled, accessed
-        * through userIsWatching()
-        */
-       protected $mWatched = null;
-
        /** @var int The page length, 0 for special pages */
        protected $mLength = -1;
 
@@ -768,16 +762,16 @@ class Title {
         * @param string $title The DB key form the title
         * @param string $fragment The link fragment (after the "#")
         * @param string $interwiki The interwiki prefix
-        * @param bool $canoncialNamespace If true, use the canonical name for
+        * @param bool $canonicalNamespace If true, use the canonical name for
         *   $ns instead of the localized version.
         * @return string The prefixed form of the title
         */
        public static function makeName( $ns, $title, $fragment = '', $interwiki = '',
-               $canoncialNamespace = false
+               $canonicalNamespace = false
        ) {
                global $wgContLang;
 
-               if ( $canoncialNamespace ) {
+               if ( $canonicalNamespace ) {
                        $namespace = MWNamespace::getCanonicalName( $ns );
                } else {
                        $namespace = $wgContLang->getNsText( $ns );
@@ -1875,25 +1869,6 @@ class Title {
                return $s;
        }
 
-       /**
-        * Is $wgUser watching this page?
-        *
-        * @deprecated since 1.20; use User::isWatched() instead.
-        * @return bool
-        */
-       public function userIsWatching() {
-               global $wgUser;
-
-               if ( is_null( $this->mWatched ) ) {
-                       if ( NS_SPECIAL == $this->mNamespace || !$wgUser->isLoggedIn() ) {
-                               $this->mWatched = false;
-                       } else {
-                               $this->mWatched = $wgUser->isWatched( $this );
-                       }
-               }
-               return $this->mWatched;
-       }
-
        /**
         * Can $user perform $action on this page?
         * This skips potentially expensive cascading permission checks
@@ -3562,7 +3537,7 @@ class Title {
         *
         * @return string[] Array of String the URLs
         */
-       public function getSquidURLs() {
+       public function getCdnUrls() {
                $urls = array(
                        $this->getInternalURL(),
                        $this->getInternalURL( 'action=history' )
@@ -3572,7 +3547,7 @@ class Title {
                if ( $pageLang->hasVariants() ) {
                        $variants = $pageLang->getVariants();
                        foreach ( $variants as $vCode ) {
-                               $urls[] = $this->getInternalURL( '', $vCode );
+                               $urls[] = $this->getInternalURL( $vCode );
                        }
                }
 
@@ -3587,12 +3562,19 @@ class Title {
                return $urls;
        }
 
+       /**
+        * @deprecated since 1.27 use getCdnUrls()
+        */
+       public function getSquidURLs() {
+               return $this->getCdnUrls();
+       }
+
        /**
         * Purge all applicable CDN URLs
         */
        public function purgeSquid() {
                DeferredUpdates::addUpdate(
-                       new CdnCacheUpdate( $this->getSquidURLs() ),
+                       new CdnCacheUpdate( $this->getCdnUrls() ),
                        DeferredUpdates::PRESEND
                );
        }