當前位置: 首頁>>代碼示例>>PHP>>正文


PHP wfCheckLimits函數代碼示例

本文整理匯總了PHP中wfCheckLimits函數的典型用法代碼示例。如果您正苦於以下問題:PHP wfCheckLimits函數的具體用法?PHP wfCheckLimits怎麽用?PHP wfCheckLimits使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了wfCheckLimits函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getLimitOffset

 /**
  * FIXME MW 1.24 wfCheckLimits was deprecated in MediaWiki 1.24
  */
 private function getLimitOffset()
 {
     if (method_exists($this->getRequest(), 'getLimitOffset')) {
         return $this->getRequest()->getLimitOffset();
     }
     return wfCheckLimits();
 }
開發者ID:whysasse,項目名稱:kmwiki,代碼行數:10,代碼來源:SpecialProperties.php

示例2: execute

 public function execute($parameters)
 {
     global $wgOut, $wgRequest, $wgDisableTextSearch, $wgScript;
     $this->setHeaders();
     list($limit, $offset) = wfCheckLimits();
     $wgOut->addWikiText(wfMsgForContentNoTrans('proofreadpage_specialpage_text'));
     $this->searchList = null;
     $this->searchTerm = $wgRequest->getText('key');
     $this->suppressSqlOffset = false;
     if (!$wgDisableTextSearch) {
         $self = $this->getTitle();
         $wgOut->addHTML(Xml::openElement('form', array('action' => $wgScript)) . Html::hidden('title', $this->getTitle()->getPrefixedText()) . Xml::input('limit', false, $limit, array('type' => 'hidden')) . Xml::openElement('fieldset') . Xml::element('legend', null, wfMsg('proofreadpage_specialpage_legend')) . Xml::input('key', 20, $this->searchTerm) . ' ' . Xml::submitButton(wfMsg('ilsubmit')) . Xml::closeElement('fieldset') . Xml::closeElement('form'));
         if ($this->searchTerm) {
             $index_namespace = $this->index_namespace;
             $index_ns_index = MWNamespace::getCanonicalIndex(strtolower(str_replace(' ', '_', $index_namespace)));
             $searchEngine = SearchEngine::create();
             $searchEngine->setLimitOffset($limit, $offset);
             $searchEngine->setNamespaces(array($index_ns_index));
             $searchEngine->showRedirects = false;
             $textMatches = $searchEngine->searchText($this->searchTerm);
             $escIndex = preg_quote($index_namespace, '/');
             $this->searchList = array();
             while ($result = $textMatches->next()) {
                 $title = $result->getTitle();
                 if ($title->getNamespace() == $index_ns_index) {
                     array_push($this->searchList, $title->getDBkey());
                 }
             }
             $this->suppressSqlOffset = true;
         }
     }
     parent::execute($parameters);
 }
開發者ID:schwarer2006,項目名稱:wikia,代碼行數:33,代碼來源:SpecialProofreadPages.php

示例3: execute

 function execute($query)
 {
     $this->setHeaders();
     list($limit, $offset) = wfCheckLimits();
     $rep = new TemplatesPage();
     $rep->execute($query);
 }
開發者ID:Rikuforever,項目名稱:wiki,代碼行數:7,代碼來源:SF_Templates.php

示例4: __construct

 function __construct($name = 'Newcontributors')
 {
     parent::__construct($name);
     list($limit, $offset) = wfCheckLimits();
     $this->limit = $limit;
     $this->offset = $offset;
 }
開發者ID:biribogos,項目名稱:wikihow-src,代碼行數:7,代碼來源:Newcontributors.body.php

示例5: execute

 function execute($query)
 {
     $this->setHeaders();
     list($limit, $offset) = wfCheckLimits();
     $rep = new FormsPage();
     return $rep->execute($query);
 }
開發者ID:whysasse,項目名稱:kmwiki,代碼行數:7,代碼來源:SF_Forms.php

示例6: wfSpecialNewpages

/**
 * constructor
 */
function wfSpecialNewpages($par, $specialPage)
{
    global $wgRequest;
    list($limit, $offset) = wfCheckLimits();
    if ($par) {
        $bits = preg_split('/\\s*,\\s*/', trim($par));
        foreach ($bits as $bit) {
            if ('shownav' == $bit) {
                $shownavigation = 1;
            }
            if (is_numeric($bit)) {
                $limit = $bit;
            }
            if (preg_match('/^limit=(\\d+)$/', $bit, $m)) {
                $limit = intval($m[1]);
            }
            if (preg_match('/^offset=(\\d+)$/', $bit, $m)) {
                $offset = intval($m[1]);
            }
        }
    }
    if (!isset($shownavigation)) {
        $shownavigation = !$specialPage->including();
    }
    $npp = new NewPagesPage();
    if (!$npp->doFeed($wgRequest->getVal('feed'))) {
        $npp->doQuery($offset, $limit, $shownavigation);
    }
}
開發者ID:BackupTheBerlios,項目名稱:enotifwiki,代碼行數:32,代碼來源:SpecialNewpages.php

示例7: wfSpecialNamesLog

/**
 * constructor
 */
