From b2e41f9caaaa261dc6cd207f3fb39de0bc780c6f Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Tue, 16 Oct 2018 11:47:47 +0200 Subject: [PATCH] Hide Share action when chwala api version is less than 4 --- plugins/kolab_files/lib/kolab_files_engine.php | 1 + plugins/kolab_files/skins/elastic/templates/files.html | 4 +++- plugins/kolab_files/skins/larry/templates/files.html | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/kolab_files/lib/kolab_files_engine.php b/plugins/kolab_files/lib/kolab_files_engine.php index 63df62a5..18fd4a82 100644 --- a/plugins/kolab_files/lib/kolab_files_engine.php +++ b/plugins/kolab_files/lib/kolab_files_engine.php @@ -143,6 +143,7 @@ class kolab_files_engine $this->rc->output->set_env('files_url', $this->url . '/api/'); $this->rc->output->set_env('files_token', $this->get_api_token()); $this->rc->output->set_env('files_caps', $_SESSION['kolab_files_caps']); + $this->rc->output->set_env('files_api_version', $_SESSION['kolab_files_caps']['API_VERSION'] ?: 3); $this->rc->output->set_env('files_user', $this->rc->get_user_name()); if ($_SESSION['kolab_files_caps']['DOCEDIT']) { diff --git a/plugins/kolab_files/skins/elastic/templates/files.html b/plugins/kolab_files/skins/elastic/templates/files.html index 1af6c7dd..76d8a320 100644 --- a/plugins/kolab_files/skins/elastic/templates/files.html +++ b/plugins/kolab_files/skins/elastic/templates/files.html @@ -133,7 +133,9 @@