commit 8bee6aebba8152e1de357ac254bc676e4573df72
parent 1edfd270d9afb8bc58caa07d27f55d24ee87bf4a
Author: dankert <devnull@localhost>
Date: Wed, 13 Oct 2004 23:18:50 +0200
Neue Links zum Verschieben nach ganz oben/unten
Diffstat:
2 files changed, 467 insertions(+), 400 deletions(-)
diff --git a/actionClasses/FolderAction.class.php b/actionClasses/FolderAction.class.php
@@ -1,395 +1,460 @@
-<?php
-// ---------------------------------------------------------------------------
-// $Id$
-// ---------------------------------------------------------------------------
-// OpenRat Content Management System
-// Copyright (C) 2002-2004 Jan Dankert, cms@jandankert.de
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-// ---------------------------------------------------------------------------
+<?php
+// ---------------------------------------------------------------------------
+// $Id$
+// ---------------------------------------------------------------------------
+// OpenRat Content Management System
+// Copyright (C) 2002-2004 Jan Dankert, cms@jandankert.de
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+// ---------------------------------------------------------------------------
// $Log$
-// Revision 1.6 2004-05-07 21:30:59 dankert
-// Korrektur up_url
-//
-// Revision 1.5 2004/05/07 21:29:16 dankert
-// Url über Html::url erzeugen
-//
-// Revision 1.4 2004/05/02 14:49:37 dankert
-// Einfügen package-name (@package)
-//
-// Revision 1.3 2004/04/28 20:01:52 dankert
-// Ordner löschen ermöglichen
-//
-// Revision 1.2 2004/04/24 16:57:13 dankert
-// Korrektur: pub()
-//
-// Revision 1.1 2004/04/24 15:14:52 dankert
-// Initiale Version
-//
-// ---------------------------------------------------------------------------
-
-
-/**
- * Action-Klasse zum Bearbeiten eines Ordners
- * @author $Author$
- * @version $Revision$
- * @package openrat.actions
- */
-
-class FolderAction extends Action
-{
- var $defaultSubAction = 'show';
- var $folder;
-
-
- function FolderAction()
- {
- $this->folder = new Folder( $this->getSessionVar('objectid') );
- $this->folder->load();
-
- if ( ! $this->folder->isFolder )
- $this->message('','object id '.$this->folder->objectid.' is not a folder' );
- }
-
-
- function createnew()
- {
- // Neues Objekt in diesem Ordner anlegen
- switch( $this->getRequestVar('type') )
- {
- case 'folder':
-
- if ( $this->getRequestVar('foldername') != '' )
- {
- $f = new Folder();
- $f->name = $this->getRequestVar('foldername');
- $f->filename = $this->getRequestVar('foldername');
- $f->parentid = $this->folder->objectid;
-
- $f->add();
- }
-
- break;
-
- case 'page':
-
- if ( $this->getRequestVar('pagename') != '' )
- {
- $page = new Page();
- $page->name = $this->getRequestVar('pagename' );
- $page->filename = $this->getRequestVar('pagename' );
- $page->templateid = $this->getRequestVar('templateid');
- $page->parentid = $this->folder->objectid;
-
- $page->add();
- }
-
- break;
-
- case 'file':
-
- $file = new File();
- $upload = new Upload();
-
- $file->filename = $upload->filename;
- $file->name = $upload->filename;
- $file->extension = $upload->extension;
- $file->size = $upload->size;
- $file->parentid = $this->folder->objectid;
-
- $file->value = $upload->value;
-
- $file->add(); // Datei hinzufuegen
- break;
-
- case 'link':
-
- if ( $this->getRequestVar('linkname') != '' )
- {
- $link = new Link();
- $link->name = $this->getRequestVar('linkname');
- $link->parentid = $this->folder->objectid;
- $link->isLinkToObject = false;
- $link->url = '/';
- $link->add();
- }
- break;
-
- default: die();
- }
-
- $this->setTemplateVar('tree_refresh',true);
- $this->callSubAction('show');
- }
-
-
- /**
- * Abspeichern der Ordner-Eigenschaften. Ist der Schalter "delete" gesetzt, wird
- * der Ordner stattdessen gelöscht.
- */
- function save()
- {
- if ( $this->getRequestVar('delete') != '' )
- {
- // Ordner löschen
- $this->folder->delete();
- }
- else
- {
- // Ordnereigenschaften speichern
- if ( $this->getRequestVar('name') != '' )
- $this->folder->name = $this->getRequestVar('name' );
- else $this->folder->name = $this->getRequestVar('filename');
-
- $this->folder->filename = $this->getRequestVar('filename');
- $this->folder->desc = $this->getRequestVar('desc');
- $this->folder->save();
- }
-
- $this->setTemplateVar('tree_refresh',true);
- $this->callSubAction('show');
- }
-
-
- // Reihenfolge von Objekten aendern
- function changesequence()
- {
- $ids = $this->folder->getObjectIds();
- $seq = 0;
- foreach( $ids as $id )
- {
- $seq++; // Sequenz um 1 erhoehen
-
- // Die beiden Ordner vertauschen
- if ( $id == $this->getRequestVar('objectid1') )
- $id = $this->getRequestVar('objectid2');
- elseif ( $id == $this->getRequestVar('objectid2') )
- $id = $this->getRequestVar('objectid1');
-
- $o = new Object( $id );
- $o->setOrderId( $seq );
-
- unset( $o ); // Selfmade Garbage Collection :-)
- }
-
- // Ordner anzeigen
- $this->callSubAction('show');
-
- }
-
-
- function move()
- {
- $this->objectMove();
-
- $this->callSubAction('show');
- }
-
-
- function addACL()
- {
- $this->objectAddACL();
-
- $this->callSubAction('rights');
- }
-
-
- function delACL()
- {
- $this->objectDelACL();
-
- $this->callSubAction('rights');
- }
-
-
- function create()
- {
-
- if ( $this->folder->hasRight('create_page') )
- $this->setTemplateVar('templates',Template::getAll());
-
- $this->setTemplateVar('create_folder',$this->folder->hasRight('create_folder'));
- $this->setTemplateVar('create_file' ,$this->folder->hasRight('create_file') );
- $this->setTemplateVar('create_link' ,$this->folder->hasRight('create_link') );
- $this->setTemplateVar('create_page' ,$this->folder->hasRight('create_page') );
-
- $this->forward('folder_new');
-
- }
-
-
-
- function show()
- {
- global $conf_php;
-
- if ( ! $this->folder->isRoot )
- $this->setTemplateVar('up_url',Html::url(array('action'=>'main','callAction'=>'folder','callSubaction'=>'show','objectid'=>$this->folder->parentid)));
-
- $list = array();
- $last_objectid = 0;
-
- // Schleife ueber alle Objekte in diesem Ordner
- foreach( $this->folder->getObjectIds() as $id )
- {
- $o = new Object( $id );
-
- if ( $o->hasRight('read') )
- {
- $o->objectLoad();
- $list[$id]['name'] = Text::maxLaenge( 30,$o->name );
- $list[$id]['filename'] = Text::maxLaenge( 20,$o->filename );
- $list[$id]['desc'] = Text::maxLaenge( 30,$o->desc );
-
- $list[$id]['type'] = $o->getType();
-
- $list[$id]['icon'] = $o->getType();
-
- if ( $o->getType() == 'file' )
- {
- $file = new File( $id );
- $file->load();
- if ( substr($file->mimeType(),0,6) == 'image/' )
- $list[$id]['icon'] = 'image';
-// if ( substr($file->mimeType(),0,5) == 'text/' )
-// $list[$id]['icon'] = 'text';
- }
-
- $list[$id]['url' ] = Html::url(array('action' =>'main',
- 'callAction'=>$o->getType(),
- 'objectid' =>$id));
- $list[$id]['propurl' ] = Html::url(array('action'=>$o->getType(),
- 'subaction'=>'prop',
- 'objectid'=>$id));
- $list[$id]['date'] = date( lang('DATE_FORMAT'),$o->lastchange_date );
- $list[$id]['user'] = User::getUserName( $o->lastchange_userid );
-
- if ( $last_objectid != 0 )
- {
- $list[$id ]['upurl' ] = Html::url(array('action'=>'folder',
- 'subaction'=>'changesequence',
- 'objectid1'=>$id,
- 'objectid2'=>$last_objectid));
- $list[$last_objectid]['downurl'] = $list[$id]['upurl'];
- }
-
- $last_objectid = $id;
- }
- }
- $this->setTemplateVar('object',$list);
-
- $this->forward('folder_show');
-
- }
-
-
- function prop()
- {
- $this->setTemplateVars( $this->folder->getProperties() );
-
- // Alle Ordner ermitteln
- $this->setTemplateVar('act_objectid',$this->folder->objectid);
-
- $list = array();
- $allsubfolders = $this->folder->getAllSubFolderIds();
-
- foreach( $this->folder->getOtherFolders() as $id )
- {
- $f = new Folder( $id );
- if ( ! in_array($id,$allsubfolders) )
- $list[$id] = implode( ' » ',$f->parentObjectNames(true,true) );
- }
- asort( $list );
- $this->setTemplateVar('folder',$list);
-
- // Wenn Ordner leer ist, dann Löschen ermöglichen
- if ( count($this->folder->getObjectIds()) == 0 )
- $this->setTemplateVar('delete',true );
- else $this->setTemplateVar('delete',false);
-
- $this->forward('folder_prop');
- }
-
-
- function rights()
- {
- global $SESS;
- global $conf_php;
- if ($SESS['user']['is_admin'] != '1') die('nice try');
-
- $acllist = array();
- foreach( $this->folder->getAllInheritedAclIds() as $aclid )
- {
- $acl = new Acl( $aclid );
- $acl->load();
- $key = 'au'.$acl->username.'g'.$acl->groupname.'a'.$aclid;
- $acllist[$key] = $acl->getProperties();
- }
-
-// $this->setTemplateVar('inherited_acls',$acllist );
-// $acllist = array();
-
- foreach( $this->folder->getAllAclIds() as $aclid )
- {
- $acl = new Acl( $aclid );
- $acl->load();
- $key = 'bu'.$acl->username.'g'.$acl->groupname.'a'.$aclid;
- $acllist[$key] = $acl->getProperties();
- $acllist[$key]['delete_url'] = Html::url(array('subaction'=>'delACL','aclid'=>$aclid));
- }
- ksort( $acllist );
-
- $this->setTemplateVar('acls',$acllist );
-
- $this->setTemplateVar('users' ,User::listAll() );
- $this->setTemplateVar('groups' ,Group::getAll() );
-
- $languages = Language::getAll();
- $languages[0] = lang('ALL_LANGUAGES');
- $this->setTemplateVar('languages',$languages);
-
- $this->forward('folder_rights');
- }
-
-
- function pub()
- {
- if ( $this->getRequestVar('go') == '1' )
- {
- if ( $this->getRequestVar('subdirs') == '1' )
- $subdirs = true;
- else $subdirs = false;
-
- $publish = new Publish();
-
- $this->folder->publish = &$publish;
- $this->folder->publish( $subdirs );
-
- $list = array();
-
- foreach( $publish->publishedObjects as $o )
- {
- $list[] = $o['filename'];
- }
- $this->setTemplateVar('filenames',$list);
-
- $this->forward('publish');
- }
- else
- {
- $this->forward('folder_pub');
- }
- }
+// Revision 1.7 2004-10-13 21:18:50 dankert
+// Neue Links zum Verschieben nach ganz oben/unten
+//
+// Revision 1.6 2004/05/07 21:30:59 dankert
+// Korrektur up_url
+//
+// Revision 1.5 2004/05/07 21:29:16 dankert
+// Url ?ber Html::url erzeugen
+//
+// Revision 1.4 2004/05/02 14:49:37 dankert
+// Einf?gen package-name (@package)
+//
+// Revision 1.3 2004/04/28 20:01:52 dankert
+// Ordner l?schen erm?glichen
+//
+// Revision 1.2 2004/04/24 16:57:13 dankert
+// Korrektur: pub()
+//
+// Revision 1.1 2004/04/24 15:14:52 dankert
+// Initiale Version
+//
+// ---------------------------------------------------------------------------
+
+
+/**
+ * Action-Klasse zum Bearbeiten eines Ordners
+ * @author $Author$
+ * @version $Revision$
+ * @package openrat.actions
+ */
+
+class FolderAction extends Action
+{
+ var $defaultSubAction = 'show';
+ var $folder;
+
+
+ function FolderAction()
+ {
+ $this->folder = new Folder( $this->getSessionVar('objectid') );
+ $this->folder->load();
+
+ if ( ! $this->folder->isFolder )
+ $this->message('','object id '.$this->folder->objectid.' is not a folder' );
+ }
+
+
+ function createnew()
+ {
+ // Neues Objekt in diesem Ordner anlegen
+ switch( $this->getRequestVar('type') )
+ {
+ case 'folder':
+
+ if ( $this->getRequestVar('foldername') != '' )
+ {
+ $f = new Folder();
+ $f->name = $this->getRequestVar('foldername');
+ $f->filename = $this->getRequestVar('foldername');
+ $f->parentid = $this->folder->objectid;
+
+ $f->add();
+ }
+
+ break;
+
+ case 'page':
+
+ if ( $this->getRequestVar('pagename') != '' )
+ {
+ $page = new Page();
+ $page->name = $this->getRequestVar('pagename' );
+ $page->filename = $this->getRequestVar('pagename' );
+ $page->templateid = $this->getRequestVar('templateid');
+ $page->parentid = $this->folder->objectid;
+
+ $page->add();
+ }
+
+ break;
+
+ case 'file':
+
+ $file = new File();
+ $upload = new Upload();
+
+ $file->filename = $upload->filename;
+ $file->name = $upload->filename;
+ $file->extension = $upload->extension;
+ $file->size = $upload->size;
+ $file->parentid = $this->folder->objectid;
+
+ $file->value = $upload->value;
+
+ $file->add(); // Datei hinzufuegen
+ break;
+
+ case 'link':
+
+ if ( $this->getRequestVar('linkname') != '' )
+ {
+ $link = new Link();
+ $link->name = $this->getRequestVar('linkname');
+ $link->parentid = $this->folder->objectid;
+ $link->isLinkToObject = false;
+ $link->url = '/';
+ $link->add();
+ }
+ break;
+
+ default: die();
+ }
+
+ $this->setTemplateVar('tree_refresh',true);
+ $this->callSubAction('show');
+ }
+
+
+ /**
+ * Abspeichern der Ordner-Eigenschaften. Ist der Schalter "delete" gesetzt, wird
+ * der Ordner stattdessen gel?scht.
+ */
+ function save()
+ {
+ if ( $this->getRequestVar('delete') != '' )
+ {
+ // Ordner l?schen
+ $this->folder->delete();
+ }
+ else
+ {
+ // Ordnereigenschaften speichern
+ if ( $this->getRequestVar('name') != '' )
+ $this->folder->name = $this->getRequestVar('name' );
+ else $this->folder->name = $this->getRequestVar('filename');
+
+ $this->folder->filename = $this->getRequestVar('filename');
+ $this->folder->desc = $this->getRequestVar('desc');
+ $this->folder->save();
+ }
+
+ $this->setTemplateVar('tree_refresh',true);
+ $this->callSubAction('show');
+ }
+
+
+ // Reihenfolge von Objekten aendern
+ function changesequence()
+ {
+ $ids = $this->folder->getObjectIds();
+ $seq = 0;
+ foreach( $ids as $id )
+ {
+ $seq++; // Sequenz um 1 erhoehen
+
+ // Die beiden Ordner vertauschen
+ if ( $id == $this->getRequestVar('objectid1') )
+ $id = $this->getRequestVar('objectid2');
+ elseif ( $id == $this->getRequestVar('objectid2') )
+ $id = $this->getRequestVar('objectid1');
+
+ $o = new Object( $id );
+ $o->setOrderId( $seq );
+
+ unset( $o ); // Selfmade Garbage Collection :-)
+ }
+
+ // Ordner anzeigen
+ $this->callSubAction('show');
+
+ }
+
+
+ function settop()
+ {
+ $o = new Object( $this->getRequestVar('objectid1') );
+ $o->setOrderId( 1 );
+
+ $ids = $this->folder->getObjectIds();
+ $seq = 1;
+
+ foreach( $ids as $id )
+ {
+ if ( $id != $this->getRequestVar('objectid1') )
+ {
+ $seq++; // Sequenz um 1 erhoehen
+
+ $o = new Object( $id );
+ $o->setOrderId( $seq );
+
+ unset( $o ); // Selfmade Garbage Collection :-)
+ }
+ }
+
+ // Ordner anzeigen
+ $this->callSubAction('show');
+
+ }
+
+
+ function setbottom()
+ {
+ $ids = $this->folder->getObjectIds();
+ $seq = 0;
+
+ foreach( $ids as $id )
+ {
+ if ( $id != $this->getRequestVar('objectid1') )
+ {
+ $seq++; // Sequenz um 1 erhoehen
+
+ $o = new Object( $id );
+ $o->setOrderId( $seq );
+
+ unset( $o ); // Selfmade Garbage Collection :-)
+ }
+ }
+
+ $seq++; // Sequenz um 1 erhoehen
+ $o = new Object( $this->getRequestVar('objectid1') );
+ $o->setOrderId( $seq );
+
+
+ // Ordner anzeigen
+ $this->callSubAction('show');
+
+ }
+
+
+ function move()
+ {
+ $this->objectMove();
+
+ $this->callSubAction('show');
+ }
+
+
+ function addACL()
+ {
+ $this->objectAddACL();
+
+ $this->callSubAction('rights');
+ }
+
+
+ function delACL()
+ {
+ $this->objectDelACL();
+
+ $this->callSubAction('rights');
+ }
+
+
+ function create()
+ {
+
+ if ( $this->folder->hasRight('create_page') )
+ $this->setTemplateVar('templates',Template::getAll());
+
+ $this->setTemplateVar('create_folder',$this->folder->hasRight('create_folder'));
+ $this->setTemplateVar('create_file' ,$this->folder->hasRight('create_file') );
+ $this->setTemplateVar('create_link' ,$this->folder->hasRight('create_link') );
+ $this->setTemplateVar('create_page' ,$this->folder->hasRight('create_page') );
+
+ $this->forward('folder_new');
+
+ }
+
+
+
+ function show()
+ {
+ global $conf_php;
+
+ if ( ! $this->folder->isRoot )
+ $this->setTemplateVar('up_url',Html::url(array('action'=>'main','callAction'=>'folder','callSubaction'=>'show','objectid'=>$this->folder->parentid)));
+
+ $list = array();
+ $last_objectid = 0;
+
+ // Schleife ueber alle Objekte in diesem Ordner
+ foreach( $this->folder->getObjectIds() as $id )
+ {
+ $o = new Object( $id );
+
+ if ( $o->hasRight('read') )
+ {
+ $o->objectLoad();
+ $list[$id]['name'] = Text::maxLaenge( 30,$o->name );
+ $list[$id]['filename'] = Text::maxLaenge( 20,$o->filename );
+ $list[$id]['desc'] = Text::maxLaenge( 30,$o->desc );
+
+ $list[$id]['type'] = $o->getType();
+
+ $list[$id]['icon'] = $o->getType();
+
+ if ( $o->getType() == 'file' )
+ {
+ $file = new File( $id );
+ $file->load();
+ if ( substr($file->mimeType(),0,6) == 'image/' )
+ $list[$id]['icon'] = 'image';
+// if ( substr($file->mimeType(),0,5) == 'text/' )
+// $list[$id]['icon'] = 'text';
+ }
+
+ $list[$id]['url' ] = Html::url(array('action' =>'main',
+ 'callAction'=>$o->getType(),
+ 'objectid' =>$id));
+ $list[$id]['propurl' ] = Html::url(array('action'=>$o->getType(),
+ 'subaction'=>'prop',
+ 'objectid'=>$id));
+ $list[$id]['date'] = date( lang('DATE_FORMAT'),$o->lastchange_date );
+ $list[$id]['user'] = User::getUserName( $o->lastchange_userid );
+
+ if ( $last_objectid != 0 )
+ {
+ $list[$id ]['upurl' ] = Html::url(array('action' =>'folder',
+ 'subaction'=>'changesequence',
+ 'objectid1'=>$id,
+ 'objectid2'=>$last_objectid));
+ $list[$last_objectid]['downurl' ] = $list[$id]['upurl'];
+ $list[$last_objectid]['bottomurl'] = Html::url(array('action' =>'folder',
+ 'subaction'=>'setbottom',
+ 'objectid1'=>$last_objectid));
+ $list[$id ]['topurl' ] = Html::url(array('action' =>'folder',
+ 'subaction'=>'settop',
+ 'objectid1'=>$id));
+ }
+
+ $last_objectid = $id;
+ }
+ }
+ $this->setTemplateVar('object',$list);
+
+ $this->forward('folder_show');
+
+ }
+
+
+ function prop()
+ {
+ $this->setTemplateVars( $this->folder->getProperties() );
+
+ // Alle Ordner ermitteln
+ $this->setTemplateVar('act_objectid',$this->folder->objectid);
+
+ $list = array();
+ $allsubfolders = $this->folder->getAllSubFolderIds();
+
+ foreach( $this->folder->getOtherFolders() as $id )
+ {
+ $f = new Folder( $id );
+ if ( ! in_array($id,$allsubfolders) )
+ $list[$id] = implode( ' » ',$f->parentObjectNames(true,true) );
+ }
+ asort( $list );
+ $this->setTemplateVar('folder',$list);
+
+ // Wenn Ordner leer ist, dann L?schen erm?glichen
+ if ( count($this->folder->getObjectIds()) == 0 )
+ $this->setTemplateVar('delete',true );
+ else $this->setTemplateVar('delete',false);
+
+ $this->forward('folder_prop');
+ }
+
+
+ function rights()
+ {
+ global $SESS;
+ global $conf_php;
+ if ($SESS['user']['is_admin'] != '1') die('nice try');
+
+ $acllist = array();
+ foreach( $this->folder->getAllInheritedAclIds() as $aclid )
+ {
+ $acl = new Acl( $aclid );
+ $acl->load();
+ $key = 'au'.$acl->username.'g'.$acl->groupname.'a'.$aclid;
+ $acllist[$key] = $acl->getProperties();
+ }
+
+// $this->setTemplateVar('inherited_acls',$acllist );
+// $acllist = array();
+
+ foreach( $this->folder->getAllAclIds() as $aclid )
+ {
+ $acl = new Acl( $aclid );
+ $acl->load();
+ $key = 'bu'.$acl->username.'g'.$acl->groupname.'a'.$aclid;
+ $acllist[$key] = $acl->getProperties();
+ $acllist[$key]['delete_url'] = Html::url(array('subaction'=>'delACL','aclid'=>$aclid));
+ }
+ ksort( $acllist );
+
+ $this->setTemplateVar('acls',$acllist );
+
+ $this->setTemplateVar('users' ,User::listAll() );
+ $this->setTemplateVar('groups' ,Group::getAll() );
+
+ $languages = Language::getAll();
+ $languages[0] = lang('ALL_LANGUAGES');
+ $this->setTemplateVar('languages',$languages);
+
+ $this->forward('folder_rights');
+ }
+
+
+ function pub()
+ {
+ if ( $this->getRequestVar('go') == '1' )
+ {
+ if ( $this->getRequestVar('subdirs') == '1' )
+ $subdirs = true;
+ else $subdirs = false;
+
+ $publish = new Publish();
+
+ $this->folder->publish = &$publish;
+ $this->folder->publish( $subdirs );
+
+ $list = array();
+
+ foreach( $publish->publishedObjects as $o )
+ {
+ $list[] = $o['filename'];
+ }
+ $this->setTemplateVar('filenames',$list);
+
+ $this->forward('publish');
+ }
+ else
+ {
+ $this->forward('folder_pub');
+ }
+ }
}
\ No newline at end of file
diff --git a/themes/default/pages/html/folder/show.tpl.php b/themes/default/pages/html/folder/show.tpl.php
@@ -4,18 +4,18 @@
<center>
<?php $table_title_text = lang('FOLDER');
- $table_title_colspan = 5;
+ $table_title_colspan = 7;
include( $tpl_dir.'table_open.tpl.php');
?>
<tr>
-<td colspan="5" class="help"><?php echo lang('HELP_FOLDER') ?></td>
+<td colspan="7" class="help"><?php echo lang('HELP_FOLDER') ?></td>
</tr>
<?php if ( isset($up_url) )
{ ?>
<tr>
-<td width="50%" colspan="5" class="<?php if($f1==true) {echo'f1'; } else{echo'f2'; }?>"><a href="<?php echo $up_url ?>" target="cms_main"><img src="<?php echo $image_dir.'icon_folder.png' ?>" align="left" border="0"><strong>..</strong></a></td>
+<td width="50%" colspan="7" class="<?php if($f1==true) {echo'f1'; } else{echo'f2'; }?>"><a href="<?php echo $up_url ?>" target="cms_main"><img src="<?php echo $image_dir.'icon_folder.png' ?>" align="left" border="0"><strong>..</strong></a></td>
<!--<td width="50%" colspan="3" class="<?php if($f1==true) {echo'f1';$f1=false;} else{echo'f2';$f1=true;}?>"> </td>-->
</tr>
<?php }
@@ -26,7 +26,7 @@
<tr>
<td width="40%" class="help" ><?php echo lang('name' ) ?></td>
<td width="20%" class="help" ><?php echo lang('lastchange') ?></td>
-<td width="10%" class="help" colspan="2"><?php if (count( $object)>1) echo lang('move') ?></td>
+<td width="10%" class="help" colspan="4"><?php if (count( $object)>1) echo lang('move') ?></td>
<td width="10%" class="help" > </a></td>
</tr>
@@ -37,9 +37,11 @@
?>
<tr>
<td width="40%" class="<?php echo $fx; ?>"><a href="<?php echo $z['url'] ?>" target="cms_main" title="<?php echo $z['desc'] ?>"><img src="<?php echo $image_dir.'icon_'.$z['icon'].'.png' ?>" align="left" border="0"><?php echo $z['name'] ?></a> </td>
-<td width="20%" class="<?php echo $fx; ?>"><span title="<?php echo lang('USER').': '.$z['user'] ?>"><?php echo $z['date'] ?></span></td>
-<td width="5%" class="<?php echo $fx; ?>"><?php if (isset($z['upurl' ])) { ?><a href="<?php echo $z['upurl' ] ?>"><img src="<?php echo $image_dir ?>up.gif" title="<?php echo lang('UP' ) ?>" border="0"></a><?php } else echo ' ' ?></td>
-<td width="5%" class="<?php echo $fx; ?>"><?php if (isset($z['downurl'])) { ?><a href="<?php echo $z['downurl'] ?>"><img src="<?php echo $image_dir ?>down.gif" title="<?php echo lang('DOWN') ?>" border="0"></a><?php } else echo ' ' ?></td>
+<td width="18%" class="<?php echo $fx; ?>"><span title="<?php echo lang('USER').': '.$z['user'] ?>"><?php echo $z['date'] ?></span></td>
+<td width="3%" class="<?php echo $fx; ?>"><?php if (isset($z['upurl' ])) { ?><a href="<?php echo $z['upurl' ] ?>"><img src="<?php echo $image_dir ?>up.gif" title="<?php echo lang('UP' ) ?>" border="0"></a><?php } else echo ' ' ?></td>
+<td width="3%" class="<?php echo $fx; ?>"><?php if (isset($z['downurl' ])) { ?><a href="<?php echo $z['downurl' ] ?>"><img src="<?php echo $image_dir ?>down.gif" title="<?php echo lang('DOWN' ) ?>" border="0"></a><?php } else echo ' ' ?></td>
+<td width="3%" class="<?php echo $fx; ?>"><?php if (isset($z['topurl' ])) { ?><a href="<?php echo $z['topurl' ] ?>"><img src="<?php echo $image_dir ?>top.gif" title="<?php echo lang('TOP' ) ?>" border="0"></a><?php } else echo ' ' ?></td>
+<td width="3%" class="<?php echo $fx; ?>"><?php if (isset($z['bottomurl'])) { ?><a href="<?php echo $z['bottomurl'] ?>"><img src="<?php echo $image_dir ?>bottom.gif" title="<?php echo lang('BOTTOM') ?>" border="0"></a><?php } else echo ' ' ?></td>
<td width="10%" class="<?php echo $fx; ?>"><a target="cms_main" href="<?php echo $z['propurl'] ?>"><?php echo lang('PROP') ?></a></td>
</tr>
<?php }