From 20d259dd0d7062a964eb5b687ff0a27aa6a665cb Mon Sep 17 00:00:00 2001 From: JT Smith Date: Fri, 13 Jan 2006 17:45:53 +0000 Subject: [PATCH] fixed upgrade skeleton to work with new session api set up _upgrade.skeleton --- docs/gotcha.txt | 4 + docs/upgrades/_upgrade.skeleton | 18 +- docs/upgrades/upgrade_6.6.0-6.6.1.pl | 85 - docs/upgrades/upgrade_6.6.0-6.6.1.sql | 6 - docs/upgrades/upgrade_6.6.1-6.6.2.sql | 4 - docs/upgrades/upgrade_6.6.2-6.6.3.sql | 2 - docs/upgrades/upgrade_6.6.3-6.6.4.pl | 26 - docs/upgrades/upgrade_6.6.3-6.6.4.sql | 7 - docs/upgrades/upgrade_6.6.4-6.6.5.pl | 23 - docs/upgrades/upgrade_6.6.4-6.6.5.sql | 2 - docs/upgrades/upgrade_6.6.5-6.7.0.pl | 875 ---- docs/upgrades/upgrade_6.7.0-6.7.1.pl | 69 - docs/upgrades/upgrade_6.7.1-6.7.2.pl | 925 ---- docs/upgrades/upgrade_6.7.2-6.7.3.pl | 266 -- docs/upgrades/upgrade_6.7.3-6.7.4.pl | 859 ---- docs/upgrades/upgrade_6.7.4-6.7.5.pl | 979 ---- docs/upgrades/upgrade_6.7.5-6.7.6.pl | 41 - docs/upgrades/upgrade_6.7.6-6.7.7.pl | 6122 ------------------------- docs/upgrades/upgrade_6.7.7-6.7.8.pl | 171 - docs/upgrades/upgrade_6.7.8-6.8.0.pl | 1894 -------- docs/upgrades/upgrade_6.8.0-6.8.1.pl | 244 - docs/upgrades/upgrade_6.8.1-6.8.2.pl | 76 - docs/upgrades/upgrade_6.8.2-6.8.3.pl | 195 - docs/upgrades/upgrade_6.8.3-6.8.4.pl | 301 -- docs/upgrades/upgrade_6.8.5-6.9.0.pl | 57 + 25 files changed, 71 insertions(+), 13180 deletions(-) delete mode 100644 docs/upgrades/upgrade_6.6.0-6.6.1.pl delete mode 100644 docs/upgrades/upgrade_6.6.0-6.6.1.sql delete mode 100644 docs/upgrades/upgrade_6.6.1-6.6.2.sql delete mode 100644 docs/upgrades/upgrade_6.6.2-6.6.3.sql delete mode 100644 docs/upgrades/upgrade_6.6.3-6.6.4.pl delete mode 100644 docs/upgrades/upgrade_6.6.3-6.6.4.sql delete mode 100644 docs/upgrades/upgrade_6.6.4-6.6.5.pl delete mode 100644 docs/upgrades/upgrade_6.6.4-6.6.5.sql delete mode 100644 docs/upgrades/upgrade_6.6.5-6.7.0.pl delete mode 100644 docs/upgrades/upgrade_6.7.0-6.7.1.pl delete mode 100644 docs/upgrades/upgrade_6.7.1-6.7.2.pl delete mode 100644 docs/upgrades/upgrade_6.7.2-6.7.3.pl delete mode 100644 docs/upgrades/upgrade_6.7.3-6.7.4.pl delete mode 100644 docs/upgrades/upgrade_6.7.4-6.7.5.pl delete mode 100644 docs/upgrades/upgrade_6.7.5-6.7.6.pl delete mode 100644 docs/upgrades/upgrade_6.7.6-6.7.7.pl delete mode 100644 docs/upgrades/upgrade_6.7.7-6.7.8.pl delete mode 100644 docs/upgrades/upgrade_6.7.8-6.8.0.pl delete mode 100644 docs/upgrades/upgrade_6.8.0-6.8.1.pl delete mode 100644 docs/upgrades/upgrade_6.8.1-6.8.2.pl delete mode 100644 docs/upgrades/upgrade_6.8.2-6.8.3.pl delete mode 100644 docs/upgrades/upgrade_6.8.3-6.8.4.pl create mode 100644 docs/upgrades/upgrade_6.8.5-6.9.0.pl diff --git a/docs/gotcha.txt b/docs/gotcha.txt index 8f4f957eb..2271af432 100644 --- a/docs/gotcha.txt +++ b/docs/gotcha.txt @@ -14,6 +14,10 @@ save you many hours of grief. migration.txt to bring your custom code up to date with the new API. + * You need to upgrade to the latest 6.8 release before you can + upgrade to 6.9. + + 6.8.4 -------------------------------------------------------------------- * The If macro has been removed because it's far too dangerous and diff --git a/docs/upgrades/_upgrade.skeleton b/docs/upgrades/_upgrade.skeleton index 271f6d941..3f3453d9c 100644 --- a/docs/upgrades/_upgrade.skeleton +++ b/docs/upgrades/_upgrade.skeleton @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2005 Plain Black Corporation. +# WebGUI is Copyright 2001-2006 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -12,22 +12,22 @@ use lib "../../lib"; use strict; use Getopt::Long; use WebGUI::Session; -use WebGUI::SQL; my $toVersion = "0.0.0"; # make this match what version you're going to my $quiet; # this line required -start(); # this line required +my $session = start(); # this line required # upgrade functions go here -finish(); # this line required +finish($session); # this line required ##------------------------------------------------- #sub exampleFunction { +# my $session = shift; # print "\tWe're doing some stuff here that you should know about.\n" unless ($quiet); # # and here's our code #} @@ -44,13 +44,15 @@ sub start { 'configFile=s'=>\$configFile, 'quiet'=>\$quiet ); - WebGUI::Session::open("../..",$configFile); - WebGUI::Session::refreshUserInfo(3); - WebGUI::SQL->write("insert into webguiVersion values (".quote($toVersion).",'upgrade',".time().")"); + my $session = WebGUI::Session->open("../..",$configFile); + $session->user({userId=>3}); + $session->db->write("insert into webguiVersion values (".$session->db->quote($toVersion).",'upgrade',".$session->datetime->time().")"); + return $session; } #------------------------------------------------- sub finish { - WebGUI::Session::close(); + my $session = shift; + $session->close(); } diff --git a/docs/upgrades/upgrade_6.6.0-6.6.1.pl b/docs/upgrades/upgrade_6.6.0-6.6.1.pl deleted file mode 100644 index 27c7d3f5d..000000000 --- a/docs/upgrades/upgrade_6.6.0-6.6.1.pl +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/perl - -use lib "../../lib"; -use File::Path; -use Getopt::Long; -use strict; -use WebGUI::Session; -use WebGUI::SQL; -use WebGUI::Asset::Template; - -my $configFile; -my $quiet; - -GetOptions( - 'configFile=s'=>\$configFile, - 'quiet'=>\$quiet -); - -WebGUI::Session::open("../..",$configFile); - -#-------------------------------------------- -print "\tUpdating Commerce Templates\n" unless ($quiet); -my $template = ' · - · -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ProductQuantityPriceEach
 Subtotal
Shipping
Total
- -

- -'; -my $asset = WebGUI::Asset::Template->new("PBtmpl0000000000000016"); -$asset->update({template=>$template}); - - - -WebGUI::Session::close(); - - diff --git a/docs/upgrades/upgrade_6.6.0-6.6.1.sql b/docs/upgrades/upgrade_6.6.0-6.6.1.sql deleted file mode 100644 index 3492c9d35..000000000 --- a/docs/upgrades/upgrade_6.6.0-6.6.1.sql +++ /dev/null @@ -1,6 +0,0 @@ -insert into webguiVersion values ('6.6.1','upgrade',unix_timestamp()); -insert into settings values ('commerceSendDailyReportTo', ''); -alter table Navigation change anscestorEndPoint ancestorEndPoint int not null default 55; -alter table groups add ldapGroup varchar(255) default NULL; -alter table groups add ldapGroupProperty varchar(255) default NULL; -alter table groups add ldapRecursiveProperty varchar(255) default NULL; diff --git a/docs/upgrades/upgrade_6.6.1-6.6.2.sql b/docs/upgrades/upgrade_6.6.1-6.6.2.sql deleted file mode 100644 index 3d6068b35..000000000 --- a/docs/upgrades/upgrade_6.6.1-6.6.2.sql +++ /dev/null @@ -1,4 +0,0 @@ -insert into webguiVersion values ('6.6.2','upgrade',unix_timestamp()); -alter table Shortcut add disableContentLock int(11) NOT NULL default '0'; -update template set template='

Price:
Product Number:




Features


Benefits


Specifications

:

Accessories


Related Products


' where assetId='PBtmpl0000000000000056'; -update template set template='^StyleSheet(^Extras;/adminConsole/adminConsole.css);\r\n^JavaScript(^Extras;/adminConsole/adminConsole.js);\r\n\r\n
\r\n \r\n \" target=\"_blank\">\"?\"\r\n \r\n
\r\n
\r\n \" border=\"0\" title=\"\" alt=\"\" />\r\n
\r\n
\r\n\"*\"\r\n
\r\n
\r\n \" border=\"0\" title=\"\" alt=\"\" />\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n  \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n  \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \" >
\r\n
\r\n
\r\n
\r\n \">
\r\n ^AdminToggle;
\r\n ^LoginToggle;
\r\n
\r\n
\r\n\r\n' where assetId='PBtmpl0000000000000001'; diff --git a/docs/upgrades/upgrade_6.6.2-6.6.3.sql b/docs/upgrades/upgrade_6.6.2-6.6.3.sql deleted file mode 100644 index c32901d54..000000000 --- a/docs/upgrades/upgrade_6.6.2-6.6.3.sql +++ /dev/null @@ -1,2 +0,0 @@ -insert into webguiVersion values ('6.6.3','upgrade',unix_timestamp()); - diff --git a/docs/upgrades/upgrade_6.6.3-6.6.4.pl b/docs/upgrades/upgrade_6.6.3-6.6.4.pl deleted file mode 100644 index e69b5b713..000000000 --- a/docs/upgrades/upgrade_6.6.3-6.6.4.pl +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/perl - -use lib "../../lib"; -use Getopt::Long; -use strict; -use WebGUI::Session; -use WebGUI::Grouping; - -my $configFile; -my $quiet; - -GetOptions( - 'configFile=s'=>\$configFile, - 'quiet'=>\$quiet -); - -WebGUI::Session::open("../..",$configFile); - -#-------------------------------------------- -print "\tMaking admins part of product managers.\n" unless ($quiet); -WebGUI::Grouping::addGroupsToGroups(['3'],['14']); - - -WebGUI::Session::close(); - - diff --git a/docs/upgrades/upgrade_6.6.3-6.6.4.sql b/docs/upgrades/upgrade_6.6.3-6.6.4.sql deleted file mode 100644 index 7f2afd6fc..000000000 --- a/docs/upgrades/upgrade_6.6.3-6.6.4.sql +++ /dev/null @@ -1,7 +0,0 @@ -insert into webguiVersion values ('6.6.4','upgrade',unix_timestamp()); -delete from settings where name='proxiedClientAddress'; -update template set template=': \n' where assetId='PBtmpl0000000000000085'; -update template set template='\n \n

\n
\n \n

\n
\n ^StyleSheet(\"/Navigation/dtree/dtree.css\");\r\n^JavaScript(\"/Navigation/dtree/dtree.js\");\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
\r\n\r\n\r\n
' where assetId='PBtmpl0000000000000130'; -update template set template='^StyleSheet(^Extras;/slidePanel/slidePanel.css);\r\n^JavaScript(^Extras;/slidePanel/slidePanel.js);\r\n\r\n\r\n' where assetId='PBtmpl0000000000000090'; -update template set template='\n \n

\n
\n \n

\n
\n \r\n\r\n\r\n\r\n\r\n\r\n \r\n\r\n^JavaScript(\"/coolmenus/coolmenus4.js\");\r\n' where assetId='PBtmpl0000000000000134'; -update template set template='^StyleSheet(^Extras;/adminConsole/adminConsole.css);\r\n^JavaScript(^Extras;/adminConsole/adminConsole.js);\r\n\r\n
\r\n \r\n \" target=\"_blank\">\"?\"\r\n \r\n
\r\n
\r\n \" border=\"0\" title=\"\" alt=\"\" />\r\n
\r\n
\r\n\"*\"\r\n
\r\n
\r\n \" border=\"0\" title=\"\" alt=\"\" />\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n  \r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n  \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n \" >
\r\n
\r\n
\r\n
\r\n \">
\r\n ^AdminToggle;
\r\n ^LoginToggle;
\r\n
\r\n
\r\n\r\n' where assetId='PBtmpl0000000000000001'; \ No newline at end of file diff --git a/docs/upgrades/upgrade_6.6.4-6.6.5.pl b/docs/upgrades/upgrade_6.6.4-6.6.5.pl deleted file mode 100644 index 28cff1a1e..000000000 --- a/docs/upgrades/upgrade_6.6.4-6.6.5.pl +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/perl - -use lib "../../lib"; -use Getopt::Long; -use strict; -use File::Path; - -my $configFile; -my $quiet; - -GetOptions( - 'configFile=s'=>\$configFile, - 'quiet'=>\$quiet -); - - -#-------------------------------------------- -print "\tRemoving old HTML::Template if it exists. Check gotcha.txt for details.\n" unless ($quiet); -rmtree("../../lib/HTML/Template"); -unlink("../../lib/HTML/Template.pm"); - - - diff --git a/docs/upgrades/upgrade_6.6.4-6.6.5.sql b/docs/upgrades/upgrade_6.6.4-6.6.5.sql deleted file mode 100644 index fe9380a7f..000000000 --- a/docs/upgrades/upgrade_6.6.4-6.6.5.sql +++ /dev/null @@ -1,2 +0,0 @@ -insert into webguiVersion values ('6.6.5','upgrade',unix_timestamp()); - diff --git a/docs/upgrades/upgrade_6.6.5-6.7.0.pl b/docs/upgrades/upgrade_6.6.5-6.7.0.pl deleted file mode 100644 index c0958c159..000000000 --- a/docs/upgrades/upgrade_6.6.5-6.7.0.pl +++ /dev/null @@ -1,875 +0,0 @@ -my $toVersion = "6.7.0"; - -use lib "../../lib"; -use File::Path; -use Getopt::Long; -use strict; -use WebGUI::Asset; -use WebGUI::Asset::Wobject::Folder; -use WebGUI::Asset::Snippet; -use WebGUI::Session; -use WebGUI::SQL; -use WebGUI::Group; - -my $configFile; -my $quiet; - -GetOptions( - 'configFile=s'=>\$configFile, - 'quiet'=>\$quiet -); - -WebGUI::Session::open("../..",$configFile); -WebGUI::Session::refreshUserInfo(3); - -WebGUI::SQL->write("insert into webguiVersion values (".quote($toVersion).",'upgrade',".time().")"); - -giveSnippetsMimeTypes(); -addAssetVersioning(); -updateConfigFile(); -insertHelpTemplate(); -makeSyndicatedContentChanges(); -removeOldThemeSystem(); -addSectionsToSurveys(); -increaseProxyUrlLength(); -upgradeRichEdit(); - -WebGUI::Session::close(); - -#------------------------------------------------- -sub upgradeRichEdit { - print "\tUpgrade rich editor to version 1.45.\n" unless ($quiet); - WebGUI::SQL->write("update RichEdit set extendedValidElements='*[*]' where assetId='PBrichedit000000000001'"); - my $prepend = 'a[name|href|target|title],strong/b[class],em\/i[class],strike[class],u[class],p[dir|class|align],ol,ul,li,br,img[class|src|border=0|alt|title|hspace|vspace|width|height|align],sub,sup,blockquote[dir|style],table[border=0|cellspacing|cellpadding|width|height|class|align],tr[class|rowspan|width|height|align|valign],td[dir|class|colspan|rowspan|width|height|align|valign],div[dir|class|align],span[class|align],pre[class|align],address[class|align],h1[dir|class|align],h2[dir|class|align],h3[dir|class|align],h4[dir|class|align],h5[dir|class|align],h6[dir|class|align],hr'; - WebGUI::SQL->write("update RichEdit set extendedValidElements=concat(".quote($prepend).",',',extendedValidElements) where assetId<>'PBrichedit000000000001'"); - WebGUI::SQL->write("alter table RichEdit change extendedValidElements validElements mediumtext"); -} - - -#------------------------------------------------- -sub increaseProxyUrlLength { - print "\tMaking HTTP Proxy URLs accept lengths of up to 2048 characters.\n" unless ($quiet); - WebGUI::SQL->write("alter table HttpProxy change proxiedUrl proxiedUrl text"); -} - -#------------------------------------------------- -sub giveSnippetsMimeTypes { - print "\tAllowing snippets to handle mime types.\n" unless ($quiet); - WebGUI::SQL->write("alter table snippet add column mimeType varchar(50) not null default 'text/html'"); -} - - -#------------------------------------------------- -sub removeOldThemeSystem { - print "\tRemoving the old theme system.\n" unless ($quiet); - WebGUI::SQL->write("drop table theme"); - WebGUI::SQL->write("drop table themeComponent"); - WebGUI::Group->new('9')->delete; -} - -#------------------------------------------------- -sub makeSyndicatedContentChanges { - print "\tMaking changes to the syndicated content asset.\n" unless ($quiet); - WebGUI::SQL->write("alter table SyndicatedContent add column displayMode varchar(20) not null default 'interleaved'"); - WebGUI::SQL->write("alter table SyndicatedContent add column hasTerms varchar(255) not null"); - insertXSLTSheets(); - insertSyndicatedContentTemplate(); -} - -#------------------------------------------------- -sub addSectionsToSurveys { - print "\tAdding sections to Surveys.\n" unless ($quiet); - WebGUI::SQL->write("alter table Survey_question add column Survey_sectionId varchar(22) null"); - WebGUI::SQL->write("create table Survey_section (Survey_id varchar(22) null, Survey_sectionId varchar(22) not null, sectionName text null, sequenceNumber int(11) not null default 1, primary key (Survey_sectionId))"); - my $template = q| - -

-
- -

-
- - - -

- - - - - - - - - -

- : / -
- :% -
-
- -

-
- - - - - - - - -
- -

-
-
-
- -
-
-
-
-
- : /
- - : /
- :% / 100%
-
-
-
- - - -
- - - - - - - - -
-
- - - • - - • - -
- - • - - • - - • - -
- - - -

- -

-

- - - - -
- -    - -
-
- - -
|; - my $properties = { 'template' => $template }; - my $currentVersion = WebGUI::Asset::Template->new('PBtmpl0000000000000061'); - my $newVersion = $currentVersion->addRevision($properties); - - -} - -#------------------------------------------------- -sub updateConfigFile { - print "\tUpdating config file.\n" unless ($quiet); - my $pathToConfig = '../../etc/'.$configFile; - my $conf = Parse::PlainConfig->new('DELIM' => '=', 'FILE' => $pathToConfig, 'PURGE'=>1); - my %newConfig; - foreach my $key ($conf->directives) { # delete unwanted stuff - unless ($key eq "wobject") { - $newConfig{$key} = $conf->get($key); - } - } - $newConfig{fileCacheSizeLimit} = 100000000; - $newConfig{DeleteExpiredRevisions_offset} = 365; - $conf->purge; - $conf->set(%newConfig); - $conf->write; -} - -#------------------------------------------------- -sub addAssetVersioning { - print "\tMaking changes for asset versioning\n" unless ($quiet); - WebGUI::SQL->write("insert into settings values ('autoCommit','1')"); - WebGUI::SQL->write("create table assetVersionTag ( - tagId varchar(22) not null primary key, - name varchar(255) not null, - isCommitted int not null default 0, - creationDate bigint not null default 0, - createdBy varchar(22), - commitDate bigint not null default 0, - committedBy varchar(22) - )"); - my $now = time(); - WebGUI::SQL->write("insert into assetVersionTag values ('pbversion0000000000001','Initial Import','1',$now,'3',$now,'3')"); - WebGUI::SQL->write("insert into assetVersionTag values ('pbversion0000000000002','Auto Commit','1',$now,'3',$now,'3')"); - foreach my $table (qw(FileAsset Post RichEdit snippet EventsCalendar_event ImageAsset Thread redirect Shortcut template Article EventsCalendar IndexedSearch MessageBoard SQLReport Folder Navigation Survey WSClient Collaboration HttpProxy Layout Poll SyndicatedContent Product DataForm wobject)) { - WebGUI::SQL->write("alter table $table add column revisionDate bigint not null"); - WebGUI::SQL->write("update $table set revisionDate=$now"); - WebGUI::SQL->write("alter table $table drop primary key"); - WebGUI::SQL->write("alter table $table add primary key (assetId,revisionDate)"); - } - WebGUI::SQL->write("create table assetData ( - assetId varchar(22) not null, - revisionDate bigint not null, - revisedBy varchar(22) not null, - tagId varchar(22) not null, - status varchar(35) not null default 'pending', - title varchar(255) not null default 'untitled', - menuTitle varchar(255) not null default 'untitled', - url varchar(255) not null, - ownerUserId varchar(22) not null default '3', - groupIdView varchar(22) not null default '7', - groupIdEdit varchar(22) not null default '4', - startDate bigint not null default 997995720, - endDate bigint not null default 32472169200, - synopsis text, - newWindow int not null default 0, - isHidden int not null default 0, - isPackage int not null default 0, - isPrototype int not null default 0, - encryptPage int not null default 0, - assetSize int not null default 0, - extraHeadTags text, - primary key (assetId,revisionDate) - )"); - my $statement = WebGUI::SQL->prepare("insert into assetData values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); - my $sth = WebGUI::SQL->read("select * from asset"); - while (my $data = $sth->hashRef) { - $statement->execute([ - $data->{assetId}, - $now, - '3', - 'pbversion0000000000001', - 'approved', - $data->{title}, - $data->{menuTitle}, - $data->{url}, - $data->{ownerUserId}, - $data->{groupIdView}, - $data->{groupIdEdit}, - $data->{startDate}, - $data->{endDate}, - $data->{synopsis}, - $data->{newWindow}, - $data->{isHidden}, - $data->{isPackage}, - $data->{isPrototype}, - $data->{encryptPage}, - $data->{assetSize}, - $data->{extraHeadTags} - ]); - } - $sth->finish; - WebGUI::SQL->write("alter table asset add column creationDate bigint not null default 997995720"); - WebGUI::SQL->write("alter table asset add column createdBy varchar(22) not null default '3'"); - WebGUI::SQL->write("alter table asset add column stateChanged varchar(22) not null default 997995720"); - WebGUI::SQL->write("alter table asset add column stateChangedBy varchar(22) not null default '3'"); - WebGUI::SQL->write("alter table asset add column isLockedBy varchar(22)"); - WebGUI::SQL->write("update asset set creationDate=$now, createdBy='3'"); - foreach my $field (qw(url groupIdView title menuTitle startDate endDate ownerUserId groupIdEdit synopsis newWindow isHidden isSystem encryptPage assetSize lastUpdated lastUpdatedBy isPackage extraHeadTags isPrototype)) { - WebGUI::SQL->write("alter table asset drop column $field"); - } - # clean up the psuedo version tracking in files - $sth = WebGUI::SQL->read("select olderVersions from FileAsset"); - while (my ($old) = $sth->array) { - foreach my $storageId (split("\n",$old)) { - next unless ($storageId); - WebGUI::Storage->get($storageId)->delete; - } - } - $sth->finish; - WebGUI::SQL->write("alter table FileAsset drop column olderVersions"); - my $writeStatus = WebGUI::SQL->prepare("update assetData set status=? where assetId=? and revisionDate=?"); - my $sth = WebGUI::SQL->read("select status,assetId,revisionDate from Post"); - while (my ($status,$id,$version) = $sth->array) { - $writeStatus->execute([$status,$id,$version]); - } - $sth->finish; - $writeStatus->finish; - WebGUI::SQL->write('alter table Post drop column status'); -} - -#------------------------------------------------- -sub insertHelpTemplate{ - print "\tInserting new Help template\n" unless ($quiet); - my $helpTemplate = <

- - -
- - -
-
-
-
-
-EOT - my $import=WebGUI::Asset->getImportNode; - my $folder = $import->addChild({ - title=>"6.7.0 Help System Template", - menuTitle=>"6.7.0 Help System Template", - url=>"6-7-0HelpSystemTemplate", - className=>"WebGUI::Asset::Wobject::Folder" - }); - $folder->commit; - $folder->addChild({ - namespace=>'AdminConsole', - title=>'Help', - menuTitle=>'Help', - url=>'Help', - showInForms=>1, - isEditable=>1, - className=>"WebGUI::Asset::Template", - template=>$helpTemplate},'PBtmplHelp000000000001')->commit; -} - - -#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -sub insertSyndicatedContentTemplate{ - print "\tInserting new syndicated content template\n" unless ($quiet); - - my $template=q| - -

