Changeset 763
- Timestamp:
- 04/10/06 18:36:16 (2 years ago)
- Files:
-
- branches/move-to-wiki-toolkit/Build.PL (modified) (1 diff)
- branches/move-to-wiki-toolkit/Changes (modified) (8 diffs)
- branches/move-to-wiki-toolkit/INSTALL (modified) (2 diffs)
- branches/move-to-wiki-toolkit/PREREQUISITES (modified) (1 diff)
- branches/move-to-wiki-toolkit/README (modified) (1 diff)
- branches/move-to-wiki-toolkit/lib/OpenGuides.pm (modified) (7 diffs)
- branches/move-to-wiki-toolkit/lib/OpenGuides/Build.pm (modified) (1 diff)
- branches/move-to-wiki-toolkit/lib/OpenGuides/Feed.pm (modified) (8 diffs)
- branches/move-to-wiki-toolkit/lib/OpenGuides/RDF.pm (modified) (7 diffs)
- branches/move-to-wiki-toolkit/lib/OpenGuides/Search.pm (modified) (4 diffs)
- branches/move-to-wiki-toolkit/lib/OpenGuides/Template.pm (modified) (1 diff)
- branches/move-to-wiki-toolkit/lib/OpenGuides/Test.pm (modified) (1 diff)
- branches/move-to-wiki-toolkit/lib/OpenGuides/UK/PubCrawl.pm (modified) (4 diffs)
- branches/move-to-wiki-toolkit/lib/OpenGuides/Utils.pm (modified) (11 diffs)
- branches/move-to-wiki-toolkit/t/11_utils.t (modified) (2 diffs)
- branches/move-to-wiki-toolkit/t/12_macros.t (modified) (2 diffs)
- branches/move-to-wiki-toolkit/t/14_recent_changes_cookies.t (modified) (3 diffs)
- branches/move-to-wiki-toolkit/t/15_template.t (modified) (7 diffs)
- branches/move-to-wiki-toolkit/t/16_test_tester.t (modified) (2 diffs)
- branches/move-to-wiki-toolkit/t/21_rdf.t (modified) (4 diffs)
- branches/move-to-wiki-toolkit/t/22_rss_modwiki.t (modified) (3 diffs)
- branches/move-to-wiki-toolkit/t/25_write_geo_data.t (modified) (2 diffs)
- branches/move-to-wiki-toolkit/t/26_geo_data_search_form.t (modified) (2 diffs)
- branches/move-to-wiki-toolkit/t/27_geo_data_edit_form.t (modified) (2 diffs)
- branches/move-to-wiki-toolkit/t/28_wgs84_coords.t (modified) (1 diff)
- branches/move-to-wiki-toolkit/t/31_search.t (modified) (3 diffs)
- branches/move-to-wiki-toolkit/t/32_search_simple_metadata.t (modified) (3 diffs)
- branches/move-to-wiki-toolkit/t/33_search_advanced_search.t (modified) (3 diffs)
- branches/move-to-wiki-toolkit/t/33_search_advanced_search_utm.t (modified) (2 diffs)
- branches/move-to-wiki-toolkit/t/34_search_paging.t (modified) (2 diffs)
- branches/move-to-wiki-toolkit/t/35_search_two_searches.t (modified) (3 diffs)
- branches/move-to-wiki-toolkit/t/36_search_order.t (modified) (3 diffs)
- branches/move-to-wiki-toolkit/t/37_search_summaries.t (modified) (3 diffs)
- branches/move-to-wiki-toolkit/t/38_search_params.t (modified) (3 diffs)
- branches/move-to-wiki-toolkit/t/39_search_form.t (modified) (2 diffs)
- branches/move-to-wiki-toolkit/t/41_deletion.t (modified) (2 diffs)
- branches/move-to-wiki-toolkit/t/51_display_node.t (modified) (4 diffs)
- branches/move-to-wiki-toolkit/t/52_display_diffs.t (modified) (2 diffs)
- branches/move-to-wiki-toolkit/t/53_show_index.t (modified) (3 diffs)
- branches/move-to-wiki-toolkit/t/54_redirect.t (modified) (3 diffs)
- branches/move-to-wiki-toolkit/t/55_node_history.t (modified) (2 diffs)
- branches/move-to-wiki-toolkit/t/56_diffs_with_macros.t (modified) (2 diffs)
- branches/move-to-wiki-toolkit/t/61_bug_textareas.t (modified) (2 diffs)
- branches/move-to-wiki-toolkit/t/62_bug_trailing_whitespace.t (modified) (2 diffs)
- branches/move-to-wiki-toolkit/t/63_bug_map_link_no_address.t (modified) (2 diffs)
- branches/move-to-wiki-toolkit/t/64_bug_node_history.t (modified) (3 diffs)
- branches/move-to-wiki-toolkit/t/65_bug_metadata_escape.t (modified) (3 diffs)
- branches/move-to-wiki-toolkit/t/66_bug_latlong_representation.t (modified) (3 diffs)
- branches/move-to-wiki-toolkit/t/67_bug_first_version.t (modified) (2 diffs)
- branches/move-to-wiki-toolkit/wiki.cgi (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/move-to-wiki-toolkit/Build.PL
r753 r763 219 219 'CGI::Carp' => 0, 220 220 'CGI::Cookie' => 0, 221 ' CGI::Wiki' => '0.62', # fixed delete version222 ' CGI::Wiki::Formatter::UseMod' => '0.16', # macros223 ' CGI::Wiki::Plugin::Atom' => 0,224 ' CGI::Wiki::Plugin::Categoriser' => 0,225 ' CGI::Wiki::Plugin::Diff' => '0.08', # earlier buggy226 ' CGI::Wiki::Plugin::Locator::Grid'=> '0.02', # cope with sqlite 3227 ' CGI::Wiki::Plugin::RSS::ModWiki' => '0.09', # fixes date formatting bug228 ' CGI::Wiki::Plugin::RSS::Reader' => '1.3', # earlier versions don't support RSS 2.0221 'Wiki::Toolkit' => '0.62', # fixed delete version 222 'Wiki::Toolkit::Formatter::UseMod' => '0.16', # macros 223 'Wiki::Toolkit::Plugin::Atom' => 0, 224 'Wiki::Toolkit::Plugin::Categoriser' => 0, 225 'Wiki::Toolkit::Plugin::Diff' => '0.08', # earlier buggy 226 'Wiki::Toolkit::Plugin::Locator::Grid'=> '0.02', # cope with sqlite 3 227 'Wiki::Toolkit::Plugin::RSS::ModWiki' => '0.09', # fixes date formatting bug 228 'Wiki::Toolkit::Plugin::RSS::Reader' => '1.3', # earlier versions don't support RSS 2.0 229 229 'Class::Accessor' => 0, 230 230 'Config::Tiny' => 0, branches/move-to-wiki-toolkit/Changes
r759 r763 75 75 76 76 0.49 24 July 2005 77 Add updated prerequisite on CGI::Wiki::Plugin::RSS::ModWiki (fixes77 Add updated prerequisite on Wiki::Toolkit::Plugin::RSS::ModWiki (fixes 78 78 a test failure) 79 79 … … 112 112 Fixed bug with list_all_versions for nodes with only one version. 113 113 Extended config changes to examples/reindex.pl (thanks jimbo). 114 Now require CGI::Wiki0.62 to fix bug with deleting versions.114 Now require Wiki::Toolkit 0.62 to fix bug with deleting versions. 115 115 Try to ensure that a .htaccess file protecting wiki.conf is installed. 116 116 Allow for external URLs for Text Formatting help. … … 175 175 This only affects you if you have used the custom template support 176 176 introduced in 0.41. 177 Replace use of CGI::Wiki::Plugin::Geocache with improved node.tt.177 Replace use of Wiki::Toolkit::Plugin::Geocache with improved node.tt. 178 178 179 179 0.41 21 September 2004 … … 228 228 229 229 0.35 25 June 2004 230 Forgot to add version prerequisite on CGI::Wiki. Don't use 0.34,230 Forgot to add version prerequisite on Wiki::Toolkit. Don't use 0.34, 231 231 use this. 232 232 … … 268 268 0.31 09 May 2004 269 269 Created a new macro to allow the embedding of RSS feeds into 270 pages, using CGI::Wiki::Plugin::RSS::Reader. This allows you270 pages, using Wiki::Toolkit::Plugin::RSS::Reader. This allows you 271 271 to do this to produce a list of up to ten hyperlinks: 272 272 @RSS [http://example.com/example.rss] … … 317 317 Removed newlines from output of search box macro. 318 318 319 Reimplemented diffing using CGI::Wiki::Plugin::Diff as it seems the319 Reimplemented diffing using Wiki::Toolkit::Plugin::Diff as it seems the 320 320 change in 0.30 got lost. Removed OpenGuides::Diff.pm as we should not 321 321 be distributing it. … … 351 351 Removed pubcrawl stuff from distro for now - it doesn't really work. 352 352 353 Changed to use CGI::Wiki::Plugin::Diff instead of OpenGuides::Diff.353 Changed to use Wiki::Toolkit::Plugin::Diff instead of OpenGuides::Diff. 354 354 355 355 0.29 8 November 2003 … … 540 540 541 541 0.07 3 May 2003 542 Require CGI::Wiki0.32 to avoid bug (again a Bob find!) where542 Require Wiki::Toolkit 0.32 to avoid bug (again a Bob find!) where 543 543 committing a node with metadata but no content would die. 544 544 branches/move-to-wiki-toolkit/INSTALL
r736 r763 105 105 to index your wiki instead of Search::InvertedIndex. If you answer 106 106 yes to this question, you will need to make sure you have installed 107 both Plucene, and CGI::Wikiversion 0.56 or later.107 both Plucene, and Wiki::Toolkit version 0.56 or later. 108 108 109 109 If you are changing to Plucene from Search::InvertedIndex, you will … … 334 334 programs, it isn't appropriate to run them again. So we will make use of 335 335 the utility program "cgi-wiki-setupdb" which is included with the 336 CGI::Wikidistribution. Documentation for this command can be found in336 Wiki::Toolkit distribution. Documentation for this command can be found in 337 337 its man page; run this with the appropriate arguments to create the 338 338 new database. branches/move-to-wiki-toolkit/PREREQUISITES
r753 r763 7 7 CGI::Carp 8 8 CGI::Cookie 9 CGI::Wiki(version 0.62 or later)10 CGI::Wiki::Formatter::UseMod (version 0.16 or later)11 CGI::Wiki::Plugin::Atom12 CGI::Wiki::Plugin::Categoriser13 CGI::Wiki::Plugin::Diff (version 0.08 or later)14 CGI::Wiki::Plugin::Locator::Grid (version 0.02 or later)15 CGI::Wiki::Plugin::RSS::ModWiki (version 0.09 or later)16 CGI::Wiki::Plugin::RSS::Reader (version 1.3 or later)9 Wiki::Toolkit (version 0.62 or later) 10 Wiki::Toolkit::Formatter::UseMod (version 0.16 or later) 11 Wiki::Toolkit::Plugin::Atom 12 Wiki::Toolkit::Plugin::Categoriser 13 Wiki::Toolkit::Plugin::Diff (version 0.08 or later) 14 Wiki::Toolkit::Plugin::Locator::Grid (version 0.02 or later) 15 Wiki::Toolkit::Plugin::RSS::ModWiki (version 0.09 or later) 16 Wiki::Toolkit::Plugin::RSS::Reader (version 1.3 or later) 17 17 Class::Accessor 18 18 Config::Tiny branches/move-to-wiki-toolkit/README
r736 r763 23 23 * http://london.openguides.org/, the first and biggest OpenGuides site. 24 24 * http://openguides.org/, with a list of all live OpenGuides installs. 25 * CGI::Wiki, the Wiki toolkit which does the heavy lifting for25 * Wiki::Toolkit, the Wiki toolkit which does the heavy lifting for 26 26 OpenGuides 27 27 branches/move-to-wiki-toolkit/lib/OpenGuides.pm
r761 r763 4 4 use Carp "croak"; 5 5 use CGI; 6 use CGI::Wiki::Plugin::Diff;7 use CGI::Wiki::Plugin::Locator::Grid;6 use Wiki::Toolkit::Plugin::Diff; 7 use Wiki::Toolkit::Plugin::Locator::Grid; 8 8 use OpenGuides::CGI; 9 9 use OpenGuides::Feed; … … 51 51 my $locator; 52 52 if ( $geo_handler == 1 ) { 53 $locator = CGI::Wiki::Plugin::Locator::Grid->new(53 $locator = Wiki::Toolkit::Plugin::Locator::Grid->new( 54 54 x => "os_x", y => "os_y" ); 55 55 } elsif ( $geo_handler == 2 ) { 56 $locator = CGI::Wiki::Plugin::Locator::Grid->new(56 $locator = Wiki::Toolkit::Plugin::Locator::Grid->new( 57 57 x => "osie_x", y => "osie_y" ); 58 58 } else { 59 $locator = CGI::Wiki::Plugin::Locator::Grid->new(59 $locator = Wiki::Toolkit::Plugin::Locator::Grid->new( 60 60 x => "easting", y => "northing" ); 61 61 } 62 62 $wiki->register_plugin( plugin => $locator ); 63 63 $self->{locator} = $locator; 64 my $differ = CGI::Wiki::Plugin::Diff->new;64 my $differ = Wiki::Toolkit::Plugin::Diff->new; 65 65 $wiki->register_plugin( plugin => $differ ); 66 66 $self->{differ} = $differ; … … 70 70 =item B<wiki> 71 71 72 An accessor, returns the underlying L< CGI::Wiki> object.72 An accessor, returns the underlying L<Wiki::Toolkit> object. 73 73 74 74 =cut … … 92 92 =item B<locator> 93 93 94 An accessor, returns the underlying L< CGI::Wiki::Plugin::Locator::UK> object.94 An accessor, returns the underlying L<Wiki::Toolkit::Plugin::Locator::UK> object. 95 95 96 96 =cut … … 103 103 =item B<differ> 104 104 105 An accessor, returns the underlying L< CGI::Wiki::Plugin::Diff> object.105 An accessor, returns the underlying L<Wiki::Toolkit::Plugin::Diff> object. 106 106 107 107 =cut … … 958 958 $metadata{host} = $ENV{REMOTE_ADDR}; 959 959 960 # CGI::Wiki::Plugin::RSS::ModWiki wants "major_change" to be set.960 # Wiki::Toolkit::Plugin::RSS::ModWiki wants "major_change" to be set. 961 961 $metadata{major_change} = ( $metadata{edit_type} eq "Normal edit" ) 962 962 ? 1 … … 1136 1136 =item * L<http://openguides.org/|The OpenGuides website>, with a list of all live OpenGuides installs. 1137 1137 1138 =item * L< CGI::Wiki>, the Wiki toolkit which does the heavy lifting for OpenGuides1138 =item * L<Wiki::Toolkit>, the Wiki toolkit which does the heavy lifting for OpenGuides 1139 1139 1140 1140 =back branches/move-to-wiki-toolkit/lib/OpenGuides/Build.pm
r606 r763 27 27 sqlite => "SQLite" ); 28 28 29 my $cgi_wiki_module = " CGI::Wiki::Setup::" . $cgi_wiki_exts{$dbtype};29 my $cgi_wiki_module = "Wiki::Toolkit::Setup::" . $cgi_wiki_exts{$dbtype}; 30 30 eval "require $cgi_wiki_module"; 31 31 die "There was a problem: $@" if $@; branches/move-to-wiki-toolkit/lib/OpenGuides/Feed.pm
r753 r763 6 6 $VERSION = '0.01'; 7 7 8 use CGI::Wiki::Plugin::Atom;9 use CGI::Wiki::Plugin::RSS::ModWiki;8 use Wiki::Toolkit::Plugin::Atom; 9 use Wiki::Toolkit::Plugin::RSS::ModWiki; 10 10 use Time::Piece; 11 11 use URI::Escape; … … 24 24 my $wiki = $args{wiki}; 25 25 26 unless ( $wiki && UNIVERSAL::isa( $wiki, " CGI::Wiki" ) ) {27 croak "No CGI::Wikiobject supplied.";26 unless ( $wiki && UNIVERSAL::isa( $wiki, "Wiki::Toolkit" ) ) { 27 croak "No Wiki::Toolkit object supplied."; 28 28 } 29 29 $self->{wiki} = $wiki; … … 82 82 83 83 unless ($self->{atom_maker}) { 84 $self->{atom_maker} = CGI::Wiki::Plugin::Atom->new(84 $self->{atom_maker} = Wiki::Toolkit::Plugin::Atom->new( 85 85 wiki => $self->{wiki}, 86 86 site_name => $self->{site_name}, … … 103 103 104 104 unless ($self->{rss_maker}) { 105 $self->{rss_maker} = CGI::Wiki::Plugin::RSS::ModWiki->new(105 $self->{rss_maker} = Wiki::Toolkit::Plugin::RSS::ModWiki->new( 106 106 wiki => $self->{wiki}, 107 107 site_name => $self->{site_name}, … … 140 140 =head1 SYNOPSIS 141 141 142 use CGI::Wiki;142 use Wiki::Toolkit; 143 143 use OpenGuides::Config; 144 144 use OpenGuides::Feed; 145 145 146 my $wiki = CGI::Wiki->new( ... );146 my $wiki = Wiki::Toolkit->new( ... ); 147 147 my $config = OpenGuides::Config->new( file => "wiki.conf" ); 148 148 my $feed = OpenGuides::Feed->new( wiki => $wiki, … … 167 167 og_version => '1.0', ); 168 168 169 C<wiki> must be a L< CGI::Wiki> object and C<config> must be an169 C<wiki> must be a L<Wiki::Toolkit> object and C<config> must be an 170 170 L<OpenGuides::Config> object. Both of these arguments are mandatory. 171 171 C<og_version> is an optional argument specifying the version of … … 174 174 =item B<rss_maker> 175 175 176 Returns a raw L< CGI::Wiki::Plugin::RSS::ModWiki> object created with the values you176 Returns a raw L<Wiki::Toolkit::Plugin::RSS::ModWiki> object created with the values you 177 177 invoked this module with. 178 178 179 179 =item B<atom_maker> 180 180 181 Returns a raw L< CGI::Wiki::Plugin::Atom> object created with the values you181 Returns a raw L<Wiki::Toolkit::Plugin::Atom> object created with the values you 182 182 invoked this module with. 183 183 … … 216 216 =over 4 217 217 218 =item * L< CGI::Wiki>, L<CGI::Wiki::Plugin::RSS::ModWiki> and L<CGI::Wiki::Plugin::Atom>218 =item * L<Wiki::Toolkit>, L<Wiki::Toolkit::Plugin::RSS::ModWiki> and L<Wiki::Toolkit::Plugin::Atom> 219 219 220 220 =item * L<http://openguides.org/> branches/move-to-wiki-toolkit/lib/OpenGuides/RDF.pm
r753 r763 6 6 $VERSION = '0.09'; 7 7 8 use CGI::Wiki::Plugin::RSS::ModWiki;8 use Wiki::Toolkit::Plugin::RSS::ModWiki; 9 9 use Time::Piece; 10 10 use URI::Escape; … … 23 23 my $wiki = $args{wiki}; 24 24 25 unless ( $wiki && UNIVERSAL::isa( $wiki, " CGI::Wiki" ) ) {26 croak "No CGI::Wikiobject supplied.";25 unless ( $wiki && UNIVERSAL::isa( $wiki, "Wiki::Toolkit" ) ) { 26 croak "No Wiki::Toolkit object supplied."; 27 27 } 28 28 $self->{wiki} = $wiki; … … 106 106 107 107 # Make a Time::Piece object. 108 my $timestamp_fmt = $ CGI::Wiki::Store::Database::timestamp_fmt;108 my $timestamp_fmt = $Wiki::Toolkit::Store::Database::timestamp_fmt; 109 109 110 110 if ( $timestamp ) { … … 213 213 =head1 SYNOPSIS 214 214 215 use CGI::Wiki;215 use Wiki::Toolkit; 216 216 use OpenGuides::Config; 217 217 use OpenGuides::RDF; 218 218 219 my $wiki = CGI::Wiki->new( ... );219 my $wiki = Wiki::Toolkit->new( ... ); 220 220 my $config = OpenGuides::Config->new( file => "wiki.conf" ); 221 221 my $rdf_writer = OpenGuides::RDF->new( wiki => $wiki, … … 235 235 config => $config ); 236 236 237 C<wiki> must be a L< CGI::Wiki> object and C<config> must be an237 C<wiki> must be a L<Wiki::Toolkit> object and C<config> must be an 238 238 L<OpenGuides::Config> object. Both arguments mandatory. 239 239 … … 254 254 B<Note:> Some of the fields emitted by the RDF/XML generator are taken 255 255 from the node metadata. The form of this metadata is I<not> mandated 256 by L< CGI::Wiki>. Your wiki application should make sure to store some or256 by L<Wiki::Toolkit>. Your wiki application should make sure to store some or 257 257 all of the following metadata when calling C<write_node>: 258 258 … … 281 281 =over 4 282 282 283 =item * L< CGI::Wiki>283 =item * L<Wiki::Toolkit> 284 284 285 285 =item * L<http://openguides.org/> branches/move-to-wiki-toolkit/lib/OpenGuides/Search.pm
r716 r763 4 4 5 5 use CGI qw( :standard ); 6 use CGI::Wiki::Plugin::Locator::Grid;6 use Wiki::Toolkit::Plugin::Locator::Grid; 7 7 use File::Spec::Functions qw(:ALL); 8 8 use OpenGuides::Template; … … 65 65 } 66 66 67 my $locator = CGI::Wiki::Plugin::Locator::Grid->new( %locator_params );67 my $locator = Wiki::Toolkit::Plugin::Locator::Grid->new( %locator_params ); 68 68 $wiki->register_plugin( plugin => $locator ); 69 69 $self->{locator} = $locator; … … 76 76 my $wiki = $search->wiki; 77 77 78 An accessor; returns the underlying L< CGI::Wiki> object.78 An accessor; returns the underlying L<Wiki::Toolkit> object. 79 79 80 80 =cut … … 430 430 431 431 # Rationalise the scores a little. The scores returned by 432 # CGI::Wiki::Search::Plucene are simply a ranking.432 # Wiki::Toolkit::Search::Plucene are simply a ranking. 433 433 my $num_results = scalar keys %contents_res; 434 434 foreach my $node ( keys %contents_res ) { branches/move-to-wiki-toolkit/lib/OpenGuides/Template.pm
r739 r763 229 229 230 230 Picks out things like categories, locales, phone number etc from 231 EITHER the metadata hash returned by L< CGI::Wiki> OR the query231 EITHER the metadata hash returned by L<Wiki::Toolkit> OR the query 232 232 parameters in a L<CGI> object, and packages them nicely for passing to 233 templates or storing in L< CGI::Wiki> datastore. If you supply both233 templates or storing in L<Wiki::Toolkit> datastore. If you supply both 234 234 C<metadata> and C<cgi_obj> then C<metadata> will take precedence, but 235 235 don't do that. branches/move-to-wiki-toolkit/lib/OpenGuides/Test.pm
r594 r763 68 68 ); 69 69 70 eval { require CGI::Wiki::Search::Plucene; };70 eval { require Wiki::Toolkit::Search::Plucene; }; 71 71 if ( $@ ) { $config->use_plucene ( 0 ) }; 72 72 branches/move-to-wiki-toolkit/lib/OpenGuides/UK/PubCrawl.pm
r202 r763 6 6 7 7 use Carp qw( croak ); 8 use CGI::Wiki::Plugin;9 use CGI::Wiki::Plugin::Locator::UK;8 use Wiki::Toolkit::Plugin; 9 use Wiki::Toolkit::Plugin::Locator::UK; 10 10 11 @ISA = qw( CGI::Wiki::Plugin );11 @ISA = qw( Wiki::Toolkit::Plugin ); 12 12 13 13 =head1 NAME … … 24 24 =head1 SYNOPSIS 25 25 26 use CGI::Wiki;27 use CGI::Wiki::Plugin::Locator::UK;26 use Wiki::Toolkit; 27 use Wiki::Toolkit::Plugin::Locator::UK; 28 28 use OpenGuides::UK::PubCrawl; 29 29 30 my $wiki = CGI::Wiki->new( ... );31 my $locator = CGI::Wiki::Plugin::Locator::UK->new;30 my $wiki = Wiki::Toolkit->new( ... ); 31 my $locator = Wiki::Toolkit::Plugin::Locator::UK->new; 32 32 $wiki->register_plugin( plugin => $locator ); 33 my $categoriser = CGI::Wiki::Plugin::Categoriser->new;33 my $categoriser = Wiki::Toolkit::Plugin::Categoriser->new; 34 34 $wiki->register_plugin( plugin => $categoriser ); 35 35 … … 51 51 my $crawler = OpenGuides::UK::PubCrawl->new( locator => $locator ); 52 52 53 Croaks unless a C< CGI::Wiki::Plugin::Locator::UK> object and a54 C< CGI::Wiki::Plugin::Categoriser> object are supplied.53 Croaks unless a C<Wiki::Toolkit::Plugin::Locator::UK> object and a 54 C<Wiki::Toolkit::Plugin::Categoriser> object are supplied. 55 55 56 56 =cut … … 60 60 my $locator = $args{locator} 61 61 or croak "No locator parameter supplied"; 62 croak "Locator parameter is not a CGI::Wiki::Plugin::Locator::UK"63 unless UNIVERSAL::isa( $locator, " CGI::Wiki::Plugin::Locator::UK" );62 croak "Locator parameter is not a Wiki::Toolkit::Plugin::Locator::UK" 63 unless UNIVERSAL::isa( $locator, "Wiki::Toolkit::Plugin::Locator::UK" ); 64 64 my $categoriser = $args{categoriser} 65 65 or croak "No categoriser parameter supplied"; 66 croak "Categoriser parameter is not a CGI::Wiki::Plugin::Categoriser"67 unless UNIVERSAL::isa( $categoriser, " CGI::Wiki::Plugin::Categoriser" );66 croak "Categoriser parameter is not a Wiki::Toolkit::Plugin::Categoriser" 67 unless UNIVERSAL::isa( $categoriser, "Wiki::Toolkit::Plugin::Categoriser" ); 68 68 my $self = { _locator => $locator, 69 69 _categoriser => $categoriser }; branches/move-to-wiki-toolkit/lib/OpenGuides/Utils.pm
r730 r763 6 6 7 7 use Carp qw( croak ); 8 use CGI::Wiki;9 use CGI::Wiki::Formatter::UseMod;10 use CGI::Wiki::Plugin::RSS::Reader;8 use Wiki::Toolkit; 9 use Wiki::Toolkit::Formatter::UseMod; 10 use Wiki::Toolkit::Plugin::RSS::Reader; 11 11 use URI::Escape; 12 12 … … 40 40 41 41 Croaks unless an C<OpenGuides::Config> object is supplied. Returns a 42 C< CGI::Wiki> object made from the given config file on success,42 C<Wiki::Toolkit> object made from the given config file on success, 43 43 croaks if any other error occurs. 44 44 … … 78 78 ); 79 79 80 my $cgi_wiki_module = " CGI::Wiki::Store::" . $cgi_wiki_exts{$dbtype};80 my $cgi_wiki_module = "Wiki::Toolkit::Store::" . $cgi_wiki_exts{$dbtype}; 81 81 eval "require $cgi_wiki_module"; 82 82 croak "Can't 'require' $cgi_wiki_module.\n" if $@; … … 96 96 || $config->use_plucene == 1 ) 97 97 ) { 98 require CGI::Wiki::Search::Plucene;99 $search = CGI::Wiki::Search::Plucene->new(98 require Wiki::Toolkit::Search::Plucene; 99 $search = Wiki::Toolkit::Search::Plucene->new( 100 100 path => $config->indexing_directory, 101 101 ); 102 102 } else { 103 require CGI::Wiki::Search::SII;103 require Wiki::Toolkit::Search::SII; 104 104 require Search::InvertedIndex::DB::DB_File_SplitHash; 105 105 my $indexdb = Search::InvertedIndex::DB::DB_File_SplitHash->new( … … 107 107 -lock_mode => "EX" 108 108 ); 109 $search = CGI::Wiki::Search::SII->new( indexdb => $indexdb );109 $search = Wiki::Toolkit::Search::SII->new( indexdb => $indexdb ); 110 110 } 111 111 … … 119 119 qr/\@INDEX_LINK\s+\[\[(Category|Locale)\s+([^\]|]+)\|?([^\]]+)?\]\]/ => 120 120 sub { 121 # We may be being called by CGI::Wiki::Plugin::Diff,121 # We may be being called by Wiki::Toolkit::Plugin::Diff, 122 122 # which doesn't know it has to pass us $wiki - and 123 123 # we don't use it anyway. 124 if ( UNIVERSAL::isa( $_[0], " CGI::Wiki" ) ) {124 if ( UNIVERSAL::isa( $_[0], "Wiki::Toolkit" ) ) { 125 125 shift; # just throw it away 126 126 } … … 132 132 my ($wiki, $type, $value) = @_; 133 133 134 # We may be being called by CGI::Wiki::Plugin::Diff,134 # We may be being called by Wiki::Toolkit::Plugin::Diff, 135 135 # which doesn't know it has to pass us $wiki 136 unless ( UNIVERSAL::isa( $wiki, " CGI::Wiki" ) ) {136 unless ( UNIVERSAL::isa( $wiki, "Wiki::Toolkit" ) ) { 137 137 return "(unprocessed INDEX_LIST macro)"; 138 138 } … … 159 159 }, 160 160 qr/\@RSS\s+(.+)/ => sub { 161 # We may be being called by CGI::Wiki::Plugin::Diff,161 # We may be being called by Wiki::Toolkit::Plugin::Diff, 162 162 # which doesn't know it has to pass us $wiki - and 163 163 # we don't use it anyway. 164 if ( UNIVERSAL::isa( $_[0], " CGI::Wiki" ) ) {164 if ( UNIVERSAL::isa( $_[0], "Wiki::Toolkit" ) ) { 165 165 shift; # just throw it away 166 166 } … … 174 174 } 175 175 176 my $rss = CGI::Wiki::Plugin::RSS::Reader->new(url => $url);176 my $rss = Wiki::Toolkit::Plugin::RSS::Reader->new(url => $url); 177 177 my @items = $rss->retrieve; 178 178 … … 196 196 ); 197 197 198 my $formatter = CGI::Wiki::Formatter::UseMod->new(198 my $formatter = Wiki::Toolkit::Formatter::UseMod->new( 199 199 extended_links => 1, 200 200 implicit_links => 0, … … 213 213 formatter => $formatter ); 214 214 215 my $wiki = CGI::Wiki->new( %conf );215 my $wiki = Wiki::Toolkit->new( %conf ); 216 216 return $wiki; 217 217 } branches/move-to-wiki-toolkit/t/11_utils.t
r594 r763 27 27 ); 28 28 29 eval { require CGI::Wiki::Search::Plucene; };29 eval { require Wiki::Toolkit::Search::Plucene; }; 30 30 if ( $@ ) { $config->use_plucene ( 0 ) }; 31 31 … … 35 35 is( $@, "", 36 36 "...but not with an OpenGuides::Config object with suitable data" ); 37 isa_ok( $wiki, " CGI::Wiki" );37 isa_ok( $wiki, "Wiki::Toolkit" ); 38 38 39 39 ok( $wiki->store, "...and store defined" ); branches/move-to-wiki-toolkit/t/12_macros.t
r565 r763 1 1 use strict; 2 use CGI::Wiki::Setup::SQLite;2 use Wiki::Toolkit::Setup::SQLite; 3 3 use OpenGuides; 4 4 use OpenGuides::Test; … … 15 15 unlink "t/node.db"; 16 16 unlink <t/indexes/*>; 17 CGI::Wiki::Setup::SQLite::setup( { dbname => "t/node.db" } );17 Wiki::Toolkit::Setup::SQLite::setup( { dbname => "t/node.db" } ); 18 18 19 19 my $config = OpenGuides::Test->make_basic_config; branches/move-to-wiki-toolkit/t/14_recent_changes_cookies.t
r594 r763 1 1 use strict; 2 use CGI::Wiki::Setup::SQLite;2 use Wiki::Toolkit::Setup::SQLite; 3 3 use OpenGuides::Config; 4 4 use OpenGuides; … … 58 58 unless $have_sqlite; 59 59 60 CGI::Wiki::Setup::SQLite::setup( { dbname => "t/node.db" } );60 Wiki::Toolkit::Setup::SQLite::setup( { dbname => "t/node.db" } ); 61 61 my $config = OpenGuides::Config->new( 62 62 vars => { … … 71 71 } 72 72 ); 73 eval { require CGI::Wiki::Search::Plucene; };73 eval { require Wiki::Toolkit::Search::Plucene; }; 74 74 if ( $@ ) { $config->use_plucene ( 0 ) }; 75 75 branches/move-to-wiki-toolkit/t/15_template.t
r607 r763 2 2 use Cwd; 3 3 use CGI::Cookie; 4 use CGI::Wiki::Formatter::UseMod;4 use Wiki::Toolkit::Formatter::UseMod; 5 5 use OpenGuides::Config; 6 6 use OpenGuides::Template; … … 11 11 vars => { 12 12 template_path => cwd . '/t/templates', 13 site_name => ' CGI::WikiTest Site',13 site_name => 'Wiki::Toolkit Test Site', 14 14 script_url => 'http://wiki.example.com/', 15 15 script_name => 'mywiki.cgi', … … 29 29 my $fake_wiki = Test::MockObject->new; 30 30 $fake_wiki->mock("formatter", 31 sub { return CGI::Wiki::Formatter::UseMod->new( munge_urls => 1 ); } );31 sub { return Wiki::Toolkit::Formatter::UseMod->new( munge_urls => 1 ); } ); 32 32 33 33 eval { OpenGuides::Template->output( wiki => $fake_wiki, … … 75 75 ); 76 76 77 like( $output, qr/SITE NAME: CGI::WikiTest Site/, "site_name var set" );77 like( $output, qr/SITE NAME: Wiki::Toolkit Test Site/, "site_name var set" ); 78 78 like( $output, qr/CGI URL: mywiki.cgi/, "cgi_url var set" ); 79 79 like( $output, qr/FULL CGI URL: http:\/\/wiki.example.com\/mywiki.cgi/, … … 117 117 vars => { 118 118 template_path => cwd . '/t/templates', 119 site_name => ' CGI::WikiTest Site',119 site_name => 'Wiki::Toolkit Test Site', 120 120 script_url => 'http://wiki.example.com/', 121 121 script_name => 'mywiki.cgi', … … 136 136 vars => { 137 137 template_path => cwd . '/t/templates', 138 site_name => ' CGI::WikiTest Site',138 site_name => 'Wiki::Toolkit Test Site', 139 139 script_url => 'http://wiki.example.com/', 140 140 script_name => '', … … 154 154 vars => { 155 155 template_path => cwd . '/t/templates', 156 site_name => ' CGI::WikiTest Site',156 site_name => 'Wiki::Toolkit Test Site', 157 157 script_url => 'http://wiki.example.com', 158 158 script_name => 'wiki.cgi', branches/move-to-wiki-toolkit/t/16_test_tester.t
r587 r763 1 1 use strict; 2 use CGI::Wiki::Setup::SQLite;2 use Wiki::Toolkit::Setup::SQLite; 3 3 use OpenGuides; 4 4 use OpenGuides::Test; … … 21 21 unlink <t/indexes/*>; 22 22 23 CGI::Wiki::Setup::SQLite::setup( { dbname => "t/node.db" } );23 Wiki::Toolkit::Setup::SQLite::setup( { dbname => "t/node.db" } ); 24 24 my $config = OpenGuides::Test->make_basic_config; 25 25 $config->site_name( "Test Site" ); branches/move-to-wiki-toolkit/t/21_rdf.t
r745 r763 1 use CGI::Wiki::Setup::SQLite;1 use Wiki::Toolkit::Setup::SQLite; 2 2 use OpenGuides; 3 3 use OpenGuides::Config; … … 15 15 unless $have_sqlite; 16 16 17 CGI::Wiki::Setup::SQLite::setup( { dbname => "t/node.db" } );17 Wiki::Toolkit::Setup::SQLite::setup( { dbname => "t/node.db" } ); 18 18 my $config = OpenGuides::Config->new( 19 19 vars => { … … 23 23 script_url => "http://wiki.example.com/", 24 24 script_name => "mywiki.cgi", 25 site_name => " CGI::WikiTest Site",25 site_name => "Wiki::Toolkit Test Site", 26 26 default_city => "London", 27 27 default_country => "United Kingdom", 28 28 } 29 29 ); 30 eval { require CGI::Wiki::Search::Plucene; };30 eval { require Wiki::Toolkit::Search::Plucene; }; 31 31 if ( $@ ) { $config->use_plucene ( 0 ) }; 32 32 … … 81 81 82 82 like( $rdfxml, 83 qr|<dc:title> CGI::WikiTest Site: Calthorpe Arms</dc:title>|,83 qr|<dc:title>Wiki::Toolkit Test Site: Calthorpe Arms</dc:title>|, 84 84 "sets the title correctly" ); 85 85 branches/move-to-wiki-toolkit/t/22_rss_modwiki.t
r753 r763 1 1 use strict; 2 use CGI::Wiki::Setup::SQLite;2 use Wiki::Toolkit::Setup::SQLite; 3 3 use OpenGuides::Config; 4 4 use OpenGuides; … … 13 13 } 14 14 15 eval { require CGI::Wiki::Search::Plucene; };15 eval { require Wiki::Toolkit::Search::Plucene; }; 16 16 if ( $@ ) { 17 17 plan skip_all => "Plucene not installed"; … … 25 25 unlink <t/indexes/*>; 26 26 27 CGI::Wiki::Setup::SQLite::setup( { dbname => "t/node.db" } );27 Wiki::Toolkit::Setup::SQLite::setup( { dbname => "t/node.db" } ); 28 28 my $config = OpenGuides::Config->new( 29 29 vars => { branches/move-to-wiki-toolkit/t/25_write_geo_data.t
r587 r763 1 1 use strict; 2 use CGI::Wiki::Setup::SQLite;2 use Wiki::Toolkit::Setup::SQLite; 3 3 use OpenGuides::Config; 4 4 use OpenGuides; … … 36 36 unlink <t/indexes/*>; 37 37 38 CGI::Wiki::Setup::SQLite::setup( { dbname => "t/node.db" } );38 Wiki::Toolkit::Setup::SQLite::setup( { dbname => "t/node.db" } ); 39 39 my $config = OpenGuides::Config->new( 40 40 vars => { branches/move-to-wiki-toolkit/t/26_geo_data_search_form.t
r587