function wfSpecialNamesLog($par, $specialPage)
{
    list($limit, $offset) = wfCheckLimits();
    if ($par) {
        $bits = preg_split('/\\s*,\\s*/', trim($par));
        foreach ($bits as $bit) {
            if ('shownav' == $bit) {
                $shownavigation = true;
            }
            if (is_numeric($bit)) {
                $limit = $bit;
            }
            if (preg_match('/^limit=(\\d+)$/', $bit, $m)) {
                $limit = intval($m[1]);
            }
            if (preg_match('/^offset=(\\d+)$/', $bit, $m)) {
                $offset = intval($m[1]);
            }
        }
    }
    if (!isset($shownavigation)) {
        $shownavigation = !$specialPage->including();
    }
    $rg = new NamesLog();
    $rg->doQuery($offset, $limit, $shownavigation);
}
開發者ID:k-hasan-19,項目名稱:wiki,代碼行數:29,代碼來源:SpecialNamesLog.php

示例8: execute

 function execute($par)
 {
     global $wgOut;
     $wgOut->setHTMLTitle(wfMsg('accuracypatrol'));
     list($limit, $offset) = wfCheckLimits();
     $llr = new ListAccuracyPatrol();
     return $llr->doQuery($offset, $limit);
 }
開發者ID:ErdemA,項目名稱:wikihow,代碼行數:8,代碼來源:RateArticle.body.php

示例9: wfSpecialWithoutinterwiki

function wfSpecialWithoutinterwiki()
{
    global $wgRequest;
    list($limit, $offset) = wfCheckLimits();
    $prefix = $wgRequest->getVal('prefix');
    $wip = new WithoutInterwikiPage();
    $wip->setPrefix($prefix);
    $wip->doQuery($offset, $limit);
}
開發者ID:BackupTheBerlios,項目名稱:shoutwiki-svn,代碼行數:9,代碼來源:SpecialWithoutinterwiki.php

示例10: smwfDoSpecialProperties

function smwfDoSpecialProperties()
{
    wfProfileIn('smwfDoSpecialProperties (SMW)');
    list($limit, $offset) = wfCheckLimits();
    $rep = new SMWPropertiesPage();
    $result = $rep->doQuery($offset, $limit);
    wfProfileOut('smwfDoSpecialProperties (SMW)');
    return $result;
}
開發者ID:seedbank,項目名稱:old-repo,代碼行數:9,代碼來源:SMWAdvSpecialProperties.php

示例11: wfSpecialUnwatchedpages

/**
 * constructor
 */
function wfSpecialUnwatchedpages()
{
    global $wgUser, $wgOut;
    if (!$wgUser->isAllowed('unwatchedpages')) {
        return $wgOut->permissionRequired('unwatchedpages');
    }
    list($limit, $offset) = wfCheckLimits();
    $wpp = new UnwatchedpagesPage();
    $wpp->doQuery($offset, $limit);
}
開發者ID:BackupTheBerlios,項目名稱:blahtex,代碼行數:13,代碼來源:SpecialUnwatchedpages.php

示例12: wfSpecialWithoutinterwiki

function wfSpecialWithoutinterwiki()
{
    global $wgRequest, $wgContLang;
    list($limit, $offset) = wfCheckLimits();
    // Only searching the mainspace anyway
    $prefix = Title::capitalize($wgRequest->getVal('prefix'), NS_MAIN);
    $wip = new WithoutInterwikiPage();
    $wip->setPrefix($prefix);
    $wip->doQuery($offset, $limit);
}
開發者ID:rocLv,項目名稱:conference,代碼行數:10,代碼來源:SpecialWithoutinterwiki.php

示例13: wfSpecialPopularpages

/**
 * Constructor
 */
function wfSpecialPopularpages()
{
    global $wgOut;
    list($limit, $offset) = wfCheckLimits();
    $wgOut->setRobotPolicy("index,follow");
    $ppp = new PopularPagesPage();
    if ($limit != 50 || $offset != 0) {
        $wgOut->setPageTitle(wfMsg('popularpages_range', $offset + 1, $offset + $limit));
    }
    return $ppp->doQuery($offset, $limit);
}
開發者ID:ErdemA,項目名稱:wikihow,代碼行數:14,代碼來源:SpecialPopularpages.php

示例14: execute

	function execute( $par ) {
		$this->setHeaders();
		list( $limit, $offset ) = wfCheckLimits();
		$rep = new FiltersPage();
		// Handling changed in MW version 1.18.
		if ( method_exists( $rep, 'execute' ) ) {
			return $rep->execute( $par );
		} else {
			return $rep->doQuery( $offset, $limit );
		}
	}
開發者ID:realsoc,項目名稱:mediawiki-extensions,代碼行數:11,代碼來源:SD_Filters.php

示例15: execute

	function execute( $query ) {
		$this->setHeaders();
		list( $limit, $offset ) = wfCheckLimits();
		$rep = new TemplatesPage();
		// execute() method added in MW 1.18
		if ( method_exists( $rep, 'execute' ) ) {
			$rep->execute( $query );
		} else {
			return $rep->doQuery( $offset, $limit );
		}
	}
開發者ID:realsoc,項目名稱:mediawiki-extensions,代碼行數:11,代碼來源:SF_Templates.php


注:本文中的wfCheckLimits函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。