openrat-cms

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

commit 2dfb136ad3bb96919647dda8385de4fee8f6a593
parent a84dbb71ad1574cb9c13962d68e08091992f2a97
Author: Jan Dankert <devnull@localhost>
Date:   Tue, 27 Nov 2018 22:24:24 +0100

Fix: Dateinamen richtig ermitteln.

Diffstat:
modules/cms-core/model/Page.class.php | 41++---------------------------------------
1 file changed, 2 insertions(+), 39 deletions(-)

diff --git a/modules/cms-core/model/Page.class.php b/modules/cms-core/model/Page.class.php @@ -391,8 +391,7 @@ SQL */ function full_filename() { - $filename = $this->path(); - $filename .= $this->getFilename(); + $filename = $this->path().'/'.$this->getFilename(); $this->fullFilename = $filename; return $filename; @@ -410,43 +409,7 @@ SQL */ function getFilename() { - if ( $this->cut_index && $this->filename == config('publish','default') ) - { - return ''; // Link auf Index-Datei, der Dateiname bleibt leer. - } - else - { - $format = config('publish','format'); - $format = str_replace('{filename}',parent::filename(),$format ); - - if ( !$this->withLanguage || $this->content_negotiation && config('publish','negotiation','page_negotiate_language' ) ) - { - $format = str_replace('{language}' ,'',$format ); - $format = str_replace('{language_sep}','',$format ); - } - else - { - $l = new Language( $this->languageid ); - $l->load(); - $format = str_replace('{language}' ,$l->isoCode ,$format ); - $format = str_replace('{language_sep}',config('publish','language_sep'),$format ); - } - - if ( !$this->withModel || $this->content_negotiation && config('publish','negotiation','page_negotiate_type' ) ) - { - $format = str_replace('{type}' ,'',$format ); - $format = str_replace('{type_sep}','',$format ); - } - else - { - $t = new Template( $this->templateid ); - $t->modelid = $this->modelid; - $t->load(); - $format = str_replace('{type}' ,$t->extension ,$format ); - $format = str_replace('{type_sep}',config('publish','type_sep'),$format ); - } - return $format; - } + return self::filename(); }