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($par = null) { global $wgRequest; $parms = explode('/', $par = $par !== null ? $par : ''); $symsForAll = array('*', 'user'); if ($parms[0] != '' && (in_array($par, User::getAllGroups()) || in_array($par, $symsForAll))) { $this->requestedGroup = $par; $un = $wgRequest->getText('username'); } else { if (count($parms) == 2) { $this->requestedGroup = $parms[0]; $un = $parms[1]; } else { $this->requestedGroup = $wgRequest->getVal('group'); $un = $par != '' ? $par : $wgRequest->getText('username'); } } if (in_array($this->requestedGroup, $symsForAll)) { $this->requestedGroup = ''; } $this->editsOnly = $wgRequest->getBool('editsOnly'); $this->creationSort = $wgRequest->getBool('creationSort'); $this->requestedUser = ''; if ($un != '') { $username = Title::makeTitleSafe(NS_USER, $un); if (!is_null($username)) { $this->requestedUser = $username->getText(); } } parent::__construct(); }
/** * @param IContextSource $context * @param array $par (Default null) * @param bool $including Whether this page is being transcluded in * another page */ function __construct(IContextSource $context = null, $par = null, $including = null) { if ($context) { $this->setContext($context); } $request = $this->getRequest(); $par = $par !== null ? $par : ''; $parms = explode('/', $par); $symsForAll = array('*', 'user'); if ($parms[0] != '' && (in_array($par, User::getAllGroups()) || in_array($par, $symsForAll))) { $this->requestedGroup = $par; $un = $request->getText('username'); } elseif (count($parms) == 2) { $this->requestedGroup = $parms[0]; $un = $parms[1]; } else { $this->requestedGroup = $request->getVal('group'); $un = $par != '' ? $par : $request->getText('username'); } if (in_array($this->requestedGroup, $symsForAll)) { $this->requestedGroup = ''; } $this->editsOnly = $request->getBool('editsOnly'); $this->creationSort = $request->getBool('creationSort'); $this->including = $including; $this->mDefaultDirection = $request->getBool('desc') ? IndexPager::DIR_DESCENDING : IndexPager::DIR_ASCENDING; $this->requestedUser = ''; if ($un != '') { $username = Title::makeTitleSafe(NS_USER, $un); if (!is_null($username)) { $this->requestedUser = $username->getText(); } } parent::__construct(); }
function __construct($from) { parent::__construct(); $from = str_replace(' ', '_', $from); if ($from !== '') { $from = Title::capitalize($from, NS_CATEGORY); $this->mOffset = $from; } }
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()); }
function __construct(IContextSource $context, $from) { parent::__construct($context); $from = str_replace(' ', '_', $from); if ($from !== '') { $from = Title::capitalize($from, NS_CATEGORY); $this->setOffset($from); $this->setIncludeOffset(true); } }
function __construct($from) { parent::__construct(); $from = str_replace(' ', '_', $from); if ($from !== '') { global $wgCapitalLinks, $wgContLang; if ($wgCapitalLinks) { $from = $wgContLang->ucfirst($from); } $this->mOffset = $from; } }
function __construct($group = null) { global $wgRequest; $this->requestedGroup = $group != "" ? $group : $wgRequest->getVal('group'); $un = $wgRequest->getText('username'); $this->requestedUser = ''; if ($un != '') { $username = Title::makeTitleSafe(NS_USER, $un); if (!is_null($username)) { $this->requestedUser = $username->getText(); } } parent::__construct(); }
/** * constructor * * @access public */ function __construct($par = null) { global $wgRequest, $wgUser; $parms = explode('/', $par = $par !== null ? $par : ''); if (isset($parms[0]) && !empty($parms[0])) { $this->firstChar = $parms[0]; } if (isset($parms[1]) && !empty($parms[1])) { $this->lang = $parms[1]; } $this->lang = $this->lang != '' ? $this->lang : $wgRequest->getVal('language'); $this->firstChar = $this->firstChar != '' ? $this->firstChar : $wgRequest->getText('start'); $this->hub = $wgRequest->getText('hub'); if ($wgUser->isAllowed('newwikislist')) { $this->more_details = true; } parent::__construct(); /** * overwrite database handler */ $this->mDb = WikiFactory::db(DB_SLAVE); // create a Linker object so we don't have to create it every time in formatRow $this->linker = new Linker(); }
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(); }
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 = 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(); }
function __construct(IContextSource $context = null, $par = null) { parent::__construct($context); $this->mDefaultDirection = $this->getRequest()->getBool('desc'); $this->mDb = CentralAuthUser::getCentralSlaveDB(); }
public function __construct(ScavengerHuntGames $games, $url, $tpl) { parent::__construct(); $this->games = $games; $this->url = $url; $this->tpl = $tpl; $this->mDb = $this->games->getDb(); }
function __construct($form, $namespace, $level = -1, $category = '', $size = null, $watched = false, $stable = false) { $this->mForm = $form; # Must be a content page... $vnamespaces = FlaggedRevs::getReviewNamespaces(); if (is_null($namespace)) { $namespace = $vnamespaces; } else { $namespace = intval($namespace); } # Sanity check if (!in_array($namespace, $vnamespaces)) { $namespace = $vnamespaces; } $this->namespace = $namespace; # Sanity check level: 0 = checked; 1 = quality; 2 = pristine $this->level = $level >= 0 && $level <= 2 ? $level : -1; $this->category = $category ? str_replace(' ', '_', $category) : null; $this->size = $size !== null ? intval($size) : null; $this->watched = (bool) $watched; $this->stable = $stable && !FlaggedRevs::isStableShownByDefault() && !FlaggedRevs::useOnlyIfProtected(); parent::__construct(); # Don't get too expensive $this->mLimitsShown = array(20, 50, 100); $this->setLimit($this->mLimit); // apply max limit }
/** * @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 __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(); }