-
- -

-RSS 0.90 -RSS 0.91 -RSS 1.0 -RSS 2.0 -

- - -

-
- - -

- - -

- - - - - -

- - -

- - - - - - - -

-
- -
  • - - - - - - - - - - -
    - -|; - - my $import=WebGUI::Asset->getImportNode; - $import->addChild( - { - className=>'WebGUI::Asset::Template', - title=>'Default Grouped Aggregate Feeds', - namespace=>'SyndicatedContent', - menuTitle=>'Default Grouped Aggregate Feeds', - url=>'templates/syndicatedcontent/default_grouped_feeds', - ownerUserID=>3, - groupIdView=>7, - groupIdEdit=>4, - isHidden=>1, - template=>$template - },'DPUROtmpl0000000000001' - )->commit; -} - - -#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -sub insertXSLTSheets{ - print "\tInserting syndicated content XSLT\n" unless ($quiet); - my $import=WebGUI::Asset->getImportNode; - - my $folder=$import->addChild( - { - className=>'WebGUI::Asset::Wobject::Folder', - title=>'Syndicated Content XSLT', - menuTitle=>'Syndicated Content XSLT', - url=>'xslt', - startDate=>time(), - endDate=>time()+ 60*60*24*365*10, - groupEditId=>4, - groupViewId=>2 - } - ); - $folder->commit; - add_090xslt($folder); - add_091xslt($folder); - add_10xslt($folder); - add_20xslt($folder); -} - - -#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -sub add_090xslt{ - my $folder=shift; - my $snippet090=q| - - - - - - - - -You're viewing an RSS version 0.9 feed. Please use an RSS feed reader to view this content as intended. - - - -
  • - -|; - - my $snippet=$folder->addChild( - { - className=>'WebGUI::Asset::Snippet', - title=>'RSS 0.9 XSLT Stylesheet', - menuTitle=>'RSS 0.9 XSLT ', - url=>'xslt/rss0.9.xsl', - mimeType=>'application/xml', - startDate=>time(), - endDate=>time()+ 60*60*24*365*10, - groupEditId=>4, - groupViewId=>2, - snippet=>$snippet090 - },'SynConXSLT000000000001' - ); - $snippet->commit; -} - -#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -sub add_091xslt{ - my $folder=shift; - my $snippet091=q| - - - - - - - - - - - - - -|; - - my $snippet=$folder->addChild( - { - className=>'WebGUI::Asset::Snippet', - title=>'RSS 0.91 XSLT Stylesheet', - menuTitle=>'RSS 0.91 XSLT', - url=>'xslt/rss0.91.xsl', - mimeType=>'application/xml', - startDate=>time(), - endDate=>time()+ 60*60*24*365*10, - groupEditId=>4, - groupViewId=>2, - snippet=>$snippet091 - },'SynConXSLT000000000002' - ); - $snippet->commit; -} - -#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -sub add_10xslt{ - my $folder=shift; - my $snippet10=q| - - - - - - - - - - - - - - -|; - my $snippet=$folder->addChild( - { - className=>'WebGUI::Asset::Snippet', - title=>'RSS 1.0 XSLT Stylesheet', - menuTitle=>'RSS 1.0 XSLT', - mimeType=>'application/xml', - url=>'xslt/rss1.0.xsl', - startDate=>time(), - endDate=>time()+ 60*60*24*365*10, - groupEditId=>4, - groupViewId=>2, - snippet=>$snippet10 - },'SynConXSLT000000000003' - ); - $snippet->commit; -} - -#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -sub add_20xslt{ - my $folder=shift; - my $snippet20=q| - - - - - - - - - - - - - -|; - - my $snippet=$folder->addChild( - { - className=>'WebGUI::Asset::Snippet', - title=>'RSS 2.0 XSLT Stylesheet', - menuTitle=>'RSS 2.0 XSLT', - url=>'xslt/rss2.0.xsl', - mimeType=>'application/xml', - startDate=>time(), - endDate=>time()+ 60*60*24*365*10, - groupEditId=>4, - groupViewId=>2, - snippet=>$snippet20 - },'SynConXSLT000000000004' - ); - $snippet->commit; -} - - - diff --git a/docs/upgrades/upgrade_6.7.0-6.7.1.pl b/docs/upgrades/upgrade_6.7.0-6.7.1.pl deleted file mode 100644 index 9107ffca1..000000000 --- a/docs/upgrades/upgrade_6.7.0-6.7.1.pl +++ /dev/null @@ -1,69 +0,0 @@ -my $toVersion = "6.7.1"; - -$|=1; #disable output buffering - -use lib "../../lib"; -use File::Path; -use Getopt::Long; -use strict; -use WebGUI::Asset; -use WebGUI::Asset::Wobject::Folder; -use WebGUI::Asset::Snippet; -use WebGUI::Session; -use WebGUI::SQL; -use WebGUI::Group; - -my $configFile; -my $quiet; - -GetOptions( - 'configFile=s'=>\$configFile, - 'quiet'=>\$quiet -); - -WebGUI::Session::open("../..",$configFile); -WebGUI::Session::refreshUserInfo(3); - -WebGUI::SQL->write("insert into webguiVersion values (".quote($toVersion).",'upgrade',".time().")"); -fixForumRichEdit(); -fixMissingThreadData(); - -WebGUI::Session::close(); - - -#------------------------------------------------- -sub fixForumRichEdit { - print "\tFixing the forum rich editor properties.\n" unless ($quiet); - my $validElements = 'a[name|href|target|title],strong/b[class],em/i[class],strike[class],u[class],p[dir|class|align],ol,ul,li,br,img[class|src|border=0|alt|title|hspace|vspace|width|height|align],sub,sup,blockquote[dir|style],table[border=0|cellspacing|cellpadding|width|height|class|align],tr[class|rowspan|width|height|align|valign],td[dir|class|colspan|rowspan|width|height|align|valign],div[dir|class|align],span[class|align],pre[class|align],address[class|align],h1[dir|class|align],h2[dir|class|align],h3[dir|class|align],h4[dir|class|align],h5[dir|class|align],h6[dir|class|align],hr'; - WebGUI::SQL->write("update RichEdit set validElements=".quote($validElements)." where assetId='PBrichedit000000000002'"); - WebGUI::SQL->write("update assetData set endDate=".(time()+60*60*24*365*20)." where assetId='PBrichedit000000000002'"); -} - - -#------------------------------------------------- -sub fixMissingThreadData { - print "\tFixing missing thread data.\n" unless ($quiet); - my $sth = WebGUI::SQL->read("select assetId from Post where threadId=''"); - while (my ($assetId) = $sth->array) { - my $threadId = getThreadId($assetId); - my $sql = "update Post set threadId=".quote($threadId)." where assetId=".quote($assetId); - WebGUI::SQL->write($sql); - } - $sth->finish; -my $sth = WebGUI::SQL->read("select assetId from assetData where ownerUserId=''"); -while (my ($assetId) = $sth->array) { - my ($userId, $viewGroup, $editGroup, $startDate, $endDate) = WebGUI::SQL->quickArray("select ownerUserId,groupIdView,groupIdEdit,startDate,endDate from assetData where assetId=".quote($assetId)." order by revisionDate asc limit 1"); - my $sql = "update assetData set ownerUserId=".quote($userId).", groupIdView=".quote($viewGroup).", groupIdEdit=".quote($editGroup).", startDate=".quote($startDate).", endDate=".quote($endDate)." where assetId=".quote($assetId); - WebGUI::SQL->write($sql); -} -$sth->finish; -} - -#------------------------------------------------- -sub getThreadId { - my $assetId = shift; - my ($parentId, $className) = WebGUI::SQL->quickArray("select parentId, className from asset where assetId=".quote($assetId)); - return $assetId if ($className eq 'WebGUI::Asset::Post::Thread'); - return undef if ($parentId eq 'PBasset000000000000001'); - return getThreadId($parentId); -} diff --git a/docs/upgrades/upgrade_6.7.1-6.7.2.pl b/docs/upgrades/upgrade_6.7.1-6.7.2.pl deleted file mode 100644 index ab8223d98..000000000 --- a/docs/upgrades/upgrade_6.7.1-6.7.2.pl +++ /dev/null @@ -1,925 +0,0 @@ -use lib "../../lib"; -use strict; -use Getopt::Long; -use WebGUI::Session; -use WebGUI::SQL; -use WebGUI::Asset; - -my $toVersion = "6.7.2"; -my $configFile; -my $quiet; - -start(); - -fixTimeFields(); -fixSpelling(); -fixCSTemplate(); -speedUpAdminConsole(); -removeOldFiles(); -updatePageTemplates(); -fixSurveyTemplate(); - -finish(); - -#------------------------------------------------- -sub fixSurveyTemplate { - print "\tFixing survey template.\n" unless ($quiet); - my $template = < - -

    -
    - -

    -
    - - - -

    - - - - - - - - - -

    - : / -
    - :% -
    -
    - -

    -
    - - - - - - - - -
    - -

    -
    -
    -
    - -
    -
    -
    -
    -
    - : /
    - - : /
    - :% / 100%
    -
    -
    -
    - - - -
    -
    - - - - - - - -
    -
    - - - • - - • - -
    - - • - - • - - • - -
    - - - -

    - -

    - -

    - -

    - - -

    - -    - -
    -
    -
    -
    -END - WebGUI::Asset->new("PBtmpl0000000000000061","WebGUI::Asset::Template")->addRevision({template=>$template})->commit; -} - - -#------------------------------------------------- -sub updatePageTemplates { - print "\tMaking page templates float better in IE.\n" unless ($quiet); - # news - my $template = < - - -

    -
    - - -

    -
    - - -

    -
    - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - -
     
    - -
    - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - -
    - -
     
    - - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - - -
    - -
    - -END - WebGUI::Asset->new("PBtmpl0000000000000094","WebGUI::Asset::Template")->addRevision({template=>$template})->commit; - - # side by side - $template = < - - -

    -
    - - -

    -
    - - -

    -
    - -
     
    - -
    - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - -
    - -
     
    - - - -
    - -
    - -END - WebGUI::Asset->new("PBtmpl0000000000000135","WebGUI::Asset::Template")->addRevision({template=>$template})->commit; - - # left column - $template = < - - -

    -
    - - -

    -
    - - -

    -
    - -
     
    - -
    - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - -
    - -
     
    - - -
    - -
    - -END - WebGUI::Asset->new("PBtmpl0000000000000125","WebGUI::Asset::Template")->addRevision({template=>$template})->commit; - - # right column - $template = < - - -

    -
    - - -

    -
    - - -

    -
    - -
     
    - -
    - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - -
    - -
     
    - - - -
    - -
    - -END - WebGUI::Asset->new("PBtmpl0000000000000131","WebGUI::Asset::Template")->addRevision({template=>$template})->commit; - - # one over three - $template = < - - -

    -
    - - -

    -
    - - -

    -
    - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - -
     
    - -
    - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - -
    - -
     
    - - - -
    - -
    - -END - WebGUI::Asset->new("PBtmpl0000000000000109","WebGUI::Asset::Template")->addRevision({template=>$template})->commit; - - # three over one - $template = < - - -

    -
    - - -

    -
    - - -

    -
    - -
     
    - -
    - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - -
    - -
     
    - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - - -
    - -
    - -END - WebGUI::Asset->new("PBtmpl0000000000000118","WebGUI::Asset::Template")->addRevision({template=>$template})->commit; -} - -#------------------------------------------------- -sub removeOldFiles { - print "\tRemoving files that are no longer needed.\n" unless ($quiet); - unlink("../../lib/WebGUI/Search.pm"); -} - -#------------------------------------------------- -sub speedUpAdminConsole { - print "\tMaking admin console load faster.\n" unless ($quiet); - my $template = < - - -
    - -
    -
    -
    -   -
    - - -
    - <tmpl_var title>
    - -
    -
    -
    -
    -   -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - - >
    -
    -
    -
    -
    - ^AdminToggle;
    - ^LoginToggle;
    -
    -
    -
    - -
    -
    - - ? - -
    -
    - <tmpl_var application.title> -
    -
    -* -
    -
    - <tmpl_var console.title> -
    - - -END - my $asset = WebGUI::Asset->new("PBtmpl0000000000000001","WebGUI::Asset::Template"); - $asset->addRevision({template=>$template})->commit; -} - - -#------------------------------------------------- -sub fixTimeFields { - print "\tFixing time fields.\n" unless ($quiet); - WebGUI::SQL->write("update DataForm_field set type=".quote('TimeField')." where type=".quote('time')); - WebGUI::SQL->write("update userProfileField set dataType=".quote('TimeField')." where dataType=".quote('time')); -} - -#------------------------------------------------- -sub fixCSTemplate { - print "\tFixing CS Search template.\n" unless ($quiet); - my $asset = WebGUI::Asset->new("PBtmpl0000000000000031","WebGUI::Asset::Template"); - my $template = $asset->get("template"); - $template =~ s///ixsg; - $template =~ s///ixsg; - $asset->addRevision({template=>$template})->commit; -} - - -#------------------------------------------------- -sub fixSpelling { - print "\tFixing a few spelling problems.\n" unless ($quiet); - my $asset = WebGUI::Asset->new("PBtmplCP00000000000001","WebGUI::Asset::Template"); - $asset->addRevision({url=>"default_product_template"})->commit; - $asset = WebGUI::Asset->new("PBtmpl0000000000000134","WebGUI::Asset::Template"); - my $template = $asset->get("template"); - $template =~ s/spesify/specify/ixsg; - $asset->addRevision({template=>$template})->commit; -} - -#------------------------------------------------- -sub start { - $|=1; #disable output buffering - GetOptions( - 'configFile=s'=>\$configFile, - 'quiet'=>\$quiet - ); - WebGUI::Session::open("../..",$configFile); - WebGUI::Session::refreshUserInfo(3); - WebGUI::SQL->write("insert into webguiVersion values (".quote($toVersion).",'upgrade',".time().")"); -} - -#------------------------------------------------- -sub finish { - WebGUI::Session::close(); -} - diff --git a/docs/upgrades/upgrade_6.7.2-6.7.3.pl b/docs/upgrades/upgrade_6.7.2-6.7.3.pl deleted file mode 100644 index ff1f23309..000000000 --- a/docs/upgrades/upgrade_6.7.2-6.7.3.pl +++ /dev/null @@ -1,266 +0,0 @@ -use lib "../../lib"; -use strict; -use Getopt::Long; -use WebGUI::Session; -use WebGUI::SQL; - -my $toVersion = "6.7.3"; -my $configFile; -my $quiet; - -start(); -deleteOldHelpFiles(); -setGuidsBinary(); -finish(); - - - -#------------------------------------------------- -sub setGuidsBinary { - print "\tSetting GUIDs to have binary flag in database.\n" unless ($quiet); - my @sql = ( - "alter table asset change assetId assetId varchar(22) binary not null", - "alter table asset change parentId parentId varchar(22) binary not null", - "alter table asset change createdBy createdBy varchar(22) binary not null default '3'", - "alter table asset change stateChangedBy stateChangedBy varchar(22) binary not null default '3'", - "alter table asset change isLockedBy isLockedBy varchar(22) binary", - "alter table wobject change assetId assetId varchar(22) binary not null", - "alter table wobject change printableStyleTemplateId printableStyleTemplateId varchar(22) binary not null", - "alter table wobject change styleTemplateId styleTemplateId varchar(22) binary not null", - "alter table users change userId userId varchar(22) binary not null", - "alter table users change referringAffiliate referringAffiliate varchar(22) binary not null", - "alter table userSessionScratch change sessionId sessionId varchar(22) binary not null", - "alter table userSession change sessionId sessionId varchar(22) binary not null", - "alter table userSession change userId userId varchar(22) binary not null", - "alter table userLoginLog change userId userId varchar(22) binary not null", - "alter table userProfileCategory change profileCategoryId profileCategoryId varchar(22) binary not null", - "alter table userProfileData change userId userId varchar(22) binary not null", - "alter table userProfileField change profileCategoryId profileCategoryId varchar(22) binary not null", - "alter table template change assetId assetId varchar(22) binary not null", - "alter table transaction change transactionId transactionId varchar(22) binary not null", - "alter table transaction change userId userId varchar(22) binary not null", - "alter table transactionItem change transactionId transactionId varchar(22) binary not null", - "alter table subscriptionCode change batchId batchId varchar(22) binary not null", - "alter table subscriptionCode change code code varchar(64) binary not null", - "alter table subscriptionCode change usedBy usedBy varchar(22) binary not null", - "alter table subscriptionCodeBatch change batchId batchId varchar(22) binary not null", - "alter table subscriptionCodeBatch change subscriptionId subscriptionId varchar(22) binary not null", - "alter table subscriptionCodeSubscriptions change subscriptionId subscriptionId varchar(22) binary not null", - "alter table subscriptionCodeSubscriptions change code code varchar(64) binary not null", - "alter table subscription change subscriptionId subscriptionId varchar(22) binary not null", - "alter table subscription change subscriptionGroup subscriptionGroup varchar(22) binary not null", - "alter table snippet change assetId assetId varchar(22) binary not null", - "alter table shoppingCart change sessionId sessionId varchar(22) binary not null", - "alter table shoppingCart change itemId itemId varchar(64) binary not null", - "alter table transactionItem change itemId itemId varchar(64) binary not null", - "alter table replacements change replacementId replacementId varchar(22) binary not null", - "alter table redirect change assetId assetId varchar(22) binary not null", - "alter table products change productId productId varchar(22) binary not null", - "alter table products change templateId templateId varchar(22) binary not null", - "alter table productVariants change variantId variantId varchar(22) binary not null", - "alter table productVariants change productId productId varchar(22) binary not null", - "alter table passiveProfileAOI change userId userId varchar(22) binary not null", - "alter table passiveProfileAOI change fieldId fieldId varchar(22) binary not null", - "alter table passiveProfileLog change passiveProfileLogId passiveProfileLogId varchar(22) binary not null", - "alter table passiveProfileLog change userId userId varchar(22) binary not null", - "alter table passiveProfileLog change sessionId sessionId varchar(22) binary not null", - "alter table passiveProfileLog change wobjectId assetId varchar(22) binary not null", - "alter table passiveProfileLog change dateOfEntry dateOfEntry bigint not null", - "alter table productParameterOptions change optionId optionId varchar(22) binary not null", - "alter table productParameterOptions change parameterId parameterId varchar(22) binary not null", - "alter table productParameters change parameterId parameterId varchar(22) binary not null", - "alter table productParameters change productId productId varchar(22) binary not null", - "alter table metaData_values change fieldId fieldId varchar(22) binary not null", - "alter table metaData_values change assetId assetId varchar(22) binary not null", - "alter table metaData_properties change fieldId fieldId varchar(22) binary not null", - "alter table messageLog change messageLogId messageLogId varchar(22) binary not null", - "alter table messageLog change userId userId varchar(22) binary not null", - "alter table ldapLink change ldapLinkId ldapLinkId varchar(22) binary not null", - "alter table ldapLink change ldapAccountTemplate ldapAccountTemplate varchar(22) binary not null", - "alter table ldapLink change ldapCreateAccountTemplate ldapCreateAccountTemplate varchar(22) binary not null", - "alter table ldapLink change ldapLoginTemplate ldapLoginTemplate varchar(22) binary not null", - "alter table groups change groupId groupId varchar(22) binary not null", - "alter table groups change databaseLinkId databaseLinkId varchar(22) binary not null", - "alter table karmaLog change dateModified dateModified bigint not null", - "alter table karmaLog change userId userId varchar(22) binary not null", - "alter table databaseLink change databaseLinkId databaseLinkId varchar(22) binary not null", - "alter table groupGroupings change groupId groupId varchar(22) binary not null", - "alter table groupGroupings change inGroup inGroup varchar(22) binary not null", - "alter table groupings change groupId groupId varchar(22) binary not null", - "alter table groupings change expireDate expireDate bigint not null default 2114402400", - "alter table groupings change userId userId varchar(22) binary not null", - "alter table authentication change userId userId varchar(22) binary not null", - "alter table assetVersionTag change tagId tagId varchar(22) binary not null", - "alter table assetVersionTag change createdBy createdBy varchar(22) binary not null", - "alter table assetVersionTag change committedBy committedBy varchar(22) binary not null", - "alter table assetHistory change assetId assetId varchar(22) binary not null", - "alter table assetHistory change userId userId varchar(22) binary not null", - "alter table assetData change assetId assetId varchar(22) binary not null", - "alter table assetData change revisedBy revisedBy varchar(22) binary not null", - "alter table assetData change tagId tagId varchar(22) binary not null", - "alter table assetData change ownerUserId ownerUserId varchar(22) binary not null", - "alter table assetData change groupIdEdit groupIdEdit varchar(22) binary not null", - "alter table assetData change groupIdView groupIdView varchar(22) binary not null", - "alter table Thread change assetId assetId varchar(22) binary not null", - "alter table Thread change lastPostId lastPostId varchar(22) binary not null", - "alter table Thread change subscriptionGroupId subscriptionGroupId varchar(22) binary not null", - "alter table WSClient change assetId assetId varchar(22) binary not null", - "alter table WSClient change templateId templateId varchar(22) binary not null", - "alter table SyndicatedContent change assetId assetId varchar(22) binary not null", - "alter table SyndicatedContent change templateId templateId varchar(22) binary not null", - "alter table Survey_section change Survey_id Survey_id varchar(22) binary not null", - "alter table Survey_section change Survey_sectionId Survey_sectionId varchar(22) binary not null", - "alter table Survey_response change Survey_id Survey_id varchar(22) binary not null", - "alter table Survey_response change startDate startDate bigint not null", - "alter table Survey_response change endDate endDate bigint not null", - "alter table Survey_response change Survey_responseId Survey_responseId varchar(22) binary not null", - "alter table Survey_question change Survey_id Survey_id varchar(22) binary not null", - "alter table Survey_question change Survey_questionId Survey_questionId varchar(22) binary not null", - "alter table Survey_question change Survey_sectionId Survey_sectionId varchar(22) binary not null", - "alter table Survey_questionResponse change dateOfResponse dateOfResponse bigint not null", - "alter table Survey_questionResponse change Survey_id Survey_id varchar(22) binary not null", - "alter table Survey_questionResponse change Survey_questionId Survey_questionId varchar(22) binary not null", - "alter table Survey_questionResponse change Survey_answerId Survey_answerId varchar(22) binary not null", - "alter table Survey_questionResponse change Survey_responseId Survey_responseId varchar(22) binary not null", - "alter table Survey change assetId assetId varchar(22) binary not null", - "alter table Survey change groupToViewReports groupToViewReports varchar(22) binary not null default '3'", - "alter table Survey change groupToTakeSurvey groupToTakeSurvey varchar(22) binary not null default '2'", - "alter table Survey change responseTemplateId responseTemplateId varchar(22) binary not null", - "alter table Survey change overviewTemplateId overviewTemplateId varchar(22) binary not null", - "alter table Survey change gradebookTemplateId gradebookTemplateId varchar(22) binary not null", - "alter table Survey change templateId templateId varchar(22) binary not null", - "alter table Survey change Survey_id Survey_id varchar(22) binary not null", - "alter table Survey_answer change Survey_id Survey_id varchar(22) binary not null", - "alter table Survey_answer change Survey_questionId Survey_questionId varchar(22) binary not null", - "alter table Survey_answer change Survey_answerId Survey_answerId varchar(22) binary not null", - "alter table Survey_answer change gotoQuestion gotoQuestion varchar(22) binary not null", - "alter table RichEdit change assetId assetId varchar(22) binary not null", - "alter table SQLReport change assetId assetId varchar(22) binary not null", - "alter table SQLReport change templateId templateId varchar(22) binary not null", - "alter table SQLReport change databaseLinkId1 databaseLinkId1 varchar(22) binary not null", - "alter table SQLReport change databaseLinkId2 databaseLinkId2 varchar(22) binary not null", - "alter table SQLReport change databaseLinkId3 databaseLinkId3 varchar(22) binary not null", - "alter table SQLReport change databaseLinkId4 databaseLinkId4 varchar(22) binary not null", - "alter table SQLReport change databaseLinkId5 databaseLinkId5 varchar(22) binary not null", - "alter table Shortcut change assetId assetId varchar(22) binary not null", - "alter table Shortcut change templateId templateId varchar(22) binary not null", - "alter table Shortcut change overrideTemplateId overrideTemplateId varchar(22) binary not null", - "alter table Shortcut change shortcutToAssetId shortcutToAssetId varchar(22) binary not null", - "alter table Product_feature change assetId assetId varchar(22) binary not null", - "alter table Product_feature change Product_featureId Product_featureId varchar(22) binary not null", - "alter table Product_related change assetId assetId varchar(22) binary not null", - "alter table Product_related change relatedAssetId relatedAssetId varchar(22) binary not null", - "alter table Product_specification change Product_specificationId Product_specificationId varchar(22) binary not null", - "alter table Product_specification change assetId assetId varchar(22) binary not null", - "alter table Product change assetId assetId varchar(22) binary not null", - "alter table Product change templateId templateId varchar(22) binary not null", - "alter table Product_accessory change assetId assetId varchar(22) binary not null", - "alter table Product_accessory change accessoryAssetId accessoryAssetId varchar(22) binary not null", - "alter table Product_benefit change assetId assetId varchar(22) binary not null", - "alter table Product_benefit change Product_benefitId Product_benefitId varchar(22) binary not null", - "alter table Post change assetId assetId varchar(22) binary not null", - "alter table Post change threadId threadId varchar(22) binary not null", - "alter table Post change storageId storageId varchar(22) binary not null", - "alter table Post_rating change assetId assetId varchar(22) binary not null", - "alter table Post_rating change userId userId varchar(22) binary not null", - "alter table Post_read change threadId threadId varchar(22) binary not null", - "alter table Post_read change userId userId varchar(22) binary not null", - "alter table Post_read change postId postId varchar(22) binary not null", - "alter table Poll change assetId assetId varchar(22) binary not null", - "alter table Poll change templateId templateId varchar(22) binary not null", - "alter table Poll_answer change assetId assetId varchar(22) binary not null", - "alter table Poll_answer change userId userId varchar(22) binary not null", - "alter table Layout change assetId assetId varchar(22) binary not null", - "alter table Layout change templateId templateId varchar(22) binary not null", - "alter table MessageBoard change assetId assetId varchar(22) binary not null", - "alter table MessageBoard change templateId templateId varchar(22) binary not null", - "alter table Navigation change assetId assetId varchar(22) binary not null", - "alter table Navigation change templateId templateId varchar(22) binary not null", - "alter table ITransact_recurringStatus change initDate initDate bigint not null", - "alter table ITransact_recurringStatus change lastTransaction lastTransaction bigint not null", - "alter table ImageAsset change assetId assetId varchar(22) binary not null", - "alter table FileAsset change assetId assetId varchar(22) binary not null", - "alter table FileAsset change templateId templateId varchar(22) binary not null", - "alter table FileAsset change storageId storageId varchar(22) binary not null", - "alter table Folder change assetId assetId varchar(22) binary not null", - "alter table Folder change templateId templateId varchar(22) binary not null", - "alter table HttpProxy change assetId assetId varchar(22) binary not null", - "alter table HttpProxy change templateId templateId varchar(22) binary not null", - "alter table HttpProxy change cookieJarStorageId cookieJarStorageId varchar(22) binary not null", - "alter table EventsCalendar change assetId assetId varchar(22) binary not null", - "alter table EventsCalendar change templateId templateId varchar(22) binary not null", - "alter table EventsCalendar_event change assetId assetId varchar(22) binary not null", - "alter table EventsCalendar_event change templateId templateId varchar(22) binary not null", - "alter table EventsCalendar_event change EventsCalendar_recurringId EventsCalendar_recurringId varchar(22) binary not null", - "alter table DataForm change assetId assetId varchar(22) binary not null", - "alter table DataForm change templateId templateId varchar(22) binary not null", - "alter table DataForm change emailTemplateId emailTemplateId varchar(22) binary not null", - "alter table DataForm change acknowlegementTemplateId acknowlegementTemplateId varchar(22) binary not null", - "alter table DataForm change listTemplateId listTemplateId varchar(22) binary not null", - "alter table DataForm_entry change assetId assetId varchar(22) binary not null", - "alter table DataForm_entry change DataForm_entryId DataForm_entryId varchar(22) binary not null", - "alter table DataForm_entry change submissionDate submissionDate bigint not null", - "alter table DataForm_entry change userId userId varchar(22) binary not null", - "alter table DataForm_entryData change assetId assetId varchar(22) binary not null", - "alter table DataForm_entryData change DataForm_entryId DataForm_entryId varchar(22) binary not null", - "alter table DataForm_entryData change DataForm_fieldId DataForm_fieldId varchar(22) binary not null", - "alter table DataForm_field change assetId assetId varchar(22) binary not null", - "alter table DataForm_field change DataForm_tabId DataForm_tabId varchar(22) binary not null", - "alter table DataForm_field change DataForm_fieldId DataForm_fieldId varchar(22) binary not null", - "alter table DataForm_tab change assetId assetId varchar(22) binary not null", - "alter table DataForm_tab change DataForm_tabId DataForm_tabId varchar(22) binary not null", - "alter table Article change assetId assetId varchar(22) binary not null", - "alter table Article change templateId templateId varchar(22) binary not null", - "alter table Collaboration change assetId assetId varchar(22) binary not null", - "alter table Collaboration change threadTemplateId threadTemplateId varchar(22) binary not null", - "alter table Collaboration change postGroupId postGroupId varchar(22) binary not null default '2'", - "alter table Collaboration change moderateGroupId moderateGroupId varchar(22) binary not null default '4'", - "alter table Collaboration change collaborationTemplateId collaborationTemplateId varchar(22) binary not null", - "alter table Collaboration change threadTemplateId threadTemplateId varchar(22) binary not null", - "alter table Collaboration change postFormTemplateId postFormTemplateId varchar(22) binary not null", - "alter table Collaboration change searchTemplateId searchTemplateId varchar(22) binary not null", - "alter table Collaboration change notificationTemplateId notificationTemplateId varchar(22) binary not null", - "alter table Collaboration change lastPostId lastPostId varchar(22) binary", - "alter table Collaboration change subscriptionGroupId subscriptionGroupId varchar(22) binary", - "alter table Collaboration change richEditor richEditor varchar(22) binary not null default 'PBrichedit000000000002'" - ); - foreach my $query (@sql) { - WebGUI::SQL->write($query); - } -} - -#------------------------------------------------- -sub deleteOldHelpFiles { - my @dupes = qw/Article Collaboration DataForm EventsCalendar File Folder Survey HttpProxy - IndexedSearch Image Layout MessageBoard Navigation Poll Post Product - Redirect Shortcut Snippet SQLReport SyndicatedContent Template Thread/; - my $path = "../../lib/WebGUI/"; - print "\tDeleting old documentation\n" unless ($quiet); - foreach my $dupe (@dupes) { - print "\tDeleting old documentation for $dupe\n" unless ($quiet); - foreach my $dir ("Help/", "i18n/English/") { - my $file = join '', $path, $dir, $dupe, '.pm'; - my $files_deleted = unlink($file); - print("\t\tUnable to delete $file: $!\n") unless $quiet or $files_deleted or $! eq "No such file or directory"; - } - } -} - - -#------------------------------------------------- -sub start { - $|=1; #disable output buffering - GetOptions( - 'configFile=s'=>\$configFile, - 'quiet'=>\$quiet - ); - WebGUI::Session::open("../..",$configFile); - WebGUI::Session::refreshUserInfo(3); - WebGUI::SQL->write("insert into webguiVersion values (".quote($toVersion).",'upgrade',".time().")"); -} - -#------------------------------------------------- -sub finish { - WebGUI::Session::close(); -} - diff --git a/docs/upgrades/upgrade_6.7.3-6.7.4.pl b/docs/upgrades/upgrade_6.7.3-6.7.4.pl deleted file mode 100644 index 57b3bec40..000000000 --- a/docs/upgrades/upgrade_6.7.3-6.7.4.pl +++ /dev/null @@ -1,859 +0,0 @@ -use lib "../../lib"; -use strict; -use Getopt::Long; -use WebGUI::Session; -use WebGUI::SQL; -use WebGUI::Asset; -use WebGUI::Setting; - -my $toVersion = "6.7.4"; -my $configFile; -my $quiet; - -start(); - -updatePageTemplates(); -addDebug(); -fixFutureDates(); -makeQueriesFaster(); -readdingIsSystem(); - -finish(); - - -#------------------------------------------------- -sub readdingIsSystem { - print "\tRe-adding the isSystem flag to the asset table.\n" unless ($quiet); - WebGUI::SQL->write("alter table asset add column isSystem int not null default 0"); - WebGUI::SQL->write("update asset set isSystem=1 where assetId='PBasset000000000000001'"); - WebGUI::SQL->write("update asset set isSystem=1 where assetId='PBasset000000000000002'"); -} - - -#------------------------------------------------- -sub makeQueriesFaster { - print "\tMaking queries a little faster.\n" unless ($quiet); - WebGUI::SQL->write("alter table assetData add index assetId_url (assetId,url)"); - WebGUI::SQL->write("alter table assetData add index assetId_revisionDate_status_tagId (assetId,revisionDate,status,tagId)"); - WebGUI::SQL->write("alter table asset add index className_assetId_state (className,assetId,state)"); -} - -#------------------------------------------------- -sub fixFutureDates { - print "\tFixing end dates which appear too far in the future.\n" unless ($quiet); - WebGUI::SQL->write("update assetData set endDate = 32472169200 where endDate > 32472169200"); -} - -#------------------------------------------------- -sub addDebug { - print "\tAdding more debug options.\n" unless ($quiet); - WebGUI::Setting::add("debugIp",""); - WebGUI::Setting::add("showPerformanceIndicators","0"); -} - -#------------------------------------------------- -sub updatePageTemplates { - print "\tMaking page templates float better in IE.\n" unless ($quiet); - # news - my $template = < - -

    -
    - -^RawHeadTags(); - - -

    -
    - - -

    -
    - - -
    - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - - -
     
    - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - -
     
    - - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - - -
    - -
    - -END - WebGUI::Asset->new("PBtmpl0000000000000094","WebGUI::Asset::Template")->addRevision({template=>$template})->commit; - - # side by side - $template = < - - -

    -
    - -^RawHeadTags(); - - -

    -
    - - -

    -
    - - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - -
     
    - - - -
    - -
    - -END - WebGUI::Asset->new("PBtmpl0000000000000135","WebGUI::Asset::Template")->addRevision({template=>$template})->commit; - - # left column - $template = < - - -

    -
    - -^RawHeadTags(); - - -

    -
    - - -

    -
    - - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - -
     
    - - -
    - -
    - -END - WebGUI::Asset->new("PBtmpl0000000000000125","WebGUI::Asset::Template")->addRevision({template=>$template})->commit; - - # right column - $template = < - - -

    -
    - -^RawHeadTags(); - - -

    -
    - - -

    -
    - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - -
     
    - - - -
    - -
    - -END - WebGUI::Asset->new("PBtmpl0000000000000131","WebGUI::Asset::Template")->addRevision({template=>$template})->commit; - - # one over three - $template = < - - -

    -
    - -^RawHeadTags(); - - -

    -
    - - -

    -
    - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - -
     
    - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - - -
     
    - - - -
    - -
    - -END - WebGUI::Asset->new("PBtmpl0000000000000109","WebGUI::Asset::Template")->addRevision({template=>$template})->commit; - - # three over one - $template = < - - -

    -
    - -^RawHeadTags(); - - -

    -
    - - -

    -
    - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - - -
     
    - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - - -
    - -
    - -END - WebGUI::Asset->new("PBtmpl0000000000000118","WebGUI::Asset::Template")->addRevision({template=>$template})->commit; - - # three over one - $template = < - - -

    -
    - - -

    -
    - - -

    -
    - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - -
    - -
    -END - WebGUI::Asset->new("PBtmpl0000000000000054","WebGUI::Asset::Template")->addRevision({template=>$template})->commit; -} - - - - - -#------------------------------------------------- -sub start { - $|=1; #disable output buffering - GetOptions( - 'configFile=s'=>\$configFile, - 'quiet'=>\$quiet - ); - WebGUI::Session::open("../..",$configFile); - WebGUI::Session::refreshUserInfo(3); - WebGUI::SQL->write("insert into webguiVersion values (".quote($toVersion).",'upgrade',".time().")"); -} - -#------------------------------------------------- -sub finish { - WebGUI::Session::close(); -} - diff --git a/docs/upgrades/upgrade_6.7.4-6.7.5.pl b/docs/upgrades/upgrade_6.7.4-6.7.5.pl deleted file mode 100644 index 79dba34ca..000000000 --- a/docs/upgrades/upgrade_6.7.4-6.7.5.pl +++ /dev/null @@ -1,979 +0,0 @@ -use lib "../../lib"; -use strict; -use Getopt::Long; -use WebGUI::Session; -use WebGUI::SQL; -use WebGUI::Asset; -use WebGUI::Setting; - -my $toVersion = "6.7.5"; -my $configFile; -my $quiet; - -start(); - -fixSurveyAnswerDefinition(); -fixTemplates(); -fixArticles(); -sleep(1); # have to wait a second to add these revisions because you can't have two revisions of the same thing in the same second -fixTemplatesExtras(); - -finish(); - - -#------------------------------------------------- -sub fixSurveyAnswerDefinition { - print "\tFixing definition of survey answers.\n" unless ($quiet); - WebGUI::SQL->write("alter table Survey_answer change gotoQuestion gotoQuestion varchar(22) binary"); -} - -#------------------------------------------------- -sub fixTemplates { - print "\tFixing templates...\n" unless ($quiet); - - # AdminConsole > Admin Console - my $template = < - - -
    - -
    -
    -
    -   -
    - - -
    - <tmpl_var title>
    - -
    -
    -
    -
    -   -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - - >
    -
    -
    -
    -
    - ^AdminToggle;
    - ^LoginToggle;
    -
    -
    -
    - -
    -
    - - ? - -
    -
    - <tmpl_var application.title> -
    -
    -* -
    -
    - <tmpl_var console.title> -
    - -END - WebGUI::Asset->new("PBtmpl0000000000000001","WebGUI::Asset::Template")->addRevision({template=>$template})->commit; - - # Article > Default Article - my $template = < - -

    -
    - -

    -
    - - - -
    - <tmpl_var image.url> - - - - - - - - - - -

    - - - - - - - - -· - -· - - - - - -

    -
    -
    - - - -

    - - - - - -
    ()
    - - -END - WebGUI::Asset->new("PBtmpl0000000000000002","WebGUI::Asset::Template")->addRevision({template=>$template})->commit; - - # Layout > Default Page - my $template = < - - -

    -
    - - -

    -
    - - -

    -
    - -
    - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - -
    - -
    -END - WebGUI::Asset->new("PBtmpl0000000000000054","WebGUI::Asset::Template")->addRevision({template=>$template})->commit; - - # Macro/AdminBar > DHTML Admin Bar - $template = < -// - panel.addLink("","",""); - - slider.addPanel(panel); - - panel = new createPanel("clipboard","Clipboard"); - - panel.addLink("","",""); - - slider.addPanel(panel); - - panel = new createPanel("packages","Packages"); - - panel.addLink("","",""); - - slider.addPanel(panel); - - panel = new createPanel("assets","New Content"); - - panel.addLink("","",""); - - panel.addLink("^Extras;/spacer.gif","
    ",""); - - - panel.addLink("","",""); - - slider.addPanel(panel); - slider.draw(); - -//]]> - -END - WebGUI::Asset->new("PBtmpl0000000000000090","WebGUI::Asset::Template")->addRevision({template=>$template})->commit; - - # Navigation > verticalMenu - my $template = < -

    -
    - -

    -
    - -
    -
    - - -target="_blank" href=""> - - -
    -
    -
    -END - WebGUI::Asset->new("PBtmpl0000000000000048","WebGUI::Asset::Template")->addRevision({template=>$template})->commit; - - # style > Admin Console - my $template = < - - - WebGUI <tmpl_var session.webgui.version>-<tmpl_var session.webgui.status> Admin Console - - - - - - - - -END - WebGUI::Asset->new("PBtmpl0000000000000137","WebGUI::Asset::Template")->addRevision({template=>$template})->commit; - - # style > Fail Safe - my $template = < - - - ^Page("title"); - WebGUI - - - - - - ^AdminBar; - - - -
    - -
    -
    -
    - ^LoginToggle;   ^a(^@;);   ^H;   ^AdminToggle; -
    - - - -END - WebGUI::Asset->new("PBtmpl0000000000000060","WebGUI::Asset::Template")->addRevision({template=>$template})->commit; - - # style > Make Page Printable - my $template = < - - - ^Page(title); - <tmpl_var session.setting.companyName> - - - - - - - - ^AdminBar(""); - -
    - - - -
    © 2001-2005 Plain Black Corporation
    - - - -END - WebGUI::Asset->new("PBtmpl0000000000000111","WebGUI::Asset::Template")->addRevision({template=>$template})->commit; - - # style > WebGUI 6 - my $template = < - - - ^Page(title); - <tmpl_var session.setting.companyName> - - - - - - - -^AdminBar("PBtmpl0000000000000090"); - - - - - - - - -
    - - - - - - - - - -
    -        -home -Email -Print -Site Map Plain Black Icon -^Spacer(56,1);the LAST web solution you'll ever NEED^Spacer(26,1);
    - - - - - - - - - - -
    ^Spacer(53,59);^D("%c %D, %y");
    ^PageTitle;
    ^Spacer(53,59);
    - - - - - - - - - - - - - - - - - -
    ^Spacer(53,1); -


    -Powered by WebGUI -
    - - ^Spacer(53,1);
    - - - - - - - - - - -
    plainblack
    Design by Plain Black
    - - - -END - my $asset = WebGUI::Asset->new("B1bNjWVtzSjsvGZh9lPz_A","WebGUI::Asset::Template"); - $asset->addRevision({template=>$template})->commit if (defined $asset); - - # style > WebGUI 6 Admin Style - my $template = < - - - ^Page(title); - <tmpl_var session.setting.companyName> - - - - - - - - ^AdminBar("PBtmpl0000000000000090");

    - -
    - -
    - -
    - ^H; / ^PageTitle; / ^AdminToggle; / ^LoginToggle; / ^a; -
    - - - -END - my $asset = WebGUI::Asset->new("9tBSOV44a9JPS8CcerOvYw","WebGUI::Asset::Template"); - $asset->addRevision({template=>$template})->commit if (defined $asset); -} - -#------------------------------------------------- -sub fixArticles { - print "\tFixing articles...\n" unless ($quiet); - - # home/key_benefits - my $description = < -
    -
    Easy to Use
    -
    If you can use a web browser, then you can manage a web site with -WebGUI. WebGUI's unique WYSIWYG inline content editing interface -ensures that you know where you are and what your content will look -like while you're editing. In addition, you don't need to install and -learn any complicated programs, you can edit everything with your -trusty web browser.
    - -
    Flexible Designs
    -
    WebGUI's powerful templating system ensures that no two WebGUI -sites ever need to look the same. You're not restricted in how your -content is laid out or how your navigation functions.
    - -
    Work Faster
    -
    Though there is some pretty cool technology behind the scenes that -makes WebGUI work, our first concern has always been usability and not -technology. After all if it's not useful, why use it? With that in mind -WebGUI has all kinds of wizards, short cuts, online help, and other -aids to help you work faster.
    - -
    Localized Content
    -
    With WebGUI there's no need to limit yourself to one language or -timezone. It's a snap to build a multi-lingual site with WebGUI. In -fact, even WebGUI's built in functions and online help have been -translated to more than 15 languages. User's can also adjust their -local settings for dates, times, and other localized oddities.
    - -
    Pluggable By Design
    -
    When Plain Black created -WebGUI we knew we wouldn't be able to think of everything you want to -use WebGUI for, so we made most of WebGUI's functions pluggable. This -allows you to add new features to WebGUI and still be able to upgrade -the core system without a fuss.
    -
    -END - my $asset = WebGUI::Asset->new("sWVXMZGibxHe2Ekj1DCldA","WebGUI::Asset::Wobject::Article"); - $asset->addRevision({description=>$description})->commit if (defined $asset); -} - -#------------------------------------------------- -sub fixTemplatesExtras { - print "\tFixing built-in templates with the Extras Macro.\n" unless ($quiet); - my @tmpls = WebGUI::SQL->buildArray("select distinct assetId from template"); - foreach my $id (@tmpls) { - my $asset = WebGUI::Asset->new($id,"WebGUI::Asset::Template"); - my $template = $asset->get("template"); - $template =~ s/\^Extras;\//^Extras;/ixsg; - $asset->addRevision({template=>$template})->commit; - } -} - -#------------------------------------------------- -sub start { - $|=1; #disable output buffering - GetOptions( - 'configFile=s'=>\$configFile, - 'quiet'=>\$quiet - ); - WebGUI::Session::open("../..",$configFile); - WebGUI::Session::refreshUserInfo(3); - WebGUI::SQL->write("insert into webguiVersion values (".quote($toVersion).",'upgrade',".time().")"); -} - -#------------------------------------------------- -sub finish { - WebGUI::Session::close(); -} - diff --git a/docs/upgrades/upgrade_6.7.5-6.7.6.pl b/docs/upgrades/upgrade_6.7.5-6.7.6.pl deleted file mode 100644 index c76b3c23a..000000000 --- a/docs/upgrades/upgrade_6.7.5-6.7.6.pl +++ /dev/null @@ -1,41 +0,0 @@ -use lib "../../lib"; -use strict; -use Getopt::Long; -use WebGUI::Session; -use WebGUI::SQL; -use WebGUI::Asset; -use WebGUI::Setting; - -my $toVersion = "6.7.6"; -my $configFile; -my $quiet; - -start(); - -finish(); - - -#------------------------------------------------- -sub somefunc { - print "\tDoing something.\n" unless ($quiet); - # do something -} - - -#------------------------------------------------- -sub start { - $|=1; #disable output buffering - GetOptions( - 'configFile=s'=>\$configFile, - 'quiet'=>\$quiet - ); - WebGUI::Session::open("../..",$configFile); - WebGUI::Session::refreshUserInfo(3); - WebGUI::SQL->write("insert into webguiVersion values (".quote($toVersion).",'upgrade',".time().")"); -} - -#------------------------------------------------- -sub finish { - WebGUI::Session::close(); -} - diff --git a/docs/upgrades/upgrade_6.7.6-6.7.7.pl b/docs/upgrades/upgrade_6.7.6-6.7.7.pl deleted file mode 100644 index 9af9a0308..000000000 --- a/docs/upgrades/upgrade_6.7.6-6.7.7.pl +++ /dev/null @@ -1,6122 +0,0 @@ -use lib "../../lib"; -use strict; -use Getopt::Long; -use WebGUI::Session; -use WebGUI::SQL; -use WebGUI::Asset; -use WebGUI::Setting; - -my $toVersion = "6.7.7"; -my $configFile; -my $quiet; -my %fixedTemplates; - -start(); -removingThreadedView(); -fixTemplates(); -finish(); - -#------------------------------------------------- -sub removingThreadedView { - print "\tRemoving threaded views from CS in favor of nested views.\n" unless ($quiet); - # - # (template fixes moved into fixTemplates function) - # - WebGUI::SQL->write("update userSessionScratch set value='nested' where value='threaded' and name='discussionLayout'"); - WebGUI::SQL->write("update userProfileData set fieldData='nested' where fieldData='threaded' and fieldName='discussionLayout'"); - WebGUI::SQL->write("update userProfileField set dataValues='{ - flat=>WebGUI::International::get(510), - nested=>WebGUI::International::get(1045) -}', dataDefault=".quote("['nested']")." where fieldName='discussionLayout'"); -} - -#------------------------------------------------- -sub fixTemplates { - print "\tFixing templates.\n" unless ($quiet); - loadFixedTemplates(); - foreach my $assetId (keys %fixedTemplates) { - my $asset = WebGUI::Asset->new($assetId, "WebGUI::Asset::Template"); - $asset->addRevision({template=>$fixedTemplates{$assetId}})->commit if (defined $asset); - } -} - -#------------------------------------------------- -sub start { - $|=1; #disable output buffering - GetOptions( - 'configFile=s'=>\$configFile, - 'quiet'=>\$quiet - ); - WebGUI::Session::open("../..",$configFile); - WebGUI::Session::refreshUserInfo(3); - WebGUI::SQL->write("insert into webguiVersion values (".quote($toVersion).",'upgrade',".time().")"); -} - -#------------------------------------------------- -sub finish { - WebGUI::Session::close(); -} - -#------------------------------------------------- -# No interesting code below this line, only templates -sub loadFixedTemplates { -$fixedTemplates{DPUROtmpl0000000000001} = << 'END'; - - - -

    -
    - -

    -RSS 0.90 -RSS 0.91 -RSS 1.0 -RSS 2.0 -

    - - -

    -
    - - - -

    - - -

    - - - - - -

    - - -

    - - - - - - -

    -
    - -
  • - - - - - - - - - - -
    - - -END - -$fixedTemplates{GNvjCFQWjY2AF2uf0aCM8Q} = << 'END'; - - - -

    -
    - - -

    -
    - - -

    - - -

    - - - - - -

    - - -

    - - - - - -
    - -
    - -
    - Read More... -
    -
    -
    -
    -END - -$fixedTemplates{PBtmpl0000000000000001} = << 'END'; -^StyleSheet(^Extras;adminConsole/adminConsole.css); -^JavaScript(^Extras;adminConsole/adminConsole.js); - -

    - -
    -
    - -
    -
    -
    -   -
    - - -
    - <tmpl_var title>
    - -
    -
    -
    -
    -   -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - - >
    -
    -
    -
    -
    - ^AdminToggle;
    - ^LoginToggle;
    -
    -
    -
    - -
    -
    - - ? - -
    -
    - <tmpl_var application.title> -
    -
    -* -
    -
    - <tmpl_var console.title> -
    - -END - -$fixedTemplates{PBtmpl0000000000000002} = << 'END'; - - - -

    -
    - - -

    -
    - - - -
    - <tmpl_var image.url> - - - - - - - - - - -

    - - - - - - - - -· - -· - - - - - -

    -
    -
    - - - -

    - - - - - -
    ()
    - - -END - -$fixedTemplates{PBtmpl0000000000000003} = << 'END'; - - - - - -
    - <tmpl_var attachment.name> - - <tmpl_var attachment.name> -
    -END - -$fixedTemplates{PBtmpl0000000000000004} = << 'END'; -

    - -

    - - - -

    - - - - - -
    - - - -
    -
    - -
    -
      - -
    • -
      -
    -
    -END - -$fixedTemplates{PBtmpl0000000000000010} = << 'END'; -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - -
    -
      - -
    • -
      -
    -
    -END - -$fixedTemplates{PBtmpl0000000000000020} = << 'END'; - - -

    -
    - - -

    -
    - - -
      - -
    • - -
    -
    - - - -

    - - - - - · - - · - - - · - · - -

    - - - - - - - - - - -
    - - - - - - - - - * -
    -
    - - -END - -$fixedTemplates{PBtmpl0000000000000022} = << 'END'; - - - -

    -
    - - -

    -
    - - - -

    - - - - -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

     

    - - - ·
    -
    -
    -
     
    -
    - - -

    -
    -END - -$fixedTemplates{PBtmpl0000000000000026} = << 'END'; - - - -

    -
    - - - - -

    -
    - - - - - -

    - - - • - - - - - - - - • - - -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    @ - - by - - - - - - on @ -
    - - - - -END - -$fixedTemplates{PBtmpl0000000000000029} = << 'END'; - - - -

    -
    - - -

    -
    - -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - -

    - -
    -END - -$fixedTemplates{PBtmpl0000000000000031} = << 'END'; - - - -

    -
    - - - - -
    -

    -
    - - - - - - -
    -
    - -
    - - - - - - - - - - - - - - - - - - - -
    @
    -
    - - - - -END - -$fixedTemplates{PBtmpl0000000000000032} = << 'END'; - - - -

    -
    - - - -
    -

    -
    -
    - - - - - -
    -
    - - - - -
    - -
    - -
    -
    -
    - : - - - - - -
    - :
    -
    -
    - :
    - : - -     [ 1, 2, 3, 4, 5 ] - -
    - - :     [ | ]
    - - - :
    -
    -
    -
    -
    -
    - - - - -
    - -
    - -
    - - [] - - - [] - [] - -
    -
    -
    -
    - -
    - - - - -
    -
    - -
    - -
    -
    -
    - : - - - - - -
    - :
    -
    -
    - :
    - : - -     [ 1, 2, 3, 4, 5 ] - -
    - - :     [ | ]
    - - - :
    -
    -
    -
    -
    -
    - - - - -
    - -
    - -
    - - [] - - - [] - [] - -
    -
    -
    -
    -
    - -
    - - - - - -
    - - [] - - - [] - - - [] - - - - [] - - [] - - - [] - - [] - - - - - [] - - [] - - -
    -END - -$fixedTemplates{PBtmpl0000000000000033} = << 'END'; - - - -

    -
    - - -

    -
    - - - -

    - - - - - - - - - Error: Search string not found in content. - - - - - - - - - - - - Warning: Ending search point not found in content. - - -END - -$fixedTemplates{PBtmpl0000000000000034} = << 'END'; - - - -

    -
    - - -

    -
    - - -

    - - - - - - - - - -

    - - - - - - - - - - - - - -
    - -
    - - - - - checked="1" - - checked="1" - - - checked="1" - - > -
    -
    -
    -
    -
    - -

    - -

    Results - of about - containing "". Search took seconds.

    -
      - -
    1. - No Title -
      - -
      -
      - Location: -
      -
      -
      -
    2. -
      -
    -
    - - - - -END - -$fixedTemplates{PBtmpl0000000000000047} = << 'END'; - - - -

    -
    - - -

    -
    - - - -

    - - - - -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - -
    - - by - - - - - - on @ -
    - -

    - -
    -
    - -

    - - -END - -$fixedTemplates{PBtmpl0000000000000049} = << 'END'; - -
    -
    -

    -

    - -

    -
      - -
    • -
      - -
    • -
      -
    -
    -END - -$fixedTemplates{PBtmpl0000000000000054} = << 'END'; - - - -

    -
    - - -

    -
    - - -

    -
    - -
    - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - -
    - -
    -END - -$fixedTemplates{PBtmpl0000000000000055} = << 'END'; - - - -

    -
    - - -

    -
    - - - -

    - - -
    - - - - -
    -
    -

    - - - - -



    - - - -
      % ()
    - -
    :
    -
    -END - -$fixedTemplates{PBtmpl0000000000000056} = << 'END'; - - - -

    -
    - - - - -

    -
    - - - - - - -
    -

    - Price:
    - Product Number:
    -
    - <tmpl_var brochure.icon>
    - <tmpl_var manual.icon>
    - <tmpl_var warranty.icon>
    -

    - <tmpl_var thumbnail1>

    - <tmpl_var thumbnail2>

    - <tmpl_var thumbnail3>

    -

    - - - - - - - - - - - - - -
    -
    Features
    -

    - - -
    -
    -

    -

    - - -
    Benefits
    -

    - - -
    -
    -

    -

    - - -
    Specifications
    -

    - - - :
    -
    -

    -

    - - -
    Accessories
    -

    - - -
    -
    -

    -

    - - -
    Related Products
    -

    - - -
    -
    -

    -END - -$fixedTemplates{PBtmpl0000000000000059} = << 'END'; - - - -

    -
    - - -

    -
    - - - -

    - - - -

      - -
    • -
      -
    -
    - - - - - - - - - - - - - - - - - - - - -
    - - - - - -
      - - - - - - - - - - - - - - - - - - - -
    - - - - - -
      - - - - - - - - - - - - - - - - - - - -
    - - - - - -
      - - - - - - - - - - - - - - - - - - - -
    - - - - - -
      - - - - - - - - - - - - - -
    -
    -
    -
    -
    -
    -
    -
    -
    - - - - -END - -$fixedTemplates{PBtmpl0000000000000060} = << 'END'; - - - - ^Page("title"); - WebGUI - - - - - - ^AdminBar; - -
    - - - -
    - -
    -
    -
    - ^LoginToggle;   ^a(^@;);   ^H;   ^AdminToggle; -
    - -
    - - - -END - -$fixedTemplates{PBtmpl0000000000000061} = << 'END'; - - - -

    -
    - - -

    -
    - - - -

    - - - - - - - - -

    - : / -
    - :% -
    -
    - -

    -
    - - - - - - - - -
    - -

    -
    -
    -
    - -
    -
    -
    -
    -
    - : /
    - - : /
    - :% / 100%
    -
    -
    -
    - - - -
    -
    - - - - - - -
    -
    -
    - - - • - - • - -
    - - • - - • - - • - -
    - - -

    -

    - - -

    - -    - -
    -
    -
    -
    -END - -$fixedTemplates{PBtmpl0000000000000063} = << 'END'; -

    - - - - • - - • - -
    - - • - - • - - • - -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -

    -
    -
    - -
    - -
    -
    - -

    - -
    -
    -
    -
    -
    -


    -
    - - - - -END - -$fixedTemplates{PBtmpl0000000000000065} = << 'END'; - - - -

    -
    - - -

    -
    - - - -

    - - -

    - - - - - -

    - - - -

    - - - -

  • - - - - - - - - - -
    - -END - -$fixedTemplates{PBtmpl0000000000000066} = << 'END'; - - - - - - - - - -

    -
    - - - - - -

    - - - • - - - - - - - - • - - -

    - - - - - - - - - - - - - - - - - - - - - - - - -
    ()
    - - - - -END - -$fixedTemplates{PBtmpl0000000000000067} = << 'END'; - - - -

    -
    - -

    - -
    - : - - - - - -
    - :
    - :
    - : - -     [ 1, 2, 3, 4, 5 ] - -
    - - :     [ | ]
    - - - :
    -
    -
    -
    - - - - -
    - -
    - <tmpl_var filename><tmpl_var filename> -
    -
    -
    -
    -
    - - -

    -
    - - -

    -
    - - -

    -
    - - -

    -
    - - -

    -
    - - -

    - - [] - - - [] - [] - -

    -
    - - - - -
    -

    -
    -
    - - - - - -
    -
    - - - - - -
    - -
    - -
    -
    -
    - : - - - - - -
    - :
    -
    -
    - :
    - : - -     [ 1, 2, 3, 4, 5 ] - -
    - - :     [ | ]
    - - - :
    -
    -
    -
    -
    -
    - - - - -
    -
    - -
    - - [] - - - [] - [] - -
    -
    -
    -
    -
    - -
    - - - - - -
    -
    - -
    - -
    -
    -
    - : - - - - - -
    - :
    -
    -
    - :
    - : - -     [ 1, 2, 3, 4, 5 ] - -
    - - :     [ | ]
    - - - :
    -
    -
    -
    -
    -
    - - - - -
    -
    - -
    - - [] - - - [] - [] - -
    -
    -
    -
    -
    -
    - -
    - - - - -
    - -
    - - [] - - [] - - [] - - - [] - - - - [] - - [] - - - [] - - [] - - - - - [] - - [] - - -
    -END - -$fixedTemplates{PBtmpl0000000000000068} = << 'END'; - - -

    -

    -

    - - -

    - -

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - -

    - -
    -END - -$fixedTemplates{PBtmpl0000000000000069} = << 'END'; - - - -

    -
    - -

    - - -

    -
    - - - - The current temp is: - - - Failed to retrieve temp. - -END - -$fixedTemplates{PBtmpl0000000000000077} = << 'END'; - - - -

    -
    - - - - -

    -
    - - - - - -

    - - - • - - - - - - - - • - - -

    - - - - - - - - - - - - - - - - - - - - - - - -
    ()
    - - - - -END - -$fixedTemplates{PBtmpl0000000000000078} = << 'END'; - - - -

    -
    - - -

    -
    - - - - - - - - - - - - - - - - - - - - - - - -
    - <tmpl_var title> - - -
    - - - - - - <tmpl_var title> - - - - ^D("%z %Z",); - - -
    -END - -$fixedTemplates{PBtmpl0000000000000079} = << 'END'; - - - - - - - -

    -
    - - - - - -

    - - [] - - - - [] - - [] - - - - [] - -

    - - - - -
    []
    -
    -
    - -
    - - - - - - [] - - - - () -
    -
    -

    - -

    - - - -

    - -END - -$fixedTemplates{PBtmpl0000000000000080} = << 'END'; - - - - - - - -

    -
    - - - - - -

    - - [] - - - - [] - - [] - - - - [] - -

    - -
      - -
    • - -
    - - - - -
    []
    -
    -
    - -
    - - - - - - [] - - - - () -
    -
    -
    - -

    [top]

    -
    - - - - -END - -$fixedTemplates{PBtmpl0000000000000081} = << 'END'; - - - - - - - -

    -
    - - - - - -

    - - [] - - - - [] - - [] - - - - [] - -

    - - - - -
    []
    -
    -
    - -
    - - - - - - [] - - - - () -
    -
    - Q:
    - A: -

    - - - -

    - -END - -$fixedTemplates{PBtmpl0000000000000082} = << 'END'; - - - - - - - -

    -
    - - - - - -

    - - [] - - - - [] - - [] - - - - [] - -

    - -
      - -
    • - - - [] - - - - - - - - - [] - - - - () - - target="_blank"> - - - - -
    • -
      -
    - - - - -END - -$fixedTemplates{PBtmpl0000000000000083} = << 'END'; - - - - - - - -

    -
    - - - - - -

    - - [] - - - - [] - - [] - - - - [] - -

    - - - - -
    []
    -
    -
    - -
    - - - - - - [] - - - - () -
    -
    -

    - target="_blank"> - - - - -

    -
    - - - - -END - -$fixedTemplates{PBtmpl0000000000000084} = << 'END'; - - - -

    -
    - - -

    -
    - - - -
    <tmpl_var image.url>
    -
    -
    - - - -

    - - - - - -

    - - - - -

    - - - - -· - -· - - - - - - - - - - -
    ()
    -
    -
    -END - -$fixedTemplates{PBtmpl0000000000000086} = << 'END'; - - - -

    -
    - - -

    -
    - - - -

    - - - - -

    - - - - - - - - - , - - - - , - - -

    - - - - - - - - - - - -
    -
    -
    -
    - - - - - -END - -$fixedTemplates{PBtmpl0000000000000094} = << 'END'; - - - -

    -
    - -^RawHeadTags(); - - -

    -
    - - -

    -
    - - -
    - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - - -
     
    - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - -
     
    - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - - -
    - -
    -END - -$fixedTemplates{PBtmpl0000000000000095} = << 'END'; - - - -

    -
    - - - - -

    -
    - - - <tmpl_var image1> -

    - - - - - - - -
    - - -

    - - Benefits
    - - -

    - - - ·
    -
    -

    - - <tmpl_var thumbnail2> -

    - - Specifications
    - - -

    - - - ·:
    -
    - Options
    - - -

    - - - ·
    -
    - Other Products
    - - -

    - - - - - ·
    -
    -

    -END - -$fixedTemplates{PBtmpl0000000000000097} = << 'END'; - - - - - - - - - -

    -
    - - - - - -

    - - - • - - - - - - - - • - - -

    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    () - - <tmpl_var title> - -   - -
    - - - - -END - -$fixedTemplates{PBtmpl0000000000000098} = << 'END'; - - - -

    -
    - -

    - - -
    - :     [ | ]
    -
    -
    - - - Job Description
    -

    -
    - - - Job Requirements
    -

    -
    - - - - - - - - - - - - - - - - - - -
    Date Posted
    Location
    Compensation
    Views
    - - -
    - -
    - <tmpl_var filename><tmpl_var filename> -
    -
    -
    -
    -
    - - -

    - - [] - - - [] - [] - -

    -
    - - - - - -
    -

    -
    -
    - - - - - -
    -
    - - - - - -
    - -
    - -
    -
    -
    - : - - - - - -
    - :
    -
    -
    - :
    - : - -     [ 1, 2, 3, 4, 5 ] - -
    - - :     [ | ]
    - - - :
    -
    -
    -
    -
    -
    - - - - -
    -
    - -
    - - [] - - - [] - [] - -
    -
    -
    -
    -
    - -
    - - - - - -
    -
    - -
    - -
    -
    -
    - : - - - - - -
    - :
    -
    -
    - :
    - : - -     [ 1, 2, 3, 4, 5 ] - -
    - - :     [ | ]
    - - - :
    -
    -
    -
    -
    -
    - - - - -
    -
    - -
    - - [] - - - [] - [] - -
    -
    -
    -
    -
    -
    - -
    - - - - -
    - -
    - - [] - - [] - - [] - - - [] - - - - [] - - [] - - - [] - - [] - - - - - [] - - [] - - -
    -END - -$fixedTemplates{PBtmpl0000000000000099} = << 'END'; - - -

    -

    - - -

    - -

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - -

    - -
    -END - -$fixedTemplates{PBtmpl0000000000000100} = << 'END'; - - - -

    -
    - - - -

    - - -

    -
    - -
    - - - - -
    - - - - -

    You searched for . We found around matching records.

    -
    - - - - - - - - -
    - -
    -
    -
    - - Description:
    -
    - - - - - -

    -
    -
    - - Could not retrieve results from Google. -
    -END - -$fixedTemplates{PBtmpl0000000000000101} = << 'END'; - - - - - - - -

    -
    - - - - - -

    - - [] - - - - [] - - [] - - - - [] - -

    - -
      - -
    1. - - - [] - - - - - - - - - [] - - - - () - - target="_blank"> - - - - -
    2. -
      -
    - - - - -END - -$fixedTemplates{PBtmpl0000000000000103} = << 'END'; - - - -

    -
    - - -

    -
    - - - -
    - <tmpl_var image.url> - - - - - -

    - - - - - -

    - - - - -

    - - - - -

    -
    -
    - - - -· - -· - - - - - -

    - - - -
    ()
    - - -END - -$fixedTemplates{PBtmpl0000000000000104} = << 'END'; - - - -

    -
    - - -

    - - - - - - - -
    -

    - -END - -$fixedTemplates{PBtmpl0000000000000105} = << 'END'; - - - -

    -
    - - -

    -
    - - - -

    - - - - -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

     

    - - - - - -

     
    -
    - - -

    -
    -END - -$fixedTemplates{PBtmpl0000000000000107} = << 'END'; -<tmpl_var file.icon>() -END - -$fixedTemplates{PBtmpl0000000000000109} = << 'END'; - - - -

    -
    - -^RawHeadTags(); - - -

    -
    - - -

    -
    - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - -
     
    - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - -
     
    - - -
    - -
    - -END - -$fixedTemplates{PBtmpl0000000000000110} = << 'END'; - - - -

    -
    - - - - -

    -
    - - - -

    - - - - - - - - -
    - - <tmpl_var thumbnail1> - - - - <tmpl_var thumbnail2> - - - - <tmpl_var thumbnail3> - -
    - - - - - - - -
    - Features
    - -

    - - - ·
    -
    -

    - Benefits
    - - -

    - - - ·
    -
    -

    -

    - Specifications
    - -

    - - - ·:
    -
    -

    - Accessories
    - - -

    - - - ·
    -
    -

    - Related Products
    - - -

    - - - ·
    -
    -

    -

    - - Price:
    -
    - - Product Number:
    -
    -
    - - <tmpl_var brochure.icon>
    -
    - - <tmpl_var manual.icon>
    -
    - - <tmpl_var warranty.icon>
    -
    -
    -END - -$fixedTemplates{PBtmpl0000000000000111} = << 'END'; - - - - ^Page(title); - <tmpl_var session.setting.companyName> - - - - - - - - ^AdminBar(""); - -

    plainblack
    - - - -
    © 2001-2005 Plain Black Corporation
    - - - -END - -$fixedTemplates{PBtmpl0000000000000112} = << 'END'; - - - -

    -
    - - -

    -
    - - - - - -

    - - - • - - - - - - - - • - - -

    - - - -

    - - -

    - -
    -
    - - - - - - - - - - - - - - - - - - - - - <tmpl_var title> - - -
    - -
    -
    -

    - - - -

    -
    - -END - -$fixedTemplates{PBtmpl0000000000000113} = << 'END'; - - - -

    -
    - -

    - - -
    - :     [ | ]
    -
    -
    - - - Link Description
    -

    -
    - -Link URL
    - - - -
    - -
    - <tmpl_var filename><tmpl_var filename> -
    -
    -
    -
    -
    - - -

    - - [] - - - [] - [] - -

    -
    - - - - -
    -

    -
    -
    - - - - - -
    -
    - - - - - -
    - -
    - -
    -
    -
    - : - - - - - -
    - :
    -
    -
    - :
    - : - -     [ 1, 2, 3, 4, 5 ] - -
    - - :     [ | ]
    - - - :
    -
    -
    -
    -
    -
    - - - - -
    -
    - -
    - - [] - - - [] - [] - -
    -
    -
    -
    -
    - -
    - - - - - -
    -
    - -
    - -
    -
    -
    - : - - - - - -
    - :
    -
    -
    - :
    - : - -     [ 1, 2, 3, 4, 5 ] - -
    - - :     [ | ]
    - - - :
    -
    -
    -
    -
    -
    - - - - -
    -
    - -
    - - [] - - - [] - [] - -
    -
    -
    -
    -
    -
    - -
    - - - - -
    - -
    - - [] - - [List All Links] - - [] - - - [] - - - - [] - - [] - - - [] - - [] - - - - - [] - - [] - - -
    -END - -$fixedTemplates{PBtmpl0000000000000114} = << 'END'; - - -

    -

    -

    target="_blank">

    - - -

    - -

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - -

    - -

    target="_blank">

    -
    -END - -$fixedTemplates{PBtmpl0000000000000115} = << 'END'; - - - -

    -
    - - -

    -
    - - - -
    - - -
    - - - <tmpl_var image.url>
    -
    - - <tmpl_var image.url>
    -
    -
    - - - - - -

    - - - - -

    - - - - -

    -
    -
    - - - -· - -· - - - - - -

    - - - -
    ()
    - - -END - -$fixedTemplates{PBtmpl0000000000000116} = << 'END'; - - - -

    -
    - - -

    -
    - - -
      - -
    • -
      -
    -
    - - - -

    - - - - - · - - · - - - · - · - -

    - - - -

    - - - - - - - - - -
    - - - - - - - - - - - - - - -
    - - - - - - - - - - - - - * - -
    - -
    -
    - -
    -
    - - -
    - - -END - -$fixedTemplates{PBtmpl0000000000000117} = << 'END'; - -

    -
    - - -

    -
    - - - -
    - - -
    -END - -$fixedTemplates{PBtmpl0000000000000118} = << 'END'; - - - -

    -
    - -^RawHeadTags(); - - -

    -
    - - -

    -
    - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - -
     
    - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - - -
    - -
    -END - -$fixedTemplates{PBtmpl0000000000000119} = << 'END'; - - - -

    -
    - - - - -

    -
    - - - -
    -
    - - <tmpl_var brochure.icon>
    -
    - - <tmpl_var manual.icon>
    -
    - - <tmpl_var warranty.icon>
    -
    -
    -
    - - <tmpl_var thumbnail1>

    - - - <tmpl_var thumbnail2>

    - - - <tmpl_var thumbnail3>

    - -

    -
    - -

    - - -Specs:
    - -

    - - - ·:
    -
    -

    - -Features:
    - -

    - - - ·
    -
    -

    - -Options:
    - -

    - - - ·
    -
    - -

    -END - -$fixedTemplates{PBtmpl0000000000000121} = << 'END'; - - - -

    -
    - - -

    -
    - - - - - -

    - - - • - - - - - - - - • - - -

    - - - -
    - - -
    -
    -
    ()
    -
    <tmpl_var title>
    -
    -
    -
    -
    - -
    - - - - -END - -$fixedTemplates{PBtmpl0000000000000122} = << 'END'; - - -

    -

    -

    -

    -

    - - -

    - -

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - -

    - -

    -

    -

    -
    -END - -$fixedTemplates{PBtmpl0000000000000123} = << 'END'; - - - -

    -
    - - - - - - - - - -
    - - - - - <tmpl_var attachment.name> - - - - - - -END - -$fixedTemplates{PBtmpl0000000000000125} = << 'END'; - - - -

    -
    - -^RawHeadTags(); - - -

    -
    - - -

    -
    - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - -
     
    - - -
    - -
    - -END - -$fixedTemplates{PBtmpl0000000000000128} = << 'END'; - - - -

    -
    - - -

    -
    - - - - - -

    - - - • - - - - - - - - • - - -

    - - - -
    - - -
    -
    -
    - () - -
    - <tmpl_var thumbnail> -
    -
    -
    - -
    -
    - -
    - - - - -END - -$fixedTemplates{PBtmpl0000000000000129} = << 'END'; - - - -

    -
    - - - - - - - - - -
    - - - - - <tmpl_var attachment.name> - - - - - - -END - -$fixedTemplates{PBtmpl0000000000000130} = << 'END'; - -

    -
    - - -

    -
    - -^StyleSheet("/Navigation/dtree/dtree.css"); -^JavaScript("/Navigation/dtree/dtree.js"); - - - - - -
    - -
    -END - -$fixedTemplates{PBtmpl0000000000000131} = << 'END'; - - - -

    -
    - -^RawHeadTags(); - - -

    -
    - - -

    -
    - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - -
     
    - - -
    - -
    - -END - -$fixedTemplates{PBtmpl0000000000000133} = << 'END'; - - - - - - - -

    -
    - - - - - -

    - - [] - - - - [] - - [] - - - - [] - -

    - - - -
    On from the '' department wrote
    -
    -
    -

    - - - - -

    - -END - -$fixedTemplates{PBtmpl0000000000000134} = << 'END'; - -

    -
    - - -

    -
    - - - - - - - -^JavaScript("/coolmenus/coolmenus4.js"); - -END - -$fixedTemplates{PBtmpl0000000000000135} = << 'END'; - - - -

    -
    - -^RawHeadTags(); - - -

    -
    - - -

    -
    - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - - -
    - - - - - - - - - - - - - -
    - - -
    - - -
    -
    -
    - - -
     
    - - -
    - -
    -END - -$fixedTemplates{PBtmpl0000000000000140} = << 'END'; - - - -

    -
    -
    -
    -
    - - - -
    -
    -
    -
    -
    -END - -$fixedTemplates{PBtmpl0000000000000141} = << 'END'; - - - -

    -
    - - -

    -
    - - -
      - -
    • -
      -
    -
    - - - -

    - - - - - · - - · - - - · - · - -

    - - - - - - - - - - - -
    - - - - - - - - - - - - - * - -
    - -
    -
    -
    - - -END - -$fixedTemplates{wCIc38CvNHUK7aY92Ww4SQ} = << 'END'; - - - -

    -
    - - -

    -
    - - - -

    - - - -

    - - - - - [] - - - - - - - [] - - -
    -
    - - target="_blank"> - - -
    - -
    - -

    - -END -} diff --git a/docs/upgrades/upgrade_6.7.7-6.7.8.pl b/docs/upgrades/upgrade_6.7.7-6.7.8.pl deleted file mode 100644 index 33f5244fc..000000000 --- a/docs/upgrades/upgrade_6.7.7-6.7.8.pl +++ /dev/null @@ -1,171 +0,0 @@ -use lib "../../lib"; -use strict; -use Getopt::Long; -use WebGUI::Session; -use WebGUI::SQL; -use WebGUI::Asset; -use WebGUI::Setting; - -my $toVersion = "6.7.8"; -my $configFile; -my $quiet; - -start(); -protectUserProfileFields(); -correctEditProfileTemplate(); -fixCalendarTemplates(); -finish(); - -#------------------------------------------------- -sub fixCalendarTemplates { - print "\tFixing bugs in calendar templates.\n" unless ($quiet); -my $template = < - - - - -
    -:
    -:
    -
    - - -
    -
    -
    - - -
    -
    - - -
    -
    - -
    - - - - -

    Events Near This One
    - -

      -
    • -
    -
    -STOP - my $asset = WebGUI::Asset->new("PBtmpl0000000000000023","WebGUI::Asset::Template"); - $asset->addRevision({template=>$template})->commit if (defined $asset); - $template = < - - -

    -
    - - -

    -
    - - - -

    - - - - -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     

    - - - - - -

     
    -
    - - -

    -
    -STOP - $asset = WebGUI::Asset->new("PBtmpl0000000000000105","WebGUI::Asset::Template"); - $asset->addRevision({template=>$template})->commit if (defined $asset); -} - - -#------------------------------------------------- -sub start { - $|=1; #disable output buffering - GetOptions( - 'configFile=s'=>\$configFile, - 'quiet'=>\$quiet - ); - WebGUI::Session::open("../..",$configFile); - WebGUI::Session::refreshUserInfo(3); - WebGUI::SQL->write("insert into webguiVersion values (".quote($toVersion).",'upgrade',".time().")"); -} - -#------------------------------------------------- -sub protectUserProfileFields { - print "\tProtecting all default user fields.\n" unless ($quiet); - WebGUI::SQL->write("update userProfileField set protected=1 where fieldName in ('discussionLayout','INBOXNotifications','alias','signature','publicProfile','publicEmail','toolbar')"); -} - -#------------------------------------------------- -sub correctEditProfileTemplate { - print "\tFixing Edit Profile template.\n" unless ($quiet); - my $tmplAsset = WebGUI::Asset->newByDynamicClass("PBtmpl0000000000000051"); - my $template = $tmplAsset->get('template'); - $template =~ s/create.form.footer/profile.form.footer/; - $tmplAsset->addRevision({ template=>$template }); - $tmplAsset->commit; -} - -#------------------------------------------------- -sub finish { - WebGUI::Session::close(); -} - diff --git a/docs/upgrades/upgrade_6.7.8-6.8.0.pl b/docs/upgrades/upgrade_6.7.8-6.8.0.pl deleted file mode 100644 index 3e2198394..000000000 --- a/docs/upgrades/upgrade_6.7.8-6.8.0.pl +++ /dev/null @@ -1,1894 +0,0 @@ -#------------------------------------------------------------------- -# WebGUI is Copyright 2001-2006 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 -#------------------------------------------------------------------- - -use lib "../../lib"; -use strict; -use FileHandle; -use File::Copy qw(cp); -use Getopt::Long; -use Parse::PlainConfig; -use WebGUI::Session; -use WebGUI::SQL; -use WebGUI::Asset; -use WebGUI::Setting; -use WebGUI::User; -use WebGUI::Utility; - -my $toVersion = "6.8.0"; -my $configFile; -my $quiet; - -start(); -addTimeZonesToUserPreferences(); -removeUnneededFiles(); -updateCollaboration(); -addPhotoField(); -addAvatarField(); -addEnableAvatarColumn(); -#addSpectre(); -#addWorkflow(); -addMatrix(); -updateConfigFile(); -addInOutBoard(); -addDashboardStuff(); -addZipArchive(); -updateUserProfileDayLabels(); -changeSelectListToSelectBox(); -fixVeryLateDates(); -updateFolderTemplate(); -addingRandomThread(); -finish(); - -#------------------------------------------------- -sub addingRandomThread { - print "\tAdding random thread macro\n" unless ($quiet); - my $import = WebGUI::Asset->getImportNode; - my $folder = $import->addChild({ - title=>"Random Thread Macro Template", - menuTitle=>"Random Thread Macro Template", - className=>"WebGUI::Asset::Wobject::Folder", - url=>"randomthreadmacro-templates", - }); -my $template = <RandomThread macro debug output: -
    -
    approve.url:
    -
    assetId:
    -
    assetSize:
    - -
    <tmpl_loop attachment_loop>:
    -
    -
    filename:
    -
    icon:
    -
    isImage:
    -
    thumbnail:
    -
    url:
    -</tmpl_loop> - - -
    attachment.icon:
    -
    attachment.thumbnail:
    -
    attachment.url:
    -
    className:
    -
    content:
    -
    contentType:
    -
    createdBy:
    -
    creationDate:
    -
    dateSubmitted:
    -
    dateSubmitted.human:
    -
    dateUpdated:
    -
    dateUpdated.human:
    -
    delete.url:
    -
    deny.url:
    -
    edit.url:
    -
    encryptPage:
    -
    endDate:
    -
    extraHeadTags:
    -
    groupIdEdit:
    -
    groupIdView:
    -
    hasRated:
    -
    image.url
    -
    image.thumbnail
    -
    isHidden:
    -
    isLocked:
    -
    isLockedBy:
    -
    isMarkedRead:
    -
    isPackage:
    -
    isPrototype:
    -
    isSticky:
    -
    isSystem:
    -
    lastPostDate:
    -
    lastPostId:
    -
    lineage:
    -
    menuTitle:
    -
    newWindow:
    -
    ownerUserId:
    -
    parentId:
    -
    rate.url.1:
    -
    rate.url.2:
    -
    rate.url.3:
    -
    rate.url.4:
    -
    rate.url.5:
    -
    rating:
    -
    rating.value:
    -
    replies:
    -
    reply.url:
    -
    reply.withquote.url:
    -
    revisedBy:
    -
    revisionDate:
    -
    startDate:
    -
    state:
    -
    stateChanged:
    -
    stateChangedBy:
    -
    status:
    -
    storageId:
    -
    subscriptionGroupId:
    -
    synopsis:
    -
    tagId:
    -
    threadId:
    -
    title:
    -
    title.short:
    -
    url:
    -
    user.canEdit:
    -
    user.isPoster:
    -
    userDefined1:
    -
    userDefined2:
    -
    userDefined3:
    -
    userDefined4:
    -
    userDefined5:
    -
    userId:
    -
    userProfile.url:
    -
    username:
    -
    views:
    -
    -STOP - my $newAsset = $folder->addChild({ - title=>"Random Thread Macro Default Template", - menuTitle=>"Random Thread Macro Default Template", - namespace=>"Macro/RandomThread", - url=>"randomthread-template", - className=>"WebGUI::Asset::Template", - template=>$template - }, "WVtmpl0000000000000001"); - $newAsset->commit; -} - -#------------------------------------------------- -sub updateFolderTemplate { - print "\tUpdate folder template\n" unless ($quiet); - my $template = < - - -

    -
    - - -

    -
    - - - - - - -

    Add files.

    -
    - - - - - - - - - - - - - - - - - - - -
    - <tmpl_var title> - - -
    - - - - - - <tmpl_var title> - - - - ^D("%z %Z",); - - -
    -STOP - my $asset = WebGUI::Asset->new("PBtmpl0000000000000078","WebGUI::Asset::Template"); - if (defined $asset) { - $asset->addRevision({template=>$template})->commit; - } -} - -#------------------------------------------------- -sub addZipArchive { - print "\tAdding Zip Archive Asset\n" unless ($quiet); - WebGUI::SQL->write("create table ZipArchiveAsset ( - assetId varchar(22) binary not null, - templateId varchar(22) binary not null default '', - showPage varchar(255) not null default 'index.html', - revisionDate bigint not null, - primary key (assetId,revisionDate) -)"); - my $import = WebGUI::Asset->getImportNode; - my $folder = $import->addChild({ - title=>"Zip Archive Templates", - menuTitle=>"Zip Archive Templates", - className=>"WebGUI::Asset::Wobject::Folder", - url=>"ziparchive-templates", - }); - my $template = < - -

    -
    - - - -
      -
    • -
    -
    - - - - - - Error: No initial page specified - - Error: No file specified - - -STOP - my $newAsset = $folder->addChild({ - title=>"Default Zip Archive Template", - menuTitle=>"Default Zip Archive Template", - namespace=>"ZipArchiveAsset", - url=>"zip-archive-template", - className=>"WebGUI::Asset::Template", - template=>$template - }, "ZipArchiveTMPL00000001"); - $newAsset->commit; -} - -#------------------------------------------------- -sub addDashboardStuff { - print "\tAdding Dashboard tables and templates.\n" unless ($quiet); - WebGUI::SQL->write("CREATE TABLE `Dashboard` ( - `assetId` VARCHAR(22) BINARY NOT NULL DEFAULT '', - `revisionDate` VARCHAR(22) BINARY NOT NULL DEFAULT '', - `adminsGroupId` VARCHAR(22) BINARY NOT NULL DEFAULT '4', - `usersGroupId` VARCHAR(22) BINARY NOT NULL DEFAULT '2', - `templateId` VARCHAR(22) BINARY NOT NULL DEFAULT 'DashboardViewTmpl00001', - `mapFieldId` VARCHAR(22) DEFAULT '', - PRIMARY KEY(`assetId`, `revisionDate`) - )"); - WebGUI::SQL->write("CREATE TABLE `Shortcut_overrides` ( - `assetId` VARCHAR(22) BINARY NOT NULL DEFAULT '', - `fieldName` VARCHAR(255) DEFAULT '', - `newValue` TEXT, - PRIMARY KEY(`assetId`, `fieldName`) - )"); - WebGUI::SQL->write("CREATE TABLE `WeatherData` ( - `assetId` VARCHAR(22) BINARY NOT NULL DEFAULT '', - `revisionDate` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, - `templateId` VARCHAR(22) BINARY NOT NULL DEFAULT 'WeatherDataTmpl0000001', - `locations` TEXT DEFAULT '', - PRIMARY KEY(`assetId`, `revisionDate`) - )"); - WebGUI::SQL->write("CREATE TABLE `MultiSearch` ( - `assetId` VARCHAR(22) BINARY NOT NULL DEFAULT '', - `revisionDate` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, - `templateId` VARCHAR(22) BINARY NOT NULL DEFAULT 'MultiSearchTmpl0000001', - `predefinedSearches` TEXT DEFAULT '', - PRIMARY KEY(`assetId`, `revisionDate`) - )"); - WebGUI::SQL->write("CREATE TABLE `wgField` ( - `assetId` VARCHAR(22) BINARY NOT NULL DEFAULT '', - `revisionDate` VARCHAR(22) NOT NULL DEFAULT '', - `formTemplateId` VARCHAR(22) BINARY DEFAULT '', - `valueTemplateId` VARCHAR(22) BINARY DEFAULT '', - `fieldName` VARCHAR(255) DEFAULT '', - `fieldLabel` VARCHAR(255) DEFAULT '', - `fieldDescription` TEXT DEFAULT '', - `fieldType` VARCHAR(50) DEFAULT '', - `overrideForm` TINYINT UNSIGNED NOT NULL DEFAULT 0, - `overrideValue` TINYINT UNSIGNED NOT NULL DEFAULT 0, - `possibleValues` TEXT DEFAULT '', - `defaultValue` TEXT NOT NULL DEFAULT '', - PRIMARY KEY(`assetId`, `revisionDate`) - )"); - WebGUI::SQL->write("CREATE TABLE `wgFieldUserData` ( - `assetId` VARCHAR(22) BINARY NOT NULL DEFAULT '', - `userId` VARCHAR(22) BINARY NOT NULL DEFAULT '', - `userValue` TEXT, - PRIMARY KEY(`assetId`, `userId`) - )"); - - WebGUI::SQL->write("create table StockData ( - assetId varchar(22) binary not null, - templateId varchar(22) binary not null default 'StockListTMPL000000001', - displayTemplateId varchar(22) binary not null default 'StockListTMPL000000002', - defaultStocks text, - source varchar(50) default 'usa', - failover integer default 1, - revisionDate integer not null, - primary key(assetId,revisionDate) -)"); - - my $template = < - - - ^Page(title); - <tmpl_var session.setting.companyName> - - - - - - -^AdminBar("PBtmpl0000000000000090"); - - - -STOP -my $folder = WebGUI::Asset->newByUrl('templates') || WebGUI::Asset->getImportNode; -my $newAsset = $folder->addChild({ - className=>"WebGUI::Asset::Template", - template=>$template, - namespace=>"style", - title=>'WebGUI 6 Blank Style', - menuTitle=>'WebGUI 6 Blank Style', - ownerUserId=>'3', - groupIdView=>'4', - groupIdEdit=>'4', - isHidden=>1 -}, 'PBtmplBlankStyle000001'); -$newAsset->commit; -$template = < \@import "^Extras;wobject/Dashboard/draggable.css"; - - - - -
    - - - - - -
    - -
    -
    - - - -

    -
    -
    -
    - -
    Add New Content
    - -

    - -

    -
    - - -

    - -

    -
    - - - - -

    - -

    -
    -
    - - -
    - - - - - - - - -
    - - - - -

    -
    -
    - - - - - -

    -
    -
    - - - - -

    -
    -
    -
    -
    - -
    - -STOP -$newAsset = $folder->addChild({ - title=>"Dashboard Default View", - menuTitle=>"Dashboard Default View", - namespace=>"Dashboard", - url=>"dashboard-default-view-template", - className=>"WebGUI::Asset::Template", - template=>$template - }, "DashboardViewTmpl00001"); -$newAsset->commit; -$template = < - - -

    -
    - - -

    -
    - - -

    - - - - - - - - - - - - - - -
    -
    -
    -
     
    - -
    - -
    -
    -
    -
    °F
    -
    - -
    -STOP -WebGUI::Asset->getImportNode; -my $newAsset = $folder->addChild({ - className=>"WebGUI::Asset::Template", - template=>$template, - namespace=>"WeatherData", - title=>'WeatherData Default View', - menuTitle=>'WeatherData Default View', - ownerUserId=>'3', - groupIdView=>'4', - groupIdEdit=>'4', - isHidden=>1 - }, 'WeatherDataTmpl0000001'); -$newAsset->commit; -$template = < - - - - - - - - - - - - - - -
    -
    - - - - - -
    () - -
    1:23 PM EDT
    - -
    -
    -
    -
    - - - - - - -
    - - - - - - - - - - - -
    Today5d1m3m1y5y20y
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Last Price
    Market Cap
    Change - -
    Open
    Day High
    Bid
    52 Wk High
    E.P.S.
    Ex-Div Date
    Yield
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Last Trade
    Volume m
    % Change %
    Prev Close
    Day Low
    Ask
    52 Wk Low
    P/E Ratio
    Dividend
    Exchange
    -
    -
    - -

    - - - - -
    - -
    -
    - -STOP -WebGUI::Asset->getImportNode; -my $newAsset = $folder->addChild({ - className=>"WebGUI::Asset::Template", - template=>$template, - namespace=>"StockData/Display", - title=>'StockData Default Display', - menuTitle=>'StockData Default Display', - ownerUserId=>'3', - groupIdView=>'4', - groupIdEdit=>'4', - isHidden=>1 - }, 'StockDataTMPL000000002'); -$newAsset->commit; -$template = < - - -

    -
    - - -

    -
    - - -

    - - - - - - - - - - - -
    -
    - - - - - -
    Stock Watch -
    - Last Update: EDT
    - -
    -
    -
    - - - - - - - - - - - - - - - - - - -
    Name SymbolLastTickChg
    - - - -
    -
    -STOP -WebGUI::Asset->getImportNode; -my $newAsset = $folder->addChild({ - className=>"WebGUI::Asset::Template", - template=>$template, - namespace=>"StockData", - title=>'StockData Default View', - menuTitle=>'StockData Default View', - ownerUserId=>'3', - groupIdView=>'4', - groupIdEdit=>'4', - isHidden=>1 - }, 'StockDataTMPL000000001'); -$newAsset->commit; -$template = < - - -

    -
    - - -

    -
    - - -

    - - -

    -
    - - - - -
    -Search:  -
    -  For:  - -
    -
    -
    -
    -STOP -WebGUI::Asset->getImportNode; -my $newAsset = $folder->addChild({ - className=>"WebGUI::Asset::Template", - template=>$template, - namespace=>"MultiSearch", - title=>'MultiSearch Default Display', - menuTitle=>'MultiSearch Default Display', - ownerUserId=>'3', - groupIdView=>'4', - groupIdEdit=>'4', - isHidden=>1 - }, 'MultiSearchTmpl0000001'); -$newAsset->commit; -print "\tConverting Shortcut overrides.\n" unless ($quiet); -my $a = WebGUI::SQL->read("select assetId from asset where className='WebGUI::Asset::Shortcut'"); -my @overrides; -while (my ($assetId) = $a->array) { - my $sc = WebGUI::Asset->newByDynamicClass($assetId); - push(@overrides,{assetId=>$sc->getId,fieldName=>'title',newValue=>$sc->get("title")}) if $sc->get("overrideTitle"); - if ($sc->get("overrideTemplate")) { - my $fieldName = ref $sc->getShortcutOriginal eq 'WebGUI::Asset::Wobject::Collaboration' ? 'collaborationTemplateId' : 'templateId'; - push(@overrides,{assetId=>$sc->getId,fieldName=>$fieldName,newValue=>$sc->get("overrideTemplateId")}); - } - push(@overrides,{assetId=>$sc->getId,fieldName=>'displayTitle',newValue=>$sc->get("displayTitle")}) if $sc->get("overrideDisplayTitle"); - push(@overrides,{assetId=>$sc->getId,fieldName=>'description',newValue=>$sc->get("description")}) if $sc->get("overrideDescription"); -} -$a->finish; -foreach my $hash (@overrides) { - WebGUI::SQL->write("insert into Shortcut_overrides values (".quote($hash->{assetId}).",".quote($hash->{fieldName}).",".quote($hash->{newValue}).")"); -} - -} - -#------------------------------------------------- -sub fixVeryLateDates { - print "\tFixing very late endDates.\n" unless ($quiet); - WebGUI::SQL->write("update assetData set endDate='2082783600' where endDate>=4294967294"); -} - -#------------------------------------------------- -sub updateConfigFile { - print "\tUpdating config file.\n" unless ($quiet); - my $pathToConfig = '../../etc/'.$configFile; - my $conf = Parse::PlainConfig->new('DELIM' => '=', 'FILE' => $pathToConfig, 'PURGE'=>1); - my %newConfig; - foreach my $key ($conf->directives) { # delete unwanted stuff - unless (isIn($key,qw(enableDateCache scripturl))) { - $newConfig{$key} = $conf->get($key); - } - } - push(@{$newConfig{assetContainers}}, "WebGUI::Asset::Wobject::Dashboard") unless isIn("WebGUI::Asset::Wobject::Dashboard",@{$newConfig{assetContainers}}); - push(@{$newConfig{assets}}, "WebGUI::Asset::Wobject::Matrix") unless isIn("WebGUI::Asset::Wobject::Matrix",@{$newConfig{assets}}); - push(@{$newConfig{assets}}, "WebGUI::Asset::Wobject::InOutBoard") unless isIn("WebGUI::Asset::Wobject::InOutBoard",@{$newConfig{assets}}); - push(@{$newConfig{assets}}, "WebGUI::Asset::File::ZipArchive") unless isIn("WebGUI::Asset::File::ZipArchive",@{$newConfig{assets}}); - push(@{$newConfig{assets}}, "WebGUI::Asset::Wobject::StockData") unless isIn("WebGUI::Asset::Wobject::StockData",@{$newConfig{assets}}); - push(@{$newConfig{assets}}, "WebGUI::Asset::Wobject::WeatherData") unless isIn("WebGUI::Asset::Wobject::WeatherData",@{$newConfig{assets}}); - push(@{$newConfig{assets}}, "WebGUI::Asset::Wobject::MultiSearch") unless isIn("WebGUI::Asset::Wobject::MultiSearch",@{$newConfig{assets}}); - $newConfig{macros}{RandomThread} = "RandomThread"; - $newConfig{gateway} = "/"; - $conf->purge; - $conf->set(%newConfig); - $conf->write; -} - -#------------------------------------------------- -sub addInOutBoard { - print "\tAdding In/Out Board Asset\n" unless ($quiet); - WebGUI::SQL->write("create table InOutBoard ( - assetId varchar(22) binary not null primary key, - revisionDate bigint, - statusList text, - reportViewerGroup varchar(22) binary not null default '3', - inOutGroup varchar(22) binary not null default '2', - inOutTemplateId varchar(22) binary not null default 'IOB0000000000000000001', - reportTemplateId varchar(22) binary not null default 'IOB0000000000000000002', - paginateAfter int not null default 50, - reportPaginateAfter int not null default 50 - )"); - WebGUI::SQL->write("create table InOutBoard_status ( - assetId varchar(22) binary not null, - userId varchar(22) binary not null, - status varchar(255), - dateStamp int not null, - message text - )"); - WebGUI::SQL->write("create table InOutBoard_statusLog ( - assetId varchar(22) binary not null, - userId varchar(22) binary not null, - status varchar(255), - dateStamp int not null, - message text - )"); - WebGUI::SQL->write("create table InOutBoard_delegates ( - userId varchar(22) binary not null, - delegateUserId varchar(22) binary not null, - assetId varchar(22) binary not null - )"); - WebGUI::SQL->write("insert into userProfileField (fieldName,fieldLabel,visible,dataType,dataValues,dataDefault,sequenceNumber,profileCategoryId,editable) values ('department',".quote("'Department'").",1,'selectList',".quote("{'IT'=>'IT','HR'=>'HR','Regular Staff'=>'Regular Staff'}").",".quote("['Regular Staff']").",8,'6',1)"); - my $import = WebGUI::Asset->getImportNode; - my $folder = $import->addChild({ - title=>"In/Out Board Templates", - menuTitle=>"In/Out Board Templates", - className=>"WebGUI::Asset::Wobject::Folder", - url=>"iob-templates", - }); - my $template = <In/Out Board Report -
    - - - - - - - - - - - - - - - - - - - - - - -
    -
    -STOP - my $newAsset = $folder->addChild({ - title=>"Default InOutBoard Report Template", - menuTitle=>"Default InOutBoard Report Template", - namespace=>"InOutBoard/Report", - url=>"iob-report-template", - className=>"WebGUI::Asset::Template", - template=>$template - }, "IOB0000000000000000002"); - $newAsset->commit; - $template = < - -

    -
    - - -

    -
    - - - - - Select delegates - - - -  ·  - - View Report - - -
    -
    - - - - - - - - - - - - - - -
    -STOP - $newAsset = $folder->addChild({ - title=>"Default InOutBoard Template", - menuTitle=>"Default InOutBoard Template", - namespace=>"InOutBoard", - url=>"iob-template", - className=>"WebGUI::Asset::Template", - template=>$template - }, "IOB0000000000000000001"); - $newAsset->commit; -} - -#------------------------------------------------- -sub addMatrix { - print "\tAdding Matrix Asset\n" unless ($quiet); - WebGUI::SQL->write("CREATE TABLE `Matrix_rating` ( - `timeStamp` int(11) NOT NULL default '0', - `category` varchar(255) default NULL, - `rating` int(11) NOT NULL default '1', - `listingId` varchar(22) binary NOT NULL default '', - `ipAddress` varchar(15) default NULL, - `assetId` varchar(22) binary NOT NULL default '', - `userId` varchar(22) binary default NULL -) "); - WebGUI::SQL->write("CREATE TABLE `Matrix_listingData` ( - `listingId` varchar(22) binary NOT NULL default '', - `fieldId` varchar(22) binary NOT NULL default '', - `value` varchar(255) default NULL, - `assetId` varchar(22) binary NOT NULL default '', - PRIMARY KEY (`listingId`,`fieldId`) -) "); - WebGUI::SQL->write("CREATE TABLE `Matrix_field` ( - `fieldId` varchar(22) binary NOT NULL default '', - `category` varchar(255) NOT NULL default '', - `name` varchar(255) default NULL, - `label` varchar(255) default NULL, - `description` text, - `fieldType` varchar(35) default NULL, - `defaultValue` varchar(255) default NULL, - `assetId` varchar(22) binary NOT NULL default '', - PRIMARY KEY (`fieldId`), - KEY `categoryIndex` (`category`) -) "); - WebGUI::SQL->write("CREATE TABLE `Matrix_ratingSummary` ( - `listingId` varchar(22) binary NOT NULL default '', - `category` varchar(255) NOT NULL default '', - `meanValue` decimal(3,2) default NULL, - `medianValue` int(11) default NULL, - `countValue` int(11) default NULL, - `assetId` varchar(22) binary NOT NULL default '', - PRIMARY KEY (`listingId`,`category`) -)"); - WebGUI::SQL->write("CREATE TABLE `Matrix` ( - `detailTemplateId` varchar(22) binary default NULL, - `compareTemplateId` varchar(22) binary default NULL, - `searchTemplateId` varchar(22) binary default NULL, - `ratingDetailTemplateId` varchar(22) binary default NULL, - `categories` text, - `assetId` varchar(22) binary NOT NULL default '', - `templateId` varchar(22) binary NOT NULL default '', - `revisionDate` bigint(20) NOT NULL default '0', - `maxComparisons` int(11) NOT NULL default '10', - `maxComparisonsPrivileged` int(11) NOT NULL default '10', - `privilegedGroup` varchar(22) binary NOT NULL default '2', - `groupToRate` varchar(22) binary NOT NULL default '2', - `ratingTimeout` int(11) NOT NULL default '31536000', - `ratingTimeoutPrivileged` int(11) NOT NULL default '31536000', - `groupToAdd` varchar(22) binary NOT NULL default '2', - PRIMARY KEY (`assetId`,`revisionDate`) -) "); - WebGUI::SQL->write("CREATE TABLE `Matrix_listing` ( - `listingId` varchar(22) binary NOT NULL default '', - `maintainerId` varchar(22) binary default NULL, - `forumId` varchar(22) binary default NULL, - `productName` varchar(255) default NULL, - `productUrl` text, - `manufacturerName` varchar(255) default NULL, - `manufacturerUrl` text, - `description` text, - `lastUpdated` int(11) default NULL, - `versionNumber` varchar(30) default NULL, - `views` int(11) NOT NULL default '0', - `compares` int(11) NOT NULL default '0', - `clicks` int(11) NOT NULL default '0', - `status` varchar(30) NOT NULL default 'pending', - `clicksLastIp` varchar(16) default NULL, - `viewsLastIp` varchar(16) default NULL, - `comparesLastIp` varchar(16) default NULL, - `assetId` varchar(22) binary NOT NULL default '', - PRIMARY KEY (`listingId`) -) "); - my $import = WebGUI::Asset->getImportNode; - my $folder = $import->addChild({ - title=>"Matrix Templates", - menuTitle=>"Matrix Templates", - className=>"WebGUI::Asset::Wobject::Folder", - url=>"matrix-templates", - }); - my $template = <Comparison - - - - - -
    - - -You tried to compare too many listings. Please choose or less at a time. - - - -You must choose at least two products to compare. Less than two isn't much of a comparison. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - class="odd" - - class="even" - - > - - - - - - -
    Product
    Last Updated
    onmouseover="return escape('')"> - -
    - - -
    - -
    -STOP - my $newAsset = $folder->addChild({ - title=>"Matrix Default Compare", - menuTitle=>"Matrix Default Compare", - namespace=>"Matrix/Compare", - url=>"matrix-default-compare-template", - className=>"WebGUI::Asset::Template", - template=>$template - }, "matrixtmpl000000000002"); - $newAsset->commit; - $template = < -

    -
    -

    - - -

    -
    - - -
    -

    Use the form below to select up to listings to compare at once. -

    - - -
    - - -

    -Narrow The Matrix
    -You can narrow the scope of the matrix by searching for exactly the criteria you're looking for in a listing. -

    - - -

    -
    Expand The Matrix
    - - Click here to add a new listing. Please note that you will be the official maintainer of the listing, and will be responsible for keeping it up to date. - -If you are the maker of a product, or are an expert user and are willing to maintain the listing, create an account so you can register your listing. - - -

    - - - -
    Listing Statistics
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Most clicks:
    Most views:
    Most compares:
    Most recently updated:

    Best Rated By Users
    /10

    View Ratings Details

    Worst Rated By Users
    /10

    - -
    -
    Site Statistics
    - - - - - - - - - - - - - -
    Listing Count:
    Current Visitors:
    Registered Users:
    - - - - - -

    List Fields -

    - -PENDING LISTINGS: - -
      - -
    • -
      -
    -
    - -
    -STOP - $newAsset = $folder->addChild({ - title=>"Matrix Default View", - menuTitle=>"Matrix Default View", - namespace=>"Matrix", - url=>"matrix-default-view-template", - className=>"WebGUI::Asset::Template", - template=>$template - }, "matrixtmpl000000000001"); - $newAsset->commit; - $template = < -.ratingForm { - font-size: 9px; -} - - -

    - - - - - - - - - - - - - - -
    - - - - - - - - - -
    Web Site
    Version Number
    Manufacturer
    Last Updated
    Clicks
    Views
    Compares
    - -
      - - Description


    -
    - -Contact Maintainer
    - -
    Message sent.
    -
    - -
      - -
    -

    - - - - - - - -
    -Features - - - - - class="odd" - - class="even" - -> - - - -
    -

    - - -

    - -Benefits - - - - class="odd" - - class="even" - -> - - - -
    - - -
    - - - - - -

    - - - - - -


    Edit this listing.
    -
    - - - Approve this listing.
    -
    - Delete this listing.
    - -
    -STOP - $newAsset = $folder->addChild({ - title=>"Matrix Default Detailed Listing", - menuTitle=>"Matrix Default Detailed Listing", - namespace=>"Matrix/Detail", - url=>"matrix-default-detailed-listing", - className=>"WebGUI::Asset::Template", - template=>$template - }, "matrixtmpl000000000003"); - $newAsset->commit; - $template = <Rating Detail - - - - - - - - - - - - - - - - - -
    -

    - - - - - - - - - - - - - - - -
    ListingMeanMedianCount
    -
    -STOP - $newAsset = $folder->addChild({ - title=>"Matrix Default Rating Detail", - menuTitle=>"Matrix Default Rating Detail", - namespace=>"Matrix/RatingDetail", - url=>"matrix-rating-detail-template", - className=>"WebGUI::Asset::Template", - template=>$template - }, "matrixtmpl000000000004"); - $newAsset->commit; - $template = <Search The Matrix - - - -

    Your search returned no results. Try specifying a few less criteria.

    -
    - - -

    -Your search returned too many results. Either select up to products from the list below, or specify more critera. -

    -
    - - - -
    - - - - - - - - - - - - - - -
    - - -Features - - - - class="odd" - - class="even" - -> - - - -
    - -
    - -Benefits - - - - class="odd" - - class="even" - -> - - - -
    - - -
    - - - - - -
    -STOP - $newAsset = $folder->addChild({ - title=>"Matrix Default Search", - menuTitle=>"Matrix Default Search", - namespace=>"Matrix/Search", - url=>"matrix-search-template", - className=>"WebGUI::Asset::Template", - template=>$template - }, "matrixtmpl000000000005"); - $newAsset->commit; -} - -#------------------------------------------------- -sub updateCollaboration { -print "\tAdding collaboration/rss template\n" unless ($quiet); -WebGUI::SQL->write("ALTER TABLE Collaboration ADD COLUMN rssTemplateId varchar(22) binary NOT NULL default 'PBtmpl0000000000000142' after notificationTemplateId"); -my $template = < - - -<tmpl_var title> - - - - -<tmpl_var title> - - - - - - - - -STOP -# Get Template folder -my $folder = WebGUI::Asset->newByUrl('templates') || WebGUI::Asset->getImportNode; -# Add Collaboration/RSS folder beneath -my $rssFolder = $folder->addChild({ - title=>"Collaboration/RSS", - menuTitle=>"Collaboration/RSS", - url=>"templates/collaboration/rss", - className=>"WebGUI::Asset::Wobject::Folder" - }); -$rssFolder->commit; -# Place the Collaboration/RSS folder beneath the -# Collaboration/Thread folder if it exists. -my $threadFolder = WebGUI::Asset->newByUrl('templates/collaboration/thread') || WebGUI::Asset->getImportNode; -my $threadRank = $threadFolder->getRank; -$rssFolder->setRank($threadRank + 1); - -$rssFolder->addChild({ - className=>"WebGUI::Asset::Template", - template=>$template, - namespace=>"Collaboration/RSS", - title=>'Default Forum RSS', - menuTitle=>'Default Forum RSS', - ownerUserId=>'3', - groupIdView=>'7', - groupIdEdit=>'4', - isHidden=>1 - }, 'PBtmpl0000000000000142' -); - -} - -#------------------------------------------------- -sub addTimeZonesToUserPreferences { - print "\tDropping time offsets in favor of time zones.\n" unless ($quiet); - WebGUI::SQL->write("delete from userProfileData where fieldName='timeOffset'"); - WebGUI::SQL->write("update userProfileField set dataValues='', fieldName='timeZone', dataType='timeZone', fieldLabel=".quote('WebGUI::International::get("timezone","DateTime");').",dataDefault='America/Chicago' where fieldName='timeOffset'"); - WebGUI::SQL->write("insert into userProfileData values ('1','timeZone','America/Chicago')"); - WebGUI::SQL->write("insert into userProfileData values ('3','timeZone','America/Chicago')"); -} - -sub removeUnneededFiles { - print "\tRemoving files that are no longer needed.\n" unless ($quiet); - unlink("../../www/env.pl"); - unlink("../../www/index.fpl"); - unlink("../../www/index.pl"); -} - -#------------------------------------------------- -sub addPhotoField { - print "\tAdding photo field to User Profiles\n" unless ($quiet); - ##Get profileCategoryId. - my ($categoryId) = WebGUI::SQL->quickArray(q!select profileCategoryId from userProfileCategory where categoryName='WebGUI::International::get(439,"WebGUI");'!); - ##Get last sequence number - my ($lastField) = WebGUI::SQL->buildArray(qq!select max(sequenceNumber) from userProfileField where profileCategoryId=$categoryId!); - ++ $lastField; - ##Insert Photo Field - WebGUI::SQL->write(sprintf q!insert into userProfileField values ('photo','WebGUI::International::get("photo","WebGUI");', 1, 0, 'Image', '', '', %d, %d, 1, 1)!, $lastField, $categoryId); -} - -#------------------------------------------------- -sub addAvatarField { - print "\tAdding avatar field to User Profiles\n" unless ($quiet); - ##Get profileCategoryId. - my ($categoryId) = WebGUI::SQL->buildArray(q!select profileCategoryId from userProfileCategory where categoryName='WebGUI::International::get(449,"WebGUI");';!); - ##Get last sequence number - my ($lastField) = WebGUI::SQL->buildArray(qq!select max(sequenceNumber) from userProfileField where profileCategoryId=$categoryId!); - ++ $lastField; - ##Insert Photo Field - WebGUI::SQL->write( sprintf q!insert into userProfileField values('avatar','WebGUI::International::get("avatar","WebGUI");', 0, 0, 'Image', '', '', %d, %d, 1, 0)!, $lastField, $categoryId ); -} - -#------------------------------------------------- -sub addEnableAvatarColumn { - print "\tAdding enableAvatar column to Collaborations\n" unless ($quiet); - WebGUI::SQL->write('ALTER TABLE Collaboration ADD COLUMN avatarsEnabled int(11) NOT NULL DEFAULT 0'); -} - -#------------------------------------------------- -sub addSpectre { - print "\tAdding Spectre\n" unless ($quiet); - my $user = WebGUI::User->new("new","pbuser_________spectre"); - $user->username("Spectre"); - $user->addToGroups([3]); - my $source = FileHandle->new("../../etc/spectre.conf.original","r"); - if (defined $source) { - binmode($source); - my $dest = FileHandle->new(">../../etc/spectre.conf"); - if (defined $dest) { - binmode($dest); - cp($source,$dest); - $dest->close; - } - $source->close; - } -} - -#------------------------------------------------- -sub addWorkflow { - print "\tAdding Workflow\n" unless ($quiet); - WebGUI::SQL->write("create table WorkflowSchedule ( - taskId varchar(22) binary not null primary key, - enabled int not null default 1, - minuteOfHour varchar(25), - hourOfDay varchar(25), - dayOfMonth varchar(25), - monthOfYear varchar(25), - dayOfWeek varchar(25), - workflowId varchar(22) binary not null - )"); - WebGUI::SQL->write("create table WorkflowInstance ( - instanceId varchar(22) binary not null primary key, - workflowId varchar(22) binary not null, - currentActivityId varchar(22) binary not null, - priority int - )"); - WebGUI::SQL->write("create table WorkflowInstanceData ( - instanceId varchar(22) binary not null primary key, - dataName varchar(35), - className varchar(255), - methodName varchar(255), - parameters text - )"); - WebGUI::SQL->write("create table Workflow ( - workflowId varchar(22) binary not null primary key, - title varchar(255), - description text - )"); - WebGUI::SQL->write("create table WorkflowActivity ( - activityId varchar(22) binary not null primary key, - workflowId varchar(22) binary not null, - title varchar(255), - description text, - previousActivityId varchar(22) binary not null, - dateCreated bigint, - className varchar(255) - )"); - WebGUI::SQL->write("create table WorkflowActivityProperty ( - propertyId varchar(22) binary not null primary key, - activityId varchar(22) binary not null, - name varchar(255), - value text - )"); -} - -#------------------------------------------------- -sub updateUserProfileDayLabels { - print "\tUpdating day labels in User Profile firstDayOfWeek.\n" unless ($quiet); - WebGUI::SQL->write(q!update userProfileField set dataValues='{0=>WebGUI::International::get(\"sunday\",\"DateTime\"),1=>WebGUI::International::get(\"monday\",\"DateTime\")}' where fieldName='firstDayOfWeek'!); -} - -#------------------------------------------------- -sub changeSelectListToSelectBox { - print "\tChanging all selectLists to selectBox's in userProfileField.\n" unless ($quiet); - WebGUI::SQL->write(q!update userProfileField set dataType='selectBox' where dataType='selectList'!); - my $sql = q!select fieldName,dataDefault from userProfileField where dataType IN ('selectBox','timeZone')!; - my $sth = WebGUI::SQL->read($sql); - while (my $hash = $sth->hashRef) { - $hash->{dataDefault} =~ tr/][//d; - WebGUI::SQL->write(sprintf q!update userProfileField set dataDefault=%s where fieldName=%s!, quote($hash->{dataDefault}), quote($hash->{fieldName}) ); - } -} - -(); - -#--- DO NOT EDIT BELOW THIS LINE - -#------------------------------------------------- -sub start { - $|=1; #disable output buffering - GetOptions( - 'configFile=s'=>\$configFile, - 'quiet'=>\$quiet - ); - WebGUI::Session::open("../..",$configFile); - WebGUI::Session::refreshUserInfo(3); - WebGUI::SQL->write("insert into webguiVersion values (".quote($toVersion).",'upgrade',".time().")"); -} - -#------------------------------------------------- -sub finish { - WebGUI::Session::close(); -} - diff --git a/docs/upgrades/upgrade_6.8.0-6.8.1.pl b/docs/upgrades/upgrade_6.8.0-6.8.1.pl deleted file mode 100644 index 4a28a6d86..000000000 --- a/docs/upgrades/upgrade_6.8.0-6.8.1.pl +++ /dev/null @@ -1,244 +0,0 @@ -#------------------------------------------------------------------- -# WebGUI is Copyright 2001-2006 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 -#------------------------------------------------------------------- - -use lib "../../lib"; -use strict; -use Getopt::Long; -use WebGUI::Session; -use File::Path; -use WebGUI::SQL; -use WebGUI::Asset; - -my $toVersion = "6.8.1"; # make this match what version you're going to -my $quiet; # this line required - - -start(); # this line required - -upgradeRichEditor(); -fixCSFaqTemplateAnchors(); -updateProfileSystem(); -convertDashboardPrefs(); -fixPosts(); -fixIOB(); - -finish(); # this line required - - -#------------------------------------------------- -sub fixIOB { - print "\tFixing IOB.\n" unless ($quiet); - WebGUI::SQL->write("alter table InOutBoard_statusLog add column createdBy varchar(22) binary"); -} - -#------------------------------------------------- -sub fixPosts { - print "\tFixing posts.\n" unless ($quiet); - WebGUI::SQL->write("update Post set dateUpdated=".time()." where dateUpdated=0"); -} - -#------------------------------------------------- -sub updateProfileSystem { - print "\tUpdating user profile system.\n" unless ($quiet); - WebGUI::SQL->write("alter table userProfileField change fieldLabel label varchar(255) not null default 'Undefined'"); - WebGUI::SQL->write("alter table userProfileField change dataType fieldType varchar(128) not null default 'text'"); - WebGUI::SQL->write("alter table userProfileField change dataValues possibleValues text"); - WebGUI::SQL->write("alter table userProfileCategory change categoryName label varchar(255) not null default 'Undefined'"); - WebGUI::SQL->write("alter table userProfileCategory add column protected int not null default 0"); - WebGUI::SQL->write("update userProfileCategory set protected=1 where profileCategoryId in ('1','2','3','4','5','6','7')"); -} - -#------------------------------------------------- -sub upgradeRichEditor { - print "\tUpgrade rich editor\n" unless ($quiet); - rmtree("../../www/extras/tinymce"); -} - -#------------------------------------------------- -sub convertDashboardPrefs { - print "\tConverting Dashboard preferences\n" unless ($quiet); - #purge all Fields. - my $a = WebGUI::SQL->read("select assetId from asset where className='WebGUI::Asset::Field'"); - while (my ($assetId) = $a->array) { - WebGUI::SQL->write("delete from asset where assetId=".quote($assetId)); - WebGUI::SQL->write("delete from assetData where assetId=".quote($assetId)); - } - unlink("../../lib/WebGUI/Asset/Field.pm"); - WebGUI::SQL->write("DROP TABLE `wgField`"); - WebGUI::SQL->write("ALTER TABLE `Dashboard` DROP COLUMN mapFieldId"); - WebGUI::SQL->write("ALTER TABLE `Dashboard` ADD COLUMN `isInitialized` TINYINT UNSIGNED NOT NULL DEFAULT 0"); - WebGUI::SQL->write("ALTER TABLE `Dashboard` ADD COLUMN `assetsToHide` TEXT"); - WebGUI::SQL->write("ALTER TABLE `Shortcut` ADD COLUMN `prefFieldsToShow` TEXT"); - WebGUI::SQL->write("ALTER TABLE `Shortcut` ADD COLUMN `prefFieldsToImport` TEXT"); - WebGUI::SQL->write("ALTER TABLE `Shortcut` ADD COLUMN `showReloadIcon` TINYINT UNSIGNED NOT NULL DEFAULT 0"); - my $asset = WebGUI::Asset->new("DashboardViewTmpl00001","WebGUI::Asset::Template"); - if (defined $asset) { ##Can't update what doesn't exist - my $template = < \@import "^Extras;wobject/Dashboard/draggable.css"; - - - - -
    - - - - - -
    - -
    -
    - - - -

    -
    -
    -
    - -
    Add New Content
    - -

    - -

    -
    - - -

    - -

    -
    - - - - -

    - -

    -
    -
    - - -
    - - - - - - - - -
    - - - - -

    -
    -
    - - - - - -

    -
    -
    - - - - -

    -
    -
    -
    -
    - -
    -STOP - $asset->addRevision({template=>$template})->commit; - } -} - -#------------------------------------------------- -sub fixCSFaqTemplateAnchors { - print "\tFix Anchors in the CS FAQ Template\n" unless ($quiet); - my $asset = WebGUI::Asset->new("PBtmpl0000000000000080","WebGUI::Asset::Template"); - if (defined $asset) { ##Can't update what doesn't exist - my $template = $asset->get("template"); - $template =~ s/(write("insert into webguiVersion values (".quote($toVersion).",'upgrade',".time().")"); -} - -#------------------------------------------------- -sub finish { - WebGUI::Session::close(); -} - diff --git a/docs/upgrades/upgrade_6.8.1-6.8.2.pl b/docs/upgrades/upgrade_6.8.1-6.8.2.pl deleted file mode 100644 index 2e6b2a72c..000000000 --- a/docs/upgrades/upgrade_6.8.1-6.8.2.pl +++ /dev/null @@ -1,76 +0,0 @@ -#------------------------------------------------------------------- -# WebGUI is Copyright 2001-2006 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 -#------------------------------------------------------------------- - -use lib "../../lib"; -use strict; -use Getopt::Long; -use WebGUI::Session; -use WebGUI::SQL; -use WebGUI::Asset; - - -my $toVersion = "6.8.2"; # make this match what version you're going to -my $quiet; # this line required - - -start(); # this line required - -fixPosts(); -fixDataFormMailForm(); -fixTZGoof(); - -finish(); # this line required - - -#------------------------------------------------- -sub fixTZGoof { - print "\tFixing default timezone.\n" unless ($quiet); - WebGUI::SQL->write("update userProfileField set dataDefault='\\\'America/Chicago\\\'' where fieldName='timeZone'"); -} - -#------------------------------------------------- -sub fixPosts { - print "\tFixing posts.\n" unless ($quiet); - WebGUI::SQL->write("update Post set dateSubmitted=dateUpdated where dateSubmitted is null"); -} - -#------------------------------------------------- -sub fixDataFormMailForm { - print "\tFix bad template variable in Mail Form.\n" unless ($quiet); - my $asset = WebGUI::Asset->new("PBtmpl0000000000000020","WebGUI::Asset::Template"); - if (defined $asset) { - my $template = $asset->get("template"); - $template =~ s///g; - $asset->addRevision({template=>$template})->commit; - } -} - - - -# ---- DO NOT EDIT BELOW THIS LINE ---- - -#------------------------------------------------- -sub start { - my $configFile; - $|=1; #disable output buffering - GetOptions( - 'configFile=s'=>\$configFile, - 'quiet'=>\$quiet - ); - WebGUI::Session::open("../..",$configFile); - WebGUI::Session::refreshUserInfo(3); - WebGUI::SQL->write("insert into webguiVersion values (".quote($toVersion).",'upgrade',".time().")"); -} - -#------------------------------------------------- -sub finish { - WebGUI::Session::close(); -} - diff --git a/docs/upgrades/upgrade_6.8.2-6.8.3.pl b/docs/upgrades/upgrade_6.8.2-6.8.3.pl deleted file mode 100644 index 9dee3e6cf..000000000 --- a/docs/upgrades/upgrade_6.8.2-6.8.3.pl +++ /dev/null @@ -1,195 +0,0 @@ -#------------------------------------------------------------------- -# WebGUI is Copyright 2001-2006 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 -#------------------------------------------------------------------- - -use lib "../../lib"; -use strict; -use Getopt::Long; -use WebGUI::Session; -use WebGUI::SQL; -use WebGUI::Asset; -use Parse::PlainConfig; - -my $toVersion = "6.8.3"; # make this match what version you're going to -my $quiet; # this line required - - -start(); # this line required - -fixMatrixTemplate(); - -finish(); # this line required - - -#------------------------------------------------- -sub fixMatrixTemplate { - print "\tFix matrix template.\n" unless ($quiet); -my $template = < -

    -
    -

    - - -

    -
    - - -
    -

    Use the form below to select up to listings to compare at once. -

    - - -
    - - -

    -Narrow The Matrix
    -You can narrow the scope of the matrix by searching for exactly the criteria you're looking for in a listing. -

    - - -

    -
    Expand The Matrix
    - - Click here to add a new listing. Please note that you will be the official maintainer of the listing, and will be responsible for keeping it up to date. - -If you are the maker of a product, or are an expert user and are willing to maintain the listing, create an account so you can register your listing. - - -

    - - - -
    Listing Statistics
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Most clicks:
    Most views:
    Most compares:
    Most recently updated:

    Best Rated By Users
    /10

    View Ratings Details

    Worst Rated By Users
    /10

    - -
    -
    Site Statistics
    - - - - - - - - - - - - - -
    Listing Count:
    Current Visitors:
    Registered Users:
    - - - - - -

    List Fields -

    - -PENDING LISTINGS: - -
      - -
    • -
      -
    -
    - -
    -STOP - my $asset = WebGUI::Asset->new("matrixtmpl000000000001","WebGUI::Asset::Template"); - $asset->addRevision({template=>$template})->commit if (defined $template); -} - - - -# ---- DO NOT EDIT BELOW THIS LINE ---- - -#------------------------------------------------- -sub start { - my $configFile; - $|=1; #disable output buffering - GetOptions( - 'configFile=s'=>\$configFile, - 'quiet'=>\$quiet - ); - WebGUI::Session::open("../..",$configFile); - WebGUI::Session::refreshUserInfo(3); - WebGUI::SQL->write("insert into webguiVersion values (".quote($toVersion).",'upgrade',".time().")"); -} - -#------------------------------------------------- -sub finish { - WebGUI::Session::close(); -} - diff --git a/docs/upgrades/upgrade_6.8.3-6.8.4.pl b/docs/upgrades/upgrade_6.8.3-6.8.4.pl deleted file mode 100644 index 3de32204e..000000000 --- a/docs/upgrades/upgrade_6.8.3-6.8.4.pl +++ /dev/null @@ -1,301 +0,0 @@ -#------------------------------------------------------------------- -# WebGUI is Copyright 2001-2006 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 -#------------------------------------------------------------------- - -use lib "../../lib"; -use strict; -use Getopt::Long; -use WebGUI::Session; -use WebGUI::SQL; -use WebGUI::Asset; -use Parse::PlainConfig; - -my $toVersion = "6.8.4"; # make this match what version you're going to -my $quiet; # this line required - -start(); # this line required - -fixDefaultThreadTemplate(); -enableAvatarProfileField(); -updateDataFormEmailFields(); - -finish(); # this line required - - -#------------------------------------------------- -sub fixDefaultThreadTemplate { - print "\tEnable Avatars in the default Thread template.\n" unless ($quiet); -my $template = <
    - - -

    -
    - - - -
    -

    -
    -
    - - - - - -
    -
    - - - - -
    - -
    - -
    -
    -
    - : - - - - avatar - -
    - :
    -
    -
    - :
    - : - -     [ 1, 2, 3, 4, 5 ] - -
    - - :     [ | ]
    - - - :
    -
    -
    -
    -
    -
    - - - - -
    - -
    - -
    - - [] - - - [] - [] - -
    -
    -
    -
    - -
    - - - - -
    -
    - -
    - -
    -
    -
    - : - - - - avatar - -
    - :
    -
    -
    - :
    - : - -     [ 1, 2, 3, 4, 5 ] - -
    - - :     [ | ]
    - - - :
    -
    -
    -
    -
    -
    - - - - -
    - -
    - -
    - - [] - - - [] - [] - -
    -
    -
    -
    -
    - -
    - - - - - -
    - - [] - - - [] - - - [] - - - - [] - - [] - - - [] - - [] - - - - - [] - - [] - - -
    -EOT1 - - my $asset = WebGUI::Asset->new("PBtmpl0000000000000032","WebGUI::Asset::Template"); - $asset->addRevision({template=>$template})->commit; -} - - -#------------------------------------------------- -sub enableAvatarProfileField { - print "\tMake user profile Avatar field visible and editable.\n" unless ($quiet); - WebGUI::SQL->write("update userProfileField set visible=1 where fieldName='avatar'"); - WebGUI::SQL->write("update userProfileField set editable=1 where fieldName='avatar'"); -} - -#------------------------------------------------- -sub updateDataFormEmailFields { - print "\tFix default email tabId's.\n" unless ($quiet); - WebGUI::SQL->write("alter table DataForm_field alter DataForm_tabId set default 0;"); - my $sth = WebGUI::SQL->read('select DataForm_fieldId,DataForm_tabId from DataForm_field'); - my $wrh = WebGUI::SQL->prepare('update DataForm_field set DataForm_tabId=0 where DataForm_fieldId=?'); - while (my %hash = $sth->hash) { - $wrh->execute([$hash{DataForm_fieldId}]) unless $hash{DataForm_tabId}; - } -} - - -# ---- DO NOT EDIT BELOW THIS LINE ---- - -#------------------------------------------------- -sub start { - my $configFile; - $|=1; #disable output buffering - GetOptions( - 'configFile=s'=>\$configFile, - 'quiet'=>\$quiet - ); - WebGUI::Session::open("../..",$configFile); - WebGUI::Session::refreshUserInfo(3); - WebGUI::SQL->write("insert into webguiVersion values (".quote($toVersion).",'upgrade',".time().")"); -} - -#------------------------------------------------- -sub finish { - WebGUI::Session::close(); -} - diff --git a/docs/upgrades/upgrade_6.8.5-6.9.0.pl b/docs/upgrades/upgrade_6.8.5-6.9.0.pl new file mode 100644 index 000000000..f0183f95c --- /dev/null +++ b/docs/upgrades/upgrade_6.8.5-6.9.0.pl @@ -0,0 +1,57 @@ +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2006 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 +#------------------------------------------------------------------- + +use lib "../../lib"; +use strict; +use Getopt::Long; +use WebGUI::Session; + + +my $toVersion = "6.9.0"; # make this match what version you're going to +my $quiet; # this line required + + +my $session = start(); # this line required + +# upgrade functions go here + +finish($session); # this line required + + +##------------------------------------------------- +#sub exampleFunction { +# print "\tWe're doing some stuff here that you should know about.\n" unless ($quiet); +# # and here's our code +#} + + + +# ---- DO NOT EDIT BELOW THIS LINE ---- + +#------------------------------------------------- +sub start { + my $configFile; + $|=1; #disable output buffering + GetOptions( + 'configFile=s'=>\$configFile, + 'quiet'=>\$quiet + ); + my $session = WebGUI::Session->open("../..",$configFile); + $session->user({userId=>3}); + $session->db->write("insert into webguiVersion values (".$session->db->quote($toVersion).",'upgrade',".$session->datetime->time().")"); + return $session; +} + +#------------------------------------------------- +sub finish { + my $session = shift; + $session->close(); +} +