function __construct($specialPage, $searchConds, $y, $m)
 {
     parent::__construct();
     $this->getDateCond($y, $m);
     $this->searchConds = $searchConds ? $searchConds : array();
     $this->specialPage = $specialPage;
 }
 function __construct($form, $conds = array(), $title)
 {
     $this->mForm = $form;
     $this->mConds = $conds;
     $this->pageID = $title->getArticleID();
     parent::__construct();
 }
 /**
  * Construct instance of class.
  * @param $special object calling object
  * @param $type string type of log - 'bannercontent' or 'bannermessages' (optional)
  */
 function __construct($special, $type = 'bannercontent')
 {
     $this->special = $special;
     parent::__construct();
     $this->viewPage = SpecialPage::getTitleFor('NoticeTemplate', 'view');
     $this->logType = $type;
 }
Ejemplo n.º 4
0
 function __construct(IContextSource $context = null)
 {
     parent::__construct($context);
     // Override the defaults
     $this->mLimitsShown = array(10, 20);
     $this->mDefaultLimit = 10;
     $this->mLimit = 10;
 }
Ejemplo n.º 5
0
 function __construct()
 {
     global $wgSpecialsDB;
     parent::__construct();
     $this->mDb = wfGetDB(DB_SLAVE, array(), $wgSpecialsDB);
     // create a Linker object so we don't have to create it every time in formatRow
     $this->linker = new Linker();
 }
Ejemplo n.º 6
0
 function __construct($par = null)
 {
     global $wgRequest;
     $this->like = $wgRequest->getText('like');
     $this->showbots = $wgRequest->getBool('showbots', 0);
     $this->skin = $this->getSkin();
     parent::__construct();
 }
Ejemplo n.º 7
0
 public function __construct()
 {
     global $wgExternalSharedDB, $wgRequest;
     parent::__construct();
     $this->mDb = wfGetDB(DB_SLAVE, array(), $wgExternalSharedDB);
     $this->mSearchText = $wgRequest->getText('wpPhalanxCheckBlocker', null);
     $this->mSearchFilter = $wgRequest->getArray('wpPhalanxTypeFilter');
     $this->mSearchId = $wgRequest->getInt('id');
 }
 function __construct($special)
 {
     $this->special = $special;
     parent::__construct();
     // Override paging defaults
     list($this->mLimit, ) = $this->mRequest->getLimitOffset(20, '');
     $this->mLimitsShown = array(20, 50, 100);
     $this->viewPage = SpecialPage::getTitleFor('CentralNotice');
 }
Ejemplo n.º 9
0
 function __construct(IContextSource $context, $par = null)
 {
     $this->like = $context->getRequest()->getText('like');
     $this->showbots = $context->getRequest()->getBool('showbots', 0);
     if (is_numeric($par)) {
         $this->setLimit($par);
     }
     parent::__construct($context);
 }
Ejemplo n.º 10
0
 function __construct(SpecialMergeHistory $form, $conds, Title $source, Title $dest)
 {
     $this->mForm = $form;
     $this->mConds = $conds;
     $this->title = $source;
     $this->articleID = $source->getArticleID();
     $dbr = wfGetDB(DB_REPLICA);
     $maxtimestamp = $dbr->selectField('revision', 'MIN(rev_timestamp)', ['rev_page' => $dest->getArticleID()], __METHOD__);
     $this->maxTimestamp = $maxtimestamp;
     parent::__construct($form->getContext());
 }
Ejemplo n.º 11
0
 /**
  * Constructor.
  *
  * @param IContextSource $context
  * @param string $className
  * @param array $conds
  */
 public function __construct(IContextSource $context, array $conds = array())
 {
     $this->conds = $conds;
     $this->context = $context;
     $this->mDefaultDirection = true;
     if (method_exists('ReverseChronologicalPager', 'getUser')) {
         parent::__construct($context);
     } else {
         parent::__construct();
     }
 }
