openrat-cms

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

commit 312f0c550bba6fdb1da42796ca12680a7c4cc2fa
parent 53a5d60004c9edde47aa5b966137b7a23a095bb4
Author: Jan Dankert <develop@jandankert.de>
Date:   Thu,  6 Jun 2019 21:23:12 +0200

Fix: Ausgabeverzeichnisse, die mit '#' beginnen, werden ignoriert.

Diffstat:
modules/cms-publish/PublishPublic.class.php | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/modules/cms-publish/PublishPublic.class.php b/modules/cms-publish/PublishPublic.class.php @@ -9,6 +9,7 @@ use cms\model\Link; use cms\model\Page; use cms\model\Project; use cms\model\Url; +use Ftp; use Logger; use OpenRatException; use Session; @@ -275,10 +276,10 @@ class PublishPublic extends Publish $ftpUrl = $project->ftp_url; } - if ( ! empty($ftpUrl) ) + if ( $ftpUrl && $ftpUrl[0]!='#' ) { $this->with_ftp = true; - $this->ftp = new Ftp($project->ftp_url); // Aufbauen einer FTP-Verbindung + $this->ftp = new \Ftp($project->ftp_url); // Aufbauen einer FTP-Verbindung $this->ftp->passive = ( $project->ftp_passive == '1' ); } @@ -300,7 +301,7 @@ class PublishPublic extends Publish // Sofort pruefen, ob das Zielverzeichnis ueberhaupt beschreibbar ist. - if ( $this->local_destdir != '' ) + if ( $this->local_destdir && $this->local_destdir[0] != '#') { if ( !is_writeable( $this->local_destdir ) ) throw new OpenRatException('ERROR_PUBLISH','directory not writable: '.$this->local_destdir );