From 94eada294e9efd9736edfe042475459ebbf309fc Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Sat, 21 Nov 2009 03:16:57 +0000 Subject: [PATCH] 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 --- code/CMSMain.php | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/code/CMSMain.php b/code/CMSMain.php index d1a6e26d..0c557dd6 100755 --- a/code/CMSMain.php +++ b/code/CMSMain.php @@ -36,7 +36,6 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr 'deletefromlive', 'duplicate', 'duplicatewithchildren', - 'getpagecount', 'getversion', 'publishall', 'restore', @@ -1139,36 +1138,6 @@ JS; 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 "
  • " . $page->Breadcrumbs(null, true) . "
  • "; - $count++; - } else { - echo "
  • " . $page->Breadcrumbs(null, true) . " - " . _t('CMSMain.NOCONTENT',"no content") . "
  • "; - } - - } - } - - echo '

    ' . _t('CMSMain.TOTALPAGES',"Total pages: ") . "$count

    "; - } - function publishall() { ini_set("memory_limit", -1); ini_set('max_execution_time', 0);