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(); }
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(); }
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 */
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
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
*/
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 ); }