Remove some methods marked for removal in 1.20 and update FakeTitle accordingly.
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 11 Feb 2012 14:36:36 +0000 (14:36 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 11 Feb 2012 14:36:36 +0000 (14:36 +0000)
No more callers in core or extensions.

includes/FakeTitle.php
includes/Preferences.php
includes/Title.php
includes/parser/ParserOptions.php

index 8415ec0..38455d6 100644 (file)
@@ -46,7 +46,6 @@ class FakeTitle extends Title {
        function isNamespaceProtected( User $user ) { $this->error(); }
        function userCan( $action, $user = null, $doExpensiveQueries = true ) { $this->error(); }
        function getUserPermissionsErrors( $action, $user, $doExpensiveQueries = true, $ignoreErrors = array() ) { $this->error(); }
-       function updateTitleProtection( $create_perm, $reason, $expiry ) { $this->error(); }
        function deleteTitleProtection() { $this->error(); }
        function isMovable() { $this->error(); }
        function userCanRead() { $this->error(); }
@@ -59,9 +58,6 @@ class FakeTitle extends Title {
        function getSkinFromCssJsSubpage() { $this->error(); }
        function isCssSubpage() { $this->error(); }
        function isJsSubpage() { $this->error(); }
-       function userCanEditCssJsSubpage() { $this->error(); }
-       function userCanEditCssSubpage() { $this->error(); }
-       function userCanEditJsSubpage() { $this->error(); }
        function isCascadeProtected() { $this->error(); }
        function getCascadeProtectionSources( $get_pages = true ) { $this->error(); }
        function areRestrictionsCascading() { $this->error(); }
index 3fe6a8c..08bcab8 100644 (file)
@@ -1461,27 +1461,6 @@ class Preferences {
 
                return array( true, $info );
        }
-
-       /**
-        * @deprecated in 1.19; will be removed in 1.20.
-        * @param $user User
-        * @return array
-        */
-       public static function loadOldSearchNs( $user ) {
-               wfDeprecated( __METHOD__, '1.19' );
-
-               $searchableNamespaces = SearchEngine::searchableNamespaces();
-               // Back compat with old format
-               $arr = array();
-
-               foreach ( $searchableNamespaces as $ns => $name ) {
-                       if ( $user->getOption( 'searchNs' . $ns ) ) {
-                               $arr[] = $ns;
-                       }
-               }
-
-               return $arr;
-       }
 }
 
 /** Some tweaks to allow js prefs to work */
index 0ef4cda..14f90d5 100644 (file)
@@ -2128,34 +2128,6 @@ class Title {
                return $errors;
        }
 
-       /**
-        * Protect css subpages of user pages: can $wgUser edit
-        * this page?
-        *
-        * @deprecated in 1.19; will be removed in 1.20. Use getUserPermissionsErrors() instead.
-        * @return Bool
-        */
-       public function userCanEditCssSubpage() {
-               global $wgUser;
-               wfDeprecated( __METHOD__, '1.19' );
-               return ( ( $wgUser->isAllowedAll( 'editusercssjs', 'editusercss' ) )
-                       || preg_match( '/^' . preg_quote( $wgUser->getName(), '/' ) . '\//', $this->mTextform ) );
-       }
-
-       /**
-        * Protect js subpages of user pages: can $wgUser edit
-        * this page?
-        *
-        * @deprecated in 1.19; will be removed in 1.20. Use getUserPermissionsErrors() instead.
-        * @return Bool
-        */
-       public function userCanEditJsSubpage() {
-               global $wgUser;
-               wfDeprecated( __METHOD__, '1.19' );
-               return ( ( $wgUser->isAllowedAll( 'editusercssjs', 'edituserjs' ) )
-                          || preg_match( '/^' . preg_quote( $wgUser->getName(), '/' ) . '\//', $this->mTextform ) );
-       }
-
        /**
         * Get a filtered list of all restriction types supported by this wiki.
         * @param bool $exists True to get all restriction types that apply to
@@ -2231,29 +2203,6 @@ class Title {
                return $this->mTitleProtection;
        }
 
-       /**
-        * Update the title protection status
-        *
-        * @deprecated in 1.19; will be removed in 1.20. Use WikiPage::doUpdateRestrictions() instead.
-        * @param $create_perm String Permission required for creation
-        * @param $reason String Reason for protection
-        * @param $expiry String Expiry timestamp
-        * @return boolean true
-        */
-       public function updateTitleProtection( $create_perm, $reason, $expiry ) {
-               wfDeprecated( __METHOD__, '1.19' );
-
-               global $wgUser;
-
-               $limit = array( 'create' => $create_perm );
-               $expiry = array( 'create' => $expiry );
-
-               $page = WikiPage::factory( $this );
-               $status = $page->doUpdateRestrictions( $limit, $expiry, false, $reason, $wgUser );
-
-               return $status->isOK();
-       }
-
        /**
         * Remove any title protection due to page existing
         */
index bf9611f..ba5dc7e 100644 (file)
@@ -278,9 +278,6 @@ class ParserOptions {
        function setNumberHeadings( $x )            { return wfSetVar( $this->mNumberHeadings, $x ); }
        function setAllowSpecialInclusion( $x )     { return wfSetVar( $this->mAllowSpecialInclusion, $x ); }
        function setTidy( $x )                      { return wfSetVar( $this->mTidy, $x ); }
-
-       /** @deprecated in 1.19; will be removed in 1.20 */
-       function setSkin( $x )                      { wfDeprecated( __METHOD__, '1.19' ); }
        function setInterfaceMessage( $x )          { return wfSetVar( $this->mInterfaceMessage, $x ); }
        function setTargetLanguage( $x )            { return wfSetVar( $this->mTargetLanguage, $x, true ); }
        function setMaxIncludeSize( $x )            { return wfSetVar( $this->mMaxIncludeSize, $x ); }