mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
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
This commit is contained in:
parent
d0d676b1b0
commit
94eada294e
@ -36,7 +36,6 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
|||||||
'deletefromlive',
|
'deletefromlive',
|
||||||
'duplicate',
|
'duplicate',
|
||||||
'duplicatewithchildren',
|
'duplicatewithchildren',
|
||||||
'getpagecount',
|
|
||||||
'getversion',
|
'getversion',
|
||||||
'publishall',
|
'publishall',
|
||||||
'restore',
|
'restore',
|
||||||
@ -1139,36 +1138,6 @@ JS;
|
|||||||
return $form;
|
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() {
|
function publishall() {
|
||||||
ini_set("memory_limit", -1);
|
ini_set("memory_limit", -1);
|
||||||
ini_set('max_execution_time', 0);
|
ini_set('max_execution_time', 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user