Skip to content

Commit

Permalink
Item13907: Merge branch 'Release02x01'
Browse files Browse the repository at this point in the history
  • Loading branch information
gac410 committed May 4, 2017
2 parents 5b3dcf5 + dc8f3ac commit 6873fac
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 11 deletions.
13 changes: 7 additions & 6 deletions UpdatesPlugin/data/System/UpdatesPlugin.txt
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" comment="" date="1485184197" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" comment="" date="1493865930" format="1.1" version="1"}%
---+!! %TOPIC%
<img class="foswikiRight" src="%ATTACHURL%/logo.png">
%$SHORTDESCRIPTION%
Expand Down Expand Up @@ -66,6 +66,7 @@ to prevent disclosing them to the outside world.
This plugin was initially developed during a collaborative design and coding session at the 2011 Foswiki Camp.

| Change History: | <!-- versions below in reverse order -->&nbsp; |
| 1.03 (03 May 2017) | Foswikitask:Item13907: Report list of extensions needing update. |
| 1.02 (23 Jan 2017) | Foswikitask:Item14281: Cookie related changes. Inconsistent use of the domain and secure flags. |
| 1.01 (24 Jul 2015) | Foswikitask:Item13555: Compare VERSION not RELEASE strings.<br/>\
Foswikitask:Item13524: Plugin reports "0 extensions need update - too noisy |
Expand All @@ -81,8 +82,8 @@ This plugin was initially developed during a collaborative design and coding ses
%META:FIELD{name="License" title="License" value="[[http://www.gnu.org/licenses/gpl.html][GPL (Gnu General Public License)]]"}%
%META:FIELD{name="Home" title="Home" value="http://foswiki.org/Extensions/%25$ROOTMODULE%25"}%
%META:FIELD{name="Support" title="Support" value="Foswiki:Support/%25$ROOTMODULE%25"}%
%META:FILEATTACHMENT{name="logo.png" attr="h" comment="" date="1485184197" size="53676" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="jquery.updates.js" attr="h" comment="" date="1485184197" size="2322" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="jquery.updates.js.gz" attr="h" comment="" date="1485184197" size="786" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="jquery.updates.uncompressed.js" attr="h" comment="" date="1485184197" size="4313" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="Makefile" attr="h" comment="" date="1485184197" size="127" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="logo.png" attr="h" comment="" date="1493865930" size="53676" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="jquery.updates.js" attr="h" comment="" date="1493865930" size="2322" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="jquery.updates.js.gz" attr="h" comment="" date="1493865930" size="786" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="jquery.updates.uncompressed.js" attr="h" comment="" date="1493865930" size="4313" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="Makefile" attr="h" comment="" date="1493865930" size="127" user="ProjectContributor" version="1"}%
4 changes: 2 additions & 2 deletions UpdatesPlugin/lib/Foswiki/Plugins/UpdatesPlugin.pm
Expand Up @@ -20,8 +20,8 @@ use warnings;

use Foswiki::Func ();

our $VERSION = '1.02';
our $RELEASE = '23 Jan 2017';
our $VERSION = '1.03';
our $RELEASE = '03 May 2017';
our $SHORTDESCRIPTION = 'Checks Foswiki.org for updates';
our $NO_PREFS_IN_TOPIC = 1;
our $core;
Expand Down
Expand Up @@ -6,7 +6,7 @@
# The source URL where to get the latest version of extensions. The URL must point to a page
# that generates a list in the same format as the list generated by
# http://foswiki.org/Extensions/UpdatesPluginReport
$Foswiki::cfg{Plugins}{UpdatesPlugin}{ReportUrl} = "http://foswiki.org/Extensions/UpdatesPluginReport";
$Foswiki::cfg{Plugins}{UpdatesPlugin}{ReportUrl} = "https://foswiki.org/Extensions/UpdatesPluginReport";

# **NUMBER**
# Number of seconds to cache the update report for extensions. Default is 24 hours.
Expand Down
2 changes: 1 addition & 1 deletion UpdatesPlugin/lib/Foswiki/Plugins/UpdatesPlugin/Core.pm
Expand Up @@ -32,7 +32,7 @@ sub new {
session => $session,
debug => 0,
reportUrl => $Foswiki::cfg{Plugins}{UpdatesPlugin}{ReportUrl}
|| "http://foswiki.org/Extensions/UpdatesPluginReport",
|| "https://foswiki.org/Extensions/UpdatesPluginReport",
timeout => $Foswiki::cfg{Plugins}{UpdatesPlugin}{CacheTimeout},
exclude => $Foswiki::cfg{Plugins}{UpdatesPlugin}{ExcludeExtensions}
|| '',
Expand Down
Expand Up @@ -110,6 +110,7 @@
success: function(data, status, xhr) {
//console.log("success: data=",data);
self.numberOutdatedPlugins = data.length;
self.pluginList = data.sort();
// remember findings: sets cookie to the number of outdated plugins. setting it to
// zero explicitly can either mean: everything up-to-date or ignore pending updates
$.cookie(self.options.cookieName, self.numberOutdatedPlugins, {
Expand Down Expand Up @@ -151,6 +152,7 @@
// ... and add a new one
elem = $("#foswikiUpdatesTmpl").render([{
nrPlugins:self.numberOutdatedPlugins,
pluginList:self.pluginList,
cookieExpires:self.options.cookieExpires,
configureUrl:self.options.configureUrl
}]);
Expand Down
4 changes: 3 additions & 1 deletion UpdatesPlugin/templates/updatesplugin.tmpl
Expand Up @@ -3,12 +3,14 @@
%JQICON{"error"}%
%TMPL:P{"messagetmpl::text"}%
<a href="%SCRIPTURLPATH{configure}%">%JQICON{"tick"}% %MAKETEXT{"Upgrade"}%</a>
<a href="#" id="foswikiUpdatesIgnore">%JQICON{"cross"}% %MAKETEXT{"Ignore for 7 days"}%</a>
<a href="#" id="foswikiUpdatesIgnore">%JQICON{"cross"}% %MAKETEXT{"Ignore for 7 days"}%</a><br/>
%TMPL:P{"messagetmpl::list"}%
%CLEAR%
</div>
</script>%TMPL:END%

%TMPL:DEF{"messagetmpl::text"}%%MAKETEXT{"Warning: Updates found for [_1] extension(s)." args="{{:nrPlugins}}"}%%TMPL:END%
%TMPL:DEF{"messagetmpl::list"}%({{:pluginList}})%TMPL:END%

%TMPL:DEF{"css"}%<style type="text/css">
.foswikiBroadcastMessage.foswikiUpdatesMessage {
Expand Down

0 comments on commit 6873fac

Please sign in to comment.