public function __construct() { parent::__construct(); if ($this->forceDefaultLimit > 0) { list($this->mLimit, ) = $this->mRequest->getLimitOffset($this->forceDefaultLimit, ''); } }
/** * @param SpecialPage $page * @param array $conds */ function __construct($page, $conds) { $this->page = $page; $this->conds = $conds; $this->mDefaultDirection = IndexPager::DIR_DESCENDING; parent::__construct($page->getContext()); }
function __construct($view, $thread) { parent::__construct(); $this->thread = $thread; $this->view = $view; self::$change_names = array(Threads::CHANGE_EDITED_ROOT => wfMsgNoTrans('lqt_hist_comment_edited'), Threads::CHANGE_EDITED_SUMMARY => wfMsgNoTrans('lqt_hist_summary_changed'), Threads::CHANGE_REPLY_CREATED => wfMsgNoTrans('lqt_hist_reply_created'), Threads::CHANGE_NEW_THREAD => wfMsgNoTrans('lqt_hist_thread_created'), Threads::CHANGE_DELETED => wfMsgNoTrans('lqt_hist_deleted'), Threads::CHANGE_UNDELETED => wfMsgNoTrans('lqt_hist_undeleted'), Threads::CHANGE_MOVED_TALKPAGE => wfMsgNoTrans('lqt_hist_moved_talkpage'), Threads::CHANGE_EDITED_SUBJECT => wfMsgNoTrans('lqt_hist_edited_subject'), Threads::CHANGE_SPLIT => wfMsgNoTrans('lqt_hist_split'), Threads::CHANGE_MERGED_FROM => wfMsgNoTrans('lqt_hist_merged_from'), Threads::CHANGE_MERGED_TO => wfMsgNoTrans('lqt_hist_merged_to'), Threads::CHANGE_SPLIT_FROM => wfMsgNoTrans('lqt_hist_split_from'), Threads::CHANGE_ROOT_BLANKED => wfMsgNoTrans('lqt_hist_root_blanked'), Threads::CHANGE_ADJUSTED_SORTKEY => wfMsgNoTrans('lqt_hist_adjusted_sortkey')); }
/** * @param $filter * @param $page ContextSource * @param $user string User name */ function __construct($filter, $page, $user) { $this->mFilter = $filter; $this->mPage = $page; $this->mUser = $user; $this->mDefaultDirection = true; parent::__construct($this->mPage->getContext()); }
/** * Constructor. * * @param SpecialContestPage $page * @param array $conds */ public function __construct(SpecialContestPage $page, array $conds) { $this->page = $page; $this->conds = $conds; $this->mDefaultDirection = true; $this->queryChallengeTitles($conds); // when MW 1.19 becomes min, we want to pass an IContextSource $context here. parent::__construct(); }
/** * Constructor. * * @param IContextSource $context * @param array $conds * @param string $className */ public function __construct(IContextSource $context, array $conds, $className) { $this->conds = $conds; $this->className = $className; $this->context = $context; $this->mDefaultDirection = true; parent::__construct($context); $this->context->getOutput()->addModules('ep.pager'); }
function __construct($attachToPage, $attachmentName = NULL) { global $wgScriptPath; global $wgPageAttachment_imgAddUpdateAttachment; parent::__construct(); $this->attachToPage = $attachToPage; $this->attachmentName = $attachmentName; $this->userManager = new \PageAttachment\User\UserManager(); $this->cacheManager = new \PageAttachment\Cache\CacheManager(); $this->dateHelper = new \PageAttachment\Utility\DateUtil(); }
/** * Constructor. * * @param IContextSource $context * @param array $conds * @param string $className */ public function __construct(IContextSource $context, array $conds, $className) { $this->conds = $conds; $this->className = $className; $this->context = $context; $this->mDefaultDirection = true; if (method_exists('TablePager', 'getUser')) { parent::__construct($context); } else { parent::__construct(); } $this->context->getOutput()->addModules('ep.pager'); }
public function __construct($page, $mode, $organization, $group) { parent::__construct($page->getContext()); $this->mMode = in_array($mode, $this->mAllowedModes) ? $mode : 'notlatest'; $this->mOrganization = $organization; $this->mGroup = $group; $this->mDefaultDirection = IndexPager::DIR_ASCENDING; if ($this instanceof SpecialPage) { parent::__construct('ApprovedRevs'); } //@TODO: need to get group ID from group name! Is there such a function? //Maybe get the entire group list with names, and create a select in the filter form. }
function __construct() { global $wgRequest, $wgMiserMode; if ($wgRequest->getText('sort', 'img_date') == 'img_date') { $this->mDefaultDirection = true; } else { $this->mDefaultDirection = false; } $search = $wgRequest->getText('ilsearch'); if ($search != '' && !$wgMiserMode) { $nt = Title::newFromURL($search); if ($nt) { $dbr = wfGetDB(DB_SLAVE); $this->mQueryConds = array('LOWER(img_name)' . $dbr->buildLike($dbr->anyString(), strtolower($nt->getDBkey()), $dbr->anyString())); } } parent::__construct(); }
function __construct() { global $wgRequest, $wgMiserMode; if ($wgRequest->getText('sort', 'img_date') == 'img_date') { $this->mDefaultDirection = true; } else { $this->mDefaultDirection = false; } $search = $wgRequest->getText('ilsearch'); if ($search != '' && !$wgMiserMode) { $nt = Title::newFromUrl($search); if ($nt) { $dbr = wfGetDB(DB_SLAVE); $m = $dbr->strencode(strtolower($nt->getDBkey())); $m = str_replace("%", "\\%", $m); $m = str_replace("_", "\\_", $m); $this->mQueryConds = array("LOWER(img_name) LIKE '%{$m}%'"); } } parent::__construct(); }
function __construct($page, $conds, $langObj = null) { parent::__construct($page->getContext()); $this->mIndexField = 'am_title'; $this->mPage = $page; $this->mConds = $conds; // FIXME: Why does this need to be set to DIR_DESCENDING to produce ascending ordering? $this->mDefaultDirection = IndexPager::DIR_DESCENDING; $this->mLimitsShown = [20, 50, 100, 250, 500, 5000]; global $wgContLang; $this->talk = $this->msg('talkpagelinktext')->escaped(); $this->lang = $langObj ? $langObj : $wgContLang; $this->langcode = $this->lang->getCode(); $this->foreign = !$this->lang->equals($wgContLang); $request = $this->getRequest(); $this->filter = $request->getVal('filter', 'all'); if ($this->filter === 'all') { $this->custom = null; // So won't match in either case } else { $this->custom = $this->filter === 'unmodified'; } $prefix = $this->getLanguage()->ucfirst($request->getVal('prefix', '')); $prefix = $prefix !== '' ? Title::makeTitleSafe(NS_MEDIAWIKI, $request->getVal('prefix', null)) : null; if ($prefix !== null) { $this->displayPrefix = $prefix->getDBkey(); $this->prefix = '/^' . preg_quote($this->displayPrefix, '/') . '/i'; } else { $this->displayPrefix = false; $this->prefix = false; } // The suffix that may be needed for message names if we're in a // different language (eg [[MediaWiki:Foo/fr]]: $suffix = '/fr' if ($this->foreign) { $this->suffix = '/' . $this->langcode; } else { $this->suffix = ''; } }
function __construct($page, $conds, $langObj = null) { parent::__construct(); $this->mIndexField = 'am_title'; $this->mPage = $page; $this->mConds = $conds; $this->mDefaultDirection = true; // always sort ascending $this->mLimitsShown = array(20, 50, 100, 250, 500, 5000); global $wgLang, $wgContLang, $wgRequest; $this->talk = htmlspecialchars(wfMsg('talkpagelinktext')); $this->lang = $langObj ? $langObj : $wgContLang; $this->langcode = $this->lang->getCode(); $this->foreign = $this->langcode != $wgContLang->getCode(); $request = $wgRequest; $this->filter = $request->getVal('filter', 'all'); if ($this->filter === 'all') { $this->custom = null; // So won't match in either case } else { $this->custom = $this->filter == 'unmodified'; } $prefix = $wgLang->ucfirst($wgRequest->getVal('prefix', '')); $prefix = $prefix != '' ? Title::makeTitleSafe(NS_MEDIAWIKI, $wgRequest->getVal('prefix', null)) : null; if ($prefix !== null) { $this->displayPrefix = $prefix->getDBkey(); $this->prefix = '/^' . preg_quote($this->displayPrefix) . '/i'; } else { $this->displayPrefix = false; $this->prefix = false; } // The suffix that may be needed for message names if we're in a // different language (eg [[MediaWiki:Foo/fr]]: $suffix = '/fr' if ($this->foreign) { $this->suffix = '/' . $this->langcode; } else { $this->suffix = ''; } }
function __construct(IContextSource $context, $userName = null, $search = '', $including = false, $showAll = false) { $this->setContext($context); $this->mIncluding = $including; $this->mShowAll = $showAll; if ($userName !== null && $userName !== '') { $nt = Title::makeTitleSafe(NS_USER, $userName); if (is_null($nt)) { $this->outputUserDoesNotExist($userName); } else { $this->mUserName = $nt->getText(); $user = User::newFromName($this->mUserName, false); if ($user) { $this->mUser = $user; } if (!$user || $user->isAnon() && !User::isIP($user->getName())) { $this->outputUserDoesNotExist($userName); } } } if ($search !== '' && !$this->getConfig()->get('MiserMode')) { $this->mSearch = $search; $nt = Title::newFromText($this->mSearch); if ($nt) { $dbr = wfGetDB(DB_SLAVE); $this->mQueryConds[] = 'LOWER(img_name)' . $dbr->buildLike($dbr->anyString(), strtolower($nt->getDBkey()), $dbr->anyString()); } } if (!$including) { if ($this->getRequest()->getText('sort', 'img_date') == 'img_date') { $this->mDefaultDirection = IndexPager::DIR_DESCENDING; } else { $this->mDefaultDirection = IndexPager::DIR_ASCENDING; } } else { $this->mDefaultDirection = IndexPager::DIR_DESCENDING; } parent::__construct($context); }
function __construct($page, $conds, $langObj = null) { parent::__construct(); $this->mIndexField = 'am_title'; $this->mPage = $page; $this->mConds = $conds; $this->mDefaultDirection = true; // always sort ascending // We want to have an option for people to view *all* the messages, // so they can use Ctrl+F to search them. 5000 is the maximum that // will get through WebRequest::getLimitOffset(). $this->mLimitsShown = array(20, 50, 100, 250, 500, 5000 => wfMsg('limitall')); global $wgLang, $wgContLang, $wgRequest; $this->talk = htmlspecialchars(wfMsg('talkpagelinktext')); $this->lang = $langObj ? $langObj : $wgContLang; $this->langcode = $this->lang->getCode(); $this->foreign = $this->langcode != $wgContLang->getCode(); if ($wgRequest->getVal('filter', 'all') === 'all') { $this->custom = null; // So won't match in either case } else { $this->custom = $wgRequest->getVal('filter') == 'unmodified'; } $prefix = $wgLang->ucfirst($wgRequest->getVal('prefix', '')); $prefix = $prefix != '' ? Title::makeTitleSafe(NS_MEDIAWIKI, $wgRequest->getVal('prefix', null)) : null; if ($prefix !== null) { $this->prefix = '/^' . preg_quote($prefix->getDBkey()) . '/i'; } else { $this->prefix = false; } $this->getSkin(); // The suffix that may be needed for message names if we're in a // different language (eg [[MediaWiki:Foo/fr]]: $suffix = '/fr' if ($this->foreign) { $this->suffix = '/' . $this->langcode; } else { $this->suffix = ''; } }
function __construct($page, $conds) { global $wgExternalSharedDB; $this->mPage = $page; $this->mConds = $conds; parent::__construct($this->mPage->getContext()); $this->mDb = wfGetDB(DB_SLAVE, [], $wgExternalSharedDB); }
function __construct($form, $conds = array(), $type, $level, $namespace, $sizetype = '', $size = 0, $indefonly = false, $cascadeonly = false, $noredirect = 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; $this->noredirect = (bool) $noredirect; parent::__construct($form->getContext()); }
/** * @param SpecialPage $owner Containing page * @param string $page Subpage * @param IContextSource $context */ public function __construct(SpecialPage $owner, $page, IContextSource $context = null) { $this->mOwner = $owner; $this->mPage = $page; $this->mDb = CentralAuthUser::getCentralSlaveDB(); $this->setLimit(25); if ($this->showOpenRequests()) { $this->mDefaultDirection = self::DIR_ASCENDING; } else { $this->mDefaultDirection = self::DIR_DESCENDING; } parent::__construct($context); }
function __construct( $detailsPage, $voteId ) { $this->detailsPage = $detailsPage; $this->voteId = $voteId; parent::__construct(); }
function __construct( IContextSource $context, $userName = null, $search = '', $including = false, $showAll = false ) { global $wgMiserMode; $this->mIncluding = $including; $this->mShowAll = $showAll; if ( $userName ) { $nt = Title::newFromText( $userName, NS_USER ); if ( !is_null( $nt ) ) { $this->mUserName = $nt->getText(); } } if ( $search !== '' && !$wgMiserMode ) { $this->mSearch = $search; $nt = Title::newFromURL( $this->mSearch ); if ( $nt ) { $dbr = wfGetDB( DB_SLAVE ); $this->mQueryConds[] = 'LOWER(img_name)' . $dbr->buildLike( $dbr->anyString(), strtolower( $nt->getDBkey() ), $dbr->anyString() ); } } if ( !$including ) { if ( $context->getRequest()->getText( 'sort', 'img_date' ) == 'img_date' ) { $this->mDefaultDirection = true; } else { $this->mDefaultDirection = false; } } else { $this->mDefaultDirection = true; } parent::__construct( $context ); }
/** * @param SpecialPage $owner Containing page * @param IContextSource $context */ public function __construct(SpecialPage $owner, IContextSource $context) { $this->owner = $owner; $this->mDb = CentralAuthUser::getCentralSlaveDB(); parent::__construct($context); }
/** * constructor */ function __construct() { global $wgExternalSharedDB; $this->mTitle = Title::makeTitle(NS_SPECIAL, "TaskManager"); $this->mDefaultDirection = true; parent::__construct(); $this->mDb = wfGetDB(DB_SLAVE, array(), $wgExternalSharedDB); }
function __construct($page, $conds) { $this->mPage = $page; $this->mConds = $conds; parent::__construct($this->mPage->getContext()); }
function __construct( $parent ) { $this->entryPage = $parent; parent::__construct(); }
function __construct(IContextSource $context, $userName = null, $search = '', $including = false, $showAll = false) { $this->setContext($context); $this->mIncluding = $including; $this->mShowAll = $showAll; if ($userName !== null && $userName !== '') { $nt = Title::newFromText($userName, NS_USER); $user = User::newFromName($userName, false); if (!is_null($nt)) { $this->mUserName = $nt->getText(); } if (!$user || $user->isAnon() && !User::isIP($user->getName())) { $this->getOutput()->wrapWikiMsg("<div class=\"mw-userpage-userdoesnotexist error\">\n\$1\n</div>", array('listfiles-userdoesnotexist', wfEscapeWikiText($userName))); } } if ($search !== '' && !$this->getConfig()->get('MiserMode')) { $this->mSearch = $search; $nt = Title::newFromURL($this->mSearch); if ($nt) { $dbr = wfGetDB(DB_SLAVE); $this->mQueryConds[] = 'LOWER(img_name)' . $dbr->buildLike($dbr->anyString(), strtolower($nt->getDBkey()), $dbr->anyString()); } } if (!$including) { if ($this->getRequest()->getText('sort', 'img_date') == 'img_date') { $this->mDefaultDirection = IndexPager::DIR_DESCENDING; } else { $this->mDefaultDirection = IndexPager::DIR_ASCENDING; } } else { $this->mDefaultDirection = IndexPager::DIR_DESCENDING; } parent::__construct($context); }
/** * __construct * * Public constructor with standard initializations * * @access public * @author Krzysztof Krzyżaniak <*****@*****.**> * * @param integer $wiki_id wiki identifier in wiki factory * */ function __construct($wiki_id = false) { if (is_numeric($wiki_id)) { $this->mTitle = Title::makeTitle(NS_SPECIAL, "WikiFactory/{$wiki_id}/clog"); $this->mWikiId = $wiki_id; } else { $this->mTitle = Title::makeTitle(NS_SPECIAL, "WikiFactory/change.log"); $this->mWikiId = false; } $this->mDefaultDirection = true; parent::__construct(); // BugId: 69197 - override parent behaviour to use database with correct data instead global $wgExternalSharedDB; $this->mDb = wfGetDB(DB_SLAVE, array(), $wgExternalSharedDB); }
public function __construct(IContextSource $context = null) { parent::__construct($context); $this->mDb = wfGetDB(DB_SLAVE, array(), F::app()->wg->ExternalDatawareDB); $this->mainNamespaceText = $this->msg('blanknamespace')->inContentLanguage()->plain(); }
/** * @param $page SpecialPage * @param $conds Array */ function __construct($page, $conds) { $this->page = $page; $this->conds = $conds; $this->mDefaultDirection = true; parent::__construct($page->getContext()); }
/** * Constructor. */ function __construct( WikilogItemQuery $query, $including = false ) { # WikilogItemQuery object drives our queries. $this->mQuery = $query; $this->mIncluding = $including; # Parent constructor. parent::__construct(); }
/** * @param $view CodeView * */ function __construct($view) { global $IP; $this->mView = $view; $this->mRepo = $view->mRepo; $this->mDefaultDirection = true; $this->mCurSVN = SpecialVersion::getSvnRevision($IP); parent::__construct(); }