From 976f1df8a3b76006e6e9983c0c63ac4fce6a66f1 Mon Sep 17 00:00:00 2001 From: bergware Date: Wed, 30 Mar 2016 00:46:20 +0200 Subject: [PATCH] Make direct link to plugin update optional in notice Allows for direct download or redirect to plugin manager --- plugins/dynamix/include/DefaultPageLayout.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/dynamix/include/DefaultPageLayout.php b/plugins/dynamix/include/DefaultPageLayout.php index f84702f63..0f3044ae4 100644 --- a/plugins/dynamix/include/DefaultPageLayout.php +++ b/plugins/dynamix/include/DefaultPageLayout.php @@ -149,8 +149,11 @@ function showFooter(data, id) { $('#copyright').prepend(data); } function showNotice(data,plugin) { - var cmd ="openBox('/plugins/dynamix.plugin.manager/scripts/plugin&arg1=update&arg2="+plugin+".plg','Update Plugin',600,900,true)"; - $('#user-notice').html(data.replace(/(.*?)<\/a>/,"$1")); + if (plugin) + var href = "href=\"#\" onclick=\"openBox('/plugins/dynamix.plugin.manager/scripts/plugin&arg1=update&arg2="+plugin+".plg','Update Plugin',600,900,true)\""; + else + var href = "href=\"/Plugins\""; + $('#user-notice').html(data.replace(/(.*?)<\/a>/,"$1")); if (timers.countDown) {clearTimeout(timers.countDown);$('#countdown').html('');} } function notifier() {