• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP wfCheckLimits函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中wfCheckLimits函数的典型用法代码示例。如果您正苦于以下问题:PHP wfCheckLimits函数的具体用法?PHP wfCheckLimits怎么用?PHP wfCheckLimits使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了wfCheckLimits函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: execute

 public function execute($param)
 {
     wfProfileIn('smwfDoSpecialUnusedProperties (SMW)');
     global $wgOut;
     $wgOut->setPageTitle(wfMsg('unusedproperties'));
     $rep = new SMWUnusedPropertiesPage();
     list($limit, $offset) = wfCheckLimits();
     $rep->doQuery($offset, $limit);
     // Ensure locally collected output data is pushed to the output!
     SMWOutputs::commitToOutputPage($wgOut);
     wfProfileOut('smwfDoSpecialUnusedProperties (SMW)');
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:12,代码来源:SMW_SpecialUnusedProperties.php


示例17: wfSpecialWithoutinterwiki

function wfSpecialWithoutinterwiki()
{
    global $wgRequest, $wgContLang, $wgCapitalLinks;
    list($limit, $offset) = wfCheckLimits();
    if ($wgCapitalLinks) {
        $prefix = $wgContLang->ucfirst($wgRequest->getVal('prefix'));
    } else {
        $prefix = $wgRequest->getVal('prefix');
    }
    $wip = new WithoutInterwikiPage();
    $wip->setPrefix($prefix);
    $wip->doQuery($offset, $limit);
}
开发者ID:amjadtbssm,项目名称:website,代码行数:13,代码来源:SpecialWithoutinterwiki.php


示例18: doSpecialListStreams

function doSpecialListStreams($par = null)
{
    global $wgRequest, $wgOut;
    $sitting_id = $wgRequest->getVal('sitting_id');
    $existing = $wgRequest->getVal('existing');
    if ($sitting_id != "") {
        list($limit, $offset) = wfCheckLimits();
        $rep = new MV_SpecialListStreams($sitting_id, $existing);
        $rep->doQuery($offset, $limit);
    } else {
        $wgOut->addHTML(wfMsg('edit_sitting_missing'));
    }
}
开发者ID:BenoitTalbot,项目名称:bungeni-portal,代码行数:13,代码来源:MV_SpecialListStreams.php


示例19: wfSpecialMIMEsearch

/**
 * constructor
 */
function wfSpecialMIMEsearch($par = null)
{
    global $wgRequest, $wgTitle, $wgOut;
    $mime = isset($par) ? $par : $wgRequest->getText('mime');
    $wgOut->addHTML(wfElement('form', array('id' => 'specialmimesearch', 'method' => 'get', 'action' => $wgTitle->escapeLocalUrl()), null) . wfOpenElement('label') . wfMsgHtml('mimetype') . wfElement('input', array('type' => 'text', 'size' => 20, 'name' => 'mime', 'value' => $mime), '') . ' ' . wfElement('input', array('type' => 'submit', 'value' => wfMsg('ilsubmit')), '') . wfCloseElement('label') . wfCloseElement('form'));
    list($major, $minor) = wfSpecialMIMEsearchParse($mime);
    if ($major == '' or $minor == '' or !wfSpecialMIMEsearchValidType($major)) {
        return;
    }
    $wpp = new MIMEsearchPage($major, $minor);
    list($limit, $offset) = wfCheckLimits();
    $wpp->doQuery($offset, $limit);
}
开发者ID:negabaro,项目名称:alfresco,代码行数:16,代码来源:SpecialMIMEsearch.php


示例20: wfSpecialMIMEsearch

/**
 * Output the HTML search form, and constructs the MIMEsearchPage object.
 */
function wfSpecialMIMEsearch($par = null)
{
    global $wgRequest, $wgTitle, $wgOut;
    $mime = isset($par) ? $par : $wgRequest->getText('mime');
    $wgOut->addHTML(Xml::openElement('form', array('id' => 'specialmimesearch', 'method' => 'get', 'action' => $wgTitle->getLocalUrl())) . Xml::inputLabel(wfMsg('mimetype'), 'mime', 'mime', 20, $mime) . Xml::submitButton(wfMsg('ilsubmit')) . Xml::closeElement('form'));
    list($major, $minor) = wfSpecialMIMEsearchParse($mime);
    if ($major == '' or $minor == '' or !wfSpecialMIMEsearchValidType($major)) {
        return;
    }
    $wpp = new MIMEsearchPage($major, $minor);
    list($limit, $offset) = wfCheckLimits();
    $wpp->doQuery($offset, $limit);
}
开发者ID:BackupTheBerlios,项目名称:shoutwiki-svn,代码行数:16,代码来源:SpecialMIMEsearch.php



注:本文中的wfCheckLimits函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP wfClearOutputBuffers函数代码示例发布时间:2022-05-23
下一篇:
PHP wfCheckEntropy函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap