diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2019-11-05 15:10:54 +0100 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2019-12-02 08:58:50 +0100 |
commit | f8af02768696ab750e6830048259cd12ba79263e (patch) | |
tree | 9eaa93facfd7c9c3eeccfe43a6209b4e21a28c0c /apps/files_sharing/list.php | |
parent | e98ae45b8311d8d10aba2ec46830de02694f7f88 (diff) | |
download | nextcloud-server-f8af02768696ab750e6830048259cd12ba79263e.tar.gz nextcloud-server-f8af02768696ab750e6830048259cd12ba79263e.zip |
Fix files_sharing app LoadSidebar event
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files_sharing/list.php')
-rw-r--r-- | apps/files_sharing/list.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/apps/files_sharing/list.php b/apps/files_sharing/list.php index 5517c39971f..fdff5d36c76 100644 --- a/apps/files_sharing/list.php +++ b/apps/files_sharing/list.php @@ -19,10 +19,14 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ +use OCA\Files\Event\LoadAdditionalScriptsEvent; +use OCA\Files\Event\LoadSidebar; + // Check if we are a user OCP\User::checkLoggedIn(); $config = \OC::$server->getConfig(); $userSession = \OC::$server->getUserSession(); +$eventDispatcher = \OC::$server->getEventDispatcher(); $showgridview = $config->getUserValue($userSession->getUser()->getUID(), 'files', 'show_grid', false); $isIE = \OCP\Util::isIE(); @@ -32,8 +36,9 @@ $tmpl = new OCP\Template('files_sharing', 'list', ''); // gridview not available for ie $tmpl->assign('showgridview', $showgridview && !$isIE); -OCP\Util::addScript('files_sharing', 'dist/files_sharing'); -OCP\Util::addScript('files_sharing', 'dist/files_sharing_tab'); -\OC::$server->getEventDispatcher()->dispatch('\OCP\Collaboration\Resources::loadAdditionalScripts'); +// fire script events +$eventDispatcher->dispatch('\OCP\Collaboration\Resources::loadAdditionalScripts'); +$eventDispatcher->dispatch(LoadAdditionalScriptsEvent::class, new LoadAdditionalScriptsEvent()); +$eventDispatcher->dispatch(LoadSidebar::class, new LoadSidebar()); $tmpl->printPage(); |