本文整理匯總了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();
}