From 0582f2347fc1ce7d00f0367fe668b8cc3a6d3972 Mon Sep 17 00:00:00 2001 From: nathangray Date: Wed, 6 Jun 2018 09:54:49 -0600 Subject: [PATCH] Fix a few issues from Scrutinizer - Remove debug code - Remove some unused variables - Add get_ui() to base class that gives error message (should always be a subclass) --- api/js/jsapi/app_base.js | 1 - api/src/Link/Sharing.php | 4 ++-- api/src/Sharing.php | 9 +++++++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/api/js/jsapi/app_base.js b/api/js/jsapi/app_base.js index c3c415d497..e6195d958c 100644 --- a/api/js/jsapi/app_base.js +++ b/api/js/jsapi/app_base.js @@ -1915,7 +1915,6 @@ var AppJS = (function(){ "use strict"; return Class.extend( */ _share_link_callback: function(_data) { if (_data.msg || _data.share_link) window.egw_refresh(_data.msg, this.appname); - console.log("_data", _data); var copy_link_to_clipboard = null; diff --git a/api/src/Link/Sharing.php b/api/src/Link/Sharing.php index 2db7fe7f8f..6bcd6aab90 100644 --- a/api/src/Link/Sharing.php +++ b/api/src/Link/Sharing.php @@ -43,7 +43,7 @@ class Sharing extends \EGroupware\Api\Sharing if($success) { static::setup_entry($share); - return static::login($share); + return static::login($keep_session, $share); } return ''; } @@ -59,7 +59,7 @@ class Sharing extends \EGroupware\Api\Sharing */ protected function after_login() { - list($app, $id) = explode('::', $this->share['share_path']); + list($app) = explode('::', $this->share['share_path']); // allow app (gets overwritten by session::create) $GLOBALS['egw_info']['flags']['currentapp'] = $app; diff --git a/api/src/Sharing.php b/api/src/Sharing.php index 354f04c5fd..b29bb772b9 100644 --- a/api/src/Sharing.php +++ b/api/src/Sharing.php @@ -440,6 +440,15 @@ class Sharing return $this->get_ui(); } + /** + * Get the user interface for this share + * + */ + public function get_ui() + { + echo 'Error: missing subclass'; + } + /** * Generate a new token *