function __construct($search) { $this->mSearchTitle = $search; parent::__construct(); // This can potentially be a lot of data, set a lower max limit $this->mLimit = $this->mLimit > 1000 ? 1000 : $this->mLimit; }
function __construct($form, $conds = [], $type, $level, $namespace, $sizetype = '', $size = 0) { $this->mForm = $form; $this->mConds = $conds; $this->level = $level; $this->namespace = $namespace; $this->size = intval($size); parent::__construct($form->getContext()); }
public function getBody() { $batch = new LinkBatch(); $this->mResult->rewind(); while ($row = $this->mResult->fetchObject()) { $batch->addObj(Title::makeTitleSafe(NS_CATEGORY, $row->cat_title)); } $batch->execute(); $this->mResult->rewind(); return parent::getBody(); }
public function getBody() { $batch = new LinkBatch(); $this->mResult->rewind(); foreach ($this->mResult as $row) { $batch->addObj(Title::makeTitleSafe(NS_CATEGORY, $row->cat_title)); } $batch->execute(); $this->mResult->rewind(); return parent::getBody(); }
function getBody() { if (!$this->mQueryDone) { $this->doQuery(); } $batch = new LinkBatch(); $this->mResult->rewind(); while ($row = $this->mResult->fetchObject()) { $batch->addObj(Title::makeTitleSafe(NS_CATEGORY, $row->cl_to)); } $batch->execute(); $this->mResult->rewind(); return parent::getBody(); }
/** * Preserve group and username offset parameters when paging * @return array */ function getDefaultQuery() { $query = parent::getDefaultQuery(); if ($this->requestedGroup != '') { $query['group'] = $this->requestedGroup; } if ($this->requestedUser != '') { $query['username'] = $this->requestedUser; } return $query; }
function __construct($form, $conds = array(), $type = 0, $namespace = 0, $hideRedirs = 1) { $this->mForm = $form; $this->mConds = $conds; $this->type = $type; # Must be a content page... if (!is_null($namespace)) { $namespace = intval($namespace); } $vnamespaces = FlaggedRevs::getReviewNamespaces(); if (is_null($namespace) || !in_array($namespace, $vnamespaces)) { $namespace = !$vnamespaces ? -1 : $vnamespaces[0]; } $this->namespace = $namespace; $this->hideRedirs = $hideRedirs; parent::__construct(); }
/** * @return String */ function getBody() { if (!$this->mQueryDone) { $this->doQuery(); } $batch = new LinkBatch(); $this->mResult->rewind(); foreach ($this->mResult as $row) { $batch->addObj(Title::makeTitleSafe(NS_USER, $row->gu_name)); } $batch->execute(); $this->mResult->rewind(); return AlphabeticPager::getBody(); }
public function __construct(ScavengerHuntGames $games, $url, $tpl) { parent::__construct(); $this->games = $games; $this->url = $url; $this->tpl = $tpl; $this->mDb = $this->games->getDb(); }
/** * @param int $namespace (null for "all") * @param string $autoreview ('' for "all", 'none' for no restriction) */ function __construct($form, $conds = array(), $namespace, $autoreview, $indef) { $this->mForm = $form; $this->mConds = $conds; $this->indef = $indef; // Must be content pages... $validNS = FlaggedRevs::getReviewNamespaces(); if (is_integer($namespace)) { if (!in_array($namespace, $validNS)) { $namespace = $validNS; // fallback to "all" } } else { $namespace = $validNS; // "all" } $this->namespace = $namespace; if ($autoreview === 'none') { $autoreview = ''; // 'none' => '' } elseif ($autoreview === '') { $autoreview = null; // '' => null } $this->autoreview = $autoreview; parent::__construct(); }
function getDefaultQuery() { $query = parent::getDefaultQuery(); $query['category'] = $this->category; return $query; }
function __construct($form, $live, $namespace, $redirs = false, $category = null, $level = 0) { $this->mForm = $form; $this->live = (bool) $live; # Must be a content page... if (!is_null($namespace)) { $namespace = (int) $namespace; } $vnamespaces = FlaggedRevs::getReviewNamespaces(); # Must be a single NS for perfomance reasons if (is_null($namespace) || !in_array($namespace, $vnamespaces)) { $namespace = !$vnamespaces ? -1 : $vnamespaces[0]; } $this->namespace = $namespace; $this->category = $category ? str_replace(' ', '_', $category) : null; $this->level = intval($level); $this->showredirs = (bool) $redirs; parent::__construct(); // Don't get too expensive $this->mLimitsShown = array(20, 50); $this->setLimit($this->mLimit); // apply max limit }
function __construct($form, $level = -1, $category = '', $tag = '') { $this->mForm = $form; # Must be a content page... $this->namespace = FlaggedRevs::getReviewNamespaces(); # Sanity check level: 0 = checked; 1 = quality; 2 = pristine $this->level = $level >= 0 && $level <= 2 ? $level : -1; $this->tag = $tag; $this->category = $category ? str_replace(' ', '_', $category) : null; parent::__construct(); // Don't get to expensive $this->mLimitsShown = array(20, 50, 100); $this->setLimit($this->mLimit); // apply max limit }
function __construct($form, $conds = array(), $type, $level, $namespace, $sizetype = '', $size = 0) { $this->mForm = $form; $this->mConds = $conds; $this->type = $type ? $type : 'edit'; $this->level = $level; $this->namespace = $namespace; $this->sizetype = $sizetype; $this->size = intval($size); parent::__construct(); }
/** * Preserve group and username offset parameters when paging * @return array */ function getDefaultQuery() { $query = parent::getDefaultQuery(); if ($this->requestedGroup != '') { $query['group'] = $this->requestedGroup; } if ($this->requestedUser != '') { $query['username'] = $this->requestedUser; } Hooks::run('SpecialListusersDefaultQuery', array($this, &$query)); return $query; }
function getDefaultQuery() { $query = parent::getDefaultQuery(); return $query; }
function __construct($form, $conds = array(), $type, $level, $namespace, $sizetype = '', $size = 0, $indefonly = false, $cascadeonly = false) { $this->mForm = $form; $this->mConds = $conds; $this->type = $type ? $type : 'edit'; $this->level = $level; $this->namespace = $namespace; $this->sizetype = $sizetype; $this->size = intval($size); $this->indefonly = (bool) $indefonly; $this->cascadeonly = (bool) $cascadeonly; parent::__construct($form->getContext()); }
function __construct( $form, $conds = array(), $namespace=0, $tag, $tier ) { $this->mForm = $form; $this->mConds = $conds; # Must be a content page... global $wgFeedbackNamespaces; if( !is_null($namespace) ) { $namespace = intval($namespace); } if( is_null($namespace) || !in_array($namespace,$wgFeedbackNamespaces) ) { $namespace = empty($wgFeedbackNamespaces) ? -1 : $wgFeedbackNamespaces[0]; } $this->namespace = $namespace; $this->tag = $tag; $this->tier = (int)$tier; parent::__construct(); }