remove number of links in settings config, as we have favorites now

This commit is contained in:
Ralf Becker 2016-04-25 10:58:05 +00:00
parent 89aa3cc1f5
commit d890d1324f
2 changed files with 3 additions and 62 deletions

View File

@ -15,7 +15,6 @@
class filemanager_hooks
{
static $appname = 'filemanager';
static $foldercount = 1;
/**
* Data for Filemanagers sidebox menu
@ -32,8 +31,6 @@ class filemanager_hooks
$basepath = '/home';
$homepath = '/home/'.$GLOBALS['egw_info']['user']['account_lid'];
//echo "<p>admin_prefs_sidebox_hooks::all_hooks(".print_r($args,True).") appname='$appname', location='$location'</p>\n";
$config = config::read(self::$appname);
if (!empty($config['max_folderlinks'])) self::$foldercount = (int)$config['max_folderlinks'];
$file_prefs = &$GLOBALS['egw_info']['user']['preferences'][self::$appname];
if ($location == 'sidebox_menu')
{
@ -75,19 +72,9 @@ class filemanager_hooks
{
$file['Basedirectory'] = egw::link('/index.php',array('menuaction'=>self::$appname.'.filemanager_ui.index','path'=>$rootpath,'ajax'=>'true'));
}
if (!empty($file_prefs['startfolder'])) $file['Startfolder']= egw::link('/index.php',array('menuaction'=>self::$appname.'.filemanager_ui.index','path'=>$file_prefs['startfolder'],'ajax'=>'true'));
for ($i=1; $i<=self::$foldercount; $i++)
if (!empty($file_prefs['startfolder']))
{
if (!empty($file_prefs['folderlink'.$i]))
{
$foldername = array_pop(explode('/',$file_prefs['folderlink'.$i]));
$file[lang('Link %1: %2',$i,$foldername)]= egw::link('/index.php',array(
'menuaction' => self::$appname.'.filemanager_ui.index',
'path' => $file_prefs['folderlink'.$i],
'nolang' => true,
'ajax' => 'true'
));
}
$file['Startfolder']= egw::link('/index.php',array('menuaction'=>self::$appname.'.filemanager_ui.index','path'=>$file_prefs['startfolder'],'ajax'=>'true'));
}
$file['Placeholders'] = egw::link('/index.php','menuaction=filemanager.filemanager_merge.show_replacements');
$file['Shared files'] = egw::link('/index.php','menuaction=filemanager.filemanager_shares.index&ajax=true');
@ -106,7 +93,7 @@ class filemanager_hooks
if (is_array($location)) $location = $location['location'];
$file = Array(
'Site Configuration' => egw::link('/index.php','menuaction=admin.uiconfig.index&appname='.self::$appname),
//'Site Configuration' => egw::link('/index.php','menuaction=admin.admin_config.index&appname='.self::$appname.'&ajax=true'),
'Custom fields' => egw::link('/index.php','menuaction=admin.customfields.index&appname='.self::$appname.'&ajax=true'),
'Check virtual filesystem' => egw::link('/index.php','menuaction=filemanager.filemanager_admin.fsck'),
'VFS mounts and versioning' => egw::link('/index.php', 'menuaction=filemanager.filemanager_admin.index'),
@ -147,19 +134,6 @@ class filemanager_hooks
'admin' => False,
),
);
for ($i=1; $i <= self::$foldercount; $i++)
{
$settings['folderlink'.$i] = array(
'type' => 'input',
'name' => 'folderlink'.$i,
'size' => 60,
'default' => '',
'label' => lang('Enter the complete VFS path to specify a fast access link to a folder').' ('.$i.').',
'run_lang' => -1, // -1 = no lang on label
'xmlrpc' => True,
'admin' => False
);
}
$settings += array(
'showbase' => array(

View File

@ -1,33 +0,0 @@
<!-- BEGIN header -->
<form method="POST" action="{action_url}">
{hidden_vars}
<table border="0" align="center">
<tr class="th">
<td colspan="2"><font color="{th_text}">&nbsp;<b>{title}</b></font></td>
</tr>
<tr>
<td colspan="2">&nbsp;<i><font color="red">{error}</i></font></td>
</tr>
<!-- END header -->
<!-- BEGIN body -->
<tr class="th">
<td colspan="2">&nbsp;<b>{lang_filemanager_configuration}</b></td>
</tr>
<tr class="row_on">
<td>&nbsp;{lang_max_folderlinks}:</td>
<td><input name="newsettings[max_folderlinks]" value="{value_max_folderlinks}" size="2"></td>
</tr>
<tr class="row_off">
<td colspan="2">&nbsp;{lang_allow_a_maximum_of_the_above_configured_folderlinks_to_be_configured_in_settings}</td>
</tr>
<!-- END body -->
<!-- BEGIN footer -->
<tr valign="bottom" style="height: 30px;">
<td colspan="2" align="center">
<input type="submit" name="submit" value="{lang_submit}">
<input type="submit" name="cancel" value="{lang_cancel}">
</td>
</tr>
</table>
</form>
<!-- END footer -->