allow extra_info to process buttons, by passing it the content array

This commit is contained in:
Ralf Becker 2010-04-22 17:38:01 +00:00
parent 690e62317f
commit 7e8c37c015
2 changed files with 11 additions and 7 deletions

View File

@ -5,7 +5,7 @@
* @link http://www.egroupware.org
* @package filemanager
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @copyright (c) 2008-9 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @copyright (c) 2008-10 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @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'];

View File

@ -7,7 +7,7 @@
* @package api
* @subpackage vfs
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @copyright (c) 2008-9 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @copyright (c) 2008-10 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @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));
}
/**