From c3bf93468fb5b644020d72ef66f039282dedac67 Mon Sep 17 00:00:00 2001 From: Hamish Friedlander Date: Fri, 17 Feb 2012 12:06:12 +1300 Subject: [PATCH 1/3] BUGFIX: SiteTree#getCMSFields referenced $linkedPages even if $linkedPages wasnt set --- code/model/SiteTree.php | 52 ++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/code/model/SiteTree.php b/code/model/SiteTree.php index ff63dac9..9e8c0720 100644 --- a/code/model/SiteTree.php +++ b/code/model/SiteTree.php @@ -1760,36 +1760,36 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid // Create a status message for multiple parents if($this->ID && is_numeric($this->ID)) { $linkedPages = $this->VirtualPages(); - } - - $parentPageLinks = array(); - if($linkedPages->Count() > 0) { - foreach($linkedPages as $linkedPage) { - $parentPage = $linkedPage->Parent; - if($parentPage) { - if($parentPage->ID) { - $parentPageLinks[] = "ID\">{$parentPage->Title}"; - } else { - $parentPageLinks[] = "ID\">" . - _t('SiteTree.TOPLEVEL', 'Site Content (Top Level)') . - ""; + $parentPageLinks = array(); + + if($linkedPages->Count() > 0) { + foreach($linkedPages as $linkedPage) { + $parentPage = $linkedPage->Parent; + if($parentPage) { + if($parentPage->ID) { + $parentPageLinks[] = "ID\">{$parentPage->Title}"; + } else { + $parentPageLinks[] = "ID\">" . + _t('SiteTree.TOPLEVEL', 'Site Content (Top Level)') . + ""; + } } } + + $lastParent = array_pop($parentPageLinks); + $parentList = "'$lastParent'"; + + if(count($parentPageLinks) > 0) { + $parentList = "'" . implode("', '", $parentPageLinks) . "' and " + . $parentList; + } + + $statusMessage[] = sprintf( + _t('SiteTree.APPEARSVIRTUALPAGES', "This content also appears on the virtual pages in the %s sections."), + $parentList + ); } - - $lastParent = array_pop($parentPageLinks); - $parentList = "'$lastParent'"; - - if(count($parentPageLinks) > 0) { - $parentList = "'" . implode("', '", $parentPageLinks) . "' and " - . $parentList; - } - - $statusMessage[] = sprintf( - _t('SiteTree.APPEARSVIRTUALPAGES', "This content also appears on the virtual pages in the %s sections."), - $parentList - ); } if($this->HasBrokenLink || $this->HasBrokenFile) { From b8399aa85e3824c613edf127cf95afc9e9862e35 Mon Sep 17 00:00:00 2001 From: Stig Lindqvist Date: Fri, 9 Mar 2012 12:54:30 +1300 Subject: [PATCH 2/3] API CHANGE: Renaming of gridfield components #6921 --- code/controllers/AssetAdmin.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/controllers/AssetAdmin.php b/code/controllers/AssetAdmin.php index ebaec607..7a8bd633 100644 --- a/code/controllers/AssetAdmin.php +++ b/code/controllers/AssetAdmin.php @@ -123,8 +123,8 @@ JS new GridFieldDefaultColumns(), new GridFieldPaginator(15), new GridFieldDeleteAction(), - new GridFieldEditAction(), - new GridFieldPopupForms() + new GridFieldEditButton(), + new GridFieldDetailForm() ); $gridField = new GridField('File','Files', $this->getList(), $gridFieldConfig); $gridField->setDisplayFields(array( From ec06f1db8ee1e97d8f5b8e1fbb98f9a8d06816c0 Mon Sep 17 00:00:00 2001 From: Stig Lindqvist Date: Fri, 9 Mar 2012 14:08:43 +1300 Subject: [PATCH 3/3] API CHANGE Renamed GridFieldDefaultColumns to GridFieldDataColumns #6921 --- code/controllers/AssetAdmin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/controllers/AssetAdmin.php b/code/controllers/AssetAdmin.php index 7a8bd633..110f5ea2 100644 --- a/code/controllers/AssetAdmin.php +++ b/code/controllers/AssetAdmin.php @@ -120,7 +120,7 @@ JS // File listing $gridFieldConfig = GridFieldConfig::create()->addComponents( new GridFieldSortableHeader(), - new GridFieldDefaultColumns(), + new GridFieldDataColumns(), new GridFieldPaginator(15), new GridFieldDeleteAction(), new GridFieldEditButton(),