- Added Comments asset aspect, which allows comments to be added to any asset
easily. - Added comments aspect to wiki.
This commit is contained in:
parent
57e3255a97
commit
e7c6fe6cae
13 changed files with 590 additions and 26 deletions
|
|
@ -11,6 +11,9 @@
|
|||
- fixed: Thingy list type form elements do not support key/value pairs (SDH
|
||||
Consulting Group)
|
||||
- rfe: enable/disable pagination in asset manager (#756)
|
||||
- Added Comments asset aspect, which allows comments to be added to any asset
|
||||
easily.
|
||||
- Added comments aspect to wiki.
|
||||
- Removed cart icon from ViewCart macro.
|
||||
- Updated WebGUI::Shop::PayDriver::processTransaction() to accept a
|
||||
transaction as a param.
|
||||
|
|
|
|||
BIN
docs/upgrades/packages-7.6.1/default-wiki-page.wgpkg
Normal file
BIN
docs/upgrades/packages-7.6.1/default-wiki-page.wgpkg
Normal file
Binary file not shown.
|
|
@ -32,16 +32,44 @@ addExportExtensionsToConfigFile($session);
|
|||
fixShortAssetIds( $session );
|
||||
addDataFormDataIndexes($session);
|
||||
addThingyColumns( $session );
|
||||
addCommentsAspect( $session );
|
||||
addCommentsAspectToWiki( $session );
|
||||
|
||||
finish($session); # this line required
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
sub addCommentsAspectToWiki {
|
||||
my $session = shift;
|
||||
print "\tAdding comments aspect to wiki..." unless $quiet;
|
||||
my $db = $session->db;
|
||||
my $pages = $db->read("select assetId,revisionDate from WikiPage");
|
||||
while (my ($id, $rev) = $pages->array) {
|
||||
$db->write("insert into assetAspectComments (assetId, revisionDate, comments, averageCommentRating) values (?,?,'[]',0)",[$id,$rev]);
|
||||
}
|
||||
print "Done.\n" unless $quiet;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
sub addCommentsAspect {
|
||||
my $session = shift;
|
||||
print "\tAdding comments asset aspect..." unless $quiet;
|
||||
$session->db->write("create table assetAspectComments (
|
||||
assetId char(22) binary not null,
|
||||
revisionDate bigint not null,
|
||||
comments mediumtext,
|
||||
averageCommentRating int,
|
||||
primary key (assetId, revisionDate)
|
||||
)");
|
||||
print "Done.\n" unless $quiet;
|
||||
}
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# make sure each config file has the extensions to export as-is. however, if
|
||||
# this system received a backport, leave the field as is.
|
||||
sub addExportExtensionsToConfigFile {
|
||||
my $session = shift;
|
||||
print "Adding binary export extensions to config file... " unless $quiet;
|
||||
print "\tAdding binary export extensions to config file... " unless $quiet;
|
||||
# skip if the field has been defined already by backporting
|
||||
return if defined $session->config->get('exportBinaryExtensions');
|
||||
|
||||
|
|
@ -53,6 +81,7 @@ sub addExportExtensionsToConfigFile {
|
|||
print "Done.\n" unless $quiet;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
sub fixShortAssetIds {
|
||||
print "Fixing assets with short ids... " unless $quiet;
|
||||
my %assetIds = (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue