Permalink
Browse files

API CHANGE Removed unnecessary CMSMain->getpagecount() method

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@92751 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
1 parent d0d676b commit 94eada294e9efd9736edfe042475459ebbf309fc @chillu chillu committed Nov 21, 2009
Showing with 0 additions and 31 deletions.
  1. +0 −31 code/CMSMain.php
View
@@ -36,7 +36,6 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
'deletefromlive',
'duplicate',
'duplicatewithchildren',
- 'getpagecount',
'getversion',
'publishall',
'restore',
@@ -1139,36 +1138,6 @@ function BatchActionsForm() {
return $form;
}
- /**
- * Helper function to get page count
- */
- function getpagecount() {
- ini_set('max_execution_time', 0);
- $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() {
ini_set("memory_limit", -1);
ini_set('max_execution_time', 0);

0 comments on commit 94eada2

Please sign in to comment.