From 611c3f1b2ef80926d9536380c64832038524e888 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Wed, 12 Dec 2012 15:14:11 +0100 Subject: [PATCH 1/8] Added travis environment info output --- tests/travis/before_script | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/travis/before_script b/tests/travis/before_script index a7ebb62f..94f244f8 100755 --- a/tests/travis/before_script +++ b/tests/travis/before_script @@ -4,6 +4,14 @@ BUILD_DIR=$1 +# Environment info +echo "# Environment info" +echo " - `php --version`" +echo " - `mysql --version`" +echo " - `pg_config --version`" +echo " - SQLite3 `sqlite3 -version`" +echo "" + # Fetch all dependencies # TODO Replace with different composer.json variations From f4128a083923689978767c28c1c972e5412f2e87 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Thu, 13 Dec 2012 00:27:37 +0100 Subject: [PATCH 2/8] Revert "BUG removed class cms-panel-link as it was calling loadPanel to be called twice trac 8041" This reverts commit a63a9f0e740ae1643e68bcc5d653e16682326b07. Broken by merging in 0be51a93213, which works on 3.0, but failed once we put those two patches together in 3.1. They fix the same problem on different ends, and assume the respective other behaviour still exists. --- templates/Includes/CMSMain_Content.ss | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/Includes/CMSMain_Content.ss b/templates/Includes/CMSMain_Content.ss index 4507b18f..26ac2fc6 100644 --- a/templates/Includes/CMSMain_Content.ss +++ b/templates/Includes/CMSMain_Content.ss @@ -8,17 +8,17 @@
  • - + <% _t('CMSMain.TabContent', 'Content') %>
  • - + <% _t('CMSMain.TabSettings', 'Settings') %>
  • - + <% _t('CMSMain.TabHistory', 'History') %>
  • From 2e164eae516375974e24f758b6cc336f7f315126 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Thu, 13 Dec 2012 00:46:17 +0100 Subject: [PATCH 3/8] API Report::get_reports() returns native array (fixes #8096) Used to return ArrayList, but since 9d74c99e08 its no longer using keys, which they functionality using these return values rely on. Hence the breakage of ReportAdmin, since no report was being detected as "current" by looking through the array keys. --- code/reports/Report.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/code/reports/Report.php b/code/reports/Report.php index 4a94569f..08d005fc 100644 --- a/code/reports/Report.php +++ b/code/reports/Report.php @@ -163,7 +163,7 @@ class SS_Report extends ViewableData { /** * Return the SS_Report objects making up the given list. - * @return ArrayList an arraylist of SS_Report objects + * @return Array of SS_Report objects */ static public function get_reports() { $reports = ClassInfo::subclassesFor(get_called_class()); @@ -182,13 +182,12 @@ class SS_Report extends ViewableData { } } - //convert array into ArrayList - $list = ArrayList::create($reportsArray); + uasort($reportsArray, function($a, $b) { + if($a->sort == $b->sort) return 0; + else return ($a->sort < $b->sort) ? -1 : 1; + }); - //sort - $list = $list->sort('sort'); - - return $list; + return $reportsArray; } /////////////////////// UI METHODS /////////////////////// From d42c0041d27bfe079a7691ddea046c1fe1e8432c Mon Sep 17 00:00:00 2001 From: Niklas Forsdahl Date: Thu, 13 Dec 2012 16:31:19 +0200 Subject: [PATCH 4/8] BUG: Fixed pagination functionality on root assets folder Moving to another page in the GridField for the root assets folder in AssetAdmin caused all files to be displayed. This was caused by the functionality that tries to fix some edge cases for detail view kicked in and didn't filter the list properly. Fixed by making the edge case detection a little more specific (i.e. checking if a numeric ID was sent as a request variable). --- 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 eff6eb03..58e15a05 100644 --- a/code/controllers/AssetAdmin.php +++ b/code/controllers/AssetAdmin.php @@ -95,7 +95,7 @@ JS // Don't filter list when a detail view is requested, // to avoid edge cases where the filtered list wouldn't contain the requested // record due to faulty session state (current folder not always encoded in URL, see #7408). - if(!$folder->ID && ($this->request->param('ID') == 'field')) { + if(!$folder->ID && $this->request->requestVar('ID') === null && ($this->request->param('ID') == 'field')) { return $list; } From 26cc14a930b8ade65976e64ef38dfa0b62e4e89f Mon Sep 17 00:00:00 2001 From: Mateusz Uzdowski Date: Thu, 22 Nov 2012 09:46:45 +1300 Subject: [PATCH 5/8] API Rework the CMS actions to use alternating buttons and drop-ups. Utilise the new features provided by the framework to get richer interface: * save buttons that highlight the current state of the page * minor actions in a drop-up * embed last publishing and saving information --- code/controllers/CMSMain.php | 12 +++++ code/model/SiteTree.php | 84 ++++++++++++++++++++++--------- javascript/CMSMain.EditForm.js | 44 ++++++++++++++++ templates/SiteTree_Information.ss | 9 ++++ 4 files changed, 126 insertions(+), 23 deletions(-) create mode 100644 templates/SiteTree_Information.ss diff --git a/code/controllers/CMSMain.php b/code/controllers/CMSMain.php index d194f861..774b9dcc 100644 --- a/code/controllers/CMSMain.php +++ b/code/controllers/CMSMain.php @@ -638,6 +638,18 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr $actions = $record->getAllCMSActions(); } else { $actions = $record->getCMSActions(); + + // Find and remove action menus that have no actions. + if ($actions && $actions->Count()) { + $tabset = $actions->fieldByName('ActionMenus'); + if ($tabset) { + foreach ($tabset->getChildren() as $tab) { + if (!$tab->getChildren()->count()) { + $tabset->removeByName($tab->getName()); + } + } + } + } } // Use