From 392a7e4a51690f2cbe6bffc024348a887186ded5 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 13 Jan 2020 17:31:59 +0100 Subject: [PATCH 1/3] make getFileName() public --- SeedDMS_Preview/Preview/Previewer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SeedDMS_Preview/Preview/Previewer.php b/SeedDMS_Preview/Preview/Previewer.php index b8df0ca1c..9e2fe2a34 100644 --- a/SeedDMS_Preview/Preview/Previewer.php +++ b/SeedDMS_Preview/Preview/Previewer.php @@ -52,7 +52,7 @@ class SeedDMS_Preview_Previewer extends SeedDMS_Preview_Base { * @param integer $width width of preview image * @return string file name of preview image */ - protected function getFileName($object, $width) { /* {{{ */ + public function getFileName($object, $width) { /* {{{ */ if(!$object) return false; From b59f906f273859097a2c2a2605421543b7c1674b Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 14 Jan 2020 08:31:43 +0100 Subject: [PATCH 2/3] fis saving of disable flag of extensions --- inc/inc.ClassSettings.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/inc/inc.ClassSettings.php b/inc/inc.ClassSettings.php index e63d0202b..26206d127 100644 --- a/inc/inc.ClassSettings.php +++ b/inc/inc.ClassSettings.php @@ -716,10 +716,14 @@ class Settings { /* {{{ */ $extname = strval($tmp['name']); if(isset($tmp['disable'])) $disabled = strval($tmp['disable']); + else + $disabled = 0; $this->_extensions[$extname]['__disable__'] = $disabled=='1' || $disabled == 'true' ? true : false; foreach($extension->children() as $parameter) { $tmp2 = $parameter->attributes(); - $this->_extensions[$extname][strval($tmp2['name'])] = strval($parameter); + /* Do not read a parameter with the same name. Just a pre caution */ + if(strval($tmp2['name']) != '__disable__') + $this->_extensions[$extname][strval($tmp2['name'])] = strval($parameter); } } @@ -1058,7 +1062,7 @@ class Settings { /* {{{ */ * in configuration form. */ foreach($extension as $fieldname=>$confvalue) { - if($confvalue) { + if($fieldname != '___disable__' && $confvalue) { $parameter = $extnode->addChild('parameter'); $parameter[0] = isset($extension[$fieldname]) ? (is_array($extension[$fieldname]) ? implode(',', $extension[$fieldname]) : $extension[$fieldname]) : ''; $this->setXMLAttributValue($parameter, 'name', $fieldname); From daf08343e36cff408ef72bebae71d13513a9be01 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 14 Jan 2020 08:32:05 +0100 Subject: [PATCH 3/3] set disable flag of extension otherwise it will not be saved --- views/bootstrap/class.Settings.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php index 13492c439..14a48cb56 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -78,7 +78,7 @@ class SeedDMS_View_Settings extends SeedDMS_Bootstrap_Style { */ protected function showRawConfigHeadline($text) { /* {{{ */ ?> - + showStartPaneContent('site', (!$currenttab || $currenttab == 'site')); if($this->hasHook('processConfig')) $extconf = $this->callHook('processConfig', $extname, $extconf); if($extconf['config']) { - $this->showRawConfigHeadline("".$extconf['title']); + $this->showRawConfigHeadline("".'_extensions[$extname]["__disable__"] ? '1' : '').'" />'.$extconf['title']); foreach($extconf['config'] as $confkey=>$conf) { ob_start(); switch($conf['type']) {