From 6d51130cc6bbfab859d86f37f98b67e4331ddae6 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Mon, 20 Nov 2017 17:01:50 +0100 Subject: [PATCH] Make favorites available as an individual button in VfsSelect dialog --- api/src/Etemplate/Widget/Vfs.php | 4 ++-- api/templates/default/vfsSelectUI.xet | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/api/src/Etemplate/Widget/Vfs.php b/api/src/Etemplate/Widget/Vfs.php index eb90c6084c..a7b33bd65e 100644 --- a/api/src/Etemplate/Widget/Vfs.php +++ b/api/src/Etemplate/Widget/Vfs.php @@ -518,6 +518,7 @@ class Vfs extends File 'createdir' => !\EGroupware\Api\Vfs::is_writable($content['path']), 'upload_file' => !\EGroupware\Api\Vfs::is_writable($content['path']) || !in_array($content['mode'],array('open', 'open-multiple')), + 'favorites' => !isset($GLOBALS['egw_info']['apps']['stylite']) )); $sel_options = array_merge($sel_options, array( @@ -651,8 +652,7 @@ class Vfs extends File */ static function get_apps() { - $apps = array(false); // index starting from 1 - if (isset($GLOBALS['egw_info']['apps']['stylite'])) $apps = array('favorites' => lang('Favorites')); + $apps = array(); $apps += \EGroupware\Api\Link::app_list('query'); // they do NOT support adding files to VFS unset($apps['addressbook-email'], $apps['mydms'], $apps['wiki'], diff --git a/api/templates/default/vfsSelectUI.xet b/api/templates/default/vfsSelectUI.xet index e2a89ff67a..f201f0d325 100644 --- a/api/templates/default/vfsSelectUI.xet +++ b/api/templates/default/vfsSelectUI.xet @@ -15,6 +15,7 @@ +