mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 00:54:50 +01:00
Skip spreadsheets shown in other selectbox
This commit is contained in:
parent
5101ac5c03
commit
06626b4cfc
@ -778,7 +778,18 @@ function load_cal(url,id) {
|
||||
if ($GLOBALS['egw_info']['user']['preferences']['calendar']['document_dir'])
|
||||
{
|
||||
$options = '';
|
||||
foreach(calendar_merge::get_documents($GLOBALS['egw_info']['user']['preferences']['calendar']['document_dir']) as $key => $value)
|
||||
$documents = calendar_merge::get_documents($GLOBALS['egw_info']['user']['preferences']['calendar']['document_dir']);
|
||||
|
||||
// Skip spreadsheets that are in the other selectbox
|
||||
$spreadsheets = importexport_admin_prefs_sidebox_hooks::get_spreadsheet_list('calendar');
|
||||
foreach($spreadsheets as $file_info)
|
||||
{
|
||||
if($key = array_search($file_info['name'], $documents))
|
||||
{
|
||||
unset($documents[$key]);
|
||||
}
|
||||
}
|
||||
foreach($documents as $key => $value)
|
||||
{
|
||||
$options .= '<option value="'.$key.'">'.html::htmlspecialchars($value)."</option>\n";
|
||||
}
|
||||
|
@ -159,7 +159,7 @@ class importexport_admin_prefs_sidebox_hooks
|
||||
/**
|
||||
* Get a list of spreadsheets, in the user's preference folder, and / or a system provided template folder
|
||||
*/
|
||||
protected static function get_spreadsheet_list($app) {
|
||||
public static function get_spreadsheet_list($app) {
|
||||
$config = config::read('importexport');
|
||||
$config_dirs = $config['export_spreadsheet_folder'] ? explode(',',$config['export_spreadsheet_folder']) : array('user','stylite');
|
||||
$appname = $_GET['app'] ? $_GET['app'] : $app;
|
||||
|
Loading…
Reference in New Issue
Block a user