mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 17:33:49 +01:00
Prevent repeats of default template directory
This commit is contained in:
parent
edba919994
commit
7410c738c8
@ -227,7 +227,12 @@ foreach(array('','addressbook', 'calendar', 'infolog', 'tracker', 'timesheet', '
|
|||||||
if (!$app) continue;
|
if (!$app) continue;
|
||||||
|
|
||||||
// set default preference for app (preserving a maybe already set document-directory)
|
// set default preference for app (preserving a maybe already set document-directory)
|
||||||
if ($prefs->default[$app]['document_dir']) $dir .= ' '.$prefs->default[$app]['document_dir'];
|
if ($prefs->default[$app]['document_dir'])
|
||||||
|
{
|
||||||
|
$existing = explode(' ',$prefs->default[$app]['document_dir']);
|
||||||
|
$existing[] = $dir;
|
||||||
|
$dir = implode(' ', array_unique($existing));
|
||||||
|
}
|
||||||
$prefs->add($app, 'document_dir', $dir, 'default');
|
$prefs->add($app, 'document_dir', $dir, 'default');
|
||||||
}
|
}
|
||||||
$prefs->save_repository(false, 'default');
|
$prefs->save_repository(false, 'default');
|
||||||
|
Loading…
Reference in New Issue
Block a user