/**
	 * Constructor.
	 * @param $query WikilogCommentQuery  Query object, containing the
	 *   parameters that will select which comments will be shown.
	 * @param $formatter WikilogCommentFormatter  Comment formatter object.
	 * @param $including boolean  Whether the listing is being included in
	 *   another page.
	 */
	function __construct( WikilogCommentQuery $query, $formatter = null,
			$including = false )
	{
		global $wgUser, $wgParser;
		global $wgWikilogNumComments, $wgWikilogExpensiveLimit;

		# WikilogCommentQuery object drives our queries.
		$this->mQuery = $query;
		$this->mIncluding = $including;

		# Prepare the comment formatter.
		$this->mFormatter = $formatter ? $formatter :
			new WikilogCommentFormatter( $this->getSkin() );

		# Parent constructor.
		parent::__construct();

		# Fix our limits, Pager's defaults are too high.
		$this->mDefaultLimit = $wgWikilogNumComments;
		list( $this->mLimit, /* $offset */ ) =
			$this->mRequest->getLimitOffset( $wgWikilogNumComments, '' );

		# This is too expensive, limit listing.
		if ( $this->mLimit > $wgWikilogExpensiveLimit )
			$this->mLimit = $wgWikilogExpensiveLimit;
	}
	function __construct( IContextSource $context, $target, $namespace = false ) {
		parent::__construct( $context );
		$msgs = array( 'deletionlog', 'undeleteviewlink', 'diff' );
		foreach ( $msgs as $msg ) {
			$this->messages[$msg] = $this->msg( $msg )->escaped();
		}
		$this->target = $target;
		$this->namespace = $namespace;
		$this->mDb = wfGetDB( DB_SLAVE, 'contributions' );
	}
 function __construct($target, $namespace = false)
 {
     parent::__construct();
     foreach (explode(' ', 'deletionlog undeletebtn minoreditletter diff') as $msg) {
         $this->messages[$msg] = wfMsgExt($msg, array('escape'));
     }
     $this->target = $target;
     $this->namespace = $namespace;
     $this->mDb = wfGetDB(DB_SLAVE, 'contributions');
 }
 function __construct($target, $namespace = false)
 {
     parent::__construct();
     $msgs = array('deletionlog', 'undeleteviewlink', 'diff');
     foreach ($msgs as $msg) {
         $this->messages[$msg] = wfMsgExt($msg, array('escapenoentities'));
     }
     $this->target = $target;
     $this->namespace = $namespace;
     $this->mDb = wfGetDB(DB_SLAVE, 'contributions');
 }
 function __construct($target, $namespace = false)
 {
     global $wgUser;
     parent::__construct();
     foreach (explode(' ', 'uctop diff newarticle rollbacklink diff hist minoreditletter') as $msg) {
         $this->messages[$msg] = wfMsgExt($msg, array('escape'));
     }
     $this->target = $target;
     $this->namespace = $namespace;
     $this->mDb = wfGetDB(DB_SLAVE, 'contributions');
 }
 function __construct($target, $namespace = false, $year = false, $month = false)
 {
     parent::__construct();
     foreach (explode(' ', 'uctop diff newarticle rollbacklink diff hist minoreditletter') as $msg) {
         $this->messages[$msg] = wfMsgExt($msg, array('escape'));
     }
     $this->target = $target;
     $this->namespace = $namespace;
     $year = intval($year);
     $month = intval($month);
     $this->year = $year > 0 && $year < 10000 ? $year : false;
     $this->month = $month > 0 && $month < 13 ? $month : false;
     $this->getDateCond();
     $this->mDb = wfGetDB(DB_SLAVE, 'contributions');
 }
Ejemplo n.º 7
0
 public function __construct(IContextSource $context = null)
 {
     if ($context) {
         $this->setContext($context);
     }
     $this->mSort = $this->getRequest()->getText('sort');
     if (!array_key_exists($this->mSort, $this->getFieldNames()) || !$this->isFieldSortable($this->mSort)) {
         $this->mSort = $this->getDefaultSort();
     }
     if ($this->getRequest()->getBool('asc')) {
         $this->mDefaultDirection = IndexPager::DIR_ASCENDING;
     } elseif ($this->getRequest()->getBool('desc')) {
         $this->mDefaultDirection = IndexPager::DIR_DESCENDING;
     }
     /* Else leave it at whatever the class default is */
     parent::__construct();
 }
Ejemplo n.º 8
0
 function __construct()
 {
     global $wgRequest;
     $this->mSort = $wgRequest->getText('sort');
     if (!array_key_exists($this->mSort, $this->getFieldNames())) {
         $this->mSort = $this->getDefaultSort();
     }
     if ($wgRequest->getBool('asc')) {
         $this->mDefaultDirection = false;
     } elseif ($wgRequest->getBool('desc')) {
         $this->mDefaultDirection = true;
     }
     /* Else leave it at whatever the class default is */
     parent::__construct();
 }
Ejemplo n.º 9
0
 public function __construct(IContextSource $context = null)
 {
     if ($context) {
         $this->setContext($context);
     }
     $this->mSort = $this->getRequest()->getText('sort');
     if (!array_key_exists($this->mSort, $this->getFieldNames())) {
         $this->mSort = $this->getDefaultSort();
     }
     if ($this->getRequest()->getBool('asc')) {
         $this->mDefaultDirection = false;
     } elseif ($this->getRequest()->getBool('desc')) {
         $this->mDefaultDirection = true;
     }
     /* Else leave it at whatever the class default is */
     parent::__construct();
 }
Ejemplo n.º 10
0
 function __construct($article, $orderType)
 {
     $this->article = $article;
     $this->orderType = $orderType;
     parent::__construct();
     $this->mLimit = $this->getPageLimit();
 }
	function __construct() {
		parent::__construct();
		$this->mLimit = $this->mDefaultLimit;
	}