mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-21 23:43:17 +01:00
register filemanager as handler for directory mime-type "httpd/unix-directory" (register hooks!)
This commit is contained in:
parent
f62b4784a0
commit
b5adc21ff6
@ -269,4 +269,21 @@ class filemanager_hooks
|
||||
|
||||
$GLOBALS['egw']->framework->render($content, lang('Admin').' - '.lang('Check virtual filesystem'), true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register filemanager as handler for directories
|
||||
*
|
||||
* @return array see egw_link class
|
||||
*/
|
||||
static function search_link()
|
||||
{
|
||||
return array(
|
||||
'mime' => array(
|
||||
egw_vfs::DIR_MIME_TYPE => array(
|
||||
'menuaction' => 'filemanager.filemanager_ui.index',
|
||||
'mime_id' => 'path',
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ $setup_info['filemanager']['hooks']['settings'] = 'filemanager_hooks::settings';
|
||||
$setup_info['filemanager']['hooks']['sidebox_menu'] = 'filemanager_hooks::sidebox_menu';
|
||||
#$setup_info['filemanager']['hooks']['verify_settings'] = 'filemanager.filemanager_hooks.verify_settings';
|
||||
$setup_info['filemanager']['hooks']['admin'] = 'filemanager_hooks::admin';
|
||||
$setup_info['filemanager']['hooks']['search_link'] = 'filemanager_hooks::search_link';
|
||||
|
||||
|
||||
/* Dependencies for this app to work */
|
||||
|
@ -75,9 +75,6 @@
|
||||
* 'mime_url' => 'url',
|
||||
* 'menuaction' => 'app.class.method', // method to call
|
||||
* 'mime_popup' => '400x300', // optional size of popup
|
||||
* 'mime_name' => 'name', // optional name of get-parameter for name-part of path
|
||||
* 'mime_type' => 'type', // ... for mime-type
|
||||
* 'mime_size' => 'size', // ... for size
|
||||
* // other get-parameters to set in url
|
||||
* ),
|
||||
* // further mime types supported ...
|
||||
@ -955,16 +952,6 @@ class egw_link extends solink
|
||||
$popup = $data['mime_popup'];
|
||||
unset($data['mime_popup']);
|
||||
}
|
||||
elseif ($type == egw_vfs::DIR_MIME_TYPE)
|
||||
{
|
||||
if (isset($GLOBALS['egw_info']['user']['apps']['filemanager']))
|
||||
{
|
||||
$data = array(
|
||||
'menuaction' => 'filemanager.filemanager_ui.index',
|
||||
'path' => $path,
|
||||
);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$data = egw_vfs::download_url($path);
|
||||
|
Loading…
Reference in New Issue
Block a user