本文整理汇总了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