From: Alexandre Emsenhuber Date: Sat, 11 Feb 2012 14:36:36 +0000 (+0000) Subject: Remove some methods marked for removal in 1.20 and update FakeTitle accordingly. X-Git-Tag: 1.31.0-rc.0~24775 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=435c7eb6163f9761183a17955fca88b379c0fa8b;p=lhc%2Fweb%2Fwiklou.git Remove some methods marked for removal in 1.20 and update FakeTitle accordingly. No more callers in core or extensions. --- diff --git a/includes/FakeTitle.php b/includes/FakeTitle.php index 8415ec08bd..38455d660f 100644 --- a/includes/FakeTitle.php +++ b/includes/FakeTitle.php @@ -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(); } diff --git a/includes/Preferences.php b/includes/Preferences.php index 3fe6a8cc0e..08bcab896a 100644 --- a/includes/Preferences.php +++ b/includes/Preferences.php @@ -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 */ diff --git a/includes/Title.php b/includes/Title.php index 0ef4cda26b..14f90d5b59 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -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 */ diff --git a/includes/parser/ParserOptions.php b/includes/parser/ParserOptions.php index bf9611f365..ba5dc7e900 100644 --- a/includes/parser/ParserOptions.php +++ b/includes/parser/ParserOptions.php @@ -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 ); }