mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-13 13:11:31 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
0643a3dc87
|
@ -52,7 +52,7 @@ class SeedDMS_Preview_Previewer extends SeedDMS_Preview_Base {
|
||||||
* @param integer $width width of preview image
|
* @param integer $width width of preview image
|
||||||
* @return string file name of preview image
|
* @return string file name of preview image
|
||||||
*/
|
*/
|
||||||
protected function getFileName($object, $width) { /* {{{ */
|
public function getFileName($object, $width) { /* {{{ */
|
||||||
if(!$object)
|
if(!$object)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
|
@ -777,10 +777,14 @@ class Settings { /* {{{ */
|
||||||
$extname = strval($tmp['name']);
|
$extname = strval($tmp['name']);
|
||||||
if(isset($tmp['disable']))
|
if(isset($tmp['disable']))
|
||||||
$disabled = strval($tmp['disable']);
|
$disabled = strval($tmp['disable']);
|
||||||
|
else
|
||||||
|
$disabled = 0;
|
||||||
$this->_extensions[$extname]['__disable__'] = $disabled=='1' || $disabled == 'true' ? true : false;
|
$this->_extensions[$extname]['__disable__'] = $disabled=='1' || $disabled == 'true' ? true : false;
|
||||||
foreach($extension->children() as $parameter) {
|
foreach($extension->children() as $parameter) {
|
||||||
$tmp2 = $parameter->attributes();
|
$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.
|
* in configuration form.
|
||||||
*/
|
*/
|
||||||
foreach($extension as $fieldname=>$confvalue) {
|
foreach($extension as $fieldname=>$confvalue) {
|
||||||
if($confvalue) {
|
if($fieldname != '___disable__' && $confvalue) {
|
||||||
$parameter = $extnode->addChild('parameter');
|
$parameter = $extnode->addChild('parameter');
|
||||||
$parameter[0] = isset($extension[$fieldname]) ? (is_array($extension[$fieldname]) ? implode(',', $extension[$fieldname]) : $extension[$fieldname]) : '';
|
$parameter[0] = isset($extension[$fieldname]) ? (is_array($extension[$fieldname]) ? implode(',', $extension[$fieldname]) : $extension[$fieldname]) : '';
|
||||||
$this->setXMLAttributValue($parameter, 'name', $fieldname);
|
$this->setXMLAttributValue($parameter, 'name', $fieldname);
|
||||||
|
|
|
@ -78,7 +78,7 @@ class SeedDMS_View_Settings extends SeedDMS_Bootstrap_Style {
|
||||||
*/
|
*/
|
||||||
protected function showRawConfigHeadline($text) { /* {{{ */
|
protected function showRawConfigHeadline($text) { /* {{{ */
|
||||||
?>
|
?>
|
||||||
<tr><td><b><?= $text ?></b></td></tr>
|
<tr><td colspan="2"><b><?= $text ?></b></td></tr>
|
||||||
<?php
|
<?php
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
@ -503,7 +503,7 @@ $this->showStartPaneContent('site', (!$currenttab || $currenttab == 'site'));
|
||||||
if($this->hasHook('processConfig'))
|
if($this->hasHook('processConfig'))
|
||||||
$extconf = $this->callHook('processConfig', $extname, $extconf);
|
$extconf = $this->callHook('processConfig', $extname, $extconf);
|
||||||
if($extconf['config']) {
|
if($extconf['config']) {
|
||||||
$this->showRawConfigHeadline("<a name=\"".$extname."\"></a>".$extconf['title']);
|
$this->showRawConfigHeadline("<a name=\"".$extname."\"></a>".'<input type="hidden" name="extensions['.$extname.'][__disable__]" value="'.(isset($settings->_extensions[$extname]["__disable__"]) && $settings->_extensions[$extname]["__disable__"] ? '1' : '').'" />'.$extconf['title']);
|
||||||
foreach($extconf['config'] as $confkey=>$conf) {
|
foreach($extconf['config'] as $confkey=>$conf) {
|
||||||
ob_start();
|
ob_start();
|
||||||
switch($conf['type']) {
|
switch($conf['type']) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user