Thread: [Phpcms-plugins-cvs] admin4phpCMS/modules/filemanager class.module_filemanager.php,1.3,1.4 config.fi
Brought to you by:
mjahn
From: Martin J. <mj...@us...> - 2004-07-24 08:58:35
|
Update of /cvsroot/phpcms-plugins/admin4phpCMS/modules/filemanager In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24990/modules/filemanager Modified Files: class.module_filemanager.php config.filemanager.php class.file_util.php Log Message: changed some things Index: class.module_filemanager.php =================================================================== RCS file: /cvsroot/phpcms-plugins/admin4phpCMS/modules/filemanager/class.module_filemanager.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- class.module_filemanager.php 18 Jun 2004 15:17:00 -0000 1.3 +++ class.module_filemanager.php 24 Jul 2004 08:58:25 -0000 1.4 @@ -2,8 +2,6 @@ /** * The filemanager-module * -* This module is based on the package PEAR::LiveUser. -* * <b>License</b> * * This program is free software; you can redistribute it and/or modify @@ -30,6 +28,9 @@ /* * $Log$ +* Revision 1.4 2004/07/24 08:58:25 mjahn +* changed some things +* * Revision 1.3 2004/06/18 15:17:00 mjahn * module filemanager and editor included * @@ -146,6 +147,9 @@ function getMenuMain (&$actiondata) { $root = $actiondata['_root']; $actiondata = array ('_type'=>'menu_main_entry', '_root'=>$root, 'name'=>'Dateimanager', 'module'=>'filemanager', '_id'=>'filemanager', '_root'=>'mainmenu'); + if ($this->display) { + $actiondata ['extra'] = 'class="active"'; + } $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata); } @@ -244,22 +248,19 @@ $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); $actiondata = array ('_type'=>'filelist_entry', '_id'=>'list-0', '_root'=>'filelist', - 'extra'=>'class="header"', 'filesize'=>'Größe', 'filemtime'=>'Letzte Änderung', - 'chmod'=>'CHMOD', 'gid'=>'GID', 'uid'=>'UID'); + 'extra'=>'class="header"', 'filesize'=>'Größe', 'filemtime'=>'Letzte Änderung', 'chmod'=>'CHMOD', 'gid'=>'GID', 'uid'=>'UID'); $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); $actiondata = array ('_root'=>'list-0', '_id'=>'list-img-0', '_type'=>'image', - 'src'=>'modules/layout/img/empty.gif', - 'width'=>'16', 'height'=>'16', 'title'=>'', 'alt'=>'', - 'extra'=>'class="input""'); + 'src'=>'modules/layout/img/empty.gif', 'width'=>'16', 'height'=>'16', 'title'=>'', 'alt'=>'', 'extra'=>'class="input"'); $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); $actiondata = array ('_root'=>'list-0', '_id'=>'list-img-1', '_type'=>'image', 'src'=>'modules/layout/img/empty.gif', - 'width'=>'16', 'height'=>'16', 'title'=>'', 'alt'=>'', 'extra'=>'class="input""'); + 'width'=>'16', 'height'=>'16', 'title'=>'', 'alt'=>'', 'extra'=>'class="icon"'); $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); $actiondata = array ('_root'=>'list-0', '_id'=>'list-img-2', '_type'=>'image', 'src'=>'modules/layout/img/empty.gif', - 'width'=>'16', 'height'=>'16', 'title'=>'', 'alt'=>'', 'extra'=>'class="input"'); + 'width'=>'16', 'height'=>'16', 'title'=>'', 'alt'=>'', 'extra'=>'class="icon"'); $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); // set filename @@ -408,24 +409,21 @@ } } $actiondata = array ('_type'=>'filelist_entry', '_id'=>'list1', '_root'=>'filelist', - 'extra'=>'class="header"', 'filename'=>$num_dirs.' Verzeichnisse', 'filesize'=>$sum_size, 'filemtime'=>$num_files.' Dateien', + 'extra'=>'class="header"', 'filename'=>$num_dirs.' Verzeichnisse', 'filesize'=>file_util::filesize ($sum_size), 'filemtime'=>$num_files.' Dateien', 'chmod'=>'', 'gid'=>'', ''=>'UID'); $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); $actiondata = array ('_root'=>'list1', '_id'=>'list-img0', '_type'=>'image', - 'src'=>'modules/layout/img/empty.gif', - 'width'=>'16', 'height'=>'16', 'title'=>'', 'alt'=>'', - 'extra'=>'class="input"'); + 'src'=>'modules/layout/img/empty.gif', 'width'=>'16', 'height'=>'16', 'title'=>'', 'alt'=>'', 'extra'=>'class="input"'); $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); $actiondata = array ('_root'=>'list1', '_id'=>'list-img1', '_type'=>'image', - 'src'=>'modules/layout/img/empty.gif', - 'width'=>'16', 'height'=>'16', 'title'=>'', 'alt'=>''); + 'src'=>'modules/layout/img/empty.gif', 'width'=>'16', 'height'=>'16', 'title'=>'', 'alt'=>'', 'extra'=>'class="icon"'); $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); $actiondata = array ('_root'=>'list1', '_id'=>'list-img2', '_type'=>'image', - 'src'=>'modules/layout/img/empty.gif', - 'width'=>'16', 'height'=>'16', 'title'=>'', 'alt'=>''); + 'src'=>'modules/layout/img/empty.gif', 'width'=>'16', 'height'=>'16', 'title'=>'', 'alt'=>'', 'extra'=>'class="icon""'); + $this->_callEvent ('LAYOUT_ADD_ELEMENT', $actiondata); // set filename Index: class.file_util.php =================================================================== RCS file: /cvsroot/phpcms-plugins/admin4phpCMS/modules/filemanager/class.file_util.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- class.file_util.php 18 Jun 2004 15:17:00 -0000 1.1 +++ class.file_util.php 24 Jul 2004 08:58:25 -0000 1.2 @@ -1,5 +1,43 @@ <?php +/** +* Utility-class for filemanager-module +* +* <b>License</b> +* +* 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 +* +* @author Martin Jahn <mj...@us...> +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* @copyright Copyright (c) 2004, Martin Jahn +* @version $Id$ +* @package admin4phpCMS +* @subpackage module_filemanager +**/ +/* +* $Log$ +* Revision 1.2 2004/07/24 08:58:25 mjahn +* changed some things +* +*/ +/** +* Utility-class for administrative work in the filesystem +* +* @package admin4phpCMS +* @subpackage module_filemanager +**/ class file_util { function fileperms($filepath) { @@ -10,10 +48,15 @@ } function filesize($file) { - if (!file_exists($file)) { - return ''; + if (is_int ($file)) { + $size = $file; + } elseif (is_dir ($file) || is_file ($file)) { + if (!file_exists ($file)) { + return ''; + } + $size = filesize ($file); + } else { } - $size = filesize($file); $factor = 0; while ($size > 1024) { $factor++; Index: config.filemanager.php =================================================================== RCS file: /cvsroot/phpcms-plugins/admin4phpCMS/modules/filemanager/config.filemanager.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- config.filemanager.php 18 Jun 2004 15:17:01 -0000 1.1 +++ config.filemanager.php 24 Jul 2004 08:58:25 -0000 1.2 @@ -1,5 +1,46 @@ <?php -/* $Id$ */ +/** +* Configuration of the filemanager-module +* +* <b>License</b> +* +* 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 +* +* @author Martin Jahn <mj...@us...> +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* @copyright Copyright (c) 2004, Martin Jahn +* @version $Id$ +* @package admin4phpCMS +* @subpackage module_filemanager +**/ + +/* +* $Log$ +* Revision 1.2 2004/07/24 08:58:25 mjahn +* changed some things +* +*/ + +/** +* Configuration of the filemanager-class +* +* @package admin4phpCMS +* @subpackage module_filemanager +**/ + + /* +----------------------------------------------------------------------+ | phpCMS Content Management System - Version 1.2.0 Beta |