openrat-cms

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

commit 7ccc8358dc3e150a07b4aa404c60d4165aba6b65
parent a2008ea437e96f1859d551cd426460a9083aae99
Author: Jan Dankert <devnull@localhost>
Date:   Fri, 15 Dec 2017 21:44:46 +0100

Fix: Anzeige von Pageelement-Info und -Struktur

Diffstat:
action/PageelementAction.class.php | 2+-
modules/template-engine/components/html/editor/Editor.class.php | 18+++++++-----------
2 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/action/PageelementAction.class.php b/action/PageelementAction.class.php @@ -165,7 +165,7 @@ class PageelementAction extends Action $user = new User( $this->value->lastchangeUserId ); $user->load(); - $this->setTemplateVar('lastchange_user',$user); + $this->setTemplateVar('lastchange_user',$user->getProperties()); $this->setTemplateVar('lastchange_date',$this->value->lastchangeTimeStamp); $t = new Template( $this->page->templateid ); diff --git a/modules/template-engine/components/html/editor/Editor.class.php b/modules/template-engine/components/html/editor/Editor.class.php @@ -35,17 +35,13 @@ class EditorComponent extends Component case 'dom': case 'tree': - echo <<<'HTML' - <?php - $attr_tmp_doc = new DocumentElement(); - $attr_tmp_text = $$attr_name; - if ( !is_array($attr_tmp_text)) - $attr_tmp_text = explode("\n",$attr_tmp_text); - - $attr_tmp_doc->parse($attr_tmp_text); - echo $attr_tmp_doc->render('application/html-dom'); - ?> -HTML; + echo '<?php '; + echo '$doc = new DocumentElement();'; + echo '$tmp_text = '.$this->textasvarname($this->name).';'; + echo 'if( !is_array($tmp_text))$tmp_text = explode("\n",$tmp_text);'; + echo '$doc->parse($tmp_text);'; + echo 'echo $doc->render(\'application/html-dom\');'; + echo '?>'; break; default: