register filemanager as handler for directory mime-type "httpd/unix-directory" (register hooks!)

This commit is contained in:
Ralf Becker 2012-03-21 10:28:48 +00:00
parent f62b4784a0
commit b5adc21ff6
3 changed files with 18 additions and 13 deletions

View File

@ -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',
),
),
);
}
}

View File

@ -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 */

View File

@ -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);