本文整理匯總了PHP中WikiPage::history方法的典型用法代碼示例。如果您正苦於以下問題:PHP WikiPage::history方法的具體用法?PHP WikiPage::history怎麽用?PHP WikiPage::history使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類WikiPage
的用法示例。
在下文中一共展示了WikiPage::history方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1:
$action = 'show';
}
}
//release the lock after finishing saving
$lock_manager->releaseLock($wiki_title, $wikiId);
} else {
//failed to lock, unable to save
$action = 'conflict';
}
break;
// page history
// page history
case 'history':
$wikiPage->loadPage($wiki_title);
$wiki_title = $wikiPage->getTitle();
$history = $wikiPage->history(0, 0, 'DESC');
break;
}
// change to use empty page content
if (!isset($content)) {
$content = '';
}
// --------- End of wiki command processing -----------
// --------- Start of wiki display --------------------
// set xtra head
$jspath = document_web_path() . '/lib/javascript';
// set image repository
$head_content .= "<script type=\"text/javascript\">" . "\nvar sImgPath = '{$themeimg}'" . "\n</script>\n";
$head_content .= '<link rel="stylesheet" type="text/css" href="' . $urlServer . 'modules/wiki/style.css">';
//navigation bar
if (!add_units_navigation()) {
示例2: while
while ($last < $nbEntries) {
$last += $step;
}
$last = $last > $nbEntries ? $last - $step : $last;
$previous = $offset - $step < 0 ? false : $offset - $step;
$next = $offset + $step >= $nbEntries ? false : $offset + $step;
if ($next > $nbEntries) {
$next = false;
}
if ($previous < 0) {
$previous = false;
}
}
// get page history
if ('history' == $action) {
$history = $wikiPage->history($offset, $step, 'DESC');
}
// get recent changes
if ('recent' == $action) {
$recentChanges = $wiki->recentChanges($offset, $step);
}
if (0 === $step) {
$step = $defaultStep;
}
break;
// all pages
// all pages
case 'all':
$allPages = $wiki->allPages();
break;
// edit page content