From 7e8c37c01562688bc1da80b469d6213ed3d06681 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 22 Apr 2010 17:38:01 +0000 Subject: [PATCH] allow extra_info to process buttons, by passing it the content array --- filemanager/inc/class.filemanager_ui.inc.php | 11 +++++++---- phpgwapi/inc/class.egw_vfs.inc.php | 7 ++++--- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/filemanager/inc/class.filemanager_ui.inc.php b/filemanager/inc/class.filemanager_ui.inc.php index b3ed37beb7..3497c25694 100644 --- a/filemanager/inc/class.filemanager_ui.inc.php +++ b/filemanager/inc/class.filemanager_ui.inc.php @@ -5,7 +5,7 @@ * @link http://www.egroupware.org * @package filemanager * @author Ralf Becker - * @copyright (c) 2008-9 by Ralf Becker + * @copyright (c) 2008-10 by Ralf Becker * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License * @version $Id$ */ @@ -633,9 +633,13 @@ class filemanager_ui if (!is_array($content)) { + if (isset($_GET['msg'])) + { + $msg .= $_GET['msg']; + } if (!($path = $_GET['path']) || !($stat = egw_vfs::lstat($path))) { - $content['msg'] = lang('File or directory not found!'); + $msg .= lang('File or directory not found!'); } else { @@ -921,9 +925,8 @@ class filemanager_ui 'align' => 'right', )); } - if (($extra_tab = egw_vfs::getExtraInfo($path))) + if (($extra_tab = egw_vfs::getExtraInfo($path,$content))) { - //_debug_array($extra_tab); $tabs =& $tpl->get_widget_by_name('tabs=general|perms|eacl|preview|custom'); $tabs['name'] .= '|'.$extra_tab['name']; $tabs['label'] .= '|'.$extra_tab['label']; diff --git a/phpgwapi/inc/class.egw_vfs.inc.php b/phpgwapi/inc/class.egw_vfs.inc.php index 18d2521072..d37828551b 100644 --- a/phpgwapi/inc/class.egw_vfs.inc.php +++ b/phpgwapi/inc/class.egw_vfs.inc.php @@ -7,7 +7,7 @@ * @package api * @subpackage vfs * @author Ralf Becker - * @copyright (c) 2008-9 by Ralf Becker + * @copyright (c) 2008-10 by Ralf Becker * @version $Id$ */ @@ -1333,11 +1333,12 @@ class egw_vfs extends vfs_stream_wrapper * Get backend specific information (data and etemplate), to integrate as tab in filemanagers settings dialog * * @param string $path + * @param array $content=null * @return array|boolean array with values for keys 'data','etemplate','name','label','help' or false if not supported by backend */ - static function getExtraInfo($path) + static function getExtraInfo($path,array $content=null) { - return self::_call_on_backend('extra_info',array($path)); + return self::_call_on_backend('extra_info',array($path,$content)); } /**