public $flags;
/**
- * @var Array
+ * @var array
*/
protected $mDefaultQuery;
/**
* Deprecated alias for getTitle(); do not use.
*
- * @deprecated in 1.20; use getTitle() instead.
+ * @deprecated since 1.20; use getTitle() instead.
* @return Title
*/
public function getDisplayTitle() {
return $this->getTitle();
}
- /**
- * Set page title and show header for this log type
- * @param array $type
- * @deprecated in 1.19
- */
- public function showHeader( $type ) {
- wfDeprecated( __METHOD__, '1.19' );
- // If only one log type is used, then show a special message...
- $headerType = count( $type ) == 1 ? $type[0] : '';
- $out = $this->getOutput();
- if ( LogPage::isLogType( $headerType ) ) {
- $page = new LogPage( $headerType );
- $out->setPageTitle( $page->getName()->text() );
- $out->addHTML( $page->getDescription()->parseAsBlock() );
- } else {
- $out->addHTML( $this->msg( 'alllogstext' )->parse() );
- }
- }
-
/**
* Show options for the log list
*
}
/**
- * @param $pattern
+ * @param string $pattern
* @return string Checkbox
*/
private function getTitlePattern( $pattern ) {
*/
public static function userCanBitfield( $bitfield, $field, User $user = null ) {
if ( $bitfield & $field ) {
- if ( $bitfield & LogPage::DELETED_RESTRICTED ) {
- $permission = 'suppressrevision';
- } else {
- $permission = 'deletedhistory';
- }
- wfDebug( "Checking for $permission due to $field match on $bitfield\n" );
if ( $user === null ) {
global $wgUser;
$user = $wgUser;
}
-
- return $user->isAllowed( $permission );
+ if ( $bitfield & LogPage::DELETED_RESTRICTED ) {
+ $permissions = array( 'suppressrevision', 'viewsuppressed' );
+ } else {
+ $permissions = array( 'deletedhistory' );
+ }
+ $permissionlist = implode( ', ', $permissions );
+ wfDebug( "Checking for $permissionlist due to $field match on $bitfield\n" );
+ return call_user_func_array( array( $user, 'isAllowedAny' ), $permissions );
}
-
return true;
}