Merge branch 'master' into survey
* master: (127 commits) Prefill in the email address in the ITransact credentials form from the user's Shop address. fixed Matrix best/worst rated lists Fix bad form variable for phone number in EMS Badge address info. - Added a switch to allow the use of non-WebGUI objects with the Workflow fixing a problem with previous survey fix fixed #9671: Survey - breaks admin bar fixed a Matrix sql problem i18n the image labels and title for the asset manager, manage screen. Prevent an imported package from changing the a current asset's status from pending to anything else. Remove trailing comma in Shop/Transaction JS so IE6 works. fixed documentation fixed a bug when a matrix listing didn't have a forum attached small char encoding fix to merged upgrade fix small issue in addChild adding merge point Fix a problem with purging an EMS. Update this template so that it passes the template i18n test. Fix a broken i18n label in answer edit template for the Survey. Unify all Survey CSS into 1 file, and use it. Adding/fixing Survey i18n and Help ... Conflicts: lib/WebGUI/Asset/Wobject/Survey.pm lib/WebGUI/Asset/Wobject/Survey/ResponseJSON.pm lib/WebGUI/i18n/English/Asset_Survey.pm www/extras/wobject/Survey/editsurvey/object.js
This commit is contained in:
commit
b0c5c09461
127 changed files with 5481 additions and 677 deletions
|
|
@ -1,6 +1,61 @@
|
|||
7.6.11
|
||||
- Added a switch to allow the use of non-WebGUI objects with the Workflow
|
||||
engine.
|
||||
- fixed #9579: initialize keyword field because get fills it in now due to a recent code change
|
||||
- fixed #9596: caching now takes into account the correct parameter for pagination
|
||||
- fixed #9596: Articles now use a semi-unique pagination variable based on asset id
|
||||
- fixed: Syndicated Content asset doesn't work with feeds that specify their encodings via HTTP headers
|
||||
- fixed #9375: Syndicated Content asset improperly decodes wide XML entities
|
||||
- fixed #9592: DataForm deleteAttachedFiles method can crash
|
||||
- fixed #9580: Gallery: albums shown in navigation
|
||||
- fixed #9578: Use of "quotes" in badge name causes error
|
||||
- fixed #9603: moving wiki page
|
||||
- fixed #9302: Spectre Problem...
|
||||
- fixed #9635: Matrix - Add attributes not working
|
||||
- fixed #9597: Survey 2.0 Help not complete
|
||||
- fixed: Many child assets, including WikiPage, Post and Event, will no longer let you add or paste them in places where they do not belong.
|
||||
- fixed: Hardcoded extras url in templates and in extra head tags in assets were replaced with the Extras macro.
|
||||
- fixed: Fixed bad gateway macros in the Matrix templates.
|
||||
- fixed #9535: Bad characters in dom element ids when generated from assetId
|
||||
- fixed #9542: Default WebGUI config contains invalid workflow activity
|
||||
- fixed #9623: preload.custom paths not included during upgrade
|
||||
- fixed #9638: Survey - Submit of survey creates new demo
|
||||
- fixed #9669: Folder: synopsis var of a subfolder broken
|
||||
- fixed #9658: gallery advanced search dates do not work
|
||||
- fixed #8965: Dashboard update profile url wrong
|
||||
- fixed #9050: Safari Hover Help Hosed (and funny survey hover help in Firefox)
|
||||
- fixed #9675: gallary search list displays wrong date for pictures
|
||||
- fixed: Added survey.css as a snippet. Had been left out.
|
||||
- fixed: Permissions aren't correctly applied to Article attachments
|
||||
- fixed #9681: Form-related template errors in gallery
|
||||
- fixed #9683: Problem with EMS related workflow
|
||||
- fixed #9611: Transaction Manage View, no go in ie6 (Henry Tang, Long Term Results B.v.)
|
||||
- fixed #9686: Importing a package twice locks assets forever.
|
||||
- fixed #9671: Survey - breaks admin bar
|
||||
- fixed #9702: Phone number on EMS badges not saving
|
||||
- fixed: Email address is not filled in for ITransact credentials.
|
||||
|
||||
7.6.10
|
||||
- fixed #9577: WebGUI::Form::Url::getValue returns blank rather than undef for blank fields
|
||||
- added test for splitTag function recently added to HTML module
|
||||
- fixed #9455: fixed synopsis to pick out html paragraphs, fixed FeedPP fields to scalar when blank
|
||||
- fixed: With autocommit and no comments on, making a shortcut of an asset takes you to that asset's view.
|
||||
- fixed #9506: Choose billing address
|
||||
- fixed #9541: assets with uncommitted parent.
|
||||
- reverted #9386: Gallery: "Image resolutions" issue. This is a feature of the Galley.
|
||||
- fixed #9236: Survey 2.0 missing hoverhelp
|
||||
- added: Widget Macro now uses a style, defaulting to the users.
|
||||
- added ability to select which rich editor is used to compose messages in the inbox
|
||||
- removed random questions display from Survey Questions Edit template until
|
||||
that feature is added.
|
||||
- fixed #9115: WebGUI::ProfileField->formField doesn't always show the submitted value
|
||||
- fixed: utf8 issues with Survey should be correct. JSON fields are now longText instead of longBlob.
|
||||
- fixed #9522: Time tracker does not display
|
||||
- fixed #9215: Survey 2.0 results screens missing
|
||||
- fixed #9018: orphan workflows from upgrade.
|
||||
|
||||
7.6.9
|
||||
- fixed: ukplayer example is now loaded with swfobject.js released under the
|
||||
MIT licence, see gotcha's and /extras/ukplayer
|
||||
- fixed: ukplayer example is now loaded with swfobject.js released under the MIT licence, see gotcha's and /extras/ukplayer
|
||||
- fixed #9264: new slideShow.swf uploaded in extras/ukplayer (United Knowledge/Arjan Widlak)
|
||||
- fixed #9428: added code to ASSET::get to include keywords when no property name is requested
|
||||
- marked sbin scripts as executable
|
||||
|
|
@ -10,8 +65,10 @@
|
|||
- fixed a bug where no Payment Gateway labels show up when checking out.
|
||||
- fixed #9511: Subcategories displayed incorrectly (Henry Tang, Long Term Results B.v.)
|
||||
- fixed #4137: Calendar Search page has head tags in body
|
||||
- reverted #9386: Gallery: "Image resolutions" issue. This is a feature of the Galley.
|
||||
- fixed: HTTP Proxy doesn't serve new content to visitors
|
||||
- fixed: Exporting to static files can leak large amounts of memory
|
||||
- fixed: Paginator generates bad markup for next page links
|
||||
|
||||
7.6.8
|
||||
- added #!/usr/bin/env perl to all utility scripts
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -7,6 +7,11 @@ upgrading from one version to the next, or even between multiple
|
|||
versions. Be sure to heed the warnings contained herein as they will
|
||||
save you many hours of grief.
|
||||
|
||||
7.6.10
|
||||
--------------------------------------------------------------------
|
||||
* The Survey JSON fields (Survey.surveyJSON and Survey_response.responseJSON)
|
||||
will alter to longText from LongBlob's.
|
||||
|
||||
7.6.9
|
||||
--------------------------------------------------------------------
|
||||
* The ukplayer example, slideshow.html in /extras/ukplayer, used
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
BIN
docs/upgrades/packages-7.5.40-7.6.10/merged.wgpkg
Normal file
BIN
docs/upgrades/packages-7.5.40-7.6.10/merged.wgpkg
Normal file
Binary file not shown.
Binary file not shown.
BIN
docs/upgrades/packages-7.6.10/root_import_matrix.wgpkg
Normal file
BIN
docs/upgrades/packages-7.6.10/root_import_matrix.wgpkg
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
docs/upgrades/packages-7.6.11/matrix-default-view-template.wgpkg
Normal file
BIN
docs/upgrades/packages-7.6.11/matrix-default-view-template.wgpkg
Normal file
Binary file not shown.
BIN
docs/upgrades/packages-7.6.11/matrix-search-template.wgpkg
Normal file
BIN
docs/upgrades/packages-7.6.11/matrix-search-template.wgpkg
Normal file
Binary file not shown.
BIN
docs/upgrades/packages-7.6.11/root_import_account.wgpkg
Normal file
BIN
docs/upgrades/packages-7.6.11/root_import_account.wgpkg
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
docs/upgrades/packages-7.6.11/survey.css.wgpkg
Normal file
BIN
docs/upgrades/packages-7.6.11/survey.css.wgpkg
Normal file
Binary file not shown.
|
|
@ -23,6 +23,7 @@ use WebGUI::Session;
|
|||
use WebGUI::Storage;
|
||||
use WebGUI::Asset;
|
||||
use WebGUI::Asset::Sku::Product;
|
||||
use WebGUI::Utility qw(isIn);
|
||||
|
||||
|
||||
my $toVersion = '7.6.0';
|
||||
|
|
|
|||
1874
docs/upgrades/upgrade_7.5.40-7.6.10.pl
Normal file
1874
docs/upgrades/upgrade_7.5.40-7.6.10.pl
Normal file
File diff suppressed because it is too large
Load diff
198
docs/upgrades/upgrade_7.6.10-7.6.11.pl
Normal file
198
docs/upgrades/upgrade_7.6.10-7.6.11.pl
Normal file
|
|
@ -0,0 +1,198 @@
|
|||
#!/usr/bin/env perl
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
#-------------------------------------------------------------------
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
# this software.
|
||||
#-------------------------------------------------------------------
|
||||
# http://www.plainblack.com info@plainblack.com
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
our ($webguiRoot);
|
||||
|
||||
BEGIN {
|
||||
$webguiRoot = "../..";
|
||||
unshift (@INC, $webguiRoot."/lib");
|
||||
}
|
||||
|
||||
use strict;
|
||||
use Getopt::Long;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::Storage;
|
||||
use WebGUI::Asset;
|
||||
use WebGUI::Asset::Wobject::GalleryAlbum;
|
||||
|
||||
|
||||
my $toVersion = '7.6.11';
|
||||
my $quiet; # this line required
|
||||
|
||||
|
||||
my $session = start(); # this line required
|
||||
hideGalleryAlbums($session);
|
||||
removeBrokenWorkflowInstances($session);
|
||||
undotBinaryExtensions($session);
|
||||
removeProcessRecurringPaymentsFromConfig($session);
|
||||
noSessionSwitch($session);
|
||||
|
||||
fixDottedAssetIds($session); ##This one should run last
|
||||
finish($session); # this line required
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
sub noSessionSwitch {
|
||||
my $session = shift;
|
||||
print "\tAdding noSession switch to Workflow Instances..." unless $quiet;
|
||||
$session->db->write("alter table WorkflowInstance add column noSession boolean not null default 0");
|
||||
print "DONE!\n" unless $quiet;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
sub removeProcessRecurringPaymentsFromConfig {
|
||||
my $session = shift;
|
||||
print "\tRemoving old ProcessRecurringPayments workflow activity from config..." unless $quiet;
|
||||
|
||||
$session->config->deleteFromArray('workflowActivities/None',
|
||||
'WebGUI::Workflow::Activity::ProcessRecurringPayments');
|
||||
|
||||
print "Done.\n" unless $quiet;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
sub hideGalleryAlbums {
|
||||
my $session = shift;
|
||||
print "\tHiding all Gallery Albums from Navigation... " unless $quiet;
|
||||
# and here's our code
|
||||
my $getAnAlbum = WebGUI::Asset::Wobject::GalleryAlbum->getIsa($session);
|
||||
while (my $album = $getAnAlbum->()) {
|
||||
$album->update({}); ##The album will do the hiding automatically now
|
||||
}
|
||||
print "DONE!\n" unless $quiet;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
sub undotBinaryExtensions {
|
||||
my $session = shift;
|
||||
print "\tRemoving dots from list of exportBinaryExtensions... " unless $quiet;
|
||||
# and here's our code
|
||||
my $extensions = $session->config->get('exportBinaryExtensions');
|
||||
my @newExtensions = map { s/\.//; $_ } @{ $extensions };
|
||||
$session->config->set('exportBinaryExtensions', \@newExtensions);
|
||||
print "DONE!\n" unless $quiet;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
sub fixDottedAssetIds {
|
||||
my $session = shift;
|
||||
print "\tRemoving dots from Asset IDs... " unless $quiet;
|
||||
my @assetIds = $session->db->buildArray("select distinct(assetId) from asset where assetId like '%.%'");
|
||||
my %assetIds = map { my $id = $_; $id =~ tr/./-/; $_ => $id } @assetIds;
|
||||
# and here's our code
|
||||
while (my ($fromId, $toId) = each %assetIds) {
|
||||
$session->db->write('UPDATE `assetData` SET `assetId`=? WHERE `assetId`=?', [$toId, $fromId]);
|
||||
$session->db->write('UPDATE `asset` SET `assetId`=? WHERE `assetId`=?', [$toId, $fromId]);
|
||||
$session->db->write('UPDATE `assetIndex` SET `assetId`=? WHERE `assetId`=?', [$toId, $fromId]);
|
||||
$session->db->write('UPDATE `wobject` SET `assetId`=? WHERE `assetId`=?', [$toId, $fromId]);
|
||||
$session->db->write('UPDATE `Folder` SET `assetId`=? WHERE `assetId`=?', [$toId, $fromId]);
|
||||
$session->db->write('UPDATE `Navigation` SET `assetId`=? WHERE `assetId`=?', [$toId, $fromId]);
|
||||
$session->db->write('UPDATE `FileAsset` SET `assetId`=? WHERE `assetId`=?', [$toId, $fromId]);
|
||||
$session->db->write('UPDATE `ImageAsset` SET `assetId`=? WHERE `assetId`=?', [$toId, $fromId]);
|
||||
$session->db->write('UPDATE `snippet` SET `assetId`=? WHERE `assetId`=?', [$toId, $fromId]);
|
||||
|
||||
$session->db->write('UPDATE `asset` SET `parentId`=? WHERE `parentId`=?', [$toId, $fromId]);
|
||||
}
|
||||
print "DONE!\n" unless $quiet;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
sub removeBrokenWorkflowInstances {
|
||||
my $session = shift;
|
||||
print "\tRemove Workflow Instances whose Workflows have been deleted... " unless $quiet;
|
||||
# and here's our code
|
||||
my $instances = WebGUI::Workflow::Instance->getAllInstances($session);
|
||||
foreach my $instance (@{ $instances }) {
|
||||
my $workflow = $instance->getWorkflow;
|
||||
$instance->delete('skipNotify') if !defined $workflow;
|
||||
}
|
||||
print "DONE!\n" unless $quiet;
|
||||
}
|
||||
|
||||
# -------------- DO NOT EDIT BELOW THIS LINE --------------------------------
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Add a package to the import node
|
||||
sub addPackage {
|
||||
my $session = shift;
|
||||
my $file = shift;
|
||||
|
||||
# Make a storage location for the package
|
||||
my $storage = WebGUI::Storage->createTemp( $session );
|
||||
$storage->addFileFromFilesystem( $file );
|
||||
|
||||
# Import the package into the import node
|
||||
my $package = WebGUI::Asset->getImportNode($session)->importPackage( $storage );
|
||||
|
||||
# Make the package not a package anymore
|
||||
$package->update({ isPackage => 0 });
|
||||
|
||||
# Set the default flag for templates added
|
||||
my $assetIds
|
||||
= $package->getLineage( ['self','descendants'], {
|
||||
includeOnlyClasses => [ 'WebGUI::Asset::Template' ],
|
||||
} );
|
||||
for my $assetId ( @{ $assetIds } ) {
|
||||
my $asset = WebGUI::Asset->newByDynamicClass( $session, $assetId );
|
||||
if ( !$asset ) {
|
||||
print "Couldn't instantiate asset with ID '$assetId'. Please check package '$file' for corruption.\n";
|
||||
next;
|
||||
}
|
||||
$asset->update( { isDefault => 1 } );
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
#-------------------------------------------------
|
||||
sub start {
|
||||
my $configFile;
|
||||
$|=1; #disable output buffering
|
||||
GetOptions(
|
||||
'configFile=s'=>\$configFile,
|
||||
'quiet'=>\$quiet
|
||||
);
|
||||
my $session = WebGUI::Session->open($webguiRoot,$configFile);
|
||||
$session->user({userId=>3});
|
||||
my $versionTag = WebGUI::VersionTag->getWorking($session);
|
||||
$versionTag->set({name=>"Upgrade to ".$toVersion});
|
||||
return $session;
|
||||
}
|
||||
|
||||
#-------------------------------------------------
|
||||
sub finish {
|
||||
my $session = shift;
|
||||
updateTemplates($session);
|
||||
my $versionTag = WebGUI::VersionTag->getWorking($session);
|
||||
$versionTag->commit;
|
||||
$session->db->write("insert into webguiVersion values (".$session->db->quote($toVersion).",'upgrade',".$session->datetime->time().")");
|
||||
$session->close();
|
||||
}
|
||||
|
||||
#-------------------------------------------------
|
||||
sub updateTemplates {
|
||||
my $session = shift;
|
||||
return undef unless (-d "packages-".$toVersion);
|
||||
print "\tUpdating packages.\n" unless ($quiet);
|
||||
opendir(DIR,"packages-".$toVersion);
|
||||
my @files = readdir(DIR);
|
||||
closedir(DIR);
|
||||
my $newFolder = undef;
|
||||
foreach my $file (@files) {
|
||||
next unless ($file =~ /\.wgpkg$/);
|
||||
# Fix the filename to include a path
|
||||
$file = "packages-" . $toVersion . "/" . $file;
|
||||
addPackage( $session, $file );
|
||||
}
|
||||
}
|
||||
|
||||
#vim:ft=perl
|
||||
|
|
@ -27,6 +27,7 @@ use WebGUI::Asset::Wobject::Survey;
|
|||
use WebGUI::Asset::Wobject::Survey::SurveyJSON;
|
||||
use WebGUI::Asset::Wobject::Survey::ResponseJSON;
|
||||
use WebGUI::ProfileField;
|
||||
use WebGUI::Utility qw(isIn);
|
||||
use JSON;
|
||||
|
||||
my $toVersion = '7.6.4';
|
||||
|
|
|
|||
146
docs/upgrades/upgrade_7.6.9-7.6.10.pl
Normal file
146
docs/upgrades/upgrade_7.6.9-7.6.10.pl
Normal file
|
|
@ -0,0 +1,146 @@
|
|||
#!/usr/bin/env perl
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
#-------------------------------------------------------------------
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
# this software.
|
||||
#-------------------------------------------------------------------
|
||||
# http://www.plainblack.com info@plainblack.com
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
our ($webguiRoot);
|
||||
|
||||
BEGIN {
|
||||
$webguiRoot = "../..";
|
||||
unshift (@INC, $webguiRoot."/lib");
|
||||
}
|
||||
|
||||
use strict;
|
||||
use Getopt::Long;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::Storage;
|
||||
use WebGUI::Asset;
|
||||
|
||||
|
||||
my $toVersion = '7.6.10';
|
||||
my $quiet; # this line required
|
||||
|
||||
|
||||
my $session = start(); # this line required
|
||||
|
||||
# upgrade functions go here
|
||||
addRichEditorInboxSetting( $session );
|
||||
alterSurveyJSONFields($session);
|
||||
|
||||
|
||||
finish($session); # this line required
|
||||
|
||||
#Change the Survey and Survey_response tables' json fields to longText instead of longBlob to get back non-binary text
|
||||
#----------------------------------------------------------------------------
|
||||
sub alterSurveyJSONFields{
|
||||
my $session = shift;
|
||||
$session->db->write("alter table Survey modify surveyJSON longText");
|
||||
$session->db->write("alter table Survey_response modify responseJSON longText");
|
||||
}
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Describe what our function does
|
||||
#sub exampleFunction {
|
||||
# my $session = shift;
|
||||
# print "\tWe're doing some stuff here that you should know about... " unless $quiet;
|
||||
# # and here's our code
|
||||
# print "DONE!\n" unless $quiet;
|
||||
#}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Add ability to select which rich editor for messages between users
|
||||
sub addRichEditorInboxSetting {
|
||||
my $session = shift;
|
||||
print "\tAdding rich editor selection to Inbox... " unless $quiet;
|
||||
|
||||
$session->setting->add("inboxRichEditId","PBrichedit000000000001");
|
||||
|
||||
print "DONE!\n" unless $quiet;
|
||||
}
|
||||
|
||||
# -------------- DO NOT EDIT BELOW THIS LINE --------------------------------
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Add a package to the import node
|
||||
sub addPackage {
|
||||
my $session = shift;
|
||||
my $file = shift;
|
||||
|
||||
# Make a storage location for the package
|
||||
my $storage = WebGUI::Storage->createTemp( $session );
|
||||
$storage->addFileFromFilesystem( $file );
|
||||
|
||||
# Import the package into the import node
|
||||
my $package = WebGUI::Asset->getImportNode($session)->importPackage( $storage );
|
||||
|
||||
# Make the package not a package anymore
|
||||
$package->update({ isPackage => 0 });
|
||||
|
||||
# Set the default flag for templates added
|
||||
my $assetIds
|
||||
= $package->getLineage( ['self','descendants'], {
|
||||
includeOnlyClasses => [ 'WebGUI::Asset::Template' ],
|
||||
} );
|
||||
for my $assetId ( @{ $assetIds } ) {
|
||||
my $asset = WebGUI::Asset->newByDynamicClass( $session, $assetId );
|
||||
if ( !$asset ) {
|
||||
print "Couldn't instantiate asset with ID '$assetId'. Please check package '$file' for corruption.\n";
|
||||
next;
|
||||
}
|
||||
$asset->update( { isDefault => 1 } );
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
#-------------------------------------------------
|
||||
sub start {
|
||||
my $configFile;
|
||||
$|=1; #disable output buffering
|
||||
GetOptions(
|
||||
'configFile=s'=>\$configFile,
|
||||
'quiet'=>\$quiet
|
||||
);
|
||||
my $session = WebGUI::Session->open($webguiRoot,$configFile);
|
||||
$session->user({userId=>3});
|
||||
my $versionTag = WebGUI::VersionTag->getWorking($session);
|
||||
$versionTag->set({name=>"Upgrade to ".$toVersion});
|
||||
return $session;
|
||||
}
|
||||
|
||||
#-------------------------------------------------
|
||||
sub finish {
|
||||
my $session = shift;
|
||||
updateTemplates($session);
|
||||
my $versionTag = WebGUI::VersionTag->getWorking($session);
|
||||
$versionTag->commit;
|
||||
$session->db->write("insert into webguiVersion values (".$session->db->quote($toVersion).",'upgrade',".$session->datetime->time().")");
|
||||
$session->close();
|
||||
}
|
||||
|
||||
#-------------------------------------------------
|
||||
sub updateTemplates {
|
||||
my $session = shift;
|
||||
return undef unless (-d "packages-".$toVersion);
|
||||
print "\tUpdating packages.\n" unless ($quiet);
|
||||
opendir(DIR,"packages-".$toVersion);
|
||||
my @files = readdir(DIR);
|
||||
closedir(DIR);
|
||||
my $newFolder = undef;
|
||||
foreach my $file (@files) {
|
||||
next unless ($file =~ /\.wgpkg$/);
|
||||
# Fix the filename to include a path
|
||||
$file = "packages-" . $toVersion . "/" . $file;
|
||||
addPackage( $session, $file );
|
||||
}
|
||||
}
|
||||
|
||||
#vim:ft=perl
|
||||
Loading…
Add table
Add a link
Reference in a new issue