API CHANGE Removed CMSMain->getpagecount() unused helper method (should be a report, anyway)

This commit is contained in:
Ingo Schommer 2012-03-09 23:13:27 +01:00
parent 22cd47cc84
commit 0633c10075

View File

@ -1009,40 +1009,6 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
return $form;
}
/**
* Helper function to get page count
*/
function getpagecount() {
if(!Permission::check('ADMIN')) return Security::permissionFailure($this);
increase_time_limit_to();
increase_memory_limit_to();
$excludePages = split(" *, *", $_GET['exclude']);
$pages = DataObject::get("SiteTree", "\"ParentID\" = 0");
foreach($pages as $page) $pageArr[] = $page;
while(list($i,$page) = each($pageArr)) {
if(!in_array($page->URLSegment, $excludePages)) {
if($children = $page->AllChildren()) {
foreach($children as $child) $pageArr[] = $child;
}
if(!$_GET['onlywithcontent'] || strlen(Convert::xml2raw($page->Content)) > 100) {
echo "<li>" . $page->Breadcrumbs(null, true) . "</li>";
$count++;
} else {
echo "<li style=\"color: #777\">" . $page->Breadcrumbs(null, true) . " - " . _t('CMSMain.NOCONTENT',"no content") . "</li>";
}
}
}
echo '<p>' . _t('CMSMain.TOTALPAGES',"Total pages: ") . "$count</p>";
}
function publishall($request) {
if(!Permission::check('ADMIN')) return Security::permissionFailure($this);