From 992f8963bc981c6a16a7c67c2991ab5b797b15eb Mon Sep 17 00:00:00 2001 From: PaulHarvey Date: Wed, 3 Mar 2010 06:14:21 +0000 Subject: [PATCH] Item8655: Cheap cop-out for now. I will revert TinyMCEPlugin to non-jquery version if ZonePlugin shenanigans prevent us shipping JQueryPlugin as a default plugin. git-svn-id: http://svn.foswiki.org/trunk@6626 0b4bb1d4-4e5a-0410-9cc4-b2b747904278 --- .../Checkers/Plugins/JQueryPlugin/Enabled.pm | 51 +++++++++++++++++++ .../lib/Foswiki/Plugins/JQueryPlugin/MANIFEST | 1 + 2 files changed, 52 insertions(+) create mode 100644 JQueryPlugin/lib/Foswiki/Configure/Checkers/Plugins/JQueryPlugin/Enabled.pm diff --git a/JQueryPlugin/lib/Foswiki/Configure/Checkers/Plugins/JQueryPlugin/Enabled.pm b/JQueryPlugin/lib/Foswiki/Configure/Checkers/Plugins/JQueryPlugin/Enabled.pm new file mode 100644 index 0000000000..19690ce212 --- /dev/null +++ b/JQueryPlugin/lib/Foswiki/Configure/Checkers/Plugins/JQueryPlugin/Enabled.pm @@ -0,0 +1,51 @@ +# See bottom of file for license and copyright information +package Foswiki::Configure::Checkers::Plugins::JQueryPlugin::Enabled; +use warnings; +use strict; + +use Foswiki::Configure::Checker; + +use base 'Foswiki::Configure::Checker'; + +sub check { + my $this = shift; + my $warnings; + + if ( $Foswiki::cfg{Plugins}{JQueryPlugin}{Enabled} ) { + if ( !$Foswiki::cfg{Plugins}{ZonePlugin}{Enabled} ) { + $warnings .= $this->ERROR(<<'HERE'); +JQueryPlugin depends on ZonePlugin, which is not enabled. +HERE + } + } + + return $warnings; +} + +1; +__DATA__ +# +# Foswiki - The Free and Open Source Wiki, http://foswiki.org/ +# +# Copyright (C) 2010 Foswiki Contributors. All Rights Reserved. +# Foswiki Contributors are listed in the AUTHORS file in the root +# of this distribution. NOTE: Please extend that file, not this notice. +# +# Additional copyrights apply to some or all of the code in this +# file as follows: +# +# Copyright (C) 2000-2006 TWiki Contributors. All Rights Reserved. +# TWiki Contributors are listed in the AUTHORS file in the root +# of this distribution. NOTE: Please extend that file, not this notice. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. For +# more details read LICENSE in the root of this distribution. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# +# As per the GPL, removal of this notice is prohibited. diff --git a/JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/MANIFEST b/JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/MANIFEST index 07bdc7764d..80d9400f3c 100644 --- a/JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/MANIFEST +++ b/JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/MANIFEST @@ -48,6 +48,7 @@ data/System/JQueryValidate.txt 0644 data/System/JQueryWikiWord.txt 0644 lib/CPAN/lib/CSS/Minifier.pm 0644 lib/CPAN/lib/JavaScript/Minifier.pm 0644 +lib/Foswiki/Configure/Checkers/Plugins/JQueryPlugin/Enabled.pm 0644 lib/Foswiki/Form/Color.pm 0644 lib/Foswiki/Form/Rating.pm 0644 lib/Foswiki/Form/Textboxlist.pm 0644