Skip to content

Commit

Permalink
Item14749: fixed unescaped braces
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDaum committed Aug 16, 2018
1 parent f4c3d74 commit 10e057c
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 37 deletions.
14 changes: 7 additions & 7 deletions .gitignore
@@ -1,9 +1,9 @@
*.gz
*.swp
DisqusPlugin.md5
DisqusPlugin.sha1
DisqusPlugin.tgz
DisqusPlugin.txt
DisqusPlugin.zip
DisqusPlugin_installer
DisqusPlugin_installer.pl
/DisqusPlugin.md5
/DisqusPlugin.sha1
/DisqusPlugin.tgz
/DisqusPlugin.txt
/DisqusPlugin.zip
/DisqusPlugin_installer
/DisqusPlugin_installer.pl
11 changes: 5 additions & 6 deletions data/System/DisqusPlugin.txt
@@ -1,6 +1,6 @@
%META:TOPICINFO{author="ProjectContributor" comment="" date="1418732486" format="1.1" version="1"}%
---+!! %TOPIC%
%SHORTDESCRIPTION%
%FORMFIELD{"Description"}%

%TOC%

Expand Down Expand Up @@ -71,18 +71,17 @@ $Foswiki::cfg{Http}{ContentSecurityPolicy}{"connect-src"}= "'self' *.disqus.com"
---++ Change History

%TABLE{columnwidths="7em" tablewidth="100%"}%
| 16 Aug 2018 | fixed some more perl errors |
| 25 Aug 2015 | added docu on content security policy |
| 31 Aug 2015 | ignore discussions in template (_) webs |
| 16 Dec 2014 | make it work with async page loads as per <nop>AngularSkin |
| 5 May 2013 | initial release |
<!--
* Set SHORTDESCRIPTION = %$SHORTDESCRIPTION%
-->

%META:FORM{name="PackageForm"}%
%META:FIELD{name="Author" title="Author" value="Michael Daum"}%
%META:FIELD{name="Copyright" title="Copyright" value="&copy; 2011-2015 Michael Daum http://michaeldaumconsulting.com"}%
%META:FIELD{name="Home" title="Home" value="http://foswiki.org/Extensions/DisqusPlugin"}%
%META:FIELD{name="Copyright" title="Copyright" value="&copy; 2011-2018 Michael Daum http://michaeldaumconsulting.com"}%
%META:FIELD{name="Description" title="Description" value="%25$SHORTDESCRIPTION%25"}%
%META:FIELD{name="Home" title="Home" value="https://foswiki.org/Extensions/DisqusPlugin"}%
%META:FIELD{name="License" title="License" value="[[http://www.gnu.org/licenses/gpl.html][GPL (Gnu General Public License)]]"}%
%META:FIELD{name="Release" title="Release" value="%$RELEASE%"}%
%META:FIELD{name="Repository" title="Repository" value="https://github.com/foswiki/DisqusPlugin"}%
Expand Down
8 changes: 4 additions & 4 deletions lib/Foswiki/Plugins/DisqusPlugin.pm
@@ -1,6 +1,6 @@
# Plugin for Foswiki - The Free and Open Source Wiki, http://foswiki.org/
#
# DisqusPlugin is Copyright (C) 2013-2015 Michael Daum http://michaeldaumconsulting.com
# DisqusPlugin is Copyright (C) 2013-2018 Michael Daum http://michaeldaumconsulting.com
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand All @@ -22,8 +22,8 @@ use Foswiki::Func ();
use Foswiki::Meta ();
use Digest::MD5 ();

our $VERSION = '2.02';
our $RELEASE = '25 Sep 2015';
our $VERSION = '2.01';
our $RELEASE = '16 Aug 2018';
our $SHORTDESCRIPTION = 'Disqus-based commenting system';
our $NO_PREFS_IN_TOPIC = 1;
our $doneDisqusInit = 0;
Expand Down Expand Up @@ -59,7 +59,7 @@ sub beforeSaveHandler {

return if $web =~ /^_/; # don't add IDs for template webs

if ($text =~ /%DISQUS({.*?})?%/ || Foswiki::Func::getPreferencesFlag("DISPLAYCOMMENTS")) {
if ($text =~ /%DISQUS(\{.*?\})?%/ || Foswiki::Func::getPreferencesFlag("DISPLAYCOMMENTS")) {
my $disqusData = $meta->get("DISQUS");
unless (defined $disqusData) {
writeDebug("adding META::DISQUS");
Expand Down
5 changes: 0 additions & 5 deletions lib/Foswiki/Plugins/DisqusPlugin/DEPENDENCIES
@@ -1,5 +0,0 @@
# Dependencies for DisqusPlugin
# Example:
# Time::ParseDate,>=2003.0211,cpan,Required.
# Foswiki::Plugins,>=1.2,perl,Requires version 1.2 of handler API.

1 change: 1 addition & 0 deletions lib/Foswiki/Plugins/DisqusPlugin/MANIFEST
@@ -1,3 +1,4 @@
!noci
data/System/DisqusPlugin.txt 0644
lib/Foswiki/Plugins/DisqusPlugin/Config.spec 0644
lib/Foswiki/Plugins/DisqusPlugin.pm 0644
16 changes: 1 addition & 15 deletions lib/Foswiki/Plugins/DisqusPlugin/build.pl
@@ -1,24 +1,10 @@
#!/usr/bin/perl -w
#!/usr/bin/env perl
BEGIN { unshift @INC, split( /:/, $ENV{FOSWIKI_LIBS} ); }
use Foswiki::Contrib::Build;

# Create the build object
$build = new Foswiki::Contrib::Build('DisqusPlugin');

# (Optional) Set the details of the repository for uploads.
# This can be any web on any accessible Foswiki installation.
# These defaults will be used when expanding tokens in .txt
# files, but be warned, they can be overridden at upload time!

# name of web to upload to
$build->{UPLOADTARGETWEB} = 'Extensions';
# Full URL of pub directory
$build->{UPLOADTARGETPUB} = 'http://foswiki.org/pub';
# Full URL of bin directory
$build->{UPLOADTARGETSCRIPT} = 'http://foswiki.org/bin';
# Script extension
$build->{UPLOADTARGETSUFFIX} = '';

# Build the target on the command line, or the default target
$build->build($build->{target});

0 comments on commit 10e057c

Please sign in to comment.