openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit fe5760b8d8fc51da1126f87758e49ce691e7bbe4
parent 21dd7e6668eaa9e23f227fefd017c73b3a7651ff
Author: Jan Dankert <devnull@localhost>
Date:   Fri,  2 Sep 2016 21:35:15 +0200

Kompatibilität mit PHP 7 hergestellt.

Diffstat:
db/db.class.php | 2+-
model/Language.class.php | 4++--
model/Model.class.php | 2+-
model/Template.class.php | 2+-
4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/db/db.class.php b/db/db.class.php @@ -159,7 +159,7 @@ class DB } // Client instanziieren - $this->client = & new $classname; + $this->client = new $classname; // Schauen, ob der Treiber Prepared Statements beherscht. if ( ! method_exists($this->client,'clear')) { diff --git a/model/Language.class.php b/model/Language.class.php @@ -74,7 +74,7 @@ class Language " WHERE projectid = {projectid} ". " ORDER BY name" ); - if ( !empty($this->projectid) ) + if ( !empty($this) && !empty($this->projectid) ) $sql->setInt('projectid',$this->projectid ); else { @@ -100,7 +100,7 @@ class Language SQL ); - if ( !empty($this->projectid) ) + if ( !empty($this) && !empty($this->projectid) ) $sql->setInt('projectid',$this->projectid ); else { diff --git a/model/Model.class.php b/model/Model.class.php @@ -77,7 +77,7 @@ class Model " WHERE projectid = {projectid} ". " ORDER BY name" ); - if ( !empty($this->projectid) ) + if ( !empty($this) && !empty($this->projectid) ) $sql->setInt('projectid',$this->projectid ); else { diff --git a/model/Template.class.php b/model/Template.class.php @@ -90,7 +90,7 @@ class Template $sql = new Sql( 'SELECT id,name FROM {t_template}'. ' WHERE projectid={projectid}'. ' ORDER BY name ASC ' ); - if ( isset($this->projectid) ) + if ( isset($this) && isset($this->projectid) ) $sql->setInt( 'projectid',$this->projectid ); else {