本文整理汇总了PHP中WikiPage::getDefaultPages方法的典型用法代码示例。如果您正苦于以下问题:PHP WikiPage::getDefaultPages方法的具体用法?PHP WikiPage::getDefaultPages怎么用?PHP WikiPage::getDefaultPages使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WikiPage
的用法示例。
在下文中一共展示了WikiPage::getDefaultPages方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
/**
* @return string[] List of pagename
*/
public function &getAllUserPages()
{
$WikiPageAdminPages = WikiPage::getAdminPages();
$WikiPageDefaultPages = WikiPage::getDefaultPages();
$allPages = array();
$res = db_query(' SELECT pagename' . ' FROM wiki_page, wiki_nonempty' . ' WHERE wiki_page.group_id="' . db_ei($this->gid) . '"' . ' AND wiki_nonempty.id=wiki_page.id' . ' AND wiki_page.pagename NOT IN ("' . implode('","', $WikiPageDefaultPages) . '",
"' . implode('","', $WikiPageAdminPages) . '")');
while ($row = db_fetch_array($res)) {
$allPages[] = $row[0];
}
return $allPages;
}
示例2: getProjectPageCount
/**
* Get number of project wiki pages.
* @return number of project pages (0 if wiki is empty)
*/
function getProjectPageCount()
{
$res = db_query(' SELECT count(*) as count' . ' FROM wiki_page, wiki_nonempty' . ' WHERE wiki_page.group_id="' . $this->gid . '"' . ' AND wiki_nonempty.id=wiki_page.id' . ' AND wiki_page.pagename NOT IN ("' . implode('","', WikiPage::getDefaultPages()) . '",
"' . implode('","', WikiPage::getAdminPages()) . '")');
if (db_numrows($res) > 0) {
return db_result($res, 0, 'count');
} else {
return 0;
}
}
示例3: doesWikiPageExistInRESTContext
public function doesWikiPageExistInRESTContext($page_id)
{
$admin_pages = $this->da->quoteSmartImplode(',', WikiPage::getAdminPages());
$default_pages = $this->da->quoteSmartImplode(',', WikiPage::getDefaultPages());
$page_id = $this->da->escapeInt($page_id);
$sql = "SELECT SQL_CALC_FOUND_ROWS wiki_page.id\n FROM wiki_page, wiki_nonempty\n WHERE wiki_page.id = {$page_id}\n AND wiki_nonempty.id <> wiki_page.id\n AND wiki_page.pagename NOT IN ({$default_pages},{$admin_pages})";
$this->retrieve($sql);
return (int) $this->foundRows();
}