openrat-cms

# OpenRat Content Management System
git clone http://git.code.weiherhei.de/openrat-cms.git
Log | Files | Refs

commit 2f4f2fe4e4397c6f1eec38b7db42957f37971f02
parent 963ed91606bdc3c59ee3aff5acdb9c37d3a708ac
Author: Jan Dankert <develop@jandankert.de>
Date:   Mon, 18 May 2020 00:09:53 +0200

Fix: Supporting 'greaterthan' in IF-components.

Diffstat:
modules/cms/action/LoginAction.class.php | 6+-----
modules/template_engine/components/html/if/If.class.php | 2+-
2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/modules/cms/action/LoginAction.class.php b/modules/cms/action/LoginAction.class.php @@ -296,11 +296,7 @@ class LoginAction extends BaseAction $dbconf += $conf['database-default']['defaults']; // Add Default-Values if ( is_array($dbconf) && $dbconf['enabled'] ) // Database-Connection is enabled - $dbids[$dbid] = array( - 'key' => $dbid, - 'value' => !$dbconf['name'] ? $dbid : Text::maxLength($dbconf['name']), - 'title' => $dbconf['description'] - ); + $dbids[$dbid] = !$dbconf['name'] ? $dbid : $dbconf['name'].' - '.$dbconf['description']; } diff --git a/modules/template_engine/components/html/if/If.class.php b/modules/template_engine/components/html/if/If.class.php @@ -35,7 +35,7 @@ class IfComponent extends Component elseif ($this->lessthan) $expr .= 'intval(' . $if->value($this->lessthan).')>intval('.$if->value($this->value).')'; elseif ($this->greaterthan) - $expr .= 'intval(' . $if->value($this->greaterthan).')<intval('.$if->value($this->value).')'; + $expr .= 'intval(' . $if->value($this->greaterthan).')<count('.$if->value($this->value).')'; elseif (! empty($this->present)) $expr .= 'isset(' . '$'.$this->present.')'; // 'isset' verwenden! Nicht empty(), da false empty ist. elseif (! empty($this->empty))