openrat-cms

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

commit 211723333396d2dc3cd3331bb9630284e31b475b
parent fe5760b8d8fc51da1126f87758e49ce691e7bbe4
Author: Jan Dankert <devnull@localhost>
Date:   Sat,  3 Sep 2016 01:51:06 +0200

Kompatibilität mit PHP 7 hergestellt.

Diffstat:
action/FolderAction.class.php | 2+-
macro/TagCloud.class.php | 2+-
model/Folder.class.php | 6+++---
textClasses/renderer/Pdf.class.php | 4++--
themes/default/include/html/group.inc.php | 2+-
util/Ftp.class.php | 2+-
util/Publish.class.php | 2+-
7 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/action/FolderAction.class.php b/action/FolderAction.class.php @@ -794,7 +794,7 @@ class FolderAction extends ObjectAction break; case 'name': - $ids = $this->folder->getObjectIdsByName(); + $ids = $this->folder->getChildObjectIdsByName(); break; case 'lastchange': diff --git a/macro/TagCloud.class.php b/macro/TagCloud.class.php @@ -45,7 +45,7 @@ class TagCloud extends Macro $f = new Folder( $this->keywordFolderId ); - foreach( $f->getObjectIdsByName() as $fid ) + foreach( $f->getChildObjectIdsByName() as $fid ) { $tf = new Folder($fid); if ( !$tf->isFolder) diff --git a/model/Folder.class.php b/model/Folder.class.php @@ -222,7 +222,7 @@ class Folder extends Object // Liest alle Objekte in diesem Ordner sortiert nach dem Namen (nicht Dateinamen!) - function getObjectIdsByName() + function getChildObjectIdsByName() { $db = db_connection(); @@ -326,7 +326,7 @@ class Folder extends Object ' OR is_link ={is_link} )' . ' ORDER BY orderid ASC' ); - if (isset($this->projectid)) + if (isset($this) && isset($this->projectid)) { $projectid = $this->projectid; } @@ -388,7 +388,7 @@ class Folder extends Object ' WHERE is_folder=1'. ' AND projectid={projectid}' ); - if ( !isset($this->projectid) ) + if ( !isset($this) || !isset($this->projectid) ) { $project = Session::getProject(); $sql->setInt('projectid',$project->projectid); diff --git a/textClasses/renderer/Pdf.class.php b/textClasses/renderer/Pdf.class.php @@ -16,14 +16,14 @@ class Pdf extends FPDF /* * Ueberschreibt die FPDF-Methode, damit im Fehlerfall kein die() aufgerufen wird. */ - function Image( $file,$x,$y,$a,$b,$type ) + function Image( $file,$x=null,$y=null,$a=0,$b=0,$type='',$link='' ) { switch( $type ) { case 'png': case 'jpeg': case 'jpg': - parent::Image($file,$x,$y,$a,$b,$type); + parent::Image($file,$x,$y,$a,$b,$type,$link); break; default: Logger::warn( 'Imagetype '.$type.' not available in PDF renderer'); diff --git a/themes/default/include/html/group.inc.php b/themes/default/include/html/group.inc.php @@ -1,5 +1,5 @@ <?php -?><fieldset class="<? echo $attr_open?'open':'' ?>"><?php if(isset($attr_title)) { ?><legend><?php if(isset($attr_icon)) { ?>&nbsp;&nbsp;<img src="<?php echo $image_dir.'icon_'.$attr_icon.IMG_ICON_EXT ?>" align="left" border="0" /><?php } ?><div class="arrow-right closed" /><div class="arrow-down open" />&nbsp;&nbsp;<?php echo encodeHtml($attr_title) ?>&nbsp;&nbsp;</legend><?php } ?><div> +?><fieldset class="<?php echo $attr_open?'open':'' ?>"><?php if(isset($attr_title)) { ?><legend><?php if(isset($attr_icon)) { ?>&nbsp;&nbsp;<img src="<?php echo $image_dir.'icon_'.$attr_icon.IMG_ICON_EXT ?>" align="left" border="0" /><?php } ?><div class="arrow-right closed" /><div class="arrow-down open" />&nbsp;&nbsp;<?php echo encodeHtml($attr_title) ?>&nbsp;&nbsp;</legend><?php } ?><div> diff --git a/util/Ftp.class.php b/util/Ftp.class.php @@ -128,7 +128,7 @@ class Ftp } } - $this->path = ereg_replace( '\/$','',$ftp['path']); + $this->path = rtrim( $ftp['path'],'/' ); $this->log[] = 'Changing directory to '.$this->path; diff --git a/util/Publish.class.php b/util/Publish.class.php @@ -137,7 +137,7 @@ class Publish $this->ftp->passive = ( $project->ftp_passive == '1' ); } - $localDir = ereg_replace( '\/$','',$project->target_dir); + $localDir = rtrim( $project->target_dir,'/' ); if ( $confPublish['filesystem']['per_project'] && (!empty($localDir)) ) {