class BlockListPager extends TablePager {
protected $conds;
- protected $page;
/**
* Array of restrictions.
* @param array $conds
*/
public function __construct( $page, $conds ) {
- $this->page = $page;
$this->conds = $conds;
$this->mDefaultDirection = IndexPager::DIR_DESCENDING;
parent::__construct( $page->getContext() );
$formatted .= '<br />' . $this->msg(
'ipb-blocklist-duration-left',
$language->formatDuration(
- $timestamp->getTimestamp() - time(),
+ $timestamp->getTimestamp() - MWTimestamp::time(),
// reasonable output
[
'minutes',
case 'ipb_params':
$properties = [];
- if ( $this->getConfig()->get( 'EnablePartialBlocks' ) ) {
- if ( $row->ipb_sitewide ) {
- $properties[] = htmlspecialchars( $msg['blocklist-editing-sitewide'] );
- }
+ if ( $this->getConfig()->get( 'EnablePartialBlocks' ) && $row->ipb_sitewide ) {
+ $properties[] = htmlspecialchars( $msg['blocklist-editing-sitewide'] );
}
if ( !$row->ipb_sitewide && $this->restrictions ) {
switch ( $restriction->getType() ) {
case PageRestriction::TYPE:
- $items[$restriction->getType()][] = HTML::rawElement(
- 'li',
- [],
- Linker::link( $restriction->getTitle() )
- );
+ if ( $restriction->getTitle() ) {
+ $items[$restriction->getType()][] = Html::rawElement(
+ 'li',
+ [],
+ Linker::link( $restriction->getTitle() )
+ );
+ }
break;
case NamespaceRestriction::TYPE:
$text = $restriction->getValue() === NS_MAIN
: $this->getLanguage()->getFormattedNsText(
$restriction->getValue()
);
- $items[$restriction->getType()][] = HTML::rawElement(
+ $items[$restriction->getType()][] = Html::rawElement(
'li',
[],
Linker::link(