Merge branch 'master' into survey
* master: (121 commits) Fix a POD typo. correct inbox message from user preface Fix a typo in the Default gallery view template Documentation bug in buildArrayRefOfHashRefs changed screenshots in Matrix Listing view to popup matrix privileging fixes Fix an i18n typo in the Post user defined variables. Remove debugging code. approval workflow fix matrix upgrade and privileging fixes fixed: Template parser cannot be set forward porting gallery bug fixes preparing for 7.7.0 dev parser should be a selectbox, not a selectlist. labeling survey as beta fixeding my borkes to the changelog fixed #9852: Users can accept private messages from Visitor, but Visitor cannot send messages preparing for 7.6.14 release fix AdSpace, Ad tests Restore the original properties for the profile category that was modified for test. ... Conflicts: docs/gotcha.txt docs/upgrades/upgrade_7.6.10-7.6.11.pl lib/WebGUI/Asset/Wobject/Survey.pm lib/WebGUI/Asset/Wobject/Survey/SurveyJSON.pm
This commit is contained in:
commit
7ec5cab126
713 changed files with 4994 additions and 3058 deletions
|
|
@ -1,6 +1,57 @@
|
|||
7.7.0
|
||||
- fixed: Template parser cannot be set
|
||||
- fixed #9836: Matrix: Group to Add Listings is missing
|
||||
- fixed #9873: third-> first in post template help
|
||||
- fixed #9892: Typo in "Default Gallery View Album" Template [TEMPLATE]
|
||||
|
||||
7.6.14
|
||||
- fixed: IE6 shows Admin Bar over Asset Manager
|
||||
- fixed #9808: Search i18n
|
||||
- fixed #9818: deleteAttachedFiles bug (THE REVENGE)
|
||||
- fixed #9809: Pagination list up to 10/20: not working correctly on last pages.
|
||||
- fixed #9820: Survey: political party spelled wrong
|
||||
- fixed #9819: Survey: hoverhelp showing instead of field name
|
||||
- fixed #9822: Matrix: Wrong field label
|
||||
- fixed #9823: Matrix: no cancel button in add/edit listing
|
||||
|
||||
7.6.13
|
||||
- fixed AdSpace bug: impressions and clicks for most non-human web clients will not be counted.
|
||||
- fixed #9760: DataForm not working in demo.plainblack.com
|
||||
- fixed #9759: Delete Entry Button missing in Data Form
|
||||
- fixed #9767: FileAsset breaks 'null' rule for FileAsset table
|
||||
- fixed defaultValues of undef cause mysql5.1 to complain about columns that are set to be NOT NULL. 5.0 doesn't care.
|
||||
- International text retrieval has been optimized
|
||||
- fixed #9766: Thingy Pagination Broken
|
||||
- fixed #9779: Gallery: js for search (datepicker?) included in album view
|
||||
- fixed #9783: payment methods are not added
|
||||
- fixed #9785: Delete All button not working in Account/Inbox [TEMPLATE]
|
||||
- fixed #9803: Survey 2.0- Gradebook spelled wrong
|
||||
- fixed #9801: Survey 2.0- Template spelled wrong
|
||||
- fixed #9802: Survey Template field names to be consistent
|
||||
- fixed: HTMLForm generated forms have an extra double quote in the table tag.
|
||||
|
||||
7.6.12
|
||||
- fixed: During postback on a recurring transaction, the routine could error out instead of catching an error.
|
||||
- fixed: Do not show the Edit entry in the More menu in the asset manager if the asset is locked.
|
||||
- fixed #9677: no output from form helper template variable sticky.form and stick.label
|
||||
- fixed #9738: Gallery Title [TEMPLATE]
|
||||
- fixed #9739: Gallery Delete Album Template [TEMPLATE]
|
||||
- fixed #9737: Upgrade Missed a Config Option
|
||||
- fixed #9169: E-mail to Collab System creates invalid asset
|
||||
- fixed #9746: Shop: Add a new address unneeded extra click
|
||||
- fixed #9747: Account Contributions: URLs are wrong.
|
||||
- fixed #9749: Account Manager: AIM link
|
||||
- fixed #9751: Account Manager: problem sorting in Contributions
|
||||
- fixed #9750: Account Manager: Inbox Messages per Page [TEMPLATE]
|
||||
- fixed: If the Get Credentials template is deleted for the ITransact PayDriver, it now gives you an error message instead of throwing an error.
|
||||
- fixed: Collaboration groupToEditPost should not be blank
|
||||
- fixed: WebGUI::User->isInGroup had bad default groupId
|
||||
- fixed: Fix a layout problem in the Contributions, similar to the Inbox[TEMPLATE]
|
||||
|
||||
7.6.11
|
||||
- Added a switch to allow the use of non-WebGUI objects with the Workflow
|
||||
engine.
|
||||
- fixed: Asset Manager can generate URLs that are too long
|
||||
- fixed #9629: override stringify date format to use java default format.
|
||||
- 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
|
||||
|
|
|
|||
1724
docs/create.sql
1724
docs/create.sql
File diff suppressed because one or more lines are too long
|
|
@ -9,7 +9,8 @@ save you many hours of grief.
|
|||
|
||||
7.6.11
|
||||
--------------------------------------------------------------------
|
||||
* WebGUI now requires Params::Validate version 0.81 or greater.
|
||||
* If upgrading from WebGUI 7.5, you should upgrade to 7.5.40 first,
|
||||
then you can upgrade to WebGUI 7.6.11 and beyond.
|
||||
|
||||
7.6.10
|
||||
--------------------------------------------------------------------
|
||||
|
|
@ -74,12 +75,10 @@ save you many hours of grief.
|
|||
* WebGUI now requires XML::FeedPP version 0.36 or greater.
|
||||
|
||||
* The Syndicated Content asset has been heavily modified. Your templates
|
||||
and settings should automatically migrate, but in less than 1% of cases
|
||||
there will be problems that the migration cannot handle. Check your
|
||||
Syndicated Content assets after upgrade to ensure they are still
|
||||
working as expected.
|
||||
|
||||
* You must upgrade to 7.6.2 before you can upgrade to 7.6.3.
|
||||
and settings should automatically migrate, but in less than 1% of cases
|
||||
there will be problems that the migration cannot handle. Check your
|
||||
Syndicated Content assets after upgrade to ensure they are still
|
||||
working as expected.
|
||||
|
||||
7.6.1
|
||||
--------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
# WebGUI Legal Information #
|
||||
####################################################################
|
||||
|
||||
WebGUI is Copyright 2001-2008 Plain Black Corporation. All rights
|
||||
WebGUI is Copyright 2001-2009 Plain Black Corporation. All rights
|
||||
reserved.
|
||||
|
||||
WebGUI Content Engine, WebGUI Runtime Environment, and Plain Black
|
||||
|
|
@ -27,7 +27,7 @@ each file, or this file, or the license file. The notice at the top
|
|||
of each file looks like the following:
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
# WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
#-------------------------------------------------------------------
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env perl
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
# WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
#-------------------------------------------------------------------
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
|
|
|
|||
BIN
docs/upgrades/packages-7.6.12/default_post_form.wgpkg
Normal file
BIN
docs/upgrades/packages-7.6.12/default_post_form.wgpkg
Normal file
Binary file not shown.
BIN
docs/upgrades/packages-7.6.12/default_submission_form.wgpkg
Normal file
BIN
docs/upgrades/packages-7.6.12/default_submission_form.wgpkg
Normal file
Binary file not shown.
BIN
docs/upgrades/packages-7.6.12/faq_submission_form.wgpkg
Normal file
BIN
docs/upgrades/packages-7.6.12/faq_submission_form.wgpkg
Normal file
Binary file not shown.
BIN
docs/upgrades/packages-7.6.12/job_submission_form.wgpkg
Normal file
BIN
docs/upgrades/packages-7.6.12/job_submission_form.wgpkg
Normal file
Binary file not shown.
BIN
docs/upgrades/packages-7.6.12/link_list_submission_form.wgpkg
Normal file
BIN
docs/upgrades/packages-7.6.12/link_list_submission_form.wgpkg
Normal file
Binary file not shown.
BIN
docs/upgrades/packages-7.6.12/request-tracker-template2.wgpkg
Normal file
BIN
docs/upgrades/packages-7.6.12/request-tracker-template2.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.
Binary file not shown.
BIN
docs/upgrades/packages-7.6.14/matrix-default-view-template.wgpkg
Normal file
BIN
docs/upgrades/packages-7.6.14/matrix-default-view-template.wgpkg
Normal file
Binary file not shown.
BIN
docs/upgrades/packages-7.6.14/matrix-search-template.wgpkg
Normal file
BIN
docs/upgrades/packages-7.6.14/matrix-search-template.wgpkg
Normal file
Binary file not shown.
BIN
docs/upgrades/packages-7.6.14/matrix_equal-cols.js.wgpkg
Normal file
BIN
docs/upgrades/packages-7.6.14/matrix_equal-cols.js.wgpkg
Normal file
Binary file not shown.
BIN
docs/upgrades/packages-7.6.14/new-matrix_matrix-nav-tmpl.wgpkg
Normal file
BIN
docs/upgrades/packages-7.6.14/new-matrix_matrix-nav-tmpl.wgpkg
Normal file
Binary file not shown.
BIN
docs/upgrades/packages-7.6.14/new-matrix_matrix-nav.wgpkg
Normal file
BIN
docs/upgrades/packages-7.6.14/new-matrix_matrix-nav.wgpkg
Normal file
Binary file not shown.
BIN
docs/upgrades/packages-7.6.14/new-matrix_matrix.css.wgpkg
Normal file
BIN
docs/upgrades/packages-7.6.14/new-matrix_matrix.css.wgpkg
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
docs/upgrades/packages-7.7.0/matrix-default-screenshots.wgpkg
Normal file
BIN
docs/upgrades/packages-7.7.0/matrix-default-screenshots.wgpkg
Normal file
Binary file not shown.
BIN
docs/upgrades/packages-7.7.0/matrix-default-view-template.wgpkg
Normal file
BIN
docs/upgrades/packages-7.7.0/matrix-default-view-template.wgpkg
Normal file
Binary file not shown.
Binary file not shown.
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env perl
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
# WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
#-------------------------------------------------------------------
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env perl
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
# WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
#-------------------------------------------------------------------
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
|
|
@ -254,7 +254,7 @@ sub upgradeMatrix {
|
|||
my $session = shift;
|
||||
print "\tUpgrading matrix assets... \n" unless $quiet;
|
||||
my $db = $session->db;
|
||||
$db->write("alter table Matrix drop column groupToRate, drop column groupToAdd, drop column privilegedGroup,
|
||||
$db->write("alter table Matrix drop column groupToRate, drop column privilegedGroup,
|
||||
drop column ratingTimeout, drop column ratingTimeoutPrivileged, drop column ratingDetailTemplateId,
|
||||
drop column visitorCacheTimeout");
|
||||
$db->write("alter table Matrix add column defaultSort char(22) not null default 'score',
|
||||
|
|
@ -295,7 +295,8 @@ sub upgradeMatrix {
|
|||
$db->write("alter table Matrix_rating rename MatrixListing_rating");
|
||||
$db->write("alter table Matrix_ratingSummary rename MatrixListing_ratingSummary");
|
||||
$db->write("alter table Matrix_field rename Matrix_attribute");
|
||||
$db->write("alter table Matrix_attribute drop column label");
|
||||
$db->write("alter table Matrix_attribute drop column name");
|
||||
$db->write("alter table Matrix_attribute change label name char(255)");
|
||||
$db->write("alter table Matrix_attribute add column options text");
|
||||
$db->write("alter table Matrix_attribute change fieldType fieldType char(255) not null default 'MatrixCompare'");
|
||||
$db->write("alter table Matrix_attribute change fieldId attributeId char(22) not null");
|
||||
|
|
@ -336,6 +337,7 @@ sub upgradeMatrix {
|
|||
$listing->{title} = $listing->{productName};
|
||||
$listing->{version} = $listing->{versionNumber};
|
||||
$listing->{screenshots} = $listing->{storageId};
|
||||
$listing->{ownerUserId} = $listing->{maintainerId};
|
||||
$listing->{productURL} = $listing->{productUrl};
|
||||
$listing->{manufacturerURL} = $listing->{manufacturerUrl};
|
||||
my $newMatrixListing = $matrix->addChild($listing,undef,undef,{skipAutoCommitWorkflows=>1});
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env perl
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
# WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
#-------------------------------------------------------------------
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env perl
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
# WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
#-------------------------------------------------------------------
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env perl
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
# WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
#-------------------------------------------------------------------
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
|
|
@ -35,8 +35,7 @@ removeBrokenWorkflowInstances($session);
|
|||
undotBinaryExtensions($session);
|
||||
removeProcessRecurringPaymentsFromConfig($session);
|
||||
noSessionSwitch($session);
|
||||
surveyDoAfterTimeLimit($session);
|
||||
surveyRemoveResponseTemplate($session);
|
||||
addReCaptchaSettings($session);
|
||||
|
||||
fixDottedAssetIds($session); ##This one should run last
|
||||
finish($session); # this line required
|
||||
|
|
@ -61,6 +60,27 @@ sub removeProcessRecurringPaymentsFromConfig {
|
|||
print "Done.\n" unless $quiet;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
sub addReCaptchaSettings {
|
||||
my $session = shift;
|
||||
print "\tAdding settings for reCAPTCHA..." unless $quiet;
|
||||
my $currentSetting;
|
||||
|
||||
$currentSetting = $session->setting->get('useRecaptcha');
|
||||
$session->setting->remove('useRecaptcha');
|
||||
$session->setting->add('useRecaptcha', $currentSetting);
|
||||
|
||||
$currentSetting = $session->setting->get('recaptchaPublicKey');
|
||||
$session->setting->remove('recaptchaPublicKey');
|
||||
$session->setting->add('recaptchaPublicKey', $currentSetting);
|
||||
|
||||
$currentSetting = $session->setting->get('recaptchaPrivateKey');
|
||||
$session->setting->remove('recaptchaPrivateKey');
|
||||
$session->setting->add('recaptchaPrivateKey', $currentSetting);
|
||||
|
||||
print "Done.\n" unless $quiet;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
sub hideGalleryAlbums {
|
||||
my $session = shift;
|
||||
|
|
@ -84,26 +104,6 @@ sub undotBinaryExtensions {
|
|||
print "DONE!\n" unless $quiet;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
sub surveyDoAfterTimeLimit {
|
||||
my $session = shift;
|
||||
print "\tAdding column doAfterTimeLimit to Survey table... " unless $quiet;
|
||||
$session->db->write('alter table Survey add doAfterTimeLimit char(22)');
|
||||
print "DONE!\n" unless $quiet;
|
||||
print "DONE!\n" unless $quiet;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
sub surveyRemoveResponseTemplate {
|
||||
my $session = shift;
|
||||
print "\tRemoving responseTemplate... " unless $quiet;
|
||||
$session->db->write('alter table Survey drop responseTemplateId');
|
||||
if (my $template = WebGUI::Asset->new($session, 'PBtmpl0000000000000064')) {
|
||||
$template->purge();
|
||||
}
|
||||
print "DONE!\n" unless $quiet;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
sub fixDottedAssetIds {
|
||||
my $session = shift;
|
||||
|
|
|
|||
185
docs/upgrades/upgrade_7.6.11-7.6.12.pl
Normal file
185
docs/upgrades/upgrade_7.6.11-7.6.12.pl
Normal file
|
|
@ -0,0 +1,185 @@
|
|||
#!/usr/bin/env perl
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2009 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::Utility qw/isIn/;
|
||||
|
||||
|
||||
my $toVersion = '7.6.12';
|
||||
my $quiet; # this line required
|
||||
|
||||
|
||||
my $session = start(); # this line required
|
||||
addAssetDiscoveryServiceAgain( $session );
|
||||
changeMatrixAttributeIndexing( $session );
|
||||
fixCollaborationGroupToEditPost( $session );
|
||||
convertLongVarcharsToText( $session );
|
||||
|
||||
# upgrade functions go here
|
||||
|
||||
finish($session); # this line required
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# 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;
|
||||
#}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
sub convertLongVarcharsToText {
|
||||
my $session = shift;
|
||||
print "\tConverting Survey VARCHAR fields to TEXT... " unless $quiet;
|
||||
$session->db->write("ALTER TABLE Survey MODIFY COLUMN exitURL TEXT");
|
||||
$session->db->write("ALTER TABLE Survey_tempReport MODIFY COLUMN sectionName TEXT");
|
||||
$session->db->write("ALTER TABLE Survey_tempReport MODIFY COLUMN questionName TEXT");
|
||||
# and here's our code
|
||||
print "Done.\n" unless $quiet;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
sub addAssetDiscoveryServiceAgain {
|
||||
my $session = shift;
|
||||
print "\tAdding asset discovery service..." unless $quiet;
|
||||
my @handlers = @{ $session->config->get('contentHandlers') };
|
||||
if (isIn( 'WebGUI::Content::AssetDiscovery', @handlers) ) {
|
||||
print "Done.\n" unless $quiet;
|
||||
return;
|
||||
}
|
||||
my @newHandlers = ();
|
||||
foreach my $handler (@handlers) {
|
||||
if ($handler eq 'WebGUI::Content::Operation') {
|
||||
push @newHandlers, 'WebGUI::Content::AssetDiscovery';
|
||||
}
|
||||
push @newHandlers, $handler;
|
||||
}
|
||||
$session->config->set('contentHandlers', \@newHandlers);
|
||||
print "Done.\n" unless $quiet;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
sub changeMatrixAttributeIndexing {
|
||||
my $session = shift;
|
||||
print "\tChanging Matrix attribute indexing..." unless $quiet;
|
||||
$session->db->write("alter table MatrixListing_attribute drop primary key, add primary key(attributeId,matrixListingId)");
|
||||
print "Done.\n" unless $quiet;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Fix the groupToEditPost in the Collaboration (should not be "")
|
||||
sub fixCollaborationGroupToEditPost {
|
||||
my $session = shift;
|
||||
print "\tFixing group to edit post in Collaboration..." unless $quiet;
|
||||
# and here's our code
|
||||
$session->db->write(<<'SQL');
|
||||
UPDATE Collaboration
|
||||
SET groupToEditPost= (
|
||||
SELECT groupIdEdit FROM assetData
|
||||
WHERE assetData.assetId=Collaboration.assetId
|
||||
AND assetData.revisionDate = Collaboration.revisionDate
|
||||
)
|
||||
WHERE groupToEditPost = "";
|
||||
SQL
|
||||
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
|
||||
125
docs/upgrades/upgrade_7.6.12-7.6.13.pl
Normal file
125
docs/upgrades/upgrade_7.6.12-7.6.13.pl
Normal file
|
|
@ -0,0 +1,125 @@
|
|||
#!/usr/bin/env perl
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2009 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.13';
|
||||
my $quiet; # this line required
|
||||
|
||||
|
||||
my $session = start(); # this line required
|
||||
|
||||
# upgrade functions go here
|
||||
|
||||
finish($session); # this line required
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# 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;
|
||||
#}
|
||||
|
||||
|
||||
# -------------- 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
|
||||
125
docs/upgrades/upgrade_7.6.13-7.6.14.pl
Normal file
125
docs/upgrades/upgrade_7.6.13-7.6.14.pl
Normal file
|
|
@ -0,0 +1,125 @@
|
|||
#!/usr/bin/env perl
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2009 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.14';
|
||||
my $quiet; # this line required
|
||||
|
||||
|
||||
my $session = start(); # this line required
|
||||
|
||||
# upgrade functions go here
|
||||
|
||||
finish($session); # this line required
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# 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;
|
||||
#}
|
||||
|
||||
|
||||
# -------------- 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
|
||||
151
docs/upgrades/upgrade_7.6.14-7.7.0.pl
Normal file
151
docs/upgrades/upgrade_7.6.14-7.7.0.pl
Normal file
|
|
@ -0,0 +1,151 @@
|
|||
#!/usr/bin/env perl
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2009 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.7.0';
|
||||
my $quiet; # this line required
|
||||
|
||||
|
||||
my $session = start(); # this line required
|
||||
|
||||
# upgrade functions go here
|
||||
|
||||
addGroupToAddToMatrix( $session );
|
||||
addScreenshotTemplatesToMatrix( $session );
|
||||
|
||||
finish($session); # this line required
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
sub addGroupToAddToMatrix {
|
||||
my $session = shift;
|
||||
print "\tAdding groupToAdd to Matrix table, if needed... \n" unless $quiet;
|
||||
my $sth = $session->db->read('describe Matrix groupToAdd');
|
||||
if (! defined $sth->hashRef) {
|
||||
$session->db->write("alter table Matrix add column groupToAdd char(22) default 2");
|
||||
}
|
||||
print "Done.\n" unless $quiet;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
sub addScreenshotTemplatesToMatrix {
|
||||
my $session = shift;
|
||||
print "\tAdding screenshot templates to Matrix table \n" unless $quiet;
|
||||
|
||||
$session->db->write("alter table Matrix add screenshotsConfigTemplateId char(22);");
|
||||
$session->db->write("update Matrix set screenshotsConfigTemplateId = 'matrixtmpl000000000007';");
|
||||
$session->db->write("alter table Matrix add screenshotsTemplateId char(22);");
|
||||
$session->db->write("update Matrix set screenshotsTemplateId = 'matrixtmpl000000000006';");
|
||||
|
||||
print "Done.\n" unless $quiet;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# 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;
|
||||
#}
|
||||
|
||||
|
||||
# -------------- 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
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env perl
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
# WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
#-------------------------------------------------------------------
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env perl
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
# WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
#-------------------------------------------------------------------
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
|
|
@ -61,7 +61,7 @@ sub upgradeMatrix {
|
|||
my $session = shift;
|
||||
print "\tUpgrading matrix assets... \n" unless $quiet;
|
||||
my $db = $session->db;
|
||||
$db->write("alter table Matrix drop column groupToRate, drop column groupToAdd, drop column privilegedGroup,
|
||||
$db->write("alter table Matrix drop column groupToRate, drop column privilegedGroup,
|
||||
drop column ratingTimeout, drop column ratingTimeoutPrivileged, drop column ratingDetailTemplateId,
|
||||
drop column visitorCacheTimeout");
|
||||
$db->write("alter table Matrix add column defaultSort char(22) not null default 'score',
|
||||
|
|
@ -102,7 +102,8 @@ sub upgradeMatrix {
|
|||
$db->write("alter table Matrix_rating rename MatrixListing_rating");
|
||||
$db->write("alter table Matrix_ratingSummary rename MatrixListing_ratingSummary");
|
||||
$db->write("alter table Matrix_field rename Matrix_attribute");
|
||||
$db->write("alter table Matrix_attribute drop column label");
|
||||
$db->write("alter table Matrix_attribute drop column name");
|
||||
$db->write("alter table Matrix_attribute change label name char(255)");
|
||||
$db->write("alter table Matrix_attribute add column options text");
|
||||
$db->write("alter table Matrix_attribute change fieldType fieldType char(255) not null default 'MatrixCompare'");
|
||||
$db->write("alter table Matrix_attribute change fieldId attributeId char(22) not null");
|
||||
|
|
@ -143,6 +144,7 @@ sub upgradeMatrix {
|
|||
$listing->{title} = $listing->{productName};
|
||||
$listing->{version} = $listing->{versionNumber};
|
||||
$listing->{screenshots} = $listing->{storageId};
|
||||
$listing->{ownerUserId} = $listing->{maintainerId};
|
||||
$listing->{productURL} = $listing->{productUrl};
|
||||
$listing->{manufacturerURL} = $listing->{manufacturerUrl};
|
||||
my $newMatrixListing = $matrix->addChild($listing,undef,undef,{skipAutoCommitWorkflows=>1});
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env perl
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
# WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
#-------------------------------------------------------------------
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env perl
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
# WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
#-------------------------------------------------------------------
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env perl
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
# WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
#-------------------------------------------------------------------
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env perl
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
# WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
#-------------------------------------------------------------------
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env perl
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
# WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
#-------------------------------------------------------------------
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env perl
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
# WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
#-------------------------------------------------------------------
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package Spectre::Admin;
|
|||
=head1 LEGAL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
-------------------------------------------------------------------
|
||||
Please read the legal notices (docs/legal.txt) and the license
|
||||
(docs/license.txt) that came with this distribution before using
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package Spectre::Cron;
|
|||
=head1 LEGAL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
-------------------------------------------------------------------
|
||||
Please read the legal notices (docs/legal.txt) and the license
|
||||
(docs/license.txt) that came with this distribution before using
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package Spectre::Workflow;
|
|||
=head1 LEGAL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
-------------------------------------------------------------------
|
||||
Please read the legal notices (docs/legal.txt) and the license
|
||||
(docs/license.txt) that came with this distribution before using
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
package WebGUI;
|
||||
|
||||
|
||||
our $VERSION = '7.6.11';
|
||||
our $STATUS = "beta";
|
||||
our $VERSION = '7.7.0';
|
||||
our $STATUS = 'beta';
|
||||
|
||||
|
||||
=head1 LEGAL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
-------------------------------------------------------------------
|
||||
Please read the legal notices (docs/legal.txt) and the license
|
||||
(docs/license.txt) that came with this distribution before using
|
||||
|
|
|
|||
|
|
@ -145,6 +145,7 @@ sub www_view {
|
|||
#Set the uid just in case;
|
||||
#$self->uid($userId);
|
||||
|
||||
|
||||
#Deal with sort order
|
||||
my $sortBy = $session->form->get("sortBy") || "creationDate";
|
||||
my $sort_url = ($sortBy)?";sortBy=$sortBy":"";
|
||||
|
|
@ -158,7 +159,7 @@ sub www_view {
|
|||
my $rpp_url = ";rpp=$rpp";
|
||||
|
||||
#Cache the base url
|
||||
my $contribsUrl = $self->getUrl("module=contributions;do=view;uid=$userId");
|
||||
my $contribsUrl = $self->getUrl(undef, 'appendUID');
|
||||
|
||||
#Create sortBy headers
|
||||
$var->{'title_url' } = $contribsUrl.";sortBy=title".$sortDir_url.$rpp_url;
|
||||
|
|
@ -198,6 +199,7 @@ sub www_view {
|
|||
my $assetId = $row->{assetId};
|
||||
my $asset = WebGUI::Asset->newByDynamicClass( $session, $assetId );
|
||||
my $props = $asset->get;
|
||||
$props->{url} = $asset->getUrl;
|
||||
if (ref $asset eq "WebGUI::Asset::Post") {
|
||||
$asset = $asset->getThread;
|
||||
$props = $asset->get;
|
||||
|
|
|
|||
|
|
@ -328,7 +328,7 @@ sub www_removeFriend {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 www_removeFriend ( )
|
||||
=head2 www_removeFriendConfirm ( )
|
||||
|
||||
This is a confirmation page of whether or not the user wishes to remove the selected user from friend
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package WebGUI::AdSpace;
|
|||
=head1 LEGAL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
-------------------------------------------------------------------
|
||||
Please read the legal notices (docs/legal.txt) and the license
|
||||
(docs/license.txt) that came with this distribution before using
|
||||
|
|
@ -52,6 +52,7 @@ sub countClick {
|
|||
my $session = shift;
|
||||
my $id = shift;
|
||||
my ($url) = $session->db->quickArray("select url from advertisement where adId=?",[$id]);
|
||||
return $url if $session->env->requestNotViewed();
|
||||
$session->db->write("update advertisement set clicks=clicks+1 where adId=?",[$id]);
|
||||
return $url;
|
||||
}
|
||||
|
|
@ -131,6 +132,7 @@ A boolean that tells the ad system not to count this impression if true.
|
|||
sub displayImpression {
|
||||
my $self = shift;
|
||||
my $dontCount = shift;
|
||||
return '' if $self->session->env->requestNotViewed();
|
||||
my ($id, $ad, $priority, $clicks, $clicksBought, $impressions, $impressionsBought) = $self->session->db->quickArray("select adId, renderedAd, priority, clicks, clicksBought, impressions, impressionsBought from advertisement where adSpaceId=? and isActive=1 order by nextInPriority asc limit 1",[$self->getId]);
|
||||
unless ($dontCount) {
|
||||
my $isActive = 1;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package WebGUI::AdSpace::Ad;
|
|||
=head1 LEGAL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
-------------------------------------------------------------------
|
||||
Please read the legal notices (docs/legal.txt) and the license
|
||||
(docs/license.txt) that came with this distribution before using
|
||||
|
|
@ -261,12 +261,32 @@ sub set {
|
|||
$self->{_properties}{priority} = exists $properties->{priority} ? $properties->{priority} : $self->{_properties}{priority};
|
||||
# prerender the ad for faster display
|
||||
my $adSpace = WebGUI::AdSpace->new($self->session, $self->get("adSpaceId"));
|
||||
if ($self->get("type") eq "text") {
|
||||
$self->{_properties}{renderedAd} = '<div style="position:relative; width:'.($adSpace->get("width")-2).'px; height:'.($adSpace->get("height")-2).'px; margin:0px; overflow:hidden; border:solid '.$self->get("borderColor").' 1px;"><a href="'.$self->session->url->gateway(undef, "op=clickAd;id=".$self->getId).'" style="position:absolute; padding: 3px; top:0px; left:0px; width:100%; height:100%; z-index:10; display:block; text-decoration:none; vertical-align:top; background-color:'.$self->get("backgroundColor").'; font-size: 13px; font-weight: normal;"><b><span style="color:'.$self->get("textColor").';">'.$self->get("title").'</span></b><br /><span style="color:'.$self->get("textColor").';">'.$self->get("adText").'</span></a></div>';
|
||||
} elsif ($self->get("type") eq "image") {
|
||||
my $storage = WebGUI::Storage->get($self->session, $self->get("storageId"));
|
||||
$self->{_properties}{renderedAd} = '<div style="position:relative; width:'.$adSpace->get("width").'px; height:'.$adSpace->get("height").'px; margin:0px; overflow:hidden; border:0px;"><a href="'.$self->session->url->gateway(undef, "op=clickAd;id=".$self->getId).'" style="position:absolute; padding: 3px; top:0px; left:0px; width:100%; height:100%; z-index:10; display:block; text-decoration:none; vertical-align:top;"><img src="'.$storage->getUrl($storage->getFiles->[0]).'" alt="'.$self->get("title").'" style="z-index:0;position:relative;border-style:none;border: 0px;" /></a></div>';
|
||||
} elsif ($self->get("type") eq "rich") {
|
||||
if ($self->get("type") eq "text") {
|
||||
$self->{_properties}{renderedAd} =
|
||||
q{<div style="position:relative; width:} . ($adSpace->get("width")-2) . q{px; height:}
|
||||
. ($adSpace->get("height")-2) . q{px; margin:0px; overflow:hidden; border:solid }
|
||||
. $self->get("borderColor") . q{ 1px;"><a href='#' onclick="window.location.assign('}
|
||||
. $self->session->url->gateway(undef, "op=clickAd;id=".$self->getId)
|
||||
. q{')" style="position:absolute; padding: 3px; top:0px; left:0px; width:100%; height:100%; z-index:10;}
|
||||
. q{ display:block; text-decoration:none; vertical-align:top; background-color:}
|
||||
. $self->get("backgroundColor") . q{; font-size: 13px; font-weight: normal;"><b><span style="color:}
|
||||
. $self->get("textColor") . q{;">} . $self->get("title")
|
||||
. q{</span></b><br /><span style="color:} . $self->get("textColor") . q{;">}
|
||||
. $self->get("adText") . q{</span></a></div>};
|
||||
}
|
||||
elsif ($self->get("type") eq "image") {
|
||||
my $storage = WebGUI::Storage->get($self->session, $self->get("storageId"));
|
||||
$self->{_properties}{renderedAd} =
|
||||
q{<div style="position:relative; width:} . $adSpace->get("width") . q{px; height:}
|
||||
. $adSpace->get("height") . q{px; margin:0px; overflow:hidden; border:0px;"><a href="#" }
|
||||
. q{onclick="window.location.assign('} .$self->session->url->gateway(undef, "op=clickAd;id=".$self->getId)
|
||||
. q{')" style="position:absolute; padding: }
|
||||
. q{3px; top:0px; left:0px; width:100%; height:100%; z-index:10; display:block; text-decoration:none; }
|
||||
. q{vertical-align:top;"><img }
|
||||
. q{src="} . $storage->getUrl($storage->getFiles->[0]) . q{" alt="} . $self->get("title")
|
||||
. q{" style="z-index:0;position:relative;border-style:none;border: 0px;" /></a></div>};
|
||||
}
|
||||
elsif ($self->get("type") eq "rich") {
|
||||
my $ad = $self->get("richMedia");
|
||||
WebGUI::Macro::process($self->session, \$ad);
|
||||
$self->{_properties}{renderedAd} = $ad;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package WebGUI::AdminConsole;
|
|||
=head1 LEGAL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
-------------------------------------------------------------------
|
||||
Please read the legal notices (docs/legal.txt) and the license
|
||||
(docs/license.txt) that came with this distribution before using
|
||||
|
|
@ -215,17 +215,27 @@ A reference to the current session.
|
|||
|
||||
If supplied, provides a list of defaults such as title and icons for the admin console.
|
||||
|
||||
=head3 options
|
||||
|
||||
A hash reference of options with the following keys
|
||||
|
||||
=head4 showAdminBar
|
||||
|
||||
If true, will show the admin bar on this admin console page
|
||||
|
||||
=cut
|
||||
|
||||
sub new {
|
||||
my $class = shift;
|
||||
my $session = shift;
|
||||
my $id = shift;
|
||||
my $options = shift;
|
||||
my $self;
|
||||
$self->{_session} = $session;
|
||||
bless $self, $class;
|
||||
$self->{_function} = {};
|
||||
$self->{_functionId} = $id;
|
||||
$self->{_options} = $options;
|
||||
return $self;
|
||||
}
|
||||
|
||||
|
|
@ -289,7 +299,17 @@ sub render {
|
|||
}
|
||||
|
||||
$var{"backtosite.url"} = $self->session->url->getBackToSiteURL();
|
||||
return $self->session->style->process(WebGUI::Asset::Template->new($self->session,$self->session->setting->get("AdminConsoleTemplate"))->process(\%var),"PBtmpl0000000000000137");
|
||||
my $template
|
||||
= WebGUI::Asset::Template->new(
|
||||
$self->session,
|
||||
$self->session->setting->get("AdminConsoleTemplate")
|
||||
);
|
||||
if ( $self->{_options}->{showAdminBar} ) {
|
||||
$var{adminBar}
|
||||
= WebGUI::Macro::AdminBar::process($self->session);
|
||||
}
|
||||
my $output = $template->process(\%var);
|
||||
return $self->session->style->process($output,"PBtmpl0000000000000137");
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ use strict;
|
|||
=head1 LEGAL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
-------------------------------------------------------------------
|
||||
Please read the legal notices (docs/legal.txt) and the license
|
||||
(docs/license.txt) that came with this distribution before using
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package WebGUI::Asset;
|
|||
=head1 LEGAL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
-------------------------------------------------------------------
|
||||
Please read the legal notices (docs/legal.txt) and the license
|
||||
(docs/license.txt) that came with this distribution before using
|
||||
|
|
@ -1948,13 +1948,12 @@ sub outputWidgetMarkup {
|
|||
# we'll be serializing the content of the asset which is being widgetized.
|
||||
my $storage = WebGUI::Storage->get($session, $assetId);
|
||||
my $content = $self->view;
|
||||
if($styleTemplateId eq '' or $styleTemplateId eq 'none'){
|
||||
$content = $self->session->style->userStyle($content);
|
||||
}else{
|
||||
if($styleTemplateId ne '' && $styleTemplateId ne 'none'){
|
||||
$content = $self->session->style->process($content,$styleTemplateId);
|
||||
}
|
||||
WebGUI::Macro::process($session, \$content);
|
||||
my $jsonContent = to_json( { "asset$assetId" => { content => $content } } );
|
||||
my ($headTags, $body) = WebGUI::HTML::splitHeadBody($content);
|
||||
my $jsonContent = to_json( { "asset$assetId" => { content => $body } } );
|
||||
$storage->addFileFromScalar("$assetId.js", "data = $jsonContent");
|
||||
my $jsonUrl = $storage->getUrl("$assetId.js");
|
||||
|
||||
|
|
@ -1985,6 +1984,7 @@ sub outputWidgetMarkup {
|
|||
}
|
||||
YAHOO.util.Event.addListener(window, 'load', setupPage);
|
||||
</script>
|
||||
$headTags
|
||||
</head>
|
||||
<body id="widget$assetId">
|
||||
\${asset$assetId.content}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ use strict;
|
|||
our $VERSION = "0.0.0";
|
||||
|
||||
####################################################################
|
||||
# WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
# WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
####################################################################
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
|
|
@ -116,7 +116,7 @@ sub definition {
|
|||
},
|
||||
'storageId' => {
|
||||
fieldType => "Image",
|
||||
defaultValue => undef,
|
||||
defaultValue => '',
|
||||
maxAttachments => 1,
|
||||
},
|
||||
'feedUid' => {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package WebGUI::Asset::File;
|
|||
=head1 LEGAL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
-------------------------------------------------------------------
|
||||
Please read the legal notices (docs/legal.txt) and the license
|
||||
(docs/license.txt) that came with this distribution before using
|
||||
|
|
@ -116,12 +116,12 @@ sub definition {
|
|||
filename=>{
|
||||
noFormPost=>1,
|
||||
fieldType=>'hidden',
|
||||
defaultValue=>undef
|
||||
defaultValue=>'',
|
||||
},
|
||||
storageId=>{
|
||||
noFormPost=>1,
|
||||
fieldType=>'hidden',
|
||||
defaultValue=>undef
|
||||
defaultValue=>'',
|
||||
},
|
||||
templateId=>{
|
||||
fieldType=>'template',
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package WebGUI::Asset::File::GalleryFile;
|
|||
=head1 LEGAL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
-------------------------------------------------------------------
|
||||
Please read the legal notices (docs/legal.txt) and the license
|
||||
(docs/license.txt) that came with this distribution before using
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package WebGUI::Asset::File::GalleryFile::Photo;
|
|||
=head1 LEGAL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
-------------------------------------------------------------------
|
||||
Please read the legal notices (docs/legal.txt) and the license
|
||||
(docs/license.txt) that came with this distribution before using
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package WebGUI::Asset::File::Image;
|
|||
=head1 LEGAL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
-------------------------------------------------------------------
|
||||
Please read the legal notices (docs/legal.txt) and the license
|
||||
(docs/license.txt) that came with this distribution before using
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package WebGUI::Asset::File::ZipArchive;
|
|||
=head1 LEGAL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
-------------------------------------------------------------------
|
||||
Please read the legal notices (docs/legal.txt) and the license
|
||||
(docs/license.txt) that came with this distribution before using
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package WebGUI::Asset::FilePile;
|
|||
=head1 LEGAL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
-------------------------------------------------------------------
|
||||
Please read the legal notices (docs/legal.txt) and the license
|
||||
(docs/license.txt) that came with this distribution before using
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package WebGUI::Asset::MatrixListing;
|
|||
=head1 LEGAL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
-------------------------------------------------------------------
|
||||
Please read the legal notices (docs/legal.txt) and the license
|
||||
(docs/license.txt) that came with this distribution before using
|
||||
|
|
@ -58,6 +58,43 @@ sub addRevision {
|
|||
return $newSelf;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
=head2 canAdd ( )
|
||||
|
||||
Override canAdd to ignore its permissions check. Permissions are handled
|
||||
by the parent Matrix.
|
||||
|
||||
=cut
|
||||
|
||||
sub canAdd {
|
||||
return 1;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
=head2 canEdit ( )
|
||||
|
||||
Returns true if the user can edit this asset. C<userId> is a WebGUI user ID.
|
||||
|
||||
Users can edit this Matrix listing if they are the owner, or if they can edit
|
||||
the parent Matrix.
|
||||
|
||||
=cut
|
||||
|
||||
sub canEdit {
|
||||
my $self = shift;
|
||||
|
||||
if ( $self->session->form->process("assetId") eq "new" ) {
|
||||
return $self->getParent->canAddMatrixListing();
|
||||
}
|
||||
else {
|
||||
return 1 if $self->session->user->userId eq $self->get("ownerUserId");
|
||||
|
||||
return $self->getParent->canEdit();
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 definition ( session, definition )
|
||||
|
|
@ -304,20 +341,36 @@ sub getEditForm {
|
|||
[$category,$matrixId]);
|
||||
}
|
||||
else{
|
||||
$attributes = $db->read("select * from Matrix_attribute as a
|
||||
left join MatrixListing_attribute as l on (a.attributeId = l.attributeId and l.matrixListingId = ?)
|
||||
where category =? and a.assetId = ?",
|
||||
$attributes = $db->read("select * from Matrix_attribute as attribute
|
||||
left join MatrixListing_attribute as listing using(attributeId)
|
||||
where listing.matrixListingId = ? and category =? and attribute.assetId = ?",
|
||||
[$self->getId,$category,$matrixId]);
|
||||
}
|
||||
while (my $attribute = $attributes->hashRef) {
|
||||
$attribute->{label} = $attribute->{name};
|
||||
$attribute->{subtext} = $attribute->{description};
|
||||
$attribute->{name} = 'attribute_'.$attribute->{attributeId};
|
||||
if($attribute->{fieldType} eq 'Combo'){
|
||||
my %options;
|
||||
tie %options, 'Tie::IxHash';
|
||||
%options = $db->buildHash("select value, value from MatrixListing_attribute
|
||||
where attributeId = ? and value != '' order by value",[$attribute->{attributeId}]);
|
||||
$attribute->{options} = \%options;
|
||||
$attribute->{extras} = "style='width:120px'";
|
||||
}
|
||||
$form->dynamicField(%{$attribute});
|
||||
}
|
||||
}
|
||||
|
||||
$form->submit();
|
||||
$form->raw(
|
||||
'<tr><td COLSPAN=2>'.
|
||||
WebGUI::Form::Submit($session, {}).
|
||||
WebGUI::Form::Button($session, {
|
||||
-value => $i18n->get('cancel', 'WebGUI'),
|
||||
-extras => q|onclick="history.go(-1);" class="backwardButton"|
|
||||
}).
|
||||
'</td></tr>'
|
||||
);
|
||||
|
||||
return $form;
|
||||
}
|
||||
|
|
@ -556,7 +609,7 @@ sub view {
|
|||
my $db = $session->db;
|
||||
my $i18n = WebGUI::International->new($self->session, "Asset_MatrixListing");
|
||||
my @categories = keys %{$self->getParent->getCategories};
|
||||
|
||||
|
||||
# Increment views before getting template var hash so that the views tmpl_var has the incremented value.
|
||||
$self->incrementCounter("views");
|
||||
|
||||
|
|
@ -564,6 +617,16 @@ sub view {
|
|||
if ($emailSent){
|
||||
$var->{emailSent} = 1;
|
||||
}
|
||||
|
||||
unless($self->hasBeenCommitted){
|
||||
my $workflowInstanceId = $db->quickScalar("select workflowInstanceId from assetVersionTag where tagId =?"
|
||||
,[$self->get('tagId')]);
|
||||
$var->{canApprove} = $self->getParent->canEdit;
|
||||
$var->{approveOrDenyUrl} = $self->getUrl("op=manageRevisionsInTag;workflowInstanceId=".$workflowInstanceId
|
||||
.";tagId=".$self->get('tagId'));
|
||||
}
|
||||
$var->{canEdit} = $self->canEdit;
|
||||
$var->{editUrl} = $self->getUrl("func=edit");
|
||||
$var->{controls} = $self->getToolbar;
|
||||
$var->{comments} = $self->getFormattedComments();
|
||||
$var->{productName} = $var->{title};
|
||||
|
|
@ -599,14 +662,14 @@ sub view {
|
|||
{type =>'text/css', rel=>'stylesheet'});
|
||||
|
||||
# Attributes
|
||||
|
||||
|
||||
foreach my $category (@categories) {
|
||||
my $attributes;
|
||||
my @attribute_loop;
|
||||
my $categoryLoopName = $session->url->urlize($category)."_loop";
|
||||
$attributes = $db->read("select * from Matrix_attribute as a
|
||||
left join MatrixListing_attribute as l on (a.attributeId = l.attributeId and l.matrixListingId = ?)
|
||||
where category =? and a.assetId = ?",
|
||||
$attributes = $db->read("select * from Matrix_attribute as attribute
|
||||
left join MatrixListing_attribute as listing using(attributeId)
|
||||
where listing.matrixListingId = ? and category =? and attribute.assetId = ?",
|
||||
[$self->getId,$category,$self->getParent->getId]);
|
||||
while (my $attribute = $attributes->hashRef) {
|
||||
$attribute->{label} = $attribute->{name};
|
||||
|
|
@ -629,58 +692,10 @@ sub view {
|
|||
my $storage = $file->getStorageLocation;
|
||||
my @files;
|
||||
@files = @{ $storage->getFiles } if (defined $storage);
|
||||
$var->{screenshotsUrl} = $self->getUrl('func=viewScreenshots');
|
||||
$var->{screenshotThumbnail} = $storage->getUrl('thumb-'.$files[0]);
|
||||
}
|
||||
|
||||
$var->{screenshots} = qq|
|
||||
<script language="javascript">AC_FL_RunContent = 0;</script>
|
||||
<script src="/extras/ukplayer/AC_RunActiveContent.js" language="javascript"></script>
|
||||
<script language="javascript">
|
||||
if (AC_FL_RunContent == 0) {
|
||||
alert("This page requires AC_RunActiveContent.js.");
|
||||
} else {
|
||||
AC_FL_RunContent(
|
||||
'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
|
||||
'width', '400',
|
||||
'height', '300',
|
||||
'src', 'swc/assets',
|
||||
'quality', 'high',
|
||||
'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
|
||||
'align', 'middle',
|
||||
'play', 'true',
|
||||
'loop', 'true',
|
||||
'scale', 'showall',
|
||||
'wmode', 'window',
|
||||
'devicefont', 'false',
|
||||
'id', 'slideShow',
|
||||
'bgcolor', '#ffffff',
|
||||
'name', 'coverflow',
|
||||
'menu', 'true',
|
||||
// note: the width & height in the flashVars below MUST match the width & height set above
|
||||
'flashVars',
|
||||
'config=?func=getScreenshotsConfig&width=400&height=300&backgroundColor=0xCCCCCC&fontColor=&textBorderColor=&textBackgroundColor=&controlsColor=&controlsBorderColor=&controlsBackgroundColor=',
|
||||
'allowFullScreen', 'false',
|
||||
'allowScriptAccess','sameDomain',
|
||||
'movie', '/extras/ukplayer/slideShow',
|
||||
'salign', ''
|
||||
); //end AC code
|
||||
}
|
||||
</script>
|
||||
<noscript>
|
||||
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
|
||||
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="400"
|
||||
height="300" id="swc/assets" align="middle">
|
||||
<param name="allowScriptAccess" value="sameDomain" />
|
||||
<param name="allowFullScreen" value="false" />
|
||||
<param name="flashVars" value="config=?func=getScreenshotsConfig" />
|
||||
<param name="movie" value="/extras/ukplayer/slideShow.swf" /><param name="quality" value="high" /><param
|
||||
name="bgcolor" value="#ffffff" /> <embed src="/extras/ukplayer/slideShow.swf" quality="high" bgcolor="#ffffff"
|
||||
width="400" height="300" name="swc/assets" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false"
|
||||
flashvars="config=?func=getScreenshotsConfig" type="application/x-shockwave-flash"
|
||||
pluginspage="http://www.macromedia.com/go/getflashplayer" />
|
||||
</object>
|
||||
</noscript>
|
||||
|;
|
||||
}
|
||||
|
||||
# Rating form
|
||||
|
||||
my %rating;
|
||||
|
|
@ -784,7 +799,8 @@ pluginspage="http://www.macromedia.com/go/getflashplayer" />
|
|||
);
|
||||
$var->{emailForm} = $mailForm->print;
|
||||
|
||||
return $self->getParent->processStyle($self->processTemplate($var,undef, $self->{_viewTemplate}));
|
||||
my $template = $self->processTemplate($var,undef, $self->{_viewTemplate});
|
||||
return $self->getParent->processStyle($template);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -841,12 +857,14 @@ Web facing method which is the default edit page
|
|||
|
||||
sub www_edit {
|
||||
my $self = shift;
|
||||
|
||||
return $self->session->privilege->noAccess() unless $self->getParent->canAddMatrixListing();
|
||||
|
||||
my $i18n = WebGUI::International->new($self->session, "Asset_MatrixListing");
|
||||
return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
return $self->session->privilege->locked() unless $self->canEditIfLocked;
|
||||
|
||||
if($self->session->form->process('func') eq 'add'){
|
||||
return $self->session->privilege->noAccess() unless $self->getParent->canAddMatrixListing();
|
||||
}else{
|
||||
return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||
return $self->session->privilege->locked() unless $self->canEditIfLocked;
|
||||
}
|
||||
|
||||
my $var = $self->get;
|
||||
my $matrix = $self->getParent;
|
||||
|
|
@ -879,9 +897,9 @@ sub www_getAttributes {
|
|||
push(@results,{label=>$category,fieldType=>'category'});
|
||||
my $attributes;
|
||||
my @attribute_loop;
|
||||
$attributes = $db->read("select * from Matrix_attribute as a
|
||||
left join MatrixListing_attribute as l on (a.attributeId = l.attributeId and l.matrixListingId = ?)
|
||||
where category =? and a.assetId = ?",
|
||||
$attributes = $db->read("select * from Matrix_attribute as attribute
|
||||
left join MatrixListing_attribute as listing using(attributeId)
|
||||
where listing.matrixListingId = ? and category =? and attribute.assetId = ?",
|
||||
[$self->getId,$category,$self->getParent->getId]);
|
||||
while (my $attribute = $attributes->hashRef) {
|
||||
$attribute->{label} = $attribute->{name};
|
||||
|
|
@ -902,7 +920,7 @@ sub www_getAttributes {
|
|||
my $jsonOutput;
|
||||
$jsonOutput->{ResultSet} = {Result=>\@results};
|
||||
|
||||
return JSON->new->utf8->encode($jsonOutput);
|
||||
return JSON->new->encode($jsonOutput);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -936,9 +954,7 @@ sub www_getScreenshots {
|
|||
my $thumb = 'thumb-'.$file;
|
||||
$xml .= "
|
||||
<slide>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
<title><![CDATA[<b>Slide</b> One]]></title>
|
||||
<title></title>
|
||||
<description><![CDATA[ Screenshots ]]></description>
|
||||
<image_source>".$storage->getUrl($file)."</image_source>
|
||||
<duration>5</duration>
|
||||
|
|
@ -966,56 +982,14 @@ Returns the xml config file for the ukplayer that displays the screenshots.
|
|||
=cut
|
||||
|
||||
sub www_getScreenshotsConfig {
|
||||
my $self = shift;
|
||||
my $self = shift;
|
||||
my $var = $self->get;
|
||||
|
||||
return $self->session->privilege->noAccess() unless $self->canView;
|
||||
|
||||
$self->session->http->setMimeType('text/xml');
|
||||
|
||||
my $xml = qq|<?xml version="1.0" encoding="UTF-8"?>
|
||||
<config>
|
||||
|
||||
<content_url>?func=getScreenshots</content_url>
|
||||
|
||||
<width>400</width><!-- this value is overwritten by the flashVars but the tag needs to be here (and it is
|
||||
useful for offline testing) -->
|
||||
<height>300</height><!-- this value is overwritten by the flashVars but the tag needs to be here (and it is
|
||||
useful for offline testing) -->
|
||||
<background_color>0xDDDDEE</background_color>
|
||||
<default_duration>20</default_duration>
|
||||
<default_slidewidth>100</default_slidewidth>
|
||||
<default_slideheight>100</default_slideheight>
|
||||
|
||||
<font>Verdana</font>
|
||||
<font_size>12</font_size>
|
||||
<font_color>0xCCCCCC</font_color>
|
||||
<text_border_color>0xCCCCCC</text_border_color>
|
||||
<text_bg_color>0x000000</text_bg_color>
|
||||
<text_autohide>true</text_autohide>
|
||||
|
||||
<controls_color>0xCCCCCC</controls_color>
|
||||
<controls_border_color>0xCCCCCC</controls_border_color>
|
||||
<controls_bg_color>0x000000</controls_bg_color>
|
||||
<controls_autohide>false</controls_autohide>
|
||||
|
||||
<thumbnail_width>48</thumbnail_width>
|
||||
<thumbnail_height>36</thumbnail_height>
|
||||
<thumbnail_border_color>0x000000</thumbnail_border_color>
|
||||
<menu_autohide>true</menu_autohide>
|
||||
<menu_dead_zone_width>100</menu_dead_zone_width>
|
||||
<menu_gaps>5</menu_gaps>
|
||||
|
||||
<mute_at_start>false</mute_at_start>
|
||||
<autostart>true</autostart>
|
||||
<autopause>false</autopause>
|
||||
<loop>false</loop>
|
||||
<error_message_content><![CDATA[XML not found: ]]></error_message_content>
|
||||
<error_message_image><![CDATA[Image not found]]></error_message_image>
|
||||
|
||||
</config>
|
||||
|;
|
||||
|
||||
return $xml;
|
||||
return $self->processTemplate($var,$self->getParent->get("screenshotsConfigTemplateId"));
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -1123,7 +1097,24 @@ sub www_view {
|
|||
return $self->view;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 www_viewScreenshots ( )
|
||||
|
||||
Returns this listing's screenshots in a ukplayer.
|
||||
|
||||
=cut
|
||||
|
||||
sub www_viewScreenshots {
|
||||
my $self = shift;
|
||||
my $var = $self->get;
|
||||
|
||||
$var->{configUrl} = 'config='.$self->getUrl("func=getScreenshotsConfig");
|
||||
|
||||
return $self->session->privilege->noAccess() unless $self->canView;
|
||||
|
||||
return $self->processTemplate($var,$self->getParent->get("screenshotsTemplateId"));
|
||||
}
|
||||
1;
|
||||
|
||||
#vim:ft=perl
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package WebGUI::Asset::Post;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
# WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
#-------------------------------------------------------------------
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
|
|
@ -243,13 +243,13 @@ sub definition {
|
|||
my $properties = {
|
||||
storageId => {
|
||||
fieldType=>"image",
|
||||
defaultValue=>undef,
|
||||
defaultValue=>'',
|
||||
enforceSizeLimits => 0,
|
||||
},
|
||||
threadId => {
|
||||
noFormPost=>1,
|
||||
fieldType=>"hidden",
|
||||
defaultValue=>undef
|
||||
defaultValue=>'',
|
||||
},
|
||||
originalEmail => {
|
||||
noFormPost=>1,
|
||||
|
|
@ -929,30 +929,32 @@ sub paste {
|
|||
sub processPropertiesFromFormPost {
|
||||
my $self = shift;
|
||||
$self->SUPER::processPropertiesFromFormPost;
|
||||
my $i18n = WebGUI::International->new($self->session);
|
||||
if ($self->session->form->process("assetId") eq "new") {
|
||||
my $session = $self->session;
|
||||
my $form = $session->form;
|
||||
my $i18n = WebGUI::International->new($session);
|
||||
if ($form->process("assetId") eq "new") {
|
||||
my %data = (
|
||||
ownerUserId => $self->session->user->userId,
|
||||
username => $self->session->form->process("visitorName") || $self->session->user->profileField("alias") || $self->session->user->username,
|
||||
ownerUserId => $session->user->userId,
|
||||
username => $form->process("visitorName") || $session->user->profileField("alias") || $session->user->username,
|
||||
);
|
||||
$self->update(\%data);
|
||||
if ($self->getThread->getParent->canEdit) {
|
||||
$self->getThread->lock if ($self->session->form->process('lock'));
|
||||
$self->getThread->stick if ($self->session->form->process("stick"));
|
||||
}
|
||||
}
|
||||
# force the value to be empty so it gets updated properly by content
|
||||
$self->update({synopsis => ($self->session->form->process("synopsis") || "")});
|
||||
if ($self->session->form->process("archive") && $self->getThread->getParent->canModerate) {
|
||||
$self->update({synopsis => ($form->process("synopsis") || "")});
|
||||
if ($form->process("archive") && $self->getThread->getParent->canModerate) {
|
||||
$self->getThread->archive;
|
||||
} elsif ($self->getThread->get("status") eq "archived") {
|
||||
$self->getThread->unarchive;
|
||||
}
|
||||
if ($self->session->form->process("subscribe")) {
|
||||
if ($form->process("subscribe")) {
|
||||
$self->getThread->subscribe;
|
||||
}
|
||||
else {
|
||||
$self->getThread->unsubscribe;
|
||||
}
|
||||
if ($self->getThread->getParent->canEdit) {
|
||||
$form->process('isLocked') ? $self->getThread->lock : $self->getThread->unlock;
|
||||
$form->process('isSticky') ? $self->getThread->stick : $self->getThread->unstick;
|
||||
}
|
||||
delete $self->{_storageLocation};
|
||||
$self->postProcess;
|
||||
|
|
@ -1229,14 +1231,16 @@ sub www_edit {
|
|||
|
||||
my (%var, $content, $title, $synopsis);
|
||||
my $i18n = WebGUI::International->new($session);
|
||||
|
||||
|
||||
my $className = $form->process("class","className") || $self->get('className');
|
||||
if ($func eq "add" || ($func eq "editSave" && $form->process("assetId") eq "new")) { # new post
|
||||
#Add Form Header for all new posts
|
||||
my $className = $form->process("class","className");
|
||||
#Post to the parent if this is a new request
|
||||
my $action = $self->getParent->getUrl;
|
||||
#Post to self if there was an error Posting to a Thread (not a Collaboration)
|
||||
$action = $self->getUrl if($func eq "editSave" && $className ne "WebGUI::Asset::Post::Thread");
|
||||
|
||||
#Add Form Header for all new posts
|
||||
$var{'form.header'} = WebGUI::Form::formHeader($session,{
|
||||
action=>$action
|
||||
});
|
||||
|
|
@ -1304,16 +1308,6 @@ sub www_edit {
|
|||
return $privilege->insufficient() unless ($self->getThread->getParent->canPost);
|
||||
$var{'isThread' } = 1;
|
||||
$var{'isNewThread' } = 1;
|
||||
if ($self->getThread->getParent->canEdit) {
|
||||
$var{'sticky.form'} = WebGUI::Form::yesNo($session, {
|
||||
name=>'stick',
|
||||
value=>$form->process("stick")
|
||||
});
|
||||
$var{'lock.form' } = WebGUI::Form::yesNo($session, {
|
||||
name=>'lock',
|
||||
value=>$form->process('lock')
|
||||
});
|
||||
}
|
||||
my $subscribe = $form->process("subscribe");
|
||||
$var{'subscribe.form'} = WebGUI::Form::yesNo($session, {
|
||||
name=>"subscribe",
|
||||
|
|
@ -1429,6 +1423,19 @@ sub www_edit {
|
|||
value=>$content,
|
||||
richEditId=>$self->getThread->getParent->get("richEditor")
|
||||
});
|
||||
##Edit variables just for Threads
|
||||
$session->log->warn("className: $className");
|
||||
$session->log->warn("canEdit parent: ". $self->getThread->getParent->canEdit);
|
||||
if ($className eq 'WebGUI::Asset::Post::Thread' && $self->getThread->getParent->canEdit) {
|
||||
$var{'sticky.form'} = WebGUI::Form::yesNo($session, {
|
||||
name=>'isSticky',
|
||||
value=>$form->process('isSticky') || $self->get('isSticky'),
|
||||
});
|
||||
$var{'lock.form' } = WebGUI::Form::yesNo($session, {
|
||||
name=>'isLocked',
|
||||
value=>$form->process('isLocked') || $self->get('isLocked'),
|
||||
});
|
||||
}
|
||||
$var{'form.submit'} = WebGUI::Form::submit($session, {
|
||||
extras=>"onclick=\"this.value='".$i18n->get(452)."'; this.form.func.value='editSave';return true;\""
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package WebGUI::Asset::Post::Thread;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
# WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
#-------------------------------------------------------------------
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
|
|
@ -118,12 +118,12 @@ sub definition {
|
|||
subscriptionGroupId => {
|
||||
noFormPost=>1,
|
||||
fieldType=>"hidden",
|
||||
defaultValue=>undef
|
||||
defaultValue=>'',
|
||||
},
|
||||
replies => {
|
||||
noFormPost=>1,
|
||||
fieldType=>"hidden",
|
||||
defaultValue=>undef
|
||||
defaultValue=>0,
|
||||
},
|
||||
isSticky => {
|
||||
fieldType=>"yesNo",
|
||||
|
|
@ -131,12 +131,12 @@ sub definition {
|
|||
},
|
||||
isLocked => {
|
||||
fieldType=>"yesNo",
|
||||
defaultValue=>0
|
||||
defaultValue=>0,
|
||||
},
|
||||
lastPostId => {
|
||||
noFormPost=>1,
|
||||
fieldType=>"hidden",
|
||||
defaultValue=>undef
|
||||
defaultValue=>'',
|
||||
},
|
||||
lastPostDate => {
|
||||
noFormPost=>1,
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package WebGUI::Asset::RSSCapable;
|
|||
=head1 LEGAL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
-------------------------------------------------------------------
|
||||
Please read the legal notices (docs/legal.txt) and the license
|
||||
(docs/license.txt) that came with this distribution before using
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package WebGUI::Asset::RSSFromParent;
|
|||
=head1 LEGAL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
-------------------------------------------------------------------
|
||||
Please read the legal notices (docs/legal.txt) and the license
|
||||
(docs/license.txt) that came with this distribution before using
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package WebGUI::Asset::Redirect;
|
|||
=head1 LEGAL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
-------------------------------------------------------------------
|
||||
Please read the legal notices (docs/legal.txt) and the license
|
||||
(docs/license.txt) that came with this distribution before using
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package WebGUI::Asset::RichEdit;
|
|||
=head1 LEGAL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
-------------------------------------------------------------------
|
||||
Please read the legal notices (docs/legal.txt) and the license
|
||||
(docs/license.txt) that came with this distribution before using
|
||||
|
|
@ -561,7 +561,7 @@ sub getRichEditor {
|
|||
while (my ($plugin, $path) = each %loadPlugins) {
|
||||
$out .= "tinymce.PluginManager.load('$plugin', '$path');\n";
|
||||
}
|
||||
$out .= "\ttinyMCE.init(" . JSON->new->utf8->pretty->encode(\%config) . " )\n"
|
||||
$out .= "\ttinyMCE.init(" . JSON->new->pretty->encode(\%config) . " )\n"
|
||||
. "</script>";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package WebGUI::Asset::Shortcut;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
# WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
#-------------------------------------------------------------------
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package WebGUI::Asset::Sku;
|
|||
=head1 LEGAL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
-------------------------------------------------------------------
|
||||
Please read the legal notices (docs/legal.txt) and the license
|
||||
(docs/license.txt) that came with this distribution before using
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package WebGUI::Asset::Sku::Donation;
|
|||
=head1 LEGAL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
-------------------------------------------------------------------
|
||||
Please read the legal notices (docs/legal.txt) and the license
|
||||
(docs/license.txt) that came with this distribution before using
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package WebGUI::Asset::Sku::EMSBadge;
|
|||
=head1 LEGAL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
-------------------------------------------------------------------
|
||||
Please read the legal notices (docs/legal.txt) and the license
|
||||
(docs/license.txt) that came with this distribution before using
|
||||
|
|
@ -377,7 +377,7 @@ sub view {
|
|||
. WebGUI::Form::hidden($session,
|
||||
{
|
||||
name => "callback",
|
||||
value => JSON->new->utf8->encode({ url => $self->getUrl})
|
||||
value => JSON->new->encode({ url => $self->getUrl})
|
||||
})
|
||||
. WebGUI::Form::submit($session, {value => $i18n->get("populate from address book")})
|
||||
. WebGUI::Form::formFooter($session)
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package WebGUI::Asset::Sku::EMSRibbon;
|
|||
=head1 LEGAL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
-------------------------------------------------------------------
|
||||
Please read the legal notices (docs/legal.txt) and the license
|
||||
(docs/license.txt) that came with this distribution before using
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package WebGUI::Asset::Sku::EMSTicket;
|
|||
=head1 LEGAL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
-------------------------------------------------------------------
|
||||
Please read the legal notices (docs/legal.txt) and the license
|
||||
(docs/license.txt) that came with this distribution before using
|
||||
|
|
@ -17,7 +17,7 @@ package WebGUI::Asset::Sku::EMSTicket;
|
|||
use strict;
|
||||
use base 'WebGUI::Asset::Sku';
|
||||
use Tie::IxHash;
|
||||
use JSON;
|
||||
use JSON ();
|
||||
use WebGUI::Utility;
|
||||
|
||||
=head1 NAME
|
||||
|
|
@ -293,7 +293,7 @@ If specified, returns a single value for the key specified.
|
|||
sub getEventMetaData {
|
||||
my $self = shift;
|
||||
my $key = shift;
|
||||
my $metadata = JSON->new->utf8->decode($self->get("eventMetaData") || '{}');
|
||||
my $metadata = JSON->new->decode($self->get("eventMetaData") || '{}');
|
||||
if (defined $key) {
|
||||
return $metadata->{$key};
|
||||
}
|
||||
|
|
@ -438,7 +438,7 @@ sub processPropertiesFromFormPost {
|
|||
my $date = WebGUI::DateTime->new($self->session, time())->toDatabase;
|
||||
my $startDate = $form->process('startDate', "dateTime", $date,
|
||||
{ defaultValue => $date, timeZone => $self->getParent->get("timezone")});
|
||||
$self->update({eventMetaData => JSON->new->utf8->encode(\%metadata), startDate => $startDate});
|
||||
$self->update({eventMetaData => JSON->new->encode(\%metadata), startDate => $startDate});
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -470,7 +470,7 @@ A hash reference containing all the metadata properties to set.
|
|||
sub setEventMetaData {
|
||||
my $self = shift;
|
||||
my $properties = shift;
|
||||
$self->update({eventMetaData => JSON->new->utf8->encode($properties)});
|
||||
$self->update({eventMetaData => JSON->new->encode($properties)});
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package WebGUI::Asset::Sku::EMSToken;
|
|||
=head1 LEGAL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
-------------------------------------------------------------------
|
||||
Please read the legal notices (docs/legal.txt) and the license
|
||||
(docs/license.txt) that came with this distribution before using
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package WebGUI::Asset::Sku::FlatDiscount;
|
|||
=head1 LEGAL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
-------------------------------------------------------------------
|
||||
Please read the legal notices (docs/legal.txt) and the license
|
||||
(docs/license.txt) that came with this distribution before using
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package WebGUI::Asset::Sku::Product;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
# WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
#-------------------------------------------------------------------
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package WebGUI::Asset::Sku::Subscription;
|
|||
=head1 LEGAL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
-------------------------------------------------------------------
|
||||
Please read the legal notices (docs/legal.txt) and the license
|
||||
(docs/license.txt) that came with this distribution before using
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package WebGUI::Asset::Snippet;
|
|||
=head1 LEGAL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
-------------------------------------------------------------------
|
||||
Please read the legal notices (docs/legal.txt) and the license
|
||||
(docs/license.txt) that came with this distribution before using
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package WebGUI::Asset::Template;
|
|||
=head1 LEGAL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
-------------------------------------------------------------------
|
||||
Please read the legal notices (docs/legal.txt) and the license
|
||||
(docs/license.txt) that came with this distribution before using
|
||||
|
|
@ -88,7 +88,7 @@ sub definition {
|
|||
},
|
||||
parser => {
|
||||
noFormPost => 1,
|
||||
fieldType => 'selectList',
|
||||
fieldType => 'selectBox',
|
||||
defaultValue => [$session->config->get("defaultTemplateParser")],
|
||||
},
|
||||
namespace => {
|
||||
|
|
@ -144,6 +144,7 @@ sub processPropertiesFromFormPost {
|
|||
my %data;
|
||||
my $needsUpdate = 0;
|
||||
if ($self->getValue("parser") ne $self->session->form->process("parser","className") && ($self->session->form->process("parser","className") ne "")) {
|
||||
$needsUpdate = 1;
|
||||
if (isIn($self->session->form->process("parser","className"),@{$self->session->config->get("templateParsers")})) {
|
||||
%data = ( parser => $self->session->form->process("parser","className") );
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package WebGUI::Asset::Template::HTMLTemplate;
|
|||
=head1 LEGAL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
-------------------------------------------------------------------
|
||||
Please read the legal notices (docs/legal.txt) and the license
|
||||
(docs/license.txt) that came with this distribution before using
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package WebGUI::Asset::Template::HTMLTemplateExpr;
|
|||
=head1 LEGAL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
-------------------------------------------------------------------
|
||||
Please read the legal notices (docs/legal.txt) and the license
|
||||
(docs/license.txt) that came with this distribution before using
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package WebGUI::Asset::Template::Parser;
|
|||
=head1 LEGAL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
-------------------------------------------------------------------
|
||||
Please read the legal notices (docs/legal.txt) and the license
|
||||
(docs/license.txt) that came with this distribution before using
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package WebGUI::Asset::Template::TemplateToolkit;
|
|||
=head1 LEGAL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
-------------------------------------------------------------------
|
||||
Please read the legal notices (docs/legal.txt) and the license
|
||||
(docs/license.txt) that came with this distribution before using
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package WebGUI::Asset::Template::SomeTemplateType;
|
|||
=head1 LEGAL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
-------------------------------------------------------------------
|
||||
Please read the legal notices (docs/legal.txt) and the license
|
||||
(docs/license.txt) that came with this distribution before using
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package WebGUI::Asset::WikiPage;
|
||||
|
||||
# -------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
# WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
# -------------------------------------------------------------------
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
|
|
@ -96,13 +96,13 @@ sub definition {
|
|||
},
|
||||
actionTaken => {
|
||||
fieldType => "text",
|
||||
defaultValue => undef,
|
||||
noFormPost => 1
|
||||
defaultValue => '',
|
||||
noFormPost => 1,
|
||||
},
|
||||
actionTakenBy => {
|
||||
fieldType => "user",
|
||||
defaultValue => undef,
|
||||
noFormPost => 1
|
||||
defaultValue => '',
|
||||
noFormPost => 1,
|
||||
},
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package WebGUI::Asset::Wobject;
|
|||
=head1 LEGAL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
-------------------------------------------------------------------
|
||||
Please read the legal notices (docs/legal.txt) and the license
|
||||
(docs/license.txt) that came with this distribution before using
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package WebGUI::Asset::Wobject::Article;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2008 Plain Black Corporation.
|
||||
# WebGUI is Copyright 2001-2009 Plain Black Corporation.
|
||||
#-------------------------------------------------------------------
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue