openrat-cms

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

commit 42ff4712315689d9dbf491af71362a04b66688c1
parent f2e324788f6be91aad2b7ffc000962371393b6cc
Author: dankert <devnull@localhost>
Date:   Tue,  4 Dec 2007 22:54:04 +0100

Textelement bearbeiten: Objektliste nur laden, wenn Wiki-Editor aktiv.

Diffstat:
actionClasses/PageelementAction.class.php | 46+++++++++++++++++++++++++---------------------
1 file changed, 25 insertions(+), 21 deletions(-)

diff --git a/actionClasses/PageelementAction.class.php b/actionClasses/PageelementAction.class.php @@ -570,6 +570,31 @@ class PageelementAction extends Action function advancedlongtext() { + if ( $this->element->wiki ) + { + // Ermitteln aller verlinkbaren Objekte (fuer Editor) + $objects = array(); + + foreach( Folder::getAllObjectIds() as $id ) + { + $o = new Object( $id ); + $o->load(); + + if ( $o->getType() != 'folder' ) + { + $f = new Folder( $o->parentid ); + $objects[ $id ] = lang( 'GLOBAL_'.$o->getType() ).': '; + $objects[ $id ] .= implode( FILE_SEP,$f->parentObjectNames(false,true) ); + $objects[ $id ] .= FILE_SEP.$o->name; + } + } + asort( $objects ); // Sortieren + + $this->setTemplateVar( 'objects',$objects ); + $this->setTemplateVar( 'images' ,$objects ); + } + + $this->editlongtext(); } @@ -582,27 +607,6 @@ class PageelementAction extends Action */ function editlongtext() { - // Ermitteln aller verlinkbaren Objekte (fuer Editor) - $objects = array(); - - foreach( Folder::getAllObjectIds() as $id ) - { - $o = new Object( $id ); - $o->load(); - - if ( $o->getType() != 'folder' ) - { - $f = new Folder( $o->parentid ); - $objects[ $id ] = lang( 'GLOBAL_'.$o->getType() ).': '; - $objects[ $id ] .= implode( FILE_SEP,$f->parentObjectNames(false,true) ); - $objects[ $id ] .= FILE_SEP.$o->name; - } - } - asort( $objects ); // Sortieren - - $this->setTemplateVar( 'objects',$objects ); - $this->setTemplateVar( 'images' ,$objects ); - if ($this->value->element->html) $this->setTemplateVar( 'editor','html' ); elseif ($this->value->element->wiki)