mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
FIX Remove unused code (#2693)
This commit is contained in:
parent
2bf691f548
commit
ecd9759f83
@ -1953,47 +1953,6 @@ class SiteTree extends DataObject implements PermissionProvider, i18nEntityProvi
|
|||||||
*/
|
*/
|
||||||
public function getCMSFields()
|
public function getCMSFields()
|
||||||
{
|
{
|
||||||
// Status / message
|
|
||||||
// Create a status message for multiple parents
|
|
||||||
if ($this->ID && is_numeric($this->ID)) {
|
|
||||||
$linkedPages = $this->VirtualPages();
|
|
||||||
|
|
||||||
$parentPageLinks = [];
|
|
||||||
|
|
||||||
if ($linkedPages->count() > 0) {
|
|
||||||
/** @var VirtualPage $linkedPage */
|
|
||||||
foreach ($linkedPages as $linkedPage) {
|
|
||||||
$parentPage = $linkedPage->Parent();
|
|
||||||
if ($parentPage && $parentPage->exists()) {
|
|
||||||
$link = Convert::raw2att($parentPage->CMSEditLink());
|
|
||||||
$title = Convert::raw2xml($parentPage->Title);
|
|
||||||
} else {
|
|
||||||
$link = CMSPageEditController::singleton()->Link('show');
|
|
||||||
$title = _t(__CLASS__.'.TOPLEVEL', 'Site Content (Top Level)');
|
|
||||||
}
|
|
||||||
$parentPageLinks[] = "<a class=\"cmsEditlink\" href=\"{$link}\">{$title}</a>";
|
|
||||||
}
|
|
||||||
|
|
||||||
$lastParent = array_pop($parentPageLinks);
|
|
||||||
$parentList = "'$lastParent'";
|
|
||||||
|
|
||||||
if (count($parentPageLinks)) {
|
|
||||||
$parentList = "'" . implode("', '", $parentPageLinks) . "' and "
|
|
||||||
. $parentList;
|
|
||||||
}
|
|
||||||
|
|
||||||
$statusMessage[] = _t(
|
|
||||||
'SilverStripe\\CMS\\Model\\SiteTree.APPEARSVIRTUALPAGES',
|
|
||||||
"This content also appears on the virtual pages in the {title} sections.",
|
|
||||||
['title' => $parentList]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->HasBrokenLink || $this->HasBrokenFile) {
|
|
||||||
$statusMessage[] = _t(__CLASS__.'.HASBROKENLINKS', "This page has broken links.");
|
|
||||||
}
|
|
||||||
|
|
||||||
$dependentNote = '';
|
$dependentNote = '';
|
||||||
$dependentTable = new LiteralField('DependentNote', '<p></p>');
|
$dependentTable = new LiteralField('DependentNote', '<p></p>');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user