76 $this->mConds = $conds;
77 $this->level = $level;
78 $this->
namespace = $namespace;
79 parent::__construct( $context, $linkRenderer );
80 $this->linkBatchFactory = $linkBatchFactory;
84 $this->mResult->seek( 0 );
85 $lb = $this->linkBatchFactory->newLinkBatch();
87 foreach ( $this->mResult as $row ) {
88 $lb->add( $row->pt_namespace, $row->pt_title );
102 [
'class' =>
'mw-invalidtitle' ],
114 $description = $this->
msg(
'restriction-level-' . $row->pt_create_perm )->escaped();
116 $expiry = strlen( $row->pt_expiry ) ?
117 $lang->formatExpiry( $row->pt_expiry, TS_MW ) :
120 if ( $expiry !==
'infinity' ) {
122 $description .= $this->
msg(
'comma-separator' )->escaped() . $this->
msg(
123 'protect-expiring-local',
124 $lang->userTimeAndDate( $expiry, $user ),
125 $lang->userDate( $expiry, $user ),
126 $lang->userTime( $expiry, $user )
130 return '<li>' . $lang->specialList( $link, $description ) .
"</li>\n";
139 $conds[] =
'pt_expiry > ' . $dbr->addQuotes( $this->mDb->timestamp() ) .
140 ' OR pt_expiry IS NULL';
141 if ( $this->level ) {
142 $conds[
'pt_create_perm'] = $this->level;
145 if ( $this->
namespace !==
null ) {
146 $conds[] =
'pt_namespace=' . $dbr->addQuotes( $this->
namespace );
150 'tables' =>
'protected_titles',
151 'fields' => [
'pt_namespace',
'pt_title',
'pt_create_perm',
152 'pt_expiry',
'pt_timestamp' ],
158 return [ [
'pt_timestamp',
'pt_namespace',
'pt_title' ] ];
166 class_alias( ProtectedTitlesPager::class,
'ProtectedTitlesPager' );
msg( $key,... $params)
Get a Message object with context set Parameters are the same as wfMessage()
getContext()
Get the base IContextSource object.
Interface for objects which can provide a MediaWiki context on request.