Ejemplo n.º 12
0
 function __construct($specialPage, $searchConds, $y, $m)
 {
     parent::__construct();
     /*
     		$this->messages = array_map( 'wfMsg',
     			array( 'comma-separator', 'checkuser-log-userips', 'checkuser-log-ipedits', 'checkuser-log-ipusers',
     			'checkuser-log-ipedits-xff', 'checkuser-log-ipusers-xff' ) );*/
     $this->getDateCond($y, $m);
     $this->searchConds = $searchConds ? $searchConds : array();
     $this->specialPage = $specialPage;
 }
Ejemplo n.º 13
0
 /**
  * @param ImagePage $imagePage
  */
 function __construct($imagePage)
 {
     parent::__construct($imagePage->getContext());
     $this->mImagePage = $imagePage;
     $this->mTitle = clone $imagePage->getTitle();
     $this->mTitle->setFragment('#filehistory');
     $this->mImg = null;
     $this->mHist = array();
     $this->mRange = array(0, 0);
     // display range
 }
Ejemplo n.º 14
0
 function __construct($special)
 {
     $this->special = $special;
     $this->editable = $special->editable;
     parent::__construct();
     // Override paging defaults
     list($this->mLimit, ) = $this->mRequest->getLimitOffset(20, '');
     $this->mLimitsShown = array(20, 50, 100);
     $msg = Xml::encodeJsVar(wfMsg('centralnotice-confirm-delete'));
     $this->onRemoveChange = "if( this.checked ) { this.checked = confirm( {$msg} ) }";
     $this->viewPage = SpecialPage::getTitleFor('NoticeTemplate', 'view');
 }
 function __construct($special, $filter = '')
 {
     $this->special = $special;
     $this->editable = $special->editable;
     $this->filter = $filter;
     parent::__construct();
     // Override paging defaults
     list($this->mLimit, ) = $this->mRequest->getLimitOffset(20, '');
     $this->mLimitsShown = array(20, 50, 100);
     $msg = Xml::encodeJsVar($this->msg('promoter-confirm-delete')->text());
     $this->onRemoveChange = "if( this.checked ) { this.checked = confirm( {$msg} ) }";
     $this->viewPage = SpecialPage::getTitleFor('CampaignAd', 'view');
 }
Ejemplo n.º 16
0
 function __construct()
 {
     global $wgStatsDB, $wgDevelEnvironment;
     parent::__construct();
     if ($wgDevelEnvironment) {
         $this->mDb = wfGetDB(DB_SLAVE);
     } else {
         $this->mDb = wfGetDB(DB_SLAVE, array(), $wgStatsDB);
         $this->mDb->selectDB('specials');
     }
     // create a Linker object so we don't have to create it every time in formatRow
     $this->linker = new Linker();
 }
 function getNavigationBar()
 {
     if (isset($this->mNavigationBar)) {
         return $this->mNavigationBar;
     }
     // Sets mNavigation bar with the default text which we will then wrap
     parent::getNavigationBar();
     $this->mNavigationBar = array('class' => 'HTMLAdPagerNavigation', 'value' => $this->mNavigationBar);
     if ($this->formSection) {
         $this->mNavigationBar['section'] = $this->formSection;
     }
     return $this->mNavigationBar;
 }
Ejemplo n.º 18
0
 public function __construct()
 {
     parent::__construct();
     $this->app = F::app();
     $this->mDb = wfGetDB(DB_SLAVE, array(), $this->app->wg->ExternalSharedDB);
     $this->mSearchText = $this->app->wg->Request->getText('wpPhalanxCheckBlocker', null);
     $this->mSearchFilter = $this->app->wg->Request->getArray('wpPhalanxTypeFilter');
     $this->mSearchId = $this->app->wg->Request->getInt('id');
     // handle "type" parameter from URLs comming from hook messages
     $type = $this->app->wg->Request->getInt('type');
     if ($type > 0) {
         $this->mSearchFilter = array($type);
     }
     $this->mTitle = Title::newFromText('Phalanx/stats', NS_SPECIAL);
     $this->mSkin = RequestContext::getMain()->getSkin();
     $this->phalanxPage = SpecialPage::getTitleFor('Phalanx');
     $this->phalanxStatsPage = SpecialPage::getTitleFor('PhalanxStats');
 }
 /**
  * @param HistoryAction $historyPage
  * @param string $year
  * @param string $month
  * @param string $tagFilter
  * @param array $conds
  */
 function __construct($historyPage, $year = '', $month = '', $tagFilter = '', $conds = array())
 {
     parent::__construct($historyPage->getContext());
     $this->historyPage = $historyPage;
     $this->tagFilter = $tagFilter;
     $this->getDateCond($year, $month);
     $this->conds = $conds;
 }
