Add top-level keywords, which allows for hierarchial categorization of wiki pages.
This commit is contained in:
parent
1a77fce843
commit
55d2e510d6
8 changed files with 489 additions and 1 deletions
BIN
docs/upgrades/packages-7.9.3/default-wiki-front-page.wgpkg
Normal file
BIN
docs/upgrades/packages-7.9.3/default-wiki-front-page.wgpkg
Normal file
Binary file not shown.
|
|
@ -31,6 +31,7 @@ my $quiet; # this line required
|
|||
my $session = start(); # this line required
|
||||
|
||||
reindexSiteForDefaultSynopsis( $session );
|
||||
addTopLevelWikiKeywords( $session );
|
||||
|
||||
finish($session); # this line required
|
||||
|
||||
|
|
@ -44,6 +45,24 @@ finish($session); # this line required
|
|||
# print "DONE!\n" unless $quiet;
|
||||
#}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
sub addTopLevelWikiKeywords {
|
||||
my $session = shift;
|
||||
print "\tAdding top level keywords page to WikiMaster... " unless $quiet;
|
||||
|
||||
my $sth = $session->db->read('DESCRIBE `WikiMaster`');
|
||||
while (my ($col) = $sth->array) {
|
||||
if ($col eq 'topLevelKeywords') {
|
||||
print "Skipped.\n" unless $quiet;
|
||||
return;
|
||||
}
|
||||
}
|
||||
$session->db->write('ALTER TABLE WikiMaster ADD COLUMN topLevelKeywords LONGTEXT');
|
||||
|
||||
print "Done.\n" unless $quiet;
|
||||
}
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Reindex the site to clear out default synopsis
|
||||
sub reindexSiteForDefaultSynopsis {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue