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; diff --git a/inc/inc.ClassSettings.php b/inc/inc.ClassSettings.php index 4ee09a1a6..c1c9305be 100644 --- a/inc/inc.ClassSettings.php +++ b/inc/inc.ClassSettings.php @@ -777,10 +777,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); } } @@ -1137,7 +1141,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); diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php index cbef75876..d3ed30462 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) { /* {{{ */ ?> -