Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Item14271: adjust to latest api changes
...  in DBCachePlugin
  • Loading branch information
MichaelDaum committed Jan 16, 2017
1 parent 4fb5ad6 commit c0f21e5
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion bin/rtf
Expand Up @@ -2,7 +2,7 @@
#
# Foswiki Enterprise Collaboration Platform, http://foswiki.org/
#
# Copyright (C) 2007-2016 Michael Daum http://michaeldaumconsulting.com
# Copyright (C) 2007-2017 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 Down
3 changes: 2 additions & 1 deletion data/System/RtfContrib.txt
Expand Up @@ -56,13 +56,14 @@ generate while translating Foswiki markup to RTF.
%$DEPENDENCIES%

---++ Change History
| 16 Jan 2017: | adjustments due to latest api changes in <nop>DBCachePlugin |
| 09 Sep 2016: | added missing Config.spec file |
| 29 Aug 2014: | fully specify rest security |
| 12 Feb 2010: | language support in RTF templates |

%META:FORM{name="PackageForm"}%
%META:FIELD{name="Author" title="Author" value="Foswiki:Main/MichaelDaum"}%
%META:FIELD{name="Copyright" title="Copyright" value="&copy; 2007-2016 Michael Daum http://michaeldaumconsulting.com"}%
%META:FIELD{name="Copyright" title="Copyright" value="&copy; 2007-2017 Michael Daum http://michaeldaumconsulting.com"}%
%META:FIELD{name="Description" title="Description" value="%25$SHORTDESCRIPTION%25"}%
%META:FIELD{name="Home" title="Home" value="Foswiki:Extensions/RtfContrib"}%
%META:FIELD{name="License" title="License" value="[[http://www.gnu.org/licenses/gpl.html][GPL (Gnu General Public License)]]"}%
Expand Down
6 changes: 3 additions & 3 deletions lib/Foswiki/Contrib/RtfContrib.pm
@@ -1,6 +1,6 @@
# Plugin for Foswiki Collaboration Platform, http://foswiki.org/
#
# Copyright (C) 2007-2016 MichaelDaum http://michaeldaumconsulting.com
# Copyright (C) 2007-2017 MichaelDaum 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 @@ -16,8 +16,8 @@ package Foswiki::Contrib::RtfContrib;
use strict;
use warnings;

our $VERSION = '2.11';
our $RELEASE = '09 Sep 2016';
our $VERSION = '2.12';
our $RELEASE = '16 Jan 2017';
our $SHORTDESCRIPTION = 'Extension to translate Foswiki markup to RTF';

################################################################################
Expand Down
8 changes: 4 additions & 4 deletions lib/Foswiki/Contrib/RtfContrib/Converter.pm
@@ -1,6 +1,6 @@
# Plugin for Foswiki Collaboration Platform, http://foswiki.org/
#
# Copyright (C) 2007-2016 MichaelDaum http://michaeldaumconsulting.com
# Copyright (C) 2007-2017 MichaelDaum 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 @@ -18,7 +18,7 @@ use warnings;

our $debug;

use Foswiki::Plugins::DBCachePlugin::Core ();
use Foswiki::Plugins::DBCachePlugin ();
use Foswiki::Attrs ();
use Foswiki::Sandbox ();