Ejemplo n.º 20
0
 function __construct($form, $conds = array())
 {
     $this->mForm = $form;
     $this->mConds = $conds;
     parent::__construct();
 }
Ejemplo n.º 21
0
 function __construct($form, $conds = array(), $source, $dest)
 {
     $this->mForm = $form;
     $this->mConds = $conds;
     $this->title = $source;
     $this->articleID = $source->getArticleID();
     $dbr = wfGetDB(DB_SLAVE);
     $maxtimestamp = $dbr->selectField('revision', 'MIN(rev_timestamp)', array('rev_page' => $dest->getArticleID()), __METHOD__);
     $this->maxTimestamp = $maxtimestamp;
     parent::__construct();
 }
Ejemplo n.º 22
0
 function getDefaultQuery()
 {
     $query = parent::getDefaultQuery();
     $query['target'] = $this->target;
     return $query;
 }
 function __construct($form, $conds, $type, $rejects = false, $showHeld = false, $showStale = false)
 {
     $this->mForm = $form;
     $this->mConds = $conds;
     $this->mConds['acr_type'] = $type;
     $this->rejects = $rejects;
     $this->stale = $showStale;
     if ($rejects || $showStale) {
         $this->mConds['acr_deleted'] = 1;
     } else {
         $this->mConds['acr_deleted'] = 0;
         if ($showHeld) {
             $this->mConds[] = 'acr_held IS NOT NULL';
         } else {
             $this->mConds[] = 'acr_held IS NULL';
         }
     }
     parent::__construct();
     # Treat 20 as the default limit, since each entry takes up 5 rows.
     $urlLimit = $this->mRequest->getInt('limit');
     $this->mLimit = $urlLimit ? $urlLimit : 20;
 }
 function __construct($form, FormOptions $opts)
 {
     parent::__construct($form->getContext());
     $this->mForm = $form;
     $this->opts = $opts;
 }
Ejemplo n.º 25
0
 /**
  * @param HistoryAction $historyPage
  * @param string $year
  * @param string $month
  * @param string $tagFilter
  * @param array $conds
  */
 function __construct($historyPage, $year = '', $month = '', $tagFilter = '', $conds = [])
 {
     parent::__construct($historyPage->getContext());
     $this->historyPage = $historyPage;
     $this->tagFilter = $tagFilter;
     $this->getDateCond($year, $month);
     $this->conds = $conds;
     $this->showTagEditUI = ChangeTags::showTagEditingUI($this->getUser());
 }
Ejemplo n.º 26
0
 function __construct($pageHistory)
 {
     parent::__construct();
     $this->mPageHistory = $pageHistory;
 }
Ejemplo n.º 27
0
 public function getBody()
 {
     if (!$this->mQueryDone) {
         $this->doQuery();
     }
     $this->mResult->rewind();
     return parent::getBody();
 }
 /**
  * @param AbuseFilterViewExamine $page
  * @param AbuseFilterChangesList $changesList
  */
 function __construct($page, $changesList)
 {
     parent::__construct();
     $this->mChangesList = $changesList;
     $this->mPage = $page;
 }
Ejemplo n.º 29
0
 public function doQuery()
 {
     // Workaround MySQL optimizer bug
     $this->mDb->setBigSelects();
     parent::doQuery();
     $this->mDb->setBigSelects('default');
 }
Ejemplo n.º 30
0
 /**
  * @param SpecialAbuseLog $form
  * @param array $conds
  * @param bool $details
  */
 function __construct($form, $conds = array(), $details = false)
 {
     $this->mForm = $form;
     $this->mConds = $conds;
     parent::__construct();
 }