本文整理匯總了PHP中TikiLib::page_exists方法的典型用法代碼示例。如果您正苦於以下問題:PHP TikiLib::page_exists方法的具體用法?PHP TikiLib::page_exists怎麽用?PHP TikiLib::page_exists使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類TikiLib
的用法示例。
在下文中一共展示了TikiLib::page_exists方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: tra
/**
* @param $s
* @return mixed
*/
function tra($s)
{
return $s;
}
$tikilib = new TikiLib();
$structId = '160';
$pages = explode("\n", `grep -r '{\$helpurl}' templates | sed -e "s/^.*helpurl}\\([^\\"']*\\)[\\"'].*\$/\\1/" | sort | uniq`);
$afterid = NULL;
foreach ($pages as $p) {
if ($p) {
echo $p;
if (!$tikilib->page_exists($p)) {
$tikilib->create_page($p, 0, 'to do', time(), 'automatic import from RestoreHelp script', 'RestoreHelp', 'RestoreHelp', 'to do');
echo ', not found, is created,';
}
if ($structlib->page_is_in_structure($p)) {
$alls = $structlib->get_page_structures($p, 'Help');
if (count($alls)) {
echo ". It is in Help structure with Id ";
echo $alls[0]["req_page_ref_id"];
$tikilib->remove_from_structure($alls[0]["req_page_ref_id"]);
echo ": erased and";
}
}
$afterid = $structlib->s_create_page($structId, $afterid, $p);
echo " created with id : {$afterid}";
echo "\n";