Expand Down Expand Up @@ -59,7 +59,7 @@ sub new {
$this->{defaultRtfTemplate} = $Foswiki::cfg{RtfContrib}{DefaultRtfTemplate}
|| "$Foswiki::cfg{SystemWebName}.RtfContrib.default-template.rtf";

$this->{db} = Foswiki::Plugins::DBCachePlugin::Core::getDB($this->{web});
$this->{db} = Foswiki::Plugins::DBCachePlugin::getDB($this->{web});
die "unable to get cache for web $this->{web}" unless $this->{db};

mkdir $this->{cacheDir} unless -d $this->{cacheDir};
Expand Down Expand Up @@ -522,7 +522,7 @@ sub handleCell {

my $db = $this->{db};
if ($theWeb ne $this->{web}) {
$db = Foswiki::Plugins::DBCachePlugin::Core::getDB($theWeb);
$db = Foswiki::Plugins::DBCachePlugin::getDB($theWeb);
}
my $topicObj = $db->fastget($theTopic);
return '' unless $topicObj;
Expand Down
2 changes: 1 addition & 1 deletion lib/Foswiki/Contrib/RtfContrib/DEPENDENCIES
@@ -1 +1 @@
Foswiki::Plugins::DBCachePlugin,>=1.52,perl,Required; download from Foswiki:Extensions/DBCachePlugin
Foswiki::Plugins::DBCachePlugin,>=10.00,perl,Required
14 changes: 7 additions & 7 deletions lib/Foswiki/Contrib/RtfContrib/TriConverter.pm
@@ -1,6 +1,6 @@
# Plugin for Foswiki Collaboration Platform, http://foswiki.org/
#
# Copyright (C) 2007-2016 MichaelDaum http://michaeldaumconsulting.com
# Copyright (C) 2007-2017 MichaelDaum 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 @@ -18,7 +18,7 @@ use strict;
use warnings;

use Foswiki::Contrib::RtfContrib::Converter ();
use Foswiki::Plugins::DBCachePlugin::Core ();
use Foswiki::Plugins::DBCachePlugin ();
use Foswiki::Plugins::EmployeePortalPlugin::Core ();
use Foswiki::Plugins::ClassificationPlugin::Core ();
use Foswiki::Attrs ();
Expand Down Expand Up @@ -117,7 +117,7 @@ sub handleJobsTable {
($theWeb, $theTopic) = Foswiki::Func::normalizeWebTopicName($theWeb, $theTopic);
my $db = $this->{db};
if ($theWeb ne $this->{web}) {
$db = Foswiki::Plugins::DBCachePlugin::Core::getDB($theWeb);
$db = Foswiki::Plugins::DBCachePlugin::getDB($theWeb);
}

my $topicObj = $this->{db}->fastget($theTopic);
Expand Down Expand Up @@ -216,7 +216,7 @@ sub handleEducationTable {
($theWeb, $theTopic) = Foswiki::Func::normalizeWebTopicName($theWeb, $theTopic);
my $db = $this->{db};
if ($theWeb ne $this->{web}) {
$db = Foswiki::Plugins::DBCachePlugin::Core::getDB($theWeb);
$db = Foswiki::Plugins::DBCachePlugin::getDB($theWeb);
}

my $topicObj = $this->{db}->fastget($theTopic);
Expand Down Expand Up @@ -314,7 +314,7 @@ sub handleSkills {

my $db = $this->{db};
if ($theWeb ne $this->{web}) {
$db = Foswiki::Plugins::DBCachePlugin::Core::getDB($theWeb);
$db = Foswiki::Plugins::DBCachePlugin::getDB($theWeb);
}

my $topicObj = $db->fastget($theTopic);
Expand Down Expand Up @@ -478,7 +478,7 @@ sub handleCourseTable {

my $db = $this->{db};
if ($theWeb ne $this->{web}) {
$db = Foswiki::Plugins::DBCachePlugin::Core::getDB($theWeb);
$db = Foswiki::Plugins::DBCachePlugin::getDB($theWeb);
}

my $mainRefereeSearch = new Foswiki::Contrib::DBCacheContrib::Search(<<"HERE");
Expand Down Expand Up @@ -654,7 +654,7 @@ sub handleProjects {
($theWeb, $theTopic) = Foswiki::Func::normalizeWebTopicName($theWeb, $theTopic);
my $db = $this->{db};
if ($theWeb ne $this->{web}) {
$db = Foswiki::Plugins::DBCachePlugin::Core::getDB($theWeb);
$db = Foswiki::Plugins::DBCachePlugin::getDB($theWeb);
}

my $topicObj = $this->{db}->fastget($theTopic);
Expand Down

0 comments on commit c0f21e5

Please sign in to comment.