Changeset 785
- Timestamp:
- 05/14/06 16:54:22 (3 years ago)
- Location:
- trunk
- Files:
-
- 51 modified
-
Build.PL (modified) (1 diff)
-
Changes (modified) (1 diff)
-
INSTALL (modified) (2 diffs)
-
PREREQUISITES (modified) (2 diffs)
-
README (modified) (1 diff)
-
lib/OpenGuides.pm (modified) (7 diffs)
-
lib/OpenGuides/Build.pm (modified) (1 diff)
-
lib/OpenGuides/Feed.pm (modified) (8 diffs)
-
lib/OpenGuides/RDF.pm (modified) (7 diffs)
-
lib/OpenGuides/Search.pm (modified) (4 diffs)
-
lib/OpenGuides/Template.pm (modified) (1 diff)
-
lib/OpenGuides/Test.pm (modified) (1 diff)
-
lib/OpenGuides/UK/PubCrawl.pm (modified) (4 diffs)
-
lib/OpenGuides/Utils.pm (modified) (11 diffs)
-
t/11_utils.t (modified) (2 diffs)
-
t/12_macros.t (modified) (2 diffs)
-
t/14_recent_changes_cookies.t (modified) (3 diffs)
-
t/15_template.t (modified) (7 diffs)
-
t/16_test_tester.t (modified) (2 diffs)
-
t/21_rdf.t (modified) (4 diffs)
-
t/22_rss_modwiki.t (modified) (3 diffs)
-
t/25_write_geo_data.t (modified) (2 diffs)
-
t/26_geo_data_search_form.t (modified) (2 diffs)
-
t/27_geo_data_edit_form.t (modified) (2 diffs)
-
t/28_wgs84_coords.t (modified) (1 diff)
-
t/31_search.t (modified) (3 diffs)
-
t/32_search_simple_metadata.t (modified) (3 diffs)
-
t/33_search_advanced_search.t (modified) (3 diffs)
-
t/33_search_advanced_search_utm.t (modified) (2 diffs)
-
t/34_search_paging.t (modified) (2 diffs)
-
t/35_search_two_searches.t (modified) (3 diffs)
-
t/36_search_order.t (modified) (3 diffs)
-
t/37_search_summaries.t (modified) (3 diffs)
-
t/38_search_params.t (modified) (3 diffs)
-
t/39_search_form.t (modified) (2 diffs)
-
t/41_deletion.t (modified) (2 diffs)
-
t/51_display_node.t (modified) (4 diffs)
-
t/52_display_diffs.t (modified) (2 diffs)
-
t/53_show_index.t (modified) (3 diffs)
-
t/54_redirect.t (modified) (3 diffs)
-
t/55_node_history.t (modified) (2 diffs)
-
t/56_diffs_with_macros.t (modified) (2 diffs)
-
t/61_bug_textareas.t (modified) (2 diffs)
-
t/62_bug_trailing_whitespace.t (modified) (2 diffs)
-
t/63_bug_map_link_no_address.t (modified) (2 diffs)
-
t/64_bug_node_history.t (modified) (3 diffs)
-
t/65_bug_metadata_escape.t (modified) (3 diffs)
-
t/66_bug_latlong_representation.t (modified) (3 diffs)
-
t/67_bug_first_version.t (modified) (2 diffs)
-
t/68_bug_website_displayed.t (modified) (2 diffs)
-
wiki.cgi (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Build.PL
r784 r785 216 216 license => "perl", 217 217 requires => { 218 'Algorithm::Diff' => '0.13', # for sdiff219 'CGI' => '2.92', # avoid escapeHTML bug220 'CGI::Carp' => 0,221 'CGI::Cookie' => 0,222 ' CGI::Wiki' => '0.62', # fixed delete version223 ' CGI::Wiki::Formatter::UseMod' => '0.16', # macros224 ' CGI::Wiki::Plugin::Atom'=> 0,225 ' CGI::Wiki::Plugin::Categoriser'=> 0,226 ' CGI::Wiki::Plugin::Diff' => '0.08', # earlier buggy227 ' CGI::Wiki::Plugin::Locator::Grid'=> '0.02', # cope with sqlite 3228 ' CGI::Wiki::Plugin::RSS::ModWiki' => '0.09', # fixes date formatting bug229 ' CGI::Wiki::Plugin::RSS::Reader' => '1.3', # earlier versions don't support RSS 2.0230 'Class::Accessor' => 0,231 'Config::Tiny' => 0,232 'Data::Dumper' => 0,233 $drivers{$dbtype} => 0,234 'File::Spec::Functions' => 0,235 'File::Temp' => 0,236 'Geography::NationalGrid' => 0,237 'LWP::Simple' => 0,238 'Parse::RecDescent' => 0,239 $search_module => 0,240 'POSIX' => 0,241 'Template' => 0,242 'Test::MockObject' => '0.07', # earlier doesn't use 'mock'243 'Time::Piece' => 0,244 'URI::Escape' => 0,245 'XML::RSS' => 0,218 'Algorithm::Diff' => '0.13', # for sdiff 219 'CGI' => '2.92', # avoid escapeHTML bug 220 'CGI::Carp' => 0, 221 'CGI::Cookie' => 0, 222 'Wiki::Toolkit' => 0, 223 'Wiki::Toolkit::Feed::Atom' => 0, 224 'Wiki::Toolkit::Feed::RSS' => 0, 225 'Wiki::Toolkit::Formatter::UseMod' => 0, 226 'Wiki::Toolkit::Plugin::Categoriser' => 0, 227 'Wiki::Toolkit::Plugin::Diff' => 0, 228 'Wiki::Toolkit::Plugin::Locator::Grid'=> 0, 229 'Wiki::Toolkit::Plugin::RSS::Reader' => 0, 230 'Class::Accessor' => 0, 231 'Config::Tiny' => 0, 232 'Data::Dumper' => 0, 233 $drivers{$dbtype} => 0, 234 'File::Spec::Functions' => 0, 235 'File::Temp' => 0, 236 'Geography::NationalGrid' => 0, 237 'LWP::Simple' => 0, 238 'Parse::RecDescent' => 0, 239 $search_module => 0, 240 'POSIX' => 0, 241 'Template' => 0, 242 'Test::MockObject' => '0.07', # earlier doesn't use 'mock' 243 'Time::Piece' => 0, 244 'URI::Escape' => 0, 245 'XML::RSS' => 0, 246 246 }, 247 247 build_requires => { -
trunk/Changes
r784 r785 1 1 "#" items refer to tickets. See <http://dev.openguides.org/report/9> for details. 2 2 3 0.5 5???3 0.54_01 ??? 4 4 Support for Atom feeds for RecentChanges. 5 #118 Use Wiki::Toolkit 5 #118 Use Wiki::Toolkit. NOTE this is a development snapshot and is 6 not suitable for production use. It may eat your data! Tests on 7 development mirrors of live data are highly welcomed; the underlying 8 database schema provided by Wiki::Toolkit has changed and the upgrade 9 process needs some rigorous testing. 6 10 7 11 0.54 21 April 2006 -
trunk/INSTALL
r777 r785 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 … … 351 351 programs, it isn't appropriate to run them again. So we will make use of 352 352 the utility program "cgi-wiki-setupdb" which is included with the 353 CGI::Wikidistribution. Documentation for this command can be found in353 Wiki::Toolkit distribution. Documentation for this command can be found in 354 354 its man page; run this with the appropriate arguments to create the 355 355 new database. -
trunk/PREREQUISITES
r784 r785 1 Modules required by OpenGuides 0.54 2 =================================== 1 Modules required by OpenGuides 0.54_01 2 ====================================== 3 3 4 4 Algorithm::Diff (version 0.13 or later. Note that the latest version uses … … 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::Atom 12 CGI::Wiki::Plugin::Categoriser 13 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 10 Wiki::Toolkit::Feed::Atom 11 Wiki::Toolkit::Feed::RSS 12 Wiki::Toolkit::Formatter::UseMod 13 Wiki::Toolkit::Plugin::Categoriser 14 Wiki::Toolkit::Plugin::Diff 15 Wiki::Toolkit::Plugin::Locator::Grid 16 Wiki::Toolkit::Plugin::RSS::Reader 17 17 Class::Accessor 18 18 Config::Tiny -
trunk/README
r736 r785 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 -
trunk/lib/OpenGuides.pm
r784 r785 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 -
trunk/lib/OpenGuides/Build.pm
r606 r785 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 $@; -
trunk/lib/OpenGuides/Feed.pm
r784 r785 6 6 $VERSION = '0.01'; 7 7 8 use CGI::Wiki::Plugin::Atom;9 use CGI::Wiki::Plugin::RSS::ModWiki;8 use Wiki::Toolkit::Feed::Atom; 9 use Wiki::Toolkit::Feed::RSS; 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::Feed::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::Feed::RSS->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::Feed::RSS> 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::Feed::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::Feed::RSS> and L<Wiki::Toolkit::Feed::Atom> 219 219 220 220 =item * L<http://openguides.org/> -
trunk/lib/OpenGuides/RDF.pm
r767 r785 6 6 $VERSION = '0.09'; 7 7 8 use CGI::Wiki::Plugin::RSS::ModWiki;9 8 use Time::Piece; 10 9 use URI::Escape; … … 23 22 my $wiki = $args{wiki}; 24 23 25 unless ( $wiki && UNIVERSAL::isa( $wiki, " CGI::Wiki" ) ) {26 croak "No CGI::Wikiobject supplied.";24 unless ( $wiki && UNIVERSAL::isa( $wiki, "Wiki::Toolkit" ) ) { 25 croak "No Wiki::Toolkit object supplied."; 27 26 } 28 27 $self->{wiki} = $wiki; … … 106 105 107 106 # Make a Time::Piece object. 108 my $timestamp_fmt = $ CGI::Wiki::Store::Database::timestamp_fmt;107 my $timestamp_fmt = $Wiki::Toolkit::Store::Database::timestamp_fmt; 109 108 110 109 if ( $timestamp ) { … … 228 227 =head1 SYNOPSIS 229 228 230 use CGI::Wiki;229 use Wiki::Toolkit; 231 230 use OpenGuides::Config; 232 231 use OpenGuides::RDF; 233 232 234 my $wiki = CGI::Wiki->new( ... );233 my $wiki = Wiki::Toolkit->new( ... ); 235 234 my $config = OpenGuides::Config->new( file => "wiki.conf" ); 236 235 my $rdf_writer = OpenGuides::RDF->new( wiki => $wiki, … … 250 249 config => $config ); 251 250 252 C<wiki> must be a L< CGI::Wiki> object and C<config> must be an251 C<wiki> must be a L<Wiki::Toolkit> object and C<config> must be an 253 252 L<OpenGuides::Config> object. Both arguments mandatory. 254 253 … … 269 268 B<Note:> Some of the fields emitted by the RDF/XML generator are taken 270 269 from the node metadata. The form of this metadata is I<not> mandated 271 by L< CGI::Wiki>. Your wiki application should make sure to store some or270 by L<Wiki::Toolkit>. Your wiki application should make sure to store some or 272 271 all of the following metadata when calling C<write_node>: 273 272 … … 296 295 =over 4 297 296 298 =item * L< CGI::Wiki>297 =item * L<Wiki::Toolkit> 299 298 300 299 =item * L<http://openguides.org/> -
trunk/lib/OpenGuides/Search.pm
r716 r785 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 ) { -
trunk/lib/OpenGuides/Template.pm
r782 r785 238 238 239 239 Picks out things like categories, locales, phone number etc from 240 EITHER the metadata hash returned by L< CGI::Wiki> OR the query240 EITHER the metadata hash returned by L<Wiki::Toolkit> OR the query 241 241 parameters in a L<CGI> object, and packages them nicely for passing to 242 templates or storing in L< CGI::Wiki> datastore. If you supply both242 templates or storing in L<Wiki::Toolkit> datastore. If you supply both 243 243 C<metadata> and C<cgi_obj> then C<metadata> will take precedence, but 244 244 don't do that. -
trunk/lib/OpenGuides/Test.pm
r594 r785 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 -
trunk/lib/OpenGuides/UK/PubCrawl.pm
r202 r785 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 }; -
trunk/lib/OpenGuides/Utils.pm
r730 r785 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
