Changeset 424
- Timestamp:
- 05/10/08 17:34:11 (5 years ago)
- Location:
- wiki-toolkit/trunk
- Files:
-
- 8 modified
-
Changes (modified) (1 diff)
-
lib/Wiki/Toolkit.pm (modified) (7 diffs)
-
lib/Wiki/Toolkit/Feed/Atom.pm (modified) (6 diffs)
-
lib/Wiki/Toolkit/Feed/Listing.pm (modified) (3 diffs)
-
lib/Wiki/Toolkit/Feed/RSS.pm (modified) (7 diffs)
-
lib/Wiki/Toolkit/Setup/Database.pm (modified) (4 diffs)
-
lib/Wiki/Toolkit/Store/Database.pm (modified) (10 diffs)
-
lib/Wiki/Toolkit/Store/Pg.pm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wiki-toolkit/trunk/Changes
r411 r424 7 7 any bugs that may have been introduced (I'm not convinced the test 8 8 suite covered everything it should have). 9 Fix some badly-formatted POD documentation which accidentally included 10 some code 9 11 10 12 0.74 9 June 2007 -
wiki-toolkit/trunk/lib/Wiki/Toolkit.pm
r408 r424 234 234 highest moderated version, then update the node's contents to hold 235 235 this version. 236 236 237 =cut 237 238 … … 255 256 When moderation is required, new versions of a node will sit about 256 257 until they're tagged as moderated, when they will become the new node. 258 257 259 =cut 258 260 … … 271 273 one, and re-writes any wiki links in these to point to the new name. If 272 274 required, it can mark these updates to other pages as a new version. 275 273 276 =cut 274 277 … … 416 419 metadata_type => "latitude" 417 420 ); 418 =cut 421 422 =cut 423 419 424 sub list_nodes_by_missing_metadata { 420 425 my ($self, @args) = @_; … … 460 465 Otherwise, all node versions (including old ones, and possibly multiple 461 466 per node) are returned. 467 462 468 =cut 463 469 … … 479 485 Returns all the versions of a node, optionally including the content 480 486 and metadata, as an array of hashes (newest versions first). 481 =cut 487 488 =cut 489 482 490 sub list_node_all_versions { 483 491 my ($self,@argsarray) = @_; … … 502 510 503 511 } 504 =cut 512 513 =cut 514 505 515 sub list_last_version_before { 506 516 my ($self,@argsarray) = @_; -
wiki-toolkit/trunk/lib/Wiki/Toolkit/Feed/Atom.pm
r372 r424 77 77 78 78 =cut 79 79 80 sub build_feed_start { 80 81 my ($self,$atom_timestamp) = @_; … … 118 119 119 120 =cut 121 120 122 sub build_feed_end { 121 123 my ($self,$feed_timestamp) = @_; … … 129 131 130 132 =cut 133 131 134 sub generate_node_list_feed { 132 135 my ($self,$atom_timestamp,@nodes) = @_; … … 217 220 218 221 =cut 222 219 223 sub generate_node_name_distance_feed { 220 224 my ($self,$atom_timestamp,@nodes) = @_; … … 262 266 263 267 =cut 268 264 269 sub feed_timestamp 265 270 { … … 285 290 286 291 =cut 292 287 293 sub parse_feed_timestamp { 288 294 my ($self, $feed_timestamp) = @_; -
wiki-toolkit/trunk/lib/Wiki/Toolkit/Feed/Listing.pm
r367 r424 193 193 # Utility method, to help with argument passing where one of a list of 194 194 # arguments must be supplied 195 # 195 196 #=cut 197 196 198 sub handle_supply_one_of { 197 199 my ($self,$mref,$aref) = @_; … … 250 252 251 253 =cut 254 252 255 sub parse_feed_timestamp { die("Not implemented by feed renderer!"); } 253 254 256 255 257 1; … … 279 281 under the same terms as Perl itself. 280 282 281 282 =cut 283 =cut -
wiki-toolkit/trunk/lib/Wiki/Toolkit/Feed/RSS.pm
r372 r424 66 66 67 67 =cut 68 68 69 sub build_feed_start { 69 70 my ($self,$feed_timestamp) = @_; … … 91 92 92 93 =cut 94 93 95 sub build_feed_mid { 94 96 my ($self,$feed_timestamp) = @_; … … 137 139 138 140 =cut 141 139 142 sub build_feed_end { 140 143 my ($self,$feed_timestamp) = @_; … … 149 152 150 153 =cut 154 151 155 sub generate_node_list_feed { 152 156 my ($self,$feed_timestamp,@nodes) = @_; … … 280 284 281 285 =cut 286 282 287 sub generate_node_name_distance_feed { 283 288 my ($self,$feed_timestamp,@nodes) = @_; … … 351 356 352 357 =cut 358 353 359 sub feed_timestamp { 354 360 my ($self, $newest_node) = @_; … … 383 389 384 390 =cut 391 385 392 sub parse_feed_timestamp { 386 393 my ($self, $feed_timestamp) = @_; -
wiki-toolkit/trunk/lib/Wiki/Toolkit/Setup/Database.pm
r319 r424 19 19 fetch_upgrade_old_to_9(@_); 20 20 } 21 21 22 # Fetch from the old style database, ready for an upgrade to db version 9 22 23 sub fetch_upgrade_old_to_9 { … … 101 102 return (\%nodes,\%contents,\%metadatas,\@internal_links,\%ids); 102 103 } 104 103 105 # Fetch from schema version 8, and upgrade to version 9 104 106 sub fetch_upgrade_8_to_9 { … … 168 170 } 169 171 170 171 172 # Get the version of the database schema 172 173 sub get_database_version { … … 201 202 } 202 203 } 203 204 204 205 205 # Put the latest data into the latest database structure -
wiki-toolkit/trunk/lib/Wiki/Toolkit/Store/Database.pm
r423 r424 24 24 $CAN_USE_ENCODE = $@ ? 0 : 1; 25 25 } 26 27 26 28 27 =head1 NAME … … 143 142 } 144 143 } 145 146 144 147 145 =item B<retrieve_node> … … 680 678 Uses the internal_links table to identify the nodes that link to this 681 679 one, and re-writes any wiki links in these to point to the new name. 682 =cut 680 681 =cut 682 683 683 sub rename_node { 684 684 my ($self, %args) = @_; … … 827 827 highest moderated version, then update the node's contents to hold 828 828 this version. 829 829 830 =cut 830 831 … … 928 929 929 930 Sets if new node versions will require moderation or not 931 930 932 =cut 931 933 … … 1700 1702 metadata_type => "latitude" 1701 1703 ); 1702 =cut 1704 1705 =cut 1706 1703 1707 sub list_nodes_by_missing_metadata { 1704 1708 my ($self, %args) = @_; … … 1746 1750 1747 1751 =item B<_get_list_by_metadata_sql> 1752 1748 1753 Return the SQL to do a match by metadata. Should expect the metadata type 1749 1754 as the first SQL parameter, and the metadata value as the second. 1750 1755 1751 1756 If possible, should take account of $args{ignore_case} 1752 =cut 1757 1758 =cut 1759 1753 1760 sub _get_list_by_metadata_sql { 1754 1761 # SQL 99 version … … 1775 1782 1776 1783 =item B<_get_list_by_missing_metadata_sql> 1784 1777 1785 Return the SQL to do a match by missing metadata. Should expect the metadata 1778 1786 type as the first SQL parameter. 1779 1787 1780 1788 If possible, should take account of $args{ignore_case} 1781 =cut 1789 1790 =cut 1791 1782 1792 sub _get_list_by_missing_metadata_sql { 1783 1793 # SQL 99 version … … 1889 1899 1890 1900 =item B<list_last_version_before> 1891 List the last version of every node before a given date. 1892 If no version existed before that date, will return undef for version. 1893 Returns a hash of id, name, version and date 1894 1895 my @nv = $wiki->list_last_version_before('2007-01-02 10:34:11') 1896 foreach my $data (@nv) { 1897 1898 } 1899 =cut 1901 1902 List the last version of every node before a given date. 1903 If no version existed before that date, will return undef for version. 1904 Returns a hash of id, name, version and date 1905 1906 my @nv = $wiki->list_last_version_before('2007-01-02 10:34:11') 1907 foreach my $data (@nv) { 1908 1909 } 1910 1911 =cut 1912 1900 1913 sub list_last_version_before { 1901 1914 my ($self, $date) = @_; … … 1931 1944 1932 1945 =item B<list_metadata_by_type> 1933 List all the currently defined values of the given type of metadata. 1934 1935 Will only work with the latest moderated version 1936 1937 # List all of the different metadata values with the type 'category' 1938 my @categories = $wiki->list_metadata_by_type('category'); 1939 =cut 1946 1947 List all the currently defined values of the given type of metadata. 1948 1949 Will only work with the latest moderated version 1950 1951 # List all of the different metadata values with the type 'category' 1952 my @categories = $wiki->list_metadata_by_type('category'); 1953 1954 =cut 1955 1940 1956 sub list_metadata_by_type { 1941 1957 my ($self, $type) = @_; -
wiki-toolkit/trunk/lib/Wiki/Toolkit/Store/Pg.pm
r378 r424 94 94 } 95 95 96 97 96 1;
