diff --git a/.proverc b/.proverc new file mode 100644 index 000000000..6f84329ea --- /dev/null +++ b/.proverc @@ -0,0 +1 @@ +--recurse diff --git a/README b/README new file mode 100644 index 000000000..baff490a8 --- /dev/null +++ b/README @@ -0,0 +1,47 @@ +This is the PSGI branch of WebGUI8 + +To try this out: + + 0) Start from WebGUI 7.10.23 or the example .conf and create.sql that comes with WebGUI 8. + 1) Run testEnvironment.pl to install all new requirements. + 2) Get a new wgd from http://haarg.org/wgd + 3) Copy etc/WebGUI.conf.original to www.whatever.com.conf; edit it and set dbuser, dbpass, + dsn, and uploadsPath (eg to /data/domains/www.example.com/public/uploads/) + 4) Set WEBGUI_CONFIG to point at your new config file + 5) $ export PERL5LIB='/data/WebGUI/lib' + 6) $ wgd reset --upgrade + 7) $ cd /data/WebGUI (or whereever you unpacked it) + 8) $ rsync -r -a (or cp -a) /data/WebGUI/www/extras /data/domains/www.example.com/public/ + +To start it: + + 8) $ plackup app.psgi + +See docs/install.txt for more detailed installation instructions. + +Currently, the best performance is achieved via: + + plackup -E none -s Starman --workers 10 --disable-keepalive + +You can benchmark your server via: + + ab -t 3 -c 10 -k http://dev.localhost.localdomain:5000/ | grep Req + +I'm currently getting 370 requests/second, whereas I'm getting 430/second on the non-PSGI WebGUI8 branch. + += ARCHITECTURE = + +* The root level app.psgi file loads all the config files found and + loads the site specific psgi file for each, linking them to the + proper host names. +* The site psgi file uses the WEBGUI_CONFIG environment variable to find the config. +* It instantiates the $wg WebGUI object (one per app). +* $wg creates and stores the WebGUI::Config (one per app) +* $wg creates the $app PSGI app code ref (one per app) +* WebGUI::Middleware::Session is wrapped around $app at the outer-most layer so that it can open and + close the $session WebGUI::Session. Any other wG middleware that needs $session should go in between + it and $app ($session created one per request) +* $session creates the $request WebGUI::Session::Request and $response WebGUI::Session::Response + objects (one per request) + + diff --git a/TODO b/TODO new file mode 100644 index 000000000..e771de9ba --- /dev/null +++ b/TODO @@ -0,0 +1,21 @@ +TODO +* Deprecate WebGUI::Session::HTTP - replace with WebGUI::Request/Response +* Investigate moving Cookie handling into middleware +* Reinstate WebGUI::authen with something equivalent +* Refactor assets to use streaming response +* Fix WebGUI::Form::param + +DONE +* $session->request is now a Plack::Request object +* serverObject gone from WebGUI::Session::open() +* WebGUI::authen API changed +* urlHandler API changed - no longer gets server, config +* Streaming response body +* Mostly decoupled WebGUI from Log4perl +* Exception handling and error doc mapping +* Plack::Middleware::Debug panels +* Replaces all URL Handlers with Middleware + +NB +* Periodically do a big stress-test and check for leaks, mysql overload etc.. + ab -t 100 -c 10 -k http://dev.localhost.localdomain:5000 | grep 'Req' \ No newline at end of file diff --git a/WebGUI-Session-Plack.pm b/WebGUI-Session-Plack.pm new file mode 100644 index 000000000..411f6775c --- /dev/null +++ b/WebGUI-Session-Plack.pm @@ -0,0 +1,161 @@ +package WebGUI::Session::Plack; + +# This file is deprecated - keeping it here for reference until everything has been ported + +use strict; +use warnings; +use Carp; + +=head1 DESCRIPTION + +This class is used instead of WebGUI::Session::Request when wg is started via plackup + +=cut + +sub new { + my ( $class, %p ) = @_; + + # 'require' rather than 'use' so that non-plebgui doesn't freak out + require Plack::Request; + my $request = Plack::Request->new( $p{env} ); + my $response = $request->new_response(200); + + bless { + %p, + pnotes => {}, + request => $request, + response => $response, + server => WebGUI::Session::Plack::Server->new( env => $p{env} ), + headers_out => Plack::Util::headers( [] ), # use Plack::Util to manage response headers + body => [], + sendfile => undef, + }, $class; +} + +our $AUTOLOAD; + +sub AUTOLOAD { + my $what = $AUTOLOAD; + $what =~ s/.*:://; + carp "!!plack->$what(@_)" unless $what eq 'DESTROY'; +} + +# Emulate/delegate/fake Apache2::* subs +sub uri { shift->{request}->path_info } +sub param { shift->{request}->param(@_) } +sub params { shift->{request}->prameters->mixed(@_) } +sub headers_in { shift->{request}->headers(@_) } +sub headers_out { shift->{headers_out} } +sub protocol { shift->{request}->protocol(@_) } +sub status { shift->{response}->status(@_) } +sub sendfile { $_[0]->{sendfile} = $_[1] } +sub server { shift->{server} } +sub method { shift->{request}->method } +sub upload { shift->{request}->upload(@_) } +sub dir_config { shift->{server}->dir_config(@_) } +sub status_line { } +sub auth_type { } # should we support this? +sub handler {'perl-script'} # or not..? + +sub content_type { + my ( $self, $ct ) = @_; + $self->{headers_out}->set( 'Content-Type' => $ct ); +} + +# TODO: I suppose this should do some sort of IO::Handle thing +sub print { + my $self = shift; + push @{ $self->{body} }, @_; +} + +sub pnotes { + my ( $self, $key ) = ( shift, shift ); + return wantarray ? %{ $self->{pnotes} } : $self->{pnotes} unless defined $key; + return $self->{pnotes}{$key} = $_[0] if @_; + return $self->{pnotes}{$key}; +} + +sub user { + my ( $self, $user ) = @_; + if ( defined $user ) { + $self->{user} = $user; + } + $self->{user}; +} + +sub push_handlers { + my $self = shift; + my ( $x, $sub ) = @_; + + # log it + # carp "push_handlers($x)"; + + # run it + # returns something like Apache2::Const::OK, which we just ignore because we're not modperl + my $ret = $sub->($self); + + return; +} + +sub finalize { + my $self = shift; + my $response = $self->{response}; + if ( $self->{sendfile} && open my $fh, '<', $self->{sendfile} ) { + $response->body($fh); + } + else { + $response->body( $self->{body} ); + } + $response->headers( $self->{headers_out}->headers ); + return $response->finalize; +} + +sub no_cache { + my ( $self, $doit ) = @_; + if ($doit) { + $self->{headers_out}->set( 'Pragma' => 'no-cache', 'Cache-control' => 'no-cache' ); + } + else { + $self->{headers_out}->remove( 'Pragma', 'Cache-control' ); + } +} + +################################################ + +package WebGUI::Session::Plack::Server; + +use strict; +use warnings; +use Carp; + +sub new { + my $class = shift; + bless {@_}, $class; +} + +our $AUTOLOAD; + +sub AUTOLOAD { + my $what = $AUTOLOAD; + $what =~ s/.*:://; + carp "!!server->$what(@_)" unless $what eq 'DESTROY'; +} + +sub dir_config { + my ( $self, $c ) = @_; + + # Translate the legacy WebguiRoot and WebguiConfig PerlSetVar's into known values + return WebGUI->root if $c eq 'WebguiRoot'; + return WebGUI->config_file if $c eq 'WebguiConfig'; + + # Otherwise, we might want to provide some sort of support (which Apache is still around) + return $self->{env}->{"wg.DIR_CONFIG.$c"}; +} + +################################################ + +package Plack::Request::Upload; + +sub link { shift->link_to(@_) } + +1; diff --git a/app.psgi b/app.psgi new file mode 100644 index 000000000..fd1d7299b --- /dev/null +++ b/app.psgi @@ -0,0 +1,52 @@ + +=head1 LEGAL + + ------------------------------------------------------------------- + WebGUI is Copyright 2001-2012 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 + ------------------------------------------------------------------- + +=cut + +use strict; +use Plack::Builder; +use Plack::Util; + +use WebGUI::Paths -inc; +use WebGUI::Config; +use WebGUI::Fork; + +if ($ENV{PLACK_ENV} ne 'development') { + WebGUI::Paths->preloadAll; +} + +WebGUI::Fork->init(); + +builder { + my $first_app; + WebGUI::Paths->siteConfigs or die "no configuration files found"; + for my $config_file (WebGUI::Paths->siteConfigs) { + my $config = WebGUI::Config->new($config_file) or die "failed to log configuration file: $config_file: $!"; + my $psgi = $config->get('psgiFile') || WebGUI::Paths->defaultPSGI; + my $app = do { + # default psgi file uses environment variable to find config file + local $ENV{WEBGUI_CONFIG} = $config_file; + Plack::Util::load_psgi($psgi); + } or die; + $first_app ||= $app; + my $gateway = $config->get('gateway'); + $gateway =~ s{^/?}{/}; + for my $sitename ( @{ $config->get('sitename') } ) { + mount "http://$sitename$gateway" => $app; + } + } + + # use the first config found as a fallback + mount '/' => $first_app; +}; + diff --git a/asset_status.ods b/asset_status.ods new file mode 100644 index 000000000..b46876dc0 Binary files /dev/null and b/asset_status.ods differ diff --git a/benchmark.pl b/benchmark.pl new file mode 100755 index 000000000..fa71b1dc4 --- /dev/null +++ b/benchmark.pl @@ -0,0 +1,19 @@ +# Little script used to run benchmarks against dev.localhost.localdomain +# +# To profile, run "perl -d:NYTProf benchmark.pl" + +use lib '/data/WebGUI/lib'; +use WebGUI; +use Plack::Test; +use Plack::Builder; +use HTTP::Request::Common; +my $wg = WebGUI->new( root => '/data/WebGUI', site => 'dev.localhost.localdomain.conf' ); +my $app = builder { + enable '+WebGUI::Middleware::Session', config => $wg->config; + $wg; +}; + +test_psgi $app, sub { + my $cb = shift; + $cb->( GET "/" ) for 1..1000; +}; \ No newline at end of file diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 833064c26..fc6d7724e 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -1,5 +1,20 @@ +7.10.25 + 7.10.24 + - fixed #12318: asset error causes asset manager to fail + - fixed #12308: error message used scalar as reference - fixed #12256: Calendar Search doesn't show admin controls + - fixed #12268: Point of sale form missing from cart screen. + - fixed #12201: AssetReport - no selects. + - fixed #12269: Login / Loginbox with encryptlogin + - fixed #12271: Calendar List View does not always show labels + - fixed Passive Analytics, UI, Progress Bar, server load. + - fixed #12303: Survey custom multiple choice question types + - fixed #12304: Surven packages do not include custom question types + - fixed #12309: Some child assets ignore visitor cache timeouts + - fixed possible values and default values on EMS submission. + - fixed #12312: Shop account plugin has unrendered macro + - fixed #12315: Remove yui tests from git repo. 7.10.23 - fixed #12225: Stock asset, multiple instances on a page diff --git a/docs/changelog/8.x.x.txt b/docs/changelog/8.x.x.txt new file mode 100644 index 000000000..1b9b247a3 --- /dev/null +++ b/docs/changelog/8.x.x.txt @@ -0,0 +1,6 @@ +8.0.0 + - Replaced the existing caching mechanism with memcached, which results in a 400% improvement to cache speed. See migration.txt for API changes and gotcha.txt for prereq changes. + - Added "hot sessions" so sessions interact with the database less. + - Added Facebook Auth and FacebookLogin macro. + - Removed the WebGUI statistics program and code. + diff --git a/docs/credits.txt b/docs/credits.txt index 2d1bfe425..e504aaa45 100644 --- a/docs/credits.txt +++ b/docs/credits.txt @@ -99,3 +99,5 @@ TinyMCE..............................MoxieCode Yahoo User Interface (YUI)...........Yahoo! http://www.yahoo.com +FamFamFam Silk Icon set..............FamFamFam + http://famfamfam.com/lab/icons/silk/ diff --git a/docs/gotcha.txt b/docs/gotcha.txt index 39cdfb4f8..3a04b742c 100644 --- a/docs/gotcha.txt +++ b/docs/gotcha.txt @@ -7,6 +7,37 @@ upgrading from one version to the next, or even between multiple versions. Be sure to heed the warnings contained herein as they will save you many hours of grief. +8.0.0 +-------------------------------------------------------------------- + * WebGUI 8 is not API compatible with WebGUI 7. If you have custom + code, chances are you'll need to update it to make it work with + WebGUI 8. Please read docs/migration.txt for information about + changes to the WebGUI API. + + * Many scripts in the sbin directory have been replaced by the webgui.pl + master script. + + * upgrade.pl -> webgui.pl upgrade + + * The rotation, deletion and reordering of Photos in a Gallery Album + has been removed because the way it was implemented in WebGUI 7 + is incompatible with WebGUI 8. + + * As part of the migration to Template::Toolkit, we will be changing template + variables from using dots to underscores. All templates using that namespace were + automatically upgraded to use the new variables. + + In this version, these templates were updated: + Account Macro template + Admin Toggle Macro template + + * The new Admin Console required changes to layout templates. Old templates + will continue to work, but show two sets of editing and drag controls. + + * WebGUI 8 does not support HTTP Basic Authentication any longer. + + * Support for server-side spell checking in the Rich Editor TinyMCE has been removed. + 7.10.24 -------------------------------------------------------------------- * WebGUI now depends on Business::OnlinePayment::AuthorizeNet. This version @@ -104,6 +135,7 @@ save you many hours of grief. is in WebGUI again. Licencing information was overlooked. An upgrade to 7.10.1 will break the Matrix. This is fixed now. + 7.10.1 -------------------------------------------------------------------- * WebGUI now depends on PerlIO::eol, for doing line ending translation. @@ -140,6 +172,7 @@ save you many hours of grief. -------------------------------------------------------------------- * The javascript check for email addresses has been removed. + 7.9.5 -------------------------------------------------------------------- * Starting in WebGUI 7.9.4, the CHI and Cache::FastMmap modules are required. @@ -147,6 +180,7 @@ save you many hours of grief. * Starting in WebGUI 7.9.5, you cannot enter in a URL that is a has more than 2 dashes, "-", in a row. They will be collapsed down into 1 dash. + 7.9.4 -------------------------------------------------------------------- * Shop and Cart changes @@ -182,7 +216,6 @@ save you many hours of grief. in components of the core for a while, since the release of the new Survey. Test::Deep version 0.095 or higher is now required. - 7.9.2 -------------------------------------------------------------------- * new dependency: DateTime::Event::ICal 0.10 or higher @@ -288,7 +321,6 @@ save you many hours of grief. prefix from the filename. - 7.8.0 -------------------------------------------------------------------- diff --git a/docs/install.txt b/docs/install.txt index d89561dc7..cecc76084 100644 --- a/docs/install.txt +++ b/docs/install.txt @@ -2,69 +2,103 @@ # Quick And Dirty Install Instructions # ################################################################## -The following is a rough overview of how to install WebGUI. For -more detailed instructions read the WebGUI installation -documentation. - - http://wiki.webgui.org/installation-options +The following is a rough overview of how to install WebGUI *8*. -QnD INSTALL INSTRUCTIONS: +http://wiki.webgui.org/installation-options has instructions for +WebGUI 7. -1. Install Perl 5.8 or higher. +== INSTALL == -2. Install Apache 2.0 with mod_perl 2.0 and set up your config. Add the -following directives to mod_perl (See WebGUI Done Right for more detail.) +* Install a recent Perl (5.12.1 or better) if you don't have one already -LoadModule apreq_module modules/mod_apreq2.so -LoadModule perl_module modules/mod_perl.so -PerlSetVar WebguiRoot /data/WebGUI -PerlCleanupHandler Apache2::SizeLimit -PerlRequire /data/WebGUI/sbin/preload.perl +* Install a recent MySQL and set up a user account - - ServerName www.example.com - ServerAlias example.com - DocumentRoot /data/domains/example.com/www/public - SetHandler perl-script - PerlInitHandler WebGUI - PerlSetVar WebguiConfig www.example.com.conf - +* Install ImageMagick (http://www.imagemagick.org/, compile and install the + source or binary package) -3. Install MySQL 5.0.10 or higher. +* Get WebGUI from GitHub and check out the WebGUI8 branch: -4. Install Image Magick 6.0 or higher. + $ git clone https://github.com/plainblack/webgui.git + $ git checkout WebGUI8 --track -5. Extract WebGUI into your webroot. +* Setup your configuration files -6. Start MySQL. + Copy WebGUI.conf.original to something named after the site's URL and + ending in .conf, such as www.example.com.conf, and edit it, making sure + to insert your site's URL and the database connection information + (dbuser, dbpass, dsn). -7. Run the following Database commands. (You should modify the - commands to match your database, username, and password.) + Set uploadsPath in the .conf file to eg + /data/domains/www.example.com/public/uploads/. - mysql -e "create database WebGUI" - mysql -e "grant all privileges on WebGUI.* to webgui@localhost identified by 'password'" - mysql -e "flush privileges" - mysql -uwebgui -ppassword WebGUI < docs/create.sql + Edit "etc/spectre.conf" to define port and worker settings for spectre. -8. Edit "etc/WebGUI.conf" to match your DB settings and log directory. + Set WEBGUI_CONFIG to point at your new configuration file: -9. Edit "etc/spectre.conf" to define port and worker settings for spectre + $ export WEBGUI_CONFIG='/data/WebGUI/etc/www.example.com.conf' -10. Run the following command from your WebGUI/sbin directory to install - the required perl modules and determine whether you've configured - your system correctly. +* Automatically install new Perl module dependencies: - perl testEnvironment.pl + $ sbin/testEnvironment.pl as root to install Perl modules - If it returns all "OK" then you're done. +* Create a MySQL user account for the domain WebGUI is to host + and share/create.sql into that database -11. Start Apache. + $ mysql --password --user=root -e "create database www_example_com" + $ mysql --password --user=root -e "grant all privileges on www_example_com.* + to webgui@localhost identified by 'XXXXpasswordhereXXXX'" + $ mysql --password --user=webgui < share/create.sql -12. Start Spectre. +* wgd reset --uploads + +* Continue with the UPGRADE instructions below + + +== UPGRADE == + +* Run sbin/testEnvironment.pl. WebGUI 8 adds new dependencies. + +* Update wgd: + + WebGUI has a new upgrades system for wgd to support. The old system silently + ignores the new upgrade scripts. + + Get wgd from http://haarg.org/wgd, put in /data/wre/prereqs/bin/ (if you're + using the WRE), /usr/local/bin, or ~/bin. + + Do chmod ugo+x wgd to make it executable. + +* Run Upgrades: + + $ wgd reset --upgrade + + This is needed even for new WebGUI 8 installs. The create.sql and + WebGUI.conf.original are both from 7.10.x. + +* Copy new "extras" (images, CSS, JavaScript) over: + + $ rsync -r -a (or cp -a) /data/WebGUI/www/extras \ + /data/domains/www.example.com/public/ + +* Add WebGUI's libraries to Perl's library path: + + $ export PERL5LIB='/data/WebGUI/lib:/data/WebGUI/t/lib' + + Previously, this would break Apache if it were set; now it's required for the + stuff plackup loads to find the rest of WebGUI. + +* Launch WebGUI 8: + + $ plackup app.psgi + + ... then connect your browser to the URL it advertises. + + You'll be guided through a few quick questions to setup an admin account. + (Or, if you aren't but wanted to be, run wgd reset --starter to enable it.) + +* Start Spectre: cd /data/WebGUI/sbin perl spectre.pl --daemon -13. Browse to your site. You'll be guided through a few quick questions - to setup an admin account. diff --git a/docs/legal.txt b/docs/legal.txt index b1f119c1d..a85162d22 100644 --- a/docs/legal.txt +++ b/docs/legal.txt @@ -2,7 +2,7 @@ # WebGUI Legal Information # #################################################################### -WebGUI is Copyright 2001-2011 Plain Black Corporation. All rights +WebGUI is Copyright 2001-2012 Plain Black Corporation. All rights reserved. WebGUI Content Engine, WebGUI Runtime Environment, and Plain Black @@ -27,7 +27,7 @@ each file, or this file, or the license file. The notice at the top of each file looks like the following: #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/docs/migration.txt b/docs/migration.txt new file mode 100644 index 000000000..5a1078b80 --- /dev/null +++ b/docs/migration.txt @@ -0,0 +1,429 @@ +WebGUI 8 Migration Guide +------------------------ + +The information contained herein documents the API changes that have occurred +in the WebGUI 8 development effort and how to migrate your code to accomodate +the new APIs. + +WebGUI::Auth +========================== + +The API for new() has changed: new( $session, $userId ); + +editUserSettingsForm deprecated. Use editSettingsForm +editUserSettingsFormSave is deprecated. Use editSettingsFormSave +editUserForm and editSettingsForm now return WebGUI::FormBuilder objects instead of raw HTML. +deleteParams is deprecated. use delete() +deleteSingleParam is deprecated. use delete("param") +saveParams is deprecated. use update() +getParams is deprecated. use get() +init() is deprecated. Use www_view() +isAdmin, isVisitor, isRegistered are all deprecated. use user->is* instead +setCallable and isCallable are deprecated. use www_ prefix instead. + +WebGUI::User +========================== + +updateProfileFields is deprecated. Use update +profileField is deprecated. Use get() and update() +authInstance is deprecated. Instead instantiate the auth method and give it a + user or userId + +WebGUI::Macro::AdminBar +========================== +There is no Admin Bar for normal pages. Only the admin mode can see the admin bar. + +WebGUI::Macro::AdminToggle +========================== +The Admin Toggle can only enter admin mode, it cannot leave it, so there is no "Turn Off" text. The second +parameter is now the template ID. + + +WebGUI::Config +============== +WebGUI::Config->new has a new API. Its WebGUI root parameter has been +eliminated. It now only accepts a config file as either an absolute path, or +a path relative to WebGUI's etc directory. + +my $config = WebGUI::Config->new($filename); + + + +WebGUI::Session +=============== +WebGUI::Session->open has a new API. Its WebGUI root parameter has been +eliminated. The config file it is given can be either an absolute path, or a +path relative to WebGUI's etc directory. + +my $session = WebGUI::Session->open($configFile); + +perldoc WebGUI::Session for more details about the arguments. + + +WebGUI::Session::Env +==================== +WebGUI::Session::Env has been moved into WebGUI::Session::Request. A listing +of replacements and equivalents follows: + +$session->env->getIp => $session->request->address + +WebGUI::Session::ErrorHandler +============================= + +ErrorHandler has been changed to "log" in all circumstances. $session->errorHandler no longer exists, +use $session->log. WebGUI::Session::ErrorHandler no longer exists, use WebGUI::Session::Log + +WebGUI::Utility +=============== +This module has been removed. It had many functions that weren't used, and others have better replacements. + + formatBytes -> Number::Format::format_bytes + commify -> Number::Format::format_number + emailRegex -> Email::Valid->address() + isBetween -> <= / >= + makeArrayTabSafe -> Text::CSV_XS methods + scalarEquals -> eq + randint -> int( rand( $x ) ) + isInSubnet -> Net::CIDR::Lite->new(@filters)->find($ip) + round -> sprintf '%.0f', $x + isIn -> smart match + sortHash -> sort with map + +All other subs were unused and were just removed. + + +WebGUI::Cache +============= +WebGUI::Cache has been completely rewritten. If you were using the cache API +in the past, you'll need to update your code to reflect the changes. NOTE: you +can get a cached reference to the cache object from WebGUI::Session, which +will be substantially faster than instantiating the object yourself. + +my $cache = $session->cache; + + + +WebGUI::Asset +============= +The Asset API has been changed in small, but +significant ways. You'll need to make a few changes to your asset subclasses +to support these changes. + +Definition +---------- +You must migrate your asset to use the new +WebGUI::Definition::Asset class instead of the definition() method. This +executes several orders of magnitude faster, but is different in a few ways. + +1) You define your definition using property and define calls, as well as +standard Moose syntax. + +2) You no longer have a reference to $session, so you'll need to make sub +routine refs to to method calls. However, you cannot use sub refs on any +attributes or the following property elements: tableName. + +3) You no longer have the "customDrawMethod" element. You must make custom +form controls. + +4) You no longer have filters. Instead, each property has a method called +propertyName (so a property called 'title' would be title()). You can override +that to achieve the same result. You can see examples of this in Asset.pm, +look at the url and title properties. + +5) Because you don't have a reference to $session, you can't internationalize +right in the definition. So property elements like "label" and "hoverHelp" are +just i18n identifiers and will automatically be run through +internationalization on calling the getFormProperties() method. To specify an +i18n identifier, place the label and namespace in an arrayref, like this: + + label => ['i18n key', 'namespace'], + +6) Definition's are now rigid. This means that every property needs to be +defined in the definition, and it must at least have a "fieldType" element. If +the field is to be displayed (ie: it doesn't have a noFormPost=>1 element) +then it must also at minimum have label elements. In addition, you must +specify assetName, tableName, and properties defines at minimum. Anything less +is invalid. + +7) The properties attribute must be an array reference of properties. No more +Tie::IxHash. + +8) The autoGenerateForms has been removed. All edit forms are autogenerated in +WebGUI 8. + +9) You no longer have the "visible" element. It was a duplicate of +"noFormPost", so use "noFormPost" instead. + +10) You no longer have the "displayOnly" element. Make a custom form control +instead. + +11) Defaults for properties are set by the default key in the property. This +sets form defaults as well. This means that newly created Assets always have +sane defaults. Unless specifically overridden, any property can be set to +undef. This takes care of the long standing problem with sticky titles and +other fields. + +12) You no longer have the "allowEmpty" element. However, you can now specify +an initial value in the "value" element, and set "default" to undef if you +want to have an initial value but allow the field to become empty or undef. + +Here's an example. + +use WebGUI::Definition::Asset; +extends 'WebGUI::Asset'; +define assetName => 'Gadget'; +define tableName => 'gadget'; +define uiLevel => 5; +define icon => 'gadget.gif'; +property urlToJavascript => ( + fieldType => 'url', + label => ['URL to Javascript Class','Asset_Gadget'], + hoverHelp => ['URL to Javascript Class help','Asset_Gadget'], + ); +property foo => ( + fieldType => 'text', + noFormPost => 1, + ); +property bar => ( + fieldType => 'codearea', + uiLevel => 9, + label => ['Bar','Asset_Gadget'], + hoverHelp => ['Bar help','Asset_Gadget'], + builder => '_bar_builder', ##Set default using Moose's builder and lazy method + lazy => 1, + ); +sub _bar_builder { + my $self = shift; + return $self->callSomeMethod; +} +property baz => ( + fieldType => 'checkboxList', + label => ['Baz','Asset_Gadget'], + hoverHelp => ['Baz help','Asset_Gadget'], + default => 1, + options => \&_baz_options, ##method called when getFormProperties called, automatically lazy + ); +sub _baz_options { + my ($self, $property_meta_object, $property_name) = @_; + my $session = $self->session; + my $i18n = WebGUI::International->new($session, 'Asset_Gadget'); + tie my %options, 'Tie::IxHash'; + %options = ( + one => $i18n->get('one'), + two => $i18n->get('two'), + three => $i18n->get('three'), + ); + return \%options; +} + +Asset Instanciators +------------------- +Moose does not allow a dynamic class to be passed into ->new. Trying to +access an asset from the database like this: + + WebGUI::Asset->new($session, $assetId, 'WebGUI::Asset::Template'); + +will give you back an object with class WebGUI::Asset, with some of the data from the Template. + +You have two options to deal with this: + +1) Brute force method + +my $class = WebGUI::Asset->loadModule($asset_module_name); +my $asset = $class->new($session, $assetId); + +2) Use newById + +newById replaces the older, and longer, newByDynamicClass method. + +my $asset = WebGUI::Asset->newById($session, $assetId); + +->new itself will either lookup an asset in the database and return you an object, or build you +an object without storing the data into the database, depending on how it's called. + +WebGUI::Asset::SomeClass->new($session, $assetId, $revisionDate) will try to look up the requested object +of type SomeClass, populated with information from the database. + +WebGUI::Asset::SomeClass->new($propertyHashRef) will return you an object of type SomeClass populated +with the properties you have passed in. Missing properties will have default set from the definition. + +Asset & Moose +------------- +The update method for Asset's now comes from WebGUI::Definition::Role::Object. Since the Asset base +class does not have an update method, you cannot use Moose's "override" method modifier to add +behavior to it. You must use "around" instead. Note, in most cases, you should never need +to do this, because it is much more modular to use modifiers on individual asset properties. + +Exceptions +---------- +All Asset instanciators, new, newById, newByUrl, newPending, newByPropertyHashRef throw exceptions instead +of returning undef to indicate an error. You should wrap any call to an instanciator in an eval, and catch +any exceptions that are thrown and deal with them. + +my $asset = eval { WebGUI::Asset->newById($session, $assetId); }; +if (my $exception = Exception::Class->caught() ) { + ##Log or handle the exception. Exceptions can also be rethrown to be passed farther up the call chain. +} + +Removed Methods +--------------- +assetDbProperties - Simply instanciate the asset if you want it's properties. + +assetExists - Simply instanciate the asset if you want to know if it exists. + +getValue - Use get() or the individual property accessors instead. + +fixTitle - The title() method does what this used to do as the title is set. + +fixUrlFromParent - This functionality is built into fixUrl, so that all fixes happen and can't cause breakages. + +fixId - Never assign the asset anything other than a GUID. + +Asset API +---------- +->get will still work, but will be slightly slower since inside it calls the direct Moose accessor. Similarly, +getId is slightly slower than ->assetId. + +processPropertiesFromFormPost +----------------------------- +Absurdly long and non-descriptive name, changed to processEditForm + +Admin Controls +-------------------- +The admin controls are now added to the asset with javascript. This javascript +is located in www/extras/admin/toolbar.js + +Turn Admin On +-------------------- +There is no Turn Admin On. In order to maintain some backwards compatibility, +if you are a member of the Turn Admin On group, "Admin On" will be set when you +log in. + +www_add/www_edit +-------------------- +www_add is now its own page, it is no longer handled by www_edit. www_addSave +is also its own page, it is no longer handled by www_addSave. + +If you had previously overrode www_edit to provide a template, you must move +that code into an overridden getEditTemplate. See WebGUI::Asset::Event, +WebGUI::Asset::Post, WebGUI::Asset::Wobject::GalleryAlbum for examples. + +Lineage +-------------------- +Assets created for use during www_add do NOT have a lineage. Calling +getLineage on them will return assets from below the root asset, and not +the child. See WebGUI::Asset::Wobject::GalleryAlbum::getFileIds. + +WebGUI::Shop::Vendor +==================== +Object properties are no longer written to the database when an object is +created from scratch. The write method needs to be called. + +WebGUI::Shop::AddressBook +========================= +Since create is now really new, there is no way to create an address book for +an arbitrary userId. To work around this, update the address book with the +new userId after it has been created. + +WebGUI::Shop::PayDriver +======================= +getEditForm now returns a WebGUI::FormBuilder object + +WebGUI::Shop::ShipDriver +======================== +getEditForm now returns a WebGUI::FormBuilder object + +WebGUI::Shop::TaxDriver +======================= +getConfigurationScreen is now called getEditForm and should return a WebGUI::FormBuilder object + +WebGUI::Shop::Address +===================== +Object properties are no longer written to the database when an object is +created from scratch. The write method needs to be called. + +WebGUI::Shop::Transaction +========================= +Object properties are no longer written to the database when an object is +created from scratch. The write method needs to be called. + +WebGUI::Shop::TransactionItem +============================= +Object properties are no longer written to the database when an object is +created from scratch. The write method needs to be called. + +WebGUI::Shop::CartItem +============================= +Object properties are no longer written to the database when an object is +created from scratch. The write method needs to be called. + +Inventory adjust is also no longer done when an object is created from +scratch. You will need to call onAdjustQuantityInCart manually. + +WebGUI::URL +========================== +In WebGUI 8, URL handlers are now done as Plack middleware. See +WebGUI::Middleware::Snoop and WebGUI::Middleware::WGAccess for examples. + +WebGUI::Session::Var +========================== +WebGUI::Session::Var was removed, and all of its code merged into +WebGUI::Session. Any call that used to be made to $session->var should now go +directly to $session. + +WebGUI::Session::Http +========================== +getStatus and setStatus have been removed. To set or get the status of an HTTP response +generated by WebGUI, access the WebGUI::Response object in the session: + +OLD: $session->http->getStatus(); +NEW: $session->response->status(); + +OLD: $session->http->setStatus(200); +NEW: $session->response->status(200); + +getMimeType and setMimeType have been removed. To set or get the content type of an HTTP response +generated by WebGUI, access the WebGUI::Response object in the session: + +OLD: $session->http->getMimeType(); +NEW: $session->response->content_type(); + +OLD: $session->http->setMimeType('application/json'); +NEW: $session->response->content_type('application/json'); + +getFilename and setFilename have been removed. To set the filename that should be +uploaded to the user, access the WebGUI::Response object in the session. First, set +the header for the Content-Dispostion, then set the content type. + +OLD: $session->http->setFilename($filename); +NEW: $session->response->header( 'Content-Disposition' => qq{attachment; filename="}.$filename.'"'); + $session->response->content_type('application/octet-stream'); + +getRedirectLocation and setRedirectLocation have been removed. These methods were not +used outside of WebGUI::Session::Http, but were designed for object encapsulation +inside the object. If you need to directly set or access the redirect location, +use the location mutator in the WebGUI::Response object in the session. + +OLD: $session->http->setRedirectLocation($url); +NEW: $session->response->location($url); + +OLD: $session->http->getRedirectLocation(); +NEW: $session->response->location(); + +ifModifiedSince was moved from WebGUI::Session::Http to WebGUI::Session::Request. + +OLD: $session->http->ifModifiedSince; +NEW: $session->request->ifModifiedSince; + +WebGUI::Workflow::Activity +========================== +getEditForm now returns a WebGUI::FormBuilder object + +Show Performance Indicators +========================== +This setting is removed, as the Plack debug console shows this for us. + +WebGUI::Asset::Wobject::Survey +========================== +The surveyJSON method conflicted with the new Moose accessor. In WebGUI 8, +the old surveyJSON is called getSurveyJSON. diff --git a/docs/previousVersion.sql b/docs/previousVersion.sql deleted file mode 100644 index 6f790cd10..000000000 --- a/docs/previousVersion.sql +++ /dev/null @@ -1,2533 +0,0 @@ -SET @OLD_CHARACTER_SET_CLIENT = @@CHARACTER_SET_CLIENT; -SET @OLD_CHARACTER_SET_RESULTS = @@CHARACTER_SET_RESULTS; -SET @OLD_CHARACTER_SET_CONNECTION = @@CHARACTER_SET_CONNECTION; -SET @OLD_COLLATION_CONNECTION = @@COLLATION_CONNECTION; -SET @OLD_TIME_ZONE = @@TIME_ZONE; -SET @OLD_UNIQUE_CHECKS = @@UNIQUE_CHECKS; -SET @OLD_FOREIGN_KEY_CHECKS = @@FOREIGN_KEY_CHECKS; -SET @OLD_SQL_MODE = @@SQL_MODE; -SET @OLD_SQL_NOTES = @@SQL_NOTES; - -SET CHARACTER_SET_CLIENT = 'utf8'; -SET CHARACTER_SET_RESULTS = 'utf8'; -SET CHARACTER_SET_CONNECTION = 'utf8'; -SET TIME_ZONE = '+00:00'; -SET UNIQUE_CHECKS = 0; -SET FOREIGN_KEY_CHECKS = 0; -SET SQL_MODE = 'NO_AUTO_VALUE_ON_ZERO'; -SET SQL_NOTES = 0; -CREATE TABLE `AdSku` ( - `assetId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL, - `purchaseTemplate` char(22) binary NOT NULL, - `manageTemplate` char(22) binary NOT NULL, - `adSpace` char(22) binary NOT NULL, - `priority` int(11) DEFAULT '1', - `pricePerClick` float DEFAULT '0', - `pricePerImpression` float DEFAULT '0', - `clickDiscounts` char(22) DEFAULT NULL, - `impressionDiscounts` char(22) DEFAULT NULL, - `karma` int(11) DEFAULT NULL, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `Article` ( - `linkTitle` char(255) DEFAULT NULL, - `linkURL` text, - `assetId` char(22) binary NOT NULL, - `templateId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL DEFAULT '0', - `cacheTimeout` int(11) NOT NULL DEFAULT '3600', - `storageId` char(22) binary DEFAULT NULL, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `AssetReport` ( - `assetId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL, - `settings` mediumtext, - `templateId` char(22) binary DEFAULT NULL, - `paginateAfter` bigint(20) DEFAULT NULL, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `Calendar` ( - `assetId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL DEFAULT '0', - `defaultDate` enum('current','first','last') DEFAULT 'current', - `defaultView` enum('month','week','day','list') DEFAULT 'month', - `visitorCacheTimeout` int(11) unsigned DEFAULT NULL, - `templateIdMonth` char(22) binary DEFAULT 'CalendarMonth000000001', - `templateIdWeek` char(22) binary DEFAULT 'CalendarWeek0000000001', - `templateIdDay` char(22) binary DEFAULT 'CalendarDay00000000001', - `templateIdEvent` char(22) binary DEFAULT 'CalendarEvent000000001', - `templateIdEventEdit` char(22) binary DEFAULT 'CalendarEventEdit00001', - `templateIdSearch` char(22) binary DEFAULT 'CalendarSearch00000001', - `templateIdPrintMonth` char(22) binary DEFAULT 'CalendarPrintMonth0001', - `templateIdPrintWeek` char(22) binary DEFAULT 'CalendarPrintWeek00001', - `templateIdPrintDay` char(22) binary DEFAULT 'CalendarPrintDay000001', - `templateIdPrintEvent` char(22) binary DEFAULT 'CalendarPrintEvent0001', - `groupIdEventEdit` char(22) binary DEFAULT '3', - `groupIdSubscribed` char(22) binary DEFAULT NULL, - `subscriberNotifyOffset` int(11) DEFAULT NULL, - `sortEventsBy` enum('time','sequencenumber') DEFAULT 'time', - `listViewPageInterval` bigint(20) DEFAULT NULL, - `templateIdList` char(22) binary DEFAULT NULL, - `templateIdPrintList` char(22) binary DEFAULT NULL, - `icalInterval` bigint(20) DEFAULT NULL, - `workflowIdCommit` char(22) binary DEFAULT NULL, - `icalFeeds` longtext, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `Carousel` ( - `assetId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL, - `items` mediumtext, - `templateId` char(22) binary DEFAULT NULL, - `slideWidth` int(11) DEFAULT NULL, - `slideHeight` int(11) DEFAULT NULL, - `autoPlay` int(11) DEFAULT NULL, - `autoPlayInterval` int(11) DEFAULT NULL, - `richEditor` char(22) binary DEFAULT NULL, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `Collaboration` ( - `assetId` char(22) binary NOT NULL, - `postGroupId` char(22) binary NOT NULL DEFAULT '2', - `canStartThreadGroupId` char(22) binary NOT NULL DEFAULT '2', - `karmaPerPost` int(11) NOT NULL DEFAULT '0', - `collaborationTemplateId` char(22) binary NOT NULL, - `threadTemplateId` char(22) binary NOT NULL, - `postFormTemplateId` char(22) binary NOT NULL, - `searchTemplateId` char(22) binary NOT NULL, - `notificationTemplateId` char(22) binary NOT NULL, - `sortBy` char(35) NOT NULL DEFAULT 'assetData.revisionDate', - `sortOrder` char(4) NOT NULL DEFAULT 'desc', - `usePreview` int(11) NOT NULL DEFAULT '1', - `addEditStampToPosts` int(11) NOT NULL DEFAULT '0', - `editTimeout` int(11) NOT NULL DEFAULT '3600', - `attachmentsPerPost` int(11) NOT NULL DEFAULT '0', - `filterCode` char(30) NOT NULL DEFAULT 'javascript', - `useContentFilter` int(11) NOT NULL DEFAULT '1', - `threads` int(11) NOT NULL DEFAULT '0', - `views` int(11) NOT NULL DEFAULT '0', - `replies` int(11) NOT NULL DEFAULT '0', - `rating` int(11) NOT NULL DEFAULT '0', - `lastPostId` char(22) binary DEFAULT NULL, - `lastPostDate` bigint(20) DEFAULT NULL, - `archiveAfter` int(11) NOT NULL DEFAULT '31536000', - `postsPerPage` int(11) NOT NULL DEFAULT '10', - `threadsPerPage` int(11) NOT NULL DEFAULT '30', - `subscriptionGroupId` char(22) binary DEFAULT NULL, - `allowReplies` int(11) NOT NULL DEFAULT '0', - `displayLastReply` int(11) NOT NULL DEFAULT '0', - `richEditor` char(22) binary NOT NULL DEFAULT 'PBrichedit000000000002', - `karmaRatingMultiplier` int(11) NOT NULL DEFAULT '0', - `karmaSpentToRate` int(11) NOT NULL DEFAULT '0', - `revisionDate` bigint(20) NOT NULL DEFAULT '0', - `avatarsEnabled` int(11) NOT NULL DEFAULT '0', - `approvalWorkflow` char(22) binary NOT NULL DEFAULT 'pbworkflow000000000003', - `threadApprovalWorkflow` char(22) binary NOT NULL DEFAULT 'pbworkflow000000000003', - `defaultKarmaScale` int(11) NOT NULL DEFAULT '1', - `mailServer` char(255) DEFAULT NULL, - `mailAccount` char(255) DEFAULT NULL, - `mailPassword` char(255) DEFAULT NULL, - `mailAddress` char(255) DEFAULT NULL, - `mailPrefix` char(255) DEFAULT NULL, - `getMail` int(11) NOT NULL DEFAULT '0', - `getMailInterval` char(64) DEFAULT NULL, - `getMailCronId` char(22) binary DEFAULT NULL, - `visitorCacheTimeout` int(11) NOT NULL DEFAULT '3600', - `autoSubscribeToThread` int(11) NOT NULL DEFAULT '1', - `requireSubscriptionForEmailPosting` int(11) NOT NULL DEFAULT '1', - `thumbnailSize` int(11) NOT NULL DEFAULT '0', - `maxImageSize` int(11) NOT NULL DEFAULT '0', - `enablePostMetaData` int(11) NOT NULL DEFAULT '0', - `useCaptcha` int(11) NOT NULL DEFAULT '0', - `groupToEditPost` char(22) binary NOT NULL, - `archiveEnabled` int(1) DEFAULT '1', - `postReceivedTemplateId` char(22) binary DEFAULT 'default_post_received1', - `replyRichEditor` char(22) binary DEFAULT 'PBrichedit000000000002', - `replyFilterCode` char(30) binary DEFAULT 'javascript', - `unsubscribeTemplateId` char(22) NOT NULL, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `Dashboard` ( - `assetId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL DEFAULT '0', - `adminsGroupId` char(22) binary NOT NULL DEFAULT '4', - `usersGroupId` char(22) binary NOT NULL DEFAULT '2', - `templateId` char(22) binary NOT NULL DEFAULT 'DashboardViewTmpl00001', - `isInitialized` tinyint(3) unsigned NOT NULL DEFAULT '0', - `assetsToHide` text, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `Dashboard_dashlets` ( - `dashboardAssetId` char(22) binary NOT NULL DEFAULT '', - `dashletAssetId` char(22) binary NOT NULL DEFAULT '', - `isStatic` tinyint(1) DEFAULT NULL, - `isRequired` tinyint(1) DEFAULT NULL, - PRIMARY KEY (`dashboardAssetId`,`dashletAssetId`) -) TYPE=MyISAM; -CREATE TABLE `Dashboard_userPrefs` ( - `dashboardAssetId` char(22) binary NOT NULL DEFAULT '', - `dashletAssetId` char(22) binary NOT NULL DEFAULT '', - `userId` char(22) binary NOT NULL DEFAULT '', - `isMinimized` tinyint(1) DEFAULT NULL, - `properties` longtext, - PRIMARY KEY (`dashboardAssetId`,`dashletAssetId`,`userId`) -) TYPE=MyISAM; -CREATE TABLE `DataForm` ( - `acknowledgement` text, - `mailData` int(11) NOT NULL DEFAULT '1', - `emailTemplateId` char(22) binary NOT NULL, - `acknowlegementTemplateId` char(22) binary NOT NULL, - `listTemplateId` char(22) binary NOT NULL, - `assetId` char(22) binary NOT NULL, - `templateId` char(22) binary NOT NULL, - `defaultView` int(11) NOT NULL DEFAULT '0', - `revisionDate` bigint(20) NOT NULL DEFAULT '0', - `groupToViewEntries` char(22) binary NOT NULL DEFAULT '7', - `mailAttachments` int(11) DEFAULT '0', - `useCaptcha` int(1) DEFAULT '0', - `storeData` int(1) DEFAULT '1', - `fieldConfiguration` longtext, - `tabConfiguration` longtext, - `workflowIdAddEntry` char(22) binary DEFAULT NULL, - `htmlAreaRichEditor` char(22) binary DEFAULT '**Use_Default_Editor**', - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `DataForm_entry` ( - `DataForm_entryId` char(22) binary NOT NULL, - `userId` char(22) binary NOT NULL, - `username` char(255) DEFAULT NULL, - `ipAddress` char(255) DEFAULT NULL, - `assetId` char(22) binary NOT NULL, - `entryData` longtext, - `submissionDate` datetime DEFAULT NULL, - PRIMARY KEY (`DataForm_entryId`), - KEY `assetId` (`assetId`), - KEY `assetId_submissionDate` (`assetId`,`submissionDate`) -) TYPE=MyISAM; -CREATE TABLE `DataTable` ( - `assetId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL, - `data` longtext, - `templateId` char(22) binary DEFAULT NULL, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `EMSBadge` ( - `assetId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL, - `price` float NOT NULL DEFAULT '0', - `seatsAvailable` int(11) NOT NULL DEFAULT '100', - `relatedBadgeGroups` mediumtext, - `templateId` char(22) binary NOT NULL, - `earlyBirdPrice` float NOT NULL DEFAULT '0', - `earlyBirdPriceEndDate` bigint(20) DEFAULT NULL, - `preRegistrationPrice` float NOT NULL DEFAULT '0', - `preRegistrationPriceEndDate` bigint(20) DEFAULT NULL, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `EMSBadgeGroup` ( - `badgeGroupId` char(22) binary NOT NULL, - `emsAssetId` char(22) binary NOT NULL, - `name` char(100) DEFAULT NULL, - `ticketsPerBadge` int(11) DEFAULT NULL, - PRIMARY KEY (`badgeGroupId`) -) TYPE=MyISAM; -CREATE TABLE `EMSEventMetaField` ( - `fieldId` char(22) binary NOT NULL, - `assetId` char(22) binary DEFAULT NULL, - `label` char(100) DEFAULT NULL, - `dataType` char(20) DEFAULT NULL, - `visible` tinyint(4) DEFAULT '0', - `required` tinyint(4) DEFAULT '0', - `possibleValues` text, - `defaultValues` text, - `sequenceNumber` int(5) DEFAULT NULL, - `helpText` mediumtext, - PRIMARY KEY (`fieldId`) -) TYPE=MyISAM; -CREATE TABLE `EMSRegistrant` ( - `badgeId` char(22) binary NOT NULL, - `userId` char(22) binary DEFAULT NULL, - `badgeNumber` int(11) NOT NULL AUTO_INCREMENT, - `badgeAssetId` char(22) binary NOT NULL, - `emsAssetId` char(22) binary NOT NULL, - `name` char(35) NOT NULL, - `address1` char(35) DEFAULT NULL, - `address2` char(35) DEFAULT NULL, - `address3` char(35) DEFAULT NULL, - `city` char(35) DEFAULT NULL, - `state` char(35) DEFAULT NULL, - `zipcode` char(35) DEFAULT NULL, - `country` char(35) DEFAULT NULL, - `phoneNumber` char(35) DEFAULT NULL, - `organization` char(35) DEFAULT NULL, - `email` char(255) DEFAULT NULL, - `notes` mediumtext, - `purchaseComplete` tinyint(1) DEFAULT NULL, - `hasCheckedIn` tinyint(1) DEFAULT NULL, - `transactionItemId` char(22) binary DEFAULT NULL, - PRIMARY KEY (`badgeId`), - UNIQUE KEY `badgeNumber` (`badgeNumber`), - KEY `badgeAssetId_purchaseComplete` (`badgeAssetId`,`purchaseComplete`) -) TYPE=MyISAM; -CREATE TABLE `EMSRegistrantRibbon` ( - `badgeId` char(22) binary NOT NULL, - `ribbonAssetId` char(22) binary NOT NULL, - `transactionItemId` char(22) binary DEFAULT NULL, - PRIMARY KEY (`badgeId`,`ribbonAssetId`) -) TYPE=MyISAM; -CREATE TABLE `EMSRegistrantTicket` ( - `badgeId` char(22) binary NOT NULL, - `ticketAssetId` char(22) binary NOT NULL, - `purchaseComplete` tinyint(1) DEFAULT NULL, - `transactionItemId` char(22) binary DEFAULT NULL, - PRIMARY KEY (`badgeId`,`ticketAssetId`), - KEY `ticketAssetId_purchaseComplete` (`ticketAssetId`,`purchaseComplete`) -) TYPE=MyISAM; -CREATE TABLE `EMSRegistrantToken` ( - `badgeId` char(22) binary NOT NULL, - `tokenAssetId` char(22) binary NOT NULL, - `quantity` int(11) DEFAULT NULL, - `transactionItemIds` text, - PRIMARY KEY (`badgeId`,`tokenAssetId`) -) TYPE=MyISAM; -CREATE TABLE `EMSRibbon` ( - `assetId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL, - `percentageDiscount` float NOT NULL DEFAULT '10', - `price` float NOT NULL DEFAULT '0', - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `EMSSubmission` ( - `assetId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL, - `submissionId` int(11) NOT NULL, - `submissionStatus` char(30) DEFAULT NULL, - `ticketId` char(22) binary DEFAULT NULL, - `description` mediumtext, - `sku` char(35) DEFAULT NULL, - `vendorId` char(22) binary DEFAULT NULL, - `displayTitle` tinyint(1) DEFAULT NULL, - `shipsSeparately` tinyint(1) DEFAULT NULL, - `price` float DEFAULT NULL, - `seatsAvailable` int(11) DEFAULT NULL, - `startDate` datetime DEFAULT NULL, - `duration` float DEFAULT NULL, - `eventNumber` int(11) DEFAULT NULL, - `location` char(100) DEFAULT NULL, - `relatedBadgeGroups` mediumtext, - `relatedRibbons` mediumtext, - `eventMetaData` mediumtext, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `EMSSubmissionForm` ( - `assetId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL, - `canSubmitGroupId` char(22) binary DEFAULT NULL, - `daysBeforeCleanup` int(11) DEFAULT NULL, - `deleteCreatedItems` int(1) DEFAULT NULL, - `formDescription` text, - `submissionDeadline` date DEFAULT NULL, - `pastDeadlineMessage` text, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `EMSTicket` ( - `assetId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL, - `price` float NOT NULL DEFAULT '0', - `seatsAvailable` int(11) NOT NULL DEFAULT '100', - `startDate` datetime DEFAULT NULL, - `duration` float NOT NULL DEFAULT '1', - `eventNumber` int(11) DEFAULT NULL, - `location` char(100) DEFAULT NULL, - `relatedBadgeGroups` mediumtext, - `relatedRibbons` mediumtext, - `eventMetaData` mediumtext, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `EMSToken` ( - `assetId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL, - `price` float NOT NULL DEFAULT '0', - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `Event` ( - `assetId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL DEFAULT '0', - `feedId` char(22) binary DEFAULT NULL, - `feedUid` char(255) DEFAULT NULL, - `startDate` date DEFAULT NULL, - `endDate` date DEFAULT NULL, - `userDefined1` text, - `userDefined2` text, - `userDefined3` text, - `userDefined4` text, - `userDefined5` text, - `recurId` char(22) binary DEFAULT NULL, - `description` longtext, - `startTime` time DEFAULT NULL, - `endTime` time DEFAULT NULL, - `relatedLinks` longtext, - `location` char(255) DEFAULT NULL, - `storageId` char(22) binary NOT NULL, - `timeZone` char(255) DEFAULT 'America/Chicago', - `sequenceNumber` bigint(20) DEFAULT NULL, - `iCalSequenceNumber` int(11) DEFAULT NULL, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `EventManagementSystem` ( - `assetId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL, - `timezone` char(30) NOT NULL DEFAULT 'America/Chicago', - `templateId` char(22) binary NOT NULL DEFAULT '2rC4ErZ3c77OJzJm7O5s3w', - `badgeBuilderTemplateId` char(22) binary NOT NULL DEFAULT 'BMybD3cEnmXVk2wQ_qEsRQ', - `lookupRegistrantTemplateId` char(22) binary NOT NULL DEFAULT 'OOyMH33plAy6oCj_QWrxtg', - `printBadgeTemplateId` char(22) binary NOT NULL DEFAULT 'PsFn7dJt4wMwBa8hiE3hOA', - `printTicketTemplateId` char(22) binary NOT NULL DEFAULT 'yBwydfooiLvhEFawJb0VTQ', - `printRemainingTicketsTemplateId` char(22) NOT NULL DEFAULT 'hreA_bgxiTX-EzWCSZCZJw', - `badgeInstructions` mediumtext, - `ribbonInstructions` mediumtext, - `ticketInstructions` mediumtext, - `tokenInstructions` mediumtext, - `registrationStaffGroupId` char(22) binary NOT NULL, - `scheduleTemplateId` char(22) binary DEFAULT NULL, - `scheduleColumnsPerPage` int(11) DEFAULT NULL, - `eventSubmissionTemplateId` char(22) binary DEFAULT NULL, - `eventSubmissionQueueTemplateId` char(22) binary DEFAULT NULL, - `eventSubmissionMainTemplateId` char(22) binary DEFAULT NULL, - `eventSubmissionGroups` mediumtext, - `submittedLocationsList` mediumtext, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `Event_recur` ( - `recurId` char(22) binary NOT NULL, - `recurType` char(16) DEFAULT NULL, - `pattern` char(255) DEFAULT NULL, - `startDate` date DEFAULT NULL, - `endDate` char(10) DEFAULT NULL, - PRIMARY KEY (`recurId`) -) TYPE=MyISAM; -CREATE TABLE `Event_relatedlink` ( - `eventlinkId` char(22) binary NOT NULL, - `assetId` char(22) binary NOT NULL, - `linkURL` tinytext, - `linktext` char(80) DEFAULT NULL, - `groupIdView` char(22) binary NOT NULL, - `sequenceNumber` bigint(20) DEFAULT NULL -) TYPE=MyISAM; -CREATE TABLE `FileAsset` ( - `assetId` char(22) binary NOT NULL, - `storageId` char(22) binary NOT NULL, - `filename` char(255) NOT NULL, - `templateId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL DEFAULT '0', - `cacheTimeout` int(11) NOT NULL DEFAULT '3600', - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `FlatDiscount` ( - `assetId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL DEFAULT '0', - `templateId` char(22) binary NOT NULL DEFAULT '63ix2-hU0FchXGIWkG3tow', - `mustSpend` float NOT NULL DEFAULT '0', - `percentageDiscount` int(3) NOT NULL DEFAULT '0', - `priceDiscount` float NOT NULL DEFAULT '0', - `thankYouMessage` mediumtext, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `Folder` ( - `assetId` char(22) binary NOT NULL, - `templateId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL DEFAULT '0', - `visitorCacheTimeout` int(11) NOT NULL DEFAULT '3600', - `sortAlphabetically` int(11) NOT NULL DEFAULT '0', - `sortOrder` enum('ASC','DESC') DEFAULT 'ASC', - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `Fork` ( - `id` char(22) NOT NULL DEFAULT '', - `userId` char(22) DEFAULT NULL, - `groupId` char(22) DEFAULT NULL, - `status` longtext, - `error` text, - `startTime` bigint(20) DEFAULT NULL, - `endTime` bigint(20) DEFAULT NULL, - `finished` tinyint(1) DEFAULT '0', - `latch` tinyint(1) DEFAULT '0', - PRIMARY KEY (`id`) -) TYPE=MyISAM; -CREATE TABLE `Gallery` ( - `assetId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL, - `groupIdAddComment` char(22) binary DEFAULT NULL, - `groupIdAddFile` char(22) binary DEFAULT NULL, - `imageResolutions` text, - `imageViewSize` int(11) DEFAULT NULL, - `imageThumbnailSize` int(11) DEFAULT NULL, - `maxSpacePerUser` char(20) DEFAULT NULL, - `richEditIdComment` char(22) binary DEFAULT NULL, - `templateIdAddArchive` char(22) binary DEFAULT NULL, - `templateIdDeleteAlbum` char(22) binary DEFAULT NULL, - `templateIdDeleteFile` char(22) binary DEFAULT NULL, - `templateIdEditAlbum` char(22) binary DEFAULT NULL, - `templateIdEditFile` char(22) binary DEFAULT NULL, - `templateIdListAlbums` char(22) binary DEFAULT NULL, - `templateIdListAlbumsRss` char(22) binary DEFAULT NULL, - `templateIdListFilesForUser` char(22) binary DEFAULT NULL, - `templateIdListFilesForUserRss` char(22) binary DEFAULT NULL, - `templateIdMakeShortcut` char(22) binary DEFAULT NULL, - `templateIdSearch` char(22) binary DEFAULT NULL, - `templateIdViewSlideshow` char(22) binary DEFAULT NULL, - `templateIdViewThumbnails` char(22) binary DEFAULT NULL, - `templateIdViewAlbum` char(22) binary DEFAULT NULL, - `templateIdViewAlbumRss` char(22) binary DEFAULT NULL, - `templateIdViewFile` char(22) binary DEFAULT NULL, - `viewAlbumAssetId` char(22) binary DEFAULT NULL, - `viewDefault` enum('album','list') DEFAULT NULL, - `viewListOrderBy` char(40) DEFAULT NULL, - `viewListOrderDirection` enum('ASC','DESC') DEFAULT NULL, - `workflowIdCommit` char(22) binary DEFAULT NULL, - `templateIdEditComment` char(22) binary DEFAULT NULL, - `richEditIdAlbum` char(22) binary DEFAULT NULL, - `richEditIdFile` char(22) binary DEFAULT NULL, - `defaultFilesPerPage` int(11) DEFAULT NULL, - `imageDensity` int(11) DEFAULT NULL, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `GalleryAlbum` ( - `assetId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL, - `allowComments` int(11) DEFAULT NULL, - `assetIdThumbnail` char(22) binary DEFAULT NULL, - `userDefined1` text, - `userDefined2` text, - `userDefined3` text, - `userDefined4` text, - `userDefined5` text, - `othersCanAdd` int(11) DEFAULT NULL, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `GalleryFile` ( - `assetId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL, - `userDefined1` longtext, - `userDefined2` longtext, - `userDefined3` longtext, - `userDefined4` longtext, - `userDefined5` longtext, - `views` bigint(20) DEFAULT '0', - `friendsOnly` int(1) DEFAULT '0', - `rating` int(1) DEFAULT '0', - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `GalleryFile_comment` ( - `assetId` char(22) binary NOT NULL, - `commentId` char(22) binary NOT NULL, - `userId` char(22) binary DEFAULT NULL, - `visitorIp` char(255) DEFAULT NULL, - `creationDate` datetime DEFAULT NULL, - `bodyText` longtext, - PRIMARY KEY (`assetId`,`commentId`), - KEY `commentId` (`commentId`) -) TYPE=MyISAM; -CREATE TABLE `HttpProxy` ( - `proxiedUrl` text, - `timeout` int(11) DEFAULT NULL, - `removeStyle` int(11) DEFAULT NULL, - `filterHtml` char(30) DEFAULT NULL, - `followExternal` int(11) DEFAULT NULL, - `followRedirect` int(11) DEFAULT NULL, - `cacheHttp` int(11) DEFAULT '0', - `useCache` int(11) DEFAULT '0', - `debug` int(11) DEFAULT '0', - `rewriteUrls` int(11) DEFAULT NULL, - `searchFor` char(255) DEFAULT NULL, - `stopAt` char(255) DEFAULT NULL, - `cookieJarStorageId` char(22) binary NOT NULL, - `assetId` char(22) binary NOT NULL, - `templateId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL DEFAULT '0', - `cacheTimeout` int(11) NOT NULL DEFAULT '0', - `useAmpersand` int(11) NOT NULL DEFAULT '0', - `urlPatternFilter` mediumtext, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `ImageAsset` ( - `assetId` char(22) binary NOT NULL, - `thumbnailSize` int(11) NOT NULL DEFAULT '50', - `parameters` text, - `revisionDate` bigint(20) NOT NULL DEFAULT '0', - `annotations` mediumtext, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `InOutBoard` ( - `assetId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL DEFAULT '0', - `statusList` text, - `reportViewerGroup` char(22) binary NOT NULL DEFAULT '3', - `inOutGroup` char(22) binary NOT NULL DEFAULT '2', - `inOutTemplateId` char(22) binary NOT NULL DEFAULT 'IOB0000000000000000001', - `reportTemplateId` char(22) binary NOT NULL DEFAULT 'IOB0000000000000000002', - `paginateAfter` int(11) NOT NULL DEFAULT '50', - `reportPaginateAfter` int(11) NOT NULL DEFAULT '50', - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `InOutBoard_delegates` ( - `userId` char(22) binary NOT NULL, - `delegateUserId` char(22) binary NOT NULL, - `assetId` char(22) binary NOT NULL -) TYPE=MyISAM; -CREATE TABLE `InOutBoard_status` ( - `assetId` char(22) binary NOT NULL, - `userId` char(22) binary NOT NULL, - `status` char(255) DEFAULT NULL, - `dateStamp` int(11) NOT NULL, - `message` text -) TYPE=MyISAM; -CREATE TABLE `InOutBoard_statusLog` ( - `assetId` char(22) binary NOT NULL, - `userId` char(22) binary NOT NULL, - `status` char(255) DEFAULT NULL, - `dateStamp` int(11) NOT NULL, - `message` text, - `createdBy` char(22) binary DEFAULT NULL -) TYPE=MyISAM; -CREATE TABLE `Layout` ( - `assetId` char(22) binary NOT NULL, - `templateId` char(22) binary NOT NULL, - `contentPositions` text, - `assetsToHide` text, - `revisionDate` bigint(20) NOT NULL DEFAULT '0', - `assetOrder` char(20) DEFAULT 'asc', - `mobileTemplateId` char(22) binary DEFAULT 'PBtmpl0000000000000054', - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `Map` ( - `assetId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL, - `groupIdAddPoint` char(22) binary DEFAULT NULL, - `mapApiKey` text, - `mapHeight` char(12) DEFAULT NULL, - `mapWidth` char(12) DEFAULT NULL, - `startLatitude` float DEFAULT NULL, - `startLongitude` float DEFAULT NULL, - `startZoom` tinyint(3) unsigned DEFAULT NULL, - `templateIdEditPoint` char(22) binary DEFAULT NULL, - `templateIdView` char(22) binary DEFAULT NULL, - `templateIdViewPoint` char(22) binary DEFAULT NULL, - `workflowIdPoint` char(22) binary DEFAULT NULL, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `MapPoint` ( - `assetId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL, - `latitude` double DEFAULT NULL, - `longitude` double DEFAULT NULL, - `website` char(255) DEFAULT NULL, - `address1` char(255) DEFAULT NULL, - `address2` char(255) DEFAULT NULL, - `city` char(255) DEFAULT NULL, - `region` char(255) DEFAULT NULL, - `zipCode` char(255) DEFAULT NULL, - `country` char(255) DEFAULT NULL, - `phone` char(255) DEFAULT NULL, - `fax` char(255) DEFAULT NULL, - `email` char(255) DEFAULT NULL, - `storageIdPhoto` char(22) binary DEFAULT NULL, - `userDefined1` char(255) DEFAULT NULL, - `userDefined2` char(255) DEFAULT NULL, - `userDefined3` char(255) DEFAULT NULL, - `userDefined4` char(255) DEFAULT NULL, - `userDefined5` char(255) DEFAULT NULL, - `isGeocoded` tinyint(1) DEFAULT NULL, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `Matrix` ( - `detailTemplateId` char(22) binary DEFAULT NULL, - `compareTemplateId` char(22) binary DEFAULT NULL, - `searchTemplateId` char(22) binary DEFAULT NULL, - `categories` text, - `assetId` char(22) binary NOT NULL, - `templateId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL DEFAULT '0', - `maxComparisons` int(11) NOT NULL DEFAULT '10', - `maxComparisonsPrivileged` int(11) NOT NULL DEFAULT '10', - `defaultSort` char(22) binary NOT NULL DEFAULT 'score', - `compareColorNo` char(22) binary DEFAULT '#ffaaaa', - `compareColorLimited` char(22) binary NOT NULL DEFAULT '#ffffaa', - `compareColorCostsExtra` char(22) binary NOT NULL DEFAULT '#ffffaa', - `compareColorFreeAddOn` char(22) binary NOT NULL DEFAULT '#ffffaa', - `compareColorYes` char(22) binary NOT NULL DEFAULT '#aaffaa', - `submissionApprovalWorkflowId` char(22) binary NOT NULL, - `ratingsDuration` int(11) NOT NULL DEFAULT '7776000', - `editListingTemplateId` char(22) binary DEFAULT NULL, - `groupToAdd` char(22) binary DEFAULT '2', - `screenshotsConfigTemplateId` char(22) binary DEFAULT NULL, - `screenshotsTemplateId` char(22) binary DEFAULT NULL, - `statisticsCacheTimeout` int(11) NOT NULL DEFAULT '3600', - `maxScreenshotWidth` int(11) DEFAULT NULL, - `maxScreenshotHeight` int(11) DEFAULT NULL, - `listingsCacheTimeout` int(11) NOT NULL DEFAULT '3600', - `maxComparisonsGroup` char(22) binary DEFAULT NULL, - `maxComparisonsGroupInt` int(11) DEFAULT NULL, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `MatrixListing` ( - `assetId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL, - `screenshots` char(22) binary DEFAULT NULL, - `description` text, - `version` char(255) DEFAULT NULL, - `views` int(11) DEFAULT NULL, - `compares` int(11) DEFAULT NULL, - `clicks` int(11) DEFAULT NULL, - `viewsLastIp` char(255) DEFAULT NULL, - `comparesLastIp` char(255) DEFAULT NULL, - `clicksLastIp` char(255) DEFAULT NULL, - `lastUpdated` int(11) DEFAULT NULL, - `maintainer` char(22) binary DEFAULT NULL, - `manufacturerName` char(255) DEFAULT NULL, - `manufacturerURL` char(255) DEFAULT NULL, - `productURL` char(255) DEFAULT NULL, - `score` int(11) DEFAULT NULL, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `MatrixListing_attribute` ( - `matrixId` char(22) binary NOT NULL, - `matrixListingId` char(22) binary NOT NULL, - `attributeId` char(22) binary NOT NULL, - `value` char(255) DEFAULT NULL, - PRIMARY KEY (`attributeId`,`matrixListingId`) -) TYPE=MyISAM; -CREATE TABLE `MatrixListing_rating` ( - `timeStamp` int(11) NOT NULL DEFAULT '0', - `category` char(255) DEFAULT NULL, - `rating` int(11) NOT NULL DEFAULT '1', - `listingId` char(22) binary NOT NULL, - `ipAddress` char(15) DEFAULT NULL, - `assetId` char(22) binary NOT NULL, - `userId` char(22) binary DEFAULT NULL -) TYPE=MyISAM; -CREATE TABLE `MatrixListing_ratingSummary` ( - `listingId` char(22) binary NOT NULL, - `category` char(255) NOT NULL, - `meanValue` decimal(3,2) DEFAULT NULL, - `medianValue` int(11) DEFAULT NULL, - `countValue` int(11) DEFAULT NULL, - `assetId` char(22) binary NOT NULL, - PRIMARY KEY (`listingId`,`category`) -) TYPE=MyISAM; -CREATE TABLE `Matrix_attribute` ( - `attributeId` char(22) binary NOT NULL, - `category` char(255) NOT NULL, - `name` char(255) DEFAULT NULL, - `description` text, - `fieldType` char(255) NOT NULL DEFAULT 'MatrixCompare', - `defaultValue` char(255) DEFAULT NULL, - `assetId` char(22) binary NOT NULL, - `options` text, - PRIMARY KEY (`attributeId`), - KEY `categoryIndex` (`category`) -) TYPE=MyISAM; -CREATE TABLE `MessageBoard` ( - `assetId` char(22) binary NOT NULL, - `templateId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL DEFAULT '0', - `visitorCacheTimeout` int(11) NOT NULL DEFAULT '3600', - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `MultiSearch` ( - `assetId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL DEFAULT '0', - `templateId` char(22) binary NOT NULL DEFAULT 'MultiSearchTmpl0000001', - `predefinedSearches` text, - `cacheTimeout` int(11) NOT NULL DEFAULT '3600', - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `Navigation` ( - `assetId` char(22) binary NOT NULL, - `assetsToInclude` text, - `startType` char(35) DEFAULT NULL, - `startPoint` char(255) DEFAULT NULL, - `descendantEndPoint` int(11) NOT NULL DEFAULT '55', - `showSystemPages` int(11) NOT NULL DEFAULT '0', - `showHiddenPages` int(11) NOT NULL DEFAULT '0', - `showUnprivilegedPages` int(11) NOT NULL DEFAULT '0', - `templateId` char(22) binary NOT NULL, - `ancestorEndPoint` int(11) NOT NULL DEFAULT '55', - `revisionDate` bigint(20) NOT NULL DEFAULT '0', - `mimeType` char(50) DEFAULT 'text/html', - `reversePageLoop` tinyint(1) DEFAULT '0', - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `Newsletter` ( - `assetId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL, - `newsletterTemplateId` char(22) binary NOT NULL DEFAULT 'newsletter000000000001', - `mySubscriptionsTemplateId` char(22) binary NOT NULL DEFAULT 'newslettersubscrip0001', - `newsletterHeader` mediumtext, - `newsletterFooter` mediumtext, - `newsletterCategories` text, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `Newsletter_subscriptions` ( - `assetId` char(22) binary NOT NULL, - `userId` char(22) binary NOT NULL, - `subscriptions` text, - `lastTimeSent` bigint(20) NOT NULL DEFAULT '0', - PRIMARY KEY (`assetId`,`userId`), - KEY `lastTimeSent_assetId_userId` (`lastTimeSent`,`assetId`,`userId`) -) TYPE=MyISAM; -CREATE TABLE `PM_project` ( - `projectId` char(22) binary NOT NULL, - `assetId` char(22) binary DEFAULT NULL, - `name` char(255) NOT NULL, - `description` text, - `startDate` bigint(20) DEFAULT NULL, - `endDate` bigint(20) DEFAULT NULL, - `projectManager` char(22) binary DEFAULT NULL, - `durationUnits` enum('hours','days') DEFAULT 'hours', - `hoursPerDay` float DEFAULT NULL, - `targetBudget` float(15,2) DEFAULT '0.00', - `percentComplete` float NOT NULL DEFAULT '0', - `parentId` char(22) binary DEFAULT NULL, - `creationDate` bigint(20) NOT NULL, - `createdBy` char(22) binary NOT NULL, - `lastUpdatedBy` char(22) binary NOT NULL, - `lastUpdateDate` bigint(20) NOT NULL, - `projectObserver` char(22) binary DEFAULT '7', - PRIMARY KEY (`projectId`) -) TYPE=MyISAM; -CREATE TABLE `PM_task` ( - `taskId` char(22) binary NOT NULL, - `projectId` char(22) binary NOT NULL, - `taskName` char(255) NOT NULL, - `duration` float DEFAULT NULL, - `startDate` bigint(20) DEFAULT NULL, - `endDate` bigint(20) DEFAULT NULL, - `dependants` char(50) DEFAULT NULL, - `parentId` char(22) binary DEFAULT NULL, - `percentComplete` float DEFAULT NULL, - `sequenceNumber` int(11) NOT NULL DEFAULT '1', - `creationDate` bigint(20) NOT NULL, - `createdBy` char(22) binary NOT NULL, - `lastUpdatedBy` char(22) binary NOT NULL, - `lastUpdateDate` bigint(20) NOT NULL, - `lagTime` bigint(20) DEFAULT '0', - `taskType` enum('timed','progressive','milestone') NOT NULL DEFAULT 'timed', - PRIMARY KEY (`taskId`) -) TYPE=MyISAM; -CREATE TABLE `PM_taskResource` ( - `taskResourceId` char(22) binary NOT NULL, - `taskId` char(22) binary NOT NULL, - `sequenceNumber` int(11) NOT NULL, - `resourceKind` enum('user','group') NOT NULL, - `resourceId` char(22) binary NOT NULL, - PRIMARY KEY (`taskResourceId`), - UNIQUE KEY `taskId` (`taskId`,`resourceKind`,`resourceId`), - UNIQUE KEY `taskId_2` (`taskId`,`sequenceNumber`) -) TYPE=MyISAM; -CREATE TABLE `PM_wobject` ( - `assetId` char(22) binary NOT NULL, - `projectDashboardTemplateId` char(22) binary NOT NULL DEFAULT 'ProjectManagerTMPL0001', - `projectDisplayTemplateId` char(22) binary NOT NULL DEFAULT 'ProjectManagerTMPL0002', - `ganttChartTemplateId` char(22) binary NOT NULL DEFAULT 'ProjectManagerTMPL0003', - `editTaskTemplateId` char(22) binary NOT NULL DEFAULT 'ProjectManagerTMPL0004', - `groupToAdd` char(22) binary NOT NULL DEFAULT '3', - `revisionDate` bigint(20) NOT NULL, - `resourcePopupTemplateId` char(22) binary NOT NULL DEFAULT 'ProjectManagerTMPL0005', - `resourceListTemplateId` char(22) binary NOT NULL DEFAULT 'ProjectManagerTMPL0006', - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `Photo` ( - `assetId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL, - `exifData` longtext, - `location` char(255) DEFAULT NULL, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `Photo_rating` ( - `assetId` char(22) binary NOT NULL, - `userId` char(22) binary DEFAULT NULL, - `visitorIp` char(255) DEFAULT NULL, - `rating` int(11) DEFAULT NULL, - KEY `assetId` (`assetId`) -) TYPE=MyISAM; -CREATE TABLE `Poll` ( - `active` int(11) NOT NULL DEFAULT '1', - `graphWidth` int(11) NOT NULL DEFAULT '150', - `voteGroup` char(22) binary DEFAULT NULL, - `question` char(255) DEFAULT NULL, - `a1` char(255) DEFAULT NULL, - `a2` char(255) DEFAULT NULL, - `a3` char(255) DEFAULT NULL, - `a4` char(255) DEFAULT NULL, - `a5` char(255) DEFAULT NULL, - `a6` char(255) DEFAULT NULL, - `a7` char(255) DEFAULT NULL, - `a8` char(255) DEFAULT NULL, - `a9` char(255) DEFAULT NULL, - `a10` char(255) DEFAULT NULL, - `a11` char(255) DEFAULT NULL, - `a12` char(255) DEFAULT NULL, - `a13` char(255) DEFAULT NULL, - `a14` char(255) DEFAULT NULL, - `a15` char(255) DEFAULT NULL, - `a16` char(255) DEFAULT NULL, - `a17` char(255) DEFAULT NULL, - `a18` char(255) DEFAULT NULL, - `a19` char(255) DEFAULT NULL, - `a20` char(255) DEFAULT NULL, - `karmaPerVote` int(11) NOT NULL DEFAULT '0', - `randomizeAnswers` int(11) NOT NULL DEFAULT '0', - `assetId` char(22) binary NOT NULL, - `templateId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL DEFAULT '0', - `graphConfiguration` blob, - `generateGraph` tinyint(1) DEFAULT NULL, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `Poll_answer` ( - `answer` char(3) DEFAULT NULL, - `userId` char(22) binary NOT NULL, - `ipAddress` char(50) DEFAULT NULL, - `assetId` char(22) binary NOT NULL -) TYPE=MyISAM; -CREATE TABLE `Post` ( - `assetId` char(22) binary NOT NULL, - `threadId` char(22) binary NOT NULL, - `username` char(30) DEFAULT NULL, - `content` mediumtext, - `views` int(11) NOT NULL DEFAULT '0', - `contentType` char(35) NOT NULL DEFAULT 'mixed', - `userDefined1` text, - `userDefined2` text, - `userDefined3` text, - `userDefined4` text, - `userDefined5` text, - `storageId` char(22) binary NOT NULL, - `rating` int(11) NOT NULL DEFAULT '0', - `revisionDate` bigint(20) NOT NULL DEFAULT '0', - `originalEmail` mediumtext, - PRIMARY KEY (`assetId`,`revisionDate`), - KEY `threadId_rating` (`threadId`,`rating`) -) TYPE=MyISAM; -CREATE TABLE `Post_rating` ( - `assetId` char(22) binary NOT NULL, - `userId` char(22) binary NOT NULL, - `ipAddress` char(15) NOT NULL, - `dateOfRating` bigint(20) DEFAULT NULL, - `rating` int(11) NOT NULL DEFAULT '0', - KEY `assetId_userId` (`assetId`,`userId`), - KEY `assetId_ipAddress` (`assetId`,`ipAddress`) -) TYPE=MyISAM; -CREATE TABLE `Product` ( - `image1` char(255) DEFAULT NULL, - `image2` char(255) DEFAULT NULL, - `image3` char(255) DEFAULT NULL, - `brochure` char(255) DEFAULT NULL, - `manual` char(255) DEFAULT NULL, - `warranty` char(255) DEFAULT NULL, - `assetId` char(22) binary NOT NULL, - `templateId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL DEFAULT '0', - `cacheTimeout` int(11) NOT NULL DEFAULT '3600', - `thankYouMessage` mediumtext, - `accessoryJSON` longtext, - `benefitJSON` longtext, - `featureJSON` longtext, - `relatedJSON` longtext, - `specificationJSON` longtext, - `variantsJSON` longtext, - `isShippingRequired` int(11) DEFAULT NULL, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `RichEdit` ( - `assetId` char(22) binary NOT NULL, - `askAboutRichEdit` int(11) NOT NULL DEFAULT '0', - `preformatted` int(11) NOT NULL DEFAULT '0', - `editorWidth` int(11) NOT NULL DEFAULT '0', - `editorHeight` int(11) NOT NULL DEFAULT '0', - `sourceEditorWidth` int(11) NOT NULL DEFAULT '0', - `sourceEditorHeight` int(11) NOT NULL DEFAULT '0', - `useBr` int(11) NOT NULL DEFAULT '0', - `nowrap` int(11) NOT NULL DEFAULT '0', - `removeLineBreaks` int(11) NOT NULL DEFAULT '0', - `npwrap` int(11) NOT NULL DEFAULT '0', - `directionality` char(3) NOT NULL DEFAULT 'ltr', - `toolbarLocation` char(6) NOT NULL DEFAULT 'bottom', - `cssFile` char(255) DEFAULT NULL, - `validElements` mediumtext, - `toolbarRow1` text, - `toolbarRow2` text, - `toolbarRow3` text, - `enableContextMenu` int(11) NOT NULL DEFAULT '0', - `revisionDate` bigint(20) NOT NULL DEFAULT '0', - `disableRichEditor` int(11) DEFAULT '0', - `inlinePopups` int(11) NOT NULL DEFAULT '0', - `allowMedia` int(11) DEFAULT NULL, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `SQLReport` ( - `dbQuery1` text, - `paginateAfter` int(11) NOT NULL DEFAULT '50', - `preprocessMacros1` int(11) DEFAULT '0', - `debugMode` int(11) NOT NULL DEFAULT '0', - `databaseLinkId1` char(22) binary NOT NULL, - `placeholderParams1` text, - `preprocessMacros2` int(11) DEFAULT '0', - `dbQuery2` text, - `placeholderParams2` text, - `databaseLinkId2` char(22) binary NOT NULL, - `preprocessMacros3` int(11) DEFAULT '0', - `dbQuery3` text, - `placeholderParams3` text, - `databaseLinkId3` char(22) binary NOT NULL, - `preprocessMacros4` int(11) DEFAULT '0', - `dbQuery4` text, - `placeholderParams4` text, - `databaseLinkId4` char(22) binary NOT NULL, - `preprocessMacros5` int(11) DEFAULT '0', - `dbQuery5` text, - `placeholderParams5` text, - `databaseLinkId5` char(22) binary NOT NULL, - `assetId` char(22) binary NOT NULL, - `templateId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL DEFAULT '0', - `cacheTimeout` int(11) NOT NULL DEFAULT '0', - `prequeryStatements1` text, - `prequeryStatements2` text, - `prequeryStatements3` text, - `prequeryStatements4` text, - `prequeryStatements5` text, - `downloadType` char(255) DEFAULT NULL, - `downloadFilename` char(255) DEFAULT NULL, - `downloadTemplateId` char(22) binary DEFAULT NULL, - `downloadMimeType` char(255) DEFAULT NULL, - `downloadUserGroup` char(22) binary DEFAULT NULL, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `Shelf` ( - `assetId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL DEFAULT '0', - `templateId` char(22) binary NOT NULL DEFAULT 'nFen0xjkZn8WkpM93C9ceQ', - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `Shortcut` ( - `overrideTitle` int(11) NOT NULL DEFAULT '0', - `overrideDescription` int(11) NOT NULL DEFAULT '0', - `overrideTemplate` int(11) NOT NULL DEFAULT '0', - `overrideDisplayTitle` int(11) NOT NULL DEFAULT '0', - `overrideTemplateId` char(22) binary NOT NULL, - `shortcutByCriteria` int(11) NOT NULL DEFAULT '0', - `resolveMultiples` char(30) DEFAULT 'mostRecent', - `shortcutCriteria` text NOT NULL, - `assetId` char(22) binary NOT NULL, - `templateId` char(22) binary NOT NULL, - `shortcutToAssetId` char(22) binary NOT NULL, - `disableContentLock` int(11) NOT NULL DEFAULT '0', - `revisionDate` bigint(20) NOT NULL DEFAULT '0', - `prefFieldsToShow` text, - `prefFieldsToImport` text, - `showReloadIcon` tinyint(3) unsigned NOT NULL DEFAULT '0', - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `Shortcut_overrides` ( - `assetId` char(22) binary NOT NULL, - `fieldName` char(255) NOT NULL, - `newValue` text, - PRIMARY KEY (`assetId`,`fieldName`) -) TYPE=MyISAM; -CREATE TABLE `StockData` ( - `assetId` char(22) binary NOT NULL, - `templateId` char(22) binary NOT NULL DEFAULT 'StockListTMPL000000001', - `displayTemplateId` char(22) binary NOT NULL DEFAULT 'StockListTMPL000000002', - `defaultStocks` text, - `source` char(50) DEFAULT 'usa', - `failover` int(11) DEFAULT '1', - `revisionDate` bigint(20) NOT NULL DEFAULT '0', - `cacheTimeout` bigint(20) DEFAULT NULL, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `Story` ( - `assetId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL, - `headline` char(255) DEFAULT NULL, - `subtitle` char(255) DEFAULT NULL, - `byline` char(255) DEFAULT NULL, - `location` char(255) DEFAULT NULL, - `highlights` text, - `story` mediumtext, - `photo` longtext, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `StoryArchive` ( - `assetId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL, - `storiesPerPage` int(11) DEFAULT NULL, - `groupToPost` char(22) binary DEFAULT NULL, - `templateId` char(22) binary DEFAULT NULL, - `storyTemplateId` char(22) binary DEFAULT NULL, - `editStoryTemplateId` char(22) binary DEFAULT NULL, - `keywordListTemplateId` char(22) binary DEFAULT NULL, - `archiveAfter` int(11) DEFAULT NULL, - `richEditorId` char(22) binary DEFAULT NULL, - `approvalWorkflowId` char(22) binary DEFAULT 'pbworkflow000000000003', - `photoWidth` int(11) DEFAULT NULL, - `storySortOrder` char(22) DEFAULT NULL, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `StoryTopic` ( - `assetId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL, - `storiesPer` int(11) DEFAULT NULL, - `storiesShort` int(11) DEFAULT NULL, - `templateId` char(22) binary DEFAULT NULL, - `storyTemplateId` char(22) binary DEFAULT NULL, - `storySortOrder` char(22) DEFAULT NULL, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `Subscription` ( - `assetId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL, - `templateId` char(22) binary NOT NULL, - `thankYouMessage` mediumtext, - `price` float NOT NULL DEFAULT '0', - `subscriptionGroup` char(22) binary NOT NULL DEFAULT '2', - `duration` char(12) NOT NULL DEFAULT 'Monthly', - `executeOnSubscription` char(255) DEFAULT NULL, - `karma` int(6) DEFAULT '0', - `recurringSubscription` tinyint(1) NOT NULL DEFAULT '1', - `redeemSubscriptionCodeTemplateId` char(22) binary NOT NULL, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `Subscription_code` ( - `code` char(64) NOT NULL, - `batchId` char(22) binary NOT NULL, - `status` char(10) NOT NULL DEFAULT 'Unused', - `dateUsed` bigint(20) DEFAULT NULL, - `usedBy` char(22) binary DEFAULT NULL, - PRIMARY KEY (`code`) -) TYPE=MyISAM; -CREATE TABLE `Subscription_codeBatch` ( - `batchId` char(22) binary NOT NULL, - `name` char(255) DEFAULT NULL, - `description` mediumtext, - `subscriptionId` char(22) binary NOT NULL, - `expirationDate` bigint(20) NOT NULL, - `dateCreated` bigint(20) NOT NULL, - PRIMARY KEY (`batchId`) -) TYPE=MyISAM; -CREATE TABLE `Survey` ( - `groupToTakeSurvey` char(22) binary NOT NULL DEFAULT '2', - `groupToEditSurvey` char(22) binary NOT NULL DEFAULT '3', - `groupToViewReports` char(22) binary NOT NULL DEFAULT '3', - `overviewTemplateId` char(22) binary NOT NULL, - `maxResponsesPerUser` int(11) NOT NULL DEFAULT '1', - `gradebookTemplateId` char(22) binary NOT NULL, - `assetId` char(22) binary NOT NULL, - `templateId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL DEFAULT '0', - `surveyEditTemplateId` char(22) binary DEFAULT NULL, - `answerEditTemplateId` char(22) binary DEFAULT NULL, - `questionEditTemplateId` char(22) binary DEFAULT NULL, - `sectionEditTemplateId` char(22) binary DEFAULT NULL, - `surveyTakeTemplateId` char(22) binary DEFAULT NULL, - `surveyQuestionsId` char(22) binary DEFAULT NULL, - `exitURL` text, - `surveyJSON` longtext, - `timeLimit` mediumint(8) unsigned NOT NULL, - `showProgress` tinyint(3) unsigned NOT NULL DEFAULT '0', - `showTimeLimit` tinyint(3) unsigned NOT NULL DEFAULT '0', - `doAfterTimeLimit` char(22) binary DEFAULT NULL, - `onSurveyEndWorkflowId` char(22) binary DEFAULT NULL, - `quizModeSummary` tinyint(3) DEFAULT NULL, - `surveySummaryTemplateId` char(22) binary DEFAULT NULL, - `allowBackBtn` tinyint(3) DEFAULT NULL, - `feedbackTemplateId` char(22) binary DEFAULT NULL, - `testResultsTemplateId` char(22) binary DEFAULT NULL, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `Survey_questionTypes` ( - `questionType` char(56) NOT NULL, - `answers` text NOT NULL, - PRIMARY KEY (`questionType`) -) TYPE=MyISAM; -CREATE TABLE `Survey_response` ( - `assetId` char(22) binary NOT NULL, - `Survey_responseId` char(22) binary NOT NULL, - `userId` char(22) binary DEFAULT NULL, - `username` char(255) DEFAULT NULL, - `ipAddress` char(15) DEFAULT NULL, - `startDate` bigint(20) NOT NULL DEFAULT '0', - `endDate` bigint(20) NOT NULL DEFAULT '0', - `isComplete` int(11) NOT NULL DEFAULT '0', - `anonId` char(255) DEFAULT NULL, - `responseJSON` longtext, - `revisionDate` bigint(20) NOT NULL DEFAULT '0', - PRIMARY KEY (`Survey_responseId`) -) TYPE=MyISAM; -CREATE TABLE `Survey_tempReport` ( - `assetId` char(22) binary NOT NULL, - `Survey_responseId` char(22) binary NOT NULL, - `order` smallint(5) unsigned NOT NULL, - `sectionNumber` smallint(5) unsigned NOT NULL, - `sectionName` text, - `questionNumber` smallint(5) unsigned NOT NULL, - `questionName` text, - `questionComment` mediumtext, - `answerNumber` smallint(5) unsigned DEFAULT NULL, - `answerValue` mediumtext, - `answerComment` mediumtext, - `entryDate` bigint(20) unsigned NOT NULL COMMENT 'UTC Unix Time', - `isCorrect` tinyint(3) unsigned DEFAULT NULL, - `value` int(11) DEFAULT NULL, - `fileStoreageId` char(22) binary DEFAULT NULL, - PRIMARY KEY (`assetId`,`Survey_responseId`,`order`), - KEY `assetId` (`assetId`) -) TYPE=MyISAM; -CREATE TABLE `Survey_test` ( - `testId` char(22) binary NOT NULL, - `sequenceNumber` int(11) NOT NULL DEFAULT '1', - `dateCreated` datetime DEFAULT NULL, - `lastUpdated` datetime DEFAULT NULL, - `assetId` char(255) DEFAULT NULL, - `name` char(255) DEFAULT NULL, - `test` mediumtext NOT NULL, - PRIMARY KEY (`testId`), - KEY `assetId` (`assetId`) -) TYPE=MyISAM; -CREATE TABLE `SyndicatedContent` ( - `rssUrl` text, - `maxHeadlines` int(11) NOT NULL DEFAULT '0', - `assetId` char(22) binary NOT NULL, - `templateId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL DEFAULT '0', - `hasTerms` char(255) NOT NULL, - `cacheTimeout` int(11) NOT NULL DEFAULT '3600', - `processMacroInRssUrl` int(11) DEFAULT '0', - `sortItems` char(255) DEFAULT NULL, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `TT_projectList` ( - `projectId` char(22) binary NOT NULL, - `assetId` char(22) binary DEFAULT NULL, - `projectName` char(255) NOT NULL, - `creationDate` bigint(20) NOT NULL, - `createdBy` char(22) binary NOT NULL, - `lastUpdatedBy` char(22) binary NOT NULL, - `lastUpdateDate` bigint(20) NOT NULL, - PRIMARY KEY (`projectId`) -) TYPE=MyISAM; -CREATE TABLE `TT_projectResourceList` ( - `projectId` char(22) binary NOT NULL, - `resourceId` char(22) binary NOT NULL, - PRIMARY KEY (`projectId`,`resourceId`) -) TYPE=MyISAM; -CREATE TABLE `TT_projectTasks` ( - `taskId` char(22) binary NOT NULL, - `projectId` char(22) binary NOT NULL, - `taskName` char(255) NOT NULL, - PRIMARY KEY (`taskId`) -) TYPE=MyISAM; -CREATE TABLE `TT_report` ( - `reportId` char(22) binary NOT NULL, - `assetId` char(22) binary NOT NULL, - `startDate` char(10) NOT NULL, - `endDate` char(10) NOT NULL, - `reportComplete` int(11) NOT NULL DEFAULT '0', - `resourceId` char(22) binary NOT NULL, - `creationDate` bigint(20) NOT NULL, - `createdBy` char(22) binary NOT NULL, - `lastUpdatedBy` char(22) binary NOT NULL, - `lastUpdateDate` bigint(20) NOT NULL -) TYPE=MyISAM; -CREATE TABLE `TT_timeEntry` ( - `entryId` char(22) binary NOT NULL, - `projectId` char(22) binary NOT NULL, - `taskId` char(22) binary NOT NULL, - `taskDate` char(10) NOT NULL, - `hours` float DEFAULT '0', - `comments` text, - `reportId` char(22) binary NOT NULL, - PRIMARY KEY (`entryId`) -) TYPE=MyISAM; -CREATE TABLE `TT_wobject` ( - `assetId` char(22) binary NOT NULL, - `userViewTemplateId` char(22) binary NOT NULL DEFAULT 'TimeTrackingTMPL000001', - `managerViewTemplateId` char(22) binary NOT NULL DEFAULT 'TimeTrackingTMPL000002', - `timeRowTemplateId` char(22) binary NOT NULL DEFAULT 'TimeTrackingTMPL000003', - `pmAssetId` char(22) binary DEFAULT NULL, - `groupToManage` char(22) binary NOT NULL DEFAULT '3', - `revisionDate` bigint(20) NOT NULL, - `pmIntegration` int(11) NOT NULL DEFAULT '0', - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `Thingy` ( - `assetId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL, - `templateId` char(22) binary NOT NULL, - `defaultThingId` char(22) binary DEFAULT NULL, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `ThingyRecord` ( - `assetId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL, - `templateIdView` char(22) binary DEFAULT NULL, - `thingId` char(22) binary DEFAULT NULL, - `thingFields` longtext, - `thankYouText` longtext, - `price` float DEFAULT NULL, - `duration` bigint(20) DEFAULT NULL, - `fieldPrice` longtext, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `ThingyRecord_record` ( - `recordId` char(22) binary NOT NULL, - `sequenceNumber` int(11) NOT NULL DEFAULT '1', - `dateCreated` datetime DEFAULT NULL, - `lastUpdated` datetime DEFAULT NULL, - `transactionId` char(255) DEFAULT NULL, - `assetId` char(255) DEFAULT NULL, - `expires` bigint(20) NOT NULL DEFAULT '0', - `userId` char(255) DEFAULT NULL, - `fields` longtext, - `isHidden` tinyint(1) NOT NULL DEFAULT '0', - `sentExpiresNotice` tinyint(1) NOT NULL DEFAULT '0', - PRIMARY KEY (`recordId`) -) TYPE=MyISAM; -CREATE TABLE `Thingy_fields` ( - `assetId` char(22) binary NOT NULL, - `thingId` char(22) binary NOT NULL, - `fieldId` char(22) binary NOT NULL, - `sequenceNumber` int(11) NOT NULL, - `dateCreated` bigint(20) NOT NULL, - `createdBy` char(22) binary NOT NULL, - `dateUpdated` bigint(20) NOT NULL, - `updatedBy` char(22) binary NOT NULL, - `label` char(255) NOT NULL, - `fieldType` char(255) NOT NULL, - `defaultValue` longtext, - `possibleValues` text, - `subtext` char(255) DEFAULT NULL, - `status` char(255) NOT NULL, - `width` int(11) DEFAULT NULL, - `height` int(11) DEFAULT NULL, - `vertical` smallint(1) DEFAULT NULL, - `extras` char(255) DEFAULT NULL, - `display` int(11) DEFAULT NULL, - `viewScreenTitle` int(11) DEFAULT NULL, - `displayInSearch` int(11) DEFAULT NULL, - `searchIn` int(11) DEFAULT NULL, - `fieldInOtherThingId` char(22) binary DEFAULT NULL, - `size` int(11) DEFAULT NULL, - `pretext` char(255) DEFAULT NULL, - `isUnique` int(1) DEFAULT '0', - PRIMARY KEY (`fieldId`,`thingId`,`assetId`) -) TYPE=MyISAM; -CREATE TABLE `Thingy_things` ( - `assetId` char(22) binary NOT NULL, - `thingId` char(22) binary NOT NULL, - `label` char(255) NOT NULL, - `editScreenTitle` char(255) NOT NULL, - `editInstructions` text, - `groupIdAdd` char(22) binary NOT NULL, - `groupIdEdit` char(22) binary NOT NULL, - `saveButtonLabel` char(255) NOT NULL, - `afterSave` char(255) NOT NULL, - `editTemplateId` char(22) binary NOT NULL, - `onAddWorkflowId` char(22) binary DEFAULT NULL, - `onEditWorkflowId` char(22) binary DEFAULT NULL, - `onDeleteWorkflowId` char(22) binary DEFAULT NULL, - `groupIdView` char(22) binary NOT NULL, - `viewTemplateId` char(22) binary NOT NULL, - `defaultView` char(255) NOT NULL, - `searchScreenTitle` char(255) NOT NULL, - `searchDescription` text, - `groupIdSearch` char(22) binary NOT NULL, - `groupIdImport` char(22) binary NOT NULL, - `groupIdExport` char(22) binary NOT NULL, - `searchTemplateId` char(22) binary NOT NULL, - `thingsPerPage` int(11) NOT NULL DEFAULT '25', - `sortBy` char(22) binary DEFAULT NULL, - `display` int(11) DEFAULT NULL, - `exportMetaData` int(11) DEFAULT NULL, - `maxEntriesPerUser` int(11) DEFAULT NULL, - `maxEntriesTotal` int(11) DEFAULT NULL, - PRIMARY KEY (`thingId`) -) TYPE=MyISAM; -CREATE TABLE `Thread` ( - `assetId` char(22) binary NOT NULL, - `replies` int(11) NOT NULL DEFAULT '0', - `lastPostId` char(22) binary NOT NULL, - `lastPostDate` bigint(20) DEFAULT NULL, - `isLocked` int(11) NOT NULL DEFAULT '0', - `isSticky` int(11) NOT NULL DEFAULT '0', - `subscriptionGroupId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL DEFAULT '0', - `karma` int(11) NOT NULL DEFAULT '0', - `karmaScale` int(11) NOT NULL DEFAULT '1', - `karmaRank` float(11,6) DEFAULT NULL, - `threadRating` int(11) DEFAULT '0', - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `Thread_read` ( - `threadId` char(22) binary NOT NULL, - `userId` char(22) binary NOT NULL, - KEY `threadId_userId` (`threadId`,`userId`) -) TYPE=MyISAM; -CREATE TABLE `UserList` ( - `assetId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL DEFAULT '0', - `templateId` char(22) binary DEFAULT NULL, - `showGroupId` char(22) binary DEFAULT NULL, - `hideGroupId` char(22) binary DEFAULT NULL, - `usersPerPage` int(11) DEFAULT NULL, - `alphabet` text, - `alphabetSearchField` char(128) DEFAULT NULL, - `showOnlyVisibleAsNamed` int(11) DEFAULT NULL, - `sortBy` char(128) DEFAULT NULL, - `sortOrder` char(4) DEFAULT NULL, - `overridePublicEmail` int(11) DEFAULT NULL, - `overridePublicProfile` int(11) DEFAULT NULL, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `WeatherData` ( - `assetId` char(22) binary NOT NULL, - `revisionDate` bigint(20) unsigned NOT NULL DEFAULT '0', - `templateId` char(22) binary NOT NULL DEFAULT 'WeatherDataTmpl0000001', - `locations` text, - `partnerId` char(100) DEFAULT NULL, - `licenseKey` char(100) DEFAULT NULL, - `cacheTimeout` bigint(20) DEFAULT NULL, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `WikiMaster` ( - `assetId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL, - `groupToEditPages` char(22) binary NOT NULL DEFAULT '2', - `groupToAdminister` char(22) binary NOT NULL DEFAULT '3', - `richEditor` char(22) binary NOT NULL DEFAULT 'PBrichedit000000000002', - `frontPageTemplateId` char(22) binary NOT NULL DEFAULT 'WikiFrontTmpl000000001', - `pageTemplateId` char(22) binary NOT NULL DEFAULT 'WikiPageTmpl0000000001', - `pageEditTemplateId` char(22) binary NOT NULL DEFAULT 'WikiPageEditTmpl000001', - `recentChangesTemplateId` char(22) binary NOT NULL DEFAULT 'WikiRCTmpl000000000001', - `mostPopularTemplateId` char(22) binary NOT NULL DEFAULT 'WikiMPTmpl000000000001', - `pageHistoryTemplateId` char(22) binary NOT NULL DEFAULT 'WikiPHTmpl000000000001', - `searchTemplateId` char(22) binary NOT NULL DEFAULT 'WikiSearchTmpl00000001', - `recentChangesCount` int(11) NOT NULL DEFAULT '50', - `recentChangesCountFront` int(11) NOT NULL DEFAULT '10', - `mostPopularCount` int(11) NOT NULL DEFAULT '50', - `mostPopularCountFront` int(11) NOT NULL DEFAULT '10', - `thumbnailSize` int(11) NOT NULL DEFAULT '0', - `maxImageSize` int(11) NOT NULL DEFAULT '0', - `approvalWorkflow` char(22) binary NOT NULL DEFAULT 'pbworkflow000000000003', - `useContentFilter` int(11) DEFAULT '0', - `filterCode` char(30) DEFAULT 'javascript', - `byKeywordTemplateId` char(22) binary NOT NULL DEFAULT 'WikiKeyword00000000001', - `allowAttachments` int(11) NOT NULL DEFAULT '0', - `topLevelKeywords` longtext, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `WikiMasterKeywords` ( - `assetId` char(22) binary NOT NULL, - `keyword` char(64) NOT NULL, - `subKeyword` char(64) NOT NULL DEFAULT '', - PRIMARY KEY (`assetId`,`keyword`,`subKeyword`), - KEY `assetId` (`assetId`), - KEY `keyword` (`keyword`), - KEY `subKeyword` (`subKeyword`) -) TYPE=MyISAM; -CREATE TABLE `WikiPage` ( - `assetId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL, - `content` mediumtext, - `views` bigint(20) NOT NULL DEFAULT '0', - `isProtected` int(11) NOT NULL DEFAULT '0', - `actionTaken` char(35) NOT NULL, - `actionTakenBy` char(22) binary NOT NULL, - `isFeatured` int(1) DEFAULT NULL, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `Workflow` ( - `workflowId` char(22) binary NOT NULL, - `title` char(255) NOT NULL DEFAULT 'Untitled', - `description` text, - `enabled` int(11) NOT NULL DEFAULT '0', - `type` char(255) NOT NULL DEFAULT 'None', - `mode` char(20) NOT NULL DEFAULT 'parallel', - PRIMARY KEY (`workflowId`) -) TYPE=MyISAM; -CREATE TABLE `WorkflowActivity` ( - `activityId` char(22) binary NOT NULL, - `workflowId` char(22) binary NOT NULL, - `title` char(255) NOT NULL DEFAULT 'Untitled', - `description` text, - `sequenceNumber` int(11) NOT NULL DEFAULT '1', - `className` char(255) DEFAULT NULL, - PRIMARY KEY (`activityId`) -) TYPE=MyISAM; -CREATE TABLE `WorkflowActivityData` ( - `activityId` char(22) binary NOT NULL, - `name` char(255) NOT NULL, - `value` text, - PRIMARY KEY (`activityId`,`name`) -) TYPE=MyISAM; -CREATE TABLE `WorkflowInstance` ( - `instanceId` char(22) binary NOT NULL, - `workflowId` char(22) binary NOT NULL, - `currentActivityId` char(22) binary NOT NULL, - `priority` int(11) NOT NULL DEFAULT '2', - `className` char(255) DEFAULT NULL, - `methodName` char(255) DEFAULT NULL, - `parameters` longtext, - `runningSince` bigint(20) DEFAULT NULL, - `lastUpdate` bigint(20) DEFAULT NULL, - `lastStatus` char(15) DEFAULT NULL, - `noSession` tinyint(1) NOT NULL DEFAULT '0', - PRIMARY KEY (`instanceId`) -) TYPE=MyISAM; -CREATE TABLE `WorkflowInstanceScratch` ( - `instanceId` char(22) binary NOT NULL, - `name` char(255) NOT NULL, - `value` text, - PRIMARY KEY (`instanceId`,`name`) -) TYPE=MyISAM; -CREATE TABLE `WorkflowSchedule` ( - `taskId` char(22) binary NOT NULL, - `title` char(255) NOT NULL DEFAULT 'Untitled', - `enabled` int(11) NOT NULL DEFAULT '0', - `runOnce` int(11) NOT NULL DEFAULT '0', - `minuteOfHour` char(255) NOT NULL DEFAULT '0', - `hourOfDay` char(255) NOT NULL DEFAULT '*', - `dayOfMonth` char(255) NOT NULL DEFAULT '*', - `monthOfYear` char(255) NOT NULL DEFAULT '*', - `dayOfWeek` char(255) NOT NULL DEFAULT '*', - `workflowId` char(22) binary NOT NULL, - `className` char(255) DEFAULT NULL, - `methodName` char(255) DEFAULT NULL, - `priority` int(11) NOT NULL DEFAULT '2', - `parameters` longtext, - PRIMARY KEY (`taskId`) -) TYPE=MyISAM; -CREATE TABLE `ZipArchiveAsset` ( - `assetId` char(22) binary NOT NULL, - `templateId` char(22) binary NOT NULL, - `showPage` char(255) NOT NULL DEFAULT 'index.html', - `revisionDate` bigint(20) NOT NULL, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `adSkuPurchase` ( - `adSkuPurchaseId` char(22) binary NOT NULL, - `sequenceNumber` int(11) NOT NULL DEFAULT '1', - `dateCreated` datetime DEFAULT NULL, - `lastUpdated` datetime DEFAULT NULL, - `isDeleted` tinyint(1) NOT NULL DEFAULT '0', - `clicksPurchased` bigint(20) DEFAULT NULL, - `dateOfPurchase` bigint(20) DEFAULT NULL, - `impressionsPurchased` bigint(20) DEFAULT NULL, - `transactionItemId` char(22) binary DEFAULT NULL, - `userId` char(22) binary DEFAULT NULL, - `adId` char(22) binary DEFAULT NULL, - `storedImage` char(22) binary DEFAULT NULL, - PRIMARY KEY (`adSkuPurchaseId`) -) TYPE=MyISAM; -CREATE TABLE `adSpace` ( - `adSpaceId` char(22) binary NOT NULL, - `name` char(35) NOT NULL, - `title` char(255) NOT NULL, - `description` text, - `minimumImpressions` int(11) NOT NULL DEFAULT '1000', - `minimumClicks` int(11) NOT NULL DEFAULT '1000', - `width` int(11) NOT NULL DEFAULT '468', - `height` int(11) NOT NULL DEFAULT '60', - PRIMARY KEY (`adSpaceId`), - UNIQUE KEY `name` (`name`) -) TYPE=MyISAM; -CREATE TABLE `address` ( - `addressId` char(22) binary NOT NULL, - `addressBookId` char(22) binary NOT NULL, - `label` char(35) DEFAULT NULL, - `firstName` char(35) DEFAULT NULL, - `lastName` char(35) DEFAULT NULL, - `address1` char(35) DEFAULT NULL, - `address2` char(35) DEFAULT NULL, - `address3` char(35) DEFAULT NULL, - `city` char(35) DEFAULT NULL, - `state` char(35) DEFAULT NULL, - `country` char(35) DEFAULT NULL, - `code` char(35) DEFAULT NULL, - `phoneNumber` char(35) DEFAULT NULL, - `organization` char(255) DEFAULT NULL, - `email` char(255) DEFAULT NULL, - `isProfile` tinyint(4) DEFAULT '0', - PRIMARY KEY (`addressId`), - KEY `addressBookId_addressId` (`addressBookId`,`addressId`) -) TYPE=MyISAM; -CREATE TABLE `addressBook` ( - `addressBookId` char(22) binary NOT NULL, - `userId` char(22) binary DEFAULT NULL, - `defaultAddressId` char(22) binary DEFAULT NULL, - PRIMARY KEY (`addressBookId`) -) TYPE=MyISAM; -CREATE TABLE `advertisement` ( - `adId` char(22) binary NOT NULL, - `adSpaceId` char(22) binary NOT NULL, - `ownerUserId` char(22) binary NOT NULL, - `isActive` int(11) NOT NULL DEFAULT '0', - `title` char(255) NOT NULL, - `type` char(15) NOT NULL DEFAULT 'text', - `storageId` char(22) binary DEFAULT NULL, - `adText` char(255) DEFAULT NULL, - `url` text, - `richMedia` text, - `borderColor` char(7) NOT NULL DEFAULT '#000000', - `textColor` char(7) NOT NULL DEFAULT '#000000', - `backgroundColor` char(7) NOT NULL DEFAULT '#ffffff', - `clicks` int(11) NOT NULL DEFAULT '0', - `clicksBought` int(11) NOT NULL DEFAULT '0', - `impressions` int(11) NOT NULL DEFAULT '0', - `impressionsBought` int(11) NOT NULL DEFAULT '0', - `priority` int(11) NOT NULL DEFAULT '0', - `nextInPriority` bigint(20) NOT NULL DEFAULT '0', - `renderedAd` text, - PRIMARY KEY (`adId`), - KEY `adSpaceId_isActive` (`adSpaceId`,`isActive`) -) TYPE=MyISAM; -CREATE TABLE `analyticRule` ( - `ruleId` char(22) binary NOT NULL, - `sequenceNumber` int(11) NOT NULL DEFAULT '1', - `dateCreated` datetime DEFAULT NULL, - `lastUpdated` datetime DEFAULT NULL, - `bucketName` char(255) DEFAULT NULL, - `regexp` char(255) NOT NULL DEFAULT '.+', - PRIMARY KEY (`ruleId`) -) TYPE=MyISAM; -CREATE TABLE `asset` ( - `assetId` char(22) binary NOT NULL, - `parentId` char(22) binary NOT NULL, - `lineage` char(255) NOT NULL, - `state` char(35) NOT NULL, - `className` char(255) NOT NULL, - `creationDate` bigint(20) NOT NULL DEFAULT '997995720', - `createdBy` char(22) binary NOT NULL DEFAULT '3', - `stateChanged` char(22) binary NOT NULL DEFAULT '997995720', - `stateChangedBy` char(22) binary NOT NULL DEFAULT '3', - `isLockedBy` char(22) binary DEFAULT NULL, - `isSystem` int(11) NOT NULL DEFAULT '0', - `lastExportedAs` char(255) DEFAULT NULL, - PRIMARY KEY (`assetId`), - UNIQUE KEY `lineage` (`lineage`), - KEY `parentId` (`parentId`), - KEY `state_parentId_lineage` (`state`,`parentId`,`lineage`), - KEY `isPrototype_className_assetId` (`className`,`assetId`), - KEY `className_assetId_state` (`className`,`assetId`,`state`), - KEY `state_lineage` (`state`,`lineage`) -) TYPE=MyISAM; -CREATE TABLE `assetAspectComments` ( - `assetId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL, - `comments` longtext, - `averageCommentRating` int(11) DEFAULT NULL, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `assetAspectRssFeed` ( - `assetId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL, - `itemsPerFeed` int(11) DEFAULT '25', - `feedCopyright` text, - `feedTitle` text, - `feedDescription` mediumtext, - `feedImage` char(22) binary DEFAULT NULL, - `feedImageLink` text, - `feedImageDescription` mediumtext, - `feedHeaderLinks` char(32) DEFAULT 'rss\natom', - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `assetAspect_Subscribable` ( - `assetId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL, - `subscriptionGroupId` char(22) binary DEFAULT NULL, - `subscriptionTemplateId` char(22) binary DEFAULT NULL, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `assetData` ( - `assetId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL DEFAULT '0', - `revisedBy` char(22) binary NOT NULL, - `tagId` char(22) binary NOT NULL, - `status` char(35) NOT NULL DEFAULT 'pending', - `title` char(255) NOT NULL DEFAULT 'untitled', - `menuTitle` char(255) NOT NULL DEFAULT 'untitled', - `url` char(255) NOT NULL, - `ownerUserId` char(22) binary NOT NULL, - `groupIdView` char(22) binary NOT NULL, - `groupIdEdit` char(22) binary NOT NULL, - `synopsis` text, - `newWindow` int(11) NOT NULL DEFAULT '0', - `isHidden` int(11) NOT NULL DEFAULT '0', - `isPackage` int(11) NOT NULL DEFAULT '0', - `isPrototype` int(11) NOT NULL DEFAULT '0', - `encryptPage` int(11) NOT NULL DEFAULT '0', - `assetSize` int(11) NOT NULL DEFAULT '0', - `extraHeadTags` text, - `skipNotification` int(11) NOT NULL DEFAULT '0', - `isExportable` int(11) NOT NULL DEFAULT '1', - `inheritUrlFromParent` int(11) NOT NULL DEFAULT '0', - `lastModified` bigint(20) DEFAULT NULL, - `extraHeadTagsPacked` longtext, - `usePackedHeadTags` int(1) DEFAULT NULL, - PRIMARY KEY (`assetId`,`revisionDate`), - KEY `assetId_url` (`assetId`,`url`), - KEY `assetId_revisionDate_status_tagId` (`assetId`,`revisionDate`,`status`,`tagId`), - KEY `url` (`url`), - KEY `assetId_status_tagId_revisionDate` (`assetId`,`status`,`tagId`,`revisionDate`), - KEY `assetId_status` (`assetId`,`status`) -) TYPE=MyISAM; -CREATE TABLE `assetHistory` ( - `assetId` char(22) binary NOT NULL, - `userId` char(22) binary NOT NULL, - `dateStamp` bigint(20) NOT NULL DEFAULT '0', - `actionTaken` char(255) NOT NULL, - `url` char(255) DEFAULT NULL -) TYPE=MyISAM; -CREATE TABLE `assetIndex` ( - `assetId` char(22) binary NOT NULL, - `title` char(255) DEFAULT NULL, - `synopsis` text, - `url` char(255) NOT NULL DEFAULT '', - `creationDate` bigint(20) DEFAULT NULL, - `revisionDate` bigint(20) DEFAULT NULL, - `ownerUserId` char(22) binary DEFAULT NULL, - `groupIdView` char(22) binary DEFAULT NULL, - `groupIdEdit` char(22) binary DEFAULT NULL, - `className` char(255) DEFAULT NULL, - `isPublic` int(11) NOT NULL DEFAULT '1', - `keywords` mediumtext, - `lineage` char(255) DEFAULT NULL, - `subId` char(255) binary DEFAULT NULL, - PRIMARY KEY (`assetId`,`url`), - FULLTEXT KEY `keywords` (`keywords`) -) TYPE=MyISAM; -CREATE TABLE `assetKeyword` ( - `keyword` char(64) NOT NULL, - `assetId` char(22) binary NOT NULL, - PRIMARY KEY (`keyword`,`assetId`), - KEY `keyword` (`keyword`), - KEY `assetId` (`assetId`) -) TYPE=MyISAM; -CREATE TABLE `assetVersionTag` ( - `tagId` char(22) binary NOT NULL, - `name` char(255) NOT NULL, - `isCommitted` int(11) NOT NULL DEFAULT '0', - `creationDate` bigint(20) NOT NULL DEFAULT '0', - `createdBy` char(22) binary NOT NULL, - `commitDate` bigint(20) NOT NULL DEFAULT '0', - `committedBy` char(22) binary NOT NULL, - `isLocked` int(11) NOT NULL DEFAULT '0', - `lockedBy` char(22) binary NOT NULL, - `groupToUse` char(22) binary NOT NULL, - `workflowId` char(22) binary NOT NULL, - `workflowInstanceId` char(22) binary DEFAULT NULL, - `comments` text, - `startTime` datetime DEFAULT NULL, - `endTime` datetime DEFAULT NULL, - `isSiteWide` tinyint(1) NOT NULL DEFAULT '0', - PRIMARY KEY (`tagId`) -) TYPE=MyISAM; -CREATE TABLE `authentication` ( - `userId` char(22) binary NOT NULL, - `authMethod` char(30) NOT NULL, - `fieldName` char(128) NOT NULL, - `fieldData` text, - PRIMARY KEY (`userId`,`authMethod`,`fieldName`) -) TYPE=MyISAM; -CREATE TABLE `bucketLog` ( - `userId` char(22) binary NOT NULL, - `Bucket` char(22) binary NOT NULL, - `duration` int(11) DEFAULT NULL, - `timeStamp` datetime DEFAULT NULL -) TYPE=MyISAM; -CREATE TABLE `cache` ( - `namespace` char(128) NOT NULL, - `cachekey` char(128) NOT NULL, - `expires` bigint(20) NOT NULL, - `size` int(11) NOT NULL, - `content` mediumblob, - PRIMARY KEY (`namespace`,`cachekey`), - KEY `namespace_cachekey_size` (`namespace`,`cachekey`,`expires`) -) TYPE=MyISAM; -CREATE TABLE `cart` ( - `cartId` char(22) binary NOT NULL, - `sessionId` char(22) binary NOT NULL, - `shippingAddressId` char(22) binary DEFAULT NULL, - `shipperId` char(22) binary DEFAULT NULL, - `posUserId` char(22) binary DEFAULT NULL, - `creationDate` int(20) DEFAULT NULL, - `billingAddressId` char(22) DEFAULT NULL, - `gatewayId` char(22) DEFAULT NULL, - PRIMARY KEY (`cartId`), - KEY `sessionId` (`sessionId`) -) TYPE=MyISAM; -CREATE TABLE `cartItem` ( - `itemId` char(22) binary NOT NULL, - `cartId` char(22) binary NOT NULL, - `assetId` char(22) binary NOT NULL, - `dateAdded` datetime NOT NULL, - `options` longtext, - `configuredTitle` char(255) DEFAULT NULL, - `shippingAddressId` char(22) binary DEFAULT NULL, - `quantity` int(11) NOT NULL DEFAULT '1', - PRIMARY KEY (`itemId`), - KEY `cartId_assetId_dateAdded` (`cartId`,`assetId`,`dateAdded`) -) TYPE=MyISAM; -CREATE TABLE `databaseLink` ( - `databaseLinkId` char(22) binary NOT NULL, - `title` char(255) DEFAULT NULL, - `DSN` char(255) DEFAULT NULL, - `username` char(255) DEFAULT NULL, - `identifier` char(255) DEFAULT NULL, - `allowedKeywords` text, - `allowMacroAccess` int(11) NOT NULL DEFAULT '0', - `additionalParameters` char(255) NOT NULL, - PRIMARY KEY (`databaseLinkId`) -) TYPE=MyISAM; -CREATE TABLE `deltaLog` ( - `userId` char(22) binary NOT NULL, - `assetId` char(22) binary NOT NULL, - `delta` int(11) DEFAULT NULL, - `timeStamp` bigint(20) DEFAULT NULL, - `url` char(255) NOT NULL -) TYPE=MyISAM; -CREATE TABLE `donation` ( - `assetId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL, - `defaultPrice` float NOT NULL DEFAULT '100', - `thankYouMessage` mediumtext, - `templateId` char(22) binary NOT NULL, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `filePumpBundle` ( - `bundleId` char(22) binary NOT NULL, - `sequenceNumber` int(11) NOT NULL DEFAULT '1', - `dateCreated` datetime DEFAULT NULL, - `lastUpdated` datetime DEFAULT NULL, - `bundleName` char(255) NOT NULL DEFAULT 'New bundle', - `lastModified` bigint(20) NOT NULL DEFAULT '0', - `lastBuild` bigint(20) NOT NULL DEFAULT '0', - `jsFiles` longtext NOT NULL, - `cssFiles` longtext NOT NULL, - `otherFiles` longtext NOT NULL, - PRIMARY KEY (`bundleId`) -) TYPE=MyISAM; -CREATE TABLE `friendInvitations` ( - `inviteId` char(22) binary NOT NULL, - `inviterId` char(22) binary NOT NULL, - `friendId` char(22) binary NOT NULL, - `dateSent` datetime NOT NULL, - `comments` char(255) NOT NULL, - `messageId` char(22) binary NOT NULL, - PRIMARY KEY (`inviteId`) -) TYPE=MyISAM; -CREATE TABLE `groupGroupings` ( - `groupId` char(22) binary NOT NULL, - `inGroup` char(22) binary NOT NULL, - PRIMARY KEY (`groupId`,`inGroup`), - KEY `inGroup` (`inGroup`) -) TYPE=MyISAM; -CREATE TABLE `groupings` ( - `groupId` char(22) binary NOT NULL, - `userId` char(22) binary NOT NULL, - `expireDate` bigint(20) NOT NULL DEFAULT '2114402400', - `groupAdmin` int(11) NOT NULL DEFAULT '0', - PRIMARY KEY (`groupId`,`userId`), - KEY `userId` (`userId`) -) TYPE=MyISAM; -CREATE TABLE `groups` ( - `groupId` char(22) binary NOT NULL, - `groupName` char(100) DEFAULT NULL, - `description` char(255) DEFAULT NULL, - `expireOffset` int(11) NOT NULL DEFAULT '314496000', - `karmaThreshold` int(11) NOT NULL DEFAULT '1000000000', - `ipFilter` text, - `dateCreated` int(11) NOT NULL DEFAULT '997938000', - `lastUpdated` int(11) NOT NULL DEFAULT '997938000', - `deleteOffset` int(11) NOT NULL DEFAULT '14', - `expireNotifyOffset` int(11) NOT NULL DEFAULT '-14', - `expireNotifyMessage` text, - `expireNotify` int(11) NOT NULL DEFAULT '0', - `scratchFilter` text, - `autoAdd` int(11) NOT NULL DEFAULT '0', - `autoDelete` int(11) NOT NULL DEFAULT '0', - `databaseLinkId` char(22) binary NOT NULL, - `groupCacheTimeout` int(11) NOT NULL DEFAULT '3600', - `dbQuery` text, - `isEditable` int(11) NOT NULL DEFAULT '1', - `showInForms` int(11) NOT NULL DEFAULT '1', - `ldapGroup` char(255) DEFAULT NULL, - `ldapGroupProperty` char(255) DEFAULT NULL, - `ldapRecursiveProperty` char(255) DEFAULT NULL, - `ldapLinkId` char(22) binary DEFAULT NULL, - `ldapRecursiveFilter` mediumtext, - `isAdHocMailGroup` tinyint(4) NOT NULL DEFAULT '0', - PRIMARY KEY (`groupId`), - KEY `groupName` (`groupName`) -) TYPE=MyISAM; -CREATE TABLE `imageColor` ( - `colorId` char(22) binary NOT NULL, - `name` char(255) NOT NULL DEFAULT 'untitled', - `fillTriplet` char(7) NOT NULL DEFAULT '#000000', - `fillAlpha` char(2) NOT NULL DEFAULT '00', - `strokeTriplet` char(7) NOT NULL DEFAULT '#000000', - `strokeAlpha` char(2) NOT NULL DEFAULT '00', - PRIMARY KEY (`colorId`) -) TYPE=MyISAM; -CREATE TABLE `imageFont` ( - `fontId` char(22) binary NOT NULL, - `name` char(255) DEFAULT NULL, - `storageId` char(22) binary DEFAULT NULL, - `filename` char(255) DEFAULT NULL, - PRIMARY KEY (`fontId`) -) TYPE=MyISAM; -CREATE TABLE `imagePalette` ( - `paletteId` char(22) binary NOT NULL, - `name` char(255) NOT NULL DEFAULT 'untitled', - PRIMARY KEY (`paletteId`) -) TYPE=MyISAM; -CREATE TABLE `imagePaletteColors` ( - `paletteId` char(22) binary NOT NULL, - `colorId` char(22) binary NOT NULL, - `paletteOrder` int(11) NOT NULL, - PRIMARY KEY (`paletteId`,`paletteOrder`) -) TYPE=MyISAM; -CREATE TABLE `inbox` ( - `messageId` char(22) binary NOT NULL, - `status` char(15) NOT NULL DEFAULT 'pending', - `dateStamp` bigint(20) NOT NULL, - `completedOn` bigint(20) DEFAULT NULL, - `completedBy` char(22) binary DEFAULT NULL, - `userId` char(22) binary DEFAULT NULL, - `groupId` char(22) binary DEFAULT NULL, - `subject` char(255) NOT NULL DEFAULT 'No Subject', - `message` mediumtext, - `sentBy` char(22) binary NOT NULL DEFAULT '3', - PRIMARY KEY (`messageId`), - KEY `completedOn_dateStamp` (`completedOn`,`dateStamp`), - KEY `pb_userId` (`userId`), - KEY `pb_groupId` (`groupId`) -) TYPE=MyISAM; -CREATE TABLE `inbox_messageState` ( - `messageId` char(22) binary NOT NULL, - `userId` char(22) binary NOT NULL, - `isRead` tinyint(4) NOT NULL DEFAULT '0', - `repliedTo` tinyint(4) NOT NULL DEFAULT '0', - `deleted` tinyint(4) NOT NULL DEFAULT '0', - PRIMARY KEY (`messageId`,`userId`), - KEY `userId_deleted_isRead` (`userId`,`deleted`,`isRead`) -) TYPE=MyISAM; -CREATE TABLE `incrementer` ( - `incrementerId` char(50) NOT NULL, - `nextValue` int(11) NOT NULL DEFAULT '1', - PRIMARY KEY (`incrementerId`) -) TYPE=MyISAM; -CREATE TABLE `karmaLog` ( - `userId` char(22) binary NOT NULL, - `amount` int(11) NOT NULL DEFAULT '1', - `source` char(255) DEFAULT NULL, - `description` text, - `dateModified` bigint(20) NOT NULL DEFAULT '0' -) TYPE=MyISAM; -CREATE TABLE `ldapLink` ( - `ldapLinkId` char(22) binary NOT NULL, - `ldapLinkName` char(255) NOT NULL, - `ldapUrl` char(255) NOT NULL, - `connectDn` char(255) NOT NULL, - `identifier` char(255) NOT NULL, - `ldapUserRDN` char(255) DEFAULT NULL, - `ldapIdentity` char(255) DEFAULT NULL, - `ldapIdentityName` char(255) DEFAULT NULL, - `ldapPasswordName` char(255) DEFAULT NULL, - `ldapSendWelcomeMessage` char(2) DEFAULT NULL, - `ldapWelcomeMessage` text, - `ldapAccountTemplate` char(22) binary NOT NULL, - `ldapCreateAccountTemplate` char(22) binary NOT NULL, - `ldapLoginTemplate` char(22) binary NOT NULL, - `ldapGlobalRecursiveFilter` mediumtext, - `ldapDeactivateAccountTemplate` char(22) NOT NULL, - PRIMARY KEY (`ldapLinkId`) -) TYPE=MyISAM; -CREATE TABLE `mailQueue` ( - `messageId` char(22) binary NOT NULL, - `message` mediumtext, - `toGroup` char(22) binary DEFAULT NULL, - `isInbox` tinyint(4) DEFAULT '0', - PRIMARY KEY (`messageId`) -) TYPE=MyISAM; -CREATE TABLE `metaData_classes` ( - `className` char(255) DEFAULT NULL, - `fieldId` char(22) DEFAULT NULL -) TYPE=MyISAM; -CREATE TABLE `metaData_properties` ( - `fieldId` char(22) binary NOT NULL, - `fieldName` char(100) NOT NULL, - `description` mediumtext NOT NULL, - `fieldType` char(30) DEFAULT NULL, - `possibleValues` text, - `defaultValue` char(255) DEFAULT NULL, - PRIMARY KEY (`fieldId`), - UNIQUE KEY `field_unique` (`fieldName`) -) TYPE=MyISAM; -CREATE TABLE `metaData_values` ( - `fieldId` char(22) binary NOT NULL, - `value` char(255) DEFAULT NULL, - `assetId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL DEFAULT '0', - PRIMARY KEY (`fieldId`,`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `passiveAnalyticsStatus` ( - `startDate` datetime DEFAULT NULL, - `endDate` datetime DEFAULT NULL, - `running` int(2) DEFAULT '0', - `userId` char(255) NOT NULL -) TYPE=MyISAM; -CREATE TABLE `passiveLog` ( - `userId` char(22) binary NOT NULL, - `assetId` char(22) binary NOT NULL, - `sessionId` char(22) binary NOT NULL, - `timeStamp` bigint(20) DEFAULT NULL, - `url` char(255) NOT NULL -) TYPE=MyISAM; -CREATE TABLE `passiveProfileAOI` ( - `userId` char(22) binary NOT NULL, - `fieldId` char(22) binary NOT NULL, - `value` char(100) NOT NULL, - `count` int(11) DEFAULT NULL, - PRIMARY KEY (`userId`,`fieldId`,`value`) -) TYPE=MyISAM; -CREATE TABLE `passiveProfileLog` ( - `passiveProfileLogId` char(22) binary NOT NULL, - `userId` char(22) binary NOT NULL, - `sessionId` char(22) binary NOT NULL, - `assetId` char(22) binary NOT NULL, - `dateOfEntry` bigint(20) NOT NULL DEFAULT '0', - PRIMARY KEY (`passiveProfileLogId`) -) TYPE=MyISAM; -CREATE TABLE `paymentGateway` ( - `paymentGatewayId` char(22) binary NOT NULL, - `className` char(255) DEFAULT NULL, - `options` longtext, - PRIMARY KEY (`paymentGatewayId`) -) TYPE=MyISAM; -CREATE TABLE `redirect` ( - `assetId` char(22) binary NOT NULL, - `redirectUrl` text, - `revisionDate` bigint(20) NOT NULL DEFAULT '0', - `redirectType` int(11) NOT NULL DEFAULT '302', - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `replacements` ( - `replacementId` char(22) binary NOT NULL, - `searchFor` char(255) DEFAULT NULL, - `replaceWith` text, - PRIMARY KEY (`replacementId`) -) TYPE=MyISAM; -CREATE TABLE `search` ( - `assetId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL DEFAULT '0', - `classLimiter` text, - `searchRoot` char(22) binary NOT NULL DEFAULT 'PBasset000000000000001', - `templateId` char(22) binary NOT NULL DEFAULT 'PBtmpl0000000000000200', - `useContainers` int(11) NOT NULL DEFAULT '0', - `paginateAfter` int(11) NOT NULL DEFAULT '25', - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `settings` ( - `name` char(255) NOT NULL, - `value` text, - PRIMARY KEY (`name`) -) TYPE=MyISAM; -CREATE TABLE `shipper` ( - `shipperId` char(22) binary NOT NULL, - `className` char(255) DEFAULT NULL, - `options` longtext, - PRIMARY KEY (`shipperId`) -) TYPE=MyISAM; -CREATE TABLE `shopCredit` ( - `creditId` char(22) binary NOT NULL, - `userId` char(22) binary NOT NULL, - `amount` float NOT NULL DEFAULT '0', - `comment` text, - `dateOfAdjustment` datetime DEFAULT NULL, - PRIMARY KEY (`creditId`), - KEY `userId` (`userId`) -) TYPE=MyISAM; -CREATE TABLE `sku` ( - `assetId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL, - `description` mediumtext, - `sku` char(35) NOT NULL, - `vendorId` char(22) binary NOT NULL DEFAULT 'defaultvendor000000000', - `displayTitle` tinyint(1) NOT NULL DEFAULT '1', - `overrideTaxRate` tinyint(1) NOT NULL DEFAULT '0', - `taxRateOverride` float NOT NULL DEFAULT '0', - `taxConfiguration` longtext, - `shipsSeparately` tinyint(1) NOT NULL, - PRIMARY KEY (`assetId`,`revisionDate`), - KEY `sku` (`sku`), - KEY `vendorId` (`vendorId`) -) TYPE=MyISAM; -CREATE TABLE `snippet` ( - `assetId` char(22) binary NOT NULL, - `snippet` mediumtext, - `mimeType` char(50) NOT NULL DEFAULT 'text/html', - `revisionDate` bigint(20) NOT NULL DEFAULT '0', - `cacheTimeout` int(11) NOT NULL DEFAULT '3600', - `snippetPacked` longtext, - `usePacked` int(1) DEFAULT NULL, - `templateParser` char(255) DEFAULT NULL, - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -CREATE TABLE `taxDriver` ( - `className` char(255) NOT NULL, - `options` longtext, - PRIMARY KEY (`className`) -) TYPE=MyISAM; -CREATE TABLE `tax_eu_vatNumbers` ( - `userId` char(22) binary NOT NULL, - `countryCode` char(3) NOT NULL, - `vatNumber` char(20) NOT NULL, - `viesValidated` tinyint(1) DEFAULT NULL, - `viesErrorCode` int(3) DEFAULT NULL, - `approved` tinyint(1) DEFAULT NULL, - PRIMARY KEY (`userId`,`vatNumber`) -) TYPE=MyISAM; -CREATE TABLE `tax_generic_rates` ( - `taxId` char(22) binary NOT NULL, - `country` char(100) NOT NULL, - `state` char(100) DEFAULT NULL, - `city` char(100) DEFAULT NULL, - `code` char(100) DEFAULT NULL, - `taxRate` float NOT NULL DEFAULT '0', - PRIMARY KEY (`taxId`) -) TYPE=MyISAM; -CREATE TABLE `template` ( - `template` mediumtext, - `namespace` char(35) NOT NULL DEFAULT 'Page', - `isEditable` int(11) NOT NULL DEFAULT '1', - `showInForms` int(11) NOT NULL DEFAULT '1', - `assetId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL DEFAULT '0', - `parser` char(255) NOT NULL DEFAULT 'WebGUI::Asset::Template::HTMLTemplate', - `isDefault` int(1) DEFAULT '0', - `templatePacked` longtext, - `usePacked` int(1) DEFAULT NULL, - `storageIdExample` char(22) DEFAULT NULL, - `attachmentsJson` longtext, - PRIMARY KEY (`assetId`,`revisionDate`), - KEY `namespace_showInForms` (`namespace`,`showInForms`) -) TYPE=MyISAM; -CREATE TABLE `transaction` ( - `transactionId` char(22) binary NOT NULL, - `originatingTransactionId` char(22) binary DEFAULT NULL, - `isSuccessful` tinyint(1) NOT NULL DEFAULT '0', - `orderNumber` int(11) NOT NULL AUTO_INCREMENT, - `transactionCode` char(100) DEFAULT NULL, - `statusCode` char(35) DEFAULT NULL, - `statusMessage` char(255) DEFAULT NULL, - `userId` char(22) binary NOT NULL, - `username` char(35) NOT NULL, - `amount` float DEFAULT NULL, - `shopCreditDeduction` float DEFAULT NULL, - `shippingAddressId` char(22) binary DEFAULT NULL, - `shippingAddressName` char(35) DEFAULT NULL, - `shippingAddress1` char(35) DEFAULT NULL, - `shippingAddress2` char(35) DEFAULT NULL, - `shippingAddress3` char(35) DEFAULT NULL, - `shippingCity` char(35) DEFAULT NULL, - `shippingState` char(35) DEFAULT NULL, - `shippingCountry` char(35) DEFAULT NULL, - `shippingCode` char(35) DEFAULT NULL, - `shippingPhoneNumber` char(35) DEFAULT NULL, - `shippingDriverId` char(22) binary DEFAULT NULL, - `shippingDriverLabel` char(35) DEFAULT NULL, - `shippingPrice` float DEFAULT NULL, - `paymentAddressId` char(22) binary DEFAULT NULL, - `paymentAddressName` char(35) DEFAULT NULL, - `paymentAddress1` char(35) DEFAULT NULL, - `paymentAddress2` char(35) DEFAULT NULL, - `paymentAddress3` char(35) DEFAULT NULL, - `paymentCity` char(35) DEFAULT NULL, - `paymentState` char(35) DEFAULT NULL, - `paymentCountry` char(35) DEFAULT NULL, - `paymentCode` char(35) DEFAULT NULL, - `paymentPhoneNumber` char(35) DEFAULT NULL, - `paymentDriverId` char(22) binary DEFAULT NULL, - `paymentDriverLabel` char(35) DEFAULT NULL, - `taxes` float DEFAULT NULL, - `dateOfPurchase` datetime DEFAULT NULL, - `isRecurring` tinyint(1) DEFAULT NULL, - `notes` mediumtext, - `cashierUserId` char(22) binary DEFAULT NULL, - `shippingOrganization` char(35) DEFAULT NULL, - `paymentOrganization` char(35) DEFAULT NULL, - PRIMARY KEY (`transactionId`), - UNIQUE KEY `orderNumber` (`orderNumber`) -) TYPE=MyISAM; -CREATE TABLE `transactionItem` ( - `itemId` char(22) binary NOT NULL, - `transactionId` char(22) binary NOT NULL, - `assetId` char(22) binary DEFAULT NULL, - `configuredTitle` char(255) DEFAULT NULL, - `options` longtext, - `shippingAddressId` char(22) binary DEFAULT NULL, - `shippingName` char(35) DEFAULT NULL, - `shippingAddress1` char(35) DEFAULT NULL, - `shippingAddress2` char(35) DEFAULT NULL, - `shippingAddress3` char(35) DEFAULT NULL, - `shippingCity` char(35) DEFAULT NULL, - `shippingState` char(35) DEFAULT NULL, - `shippingCountry` char(35) DEFAULT NULL, - `shippingCode` char(35) DEFAULT NULL, - `shippingPhoneNumber` char(35) DEFAULT NULL, - `shippingTrackingNumber` char(255) DEFAULT NULL, - `orderStatus` char(35) NOT NULL DEFAULT 'NotShipped', - `lastUpdated` datetime DEFAULT NULL, - `quantity` int(11) NOT NULL DEFAULT '1', - `price` float DEFAULT NULL, - `vendorId` char(22) binary NOT NULL DEFAULT 'defaultvendor000000000', - `vendorPayoutStatus` char(10) DEFAULT 'NotPaid', - `vendorPayoutAmount` decimal(8,2) DEFAULT '0.00', - `taxRate` decimal(6,3) DEFAULT NULL, - `taxConfiguration` longtext, - `shippingOrganization` char(35) DEFAULT NULL, - PRIMARY KEY (`itemId`), - KEY `transactionId` (`transactionId`), - KEY `vendorId` (`vendorId`) -) TYPE=MyISAM; -CREATE TABLE `userInvitations` ( - `inviteId` char(22) binary NOT NULL, - `userId` char(22) binary NOT NULL, - `dateSent` date DEFAULT NULL, - `email` char(255) NOT NULL, - `newUserId` char(22) binary DEFAULT NULL, - `dateCreated` date DEFAULT NULL, - PRIMARY KEY (`inviteId`) -) TYPE=MyISAM; -CREATE TABLE `userLoginLog` ( - `userId` char(22) binary NOT NULL, - `status` char(30) DEFAULT NULL, - `timeStamp` int(11) DEFAULT NULL, - `ipAddress` char(128) DEFAULT NULL, - `userAgent` text, - `sessionId` char(22) binary DEFAULT NULL, - `lastPageViewed` int(11) DEFAULT NULL, - KEY `sessionId` (`sessionId`), - KEY `userId` (`userId`), - KEY `timeStamp` (`timeStamp`) -) TYPE=MyISAM; -CREATE TABLE `userProfileCategory` ( - `profileCategoryId` char(22) binary NOT NULL, - `label` char(255) NOT NULL DEFAULT 'Undefined', - `shortLabel` char(255) DEFAULT NULL, - `sequenceNumber` int(11) NOT NULL DEFAULT '1', - `visible` int(11) NOT NULL DEFAULT '1', - `editable` int(11) NOT NULL DEFAULT '1', - `protected` int(11) NOT NULL DEFAULT '0', - PRIMARY KEY (`profileCategoryId`) -) TYPE=MyISAM; -CREATE TABLE `userProfileData` ( - `userId` char(22) binary NOT NULL, - `email` char(255) DEFAULT NULL, - `firstName` char(255) DEFAULT NULL, - `middleName` char(255) DEFAULT NULL, - `lastName` char(255) DEFAULT NULL, - `icq` char(255) DEFAULT NULL, - `aim` char(255) DEFAULT NULL, - `msnIM` char(255) DEFAULT NULL, - `yahooIM` char(255) DEFAULT NULL, - `cellPhone` char(255) DEFAULT NULL, - `pager` char(255) DEFAULT NULL, - `emailToPager` char(255) DEFAULT NULL, - `language` char(255) DEFAULT NULL, - `homeAddress` char(255) DEFAULT NULL, - `homeCity` char(255) DEFAULT NULL, - `homeState` char(255) DEFAULT NULL, - `homeZip` char(255) DEFAULT NULL, - `homeCountry` char(255) DEFAULT NULL, - `homePhone` char(255) DEFAULT NULL, - `workAddress` char(255) DEFAULT NULL, - `workCity` char(255) DEFAULT NULL, - `workState` char(255) DEFAULT NULL, - `workZip` char(255) DEFAULT NULL, - `workCountry` char(255) DEFAULT NULL, - `workPhone` char(255) DEFAULT NULL, - `gender` char(255) DEFAULT NULL, - `birthdate` bigint(20) DEFAULT NULL, - `homeURL` char(255) DEFAULT NULL, - `workURL` char(255) DEFAULT NULL, - `workName` char(255) DEFAULT NULL, - `timeZone` char(255) DEFAULT NULL, - `dateFormat` char(255) DEFAULT NULL, - `timeFormat` char(255) DEFAULT NULL, - `discussionLayout` char(255) DEFAULT NULL, - `firstDayOfWeek` char(255) DEFAULT NULL, - `uiLevel` char(255) DEFAULT NULL, - `alias` char(255) DEFAULT NULL, - `signature` longtext, - `publicProfile` longtext, - `toolbar` char(255) DEFAULT NULL, - `photo` char(22) binary DEFAULT NULL, - `avatar` char(22) binary DEFAULT NULL, - `department` char(255) DEFAULT NULL, - `allowPrivateMessages` longtext, - `ableToBeFriend` tinyint(4) DEFAULT NULL, - `showMessageOnLoginSeen` bigint(20) DEFAULT NULL, - `showOnline` tinyint(1) DEFAULT NULL, - `versionTagMode` char(255) DEFAULT NULL, - `wg_privacySettings` longtext, - `receiveInboxEmailNotifications` tinyint(1) DEFAULT NULL, - `receiveInboxSmsNotifications` tinyint(1) DEFAULT NULL, - `assetManagerSortColumn` char(255) DEFAULT NULL, - `assetManagerSortDirection` char(255) DEFAULT NULL, - PRIMARY KEY (`userId`), - KEY `email` (`email`) -) TYPE=MyISAM; -CREATE TABLE `userProfileField` ( - `fieldName` char(128) NOT NULL, - `label` char(255) NOT NULL DEFAULT 'Undefined', - `visible` int(11) NOT NULL DEFAULT '0', - `required` int(11) NOT NULL DEFAULT '0', - `fieldType` char(128) NOT NULL DEFAULT 'text', - `possibleValues` text, - `dataDefault` text, - `sequenceNumber` int(11) NOT NULL DEFAULT '1', - `profileCategoryId` char(22) binary NOT NULL, - `protected` int(11) NOT NULL DEFAULT '0', - `editable` int(11) NOT NULL DEFAULT '1', - `forceImageOnly` int(11) DEFAULT '1', - `showAtRegistration` int(11) NOT NULL DEFAULT '0', - `requiredForPasswordRecovery` int(11) NOT NULL DEFAULT '0', - `extras` text, - `defaultPrivacySetting` char(128) DEFAULT NULL, - PRIMARY KEY (`fieldName`) -) TYPE=MyISAM; -CREATE TABLE `userSession` ( - `sessionId` char(22) binary NOT NULL, - `expires` int(11) DEFAULT NULL, - `lastPageView` int(11) DEFAULT NULL, - `adminOn` int(11) NOT NULL DEFAULT '0', - `lastIP` char(50) DEFAULT NULL, - `userId` char(22) binary NOT NULL, - PRIMARY KEY (`sessionId`), - KEY `expires` (`expires`) -) TYPE=MyISAM; -CREATE TABLE `userSessionScratch` ( - `sessionId` char(22) binary NOT NULL, - `name` char(255) NOT NULL, - `value` text, - PRIMARY KEY (`sessionId`,`name`) -) TYPE=MyISAM; -CREATE TABLE `users` ( - `userId` char(22) binary NOT NULL, - `username` char(100) DEFAULT NULL, - `authMethod` char(30) NOT NULL DEFAULT 'WebGUI', - `dateCreated` int(11) NOT NULL DEFAULT '1019867418', - `lastUpdated` int(11) NOT NULL DEFAULT '1019867418', - `karma` int(11) NOT NULL DEFAULT '0', - `status` char(35) NOT NULL DEFAULT 'Active', - `referringAffiliate` char(22) binary NOT NULL, - `friendsGroup` char(22) binary NOT NULL, - PRIMARY KEY (`userId`), - UNIQUE KEY `username_unique` (`username`) -) TYPE=MyISAM; -CREATE TABLE `vendor` ( - `vendorId` char(22) binary NOT NULL, - `dateCreated` datetime DEFAULT NULL, - `name` char(255) DEFAULT NULL, - `userId` char(22) binary NOT NULL DEFAULT '3', - `preferredPaymentType` char(255) DEFAULT NULL, - `paymentInformation` text, - `paymentAddressId` char(22) binary DEFAULT NULL, - `url` text, - PRIMARY KEY (`vendorId`), - KEY `userId` (`userId`) -) TYPE=MyISAM; -CREATE TABLE `vendorPayoutLog` ( - `payoutId` char(22) binary NOT NULL, - `isSuccessful` tinyint(1) NOT NULL, - `errorCode` char(10) DEFAULT NULL, - `errorMessage` char(255) DEFAULT NULL, - `paypalTimestamp` char(20) NOT NULL, - `amount` decimal(7,2) NOT NULL, - `currency` char(3) NOT NULL, - `correlationId` char(13) NOT NULL, - `paymentInformation` char(255) NOT NULL, - PRIMARY KEY (`payoutId`) -) TYPE=MyISAM; -CREATE TABLE `vendorPayoutLog_items` ( - `payoutId` char(22) binary NOT NULL, - `transactionItemId` char(22) binary NOT NULL, - `amount` decimal(7,2) NOT NULL, - PRIMARY KEY (`payoutId`,`transactionItemId`) -) TYPE=MyISAM; -CREATE TABLE `webguiVersion` ( - `webguiVersion` char(10) DEFAULT NULL, - `versionType` char(30) DEFAULT NULL, - `dateApplied` int(11) DEFAULT NULL -) TYPE=MyISAM; -CREATE TABLE `wobject` ( - `displayTitle` int(11) NOT NULL DEFAULT '1', - `description` mediumtext, - `assetId` char(22) binary NOT NULL, - `styleTemplateId` char(22) binary NOT NULL, - `printableStyleTemplateId` char(22) binary NOT NULL, - `revisionDate` bigint(20) NOT NULL DEFAULT '0', - `mobileStyleTemplateId` char(22) binary DEFAULT 'PBtmpl0000000000000060', - PRIMARY KEY (`assetId`,`revisionDate`) -) TYPE=MyISAM; -ALTER TABLE `Article` DISABLE KEYS; -INSERT INTO `Article` VALUES (NULL,NULL,'bX5rYxb6tZ9docY6sUhBlw','PBtmpl0000000000000002',1278013772,3600,'AHrUFHib-cqwIz1x7RI9sA'),(NULL,NULL,'ix1p0AbwKAz8QWB-T-HHfg','PBtmpl0000000000000002',1271359087,3600,'VF2bqXTRUBoYb_u7dmH70w'),(NULL,NULL,'iCYOjohB9SKvAPr6bXElKA','PBtmpl0000000000000103',1271445525,3600,'TEXVtOhmF_RHM11-_xJLyw'),(NULL,NULL,'4Yfz9hqBqM8OYMGuQK8oLw','PBtmpl0000000000000002',1271352537,3600,'TngTkH6qB76os2nf2S9bDA'),(NULL,NULL,'Wl8WZ43g2rK5AYr9o4zY7w','PBtmpl0000000000000103',1271445539,3600,'HUItbZl7TpOPC06NlO62QA'),(NULL,NULL,'LBuiKzg2mWwmOPS9AgV3bg','PBtmpl0000000000000002',1271348789,3600,'6zKDCX1Jpqbi4banD1EFNQ'),(NULL,NULL,'jTNggl7AoVSUc_ZzrvuCmw','PBtmpl0000000000000002',1271348789,3600,'t_CTIcSnLSuqOumw7LwxFA'),(NULL,NULL,'k2Qj03FrAOXYra8kDJYYXw','PBtmpl0000000000000002',1271357513,3600,'g8L2HOTFkZv5mYtYBarDCQ'),(NULL,NULL,'ksSfkZdsr0uC62NwIk6hFQ','PBtmpl0000000000000002',1271356973,3600,'iiraeaTpGWVrs4uzfvaU2A'),(NULL,NULL,'nWxS5jnA3o3DgPEwBeR7yQ','PBtmpl0000000000000002',1271357239,3600,'MALauel3oVVPZNrm53m3Uw'),(NULL,NULL,'OhdaFLE7sXOzo_SIP2ZUgA','PBtmpl0000000000000002',1271445348,3600,'3g2hbILhcxQA_7UOep0B3Q'),(NULL,NULL,'IWFxZDyGhQ3-SLZhELa3qw','PBtmpl0000000000000002',1277737686,3600,'0MZ-Ua1Gcv25yT-3JxXX8A'),(NULL,NULL,'l0guT3vTR3B8cL6vtP-g3A','PBtmpl0000000000000002',1285124369,3600,'sH36uWhF3AHO8sKBy4ZBIw'),(NULL,NULL,'NK8bqlwVRILJknqeCDPBHg','PBtmpl0000000000000002',1285796040,3600,'RcOVW6oW5IqpdPJskCPscA'),(NULL,NULL,'diZvW4bSgZWwyyGP3qXi1g','PBtmpl0000000000000002',1285610019,3600,'JkzwMnShoIjz0EfwqoXPJA'),(NULL,NULL,'j_1qEqM6iLfQLiR6VKy0aA','PBtmpl0000000000000002',1299872071,3600,'_o7GMxFGJ5flJrIozstBFA'); -ALTER TABLE `Article` ENABLE KEYS; -ALTER TABLE `Collaboration` DISABLE KEYS; -INSERT INTO `Collaboration` VALUES ('pbproto000000000000002','2','2',0,'PBtmpl0000000000000208','PBtmpl0000000000000209','PBtmpl0000000000000210','','','assetData.revisionDate','desc',0,0,3600,10,'javascript',1,0,0,0,0,NULL,NULL,2592000,10,30,NULL,1,0,'PBrichedit000000000002',0,0,1163019036,0,'pbworkflow000000000003','pbworkflow000000000003',100,NULL,NULL,NULL,NULL,NULL,0,'every 5 minutes','NpRVTSR-NX2sD52LUc520A',3600,1,1,0,0,0,0,'12',1,'default_post_received1','PBrichedit000000000002','javascript','default_CS_unsubscribe'); -ALTER TABLE `Collaboration` ENABLE KEYS; -ALTER TABLE `FileAsset` DISABLE KEYS; -INSERT INTO `FileAsset` VALUES ('7-0-style0000000000002','_Vo1Pvl3sPPANyxz-IcCtA','body_bg.jpg','PBtmpl0000000000000088',1147642492,3600),('7-0-style0000000000004','Gemp7cEVjh2_M2IicUYs-g','gui_bottom.jpg','PBtmpl0000000000000088',1147642493,3600),('7-0-style0000000000005','ry-yzLVH-vxn71H9byjGXA','header.jpg','PBtmpl0000000000000088',1147642493,3600),('7-0-style0000000000006','VEPa65fhY3dok6vj-beFCA','main_bg.gif','PBtmpl0000000000000088',1147642493,3600),('7-0-style0000000000007','Cfay1MNkC-73WKJ7fX_pVw','main_bg.jpg','PBtmpl0000000000000088',1147642493,3600),('7-0-style0000000000008','iEBE--vQb_lxuZd5AP8tuw','nav1_center_on.jpg','PBtmpl0000000000000088',1147642494,3600),('7-0-style0000000000009','XR1Yjf3MkYA53TJlcpRBsw','nav1_off.jpg','PBtmpl0000000000000088',1147642494,3600),('7-0-style0000000000010','sxvAS8na-QAdY_eycd2gKw','nav1_off_center.jpg','PBtmpl0000000000000088',1147642494,3600),('7-0-style0000000000011','2lhmrXW46ZMLvpbaaX2g7Q','nav1_off_left.jpg','PBtmpl0000000000000088',1147642495,3600),('7-0-style0000000000012','sEoRwhmonl877RBgx2nE1w','nav1_off_right.jpg','PBtmpl0000000000000088',1147642495,3600),('7-0-style0000000000013','AoSfRkPI3fl7vAooT4Fj_A','nav1_on.jpg','PBtmpl0000000000000088',1147642495,3600),('7-0-style0000000000014','MgNDJRsghd_zQZ292hqVMQ','nav1_on_left.jpg','PBtmpl0000000000000088',1147642495,3600),('7-0-style0000000000015','aUG1FZaIqHaQHlieZ4_Mkg','nav1_on_right.jpg','PBtmpl0000000000000088',1147642496,3600),('7-0-style0000000000016','HyhLnkaJMfr8eJsLIX8XeA','nav2_center_on.jpg','PBtmpl0000000000000088',1147642496,3600),('7-0-style0000000000017','aledEnWoD-JVNURWSklfdg','nav2_off_center.jpg','PBtmpl0000000000000088',1147642496,3600),('7-0-style0000000000018','Ffd33PToWon9X7mcKZqUAQ','nav2_off_left.jpg','PBtmpl0000000000000088',1147642496,3600),('7-0-style0000000000019','B3TTkcOlr-VzcxRwQXZmyg','nav2_off_right.jpg','PBtmpl0000000000000088',1147642497,3600),('7-0-style0000000000020','RxGSyn-8W4p64SQ-NYzNOg','nav2_on_left.jpg','PBtmpl0000000000000088',1147642497,3600),('7-0-style0000000000021','NciEByP8ssN6qDYyKcoGWw','nav2_on_right.jpg','PBtmpl0000000000000088',1147642497,3600),('7-0-style0000000000022','9OVg_Nxo0gha5pWZsS_dmw','nav_bg.jpg','PBtmpl0000000000000088',1147642497,3600),('7-0-style0000000000023','VKtJGCmBtsMj8ZeAJ6ePNw','nav_on.jpg','PBtmpl0000000000000088',1147642498,3600),('7-0-style0000000000024','ryQb0A4YeEwYZo9hdgrCcw','orange_left01.jpg','PBtmpl0000000000000088',1147642498,3600),('7-0-style0000000000030','coew3C1i9AORof9ezjWLDg','webgui_btn.jpg','PBtmpl0000000000000088',1147642499,3600),('7-0-style0000000000032','HEySmh0CRxpkI-tjzgkDDw','context_bg.jpg','PBtmpl0000000000000088',1147642500,3600),('7-0-style0000000000034','HPn3mVDaMkn8Iu0GAq7cAw','leftCol_header.jpg','PBtmpl0000000000000088',1147642500,3600),('7-0-style0000000000035','IqaSdxJqqN_8C-7OWeyE2g','leftCol_header02.jpg','PBtmpl0000000000000088',1147642501,3600),('7-0-style0000000000036','M0cIcS1GDFIV8lwAw3U2hA','main_bg.jpg','PBtmpl0000000000000088',1147642501,3600),('7-0-style0000000000037','77rakTqCXGBihEOXoh4ZXQ','nav_bg.jpg','PBtmpl0000000000000088',1147642501,3600),('7-0-style0000000000038','5najYvfJiZBBaiCVxaNkcQ','navbar_bg.jpg','PBtmpl0000000000000088',1147642501,3600),('7-0-style0000000000039','27XAOBKNfJ2euexImD73Aw','navbar_left.jpg','PBtmpl0000000000000088',1147642502,3600),('7-0-style0000000000040','sgd1YdmVKj-n6IyIWJicXg','navbar_right.jpg','PBtmpl0000000000000088',1147642502,3600),('7-0-style0000000000041','i1oJph6lb3hxEsTNu_3Y7g','page_title.jpg','PBtmpl0000000000000088',1147642502,3600),('7-0-style0000000000042','qMwO_tp9KOya_N-kyIHDJQ','page_title_bg.jpg','PBtmpl0000000000000088',1147642502,3600),('7-0-style0000000000043','l5hF84u5R9MoqMvS9gpp6g','pb.jpg','PBtmpl0000000000000088',1147642503,3600),('7-0-style0000000000044','Eh4IRmClOEzDAU1IVn5vHQ','pb_wg.jpg','PBtmpl0000000000000088',1147642503,3600),('7-0-style0000000000045','e8yirsGt9FZEgzfeHLgRiw','pb_wg_bg.jpg','PBtmpl0000000000000088',1147642503,3600),('7-0-style0000000000046','hDmN6gu1w_jtrcxgTRN5OQ','rightCol_bg.jpg','PBtmpl0000000000000088',1147642504,3600),('7-0-style0000000000048','_QhSdbnBeA1zio6iAuGIag','wg.jpg','PBtmpl0000000000000088',1147642504,3600),('7-0-style0000000000052','VRqMCZ_-GgaJiDeOrnwlQg','footer_bg.jpg','PBtmpl0000000000000088',1147642505,3600),('7-0-style0000000000053','baxoDEB4C8eLjZbnENMs9w','footer_right.jpg','PBtmpl0000000000000088',1147642505,3600),('7-0-style0000000000054','FlivcrAW0pKW4q_2fvlVpw','header_bg.jpg','PBtmpl0000000000000088',1147642506,3600),('7-0-style0000000000055','5hgdAMRWeSmHDrRFM_qbBw','header_left.jpg','PBtmpl0000000000000088',1147642506,3600),('7-0-style0000000000056','lV6l3Sctxx8J1JmYlXwSDA','header_right.jpg','PBtmpl0000000000000088',1147642506,3600),('7-0-style0000000000057','FKGH2yiNQoC2E_FqbMYebw','main_bg.jpg','PBtmpl0000000000000088',1147642507,3600),('7-0-style0000000000058','UGtgwjDaqCtCPnEkuLPtIw','main_bottom.jpg','PBtmpl0000000000000088',1147642507,3600),('7-0-style0000000000060','XsuCCMz5vyyfC8Xr89pb1Q','main_top_bg.jpg','PBtmpl0000000000000088',1147642508,3600),('7-0-style0000000000061','is_6p2ROuy6AhCR1eJ8SdQ','nav_bg.jpg','PBtmpl0000000000000088',1147642508,3600),('7-0-style0000000000062','3rpFbJWSV14AWeDZqqPSSw','nav_bg1.jpg','PBtmpl0000000000000088',1147642508,3600),('7-0-style0000000000063','NcTFm_t9rn63ejwtBQnDQw','nav_bg1_on.jpg','PBtmpl0000000000000088',1147642508,3600),('7-0-style0000000000064','XLKBWi6Asbz5CtZdnwzZmg','nav_bg2.jpg','PBtmpl0000000000000088',1147642509,3600),('7-0-style0000000000065','02cdKPH5-SyFEb_Zo_WL8A','nav_bg2_on.jpg','PBtmpl0000000000000088',1147642509,3600),('7-0-style0000000000066','0QQpTB8bi6JZvFrW74SOWg','nav_bg_on.jpg','PBtmpl0000000000000088',1147642509,3600),('7-0-style0000000000067','DdhQHfqGq-yC1ukTdlqoEg','pb.jpg','PBtmpl0000000000000088',1147642509,3600),('7-0-style0000000000068','Y4AWquISZVLcwVQLzd_u7w','spacer.gif','PBtmpl0000000000000088',1147642510,3600),('7-0-style0000000000071','mJOrQFemh2R3xn2HYviQlQ','wg.jpg','PBtmpl0000000000000088',1147642511,3600),('Vzv1pWpg_w6R_o-b0rM2qQ','PMKX5QYkNFvrCD15QVo8Tg','Tutorial.swf','pbtmpl0000000000000221',1147642515,3600),('_bZJ9LA_KNekZiFPaP2SeQ','RwcPC6VO-WH3HPaMNxQdxQ','shelf-titles.jpg','PBtmpl0000000000000088',1210777868,0),('hQ7z33_jOYkQ8WNX5xy9Sw','HCc0_yDJrhZIoKV__wiUDw','style-button.gif','PBtmpl0000000000000088',1209509455,0),('vWW_DcHiYSrKZOkkIfEfcQ','t_FrH8_ktSJtHQGQLDeudA','row-2.jpg','PBtmpl0000000000000088',1209509433,0),('_bPYzRA87NTAUIKlfrJMHg','EgZoQgSAhCrNP3sXjRDPkw','row-1.jpg','PBtmpl0000000000000088',1209509433,0),('nJjZHRwdDs5MAZYsAyioHw','edb4FERsJ0pU0mmnfsiCig','title-bg.jpg','PBtmpl0000000000000088',1209509433,0),('8hxfkrJPeFVRWF5piCNJ1A','hRM4w6S2cqFdDRPcUP6FIg','field-bg.jpg','PBtmpl0000000000000088',1209509433,0),('Osx7WN52iIKHZFT4vqUBHQ','Wa42mXdBWCT9B9kgqzh9CQ','search-btn.gif','PBtmpl0000000000000088',1209509433,0),('oWff8fGzRdHPyq5VNREe9Q','j-AYUZHpCRd0yYH2Youp4A','top-bg.jpg','PBtmpl0000000000000088',1209509433,0),('uqbkvb1b9443VvfkyRz95w','JXBzB0XDxTHC_KRk0jROGQ','save-button.gif','PBtmpl0000000000000088',1209509433,0),('8YiMkcz32xalkAn3WBLpag','3lttrXIB4qCFnsKxFTJoKw','go-btn.gif','PBtmpl0000000000000088',1210181860,0),('7-0-style0000000000059','QOhEl8bdecbSrml06V84iw','main_top.jpg','PBtmpl0000000000000088',1213386091,0),('o_pq_e4vRyhMOKFzs61eag','zTRhj1ZmjPc6b4ytLNIdLg','book-covers.jpg','PBtmpl0000000000000088',1215714957,0),('hBpisL-_URyZnh9clR5ohA','IYUoN4EWQWHZHQj-f5ex0g','no_photo.gif','PBtmpl0000000000000088',1227634417,0),('FOBV6KkifreXa4GmEAUU4A','69Zh__B-EI01IWjf9KBDrw','no_photo_sm.gif','PBtmpl0000000000000088',1227634447,0),('-0sK2rX1cwQt1ipUSqsiQQ','CamwRtlyRX-5BNkSNzDPIw','bg.gif','PBtmpl0000000000000088',1273032716,0),('hS_eOaVz9Qb5ixndK9EXAw','o7fDCt5nLymcuiTf2YCFSw','header.jpg','PBtmpl0000000000000088',1273032716,0),('k2p-Be8C98pf2cRq7E-JHg','67nNZ2B0A4lRzoqadwMgLQ','tab_link.gif','PBtmpl0000000000000088',1273032716,0),('aYG4fjbMPbC4LCuuMp4gGA','6spEu4jqWCkdMdyhArfS9A','tab_hover.gif','PBtmpl0000000000000088',1273032716,0),('F122Ey0NtVAw6Lfv1M6G_Q','jUsYsBXtuLJa8Onpi5HU3g','ico_archive.gif','PBtmpl0000000000000088',1273032716,0),('qmXHKrQ6EDLSOGkrEKRUDA','75kfvWZUedWHNdLfM-AtkQ','bg_page_in.jpg','PBtmpl0000000000000088',1273032716,0),('4qZgXjPPO4fwV879yu5XUg','ih2o91dTNCVJlenr9stdbw','bg_page.JPG','PBtmpl0000000000000088',1273032716,0),('mb-xeAugm5GJdvu-Wh0MtQ','8VCgTKlQwVGFKufySjaHNA','search_submit.gif','PBtmpl0000000000000088',1273032717,0),('84Y9CwgzP6eNU7wZnk019Q','QxrDfsAi4k7N-dH6_6Ha9A','ico_date.gif','PBtmpl0000000000000088',1273032717,0),('ikXTtJKZfHVxqw-47E4AQA','83muqXYuxwND5hFjjp-w6Q','ico_user.gif','PBtmpl0000000000000088',1273032717,0),('DhRWPTgzhvju_-TbMN3CwA','BxVwfcPeSjMPqBNal_E2QA','ico_comments.gif','PBtmpl0000000000000088',1273032717,0),('6njI-pZz2bwsjWh-Q1_11g','OFFn_bjzx1DJfXFo1OF1vw','ico_list.gif','PBtmpl0000000000000088',1273032717,0),('_Hz1Gnd3yEnJzVS7l7nJMQ','OYL4yTE8m7-C4dpnmcPtzw','content_all_bg.PNG','PBtmpl0000000000000088',1273032717,0),('VOOrXK5dFnkGih7aTkuDWA','Oung_80DQKn8roLpf_gczQ','search.PNG','PBtmpl0000000000000088',1273032717,0),('ruf-QejOkUHDRtfgakHlbA','k4TQ8lQX80BRB6DByAeOqw','col_title_bg_long.GIF','PBtmpl0000000000000088',1273032717,0),('FSHy5KjQjkt599PHS41seA','ttpOQyYPTtrc40m_3XD3qA','footer.jpg','PBtmpl0000000000000088',1273032717,0),('nuYYXAz4KNNxgfumfnpo_g','JQ6tIpLMOEeT-B3qgIO1tA','ico_top.gif','PBtmpl0000000000000088',1273032718,0),('Mr7ljjoy6n4fZojpQWajKQ','VtEeuhaJ9WqtHzKKiSapNQ','ico_links.gif','PBtmpl0000000000000088',1273032718,0),('ApkqpDOrJDxK3QrWBGSRIg','-pr99yzoIq1OWGE4nEc2AQ','ico_archive2.gif','PBtmpl0000000000000088',1273032718,0),('AzzTY0Lay1f_YGeQJFnQCA','YRAPgXl7Y0gbSKCiLnHetA','ico_list.gif','PBtmpl0000000000000088',1273032718,0),('bCGr7FRtZt-XYlBVUEJBjw','c6kbq-w4yTgOmp9iL5YIGw','Getting_Started_doc.pdf','PBtmpl0000000000000088',1278013724,3600),('bANo8aiAPA7aY_oQZKxIWw','JpcppU2QVhwzkRQ_3cPrig','rss.gif','PBtmpl0000000000000088',1285124155,0),('2ci_v2d4x4uvyjTRlC49OA','AKxSROUAD512YVWMVnCFKA','moveDown.gif','PBtmpl0000000000000088',1285124156,0),('O-EsSzKgAk1KolFT-x_KsA','NMkjv95L4_2hAr24Zk6t_w','moveUp.gif','PBtmpl0000000000000088',1285124156,0),('fdd8tGExyVwHyrB8RBbKXg','UeHYn4prIObzFLOEKJCdJg','next.gif','PBtmpl0000000000000088',1285124156,0),('BpisgHl4ZDcSECJp6oib1w','fAKWhpZ8JjjUx7Mp9me0cg','play.gif','PBtmpl0000000000000088',1285124156,0),('zshreRgPAXtnF0DtVbQ1Yg','nqN_FI5RfUrj1jJvaR2Ejw','previous.gif','PBtmpl0000000000000088',1285124156,0),('POVcY79vIqAHR8OfGt36aw','_WafZBaw-va8uVngB-n1Cg','pagination_button.jpg','PBtmpl0000000000000088',1285124156,0),('hIB-z34r8Xl-vYVYCkKr-w','eMdb0POFC67cjHcfC8QV6w','bar-btn-r.jpg','PBtmpl0000000000000088',1285124156,0),('-mPUoFlYcjqjPUPRLAlxNQ','2kGHNiOCXpdjkNvGm7FckQ','search-field-r.jpg','PBtmpl0000000000000088',1285124156,0),('MDpUOR-N8KMyt1J7Hh_h4w','0FU2asON4Cpz84ZqVv2j0Q','bar-btn.jpg','PBtmpl0000000000000088',1285124156,0),('YfXKByTwDZVituMc4h13Dg','yNQIBSJTOyIELRMx8e1HFA','pagination_bg.jpg','PBtmpl0000000000000088',1285124156,0),('esko_HSU0Gh-uJZ1h3xRmQ','7AYtwHJ5ID67bh9USLisRA','search-field-l.jpg','PBtmpl0000000000000088',1285124156,0),('oSqpGswzpBG_ErdfYwIO8A','PEwj2Dax-ie0pFi3umQcCg','top_bg.jpg','PBtmpl0000000000000088',1285124156,0),('MXJklShZvLLB_DSnZQmXrQ','i3MwZiI6H2s4ch3o8qGzWg','title_bg.jpg','PBtmpl0000000000000088',1285124156,0),('BthxD5oJ0idmsyI3ioA2FA','E_Tdc6--HA70UcAgFqm5aA','bar-btn-l.jpg','PBtmpl0000000000000088',1285124156,0),('aZ-1HYQamkRHYXvzAra8WQ','JnwzFJWb00KcvD_Y0c-qNQ','search-field.jpg','PBtmpl0000000000000088',1285124156,0),('eRkb94OYcS5AdcrrerOP5Q','p1phyvMUP032yG2CZTFbXw','rss.gif','PBtmpl0000000000000088',1285124157,0),('TbnkjAJQEASORXIpYqDkcA','2tbRPmG1Bb1xg31inIP2Bw','blank-image.jpg','PBtmpl0000000000000088',1285124157,0),('er-3faBjY-hhlDcc5aKqdQ','sEeSjDgTnXyGFs0l3m0Gcg','top_bg.jpg','PBtmpl0000000000000088',1285124157,0),('8bFsu2FJUqHRUiHcozcVFw','WCHvuoJ0seQRBvhSHnZNuw','sub-btn-l.jpg','PBtmpl0000000000000088',1285124157,0),('34Aayx5eA320D8VfhdfDBw','bJRXXELPgng8Hmq3DbgX_w','sub-btn-r.jpg','PBtmpl0000000000000088',1285124157,0),('TlhKOVmWblZOsAdqmhEpeg','YWxgdQSbgXlybWHVGlkY0w','sub-btn.jpg','PBtmpl0000000000000088',1285124157,0),('Nx0ypjO3cN6QdZUBUEE0lA','WbdjhOE2fivqHkg1AtB0fQ','pic-title-bg.jpg','PBtmpl0000000000000088',1285124157,0),('CmFZLN7iPS7XXvUEsxKPKA','rPjoy1rPO4wSOTpCpD6rxw','row-2.jpg','PBtmpl0000000000000088',1285124157,0),('v_XBgwwZqgW1D5s4y05qfg','rY-oHSOhzmi6ChVqdK3aFQ','addtl-info.gif','PBtmpl0000000000000088',1285124157,0),('4TdAkKoQbSCvI7QWcW889A','HvuUzQX6jFB7Id5uiQSoJA','row-1.jpg','PBtmpl0000000000000088',1285124157,0),('SAgK6eDPCG1cgkJ59WapHQ','t5wGWmFsAU-gEZ9MKQVPUw','prev-btn.gif','PBtmpl0000000000000088',1285124157,0),('XJYLuvGy9ubF7JNKyINtpA','URLC12rdK3WJvZPMwMlPJQ','play-btn.gif','PBtmpl0000000000000088',1285124157,0),('RWj7hyv2SpZuXxwj1Wocug','oXNEUhS8kPMUgn_ffaOJ9w','next-btn.gif','PBtmpl0000000000000088',1285124157,0),('aq8QElnlm3YufAoxRz9Pcg','4Ch-mtMeddIHOcWbTd5vyA','data-bg.jpg','PBtmpl0000000000000088',1285124158,0),('i6-BofrJJYozovlzFBByXg','F-oeeyCC7F512RbX3b81-g','first-photo-button.png','PBtmpl0000000000000088',1285124158,0),('fU_OZCmtdFNJ8a6bMve8ng','zp7oWiWjlqLL0uFwffWwHg','previous-photo-button.png','PBtmpl0000000000000088',1285124158,0),('YXCtusAxb4vzZ5sTnUA5DA','3uzHqzlwqXOgOZgyH38bLQ','next-photo-button.png','PBtmpl0000000000000088',1285124158,0),('k_xuE82wwp8gFVl9aaaG8g','v-M0mgXsVNT5VnmAs7OOoQ','last-photo-button.png','PBtmpl0000000000000088',1285124158,0),('NPM_WItpM5IzLWBhWjYfCA','2ZVSz3SkLls8aeF6ap5EwA','photo-navigation-spacer.png','PBtmpl0000000000000088',1285124158,0),('A_5LVQQWR73QZR8FFbny_w','I0b31o9W58wGCU2f1296iA','bg.gif','PBtmpl0000000000000088',1301973995,0),('wywIfa_VuTsq0c5Ed-W-MA','Y32QJl-cS3b-C5PZQ6EWYQ','bullet.gif','PBtmpl0000000000000088',1301973995,0),('xmykMFjri1O2NrYHbeToVQ','Rec2i4Xmhx_puKj8Jh36kg','footerbg.gif','PBtmpl0000000000000088',1301973995,0),('0IIGNBs_-INzqBC5VLeJgw','_EGFzCJ8R4d4OLfdsGBxtA','headerbg.gif','PBtmpl0000000000000088',1301973996,0),('FXmePdyS0YKuZ1VCGGpK9w','_PH0MdxjWNzDlCyETdhdrA','quote.gif','PBtmpl0000000000000088',1301973996,0),('66qCywiE_fiL9u5YIaJhgw','XQdDqDkr8ns8G0KgbzDtJQ','tableft.gif','PBtmpl0000000000000088',1301973996,0),('n5VpG4lFsOG1elaWDQbilw','q_ISnAkSYu7lIK02K7dFtg','tabright.gif','PBtmpl0000000000000088',1301973996,0),('pAXR7Kby4O-dSxOwLp1GaA','q0psk7CNosJzG63OFHPkyQ','top_mod.png','PBtmpl0000000000000088',1301973998,0),('TthzMLO4n3qxy59QZ5YBHg','swraxvcheusDs0lYjJNo6A','menu_bg_dark.png','PBtmpl0000000000000088',1301973998,0),('3n31SQjYa150TBrRBgMPhA','QO2DvWl6leXM7OyXwfVfAw','menu_bg_light.png','PBtmpl0000000000000088',1301973998,0),('R4RxDufGbbIzEmpcoEcLrw','yVXbZ-MvG1t2sKqQucXtAg','logo_full.jpg','PBtmpl0000000000000088',1301973998,0),('2q5fxatSFLgIhXaUX-oSvg','ejfTQVbo4RpXnzkmy8KrEg','bottom-left.jpg','PBtmpl0000000000000088',1313542960,0),('_d5WTkKjnwct-_Dk7gZHvQ','Vmqa0F3vxyHTacz1ojC49Q','bottom-right.jpg','PBtmpl0000000000000088',1313542960,0),('Iz2mUR3jCPKyemwAea4b2g','POHJSQqpgaGckij0e_Du2g','input_bg.jpg','PBtmpl0000000000000088',1313542960,0),('JU9bjsLRoWj7GVHs__prig','OJMZ6RslFGTcPM9VneXGkQ','top-left.jpg','PBtmpl0000000000000088',1313542960,0),('noOlnjQGexHg8c4bGVUo9g','SNlKH0bmNpdnmCvejk-xlA','top-right.jpg','PBtmpl0000000000000088',1313542960,0); -ALTER TABLE `FileAsset` ENABLE KEYS; -ALTER TABLE `Folder` DISABLE KEYS; -INSERT INTO `Folder` VALUES ('PBasset000000000000002','PBtmpl0000000000000078',1124395696,3600,0,'ASC'),('7-0-style0000000000001','PBtmpl0000000000000078',1147642492,3600,0,'ASC'),('7-0-style0000000000031','PBtmpl0000000000000078',1147642500,3600,0,'ASC'),('PBasset000000000000003','PBtmpl0000000000000078',1147642437,3600,0,'ASC'),('nbSrhXZQuxIjhWFaFPSuVA','PBtmpl0000000000000078',1147642465,3600,0,'ASC'),('N13SD1Fpqk00UgBt1Z8ivQ','PBtmpl0000000000000078',1147642470,3600,0,'ASC'),('-WM2dt0ZGpDasuL2wWocxg','PBtmpl0000000000000078',1222803056,3600,0,'ASC'),('3uuBf8cYuj1sew2OJXl9tg','PBtmpl0000000000000078',1147642470,3600,0,'ASC'),('2OcUWHVsu_L1sDFzIMWYqw','PBtmpl0000000000000078',1222803070,3600,0,'ASC'),('cj2y4papTVGZRFdwTI-_fw','PBtmpl0000000000000078',1147642475,3600,0,'ASC'),('bBzO4CWjqU_ile3gf5Iypw','PBtmpl0000000000000078',1147642475,3600,0,'ASC'),('Da6KWn805L4B5e4HFgQRQA','PBtmpl0000000000000078',1147642479,3600,0,'ASC'),('bbiA9Zq5Gy2oCFBlILO3QA','PBtmpl0000000000000078',1147642480,3600,0,'ASC'),('Efe2W0UgrSRDltNJ87jlfg','PBtmpl0000000000000078',1147642480,3600,0,'ASC'),('9wKWdum0_8z-OhhquWLtSQ','PBtmpl0000000000000078',1147642483,3600,0,'ASC'),('CSN-ZON7Uwv8kxf3F1fh5Q','PBtmpl0000000000000078',1147642484,3600,0,'ASC'),('TCtybxdqmdwdvRn555zpCQ','PBtmpl0000000000000078',1147642484,3600,0,'ASC'),('tempspace0000000000000','PBtmpl0000000000000078',1185754574,3600,0,'ASC'),('Tsg7xmPYv782j6IVz7yHFg','PBtmpl0000000000000078',1213244777,3600,0,'ASC'),('TYo2Bwl7aafzTtdHlS-arQ','PBtmpl0000000000000078',1211664878,3600,0,'ASC'),('6tK47xsaIH-ELw0IBo0uRQ','PBtmpl0000000000000078',1210777115,3600,0,'ASC'),('gbnRhcWNk1iQe32LFEB5eQ','PBtmpl0000000000000078',1212086102,3600,0,'ASC'),('6D4Z-oruXPS6OlH_Kx8pBg','PBtmpl0000000000000078',1209509389,3600,0,'ASC'),('C5fPz-Wg85vkYRvCdl-Xqw','PBtmpl0000000000000078',1212160830,3600,0,'ASC'),('jnYdqDkUR8x7Pv2eGR1qTA','PBtmpl0000000000000078',1216250666,3600,0,'ASC'),('zyWi26q9na-iiZqL4yedog','PBtmpl0000000000000078',1222803114,3600,0,'ASC'),('tBL7BWiQRZFed2Y-Zjo9tQ','PBtmpl0000000000000078',1222803200,3600,0,'ASC'),('GdkQpvjRtJqtzOUbwIIQRA','PBtmpl0000000000000078',1222803205,3600,0,'ASC'),('tnc5iYyynX2hfdEs9D3P8w','PBtmpl0000000000000078',1222803213,3600,0,'ASC'),('vgXdBcFTqU7h4wBG1ewdBw','PBtmpl0000000000000078',1222803217,3600,0,'ASC'),('hcFlqnXlsmC1ujN6Id0F0A','PBtmpl0000000000000078',1222803234,3600,0,'ASC'),('eRJR52fvlaxfetv3DQkQYw','PBtmpl0000000000000078',1222803238,3600,0,'ASC'),('5HIDHq5lAWHV5gpYGS0zLg','PBtmpl0000000000000078',1222803244,3600,0,'ASC'),('rYEFwXXo0tkGhQTcbDibvg','PBtmpl0000000000000078',1222803249,3600,0,'ASC'),('V3l5S5TtI7wMm1WpIMhvOA','PBtmpl0000000000000078',1222803253,3600,0,'ASC'),('nqNbSUAhk9Vd1zda2SCz9A','PBtmpl0000000000000078',1222803258,3600,0,'ASC'),('y8XkRdxIperLKkJ3bL5sSQ','PBtmpl0000000000000078',1222803264,3600,0,'ASC'),('vTymIDYL2YqEh6PV50F7ew','PBtmpl0000000000000078',1222803302,3600,0,'ASC'),('lo1ac3BsoJx3ijGQ3gR-bQ','PBtmpl0000000000000078',1222803309,3600,0,'ASC'),('huASapWvFDzqwOSbcN-JFQ','PBtmpl0000000000000078',1222803313,3600,0,'ASC'),('9A-mg2gwWmaYi9o_1C7ArQ','PBtmpl0000000000000078',1222803338,3600,0,'ASC'),('yD1SMHelczihzjEmx6eXBA','PBtmpl0000000000000078',1222803342,3600,0,'ASC'),('pV7GnZdpjR3XpZaSINIoeg','PBtmpl0000000000000078',1222803347,3600,0,'ASC'),('71e17KeduiXgODLMlUxiow','PBtmpl0000000000000078',1222803352,3600,0,'ASC'),('Ik9HHky10DIyFTKehUD1dw','PBtmpl0000000000000078',1222803478,3600,0,'ASC'),('NywJYmGWe1f6EBXJnWg9Xg','PBtmpl0000000000000078',1222803638,3600,0,'ASC'),('AgyFhx3eXlfZXNp2MkrsiQ','PBtmpl0000000000000078',1222803665,3600,0,'ASC'),('F7MAQ-cpuvQ1KuC7J4P5zQ','PBtmpl0000000000000078',1222803673,3600,0,'ASC'),('BmLaN4rmAANkCglXUViEbg','PBtmpl0000000000000078',1222803871,3600,0,'ASC'),('X7DrzUcj8pOKFa_6k9D5iw','PBtmpl0000000000000078',1222804045,3600,0,'ASC'),('UL-ItI4L1Z6-WSuhuXVvsQ','PBtmpl0000000000000078',1225139673,3600,0,'ASC'),('7-0-style0000000000049','PBtmpl0000000000000078',1224117144,3600,0,'ASC'),('QpmlAiYZz6VsKBM-_0wXaw','PBtmpl0000000000000078',1224616691,3600,0,'ASC'),('HPDOcsj4gBme8D4svHodBw','PBtmpl0000000000000078',1225404573,3600,0,'ASC'),('IZkrow_zwvbf4FCH-taVTQ','PBtmpl0000000000000078',1226011853,3600,0,'ASC'),('K0YjxqOqr7RupSo6sIdcAg','PBtmpl0000000000000078',1227074310,3600,0,'ASC'),('_ilRXNR3s8F2vGJ_k9ePcg','PBtmpl0000000000000078',1226643205,3600,0,'ASC'),('qaVcU0FFzzraMX_bzELqzw','PBtmpl0000000000000078',1227074362,3600,0,'ASC'),('QHn6T9rU7KsnS3Y70KCNTg','PBtmpl0000000000000078',1233173545,3600,0,'ASC'),('HW-sPoDDZR8wBZ0YgFgPtg','PBtmpl0000000000000078',1227634350,3600,0,'ASC'),('AOjPG2NHgfL9Cq6dDJ7mew','PBtmpl0000000000000078',1236960881,3600,0,'ASC'),('jmlI9IK-lV8n2WMYmmPhAA','PBtmpl0000000000000078',1238106173,3600,0,'ASC'),('6uvSLY-ak_w4p_wS8q33cA','PBtmpl0000000000000078',1239213092,3600,0,'ASC'),('GaBAW-2iVhLMJaZQzVLE5A','PBtmpl0000000000000078',1240103565,3600,0,'ASC'),('lo1rpxn3t8YPyKGers5eQg','PBtmpl0000000000000078',1238625621,3600,0,'ASC'),('aNNC62qLAS6TB-0_MCYjsw','PBtmpl0000000000000078',1246969327,3600,0,'ASC'),('BFfNj5wA9bDw8H3cnr8pTw','PBtmpl0000000000000078',1247046273,3600,0,'ASC'),('f_tn9FfoSfKWX43F83v_3w','PBtmpl0000000000000078',1247053009,3600,0,'ASC'),('oGfxez5sksyB_PcaAsEm_Q','PBtmpl0000000000000078',1247053097,3600,0,'ASC'),('tPagC0AQErZXjLFZQ6OI1g','PBtmpl0000000000000078',1246966459,3600,0,'ASC'),('GYaFxnMu9UsEG8oanwB6TA','PBtmpl0000000000000078',1246965871,3600,0,'ASC'),('VZK3CRgiMb8r4dBjUmCTgQ','PBtmpl0000000000000078',1247046242,3600,0,'ASC'),('tXwf1zaOXTvsqPn6yu-GSw','PBtmpl0000000000000078',1246965607,3600,0,'ASC'),('5bnNzteN7w3NnK9mF4XiCg','PBtmpl0000000000000078',1250243000,3600,0,'ASC'),('RSAMkc6WQmfRE3TOr1_3Mw','PBtmpl0000000000000078',1250243000,3600,0,'ASC'),('fowHfgOkJtAxdst7rugTog','PBtmpl0000000000000078',1252595993,3600,0,'ASC'),('TvOZs8U1kRXLtwtmyW75pg','PBtmpl0000000000000078',1256092368,3600,0,'ASC'),('4qh0kIsFUdd4Ox-Iu1JZgg','PBtmpl0000000000000078',1257311886,3600,0,'ASC'),('-K8Hj45mbelljN9-0CXZxg','PBtmpl0000000000000078',1257311887,3600,0,'ASC'),('P_4uog81vSUK4KxuW_4GUA','PBtmpl0000000000000078',1258524916,3600,0,'ASC'),('t87D1138NhPHhA23-hozBA','PBtmpl0000000000000078',1273032716,3600,0,'ASC'),('QtBumey5ffc-xffRp1-7Aw','PBtmpl0000000000000078',1273032716,3600,0,'ASC'),('Q4uX_C557arTp6D_jwB1jQ','PBtmpl0000000000000078',1273032720,3600,0,'ASC'),('GNOAsX98vCsl0JRwfwL-gg','PBtmpl0000000000000078',1277868921,3600,0,'ASC'),('LdiozcIUciWuvt3Z-na5Ww','PBtmpl0000000000000078',1281501162,3600,0,'ASC'),('AssetReportFolder00001','PBtmpl0000000000000078',1281501163,3600,0,'ASC'),('N7uMnnicbyTEulcuRi1sSg','PBtmpl0000000000000078',1283900195,3600,0,'ASC'),('gI_TxK-5S4DNuv42wpImmw','PBtmpl0000000000000078',1285124155,3600,0,'ASC'),('kaPRSaf8UKiskiGEgJgLAw','PBtmpl0000000000000078',1285124155,3600,0,'ASC'),('RrV4aAPnn4dM0ZcU3OXnlw','PBtmpl0000000000000078',1286336607,3600,0,'ASC'),('1z9J1O08n_7gVVlBwSRBJQ','PBtmpl0000000000000078',1287545014,3600,0,'ASC'),('xSmREZO3GNzK3M5PaueOOQ','PBtmpl0000000000000078',1287545014,3600,0,'ASC'),('0bx-xoL8TSXXubFuqKAoVQ','PBtmpl0000000000000078',1287545014,3600,0,'ASC'),('taX2UYkFF21ALpFZY2rhMw','PBtmpl0000000000000078',1287545014,3600,0,'ASC'),('K0q_N885Httqev1VCqUWxg','PBtmpl0000000000000078',1287545014,3600,0,'ASC'),('fq1ZkYhH24R5tb96kuT10Q','PBtmpl0000000000000078',1287545014,3600,0,'ASC'),('oHk7fAFhEEkB7dHzi0QOQA','PBtmpl0000000000000078',1287545014,3600,0,'ASC'),('9M-lrlPQWeeNWfvnDnK_Xg','PBtmpl0000000000000078',1287545014,3600,0,'ASC'),('_gBYAdTcbkiyamnqi2Xskg','PBtmpl0000000000000078',1287545014,3600,0,'ASC'),('0iMMbGN3BevuCBHjjLiQNA','PBtmpl0000000000000078',1287545015,3600,0,'ASC'),('6A4yIjWwJfIE0Ep-I0jutg','PBtmpl0000000000000078',1287545015,3600,0,'ASC'),('_cD6DLM_Fs5IlrLeWUjrjg','PBtmpl0000000000000078',1287545015,3600,0,'ASC'),('f2EktltCvwQpl_3-B1yR7g','PBtmpl0000000000000078',1288748251,3600,0,'ASC'),('S1A9iAwKcQQ6P20uTqw-Ew','PBtmpl0000000000000078',1300763664,3600,0,'ASC'),('CQp-RFA2pMh5lFSggPPPYg','PBtmpl0000000000000078',1301973995,3600,0,'ASC'),('_Mi_NTd3x8UB96LWezWHnw','PBtmpl0000000000000078',1301973995,3600,0,'ASC'),('g3JH1PRq6m6Bj_PnGpcrSQ','PBtmpl0000000000000078',1301973996,3600,0,'ASC'),('G0hl4VilbFKipToyxKqFrg','PBtmpl0000000000000078',1301973997,3600,0,'ASC'),('GWU2qZqe6yEuAKG-5HtBdg','PBtmpl0000000000000078',1301973997,3600,0,'ASC'),('AsfpsOpsGzZCb9m7MyxPuw','PBtmpl0000000000000078',1301973997,3600,0,'ASC'),('1qFjOEiILIwr1xB5_ebppQ','PBtmpl0000000000000078',1301973998,3600,0,'ASC'),('xD76UfQ_JnSgTLBNvytcpQ','PBtmpl0000000000000078',1301973998,3600,0,'ASC'),('G5DgNizuG3jXkjPp6UaGrA','PBtmpl0000000000000078',1301973999,3600,0,'ASC'),('brxm_faNdZX5tRo3p50g3g','PBtmpl0000000000000078',1304392055,3600,0,'ASC'),('aNmgn0cd6tldmC1FpW4KbA','PBtmpl0000000000000078',1313542960,3600,0,'ASC'),('jEz8iTGNWEt2I05IhVV19Q','PBtmpl0000000000000078',1313542961,3600,0,'ASC'); -ALTER TABLE `Folder` ENABLE KEYS; -ALTER TABLE `Fork` DISABLE KEYS; -INSERT INTO `Fork` VALUES ('-mq3IgzukSrYDglDsAjBaA','3',NULL,'[{\"success\":1,\"url\":\"article-with-pagination\",\"focus\":1}]',NULL,1288747943,1288747943,1,1),('VqctmpgR4LeAEiSN99BcXw','3',NULL,'[{\"success\":1,\"url\":\"bare_image\",\"focus\":1}]',NULL,1288747987,1288747987,1,1),('rmZzfEszhChsVWzdovqeaQ','3',NULL,'[{\"success\":1,\"url\":\"root/import/ems/ems-event-submission\"},{\"success\":1,\"url\":\"root/import/ems/ems-event-submission-main\"},{\"success\":1,\"url\":\"root/import/ems/ems-event-submission-queue\",\"focus\":1}]',NULL,1288748017,1288748017,1,1),('kqZ1ddGvfvpRDk_u7GcJyw','3',NULL,'[{\"success\":1,\"url\":\"request-tracker-prototype\",\"focus\":1}]',NULL,1288748045,1288748045,1,1),('_kS_Xon4qNt2GWNbPk_DfA','3',NULL,'[{\"success\":1,\"url\":\"three-columns\",\"focus\":1}]',NULL,1288748064,1288748064,1,1),('tJlKtwEspjnDIIE1NuEXZg','3',NULL,'[{\"success\":1,\"url\":\"media/picklanguage\",\"focus\":1}]',NULL,1288748085,1288748085,1,1),('0gDP5tq9Ea2vhhHjoCKBHA','3',NULL,'[{\"success\":1,\"url\":\"shopping-cart-collateral-items/select-gateway-default\",\"focus\":1}]',NULL,1288748105,1288748106,1,1),('8XQJ0Xe64J2Ic6LysAlYtA','3',NULL,'[{\"success\":1,\"url\":\"root/import/auth/twitter/chooseusername/default-twitter-choose-username\",\"focus\":1}]',NULL,1288748133,1288748133,1,1),('eXLNOrKRmqqcn5SPgB2Tog','3',NULL,'[{\"success\":1,\"url\":\"root/import/gallery-templates/dragdropsorting.js\",\"focus\":1}]',NULL,1288748204,1288748204,1,1),('4VTB7K-CaJYUr_VTRX7XAg','3',NULL,'[{\"success\":1,\"url\":\"root/import/default-asset-subscription\",\"focus\":1}]',NULL,1288748258,1288748259,1,1),('phuKyKjKNDM3C-3P306ZQg','3',NULL,'[{\"success\":1,\"url\":\"admin_progress_bar\",\"focus\":1}]',NULL,1288748300,1288748300,1,1); -ALTER TABLE `Fork` ENABLE KEYS; -ALTER TABLE `ImageAsset` DISABLE KEYS; -INSERT INTO `ImageAsset` VALUES ('7-0-style0000000000002',50,NULL,1147642492,NULL),('7-0-style0000000000004',50,NULL,1147642493,NULL),('7-0-style0000000000005',50,NULL,1147642493,NULL),('7-0-style0000000000006',50,NULL,1147642493,NULL),('7-0-style0000000000007',50,NULL,1147642493,NULL),('7-0-style0000000000008',50,NULL,1147642494,NULL),('7-0-style0000000000009',50,NULL,1147642494,NULL),('7-0-style0000000000010',50,NULL,1147642494,NULL),('7-0-style0000000000011',50,NULL,1147642495,NULL),('7-0-style0000000000012',50,NULL,1147642495,NULL),('7-0-style0000000000013',50,NULL,1147642495,NULL),('7-0-style0000000000014',50,NULL,1147642495,NULL),('7-0-style0000000000015',50,NULL,1147642496,NULL),('7-0-style0000000000016',50,NULL,1147642496,NULL),('7-0-style0000000000017',50,NULL,1147642496,NULL),('7-0-style0000000000018',50,NULL,1147642496,NULL),('7-0-style0000000000019',50,NULL,1147642497,NULL),('7-0-style0000000000020',50,NULL,1147642497,NULL),('7-0-style0000000000021',50,NULL,1147642497,NULL),('7-0-style0000000000022',50,NULL,1147642497,NULL),('7-0-style0000000000023',50,NULL,1147642498,NULL),('7-0-style0000000000024',50,NULL,1147642498,NULL),('7-0-style0000000000030',50,NULL,1147642499,NULL),('7-0-style0000000000032',50,NULL,1147642500,NULL),('7-0-style0000000000034',50,NULL,1147642500,NULL),('7-0-style0000000000035',50,NULL,1147642501,NULL),('7-0-style0000000000036',50,NULL,1147642501,NULL),('7-0-style0000000000037',50,NULL,1147642501,NULL),('7-0-style0000000000038',50,NULL,1147642501,NULL),('7-0-style0000000000039',50,NULL,1147642502,NULL),('7-0-style0000000000040',50,NULL,1147642502,NULL),('7-0-style0000000000041',50,NULL,1147642502,NULL),('7-0-style0000000000042',50,NULL,1147642502,NULL),('7-0-style0000000000043',50,NULL,1147642503,NULL),('7-0-style0000000000044',50,NULL,1147642503,NULL),('7-0-style0000000000045',50,NULL,1147642503,NULL),('7-0-style0000000000046',50,NULL,1147642504,NULL),('7-0-style0000000000048',50,NULL,1147642504,NULL),('7-0-style0000000000052',50,'style=\"border-style:none;\"',1147642505,NULL),('7-0-style0000000000053',50,'style=\"border-style:none;\"',1147642505,NULL),('7-0-style0000000000054',50,'style=\"border-style:none;\"',1147642506,NULL),('7-0-style0000000000055',50,'style=\"border-style:none;\"',1147642506,NULL),('7-0-style0000000000056',50,'style=\"border-style:none;\"',1147642506,NULL),('7-0-style0000000000057',50,'style=\"border-style:none;\"',1147642507,NULL),('7-0-style0000000000058',50,'style=\"border-style:none;\"',1147642507,NULL),('7-0-style0000000000060',50,'style=\"border-style:none;\"',1147642508,NULL),('7-0-style0000000000061',50,'style=\"border-style:none;\"',1147642508,NULL),('7-0-style0000000000062',50,'style=\"border-style:none;\"',1147642508,NULL),('7-0-style0000000000063',50,'style=\"border-style:none;\"',1147642508,NULL),('7-0-style0000000000064',50,'style=\"border-style:none;\"',1147642509,NULL),('7-0-style0000000000065',50,'style=\"border-style:none;\"',1147642509,NULL),('7-0-style0000000000066',50,'style=\"border-style:none;\"',1147642509,NULL),('7-0-style0000000000067',50,'style=\"border-style:none;\"',1147642509,NULL),('7-0-style0000000000068',50,'style=\"border-style:none;\"',1147642510,NULL),('7-0-style0000000000071',50,'style=\"border-style:none;\"',1147642511,NULL),('_bZJ9LA_KNekZiFPaP2SeQ',50,'style=\"border-style:none;\" alt=\"shelf-titles.jpg\"',1210777868,NULL),('hQ7z33_jOYkQ8WNX5xy9Sw',50,'style=\"border-style:none;\" alt=\"style-button.gif\"',1209509455,NULL),('vWW_DcHiYSrKZOkkIfEfcQ',50,'style=\"border-style:none;\" alt=\"row-2.jpg\"',1209509433,NULL),('_bPYzRA87NTAUIKlfrJMHg',50,'style=\"border-style:none;\" alt=\"row-1.jpg\"',1209509433,NULL),('nJjZHRwdDs5MAZYsAyioHw',50,'style=\"border-style:none;\" alt=\"title-bg.jpg\"',1209509433,NULL),('8hxfkrJPeFVRWF5piCNJ1A',50,'style=\"border-style:none;\" alt=\"field-bg.jpg\"',1209509433,NULL),('Osx7WN52iIKHZFT4vqUBHQ',50,'style=\"border-style:none;\" alt=\"search-btn.gif\"',1209509433,NULL),('oWff8fGzRdHPyq5VNREe9Q',50,'style=\"border-style:none;\" alt=\"top-bg.jpg\"',1209509433,NULL),('uqbkvb1b9443VvfkyRz95w',50,'style=\"border-style:none;\" alt=\"save-button.gif\"',1209509433,NULL),('8YiMkcz32xalkAn3WBLpag',50,'style=\"border-style:none;\" alt=\"go-btn.gif\"',1210181860,NULL),('7-0-style0000000000059',50,'alt=\"main_top.jpg\"',1213386091,NULL),('o_pq_e4vRyhMOKFzs61eag',50,'style=\"border-style:none;\" alt=\"book-covers.jpg\"',1215714957,''),('hBpisL-_URyZnh9clR5ohA',50,'style=\"border-style:none;\" alt=\"no_photo.gif\"',1227634417,''),('FOBV6KkifreXa4GmEAUU4A',50,'style=\"border-style:none;\" alt=\"no_photo_sm.gif\"',1227634447,''),('-0sK2rX1cwQt1ipUSqsiQQ',50,'style=\"border-style:none;\" alt=\"bg.gif\"',1273032716,''),('hS_eOaVz9Qb5ixndK9EXAw',50,'style=\"border-style:none;\" alt=\"header.jpg\"',1273032716,''),('k2p-Be8C98pf2cRq7E-JHg',50,'style=\"border-style:none;\" alt=\"tab_link.gif\"',1273032716,''),('aYG4fjbMPbC4LCuuMp4gGA',50,'style=\"border-style:none;\" alt=\"tab_hover.gif\"',1273032716,''),('F122Ey0NtVAw6Lfv1M6G_Q',50,'style=\"border-style:none;\" alt=\"ico_archive.gif\"',1273032716,''),('qmXHKrQ6EDLSOGkrEKRUDA',50,'style=\"border-style:none;\" alt=\"bg_page_in.jpg\"',1273032716,''),('4qZgXjPPO4fwV879yu5XUg',50,'style=\"border-style:none;\" alt=\"bg_page.JPG\"',1273032716,''),('mb-xeAugm5GJdvu-Wh0MtQ',50,'style=\"border-style:none;\" alt=\"search_submit.gif\"',1273032717,''),('84Y9CwgzP6eNU7wZnk019Q',50,'style=\"border-style:none;\" alt=\"ico_date.gif\"',1273032717,''),('ikXTtJKZfHVxqw-47E4AQA',50,'style=\"border-style:none;\" alt=\"ico_user.gif\"',1273032717,''),('DhRWPTgzhvju_-TbMN3CwA',50,'style=\"border-style:none;\" alt=\"ico_comments.gif\"',1273032717,''),('6njI-pZz2bwsjWh-Q1_11g',50,'style=\"border-style:none;\" alt=\"ico_list.gif\"',1273032717,''),('_Hz1Gnd3yEnJzVS7l7nJMQ',50,'style=\"border-style:none;\" alt=\"content_all_bg.PNG\"',1273032717,''),('VOOrXK5dFnkGih7aTkuDWA',50,'style=\"border-style:none;\" alt=\"search.PNG\"',1273032717,''),('ruf-QejOkUHDRtfgakHlbA',50,'style=\"border-style:none;\" alt=\"col_title_bg_long.GIF\"',1273032717,''),('FSHy5KjQjkt599PHS41seA',50,'style=\"border-style:none;\" alt=\"footer.jpg\"',1273032717,''),('nuYYXAz4KNNxgfumfnpo_g',50,'style=\"border-style:none;\" alt=\"ico_top.gif\"',1273032718,''),('Mr7ljjoy6n4fZojpQWajKQ',50,'style=\"border-style:none;\" alt=\"ico_links.gif\"',1273032718,''),('ApkqpDOrJDxK3QrWBGSRIg',50,'style=\"border-style:none;\" alt=\"ico_archive2.gif\"',1273032718,''),('AzzTY0Lay1f_YGeQJFnQCA',50,'style=\"border-style:none;\" alt=\"ico_list.gif\"',1273032718,''),('bCGr7FRtZt-XYlBVUEJBjw',50,'style=\"border-style:none;\"',1278013724,''),('bANo8aiAPA7aY_oQZKxIWw',50,'style=\"border-style:none;\" alt=\"rss.gif\"',1285124155,''),('2ci_v2d4x4uvyjTRlC49OA',50,'style=\"border-style:none;\" alt=\"moveDown.gif\"',1285124156,''),('O-EsSzKgAk1KolFT-x_KsA',50,'style=\"border-style:none;\" alt=\"moveUp.gif\"',1285124156,''),('fdd8tGExyVwHyrB8RBbKXg',50,'style=\"border-style:none;\" alt=\"next.gif\"',1285124156,''),('BpisgHl4ZDcSECJp6oib1w',50,'style=\"border-style:none;\" alt=\"play.gif\"',1285124156,''),('zshreRgPAXtnF0DtVbQ1Yg',50,'style=\"border-style:none;\" alt=\"previous.gif\"',1285124156,''),('POVcY79vIqAHR8OfGt36aw',50,'style=\"border-style:none;\" alt=\"pagination_button.jpg\"',1285124156,''),('hIB-z34r8Xl-vYVYCkKr-w',50,'style=\"border-style:none;\" alt=\"bar-btn-r.jpg\"',1285124156,''),('-mPUoFlYcjqjPUPRLAlxNQ',50,'style=\"border-style:none;\" alt=\"search-field-r.jpg\"',1285124156,''),('MDpUOR-N8KMyt1J7Hh_h4w',50,'style=\"border-style:none;\" alt=\"bar-btn.jpg\"',1285124156,''),('YfXKByTwDZVituMc4h13Dg',50,'style=\"border-style:none;\" alt=\"pagination_bg.jpg\"',1285124156,''),('esko_HSU0Gh-uJZ1h3xRmQ',50,'style=\"border-style:none;\" alt=\"search-field-l.jpg\"',1285124156,''),('oSqpGswzpBG_ErdfYwIO8A',50,'style=\"border-style:none;\" alt=\"top_bg.jpg\"',1285124156,''),('MXJklShZvLLB_DSnZQmXrQ',50,'style=\"border-style:none;\" alt=\"title_bg.jpg\"',1285124156,''),('BthxD5oJ0idmsyI3ioA2FA',50,'style=\"border-style:none;\" alt=\"bar-btn-l.jpg\"',1285124156,''),('aZ-1HYQamkRHYXvzAra8WQ',50,'style=\"border-style:none;\" alt=\"search-field.jpg\"',1285124156,''),('eRkb94OYcS5AdcrrerOP5Q',50,'style=\"border-style:none;\" alt=\"rss.gif\"',1285124157,''),('TbnkjAJQEASORXIpYqDkcA',50,'style=\"border-style:none;\" alt=\"blank-image.jpg\"',1285124157,''),('er-3faBjY-hhlDcc5aKqdQ',50,'style=\"border-style:none;\" alt=\"top_bg.jpg\"',1285124157,''),('8bFsu2FJUqHRUiHcozcVFw',50,'style=\"border-style:none;\" alt=\"sub-btn-l.jpg\"',1285124157,''),('34Aayx5eA320D8VfhdfDBw',50,'style=\"border-style:none;\" alt=\"sub-btn-r.jpg\"',1285124157,''),('TlhKOVmWblZOsAdqmhEpeg',50,'style=\"border-style:none;\" alt=\"sub-btn.jpg\"',1285124157,''),('Nx0ypjO3cN6QdZUBUEE0lA',50,'style=\"border-style:none;\" alt=\"pic-title-bg.jpg\"',1285124157,''),('CmFZLN7iPS7XXvUEsxKPKA',50,'style=\"border-style:none;\" alt=\"row-2.jpg\"',1285124157,''),('v_XBgwwZqgW1D5s4y05qfg',50,'style=\"border-style:none;\" alt=\"addtl-info.gif\"',1285124157,''),('4TdAkKoQbSCvI7QWcW889A',50,'style=\"border-style:none;\" alt=\"row-1.jpg\"',1285124157,''),('SAgK6eDPCG1cgkJ59WapHQ',50,'style=\"border-style:none;\" alt=\"prev-btn.gif\"',1285124157,''),('XJYLuvGy9ubF7JNKyINtpA',50,'style=\"border-style:none;\" alt=\"play-btn.gif\"',1285124157,''),('RWj7hyv2SpZuXxwj1Wocug',50,'style=\"border-style:none;\" alt=\"next-btn.gif\"',1285124157,''),('aq8QElnlm3YufAoxRz9Pcg',50,'style=\"border-style:none;\" alt=\"data-bg.jpg\"',1285124158,''),('i6-BofrJJYozovlzFBByXg',50,'style=\"border-style:none;\"',1285124158,''),('fU_OZCmtdFNJ8a6bMve8ng',50,'style=\"border-style:none;\"',1285124158,''),('YXCtusAxb4vzZ5sTnUA5DA',50,'style=\"border-style:none;\"',1285124158,''),('k_xuE82wwp8gFVl9aaaG8g',50,'style=\"border-style:none;\"',1285124158,''),('NPM_WItpM5IzLWBhWjYfCA',50,'style=\"border-style:none;\"',1285124158,''),('A_5LVQQWR73QZR8FFbny_w',50,'style=\"border-style:none;\" alt=\"bg.gif\"',1301973995,''),('wywIfa_VuTsq0c5Ed-W-MA',50,'style=\"border-style:none;\" alt=\"bullet.gif\"',1301973995,''),('xmykMFjri1O2NrYHbeToVQ',50,'style=\"border-style:none;\" alt=\"footerbg.gif\"',1301973995,''),('0IIGNBs_-INzqBC5VLeJgw',50,'style=\"border-style:none;\" alt=\"headerbg.gif\"',1301973996,''),('FXmePdyS0YKuZ1VCGGpK9w',50,'style=\"border-style:none;\" alt=\"quote.gif\"',1301973996,''),('66qCywiE_fiL9u5YIaJhgw',50,'style=\"border-style:none;\" alt=\"tableft.gif\"',1301973996,''),('n5VpG4lFsOG1elaWDQbilw',50,'style=\"border-style:none;\" alt=\"tabright.gif\"',1301973996,''),('pAXR7Kby4O-dSxOwLp1GaA',50,'style=\"border-style:none;\" alt=\"top_mod.png\"',1301973998,''),('TthzMLO4n3qxy59QZ5YBHg',50,'style=\"border-style:none;\" alt=\"menu_bg_dark.png\"',1301973998,''),('3n31SQjYa150TBrRBgMPhA',50,'style=\"border-style:none;\" alt=\"menu_bg_light.png\"',1301973998,''),('R4RxDufGbbIzEmpcoEcLrw',50,'style=\"border-style:none;\" alt=\"logo_full.jpg\"',1301973998,''),('2q5fxatSFLgIhXaUX-oSvg',50,'style=\"border-style:none;\" alt=\"bottom-left.jpg\"',1313542960,''),('_d5WTkKjnwct-_Dk7gZHvQ',50,'style=\"border-style:none;\" alt=\"bottom-right.jpg\"',1313542960,''),('Iz2mUR3jCPKyemwAea4b2g',50,'style=\"border-style:none;\" alt=\"input_bg.jpg\"',1313542960,''),('JU9bjsLRoWj7GVHs__prig',50,'style=\"border-style:none;\" alt=\"top-left.jpg\"',1313542960,''),('noOlnjQGexHg8c4bGVUo9g',50,'style=\"border-style:none;\" alt=\"top-right.jpg\"',1313542960,''); -ALTER TABLE `ImageAsset` ENABLE KEYS; -ALTER TABLE `Layout` DISABLE KEYS; -INSERT INTO `Layout` VALUES ('_iHetEvMQUOoxS-T2CM0sQ','PBtmpl0000000000000054','x_WjMvFmilhX-jvZuIpinw','Vzv1pWpg_w6R_o-b0rM2qQ',1273172789,'asc','PBtmpl0000000000000054'),('8Bb8gu-me2mhL3ljFyiWLg','PBtmpl0000000000000135','4Yfz9hqBqM8OYMGuQK8oLw,iCYOjohB9SKvAPr6bXElKA,Wl8WZ43g2rK5AYr9o4zY7w.ix1p0AbwKAz8QWB-T-HHfg,LBuiKzg2mWwmOPS9AgV3bg,jTNggl7AoVSUc_ZzrvuCmw',NULL,1271359194,'asc','PBtmpl0000000000000054'),('mTOiwwk3q4k9g5-XykXhPA','PBtmpl0000000000000054','j_1qEqM6iLfQLiR6VKy0aA,diZvW4bSgZWwyyGP3qXi1g,o_pq_e4vRyhMOKFzs61eag',NULL,1271349647,'asc','PBtmpl0000000000000054'),('2TqQc4OISddWCZmRY1_m8A','PBtmpl0000000000000109','l0guT3vTR3B8cL6vtP-g3A.k2Qj03FrAOXYra8kDJYYXw.nWxS5jnA3o3DgPEwBeR7yQ.ksSfkZdsr0uC62NwIk6hFQ',NULL,1271357565,'asc','PBtmpl0000000000000054'),('x3OFY6OJh_qsXkZfPwug4A','PBtmpl0000000000000054','pJd5TLAjfWMVXD6sCRLwUg',NULL,1271348790,'asc','PBtmpl0000000000000054'),('68sKwDgf9cGH58-NZcU4lg','PBtmpl0000000000000054','TKzUMeIxRLrZ3NAEez6CXQ,sWVXMZGibxHe2Ekj1DCldA',NULL,1286336676,'asc','PBtmpl0000000000000054'); -ALTER TABLE `Layout` ENABLE KEYS; -ALTER TABLE `Navigation` DISABLE KEYS; -INSERT INTO `Navigation` VALUES ('PBnav00000000000000001','self\nancestors','relativeToCurrentUrl','0',55,0,0,0,'PBtmpl0000000000000093',55,1124395696,'text/html',0),('PBnav00000000000000014','pedigree','relativeToRoot','1',55,0,0,0,'PBnav00000000000bullet',55,1124395696,'text/html',0),('PBnav00000000000000015','descendants','relativeToCurrentUrl','0',1,0,0,0,'PBnav00000000000bullet',55,1124395696,'text/html',0),('PBnav00000000000000016','descendants','relativeToCurrentUrl','0',1,0,0,0,'PBtmpl0000000000000108',55,1124395696,'text/html',0),('PBnav00000000000000017','self\nsiblings','relativeToCurrentUrl','0',55,0,0,0,'PBtmpl0000000000000117',55,1124395696,'text/html',0),('PBnav00000000000000018','descendants','relativeToCurrentUrl','-1',1,0,0,0,'PBnav00000000000bullet',55,1124395696,'text/html',0),('PBnav00000000000000019','descendants','relativeToCurrentUrl','-1',1,0,0,0,'PBtmpl0000000000000108',55,1124395696,'text/html',0),('PBnav00000000000000020','descendants','relativeToRoot','0',1,0,0,0,'PBtmpl0000000000000108',55,1124395696,'text/html',0),('PBnav00000000000000021','descendants','specificUrl','home',3,0,0,0,'PBtmpl0000000000000117',55,1124395696,'text/html',0),('PBnav00000000000000002','descendants','specificUrl','home',3,0,0,0,'PBnav00000000000bullet',55,1124395696,'text/html',0),('PBnav00000000000000006','descendants','specificUrl','home',1,0,0,0,'PBtmpl0000000000000108',55,1124395696,'text/html',0),('PBnav00000000000000007','descendants','relativeToRoot','1',1,0,0,0,'PBnav00000000000bullet',55,1124395696,'text/html',0),('PBnav00000000000000008','descendants','relativeToRoot','1',1,0,0,0,'PBtmpl0000000000000108',55,1124395696,'text/html',0),('PBnav00000000000000009','descendants','relativeToRoot','0',1,0,0,0,'PBtmpl0000000000000124',55,1124395696,'text/html',0),('PBnav00000000000000010','descendants','relativeToRoot','1',1,0,0,0,'PBtmpl0000000000000117',55,1124395696,'text/html',0),('PBnav00000000000000011','self\ndescendants','relativeToRoot','1',55,0,0,0,'PBtmpl0000000000000130',55,1124395696,'text/html',0),('PBnav00000000000000012','descendants','relativeToRoot','1',55,0,0,0,'PBtmpl0000000000000134',55,1124395696,'text/html',0),('PBnav00000000000000013','self\ndescendants','relativeToCurrentUrl','0',55,0,0,0,'PBtmpl0000000000000136',55,1124395696,'text/html',0),('7-0-style0000000000025','descendants','relativeToRoot','1',1,0,0,0,'stevenav00000000000001',55,1147642498,'text/html',0),('7-0-style0000000000026','descendants','relativeToRoot','2',1,0,0,0,'PBnav000000style01lvl2',55,1147642499,'text/html',0),('7-0-style0000000000070','descendants','relativeToRoot','1',55,0,0,0,'stevecoolmenu000000001',55,1147642510,'text/html',0),('jVKLVakT_iA2010_oEuAwg','self\ndescendants','specificUrl','department',1,0,0,0,'stevecoolmenu000000001',55,1224116526,'text/html',0),('x_hiUi1XZloBvV47Obnu8Q','ancestors\nself','relativeToCurrentUrl','0',55,0,0,0,'hpCk0B3vQzgc-QJhSol41w',55,1273032718,'text/html',0),('pJd5TLAjfWMVXD6sCRLwUg','descendants','specificUrl','root',55,0,0,0,'PBnav00000000000bullet',55,1271348790,'text/html',0),('Vch1Ww7G_JpBhOhXX07RDg','ancestors','relativeToCurrentUrl','0',55,0,1,0,'alraubvBu-YJJ614jAHD5w',1,1281501163,'text/html',0),('Am1J-meNBmhqFfEIWy6Gag','ancestors\ndescendants','relativeToRoot','1',2,0,0,0,'gaIOm5cr2TkT9Fk6QmZWug',55,1287545014,'text/html',0),('jmqLxnoWb6p92Cr12lf1hw','self\npedigree','relativeToRoot','2',55,0,0,0,'ztfi__vHJLsQDsMenrEn-w',55,1301973997,'text/html',0),('h0bOzz7WvdaVZXsjpwtkww','pedigree','relativeToRoot','1',55,0,0,0,'_z3ukLCqvoaUygfsbbkBzw',55,1301973998,'text/html',0),('qFOfW1sKyOTnGNcP6BXbwg','ancestors\nself','relativeToCurrentUrl','0',55,0,0,0,'Pt38T5_MWSue2e1N36MLdw',55,1301973999,'text/html',0),('n-Vr_wgxOkwiHGt1nJto9w','descendants','specificUrl','/',1,0,0,0,'39KNX53B4nYJAyIE1lu8ZQ',55,1309236774,'text/html',0); -ALTER TABLE `Navigation` ENABLE KEYS; -ALTER TABLE `RichEdit` DISABLE KEYS; -INSERT INTO `RichEdit` VALUES ('PBrichedit000000000002',0,0,0,0,0,0,0,0,0,0,'ltr','bottom',NULL,'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','bold\nitalic\nbullist\nnumlist\nlink\nunlink\nemotions',NULL,NULL,0,1124395696,0,0,NULL),('PBrichedit000000000001',0,0,0,0,600,500,0,0,0,0,'ltr','bottom',NULL,'strong/b[*],em/i[*],*[*]','bold\nitalic\njustifyleft\njustifycenter\njustifyright\njustifyfull\noutdent\nindent\nsub\nsup\nformatselect\nremoveformat','bullist\nnumlist\nlink\nwgpagetree\nanchor\nunlink\nadvhr\nimage\nwginsertimage\ncharmap\nwgmacro','replace\ntablecontrols\nvisualaid\ncode\ncleanup\npreview',1,1256092369,0,0,0); -ALTER TABLE `RichEdit` ENABLE KEYS; -ALTER TABLE `Survey_questionTypes` DISABLE KEYS; -INSERT INTO `Survey_questionTypes` VALUES ('Scale','[]'),('Gender','[{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Male\",\"recordedAnswer\":0,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Female\",\"recordedAnswer\":1,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1}]'),('Education','[{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Elementary or some high school\",\"recordedAnswer\":0,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"High school/GED\",\"recordedAnswer\":1,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Some college/vocational school\",\"recordedAnswer\":2,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"College graduate\",\"recordedAnswer\":3,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Some graduate work\",\"recordedAnswer\":4,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Master\'s degree\",\"recordedAnswer\":5,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Doctorate (of any type)\",\"recordedAnswer\":6,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":1,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Other degree (verbatim)\",\"recordedAnswer\":7,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1}]'),('Importance','[{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Not at all important\",\"recordedAnswer\":0,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":1,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":2,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":3,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":4,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":5,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":6,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":7,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":8,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":9,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Extremely important\",\"recordedAnswer\":10,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1}]'),('Yes/No','[{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Yes\",\"recordedAnswer\":1,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"No\",\"recordedAnswer\":0,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1}]'),('Confidence','[{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Not at all confident\",\"recordedAnswer\":0,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":1,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":2,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":3,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":4,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":5,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":6,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":7,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":8,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":9,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Extremely confident\",\"recordedAnswer\":10,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1}]'),('Effectiveness','[{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Not at all effective\",\"recordedAnswer\":0,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":1,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":2,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":3,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":4,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":5,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":6,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":7,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":8,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":9,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Extremely effective\",\"recordedAnswer\":10,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1}]'),('Oppose/Support','[{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Strongly oppose\",\"recordedAnswer\":0,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":1,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":2,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":3,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":4,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":5,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Strongly support\",\"recordedAnswer\":6,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1}]'),('Certainty','[{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Not at all certain\",\"recordedAnswer\":0,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":1,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":2,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":3,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":4,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":5,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":6,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":7,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":8,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":9,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Extremely certain\",\"recordedAnswer\":10,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1}]'),('True/False','[{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"True\",\"recordedAnswer\":1,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"False\",\"recordedAnswer\":0,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1}]'),('Concern','[{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Not at all concerned\",\"recordedAnswer\":0,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":1,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":2,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":3,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":4,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":5,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":6,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":7,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":8,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":9,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Extremely concerned\",\"recordedAnswer\":10,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1}]'),('Ideology','[{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Strongly liberal\",\"recordedAnswer\":0,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Liberal\",\"recordedAnswer\":1,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Somewhat liberal\",\"recordedAnswer\":2,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Middle of the road\",\"recordedAnswer\":3,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Slightly conservative\",\"recordedAnswer\":4,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Conservative\",\"recordedAnswer\":5,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Strongly conservative\",\"recordedAnswer\":6,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1}]'),('Security','[{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Not at all secure\",\"recordedAnswer\":0,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":1,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":2,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":3,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":4,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":5,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":6,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":7,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":8,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":9,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Extremely secure\",\"recordedAnswer\":10,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1}]'),('Risk','[{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"No risk\",\"recordedAnswer\":0,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":1,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":2,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":3,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":4,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":5,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":6,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":7,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":8,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":9,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Extreme risk\",\"recordedAnswer\":10,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1}]'),('Agree/Disagree','[{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Strongly disagree\",\"recordedAnswer\":0,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":1,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":2,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":3,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":4,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":5,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Strongly agree\",\"recordedAnswer\":6,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1}]'),('Race','[{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"American Indian\",\"recordedAnswer\":0,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Asian\",\"recordedAnswer\":1,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Black\",\"recordedAnswer\":2,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Hispanic\",\"recordedAnswer\":3,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"White non-Hispanic\",\"recordedAnswer\":4,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":1,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Something else (verbatim)\",\"recordedAnswer\":5,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1}]'),('Threat','[{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"No threat\",\"recordedAnswer\":0,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":1,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":2,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":3,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":4,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":5,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":6,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":7,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":8,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":9,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Extreme threat\",\"recordedAnswer\":10,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1}]'),('Party','[{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Democratic party\",\"recordedAnswer\":0,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Republican party (or GOP)\",\"recordedAnswer\":1,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Independent party\",\"recordedAnswer\":2,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":1,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Other party (verbatim)\",\"recordedAnswer\":3,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1}]'),('Likelihood','[{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Not at all likely\",\"recordedAnswer\":0,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":1,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":2,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":3,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":4,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":5,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":6,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":7,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":8,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":9,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Extremely likely\",\"recordedAnswer\":10,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1}]'),('Multiple Choice','[]'),('Satisfaction','[{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Not at all satisfied\",\"recordedAnswer\":0,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":1,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":2,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":3,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":4,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":5,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":6,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":7,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":8,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"\",\"recordedAnswer\":9,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1},{\"verbatim\":0,\"value\":1,\"min\":1,\"gotoExpression\":\"\",\"textCols\":10,\"max\":10,\"step\":1,\"terminal\":0,\"textRows\":5,\"text\":\"Extremely satisfied\",\"recordedAnswer\":10,\"type\":\"answer\",\"terminalUrl\":\"\",\"goto\":\"\",\"isCorrect\":1}]'); -ALTER TABLE `Survey_questionTypes` ENABLE KEYS; -ALTER TABLE `SyndicatedContent` DISABLE KEYS; -INSERT INTO `SyndicatedContent` VALUES ('http://www.plainblack.com/news/news?func=viewRSS',3,'fK-HMSboA3uu0c1KYkYspA','GNvjCFQWjY2AF2uf0aCM8Q',1124395696,'',3600,0,'pubDate_des'); -ALTER TABLE `SyndicatedContent` ENABLE KEYS; -ALTER TABLE `Workflow` DISABLE KEYS; -INSERT INTO `Workflow` VALUES ('pbworkflow000000000001','Daily Maintenance Tasks','This workflow runs daily maintenance tasks such as cleaning up old temporary files and cache.',1,'None','singleton'),('pbworkflow000000000002','Weekly Maintenance Tasks','This workflow runs once per week to perform maintenance tasks like cleaning up log files.',1,'None','singleton'),('pbworkflow000000000004','Hourly Maintenance Tasks','This workflow runs once per hour to perform maintenance tasks like deleting expired user sessions.',1,'None','singleton'),('pbworkflow000000000003','Commit Without Approval','This workflow commits all the assets in this version tag without asking for any approval.',1,'WebGUI::VersionTag','parallel'),('pbworkflow000000000005','Commit With Approval','This workflow commits all the assets in this version tag after getting approval from content managers.',1,'WebGUI::VersionTag','parallel'),('pbworkflow000000000006','Unlock Version Tag and Notify Owner','This workflow is used when a version tag approval is denied. It unlocks the version tag, making it available for editing, and notifies the tag owner.',1,'WebGUI::VersionTag','parallel'),('pbworkflow000000000007','Send Queued Email Messages','Sends all the messages in the mail queue.',1,'None','singleton'),('csworkflow000000000001','Get CS Mail','Retrieves mail from a POP3 account for the given Collaboration System.',1,'WebGUI::Asset::Wobject::Collaboration','singleton'),('AuthLDAPworkflow000001','Synchronize Profile To LDAP','Synchronizes a users LDAP information to their WebGUI User Profile',1,'WebGUI::User','singleton'),('DPWwf20061030000000002','Delete Exported Files','Deletes exported files from an asset being deleted or moved.',1,'None','parallel'),('PassiveAnalytics000001','Analyze Passive Analytics','Manual changes to this workflow will be lost. Please only use the Passive Analytics screen to make changes',1,'None','singleton'),('send_webgui_statistics','Send WebGUI Stats','This workflow sends some information about your site to the central WebGUI statistics repository. No personal information is sent. The information is used to help determine the future direction WebGUI should take.',0,'None','singleton'),('taxeurecheckworkflow01','Recheck unverified EU VAT numbers','Utility workflow that automatically rechecks VAT numbers that could not be checked when they were submitted',1,'None','parallel'),('xR-_GRRbjBojgLsFx3dEMA','Update CS Subscription members','This workflow will be run whenever the viewing permissions are changed on an Asset. It will update the members of the subscription group, and remove members who can no longer view the Asset.',1,'WebGUI::Asset','parallel'); -ALTER TABLE `Workflow` ENABLE KEYS; -ALTER TABLE `WorkflowActivity` DISABLE KEYS; -INSERT INTO `WorkflowActivity` VALUES ('pbwfactivity0000000001','pbworkflow000000000001','Delete temp files older than 24 hours',NULL,1,'WebGUI::Workflow::Activity::CleanTempStorage'),('pbwfactivity0000000002','pbworkflow000000000001','Prune file cache larger than 100MB',NULL,3,'WebGUI::Workflow::Activity::CleanFileCache'),('pbwfactivity0000000022','pbworkflow000000000001','Prune database cache larger than 100MB',NULL,4,'WebGUI::Workflow::Activity::CleanDatabaseCache'),('pbwfactivity0000000005','pbworkflow000000000001','Archive old CS threads',NULL,5,'WebGUI::Workflow::Activity::ArchiveOldThreads'),('vtagactivity0000000002','pbworkflow000000000003','Wait Until','This workflow waits until the value chosen in the \"Wait Until\" field has passed and then continues',1,'WebGUI::Workflow::Activity::WaitUntil'),('pbwfactivity0000000007','pbworkflow000000000001','deal with user groupings that have expired',NULL,6,'WebGUI::Workflow::Activity::ExpireGroupings'),('pbwfactivity0000000011','pbworkflow000000000001','Expire old subscription codes',NULL,7,'WebGUI::Workflow::Activity::ExpireSubscriptionCodes'),('pbwfactivity0000000014','pbworkflow000000000001','Summarize Passive Profiling Data',NULL,8,'WebGUI::Workflow::Activity::SummarizePassiveProfileLog'),('pbwfactivity0000000015','pbworkflow000000000001','Sync User Profiles With LDAP',NULL,9,'WebGUI::Workflow::Activity::SyncProfilesToLdap'),('pbwfactivity0000000003','pbworkflow000000000002','Delete login entries older than 90 days',NULL,1,'WebGUI::Workflow::Activity::CleanLoginHistory'),('pbwfactivity0000000004','pbworkflow000000000002','Move clipboard items older than 30 days to trash',NULL,2,'WebGUI::Workflow::Activity::TrashClipboard'),('pbwfactivity0000000008','pbworkflow000000000002','delete asset revisions older than a year from the database',NULL,3,'WebGUI::Workflow::Activity::PurgeOldAssetRevisions'),('pbwfactivity0000000010','pbworkflow000000000002','delete assets from trash that have been sitting around for 30 days',NULL,4,'WebGUI::Workflow::Activity::PurgeOldTrash'),('pbwfactivity0000000009','pbworkflow000000000004','delete expired sessions',NULL,1,'WebGUI::Workflow::Activity::DeleteExpiredSessions'),('pbwfactivity0000000012','pbworkflow000000000004','Get syndicated content',NULL,2,'WebGUI::Workflow::Activity::GetSyndicatedContent'),('vtagactivity0000000001','pbworkflow000000000005','Wait Until','This workflow waits until the value chosen in the \"Wait Until\" field has passed and then continues',2,'WebGUI::Workflow::Activity::WaitUntil'),('pbwfactivity0000000017','pbworkflow000000000005','Get Approval from Content Managers',NULL,1,'WebGUI::Workflow::Activity::RequestApprovalForVersionTag'),('pbwfactivity0000000019','pbworkflow000000000006','Unlock Version Tag',NULL,1,'WebGUI::Workflow::Activity::UnlockVersionTag'),('pbwfactivity0000000020','pbworkflow000000000006','Notify Committer of Denial',NULL,2,'WebGUI::Workflow::Activity::NotifyAboutVersionTag'),('pbwfactivity0000000021','pbworkflow000000000007','Send Queued Messages',NULL,1,'WebGUI::Workflow::Activity::SendQueuedMailMessages'),('csactivity000000000001','csworkflow000000000001','Get the mail',NULL,1,'WebGUI::Workflow::Activity::GetCsMail'),('Dl_3P-4y1OoOTf3cRwQ7EA','AuthLDAPworkflow000001','Synchronize Profile To LDAP',NULL,1,'WebGUI::Workflow::Activity::SyncProfileToLdap'),('DPWwfa2006103000000002','DPWwf20061030000000002','Delete Exported Files',NULL,1,'WebGUI::Workflow::Activity::DeleteExportedFiles'),('SWHs3shndnc8LuLpmLeeNw','pbworkflow000000000004','Update Calendar Feeds','This activity imports calendar events from calendar feeds',3,'WebGUI::Workflow::Activity::CalendarUpdateFeeds'),('pbwfactivity0000000006','pbworkflow000000000003','Commit Assets',NULL,2,'WebGUI::Workflow::Activity::CommitVersionTag'),('newslettersendactivity','pbworkflow000000000002','Send Newsletters For Newsletter Assets',NULL,5,'WebGUI::Workflow::Activity::SendNewsletters'),('unansweredfriends_____','pbworkflow000000000001','Deny Friend Requests Older Than A Month',NULL,10,'WebGUI::Workflow::Activity::DenyUnansweredFriends'),('pbwfactivity0000000016','pbworkflow000000000005','Commit Assets',NULL,3,'WebGUI::Workflow::Activity::CommitVersionTag'),('pbwfactivity0000000018','pbworkflow000000000005','Notify Committer of Approval',NULL,4,'WebGUI::Workflow::Activity::NotifyAboutVersionTag'),('4X02MxKDfvNwzyY4u_yEwQ','PassiveAnalytics000001','Perform duration analysis',NULL,1,'WebGUI::Workflow::Activity::SummarizePassiveAnalytics'),('zUZZLAyKNUl933pI4RspPg','PassiveAnalytics000001','Please log entries into buckets',NULL,2,'WebGUI::Workflow::Activity::BucketPassiveAnalytics'),('1BbO0rpY9-fGqlfpMDHang','pbworkflow000000000001','Remove old carts',NULL,11,'WebGUI::Workflow::Activity::RemoveOldCarts'),('C2v8fZHn-epffECKPWE87g','pbworkflow000000000004','Expire Purchased Thingy Records','Expire any expired thingy records. Send notifications of imminent expiration.',4,'WebGUI::Workflow::Activity::ExpirePurchasedThingyRecords'),('LT8Y9qSH4mOkgH7GVlj6ww','pbworkflow000000000001','Archive Old Stories','Archive old stories, based on the settings of the Story Archives that own them',12,'WebGUI::Workflow::Activity::ArchiveOldStories'),('send_webgui_statistics','send_webgui_statistics','Send WebGUI Stats',NULL,1,'WebGUI::Workflow::Activity::SendWebguiStats'),('ixOnGnjE6D1m71WzhSxcFQ','pbworkflow000000000001','Expire Incomplete Survey Responses','Expires incomplete Survey Responses according to per-instance Survey settings',13,'WebGUI::Workflow::Activity::ExpireIncompleteSurveyResponses'),('g6jJY1hPVgrUm5PKzrfZaQ','pbworkflow000000000001','Purge Denied EMS Submissions','Purges EMS Submissions that were denied and are aged according to parameters.',14,'WebGUI::Workflow::Activity::CleanupEMSSubmissions'),('w5DtU9T4SzFLwiXjP5hEbg','pbworkflow000000000004','Process Approves EMS Submissions','Create EMS Ticket Assets for approved submissions.',5,'WebGUI::Workflow::Activity::ProcessEMSApprovals'),('taxeurecheckactivity01','taxeurecheckworkflow01','Untitled',NULL,1,'WebGUI::Workflow::Activity::RecheckVATNumber'),('ZATo3t_rm09J74Cs_Xavyg','pbworkflow000000000002','Extend Calendar Recurrences','Create events for live recurrences up to two years from the current date',6,'WebGUI::Workflow::Activity::ExtendCalendarRecurrences'),('XqxlXlGJ4SWSVtslEWgSQw','pbworkflow000000000001','Remove Old Forks',NULL,15,'WebGUI::Workflow::Activity::RemoveOldForks'),('giPru6RaHW6SiPHOXIHkyQ','xR-_GRRbjBojgLsFx3dEMA','Untitled',NULL,1,'WebGUI::Workflow::Activity::UpdateAssetSubscribers'); -ALTER TABLE `WorkflowActivity` ENABLE KEYS; -ALTER TABLE `WorkflowActivityData` DISABLE KEYS; -INSERT INTO `WorkflowActivityData` VALUES ('pbwfactivity0000000001','storageTimeout','86400'),('pbwfactivity0000000002','sizeLimit','100000000'),('pbwfactivity0000000022','sizeLimit','100000000'),('vtagactivity0000000002','type','startTime'),('pbwfactivity0000000003','ageToDelete','7776000'),('pbwfactivity0000000004','trashAfter','2592000'),('pbwfactivity0000000008','purgeAfter','31536000'),('pbwfactivity0000000010','purgeAfter','2592000'),('vtagactivity0000000001','type','startTime'),('pbwfactivity0000000017','message','A new version tag awaits your approval.'),('pbwfactivity0000000017','doOnDeny','pbworkflow000000000006'),('pbwfactivity0000000017','groupToApprove','4'),('pbwfactivity0000000020','message','Your version tag was denied. Please take corrective actions and recommit your changes.'),('pbwfactivity0000000020','who','committer'),('unansweredfriends_____','timeout','2592000'),('pbwfactivity0000000006','trashAfter','2592000'),('pbwfactivity0000000018','who','committer'),('pbwfactivity0000000018','message','Your version tag was approved.'),('pbwfactivity0000000017','templateId','lYhMheuuLROK_iNjaQuPKg'),('pbwfactivity0000000018','templateId','lYhMheuuLROK_iNjaQuPKg'),('pbwfactivity0000000020','templateId','lYhMheuuLROK_iNjaQuPKg'); -ALTER TABLE `WorkflowActivityData` ENABLE KEYS; -ALTER TABLE `WorkflowSchedule` DISABLE KEYS; -INSERT INTO `WorkflowSchedule` VALUES ('pbcron0000000000000001','Daily Maintenance',1,0,'30','23','*','*','*','pbworkflow000000000001',NULL,NULL,3,NULL),('pbcron0000000000000002','Weekly Maintenance',1,0,'30','1','*','*','0','pbworkflow000000000002',NULL,NULL,3,NULL),('pbcron0000000000000003','Hourly Maintenance',1,0,'15','*','*','*','*','pbworkflow000000000004',NULL,NULL,3,NULL),('pbcron0000000000000004','Send Queued Email Messages Every 5 Minutes',1,0,'*/5','*','*','*','*','pbworkflow000000000007',NULL,NULL,3,NULL),('NpRVTSR-NX2sD52LUc520A','Request Tracker Mail',0,0,'*/5','*','*','*','*','csworkflow000000000001','WebGUI::Asset::Wobject::Collaboration','new',2,'{\n \"parameters\" : \"pbproto000000000000002\"\n}'); -ALTER TABLE `WorkflowSchedule` ENABLE KEYS; -ALTER TABLE `asset` DISABLE KEYS; -INSERT INTO `asset` VALUES ('PBasset000000000000001','infinity','000001','published','WebGUI::Asset',1124395696,'3','997995720','3',NULL,1,NULL),('PBasset000000000000002','PBasset000000000000001','000001000001','published','WebGUI::Asset::Wobject::Folder',1124395696,'3','997995720','3',NULL,1,NULL),('68sKwDgf9cGH58-NZcU4lg','PBasset000000000000001','000001000002','published','WebGUI::Asset::Wobject::Layout',1124395696,'3','997995720','3',NULL,0,NULL),('iCYOjohB9SKvAPr6bXElKA','8Bb8gu-me2mhL3ljFyiWLg','000001000002000002000002','published','WebGUI::Asset::Wobject::Article',1147642516,'3','997995720','3',NULL,0,NULL),('ix1p0AbwKAz8QWB-T-HHfg','8Bb8gu-me2mhL3ljFyiWLg','000001000002000002000001','published','WebGUI::Asset::Wobject::Article',1147642516,'3','997995720','3',NULL,0,NULL),('_iHetEvMQUOoxS-T2CM0sQ','68sKwDgf9cGH58-NZcU4lg','000001000002000001','published','WebGUI::Asset::Wobject::Layout',1124395696,'3','997995720','3',NULL,0,NULL),('8Bb8gu-me2mhL3ljFyiWLg','68sKwDgf9cGH58-NZcU4lg','000001000002000002','published','WebGUI::Asset::Wobject::Layout',1124395696,'3','997995720','3',NULL,0,NULL),('IWFxZDyGhQ3-SLZhELa3qw','68sKwDgf9cGH58-NZcU4lg','000001000002000007','published','WebGUI::Asset::Wobject::Article',1147642514,'3','997995720','3',NULL,0,NULL),('bX5rYxb6tZ9docY6sUhBlw','_iHetEvMQUOoxS-T2CM0sQ','000001000002000001000001','published','WebGUI::Asset::Wobject::Article',1147642514,'3','997995720','3',NULL,0,NULL),('Vzv1pWpg_w6R_o-b0rM2qQ','_iHetEvMQUOoxS-T2CM0sQ','000001000002000001000002','published','WebGUI::Asset::File',1147642515,'3','997995720','3',NULL,0,NULL),('NK8bqlwVRILJknqeCDPBHg','_iHetEvMQUOoxS-T2CM0sQ','000001000002000001000003','published','WebGUI::Asset::Wobject::Article',1147642515,'3','997995720','3',NULL,0,NULL),('2TqQc4OISddWCZmRY1_m8A','68sKwDgf9cGH58-NZcU4lg','000001000002000004','published','WebGUI::Asset::Wobject::Layout',1124395696,'3','997995720','3',NULL,0,NULL),('fK-HMSboA3uu0c1KYkYspA','2TqQc4OISddWCZmRY1_m8A','000001000002000004000001','published','WebGUI::Asset::Wobject::SyndicatedContent',1124395696,'3','997995720','3',NULL,0,NULL),('x3OFY6OJh_qsXkZfPwug4A','68sKwDgf9cGH58-NZcU4lg','000001000002000005','published','WebGUI::Asset::Wobject::Layout',1124395696,'3','997995720','3',NULL,0,NULL),('pJd5TLAjfWMVXD6sCRLwUg','x3OFY6OJh_qsXkZfPwug4A','000001000002000005000001','published','WebGUI::Asset::Wobject::Navigation',1124395696,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000003','7-0-style0000000000001','000001000001000049000002','published','WebGUI::Asset::Snippet',1147642492,'3','997995720','3',NULL,0,NULL),('PBnav00000000000000001','BFfNj5wA9bDw8H3cnr8pTw','000001000001000025000008','published','WebGUI::Asset::Wobject::Navigation',1124395696,'3','997995720','3',NULL,0,NULL),('PBnav00000000000000014','BFfNj5wA9bDw8H3cnr8pTw','000001000001000025000009','published','WebGUI::Asset::Wobject::Navigation',1124395696,'3','997995720','3',NULL,0,NULL),('PBnav00000000000000015','BFfNj5wA9bDw8H3cnr8pTw','000001000001000025000010','published','WebGUI::Asset::Wobject::Navigation',1124395696,'3','997995720','3',NULL,0,NULL),('PBnav00000000000000016','BFfNj5wA9bDw8H3cnr8pTw','000001000001000025000011','published','WebGUI::Asset::Wobject::Navigation',1124395696,'3','997995720','3',NULL,0,NULL),('PBnav00000000000000017','BFfNj5wA9bDw8H3cnr8pTw','000001000001000025000012','published','WebGUI::Asset::Wobject::Navigation',1124395696,'3','997995720','3',NULL,0,NULL),('PBnav00000000000000018','BFfNj5wA9bDw8H3cnr8pTw','000001000001000025000013','published','WebGUI::Asset::Wobject::Navigation',1124395696,'3','997995720','3',NULL,0,NULL),('PBnav00000000000000019','BFfNj5wA9bDw8H3cnr8pTw','000001000001000025000014','published','WebGUI::Asset::Wobject::Navigation',1124395696,'3','997995720','3',NULL,0,NULL),('PBnav00000000000000020','BFfNj5wA9bDw8H3cnr8pTw','000001000001000025000015','published','WebGUI::Asset::Wobject::Navigation',1124395696,'3','997995720','3',NULL,0,NULL),('PBnav00000000000000021','BFfNj5wA9bDw8H3cnr8pTw','000001000001000025000016','published','WebGUI::Asset::Wobject::Navigation',1124395696,'3','997995720','3',NULL,0,NULL),('PBnav00000000000000002','BFfNj5wA9bDw8H3cnr8pTw','000001000001000025000017','published','WebGUI::Asset::Wobject::Navigation',1124395696,'3','997995720','3',NULL,0,NULL),('PBnav00000000000000006','BFfNj5wA9bDw8H3cnr8pTw','000001000001000025000018','published','WebGUI::Asset::Wobject::Navigation',1124395696,'3','997995720','3',NULL,0,NULL),('PBnav00000000000000007','BFfNj5wA9bDw8H3cnr8pTw','000001000001000025000019','published','WebGUI::Asset::Wobject::Navigation',1124395696,'3','997995720','3',NULL,0,NULL),('PBnav00000000000000008','BFfNj5wA9bDw8H3cnr8pTw','000001000001000025000020','published','WebGUI::Asset::Wobject::Navigation',1124395696,'3','997995720','3',NULL,0,NULL),('PBnav00000000000000009','BFfNj5wA9bDw8H3cnr8pTw','000001000001000025000021','published','WebGUI::Asset::Wobject::Navigation',1124395696,'3','997995720','3',NULL,0,NULL),('PBnav00000000000000010','BFfNj5wA9bDw8H3cnr8pTw','000001000001000025000022','published','WebGUI::Asset::Wobject::Navigation',1124395696,'3','997995720','3',NULL,0,NULL),('PBnav00000000000000011','BFfNj5wA9bDw8H3cnr8pTw','000001000001000025000023','published','WebGUI::Asset::Wobject::Navigation',1124395696,'3','997995720','3',NULL,0,NULL),('PBnav00000000000000012','BFfNj5wA9bDw8H3cnr8pTw','000001000001000025000024','published','WebGUI::Asset::Wobject::Navigation',1124395696,'3','997995720','3',NULL,0,NULL),('PBnav00000000000000013','BFfNj5wA9bDw8H3cnr8pTw','000001000001000025000025','published','WebGUI::Asset::Wobject::Navigation',1124395696,'3','997995720','3',NULL,0,NULL),('Wl8WZ43g2rK5AYr9o4zY7w','8Bb8gu-me2mhL3ljFyiWLg','000001000002000002000004','published','WebGUI::Asset::Wobject::Article',1147642516,'3','997995720','3',NULL,0,NULL),('4Yfz9hqBqM8OYMGuQK8oLw','8Bb8gu-me2mhL3ljFyiWLg','000001000002000002000003','published','WebGUI::Asset::Wobject::Article',1147642516,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000005','7-0-style0000000000001','000001000001000049000004','published','WebGUI::Asset::File::Image',1147642493,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000006','7-0-style0000000000001','000001000001000049000005','published','WebGUI::Asset::File::Image',1147642493,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000103','TvOZs8U1kRXLtwtmyW75pg','000001000001000004000001','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000002','TvOZs8U1kRXLtwtmyW75pg','000001000001000004000002','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000115','TvOZs8U1kRXLtwtmyW75pg','000001000001000004000003','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000066','GNOAsX98vCsl0JRwfwL-gg','000001000001000008000001','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000080','GNOAsX98vCsl0JRwfwL-gg','000001000001000008000002','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000097','GNOAsX98vCsl0JRwfwL-gg','000001000001000008000003','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000112','GNOAsX98vCsl0JRwfwL-gg','000001000001000008000004','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000121','GNOAsX98vCsl0JRwfwL-gg','000001000001000008000005','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000067','GNOAsX98vCsl0JRwfwL-gg','000001000001000008000006','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000026','GNOAsX98vCsl0JRwfwL-gg','000001000001000008000007','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000128','GNOAsX98vCsl0JRwfwL-gg','000001000001000008000008','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000079','GNOAsX98vCsl0JRwfwL-gg','000001000001000008000009','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000083','GNOAsX98vCsl0JRwfwL-gg','000001000001000008000010','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000082','GNOAsX98vCsl0JRwfwL-gg','000001000001000008000011','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000056','TYo2Bwl7aafzTtdHlS-arQ','000001000001000028000001','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000135','aNNC62qLAS6TB-0_MCYjsw','000001000001000019000001','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000131','aNNC62qLAS6TB-0_MCYjsw','000001000001000019000002','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000054','aNNC62qLAS6TB-0_MCYjsw','000001000001000019000003','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000024','tXwf1zaOXTvsqPn6yu-GSw','000001000001000013000001','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000088','tPagC0AQErZXjLFZQ6OI1g','000001000001000017000001','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000078','GYaFxnMu9UsEG8oanwB6TA','000001000001000014000001','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('-PkdI8l1idu-8gDX3iOdcw','aNNC62qLAS6TB-0_MCYjsw','000001000001000019000007','published','WebGUI::Asset::Template',1247482172,'3','997995720','3',NULL,0,NULL),('VyCINX2KixKYr2pzQGX9Mg','aNNC62qLAS6TB-0_MCYjsw','000001000001000019000006','published','WebGUI::Asset::Snippet',1246968584,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000109','aNNC62qLAS6TB-0_MCYjsw','000001000001000019000004','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000094','aNNC62qLAS6TB-0_MCYjsw','000001000001000019000005','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000133','GNOAsX98vCsl0JRwfwL-gg','000001000001000008000012','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000065','oGfxez5sksyB_PcaAsEm_Q','000001000001000043000001','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000055','VZK3CRgiMb8r4dBjUmCTgQ','000001000001000027000001','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000020','-K8Hj45mbelljN9-0CXZxg','000001000001000010000001','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000085','-K8Hj45mbelljN9-0CXZxg','000001000001000010000002','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000104','-K8Hj45mbelljN9-0CXZxg','000001000001000010000003','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000021','-K8Hj45mbelljN9-0CXZxg','000001000001000010000004','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000033','N13SD1Fpqk00UgBt1Z8ivQ','000001000001000016000001','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000047','cj2y4papTVGZRFdwTI-_fw','000001000001000023000001','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000029','GNOAsX98vCsl0JRwfwL-gg','000001000001000008000013','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000032','GNOAsX98vCsl0JRwfwL-gg','000001000001000008000014','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000027','GNOAsX98vCsl0JRwfwL-gg','000001000001000008000015','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000031','GNOAsX98vCsl0JRwfwL-gg','000001000001000008000016','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('jTNggl7AoVSUc_ZzrvuCmw','8Bb8gu-me2mhL3ljFyiWLg','000001000002000002000006','published','WebGUI::Asset::Wobject::Article',1147642517,'3','997995720','3',NULL,0,NULL),('LBuiKzg2mWwmOPS9AgV3bg','8Bb8gu-me2mhL3ljFyiWLg','000001000002000002000005','published','WebGUI::Asset::Wobject::Article',1147642517,'3','997995720','3',NULL,0,NULL),('GNvjCFQWjY2AF2uf0aCM8Q','oGfxez5sksyB_PcaAsEm_Q','000001000001000043000002','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000068','GNOAsX98vCsl0JRwfwL-gg','000001000001000008000017','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000099','GNOAsX98vCsl0JRwfwL-gg','000001000001000008000018','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000114','GNOAsX98vCsl0JRwfwL-gg','000001000001000008000019','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000092','V3l5S5TtI7wMm1WpIMhvOA','000001000001000021000009000001','published','WebGUI::Asset::Template',1124395696,'3','1222803175','3',NULL,0,NULL),('PBtmpl0000000000000044','V3l5S5TtI7wMm1WpIMhvOA','000001000001000021000009000002','published','WebGUI::Asset::Template',1124395696,'3','1222803175','3',NULL,0,NULL),('PBtmpl0000000000000059','bbiA9Zq5Gy2oCFBlILO3QA','000001000001000038000001','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('IZkrow_zwvbf4FCH-taVTQ','QHn6T9rU7KsnS3Y70KCNTg','000001000001000002000002','published','WebGUI::Asset::Wobject::Folder',1226011853,'3','997995720','3',NULL,0,NULL),('QHn6T9rU7KsnS3Y70KCNTg','PBasset000000000000002','000001000001000002','published','WebGUI::Asset::Wobject::Folder',1227080251,'3','997995720','3',NULL,0,NULL),('HPDOcsj4gBme8D4svHodBw','QHn6T9rU7KsnS3Y70KCNTg','000001000001000002000001','published','WebGUI::Asset::Wobject::Folder',1225404573,'3','997995720','3',NULL,0,NULL),('PBrichedit000000000002','TCtybxdqmdwdvRn555zpCQ','000001000001000032000002','published','WebGUI::Asset::RichEdit',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000063','5bnNzteN7w3NnK9mF4XiCg','000001000001000042000001','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000062','5bnNzteN7w3NnK9mF4XiCg','000001000001000042000002','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000061','5bnNzteN7w3NnK9mF4XiCg','000001000001000042000003','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('matrixtmpl000000000007','LdiozcIUciWuvt3Z-na5Ww','000001000001000022000012','published','WebGUI::Asset::Template',1236594030,'3','1238119576','3',NULL,0,NULL),('PBtmpl0000000000000116','-K8Hj45mbelljN9-0CXZxg','000001000001000010000005','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000007','7-0-style0000000000001','000001000001000049000006','published','WebGUI::Asset::File::Image',1147642493,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000093','BFfNj5wA9bDw8H3cnr8pTw','000001000001000025000001','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000108','BFfNj5wA9bDw8H3cnr8pTw','000001000001000025000002','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000117','BFfNj5wA9bDw8H3cnr8pTw','000001000001000025000003','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000124','BFfNj5wA9bDw8H3cnr8pTw','000001000001000025000004','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000130','BFfNj5wA9bDw8H3cnr8pTw','000001000001000025000005','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000134','BFfNj5wA9bDw8H3cnr8pTw','000001000001000025000006','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000077','GNOAsX98vCsl0JRwfwL-gg','000001000001000008000020','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000098','GNOAsX98vCsl0JRwfwL-gg','000001000001000008000021','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000122','GNOAsX98vCsl0JRwfwL-gg','000001000001000008000022','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000136','BFfNj5wA9bDw8H3cnr8pTw','000001000001000025000007','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000013','9M-lrlPQWeeNWfvnDnK_Xg','000001000001000005000007000001','published','WebGUI::Asset::Template',1124395696,'3','1222803164','3',NULL,0,NULL),('PBtmpl0000000000000010','K0q_N885Httqev1VCqUWxg','000001000001000005000004000001','published','WebGUI::Asset::Template',1124395696,'3','1222803164','3',NULL,0,NULL),('PBtmpl0000000000000011','fq1ZkYhH24R5tb96kuT10Q','000001000001000005000005000001','published','WebGUI::Asset::Template',1124395696,'3','1222803164','3',NULL,0,NULL),('PBtmpl0000000000000014','_gBYAdTcbkiyamnqi2Xskg','000001000001000005000008000001','published','WebGUI::Asset::Template',1124395696,'3','1222803164','3',NULL,0,NULL),('PBtmpl0000000000000012','oHk7fAFhEEkB7dHzi0QOQA','000001000001000005000006000001','published','WebGUI::Asset::Template',1124395696,'3','1222803164','3',NULL,0,NULL),('PBtmpl0000000000000006','taX2UYkFF21ALpFZY2rhMw','000001000001000005000003000001','published','WebGUI::Asset::Template',1124395696,'3','1222803163','3',NULL,0,NULL),('PBtmpl0000000000000004','xSmREZO3GNzK3M5PaueOOQ','000001000001000005000001000001','published','WebGUI::Asset::Template',1124395696,'3','1222803163','3',NULL,0,NULL),('PBtmpl0000000000000005','0bx-xoL8TSXXubFuqKAoVQ','000001000001000005000002000001','published','WebGUI::Asset::Template',1124395696,'3','1222803163','3',NULL,0,NULL),('PBtmpl0000000000000057','Ik9HHky10DIyFTKehUD1dw','000001000001000031000001','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000060','RrV4aAPnn4dM0ZcU3OXnlw','000001000001000041000001','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('pbrobot000000000000001','PBasset000000000000002','000001000001000033','published','WebGUI::Asset::Snippet',1147642511,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000111','RrV4aAPnn4dM0ZcU3OXnlw','000001000001000041000002','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000137','RrV4aAPnn4dM0ZcU3OXnlw','000001000001000041000003','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000132','RrV4aAPnn4dM0ZcU3OXnlw','000001000001000041000004','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000123','TvOZs8U1kRXLtwtmyW75pg','000001000001000004000004','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000081','GNOAsX98vCsl0JRwfwL-gg','000001000001000008000023','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000101','GNOAsX98vCsl0JRwfwL-gg','000001000001000008000024','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000065','7-0-style0000000000049','000001000001000051000016','published','WebGUI::Asset::File::Image',1147642509,'3','997995720','3',NULL,0,NULL),('OhdaFLE7sXOzo_SIP2ZUgA','68sKwDgf9cGH58-NZcU4lg','000001000002000006','published','WebGUI::Asset::Wobject::Article',1147642513,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000113','GNOAsX98vCsl0JRwfwL-gg','000001000001000008000025','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000037','GdkQpvjRtJqtzOUbwIIQRA','000001000001000021000002000001','published','WebGUI::Asset::Template',1124395696,'3','1222803175','3',NULL,0,NULL),('PBtmpl0000000000000038','tnc5iYyynX2hfdEs9D3P8w','000001000001000021000003000001','published','WebGUI::Asset::Template',1124395696,'3','1222803175','3',NULL,0,NULL),('PBtmpl0000000000000036','tBL7BWiQRZFed2Y-Zjo9tQ','000001000001000021000001000001','published','WebGUI::Asset::Template',1124395696,'3','1222803175','3',NULL,0,NULL),('PBtmpl0000000000000039','vgXdBcFTqU7h4wBG1ewdBw','000001000001000021000004000001','published','WebGUI::Asset::Template',1124395696,'3','1222803175','3',NULL,0,NULL),('PBtmpl0000000000000091','vgXdBcFTqU7h4wBG1ewdBw','000001000001000021000004000002','published','WebGUI::Asset::Template',1124395696,'3','1222803175','3',NULL,0,NULL),('PBtmpl0000000000000107','vgXdBcFTqU7h4wBG1ewdBw','000001000001000021000004000003','published','WebGUI::Asset::Template',1124395696,'3','1222803175','3',NULL,0,NULL),('PBtmpl0000000000000040','hcFlqnXlsmC1ujN6Id0F0A','000001000001000021000005000001','published','WebGUI::Asset::Template',1124395696,'3','1222803175','3',NULL,0,NULL),('PBtmpl0000000000000041','eRJR52fvlaxfetv3DQkQYw','000001000001000021000006000001','published','WebGUI::Asset::Template',1124395696,'3','1222803175','3',NULL,0,NULL),('PBtmpl0000000000000042','5HIDHq5lAWHV5gpYGS0zLg','000001000001000021000007000001','published','WebGUI::Asset::Template',1124395696,'3','1222803175','3',NULL,0,NULL),('PBtmpl0000000000000045','y8XkRdxIperLKkJ3bL5sSQ','000001000001000021000011000001','published','WebGUI::Asset::Template',1124395696,'3','1222803175','3',NULL,0,NULL),('PBtmpl0000000000000043','rYEFwXXo0tkGhQTcbDibvg','000001000001000021000008000001','published','WebGUI::Asset::Template',1124395696,'3','1222803175','3',NULL,0,NULL),('7-0-style0000000000064','7-0-style0000000000049','000001000001000051000015','published','WebGUI::Asset::File::Image',1147642509,'3','997995720','3',NULL,0,NULL),('PBrichedit000000000001','TCtybxdqmdwdvRn555zpCQ','000001000001000032000001','published','WebGUI::Asset::RichEdit',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000053','aNmgn0cd6tldmC1FpW4KbA','000001000001000036000017','published','WebGUI::Asset::Template',1124395696,'3','1222802960','3',NULL,0,NULL),('PBtmpl0000000000000001','nbSrhXZQuxIjhWFaFPSuVA','000001000001000003000001','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000140','Da6KWn805L4B5e4HFgQRQA','000001000001000037000001','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000141','-K8Hj45mbelljN9-0CXZxg','000001000001000010000006','published','WebGUI::Asset::Template',1124395696,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000066','7-0-style0000000000049','000001000001000051000017','published','WebGUI::Asset::File::Image',1147642509,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000062','7-0-style0000000000049','000001000001000051000013','published','WebGUI::Asset::File::Image',1147642508,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000060','7-0-style0000000000049','000001000001000051000011','published','WebGUI::Asset::File::Image',1147642508,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000061','7-0-style0000000000049','000001000001000051000012','published','WebGUI::Asset::File::Image',1147642508,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000057','7-0-style0000000000049','000001000001000051000008','published','WebGUI::Asset::File::Image',1147642507,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000058','7-0-style0000000000049','000001000001000051000009','published','WebGUI::Asset::File::Image',1147642507,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000059','7-0-style0000000000049','000001000001000051000010','published','WebGUI::Asset::File::Image',1147642507,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000056','7-0-style0000000000049','000001000001000051000007','published','WebGUI::Asset::File::Image',1147642506,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000052','7-0-style0000000000049','000001000001000051000003','published','WebGUI::Asset::File::Image',1147642505,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000053','7-0-style0000000000049','000001000001000051000004','published','WebGUI::Asset::File::Image',1147642505,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000054','7-0-style0000000000049','000001000001000051000005','published','WebGUI::Asset::File::Image',1147642506,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000055','7-0-style0000000000049','000001000001000051000006','published','WebGUI::Asset::File::Image',1147642506,'3','997995720','3',NULL,0,NULL),('stevecoolmenu000000001','7-0-style0000000000049','000001000001000051000001','published','WebGUI::Asset::Template',1147642505,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000051','7-0-style0000000000049','000001000001000051000002','published','WebGUI::Asset::Snippet',1147642505,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000049','PBasset000000000000002','000001000001000051','published','WebGUI::Asset::Wobject::Folder',1147642504,'3','997995720','3',NULL,0,NULL),('stevestyle000000000002','7-0-style0000000000031','000001000001000050000016','published','WebGUI::Asset::Template',1147642504,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000048','7-0-style0000000000031','000001000001000050000017','published','WebGUI::Asset::File::Image',1147642504,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000046','7-0-style0000000000031','000001000001000050000015','published','WebGUI::Asset::File::Image',1147642504,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000044','7-0-style0000000000031','000001000001000050000013','published','WebGUI::Asset::File::Image',1147642503,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000045','7-0-style0000000000031','000001000001000050000014','published','WebGUI::Asset::File::Image',1147642503,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000043','7-0-style0000000000031','000001000001000050000012','published','WebGUI::Asset::File::Image',1147642503,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000041','7-0-style0000000000031','000001000001000050000010','published','WebGUI::Asset::File::Image',1147642502,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000042','7-0-style0000000000031','000001000001000050000011','published','WebGUI::Asset::File::Image',1147642502,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000038','7-0-style0000000000031','000001000001000050000007','published','WebGUI::Asset::File::Image',1147642501,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000039','7-0-style0000000000031','000001000001000050000008','published','WebGUI::Asset::File::Image',1147642502,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000040','7-0-style0000000000031','000001000001000050000009','published','WebGUI::Asset::File::Image',1147642502,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000036','7-0-style0000000000031','000001000001000050000005','published','WebGUI::Asset::File::Image',1147642501,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000037','7-0-style0000000000031','000001000001000050000006','published','WebGUI::Asset::File::Image',1147642501,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000034','7-0-style0000000000031','000001000001000050000003','published','WebGUI::Asset::File::Image',1147642500,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000035','7-0-style0000000000031','000001000001000050000004','published','WebGUI::Asset::File::Image',1147642501,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000032','7-0-style0000000000031','000001000001000050000001','published','WebGUI::Asset::File::Image',1147642500,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000033','7-0-style0000000000031','000001000001000050000002','published','WebGUI::Asset::Snippet',1147642500,'3','997995720','3',NULL,0,NULL),('PBnav000000style01lvl2','7-0-style0000000000001','000001000001000049000028','published','WebGUI::Asset::Template',1147642499,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000030','7-0-style0000000000001','000001000001000049000029','published','WebGUI::Asset::File::Image',1147642499,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000031','PBasset000000000000002','000001000001000050','published','WebGUI::Asset::Wobject::Folder',1147642500,'3','997995720','3',NULL,0,NULL),('stevenav00000000000001','7-0-style0000000000001','000001000001000049000027','published','WebGUI::Asset::Template',1147642499,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000025','7-0-style0000000000001','000001000001000049000024','published','WebGUI::Asset::Wobject::Navigation',1147642498,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000026','7-0-style0000000000001','000001000001000049000025','published','WebGUI::Asset::Wobject::Navigation',1147642499,'3','997995720','3',NULL,0,NULL),('stevestyle000000000001','7-0-style0000000000001','000001000001000049000026','published','WebGUI::Asset::Template',1147642499,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000023','7-0-style0000000000001','000001000001000049000022','published','WebGUI::Asset::File::Image',1147642498,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000024','7-0-style0000000000001','000001000001000049000023','published','WebGUI::Asset::File::Image',1147642498,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000022','7-0-style0000000000001','000001000001000049000021','published','WebGUI::Asset::File::Image',1147642497,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000021','7-0-style0000000000001','000001000001000049000020','published','WebGUI::Asset::File::Image',1147642497,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000018','7-0-style0000000000001','000001000001000049000017','published','WebGUI::Asset::File::Image',1147642496,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000019','7-0-style0000000000001','000001000001000049000018','published','WebGUI::Asset::File::Image',1147642497,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000020','7-0-style0000000000001','000001000001000049000019','published','WebGUI::Asset::File::Image',1147642497,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000017','7-0-style0000000000001','000001000001000049000016','published','WebGUI::Asset::File::Image',1147642496,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000016','7-0-style0000000000001','000001000001000049000015','published','WebGUI::Asset::File::Image',1147642496,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000015','7-0-style0000000000001','000001000001000049000014','published','WebGUI::Asset::File::Image',1147642496,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000014','7-0-style0000000000001','000001000001000049000013','published','WebGUI::Asset::File::Image',1147642495,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000012','7-0-style0000000000001','000001000001000049000011','published','WebGUI::Asset::File::Image',1147642495,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000013','7-0-style0000000000001','000001000001000049000012','published','WebGUI::Asset::File::Image',1147642495,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000010','7-0-style0000000000001','000001000001000049000009','published','WebGUI::Asset::File::Image',1147642494,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000011','7-0-style0000000000001','000001000001000049000010','published','WebGUI::Asset::File::Image',1147642495,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000009','7-0-style0000000000001','000001000001000049000008','published','WebGUI::Asset::File::Image',1147642494,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000008','7-0-style0000000000001','000001000001000049000007','published','WebGUI::Asset::File::Image',1147642494,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000067','7-0-style0000000000049','000001000001000051000018','published','WebGUI::Asset::File::Image',1147642509,'3','997995720','3',NULL,0,NULL),('PBtmplHelp000000000001','nbSrhXZQuxIjhWFaFPSuVA','000001000001000003000002','published','WebGUI::Asset::Template',1124395706,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000001','PBasset000000000000002','000001000001000049','published','WebGUI::Asset::Wobject::Folder',1147642492,'3','997995720','3',NULL,0,NULL),('SynConXSLT000000000001','oGfxez5sksyB_PcaAsEm_Q','000001000001000043000003','published','WebGUI::Asset::Snippet',1124395707,'3','997995720','3',NULL,0,NULL),('SynConXSLT000000000002','oGfxez5sksyB_PcaAsEm_Q','000001000001000043000004','published','WebGUI::Asset::Snippet',1124395707,'3','997995720','3',NULL,0,NULL),('SynConXSLT000000000003','oGfxez5sksyB_PcaAsEm_Q','000001000001000043000005','published','WebGUI::Asset::Snippet',1124395707,'3','997995720','3',NULL,0,NULL),('SynConXSLT000000000004','oGfxez5sksyB_PcaAsEm_Q','000001000001000043000006','published','WebGUI::Asset::Snippet',1124395707,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000063','7-0-style0000000000049','000001000001000051000014','published','WebGUI::Asset::File::Image',1147642508,'3','997995720','3',NULL,0,NULL),('stevestyle000000000003','7-0-style0000000000049','000001000001000051000020','published','WebGUI::Asset::Template',1147642510,'3','997995720','3',NULL,0,NULL),('matrixtmpl000000000002','LdiozcIUciWuvt3Z-na5Ww','000001000001000022000001','published','WebGUI::Asset::Template',1133743238,'3','997995720','3',NULL,0,NULL),('matrixtmpl000000000001','LdiozcIUciWuvt3Z-na5Ww','000001000001000022000002','published','WebGUI::Asset::Template',1133743238,'3','997995720','3',NULL,0,NULL),('matrixtmpl000000000003','LdiozcIUciWuvt3Z-na5Ww','000001000001000022000003','published','WebGUI::Asset::Template',1133743238,'3','997995720','3',NULL,0,NULL),('matrixtmpl000000000004','LdiozcIUciWuvt3Z-na5Ww','000001000001000022000004','published','WebGUI::Asset::Template',1133743239,'3','997995720','3',NULL,0,NULL),('matrixtmpl000000000005','LdiozcIUciWuvt3Z-na5Ww','000001000001000022000005','published','WebGUI::Asset::Template',1133743239,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000004','7-0-style0000000000001','000001000001000049000003','published','WebGUI::Asset::File::Image',1147642493,'3','997995720','3',NULL,0,NULL),('IOB0000000000000000002','3uuBf8cYuj1sew2OJXl9tg','000001000001000018000001','published','WebGUI::Asset::Template',1133743239,'3','997995720','3',NULL,0,NULL),('IOB0000000000000000001','3uuBf8cYuj1sew2OJXl9tg','000001000001000018000002','published','WebGUI::Asset::Template',1133743239,'3','997995720','3',NULL,0,NULL),('PBtmplBlankStyle000001','RrV4aAPnn4dM0ZcU3OXnlw','000001000001000041000005','published','WebGUI::Asset::Template',1133743239,'3','997995720','3',NULL,0,NULL),('DashboardViewTmpl00001','S1A9iAwKcQQ6P20uTqw-Ew','000001000001000009000001','published','WebGUI::Asset::Template',1133743239,'3','997995720','3',NULL,0,NULL),('WeatherDataTmpl0000001','9wKWdum0_8z-OhhquWLtSQ','000001000001000048000001','published','WebGUI::Asset::Template',1133743239,'3','997995720','3',NULL,0,NULL),('StockDataTMPL000000002','Efe2W0UgrSRDltNJ87jlfg','000001000001000039000001','published','WebGUI::Asset::Template',1133743239,'3','997995720','3',NULL,0,NULL),('StockDataTMPL000000001','Efe2W0UgrSRDltNJ87jlfg','000001000001000039000002','published','WebGUI::Asset::Template',1133743239,'3','997995720','3',NULL,0,NULL),('MultiSearchTmpl0000001','bBzO4CWjqU_ile3gf5Iypw','000001000001000024000001','published','WebGUI::Asset::Template',1133743239,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000068','7-0-style0000000000049','000001000001000051000019','published','WebGUI::Asset::File::Image',1147642510,'3','997995720','3',NULL,0,NULL),('ZipArchiveTMPL00000001','CSN-ZON7Uwv8kxf3F1fh5Q','000001000001000053000001','published','WebGUI::Asset::Template',1133743240,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000002','7-0-style0000000000001','000001000001000049000001','published','WebGUI::Asset::File::Image',1147642492,'3','997995720','3',NULL,0,NULL),('WVtmpl0000000000000001','nqNbSUAhk9Vd1zda2SCz9A','000001000001000021000010000001','published','WebGUI::Asset::Template',1133743240,'3','1222803175','3',NULL,0,NULL),('2CS-BErrjMmESOtGT90qOg','HPDOcsj4gBme8D4svHodBw','000001000001000002000001000003','published','WebGUI::Asset::Template',1227070888,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000208','GNOAsX98vCsl0JRwfwL-gg','000001000001000008000026','published','WebGUI::Asset::Template',1147642410,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000209','GNOAsX98vCsl0JRwfwL-gg','000001000001000008000027','published','WebGUI::Asset::Template',1147642410,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000210','GNOAsX98vCsl0JRwfwL-gg','000001000001000008000028','published','WebGUI::Asset::Template',1147642410,'3','997995720','3',NULL,0,NULL),('ProjectManagerTMPL0004','yD1SMHelczihzjEmx6eXBA','000001000001000030000002000001','published','WebGUI::Asset::Template',1147642415,'3','1222803147','3',NULL,0,NULL),('ProjectManagerTMPL0003','pV7GnZdpjR3XpZaSINIoeg','000001000001000030000003000001','published','WebGUI::Asset::Template',1147642415,'3','1222803147','3',NULL,0,NULL),('ProjectManagerTMPL0002','71e17KeduiXgODLMlUxiow','000001000001000030000004000001','published','WebGUI::Asset::Template',1147642415,'3','1222803147','3',NULL,0,NULL),('ProjectManagerTMPL0001','9A-mg2gwWmaYi9o_1C7ArQ','000001000001000030000001000001','published','WebGUI::Asset::Template',1147642415,'3','1222803147','3',NULL,0,NULL),('TimeTrackingTMPL000002','vTymIDYL2YqEh6PV50F7ew','000001000001000046000001000001','published','WebGUI::Asset::Template',1147642417,'3','1222803153','3',NULL,0,NULL),('TimeTrackingTMPL000003','lo1ac3BsoJx3ijGQ3gR-bQ','000001000001000046000002000001','published','WebGUI::Asset::Template',1147642417,'3','1222803153','3',NULL,0,NULL),('TimeTrackingTMPL000001','huASapWvFDzqwOSbcN-JFQ','000001000001000046000003000001','published','WebGUI::Asset::Template',1147642417,'3','1222803153','3',NULL,0,NULL),('PBtmpl0000000000000200','f_tn9FfoSfKWX43F83v_3w','000001000001000034000001','published','WebGUI::Asset::Template',1147642427,'3','997995720','3',NULL,0,NULL),('PBasset000000000000003','PBasset000000000000001','000001000003','published','WebGUI::Asset::Wobject::Folder',1147642437,'3','997995720','3',NULL,1,NULL),('pbproto000000000000002','GNOAsX98vCsl0JRwfwL-gg','000001000001000008000031','published','WebGUI::Asset::Wobject::Collaboration',1147642465,'3','1288748045','3',NULL,0,NULL),('pbtmpl0000000000000220','tXwf1zaOXTvsqPn6yu-GSw','000001000001000013000002','published','WebGUI::Asset::Template',1147642465,'3','997995720','3',NULL,0,NULL),('pbtmpl0000000000000221','tXwf1zaOXTvsqPn6yu-GSw','000001000001000013000003','published','WebGUI::Asset::Template',1147642465,'3','997995720','3',NULL,0,NULL),('nbSrhXZQuxIjhWFaFPSuVA','PBasset000000000000002','000001000001000003','published','WebGUI::Asset::Wobject::Folder',1147642465,'3','997995720','3',NULL,0,NULL),('TvOZs8U1kRXLtwtmyW75pg','PBasset000000000000002','000001000001000004','published','WebGUI::Asset::Wobject::Folder',1147642465,'3','997995720','3',NULL,0,NULL),('xSmREZO3GNzK3M5PaueOOQ','1z9J1O08n_7gVVlBwSRBJQ','000001000001000005000001','published','WebGUI::Asset::Wobject::Folder',1147642466,'3','1222803163','3',NULL,0,NULL),('0bx-xoL8TSXXubFuqKAoVQ','1z9J1O08n_7gVVlBwSRBJQ','000001000001000005000002','published','WebGUI::Asset::Wobject::Folder',1147642466,'3','1222803163','3',NULL,0,NULL),('taX2UYkFF21ALpFZY2rhMw','1z9J1O08n_7gVVlBwSRBJQ','000001000001000005000003','published','WebGUI::Asset::Wobject::Folder',1147642466,'3','1222803163','3',NULL,0,NULL),('K0q_N885Httqev1VCqUWxg','1z9J1O08n_7gVVlBwSRBJQ','000001000001000005000004','published','WebGUI::Asset::Wobject::Folder',1147642466,'3','1222803164','3',NULL,0,NULL),('fq1ZkYhH24R5tb96kuT10Q','1z9J1O08n_7gVVlBwSRBJQ','000001000001000005000005','published','WebGUI::Asset::Wobject::Folder',1147642466,'3','1222803164','3',NULL,0,NULL),('oHk7fAFhEEkB7dHzi0QOQA','1z9J1O08n_7gVVlBwSRBJQ','000001000001000005000006','published','WebGUI::Asset::Wobject::Folder',1147642466,'3','1222803164','3',NULL,0,NULL),('9M-lrlPQWeeNWfvnDnK_Xg','1z9J1O08n_7gVVlBwSRBJQ','000001000001000005000007','published','WebGUI::Asset::Wobject::Folder',1147642466,'3','1222803164','3',NULL,0,NULL),('_gBYAdTcbkiyamnqi2Xskg','1z9J1O08n_7gVVlBwSRBJQ','000001000001000005000008','published','WebGUI::Asset::Wobject::Folder',1147642466,'3','1222803164','3',NULL,0,NULL),('GNOAsX98vCsl0JRwfwL-gg','PBasset000000000000002','000001000001000008','published','WebGUI::Asset::Wobject::Folder',1147642466,'3','997995720','3',NULL,0,NULL),('S1A9iAwKcQQ6P20uTqw-Ew','PBasset000000000000002','000001000001000009','published','WebGUI::Asset::Wobject::Folder',1147642468,'3','997995720','3',NULL,0,NULL),('-K8Hj45mbelljN9-0CXZxg','PBasset000000000000002','000001000001000010','published','WebGUI::Asset::Wobject::Folder',1147642468,'3','997995720','3',NULL,0,NULL),('tXwf1zaOXTvsqPn6yu-GSw','PBasset000000000000002','000001000001000013','published','WebGUI::Asset::Wobject::Folder',1147642469,'3','997995720','3',NULL,0,NULL),('GYaFxnMu9UsEG8oanwB6TA','PBasset000000000000002','000001000001000014','published','WebGUI::Asset::Wobject::Folder',1147642470,'3','997995720','3',NULL,0,NULL),('N13SD1Fpqk00UgBt1Z8ivQ','PBasset000000000000002','000001000001000016','published','WebGUI::Asset::Wobject::Folder',1147642470,'3','997995720','3',NULL,0,NULL),('tPagC0AQErZXjLFZQ6OI1g','PBasset000000000000002','000001000001000017','published','WebGUI::Asset::Wobject::Folder',1147642470,'3','997995720','3',NULL,0,NULL),('default_post_received1','GNOAsX98vCsl0JRwfwL-gg','000001000001000008000029','published','WebGUI::Asset::Template',1222708029,'3','1222803001','3',NULL,0,NULL),('3uuBf8cYuj1sew2OJXl9tg','PBasset000000000000002','000001000001000018','published','WebGUI::Asset::Wobject::Folder',1147642470,'3','997995720','3',NULL,0,NULL),('aNNC62qLAS6TB-0_MCYjsw','PBasset000000000000002','000001000001000019','published','WebGUI::Asset::Wobject::Folder',1147642471,'3','997995720','3',NULL,0,NULL),('tBL7BWiQRZFed2Y-Zjo9tQ','zyWi26q9na-iiZqL4yedog','000001000001000021000001','published','WebGUI::Asset::Wobject::Folder',1147642471,'3','1222803175','3',NULL,0,NULL),('GdkQpvjRtJqtzOUbwIIQRA','zyWi26q9na-iiZqL4yedog','000001000001000021000002','published','WebGUI::Asset::Wobject::Folder',1147642471,'3','1222803175','3',NULL,0,NULL),('tnc5iYyynX2hfdEs9D3P8w','zyWi26q9na-iiZqL4yedog','000001000001000021000003','published','WebGUI::Asset::Wobject::Folder',1147642472,'3','1222803175','3',NULL,0,NULL),('vgXdBcFTqU7h4wBG1ewdBw','zyWi26q9na-iiZqL4yedog','000001000001000021000004','published','WebGUI::Asset::Wobject::Folder',1147642472,'3','1222803175','3',NULL,0,NULL),('hcFlqnXlsmC1ujN6Id0F0A','zyWi26q9na-iiZqL4yedog','000001000001000021000005','published','WebGUI::Asset::Wobject::Folder',1147642473,'3','1222803175','3',NULL,0,NULL),('eRJR52fvlaxfetv3DQkQYw','zyWi26q9na-iiZqL4yedog','000001000001000021000006','published','WebGUI::Asset::Wobject::Folder',1147642473,'3','1222803175','3',NULL,0,NULL),('5HIDHq5lAWHV5gpYGS0zLg','zyWi26q9na-iiZqL4yedog','000001000001000021000007','published','WebGUI::Asset::Wobject::Folder',1147642473,'3','1222803175','3',NULL,0,NULL),('rYEFwXXo0tkGhQTcbDibvg','zyWi26q9na-iiZqL4yedog','000001000001000021000008','published','WebGUI::Asset::Wobject::Folder',1147642473,'3','1222803175','3',NULL,0,NULL),('V3l5S5TtI7wMm1WpIMhvOA','zyWi26q9na-iiZqL4yedog','000001000001000021000009','published','WebGUI::Asset::Wobject::Folder',1147642473,'3','1222803175','3',NULL,0,NULL),('nqNbSUAhk9Vd1zda2SCz9A','zyWi26q9na-iiZqL4yedog','000001000001000021000010','published','WebGUI::Asset::Wobject::Folder',1147642474,'3','1222803175','3',NULL,0,NULL),('y8XkRdxIperLKkJ3bL5sSQ','zyWi26q9na-iiZqL4yedog','000001000001000021000011','published','WebGUI::Asset::Wobject::Folder',1147642474,'3','1222803175','3',NULL,0,NULL),('LdiozcIUciWuvt3Z-na5Ww','PBasset000000000000002','000001000001000022','published','WebGUI::Asset::Wobject::Folder',1147642474,'3','997995720','3',NULL,0,NULL),('cj2y4papTVGZRFdwTI-_fw','PBasset000000000000002','000001000001000023','published','WebGUI::Asset::Wobject::Folder',1147642475,'3','997995720','3',NULL,0,NULL),('bBzO4CWjqU_ile3gf5Iypw','PBasset000000000000002','000001000001000024','published','WebGUI::Asset::Wobject::Folder',1147642475,'3','997995720','3',NULL,0,NULL),('BFfNj5wA9bDw8H3cnr8pTw','PBasset000000000000002','000001000001000025','published','WebGUI::Asset::Wobject::Folder',1147642475,'3','997995720','3',NULL,0,NULL),('AgyFhx3eXlfZXNp2MkrsiQ','NywJYmGWe1f6EBXJnWg9Xg','000001000001000029000001','published','WebGUI::Asset::Wobject::Folder',1147642477,'3','1222803652','3',NULL,0,NULL),('F7MAQ-cpuvQ1KuC7J4P5zQ','NywJYmGWe1f6EBXJnWg9Xg','000001000001000029000002','published','WebGUI::Asset::Wobject::Folder',1147642477,'3','1222803653','3',NULL,0,NULL),('jEz8iTGNWEt2I05IhVV19Q','aNmgn0cd6tldmC1FpW4KbA','000001000001000036000016','published','WebGUI::Asset::Wobject::Folder',1147642477,'3','1222802937','3',NULL,0,NULL),('VZK3CRgiMb8r4dBjUmCTgQ','PBasset000000000000002','000001000001000027','published','WebGUI::Asset::Wobject::Folder',1147642477,'3','997995720','3',NULL,0,NULL),('TYo2Bwl7aafzTtdHlS-arQ','PBasset000000000000002','000001000001000028','published','WebGUI::Asset::Wobject::Folder',1147642478,'3','997995720','3',NULL,0,NULL),('9A-mg2gwWmaYi9o_1C7ArQ','-WM2dt0ZGpDasuL2wWocxg','000001000001000030000001','published','WebGUI::Asset::Wobject::Folder',1147642478,'3','1222803147','3',NULL,0,NULL),('yD1SMHelczihzjEmx6eXBA','-WM2dt0ZGpDasuL2wWocxg','000001000001000030000002','published','WebGUI::Asset::Wobject::Folder',1147642478,'3','1222803147','3',NULL,0,NULL),('pV7GnZdpjR3XpZaSINIoeg','-WM2dt0ZGpDasuL2wWocxg','000001000001000030000003','published','WebGUI::Asset::Wobject::Folder',1147642478,'3','1222803147','3',NULL,0,NULL),('71e17KeduiXgODLMlUxiow','-WM2dt0ZGpDasuL2wWocxg','000001000001000030000004','published','WebGUI::Asset::Wobject::Folder',1147642479,'3','1222803147','3',NULL,0,NULL),('Ik9HHky10DIyFTKehUD1dw','PBasset000000000000002','000001000001000031','published','WebGUI::Asset::Wobject::Folder',1147642479,'3','997995720','3',NULL,0,NULL),('f_tn9FfoSfKWX43F83v_3w','PBasset000000000000002','000001000001000034','published','WebGUI::Asset::Wobject::Folder',1147642479,'3','997995720','3',NULL,0,NULL),('Da6KWn805L4B5e4HFgQRQA','PBasset000000000000002','000001000001000037','published','WebGUI::Asset::Wobject::Folder',1147642479,'3','997995720','3',NULL,0,NULL),('bbiA9Zq5Gy2oCFBlILO3QA','PBasset000000000000002','000001000001000038','published','WebGUI::Asset::Wobject::Folder',1147642480,'3','997995720','3',NULL,0,NULL),('Efe2W0UgrSRDltNJ87jlfg','PBasset000000000000002','000001000001000039','published','WebGUI::Asset::Wobject::Folder',1147642480,'3','997995720','3',NULL,0,NULL),('RrV4aAPnn4dM0ZcU3OXnlw','PBasset000000000000002','000001000001000041','published','WebGUI::Asset::Wobject::Folder',1147642480,'3','997995720','3',NULL,0,NULL),('5bnNzteN7w3NnK9mF4XiCg','PBasset000000000000002','000001000001000042','published','WebGUI::Asset::Wobject::Folder',1147642481,'3','997995720','3',NULL,0,NULL),('oGfxez5sksyB_PcaAsEm_Q','PBasset000000000000002','000001000001000043','published','WebGUI::Asset::Wobject::Folder',1147642482,'3','997995720','3',NULL,0,NULL),('vTymIDYL2YqEh6PV50F7ew','2OcUWHVsu_L1sDFzIMWYqw','000001000001000046000001','published','WebGUI::Asset::Wobject::Folder',1147642482,'3','1222803153','3',NULL,0,NULL),('lo1ac3BsoJx3ijGQ3gR-bQ','2OcUWHVsu_L1sDFzIMWYqw','000001000001000046000002','published','WebGUI::Asset::Wobject::Folder',1147642482,'3','1222803153','3',NULL,0,NULL),('huASapWvFDzqwOSbcN-JFQ','2OcUWHVsu_L1sDFzIMWYqw','000001000001000046000003','published','WebGUI::Asset::Wobject::Folder',1147642483,'3','1222803153','3',NULL,0,NULL),('9wKWdum0_8z-OhhquWLtSQ','PBasset000000000000002','000001000001000048','published','WebGUI::Asset::Wobject::Folder',1147642483,'3','997995720','3',NULL,0,NULL),('CSN-ZON7Uwv8kxf3F1fh5Q','PBasset000000000000002','000001000001000053','published','WebGUI::Asset::Wobject::Folder',1147642484,'3','997995720','3',NULL,0,NULL),('TCtybxdqmdwdvRn555zpCQ','PBasset000000000000002','000001000001000032','published','WebGUI::Asset::Wobject::Folder',1147642484,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000070','7-0-style0000000000049','000001000001000051000021','published','WebGUI::Asset::Wobject::Navigation',1147642510,'3','997995720','3',NULL,0,NULL),('7-0-style0000000000071','7-0-style0000000000049','000001000001000051000022','published','WebGUI::Asset::File::Image',1147642511,'3','997995720','3',NULL,0,NULL),('PBnav00000000000bullet','BFfNj5wA9bDw8H3cnr8pTw','000001000001000025000026','published','WebGUI::Asset::Template',1148579524,'3','1222803972','3',NULL,0,NULL),('PBnav00000000indentnav','BFfNj5wA9bDw8H3cnr8pTw','000001000001000025000027','published','WebGUI::Asset::Template',1148579525,'3','1222803972','3',NULL,0,NULL),('MK4fCNoyrx5SE8eyDfOpxg','tXwf1zaOXTvsqPn6yu-GSw','000001000001000013000004','published','WebGUI::Asset::Template',1247489252,'3','997995720','3',NULL,0,NULL),('uCn31PzislTZlgt_79j7cQ','RrV4aAPnn4dM0ZcU3OXnlw','000001000001000041000006','published','WebGUI::Asset::Snippet',1258524916,'3','997995720','3',NULL,0,NULL),('i5kt5aodVs_oepNEkE7Okw','VZK3CRgiMb8r4dBjUmCTgQ','000001000001000027000002','published','WebGUI::Asset::Snippet',1242312883,'3','997995720','3',NULL,0,NULL),('zb_OPKNqcTuIjdvvbEkRjw','TvOZs8U1kRXLtwtmyW75pg','000001000001000004000005','published','WebGUI::Asset::Snippet',1247484073,'3','997995720','3',NULL,0,NULL),('FEDP3dk8J3Chw_gyr7_XEQ','BFfNj5wA9bDw8H3cnr8pTw','000001000001000025000028','published','WebGUI::Asset::Snippet',1246278679,'3','997995720','3',NULL,0,NULL),('BmLaN4rmAANkCglXUViEbg','-WM2dt0ZGpDasuL2wWocxg','000001000001000030000005','published','WebGUI::Asset::Wobject::Folder',1157679165,'3','1222803845','3',NULL,0,NULL),('ProjectManagerTMPL0006','BmLaN4rmAANkCglXUViEbg','000001000001000030000005000001','published','WebGUI::Asset::Template',1157679165,'3','1222803845','3',NULL,0,NULL),('ProjectManagerTMPL0005','BmLaN4rmAANkCglXUViEbg','000001000001000030000005000002','published','WebGUI::Asset::Template',1157679165,'3','1222803845','3',NULL,0,NULL),('Q4uX_C557arTp6D_jwB1jQ','PBasset000000000000002','000001000001000052','published','WebGUI::Asset::Wobject::Folder',1165460175,'3','997995720','3',NULL,0,NULL),('WikiRCTmpl000000000001','Q4uX_C557arTp6D_jwB1jQ','000001000001000052000001','published','WebGUI::Asset::Template',1165460175,'3','1222803570','3',NULL,0,NULL),('WikiFrontTmpl000000001','Q4uX_C557arTp6D_jwB1jQ','000001000001000052000002','published','WebGUI::Asset::Template',1165460175,'3','1222803570','3',NULL,0,NULL),('WikiSearchTmpl00000001','Q4uX_C557arTp6D_jwB1jQ','000001000001000052000003','published','WebGUI::Asset::Template',1165460175,'3','1222803570','3',NULL,0,NULL),('WikiPHTmpl000000000001','Q4uX_C557arTp6D_jwB1jQ','000001000001000052000004','published','WebGUI::Asset::Template',1165460175,'3','1222803570','3',NULL,0,NULL),('WikiPageTmpl0000000001','Q4uX_C557arTp6D_jwB1jQ','000001000001000052000005','published','WebGUI::Asset::Template',1165460175,'3','1222803570','3',NULL,0,NULL),('WikiPageEditTmpl000001','Q4uX_C557arTp6D_jwB1jQ','000001000001000052000006','published','WebGUI::Asset::Template',1165460175,'3','1222803570','3',NULL,0,NULL),('WikiMPTmpl000000000001','Q4uX_C557arTp6D_jwB1jQ','000001000001000052000007','published','WebGUI::Asset::Template',1165460175,'3','1222803570','3',NULL,0,NULL),('SQLReportDownload00001','bbiA9Zq5Gy2oCFBlILO3QA','000001000001000038000002','published','WebGUI::Asset::Template',1171466654,'3','1222803962','3',NULL,0,NULL),('X7DrzUcj8pOKFa_6k9D5iw','PBasset000000000000002','000001000001000026','published','WebGUI::Asset::Wobject::Folder',1185754569,'3','997995720','3',NULL,0,NULL),('newsletter000000000001','X7DrzUcj8pOKFa_6k9D5iw','000001000001000026000001','published','WebGUI::Asset::Template',1185754569,'3','1222803570','3',NULL,0,NULL),('newslettercs0000000001','X7DrzUcj8pOKFa_6k9D5iw','000001000001000026000002','published','WebGUI::Asset::Template',1185754569,'3','1222803570','3',NULL,0,NULL),('newslettersubscrip0001','X7DrzUcj8pOKFa_6k9D5iw','000001000001000026000003','published','WebGUI::Asset::Template',1185754569,'3','1222803570','3',NULL,0,NULL),('MBmWlA_YEA2I6D29OMGtRg','HPDOcsj4gBme8D4svHodBw','000001000001000002000001000004','published','WebGUI::Asset::Template',1226542675,'3','997995720','3',NULL,0,NULL),('FJbUTvZ2nUTn65LpW6gjsA','HPDOcsj4gBme8D4svHodBw','000001000001000002000001000001','published','WebGUI::Asset::Template',1227070381,'3','997995720','3',NULL,0,NULL),('WikiKeyword00000000001','Q4uX_C557arTp6D_jwB1jQ','000001000001000052000008','published','WebGUI::Asset::Template',1185754571,'3','1222803956','3',NULL,0,NULL),('tempspace0000000000000','PBasset000000000000001','000001000004','published','WebGUI::Asset::Wobject::Folder',1185754574,'3','997995720','3',NULL,1,NULL),('75CmQgpcCSkdsL-oawdn3Q','HPDOcsj4gBme8D4svHodBw','000001000001000002000001000002','published','WebGUI::Asset::Template',1227052575,'3','997995720','3',NULL,0,NULL),('gI_TxK-5S4DNuv42wpImmw','PBasset000000000000002','000001000001000015','published','WebGUI::Asset::Wobject::Folder',1197330678,'3','997995720','3',NULL,0,NULL),('jME5BEDYVDlBZ8jIQA9-jQ','gI_TxK-5S4DNuv42wpImmw','000001000001000015000001','published','WebGUI::Asset::Template',1197927169,'3','997995720','3',NULL,0,NULL),('azCqD0IjdQSlM3ar29k5Sg','gI_TxK-5S4DNuv42wpImmw','000001000001000015000002','published','WebGUI::Asset::Template',1197881748,'3','997995720','3',NULL,0,NULL),('05FpjceLYhq4csF1Kww1KQ','gI_TxK-5S4DNuv42wpImmw','000001000001000015000003','published','WebGUI::Asset::Template',1197879361,'3','997995720','3',NULL,0,NULL),('q5O62aH4pjUXsrQR3Pq4lw','gI_TxK-5S4DNuv42wpImmw','000001000001000015000004','published','WebGUI::Asset::Template',1197825772,'3','997995720','3',NULL,0,NULL),('KAMdiUdJykjN02CPHpyZOw','gI_TxK-5S4DNuv42wpImmw','000001000001000015000005','published','WebGUI::Asset::Template',1197825787,'3','997995720','3',NULL,0,NULL),('OkphOEdaSGTXnFGhK4GT5A','gI_TxK-5S4DNuv42wpImmw','000001000001000015000006','published','WebGUI::Asset::Template',1197825794,'3','997995720','3',NULL,0,NULL),('TEId5V-jEvUULsZA0wuRuA','gI_TxK-5S4DNuv42wpImmw','000001000001000015000007','published','WebGUI::Asset::Template',1197989443,'3','997995720','3',NULL,0,NULL),('6X-7Twabn5KKO_AbgK3PEw','gI_TxK-5S4DNuv42wpImmw','000001000001000015000008','published','WebGUI::Asset::Template',1197987780,'3','997995720','3',NULL,0,NULL),('7JCTAiu1U_bT9ldr655Blw','gI_TxK-5S4DNuv42wpImmw','000001000001000015000009','published','WebGUI::Asset::Template',1197825824,'3','997995720','3',NULL,0,NULL),('0X4Q3tBWUb_thsVbsYz9xQ','gI_TxK-5S4DNuv42wpImmw','000001000001000015000010','published','WebGUI::Asset::Template',1197987372,'3','997995720','3',NULL,0,NULL),('m3IbBavqzuKDd2PGGhKPlA','gI_TxK-5S4DNuv42wpImmw','000001000001000015000011','published','WebGUI::Asset::Template',1197825845,'3','997995720','3',NULL,0,NULL),('UTNFeV7B_aSCRmmaFCq4Vw','gI_TxK-5S4DNuv42wpImmw','000001000001000015000012','published','WebGUI::Asset::Template',1197825856,'3','997995720','3',NULL,0,NULL),('zcX-wIUct0S_np14xxOA-A','gI_TxK-5S4DNuv42wpImmw','000001000001000015000013','published','WebGUI::Asset::Template',1197825866,'3','997995720','3',NULL,0,NULL),('MBZK_LPVzqhb4TV4mMRTJg','gI_TxK-5S4DNuv42wpImmw','000001000001000015000014','published','WebGUI::Asset::Snippet',1197330678,'3','997995720','3',NULL,0,NULL),('_hELmIJfgbAyXFNqPyApxQ','gI_TxK-5S4DNuv42wpImmw','000001000001000015000015','published','WebGUI::Asset::Snippet',1197330678,'3','997995720','3',NULL,0,NULL),('_9_eiaPgxzF_x_upt6-PNQ','gI_TxK-5S4DNuv42wpImmw','000001000001000015000016','published','WebGUI::Asset::Snippet',1197988920,'3','997995720','3',NULL,0,NULL),('kaPRSaf8UKiskiGEgJgLAw','gI_TxK-5S4DNuv42wpImmw','000001000001000015000017','published','WebGUI::Asset::Wobject::Folder',1197330678,'3','997995720','3',NULL,0,NULL),('bANo8aiAPA7aY_oQZKxIWw','kaPRSaf8UKiskiGEgJgLAw','000001000001000015000017000001','published','WebGUI::Asset::File::Image',1197330678,'3','997995720','3',NULL,0,NULL),('2ci_v2d4x4uvyjTRlC49OA','kaPRSaf8UKiskiGEgJgLAw','000001000001000015000017000002','published','WebGUI::Asset::File::Image',1197330678,'3','997995720','3',NULL,0,NULL),('O-EsSzKgAk1KolFT-x_KsA','kaPRSaf8UKiskiGEgJgLAw','000001000001000015000017000003','published','WebGUI::Asset::File::Image',1197330678,'3','997995720','3',NULL,0,NULL),('fdd8tGExyVwHyrB8RBbKXg','kaPRSaf8UKiskiGEgJgLAw','000001000001000015000017000004','published','WebGUI::Asset::File::Image',1197330839,'3','997995720','3',NULL,0,NULL),('BpisgHl4ZDcSECJp6oib1w','kaPRSaf8UKiskiGEgJgLAw','000001000001000015000017000005','published','WebGUI::Asset::File::Image',1197330840,'3','997995720','3',NULL,0,NULL),('zshreRgPAXtnF0DtVbQ1Yg','kaPRSaf8UKiskiGEgJgLAw','000001000001000015000017000006','published','WebGUI::Asset::File::Image',1197330840,'3','997995720','3',NULL,0,NULL),('mM3bjP_iG9sv5nQb4S17tQ','gI_TxK-5S4DNuv42wpImmw','000001000001000015000018','published','WebGUI::Asset::Template',1197879662,'3','997995720','3',NULL,0,NULL),('ilu5BrM-VGaOsec9Lm7M6Q','gI_TxK-5S4DNuv42wpImmw','000001000001000015000019','published','WebGUI::Asset::Template',1197878780,'3','997995720','3',NULL,0,NULL),('-ANLpoTEP-n4POAdRxCzRw','gI_TxK-5S4DNuv42wpImmw','000001000001000015000020','published','WebGUI::Asset::Template',1197880641,'3','997995720','3',NULL,0,NULL),('OxJWQgnGsgyGohP2L3zJPQ','gI_TxK-5S4DNuv42wpImmw','000001000001000015000021','published','WebGUI::Asset::Template',1204663962,'3','997995720','3',NULL,0,NULL),('Tsg7xmPYv782j6IVz7yHFg','PBasset000000000000002','000001000001000006','published','WebGUI::Asset::Wobject::Folder',1204890713,'3','997995720','3',NULL,0,NULL),('kj3b-X3i6zRKnhLb4ZiCLw','Tsg7xmPYv782j6IVz7yHFg','000001000001000006000001','published','WebGUI::Asset::Template',1204890713,'3','997995720','3',NULL,0,NULL),('uRL9qtk7Rb0YRJ41LmHOJw','Tsg7xmPYv782j6IVz7yHFg','000001000001000006000002','published','WebGUI::Asset::Template',1204890713,'3','997995720','3',NULL,0,NULL),('CalendarWeek0000000001','Tsg7xmPYv782j6IVz7yHFg','000001000001000006000003','published','WebGUI::Asset::Template',1204890713,'3','997995720','3',NULL,0,NULL),('CalendarDay00000000001','Tsg7xmPYv782j6IVz7yHFg','000001000001000006000004','published','WebGUI::Asset::Template',1204890713,'3','997995720','3',NULL,0,NULL),('CalendarEvent000000001','Tsg7xmPYv782j6IVz7yHFg','000001000001000006000005','published','WebGUI::Asset::Template',1204890713,'3','997995720','3',NULL,0,NULL),('CalendarEventEdit00001','Tsg7xmPYv782j6IVz7yHFg','000001000001000006000006','published','WebGUI::Asset::Template',1205160982,'3','997995720','3',NULL,0,NULL),('CalendarMonth000000001','Tsg7xmPYv782j6IVz7yHFg','000001000001000006000007','published','WebGUI::Asset::Template',1204890713,'3','997995720','3',NULL,0,NULL),('CalendarSearch00000001','Tsg7xmPYv782j6IVz7yHFg','000001000001000006000008','published','WebGUI::Asset::Template',1204890713,'3','997995720','3',NULL,0,NULL),('CalendarPrintEvent0001','Tsg7xmPYv782j6IVz7yHFg','000001000001000006000009','published','WebGUI::Asset::Template',1204890714,'3','997995720','3',NULL,0,NULL),('CalendarPrintMonth0001','Tsg7xmPYv782j6IVz7yHFg','000001000001000006000010','published','WebGUI::Asset::Template',1204890714,'3','997995720','3',NULL,0,NULL),('CalendarPrintWeek00001','Tsg7xmPYv782j6IVz7yHFg','000001000001000006000011','published','WebGUI::Asset::Template',1204890714,'3','997995720','3',NULL,0,NULL),('CalendarPrintDay000001','Tsg7xmPYv782j6IVz7yHFg','000001000001000006000012','published','WebGUI::Asset::Template',1204890714,'3','997995720','3',NULL,0,NULL),('jnYdqDkUR8x7Pv2eGR1qTA','PBasset000000000000002','000001000001000044','published','WebGUI::Asset::Wobject::Folder',1205431513,'3','997995720','3',NULL,0,NULL),('ThingyTmpl000000000001','jnYdqDkUR8x7Pv2eGR1qTA','000001000001000044000001','published','WebGUI::Asset::Template',1205003608,'3','997995720','3',NULL,0,NULL),('ThingyTmpl000000000002','jnYdqDkUR8x7Pv2eGR1qTA','000001000001000044000002','published','WebGUI::Asset::Template',1205003676,'3','997995720','3',NULL,0,NULL),('ThingyTmpl000000000003','jnYdqDkUR8x7Pv2eGR1qTA','000001000001000044000003','published','WebGUI::Asset::Template',1205003711,'3','997995720','3',NULL,0,NULL),('ThingyTmpl000000000004','jnYdqDkUR8x7Pv2eGR1qTA','000001000001000044000004','published','WebGUI::Asset::Template',1205158717,'3','997995720','3',NULL,0,NULL),('7fE8md51vTCcuJFOvxNaGA','gI_TxK-5S4DNuv42wpImmw','000001000001000015000022','published','WebGUI::Asset::Snippet',1205443600,'3','997995720','3',NULL,0,NULL),('1oGhfj00KkCzP1ez01AfKA','gI_TxK-5S4DNuv42wpImmw','000001000001000015000023','published','WebGUI::Asset::Snippet',1205635970,'3','997995720','3',NULL,0,NULL),('3qiVYhNTXMVC5hfsumVHgg','gI_TxK-5S4DNuv42wpImmw','000001000001000015000024','published','WebGUI::Asset::Snippet',1206743306,'3','997995720','3',NULL,0,NULL),('vrKXEtluIhbmAS9xmPukDA','aNmgn0cd6tldmC1FpW4KbA','000001000001000036000010','published','WebGUI::Asset::Template',1212092352,'3','1222802925','3',NULL,0,NULL),('4qh0kIsFUdd4Ox-Iu1JZgg','PBasset000000000000002','000001000001000012','published','WebGUI::Asset::Wobject::Folder',1208725439,'3','997995720','3',NULL,0,NULL),('BMybD3cEnmXVk2wQ_qEsRQ','4qh0kIsFUdd4Ox-Iu1JZgg','000001000001000012000001','published','WebGUI::Asset::Template',1208530113,'3','997995720','3',NULL,0,NULL),('OOyMH33plAy6oCj_QWrxtg','4qh0kIsFUdd4Ox-Iu1JZgg','000001000001000012000002','published','WebGUI::Asset::Template',1207951375,'3','997995720','3',NULL,0,NULL),('2rC4ErZ3c77OJzJm7O5s3w','4qh0kIsFUdd4Ox-Iu1JZgg','000001000001000012000003','published','WebGUI::Asset::Template',1208721232,'3','997995720','3',NULL,0,NULL),('PsFn7dJt4wMwBa8hiE3hOA','4qh0kIsFUdd4Ox-Iu1JZgg','000001000001000012000004','published','WebGUI::Asset::Template',1208558071,'3','997995720','3',NULL,0,NULL),('yBwydfooiLvhEFawJb0VTQ','4qh0kIsFUdd4Ox-Iu1JZgg','000001000001000012000005','published','WebGUI::Asset::Template',1208629936,'3','997995720','3',NULL,0,NULL),('63ix2-hU0FchXGIWkG3tow','aNmgn0cd6tldmC1FpW4KbA','000001000001000036000011','published','WebGUI::Asset::Template',1209588387,'3','1222802925','3',NULL,0,NULL),('POVcY79vIqAHR8OfGt36aw','kaPRSaf8UKiskiGEgJgLAw','000001000001000015000017000007','published','WebGUI::Asset::File::Image',1209499189,'3','997995720','3',NULL,0,NULL),('hIB-z34r8Xl-vYVYCkKr-w','kaPRSaf8UKiskiGEgJgLAw','000001000001000015000017000008','published','WebGUI::Asset::File::Image',1209499189,'3','997995720','3',NULL,0,NULL),('-mPUoFlYcjqjPUPRLAlxNQ','kaPRSaf8UKiskiGEgJgLAw','000001000001000015000017000009','published','WebGUI::Asset::File::Image',1209499189,'3','997995720','3',NULL,0,NULL),('MDpUOR-N8KMyt1J7Hh_h4w','kaPRSaf8UKiskiGEgJgLAw','000001000001000015000017000010','published','WebGUI::Asset::File::Image',1209499189,'3','997995720','3',NULL,0,NULL),('YfXKByTwDZVituMc4h13Dg','kaPRSaf8UKiskiGEgJgLAw','000001000001000015000017000011','published','WebGUI::Asset::File::Image',1209499189,'3','997995720','3',NULL,0,NULL),('esko_HSU0Gh-uJZ1h3xRmQ','kaPRSaf8UKiskiGEgJgLAw','000001000001000015000017000012','published','WebGUI::Asset::File::Image',1209499189,'3','997995720','3',NULL,0,NULL),('oSqpGswzpBG_ErdfYwIO8A','kaPRSaf8UKiskiGEgJgLAw','000001000001000015000017000013','published','WebGUI::Asset::File::Image',1209499189,'3','997995720','3',NULL,0,NULL),('MXJklShZvLLB_DSnZQmXrQ','kaPRSaf8UKiskiGEgJgLAw','000001000001000015000017000014','published','WebGUI::Asset::File::Image',1209499189,'3','997995720','3',NULL,0,NULL),('BthxD5oJ0idmsyI3ioA2FA','kaPRSaf8UKiskiGEgJgLAw','000001000001000015000017000015','published','WebGUI::Asset::File::Image',1209499189,'3','997995720','3',NULL,0,NULL),('aZ-1HYQamkRHYXvzAra8WQ','kaPRSaf8UKiskiGEgJgLAw','000001000001000015000017000016','published','WebGUI::Asset::File::Image',1209499189,'3','997995720','3',NULL,0,NULL),('eRkb94OYcS5AdcrrerOP5Q','kaPRSaf8UKiskiGEgJgLAw','000001000001000015000017000017','published','WebGUI::Asset::File::Image',1209499189,'3','997995720','3',NULL,0,NULL),('TbnkjAJQEASORXIpYqDkcA','kaPRSaf8UKiskiGEgJgLAw','000001000001000015000017000018','published','WebGUI::Asset::File::Image',1209499189,'3','997995720','3',NULL,0,NULL),('er-3faBjY-hhlDcc5aKqdQ','kaPRSaf8UKiskiGEgJgLAw','000001000001000015000017000019','published','WebGUI::Asset::File::Image',1209499189,'3','997995720','3',NULL,0,NULL),('8bFsu2FJUqHRUiHcozcVFw','kaPRSaf8UKiskiGEgJgLAw','000001000001000015000017000020','published','WebGUI::Asset::File::Image',1209499189,'3','997995720','3',NULL,0,NULL),('34Aayx5eA320D8VfhdfDBw','kaPRSaf8UKiskiGEgJgLAw','000001000001000015000017000021','published','WebGUI::Asset::File::Image',1209499189,'3','997995720','3',NULL,0,NULL),('TlhKOVmWblZOsAdqmhEpeg','kaPRSaf8UKiskiGEgJgLAw','000001000001000015000017000022','published','WebGUI::Asset::File::Image',1209499189,'3','997995720','3',NULL,0,NULL),('Nx0ypjO3cN6QdZUBUEE0lA','kaPRSaf8UKiskiGEgJgLAw','000001000001000015000017000023','published','WebGUI::Asset::File::Image',1209499189,'3','997995720','3',NULL,0,NULL),('CmFZLN7iPS7XXvUEsxKPKA','kaPRSaf8UKiskiGEgJgLAw','000001000001000015000017000024','published','WebGUI::Asset::File::Image',1209499190,'3','997995720','3',NULL,0,NULL),('v_XBgwwZqgW1D5s4y05qfg','kaPRSaf8UKiskiGEgJgLAw','000001000001000015000017000025','published','WebGUI::Asset::File::Image',1209499190,'3','997995720','3',NULL,0,NULL),('4TdAkKoQbSCvI7QWcW889A','kaPRSaf8UKiskiGEgJgLAw','000001000001000015000017000026','published','WebGUI::Asset::File::Image',1209499190,'3','997995720','3',NULL,0,NULL),('SAgK6eDPCG1cgkJ59WapHQ','kaPRSaf8UKiskiGEgJgLAw','000001000001000015000017000027','published','WebGUI::Asset::File::Image',1209499190,'3','997995720','3',NULL,0,NULL),('XJYLuvGy9ubF7JNKyINtpA','kaPRSaf8UKiskiGEgJgLAw','000001000001000015000017000028','published','WebGUI::Asset::File::Image',1209499190,'3','997995720','3',NULL,0,NULL),('RWj7hyv2SpZuXxwj1Wocug','kaPRSaf8UKiskiGEgJgLAw','000001000001000015000017000029','published','WebGUI::Asset::File::Image',1209499190,'3','997995720','3',NULL,0,NULL),('aq8QElnlm3YufAoxRz9Pcg','kaPRSaf8UKiskiGEgJgLAw','000001000001000015000017000030','published','WebGUI::Asset::File::Image',1209499190,'3','997995720','3',NULL,0,NULL),('gbnRhcWNk1iQe32LFEB5eQ','PBasset000000000000002','000001000001000035','published','WebGUI::Asset::Wobject::Folder',1210779723,'3','997995720','3',NULL,0,NULL),('6tK47xsaIH-ELw0IBo0uRQ','gbnRhcWNk1iQe32LFEB5eQ','000001000001000035000001','published','WebGUI::Asset::Wobject::Folder',1210777115,'3','997995720','3',NULL,0,NULL),('_bZJ9LA_KNekZiFPaP2SeQ','6tK47xsaIH-ELw0IBo0uRQ','000001000001000035000001000001','published','WebGUI::Asset::File::Image',1210777868,'3','997995720','3',NULL,0,NULL),('nFen0xjkZn8WkpM93C9ceQ','gbnRhcWNk1iQe32LFEB5eQ','000001000001000035000002','published','WebGUI::Asset::Template',1210779326,'3','997995720','3',NULL,0,NULL),('1XOJDcg_ITRYwVM-QnIcPw','gbnRhcWNk1iQe32LFEB5eQ','000001000001000035000003','published','WebGUI::Asset::Snippet',1210779441,'3','997995720','3',NULL,0,NULL),('4e-_rNs6mSWedZhQ_V5kJA','gbnRhcWNk1iQe32LFEB5eQ','000001000001000035000004','published','WebGUI::Asset::Snippet',1210779672,'3','997995720','3',NULL,0,NULL),('eqb9sWjFEVq0yHunGV8IGw','aNmgn0cd6tldmC1FpW4KbA','000001000001000036000012','published','WebGUI::Asset::Template',1213182595,'3','1222802925','3',NULL,0,NULL),('6D4Z-oruXPS6OlH_Kx8pBg','jnYdqDkUR8x7Pv2eGR1qTA','000001000001000044000005','published','WebGUI::Asset::Wobject::Folder',1209509389,'3','997995720','3',NULL,0,NULL),('hQ7z33_jOYkQ8WNX5xy9Sw','6D4Z-oruXPS6OlH_Kx8pBg','000001000001000044000005000001','published','WebGUI::Asset::File::Image',1209509455,'3','997995720','3',NULL,0,NULL),('vWW_DcHiYSrKZOkkIfEfcQ','6D4Z-oruXPS6OlH_Kx8pBg','000001000001000044000005000002','published','WebGUI::Asset::File::Image',1209509433,'3','997995720','3',NULL,0,NULL),('_bPYzRA87NTAUIKlfrJMHg','6D4Z-oruXPS6OlH_Kx8pBg','000001000001000044000005000003','published','WebGUI::Asset::File::Image',1209509433,'3','997995720','3',NULL,0,NULL),('nJjZHRwdDs5MAZYsAyioHw','6D4Z-oruXPS6OlH_Kx8pBg','000001000001000044000005000004','published','WebGUI::Asset::File::Image',1209509433,'3','997995720','3',NULL,0,NULL),('8hxfkrJPeFVRWF5piCNJ1A','6D4Z-oruXPS6OlH_Kx8pBg','000001000001000044000005000005','published','WebGUI::Asset::File::Image',1209509433,'3','997995720','3',NULL,0,NULL),('Osx7WN52iIKHZFT4vqUBHQ','6D4Z-oruXPS6OlH_Kx8pBg','000001000001000044000005000006','published','WebGUI::Asset::File::Image',1209509433,'3','997995720','3',NULL,0,NULL),('oWff8fGzRdHPyq5VNREe9Q','6D4Z-oruXPS6OlH_Kx8pBg','000001000001000044000005000007','published','WebGUI::Asset::File::Image',1209509433,'3','997995720','3',NULL,0,NULL),('uqbkvb1b9443VvfkyRz95w','6D4Z-oruXPS6OlH_Kx8pBg','000001000001000044000005000008','published','WebGUI::Asset::File::Image',1209509433,'3','997995720','3',NULL,0,NULL),('8YiMkcz32xalkAn3WBLpag','6D4Z-oruXPS6OlH_Kx8pBg','000001000001000044000005000009','published','WebGUI::Asset::File::Image',1210181860,'3','997995720','3',NULL,0,NULL),('3n3H85BsdeRQ0I08WmvlOg','jnYdqDkUR8x7Pv2eGR1qTA','000001000001000044000006','published','WebGUI::Asset::Snippet',1212091492,'3','997995720','3',NULL,0,NULL),('5m5I7__l40C4hhv4ydqAHQ','jnYdqDkUR8x7Pv2eGR1qTA','000001000001000044000007','published','WebGUI::Asset::Snippet',1210181698,'3','997995720','3',NULL,0,NULL),('C5fPz-Wg85vkYRvCdl-Xqw','PBasset000000000000002','000001000001000047','published','WebGUI::Asset::Wobject::Folder',1212160830,'3','997995720','3',NULL,0,NULL),('UserListTmpl0000000001','C5fPz-Wg85vkYRvCdl-Xqw','000001000001000047000001','published','WebGUI::Asset::Template',1212159641,'3','997995720','3',NULL,0,NULL),('UserListTmpl0000000002','C5fPz-Wg85vkYRvCdl-Xqw','000001000001000047000002','published','WebGUI::Asset::Template',1212000800,'3','997995720','3',NULL,0,NULL),('UserListTmpl0000000003','C5fPz-Wg85vkYRvCdl-Xqw','000001000001000047000003','published','WebGUI::Asset::Template',1212001437,'3','997995720','3',NULL,0,NULL),('usuxw9V3jN4d4pujRiEYxg','7-0-style0000000000049','000001000001000051000023','published','WebGUI::Asset::Snippet',1209494150,'3','997995720','3',NULL,0,NULL),('aNmgn0cd6tldmC1FpW4KbA','PBasset000000000000002','000001000001000036','published','WebGUI::Asset::Wobject::Folder',1213122695,'3','997995720','3',NULL,0,NULL),('2q5fxatSFLgIhXaUX-oSvg','aNmgn0cd6tldmC1FpW4KbA','000001000001000036000001','published','WebGUI::Asset::File::Image',1204149033,'3','997995720','3',NULL,0,NULL),('_d5WTkKjnwct-_Dk7gZHvQ','aNmgn0cd6tldmC1FpW4KbA','000001000001000036000002','published','WebGUI::Asset::File::Image',1204149033,'3','997995720','3',NULL,0,NULL),('Iz2mUR3jCPKyemwAea4b2g','aNmgn0cd6tldmC1FpW4KbA','000001000001000036000003','published','WebGUI::Asset::File::Image',1204149033,'3','997995720','3',NULL,0,NULL),('JU9bjsLRoWj7GVHs__prig','aNmgn0cd6tldmC1FpW4KbA','000001000001000036000004','published','WebGUI::Asset::File::Image',1204149033,'3','997995720','3',NULL,0,NULL),('noOlnjQGexHg8c4bGVUo9g','aNmgn0cd6tldmC1FpW4KbA','000001000001000036000005','published','WebGUI::Asset::File::Image',1204149033,'3','997995720','3',NULL,0,NULL),('aIpCmr9Hi__vgdZnDTz1jw','aNmgn0cd6tldmC1FpW4KbA','000001000001000036000006','published','WebGUI::Asset::Template',1209921197,'3','997995720','3',NULL,0,NULL),('XNd7a_g_cTvJVYrVHcx2Mw','aNmgn0cd6tldmC1FpW4KbA','000001000001000036000007','published','WebGUI::Asset::Template',1212099009,'3','997995720','3',NULL,0,NULL),('2gtFt7c0qAFNU3BG_uvNvg','aNmgn0cd6tldmC1FpW4KbA','000001000001000036000008','published','WebGUI::Asset::Template',1211824430,'3','997995720','3',NULL,0,NULL),('bPz1yk6Y9uwMDMBcmMsSCg','aNmgn0cd6tldmC1FpW4KbA','000001000001000036000009','published','WebGUI::Asset::Template',1211829604,'3','997995720','3',NULL,0,NULL),('3womoo7Teyy2YKFa25-MZg','aNmgn0cd6tldmC1FpW4KbA','000001000001000036000013','published','WebGUI::Asset::Template',1212098997,'3','1222802925','3',NULL,0,NULL),('EBlxJpZQ9o-8VBOaGQbChA','aNmgn0cd6tldmC1FpW4KbA','000001000001000036000014','published','WebGUI::Asset::Template',1212093746,'3','1222802925','3',NULL,0,NULL),('g8W53Pd71uHB9pxaXhWf_A','aNmgn0cd6tldmC1FpW4KbA','000001000001000036000015','published','WebGUI::Asset::Template',1213184121,'3','1222802925','3',NULL,0,NULL),('mTOiwwk3q4k9g5-XykXhPA','68sKwDgf9cGH58-NZcU4lg','000001000002000003','published','WebGUI::Asset::Wobject::Layout',1215717999,'3','1215733893','3',NULL,0,NULL),('j_1qEqM6iLfQLiR6VKy0aA','mTOiwwk3q4k9g5-XykXhPA','000001000002000003000001','published','WebGUI::Asset::Wobject::Article',1215718151,'3','1215733893','3',NULL,0,NULL),('o_pq_e4vRyhMOKFzs61eag','mTOiwwk3q4k9g5-XykXhPA','000001000002000003000002','published','WebGUI::Asset::File::Image',1215714957,'3','1215733893','3',NULL,0,NULL),('diZvW4bSgZWwyyGP3qXi1g','mTOiwwk3q4k9g5-XykXhPA','000001000002000003000003','published','WebGUI::Asset::Wobject::Article',1215717972,'3','1215733893','3',NULL,0,NULL),('PBEmsBadgeTemplate0000','4qh0kIsFUdd4Ox-Iu1JZgg','000001000001000012000006','published','WebGUI::Asset::Template',1221077977,'3','1222802972','3',NULL,0,NULL),('-WM2dt0ZGpDasuL2wWocxg','PBasset000000000000002','000001000001000030','published','WebGUI::Asset::Wobject::Folder',1222803056,'3','997995720','3',NULL,0,NULL),('2OcUWHVsu_L1sDFzIMWYqw','PBasset000000000000002','000001000001000046','published','WebGUI::Asset::Wobject::Folder',1222803070,'3','997995720','3',NULL,0,NULL),('1z9J1O08n_7gVVlBwSRBJQ','PBasset000000000000002','000001000001000005','published','WebGUI::Asset::Wobject::Folder',1222803099,'3','997995720','3',NULL,0,NULL),('zyWi26q9na-iiZqL4yedog','PBasset000000000000002','000001000001000021','published','WebGUI::Asset::Wobject::Folder',1222803114,'3','997995720','3',NULL,0,NULL),('NywJYmGWe1f6EBXJnWg9Xg','PBasset000000000000002','000001000001000029','published','WebGUI::Asset::Wobject::Folder',1222803606,'3','997995720','3',NULL,0,NULL),('UL-ItI4L1Z6-WSuhuXVvsQ','PBasset000000000000002','000001000001000011','published','WebGUI::Asset::Wobject::Folder',1225139673,'3','997995720','3',NULL,0,NULL),('3rjnBVJRO6ZSkxlFkYh_ug','UL-ItI4L1Z6-WSuhuXVvsQ','000001000001000011000001','published','WebGUI::Asset::Template',1225139643,'3','997995720','3',NULL,0,NULL),('TuYPpHx7TUyk08639Pc8Bg','UL-ItI4L1Z6-WSuhuXVvsQ','000001000001000011000002','published','WebGUI::Asset::Template',1225139643,'3','997995720','3',NULL,0,NULL),('THQhn1C-ooj-TLlEP7aIJQ','gI_TxK-5S4DNuv42wpImmw','000001000001000015000025','published','WebGUI::Asset::Snippet',1225313951,'3','1234301624','3',NULL,0,NULL),('jVKLVakT_iA2010_oEuAwg','7-0-style0000000000049','000001000001000051000024','published','WebGUI::Asset::Wobject::Navigation',1224116526,'3','997995720','3',NULL,0,NULL),('QpmlAiYZz6VsKBM-_0wXaw','zyWi26q9na-iiZqL4yedog','000001000001000021000012','published','WebGUI::Asset::Wobject::Folder',1224616691,'3','1234301591','3',NULL,0,NULL),('h_T2xtOxGRQ9QJOR6ebLpQ','QpmlAiYZz6VsKBM-_0wXaw','000001000001000021000012000001','published','WebGUI::Asset::Template',1224616545,'3','1234301591','3',NULL,0,NULL),('4Ekp0kJoJllRRRo_J1Rj6w','QpmlAiYZz6VsKBM-_0wXaw','000001000001000021000012000002','published','WebGUI::Asset::Template',1224616672,'3','1234301591','3',NULL,0,NULL),('gfZOwaTWYjbSoVaQtHBBEw','IZkrow_zwvbf4FCH-taVTQ','000001000001000002000002000001','published','WebGUI::Asset::Template',1226974679,'3','997995720','3',NULL,0,NULL),('c8xrwVuu5QE0XtF9DiVzLw','IZkrow_zwvbf4FCH-taVTQ','000001000001000002000002000002','published','WebGUI::Asset::Template',1226894351,'3','997995720','3',NULL,0,NULL),('0n4HtbXaWa_XJHkFjetnLQ','IZkrow_zwvbf4FCH-taVTQ','000001000001000002000002000003','published','WebGUI::Asset::Template',1226894994,'3','997995720','3',NULL,0,NULL),('ErEzulFiEKDkaCDVmxUavw','IZkrow_zwvbf4FCH-taVTQ','000001000001000002000002000004','published','WebGUI::Asset::Template',1226895484,'3','997995720','3',NULL,0,NULL),('6uQEULvXFgCYlRWnYzZsuA','IZkrow_zwvbf4FCH-taVTQ','000001000001000002000002000005','published','WebGUI::Asset::Template',1226896682,'3','997995720','3',NULL,0,NULL),('DUoxlTBXhVS-Zl3CFDpt9g','IZkrow_zwvbf4FCH-taVTQ','000001000001000002000002000006','published','WebGUI::Asset::Template',1226896802,'3','997995720','3',NULL,0,NULL),('1Q4Je3hKCJzeo0ZBB5YB8g','IZkrow_zwvbf4FCH-taVTQ','000001000001000002000002000007','published','WebGUI::Asset::Template',1226898445,'3','997995720','3',NULL,0,NULL),('5A8Hd9zXvByTDy4x-H28qw','IZkrow_zwvbf4FCH-taVTQ','000001000001000002000002000008','published','WebGUI::Asset::Template',1226899462,'3','997995720','3',NULL,0,NULL),('VBkY05f-E3WJS50WpdKd1Q','IZkrow_zwvbf4FCH-taVTQ','000001000001000002000002000009','published','WebGUI::Asset::Template',1226899241,'3','997995720','3',NULL,0,NULL),('XgcsoDrbC0duVla7N7JAdw','IZkrow_zwvbf4FCH-taVTQ','000001000001000002000002000010','published','WebGUI::Asset::Template',1226973330,'3','997995720','3',NULL,0,NULL),('cR0UFm7I1qUI2Wbpj--08Q','IZkrow_zwvbf4FCH-taVTQ','000001000001000002000002000011','published','WebGUI::Asset::Template',1226964738,'3','997995720','3',NULL,0,NULL),('SVIhz68689hwUGgcDM-gWw','IZkrow_zwvbf4FCH-taVTQ','000001000001000002000002000012','published','WebGUI::Asset::Template',1226973314,'3','997995720','3',NULL,0,NULL),('K0YjxqOqr7RupSo6sIdcAg','QHn6T9rU7KsnS3Y70KCNTg','000001000001000002000003','published','WebGUI::Asset::Wobject::Folder',1227074310,'3','997995720','3',NULL,0,NULL),('zrNpGbT3odfIkg6nFSUy8Q','K0YjxqOqr7RupSo6sIdcAg','000001000001000002000003000001','published','WebGUI::Asset::Template',1226994016,'3','997995720','3',NULL,0,NULL),('1Yn_zE_dSiNuaBGNLPbxtw','K0YjxqOqr7RupSo6sIdcAg','000001000001000002000003000002','published','WebGUI::Asset::Template',1226994422,'3','997995720','3',NULL,0,NULL),('AZFU33p0jpPJ-E6qLSWZng','K0YjxqOqr7RupSo6sIdcAg','000001000001000002000003000003','published','WebGUI::Asset::Template',1226994865,'3','997995720','3',NULL,0,NULL),('AGJBGviWGAwjnwziiPjvDg','K0YjxqOqr7RupSo6sIdcAg','000001000001000002000003000004','published','WebGUI::Asset::Template',1226995497,'3','997995720','3',NULL,0,NULL),('7Ijdd8SW32lVgg2H8R-Aqw','K0YjxqOqr7RupSo6sIdcAg','000001000001000002000003000005','published','WebGUI::Asset::Template',1226995714,'3','997995720','3',NULL,0,NULL),('K8F0j_cq_jgo8dvWY_26Ag','K0YjxqOqr7RupSo6sIdcAg','000001000001000002000003000006','published','WebGUI::Asset::Template',1226995643,'3','997995720','3',NULL,0,NULL),('G5V6neXIDiFXN05oL-U3AQ','K0YjxqOqr7RupSo6sIdcAg','000001000001000002000003000007','published','WebGUI::Asset::Template',1226995768,'3','997995720','3',NULL,0,NULL),('_ilRXNR3s8F2vGJ_k9ePcg','QHn6T9rU7KsnS3Y70KCNTg','000001000001000002000004','published','WebGUI::Asset::Wobject::Folder',1226643205,'3','997995720','3',NULL,0,NULL),('9ThW278DWLV0-Svf68ljFQ','_ilRXNR3s8F2vGJ_k9ePcg','000001000001000002000004000001','published','WebGUI::Asset::Template',1226647187,'3','997995720','3',NULL,0,NULL),('AOjPG2NHgfL9Cq6dDJ7mew','QHn6T9rU7KsnS3Y70KCNTg','000001000001000002000005','published','WebGUI::Asset::Wobject::Folder',1226659753,'3','997995720','3',NULL,0,NULL),('aUDsJ-vB9RgP-AYvPOy8FQ','AOjPG2NHgfL9Cq6dDJ7mew','000001000001000002000005000001','published','WebGUI::Asset::Template',1226660439,'3','997995720','3',NULL,0,NULL),('qaVcU0FFzzraMX_bzELqzw','QHn6T9rU7KsnS3Y70KCNTg','000001000001000002000006','published','WebGUI::Asset::Wobject::Folder',1227074362,'3','997995720','3',NULL,0,NULL),('b4n3VyUIsAHyIvT-W-jziA','qaVcU0FFzzraMX_bzELqzw','000001000001000002000006000001','published','WebGUI::Asset::Template',1227074747,'3','997995720','3',NULL,0,NULL),('1IzRpX0tgW7iuCfaU2Kk0A','qaVcU0FFzzraMX_bzELqzw','000001000001000002000006000002','published','WebGUI::Asset::Template',1227079721,'3','997995720','3',NULL,0,NULL),('N716tpSna0iIQTKxS4gTWA','QHn6T9rU7KsnS3Y70KCNTg','000001000001000002000007','published','WebGUI::Asset::Template',1226604666,'3','997995720','3',NULL,0,NULL),('GRUNFctldUgop-qRLuo_DA','5bnNzteN7w3NnK9mF4XiCg','000001000001000042000004','published','WebGUI::Asset::Template',1227254010,'3','997995720','3',NULL,0,NULL),('d8jMMMRddSQ7twP4l1ZSIw','5bnNzteN7w3NnK9mF4XiCg','000001000001000042000005','published','WebGUI::Asset::Template',1227248175,'3','997995720','3',NULL,0,NULL),('CxMpE_UPauZA3p8jdrOABw','5bnNzteN7w3NnK9mF4XiCg','000001000001000042000006','published','WebGUI::Asset::Template',1227556536,'3','997995720','3',NULL,0,NULL),('1oBRscNIcFOI-pETrCOspA','5bnNzteN7w3NnK9mF4XiCg','000001000001000042000007','published','WebGUI::Asset::Template',1226009642,'3','997995720','3',NULL,0,NULL),('wAc4azJViVTpo-2NYOXWvg','5bnNzteN7w3NnK9mF4XiCg','000001000001000042000008','published','WebGUI::Asset::Template',1226009650,'3','997995720','3',NULL,0,NULL),('AjhlNO3wZvN5k4i4qioWcg','5bnNzteN7w3NnK9mF4XiCg','000001000001000042000009','published','WebGUI::Asset::Template',1226009658,'3','997995720','3',NULL,0,NULL),('itransact_credentials1','aNmgn0cd6tldmC1FpW4KbA','000001000001000036000018','published','WebGUI::Asset::Template',1228953856,'3','1234301682','3',NULL,0,NULL),('hkj6WeChxFyqfP85UlRP8w','LdiozcIUciWuvt3Z-na5Ww','000001000001000022000006','published','WebGUI::Asset::Snippet',1232664229,'3','997995720','3',NULL,0,NULL),('kJf77eCr9GAMiEzWrzsBTA','LdiozcIUciWuvt3Z-na5Ww','000001000001000022000007','published','WebGUI::Asset::Snippet',1229639255,'3','997995720','3',NULL,0,NULL),('4LQT4-bGW4FkiEQLSY5gvQ','LdiozcIUciWuvt3Z-na5Ww','000001000001000022000008','published','WebGUI::Asset::Snippet',1232400287,'3','997995720','3',NULL,0,NULL),('alraubvBu-YJJ614jAHD5w','LdiozcIUciWuvt3Z-na5Ww','000001000001000022000009','published','WebGUI::Asset::Template',1232664015,'3','997995720','3',NULL,0,NULL),('Vch1Ww7G_JpBhOhXX07RDg','LdiozcIUciWuvt3Z-na5Ww','000001000001000022000010','published','WebGUI::Asset::Wobject::Navigation',1232664082,'3','997995720','3',NULL,0,NULL),('_XfvgNH__bY1ykMiKYSobQ','QHn6T9rU7KsnS3Y70KCNTg','000001000001000002000008','published','WebGUI::Asset::Snippet',1233168041,'3','997995720','3',NULL,0,NULL),('HW-sPoDDZR8wBZ0YgFgPtg','QHn6T9rU7KsnS3Y70KCNTg','000001000001000002000009','published','WebGUI::Asset::Wobject::Folder',1227634350,'3','997995720','3',NULL,0,NULL),('hBpisL-_URyZnh9clR5ohA','HW-sPoDDZR8wBZ0YgFgPtg','000001000001000002000009000001','published','WebGUI::Asset::File::Image',1227634417,'3','997995720','3',NULL,0,NULL),('FOBV6KkifreXa4GmEAUU4A','HW-sPoDDZR8wBZ0YgFgPtg','000001000001000002000009000002','published','WebGUI::Asset::File::Image',1227634447,'3','997995720','3',NULL,0,NULL),('qsG6B24a0SC5KrhQjmdZBw','5bnNzteN7w3NnK9mF4XiCg','000001000001000042000010','published','WebGUI::Asset::Snippet',1233860274,'3','1234301655','3',NULL,0,NULL),('wrq7hMxb1ewQqZ46xmd8Gg','LdiozcIUciWuvt3Z-na5Ww','000001000001000022000011','published','WebGUI::Asset::Snippet',1235706620,'3','1238119575','3',NULL,0,NULL),('matrixtmpl000000000006','LdiozcIUciWuvt3Z-na5Ww','000001000001000022000013','published','WebGUI::Asset::Template',1236889702,'3','1238119576','3',NULL,0,NULL),('-zxyB-O50W8YnL39Ouoc4Q','AOjPG2NHgfL9Cq6dDJ7mew','000001000001000002000005000002','published','WebGUI::Asset::Template',1236959717,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000016','fq1ZkYhH24R5tb96kuT10Q','000001000001000005000005000003','published','WebGUI::Asset::Template',1237407798,'3','1238119553','3',NULL,0,NULL),('RSAMkc6WQmfRE3TOr1_3Mw','5bnNzteN7w3NnK9mF4XiCg','000001000001000042000011','published','WebGUI::Asset::Wobject::Folder',1234828062,'3','1238119589','3',NULL,0,NULL),('ExpireIncResptmpl00001','RSAMkc6WQmfRE3TOr1_3Mw','000001000001000042000011000001','published','WebGUI::Asset::Template',1236752721,'3','1238119589','3',NULL,0,NULL),('XdlKhCDvArs40uqBhvzR3w','TvOZs8U1kRXLtwtmyW75pg','000001000001000004000006','published','WebGUI::Asset::Template',1254881103,'3','1288747943','3',NULL,0,NULL),('VCFhB9WOsDsH2Apj3c6DpQ','aNNC62qLAS6TB-0_MCYjsw','000001000001000019000008','published','WebGUI::Asset::Template',1254881103,'3','1288748064','3',NULL,0,NULL),('NBVSVNLp9X_bV7WrCprtCA','tPagC0AQErZXjLFZQ6OI1g','000001000001000017000002','published','WebGUI::Asset::Template',1237842096,'3','1238119599','3',NULL,0,NULL),('jmlI9IK-lV8n2WMYmmPhAA','PBasset000000000000002','000001000001000001','published','WebGUI::Asset::Wobject::Folder',1238106173,'3','997995720','3',NULL,0,NULL),('AldPGu0u-jm_5xK13atCSQ','jmlI9IK-lV8n2WMYmmPhAA','000001000001000001000001','published','WebGUI::Asset::Template',1238106805,'3','997995720','3',NULL,0,NULL),('ohjyzab5i-yW6GOWTeDUHg','jmlI9IK-lV8n2WMYmmPhAA','000001000001000001000002','published','WebGUI::Asset::Template',1238106805,'3','997995720','3',NULL,0,NULL),('PBtmpl0000000000000015','fq1ZkYhH24R5tb96kuT10Q','000001000001000005000005000002','published','WebGUI::Asset::Template',1237647040,'3','1238119545','3',NULL,0,NULL),('6uvSLY-ak_w4p_wS8q33cA','PBasset000000000000002','000001000001000007','published','WebGUI::Asset::Wobject::Folder',1239213092,'3','997995720','3',NULL,0,NULL),('CarouselTmpl0000000001','6uvSLY-ak_w4p_wS8q33cA','000001000001000007000001','published','WebGUI::Asset::Template',1239290719,'3','997995720','3',NULL,0,NULL),('CarouselTmpl0000000002','6uvSLY-ak_w4p_wS8q33cA','000001000001000007000002','published','WebGUI::Asset::Template',1238878995,'3','997995720','3',NULL,0,NULL),('7F-BuEHi7t9bPi008H8xZQ','5bnNzteN7w3NnK9mF4XiCg','000001000001000042000012','published','WebGUI::Asset::Template',1239248021,'3','1251849727','3',NULL,0,NULL),('GaBAW-2iVhLMJaZQzVLE5A','PBasset000000000000002','000001000001000045','published','WebGUI::Asset::Wobject::Folder',1240103565,'3','997995720','3',NULL,0,NULL),('TKmhv8boP3TD2xwSwUBq0g','GaBAW-2iVhLMJaZQzVLE5A','000001000001000045000001','published','WebGUI::Asset::Template',1240103436,'3','997995720','3',NULL,0,NULL),('fowHfgOkJtAxdst7rugTog','PBasset000000000000002','000001000001000040','published','WebGUI::Asset::Wobject::Folder',1236184911,'3','997995720','3',NULL,0,NULL),('3QpYtHrq_jmAk1FNutQM5A','fowHfgOkJtAxdst7rugTog','000001000001000040000001','published','WebGUI::Asset::Template',1239237827,'3','997995720','3',NULL,0,NULL),('yxD5ka7XHebPLD-LXBwJqw','fowHfgOkJtAxdst7rugTog','000001000001000040000002','published','WebGUI::Asset::Template',1239918573,'3','997995720','3',NULL,0,NULL),('E3tzZjzhmYoNlAyP2VW33Q','fowHfgOkJtAxdst7rugTog','000001000001000040000003','published','WebGUI::Asset::Template',1239236292,'3','997995720','3',NULL,0,NULL),('TbDcVLbbznPi0I0rxQf2CQ','fowHfgOkJtAxdst7rugTog','000001000001000040000004','published','WebGUI::Asset::Template',1237524306,'3','997995720','3',NULL,0,NULL),('A16v-YjWAShXWvSACsraeg','fowHfgOkJtAxdst7rugTog','000001000001000040000005','published','WebGUI::Asset::Template',1239918710,'3','997995720','3',NULL,0,NULL),('0EAJ9EYb9ap2XwfrcXfdLQ','fowHfgOkJtAxdst7rugTog','000001000001000040000006','published','WebGUI::Asset::Template',1240262820,'3','997995720','3',NULL,0,NULL),('b1316COmd9xRv4fCI3LLGA','IZkrow_zwvbf4FCH-taVTQ','000001000001000002000002000013','published','WebGUI::Asset::Template',1236956475,'3','1251849906','3',NULL,0,NULL),('lo1rpxn3t8YPyKGers5eQg','QHn6T9rU7KsnS3Y70KCNTg','000001000001000002000010','published','WebGUI::Asset::Wobject::Folder',1238625621,'3','1251850125','3',NULL,0,NULL),('64tqS80D53Z0JoAs2cX2VQ','lo1rpxn3t8YPyKGers5eQg','000001000001000002000010000001','published','WebGUI::Asset::Template',1239400975,'3','1251850125','3',NULL,0,NULL),('lG2exkH9FeYvn4pA63idNg','lo1rpxn3t8YPyKGers5eQg','000001000001000002000010000002','published','WebGUI::Asset::Template',1239383808,'3','1251850125','3',NULL,0,NULL),('nWNVoMLrMo059mDRmfOp9g','5bnNzteN7w3NnK9mF4XiCg','000001000001000042000015','published','WebGUI::Asset::Template',1242259265,'3','1251849915','3',NULL,0,NULL),('brxm_faNdZX5tRo3p50g3g','PBasset000000000000002','000001000001000020','published','WebGUI::Asset::Wobject::Folder',1238054297,'3','997995720','3',NULL,0,NULL),('9j0_Z1j3Jd0QBbY2akb6qw','brxm_faNdZX5tRo3p50g3g','000001000001000020000001','published','WebGUI::Asset::Template',1238053232,'3','997995720','3',NULL,0,NULL),('oHh0UqAJeY7u2n--WD-BAA','brxm_faNdZX5tRo3p50g3g','000001000001000020000002','published','WebGUI::Asset::Template',1238040667,'3','997995720','3',NULL,0,NULL),('u9vfx33XDk5la1-QC5FK7g','brxm_faNdZX5tRo3p50g3g','000001000001000020000003','published','WebGUI::Asset::Template',1238048383,'3','997995720','3',NULL,0,NULL),('D6cJpRcey35aSkh9Q_FPUQ','aNmgn0cd6tldmC1FpW4KbA','000001000001000036000019','published','WebGUI::Asset::Template',1242407725,'3','1251849978','3',NULL,0,NULL),('S2_LsvVa95OSqc66ITAoig','4qh0kIsFUdd4Ox-Iu1JZgg','000001000001000012000007','published','WebGUI::Asset::Template',1242730712,'3','1251849967','3',NULL,0,NULL),('S3zpVitAmhy58CAioH359Q','5bnNzteN7w3NnK9mF4XiCg','000001000001000042000013','published','WebGUI::Asset::Template',1242893798,'3','1251849727','3',NULL,0,NULL),('kwTL1SWCk0GlpiJ5zAAEPQ','5bnNzteN7w3NnK9mF4XiCg','000001000001000042000014','published','WebGUI::Asset::Snippet',1244488512,'3','1251849727','3',NULL,0,NULL),('YP9WaMPJHvCJl-YwrLVcPw','f2EktltCvwQpl_3-B1yR7g','000001000001000060000002','published','WebGUI::Asset::Template',1245376837,'3','1288748300','3',NULL,0,NULL),('i9-G00ALhJOr0gMh-vHbKA','IZkrow_zwvbf4FCH-taVTQ','000001000001000002000002000014','published','WebGUI::Asset::Template',1250408924,'3','1251849906','3',NULL,0,NULL),('iCM9pRY5yYyjufROgaCDlg','fowHfgOkJtAxdst7rugTog','000001000001000040000007','published','WebGUI::Asset::Snippet',1253305659,'3','997995720','3',NULL,0,NULL),('limMkk80fMB3fqNZVf162w','f2EktltCvwQpl_3-B1yR7g','000001000001000060000001','published','WebGUI::Asset::Template',1253507213,'3','1288748259','3',NULL,0,NULL),('hreA_bgxiTX-EzWCSZCZJw','4qh0kIsFUdd4Ox-Iu1JZgg','000001000001000012000008','published','WebGUI::Asset::Template',1257311887,'3','997995720','3',NULL,0,NULL),('2GxjjkRuRkdUg_PccRPjpA','aNmgn0cd6tldmC1FpW4KbA','000001000001000036000024','published','WebGUI::Asset::Template',1257311888,'3','1288748105','3',NULL,0,NULL),('_aE16Rr1-bXBf8SIaLZjCg','zyWi26q9na-iiZqL4yedog','000001000001000021000013','published','WebGUI::Asset::Template',1257311888,'3','1288748085','3',NULL,0,NULL),('P_4uog81vSUK4KxuW_4GUA','PBasset000000000000002','000001000001000054','published','WebGUI::Asset::Wobject::Folder',1258524916,'3','997995720','3',NULL,0,NULL),('H_-8zjtWsO1FUpQqNtkxNQ','P_4uog81vSUK4KxuW_4GUA','000001000001000054000001','published','WebGUI::Asset::Snippet',1258524916,'3','997995720','3',NULL,0,NULL),('8tqyQx-LwYUHIWOlKPjJrA','4qh0kIsFUdd4Ox-Iu1JZgg','000001000001000012000009','published','WebGUI::Asset::Template',1258524917,'3','1288748017','3',NULL,0,NULL),('DoVNijm6lMDE0cYrtvEbDQ','4qh0kIsFUdd4Ox-Iu1JZgg','000001000001000012000010','published','WebGUI::Asset::Template',1258524917,'3','1288748017','3',NULL,0,NULL),('ktSvKU8riGimhcsxXwqvPQ','4qh0kIsFUdd4Ox-Iu1JZgg','000001000001000012000011','published','WebGUI::Asset::Template',1258524917,'3','1288748017','3',NULL,0,NULL),('mRtqRuVikSe82BQsYBlD0A','tPagC0AQErZXjLFZQ6OI1g','000001000001000017000003','published','WebGUI::Asset::Template',1263962529,'3','1288747987','3',NULL,0,NULL),('0iMMbGN3BevuCBHjjLiQNA','1z9J1O08n_7gVVlBwSRBJQ','000001000001000005000009','published','WebGUI::Asset::Wobject::Folder',1269401469,'3','997995720','3',NULL,0,NULL),('zaHUYsE_PgKk8hnVd8ffEQ','0iMMbGN3BevuCBHjjLiQNA','000001000001000005000009000001','published','WebGUI::Asset::Template',1269401469,'3','997995720','3',NULL,0,NULL),('6A4yIjWwJfIE0Ep-I0jutg','1z9J1O08n_7gVVlBwSRBJQ','000001000001000005000010','published','WebGUI::Asset::Wobject::Folder',1269401469,'3','997995720','3',NULL,0,NULL),('_P4PMiraGsLTfOjK4fYQPQ','6A4yIjWwJfIE0Ep-I0jutg','000001000001000005000010000001','published','WebGUI::Asset::Template',1269401469,'3','997995720','3',NULL,0,NULL),('i6-BofrJJYozovlzFBByXg','kaPRSaf8UKiskiGEgJgLAw','000001000001000015000017000031','published','WebGUI::Asset::File::Image',1270612331,'3','997995720','3',NULL,0,NULL),('fU_OZCmtdFNJ8a6bMve8ng','kaPRSaf8UKiskiGEgJgLAw','000001000001000015000017000032','published','WebGUI::Asset::File::Image',1270612331,'3','997995720','3',NULL,0,NULL),('YXCtusAxb4vzZ5sTnUA5DA','kaPRSaf8UKiskiGEgJgLAw','000001000001000015000017000033','published','WebGUI::Asset::File::Image',1270612331,'3','997995720','3',NULL,0,NULL),('k_xuE82wwp8gFVl9aaaG8g','kaPRSaf8UKiskiGEgJgLAw','000001000001000015000017000034','published','WebGUI::Asset::File::Image',1270612331,'3','997995720','3',NULL,0,NULL),('NPM_WItpM5IzLWBhWjYfCA','kaPRSaf8UKiskiGEgJgLAw','000001000001000015000017000035','published','WebGUI::Asset::File::Image',1270612331,'3','997995720','3',NULL,0,NULL),('qxd0WpRGqDPWP8WBicYvEA','gI_TxK-5S4DNuv42wpImmw','000001000001000015000026','published','WebGUI::Asset::Snippet',1271820952,'3','1288748204','3',NULL,0,NULL),('30h5rHxzE_Q0CyI3Gg7EJw','aNmgn0cd6tldmC1FpW4KbA','000001000001000036000020','published','WebGUI::Asset::Template',1273032715,'3','997995720','3',NULL,0,NULL),('jysVZeUR0Bx2NfrKs5sulg','aNmgn0cd6tldmC1FpW4KbA','000001000001000036000021','published','WebGUI::Asset::Template',1273032715,'3','997995720','3',NULL,0,NULL),('300AozDaeveAjB_KN0ljlQ','aNmgn0cd6tldmC1FpW4KbA','000001000001000036000022','published','WebGUI::Asset::Template',1273032715,'3','997995720','3',NULL,0,NULL),('GqnZPB0gLoZmqQzYFaq7bg','aNmgn0cd6tldmC1FpW4KbA','000001000001000036000023','published','WebGUI::Asset::Template',1273032716,'3','997995720','3',NULL,0,NULL),('t87D1138NhPHhA23-hozBA','PBasset000000000000002','000001000001000055','published','WebGUI::Asset::Wobject::Folder',1273032716,'3','997995720','3',NULL,0,NULL),('QtBumey5ffc-xffRp1-7Aw','t87D1138NhPHhA23-hozBA','000001000001000055000001','published','WebGUI::Asset::Wobject::Folder',1273032716,'3','997995720','3',NULL,0,NULL),('-0sK2rX1cwQt1ipUSqsiQQ','QtBumey5ffc-xffRp1-7Aw','000001000001000055000001000001','published','WebGUI::Asset::File::Image',1273032716,'3','997995720','3',NULL,0,NULL),('hS_eOaVz9Qb5ixndK9EXAw','QtBumey5ffc-xffRp1-7Aw','000001000001000055000001000002','published','WebGUI::Asset::File::Image',1273032716,'3','997995720','3',NULL,0,NULL),('k2p-Be8C98pf2cRq7E-JHg','QtBumey5ffc-xffRp1-7Aw','000001000001000055000001000003','published','WebGUI::Asset::File::Image',1273032716,'3','997995720','3',NULL,0,NULL),('aYG4fjbMPbC4LCuuMp4gGA','QtBumey5ffc-xffRp1-7Aw','000001000001000055000001000004','published','WebGUI::Asset::File::Image',1273032716,'3','997995720','3',NULL,0,NULL),('F122Ey0NtVAw6Lfv1M6G_Q','QtBumey5ffc-xffRp1-7Aw','000001000001000055000001000005','published','WebGUI::Asset::File::Image',1273032716,'3','997995720','3',NULL,0,NULL),('qmXHKrQ6EDLSOGkrEKRUDA','QtBumey5ffc-xffRp1-7Aw','000001000001000055000001000006','published','WebGUI::Asset::File::Image',1273032716,'3','997995720','3',NULL,0,NULL),('4qZgXjPPO4fwV879yu5XUg','QtBumey5ffc-xffRp1-7Aw','000001000001000055000001000007','published','WebGUI::Asset::File::Image',1273032716,'3','997995720','3',NULL,0,NULL),('mb-xeAugm5GJdvu-Wh0MtQ','QtBumey5ffc-xffRp1-7Aw','000001000001000055000001000008','published','WebGUI::Asset::File::Image',1273032717,'3','997995720','3',NULL,0,NULL),('84Y9CwgzP6eNU7wZnk019Q','QtBumey5ffc-xffRp1-7Aw','000001000001000055000001000009','published','WebGUI::Asset::File::Image',1273032717,'3','997995720','3',NULL,0,NULL),('ikXTtJKZfHVxqw-47E4AQA','QtBumey5ffc-xffRp1-7Aw','000001000001000055000001000010','published','WebGUI::Asset::File::Image',1273032717,'3','997995720','3',NULL,0,NULL),('DhRWPTgzhvju_-TbMN3CwA','QtBumey5ffc-xffRp1-7Aw','000001000001000055000001000011','published','WebGUI::Asset::File::Image',1273032717,'3','997995720','3',NULL,0,NULL),('6njI-pZz2bwsjWh-Q1_11g','QtBumey5ffc-xffRp1-7Aw','000001000001000055000001000012','published','WebGUI::Asset::File::Image',1273032717,'3','997995720','3',NULL,0,NULL),('_Hz1Gnd3yEnJzVS7l7nJMQ','QtBumey5ffc-xffRp1-7Aw','000001000001000055000001000013','published','WebGUI::Asset::File::Image',1273032717,'3','997995720','3',NULL,0,NULL),('VOOrXK5dFnkGih7aTkuDWA','QtBumey5ffc-xffRp1-7Aw','000001000001000055000001000014','published','WebGUI::Asset::File::Image',1273032717,'3','997995720','3',NULL,0,NULL),('ruf-QejOkUHDRtfgakHlbA','QtBumey5ffc-xffRp1-7Aw','000001000001000055000001000015','published','WebGUI::Asset::File::Image',1273032717,'3','997995720','3',NULL,0,NULL),('FSHy5KjQjkt599PHS41seA','QtBumey5ffc-xffRp1-7Aw','000001000001000055000001000016','published','WebGUI::Asset::File::Image',1273032717,'3','997995720','3',NULL,0,NULL),('nuYYXAz4KNNxgfumfnpo_g','QtBumey5ffc-xffRp1-7Aw','000001000001000055000001000017','published','WebGUI::Asset::File::Image',1273032718,'3','997995720','3',NULL,0,NULL),('Mr7ljjoy6n4fZojpQWajKQ','QtBumey5ffc-xffRp1-7Aw','000001000001000055000001000018','published','WebGUI::Asset::File::Image',1273032718,'3','997995720','3',NULL,0,NULL),('ApkqpDOrJDxK3QrWBGSRIg','QtBumey5ffc-xffRp1-7Aw','000001000001000055000001000019','published','WebGUI::Asset::File::Image',1273032718,'3','997995720','3',NULL,0,NULL),('AzzTY0Lay1f_YGeQJFnQCA','QtBumey5ffc-xffRp1-7Aw','000001000001000055000001000020','published','WebGUI::Asset::File::Image',1273032718,'3','997995720','3',NULL,0,NULL),('OiJNwP1gAlcva8_yOtL4gA','t87D1138NhPHhA23-hozBA','000001000001000055000002','published','WebGUI::Asset::Template',1273032718,'3','997995720','3',NULL,0,NULL),('JOuCU4x5BJfVHfkfMkVQdQ','t87D1138NhPHhA23-hozBA','000001000001000055000003','published','WebGUI::Asset::Snippet',1273032718,'3','997995720','3',NULL,0,NULL),('Am1J-meNBmhqFfEIWy6Gag','t87D1138NhPHhA23-hozBA','000001000001000055000004','published','WebGUI::Asset::Wobject::Navigation',1273032718,'3','997995720','3',NULL,0,NULL),('gaIOm5cr2TkT9Fk6QmZWug','t87D1138NhPHhA23-hozBA','000001000001000055000005','published','WebGUI::Asset::Template',1273032718,'3','997995720','3',NULL,0,NULL),('w0QifHLhsrzeOpFKl-DX-Q','t87D1138NhPHhA23-hozBA','000001000001000055000006','published','WebGUI::Asset::Snippet',1273032718,'3','997995720','3',NULL,0,NULL),('x_hiUi1XZloBvV47Obnu8Q','t87D1138NhPHhA23-hozBA','000001000001000055000007','published','WebGUI::Asset::Wobject::Navigation',1273032718,'3','997995720','3',NULL,0,NULL),('hpCk0B3vQzgc-QJhSol41w','t87D1138NhPHhA23-hozBA','000001000001000055000008','published','WebGUI::Asset::Template',1273032718,'3','997995720','3',NULL,0,NULL),('UUwEL6hLEPdrnkZnKRzFYQ','t87D1138NhPHhA23-hozBA','000001000001000055000009','published','WebGUI::Asset::Wobject::Search',1273032718,'3','997995720','3',NULL,0,NULL),('OfKbvK7CrfMnfc8WDoF4Rg','t87D1138NhPHhA23-hozBA','000001000001000055000010','published','WebGUI::Asset::Template',1273032718,'3','997995720','3',NULL,0,NULL),('CQp-RFA2pMh5lFSggPPPYg','PBasset000000000000002','000001000001000056','published','WebGUI::Asset::Wobject::Folder',1273032719,'3','997995720','3',NULL,0,NULL),('_Mi_NTd3x8UB96LWezWHnw','CQp-RFA2pMh5lFSggPPPYg','000001000001000056000001','published','WebGUI::Asset::Wobject::Folder',1273032719,'3','997995720','3',NULL,0,NULL),('A_5LVQQWR73QZR8FFbny_w','_Mi_NTd3x8UB96LWezWHnw','000001000001000056000001000001','published','WebGUI::Asset::File::Image',1273032719,'3','997995720','3',NULL,0,NULL),('wywIfa_VuTsq0c5Ed-W-MA','_Mi_NTd3x8UB96LWezWHnw','000001000001000056000001000002','published','WebGUI::Asset::File::Image',1273032719,'3','997995720','3',NULL,0,NULL),('xmykMFjri1O2NrYHbeToVQ','_Mi_NTd3x8UB96LWezWHnw','000001000001000056000001000003','published','WebGUI::Asset::File::Image',1273032719,'3','997995720','3',NULL,0,NULL),('0IIGNBs_-INzqBC5VLeJgw','_Mi_NTd3x8UB96LWezWHnw','000001000001000056000001000004','published','WebGUI::Asset::File::Image',1273032719,'3','997995720','3',NULL,0,NULL),('FXmePdyS0YKuZ1VCGGpK9w','_Mi_NTd3x8UB96LWezWHnw','000001000001000056000001000005','published','WebGUI::Asset::File::Image',1273032719,'3','997995720','3',NULL,0,NULL),('66qCywiE_fiL9u5YIaJhgw','_Mi_NTd3x8UB96LWezWHnw','000001000001000056000001000006','published','WebGUI::Asset::File::Image',1273032719,'3','997995720','3',NULL,0,NULL),('n5VpG4lFsOG1elaWDQbilw','_Mi_NTd3x8UB96LWezWHnw','000001000001000056000001000007','published','WebGUI::Asset::File::Image',1273032719,'3','997995720','3',NULL,0,NULL),('g3JH1PRq6m6Bj_PnGpcrSQ','CQp-RFA2pMh5lFSggPPPYg','000001000001000056000002','published','WebGUI::Asset::Wobject::Folder',1273032719,'3','997995720','3',NULL,0,NULL),('egpnaaFqWmJwYTZ5CvFH9g','g3JH1PRq6m6Bj_PnGpcrSQ','000001000001000056000002000001','published','WebGUI::Asset::Snippet',1273032719,'3','997995720','3',NULL,0,NULL),('BBpxqoSseIor5C9ei9JEFQ','g3JH1PRq6m6Bj_PnGpcrSQ','000001000001000056000002000002','published','WebGUI::Asset::Snippet',1273032719,'3','997995720','3',NULL,0,NULL),('G0hl4VilbFKipToyxKqFrg','CQp-RFA2pMh5lFSggPPPYg','000001000001000056000003','published','WebGUI::Asset::Wobject::Folder',1273032719,'3','997995720','3',NULL,0,NULL),('GWU2qZqe6yEuAKG-5HtBdg','CQp-RFA2pMh5lFSggPPPYg','000001000001000056000004','published','WebGUI::Asset::Wobject::Folder',1273032719,'3','997995720','3',NULL,0,NULL),('Qk24uXao2yowR6zxbVJ0xA','GWU2qZqe6yEuAKG-5HtBdg','000001000001000056000004000001','published','WebGUI::Asset::Template',1273032719,'3','997995720','3',NULL,0,NULL),('39KNX53B4nYJAyIE1lu8ZQ','GWU2qZqe6yEuAKG-5HtBdg','000001000001000056000004000002','published','WebGUI::Asset::Template',1273032720,'3','997995720','3',NULL,0,NULL),('ztfi__vHJLsQDsMenrEn-w','GWU2qZqe6yEuAKG-5HtBdg','000001000001000056000004000003','published','WebGUI::Asset::Template',1273032720,'3','997995720','3',NULL,0,NULL),('8qyrDCNeggB4dzKiOoRuiQ','GWU2qZqe6yEuAKG-5HtBdg','000001000001000056000004000004','published','WebGUI::Asset::Template',1273032720,'3','997995720','3',NULL,0,NULL),('M1NyNeS5jpdIsiIWFiJprw','GWU2qZqe6yEuAKG-5HtBdg','000001000001000056000004000005','published','WebGUI::Asset::Template',1273032720,'3','997995720','3',NULL,0,NULL),('AsfpsOpsGzZCb9m7MyxPuw','CQp-RFA2pMh5lFSggPPPYg','000001000001000056000005','published','WebGUI::Asset::Wobject::Folder',1273032720,'3','997995720','3',NULL,0,NULL),('n-Vr_wgxOkwiHGt1nJto9w','AsfpsOpsGzZCb9m7MyxPuw','000001000001000056000005000001','published','WebGUI::Asset::Wobject::Navigation',1273032720,'3','997995720','3',NULL,0,NULL),('jmqLxnoWb6p92Cr12lf1hw','AsfpsOpsGzZCb9m7MyxPuw','000001000001000056000005000002','published','WebGUI::Asset::Wobject::Navigation',1273032720,'3','997995720','3',NULL,0,NULL),('8E2UOnj_XPEghTj7nfVM0g','CQp-RFA2pMh5lFSggPPPYg','000001000001000056000006','published','WebGUI::Asset::Wobject::Search',1273032720,'3','997995720','3',NULL,0,NULL),('1qFjOEiILIwr1xB5_ebppQ','PBasset000000000000002','000001000001000057','published','WebGUI::Asset::Wobject::Folder',1273032721,'3','997995720','3',NULL,0,NULL),('xD76UfQ_JnSgTLBNvytcpQ','1qFjOEiILIwr1xB5_ebppQ','000001000001000057000001','published','WebGUI::Asset::Wobject::Folder',1273032721,'3','997995720','3',NULL,0,NULL),('pAXR7Kby4O-dSxOwLp1GaA','xD76UfQ_JnSgTLBNvytcpQ','000001000001000057000001000001','published','WebGUI::Asset::File::Image',1273032721,'3','997995720','3',NULL,0,NULL),('TthzMLO4n3qxy59QZ5YBHg','xD76UfQ_JnSgTLBNvytcpQ','000001000001000057000001000002','published','WebGUI::Asset::File::Image',1273032721,'3','997995720','3',NULL,0,NULL),('3n31SQjYa150TBrRBgMPhA','xD76UfQ_JnSgTLBNvytcpQ','000001000001000057000001000003','published','WebGUI::Asset::File::Image',1273032721,'3','997995720','3',NULL,0,NULL),('R4RxDufGbbIzEmpcoEcLrw','xD76UfQ_JnSgTLBNvytcpQ','000001000001000057000001000004','published','WebGUI::Asset::File::Image',1273032721,'3','997995720','3',NULL,0,NULL),('xyyn5mz3xGyvrcI1rY8C-w','1qFjOEiILIwr1xB5_ebppQ','000001000001000057000002','published','WebGUI::Asset::Snippet',1273032721,'3','997995720','3',NULL,0,NULL),('KKt0VB_eoQxw9xEsHsAhag','1qFjOEiILIwr1xB5_ebppQ','000001000001000057000003','published','WebGUI::Asset::Template',1273032721,'3','997995720','3',NULL,0,NULL),('h0bOzz7WvdaVZXsjpwtkww','1qFjOEiILIwr1xB5_ebppQ','000001000001000057000004','published','WebGUI::Asset::Wobject::Navigation',1273032721,'3','997995720','3',NULL,0,NULL),('_z3ukLCqvoaUygfsbbkBzw','1qFjOEiILIwr1xB5_ebppQ','000001000001000057000005','published','WebGUI::Asset::Template',1273032721,'3','997995720','3',NULL,0,NULL),('qFOfW1sKyOTnGNcP6BXbwg','1qFjOEiILIwr1xB5_ebppQ','000001000001000057000006','published','WebGUI::Asset::Wobject::Navigation',1273032721,'3','997995720','3',NULL,0,NULL),('Pt38T5_MWSue2e1N36MLdw','1qFjOEiILIwr1xB5_ebppQ','000001000001000057000007','published','WebGUI::Asset::Template',1273032721,'3','997995720','3',NULL,0,NULL),('LDcM1Iop17nF2MoSa7zo_Q','1qFjOEiILIwr1xB5_ebppQ','000001000001000057000008','published','WebGUI::Asset::Template',1273032721,'3','997995720','3',NULL,0,NULL),('hVF1taXj4bfd7DuL4XDMYg','1qFjOEiILIwr1xB5_ebppQ','000001000001000057000009','published','WebGUI::Asset::Template',1273032721,'3','997995720','3',NULL,0,NULL),('x4-2QYRSrIB_BJfnSKKj4w','1qFjOEiILIwr1xB5_ebppQ','000001000001000057000010','published','WebGUI::Asset::Template',1273032721,'3','997995720','3',NULL,0,NULL),('423R4Y6XIt3wUzlnLo-chg','1qFjOEiILIwr1xB5_ebppQ','000001000001000057000011','published','WebGUI::Asset::Template',1273032721,'3','997995720','3',NULL,0,NULL),('oZ1Mk-zExYUyD-JsjTvaHg','1qFjOEiILIwr1xB5_ebppQ','000001000001000057000012','published','WebGUI::Asset::Template',1273032722,'3','997995720','3',NULL,0,NULL),('mYwS8CZaOLMt0raaKXGZcQ','1qFjOEiILIwr1xB5_ebppQ','000001000001000057000013','published','WebGUI::Asset::Template',1273032722,'3','997995720','3',NULL,0,NULL),('kSGR4OHsKmhLQTuLkisOww','1qFjOEiILIwr1xB5_ebppQ','000001000001000057000014','published','WebGUI::Asset::Template',1273032722,'3','997995720','3',NULL,0,NULL),('G5DgNizuG3jXkjPp6UaGrA','1qFjOEiILIwr1xB5_ebppQ','000001000001000057000015','published','WebGUI::Asset::Wobject::Folder',1273032722,'3','997995720','3',NULL,0,NULL),('U78V5IJHVljvRTb6ydsTHg','G5DgNizuG3jXkjPp6UaGrA','000001000001000057000015000001','published','WebGUI::Asset::Template',1273032722,'3','997995720','3',NULL,0,NULL),('Xqc3qPUXoFE8dt9qocdWig','G5DgNizuG3jXkjPp6UaGrA','000001000001000057000015000002','published','WebGUI::Asset::Template',1273032722,'3','997995720','3',NULL,0,NULL),('IBTb7wllSt7RxFmmvm9pkQ','G5DgNizuG3jXkjPp6UaGrA','000001000001000057000015000003','published','WebGUI::Asset::Template',1273032722,'3','997995720','3',NULL,0,NULL),('Z1EM7JMI_4SkyfaZffSElw','G5DgNizuG3jXkjPp6UaGrA','000001000001000057000015000004','published','WebGUI::Asset::Template',1273032722,'3','997995720','3',NULL,0,NULL),('fJg7SKpGZwzSNx3_ebki1A','G5DgNizuG3jXkjPp6UaGrA','000001000001000057000015000005','published','WebGUI::Asset::Template',1273032722,'3','997995720','3',NULL,0,NULL),('ihf4Rx6p72xn_nVKaIeOaw','G5DgNizuG3jXkjPp6UaGrA','000001000001000057000015000006','published','WebGUI::Asset::Template',1273032722,'3','997995720','3',NULL,0,NULL),('jrWJ6nHXkqgFbml7BZ9chw','1qFjOEiILIwr1xB5_ebppQ','000001000001000057000016','published','WebGUI::Asset::Template',1273032722,'3','997995720','3',NULL,0,NULL),('Ys6f3vpe0y1uRcaCJ2TlFw','1qFjOEiILIwr1xB5_ebppQ','000001000001000057000017','published','WebGUI::Asset::Template',1273032722,'3','997995720','3',NULL,0,NULL),('default_CS_unsubscribe','GNOAsX98vCsl0JRwfwL-gg','000001000001000008000030','published','WebGUI::Asset::Template',1274238758,'3','997995720','3',NULL,0,NULL),('mfHGkp6t9gdclmzN33OEnw','1z9J1O08n_7gVVlBwSRBJQ','000001000001000005000012','published','WebGUI::Asset::Template',1277868927,'3','1288748133','3',NULL,0,NULL),('l0guT3vTR3B8cL6vtP-g3A','2TqQc4OISddWCZmRY1_m8A','000001000002000004000002','published','WebGUI::Asset::Wobject::Article',1271445611,'1','997995720','3',NULL,0,NULL),('k2Qj03FrAOXYra8kDJYYXw','2TqQc4OISddWCZmRY1_m8A','000001000002000004000003','published','WebGUI::Asset::Wobject::Article',1271357513,'1','997995720','3',NULL,0,NULL),('ksSfkZdsr0uC62NwIk6hFQ','2TqQc4OISddWCZmRY1_m8A','000001000002000004000004','published','WebGUI::Asset::Wobject::Article',1271356973,'1','997995720','3',NULL,0,NULL),('nWxS5jnA3o3DgPEwBeR7yQ','2TqQc4OISddWCZmRY1_m8A','000001000002000004000005','published','WebGUI::Asset::Wobject::Article',1271357239,'1','997995720','3',NULL,0,NULL),('AssetReportFolder00001','PBasset000000000000002','000001000001000058','published','WebGUI::Asset::Wobject::Folder',1281501163,'3','997995720','3',NULL,0,NULL),('sJtcUCfn0CVbKdb4QM61Yw','AssetReportFolder00001','000001000001000058000001','published','WebGUI::Asset::Template',1281501163,'3','997995720','3',NULL,0,NULL),('N7uMnnicbyTEulcuRi1sSg','PBasset000000000000003','000001000003000001','published','WebGUI::Asset::Wobject::Folder',1283900195,'3','997995720','3',NULL,0,NULL),('bCGr7FRtZt-XYlBVUEJBjw','N7uMnnicbyTEulcuRi1sSg','000001000003000001000001','published','WebGUI::Asset::File::Image',1278013724,'3','997995720','3',NULL,0,NULL),('A3T7jpTBKLYws1h5mJ0t8A','RrV4aAPnn4dM0ZcU3OXnlw','000001000001000041000007','published','WebGUI::Asset::Snippet',1286336607,'3','997995720','3',NULL,0,NULL),('sK_0zVw4kwdJ1sqREIsSzA','1z9J1O08n_7gVVlBwSRBJQ','000001000001000005000011','published','WebGUI::Asset::Template',1287545015,'3','997995720','3',NULL,0,NULL),('_cD6DLM_Fs5IlrLeWUjrjg','PBasset000000000000002','000001000001000059','published','WebGUI::Asset::Wobject::Folder',1287545015,'3','997995720','3',NULL,0,NULL),('lYhMheuuLROK_iNjaQuPKg','_cD6DLM_Fs5IlrLeWUjrjg','000001000001000059000001','published','WebGUI::Asset::Template',1287545015,'3','997995720','3',NULL,0,NULL),('f2EktltCvwQpl_3-B1yR7g','PBasset000000000000002','000001000001000060','published','WebGUI::Asset::Wobject::Folder',1288748251,'3','997995720','3',NULL,0,NULL),('Rqwgh50A3gGcOKIrdi_kxw','aNmgn0cd6tldmC1FpW4KbA','000001000001000036000025','published','WebGUI::Asset::Template',1313542962,'3','997995720','3',NULL,0,NULL); -ALTER TABLE `asset` ENABLE KEYS; -ALTER TABLE `assetAspectRssFeed` DISABLE KEYS; -INSERT INTO `assetAspectRssFeed` VALUES ('fK-HMSboA3uu0c1KYkYspA',1124395696,25,NULL,'','',NULL,'','','rss\natom'),('pbproto000000000000002',1163019036,25,NULL,'','',NULL,'','',''); -ALTER TABLE `assetAspectRssFeed` ENABLE KEYS; -ALTER TABLE `assetData` DISABLE KEYS; -INSERT INTO `assetData` VALUES ('PBasset000000000000001',1124395696,'3','pbversion0000000000001','approved','Root','Root','root','3','7','3',NULL,0,1,0,0,0,158,NULL,0,1,0,1242380151,NULL,0),('PBasset000000000000002',1124395696,'3','pbversion0000000000001','approved','Import Node','Import','root/import','3','7','12',NULL,0,1,0,0,0,309,NULL,0,1,0,1242380151,NULL,0),('Vzv1pWpg_w6R_o-b0rM2qQ',1147642515,'3','pbversion0000000000001','approved','Ad','Ad','home/ad2','3','7','4',NULL,0,1,0,0,0,2155188,NULL,0,1,0,1301974027,NULL,0),('fK-HMSboA3uu0c1KYkYspA',1124395696,'3','pbversion0000000000001','approved','The Latest News','The Latest News','the_latest_news/the_latest_news','3','7','3',NULL,0,1,0,0,0,524,NULL,0,1,0,1285124313,NULL,0),('7-0-style0000000000003',1147642492,'3','pbversion0000000000001','approved','css01.css','css01.css','style1/css01.css','3','7','12',NULL,0,0,0,0,0,9086,NULL,0,1,0,1285124168,NULL,0),('PBnav00000000000000001',1124395696,'3','pbversion0000000000001','approved','crumbTrail','crumbTrail','crumbtrail','3','7','12',NULL,0,1,0,0,0,371,NULL,0,1,0,1247779653,NULL,0),('PBnav00000000000000014',1124395696,'3','pbversion0000000000001','approved','FlexMenu','FlexMenu','flexmenu','3','7','12',NULL,0,1,0,0,0,353,NULL,0,1,0,1247779653,NULL,0),('PBnav00000000000000015',1124395696,'3','pbversion0000000000001','approved','currentMenuVertical','currentMenuVertical','currentmenuvertical','3','7','12',NULL,0,1,0,0,0,394,NULL,0,1,0,1247779653,NULL,0),('PBnav00000000000000016',1124395696,'3','pbversion0000000000001','approved','currentMenuHorizontal','currentMenuHorizontal','currentmenuhorizontal','3','7','12',NULL,0,1,0,0,0,400,NULL,0,1,0,1247779653,NULL,0),('PBnav00000000000000017',1124395696,'3','pbversion0000000000001','approved','PreviousDropMenu','PreviousDropMenu','previousdropmenu','3','7','12',NULL,0,1,0,0,0,388,NULL,0,1,0,1247779653,NULL,0),('PBnav00000000000000018',1124395696,'3','pbversion0000000000001','approved','previousMenuVertical','previousMenuVertical','previousmenuvertical','3','7','12',NULL,0,1,0,0,0,398,NULL,0,1,0,1247779653,NULL,0),('PBnav00000000000000019',1124395696,'3','pbversion0000000000001','approved','previousMenuHorizontal','previousMenuHorizontal','previousmenuhorizontal','3','7','12',NULL,0,1,0,0,0,404,NULL,0,1,0,1247779653,NULL,0),('PBnav00000000000000020',1124395696,'3','pbversion0000000000001','approved','rootmenu','rootmenu','rootmenu','3','7','12',NULL,0,1,0,0,0,355,NULL,0,1,0,1247779653,NULL,0),('PBnav00000000000000021',1124395696,'3','pbversion0000000000001','approved','SpecificDropMenu','SpecificDropMenu','specificdropmenu','3','7','12',NULL,0,1,0,0,0,379,NULL,0,1,0,1247779653,NULL,0),('PBnav00000000000000002',1124395696,'3','pbversion0000000000001','approved','SpecificSubMenuVertical','SpecificSubMenuVertical','specificsubmenuvertical','3','7','12',NULL,0,1,0,0,0,400,NULL,0,1,0,1247779653,NULL,0),('PBnav00000000000000006',1124395696,'3','pbversion0000000000001','approved','SpecificSubMenuHorizontal','SpecificSubMenuHorizontal','specificsubmenuhorizontal','3','7','12',NULL,0,1,0,0,0,406,NULL,0,1,0,1247779653,NULL,0),('PBnav00000000000000007',1124395696,'3','pbversion0000000000001','approved','TopLevelMenuVertical','TopLevelMenuVertical','toplevelmenuvertical','3','7','12',NULL,0,1,0,0,0,391,NULL,0,1,0,1247779653,NULL,0),('PBnav00000000000000008',1124395696,'3','pbversion0000000000001','approved','TopLevelMenuHorizontal','TopLevelMenuHorizontal','toplevelmenuhorizontal','3','7','12',NULL,0,1,0,0,0,397,NULL,0,1,0,1247779653,NULL,0),('PBnav00000000000000009',1124395696,'3','pbversion0000000000001','approved','RootTab','RootTab','roottab','3','7','12',NULL,0,1,0,0,0,352,NULL,0,1,0,1247779653,NULL,0),('PBnav00000000000000010',1124395696,'3','pbversion0000000000001','approved','TopDropMenu','TopDropMenu','topdropmenu','3','7','12',NULL,0,1,0,0,0,364,NULL,0,1,0,1247779653,NULL,0),('PBnav00000000000000011',1124395696,'3','pbversion0000000000001','approved','dtree','dtree','dtree','3','7','12',NULL,0,1,0,0,0,352,NULL,0,1,0,1247779653,NULL,0),('PBnav00000000000000012',1124395696,'3','pbversion0000000000001','approved','coolmenu','coolmenu','coolmenu','3','7','12',NULL,0,1,0,0,0,356,NULL,0,1,0,1247779653,NULL,0),('PBnav00000000000000013',1124395696,'3','pbversion0000000000001','approved','Synopsis','Synopsis','synopsis','3','7','12',NULL,0,1,0,0,0,367,NULL,0,1,0,1247779653,NULL,0),('7-0-style0000000000006',1147642493,'3','pbversion0000000000001','approved','main_bg.gif','main_bg.gif','style1/main_bg.gif','3','7','12',NULL,0,0,0,0,0,1149,NULL,0,1,0,1242380143,NULL,0),('PBrichedit000000000002',1124395696,'3','pbversion0000000000001','approved','Forum Rich Edit','Forum Rich Edit','forum_rich_edit','3','7','12',NULL,0,0,0,0,0,873,NULL,0,1,0,1242380152,NULL,0),('7-0-style0000000000068',1147642510,'3','pbversion0000000000001','approved','spacer.gif','spacer.gif','style3/spacer.gif','3','7','12',NULL,0,0,0,0,0,358,NULL,0,1,0,1242380145,NULL,0),('7-0-style0000000000066',1147642509,'3','pbversion0000000000001','approved','nav_bg_on.jpg','nav_bg_on.jpg','style3/nav_bg_on.jpg','3','7','12',NULL,0,0,0,0,0,658,NULL,0,1,0,1242380145,NULL,0),('7-0-style0000000000067',1147642509,'3','pbversion0000000000001','approved','pb.jpg','pb.jpg','style3/pb.jpg','3','7','12',NULL,0,0,0,0,0,24981,NULL,0,1,0,1242380145,NULL,0),('7-0-style0000000000062',1147642508,'3','pbversion0000000000001','approved','nav_bg1.jpg','nav_bg1.jpg','style3/nav_bg1.jpg','3','7','12',NULL,0,0,0,0,0,672,NULL,0,1,0,1242380145,NULL,0),('7-0-style0000000000063',1147642508,'3','pbversion0000000000001','approved','nav_bg1_on.jpg','nav_bg1_on.jpg','style3/nav_bg1_on.jpg','3','7','12',NULL,0,0,0,0,0,683,NULL,0,1,0,1242380145,NULL,0),('7-0-style0000000000064',1147642509,'3','pbversion0000000000001','approved','nav_bg2.jpg','nav_bg2.jpg','style3/nav_bg2.jpg','3','7','12',NULL,0,0,0,0,0,675,NULL,0,1,0,1242380145,NULL,0),('7-0-style0000000000065',1147642509,'3','pbversion0000000000001','approved','nav_bg2_on.jpg','nav_bg2_on.jpg','style3/nav_bg2_on.jpg','3','7','12',NULL,0,0,0,0,0,688,NULL,0,1,0,1242380145,NULL,0),('7-0-style0000000000061',1147642508,'3','pbversion0000000000001','approved','nav_bg.jpg','nav_bg.jpg','style3/nav_bg.jpg','3','7','12',NULL,0,0,0,0,0,669,NULL,0,1,0,1242380145,NULL,0),('7-0-style0000000000057',1147642507,'3','pbversion0000000000001','approved','main_bg.jpg','main_bg.jpg','style3/main_bg.jpg','3','7','12',NULL,0,0,0,0,0,639,NULL,0,1,0,1242380144,NULL,0),('7-0-style0000000000058',1147642507,'3','pbversion0000000000001','approved','main_bottom.jpg','main_bottom.jpg','style3/main_bottom.jpg','3','7','12',NULL,0,0,0,0,0,2630,NULL,0,1,0,1242380144,NULL,0),('7-0-style0000000000060',1147642508,'3','pbversion0000000000001','approved','main_top_bg.jpg','main_top_bg.jpg','style3/main_top_bg.jpg','3','7','12',NULL,0,0,0,0,0,687,NULL,0,1,0,1242380144,NULL,0),('7-0-style0000000000054',1147642506,'3','pbversion0000000000001','approved','header_bg.jpg','header_bg.jpg','style3/header_bg.jpg','3','7','12',NULL,0,0,0,0,0,715,NULL,0,1,0,1242380144,NULL,0),('7-0-style0000000000055',1147642506,'3','pbversion0000000000001','approved','header_left.jpg','header_left.jpg','style3/header_left.jpg','3','7','12',NULL,0,0,0,0,0,23983,NULL,0,1,0,1242380144,NULL,0),('7-0-style0000000000056',1147642506,'3','pbversion0000000000001','approved','header_right.jpg','header_right.jpg','style3/header_right.jpg','3','7','12',NULL,0,0,0,0,0,24757,NULL,0,1,0,1242380144,NULL,0),('7-0-style0000000000053',1147642505,'3','pbversion0000000000001','approved','footer_right.jpg','footer_right.jpg','style3/footer_right.jpg','3','7','12',NULL,0,0,0,0,0,2886,NULL,0,1,0,1242380144,NULL,0),('7-0-style0000000000052',1147642505,'3','pbversion0000000000001','approved','footer_bg.jpg','footer_bg.jpg','style3/footer_bg.jpg','3','7','12',NULL,0,0,0,0,0,680,NULL,0,1,0,1242380144,NULL,0),('7-0-style0000000000048',1147642504,'3','pbversion0000000000001','approved','wg.jpg','wg.jpg','style2/wg.jpg','3','7','12',NULL,0,0,0,0,0,20795,NULL,0,1,0,1242380144,NULL,0),('7-0-style0000000000046',1147642504,'3','pbversion0000000000001','approved','rightCol_bg.jpg','rightCol_bg.jpg','style2/rightcol_bg.jpg','3','7','12',NULL,0,0,0,0,0,720,NULL,0,1,0,1242380144,NULL,0),('7-0-style0000000000043',1147642503,'3','pbversion0000000000001','approved','pb.jpg','pb.jpg','style2/pb.jpg','3','7','12',NULL,0,0,0,0,0,22948,NULL,0,1,0,1242380144,NULL,0),('7-0-style0000000000044',1147642503,'3','pbversion0000000000001','approved','pb_wg.jpg','pb_wg.jpg','style2/pb_wg.jpg','3','7','12',NULL,0,0,0,0,0,2720,NULL,0,1,0,1242380144,NULL,0),('7-0-style0000000000040',1147642502,'3','pbversion0000000000001','approved','navbar_right.jpg','navbar_right.jpg','style2/navbar_right.jpg','3','7','12',NULL,0,0,0,0,0,960,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000041',1147642502,'3','pbversion0000000000001','approved','page_title.jpg','page_title.jpg','style2/page_title.jpg','3','7','12',NULL,0,0,0,0,0,24856,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000042',1147642502,'3','pbversion0000000000001','approved','page_title_bg.jpg','page_title_bg.jpg','style2/page_title_bg.jpg','3','7','12',NULL,0,0,0,0,0,720,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000038',1147642501,'3','pbversion0000000000001','approved','navbar_bg.jpg','navbar_bg.jpg','style2/navbar_bg.jpg','3','7','12',NULL,0,0,0,0,0,625,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000039',1147642502,'3','pbversion0000000000001','approved','navbar_left.jpg','navbar_left.jpg','style2/navbar_left.jpg','3','7','12',NULL,0,0,0,0,0,663,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000036',1147642501,'3','pbversion0000000000001','approved','main_bg.jpg','main_bg.jpg','style2/main_bg.jpg','3','7','12',NULL,0,0,0,0,0,764,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000037',1147642501,'3','pbversion0000000000001','approved','nav_bg.jpg','nav_bg.jpg','style2/nav_bg.jpg','3','7','12',NULL,0,0,0,0,0,602,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000033',1147642500,'3','pbversion0000000000001','approved','css02.css','css02.css','style2/css02.css','3','7','12',NULL,0,0,0,0,0,5530,NULL,0,1,0,1285124168,NULL,0),('7-0-style0000000000034',1147642500,'3','pbversion0000000000001','approved','leftCol_header.jpg','leftCol_header.jpg','style2/leftcol_header.jpg','3','7','12',NULL,0,0,0,0,0,10987,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000035',1147642501,'3','pbversion0000000000001','approved','leftCol_header02.jpg','leftCol_header02.jpg','style2/leftcol_header02.jpg','3','7','12',NULL,0,0,0,0,0,4606,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000030',1147642499,'3','pbversion0000000000001','approved','webgui_btn.jpg','webgui_btn.jpg','style1/webgui_btn.jpg','3','7','12',NULL,0,0,0,0,0,5180,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000031',1147642500,'3','pbversion0000000000001','approved','WebGUI 7 Style 2','WebGUI 7 Style 2','root/import/webgui-7-style-2','3','7','12',NULL,0,0,0,0,0,325,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000032',1147642500,'3','pbversion0000000000001','approved','context_bg.jpg','context_bg.jpg','style2/context_bg.jpg','3','7','12',NULL,0,0,0,0,0,661,NULL,0,1,0,1242380143,NULL,0),('PBnav000000style01lvl2',1147642499,'3','pbversion0000000000001','approved','Style 01 Nav lvl2','untitled','style1_nav_lvl2','3','7','12',NULL,0,0,0,0,0,1713,NULL,0,1,0,1285124161,NULL,0),('7-0-style0000000000026',1147642499,'3','pbversion0000000000001','approved','RootTab Level 1','RootTab Level 1','roottab_level1','3','7','12',NULL,0,0,0,0,0,353,NULL,0,1,0,1242380143,NULL,0),('stevenav00000000000001',1147642499,'3','pbversion0000000000001','approved','Style 01 Nav','Style 01 Nav','style1_nav','3','7','12',NULL,0,0,0,0,0,1682,NULL,0,1,0,1285124167,NULL,0),('7-0-style0000000000025',1147642498,'3','pbversion0000000000001','approved','RootTab Level 0','RootTab Level 0','roottab_level0','3','7','12',NULL,0,0,0,0,0,353,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000022',1147642497,'3','pbversion0000000000001','approved','nav_bg.jpg','nav_bg.jpg','style1/nav_bg.jpg','3','7','12',NULL,0,0,0,0,0,1109,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000023',1147642498,'3','pbversion0000000000001','approved','nav_on.jpg','nav_on.jpg','style1/nav_on.jpg','3','7','12',NULL,0,0,0,0,0,919,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000024',1147642498,'3','pbversion0000000000001','approved','orange_left01.jpg','orange_left01.jpg','style1/orange_left01.jpg','3','7','12',NULL,0,0,0,0,0,2747,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000018',1147642496,'3','pbversion0000000000001','approved','nav2_off_left.jpg','nav2_off_left.jpg','style1/nav2_off_left.jpg','3','7','12',NULL,0,0,0,0,0,752,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000019',1147642497,'3','pbversion0000000000001','approved','nav2_off_right.jpg','nav2_off_right.jpg','style1/nav2_off_right.jpg','3','7','12',NULL,0,0,0,0,0,748,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000017',1147642496,'3','pbversion0000000000001','approved','nav2_off_center.jpg','nav2_off_center.jpg','style1/nav2_off_center.jpg','3','7','12',NULL,0,0,0,0,0,837,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000015',1147642496,'3','pbversion0000000000001','approved','nav1_on_right.jpg','nav1_on_right.jpg','style1/nav1_on_right.jpg','3','7','12',NULL,0,0,0,0,0,1134,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000014',1147642495,'3','pbversion0000000000001','approved','nav1_on_left.jpg','nav1_on_left.jpg','style1/nav1_on_left.jpg','3','7','12',NULL,0,0,0,0,0,1195,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000013',1147642495,'3','pbversion0000000000001','approved','nav1_on.jpg','nav1_on.jpg','style1/nav1_on.jpg','3','7','12',NULL,0,0,0,0,0,2426,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000011',1147642495,'3','pbversion0000000000001','approved','nav1_off_left.jpg','nav1_off_left.jpg','style1/nav1_off_left.jpg','3','7','12',NULL,0,0,0,0,0,1230,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000012',1147642495,'3','pbversion0000000000001','approved','nav1_off_right.jpg','nav1_off_right.jpg','style1/nav1_off_right.jpg','3','7','12',NULL,0,0,0,0,0,1178,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000010',1147642494,'3','pbversion0000000000001','approved','nav1_off_center.jpg','nav1_off_center.jpg','style1/nav1_off_center.jpg','3','7','12',NULL,0,0,0,0,0,1468,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000009',1147642494,'3','pbversion0000000000001','approved','nav1_off.jpg','nav1_off.jpg','style1/nav1_off.jpg','3','7','12',NULL,0,0,0,0,0,2591,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000007',1147642493,'3','pbversion0000000000001','approved','main_bg.jpg','main_bg.jpg','style1/main_bg.jpg','3','7','12',NULL,0,0,0,0,0,1149,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000001',1147642492,'3','pbversion0000000000001','approved','WebGUI 7 Style 1','WebGUI 7 Style 1','root/import/webgui-7-style-1','3','7','12',NULL,0,0,0,0,0,325,NULL,0,1,0,1242380142,NULL,0),('SynConXSLT000000000001',1124395707,'3','pbversion0000000000001','approved','RSS 0.9 XSLT Stylesheet','RSS 0.9 XSLT','xslt/rss0.9.xsl','3','7','12',NULL,0,0,0,0,0,5040,NULL,0,1,0,1285124168,NULL,0),('SynConXSLT000000000002',1124395707,'3','pbversion0000000000001','approved','RSS 0.91 XSLT Stylesheet','RSS 0.91 XSLT','xslt/rss0.91.xsl','3','7','12',NULL,0,0,0,0,0,4717,NULL,0,1,0,1285124168,NULL,0),('SynConXSLT000000000003',1124395707,'3','pbversion0000000000001','approved','RSS 1.0 XSLT Stylesheet','RSS 1.0 XSLT','xslt/rss1.0.xsl','3','7','12',NULL,0,0,0,0,0,5186,NULL,0,1,0,1285124168,NULL,0),('SynConXSLT000000000004',1124395707,'3','pbversion0000000000001','approved','RSS 2.0 XSLT Stylesheet','RSS 2.0 XSLT','xslt/rss2.0.xsl','3','7','12',NULL,0,0,0,0,0,4852,NULL,0,1,0,1285124168,NULL,0),('PBtmpl0000000000000036',1129049186,'3','pbversion0000000000001','approved','Default Admin Toggle Macro','Default Admin Toggle Macro','default_admin_toggle_macro','3','7','12',NULL,0,1,0,0,0,448,NULL,0,1,0,1285124162,NULL,0),('PBtmpl0000000000000037',1129049186,'3','pbversion0000000000001','approved','Default Account Macro','Default Account Macro','default_account_macro','3','7','12',NULL,0,1,0,0,0,479,NULL,0,1,0,1285124162,NULL,0),('PBtmpl0000000000000038',1129049186,'3','pbversion0000000000001','approved','Default Editable Toggle Macro','Default Editable Toggle Macro','default_editable_toggle_macro','3','7','12',NULL,0,1,0,0,0,460,NULL,0,1,0,1285124162,NULL,0),('PBtmpl0000000000000040',1129049186,'3','pbversion0000000000001','approved','Default Group Add Macro','Default Group Add Macro','default_group_add_macro','3','7','12',NULL,0,1,0,0,0,432,NULL,0,1,0,1285124162,NULL,0),('PBtmpl0000000000000041',1129049186,'3','pbversion0000000000001','approved','Default Group Delete Macro','Default Group Delete Macro','default_group_delete_macro','3','7','12',NULL,0,1,0,0,0,444,NULL,0,1,0,1285124162,NULL,0),('PBtmpl0000000000000042',1129049186,'3','pbversion0000000000001','approved','Default Homelink','Default Homelink','default_homelink','3','7','12',NULL,0,1,0,0,0,459,NULL,0,1,0,1285124162,NULL,0),('PBtmpl0000000000000043',1129049186,'3','pbversion0000000000001','approved','Default LoginToggle','Default LoginToggle','default_logintoggle','3','7','12',NULL,0,1,0,0,0,475,NULL,0,1,0,1285124162,NULL,0),('PBtmpl0000000000000045',1129049186,'3','pbversion0000000000001','approved','Default Make Printable','Default Make Printable','default_make_printable','3','7','12',NULL,0,1,0,0,0,500,NULL,0,1,0,1285124162,NULL,0),('PBtmpl0000000000000091',1129049189,'3','pbversion0000000000001','approved','File no icon','File no icon','file_no_icon','3','7','12',NULL,0,1,0,0,0,391,NULL,0,1,0,1285124163,NULL,0),('PBtmpl0000000000000140',1129573244,'3','pbversion0000000000001','approved','Default Shortcut','Default Shortcut','pbtmpl0000000000000140','3','7','12',NULL,0,1,0,0,0,1732,NULL,0,1,0,1285124163,NULL,0),('PBtmplHelp000000000001',1147642410,'3','pbversion0000000000001','approved','Help','Help','root/import/adminconsole/help','3','7','12',NULL,0,0,0,0,0,2221,'\n\n',0,1,0,1288747840,'',0),('ProjectManagerTMPL0004',1222574693,'3','pbversion0000000000001','approved','Default Project Manager Edit Task','Default Project Manager Edit Task','default-pm-template-edit-task','3','7','12',NULL,0,0,0,0,0,8779,'\r\n',0,1,0,1285124164,'',0),('7-0-style0000000000071',1147642511,'3','pbversion0000000000001','approved','wg.jpg','wg.jpg','style3/wg.jpg','3','7','12',NULL,0,0,0,0,0,27499,NULL,0,1,0,1242380145,NULL,0),('7-0-style0000000000070',1147642510,'3','pbversion0000000000001','approved','Style3 Coolmenu','Style3 Coolmenu','style3_coolmenu','3','7','12',NULL,0,0,0,0,0,377,NULL,0,1,0,1242380145,NULL,0),('7-0-style0000000000004',1147642493,'3','pbversion0000000000001','approved','gui_bottom.jpg','gui_bottom.jpg','style1/gui_bottom.jpg','3','7','12',NULL,0,0,0,0,0,11011,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000002',1147642492,'3','pbversion0000000000001','approved','body_bg.jpg','body_bg.jpg','style1/body_bg.jpg','3','7','12',NULL,0,0,0,0,0,598,NULL,0,1,0,1242380142,NULL,0),('PBtmpl0000000000000047',1147642414,'3','pbversion0000000000001','approved','Default Message Board','Default Message Board','default_message_board','3','7','12',NULL,0,1,0,0,0,5637,'',0,1,0,1285124162,'',0),('TimeTrackingTMPL000002',1147642417,'3','pbversion0000000000001','approved','Default Time Tracking Manager View','Default Time Tracking Manager View','default-tt-template-manager','3','7','12',NULL,0,0,0,0,0,408,' ',0,1,0,1285124164,NULL,0),('PBtmpl0000000000000057',1147642418,'3','pbversion0000000000001','approved','Default WebGUI Yes/No Prompt','Default WebGUI Yes/No Prompt','default_webgui_yes/no_prompt','3','7','12',NULL,0,1,0,0,0,797,NULL,0,1,0,1285124162,NULL,0),('PBtmpl0000000000000107',1147642420,'3','pbversion0000000000001','approved','File with size','File with size','file_with_size','3','7','12',NULL,0,1,0,0,0,661,NULL,0,1,0,1285124163,NULL,0),('WVtmpl0000000000000001',1147642426,'3','pbversion0000000000001','approved','Random Thread Macro Default Template','Random Thread Macro Default Template','randomthread-template','3','7','12',NULL,0,0,0,0,0,9218,NULL,0,1,0,1285124165,NULL,0),('7-0-style0000000000005',1147642493,'3','pbversion0000000000001','approved','header.jpg','header.jpg','style1/header.jpg','3','7','12',NULL,0,0,0,0,0,45014,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000008',1147642494,'3','pbversion0000000000001','approved','nav1_center_on.jpg','nav1_center_on.jpg','style1/nav1_center_on.jpg','3','7','12',NULL,0,0,0,0,0,1382,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000045',1147642503,'3','pbversion0000000000001','approved','pb_wg_bg.jpg','pb_wg_bg.jpg','style2/pb_wg_bg.jpg','3','7','12',NULL,0,0,0,0,0,21720,NULL,0,1,0,1242380144,NULL,0),('7-0-style0000000000021',1147642497,'3','pbversion0000000000001','approved','nav2_on_right.jpg','nav2_on_right.jpg','style1/nav2_on_right.jpg','3','7','12',NULL,0,0,0,0,0,720,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000020',1147642497,'3','pbversion0000000000001','approved','nav2_on_left.jpg','nav2_on_left.jpg','style1/nav2_on_left.jpg','3','7','12',NULL,0,0,0,0,0,732,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000016',1147642496,'3','pbversion0000000000001','approved','nav2_center_on.jpg','nav2_center_on.jpg','style1/nav2_center_on.jpg','3','7','12',NULL,0,0,0,0,0,807,NULL,0,1,0,1242380143,NULL,0),('PBasset000000000000003',1147642437,'3','pbversion0000000000001','approved','Media','Media','media','3','7','12',NULL,0,0,0,0,0,296,NULL,0,1,0,1242380151,NULL,0),('nbSrhXZQuxIjhWFaFPSuVA',1147642465,'3','pbversion0000000000001','approved','AdminConsole','AdminConsole','root/import/adminconsole','3','7','12',NULL,0,0,0,0,0,313,NULL,0,1,0,1242380150,NULL,0),('71e17KeduiXgODLMlUxiow',1222803352,'3','pbversion0000000000001','approved','project','project','root/import/projectmanager/project','3','7','12',NULL,0,0,0,0,0,342,NULL,0,1,0,1242380145,NULL,0),('N13SD1Fpqk00UgBt1Z8ivQ',1147642470,'3','pbversion0000000000001','approved','HttpProxy','HttpProxy','root/import/httpproxy','3','7','12',NULL,0,0,0,0,0,304,NULL,0,1,0,1242380150,NULL,0),('3uuBf8cYuj1sew2OJXl9tg',1147642470,'3','pbversion0000000000001','approved','InOutBoard','InOutBoard','root/import/inoutboard','3','7','12',NULL,0,0,0,0,0,307,NULL,0,1,0,1242380142,NULL,0),('ProjectManagerTMPL0002',1222574693,'3','pbversion0000000000001','approved','Default Project Display','Default Project Display','default-pm-template-project-display','3','7','12',NULL,0,0,0,0,0,13074,'\r\n\r\n\r\n',0,1,0,1285124164,'',0),('cj2y4papTVGZRFdwTI-_fw',1147642475,'3','pbversion0000000000001','approved','MessageBoard','MessageBoard','root/import/messageboard','3','7','12',NULL,0,0,0,0,0,313,NULL,0,1,0,1242380147,NULL,0),('bBzO4CWjqU_ile3gf5Iypw',1147642475,'3','pbversion0000000000001','approved','MultiSearch','MultiSearch','root/import/multisearch','3','7','12',NULL,0,0,0,0,0,310,NULL,0,1,0,1242380147,NULL,0),('Da6KWn805L4B5e4HFgQRQA',1147642479,'3','pbversion0000000000001','approved','Shortcut','Shortcut','root/import/shortcut','3','7','12',NULL,0,0,0,0,0,301,NULL,0,1,0,1242380148,NULL,0),('bbiA9Zq5Gy2oCFBlILO3QA',1147642480,'3','pbversion0000000000001','approved','SQLReport','SQLReport','root/import/sqlreport','3','7','12',NULL,0,0,0,0,0,304,NULL,0,1,0,1242380147,NULL,0),('Efe2W0UgrSRDltNJ87jlfg',1147642480,'3','pbversion0000000000001','approved','StockData','StockData','root/import/stockdata','3','7','12',NULL,0,0,0,0,0,304,NULL,0,1,0,1242380148,NULL,0),('9wKWdum0_8z-OhhquWLtSQ',1147642483,'3','pbversion0000000000001','approved','WeatherData','WeatherData','root/import/weatherdata','3','7','12',NULL,0,0,0,0,0,310,NULL,0,1,0,1242380146,NULL,0),('CSN-ZON7Uwv8kxf3F1fh5Q',1147642484,'3','pbversion0000000000001','approved','ZipArchiveAsset','ZipArchiveAsset','root/import/ziparchiveasset','3','7','12',NULL,0,0,0,0,0,322,NULL,0,1,0,1242380147,NULL,0),('TCtybxdqmdwdvRn555zpCQ',1147642484,'3','pbversion0000000000001','approved','RichEdit','RichEdit','root/import/richedit','3','7','12',NULL,0,0,0,0,0,301,NULL,0,1,0,1242380163,NULL,0),('PBtmpl0000000000000044',1148579524,'3','pbversion0000000000001','approved','Default Login Box','Default Login Box','default_login_box','3','7','12',NULL,0,1,0,0,0,1884,NULL,0,1,0,1285124162,NULL,0),('PBtmpl0000000000000092',1148579524,'3','pbversion0000000000001','approved','Horizontal Login Box','Horizontal Login Box','horizontal_login_box','3','7','12',NULL,0,1,0,0,0,2082,NULL,0,1,0,1285124163,NULL,0),('PBtmpl0000000000000039',1154535073,'3','pbversion0000000000001','approved','Default File Macro','Default File Macro','default_file_macro','3','7','12',NULL,0,1,0,0,0,630,NULL,0,1,0,1285124162,NULL,0),('ProjectManagerTMPL0006',1157679165,'3','pbversion0000000000001','approved','Default Resource List','Default Resource List','default-pm-resource-list','3','7','12',NULL,0,0,0,0,0,1802,NULL,0,1,0,1285124164,NULL,0),('ProjectManagerTMPL0003',1159989349,'3','pbversion0000000000001','approved','Default Project Manager Gantt Chart','Default Project Manager Gantt Chart','default-pm-template-gantt-chart','3','7','12',NULL,0,0,0,0,0,3787,NULL,0,1,0,1285124164,NULL,0),('pbproto000000000000002',1163019036,'3','pbversion0000000000001','approved','Request Tracker','Request Tracker','request-tracker-prototype','3','7','12',NULL,0,0,0,1,0,595,NULL,0,1,0,1263962528,NULL,0),('IOB0000000000000000002',1166019641,'3','pbversion0000000000001','approved','Default InOutBoard Report Template','Default InOutBoard Report Template','iob-report-template','3','7','12',NULL,0,0,0,0,0,2746,'',0,1,0,1285124160,'',0),('ZipArchiveTMPL00000001',1169738426,'3','pbversion0000000000001','approved','Default Zip Archive Template','Default Zip Archive Template','zip-archive-template','3','7','12',NULL,0,0,0,0,0,1056,NULL,0,1,0,1285124165,NULL,0),('IOB0000000000000000001',1169795123,'3','pbversion0000000000001','approved','Default InOutBoard Template','Default InOutBoard Template','iob-template','3','7','12',NULL,0,0,0,0,0,3850,'',0,1,0,1285124160,'',0),('SQLReportDownload00001',1171466654,'3','pbversion0000000000001','approved','SQLReport Download Default Template','untitled','SQLReportDownload0001','3','7','12',NULL,0,0,0,0,0,6386,NULL,0,1,0,1285124164,NULL,0),('newsletter000000000001',1185754569,'3','pbversion0000000000001','approved',' Summary Newsletter (default)',' Summary Newsletter','newsletterdefaulttemplate','3','7','3',NULL,0,0,0,0,0,674,NULL,0,1,0,1285124167,NULL,0),('tempspace0000000000000',1185754574,'3','pbversion0000000000001','approved','Tempspace','Tempspace','tempspace','3','7','3',NULL,0,0,0,0,0,307,NULL,0,1,0,1242380163,NULL,0),('TimeTrackingTMPL000001',1201205738,'3','pbversion0000000000001','approved','Default Time Tracking User View','Default Time Tracking User View','default-tt-template-user','3','7','12',NULL,0,0,0,0,0,18644,'\n \n',0,1,0,1285124164,'',0),('CalendarPrintMonth0001',1204890714,'3','pbversion0000000000001','approved','Default Calendar Print Month','Default Calendar Print Month','root/import/calendar-templates/default-calendar-print-month','3','7','12',NULL,0,0,0,0,0,2454,' \r\n',0,1,0,1285124160,'',0),('CalendarPrintWeek00001',1204890714,'3','pbversion0000000000001','approved','Default Calendar Print Week','Default Calendar Print Week','root/import/calendar-templates/default-calendar-print-week','3','7','12',NULL,0,0,0,0,0,2654,' \r\n',0,1,0,1285124160,'',0),('CalendarPrintDay000001',1204890714,'3','pbversion0000000000001','approved','Default Calendar Print Day','Default Calendar Print Day','root/import/calendar-templates/default-calendar-print-day','3','7','12',NULL,0,0,0,0,0,2394,' \r\n',0,1,0,1285124160,'',0),('F7MAQ-cpuvQ1KuC7J4P5zQ',1222803673,'3','pbversion0000000000001','approved','View','View','root/import/profile/view','3','7','12',NULL,0,0,0,0,0,326,NULL,0,1,0,1242380148,NULL,0),('Tsg7xmPYv782j6IVz7yHFg',1213244777,'3','pbversion0000000000001','approved','Calendar Templates','Calendar Templates','root/import/calendar-templates','3','7','12',NULL,0,1,0,0,0,353,NULL,0,1,0,1242380164,NULL,0),('NywJYmGWe1f6EBXJnWg9Xg',1222803638,'3','pbversion0000000000001','approved','Profile','Profile','root/import/profile','3','7','12',NULL,0,1,0,0,0,320,NULL,0,1,0,1242380151,NULL,0),('AgyFhx3eXlfZXNp2MkrsiQ',1222803665,'3','pbversion0000000000001','approved','Edit','Edit','root/import/profile/edit','3','7','12',NULL,0,0,0,0,0,326,NULL,0,1,0,1242380146,NULL,0),('TYo2Bwl7aafzTtdHlS-arQ',1211664878,'3','pbversion0000000000001','approved','Product','Product','root/import/product','3','7','12',NULL,0,0,0,0,0,320,NULL,0,1,0,1242380164,NULL,0),('gbnRhcWNk1iQe32LFEB5eQ',1212086102,'3','pbversion0000000000001','approved','Shelf','Shelf','root/import/shelf2','3','7','12',NULL,0,1,0,0,0,315,NULL,0,1,0,1242380149,NULL,0),('6tK47xsaIH-ELw0IBo0uRQ',1210777115,'3','pbversion0000000000001','approved','images','images','root/import/shelf2/images','3','7','12',NULL,0,1,0,0,0,330,NULL,0,1,0,1242380142,NULL,0),('_bZJ9LA_KNekZiFPaP2SeQ',1210777868,'3','pbversion0000000000001','approved','shelf-titles.jpg','shelf-titles.jpg','root/import/shelf2/images/shelf-titles.jpg','3','7','12',NULL,0,1,0,0,0,1038,NULL,0,0,0,1242380165,NULL,0),('4e-_rNs6mSWedZhQ_V5kJA',1210779672,'3','pbversion0000000000001','approved','shelf-ie.css','shelf-ie.css','root/import/shelf2/shelf-ie.css','3','7','12',NULL,0,1,0,0,0,1092,NULL,0,1,0,1285124168,NULL,0),('6D4Z-oruXPS6OlH_Kx8pBg',1209509389,'3','pbversion0000000000001','approved','images','images','root/import/thingy-templates/images','3','7','12',NULL,0,1,0,0,0,340,NULL,0,1,0,1242380142,NULL,0),('hQ7z33_jOYkQ8WNX5xy9Sw',1209509455,'3','pbversion0000000000001','approved','style-button.gif','style-button.gif','root/import/thingy-templates/images/style-button.gif','3','7','12',NULL,0,1,0,0,0,923,NULL,0,0,0,1242380149,NULL,0),('vWW_DcHiYSrKZOkkIfEfcQ',1209509433,'3','pbversion0000000000001','approved','row-2.jpg','row-2.jpg','root/import/thingy-templates/images/row-2.jpg','3','7','12',NULL,0,1,0,0,0,805,NULL,0,0,0,1242380164,NULL,0),('_bPYzRA87NTAUIKlfrJMHg',1209509433,'3','pbversion0000000000001','approved','row-1.jpg','row-1.jpg','root/import/thingy-templates/images/row-1.jpg','3','7','12',NULL,0,1,0,0,0,790,NULL,0,0,0,1242380165,NULL,0),('nJjZHRwdDs5MAZYsAyioHw',1209509433,'3','pbversion0000000000001','approved','title-bg.jpg','title-bg.jpg','root/import/thingy-templates/images/title-bg.jpg','3','7','12',NULL,0,1,0,0,0,1105,NULL,0,0,0,1242380151,NULL,0),('8hxfkrJPeFVRWF5piCNJ1A',1209509433,'3','pbversion0000000000001','approved','field-bg.jpg','field-bg.jpg','root/import/thingy-templates/images/field-bg.jpg','3','7','12',NULL,0,1,0,0,0,721,NULL,0,0,0,1242380146,NULL,0),('Osx7WN52iIKHZFT4vqUBHQ',1209509433,'3','pbversion0000000000001','approved','search-btn.gif','search-btn.gif','root/import/thingy-templates/images/search-btn.gif','3','7','12',NULL,0,1,0,0,0,1263,NULL,0,0,0,1242380151,NULL,0),('oWff8fGzRdHPyq5VNREe9Q',1209509433,'3','pbversion0000000000001','approved','top-bg.jpg','top-bg.jpg','root/import/thingy-templates/images/top-bg.jpg','3','7','12',NULL,0,1,0,0,0,691,NULL,0,0,0,1242380151,NULL,0),('uqbkvb1b9443VvfkyRz95w',1209509433,'3','pbversion0000000000001','approved','save-button.gif','save-button.gif','root/import/thingy-templates/images/save-button.gif','3','7','12',NULL,0,1,0,0,0,1271,NULL,0,0,0,1242380164,NULL,0),('8YiMkcz32xalkAn3WBLpag',1210181860,'3','pbversion0000000000001','approved','go-btn.gif','go-btn.gif','root/import/thingy-templates/images/go-btn.gif','3','7','12',NULL,0,1,0,0,0,430,NULL,0,0,0,1242380146,NULL,0),('C5fPz-Wg85vkYRvCdl-Xqw',1212160830,'3','pbversion0000000000001','approved','UserList','UserList','root/import/userlist','3','7','12',NULL,0,1,0,0,0,323,NULL,0,1,0,1242380147,NULL,0),('usuxw9V3jN4d4pujRiEYxg',1209494150,'3','pbversion0000000000001','approved','css03-ie.css','css03-ie.css','style3/css03-ie.css','3','7','12',NULL,0,0,0,0,0,347,NULL,0,1,0,1285124169,NULL,0),('WeatherDataTmpl0000001',1210711353,'3','pbversion0000000000001','approved','WeatherData Default View','WeatherData Default View','weatherdatatmpl0000001','3','7','12',NULL,0,1,0,0,0,5540,'\r\n\r\n\r\n',0,1,0,1285124165,'',0),('Ik9HHky10DIyFTKehUD1dw',1222803478,'3','pbversion0000000000001','approved','Prompt','Prompt','root/import/prompt','3','7','12',NULL,0,0,0,0,0,317,NULL,0,1,0,1242380149,NULL,0),('BmLaN4rmAANkCglXUViEbg',1222803871,'3','pbversion0000000000001','approved','Resource','Resource','root/import/projectmanager/resource','3','12','12',NULL,0,0,0,0,0,346,NULL,0,1,0,1242380147,NULL,0),('X7DrzUcj8pOKFa_6k9D5iw',1222804045,'3','pbversion0000000000001','approved','Newsletter','Newsletter','root/import/newsletter','3','12','3',NULL,0,0,0,0,0,329,NULL,0,1,0,1242380165,NULL,0),('7-0-style0000000000059',1213386091,'3','pbversion0000000000001','approved','main_top.jpg','main_top.jpg','style3/main_top.jpg','3','7','12',NULL,0,0,0,0,0,3594,NULL,0,1,0,1242380144,NULL,0),('CalendarPrintEvent0001',1215396964,'3','pbversion0000000000001','approved','Default Calendar Print Event','Default Calendar Print Event','root/import/calendar-templates/default-calendar-print-event','3','7','12',NULL,0,0,0,0,0,4202,' \r\n',0,1,0,1285124160,'',0),('o_pq_e4vRyhMOKFzs61eag',1215714957,'3','pbversion0000000000001','approved','book-covers.jpg','book-covers.jpg','documentation/book-covers.jpg','3','7','3',NULL,0,1,0,0,0,106078,NULL,0,0,0,1301974028,NULL,0),('jnYdqDkUR8x7Pv2eGR1qTA',1216250666,'3','pbversion0000000000001','approved','Thingy Templates','Thingy Templates','root/import/thingy-templates','3','7','12',NULL,0,1,0,0,0,347,NULL,0,1,0,1242380149,NULL,0),('5m5I7__l40C4hhv4ydqAHQ',1216227786,'3','pbversion0000000000001','approved','thingy-ie.css','thingy-ie.css','root/import/thingy-templates/thingy-ie.css','3','7','12',NULL,0,1,0,0,0,1329,NULL,0,1,0,1285124168,NULL,0),('pV7GnZdpjR3XpZaSINIoeg',1222803347,'3','pbversion0000000000001','approved','gantt','gantt','root/import/projectmanager/gantt','3','7','12',NULL,0,0,0,0,0,336,NULL,0,1,0,1242380162,NULL,0),('9A-mg2gwWmaYi9o_1C7ArQ',1222803338,'3','pbversion0000000000001','approved','dashboard','dashboard','root/import/projectmanager/dashboard','3','7','12',NULL,0,0,0,0,0,348,NULL,0,1,0,1242380146,NULL,0),('yD1SMHelczihzjEmx6eXBA',1222803342,'3','pbversion0000000000001','approved','editTask','editTask','root/import/projectmanager/edittask','3','7','12',NULL,0,0,0,0,0,345,NULL,0,1,0,1242380165,NULL,0),('BFfNj5wA9bDw8H3cnr8pTw',1247046273,'3','pbversion0000000000001','approved','Navigation','Navigation','root/import/navigation','3','7','12',NULL,0,0,0,0,0,329,NULL,0,1,0,1247779656,NULL,0),('PBtmpl0000000000000094',1220655703,'3','pbversion0000000000001','approved','News','News','plainblacknews','3','7','12',NULL,0,1,0,0,0,6236,'\r\n\r\n\r\n',0,1,0,1285124163,'',0),('1XOJDcg_ITRYwVM-QnIcPw',1219175575,'3','pbversion0000000000001','approved','shelf.css','shelf.css','root/import/shelf2/shelf.css','3','7','12',NULL,0,1,0,0,0,2431,NULL,0,1,0,1285124168,NULL,0),('aNNC62qLAS6TB-0_MCYjsw',1246969327,'3','pbversion0000000000001','approved','Layout','Layout','root/import/layout','3','7','12',NULL,0,0,0,0,0,317,NULL,0,1,0,1247779656,NULL,0),('huASapWvFDzqwOSbcN-JFQ',1222803313,'3','pbversion0000000000001','approved','user','user','root/import/timetracking/user','3','7','12',NULL,0,0,0,0,0,331,NULL,0,1,0,1242380149,NULL,0),('lo1ac3BsoJx3ijGQ3gR-bQ',1222803309,'3','pbversion0000000000001','approved','row','row','root/import/timetracking/row','3','7','12',NULL,0,0,0,0,0,328,NULL,0,1,0,1242380150,NULL,0),('zyWi26q9na-iiZqL4yedog',1222803114,'3','pbversion0000000000001','approved','Macro','Macro','root/import/macro','3','7','12',NULL,0,1,0,0,0,314,NULL,0,1,0,1242380165,NULL,0),('tBL7BWiQRZFed2Y-Zjo9tQ',1222803200,'3','pbversion0000000000001','approved','AdminToggle','AdminToggle','root/import/macro/admintoggle','3','7','12',NULL,0,0,0,0,0,345,NULL,0,1,0,1242380163,NULL,0),('GdkQpvjRtJqtzOUbwIIQRA',1222803205,'3','pbversion0000000000001','approved','a_account','a_account','root/import/macro/a_account','3','7','12',NULL,0,0,0,0,0,339,NULL,0,1,0,1242380149,NULL,0),('tnc5iYyynX2hfdEs9D3P8w',1222803213,'3','pbversion0000000000001','approved','EditableToggle','EditableToggle','root/import/macro/editabletoggle','3','7','12',NULL,0,0,0,0,0,354,NULL,0,1,0,1242380164,NULL,0),('vgXdBcFTqU7h4wBG1ewdBw',1222803217,'3','pbversion0000000000001','approved','File','File','root/import/macro/file','3','7','12',NULL,0,0,0,0,0,324,NULL,0,1,0,1242380164,NULL,0),('hcFlqnXlsmC1ujN6Id0F0A',1222803234,'3','pbversion0000000000001','approved','GroupAdd','GroupAdd','root/import/macro/groupadd','3','7','12',NULL,0,0,0,0,0,336,NULL,0,1,0,1242380149,NULL,0),('eRJR52fvlaxfetv3DQkQYw',1222803238,'3','pbversion0000000000001','approved','GroupDelete','GroupDelete','root/import/macro/groupdelete','3','7','12',NULL,0,0,0,0,0,345,NULL,0,1,0,1242380148,NULL,0),('5HIDHq5lAWHV5gpYGS0zLg',1222803244,'3','pbversion0000000000001','approved','H_homeLink','H_homeLink','root/import/macro/h_homelink','3','7','12',NULL,0,0,0,0,0,342,NULL,0,1,0,1242380142,NULL,0),('rYEFwXXo0tkGhQTcbDibvg',1222803249,'3','pbversion0000000000001','approved','LoginToggle','LoginToggle','root/import/macro/logintoggle','3','7','12',NULL,0,0,0,0,0,345,NULL,0,1,0,1242380162,NULL,0),('-WM2dt0ZGpDasuL2wWocxg',1222803056,'3','pbversion0000000000001','approved','ProjectManager','ProjectManager','root/import/projectmanager','3','7','12',NULL,0,1,0,0,0,341,NULL,0,1,0,1242380141,NULL,0),('2OcUWHVsu_L1sDFzIMWYqw',1222803070,'3','pbversion0000000000001','approved','TimeTracking','TimeTracking','root/import/timetracking','3','7','12',NULL,0,1,0,0,0,335,NULL,0,1,0,1242380141,NULL,0),('vTymIDYL2YqEh6PV50F7ew',1222803302,'3','pbversion0000000000001','approved','manager','manager','root/import/timetracking/manager','3','7','12',NULL,0,0,0,0,0,340,NULL,0,1,0,1242380164,NULL,0),('nqNbSUAhk9Vd1zda2SCz9A',1222803258,'3','pbversion0000000000001','approved','RandomThread','RandomThread','root/import/macro/randomthread','3','7','12',NULL,0,0,0,0,0,348,NULL,0,1,0,1242380151,NULL,0),('y8XkRdxIperLKkJ3bL5sSQ',1222803264,'3','pbversion0000000000001','approved','r_printable','r_printable','root/import/macro/r_printable','3','7','12',NULL,0,0,0,0,0,345,NULL,0,1,0,1242380165,NULL,0),('V3l5S5TtI7wMm1WpIMhvOA',1222803253,'3','pbversion0000000000001','approved','L_loginBox','L_loginBox','root/import/macro/l_loginbox','3','7','12',NULL,0,0,0,0,0,342,NULL,0,1,0,1242380164,NULL,0),('newslettersubscrip0001',1221692339,'3','pbversion0000000000001','approved','My Subscriptions (default)',' My Subscriptions','newslettermysubscriptionstemplate','3','7','3',NULL,0,0,0,0,0,1184,NULL,0,1,0,1285124167,NULL,0),('UL-ItI4L1Z6-WSuhuXVvsQ',1225139673,'3','pbversion0000000000001','approved','DataTable','DataTable','root/import/datatable','3','7','3',NULL,0,0,0,0,0,325,NULL,0,1,0,1242380164,NULL,0),('7-0-style0000000000049',1224117144,'3','pbversion0000000000001','approved','WebGUI 7 Style 3','WebGUI 7 Style 3','root/import/webgui-7-style-3','3','7','12',NULL,0,0,0,0,0,347,NULL,0,1,0,1242380144,NULL,0),('stevecoolmenu000000001',1224116942,'3','pbversion0000000000001','approved','Site Nav','Site Nav','webgui7/style3/hierarchical-top-nav','3','7','12',NULL,0,0,0,0,0,3754,'\r\n\r\n\r\n\r\n',0,1,0,1285124167,'',0),('7-0-style0000000000051',1224117026,'3','pbversion0000000000001','approved','css03.css','css03.css','style3/css03.css','3','7','12',NULL,0,0,0,0,0,5975,NULL,0,1,0,1285124168,NULL,0),('jVKLVakT_iA2010_oEuAwg',1224116526,'3','pbversion0000000000001','approved','Style3 Coolmenu','Style3 Coolmenu','department_nav','3','7','12',NULL,0,0,0,0,0,386,NULL,0,1,0,1242380150,NULL,0),('ThingyTmpl000000000003',1224518002,'3','pbversion0000000000001','approved','Default Thingy Edit Thing','Default Thingy Edit Thing','templates/thingy-default-edit-thing','3','7','12',NULL,0,0,0,0,0,6324,'\r\n\r\n\r\n',0,1,0,1285124164,'',0),('QpmlAiYZz6VsKBM-_0wXaw',1224616691,'3','pbversion0000000000001','approved','UsersOnline Macro','UsersOnline Macro','users-online-macro-templates','3','7','3',NULL,0,0,0,0,0,368,NULL,0,1,0,1242380162,NULL,0),('h_T2xtOxGRQ9QJOR6ebLpQ',1224616545,'3','pbversion0000000000001','approved','UsersOnline Default View','UsersOnline Default View','users-online-macro-templates/usersonline-default-view','3','7','3',NULL,0,1,0,0,0,2495,'\r\n\r\n',0,1,0,1285124166,'',0),('4Ekp0kJoJllRRRo_J1Rj6w',1224616672,'3','pbversion0000000000001','approved','UsersOnline Detailed View','UsersOnline Detailed View','users-online-macro-templates/usersonline-detailed-view','3','7','3',NULL,0,1,0,0,0,4318,'\r\n\r\n',0,1,0,1285124159,'',0),('HPDOcsj4gBme8D4svHodBw',1225404573,'3','pbversion0000000000001','approved','Profile','Profile','root/import/account/profile','3','7','12',NULL,0,1,0,0,0,334,NULL,0,1,0,1250190873,NULL,0),('IZkrow_zwvbf4FCH-taVTQ',1226011853,'3','pbversion0000000000001','approved','Inbox','Inbox','root/import/account/inbox','3','7','12',NULL,0,1,0,0,0,328,NULL,0,1,0,1250190873,NULL,0),('K0YjxqOqr7RupSo6sIdcAg',1227074310,'3','pbversion0000000000001','approved','Friends','Friends','root/import/account/friends','3','7','12',NULL,0,1,0,0,0,334,NULL,0,1,0,1250190873,NULL,0),('_ilRXNR3s8F2vGJ_k9ePcg',1226643205,'3','pbversion0000000000001','approved','User','User','root/import/account/user','3','7','12',NULL,0,1,0,0,0,325,NULL,0,1,0,1250190873,NULL,0),('qaVcU0FFzzraMX_bzELqzw',1227074362,'3','pbversion0000000000001','approved','Contributions','Contributions','root/import/account/contributions','3','7','12',NULL,0,1,0,0,0,352,NULL,0,1,0,1250190873,NULL,0),('UserListTmpl0000000001',1228125743,'3','pbversion0000000000001','approved','Default UserList','Default UserList','root/import/userlist/default-userlist','3','7','12',NULL,0,1,0,0,0,5202,NULL,0,1,0,1285124165,NULL,0),('UserListTmpl0000000003',1228125758,'3','pbversion0000000000001','approved','UserList with multiple search keywords','UserList with multiple search keywords','root/import/userlist/userlist-with-multiple-search-keywords','3','7','12',NULL,0,1,0,0,0,5489,NULL,0,1,0,1285124165,NULL,0),('UserListTmpl0000000002',1228125752,'3','pbversion0000000000001','approved','UserList with search field selection','UserList with search field selection','root/import/userlist/userlist-with-search-field-selection','3','7','12',NULL,0,1,0,0,0,5116,NULL,0,1,0,1285124165,NULL,0),('TimeTrackingTMPL000003',1229311434,'3','pbversion0000000000001','approved','Default Time Tracking Row Template','Default Time Tracking Row Template','default-tt-template-row','3','7','12',NULL,0,0,0,0,0,5721,NULL,0,1,0,1285124164,NULL,0),('uRL9qtk7Rb0YRJ41LmHOJw',1229311072,'3','pbversion0000000000001','approved','Default Calendar Print List View','Default Calendar Print List View','root/import/calendar-templates/default-calendar-print-list-view','3','7','3',NULL,0,1,0,0,0,1737,NULL,0,1,0,1285124167,NULL,0),('j_1qEqM6iLfQLiR6VKy0aA',1299872071,'1','pbversion0000000000001','approved','Free Documentation','Free Documentation','documentation/free-documentation','3','7','3',NULL,0,1,0,0,0,2117,NULL,0,1,0,1301974027,NULL,0),('ProjectManagerTMPL0005',1229579830,'3','pbversion0000000000001','approved','Default Resource Popup','Default Resource Popup','default-pm-resource-popup','3','7','12',NULL,0,0,0,0,0,3582,NULL,0,1,0,1285124164,NULL,0),('ProjectManagerTMPL0001',1229579830,'3','pbversion0000000000001','approved','Default Project Management System Dashboard','Default Project Management System Dashboard','default-pm-template-dashboard','3','7','12',NULL,0,0,0,0,0,6862,'',0,1,0,1285124164,'',0),('PBtmpl0000000000000033',1230159454,'3','pbversion0000000000001','approved','Default HTTP Proxy','Default HTTP Proxy','default_http_proxy','3','7','12',NULL,0,1,0,0,0,2214,NULL,0,1,0,1285124162,NULL,0),('PBtmpl0000000000000059',1229907401,'3','pbversion0000000000001','approved','Default SQL Report','Default SQL Report','default_sql_report','3','7','12',NULL,0,1,0,0,0,7737,NULL,0,1,0,1285124162,NULL,0),('MultiSearchTmpl0000001',1230269962,'3','pbversion0000000000001','approved','MultiSearch Default Display','MultiSearch Default Display','multisearchtmpl0000001','3','7','12',NULL,0,1,0,0,0,3538,'',0,1,0,1285124161,'',0),('CalendarDay00000000001',1230358389,'3','pbversion0000000000001','approved','Default Calendar Day','Default Calendar Day','root/import/calendar-templates/default-calendar-day','3','7','12',NULL,0,0,0,0,0,13749,' ',0,1,0,1285124160,'',0),('CalendarSearch00000001',1230358389,'3','pbversion0000000000001','approved','Default Calendar Search','Default Calendar Search','root/import/calendar-templates/default-calendar-search','3','7','12',NULL,0,0,0,0,0,14791,' ',0,1,0,1285124160,'',0),('CalendarWeek0000000001',1230358389,'3','pbversion0000000000001','approved','Default Calendar Week','Default Calendar Week','root/import/calendar-templates/default-calendar-week','3','7','12',NULL,0,0,0,0,0,12761,'',0,1,0,1285124160,'',0),('StockDataTMPL000000002',1229494994,'3','pbversion0000000000001','approved','StockData Default Display','StockData Default Display','stockdatatmpl000000002','3','7','12',NULL,0,1,0,0,0,20602,NULL,0,1,0,1285124164,NULL,0),('QHn6T9rU7KsnS3Y70KCNTg',1233173545,'3','pbversion0000000000001','approved','Account','Account','root/import/account','3','7','12',NULL,0,1,0,0,0,320,NULL,0,1,0,1250190873,NULL,0),('HW-sPoDDZR8wBZ0YgFgPtg',1227634350,'3','pbversion0000000000001','approved','images','images','root/import/account/images','3','7','12',NULL,0,1,0,0,0,331,NULL,0,1,0,1250190873,NULL,0),('hBpisL-_URyZnh9clR5ohA',1227634417,'3','pbversion0000000000001','approved','no_photo.gif','no_photo.gif','root/import/account/images/no_photo.gif','3','7','12',NULL,0,1,0,0,0,2564,NULL,0,1,0,1250190873,NULL,0),('FOBV6KkifreXa4GmEAUU4A',1227634447,'3','pbversion0000000000001','approved','no_photo_sm.gif','no_photo_sm.gif','root/import/account/images/no_photo_sm.gif','3','7','12',NULL,0,1,0,0,0,1580,NULL,0,1,0,1250190873,NULL,0),('TuYPpHx7TUyk08639Pc8Bg',1233861621,'3','pbversion0000000000001','approved','Default DataTable Template (HTML)','Default DataTable Template (HTML)','root/import/datatable/default-datatable-template-html','3','7','3',NULL,0,1,0,0,0,1429,NULL,0,1,0,1285124164,NULL,0),('3rjnBVJRO6ZSkxlFkYh_ug',1233861835,'3','pbversion0000000000001','approved','Default DataTable Template (YUI)','Default DataTable Template (YUI)','root/import/datatable/default-datatable-template-yui','3','7','3',NULL,0,1,0,0,0,1089,NULL,0,1,0,1285124159,NULL,0),('AOjPG2NHgfL9Cq6dDJ7mew',1236960881,'3','pbversion0000000000001','approved','Shop','Shop','root/import/account/shop','3','7','12',NULL,0,1,0,0,0,325,NULL,0,1,0,1250190873,NULL,0),('NBVSVNLp9X_bV7WrCprtCA',1237842096,'3','pbversion0000000000001','approved','Annotate Image','Annotate Image','image3','3','7','12',NULL,0,1,0,0,0,675,NULL,0,1,0,1285124161,NULL,0),('jmlI9IK-lV8n2WMYmmPhAA',1238106173,'3','pbversion0000000000001','approved','Ad Sku','Ad Sku','root/import/ad-sku','3','7','12',NULL,0,1,0,0,0,317,NULL,0,1,0,1242380149,NULL,0),('ThingyTmpl000000000001',1237914005,'3','pbversion0000000000001','approved','Default Thingy','Default Thingy','templates/thingy-default','3','7','12',NULL,0,0,0,0,0,2554,'',0,1,0,1285124164,'',0),('6uvSLY-ak_w4p_wS8q33cA',1239213092,'3','pbversion0000000000001','approved','Carousel','Carousel','root/import/carousel','3','7','12',NULL,0,1,0,0,0,323,NULL,0,1,0,1242380142,NULL,0),('CarouselTmpl0000000002',1239475937,'3','pbversion0000000000001','approved','Carousel hidden textareas','Carousel hidden textareas','root/import/carousel/carousel-hidden-textareas','3','7','12',NULL,0,0,0,0,0,1059,NULL,0,1,0,1285124160,NULL,0),('GaBAW-2iVhLMJaZQzVLE5A',1240103565,'3','pbversion0000000000001','approved','ThingyRecord Templates','ThingyRecord Templates','root/import/thingyrecord-templates','3','7','3',NULL,0,0,0,0,0,364,NULL,0,1,0,1242380149,NULL,0),('b1316COmd9xRv4fCI3LLGA',1236956475,'3','pbversion0000000000001','approved','Inbox Notification','Inbox Notification','inbox_notification','3','7','4',NULL,0,0,0,0,0,414,NULL,0,1,0,1285124165,NULL,0),('lo1rpxn3t8YPyKGers5eQg',1238625621,'3','pbversion0000000000001','approved','Friend Manager','Friend Manager','root/import/account/friendmanager','3','7','12',NULL,0,1,0,0,0,388,NULL,0,1,0,1242380168,NULL,0),('YP9WaMPJHvCJl-YwrLVcPw',1245376837,'3','pbversion0000000000001','approved','Progress Bar','Progress Bar','admin_progress_bar','3','7','12',NULL,0,1,0,0,0,2600,'\n',0,1,0,1285124165,'',0),('FEDP3dk8J3Chw_gyr7_XEQ',1246278679,'3','pbversion0000000000001','approved','navigation.css','navigation.css','navigation.css','3','7','12',NULL,0,1,0,0,0,2437,NULL,0,1,0,1285124168,NULL,0),('f_tn9FfoSfKWX43F83v_3w',1247053009,'3','pbversion0000000000001','approved','Search','Search','root/import/search','3','7','12',NULL,0,0,0,0,0,317,NULL,0,1,0,1247779657,NULL,0),('oGfxez5sksyB_PcaAsEm_Q',1247053097,'3','pbversion0000000000001','approved','SyndicatedContent','SyndicatedContent','root/import/syndicatedcontent','3','7','12',NULL,0,0,0,0,0,350,NULL,0,1,0,1247779657,NULL,0),('tPagC0AQErZXjLFZQ6OI1g',1246966459,'3','pbversion0000000000001','approved','ImageAsset','ImageAsset','root/import/imageasset','3','7','12',NULL,0,0,0,0,0,329,NULL,0,1,0,1247779656,NULL,0),('pbtmpl0000000000000220',1247488979,'3','pbversion0000000000001','approved','Flash Style 3 Template','Flash Style 3 Template','flash-style-3-template','3','7','12',NULL,0,0,0,0,0,1386,'\r\n\r\n',0,1,0,1285124167,'',0),('PBtmpl0000000000000001',1247535846,'3','pbversion0000000000001','approved','Admin Console','Admin Console','admin_console2','3','7','12',NULL,0,1,0,0,0,5963,'\n',0,1,0,1285124161,'',0),('GYaFxnMu9UsEG8oanwB6TA',1246965871,'3','pbversion0000000000001','approved','Folder','Folder','root/import/folder','3','7','12',NULL,0,0,0,0,0,317,NULL,0,1,0,1247779656,NULL,0),('pbtmpl0000000000000221',1247487940,'3','pbversion0000000000001','approved','Flash Tutorial Template','Flash Tutorial Template','flash-tutorial-template','3','7','12',NULL,0,0,0,0,0,2092,'\r\n\r\n',0,1,0,1285124167,'',0),('VZK3CRgiMb8r4dBjUmCTgQ',1247046242,'3','pbversion0000000000001','approved','Poll','Poll','root/import/poll','3','7','12',NULL,0,0,0,0,0,311,NULL,0,1,0,1247779656,NULL,0),('NK8bqlwVRILJknqeCDPBHg',1285796040,'1','pbversion0000000000001','approved','Getting Started (part 2)','Getting Started (part 2)','getting_started/getting-started-part2','3','7','4',NULL,0,1,0,0,0,1510,NULL,0,1,0,1301974027,NULL,0),('i5kt5aodVs_oepNEkE7Okw',1242312883,'3','pbversion0000000000001','approved','poll.css','poll.css','poll.css','3','7','12',NULL,0,1,0,0,0,458,NULL,0,1,0,1285124169,NULL,0),('tXwf1zaOXTvsqPn6yu-GSw',1246965607,'3','pbversion0000000000001','approved','FileAsset','FileAsset','root/import/fileasset','3','7','12',NULL,0,0,0,0,0,326,NULL,0,1,0,1247779656,NULL,0),('nFen0xjkZn8WkpM93C9ceQ',1247864696,'3','pbversion0000000000001','approved','Shelf (Default)','Shelf (Default)','root/import/shelf-default','3','7','12',NULL,0,1,0,0,0,4612,'\n',0,1,0,1285124167,'',0),('2CS-BErrjMmESOtGT90qOg',1248549087,'3','pbversion0000000000001','approved','Default View Profile Template','Default View Profile Template','root/import/account/profile/default-view-profile-template','3','7','12',NULL,0,1,0,0,0,7605,NULL,0,1,0,1285124168,NULL,1),('MBmWlA_YEA2I6D29OMGtRg',1248549086,'3','pbversion0000000000001','approved','Default Profile Error Template','Default Profile Error Template','root/import/account/profile/default-profile-error-template','3','7','12',NULL,0,1,0,0,0,1223,NULL,0,1,0,1285124161,NULL,0),('gfZOwaTWYjbSoVaQtHBBEw',1249407461,'3','pbversion0000000000001','approved','Inbox Account Layout','Inbox Account Layout','root/import/account/inbox-account-layout','3','7','12',NULL,0,1,0,0,0,3260,'',0,1,0,1285124166,'',0),('0n4HtbXaWa_XJHkFjetnLQ',1248549086,'3','pbversion0000000000001','approved','Default Inbox View Message Template','Default Inbox View Message Template','root/import/account/inbox/default-inbox-view-message-template','3','7','12',NULL,0,1,0,0,0,5000,NULL,0,1,0,1285124159,NULL,0),('ErEzulFiEKDkaCDVmxUavw',1248549086,'3','pbversion0000000000001','approved','Default Inbox Error Template','Default Inbox Error Template','root/import/account/inbox/default-inbox-error-template','3','7','12',NULL,0,1,0,0,0,732,NULL,0,1,0,1285124160,NULL,0),('DUoxlTBXhVS-Zl3CFDpt9g',1248549086,'3','pbversion0000000000001','approved','Default Message Confirm Template','Default Message Confirm Template','root/import/account/inbox/default-message-confirm-template','3','7','12',NULL,0,1,0,0,0,785,NULL,0,1,0,1285124160,NULL,0),('1Q4Je3hKCJzeo0ZBB5YB8g',1248549086,'3','pbversion0000000000001','approved','Default Manage Invitations Template','Default Manage Invitations Template','root/import/account/inbox/default-manage-invitations-template','3','7','12',NULL,0,1,0,0,0,9795,'\n\n',0,1,0,1285124159,'',0),('5A8Hd9zXvByTDy4x-H28qw',1248549086,'3','pbversion0000000000001','approved','Default Invitation Confirmation Template','Default Invitation Confirmation Template','root/import/account/inbox/default-invitation-confirmation-template','3','7','12',NULL,0,1,0,0,0,1549,NULL,0,1,0,1285124159,NULL,0),('VBkY05f-E3WJS50WpdKd1Q',1248549087,'3','pbversion0000000000001','approved','Default View Invitation Template','Default View Invitation Template','root/import/account/inbox/default-view-invitation-template','3','7','12',NULL,0,1,0,0,0,3836,NULL,0,1,0,1285124165,NULL,0),('XgcsoDrbC0duVla7N7JAdw',1248549086,'3','pbversion0000000000001','approved','Default Invite User Email Template','Default Invite User Email Template','root/import/account/inbox/default-invite-user-email-template','3','7','12',NULL,0,1,0,0,0,490,NULL,0,1,0,1285124165,NULL,0),('cR0UFm7I1qUI2Wbpj--08Q',1248549086,'3','pbversion0000000000001','approved','Default Invite User Form Template','Default Invite User Form Template','root/import/account/inbox/default-invite-user-form-template','3','7','12',NULL,0,1,0,0,0,3967,NULL,0,1,0,1285124165,NULL,0),('SVIhz68689hwUGgcDM-gWw',1248549086,'3','pbversion0000000000001','approved','Default Invite User Confirm Template','Default Invite User Confirm Template','root/import/account/inbox/default-invite-user-confirm-template','3','7','12',NULL,0,1,0,0,0,819,NULL,0,1,0,1285124164,NULL,0),('zrNpGbT3odfIkg6nFSUy8Q',1249407461,'3','pbversion0000000000001','approved','Friends Layout Template','Friends Layout Template','root/import/account/friends/friends-layout-template','3','7','12',NULL,0,1,0,0,0,2662,'\n',0,1,0,1285124168,'',0),('1Yn_zE_dSiNuaBGNLPbxtw',1248549086,'3','pbversion0000000000001','approved','Default Friends View Template','Default Friends View Template','root/import/account/friends/default-friends-view-template','3','7','12',NULL,0,1,0,0,0,8064,NULL,0,1,0,1285124159,NULL,0),('AZFU33p0jpPJ-E6qLSWZng',1248549086,'3','pbversion0000000000001','approved','Default Friends Edit Template','Default Friends Edit Template','root/import/account/friends/default-friends-edit-template','3','7','12',NULL,0,1,0,0,0,9831,NULL,0,1,0,1285124159,NULL,0),('AGJBGviWGAwjnwziiPjvDg',1248549087,'3','pbversion0000000000001','approved','Default Send Request Template','Default Send Request Template','root/import/account/friends/default-send-request-template','3','7','12',NULL,0,1,0,0,0,2781,NULL,0,1,0,1285124159,NULL,0),('7Ijdd8SW32lVgg2H8R-Aqw',1248549086,'3','pbversion0000000000001','approved','Default Friends Error Template','Default Friends Error Template','root/import/account/friends/default-friends-error-template','3','7','12',NULL,0,1,0,0,0,776,NULL,0,1,0,1285124159,NULL,0),('K8F0j_cq_jgo8dvWY_26Ag',1248549086,'3','pbversion0000000000001','approved','Default Friends Confirmation Template','Default Friends Confirmation Template','root/import/account/friends/default-friends-confirmation-template','3','7','12',NULL,0,1,0,0,0,942,NULL,0,1,0,1285124160,NULL,0),('G5V6neXIDiFXN05oL-U3AQ',1248549087,'3','pbversion0000000000001','approved','Default Remove Friends Confirmation Template','Default Remove Friends Confirmation Template','root/import/account/friends/default-remove-friends-confirmation-template','3','7','12',NULL,0,1,0,0,0,1166,NULL,0,1,0,1285124160,NULL,0),('9ThW278DWLV0-Svf68ljFQ',1249407460,'3','pbversion0000000000001','approved','Account Layout','Account Layout','root/import/account/user/account-layout','3','7','12',NULL,0,1,0,0,0,1728,'\n',0,1,0,1285124159,'',0),('-zxyB-O50W8YnL39Ouoc4Q',1248563425,'3','pbversion0000000000001','approved','Default My Sales Template','Default My Sales Template','root/import/default-my-sales-template','3','7','12',NULL,0,1,0,0,0,3993,NULL,0,1,0,1285124158,NULL,0),('b4n3VyUIsAHyIvT-W-jziA',1249407461,'3','pbversion0000000000001','approved','Contributions Layout','Contributions Layout','root/import/account/contributions/contributions-layout','3','7','12',NULL,0,1,0,0,0,1753,'\n',0,1,0,1285124165,'',0),('PBtmpl0000000000000056',1248729559,'3','pbversion0000000000001','approved','Default Product','Default Product','default_product','3','7','12',NULL,0,1,0,0,0,13325,'\n\n',0,1,0,1285124162,'',0),('i9-G00ALhJOr0gMh-vHbKA',1250408924,'3','pbversion0000000000001','approved','Inbox SMS Notification','Inbox SMS Notification','root/import/inbox-sms-notification','3','7','4',NULL,0,0,0,0,0,446,NULL,0,1,0,1285124166,NULL,0),('ohjyzab5i-yW6GOWTeDUHg',1251425384,'3','pbversion0000000000001','approved','Default Manage Ad Sku Template','Default Manage Ad Sku Template','root/import/ad-sku/default-manage-ad-sku-template','3','7','12',NULL,0,0,0,0,0,2567,NULL,0,1,0,1285124167,NULL,0),('AldPGu0u-jm_5xK13atCSQ',1251419124,'3','pbversion0000000000001','approved','Default Purchase Ad Sku Template','Default Purchase Ad Sku Template','root/import/ad-sku/default-purchase-ad-sku-template','3','7','12',NULL,0,0,0,0,0,4230,NULL,0,1,0,1285124160,NULL,0),('5bnNzteN7w3NnK9mF4XiCg',1250243000,'3','pbversion0000000000001','approved','Survey','Survey','root/import/survey','3','7','12',NULL,0,0,0,0,0,317,NULL,0,1,0,1253052788,NULL,0),('PBtmpl0000000000000063',1250243000,'3','pbversion0000000000001','approved','Default Overview Report','Default Overview Report','root/import/survey/default-overview-report','3','7','12',NULL,0,1,0,0,0,5835,NULL,0,1,0,1285124162,NULL,0),('PBtmpl0000000000000062',1250243000,'3','pbversion0000000000001','approved','Default Gradebook Report','Default Gradebook Report','root/import/survey/default-gradebook-report','3','7','12',NULL,0,1,0,0,0,4863,NULL,0,1,0,1285124162,NULL,0),('PBtmpl0000000000000061',1250243000,'3','pbversion0000000000001','approved','Default Survey','Default Survey','root/import/survey/default-survey','3','7','12',NULL,0,1,0,0,0,2968,NULL,0,1,0,1285124162,NULL,0),('CxMpE_UPauZA3p8jdrOABw',1250243000,'3','pbversion0000000000001','approved','Default Questions','Default Questions','root/import/survey/default-questions','3','7','12',NULL,0,1,0,0,0,17836,NULL,0,1,0,1285124160,NULL,0),('1oBRscNIcFOI-pETrCOspA',1250243000,'3','pbversion0000000000001','approved','Default Section Edit','Default Section Edit','root/import/survey/default-section-edit','3','7','12',NULL,0,1,0,0,0,14088,NULL,0,1,0,1285124159,NULL,0),('wAc4azJViVTpo-2NYOXWvg',1250243000,'3','pbversion0000000000001','approved','Default Question Edit','Default Question Edit','root/import/survey/default-question-edit','3','7','12',NULL,0,1,0,0,0,12766,NULL,0,1,0,1285124167,NULL,0),('AjhlNO3wZvN5k4i4qioWcg',1250243000,'3','pbversion0000000000001','approved','Default Answer Edit','Default Answer Edit','root/import/survey/default-answer-edit','3','7','12',NULL,0,1,0,0,0,9595,NULL,0,1,0,1285124159,NULL,0),('RSAMkc6WQmfRE3TOr1_3Mw',1250243000,'3','pbversion0000000000001','approved','ExpireIncompleteSurveyResponses','ExpireIncompleteSurveyResponses','root/import/expireincompletesurveyresponses','3','7','12',NULL,0,1,0,0,0,399,NULL,0,1,0,1253052788,NULL,0),('ExpireIncResptmpl00001',1250243000,'3','pbversion0000000000001','approved','ExpireIncompleteSurveyResponses','ExpireIncompleteSurveyResponses','root/import/expireincompletesurveyresponses/expireincompletesurveyresponses','3','7','12',NULL,0,1,0,0,0,810,NULL,0,1,0,1285124160,NULL,0),('7F-BuEHi7t9bPi008H8xZQ',1250243000,'3','pbversion0000000000001','approved','Default Survey Summary','Default Survey Summary','root/import/survey/default-survey-summary','3','7','12',NULL,0,1,0,0,0,2300,NULL,0,1,0,1285124159,NULL,0),('S3zpVitAmhy58CAioH359Q',1250243000,'3','pbversion0000000000001','approved','Default Test Results','Default Test Results','root/import/survey/default-test-results','3','7','12',NULL,0,1,0,0,0,8673,'',0,1,0,1285124164,'',0),('nWNVoMLrMo059mDRmfOp9g',1250243000,'3','pbversion0000000000001','approved','Default Feedback','Default Feedback','root/import/survey/default-feedback','3','7','12',NULL,0,1,0,0,0,1235,NULL,0,1,0,1285124167,NULL,0),('newslettercs0000000001',1252682678,'3','pbversion0000000000001','approved','Newsletter Manager (default)',' Newsletter Manager','newslettercstemplate','3','7','3',NULL,0,0,0,0,0,2824,'\n',0,1,0,1285124167,'',0),('1IzRpX0tgW7iuCfaU2Kk0A',1250243000,'3','pbversion0000000000001','approved','Default Contributions View','Default Contributions View','root/import/account/contributions/default-contributions-view','3','7','12',NULL,0,1,0,0,0,7799,'\n',0,1,0,1285124159,'',0),('0EAJ9EYb9ap2XwfrcXfdLQ',1250243000,'3','pbversion0000000000001','approved','Story Archive Asset List','Story Archive Asset List','root/import/storymanager/keywordlist','3','7','4',NULL,0,0,0,0,0,579,NULL,0,1,0,1285124158,NULL,0),('TKmhv8boP3TD2xwSwUBq0g',1250243000,'3','pbversion0000000000001','approved','Default ThingyRecord View','Default ThingyRecord View','home/thinyrecord-templates/default-thingyrecord-view','3','7','3',NULL,0,1,0,0,0,1789,NULL,0,1,0,1285124164,NULL,0),('75CmQgpcCSkdsL-oawdn3Q',1253555614,'3','pbversion0000000000001','approved','Default Edit Profile Template','Default Edit Profile Template','root/import/account/profile/default-edit-profile-template','3','7','12',NULL,0,1,0,0,0,3294,'\n\n\n\n',0,1,0,1285124159,'',0),('d8jMMMRddSQ7twP4l1ZSIw',1253555614,'3','pbversion0000000000001','approved','Default Survey Take','Default Survey Take','root/import/survey/default-survey-take','3','7','12',NULL,0,1,0,0,0,3994,'\n\n\n\n',0,1,0,1285124165,'',0),('fowHfgOkJtAxdst7rugTog',1252595993,'3','pbversion0000000000001','approved','Story Manager','Story Manager','root/import/storymanager','3','7','12',NULL,0,1,0,0,0,339,'\r\n',0,1,0,1253676393,NULL,0),('3QpYtHrq_jmAk1FNutQM5A',1253636379,'3','pbversion0000000000001','approved','Story Template','Story Template','root/import/storymanager/storytemplate','3','7','4',NULL,0,0,0,0,0,6662,'\n\n\n',0,1,0,1285124159,'',0),('yxD5ka7XHebPLD-LXBwJqw',1253635396,'3','pbversion0000000000001','approved','StoryArchive','StoryArchive','root/import/storymanager/storyarchive','3','7','4',NULL,0,0,0,0,0,3375,'',0,1,0,1285124167,'',0),('TbDcVLbbznPi0I0rxQf2CQ',1253636379,'3','pbversion0000000000001','approved','Story Template Topic','Story Template Topic','root/import/storymanager/storytemplatetopic','3','7','4',NULL,0,0,0,0,0,7134,'\n\n\n\n\n',0,1,0,1285124164,'',0),('iCM9pRY5yYyjufROgaCDlg',1253305659,'3','pbversion0000000000001','approved','storyManager.css','storyManager.css','storymanager.css','3','7','12',NULL,0,1,0,0,0,4360,NULL,0,1,0,1285124169,NULL,0),('VyCINX2KixKYr2pzQGX9Mg',1254881103,'3','pbversion0000000000001','approved','layout.css','layout.css','layout.css','3','7','12',NULL,0,1,0,0,0,1439,'\r\n',0,1,0,1285124168,NULL,0),('TvOZs8U1kRXLtwtmyW75pg',1256092368,'3','pbversion0000000000001','approved','Article','Article','root/import/article','3','7','12',NULL,0,0,0,0,0,322,'\r\n',0,1,0,1256092370,NULL,0),('zb_OPKNqcTuIjdvvbEkRjw',1256092368,'3','pbversion0000000000001','approved','article.css','article.css','article.css','3','7','12',NULL,0,1,0,0,0,723,'\r\n',0,1,0,1285124169,NULL,0),('PBrichedit000000000001',1256092369,'3','pbversion0000000000001','approved','Content Manager\'s Rich Edit','Content Manager\'s Rich Edit','content_managers_rich_edit','3','7','12',NULL,0,0,0,0,0,572,'\r\n',0,1,0,1256092370,NULL,0),('FJbUTvZ2nUTn65LpW6gjsA',1256092369,'3','pbversion0000000000001','approved','Profile Account Layout','Profile Account Layout','root/import/account/profile/profile-account-layout','3','7','12',NULL,0,1,0,0,0,4224,'',0,1,0,1285124160,'',0),('pbrobot000000000000001',1256092369,'3','pbversion0000000000001','approved','robots.txt','robots.txt','robots.txt','3','7','12',NULL,0,0,0,0,0,562,NULL,0,1,0,1285124169,NULL,0),('4qh0kIsFUdd4Ox-Iu1JZgg',1257311886,'3','pbversion0000000000001','approved','EMS','EMS','root/import/ems','3','7','12',NULL,0,1,0,0,0,310,'\r\n',0,1,0,1257311889,NULL,0),('OOyMH33plAy6oCj_QWrxtg',1257311886,'3','pbversion0000000000001','approved','Lookup Registrant (Default)','Lookup Registrant (Default)','root/import/ems/lookup-registrant-default','3','7','12',NULL,0,1,0,0,0,7007,'\n\n\n\n\n\n\n\n\n\n\n\n',0,1,0,1285124161,'',0),('PsFn7dJt4wMwBa8hiE3hOA',1257311886,'3','pbversion0000000000001','approved','Print Badge (Default)','Print Badge (Default)','root/import/ems/print-badge-default','3','7','12',NULL,0,1,0,0,0,2323,NULL,0,1,0,1285124164,NULL,0),('yBwydfooiLvhEFawJb0VTQ',1257311887,'3','pbversion0000000000001','approved','Print Ticket (Default)','Print Ticket (Default)','root/import/ems/print-ticket-default','3','7','12',NULL,0,1,0,0,0,2386,NULL,0,1,0,1285124167,NULL,0),('S2_LsvVa95OSqc66ITAoig',1257311887,'3','pbversion0000000000001','approved','EMS Schedule Listing (default)','EMS Schedule Listing (default)','root/import/ems/ems-schedule-listing-default2','3','7','12',NULL,0,1,0,0,0,14216,'\n\n\n\n\n\n\n\n\n\n\n\n \n',0,1,0,1285124164,'',0),('hreA_bgxiTX-EzWCSZCZJw',1257311887,'3','pbversion0000000000001','approved','Print Remaining Tickets Template (default)','Print Remaining Tickets Template (default)','root/import/ems/default-print-remaining-tickets-template','3','7','12',NULL,0,1,0,0,0,2345,'\r\n',0,1,0,1285124166,NULL,0),('-K8Hj45mbelljN9-0CXZxg',1257311887,'3','pbversion0000000000001','approved','DataForm','DataForm','root/import/dataform','3','7','12',NULL,0,0,0,0,0,336,NULL,0,1,0,1257311888,NULL,0),('PBtmpl0000000000000020',1257311887,'3','pbversion0000000000001','approved','Mail Form','Mail Form','mail_form','3','7','12',NULL,0,1,0,0,0,4606,'\n',0,1,0,1285124161,'',0),('PBtmpl0000000000000104',1257311888,'3','pbversion0000000000001','approved','Default Acknowledgement','Default Acknowledgement','default_acknowledgement','3','7','12',NULL,0,1,0,0,0,1750,'',0,1,0,1285124163,'',0),('_iHetEvMQUOoxS-T2CM0sQ',1273172789,'1','pbversion0000000000001','approved','Getting Started','Getting Started','getting_started','3','7','3',NULL,0,0,0,0,0,392,NULL,0,1,0,1301974027,NULL,0),('bX5rYxb6tZ9docY6sUhBlw',1278013772,'1','pbversion0000000000001','approved','Getting Started','Getting Started','getting_started/getting-started','3','7','4',NULL,0,1,0,0,0,1253,NULL,0,1,0,1301974027,NULL,0),('8Bb8gu-me2mhL3ljFyiWLg',1271359194,'1','pbversion0000000000001','approved','Talk to the Experts','Your Next Step','your_next_step','3','7','3',NULL,0,0,0,0,0,869,NULL,0,1,0,1301974027,NULL,0),('ix1p0AbwKAz8QWB-T-HHfg',1271359087,'1','pbversion0000000000001','approved','Get Support','Get Support','yns/support','3','7','4',NULL,0,1,0,0,0,739,NULL,0,1,0,1301974027,NULL,0),('iCYOjohB9SKvAPr6bXElKA',1271445525,'1','pbversion0000000000001','approved','Get Hosting','Get Hosting','yns/hosting','3','7','4',NULL,0,1,0,0,0,749,NULL,0,1,0,1301974027,NULL,0),('PBtmpl0000000000000116',1257311888,'3','pbversion0000000000001','approved','Tab Form','Tab Form','tab_form','3','7','12',NULL,0,1,0,0,0,5745,'\n',0,1,0,1285124163,'',0),('PBtmpl0000000000000141',1257311888,'3','pbversion0000000000001','approved','Default DataForm','Default DataForm','pbtmpl0000000000000141','3','7','12',NULL,0,1,0,0,0,6035,'\n',0,1,0,1285124164,'',0),('_aE16Rr1-bXBf8SIaLZjCg',1257311888,'3','pbversion0000000000001','approved','picklanguage','picklanguage','media/picklanguage','3','7','12',NULL,0,1,0,0,0,617,'\r\n',0,1,0,1285124165,NULL,0),('P_4uog81vSUK4KxuW_4GUA',1258524916,'3','pbversion0000000000001','approved','css','css','css','3','7','12',NULL,0,1,0,0,0,298,'\r\n',0,1,0,1258524918,NULL,0),('PBtmpl0000000000000060',1258524916,'3','pbversion0000000000001','approved','Fail Safe','Fail Safe','fail_safe','3','7','12',NULL,0,1,0,0,0,2413,NULL,0,1,0,1285124162,NULL,0),('PBtmpl0000000000000137',1258524916,'3','pbversion0000000000001','approved','Admin Console Style','Admin Console','admin_console','3','7','12',NULL,0,1,0,0,0,1283,NULL,0,1,0,1285124163,NULL,0),('PBtmpl0000000000000132',1258524916,'3','pbversion0000000000001','approved','Empty','Empty','empty','3','7','12',NULL,0,1,0,0,0,296,NULL,0,1,0,1285124163,NULL,0),('PBtmplBlankStyle000001',1258524916,'3','pbversion0000000000001','approved','WebGUI 6 Blank Style','WebGUI 6 Blank Style','pbtmplblankstyle000001','3','7','12',NULL,0,1,0,0,0,1970,NULL,0,1,0,1285124164,NULL,0),('uCn31PzislTZlgt_79j7cQ',1258524916,'3','pbversion0000000000001','approved','style.css','style.css','css/style.css','3','7','12',NULL,0,1,0,0,0,1019,'\r\n',0,1,0,1285124169,NULL,0),('H_-8zjtWsO1FUpQqNtkxNQ',1258524916,'3','pbversion0000000000001','approved','wg-base.css','wg-base.css','css/wg-base.css','3','7','12',NULL,0,1,0,0,0,1138,'\r\n',0,1,0,1285124168,NULL,0),('PBtmpl0000000000000117',1259133274,'3','pbversion0000000000001','approved','DropMenu','DropMenu','dropmenu','3','7','12',NULL,0,1,0,0,0,2660,'',0,1,0,1285124163,'',0),('PBtmpl0000000000000136',1259133274,'3','pbversion0000000000001','approved','Synopsis','Synopsis','synopsis2','3','7','12',NULL,0,1,0,0,0,1734,NULL,0,1,0,1285124163,NULL,0),('PBtmpl0000000000000093',1259133274,'3','pbversion0000000000001','approved','crumbTrail','crumbTrail','crumbtrail2','3','7','12',NULL,0,1,0,0,0,1494,NULL,0,1,0,1285124163,NULL,0),('GNvjCFQWjY2AF2uf0aCM8Q',1259133274,'3','pbversion0000000000001','approved','Syndicated Articles','Syndicated Articles','syndicated_articles','3','7','12',NULL,0,1,0,0,0,2472,NULL,0,1,0,1285124160,NULL,0),('-PkdI8l1idu-8gDX3iOdcw',1259133274,'3','pbversion0000000000001','approved','One Over Two','One Over Two','one_over_two','3','7','12',NULL,0,1,0,0,0,6326,'',0,1,0,1285124158,'',0),('PBtmpl0000000000000103',1259133275,'3','pbversion0000000000001','approved','Article With Image','Article With Image','article-with-image','3','7','12',NULL,0,1,0,0,0,2130,'',0,1,0,1285124163,'',0),('PBtmpl0000000000000024',1259133275,'3','pbversion0000000000001','approved','File','File','file','3','7','12',NULL,0,1,0,0,0,940,NULL,0,1,0,1285124161,NULL,0),('XdlKhCDvArs40uqBhvzR3w',1259133275,'3','pbversion0000000000001','approved','Article With Pagination','Article With Pagination','article-with-pagination','3','7','12',NULL,0,1,0,0,0,3274,'\n',0,1,0,1285124165,NULL,0),('PBnav00000000indentnav',1259133275,'3','pbversion0000000000001','approved','Indent Nav','Indent Nav','indent_nav','3','7','12',NULL,0,0,0,0,0,1978,'',0,1,0,1285124161,'',0),('PBtmpl0000000000000124',1259133275,'3','pbversion0000000000001','approved','Tabs','Tabs','tabs','3','7','12',NULL,0,1,0,0,0,1766,'',0,1,0,1285124163,'',0),('PBtmpl0000000000000131',1259133275,'3','pbversion0000000000001','approved','Right Column','Right Column','right_column','3','7','12',NULL,0,1,0,0,0,4905,'',0,1,0,1285124163,'',0),('PBtmpl0000000000000134',1259133275,'3','pbversion0000000000001','approved','Hierarchical Top Nav','Hierarchical Top Nav','import/hierarchical-top-nav','3','7','12',NULL,0,1,0,0,0,4021,'\n\n\n\n\n\n',0,1,0,1285124163,'',0),('PBtmpl0000000000000078',1259133275,'3','pbversion0000000000001','approved','File Folder','File Folder','file_folder','3','7','12',NULL,0,1,0,0,0,3834,NULL,0,1,0,1285124162,NULL,0),('PBtmpl0000000000000055',1259133275,'3','pbversion0000000000001','approved','Default Poll','Default Poll','default_poll','3','7','12',NULL,0,1,0,0,0,3032,'',0,1,0,1285124162,'',0),('PBtmpl0000000000000065',1259133275,'3','pbversion0000000000001','approved','Default Syndicated Content','Default Syndicated Content','default_syndicated_content','3','7','12',NULL,0,1,0,0,0,2387,NULL,0,1,0,1285124162,NULL,0),('PBtmpl0000000000000054',1259133276,'3','pbversion0000000000001','approved','Default Page','Default Page','default_page','3','7','12',NULL,0,1,0,0,0,3083,'',0,1,0,1285124162,'',0),('PBtmpl0000000000000108',1259133276,'3','pbversion0000000000001','approved','horizontalMenu','horizontalMenu','horizontalmenu','3','7','12',NULL,0,1,0,0,0,1982,'',0,1,0,1285124163,'',0),('PBtmpl0000000000000115',1259133276,'3','pbversion0000000000001','approved','Linked Image with Caption','Linked Image with Caption','linked_image_with_caption','3','7','12',NULL,0,1,0,0,0,2393,'',0,1,0,1285124163,'',0),('PBtmpl0000000000000109',1259133276,'3','pbversion0000000000001','approved','One Over Three','One Over Three','one_over_three','3','7','12',NULL,0,1,0,0,0,7968,'',0,1,0,1285124163,'',0),('VCFhB9WOsDsH2Apj3c6DpQ',1259133276,'3','pbversion0000000000001','approved','Three Columns','Three Columns','three-columns','3','7','12',NULL,0,1,0,0,0,5947,'',0,1,0,1285124165,'',0),('PBtmpl0000000000000002',1259133276,'3','pbversion0000000000001','approved','Default Article','Default Article','default_article','3','7','12',NULL,0,1,0,0,0,2241,NULL,0,1,0,1285124161,NULL,0),('PBtmpl0000000000000123',1259133276,'3','pbversion0000000000001','approved','Item','Item','item','3','7','12',NULL,0,1,0,0,0,2232,NULL,0,1,0,1285124163,NULL,0),('PBtmpl0000000000000135',1259133276,'3','pbversion0000000000001','approved','Side By Side','Side By Side','side_by_side','3','7','12',NULL,0,1,0,0,0,4489,'\n',0,1,0,1285124163,'',0),('PBnav00000000000bullet',1259133276,'3','pbversion0000000000001','approved','Bulleted List','Bulleted List','bulleted_list','3','7','12',NULL,0,0,0,0,0,2744,'\n\n',0,1,0,1285124161,'',0),('MK4fCNoyrx5SE8eyDfOpxg',1259133276,'3','pbversion0000000000001','approved','Flash File','Flash File','flash-file','3','7','12',NULL,0,1,0,0,0,1861,NULL,0,1,0,1285124161,NULL,0),('PBtmpl0000000000000130',1259133276,'3','pbversion0000000000001','approved','Tree Navigation','Tree Navigation','root/import/navigation/tree-navigation','3','7','12',NULL,0,1,0,0,0,3529,'\n\n\n',0,1,0,1285124163,'',0),('f2EktltCvwQpl_3-B1yR7g',1288748251,'3','pbversion0000000000001','approved','Asset Templates','Asset Templates','root/import/asset_templates','3','7','12',NULL,0,1,0,0,0,344,NULL,0,1,0,1288748251,NULL,0),('BMybD3cEnmXVk2wQ_qEsRQ',1263962529,'3','pbversion0000000000001','approved','Badge Builder (Default)','Badge Builder (Default)','root/import/ems/badge-builder-default','3','7','12',NULL,0,1,0,0,0,36631,'\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',0,1,0,1285124160,'',0),('mRtqRuVikSe82BQsYBlD0A',1263962529,'3','pbversion0000000000001','approved','Bare Image','Bare Image','bare_image','3','7','12',NULL,0,1,0,0,0,558,NULL,0,1,0,1285124166,NULL,0),('aUDsJ-vB9RgP-AYvPOy8FQ',1263962529,'3','pbversion0000000000001','approved','Shop Account Layout','Shop Account Layout','root/import/account/shop/shop-account-layout','3','7','12',NULL,0,1,0,0,0,3337,'\n',0,1,0,1285124165,'',0),('CalendarEventEdit00001',1269401468,'3','pbversion0000000000001','approved','Default Calendar Event Edit','Default Calendar Event Edit','root/import/calendar-templates/default-calendar-event-edit','3','7','12',NULL,0,0,0,0,0,18084,'\r\n\r\n\r\n\r\n\r\n\r\n\r\n \r\n\r\n',0,1,0,1285124160,'',0),('GRUNFctldUgop-qRLuo_DA',1269401469,'3','pbversion0000000000001','approved','Default Survey Edit','Default Survey Edit','root/import/survey/default-survey-edit','3','7','12',NULL,0,1,0,0,0,7101,NULL,0,1,0,1285124160,NULL,0),('t87D1138NhPHhA23-hozBA',1273032716,'3','pbversion0000000000001','approved','CrystalX','CrystalX','crystalx','3','7','3',NULL,0,1,0,0,0,310,NULL,0,1,0,1273032724,NULL,0),('QtBumey5ffc-xffRp1-7Aw',1273032716,'3','pbversion0000000000001','approved','img','img','crystalx/img','3','7','3',NULL,0,1,0,0,0,310,NULL,0,1,0,1273032724,NULL,0),('-0sK2rX1cwQt1ipUSqsiQQ',1273032716,'3','pbversion0000000000001','approved','bg.gif','bg.gif','crystalx/img/bg.gif','3','7','3',NULL,0,1,0,0,0,1440,NULL,0,1,0,1273032724,NULL,0),('hS_eOaVz9Qb5ixndK9EXAw',1273032716,'3','pbversion0000000000001','approved','header.jpg','header.jpg','crystalx/img/header.jpg','3','7','3',NULL,0,1,0,0,0,8038,NULL,0,1,0,1273032724,NULL,0),('k2p-Be8C98pf2cRq7E-JHg',1273032716,'3','pbversion0000000000001','approved','tab_link.gif','tab_link.gif','crystalx/img/tab_link.gif','3','7','3',NULL,0,1,0,0,0,507,NULL,0,1,0,1273032724,NULL,0),('aYG4fjbMPbC4LCuuMp4gGA',1273032716,'3','pbversion0000000000001','approved','tab_hover.gif','tab_hover.gif','crystalx/img/tab_hover.gif','3','7','3',NULL,0,1,0,0,0,538,NULL,0,1,0,1273032724,NULL,0),('F122Ey0NtVAw6Lfv1M6G_Q',1273032716,'3','pbversion0000000000001','approved','ico_archive.gif','ico_archive.gif','crystalx/img/ico_archive.gif','3','7','3',NULL,0,1,0,0,0,427,NULL,0,1,0,1273032724,NULL,0),('qmXHKrQ6EDLSOGkrEKRUDA',1273032716,'3','pbversion0000000000001','approved','bg_page_in.jpg','bg_page_in.jpg','crystalx/img/bg_page_in.jpg','3','7','3',NULL,0,1,0,0,0,3242,NULL,0,1,0,1273032724,NULL,0),('4qZgXjPPO4fwV879yu5XUg',1273032716,'3','pbversion0000000000001','approved','bg_page.JPG','bg_page.JPG','crystalx/img/bg_page.jpg','3','7','3',NULL,0,1,0,0,0,1229,NULL,0,1,0,1273032724,NULL,0),('mb-xeAugm5GJdvu-Wh0MtQ',1273032717,'3','pbversion0000000000001','approved','search_submit.gif','search_submit.gif','crystalx/img/search_submit.gif','3','7','3',NULL,0,1,0,0,0,2108,NULL,0,1,0,1273032724,NULL,0),('84Y9CwgzP6eNU7wZnk019Q',1273032717,'3','pbversion0000000000001','approved','ico_date.gif','ico_date.gif','crystalx/img/ico_date.gif','3','7','3',NULL,0,1,0,0,0,416,NULL,0,1,0,1273032724,NULL,0),('ikXTtJKZfHVxqw-47E4AQA',1273032717,'3','pbversion0000000000001','approved','ico_user.gif','ico_user.gif','crystalx/img/ico_user.gif','3','7','3',NULL,0,1,0,0,0,407,NULL,0,1,0,1273032724,NULL,0),('DhRWPTgzhvju_-TbMN3CwA',1273032717,'3','pbversion0000000000001','approved','ico_comments.gif','ico_comments.gif','crystalx/img/ico_comments.gif','3','7','3',NULL,0,1,0,0,0,427,NULL,0,1,0,1273032724,NULL,0),('6njI-pZz2bwsjWh-Q1_11g',1273032717,'3','pbversion0000000000001','approved','ico_list.gif','ico_list.gif','crystalx/img/ico_list2.gif','3','7','3',NULL,0,1,0,0,0,412,NULL,0,1,0,1273032724,NULL,0),('_Hz1Gnd3yEnJzVS7l7nJMQ',1273032717,'3','pbversion0000000000001','approved','content_all_bg.PNG','content_all_bg.PNG','crystalx/img/content_all_bg.png','3','7','3',NULL,0,1,0,0,0,8683,NULL,0,1,0,1273032724,NULL,0),('VOOrXK5dFnkGih7aTkuDWA',1273032717,'3','pbversion0000000000001','approved','search.PNG','search.PNG','crystalx/img/search.png','3','7','3',NULL,0,1,0,0,0,2190,NULL,0,1,0,1273032724,NULL,0),('ruf-QejOkUHDRtfgakHlbA',1273032717,'3','pbversion0000000000001','approved','col_title_bg_long.GIF','col_title_bg_long.GIF','crystalx/img/col_title_bg_long.gif','3','7','3',NULL,0,1,0,0,0,1265,NULL,0,1,0,1273032724,NULL,0),('FSHy5KjQjkt599PHS41seA',1273032717,'3','pbversion0000000000001','approved','footer.jpg','footer.jpg','crystalx/img/footer.jpg','3','7','3',NULL,0,1,0,0,0,4571,NULL,0,1,0,1273032724,NULL,0),('nuYYXAz4KNNxgfumfnpo_g',1273032718,'3','pbversion0000000000001','approved','ico_top.gif','ico_top.gif','crystalx/img/ico_top.gif','3','7','3',NULL,0,1,0,0,0,834,NULL,0,1,0,1273032724,NULL,0),('Mr7ljjoy6n4fZojpQWajKQ',1273032718,'3','pbversion0000000000001','approved','ico_links.gif','ico_links.gif','crystalx/img/ico_links.gif','3','7','3',NULL,0,1,0,0,0,419,NULL,0,1,0,1273032724,NULL,0),('ApkqpDOrJDxK3QrWBGSRIg',1273032718,'3','pbversion0000000000001','approved','ico_archive2.gif','ico_archive2.gif','crystalx/img/ico_archive2.gif','3','7','3',NULL,0,1,0,0,0,432,NULL,0,1,0,1273032724,NULL,0),('AzzTY0Lay1f_YGeQJFnQCA',1273032718,'3','pbversion0000000000001','approved','ico_list.gif','ico_list.gif','crystalx/img/ico_list.gif','3','7','3',NULL,0,1,0,0,0,411,NULL,0,1,0,1273032724,NULL,0),('OiJNwP1gAlcva8_yOtL4gA',1273032718,'3','pbversion0000000000001','approved','CrystalX_style','CrystalX_style','crystalx_style','3','7','3','by Ning from Pluton -- http://pluton.nl\n\nCrystalX gives your site a crystal-ish look and a strictly formal style. Feel free to download and apply it to your own site.\n\nOriginally designed by \"Nuvio Webdesign\" and collected by Open Source Web Design, converted to WebGUI theme by Ning.',0,1,0,0,0,3470,NULL,0,1,0,1285124161,NULL,0),('JOuCU4x5BJfVHfkfMkVQdQ',1273032718,'3','pbversion0000000000001','approved','crystalx.css','crystalx.css','crystalx/crystalx.css','3','7','3',NULL,0,1,0,0,0,14430,NULL,0,1,0,1285124168,NULL,0),('gaIOm5cr2TkT9Fk6QmZWug',1273032718,'3','pbversion0000000000001','approved','crystalX_navi','crystalX_navi','crystalx/crystalx_navi','3','7','3',NULL,0,1,0,0,0,7486,'\n\n\n\n',0,1,0,1285124166,'',0),('w0QifHLhsrzeOpFKl-DX-Q',1273032718,'3','pbversion0000000000001','approved','crystalx_navi.css','crystalx_navi.css','crystalx/crystalx_navi.css','3','7','3',NULL,0,1,0,0,0,10481,NULL,0,1,0,1285124169,NULL,0),('x_hiUi1XZloBvV47Obnu8Q',1273032718,'3','pbversion0000000000001','approved','crystalX_NavigationTrail','crystalX_NavigationTrail','crystalx/crystalx_navigationtrail','3','7','12',NULL,0,1,0,0,0,422,NULL,0,1,0,1273032724,NULL,0),('hpCk0B3vQzgc-QJhSol41w',1273032718,'3','pbversion0000000000001','approved','crystalX_navitrail','crystalX_navitrail','crystalx/crystalx_navitrail','3','7','12',NULL,0,1,0,0,0,1104,NULL,0,1,0,1285124166,NULL,0),('UUwEL6hLEPdrnkZnKRzFYQ',1273032718,'3','pbversion0000000000001','approved','Site Search','Site Search','crystalx/site-search','3','7','3',NULL,0,1,0,0,0,892,NULL,0,1,0,1273032724,NULL,0),('OfKbvK7CrfMnfc8WDoF4Rg',1273032718,'3','pbversion0000000000001','approved','crystalx_search','crystalx_search','crystalx/crystalx_search','3','7','3',NULL,0,1,0,0,0,2756,NULL,0,1,0,1315877143,NULL,0),('stevestyle000000000002',1273032718,'3','pbversion0000000000001','approved','Style 02','Style 02','style_02','3','7','12','by Steve from Plain Black http://plainblack.com\r\n\r\nThe second of the WebGUI 7 styles',0,0,0,0,0,5770,NULL,0,1,0,1285124167,NULL,0),('Q4uX_C557arTp6D_jwB1jQ',1273032720,'3','pbversion0000000000001','approved','Wiki','Wiki','root/import/wiki','3','12','12',NULL,0,0,0,0,0,312,NULL,0,1,0,1273032723,NULL,0),('WikiRCTmpl000000000001',1273032720,'3','pbversion0000000000001','approved','Default Recent Changes','Default Recent Changes','default-wiki-recent-changes','3','7','12',NULL,0,0,0,0,0,1657,NULL,0,1,0,1285124165,NULL,0),('WikiFrontTmpl000000001',1273032720,'3','pbversion0000000000001','approved','Default Wiki Front Page','Default Wiki Front Page','default-wiki-front-page','3','7','12',NULL,0,0,0,0,0,4434,NULL,0,1,0,1285124165,NULL,0),('WikiSearchTmpl00000001',1273032720,'3','pbversion0000000000001','approved','Default Wiki Search','Default Wiki Search','default-wiki-search','3','7','12',NULL,0,0,0,0,0,2450,'\n\n',0,1,0,1285124165,NULL,0),('WikiPHTmpl000000000001',1273032720,'3','pbversion0000000000001','approved','Default Page History','Default Page History','default-wiki-page-history','3','7','12',NULL,0,0,0,0,0,657,NULL,0,1,0,1285124165,NULL,0),('WikiPageTmpl0000000001',1273032720,'3','pbversion0000000000001','approved','Default Wiki Page','Default Wiki Page','default-wiki-page','3','7','12',NULL,0,0,0,0,0,6422,'\n\n\n\n\n\n\n\n',0,1,0,1285124165,'',0),('WikiPageEditTmpl000001',1273032720,'3','pbversion0000000000001','approved','Default Wiki Page Edit','Default Wiki Page Edit','default-wiki-page-edit','3','7','12',NULL,0,0,0,0,0,2572,NULL,0,1,0,1285124165,NULL,0),('WikiMPTmpl000000000001',1273032720,'3','pbversion0000000000001','approved','Default Most Popular','Default Most Popular','default-wiki-most-popular','3','7','12',NULL,0,0,0,0,0,1033,NULL,0,1,0,1285124165,NULL,0),('stevestyle000000000003',1273032720,'3','pbversion0000000000001','approved','Style 03','Style 03','style_03','3','7','12','by Steve from Plain Black http://plainblack.com\r\n\r\nThe last of the WebGUI 7 style templates.',0,0,0,0,0,3907,NULL,0,1,0,1285124167,NULL,0),('stevestyle000000000001',1273032722,'3','pbversion0000000000001','approved','Style 01','Style 01','style_01','3','7','12','by Steve from Plain Black http://plainblack.com\r\n\r\nThe first of the WebGUI 7 styles',0,0,0,0,0,3790,NULL,0,1,0,1285124167,NULL,0),('c8xrwVuu5QE0XtF9DiVzLw',1273032723,'3','pbversion0000000000001','approved','Default Inbox View Template','Default Inbox View Template','root/import/account/inbox/default-inbox-view-template','3','7','12',NULL,0,1,0,0,0,11070,'\n\n',0,1,0,1285124165,'',0),('WikiKeyword00000000001',1274238756,'3','pbversion0000000000001','approved',' Wiki Pages By Keyword (default)',' Wiki Pages By Keyword','wiki-master-by-keyword-template.tmpl','3','7','3',NULL,0,0,0,0,0,2818,NULL,0,1,0,1285124165,NULL,0),('ThingyTmpl000000000004',1277868920,'3','pbversion0000000000001','approved','Default Thingy Search Thing','Default Thingy Search Thing','templates/thingy-default-search-thing','3','7','12',NULL,0,0,0,0,0,9564,'\n\n\n\n\n',0,1,0,1285124164,'',0),('GNOAsX98vCsl0JRwfwL-gg',1277868921,'3','pbversion0000000000001','approved','Collaboration','Collaboration','root/import/collaboration','3','7','12',NULL,0,0,0,0,0,338,NULL,0,1,0,1277868927,NULL,0),('PBtmpl0000000000000066',1277868921,'3','pbversion0000000000001','approved','Default USS','Default USS','default_uss','3','7','12',NULL,0,1,0,0,0,4993,'\n\n\n',0,1,0,1285124162,'',0),('PBtmpl0000000000000080',1277868921,'3','pbversion0000000000001','approved','FAQ','FAQ','faqtemplate','3','7','12',NULL,0,1,0,0,0,3968,NULL,0,1,0,1285124162,NULL,0),('PBtmpl0000000000000097',1277868921,'3','pbversion0000000000001','approved','Traditional with Thumbnails','Traditional with Thumbnails','traditional_with_thumbnails','3','7','12',NULL,0,1,0,0,0,6674,'\n',0,1,0,1285124163,'',0),('PBtmpl0000000000000112',1277868921,'3','pbversion0000000000001','approved','Weblog','Weblog','weblog','3','7','12',NULL,0,1,0,0,0,5202,'',0,1,0,1285124163,'',0),('PBtmpl0000000000000121',1277868921,'3','pbversion0000000000001','approved','Photo Gallery','Photo Gallery','photo_gallery','3','7','12',NULL,0,1,0,0,0,3185,'\n\n',0,1,0,1285124163,'',0),('PBtmpl0000000000000067',1277868921,'3','pbversion0000000000001','approved','Default Submission','Default Submission','default_submission','3','7','12',NULL,0,1,0,0,0,22672,'\n',0,1,0,1285124162,'',0),('PBtmpl0000000000000026',1277868921,'3','pbversion0000000000001','approved','Default Forum','Default Forum','default_forum','3','7','12',NULL,0,1,0,0,0,7927,'\n\n\n',0,1,0,1285124161,'',0),('PBtmpl0000000000000128',1277868921,'3','pbversion0000000000001','approved','Classifieds','Classifieds','classifieds','3','7','12',NULL,0,1,0,0,0,3272,'\n\n',0,1,0,1285124163,'',0),('PBtmpl0000000000000079',1277868921,'3','pbversion0000000000001','approved','Topics','Topics','topics','3','7','12',NULL,0,1,0,0,0,4948,'\n',0,1,0,1285124162,'',0),('PBtmpl0000000000000083',1277868921,'3','pbversion0000000000001','approved','Link List','Link List','link_list','3','7','12',NULL,0,1,0,0,0,3716,NULL,0,1,0,1285124163,NULL,0),('PBtmpl0000000000000082',1277868921,'3','pbversion0000000000001','approved','Unordered List','Unordered List','unordered_list','3','7','12',NULL,0,1,0,0,0,4633,'\n',0,1,0,1285124162,'',0),('PBtmpl0000000000000133',1277868921,'3','pbversion0000000000001','approved','Guest Book','Guest Book','guest_book','3','7','12',NULL,0,1,0,0,0,3270,NULL,0,1,0,1285124163,NULL,0),('PBtmpl0000000000000029',1277868921,'3','pbversion0000000000001','approved','Default Post Form','Default Post Form','default_post_form','3','7','12',NULL,0,1,0,0,0,4119,'\n',0,1,0,1285124162,'',0),('PBtmpl0000000000000032',1277868921,'3','pbversion0000000000001','approved','Default Thread','Default Thread','default_thread','3','7','12',NULL,0,1,0,0,0,11649,'\n',0,1,0,1285124162,'',0),('PBtmpl0000000000000031',1277868921,'3','pbversion0000000000001','approved','Default Forum Search','Default Forum Search','default_forum_search','3','7','12',NULL,0,1,0,0,0,3848,'',0,1,0,1285124162,'',0),('PBtmpl0000000000000068',1277868921,'3','pbversion0000000000001','approved','Default Submission Form','Default Submission Form','default_submission_form','3','7','12',NULL,0,1,0,0,0,5051,'\n',0,1,0,1285124162,'',0),('PBtmpl0000000000000099',1277868921,'3','pbversion0000000000001','approved','FAQ Submission Form','FAQ Submission Form','faq_submission_form','3','7','12',NULL,0,1,0,0,0,4330,'\n',0,1,0,1285124163,'',0),('PBtmpl0000000000000114',1277868922,'3','pbversion0000000000001','approved','Link List Submission Form','Link List Submission Form','link_list_submission_form','3','7','12',NULL,0,1,0,0,0,5502,'\n',0,1,0,1285124163,'',0),('PBtmpl0000000000000098',1277868922,'3','pbversion0000000000001','approved','Job','Job','job','3','7','12',NULL,0,1,0,0,0,20225,'',0,1,0,1285124163,'',0),('PBtmpl0000000000000122',1277868922,'3','pbversion0000000000001','approved','Job Submission Form','Job Submission Form','job_submission_form','3','7','12',NULL,0,1,0,0,0,6134,'\n',0,1,0,1285124163,'',0),('PBtmpl0000000000000081',1277868922,'3','pbversion0000000000001','approved','Q and A','Q and A','q_and_a','3','7','12',NULL,0,1,0,0,0,4546,'\n',0,1,0,1285124162,'',0),('PBtmpl0000000000000101',1277868922,'3','pbversion0000000000001','approved','Ordered List','Ordered List','ordered_list','3','7','12',NULL,0,1,0,0,0,3771,NULL,0,1,0,1285124163,NULL,0),('PBtmpl0000000000000113',1277868922,'3','pbversion0000000000001','approved','Link','Link','link','3','7','12',NULL,0,1,0,0,0,19099,'',0,1,0,1285124163,'',0),('PBtmpl0000000000000208',1277868922,'3','pbversion0000000000001','approved','Request Tracker','Request Tracker','request-tracker-template','3','7','12',NULL,0,0,0,0,0,6800,'\n\n\n\n\n',0,1,0,1285124164,'',0),('PBtmpl0000000000000209',1277868922,'3','pbversion0000000000001','approved','Request Tracker Thread','Request Tracker Thread','request-tracker-post-template','3','7','12',NULL,0,0,0,0,0,22451,'\n',0,1,0,1285124164,'',0),('PBtmpl0000000000000210',1277868922,'3','pbversion0000000000001','approved','Request Tracker Post Form','Request Tracker Post Form','request-tracker-template2','3','7','12',NULL,0,0,0,0,0,5928,'\n\n\n',0,1,0,1285124164,'',0),('default_post_received1',1277868922,'3','pbversion0000000000001','approved','Default Post Received','Default Post Received','default_post_received','3','7','4',NULL,0,0,0,0,0,541,NULL,0,1,0,1285124166,NULL,0),('default_CS_unsubscribe',1277868922,'3','pbversion0000000000001','approved','Default Collaboration System Unsubscribe','Default Collaboration System Unsubscribe','collaboration_unsubscribe','3','7','4',NULL,0,0,0,0,0,1092,NULL,0,1,0,1285124166,NULL,0),('mfHGkp6t9gdclmzN33OEnw',1277868927,'3','pbversion0000000000001','approved','Default Twitter Choose Username','Default Twitter Choose Username','root/import/auth/twitter/chooseusername/default-twitter-choose-username','3','7','12',NULL,0,1,0,0,0,1074,NULL,0,1,0,1285124167,NULL,0),('CalendarMonth000000001',1279073449,'3','pbversion0000000000001','approved','Default Calendar Month','Default Calendar Month','root/import/calendar-templates/default-calendar-month','3','7','12',NULL,0,0,0,0,0,16187,'\n\n\n\n\n',0,1,0,1285124160,'',0),('8tqyQx-LwYUHIWOlKPjJrA',1279073449,'3','pbversion0000000000001','approved','EMS Event Submission Template','EMS Event Submission Template','root/import/ems/ems-event-submission','3','7','12',NULL,0,1,0,0,0,5296,'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n',0,1,0,1285124159,'',0),('DoVNijm6lMDE0cYrtvEbDQ',1279073449,'3','pbversion0000000000001','approved','EMS Event Submission Main Template','EMS Event Submission Main Template','root/import/ems/ems-event-submission-main','3','7','12',NULL,0,1,0,0,0,8281,'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n',0,1,0,1285124160,'',0),('6uQEULvXFgCYlRWnYzZsuA',1279073450,'3','pbversion0000000000001','approved','Default Inbox Send Message Template','Default Inbox Send Message Template','root/import/account/inbox/default-inbox-send-message-template','3','7','12',NULL,0,1,0,0,0,9065,'\n\n\n\n\n',0,1,0,1285124159,'',0),('ktSvKU8riGimhcsxXwqvPQ',1279073450,'3','pbversion0000000000001','approved','EMS Event Submission Queue','EMS Event Submission Queue','root/import/ems/ems-event-submission-queue','3','7','12',NULL,0,1,0,0,0,7457,'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n',0,1,0,1285124166,'',0),('4Yfz9hqBqM8OYMGuQK8oLw',1271352537,'1','pbversion0000000000001','approved','Get Features','Get Features','yns/features','3','7','4',NULL,0,1,0,0,0,772,NULL,0,1,0,1301974027,NULL,0),('Wl8WZ43g2rK5AYr9o4zY7w',1271445539,'1','pbversion0000000000001','approved','Get Style','Get Style','yns/style','3','7','4',NULL,0,1,0,0,0,700,NULL,0,1,0,1301974027,NULL,0),('LBuiKzg2mWwmOPS9AgV3bg',1271348789,'1','pbversion0000000000001','approved','Get Translated','Get Translated','yns/translated','3','7','4',NULL,0,1,0,0,0,728,NULL,0,1,0,1301974027,NULL,0),('jTNggl7AoVSUc_ZzrvuCmw',1271348789,'1','pbversion0000000000001','approved','Get Promoted','Get Promoted','yns/promotion','3','7','4',NULL,0,1,0,0,0,721,NULL,0,1,0,1301974027,NULL,0),('mTOiwwk3q4k9g5-XykXhPA',1271349647,'1','pbversion0000000000001','approved','Documentation','Documentation','documentation','3','7','3',NULL,0,0,0,0,0,561,NULL,0,1,0,1301974027,NULL,0),('2TqQc4OISddWCZmRY1_m8A',1271357565,'1','pbversion0000000000001','approved','Join Us','Join Us','join_us','3','7','3',NULL,0,0,0,0,0,577,NULL,0,1,0,1301974028,NULL,0),('k2Qj03FrAOXYra8kDJYYXw',1271357513,'1','pbversion0000000000001','approved','IRC (Internet Relay Chat)','IRC','join_us/irc','3','7','3',NULL,0,1,0,0,0,1197,NULL,0,1,0,1301974028,NULL,0),('ksSfkZdsr0uC62NwIk6hFQ',1271356973,'1','pbversion0000000000001','approved','WebGUI Users Conference','WUC','join_us/wuc','3','7','3',NULL,0,1,0,0,0,861,NULL,0,1,0,1301974028,NULL,0),('nWxS5jnA3o3DgPEwBeR7yQ',1271357239,'1','pbversion0000000000001','approved','The Forums','forums','join_us/forums','3','7','3',NULL,0,1,0,0,0,1531,NULL,0,1,0,1301974028,NULL,0),('x3OFY6OJh_qsXkZfPwug4A',1271348790,'1','pbversion0000000000001','approved','Site Map','Site Map','site_map','3','7','3',NULL,0,0,0,0,0,349,NULL,0,1,0,1301974028,NULL,0),('pJd5TLAjfWMVXD6sCRLwUg',1271348790,'1','pbversion0000000000001','approved','Site Map','Site Map','site_map/site_map','3','7','3',NULL,0,1,0,0,0,364,NULL,0,1,0,1301974028,NULL,0),('OhdaFLE7sXOzo_SIP2ZUgA',1271445348,'1','pbversion0000000000001','approved','Welcome','Welcome','home/welcome','3','7','4',NULL,0,1,0,0,0,2190,NULL,0,1,0,1301974028,NULL,0),('IWFxZDyGhQ3-SLZhELa3qw',1277737686,'1','pbversion0000000000001','approved','Benefits','Benefits','home/key-benefits','3','7','4',NULL,0,1,0,0,0,1835,NULL,0,1,0,1301974028,NULL,0),('LdiozcIUciWuvt3Z-na5Ww',1281501162,'3','pbversion0000000000001','approved','Matrix','Matrix','root/import/matrix','3','7','12',NULL,0,0,0,0,0,317,NULL,0,1,0,1281501164,NULL,0),('matrixtmpl000000000002',1281501162,'3','pbversion0000000000001','approved','Matrix Default Compare','Matrix Default Compare','matrix-default-compare-template','3','7','12',NULL,0,0,0,0,0,20669,'\n\n\n\n\n\n\n\n\n\n\n',0,1,0,1285124167,'',0),('matrixtmpl000000000001',1281501162,'3','pbversion0000000000001','approved','Matrix Default View','Matrix Default View','matrix-default-view-template','3','7','12',NULL,0,0,0,0,0,22048,'\n\n\n\n\n\n\n',0,1,0,1285124166,'',0),('matrixtmpl000000000003',1281501163,'3','pbversion0000000000001','approved','Matrix Default Detailed Listing','Matrix Default Detailed Listing','matrix-default-detailed-listing','3','7','12',NULL,0,0,0,0,0,15360,'\n\n\n\n\n\n\n\n\n\n\n',0,1,0,1285124167,'',0),('matrixtmpl000000000004',1281501163,'3','pbversion0000000000001','approved','Matrix Default Edit Listing','Matrix Default Edit Listing','default-matrix-edit-listing-template','3','7','12',NULL,0,0,0,0,0,525,NULL,0,1,0,1285124167,NULL,0),('matrixtmpl000000000005',1281501163,'3','pbversion0000000000001','approved','Matrix Default Search','Matrix Default Search','matrix-search-template','3','7','12',NULL,0,0,0,0,0,10307,'\n\n\n\n\n\n\n\n\n\n',0,1,0,1285124167,'',0),('hkj6WeChxFyqfP85UlRP8w',1281501163,'3','pbversion0000000000001','approved','matrix.css','matrix.css','new-matrix/matrix.css','3','7','12',NULL,0,1,0,0,0,16408,NULL,0,1,0,1285124169,NULL,0),('kJf77eCr9GAMiEzWrzsBTA',1281501163,'3','pbversion0000000000001','approved','matrix-ie.css','matrix-ie.css','new-matrix/matrix-ie.css','3','7','12',NULL,0,1,0,0,0,764,NULL,0,1,0,1285124169,NULL,0),('4LQT4-bGW4FkiEQLSY5gvQ',1281501163,'3','pbversion0000000000001','approved','show-hide.js','show-hide.js','new-matrix/show-hide.js','3','7','12',NULL,0,1,0,0,0,933,NULL,0,1,0,1285124168,NULL,0),('alraubvBu-YJJ614jAHD5w',1281501163,'3','pbversion0000000000001','approved','matrix-nav-tmpl','matrix-nav-tmpl','new-matrix/matrix-nav-tmpl','3','7','12',NULL,0,1,0,0,0,711,NULL,0,1,0,1285124165,NULL,0),('Vch1Ww7G_JpBhOhXX07RDg',1281501163,'3','pbversion0000000000001','approved','matrx-nav','matrix-nav','new-matrix/matrix-nav','3','7','12',NULL,0,1,0,0,0,375,NULL,0,1,0,1281501164,NULL,0),('wrq7hMxb1ewQqZ46xmd8Gg',1281501163,'3','pbversion0000000000001','approved','equal-cols.js','equal-cols.js','matrix/equal-cols.js','3','7','12',NULL,0,1,0,0,0,796,NULL,0,1,0,1285124169,NULL,0),('matrixtmpl000000000007',1281501163,'3','pbversion0000000000001','approved','Matrix Default Screenshots Config','Matrix Default Screenshots Config','matrix-default-screenshots-config','3','7','12',NULL,0,0,0,0,0,4099,NULL,0,1,0,1285124167,NULL,0),('matrixtmpl000000000006',1281501163,'3','pbversion0000000000001','approved','Matrix Default Screenshots','Matrix Default Screenshots','matrix-default-screenshots','3','7','12',NULL,0,0,0,0,0,2952,NULL,0,1,0,1285124167,NULL,0),('N716tpSna0iIQTKxS4gTWA',1281501163,'3','pbversion0000000000001','approved','Default Account Layout','Default Account Layout','root/import/account/default-account-layout2','3','7','12',NULL,0,1,0,0,0,1923,'\r\n',0,1,0,1285124161,'',0),('AssetReportFolder00001',1281501163,'3','pbversion0000000000001','approved','Asset Report','Asset Report','asset_report','3','3','4',NULL,0,0,0,0,0,322,NULL,0,1,0,1281501164,NULL,0),('N7uMnnicbyTEulcuRi1sSg',1283900195,'3','pbversion0000000000001','approved','PDFs','PDFs','media/pdfs','3','7','4',NULL,0,1,0,0,0,304,NULL,0,1,0,1283921709,NULL,0),('bCGr7FRtZt-XYlBVUEJBjw',1278013724,'3','pbversion0000000000001','approved','Getting_Started_doc.pdf','Getting_Started_doc.pdf','media/pdfs/getting_started_doc.pdf','3','7','4',NULL,0,1,0,0,0,1188407,NULL,0,1,0,1283921709,NULL,0),('_XfvgNH__bY1ykMiKYSobQ',1281501163,'3','pbversion0000000000001','approved','account.css','account.css','root/import/account/account.css','3','7','12',NULL,0,1,0,0,0,45634,NULL,0,1,0,1285124169,NULL,0),('limMkk80fMB3fqNZVf162w',1281501163,'3','pbversion0000000000001','approved','Default Asset Subscription','Default Asset Subscription','root/import/default-asset-subscription','3','7','3',NULL,0,1,0,0,0,550,NULL,0,1,0,1285124166,NULL,0),('l0guT3vTR3B8cL6vtP-g3A',1285124369,'1','pbversion0000000000001','approved','Contribute','contribute','contribute','3','7','3',NULL,0,1,0,0,0,3239,NULL,1,1,0,1285124369,NULL,0),('sJtcUCfn0CVbKdb4QM61Yw',1283921584,'3','pbversion0000000000001','approved','Asset Report Default Template','Asset Report Default Template','asset-report/asset-report-default-template','3','3','4',NULL,0,1,0,0,0,2218,NULL,0,1,0,1285124167,NULL,0),('A16v-YjWAShXWvSACsraeg',1285124154,'3','pbversion0000000000001','approved','StoryTopic','StoryTopic','root/import/storymanager/storytopic','3','7','4',NULL,0,0,0,0,0,2870,'',0,1,0,1285124171,'',0),('gI_TxK-5S4DNuv42wpImmw',1285124155,'3','pbversion0000000000001','approved','Gallery Templates','Gallery Templates','root/import/gallery-templates','3','7','3',NULL,0,0,0,0,0,362,NULL,0,1,0,1285124169,NULL,0),('jME5BEDYVDlBZ8jIQA9-jQ',1285124155,'3','pbversion0000000000001','approved','Default Gallery Search','Default Gallery Search','root/import/gallery-templates/default-gallery-search','3','7','3',NULL,0,1,0,0,0,11460,'\r\n \r\n',0,1,0,1285124169,'',0),('azCqD0IjdQSlM3ar29k5Sg',1285124155,'3','pbversion0000000000001','approved','Default Gallery List Albums View','Default Gallery List Albums View','root/import/gallery-templates/default-gallery-list-albums-view','3','7','3',NULL,0,1,0,0,0,5927,' \r\n \r\n ',0,1,0,1285124169,'',0),('05FpjceLYhq4csF1Kww1KQ',1285124155,'3','pbversion0000000000001','approved','Default Gallery View Album','Default Gallery View Album','root/import/gallery-templates/default-gallery-view-album','3','7','3',NULL,0,1,0,0,0,7861,' \n \n ',0,1,0,1285124169,'',0),('q5O62aH4pjUXsrQR3Pq4lw',1285124155,'3','pbversion0000000000001','approved','Default Gallery View Album Thumbnails','Default Gallery View Album Thumbnails','root/import/gallery-templates/default-gallery-view-album-thumbnails','3','7','3',NULL,0,1,0,0,0,7651,'\r\n\r\n\r\n\r\n\r\n',0,1,0,1285124169,'',0),('KAMdiUdJykjN02CPHpyZOw',1285124155,'3','pbversion0000000000001','approved','Default Gallery View Album Slideshow','Default Gallery View Album Slideshow','root/import/gallery-templates/default-gallery-view-album-slideshow','3','7','3',NULL,0,1,0,0,0,7941,'\r\n \r\n\r\n\r\n \r\n \r\n \r\n\r\n\r\n',0,1,0,1285124169,'',0),('OkphOEdaSGTXnFGhK4GT5A',1285124155,'3','pbversion0000000000001','approved','Default Gallery List Files For User','Default Gallery List Files For User','root/import/gallery-templates/default-gallery-list-files-for-user','3','7','3',NULL,0,1,0,0,0,7790,'\n \n',0,1,0,1285124169,'',0),('TEId5V-jEvUULsZA0wuRuA',1285124155,'3','pbversion0000000000001','approved','Default Gallery View Photo','Default Gallery View Photo','root/import/gallery-templates/default-gallery-view-photo','3','7','3',NULL,0,1,0,0,0,15566,'\n\n\n\n',0,1,0,1285124169,'',0),('6X-7Twabn5KKO_AbgK3PEw',1285124155,'3','pbversion0000000000001','approved','Default Gallery Edit Album','Default Gallery Edit Album','root/import/gallery-templates/default-gallery-edit-album','3','7','3',NULL,0,1,0,0,0,8244,'\n\n\n\n\n\n\n\n\n',0,1,0,1285124169,'',0),('7JCTAiu1U_bT9ldr655Blw',1285124155,'3','pbversion0000000000001','approved','Default Gallery Edit Photo','Default Gallery Edit Photo','root/import/gallery-templates/default-gallery-edit-photo','3','7','3',NULL,0,1,0,0,0,7438,'\n\n\n\n',0,1,0,1285124169,'',0),('0X4Q3tBWUb_thsVbsYz9xQ',1285124155,'3','pbversion0000000000001','approved','Default Gallery Add Archive','Default Gallery Add Archive','root/import/gallery-templates/default-gallery-add-archive','3','7','3',NULL,0,1,0,0,0,3773,' \r\n\r\n ',0,1,0,1285124169,'',0),('m3IbBavqzuKDd2PGGhKPlA',1285124155,'3','pbversion0000000000001','approved','Default Gallery Make Shortcut','Default Gallery Make Shortcut','root/import/gallery-templates/default-gallery-make-shortcut','3','7','3',NULL,0,1,0,0,0,5111,'\n\n\n\n',0,1,0,1285124169,'',0),('UTNFeV7B_aSCRmmaFCq4Vw',1285124155,'3','pbversion0000000000001','approved','Default Gallery Delete Album','Default Gallery Delete Album','root/import/gallery-templates/default-gallery-delete-album','3','7','3',NULL,0,1,0,0,0,4712,'\n \n\n\n',0,1,0,1285124169,'',0),('zcX-wIUct0S_np14xxOA-A',1285124155,'3','pbversion0000000000001','approved','Default Gallery Delete File','Default Gallery Delete File','root/import/gallery-templates/default-gallery-delete-file','3','7','3',NULL,0,1,0,0,0,4728,'\n \n\n\n',0,1,0,1285124169,'',0),('MBZK_LPVzqhb4TV4mMRTJg',1285124155,'3','pbversion0000000000001','approved','admin_ie7.css','admin_ie7.css','root/import/gallery-templates/admin_ie7.css','3','7','3',NULL,0,1,0,0,0,380,NULL,0,1,0,1285124169,NULL,0),('_hELmIJfgbAyXFNqPyApxQ',1285124155,'3','pbversion0000000000001','approved','admin.css','admin.css','root/import/gallery-templates/admin.css','3','7','3',NULL,0,1,0,0,0,3957,NULL,0,1,0,1285124169,NULL,0),('kaPRSaf8UKiskiGEgJgLAw',1285124155,'3','pbversion0000000000001','approved','images','images','root/import/gallery-templates/images','3','7','3',NULL,0,0,0,0,0,340,NULL,0,1,0,1285124169,NULL,0),('bANo8aiAPA7aY_oQZKxIWw',1285124155,'3','pbversion0000000000001','approved','rss.gif','rss.gif','root/import/gallery-templates/images/rss.gif','3','7','3',NULL,0,1,0,0,0,1389,NULL,0,1,0,1285124169,NULL,0),('2ci_v2d4x4uvyjTRlC49OA',1285124156,'3','pbversion0000000000001','approved','moveDown.gif','moveDown.gif','root/import/gallery-templates/images/movedown.gif','3','7','3',NULL,0,1,0,0,0,784,NULL,0,1,0,1285124169,NULL,0),('O-EsSzKgAk1KolFT-x_KsA',1285124156,'3','pbversion0000000000001','approved','moveUp.gif','moveUp.gif','root/import/gallery-templates/images/moveup.gif','3','7','3',NULL,0,1,0,0,0,772,NULL,0,1,0,1285124170,NULL,0),('fdd8tGExyVwHyrB8RBbKXg',1285124156,'3','pbversion0000000000001','approved','next.gif','next.gif','root/import/gallery-templates/images/next.gif','3','7','3',NULL,0,1,0,0,0,1676,NULL,0,1,0,1285124170,NULL,0),('BpisgHl4ZDcSECJp6oib1w',1285124156,'3','pbversion0000000000001','approved','play.gif','play.gif','root/import/gallery-templates/images/play.gif','3','7','3',NULL,0,1,0,0,0,2113,NULL,0,1,0,1285124170,NULL,0),('zshreRgPAXtnF0DtVbQ1Yg',1285124156,'3','pbversion0000000000001','approved','previous.gif','previous.gif','root/import/gallery-templates/images/previous.gif','3','7','3',NULL,0,1,0,0,0,1682,NULL,0,1,0,1285124170,NULL,0),('POVcY79vIqAHR8OfGt36aw',1285124156,'3','pbversion0000000000001','approved','pagination_button.jpg','pagination_button.jpg','root/import/gallery-templates/images/pagination_button.jpg','3','7','12',NULL,0,1,0,0,0,1050,NULL,0,0,0,1285124170,NULL,0),('hIB-z34r8Xl-vYVYCkKr-w',1285124156,'3','pbversion0000000000001','approved','bar-btn-r.jpg','bar-btn-r.jpg','root/import/gallery-templates/images/bar-btn-r.jpg','3','7','12',NULL,0,1,0,0,0,830,NULL,0,0,0,1285124170,NULL,0),('-mPUoFlYcjqjPUPRLAlxNQ',1285124156,'3','pbversion0000000000001','approved','search-field-r.jpg','search-field-r.jpg','root/import/gallery-templates/images/search-field-r.jpg','3','7','12',NULL,0,1,0,0,0,848,NULL,0,0,0,1285124170,NULL,0),('MDpUOR-N8KMyt1J7Hh_h4w',1285124156,'3','pbversion0000000000001','approved','bar-btn.jpg','bar-btn.jpg','root/import/gallery-templates/images/bar-btn.jpg','3','7','12',NULL,0,1,0,0,0,708,NULL,0,0,0,1285124170,NULL,0),('YfXKByTwDZVituMc4h13Dg',1285124156,'3','pbversion0000000000001','approved','pagination_bg.jpg','pagination_bg.jpg','root/import/gallery-templates/images/pagination_bg.jpg','3','7','12',NULL,0,1,0,0,0,1131,NULL,0,0,0,1285124170,NULL,0),('esko_HSU0Gh-uJZ1h3xRmQ',1285124156,'3','pbversion0000000000001','approved','search-field-l.jpg','search-field-l.jpg','root/import/gallery-templates/images/search-field-l.jpg','3','7','12',NULL,0,1,0,0,0,874,NULL,0,0,0,1285124170,NULL,0),('oSqpGswzpBG_ErdfYwIO8A',1285124156,'3','pbversion0000000000001','approved','top_bg.jpg','top_bg.jpg','root/import/gallery-templates/images/top_bg.jpg','3','7','12',NULL,0,1,0,0,0,692,NULL,0,0,0,1285124170,NULL,0),('MXJklShZvLLB_DSnZQmXrQ',1285124156,'3','pbversion0000000000001','approved','title_bg.jpg','title_bg.jpg','root/import/gallery-templates/images/title_bg.jpg','3','7','12',NULL,0,1,0,0,0,1658,NULL,0,0,0,1285124170,NULL,0),('BthxD5oJ0idmsyI3ioA2FA',1285124156,'3','pbversion0000000000001','approved','bar-btn-l.jpg','bar-btn-l.jpg','root/import/gallery-templates/images/bar-btn-l.jpg','3','7','12',NULL,0,1,0,0,0,845,NULL,0,0,0,1285124170,NULL,0),('aZ-1HYQamkRHYXvzAra8WQ',1285124156,'3','pbversion0000000000001','approved','search-field.jpg','search-field.jpg','root/import/gallery-templates/images/search-field.jpg','3','7','12',NULL,0,1,0,0,0,750,NULL,0,0,0,1285124170,NULL,0),('eRkb94OYcS5AdcrrerOP5Q',1285124157,'3','pbversion0000000000001','approved','rss.gif','rss.gif','root/import/gallery-templates/images/rss2.gif','3','7','12',NULL,0,1,0,0,0,1391,NULL,0,0,0,1285124170,NULL,0),('TbnkjAJQEASORXIpYqDkcA',1285124157,'3','pbversion0000000000001','approved','blank-image.jpg','blank-image.jpg','root/import/gallery-templates/images/blank-image.jpg','3','7','12',NULL,0,1,0,0,0,3084,NULL,0,0,0,1285124170,NULL,0),('er-3faBjY-hhlDcc5aKqdQ',1285124157,'3','pbversion0000000000001','approved','top_bg.jpg','top_bg.jpg','root/import/gallery-templates/images/top_bg2.jpg','3','7','12',NULL,0,1,0,0,0,693,NULL,0,0,0,1285124170,NULL,0),('8bFsu2FJUqHRUiHcozcVFw',1285124157,'3','pbversion0000000000001','approved','sub-btn-l.jpg','sub-btn-l.jpg','root/import/gallery-templates/images/sub-btn-l.jpg','3','7','12',NULL,0,1,0,0,0,844,NULL,0,0,0,1285124170,NULL,0),('34Aayx5eA320D8VfhdfDBw',1285124157,'3','pbversion0000000000001','approved','sub-btn-r.jpg','sub-btn-r.jpg','root/import/gallery-templates/images/sub-btn-r.jpg','3','7','12',NULL,0,1,0,0,0,824,NULL,0,0,0,1285124170,NULL,0),('TlhKOVmWblZOsAdqmhEpeg',1285124157,'3','pbversion0000000000001','approved','sub-btn.jpg','sub-btn.jpg','root/import/gallery-templates/images/sub-btn.jpg','3','7','12',NULL,0,1,0,0,0,702,NULL,0,0,0,1285124170,NULL,0),('Nx0ypjO3cN6QdZUBUEE0lA',1285124157,'3','pbversion0000000000001','approved','pic-title-bg.jpg','pic-title-bg.jpg','root/import/gallery-templates/images/pic-title-bg.jpg','3','7','12',NULL,0,1,0,0,0,865,NULL,0,0,0,1285124170,NULL,0),('CmFZLN7iPS7XXvUEsxKPKA',1285124157,'3','pbversion0000000000001','approved','row-2.jpg','row-2.jpg','root/import/gallery-templates/images/row-2.jpg','3','7','12',NULL,0,1,0,0,0,806,NULL,0,0,0,1285124170,NULL,0),('v_XBgwwZqgW1D5s4y05qfg',1285124157,'3','pbversion0000000000001','approved','addtl-info.gif','addtl-info.gif','root/import/gallery-templates/images/addtl-info.gif','3','7','12',NULL,0,1,0,0,0,914,NULL,0,0,0,1285124170,NULL,0),('4TdAkKoQbSCvI7QWcW889A',1285124157,'3','pbversion0000000000001','approved','row-1.jpg','row-1.jpg','root/import/gallery-templates/images/row-1.jpg','3','7','12',NULL,0,1,0,0,0,791,NULL,0,0,0,1285124170,NULL,0),('SAgK6eDPCG1cgkJ59WapHQ',1285124157,'3','pbversion0000000000001','approved','prev-btn.gif','prev-btn.gif','root/import/gallery-templates/images/prev-btn.gif','3','7','12',NULL,0,1,0,0,0,2015,NULL,0,0,0,1285124170,NULL,0),('XJYLuvGy9ubF7JNKyINtpA',1285124157,'3','pbversion0000000000001','approved','play-btn.gif','play-btn.gif','root/import/gallery-templates/images/play-btn.gif','3','7','12',NULL,0,1,0,0,0,2543,NULL,0,0,0,1285124170,NULL,0),('RWj7hyv2SpZuXxwj1Wocug',1285124157,'3','pbversion0000000000001','approved','next-btn.gif','next-btn.gif','root/import/gallery-templates/images/next-btn.gif','3','7','12',NULL,0,1,0,0,0,2045,NULL,0,0,0,1285124170,NULL,0),('aq8QElnlm3YufAoxRz9Pcg',1285124158,'3','pbversion0000000000001','approved','data-bg.jpg','data-bg.jpg','root/import/gallery-templates/images/data-bg.jpg','3','7','12',NULL,0,1,0,0,0,821,NULL,0,0,0,1285124170,NULL,0),('i6-BofrJJYozovlzFBByXg',1285124158,'3','pbversion0000000000001','approved','first-photo-button.png','first-photo-button.png','root/import/gallery-templates/images/first-photo-button.png','3','7','3',NULL,0,1,0,0,0,1069,NULL,0,1,0,1285124170,NULL,0),('fU_OZCmtdFNJ8a6bMve8ng',1285124158,'3','pbversion0000000000001','approved','previous-photo-button.png','previous-photo-button.png','root/import/gallery-templates/images/previous-photo-button.png','3','7','3',NULL,0,1,0,0,0,943,NULL,0,1,0,1285124170,NULL,0),('YXCtusAxb4vzZ5sTnUA5DA',1285124158,'3','pbversion0000000000001','approved','next-photo-button.png','next-photo-button.png','root/import/gallery-templates/images/next-photo-button.png','3','7','3',NULL,0,1,0,0,0,955,NULL,0,1,0,1285124170,NULL,0),('k_xuE82wwp8gFVl9aaaG8g',1285124158,'3','pbversion0000000000001','approved','last-photo-button.png','last-photo-button.png','root/import/gallery-templates/images/last-photo-button.png','3','7','3',NULL,0,1,0,0,0,1072,NULL,0,1,0,1285124170,NULL,0),('NPM_WItpM5IzLWBhWjYfCA',1285124158,'3','pbversion0000000000001','approved','photo-navigation-spacer.png','photo-navigation-spacer.png','root/import/gallery-templates/images/photo-navigation-spacer.png','3','7','3',NULL,0,1,0,0,0,569,NULL,0,1,0,1285124170,NULL,0),('mM3bjP_iG9sv5nQb4S17tQ',1285124158,'3','pbversion0000000000001','approved','Default Gallery View Album RSS','Default Gallery View Album RSS','root/import/gallery-templates/default-gallery-album-rss','3','7','3',NULL,0,1,0,0,0,1259,NULL,0,1,0,1285124170,NULL,0),('ilu5BrM-VGaOsec9Lm7M6Q',1285124158,'3','pbversion0000000000001','approved','Default Gallery List Albums RSS','Default Gallery List Albums RSS','root/import/gallery-templates/default-gallery-list-albums-rss','3','7','3',NULL,0,1,0,0,0,1268,NULL,0,1,0,1285124170,NULL,0),('-ANLpoTEP-n4POAdRxCzRw',1285124158,'3','pbversion0000000000001','approved','Default Gallery List Files For User RSS','Default Gallery List Files For User RSS','root/import/gallery-templates/default-gallery-list-files-for-user-rss','3','7','3',NULL,0,1,0,0,0,1300,NULL,0,1,0,1285124170,NULL,0),('OxJWQgnGsgyGohP2L3zJPQ',1285124158,'3','pbversion0000000000001','approved','Default Gallery Edit Comment','Default Gallery Edit Comment','root/import/gallery-templates/default-gallery-edit-comment','3','7','3',NULL,0,1,0,0,0,5493,'',0,1,0,1285124170,'',0),('7fE8md51vTCcuJFOvxNaGA',1285124158,'3','pbversion0000000000001','approved','thumbnails.js','thumbnails.js','root/import/gallery-templates/thumbnails.js','3','7','3',NULL,0,1,0,0,0,5848,NULL,0,1,0,1285124170,NULL,0),('1oGhfj00KkCzP1ez01AfKA',1285124158,'3','pbversion0000000000001','approved','slideshow.js','slideshow.js','root/import/gallery-templates/slideshow.js','3','7','3',NULL,0,1,0,0,0,11975,NULL,0,1,0,1285124170,NULL,0),('3qiVYhNTXMVC5hfsumVHgg',1285124158,'3','pbversion0000000000001','approved','browserdetect.js','browserdetect.js','root/import/gallery-templates/browserdetect.js','3','7','3',NULL,0,1,0,0,0,4375,NULL,0,1,0,1285124170,NULL,0),('THQhn1C-ooj-TLlEP7aIJQ',1285124158,'3','pbversion0000000000001','approved','gallery-ie.css','gallery-ie.css','root/import/gallery-templates/gallery-ie.css','3','7','3',NULL,0,1,0,0,0,626,NULL,0,1,0,1285124170,NULL,0),('qxd0WpRGqDPWP8WBicYvEA',1285124158,'3','pbversion0000000000001','approved','dragdropsorting.js','dragdropsorting.js','root/import/gallery-templates/dragdropsorting.js','3','7','12',NULL,0,1,0,0,0,9518,NULL,0,1,0,1285124171,NULL,0),('RrV4aAPnn4dM0ZcU3OXnlw',1286336607,'3','pbversion0000000000001','approved','style','style','root/import/style','3','7','12',NULL,0,0,0,0,0,314,NULL,0,1,0,1286336607,NULL,0),('PBtmpl0000000000000111',1286336607,'3','pbversion0000000000001','approved','Make Page Printable','Make Page Printable','make_page_printable','3','7','12',NULL,0,1,0,0,0,1791,NULL,0,1,0,1286336607,NULL,0),('A3T7jpTBKLYws1h5mJ0t8A',1286336607,'3','pbversion0000000000001','approved','makepageprintable.css','makepageprintable.css','makepageprintable.css','3','7','12',NULL,0,1,0,0,0,6259,NULL,0,1,0,1286336607,NULL,0),('diZvW4bSgZWwyyGP3qXi1g',1285610019,'1','pbversion0000000000001','approved','Commercial Documentation','Commercial Documentation','documentation/commercial-documentation','3','7','3',NULL,0,1,0,0,0,1751,NULL,0,1,0,1301974028,NULL,0),('68sKwDgf9cGH58-NZcU4lg',1286336676,'3','pbversion0000000000001','approved','Welcome','Home','home','3','7','3',NULL,0,0,0,0,0,357,NULL,0,1,0,1286336676,NULL,0),('Am1J-meNBmhqFfEIWy6Gag',1287545014,'3','pbversion0000000000001','approved','crystalX_Navigation','crystalX_Navigation','crystalx/crystalx_navigation','3','7','3',NULL,0,1,0,0,0,406,NULL,0,1,0,1287545016,NULL,0),('1z9J1O08n_7gVVlBwSRBJQ',1287545014,'3','pbversion0000000000001','approved','Auth','Auth','root/import/auth','3','7','12',NULL,0,1,0,0,0,311,NULL,0,1,0,1287545015,NULL,0),('xSmREZO3GNzK3M5PaueOOQ',1287545014,'3','pbversion0000000000001','approved','LDAP/Account','LDAP/Account','root/import/auth/ldap/account','3','7','12',NULL,0,0,0,0,0,347,NULL,0,1,0,1287545015,NULL,0),('PBtmpl0000000000000004',1287545014,'3','pbversion0000000000001','approved','Default LDAP Account Display Template','Default LDAP Account Display Template','default_ldap_account_display_template','3','7','12',NULL,0,1,0,0,0,1372,NULL,0,1,0,1287545015,NULL,0),('0bx-xoL8TSXXubFuqKAoVQ',1287545014,'3','pbversion0000000000001','approved','LDAP/Create','LDAP/Create','root/import/auth/ldap/create','3','7','12',NULL,0,0,0,0,0,344,NULL,0,1,0,1287545015,NULL,0),('PBtmpl0000000000000005',1287545014,'3','pbversion0000000000001','approved','Default LDAP Anonymous Registration Template','Default LDAP Anonymous Registration Template','default_ldap_anonymous_registration_template','3','7','12',NULL,0,1,0,0,0,5903,'\n\n',0,1,0,1287545015,'',0),('taX2UYkFF21ALpFZY2rhMw',1287545014,'3','pbversion0000000000001','approved','LDAP/Login','LDAP/Login','root/import/auth/ldap/login','3','7','12',NULL,0,0,0,0,0,341,NULL,0,1,0,1287545015,NULL,0),('PBtmpl0000000000000006',1287545014,'3','pbversion0000000000001','approved','Default LDAP Login Template','Default LDAP Login Template','default_ldap_login_template','3','7','12',NULL,0,1,0,0,0,1974,NULL,0,1,0,1287545015,NULL,0),('K0q_N885Httqev1VCqUWxg',1287545014,'3','pbversion0000000000001','approved','WebGUI/Account','WebGUI/Account','root/import/auth/webgui/account','3','7','12',NULL,0,0,0,0,0,353,NULL,0,1,0,1287545015,NULL,0),('PBtmpl0000000000000010',1287545014,'3','pbversion0000000000001','approved','Default WebGUI Account Display Template','Default WebGUI Account Display Template','default_webgui_account_display_template','3','7','12',NULL,0,1,0,0,0,2780,NULL,0,1,0,1287545015,NULL,0),('fq1ZkYhH24R5tb96kuT10Q',1287545014,'3','pbversion0000000000001','approved','WebGUI/Create','WebGUI/Create','root/import/auth/webgui/create','3','7','12',NULL,0,0,0,0,0,350,NULL,0,1,0,1287545015,NULL,0),('PBtmpl0000000000000011',1287545014,'3','pbversion0000000000001','approved','Default WebGUI Anonymous Registration Template','Default WebGUI Anonymous Registration Template','default_webgui_anonymous_registration_template','3','7','12',NULL,0,1,0,0,0,6676,'\n\n',0,1,0,1287545015,'',0),('PBtmpl0000000000000015',1287545014,'3','pbversion0000000000001','approved','Default WebGUI Welcome Message Template','Default WebGUI Welcome Message Template','root/import/auth/webgui/create/default-webgui-welcome-message-template','3','7','12',NULL,0,1,0,0,0,698,NULL,0,1,0,1287545015,NULL,0),('PBtmpl0000000000000016',1287545014,'3','pbversion0000000000001','approved','Default WebGUI Account Activation Template','Default WebGUI Account Activation Template','root/import/auth/webgui/create/default-webgui-account-activation-template','3','7','3',NULL,0,1,0,0,0,602,NULL,0,1,0,1287545015,NULL,0),('oHk7fAFhEEkB7dHzi0QOQA',1287545014,'3','pbversion0000000000001','approved','WebGUI/Expired','WebGUI/Expired','root/import/auth/webgui/expired','3','7','12',NULL,0,0,0,0,0,353,NULL,0,1,0,1287545016,NULL,0),('PBtmpl0000000000000012',1287545014,'3','pbversion0000000000001','approved','Default WebGUI Password Reset Template','Default WebGUI Password Reset Template','default_webgui_password_reset_template','3','7','12',NULL,0,1,0,0,0,2095,NULL,0,1,0,1287545016,NULL,0),('9M-lrlPQWeeNWfvnDnK_Xg',1287545014,'3','pbversion0000000000001','approved','WebGUI/Login','WebGUI/Login','root/import/auth/webgui/login','3','7','12',NULL,0,0,0,0,0,347,NULL,0,1,0,1287545016,NULL,0),('PBtmpl0000000000000013',1287545014,'3','pbversion0000000000001','approved','Default WebGUI Login Template','Default WebGUI Login Template','default_webgui_login_template','3','7','12',NULL,0,1,0,0,0,2262,NULL,0,1,0,1287545016,NULL,0),('_gBYAdTcbkiyamnqi2Xskg',1287545014,'3','pbversion0000000000001','approved','WebGUI/Recovery','WebGUI/Recovery','root/import/auth/webgui/recovery','3','7','12',NULL,0,0,0,0,0,356,NULL,0,1,0,1287545016,NULL,0),('PBtmpl0000000000000014',1287545015,'3','pbversion0000000000001','approved','Default WebGUI Password Recovery Template','Default WebGUI Password Recovery Template','default_webgui_password_recovery_template','3','7','12',NULL,0,1,0,0,0,3073,NULL,0,1,0,1287545016,NULL,0),('0iMMbGN3BevuCBHjjLiQNA',1287545015,'3','pbversion0000000000001','approved','WebGUI/Deactivate','WebGUI/Deactivate','root/import/auth/webgui/deactivate','3','7','12',NULL,0,1,0,0,0,361,NULL,0,1,0,1287545016,NULL,0),('zaHUYsE_PgKk8hnVd8ffEQ',1287545015,'3','pbversion0000000000001','approved','WebGUI Deactivate Account Template','WebGUI Deactivate Account Template','default_webgui_deactivate_account_template','3','7','12',NULL,0,1,0,0,0,859,NULL,0,1,0,1287545016,NULL,0),('6A4yIjWwJfIE0Ep-I0jutg',1287545015,'3','pbversion0000000000001','approved','LDAP/Deactivate','LDAP/Deactivate','root/import/auth/ldap/deactivate','3','7','12',NULL,0,1,0,0,0,355,NULL,0,1,0,1287545016,NULL,0),('_P4PMiraGsLTfOjK4fYQPQ',1287545015,'3','pbversion0000000000001','approved','LDAP Deactivate Account Template','LDAP Deactivate Account Template','default_ldap_deactivate_account_template','3','7','12',NULL,0,1,0,0,0,851,NULL,0,1,0,1287545016,NULL,0),('sK_0zVw4kwdJ1sqREIsSzA',1287545015,'3','pbversion0000000000001','approved','WebGUI Auth Password Recovery Email Template','Password Recovery Email','root/import/auth/webgui/recoveryemail','3','7','4',NULL,0,0,0,0,0,769,NULL,0,1,0,1287545016,NULL,0),('qsG6B24a0SC5KrhQjmdZBw',1287545015,'3','pbversion0000000000001','approved','survey.css','survey.css','survey.css','3','7','12',NULL,0,1,0,0,0,5092,NULL,0,1,0,1287545016,NULL,0),('kwTL1SWCk0GlpiJ5zAAEPQ',1287545015,'3','pbversion0000000000001','approved','surveyedit.css','surveyedit.css','root/import/survey/surveyedit.css','3','7','12',NULL,0,1,0,0,0,4986,NULL,0,1,0,1287545016,NULL,0),('_cD6DLM_Fs5IlrLeWUjrjg',1287545015,'3','pbversion0000000000001','approved','Workflow Activity Templates','Workflow Activity Templates','root/import/workflow-activity-templates','3','7','12',NULL,0,1,0,0,0,434,NULL,0,1,0,1287545016,NULL,0),('lYhMheuuLROK_iNjaQuPKg',1287545015,'3','pbversion0000000000001','approved','Notify About Version Tag','Notify About Version Tag','root/import/workflow-activity-templates/notify-about-version-tag','3','7','12',NULL,0,1,0,0,0,502,NULL,0,1,0,1287545016,NULL,0),('PBtmpl0000000000000085',1288747840,'3','pbversion0000000000001','approved','Default Email','Default Email','default_email','3','7','12',NULL,0,1,0,0,0,2031,NULL,0,1,0,1288747841,NULL,0),('2rC4ErZ3c77OJzJm7O5s3w',1288747841,'3','pbversion0000000000001','approved','EMS Badge Listing (default)','EMS Badge Listing (default)','root/import/ems/ems-badge-listing-default','3','7','12',NULL,0,1,0,0,0,11613,'\n\n\n\n\n\n\n\n\n\n\n\n\n \n',0,1,0,1288747841,'',0),('lG2exkH9FeYvn4pA63idNg',1289967962,'3','pbversion0000000000001','approved','Friend Manager Edit Friends','Friend Manager Edit Friends','root/import/account/friendmanager/edit','3','7','4',NULL,0,0,0,0,0,2587,'',0,1,0,1289967964,'',0),('PBtmpl0000000000000021',1294721945,'3','pbversion0000000000001','approved','Data List','Data List','data_list','3','7','12',NULL,0,1,0,0,0,4917,'',0,1,0,1294721945,'',0),('CalendarEvent000000001',1295931508,'3','pbversion0000000000001','approved','Default Calendar Event','Default Calendar Event','root/import/calendar-templates/default-calendar-event','3','7','12',NULL,0,0,0,0,0,11625,' ',0,1,0,1295931508,'',0),('64tqS80D53Z0JoAs2cX2VQ',1295931508,'3','pbversion0000000000001','approved','FriendManager View Template','FriendManager View Template','root/import/account/friendmanager/view','3','7','4',NULL,0,0,0,0,0,4485,'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n',0,1,0,1295931508,'',0),('kj3b-X3i6zRKnhLb4ZiCLw',1295931508,'3','pbversion0000000000001','approved','Default Calendar List View','Default Calendar List View','root/import/calendar-templates/default-calendar-list-view','3','7','3',NULL,0,1,0,0,0,6560,'\n',0,1,0,1295931508,'',0),('PBtmpl0000000000000077',1298351263,'3','pbversion0000000000001','approved','Job Listing','Job Listing','job_listing','3','7','12',NULL,0,1,0,0,0,4876,'\n\n\n',0,1,0,1298351263,'',0),('ThingyTmpl000000000002',1299559129,'3','pbversion0000000000001','approved','Default Thingy View Thing','Default Thingy View Thing','templates/thingy-default-view-thing','3','7','12',NULL,0,0,0,0,0,4833,'\n',0,1,0,1299559129,'',0),('PBtmpl0000000000000088',1300763663,'3','pbversion0000000000001','approved','Image','Image','image','3','7','12',NULL,0,1,0,0,0,850,NULL,0,1,0,1300763664,NULL,0),('S1A9iAwKcQQ6P20uTqw-Ew',1300763664,'3','pbversion0000000000001','approved','Dashboard','Dashboard','root/import/dashboard','3','7','12',NULL,0,0,0,0,0,326,NULL,0,1,0,1300763664,NULL,0),('DashboardViewTmpl00001',1300763664,'3','pbversion0000000000001','approved','Dashboard Default View','Dashboard Default View','dashboard-default-view-template','3','7','12',NULL,0,0,0,0,0,20462,'\n\n\n\n\n\n',0,1,0,1300763664,'',0),('CQp-RFA2pMh5lFSggPPPYg',1301973995,'3','pbversion0000000000001','approved','[Style] Underground','[Style] Underground','style-underground','3','7','3',NULL,0,0,0,0,0,452,NULL,0,1,0,1301974000,NULL,0),('_Mi_NTd3x8UB96LWezWHnw',1301973995,'3','pbversion0000000000001','approved','Images','Images','style-underground/images','3','7','3',NULL,0,0,0,0,0,328,NULL,0,1,0,1301974000,NULL,0),('A_5LVQQWR73QZR8FFbny_w',1301973995,'3','pbversion0000000000001','approved','bg.gif','bg.gif','style-underground/images/bg.gif','3','7','3',NULL,0,1,0,0,0,612,NULL,0,0,0,1301974000,NULL,0),('wywIfa_VuTsq0c5Ed-W-MA',1301973995,'3','pbversion0000000000001','approved','bullet.gif','bullet.gif','style-underground/images/bullet.gif','3','7','3',NULL,0,1,0,0,0,686,NULL,0,0,0,1301974000,NULL,0),('xmykMFjri1O2NrYHbeToVQ',1301973995,'3','pbversion0000000000001','approved','footerbg.gif','footerbg.gif','style-underground/images/footerbg.gif','3','7','3',NULL,0,1,0,0,0,460,NULL,0,0,0,1301974000,NULL,0),('0IIGNBs_-INzqBC5VLeJgw',1301973996,'3','pbversion0000000000001','approved','headerbg.gif','headerbg.gif','style-underground/images/headerbg.gif','3','7','3',NULL,0,1,0,0,0,530,NULL,0,0,0,1301974000,NULL,0),('FXmePdyS0YKuZ1VCGGpK9w',1301973996,'3','pbversion0000000000001','approved','quote.gif','quote.gif','style-underground/images/quote.gif','3','7','3',NULL,0,1,0,0,0,685,NULL,0,0,0,1301974000,NULL,0),('66qCywiE_fiL9u5YIaJhgw',1301973996,'3','pbversion0000000000001','approved','tableft.gif','tableft.gif','style-underground/images/tableft.gif','3','7','3',NULL,0,1,0,0,0,720,NULL,0,0,0,1301974000,NULL,0),('n5VpG4lFsOG1elaWDQbilw',1301973996,'3','pbversion0000000000001','approved','tabright.gif','tabright.gif','style-underground/images/tabright.gif','3','7','3',NULL,0,1,0,0,0,2135,NULL,0,0,0,1301974000,NULL,0),('g3JH1PRq6m6Bj_PnGpcrSQ',1301973996,'3','pbversion0000000000001','approved','CSS','CSS','style-underground/css','3','7','3',NULL,0,0,0,0,0,319,NULL,0,1,0,1301974000,NULL,0),('egpnaaFqWmJwYTZ5CvFH9g',1301973996,'3','pbversion0000000000001','approved','Underground.css','Underground.css','style-underground/css/underground.css','3','7','3',NULL,0,1,0,0,0,11746,NULL,0,1,0,1301974000,NULL,0),('BBpxqoSseIor5C9ei9JEFQ',1301973996,'3','pbversion0000000000001','approved','Underground WebGUI.css','Underground WebGUI.css','style-underground/css/underground-webgui.css','3','7','3',NULL,0,1,0,0,0,528,NULL,0,1,0,1301974000,NULL,0),('G0hl4VilbFKipToyxKqFrg',1301973997,'3','pbversion0000000000001','approved','Prototypes','Prototypes','style-underground/prototypes','3','7','3',NULL,0,0,0,0,0,429,NULL,0,1,0,1301974000,NULL,0),('GWU2qZqe6yEuAKG-5HtBdg',1301973997,'3','pbversion0000000000001','approved','Templates','Templates','style-underground/templates','3','7','3',NULL,0,0,0,0,0,337,NULL,0,1,0,1301974000,NULL,0),('Qk24uXao2yowR6zxbVJ0xA',1301973997,'3','pbversion0000000000001','approved','[style] Underground','[style] Underground','style-underground/style-underground','3','7','3','by Doug from Plain Black http://plainblack.com\r\n\r\nThis is the Underground style from http://www.styleshout.com/ made into a WebGUI package. A simple, functional style.',0,1,0,0,0,4727,NULL,0,1,0,1301974000,NULL,0),('39KNX53B4nYJAyIE1lu8ZQ',1301973997,'3','pbversion0000000000001','approved','[nav] Underground Top Navigation','[nav] Underground Top Navigation','style-underground/nav-underground-top-navigation','3','7','3',NULL,0,1,0,0,0,1139,NULL,0,1,0,1301974000,NULL,0),('ztfi__vHJLsQDsMenrEn-w',1301973997,'3','pbversion0000000000001','approved','[nav] Underground Side Navigation','[nav] Underground Side Navigation','style-underground/nav-underground-side-navigation','3','7','3',NULL,0,1,0,0,0,1148,NULL,0,1,0,1301974000,NULL,0),('8qyrDCNeggB4dzKiOoRuiQ',1301973997,'3','pbversion0000000000001','approved','[admintoggle] Underground Admin Toggle','[admintoggle] Underground Admin Toggle','style-underground/templates/admintoggle-underground-admin-toggle','3','7','3',NULL,0,1,0,0,0,520,NULL,0,1,0,1301974000,NULL,0),('M1NyNeS5jpdIsiIWFiJprw',1301973997,'3','pbversion0000000000001','approved','View My Account','View My Account','style-underground/templates/view-my-account','3','7','3',NULL,0,1,0,0,0,461,NULL,0,1,0,1301974000,NULL,0),('n-Vr_wgxOkwiHGt1nJto9w',1309236774,'3','pbversion0000000000001','approved','Top Navigation','Top Navigation','style-underground/top-navigation','3','7','3',NULL,0,1,0,0,0,393,NULL,0,1,0,1309236774,NULL,0),('AsfpsOpsGzZCb9m7MyxPuw',1301973997,'3','pbversion0000000000001','approved','Navigation','Navigation','style-underground/navigation','3','7','3',NULL,0,0,0,0,0,340,NULL,0,1,0,1301974001,NULL,0),('jmqLxnoWb6p92Cr12lf1hw',1301973997,'3','pbversion0000000000001','approved','Side Navigation','Side Navigation','style-underground/side-navigation','3','7','3',NULL,0,1,0,0,0,402,NULL,0,1,0,1301974001,NULL,0),('8E2UOnj_XPEghTj7nfVM0g',1301973997,'3','pbversion0000000000001','approved','Search','Search','style-underground/search','3','7','3',NULL,0,1,0,0,0,345,NULL,0,1,0,1301974001,NULL,0),('CarouselTmpl0000000001',1301973997,'3','pbversion0000000000001','approved','Default Carousel','Default Carousel','root/import/carousel/carousel-default','3','7','12',NULL,0,0,0,0,0,3709,'\r\n\r\n\r\n',0,1,0,1301974000,'',0),('1qFjOEiILIwr1xB5_ebppQ',1301973998,'3','pbversion0000000000001','approved','Greenportal','Greenportal','greenportal','3','7','3',NULL,0,1,0,0,0,319,NULL,0,1,0,1301974001,NULL,0),('xD76UfQ_JnSgTLBNvytcpQ',1301973998,'3','pbversion0000000000001','approved','greenportal_image','greenportal_image','greenportal_image','3','7','12',NULL,0,1,0,0,0,344,NULL,0,1,0,1301974001,NULL,0),('pAXR7Kby4O-dSxOwLp1GaA',1301973998,'3','pbversion0000000000001','approved','menu_top.png','menu_top.png','greenportal_image/menu_top.png','3','7','12',NULL,0,1,0,0,0,7649,NULL,0,1,0,1301974001,NULL,0),('TthzMLO4n3qxy59QZ5YBHg',1301973998,'3','pbversion0000000000001','approved','menu_dark.png','menu_dark.png','greenportal_image/menu_dark.png','3','7','12',NULL,0,1,0,0,0,2641,NULL,0,1,0,1301974001,NULL,0),('3n31SQjYa150TBrRBgMPhA',1301973998,'3','pbversion0000000000001','approved','menu_light.png','menu_light.png','greenportal_image/menu_light.png','3','7','12',NULL,0,1,0,0,0,2195,NULL,0,1,0,1301974001,NULL,0),('R4RxDufGbbIzEmpcoEcLrw',1301973998,'3','pbversion0000000000001','approved','logo.jpg','logo.jpg','greenportal_image/logo.jpg','3','7','12',NULL,0,1,0,0,0,41449,NULL,0,1,0,1301974001,NULL,0),('xyyn5mz3xGyvrcI1rY8C-w',1301973998,'3','pbversion0000000000001','approved','greenportal.css','greenportal.css','greenportal.css','3','7','12',NULL,0,1,0,0,0,6696,NULL,0,1,0,1301974001,NULL,0),('KKt0VB_eoQxw9xEsHsAhag',1301973998,'3','pbversion0000000000001','approved','Greenportal_style','Greenportal_style','greenportal_style','3','7','12','by Ning from PlutonIT http://pluton.nl\n\nA Joomla! Open Source design released under the GNU/GPL License. Enhanced and converted into WebGUI theme by Ning. The original PHP and CSS file can be downloaded following the author\'s link: http://www.studentsdesign.de/',0,1,0,0,0,2280,NULL,0,1,0,1301974001,NULL,0),('h0bOzz7WvdaVZXsjpwtkww',1301973998,'3','pbversion0000000000001','approved','greenportal_Navigation','greenportal_Navigation','greenportal_navigation','3','7','3',NULL,0,1,0,0,0,394,NULL,0,1,0,1301974001,NULL,0),('_z3ukLCqvoaUygfsbbkBzw',1301973999,'3','pbversion0000000000001','approved','Greenportal_menu','Greenportal_menu','greenportal_menu','3','7','3',NULL,0,1,0,0,0,2014,NULL,0,1,0,1301974001,NULL,0),('qFOfW1sKyOTnGNcP6BXbwg',1301973999,'3','pbversion0000000000001','approved','greenportal_NavigationTop','greenportal_NavigationTop','greenportal_navigationtop','3','7','12',NULL,0,1,0,0,0,416,NULL,0,1,0,1301974001,NULL,0),('Pt38T5_MWSue2e1N36MLdw',1301973999,'3','pbversion0000000000001','approved','Greenportal_menuTop','Greenportal_menuTop','greenportal_menutop','3','7','12',NULL,0,1,0,0,0,950,NULL,0,1,0,1301974001,NULL,0),('LDcM1Iop17nF2MoSa7zo_Q',1301973999,'3','pbversion0000000000001','approved','Greenportal_dataform','Greenportal_dataform','greenportal_dataform','3','7','3',NULL,0,1,0,0,0,5320,'\r\n\r\n',0,1,0,1301974001,'',0),('hVF1taXj4bfd7DuL4XDMYg',1301973999,'3','pbversion0000000000001','approved','Greenportal_datalist','Greenportal_datalist','greenportal_datalist','3','7','3',NULL,0,1,0,0,0,4142,'\n\n',0,1,0,1301974001,'',0),('x4-2QYRSrIB_BJfnSKKj4w',1301973999,'3','pbversion0000000000001','approved','Greenportal_acknowledgement','Greenportal_acknowledgement','greenportal_acknowledgement','3','7','3',NULL,0,1,0,0,0,1755,'',0,1,0,1301974001,'',0),('423R4Y6XIt3wUzlnLo-chg',1301973999,'3','pbversion0000000000001','approved','Greenportal_forum','Greenportal_forum','greenportal_forum','3','7','3',NULL,0,1,0,0,0,7997,'\r\n\r\n\r\n',0,1,0,1301974001,'',0),('oZ1Mk-zExYUyD-JsjTvaHg',1301973999,'3','pbversion0000000000001','approved','Greenportal_thread','Greenportal_thread','greenportal_thread','3','7','3',NULL,0,1,0,0,0,11119,'\r\n',0,1,0,1301974001,'',0),('mYwS8CZaOLMt0raaKXGZcQ',1301973999,'3','pbversion0000000000001','approved','Greenportal_postform','Greenportal_postform','greenportal_postform','3','7','3',NULL,0,1,0,0,0,4047,'\r\n',0,1,0,1301974001,'',0),('kSGR4OHsKmhLQTuLkisOww',1301973999,'3','pbversion0000000000001','approved','Greenportal_search','Greenportal_search','greenportal_search','3','7','3',NULL,0,1,0,0,0,3685,'',0,1,0,1301974001,'',0),('G5DgNizuG3jXkjPp6UaGrA',1301973999,'3','pbversion0000000000001','approved','Greenportal_Calendar','Greenportal_Calendar','greenportal_calendar','3','7','3',NULL,0,1,0,0,0,352,NULL,0,1,0,1301974001,NULL,0),('U78V5IJHVljvRTb6ydsTHg',1301973999,'3','pbversion0000000000001','approved','Greenportal_calendarMonth','Greenportal_calendarMonth','greenportal_calendar/greenportal_calendarmonth','3','7','3',NULL,0,1,0,0,0,15294,'\n\n\n\n\n\n\n',0,1,0,1301974001,'',0),('Xqc3qPUXoFE8dt9qocdWig',1301973999,'3','pbversion0000000000001','approved','Greenportal_calendarWeek','Greenportal_calendarWeek','greenportal_calendar/greenportal_calendarweek','3','7','3',NULL,0,1,0,0,0,10509,'\r\n',0,1,0,1301974001,'',0),('IBTb7wllSt7RxFmmvm9pkQ',1301973999,'3','pbversion0000000000001','approved','Greenportal_calendarDay','Greenportal_calendarDay','greenportal_calendar/greenportal_calendarday','3','7','3',NULL,0,1,0,0,0,10155,' \r\n\r\n',0,1,0,1301974001,'',0),('Z1EM7JMI_4SkyfaZffSElw',1301973999,'3','pbversion0000000000001','approved','Greenportal_calendarEvent','Greenportal_calendarEvent','greenportal_calendar/greenportal_calendarevent','3','7','3',NULL,0,1,0,0,0,8357,' \r\n\r\n',0,1,0,1301974001,'',0),('fJg7SKpGZwzSNx3_ebki1A',1301973999,'3','pbversion0000000000001','approved','Greenportal_calendarEventEdit','Greenportal_calendarEventEdit','greenportal_calendar/greenportal_calendareventedit','3','7','3',NULL,0,1,0,0,0,9181,'\n\n\n \n\n',0,1,0,1301974001,'',0),('ihf4Rx6p72xn_nVKaIeOaw',1301973999,'3','pbversion0000000000001','approved','Greenportal_calendarSearch','Greenportal_calendarSearch','greenportal_calendar/greenportal_calendarsearch','3','7','3',NULL,0,1,0,0,0,9141,' \r\n\r\n',0,1,0,1301974001,'',0),('jrWJ6nHXkqgFbml7BZ9chw',1301974000,'3','pbversion0000000000001','approved','Greenportal_submission','Greenportal_submission','greenportal_submission','3','7','3',NULL,0,1,0,0,0,21039,'\r\n',0,1,0,1301974001,'',0),('Ys6f3vpe0y1uRcaCJ2TlFw',1301974000,'3','pbversion0000000000001','approved','Greenportal_messageboard','Greenportal_messageboard','greenportal_messageboard','3','7','3',NULL,0,1,0,0,0,5587,'',0,1,0,1301974001,'',0),('PBtmpl0000000000000200',1301974000,'3','pbversion0000000000001','approved','Default Search','Default Search','default_search2','3','7','12',NULL,0,0,0,0,0,3966,NULL,0,1,0,1315877144,NULL,0),('E3tzZjzhmYoNlAyP2VW33Q',1303183716,'3','pbversion0000000000001','approved','Edit Story','Edit Story','root/import/storymanager/editstory','3','7','4',NULL,0,0,0,0,0,6440,'',0,1,0,1303183716,'',0),('brxm_faNdZX5tRo3p50g3g',1304392055,'3','pbversion0000000000001','approved','Map Templates','Map Templates','home/map/map-templates','3','7','3',NULL,0,0,0,0,0,334,NULL,0,1,0,1304392055,NULL,0),('9j0_Z1j3Jd0QBbY2akb6qw',1304392055,'3','pbversion0000000000001','approved','Default Map View','Default Map View','home/map/map-templates/default-map-view','3','7','3',NULL,0,1,0,0,0,1292,'',0,1,0,1304392055,'',0),('oHh0UqAJeY7u2n--WD-BAA',1304392055,'3','pbversion0000000000001','approved','Default Edit Map Point','Default Edit Map Point','home/map/map-templates/default-edit-map-point','3','7','3',NULL,0,1,0,0,0,3176,NULL,0,1,0,1304392055,NULL,0),('u9vfx33XDk5la1-QC5FK7g',1304392055,'3','pbversion0000000000001','approved','Default Map Point View','Default Map Point View','home/map/map-templates/default-map-point-view','3','7','3',NULL,0,1,0,0,0,2418,'',0,1,0,1304392055,'',0),('_9_eiaPgxzF_x_upt6-PNQ',1304392055,'3','pbversion0000000000001','approved','gallery.css','gallery.css','root/import/gallery-templates/gallery.css','3','7','3',NULL,0,1,0,0,0,18788,NULL,0,1,0,1304392055,NULL,0),('PBtmpl0000000000000027',1311652541,'3','pbversion0000000000001','approved','Default Forum Notification','Default Forum Notification','default_forum_notification','3','7','12',NULL,0,1,0,0,0,2815,NULL,0,1,0,1311652541,NULL,0),('3n3H85BsdeRQ0I08WmvlOg',1313542960,'3','pbversion0000000000001','approved','thingy.css','thingy.css','root/import/thingy-templates/thingy.css','3','7','12',NULL,0,1,0,0,0,4774,NULL,0,1,0,1313542962,NULL,0),('aNmgn0cd6tldmC1FpW4KbA',1313542960,'3','pbversion0000000000001','approved','Shop','Shop','shopping-cart-collateral-items','3','7','3',NULL,0,1,0,0,0,324,NULL,0,0,0,1313542962,NULL,0),('2q5fxatSFLgIhXaUX-oSvg',1313542960,'3','pbversion0000000000001','approved','bottom-left.jpg','bottom-left.jpg','shopping-cart-collateral-items/bottom-left.jpg','3','7','3',NULL,0,1,0,0,0,32254,NULL,0,0,0,1313542962,NULL,0),('_d5WTkKjnwct-_Dk7gZHvQ',1313542960,'3','pbversion0000000000001','approved','bottom-right.jpg','bottom-right.jpg','shopping-cart-collateral-items/bottom-right.jpg','3','7','3',NULL,0,1,0,0,0,32258,NULL,0,0,0,1313542962,NULL,0),('Iz2mUR3jCPKyemwAea4b2g',1313542960,'3','pbversion0000000000001','approved','input_bg.jpg','input_bg.jpg','shopping-cart-collateral-items/input_bg.jpg','3','7','3',NULL,0,1,0,0,0,30076,NULL,0,0,0,1313542962,NULL,0),('JU9bjsLRoWj7GVHs__prig',1313542960,'3','pbversion0000000000001','approved','top-left.jpg','top-left.jpg','shopping-cart-collateral-items/top-left.jpg','3','7','3',NULL,0,1,0,0,0,32207,NULL,0,0,0,1313542962,NULL,0),('noOlnjQGexHg8c4bGVUo9g',1313542960,'3','pbversion0000000000001','approved','top-right.jpg','top-right.jpg','shopping-cart-collateral-items/top-right.jpg','3','7','3',NULL,0,1,0,0,0,32245,NULL,0,0,0,1313542962,NULL,0),('aIpCmr9Hi__vgdZnDTz1jw',1313542961,'3','pbversion0000000000001','approved','Cart (Default)','Cart (Default)','default-shopping-cart-template','3','7','3',NULL,0,1,0,0,0,26304,' ',0,1,0,1313542962,'',0),('XNd7a_g_cTvJVYrVHcx2Mw',1313542961,'3','pbversion0000000000001','approved','Address (Default)','Address (Default)','shopping-cart-collateral-items/address-default','3','7','3',NULL,0,1,0,0,0,5883,'\r\n',0,1,0,1313542962,'',0),('bPz1yk6Y9uwMDMBcmMsSCg',1313542961,'3','pbversion0000000000001','approved','Email Receipt (Default)','Email Receipt (Default)','shopping-cart-collateral-items/email-receipt-default','3','7','3',NULL,0,1,0,0,0,4751,NULL,0,1,0,1313542962,NULL,0),('vrKXEtluIhbmAS9xmPukDA',1313542961,'3','pbversion0000000000001','approved','Donation (Default)','Donation (Default)','root/import/default-donation-template','3','7','12',NULL,0,1,0,0,0,2504,'\r\n',0,0,0,1313542962,'',0),('63ix2-hU0FchXGIWkG3tow',1313542961,'3','pbversion0000000000001','approved','Flat Discount (Default)','Flat Discount (Default)','root/import/flat-discount-default','3','7','12',NULL,0,1,0,0,0,1278,NULL,0,1,0,1313542962,NULL,0),('eqb9sWjFEVq0yHunGV8IGw',1313542961,'3','pbversion0000000000001','approved','Subscription (Default)','Subscription (Default)','root/import/subscription-default','3','7','12',NULL,0,1,0,0,0,2872,'\n',0,1,0,1313542962,'',0),('3womoo7Teyy2YKFa25-MZg',1313542961,'3','pbversion0000000000001','approved','Address Book (Default)','Address Book (Default)','shopping-cart-collateral-items/address-book-default','3','7','3',NULL,0,1,0,0,0,3132,'\n',0,1,0,1313542962,'',0),('EBlxJpZQ9o-8VBOaGQbChA',1313542961,'3','pbversion0000000000001','approved','MiniCart','MiniCart','shopping-cart-collateral-items/minicart','3','7','3',NULL,0,1,0,0,0,2622,'',0,1,0,1313542962,'',0),('g8W53Pd71uHB9pxaXhWf_A',1313542961,'3','pbversion0000000000001','approved','My Purchases Detail (Default)','My Purchases Detail (Default)','shopping-cart-collateral-items/my-purchases-detail-default','3','7','3',NULL,0,1,0,0,0,8422,'\n',0,1,0,1313542962,'',0),('jEz8iTGNWEt2I05IhVV19Q',1313542961,'3','pbversion0000000000001','approved','Operation/RedeemSubscription','Operation/RedeemSubscription','root/import/operation/redeemsubscription','3','7','12',NULL,0,0,0,0,0,390,NULL,0,1,0,1313542962,NULL,0),('PBtmpl0000000000000053',1313542961,'3','pbversion0000000000001','approved','Subscription code redemption','Subscription code redemption','subscription_code_redemption','3','7','12',NULL,0,1,0,0,0,579,NULL,0,1,0,1313542962,NULL,0),('itransact_credentials1',1313542961,'3','pbversion0000000000001','approved','ITransact Credentials (Default)','ITransact Credentials (Default)','shopping-cart-collateral-items/itransact-credentials','3','7','4',NULL,0,0,0,0,0,11072,' \n\n\n',0,1,0,1313542962,'',0),('D6cJpRcey35aSkh9Q_FPUQ',1313542961,'3','pbversion0000000000001','approved','Default EU User Screen','Default EU User Screen','root/import/default-eu-user-screen','3','7','12',NULL,0,1,0,0,0,1830,NULL,0,1,0,1313542962,NULL,0),('30h5rHxzE_Q0CyI3Gg7EJw',1313542961,'3','pbversion0000000000001','approved','Cash Summary Screen (Default)','Cash Summary Screen (Default)','shopping-cart-collateral-items/cash-summary','3','7','4',NULL,0,0,0,0,0,8671,' \n',0,1,0,1313542962,'',0),('jysVZeUR0Bx2NfrKs5sulg',1313542961,'3','pbversion0000000000001','approved','Ogone Summary Screen (Default)','Ogone Summary Screen (Default)','shopping-cart-collateral-items/ogone-summary','3','7','4',NULL,0,0,0,0,0,8672,' \n',0,1,0,1313542962,'',0),('300AozDaeveAjB_KN0ljlQ',1313542962,'3','pbversion0000000000001','approved','PayPal Standard Summary Screen (Default)','PayPal Standard Summary Screen (Default)','shopping-cart-collateral-items/paypal-std-summary','3','7','4',NULL,0,0,0,0,0,8697,' \n',0,1,0,1313542962,'',0),('GqnZPB0gLoZmqQzYFaq7bg',1313542962,'3','pbversion0000000000001','approved','PayPal Express Checkout Summary Screen (Default)','PayPal Express Checkout Summary Screen (Default)','shopping-cart-collateral-items/paypal-express-summary','3','7','4',NULL,0,0,0,0,0,8716,' \n',0,1,0,1313542962,'',0),('2GxjjkRuRkdUg_PccRPjpA',1313542962,'3','pbversion0000000000001','approved','Select Gateway (Default)','Select Gateway (Default)','shopping-cart-collateral-items/select-gateway-default','3','7','3',NULL,0,1,0,0,0,626,'\r\n',0,1,0,1313542962,NULL,0),('Rqwgh50A3gGcOKIrdi_kxw',1313542962,'3','pbversion0000000000001','approved','Authorize.net Credentials (Default)','Authorize.net Credentials (Default)','shopping-cart-collateral-items/authorizenet-credentials','3','7','4',NULL,0,0,0,0,0,11400,' \n\n\n',0,1,0,1313542962,'',0),('PBEmsBadgeTemplate0000',1313542962,'3','pbversion0000000000001','approved','Default EMS Badge Template','Default EMS Badge Template','default_emsbadge','3','7','4',NULL,0,0,0,0,0,5853,'',0,1,0,1313542962,'',0),('StockDataTMPL000000001',1315877144,'3','pbversion0000000000001','approved','StockData Default View','StockData Default View','stockdatatmpl000000001','3','7','12',NULL,0,1,0,0,0,9004,'\n',0,1,0,1315877144,'',0),('2gtFt7c0qAFNU3BG_uvNvg',1315877144,'3','pbversion0000000000001','approved','My Purchases (Default)','My Purchases (Default)','shopping-cart-collateral-items/my-purchases-default','3','7','3',NULL,0,1,0,0,0,3236,'\n',0,1,0,1315877144,'',0); -ALTER TABLE `assetData` ENABLE KEYS; -ALTER TABLE `assetIndex` DISABLE KEYS; -INSERT INTO `assetIndex` VALUES ('PBasset000000000000003','Media','','media',1147642437,1147642437,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Media Media media','000001000003',NULL),('PBtmpl0000000000000112','Weblog','','weblog',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'Weblog Weblog weblog Collaboration','000001000001000008000004',NULL),('PBtmplBlankStyle000001','WebGUI 6 Blank Style','','pbtmplblankstyle000001',1133743239,1258524916,'3','7','12','WebGUI::Asset::Template',0,'WebGUI 6 Blank Style WebGUI 6 Blank Style pbtmplblankstyle000001 style','000001000001000041000005',NULL),('PBtmpl0000000000000079','Topics','','topics',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'Topics Topics topics Collaboration','000001000001000008000009',NULL),('PBtmpl0000000000000097','Traditional with Thumbnails','','traditional_with_thumbnails',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'Traditional with Thumbnails Traditional with Thumbnails traditional with thumbnails Collaboration','000001000001000008000003',NULL),('PBtmpl0000000000000082','Unordered List','','unordered_list',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'Unordered List Unordered List unordered list Collaboration','000001000001000008000011',NULL),('PBtmpl0000000000000124','Tabs','','tabs',1124395696,1259133275,'3','7','12','WebGUI::Asset::Template',0,'Tabs Tabs tabs Navigation','000001000001000025000004',NULL),('GNvjCFQWjY2AF2uf0aCM8Q','Syndicated Articles','','syndicated_articles',1124395696,1259133274,'3','7','12','WebGUI::Asset::Template',0,'Syndicated Articles Syndicated Articles syndicated articles SyndicatedContent','000001000001000043000002',NULL),('PBtmpl0000000000000136','Synopsis','','synopsis2',1124395696,1259133274,'3','7','12','WebGUI::Asset::Template',0,'Synopsis Synopsis synopsis2 Navigation','000001000001000025000007',NULL),('PBtmpl0000000000000116','Tab Form','','tab_form',1124395696,1257311888,'3','7','12','WebGUI::Asset::Template',0,'Tab Form Tab Form tab form DataForm','000001000001000010000005',NULL),('GRUNFctldUgop-qRLuo_DA','Default Survey Edit','','root/import/survey/default-survey-edit',1227254010,1269401469,'3','7','12','WebGUI::Asset::Template',0,'Default Survey Edit Default Survey Edit root import survey default survey edit Survey/Edit','000001000001000042000004',NULL),('ProjectManagerTMPL0004','Default Project Manager Edit Task','','default-pm-template-edit-task',1147642415,1222574693,'3','7','12','WebGUI::Asset::Template',0,'Default Project Manager Edit Task Default Project Manager Edit Task default pm template edit task ProjectManager_editTask','000001000001000030000002000001',NULL),('ProjectManagerTMPL0002','Default Project Display','','default-pm-template-project-display',1147642415,1222574693,'3','7','12','WebGUI::Asset::Template',0,'Default Project Display Default Project Display default pm template project display ProjectManager_project','000001000001000030000004000001',NULL),('PBtmpl0000000000000137','Admin Console Style','','admin_console',1124395696,1258524916,'3','7','12','WebGUI::Asset::Template',0,'Admin Console Style Admin Console admin console style','000001000001000041000003',NULL),('StockDataTMPL000000001','StockData Default View','','stockdatatmpl000000001',1133743239,1315877144,'3','7','12','WebGUI::Asset::Template',0,'StockData Default View StockData Default View stockdatatmpl000000001 StockData','000001000001000039000002',NULL),('PBtmpl0000000000000135','Side By Side','','side_by_side',1124395696,1259133276,'3','7','12','WebGUI::Asset::Template',0,'Side By Side Side By Side side by side Layout','000001000001000019000001',NULL),('PBtmpl0000000000000200','Default Search','','default_search2',1147642427,1301974000,'3','7','12','WebGUI::Asset::Template',0,'Default Search Default Search default search2 Search','000001000001000034000001',NULL),('PBtmpl0000000000000101','Ordered List','','ordered_list',1124395696,1277868922,'3','7','12','WebGUI::Asset::Template',0,'Ordered List Ordered List ordered list Collaboration','000001000001000008000024',NULL),('PBtmpl0000000000000121','Photo Gallery','','photo_gallery',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'Photo Gallery Photo Gallery photo gallery Collaboration','000001000001000008000005',NULL),('PBtmpl0000000000000081','Q and A','','q_and_a',1124395696,1277868922,'3','7','12','WebGUI::Asset::Template',0,'Q and A Q and A q and a Collaboration','000001000001000008000023',NULL),('WVtmpl0000000000000001','Random Thread Macro Default Template','','randomthread-template',1133743240,1147642426,'3','7','12','WebGUI::Asset::Template',0,'Random Thread Macro Default Template Random Thread Macro Default Template randomthread template Macro/RandomThread','000001000001000021000010000001',NULL),('PBtmpl0000000000000131','Right Column','','right_column',1124395696,1259133275,'3','7','12','WebGUI::Asset::Template',0,'Right Column Right Column right column Layout','000001000001000019000002',NULL),('PBtmpl0000000000000094','News','','plainblacknews',1124395696,1220655703,'3','7','12','WebGUI::Asset::Template',0,'News News plainblacknews Layout','000001000001000019000005',NULL),('matrixtmpl000000000005','Matrix Default Search','','matrix-search-template',1133743239,1281501163,'3','7','12','WebGUI::Asset::Template',0,'Matrix Default Search Matrix Default Search matrix search template Matrix/Search','000001000001000022000005',NULL),('MultiSearchTmpl0000001','MultiSearch Default Display','','multisearchtmpl0000001',1133743239,1230269962,'3','7','12','WebGUI::Asset::Template',0,'MultiSearch Default Display MultiSearch Default Display multisearchtmpl0000001 MultiSearch','000001000001000024000001',NULL),('matrixtmpl000000000002','Matrix Default Compare','','matrix-default-compare-template',1133743238,1281501162,'3','7','12','WebGUI::Asset::Template',0,'Matrix Default Compare Matrix Default Compare matrix default compare template Matrix/Compare','000001000001000022000001',NULL),('PBtmpl0000000000000111','Make Page Printable','','make_page_printable',1124395696,1286336607,'3','7','12','WebGUI::Asset::Template',0,'Make Page Printable Make Page Printable make page printable style','000001000001000041000002',NULL),('PBtmpl0000000000000020','Mail Form','','mail_form',1124395696,1257311887,'3','7','12','WebGUI::Asset::Template',0,'Mail Form Mail Form mail form DataForm','000001000001000010000001',NULL),('PBtmpl0000000000000113','Link','','link',1124395696,1277868922,'3','7','12','WebGUI::Asset::Template',0,'Link Link link Collaboration/Thread','000001000001000008000025',NULL),('PBtmpl0000000000000083','Link List','','link_list',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'Link List Link List link list Collaboration','000001000001000008000010',NULL),('PBtmpl0000000000000114','Link List Submission Form','','link_list_submission_form',1124395696,1277868922,'3','7','12','WebGUI::Asset::Template',0,'Link List Submission Form Link List Submission Form link list submission form Collaboration/PostForm','000001000001000008000019',NULL),('PBtmpl0000000000000115','Linked Image with Caption','','linked_image_with_caption',1124395696,1259133276,'3','7','12','WebGUI::Asset::Template',0,'Linked Image with Caption Linked Image with Caption linked image with caption Article','000001000001000004000003',NULL),('PBtmpl0000000000000098','Job','','job',1124395696,1277868922,'3','7','12','WebGUI::Asset::Template',0,'Job Job job Collaboration/Thread','000001000001000008000021',NULL),('PBtmpl0000000000000077','Job Listing','','job_listing',1124395696,1298351263,'3','7','12','WebGUI::Asset::Template',0,'Job Listing Job Listing job listing Collaboration','000001000001000008000020',NULL),('PBtmpl0000000000000122','Job Submission Form','','job_submission_form',1124395696,1277868922,'3','7','12','WebGUI::Asset::Template',0,'Job Submission Form Job Submission Form job submission form Collaboration/PostForm','000001000001000008000022',NULL),('PBtmpl0000000000000103','Article With Image','','article-with-image',1124395696,1259133275,'3','7','12','WebGUI::Asset::Template',0,'Article With Image Article With Image article with image Article','000001000001000004000001',NULL),('PBtmpl0000000000000092','Horizontal Login Box','','horizontal_login_box',1124395696,1148579524,'3','7','12','WebGUI::Asset::Template',0,'Horizontal Login Box Horizontal Login Box horizontal login box Macro/L_loginBox','000001000001000021000009000001',NULL),('PBtmpl0000000000000108','horizontalMenu','','horizontalmenu',1124395696,1259133276,'3','7','12','WebGUI::Asset::Template',0,'horizontalMenu horizontalMenu horizontalmenu Navigation','000001000001000025000002',NULL),('PBtmpl0000000000000088','Image','','image',1124395696,1300763663,'3','7','12','WebGUI::Asset::Template',0,'Image Image image ImageAsset','000001000001000017000001',NULL),('IOB0000000000000000002','Default InOutBoard Report Template','','iob-report-template',1133743239,1166019641,'3','7','12','WebGUI::Asset::Template',0,'Default InOutBoard Report Template Default InOutBoard Report Template iob report template InOutBoard/Report','000001000001000018000001',NULL),('IOB0000000000000000001','Default InOutBoard Template','','iob-template',1133743239,1169795123,'3','7','12','WebGUI::Asset::Template',0,'Default InOutBoard Template Default InOutBoard Template iob template InOutBoard','000001000001000018000002',NULL),('PBtmpl0000000000000123','Item','','item',1124395696,1259133276,'3','7','12','WebGUI::Asset::Template',0,'Item Item item Article','000001000001000004000004',NULL),('PBtmpl0000000000000024','File','','file',1124395696,1259133275,'3','7','12','WebGUI::Asset::Template',0,'File File file FileAsset','000001000001000013000001',NULL),('PBtmpl0000000000000078','File Folder','','file_folder',1124395696,1259133275,'3','7','12','WebGUI::Asset::Template',0,'File Folder File Folder file folder Folder','000001000001000014000001',NULL),('PBtmpl0000000000000107','File with size','','file_with_size',1124395696,1147642420,'3','7','12','WebGUI::Asset::Template',0,'File with size File with size file with size Macro/File','000001000001000021000004000003',NULL),('PBtmpl0000000000000133','Guest Book','','guest_book',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'Guest Book Guest Book guest book Collaboration','000001000001000008000012',NULL),('PBtmpl0000000000000117','DropMenu','','dropmenu',1124395696,1259133274,'3','7','12','WebGUI::Asset::Template',0,'DropMenu DropMenu dropmenu Navigation','000001000001000025000003',NULL),('PBtmpl0000000000000130','Tree Navigation','','root/import/navigation/tree-navigation',1124395696,1259133276,'3','7','12','WebGUI::Asset::Template',0,'Tree Navigation Tree Navigation root import navigation tree navigation Navigation','000001000001000025000005',NULL),('PBtmpl0000000000000060','Fail Safe','','fail_safe',1124395696,1258524916,'3','7','12','WebGUI::Asset::Template',0,'Fail Safe Fail Safe fail safe style','000001000001000041000001',NULL),('PBtmpl0000000000000080','FAQ','','faqtemplate',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'FAQ FAQ faqtemplate Collaboration','000001000001000008000002',NULL),('PBtmpl0000000000000099','FAQ Submission Form','','faq_submission_form',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'FAQ Submission Form FAQ Submission Form faq submission form Collaboration/PostForm','000001000001000008000018',NULL),('PBtmpl0000000000000010','Default WebGUI Account Display Template','','default_webgui_account_display_template',1124395696,1287545014,'3','7','12','WebGUI::Asset::Template',0,'Default WebGUI Account Display Template Default WebGUI Account Display Template default webgui account display template Auth/WebGUI/Account','000001000001000005000004000001',NULL),('PBtmpl0000000000000013','Default WebGUI Login Template','','default_webgui_login_template',1124395696,1287545014,'3','7','12','WebGUI::Asset::Template',0,'Default WebGUI Login Template Default WebGUI Login Template default webgui login template Auth/WebGUI/Login','000001000001000005000007000001',NULL),('PBtmpl0000000000000012','Default WebGUI Password Reset Template','','default_webgui_password_reset_template',1124395696,1287545014,'3','7','12','WebGUI::Asset::Template',0,'Default WebGUI Password Reset Template Default WebGUI Password Reset Template default webgui password reset template Auth/WebGUI/Expired','000001000001000005000006000001',NULL),('PBtmpl0000000000000057','Default WebGUI Yes/No Prompt','','default_webgui_yes/no_prompt',1124395696,1147642418,'3','7','12','WebGUI::Asset::Template',0,'Default WebGUI Yes/No Prompt Default WebGUI Yes/No Prompt default webgui yes no prompt prompt','000001000001000031000001',NULL),('PBtmpl0000000000000066','Default USS','','default_uss',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'Default USS Default USS default uss Collaboration','000001000001000008000001',NULL),('TimeTrackingTMPL000001','Default Time Tracking User View','','default-tt-template-user',1147642417,1201205738,'3','7','12','WebGUI::Asset::Template',0,'Default Time Tracking User View Default Time Tracking User View default tt template user TimeTracking_user','000001000001000046000003000001',NULL),('TimeTrackingTMPL000003','Default Time Tracking Row Template','','default-tt-template-row',1147642417,1229311434,'3','7','12','WebGUI::Asset::Template',0,'Default Time Tracking Row Template Default Time Tracking Row Template default tt template row TimeTracking_row','000001000001000046000002000001',NULL),('TimeTrackingTMPL000002','Default Time Tracking Manager View','','default-tt-template-manager',1147642417,1147642417,'3','7','12','WebGUI::Asset::Template',0,'Default Time Tracking Manager View Default Time Tracking Manager View default tt template manager TimeTracking_manager','000001000001000046000001000001',NULL),('X7DrzUcj8pOKFa_6k9D5iw','Newsletter','','root/import/newsletter',1185754569,1222804045,'3','12','3','WebGUI::Asset::Wobject::Folder',1,'Newsletter Newsletter root import newsletter','000001000001000026',NULL),('PBtmpl0000000000000065','Default Syndicated Content','','default_syndicated_content',1124395696,1259133275,'3','7','12','WebGUI::Asset::Template',0,'Default Syndicated Content Default Syndicated Content default syndicated content SyndicatedContent','000001000001000043000001',NULL),('CxMpE_UPauZA3p8jdrOABw','Default Questions','','root/import/survey/default-questions',1227556536,1250243000,'3','7','12','WebGUI::Asset::Template',0,'Default Questions Default Questions root import survey default questions Survey/Take','000001000001000042000006',NULL),('PBtmpl0000000000000059','Default SQL Report','','default_sql_report',1124395696,1229907401,'3','7','12','WebGUI::Asset::Template',0,'Default SQL Report Default SQL Report default sql report SQLReport','000001000001000038000001',NULL),('PBtmpl0000000000000067','Default Submission','','default_submission',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'Default Submission Default Submission default submission Collaboration/Thread','000001000001000008000006',NULL),('PBtmpl0000000000000068','Default Submission Form','','default_submission_form',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'Default Submission Form Default Submission Form default submission form Collaboration/PostForm','000001000001000008000017',NULL),('ProjectManagerTMPL0003','Default Project Manager Gantt Chart','','default-pm-template-gantt-chart',1147642415,1159989349,'3','7','12','WebGUI::Asset::Template',0,'Default Project Manager Gantt Chart Default Project Manager Gantt Chart default pm template gantt chart ProjectManager_gantt','000001000001000030000003000001',NULL),('ProjectManagerTMPL0001','Default Project Management System Dashboard','','default-pm-template-dashboard',1147642415,1229579830,'3','7','12','WebGUI::Asset::Template',0,'Default Project Management System Dashboard Default Project Management System Dashboard default pm template dashboard ProjectManager_dashboard','000001000001000030000001000001',NULL),('PBtmpl0000000000000055','Default Poll','','default_poll',1124395696,1259133275,'3','7','12','WebGUI::Asset::Template',0,'Default Poll Default Poll default poll Poll','000001000001000027000001',NULL),('PBtmpl0000000000000029','Default Post Form','','default_post_form',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'Default Post Form Default Post Form default post form Collaboration/PostForm','000001000001000008000013',NULL),('PBtmpl0000000000000056','Default Product','','default_product',1124395696,1248729559,'3','7','12','WebGUI::Asset::Template',0,'Default Product Default Product default product Product','000001000001000028000001',NULL),('PBtmpl0000000000000033','Default HTTP Proxy','','default_http_proxy',1124395696,1230159454,'3','7','12','WebGUI::Asset::Template',0,'Default HTTP Proxy Default HTTP Proxy default http proxy HttpProxy','000001000001000016000001',NULL),('PBtmpl0000000000000004','Default LDAP Account Display Template','','default_ldap_account_display_template',1124395696,1287545014,'3','7','12','WebGUI::Asset::Template',0,'Default LDAP Account Display Template Default LDAP Account Display Template default ldap account display template Auth/LDAP/Account','000001000001000005000001000001',NULL),('PBtmpl0000000000000006','Default LDAP Login Template','','default_ldap_login_template',1124395696,1287545014,'3','7','12','WebGUI::Asset::Template',0,'Default LDAP Login Template Default LDAP Login Template default ldap login template Auth/LDAP/Login','000001000001000005000003000001',NULL),('PBtmpl0000000000000044','Default Login Box','','default_login_box',1124395696,1148579524,'3','7','12','WebGUI::Asset::Template',0,'Default Login Box Default Login Box default login box Macro/L_loginBox','000001000001000021000009000002',NULL),('PBtmpl0000000000000047','Default Message Board','','default_message_board',1124395696,1147642414,'3','7','12','WebGUI::Asset::Template',0,'Default Message Board Default Message Board default message board MessageBoard','000001000001000023000001',NULL),('PBtmpl0000000000000054','Default Page','','default_page',1124395696,1259133276,'3','7','12','WebGUI::Asset::Template',0,'Default Page Default Page default page Layout','000001000001000019000003',NULL),('Q4uX_C557arTp6D_jwB1jQ','Wiki','','root/import/wiki',1165460175,1273032720,'3','12','12','WebGUI::Asset::Wobject::Folder',1,'Wiki Wiki root import wiki','000001000001000052',NULL),('BmLaN4rmAANkCglXUViEbg','Resource','','root/import/projectmanager/resource',1157679165,1222803871,'3','12','12','WebGUI::Asset::Wobject::Folder',1,'Resource Resource root import projectmanager resource','000001000001000030000005',NULL),('PBtmpl0000000000000039','Default File Macro','','default_file_macro',1124395696,1154535073,'3','7','12','WebGUI::Asset::Template',0,'Default File Macro Default File Macro default file macro Macro/File','000001000001000021000004000001',NULL),('PBtmpl0000000000000026','Default Forum','','default_forum',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'Default Forum Default Forum default forum Collaboration','000001000001000008000007',NULL),('PBtmpl0000000000000031','Default Forum Search','','default_forum_search',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'Default Forum Search Default Forum Search default forum search Collaboration/Search','000001000001000008000016',NULL),('PBtmpl0000000000000093','crumbTrail','','crumbtrail2',1124395696,1259133274,'3','7','12','WebGUI::Asset::Template',0,'crumbTrail crumbTrail crumbtrail2 Navigation','000001000001000025000001',NULL),('DashboardViewTmpl00001','Dashboard Default View','','dashboard-default-view-template',1133743239,1300763664,'3','7','12','WebGUI::Asset::Template',0,'Dashboard Default View Dashboard Default View dashboard default view template Dashboard','000001000001000009000001',NULL),('PBtmpl0000000000000021','Data List','','data_list',1124395696,1294721945,'3','7','12','WebGUI::Asset::Template',0,'Data List Data List data list DataForm/List','000001000001000010000004',NULL),('PBtmpl0000000000000104','Default Acknowledgement','','default_acknowledgement',1124395696,1257311888,'3','7','12','WebGUI::Asset::Template',0,'Default Acknowledgement Default Acknowledgement default acknowledgement DataForm','000001000001000010000003',NULL),('PBtmpl0000000000000002','Default Article','','default_article',1124395696,1259133276,'3','7','12','WebGUI::Asset::Template',0,'Default Article Default Article default article Article','000001000001000004000002',NULL),('PBtmpl0000000000000141','Default DataForm','','pbtmpl0000000000000141',1124395696,1257311888,'3','7','12','WebGUI::Asset::Template',0,'Default DataForm Default DataForm pbtmpl0000000000000141 DataForm','000001000001000010000006',NULL),('WikiRCTmpl000000000001','Default Recent Changes','','default-wiki-recent-changes',1165460175,1273032720,'3','7','12','WebGUI::Asset::Template',0,'Default Recent Changes Default Recent Changes default wiki recent changes WikiMaster_recentChanges','000001000001000052000001',NULL),('PBtmpl0000000000000128','Classifieds','','classifieds',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'Classifieds Classifieds classifieds Collaboration','000001000001000008000008',NULL),('PBtmpl0000000000000134','Hierarchical Top Nav','','import/hierarchical-top-nav',1124395696,1259133275,'3','7','12','WebGUI::Asset::Template',0,'Hierarchical Top Nav Hierarchical Top Nav import hierarchical top nav Navigation','000001000001000025000006',NULL),('PBtmpl0000000000000208','Request Tracker','','request-tracker-template',1147642410,1277868922,'3','7','12','WebGUI::Asset::Template',0,'Request Tracker Request Tracker request tracker template Collaboration','000001000001000008000026',NULL),('wAc4azJViVTpo-2NYOXWvg','Default Question Edit','','root/import/survey/default-question-edit',1226009650,1250243000,'3','7','12','WebGUI::Asset::Template',0,'Default Question Edit Default Question Edit root import survey default question edit Survey/Edit','000001000001000042000008',NULL),('1z9J1O08n_7gVVlBwSRBJQ','Auth','','root/import/auth',1222803099,1287545014,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Auth Auth root import auth','000001000001000005',NULL),('zyWi26q9na-iiZqL4yedog','Macro','','root/import/macro',1222803114,1222803114,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Macro Macro root import macro','000001000001000021',NULL),('PBtmpl0000000000000209','Request Tracker Thread','','request-tracker-post-template',1147642410,1277868922,'3','7','12','WebGUI::Asset::Template',0,'Request Tracker Thread Request Tracker Thread request tracker post template Collaboration/Thread','000001000001000008000027',NULL),('PBtmpl0000000000000109','One Over Three','','one_over_three',1124395696,1259133276,'3','7','12','WebGUI::Asset::Template',0,'One Over Three One Over Three one over three Layout','000001000001000019000004',NULL),('PBtmpl0000000000000001','Admin Console','','admin_console2',1124395696,1247535846,'3','7','12','WebGUI::Asset::Template',0,'Admin Console Admin Console admin console2 AdminConsole','000001000001000003000001',NULL),('LBuiKzg2mWwmOPS9AgV3bg','Get Translated','Let our team of professional translators bring your site to new customers by translating your content into additional languages. Our translation services are never machine automated. They\'re always done by professional translators that have years of exper','yns/translated',1147642517,1271348789,'3','7','4','WebGUI::Asset::Wobject::Article',1,'Get Translated Get Translated yns translated Let our team of professional translators bring your site to new customers by translating your content into additional languages Our translation services are never machine automated They\'re always done by professional translators that have years of experience reading writing and speaking many languages ','000001000002000002000005',NULL),('jTNggl7AoVSUc_ZzrvuCmw','Get Promoted','Now that you have a brilliant WebGUI site, you need to get people to visit it. We can help there too. Our marketing specialists can work with you to develop and execute the right combination of search engine placement, advertising buys, and affilliate pro','yns/promotion',1147642517,1271348789,'3','7','4','WebGUI::Asset::Wobject::Article',1,'Get Promoted Get Promoted yns promotion Now that you have a brilliant WebGUI site you need to get people to visit it We can help there too Our marketing specialists can work with you to develop and execute the right combination of search engine placement advertising buys and affilliate programs to ensure your site gets the traffic it needs ','000001000002000002000006',NULL),('Vzv1pWpg_w6R_o-b0rM2qQ','Ad','','home/ad2',1147642515,1147642515,'3','7','4','WebGUI::Asset::File',1,'Ad Ad home ad2','000001000002000001000002',NULL),('NK8bqlwVRILJknqeCDPBHg','Getting Started (part 2)','\nTo begin managing content, you should log in and click the Turn Admin On! link. The default username is \"admin\" and the default password is \"123qwe\", but you probably customized both of those when you visited this site for the very first time.\n \n\nNow tha','getting_started/getting-started-part2',1147642515,1285796040,'3','7','4','WebGUI::Asset::Wobject::Article',1,'Getting Started part 2 Getting Started part 2 getting started getting started part2 To begin managing content you should log in and click the Turn Admin On link The default username is admin and the default password is 123qwe but you probably customized both of those when you visited this site for the very first time Now that you\'re logged in we recommend that you add a new user for yourself with admin privileges just in case you forget the login information for your primary admin account Don\'t worry if you lock yourself out you can always contact Plain Black® support to get instructions to get back in NOTE If you appear to get logged out while moving between pages this is most likely your browser displaying a cached version of the page Click on your browser\'s refresh button to correct the problem For more information about services related to WebGUI click here Enjoy your new WebGUI site ','000001000002000001000003',NULL),('IWFxZDyGhQ3-SLZhELa3qw','Benefits','\n\n\n\nRich User Interface\n \n\nPowerful API\n \n\n\n\nWebGUI has a rich user experience that allows users to place their \ncontent\nthrough a drag-n-drop interface; helps users pick dates, colors, and\nmore; and has a highly customizable rich editor to allow users to','home/key-benefits',1147642514,1277737686,'3','7','4','WebGUI::Asset::Wobject::Article',1,'Benefits Benefits home key benefits Rich User Interface Powerful API WebGUI has a rich user experience that allows users to place their content through a drag-n-drop interface helps users pick dates colors and more and has a highly customizable rich editor to allow users to quickly and easily format content WebGUI allows developers to quickly plug-in new functionality to get the most from a site In addition WebGUI\'s standardized plug-in points maintain the upgrade path even with customizations Short Friendly URLs Internationalization Never worry about ugly numeric ID\'s or other things in URL\'s that make it hard for search engines and people to use a site Users can work in an interface in their native language and content can be published in as many languages as necessary Personalization Easy To Install Users see their own view of the site through dynamically generated navigation and content In addition content can be displayed based upon users viewing habits With the use of the WebGUI Runtime Environment Unix Mac OS X Linux BSD and VMWare Appliance Windows setup takes minutes rather than hours ','000001000002000007',NULL),('OhdaFLE7sXOzo_SIP2ZUgA','Welcome','The WebGUI Content Engine® is a powerful, easy to use web application framework and content management system. WebGUI contains dozens of built-in features, and allows for full customization through its rich API. It\'s easy enough for the average busine','home/welcome',1147642513,1271445348,'3','7','4','WebGUI::Asset::Wobject::Article',1,'Welcome Welcome home welcome The WebGUI Content Engine® is a powerful easy to use web application framework and content management system WebGUI contains dozens of built-in features and allows for full customization through its rich API It\'s easy enough for the average business user to use but powerful enough for any large enterprise WebGUI serves thousands of small and large businesses schools universities governments associations churches projects and communities throughout the world For examples of who is using WebGUI visit the WebGUI Sightings page Shouldn\'t your site be on this list If you\'re new to WebGUI visit the Getting Started section Once you feel comfortable explore some of the professional services available for your new WebGUI site No matter what level you\'re at tell your friends about WebGUI ','000001000002000006',NULL),('7-0-style0000000000071','wg.jpg','','style3/wg.jpg',1147642511,1147642511,'3','7','12','WebGUI::Asset::File::Image',1,'wg.jpg wg.jpg style3 wg.jpg','000001000001000051000022',NULL),('7-0-style0000000000068','spacer.gif','','style3/spacer.gif',1147642510,1147642510,'3','7','12','WebGUI::Asset::File::Image',1,'spacer.gif spacer.gif style3 spacer.gif','000001000001000051000019',NULL),('7-0-style0000000000070','Style3 Coolmenu','','style3_coolmenu',1147642510,1147642510,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'Style3 Coolmenu Style3 Coolmenu style3 coolmenu','000001000001000051000021',NULL),('7-0-style0000000000066','nav_bg_on.jpg','','style3/nav_bg_on.jpg',1147642509,1147642509,'3','7','12','WebGUI::Asset::File::Image',1,'nav_bg_on.jpg nav_bg_on.jpg style3 nav bg on.jpg','000001000001000051000017',NULL),('7-0-style0000000000064','nav_bg2.jpg','','style3/nav_bg2.jpg',1147642509,1147642509,'3','7','12','WebGUI::Asset::File::Image',1,'nav_bg2.jpg nav_bg2.jpg style3 nav bg2.jpg','000001000001000051000015',NULL),('7-0-style0000000000065','nav_bg2_on.jpg','','style3/nav_bg2_on.jpg',1147642509,1147642509,'3','7','12','WebGUI::Asset::File::Image',1,'nav_bg2_on.jpg nav_bg2_on.jpg style3 nav bg2 on.jpg','000001000001000051000016',NULL),('7-0-style0000000000067','pb.jpg','','style3/pb.jpg',1147642509,1147642509,'3','7','12','WebGUI::Asset::File::Image',1,'pb.jpg pb.jpg style3 pb.jpg','000001000001000051000018',NULL),('7-0-style0000000000063','nav_bg1_on.jpg','','style3/nav_bg1_on.jpg',1147642508,1147642508,'3','7','12','WebGUI::Asset::File::Image',1,'nav_bg1_on.jpg nav_bg1_on.jpg style3 nav bg1 on.jpg','000001000001000051000014',NULL),('7-0-style0000000000060','main_top_bg.jpg','','style3/main_top_bg.jpg',1147642508,1147642508,'3','7','12','WebGUI::Asset::File::Image',1,'main_top_bg.jpg main_top_bg.jpg style3 main top bg.jpg','000001000001000051000011',NULL),('7-0-style0000000000062','nav_bg1.jpg','','style3/nav_bg1.jpg',1147642508,1147642508,'3','7','12','WebGUI::Asset::File::Image',1,'nav_bg1.jpg nav_bg1.jpg style3 nav bg1.jpg','000001000001000051000013',NULL),('7-0-style0000000000061','nav_bg.jpg','','style3/nav_bg.jpg',1147642508,1147642508,'3','7','12','WebGUI::Asset::File::Image',1,'nav_bg.jpg nav_bg.jpg style3 nav bg.jpg','000001000001000051000012',NULL),('7-0-style0000000000059','main_top.jpg','','style3/main_top.jpg',1147642507,1213386091,'3','7','12','WebGUI::Asset::File::Image',1,'main_top.jpg main_top.jpg style3 main top.jpg','000001000001000051000010',NULL),('7-0-style0000000000057','main_bg.jpg','','style3/main_bg.jpg',1147642507,1147642507,'3','7','12','WebGUI::Asset::File::Image',1,'main_bg.jpg main_bg.jpg style3 main bg.jpg','000001000001000051000008',NULL),('7-0-style0000000000058','main_bottom.jpg','','style3/main_bottom.jpg',1147642507,1147642507,'3','7','12','WebGUI::Asset::File::Image',1,'main_bottom.jpg main_bottom.jpg style3 main bottom.jpg','000001000001000051000009',NULL),('7-0-style0000000000055','header_left.jpg','','style3/header_left.jpg',1147642506,1147642506,'3','7','12','WebGUI::Asset::File::Image',1,'header_left.jpg header_left.jpg style3 header left.jpg','000001000001000051000006',NULL),('7-0-style0000000000056','header_right.jpg','','style3/header_right.jpg',1147642506,1147642506,'3','7','12','WebGUI::Asset::File::Image',1,'header_right.jpg header_right.jpg style3 header right.jpg','000001000001000051000007',NULL),('7-0-style0000000000054','header_bg.jpg','','style3/header_bg.jpg',1147642506,1147642506,'3','7','12','WebGUI::Asset::File::Image',1,'header_bg.jpg header_bg.jpg style3 header bg.jpg','000001000001000051000005',NULL),('7-0-style0000000000052','footer_bg.jpg','','style3/footer_bg.jpg',1147642505,1147642505,'3','7','12','WebGUI::Asset::File::Image',1,'footer_bg.jpg footer_bg.jpg style3 footer bg.jpg','000001000001000051000003',NULL),('7-0-style0000000000053','footer_right.jpg','','style3/footer_right.jpg',1147642505,1147642505,'3','7','12','WebGUI::Asset::File::Image',1,'footer_right.jpg footer_right.jpg style3 footer right.jpg','000001000001000051000004',NULL),('7-0-style0000000000046','rightCol_bg.jpg','','style2/rightcol_bg.jpg',1147642504,1147642504,'3','7','12','WebGUI::Asset::File::Image',1,'rightCol_bg.jpg rightCol_bg.jpg style2 rightcol bg.jpg','000001000001000050000015',NULL),('7-0-style0000000000049','WebGUI 7 Style 3','','root/import/webgui-7-style-3',1147642504,1224117144,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'WebGUI 7 Style 3 WebGUI 7 Style 3 root import webgui 7 style 3','000001000001000051',NULL),('7-0-style0000000000048','wg.jpg','','style2/wg.jpg',1147642504,1147642504,'3','7','12','WebGUI::Asset::File::Image',1,'wg.jpg wg.jpg style2 wg.jpg','000001000001000050000017',NULL),('7-0-style0000000000045','pb_wg_bg.jpg','','style2/pb_wg_bg.jpg',1147642503,1147642503,'3','7','12','WebGUI::Asset::File::Image',1,'pb_wg_bg.jpg pb_wg_bg.jpg style2 pb wg bg.jpg','000001000001000050000014',NULL),('7-0-style0000000000044','pb_wg.jpg','','style2/pb_wg.jpg',1147642503,1147642503,'3','7','12','WebGUI::Asset::File::Image',1,'pb_wg.jpg pb_wg.jpg style2 pb wg.jpg','000001000001000050000013',NULL),('7-0-style0000000000043','pb.jpg','','style2/pb.jpg',1147642503,1147642503,'3','7','12','WebGUI::Asset::File::Image',1,'pb.jpg pb.jpg style2 pb.jpg','000001000001000050000012',NULL),('7-0-style0000000000042','page_title_bg.jpg','','style2/page_title_bg.jpg',1147642502,1147642502,'3','7','12','WebGUI::Asset::File::Image',1,'page_title_bg.jpg page_title_bg.jpg style2 page title bg.jpg','000001000001000050000011',NULL),('7-0-style0000000000041','page_title.jpg','','style2/page_title.jpg',1147642502,1147642502,'3','7','12','WebGUI::Asset::File::Image',1,'page_title.jpg page_title.jpg style2 page title.jpg','000001000001000050000010',NULL),('7-0-style0000000000040','navbar_right.jpg','','style2/navbar_right.jpg',1147642502,1147642502,'3','7','12','WebGUI::Asset::File::Image',1,'navbar_right.jpg navbar_right.jpg style2 navbar right.jpg','000001000001000050000009',NULL),('7-0-style0000000000039','navbar_left.jpg','','style2/navbar_left.jpg',1147642502,1147642502,'3','7','12','WebGUI::Asset::File::Image',1,'navbar_left.jpg navbar_left.jpg style2 navbar left.jpg','000001000001000050000008',NULL),('7-0-style0000000000036','main_bg.jpg','','style2/main_bg.jpg',1147642501,1147642501,'3','7','12','WebGUI::Asset::File::Image',1,'main_bg.jpg main_bg.jpg style2 main bg.jpg','000001000001000050000005',NULL),('7-0-style0000000000038','navbar_bg.jpg','','style2/navbar_bg.jpg',1147642501,1147642501,'3','7','12','WebGUI::Asset::File::Image',1,'navbar_bg.jpg navbar_bg.jpg style2 navbar bg.jpg','000001000001000050000007',NULL),('7-0-style0000000000035','leftCol_header02.jpg','','style2/leftcol_header02.jpg',1147642501,1147642501,'3','7','12','WebGUI::Asset::File::Image',1,'leftCol_header02.jpg leftCol_header02.jpg style2 leftcol header02.jpg','000001000001000050000004',NULL),('7-0-style0000000000037','nav_bg.jpg','','style2/nav_bg.jpg',1147642501,1147642501,'3','7','12','WebGUI::Asset::File::Image',1,'nav_bg.jpg nav_bg.jpg style2 nav bg.jpg','000001000001000050000006',NULL),('7-0-style0000000000032','context_bg.jpg','','style2/context_bg.jpg',1147642500,1147642500,'3','7','12','WebGUI::Asset::File::Image',1,'context_bg.jpg context_bg.jpg style2 context bg.jpg','000001000001000050000001',NULL),('7-0-style0000000000031','WebGUI 7 Style 2','','root/import/webgui-7-style-2',1147642500,1147642500,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'WebGUI 7 Style 2 WebGUI 7 Style 2 root import webgui 7 style 2','000001000001000050',NULL),('7-0-style0000000000033','css02.css','','style2/css02.css',1147642500,1147642500,'3','7','12','WebGUI::Asset::Snippet',0,'css02.css css02.css style2 css02.css body html height:100 body background:#7c9ab0 url(\'^FileUrl(style2/main_bg.jpg repeat-y right margin:0px rightColumn width:20 height:100 background eeeeee url(\'^FileUrl(style2/rightCol_bg.jpg repeat-y right text-align:center rightColumn pb_wg_bg background url(\'^FileUrl(style2/pb_wg_bg.jpg repeat-x width:100 text-align:left rightColumn pb_wg background url(\'^FileUrl(style2/pb_wg.jpg left no-repeat height:53px leftColumn width:80 background white url(\'^FileUrl(style2/context_bg.jpg repeat-y right leftColumn header width:100 background:#7c9ab0 url(\'^FileUrl(style2/leftCol_header.jpg right no-repeat height:86px position:relative leftColumn header title leftColumn header title_bg color:white font-size:36pt font-weight:bold font-family:arial font-variant:small-caps letter-spacing:12px top:15px left:5px position:absolute z-index:10 leftColumn header title a color:white text-decoration:none leftColumn header title_bg color:black z-index:5 top:17px left:7px leftColumn context background fff url(\'^FileUrl(style2/context_bg.jpg repeat-y right width:95 font-family:verdana font-size:9pt color:#242424 moz-box-sizing:border-box position:relative padding-left:1 padding-right:1 padding-bottom:15px leftColumn context a color:#7C9AB0 font-weight:bold leftColumn context a:hover text-decoration:none leftColumn pageTitleBG background url(\'^FileUrl(style2/page_title_bg.jpg repeat-x width:100 leftColumn pageTitleBG pageTitle background url(\'^FileUrl(style2/page_title.jpg right no-repeat width:100 height:50px leftColumn pageTitleBG pageTitle h2 font-size:14pt color:#696969 font-family:arial font-weight:normal margin:0px padding-top:2px padding-left:25px letter-spacing:3px rightColumn nav width:85 background b5b5b5 url(\'^FileUrl(style2/nav_bg.jpg repeat-x top border-right:solid 848484 1px margin-left:auto margin-right:auto text-align:left padding-left:3px padding-top:7px padding-bottom:7px rightColumn nav a color:white font-size:8pt font-weight:bold text-decoration:none font-family:arial line-height:8pt rightColumn nav selectedMenuItem color:yellow loginStyles font-size:8pt font-family:arial padding-bottom:25px loginStyles a color:#89ACCF font-weight:bold border-bottom:solid transparent 2px text-decoration:none loginStyles a:hover border-bottom:dotted B2C9D9 2px copyright border-top:solid silver 3px background-color:gray font-family:arial font-size:9pt color:silver text-align:center ','000001000001000050000002',NULL),('7-0-style0000000000034','leftCol_header.jpg','','style2/leftcol_header.jpg',1147642500,1147642500,'3','7','12','WebGUI::Asset::File::Image',1,'leftCol_header.jpg leftCol_header.jpg style2 leftcol header.jpg','000001000001000050000003',NULL),('stevenav00000000000001','Style 01 Nav','','style1_nav',1147642499,1147642499,'3','7','12','WebGUI::Asset::Template',0,'Style 01 Nav Style 01 Nav style1 nav Navigation','000001000001000049000027',NULL),('PBnav000000style01lvl2','Style 01 Nav lvl2','','style1_nav_lvl2',1147642499,1147642499,'3','7','12','WebGUI::Asset::Template',0,'Style 01 Nav lvl2 untitled style1 nav lvl2 Navigation','000001000001000049000028',NULL),('7-0-style0000000000030','webgui_btn.jpg','','style1/webgui_btn.jpg',1147642499,1147642499,'3','7','12','WebGUI::Asset::File::Image',1,'webgui_btn.jpg webgui_btn.jpg style1 webgui btn.jpg','000001000001000049000029',NULL),('7-0-style0000000000026','RootTab Level 1','','roottab_level1',1147642499,1147642499,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'RootTab Level 1 RootTab Level 1 roottab level1','000001000001000049000025',NULL),('7-0-style0000000000024','orange_left01.jpg','','style1/orange_left01.jpg',1147642498,1147642498,'3','7','12','WebGUI::Asset::File::Image',1,'orange_left01.jpg orange_left01.jpg style1 orange left01.jpg','000001000001000049000023',NULL),('7-0-style0000000000023','nav_on.jpg','','style1/nav_on.jpg',1147642498,1147642498,'3','7','12','WebGUI::Asset::File::Image',1,'nav_on.jpg nav_on.jpg style1 nav on.jpg','000001000001000049000022',NULL),('7-0-style0000000000025','RootTab Level 0','','roottab_level0',1147642498,1147642498,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'RootTab Level 0 RootTab Level 0 roottab level0','000001000001000049000024',NULL),('7-0-style0000000000019','nav2_off_right.jpg','','style1/nav2_off_right.jpg',1147642497,1147642497,'3','7','12','WebGUI::Asset::File::Image',1,'nav2_off_right.jpg nav2_off_right.jpg style1 nav2 off right.jpg','000001000001000049000018',NULL),('7-0-style0000000000020','nav2_on_left.jpg','','style1/nav2_on_left.jpg',1147642497,1147642497,'3','7','12','WebGUI::Asset::File::Image',1,'nav2_on_left.jpg nav2_on_left.jpg style1 nav2 on left.jpg','000001000001000049000019',NULL),('7-0-style0000000000022','nav_bg.jpg','','style1/nav_bg.jpg',1147642497,1147642497,'3','7','12','WebGUI::Asset::File::Image',1,'nav_bg.jpg nav_bg.jpg style1 nav bg.jpg','000001000001000049000021',NULL),('7-0-style0000000000021','nav2_on_right.jpg','','style1/nav2_on_right.jpg',1147642497,1147642497,'3','7','12','WebGUI::Asset::File::Image',1,'nav2_on_right.jpg nav2_on_right.jpg style1 nav2 on right.jpg','000001000001000049000020',NULL),('7-0-style0000000000017','nav2_off_center.jpg','','style1/nav2_off_center.jpg',1147642496,1147642496,'3','7','12','WebGUI::Asset::File::Image',1,'nav2_off_center.jpg nav2_off_center.jpg style1 nav2 off center.jpg','000001000001000049000016',NULL),('7-0-style0000000000016','nav2_center_on.jpg','','style1/nav2_center_on.jpg',1147642496,1147642496,'3','7','12','WebGUI::Asset::File::Image',1,'nav2_center_on.jpg nav2_center_on.jpg style1 nav2 center on.jpg','000001000001000049000015',NULL),('7-0-style0000000000018','nav2_off_left.jpg','','style1/nav2_off_left.jpg',1147642496,1147642496,'3','7','12','WebGUI::Asset::File::Image',1,'nav2_off_left.jpg nav2_off_left.jpg style1 nav2 off left.jpg','000001000001000049000017',NULL),('7-0-style0000000000015','nav1_on_right.jpg','','style1/nav1_on_right.jpg',1147642496,1147642496,'3','7','12','WebGUI::Asset::File::Image',1,'nav1_on_right.jpg nav1_on_right.jpg style1 nav1 on right.jpg','000001000001000049000014',NULL),('7-0-style0000000000014','nav1_on_left.jpg','','style1/nav1_on_left.jpg',1147642495,1147642495,'3','7','12','WebGUI::Asset::File::Image',1,'nav1_on_left.jpg nav1_on_left.jpg style1 nav1 on left.jpg','000001000001000049000013',NULL),('7-0-style0000000000013','nav1_on.jpg','','style1/nav1_on.jpg',1147642495,1147642495,'3','7','12','WebGUI::Asset::File::Image',1,'nav1_on.jpg nav1_on.jpg style1 nav1 on.jpg','000001000001000049000012',NULL),('7-0-style0000000000011','nav1_off_left.jpg','','style1/nav1_off_left.jpg',1147642495,1147642495,'3','7','12','WebGUI::Asset::File::Image',1,'nav1_off_left.jpg nav1_off_left.jpg style1 nav1 off left.jpg','000001000001000049000010',NULL),('7-0-style0000000000012','nav1_off_right.jpg','','style1/nav1_off_right.jpg',1147642495,1147642495,'3','7','12','WebGUI::Asset::File::Image',1,'nav1_off_right.jpg nav1_off_right.jpg style1 nav1 off right.jpg','000001000001000049000011',NULL),('7-0-style0000000000009','nav1_off.jpg','','style1/nav1_off.jpg',1147642494,1147642494,'3','7','12','WebGUI::Asset::File::Image',1,'nav1_off.jpg nav1_off.jpg style1 nav1 off.jpg','000001000001000049000008',NULL),('7-0-style0000000000010','nav1_off_center.jpg','','style1/nav1_off_center.jpg',1147642494,1147642494,'3','7','12','WebGUI::Asset::File::Image',1,'nav1_off_center.jpg nav1_off_center.jpg style1 nav1 off center.jpg','000001000001000049000009',NULL),('7-0-style0000000000008','nav1_center_on.jpg','','style1/nav1_center_on.jpg',1147642494,1147642494,'3','7','12','WebGUI::Asset::File::Image',1,'nav1_center_on.jpg nav1_center_on.jpg style1 nav1 center on.jpg','000001000001000049000007',NULL),('7-0-style0000000000006','main_bg.gif','','style1/main_bg.gif',1147642493,1147642493,'3','7','12','WebGUI::Asset::File::Image',1,'main_bg.gif main_bg.gif style1 main bg.gif','000001000001000049000005',NULL),('7-0-style0000000000007','main_bg.jpg','','style1/main_bg.jpg',1147642493,1147642493,'3','7','12','WebGUI::Asset::File::Image',1,'main_bg.jpg main_bg.jpg style1 main bg.jpg','000001000001000049000006',NULL),('7-0-style0000000000004','gui_bottom.jpg','','style1/gui_bottom.jpg',1147642493,1147642493,'3','7','12','WebGUI::Asset::File::Image',1,'gui_bottom.jpg gui_bottom.jpg style1 gui bottom.jpg','000001000001000049000003',NULL),('7-0-style0000000000005','header.jpg','','style1/header.jpg',1147642493,1147642493,'3','7','12','WebGUI::Asset::File::Image',1,'header.jpg header.jpg style1 header.jpg','000001000001000049000004',NULL),('7-0-style0000000000001','WebGUI 7 Style 1','','root/import/webgui-7-style-1',1147642492,1147642492,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'WebGUI 7 Style 1 WebGUI 7 Style 1 root import webgui 7 style 1','000001000001000049',NULL),('7-0-style0000000000002','body_bg.jpg','','style1/body_bg.jpg',1147642492,1147642492,'3','7','12','WebGUI::Asset::File::Image',1,'body_bg.jpg body_bg.jpg style1 body bg.jpg','000001000001000049000001',NULL),('7-0-style0000000000003','css01.css','','style1/css01.css',1147642492,1147642492,'3','7','12','WebGUI::Asset::Snippet',0,'css01.css css01.css style1 css01.css body html text-align:center margin:0px height:100 background-color:#494949 main width:800px background url(\'^FileUrl(style1/main_bg.jpg repeat-y height:100 margin-left:auto margin-right:auto margin-top:0px margin-bottom:0px position:relative body > main height:auto min-height:100 main mainHeader width:800px height:133px background url(\'^FileUrl(style1/header.jpg top left no-repeat margin-bottom:0px position:relative main mainHeader title position:absolute top:23px left:145px font-size:32pt font-family:arial color:white font-weight:bold main mainHeader title a color:white text-decoration:none main mainContent background url(\'^FileUrl(style1/orange_left01.jpg left top no-repeat width:100 height:100 margin-top:0px text-align:left border:solid red 0px main > mainContent margin-top:0px min-height:500px main > mainContent > p margin-top:0px main mainContent mainText a:link color:#FF7F23 main mainContent mainText a:visited color:#D25900 LEVEL 1 AND 2 NAVIGATION main mainNav_1 main mainNav_2 border-bottom:dashed DADADA 1px width:621px height:25px text-align:left position:relative margin-left:137px clear:both main mainNav_1 a:link main mainNav_1 a:visited main mainNav_2 a:link main mainNav_2 a:visited color:white text-decoration:none top:5px position:relative moz-box-sizing:border-box main mainNav_1 a:hover,#main mainNav_2 a:hover color:black main mainNav_1 div left main mainNav_2 div left width:12px height:25px display:block float:left background url(\'^FileUrl(style1/nav1_off_left.jpg no-repeat top left main mainNav_2 div left background url(\'^FileUrl(style1/nav2_off_left.jpg no-repeat top left main mainNav_1 div center main mainNav_2 div center height:25px display:block float:left background url(\'^FileUrl(style1/nav1_off_center.jpg repeat-x top left color:white font-family:arial verdana font-size:8pt main mainNav_2 div center background url(\'^FileUrl(style1/nav2_off_center.jpg repeat-x top left main mainNav_1 div right main mainNav_2 div right width:10px height:25px display:block float:left background url(\'^FileUrl(style1/nav1_off_right.jpg no-repeat top left main mainNav_2 div right background url(\'^FileUrl(style1/nav2_off_right.jpg no-repeat top left main mainNav_1 div.navOn left background url(\'^FileUrl(style1/nav1_on_left.jpg no-repeat top left main mainNav_1 div.navOn center background url(\'^FileUrl(style1/nav1_center_on.jpg repeat-x top left main mainNav_1 div.navOn right background url(\'^FileUrl(style1/nav1_on_right.jpg no-repeat top left main mainNav_2 div.navOn left background url(\'^FileUrl(style1/nav2_on_left.jpg no-repeat top left main mainNav_2 div.navOn center background url(\'^FileUrl(style1/nav2_center_on.jpg repeat-x top left main mainNav_2 div.navOn right background url(\'^FileUrl(style1/nav2_on_right.jpg no-repeat top left main mainNav_1 div.navOn a:link main mainNav_1 div.navOn a:visited main mainNav_2 div.navOn a:link main mainNav_2 div.navOn a:visited color:black ENDOF LEVEL 1 AND 2 NAVIGATION main crumbTrail margin-left:177px margin-bottom:0px color:gray font-size:8pt font-weight:bold main crumbTrail a.crumbTrail:visited main crumbTrail a.crumbTrail:link color:silver font-size:8pt font-family:arial text-decoration:none font-weight:normal main crumbTrail a.crumbTrail:hover color:gray main mainText padding-left:150px font-family:verdana font-size:9pt width:600px margin-top:0px main gui bottom:0px left:0px position:absolute width:135px font-size:8pt color:black font-family:arial text-align:right main gui loginBox padding-right:12px moz-box-sizing:border-box width:100px float:right margin-bottom:10px main gui loginBox loginBoxField width:75px main gui loginBox loginBoxButton background-color:#D65501 color:white border:solid white 2px margin-top:4px font-variant:small-caps main gui a color:white copyright color:#fff position:absolute top:110px right:40px font-family:verdana font-size:8pt font-weight:bold background-color:#2D2D2D opacity:0.4 moz-opacity:0.4 khtml-opacity:0.4 padding:2px html copyright background transparent ','000001000001000049000002',NULL),('7F-BuEHi7t9bPi008H8xZQ','Default Survey Summary','','root/import/survey/default-survey-summary',1239248021,1250243000,'3','7','12','WebGUI::Asset::Template',0,'Default Survey Summary Default Survey Summary root import survey default survey summary Survey/Summary','000001000001000042000012',NULL),('CSN-ZON7Uwv8kxf3F1fh5Q','ZipArchiveAsset','','root/import/ziparchiveasset',1147642484,1147642484,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'ZipArchiveAsset ZipArchiveAsset root import ziparchiveasset','000001000001000053',NULL),('TCtybxdqmdwdvRn555zpCQ','RichEdit','','root/import/richedit',1147642484,1147642484,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'RichEdit RichEdit root import richedit','000001000001000032',NULL),('NywJYmGWe1f6EBXJnWg9Xg','Profile','','root/import/profile',1222803606,1222803638,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Profile Profile root import profile','000001000001000029',NULL),('9wKWdum0_8z-OhhquWLtSQ','WeatherData','','root/import/weatherdata',1147642483,1147642483,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'WeatherData WeatherData root import weatherdata','000001000001000048',NULL),('AgyFhx3eXlfZXNp2MkrsiQ','Edit','','root/import/profile/edit',1147642477,1222803665,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Edit Edit root import profile edit','000001000001000029000001',NULL),('F7MAQ-cpuvQ1KuC7J4P5zQ','View','','root/import/profile/view',1147642477,1222803673,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'View View root import profile view','000001000001000029000002',NULL),('oGfxez5sksyB_PcaAsEm_Q','SyndicatedContent','','root/import/syndicatedcontent',1147642482,1247053097,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'SyndicatedContent SyndicatedContent root import syndicatedcontent','000001000001000043',NULL),('5bnNzteN7w3NnK9mF4XiCg','Survey','','root/import/survey',1147642481,1250243000,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Survey Survey root import survey','000001000001000042',NULL),('Efe2W0UgrSRDltNJ87jlfg','StockData','','root/import/stockdata',1147642480,1147642480,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'StockData StockData root import stockdata','000001000001000039',NULL),('bbiA9Zq5Gy2oCFBlILO3QA','SQLReport','','root/import/sqlreport',1147642480,1147642480,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'SQLReport SQLReport root import sqlreport','000001000001000038',NULL),('RrV4aAPnn4dM0ZcU3OXnlw','style','','root/import/style',1147642480,1286336607,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'style style root import style','000001000001000041',NULL),('Ik9HHky10DIyFTKehUD1dw','Prompt','','root/import/prompt',1147642479,1222803478,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Prompt Prompt root import prompt','000001000001000031',NULL),('f_tn9FfoSfKWX43F83v_3w','Search','','root/import/search',1147642479,1247053009,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Search Search root import search','000001000001000034',NULL),('Da6KWn805L4B5e4HFgQRQA','Shortcut','','root/import/shortcut',1147642479,1147642479,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Shortcut Shortcut root import shortcut','000001000001000037',NULL),('TYo2Bwl7aafzTtdHlS-arQ','Product','','root/import/product',1147642478,1211664878,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Product Product root import product','000001000001000028',NULL),('VZK3CRgiMb8r4dBjUmCTgQ','Poll','','root/import/poll',1147642477,1247046242,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Poll Poll root import poll','000001000001000027',NULL),('jEz8iTGNWEt2I05IhVV19Q','Operation/RedeemSubscription','','root/import/operation/redeemsubscription',1147642477,1313542961,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Operation/RedeemSubscription Operation/RedeemSubscription root import operation redeemsubscription','000001000001000036000016',NULL),('BFfNj5wA9bDw8H3cnr8pTw','Navigation','','root/import/navigation',1147642475,1247046273,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Navigation Navigation root import navigation','000001000001000025',NULL),('bBzO4CWjqU_ile3gf5Iypw','MultiSearch','','root/import/multisearch',1147642475,1147642475,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'MultiSearch MultiSearch root import multisearch','000001000001000024',NULL),('cj2y4papTVGZRFdwTI-_fw','MessageBoard','','root/import/messageboard',1147642475,1147642475,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'MessageBoard MessageBoard root import messageboard','000001000001000023',NULL),('3womoo7Teyy2YKFa25-MZg','Address Book (Default)','','shopping-cart-collateral-items/address-book-default',1212098997,1313542961,'3','7','3','WebGUI::Asset::Template',0,'Address Book Default Address Book Default shopping cart collateral items address book default Shop/AddressBook','000001000001000036000013',NULL),('g8W53Pd71uHB9pxaXhWf_A','My Purchases Detail (Default)','','shopping-cart-collateral-items/my-purchases-detail-default',1213184121,1313542961,'3','7','3','WebGUI::Asset::Template',0,'My Purchases Detail Default My Purchases Detail Default shopping cart collateral items my purchases detail default Shop/MyPurchasesDetail','000001000001000036000015',NULL),('-WM2dt0ZGpDasuL2wWocxg','ProjectManager','','root/import/projectmanager',1222803056,1222803056,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'ProjectManager ProjectManager root import projectmanager','000001000001000030',NULL),('LdiozcIUciWuvt3Z-na5Ww','Matrix','','root/import/matrix',1147642474,1281501162,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Matrix Matrix root import matrix','000001000001000022',NULL),('default_post_received1','Default Post Received','','default_post_received',1222708029,1277868922,'3','7','4','WebGUI::Asset::Template',0,'Default Post Received Default Post Received default post received Collaboration/PostReceived','000001000001000008000029',NULL),('aNNC62qLAS6TB-0_MCYjsw','Layout','','root/import/layout',1147642471,1246969327,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Layout Layout root import layout','000001000001000019',NULL),('GYaFxnMu9UsEG8oanwB6TA','Folder','','root/import/folder',1147642470,1246965871,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Folder Folder root import folder','000001000001000014',NULL),('N13SD1Fpqk00UgBt1Z8ivQ','HttpProxy','','root/import/httpproxy',1147642470,1147642470,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'HttpProxy HttpProxy root import httpproxy','000001000001000016',NULL),('tPagC0AQErZXjLFZQ6OI1g','ImageAsset','','root/import/imageasset',1147642470,1246966459,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'ImageAsset ImageAsset root import imageasset','000001000001000017',NULL),('3uuBf8cYuj1sew2OJXl9tg','InOutBoard','','root/import/inoutboard',1147642470,1147642470,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'InOutBoard InOutBoard root import inoutboard','000001000001000018',NULL),('PBtmpl0000000000000005','Default LDAP Anonymous Registration Template','','default_ldap_anonymous_registration_template',1124395696,1287545014,'3','7','12','WebGUI::Asset::Template',0,'Default LDAP Anonymous Registration Template Default LDAP Anonymous Registration Template default ldap anonymous registration template Auth/LDAP/Create','000001000001000005000002000001',NULL),('PBtmpl0000000000000011','Default WebGUI Anonymous Registration Template','','default_webgui_anonymous_registration_template',1124395696,1287545014,'3','7','12','WebGUI::Asset::Template',0,'Default WebGUI Anonymous Registration Template Default WebGUI Anonymous Registration Template default webgui anonymous registration template Auth/WebGUI/Create','000001000001000005000005000001',NULL),('tXwf1zaOXTvsqPn6yu-GSw','FileAsset','','root/import/fileasset',1147642469,1246965607,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'FileAsset FileAsset root import fileasset','000001000001000013',NULL),('S1A9iAwKcQQ6P20uTqw-Ew','Dashboard','','root/import/dashboard',1147642468,1300763664,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Dashboard Dashboard root import dashboard','000001000001000009',NULL),('-K8Hj45mbelljN9-0CXZxg','DataForm',' ','root/import/dataform',1147642468,1257311887,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'DataForm DataForm root import dataform','000001000001000010',NULL),('GNOAsX98vCsl0JRwfwL-gg','Collaboration','','root/import/collaboration',1147642466,1277868921,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Collaboration Collaboration root import collaboration','000001000001000008',NULL),('pbtmpl0000000000000220','Flash Style 3 Template','','flash-style-3-template',1147642465,1247488979,'3','7','12','WebGUI::Asset::Template',0,'Flash Style 3 Template Flash Style 3 Template flash style 3 template FileAsset','000001000001000013000002',NULL),('pbtmpl0000000000000221','Flash Tutorial Template','','flash-tutorial-template',1147642465,1247487940,'3','7','12','WebGUI::Asset::Template',0,'Flash Tutorial Template Flash Tutorial Template flash tutorial template FileAsset','000001000001000013000003',NULL),('nbSrhXZQuxIjhWFaFPSuVA','AdminConsole','','root/import/adminconsole',1147642465,1147642465,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'AdminConsole AdminConsole root import adminconsole','000001000001000003',NULL),('TvOZs8U1kRXLtwtmyW75pg','Article','','root/import/article',1147642465,1256092368,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Article Article root import article','000001000001000004',NULL),('PBtmpl0000000000000027','Default Forum Notification','','default_forum_notification',1124395696,1311652541,'3','7','12','WebGUI::Asset::Template',0,'Default Forum Notification Default Forum Notification default forum notification Collaboration/Notification','000001000001000008000015',NULL),('-PkdI8l1idu-8gDX3iOdcw','One Over Two','','one_over_two',1247482172,1259133274,'3','7','12','WebGUI::Asset::Template',0,'One Over Two One Over Two one over two Layout','000001000001000019000007',NULL),('FEDP3dk8J3Chw_gyr7_XEQ','navigation.css','','navigation.css',1246278679,1246278679,'3','7','12','WebGUI::Asset::Snippet',0,'navigation.css navigation.css navigation.css Horizontal Menu styles horizontalMenu ul.menu padding 0 margin 0 0 1em list-style none width 100 clear floated li elements overflow auto clear floated li elements horizontalMenu ul.menu li float left horizontalMenu ul.menu li a float left padding 4px 8px margin-right 1px background ddd color 000 text-decoration none horizontalMenu ul.menu li.current a background:#eee horizontalMenu ul.menu li a:hover background:#fff Tabs tabbed navigation styles tabsMenu ul.menu margin 0 0 1em tabsMenu ul.menu li display inline tabsMenu ul.menu li a border 1px solid 999 border-bottom 0 padding 5px 10px 2px color 777 text-decoration:none tabsMenu ul.menu li.current a tabsMenu ul.menu li a:hover border 1px solid 000 border-bottom 0 color 000 Indent Nav styles indentMenu a.level0 margin-left:0px display:block indentMenu a.level1 margin-left:15px display:block indentMenu a.level2 margin-left:30px display:block indentMenu a.level3 margin-left:45px display:block indentMenu a.level4 margin-left:60px display:block ','000001000001000025000028',NULL),('PBnav00000000indentnav','Indent Nav','','indent_nav',1148579525,1259133275,'3','7','12','WebGUI::Asset::Template',0,'Indent Nav Indent Nav indent nav Navigation','000001000001000025000027',NULL),('PBtmpl0000000000000085','Default Email','','default_email',1124395696,1288747840,'3','7','12','WebGUI::Asset::Template',0,'Default Email Default Email default email DataForm','000001000001000010000002',NULL),('PBnav00000000000bullet','Bulleted List','','bulleted_list',1148579524,1259133276,'3','7','12','WebGUI::Asset::Template',0,'Bulleted List Bulleted List bulleted list Navigation','000001000001000025000026',NULL),('StockDataTMPL000000002','StockData Default Display','','stockdatatmpl000000002',1133743239,1229494994,'3','7','12','WebGUI::Asset::Template',0,'StockData Default Display StockData Default Display stockdatatmpl000000002 StockData/Display','000001000001000039000001',NULL),('2OcUWHVsu_L1sDFzIMWYqw','TimeTracking','','root/import/timetracking',1222803070,1222803070,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'TimeTracking TimeTracking root import timetracking','000001000001000046',NULL),('PBtmpl0000000000000014','Default WebGUI Password Recovery Template','','default_webgui_password_recovery_template',1124395696,1287545015,'3','7','12','WebGUI::Asset::Template',0,'Default WebGUI Password Recovery Template Default WebGUI Password Recovery Template default webgui password recovery template Auth/WebGUI/Recovery2','000001000001000005000008000001',NULL),('ProjectManagerTMPL0006','Default Resource List','','default-pm-resource-list',1157679165,1157679165,'3','7','12','WebGUI::Asset::Template',0,'Default Resource List Default Resource List default pm resource list ProjectManager_resourceList','000001000001000030000005000001',NULL),('ProjectManagerTMPL0005','Default Resource Popup','','default-pm-resource-popup',1157679165,1229579830,'3','7','12','WebGUI::Asset::Template',0,'Default Resource Popup Default Resource Popup default pm resource popup ProjectManager_resourcePopup','000001000001000030000005000002',NULL),('PBtmpl0000000000000032','Default Thread','','default_thread',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'Default Thread Default Thread default thread Collaboration/Thread','000001000001000008000014',NULL),('WeatherDataTmpl0000001','WeatherData Default View','','weatherdatatmpl0000001',1133743239,1210711353,'3','7','12','WebGUI::Asset::Template',0,'WeatherData Default View WeatherData Default View weatherdatatmpl0000001 WeatherData','000001000001000048000001',NULL),('PBasset000000000000001','Root','','root',1124395696,1124395696,'3','7','3','WebGUI::Asset',0,'Root Root root','000001',NULL),('PBrichedit000000000001','Content Manager\'s Rich Edit','','content_managers_rich_edit',1124395696,1256092369,'3','7','12','WebGUI::Asset::RichEdit',0,'Content Manager\'s Rich Edit Content Manager\'s Rich Edit content managers rich edit','000001000001000032000001',NULL),('PBrichedit000000000002','Forum Rich Edit','','forum_rich_edit',1124395696,1124395696,'3','7','12','WebGUI::Asset::RichEdit',0,'Forum Rich Edit Forum Rich Edit forum rich edit','000001000001000032000002',NULL),('SynConXSLT000000000001','RSS 0.9 XSLT Stylesheet','','xslt/rss0.9.xsl',1124395707,1124395707,'3','7','12','WebGUI::Asset::Snippet',0,'RSS 0.9 XSLT Stylesheet RSS 0.9 XSLT xslt rss0.9.xsl You\'re viewing an RSS version 0.9 feed Please use an RSS feed reader to view this content as intended','000001000001000043000003',NULL),('SynConXSLT000000000002','RSS 0.91 XSLT Stylesheet','','xslt/rss0.91.xsl',1124395707,1124395707,'3','7','12','WebGUI::Asset::Snippet',0,'RSS 0.91 XSLT Stylesheet RSS 0.91 XSLT xslt rss0.91.xsl You\'re viewing an RSS version 0.91 feed Please use an RSS feed reader to view this content as intended','000001000001000043000004',NULL),('SynConXSLT000000000003','RSS 1.0 XSLT Stylesheet','','xslt/rss1.0.xsl',1124395707,1124395707,'3','7','12','WebGUI::Asset::Snippet',0,'RSS 1.0 XSLT Stylesheet RSS 1.0 XSLT xslt rss1.0.xsl You\'re viewing an RSS version 1.0 feed Please use an RSS feed reader to view this content as intended ','000001000001000043000005',NULL),('SynConXSLT000000000004','RSS 2.0 XSLT Stylesheet','','xslt/rss2.0.xsl',1124395707,1124395707,'3','7','12','WebGUI::Asset::Snippet',0,'RSS 2.0 XSLT Stylesheet RSS 2.0 XSLT xslt rss2.0.xsl You\'re viewing an RSS version 2.0 feed Please use an RSS feed reader to view this content as intended ','000001000001000043000006',NULL),('vrKXEtluIhbmAS9xmPukDA','Donation (Default)','','root/import/default-donation-template',1212092352,1313542961,'3','7','12','WebGUI::Asset::Template',0,'Donation Default Donation Default root import default donation template Donation','000001000001000036000010',NULL),('eqb9sWjFEVq0yHunGV8IGw','Subscription (Default)','','root/import/subscription-default',1213182595,1313542961,'3','7','12','WebGUI::Asset::Template',0,'Subscription Default Subscription Default root import subscription default Subscription','000001000001000036000012',NULL),('PBtmpl0000000000000036','Default Admin Toggle Macro','','default_admin_toggle_macro',1124395696,1129049186,'3','7','12','WebGUI::Asset::Template',0,'Default Admin Toggle Macro Default Admin Toggle Macro default admin toggle macro Macro/AdminToggle','000001000001000021000001000001',NULL),('PBtmpl0000000000000037','Default Account Macro','','default_account_macro',1124395696,1129049186,'3','7','12','WebGUI::Asset::Template',0,'Default Account Macro Default Account Macro default account macro Macro/a_account','000001000001000021000002000001',NULL),('PBtmpl0000000000000038','Default Editable Toggle Macro','','default_editable_toggle_macro',1124395696,1129049186,'3','7','12','WebGUI::Asset::Template',0,'Default Editable Toggle Macro Default Editable Toggle Macro default editable toggle macro Macro/EditableToggle','000001000001000021000003000001',NULL),('PBtmpl0000000000000040','Default Group Add Macro','','default_group_add_macro',1124395696,1129049186,'3','7','12','WebGUI::Asset::Template',0,'Default Group Add Macro Default Group Add Macro default group add macro Macro/GroupAdd','000001000001000021000005000001',NULL),('PBtmpl0000000000000041','Default Group Delete Macro','','default_group_delete_macro',1124395696,1129049186,'3','7','12','WebGUI::Asset::Template',0,'Default Group Delete Macro Default Group Delete Macro default group delete macro Macro/GroupDelete','000001000001000021000006000001',NULL),('PBtmpl0000000000000042','Default Homelink','','default_homelink',1124395696,1129049186,'3','7','12','WebGUI::Asset::Template',0,'Default Homelink Default Homelink default homelink Macro/H_homeLink','000001000001000021000007000001',NULL),('PBtmpl0000000000000043','Default LoginToggle','','default_logintoggle',1124395696,1129049186,'3','7','12','WebGUI::Asset::Template',0,'Default LoginToggle Default LoginToggle default logintoggle Macro/LoginToggle','000001000001000021000008000001',NULL),('PBtmpl0000000000000045','Default Make Printable','','default_make_printable',1124395696,1129049186,'3','7','12','WebGUI::Asset::Template',0,'Default Make Printable Default Make Printable default make printable Macro/r_printable','000001000001000021000011000001',NULL),('PBtmpl0000000000000091','File no icon','','file_no_icon',1124395696,1129049189,'3','7','12','WebGUI::Asset::Template',0,'File no icon File no icon file no icon Macro/File','000001000001000021000004000002',NULL),('MK4fCNoyrx5SE8eyDfOpxg','Flash File','','flash-file',1247489252,1259133276,'3','7','12','WebGUI::Asset::Template',0,'Flash File Flash File flash file FileAsset','000001000001000013000004',NULL),('PBtmpl0000000000000132','Empty','','empty',1124395696,1258524916,'3','7','12','WebGUI::Asset::Template',0,'Empty Empty empty style','000001000001000041000004',NULL),('PBtmpl0000000000000140','Default Shortcut','','pbtmpl0000000000000140',1124395696,1129573244,'3','7','12','WebGUI::Asset::Template',0,'Default Shortcut Default Shortcut pbtmpl0000000000000140 Shortcut','000001000001000037000001',NULL),('hkj6WeChxFyqfP85UlRP8w','matrix.css','','new-matrix/matrix.css',1232664229,1281501163,'3','7','12','WebGUI::Asset::Snippet',0,'matrix.css matrix.css new matrix matrix.css wg-clear display inline clear both font-size:0px line-height:0px COLUMN STYLES matrixLeft float:left width:65 padding:1 min-height:1 background-color:#d2d2d2 moz-border-radius:4px webkit-border-radius 4px matrixRight float:left width:25 padding:0px min-height:1 moz-border-radius:4px webkit-border-radius 4px border solid silver 1px background-color:white margin-left:5px DROPSHADOW BUTTONS matrixLeft buttons span background-color:#888 position:relative padding:5px 0px 0px 0px moz-border-radius:4px webkit-border-radius 4px matrixLeft buttons button matrixLeft buttons a#return border:solid 2f495e 2px position:relative background-color:#e1e1e1 padding:auto 3px margin:0px font-size:11px line-height:13px position:relative top:-6px left:-2px height:22px cursor:pointer moz-border-radius:4px webkit-border-radius 4px font-weight:bold text-decoration:none color:#333 matrixLeft buttons a#return font-size:10px padding:3px 10px 2px 10px matrixLeft buttons button:hover matrixLeft buttons a#return:hover border-color:black color:white background-color:#444 WHITE AREA FOR THE LISTING OF OBJECTS TO COMPARE matrixLeft matrixListing background-color:white height:300px min-height:300px moz-border-radius:4px webkit-border-radius 4px margin:10px 2px 20px 2px padding:auto 10px matrixLeft matrixListing table border-collapse:collapse margin:0px padding:0px display:block matrixLeft matrixListing table a:link font-size:12px color:#111 matrixLeft matrixListing table a:visited color:#333 font-size:12px text-decoration:none matrixLeft matrixListing table a:hover text-decoration:none GRAY BAR THAT HOLDS THE SORT BUTTONS matrixLeft matrixListing sortButtons background-color:#f1f1f1 border:solid silver 1px moz-border-radius-topLeft:4px moz-border-radius-topRight:4px webkit-border-radius-topLeft 4px webkit-border-radius-topRight 4px border-bottom:solid D2D2D2 2px display:block STYLES TO OVERRIDE THE SORT BUTTON CSS BUILT INTO THE PERL CODE sortByViews-button sortByCompares-button sortByUpdated-button sortByClicks-button sortByName-button background none white-space:nowrap border-style:none cursor:pointer padding-bottom:4px border-style:none background-color:transparent border-right:solid silver 1px color:#555 sortByViews-button:hover sortByCompares-button:hover sortByUpdated-button:hover sortByClicks-button:hover sortByName-button:hover color:black MATRIX STATISTICS matrixRight mainTitle font-size:20px padding:5px 10px border-bottom solid gray 1px background-color:#d2d2d2 matrixRight textBox border-top:solid silver 1px padding:10px 5px matrixStatistics padding:10px matrixStatistics title font-weight:bold background-color:#f1f1f1 padding:2px 5px font-size:11px moz-border-radius:4px border:solid d2d2d2 1px matrixStatistics statistics margin-bottom:15px matrixStatistics label text-align:right width:100px font-size:10px matrixStatistics data font-size:10px matrixStatistics data a color:#111 matrixStatistics data a:hover text-decoration:none LINKS TO CONTROL ADMIN FUNCTIONS adminLinks background-color:#f1f1f1 adminLinks a:link adminLinks a:visited display:block text-align:center text-decoration:none color:#555 font-weight:normal font-size:10px padding:2px 5px border-top:solid silver 1px adminLinks a:hover color:black adminLinks a.newLink:link adminLinks a.newLink:visited background-color:#3498d1 color:white display:block adminLinks a.newLink:hover background-color:#39a6e5 STYLE FOR THE DETAILED LISTING matrixDetail min-width:1000px matrixDetail editBtns font-size:9px line-height:11px vertical-align:middle font-weight:normal margin-left:10px matrixDetail editBtns a color:black text-decoration:underline matrixDetail editBtns a:hover text-decoration:none matrixDetail stats screenshot float:left margin-right:20px matrixDetail commentsMail strong.title margin-bottom:0px margin-top:20px display:block background-color:#d2d2d2 padding:2px 10px border:solid 1px gray border-bottom-color:silver moz-border-radius-topLeft:4px moz-border-radius-topRight:4px matrixDetail assetAspectComments margin:0px 0px 20px 0px border:solid gray 1px background-color:#f1f1f1 moz-border-radius-bottomLeft:4px moz-border-radius-bottomRight:4px matrixDetail assetAspectComments assetAspectComment border-top:solid silver 1px border-bottom:solid gray 1px padding:3px background-color:#f5f5f5 matrixDetail assetAspectComments assetAspectCommentForm border-top:solid d2d2d2 5px padding:20px matrixDetail stats ul matrixDetail stats ul li list-style-type:none margin:0px padding:0px matrixDetail stats ul li display:block line-height:20px margin:4px 0px matrixDetail stats ul li strong display:block float:left width:130px text-align:right background-color:#f1f1f1 padding-right:5px margin-right:5px moz-border-radius:4px webkit-border-radius:3px font-size:11px border:solid d2d2d2 1px showLink background-color:#e1e1e1 border:2px solid 2F495E moz-border-radius:4px webkit-border-radius:4px padding:3px 10px text-decoration:none color:black showLink:hover hideLink:hover background-color:#555 color:white hideLink background-color:#f1f1f1 border:2px solid 2F495E border-bottom-style:none moz-border-radius-topLeft:4px moz-border-radius-topRight:4px webkit-border-radius-topLeft:4px webkit-border-radius-topRight:4px padding:3px 10px text-decoration:none color:black matrixMail background-color:#f1f1f1 padding:15px border:2px solid 2F495E moz-border-radius:4px moz-border-radius-topLeft:0px webkit-border-radius:4px webkit-border-radius-topLeft:0px margin-top:1px matrixMail tableData padding:5px margin:0px matrixMail input padding:0px margin:0px matrixMail formDescription text-align:right vertical-align:middle padding-right:10px font-weight:bold matrixMail form img margin-top:-18px matrixMail verify_formId height:45px line-height:45px font-size:35px padding:0px margin:0px margin-right:20px matrixRatings width:264px position:relative left:-2px top:12px matrixRatings table margin-left:0px matrixRatings td overflow:hidden matrixRatings formDescription text-align:right background-color:#97BCD1 border:solid 4D606B 1px padding:2px 5px font-weight:bold font-size:10x moz-border-radius:4px webkit-border-radius:4px color:#333 matrixRatings formDescription a:before text-decoration:none matrixRatings formDescription a display:block color:red text-decoration:none matrixRatings formDescription a:hover text-decoration:underline matrixAttributes float:left width:40 min-width:20 max-width:45 margin-right:20px rightDetails float:left width:20 min-width:20 max-width:45 attributes border:solid d2d2d2 1px background-color:#f1f1f1 margin-top:10px moz-border-radius:4px webkit-border-radius:4px padding:10px attributes table border-collapse:collapse padding:0px margin:0px attributes table td padding:2px margin:0px yui-dt0-col-value font-weight:bold font-size:14px padding:3px white-space:no-wrap COMPARISON STYLES compareList table border-collapse:collapse border:solid silver 1px margin-top:5px compareList table th a color:black padding:1px 5px compareList table td background-color:#f1f1f1 border-top:solid gray 1px border-bottom:solid silver 1px compareList yui-dt-liner color:#39A6E5 compareList yui-dt-col-name yui-dt-liner font-style:italic font-size:10px color:#555 compareList yui-dt-col-name yui-dt-liner b font-size:15px font-style:normal padding-right:25px color:black ','000001000001000022000006',NULL),('ZipArchiveTMPL00000001','Default Zip Archive Template','','zip-archive-template',1133743240,1169738426,'3','7','12','WebGUI::Asset::Template',0,'Default Zip Archive Template Default Zip Archive Template zip archive template ZipArchiveAsset','000001000001000053000001',NULL),('PBasset000000000000002','Import Node','','root/import',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Import Node Import root import','000001000001',NULL),('_iHetEvMQUOoxS-T2CM0sQ','Getting Started','','getting_started',1124395696,1273172789,'3','7','3','WebGUI::Asset::Wobject::Layout',1,'Getting Started Getting Started getting started','000001000002000001',NULL),('x3OFY6OJh_qsXkZfPwug4A','Site Map','','site_map',1124395696,1271348790,'3','7','3','WebGUI::Asset::Wobject::Layout',1,'Site Map Site Map site map','000001000002000005',NULL),('PBnav00000000000000001','crumbTrail','','crumbtrail',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'crumbTrail crumbTrail crumbtrail','000001000001000025000008',NULL),('PBnav00000000000000002','SpecificSubMenuVertical','','specificsubmenuvertical',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'SpecificSubMenuVertical SpecificSubMenuVertical specificsubmenuvertical','000001000001000025000017',NULL),('PBnav00000000000000006','SpecificSubMenuHorizontal','','specificsubmenuhorizontal',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'SpecificSubMenuHorizontal SpecificSubMenuHorizontal specificsubmenuhorizontal','000001000001000025000018',NULL),('PBnav00000000000000007','TopLevelMenuVertical','','toplevelmenuvertical',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'TopLevelMenuVertical TopLevelMenuVertical toplevelmenuvertical','000001000001000025000019',NULL),('PBnav00000000000000008','TopLevelMenuHorizontal','','toplevelmenuhorizontal',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'TopLevelMenuHorizontal TopLevelMenuHorizontal toplevelmenuhorizontal','000001000001000025000020',NULL),('PBnav00000000000000009','RootTab','','roottab',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'RootTab RootTab roottab','000001000001000025000021',NULL),('PBnav00000000000000010','TopDropMenu','','topdropmenu',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'TopDropMenu TopDropMenu topdropmenu','000001000001000025000022',NULL),('PBnav00000000000000011','dtree','','dtree',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'dtree dtree dtree','000001000001000025000023',NULL),('PBnav00000000000000012','coolmenu','','coolmenu',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'coolmenu coolmenu coolmenu','000001000001000025000024',NULL),('PBnav00000000000000013','Synopsis','','synopsis',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'Synopsis Synopsis synopsis','000001000001000025000025',NULL),('PBnav00000000000000014','FlexMenu','','flexmenu',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'FlexMenu FlexMenu flexmenu','000001000001000025000009',NULL),('PBnav00000000000000015','currentMenuVertical','','currentmenuvertical',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'currentMenuVertical currentMenuVertical currentmenuvertical','000001000001000025000010',NULL),('PBnav00000000000000016','currentMenuHorizontal','','currentmenuhorizontal',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'currentMenuHorizontal currentMenuHorizontal currentmenuhorizontal','000001000001000025000011',NULL),('PBnav00000000000000017','PreviousDropMenu','','previousdropmenu',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'PreviousDropMenu PreviousDropMenu previousdropmenu','000001000001000025000012',NULL),('PBnav00000000000000018','previousMenuVertical','','previousmenuvertical',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'previousMenuVertical previousMenuVertical previousmenuvertical','000001000001000025000013',NULL),('PBnav00000000000000019','previousMenuHorizontal','','previousmenuhorizontal',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'previousMenuHorizontal previousMenuHorizontal previousmenuhorizontal','000001000001000025000014',NULL),('PBnav00000000000000020','rootmenu','','rootmenu',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'rootmenu rootmenu rootmenu','000001000001000025000015',NULL),('PBnav00000000000000021','SpecificDropMenu','','specificdropmenu',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'SpecificDropMenu SpecificDropMenu specificdropmenu','000001000001000025000016',NULL),('pJd5TLAjfWMVXD6sCRLwUg','Site Map','','site_map/site_map',1124395696,1271348790,'3','7','3','WebGUI::Asset::Wobject::Navigation',1,'Site Map Site Map site map site map','000001000002000005000001',NULL),('fK-HMSboA3uu0c1KYkYspA','The Latest News','This is the latest news from Plain Black and WebGUI pulled directly from the site every hour.','the_latest_news/the_latest_news',1124395696,1124395696,'3','7','3','WebGUI::Asset::Wobject::SyndicatedContent',1,'The Latest News The Latest News the latest news the latest news This is the latest news from Plain Black and WebGUI pulled directly from the site every hour','000001000002000004000001',NULL),('WikiFrontTmpl000000001','Default Wiki Front Page','','default-wiki-front-page',1165460175,1273032720,'3','7','12','WebGUI::Asset::Template',0,'Default Wiki Front Page Default Wiki Front Page default wiki front page WikiMaster_front','000001000001000052000002',NULL),('WikiSearchTmpl00000001','Default Wiki Search','','default-wiki-search',1165460175,1273032720,'3','7','12','WebGUI::Asset::Template',0,'Default Wiki Search Default Wiki Search default wiki search WikiMaster_search','000001000001000052000003',NULL),('WikiPHTmpl000000000001','Default Page History','','default-wiki-page-history',1165460175,1273032720,'3','7','12','WebGUI::Asset::Template',0,'Default Page History Default Page History default wiki page history WikiPage_pageHistory','000001000001000052000004',NULL),('WikiPageTmpl0000000001','Default Wiki Page','','default-wiki-page',1165460175,1273032720,'3','7','12','WebGUI::Asset::Template',0,'Default Wiki Page Default Wiki Page default wiki page WikiPage','000001000001000052000005',NULL),('WikiPageEditTmpl000001','Default Wiki Page Edit','','default-wiki-page-edit',1165460175,1273032720,'3','7','12','WebGUI::Asset::Template',0,'Default Wiki Page Edit Default Wiki Page Edit default wiki page edit WikiPage_edit','000001000001000052000006',NULL),('WikiMPTmpl000000000001','Default Most Popular','','default-wiki-most-popular',1165460175,1273032720,'3','7','12','WebGUI::Asset::Template',0,'Default Most Popular Default Most Popular default wiki most popular WikiMaster_mostPopular','000001000001000052000007',NULL),('SQLReportDownload00001','SQLReport Download Default Template','','SQLReportDownload0001',1171466654,1171466654,'3','7','12','WebGUI::Asset::Template',0,'SQLReport Download Default Template untitled SQLReportDownload0001 SQLReport/Download','000001000001000038000002',NULL),('newsletter000000000001',' Summary Newsletter (default)','','newsletterdefaulttemplate',1185754569,1185754569,'3','7','3','WebGUI::Asset::Template',0,'Summary Newsletter default Summary Newsletter newsletterdefaulttemplate newsletter','000001000001000026000001',NULL),('newslettersubscrip0001','My Subscriptions (default)','','newslettermysubscriptionstemplate',1185754569,1221692339,'3','7','3','WebGUI::Asset::Template',0,'My Subscriptions default My Subscriptions newslettermysubscriptionstemplate newsletter/mysubscriptions','000001000001000026000003',NULL),('AjhlNO3wZvN5k4i4qioWcg','Default Answer Edit','','root/import/survey/default-answer-edit',1226009658,1250243000,'3','7','12','WebGUI::Asset::Template',0,'Default Answer Edit Default Answer Edit root import survey default answer edit Survey/Edit','000001000001000042000009',NULL),('QHn6T9rU7KsnS3Y70KCNTg','Account','','root/import/account',1227080251,1233173545,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Account Account root import account','000001000001000002',NULL),('HPDOcsj4gBme8D4svHodBw','Profile','','root/import/account/profile',1225404573,1225404573,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Profile Profile root import account profile','000001000001000002000001',NULL),('WikiKeyword00000000001',' Wiki Pages By Keyword (default)','','wiki-master-by-keyword-template.tmpl',1185754571,1274238756,'3','7','3','WebGUI::Asset::Template',0,'Wiki Pages By Keyword default Wiki Pages By Keyword wiki master by keyword template.tmpl WikiMaster_byKeyword','000001000001000052000008',NULL),('tempspace0000000000000','Tempspace','','tempspace',1185754574,1185754574,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'Tempspace Tempspace tempspace','000001000004',NULL),('QpmlAiYZz6VsKBM-_0wXaw','UsersOnline Macro',' ','users-online-macro-templates',1224616691,1224616691,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'UsersOnline Macro UsersOnline Macro users online macro templates','000001000001000021000012',NULL),('h_T2xtOxGRQ9QJOR6ebLpQ','UsersOnline Default View','','users-online-macro-templates/usersonline-default-view',1224616545,1224616545,'3','7','3','WebGUI::Asset::Template',0,'UsersOnline Default View UsersOnline Default View users online macro templates usersonline default view Macro/UsersOnline','000001000001000021000012000001',NULL),('4Ekp0kJoJllRRRo_J1Rj6w','UsersOnline Detailed View','','users-online-macro-templates/usersonline-detailed-view',1224616672,1224616672,'3','7','3','WebGUI::Asset::Template',0,'UsersOnline Detailed View UsersOnline Detailed View users online macro templates usersonline detailed view Macro/UsersOnline','000001000001000021000012000002',NULL),('THQhn1C-ooj-TLlEP7aIJQ','gallery-ie.css','','root/import/gallery-templates/gallery-ie.css',1225313951,1285124158,'3','7','3','WebGUI::Asset::Snippet',0,'gallery-ie.css gallery-ie.css root import gallery templates gallery ie.css wgPicture float:left wgAlbum float:left wgGallery pagination li wgGallery pagination a float:left wgGallery container display:inline-block ','000001000001000015000025',NULL),('itransact_credentials1','ITransact Credentials (Default)','','shopping-cart-collateral-items/itransact-credentials',1228953856,1313542961,'3','7','4','WebGUI::Asset::Template',0,'ITransact Credentials Default ITransact Credentials Default shopping cart collateral items itransact credentials Shop/Credentials','000001000001000036000018',NULL),('1oBRscNIcFOI-pETrCOspA','Default Section Edit','','root/import/survey/default-section-edit',1226009642,1250243000,'3','7','12','WebGUI::Asset::Template',0,'Default Section Edit Default Section Edit root import survey default section edit Survey/Edit','000001000001000042000007',NULL),('gI_TxK-5S4DNuv42wpImmw','Gallery Templates',' ','root/import/gallery-templates',1197330678,1285124155,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'Gallery Templates Gallery Templates root import gallery templates','000001000001000015',NULL),('jME5BEDYVDlBZ8jIQA9-jQ','Default Gallery Search','','root/import/gallery-templates/default-gallery-search',1197927169,1285124155,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery Search Default Gallery Search root import gallery templates default gallery search Gallery/Search','000001000001000015000001',NULL),('azCqD0IjdQSlM3ar29k5Sg','Default Gallery List Albums View','','root/import/gallery-templates/default-gallery-list-albums-view',1197881748,1285124155,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery List Albums View Default Gallery List Albums View root import gallery templates default gallery list albums view Gallery/ListAlbums','000001000001000015000002',NULL),('05FpjceLYhq4csF1Kww1KQ','Default Gallery View Album','','root/import/gallery-templates/default-gallery-view-album',1197879361,1285124155,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery View Album Default Gallery View Album root import gallery templates default gallery view album GalleryAlbum/View','000001000001000015000003',NULL),('KAMdiUdJykjN02CPHpyZOw','Default Gallery View Album Slideshow','','root/import/gallery-templates/default-gallery-view-album-slideshow',1197825787,1285124155,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery View Album Slideshow Default Gallery View Album Slideshow root import gallery templates default gallery view album slideshow GalleryAlbum/ViewSlideshow','000001000001000015000005',NULL),('OkphOEdaSGTXnFGhK4GT5A','Default Gallery List Files For User','','root/import/gallery-templates/default-gallery-list-files-for-user',1197825794,1285124155,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery List Files For User Default Gallery List Files For User root import gallery templates default gallery list files for user Gallery/ListFilesForUser','000001000001000015000006',NULL),('TEId5V-jEvUULsZA0wuRuA','Default Gallery View Photo','','root/import/gallery-templates/default-gallery-view-photo',1197989443,1285124155,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery View Photo Default Gallery View Photo root import gallery templates default gallery view photo GalleryFile/View','000001000001000015000007',NULL),('6X-7Twabn5KKO_AbgK3PEw','Default Gallery Edit Album','','root/import/gallery-templates/default-gallery-edit-album',1197987780,1285124155,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery Edit Album Default Gallery Edit Album root import gallery templates default gallery edit album GalleryAlbum/Edit','000001000001000015000008',NULL),('7JCTAiu1U_bT9ldr655Blw','Default Gallery Edit Photo','','root/import/gallery-templates/default-gallery-edit-photo',1197825824,1285124155,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery Edit Photo Default Gallery Edit Photo root import gallery templates default gallery edit photo GalleryFile/Edit','000001000001000015000009',NULL),('0X4Q3tBWUb_thsVbsYz9xQ','Default Gallery Add Archive','','root/import/gallery-templates/default-gallery-add-archive',1197987372,1285124155,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery Add Archive Default Gallery Add Archive root import gallery templates default gallery add archive GalleryAlbum/AddArchive','000001000001000015000010',NULL),('m3IbBavqzuKDd2PGGhKPlA','Default Gallery Make Shortcut','','root/import/gallery-templates/default-gallery-make-shortcut',1197825845,1285124155,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery Make Shortcut Default Gallery Make Shortcut root import gallery templates default gallery make shortcut GalleryFile/MakeShortcut','000001000001000015000011',NULL),('UTNFeV7B_aSCRmmaFCq4Vw','Default Gallery Delete Album','','root/import/gallery-templates/default-gallery-delete-album',1197825856,1285124155,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery Delete Album Default Gallery Delete Album root import gallery templates default gallery delete album GalleryAlbum/Delete','000001000001000015000012',NULL),('zcX-wIUct0S_np14xxOA-A','Default Gallery Delete File','','root/import/gallery-templates/default-gallery-delete-file',1197825866,1285124155,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery Delete File Default Gallery Delete File root import gallery templates default gallery delete file GalleryFile/Delete','000001000001000015000013',NULL),('MBZK_LPVzqhb4TV4mMRTJg','admin_ie7.css','','root/import/gallery-templates/admin_ie7.css',1197330678,1285124155,'3','7','3','WebGUI::Asset::Snippet',0,'admin_ie7.css admin_ie7.css root import gallery templates admin ie7.css input.captionEnter margin-left 5px width 92px ','000001000001000015000014',NULL),('bANo8aiAPA7aY_oQZKxIWw','rss.gif','','root/import/gallery-templates/images/rss.gif',1197330678,1285124155,'3','7','3','WebGUI::Asset::File::Image',1,'rss.gif rss.gif root import gallery templates images rss.gif','000001000001000015000017000001',NULL),('2ci_v2d4x4uvyjTRlC49OA','moveDown.gif','','root/import/gallery-templates/images/movedown.gif',1197330678,1285124156,'3','7','3','WebGUI::Asset::File::Image',1,'moveDown.gif moveDown.gif root import gallery templates images movedown.gif','000001000001000015000017000002',NULL),('O-EsSzKgAk1KolFT-x_KsA','moveUp.gif','','root/import/gallery-templates/images/moveup.gif',1197330678,1285124156,'3','7','3','WebGUI::Asset::File::Image',1,'moveUp.gif moveUp.gif root import gallery templates images moveup.gif','000001000001000015000017000003',NULL),('fdd8tGExyVwHyrB8RBbKXg','next.gif','','root/import/gallery-templates/images/next.gif',1197330839,1285124156,'3','7','3','WebGUI::Asset::File::Image',1,'next.gif next.gif root import gallery templates images next.gif','000001000001000015000017000004',NULL),('BpisgHl4ZDcSECJp6oib1w','play.gif','','root/import/gallery-templates/images/play.gif',1197330840,1285124156,'3','7','3','WebGUI::Asset::File::Image',1,'play.gif play.gif root import gallery templates images play.gif','000001000001000015000017000005',NULL),('zshreRgPAXtnF0DtVbQ1Yg','previous.gif','','root/import/gallery-templates/images/previous.gif',1197330840,1285124156,'3','7','3','WebGUI::Asset::File::Image',1,'previous.gif previous.gif root import gallery templates images previous.gif','000001000001000015000017000006',NULL),('mM3bjP_iG9sv5nQb4S17tQ','Default Gallery View Album RSS','','root/import/gallery-templates/default-gallery-album-rss',1197879662,1285124158,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery View Album RSS Default Gallery View Album RSS root import gallery templates default gallery album rss GalleryAlbum/ViewRss','000001000001000015000018',NULL),('ilu5BrM-VGaOsec9Lm7M6Q','Default Gallery List Albums RSS','','root/import/gallery-templates/default-gallery-list-albums-rss',1197878780,1285124158,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery List Albums RSS Default Gallery List Albums RSS root import gallery templates default gallery list albums rss Gallery/ListAlbumsRss','000001000001000015000019',NULL),('-ANLpoTEP-n4POAdRxCzRw','Default Gallery List Files For User RSS','','root/import/gallery-templates/default-gallery-list-files-for-user-rss',1197880641,1285124158,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery List Files For User RSS Default Gallery List Files For User RSS root import gallery templates default gallery list files for user rss Gallery/ListFilesForUserRss','000001000001000015000020',NULL),('OxJWQgnGsgyGohP2L3zJPQ','Default Gallery Edit Comment','','root/import/gallery-templates/default-gallery-edit-comment',1204663962,1285124158,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery Edit Comment Default Gallery Edit Comment root import gallery templates default gallery edit comment GalleryFile/EditComment','000001000001000015000021',NULL),('Tsg7xmPYv782j6IVz7yHFg','Calendar Templates','','root/import/calendar-templates',1204890713,1213244777,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Calendar Templates Calendar Templates root import calendar templates','000001000001000006',NULL),('kj3b-X3i6zRKnhLb4ZiCLw','Default Calendar List View','','root/import/calendar-templates/default-calendar-list-view',1204890713,1295931508,'3','7','3','WebGUI::Asset::Template',0,'Default Calendar List View Default Calendar List View root import calendar templates default calendar list view Calendar/List','000001000001000006000001',NULL),('uRL9qtk7Rb0YRJ41LmHOJw','Default Calendar Print List View','','root/import/calendar-templates/default-calendar-print-list-view',1204890713,1229311072,'3','7','3','WebGUI::Asset::Template',0,'Default Calendar Print List View Default Calendar Print List View root import calendar templates default calendar print list view Calendar/Print/List','000001000001000006000002',NULL),('CalendarWeek0000000001','Default Calendar Week','','root/import/calendar-templates/default-calendar-week',1204890713,1230358389,'3','7','12','WebGUI::Asset::Template',0,'Default Calendar Week Default Calendar Week root import calendar templates default calendar week Calendar/Week','000001000001000006000003',NULL),('CalendarDay00000000001','Default Calendar Day','','root/import/calendar-templates/default-calendar-day',1204890713,1230358389,'3','7','12','WebGUI::Asset::Template',0,'Default Calendar Day Default Calendar Day root import calendar templates default calendar day Calendar/Day','000001000001000006000004',NULL),('CalendarEvent000000001','Default Calendar Event','','root/import/calendar-templates/default-calendar-event',1204890713,1295931508,'3','7','12','WebGUI::Asset::Template',0,'Default Calendar Event Default Calendar Event root import calendar templates default calendar event Calendar/Event','000001000001000006000005',NULL),('CalendarEventEdit00001','Default Calendar Event Edit','','root/import/calendar-templates/default-calendar-event-edit',1205160982,1269401468,'3','7','12','WebGUI::Asset::Template',0,'Default Calendar Event Edit Default Calendar Event Edit root import calendar templates default calendar event edit Calendar/EventEdit','000001000001000006000006',NULL),('CalendarSearch00000001','Default Calendar Search','','root/import/calendar-templates/default-calendar-search',1204890713,1230358389,'3','7','12','WebGUI::Asset::Template',0,'Default Calendar Search Default Calendar Search root import calendar templates default calendar search Calendar/Search','000001000001000006000008',NULL),('CalendarPrintEvent0001','Default Calendar Print Event','','root/import/calendar-templates/default-calendar-print-event',1204890714,1215396964,'3','7','12','WebGUI::Asset::Template',0,'Default Calendar Print Event Default Calendar Print Event root import calendar templates default calendar print event Calendar/Print/Event','000001000001000006000009',NULL),('CalendarPrintMonth0001','Default Calendar Print Month','','root/import/calendar-templates/default-calendar-print-month',1204890714,1204890714,'3','7','12','WebGUI::Asset::Template',0,'Default Calendar Print Month Default Calendar Print Month root import calendar templates default calendar print month Calendar/Print/Month','000001000001000006000010',NULL),('CalendarPrintWeek00001','Default Calendar Print Week','','root/import/calendar-templates/default-calendar-print-week',1204890714,1204890714,'3','7','12','WebGUI::Asset::Template',0,'Default Calendar Print Week Default Calendar Print Week root import calendar templates default calendar print week Calendar/Print/Week','000001000001000006000011',NULL),('CalendarPrintDay000001','Default Calendar Print Day','','root/import/calendar-templates/default-calendar-print-day',1204890714,1204890714,'3','7','12','WebGUI::Asset::Template',0,'Default Calendar Print Day Default Calendar Print Day root import calendar templates default calendar print day Calendar/Print/Day','000001000001000006000012',NULL),('jnYdqDkUR8x7Pv2eGR1qTA','Thingy Templates','','root/import/thingy-templates',1205431513,1216250666,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Thingy Templates Thingy Templates root import thingy templates','000001000001000044',NULL),('ThingyTmpl000000000001','Default Thingy','','templates/thingy-default',1205003608,1237914005,'3','7','12','WebGUI::Asset::Template',0,'Default Thingy Default Thingy templates thingy default Thingy','000001000001000044000001',NULL),('ThingyTmpl000000000002','Default Thingy View Thing','','templates/thingy-default-view-thing',1205003676,1299559129,'3','7','12','WebGUI::Asset::Template',0,'Default Thingy View Thing Default Thingy View Thing templates thingy default view thing Thingy/ViewThing','000001000001000044000002',NULL),('ThingyTmpl000000000003','Default Thingy Edit Thing','','templates/thingy-default-edit-thing',1205003711,1224518002,'3','7','12','WebGUI::Asset::Template',0,'Default Thingy Edit Thing Default Thingy Edit Thing templates thingy default edit thing Thingy/EditThing','000001000001000044000003',NULL),('ThingyTmpl000000000004','Default Thingy Search Thing','','templates/thingy-default-search-thing',1205158717,1277868920,'3','7','12','WebGUI::Asset::Template',0,'Default Thingy Search Thing Default Thingy Search Thing templates thingy default search thing Thingy/SearchThing','000001000001000044000004',NULL),('7fE8md51vTCcuJFOvxNaGA','thumbnails.js','','root/import/gallery-templates/thumbnails.js',1205443600,1285124158,'3','7','3','WebGUI::Asset::Snippet',0,'thumbnails.js thumbnails.js root import gallery templates thumbnails.js Depends on BrowserDetect.js Make the thumbnails a little bigger while the mouse is over them function scaleThumbUp e anchor IE6 doesn\'t like to do the right thing with the CSS stuff below exclude it if BrowserDetect if BrowserDetect.browser == Explorer BrowserDetect.version < 7 return Make a new image with the same image src as the anchor var oldImage = anchor.getElementsByTagName(\"img\")[0 var newContainer = document.createElement(\"div newContainer.className = thumb-popup newContainer.style.position = absolute newContainer.style.zIndex = 1 var newWidth = oldImage.offsetWidth 3 var newHeight = oldImage.offsetHeight 3 var newLeft = anchor.offsetLeft + anchor.offsetWidth 2 newWidth 2 var newTop = anchor.offsetTop + anchor.offsetHeight 2 newHeight 2 newContainer.style.left = newLeft + px newContainer.style.top = newTop + px newContainer.style.width = newWidth + px newContainer.style.height = newHeight + px var newImage = document.createElement(\"img newImage.src = oldImage.src newImage.style.width = 100 newImage.style.height = 100 newContainer.appendChild newImage Make some text for the caption var caption = document.createElement(\"div caption.appendChild document.createTextNode anchor.title caption.className = caption newContainer.appendChild caption var newBox = document.createElement(\"a newBox.href = anchor.href newBox.style.display = block newBox.style.position = absolute newBox.style.zIndex = 10 newBox.style.left = anchor.offsetLeft + px newBox.style.top = anchor.offsetTop + px newBox.style.height = anchor.offsetHeight + px newBox.style.width = anchor.offsetWidth + px newBox.style.border = 1px solid transparent anchor.parentNode.appendChild newContainer anchor.parentNode.appendChild newBox YAHOO.util.Event.addListener newBox click function window.location.href = anchor.href YAHOO.util.Event.addListener newContainer mouseout scaleThumbDown newBox newContainer caption YAHOO.util.Event.addListener newBox mouseout scaleThumbDown newBox newContainer caption function scaleThumbDown e elements for var i = 0 i < elements.length i++ elements[i].parentNode.removeChild elements[i var anchorTimeout function enterAnchor e anchor if typeof anchorTimeout = undefined clearTimeout anchorTimeout anchorTimeout = setTimeout function scaleThumbUp e anchor 150 function leaveAnchor e anchor if typeof anchorTimeout = undefined clearTimeout anchorTimeout function initThumb var anchors = YAHOO.util.Dom.getElementsByClassName thumb for var i = 0 i < anchors.length i++ YAHOO.util.Event.addListener anchors[i mouseover enterAnchor anchors[i YAHOO.util.Event.addListener anchors[i mouseout leaveAnchor anchors[i YAHOO.util.Event.onDOMReady initThumb ','000001000001000015000022',NULL),('1oGhfj00KkCzP1ez01AfKA','slideshow.js','','root/import/gallery-templates/slideshow.js',1205635970,1285124158,'3','7','3','WebGUI::Asset::Snippet',0,'slideshow.js slideshow.js root import gallery templates slideshow.js if typeof WebGUI == undefined WebGUI = WebGUI.Slideshow config Configure and return a new Slideshow object config is an object with the following properties containerId The ID of the element that contains the Slideshow items Defaults to slideshow-container currentIndex The index of the first item in the Slideshow Defaults to 0 isPlaying If true the slideshow will begin immediately itemClassName The class name of the slideshow items Defaults to slideshow-item nextButtonId The id of the button to go to the next item pauseImageSrc The URL to the pause button image playDelay The delay in milliseconds between slides Defaults to 5000 playImageSrc The URL to the play button image playPauseButtonId The id of the button to toggle between play and pause previousButtonId The id of the button to go to the previous item wrap If true the slideshow will wrap around Control the slideshow To control the slideshow you can use the following methods next Pause the slideshow and go to the next slide previous Pause the slideshow and go to the previous slide play Play the slideshow pause Pause the slideshow togglePlay If it\'s playing pause it If it\'s paused play it WebGUI.Slideshow = function config this.containerId = config config.containerId config.containerId slideshow-container this.currentIndex = config config.currentIndex config.currentIndex 0 this.isPlaying = config config.isPlaying config.isPlaying false this.itemClassName = config config.itemClassName config.itemClassName slideshow-item this.nextButtonId = config config.nextButtonId undefined this.pauseImageSrc = config config.pauseImageSrc undefined this.playDelay = config config.playDelay config.playDelay 5000 this.playImageSrc = config config.playImageSrc undefined this.playPauseButtonId = config config.playPauseButtonId undefined this.previousButtonId = config config.previousButtonId undefined this.wrap = config config.wrap config.wrap false YAHOO.util.Event.onDOMReady this.init this true clearPlayTimeout Clears the timeout to move to the next slide WebGUI.Slideshow.prototype.clearPlayTimeout = function clearTimeout this.playTimeout this.playTimeout = undefined doPlayTick self Performs the action to move to the next slide and start a new timeout self is a new reference to the object to get around the scoping issues with setTimeout WebGUI.Slideshow.prototype.doPlayTick = function self self.showNext self.setPlayTimeout getSlideshowContainer Returns the HTMLElement for the Slideshow container WebGUI.Slideshow.prototype.getSlideshowContainer = function return document.getElementById this.containerId getSlideshowItems Returns an array of HTMLElements for the Slideshow\'s items WebGUI.Slideshow.prototype.getSlideshowItems = function var items = YAHOO.util.Dom.getElementsByClassName this.itemClassName undefined this.getSlideshowContainer return items init Initialize the slideshow Performed after the DOM is ready WebGUI.Slideshow.prototype.init = function Add handlers to buttons if this.playPauseButtonId YAHOO.util.Event.addListener this.playPauseButtonId click this.togglePlay this true if this.nextButtonId YAHOO.util.Event.addListener this.nextButtonId click this.next this true if this.previousButtonId YAHOO.util.Event.addListener this.previousButtonId click this.previous this true Hide all but the currentIndex var items = this.getSlideshowItems for var i = 0 i < items.length i++ if i = this.currentIndex items i style.display = none else items i style.display = block Start it off if necessary if this.isPlaying this.setPlayTimeout this.updatePlayPauseButton next Pause the slideshow and go to the next slide WebGUI.Slideshow.prototype.next = function this.pause this.showNext play Start the slideshow WebGUI.Slideshow.prototype.play = function if this.isPlaying this.isPlaying = true this.setPlayTimeout this.updatePlayPauseButton previous Pause the slideshow and show the previous slide WebGUI.Slideshow.prototype.previous = function this.pause this.showPrevious pause Pause the slideshow WebGUI.Slideshow.prototype.pause = function if this.isPlaying this.isPlaying = false this.clearPlayTimeout this.updatePlayPauseButton setPlayTimeout Sets the timeout to move to the next slide WebGUI.Slideshow.prototype.setPlayTimeout = function var self = this this.playTimeout = setTimeout function self.doPlayTick(self this.playDelay showNext Show the next slide WebGUI.Slideshow.prototype.showNext = function var items = this.getSlideshowItems var hideIndex = this.currentIndex var showIndex = this.currentIndex + 1 Wrap around if this.wrap showIndex >= items.length showIndex = 0 Don\'t allow going past the last item else if showIndex >= items.length return Do the switch if items hideIndex items hideIndex style.display = none if items showIndex items showIndex style.display = block this.currentIndex = showIndex showPrevious Show the previous slide WebGUI.Slideshow.prototype.showPrevious = function var items = this.getSlideshowItems var hideIndex = this.currentIndex var showIndex = this.currentIndex 1 Wrap around if this.wrap showIndex < 0 showIndex = items.length 1 Don\'t allow going past the last item else if showIndex < 0 return Do the switch items hideIndex style.display = none items showIndex style.display = block this.currentIndex = showIndex togglePlay If it\'s paused play it If it\'s playing pause it Return true if the slideshow is now playing WebGUI.Slideshow.prototype.togglePlay = function if this.isPlaying == false this.play return true else this.pause updatePlayPauseButton Update the Play/Pause button to have the correct image WebGUI.Slideshow.prototype.updatePlayPauseButton = function if this.playPauseButtonId if this.isPlaying this.playImageSrc document.getElementById this.playPauseButtonId src = this.pauseImageSrc else if this.pauseImageSrc document.getElementById this.playPauseButtonId src = this.playImageSrc ','000001000001000015000023',NULL),('3qiVYhNTXMVC5hfsumVHgg','browserdetect.js','','root/import/gallery-templates/browserdetect.js',1206743306,1285124158,'3','7','3','WebGUI::Asset::Snippet',0,'browserdetect.js browserdetect.js root import gallery templates browserdetect.js var BrowserDetect = init function this.browser = this.searchString(this.dataBrowser || An unknown browser this.version = this.searchVersion(navigator.userAgent || this.searchVersion(navigator.appVersion || an unknown version this.OS = this.searchString(this.dataOS || an unknown OS searchString function data for var i=0;i','000001000001000015000024',NULL),('usuxw9V3jN4d4pujRiEYxg','css03-ie.css','','style3/css03-ie.css',1209494150,1209494150,'3','7','12','WebGUI::Asset::Snippet',0,'css03-ie.css css03-ie.css style3 css03 ie.css contentArea height:500px padding-bottom:300px ','000001000001000051000023',NULL),('POVcY79vIqAHR8OfGt36aw','pagination_button.jpg','','root/import/gallery-templates/images/pagination_button.jpg',1209499189,1285124156,'3','7','12','WebGUI::Asset::File::Image',1,'pagination_button.jpg pagination_button.jpg root import gallery templates images pagination button.jpg','000001000001000015000017000007',NULL),('hIB-z34r8Xl-vYVYCkKr-w','bar-btn-r.jpg','','root/import/gallery-templates/images/bar-btn-r.jpg',1209499189,1285124156,'3','7','12','WebGUI::Asset::File::Image',1,'bar-btn-r.jpg bar-btn-r.jpg root import gallery templates images bar btn r.jpg','000001000001000015000017000008',NULL),('-mPUoFlYcjqjPUPRLAlxNQ','search-field-r.jpg','','root/import/gallery-templates/images/search-field-r.jpg',1209499189,1285124156,'3','7','12','WebGUI::Asset::File::Image',1,'search-field-r.jpg search-field-r.jpg root import gallery templates images search field r.jpg','000001000001000015000017000009',NULL),('MDpUOR-N8KMyt1J7Hh_h4w','bar-btn.jpg','','root/import/gallery-templates/images/bar-btn.jpg',1209499189,1285124156,'3','7','12','WebGUI::Asset::File::Image',1,'bar-btn.jpg bar-btn.jpg root import gallery templates images bar btn.jpg','000001000001000015000017000010',NULL),('YfXKByTwDZVituMc4h13Dg','pagination_bg.jpg','','root/import/gallery-templates/images/pagination_bg.jpg',1209499189,1285124156,'3','7','12','WebGUI::Asset::File::Image',1,'pagination_bg.jpg pagination_bg.jpg root import gallery templates images pagination bg.jpg','000001000001000015000017000011',NULL),('esko_HSU0Gh-uJZ1h3xRmQ','search-field-l.jpg','','root/import/gallery-templates/images/search-field-l.jpg',1209499189,1285124156,'3','7','12','WebGUI::Asset::File::Image',1,'search-field-l.jpg search-field-l.jpg root import gallery templates images search field l.jpg','000001000001000015000017000012',NULL),('oSqpGswzpBG_ErdfYwIO8A','top_bg.jpg','','root/import/gallery-templates/images/top_bg.jpg',1209499189,1285124156,'3','7','12','WebGUI::Asset::File::Image',1,'top_bg.jpg top_bg.jpg root import gallery templates images top bg.jpg','000001000001000015000017000013',NULL),('MXJklShZvLLB_DSnZQmXrQ','title_bg.jpg','','root/import/gallery-templates/images/title_bg.jpg',1209499189,1285124156,'3','7','12','WebGUI::Asset::File::Image',1,'title_bg.jpg title_bg.jpg root import gallery templates images title bg.jpg','000001000001000015000017000014',NULL),('BthxD5oJ0idmsyI3ioA2FA','bar-btn-l.jpg','','root/import/gallery-templates/images/bar-btn-l.jpg',1209499189,1285124156,'3','7','12','WebGUI::Asset::File::Image',1,'bar-btn-l.jpg bar-btn-l.jpg root import gallery templates images bar btn l.jpg','000001000001000015000017000015',NULL),('aZ-1HYQamkRHYXvzAra8WQ','search-field.jpg','','root/import/gallery-templates/images/search-field.jpg',1209499189,1285124156,'3','7','12','WebGUI::Asset::File::Image',1,'search-field.jpg search-field.jpg root import gallery templates images search field.jpg','000001000001000015000017000016',NULL),('eRkb94OYcS5AdcrrerOP5Q','rss.gif','','root/import/gallery-templates/images/rss2.gif',1209499189,1285124157,'3','7','12','WebGUI::Asset::File::Image',1,'rss.gif rss.gif root import gallery templates images rss2.gif','000001000001000015000017000017',NULL),('TbnkjAJQEASORXIpYqDkcA','blank-image.jpg','','root/import/gallery-templates/images/blank-image.jpg',1209499189,1285124157,'3','7','12','WebGUI::Asset::File::Image',1,'blank-image.jpg blank-image.jpg root import gallery templates images blank image.jpg','000001000001000015000017000018',NULL),('er-3faBjY-hhlDcc5aKqdQ','top_bg.jpg','','root/import/gallery-templates/images/top_bg2.jpg',1209499189,1285124157,'3','7','12','WebGUI::Asset::File::Image',1,'top_bg.jpg top_bg.jpg root import gallery templates images top bg2.jpg','000001000001000015000017000019',NULL),('8bFsu2FJUqHRUiHcozcVFw','sub-btn-l.jpg','','root/import/gallery-templates/images/sub-btn-l.jpg',1209499189,1285124157,'3','7','12','WebGUI::Asset::File::Image',1,'sub-btn-l.jpg sub-btn-l.jpg root import gallery templates images sub btn l.jpg','000001000001000015000017000020',NULL),('34Aayx5eA320D8VfhdfDBw','sub-btn-r.jpg','','root/import/gallery-templates/images/sub-btn-r.jpg',1209499189,1285124157,'3','7','12','WebGUI::Asset::File::Image',1,'sub-btn-r.jpg sub-btn-r.jpg root import gallery templates images sub btn r.jpg','000001000001000015000017000021',NULL),('TlhKOVmWblZOsAdqmhEpeg','sub-btn.jpg','','root/import/gallery-templates/images/sub-btn.jpg',1209499189,1285124157,'3','7','12','WebGUI::Asset::File::Image',1,'sub-btn.jpg sub-btn.jpg root import gallery templates images sub btn.jpg','000001000001000015000017000022',NULL),('Nx0ypjO3cN6QdZUBUEE0lA','pic-title-bg.jpg','','root/import/gallery-templates/images/pic-title-bg.jpg',1209499189,1285124157,'3','7','12','WebGUI::Asset::File::Image',1,'pic-title-bg.jpg pic-title-bg.jpg root import gallery templates images pic title bg.jpg','000001000001000015000017000023',NULL),('CmFZLN7iPS7XXvUEsxKPKA','row-2.jpg','','root/import/gallery-templates/images/row-2.jpg',1209499190,1285124157,'3','7','12','WebGUI::Asset::File::Image',1,'row-2.jpg row-2.jpg root import gallery templates images row 2.jpg','000001000001000015000017000024',NULL),('v_XBgwwZqgW1D5s4y05qfg','addtl-info.gif','','root/import/gallery-templates/images/addtl-info.gif',1209499190,1285124157,'3','7','12','WebGUI::Asset::File::Image',1,'addtl-info.gif addtl-info.gif root import gallery templates images addtl info.gif','000001000001000015000017000025',NULL),('4TdAkKoQbSCvI7QWcW889A','row-1.jpg','','root/import/gallery-templates/images/row-1.jpg',1209499190,1285124157,'3','7','12','WebGUI::Asset::File::Image',1,'row-1.jpg row-1.jpg root import gallery templates images row 1.jpg','000001000001000015000017000026',NULL),('SAgK6eDPCG1cgkJ59WapHQ','prev-btn.gif','','root/import/gallery-templates/images/prev-btn.gif',1209499190,1285124157,'3','7','12','WebGUI::Asset::File::Image',1,'prev-btn.gif prev-btn.gif root import gallery templates images prev btn.gif','000001000001000015000017000027',NULL),('XJYLuvGy9ubF7JNKyINtpA','play-btn.gif','','root/import/gallery-templates/images/play-btn.gif',1209499190,1285124157,'3','7','12','WebGUI::Asset::File::Image',1,'play-btn.gif play-btn.gif root import gallery templates images play btn.gif','000001000001000015000017000028',NULL),('RWj7hyv2SpZuXxwj1Wocug','next-btn.gif','','root/import/gallery-templates/images/next-btn.gif',1209499190,1285124157,'3','7','12','WebGUI::Asset::File::Image',1,'next-btn.gif next-btn.gif root import gallery templates images next btn.gif','000001000001000015000017000029',NULL),('aq8QElnlm3YufAoxRz9Pcg','data-bg.jpg','','root/import/gallery-templates/images/data-bg.jpg',1209499190,1285124158,'3','7','12','WebGUI::Asset::File::Image',1,'data-bg.jpg data-bg.jpg root import gallery templates images data bg.jpg','000001000001000015000017000030',NULL),('6D4Z-oruXPS6OlH_Kx8pBg','images','','root/import/thingy-templates/images',1209509389,1209509389,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'images images root import thingy templates images','000001000001000044000005',NULL),('hQ7z33_jOYkQ8WNX5xy9Sw','style-button.gif','','root/import/thingy-templates/images/style-button.gif',1209509455,1209509455,'3','7','12','WebGUI::Asset::File::Image',1,'style-button.gif style-button.gif root import thingy templates images style button.gif','000001000001000044000005000001',NULL),('vWW_DcHiYSrKZOkkIfEfcQ','row-2.jpg','','root/import/thingy-templates/images/row-2.jpg',1209509433,1209509433,'3','7','12','WebGUI::Asset::File::Image',1,'row-2.jpg row-2.jpg root import thingy templates images row 2.jpg','000001000001000044000005000002',NULL),('_bPYzRA87NTAUIKlfrJMHg','row-1.jpg','','root/import/thingy-templates/images/row-1.jpg',1209509433,1209509433,'3','7','12','WebGUI::Asset::File::Image',1,'row-1.jpg row-1.jpg root import thingy templates images row 1.jpg','000001000001000044000005000003',NULL),('nJjZHRwdDs5MAZYsAyioHw','title-bg.jpg','','root/import/thingy-templates/images/title-bg.jpg',1209509433,1209509433,'3','7','12','WebGUI::Asset::File::Image',1,'title-bg.jpg title-bg.jpg root import thingy templates images title bg.jpg','000001000001000044000005000004',NULL),('8hxfkrJPeFVRWF5piCNJ1A','field-bg.jpg','','root/import/thingy-templates/images/field-bg.jpg',1209509433,1209509433,'3','7','12','WebGUI::Asset::File::Image',1,'field-bg.jpg field-bg.jpg root import thingy templates images field bg.jpg','000001000001000044000005000005',NULL),('Osx7WN52iIKHZFT4vqUBHQ','search-btn.gif','','root/import/thingy-templates/images/search-btn.gif',1209509433,1209509433,'3','7','12','WebGUI::Asset::File::Image',1,'search-btn.gif search-btn.gif root import thingy templates images search btn.gif','000001000001000044000005000006',NULL),('oWff8fGzRdHPyq5VNREe9Q','top-bg.jpg','','root/import/thingy-templates/images/top-bg.jpg',1209509433,1209509433,'3','7','12','WebGUI::Asset::File::Image',1,'top-bg.jpg top-bg.jpg root import thingy templates images top bg.jpg','000001000001000044000005000007',NULL),('uqbkvb1b9443VvfkyRz95w','save-button.gif','','root/import/thingy-templates/images/save-button.gif',1209509433,1209509433,'3','7','12','WebGUI::Asset::File::Image',1,'save-button.gif save-button.gif root import thingy templates images save button.gif','000001000001000044000005000008',NULL),('8YiMkcz32xalkAn3WBLpag','go-btn.gif','','root/import/thingy-templates/images/go-btn.gif',1210181860,1210181860,'3','7','12','WebGUI::Asset::File::Image',1,'go-btn.gif go-btn.gif root import thingy templates images go btn.gif','000001000001000044000005000009',NULL),('5m5I7__l40C4hhv4ydqAHQ','thingy-ie.css','','root/import/thingy-templates/thingy-ie.css',1210181698,1216227786,'3','7','12','WebGUI::Asset::Snippet',0,'thingy-ie.css thingy-ie.css root import thingy templates thingy ie.css thingyList things padding:0px margin:0px width:200px z-index:5000 position:absolute top:27px left:20px border:solid a2a2a2 1px border-top-style:none thingyList things a:link thingyList things a:visited display:block background-color:#f1f1f1 border-top:solid a2a2a2 1px border-bottom:solid 727272 1px line-height:12px font-size:10px height:12px padding:2px 5px text-decoration:none font-weight:bold color:#a2a2a2 width:190px thingyList things a:hover background-color:white ','000001000001000044000007',NULL),('2rC4ErZ3c77OJzJm7O5s3w','EMS Badge Listing (default)','','root/import/ems/ems-badge-listing-default',1208721232,1288747841,'3','7','12','WebGUI::Asset::Template',0,'EMS Badge Listing default EMS Badge Listing default root import ems ems badge listing default EMS','000001000001000012000003',NULL),('PsFn7dJt4wMwBa8hiE3hOA','Print Badge (Default)','','root/import/ems/print-badge-default',1208558071,1257311886,'3','7','12','WebGUI::Asset::Template',0,'Print Badge Default Print Badge Default root import ems print badge default EMS/PrintBadge','000001000001000012000004',NULL),('yBwydfooiLvhEFawJb0VTQ','Print Ticket (Default)','','root/import/ems/print-ticket-default',1208629936,1257311887,'3','7','12','WebGUI::Asset::Template',0,'Print Ticket Default Print Ticket Default root import ems print ticket default EMS/PrintTicket','000001000001000012000005',NULL),('63ix2-hU0FchXGIWkG3tow','Flat Discount (Default)','','root/import/flat-discount-default',1209588387,1313542961,'3','7','12','WebGUI::Asset::Template',0,'Flat Discount Default Flat Discount Default root import flat discount default FlatDiscount','000001000001000036000011',NULL),('gbnRhcWNk1iQe32LFEB5eQ','Shelf','','root/import/shelf2',1210779723,1212086102,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Shelf Shelf root import shelf2','000001000001000035',NULL),('1XOJDcg_ITRYwVM-QnIcPw','shelf.css','','root/import/shelf2/shelf.css',1210779441,1219175575,'3','7','12','WebGUI::Asset::Snippet',0,'shelf.css shelf.css root import shelf2 shelf.css wgShelf font-size:12px font-family:arial verdana margin:15px 0px wgShelf h2 background black padding:5px padding-left:15px line-height:32px color:white margin:0px height:32px wgShelf wgShelves background F1F1F1 height:29px padding:3px line-height:29px padding-left:30px wgShelf product margin:15px margin-left:0px text-align:left background-color:#f1f1f1 border:solid e1e1e1 1px width 200px display moz-inline-box Moz display inline-block Op Saf IE vertical-align top IE Mac non capisce e a volte crea extra v space wgShelf product thumbnail display:block text-align:left margin:3px float:left wgShelf product link background e1e1e1 height:30px padding:3px line-height:24px margin-bottom:5px text-align:left display:block wgShelf product link a:link wgShelf product link a:visited color:#000 display:block wgShelf product link a:hover text-decoration:underline wgShelf product price display:block text-align:right font-size:18px font-weight:bold ','000001000001000035000003',NULL),('C5fPz-Wg85vkYRvCdl-Xqw','UserList','','root/import/userlist',1212160830,1212160830,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'UserList UserList root import userlist','000001000001000047',NULL),('aNmgn0cd6tldmC1FpW4KbA','Shop','','shopping-cart-collateral-items',1213122695,1313542960,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'Shop Shop shopping cart collateral items','000001000001000036',NULL),('2q5fxatSFLgIhXaUX-oSvg','bottom-left.jpg','','shopping-cart-collateral-items/bottom-left.jpg',1204149033,1313542960,'3','7','3','WebGUI::Asset::File::Image',1,'bottom-left.jpg bottom-left.jpg shopping cart collateral items bottom left.jpg','000001000001000036000001',NULL),('_d5WTkKjnwct-_Dk7gZHvQ','bottom-right.jpg','','shopping-cart-collateral-items/bottom-right.jpg',1204149033,1313542960,'3','7','3','WebGUI::Asset::File::Image',1,'bottom-right.jpg bottom-right.jpg shopping cart collateral items bottom right.jpg','000001000001000036000002',NULL),('Iz2mUR3jCPKyemwAea4b2g','input_bg.jpg','','shopping-cart-collateral-items/input_bg.jpg',1204149033,1313542960,'3','7','3','WebGUI::Asset::File::Image',1,'input_bg.jpg input_bg.jpg shopping cart collateral items input bg.jpg','000001000001000036000003',NULL),('JU9bjsLRoWj7GVHs__prig','top-left.jpg','','shopping-cart-collateral-items/top-left.jpg',1204149033,1313542960,'3','7','3','WebGUI::Asset::File::Image',1,'top-left.jpg top-left.jpg shopping cart collateral items top left.jpg','000001000001000036000004',NULL),('noOlnjQGexHg8c4bGVUo9g','top-right.jpg','','shopping-cart-collateral-items/top-right.jpg',1204149033,1313542960,'3','7','3','WebGUI::Asset::File::Image',1,'top-right.jpg top-right.jpg shopping cart collateral items top right.jpg','000001000001000036000005',NULL),('aIpCmr9Hi__vgdZnDTz1jw','Cart (Default)','','default-shopping-cart-template',1209921197,1313542961,'3','7','3','WebGUI::Asset::Template',0,'Cart Default Cart Default default shopping cart template Shop/Cart','000001000001000036000006',NULL),('4e-_rNs6mSWedZhQ_V5kJA','shelf-ie.css','','root/import/shelf2/shelf-ie.css',1210779672,1210779672,'3','7','12','WebGUI::Asset::Snippet',0,'shelf-ie.css shelf-ie.css root import shelf2 shelf ie.css wgShelf product margin:15px margin-left:0px float:left text-align:left background-color:#f1f1f1 border:solid e1e1e1 1px min-height:100px min-width:200px width:200px height:100px wgShelf product link background url(^FileUrl(root/import/shelf2/images/shelf-titles.jpg no-repeat top right height:30px padding:3px line-height:24px margin-bottom:5px text-align:left display:block ','000001000001000035000004',NULL),('2gtFt7c0qAFNU3BG_uvNvg','My Purchases (Default)','','shopping-cart-collateral-items/my-purchases-default',1211824430,1315877144,'3','7','3','WebGUI::Asset::Template',0,'My Purchases Default My Purchases Default shopping cart collateral items my purchases default Shop/MyPurchases','000001000001000036000008',NULL),('bPz1yk6Y9uwMDMBcmMsSCg','Email Receipt (Default)','','shopping-cart-collateral-items/email-receipt-default',1211829604,1313542961,'3','7','3','WebGUI::Asset::Template',0,'Email Receipt Default Email Receipt Default shopping cart collateral items email receipt default Shop/EmailReceipt','000001000001000036000009',NULL),('EBlxJpZQ9o-8VBOaGQbChA','MiniCart','','shopping-cart-collateral-items/minicart',1212093746,1313542961,'3','7','3','WebGUI::Asset::Template',0,'MiniCart MiniCart shopping cart collateral items minicart Shop/MiniCart','000001000001000036000014',NULL),('PBtmpl0000000000000053','Subscription code redemption','','subscription_code_redemption',1124395696,1313542961,'3','7','12','WebGUI::Asset::Template',0,'Subscription code redemption Subscription code redemption subscription code redemption Operation/RedeemSubscription','000001000001000036000017',NULL),('6tK47xsaIH-ELw0IBo0uRQ','images','','root/import/shelf2/images',1210777115,1210777115,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'images images root import shelf2 images','000001000001000035000001',NULL),('XNd7a_g_cTvJVYrVHcx2Mw','Address (Default)','','shopping-cart-collateral-items/address-default',1212099009,1313542961,'3','7','3','WebGUI::Asset::Template',0,'Address Default Address Default shopping cart collateral items address default Shop/Address','000001000001000036000007',NULL),('_bZJ9LA_KNekZiFPaP2SeQ','shelf-titles.jpg','','root/import/shelf2/images/shelf-titles.jpg',1210777868,1210777868,'3','7','12','WebGUI::Asset::File::Image',1,'shelf-titles.jpg shelf-titles.jpg root import shelf2 images shelf titles.jpg','000001000001000035000001000001',NULL),('nFen0xjkZn8WkpM93C9ceQ','Shelf (Default)','','root/import/shelf-default',1210779326,1247864696,'3','7','12','WebGUI::Asset::Template',0,'Shelf Default Shelf Default root import shelf default Shelf','000001000001000035000002',NULL),('mTOiwwk3q4k9g5-XykXhPA','Documentation','With any large system, having the right documentation to get you started is mandatory. The good news is that WebGUI has abundant documentation. ','documentation',1215717999,1271349647,'3','7','3','WebGUI::Asset::Wobject::Layout',1,'Documentation Documentation documentation With any large system having the right documentation to get you started is mandatory The good news is that WebGUI has abundant documentation','000001000002000003',NULL),('o_pq_e4vRyhMOKFzs61eag','book-covers.jpg','','documentation/book-covers.jpg',1215714957,1215714957,'3','7','3','WebGUI::Asset::File::Image',1,'book-covers.jpg book-covers.jpg documentation book covers.jpg','000001000002000003000002',NULL),('PBEmsBadgeTemplate0000','Default EMS Badge Template','','default_emsbadge',1221077977,1313542962,'3','7','4','WebGUI::Asset::Template',0,'Default EMS Badge Template Default EMS Badge Template default emsbadge EMSBadge','000001000001000012000006',NULL),('9A-mg2gwWmaYi9o_1C7ArQ','dashboard','','root/import/projectmanager/dashboard',1147642478,1222803338,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'dashboard dashboard root import projectmanager dashboard','000001000001000030000001',NULL),('yD1SMHelczihzjEmx6eXBA','editTask','','root/import/projectmanager/edittask',1147642478,1222803342,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'editTask editTask root import projectmanager edittask','000001000001000030000002',NULL),('pV7GnZdpjR3XpZaSINIoeg','gantt','','root/import/projectmanager/gantt',1147642478,1222803347,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'gantt gantt root import projectmanager gantt','000001000001000030000003',NULL),('71e17KeduiXgODLMlUxiow','project','','root/import/projectmanager/project',1147642479,1222803352,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'project project root import projectmanager project','000001000001000030000004',NULL),('vTymIDYL2YqEh6PV50F7ew','manager','','root/import/timetracking/manager',1147642482,1222803302,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'manager manager root import timetracking manager','000001000001000046000001',NULL),('lo1ac3BsoJx3ijGQ3gR-bQ','row','','root/import/timetracking/row',1147642482,1222803309,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'row row root import timetracking row','000001000001000046000002',NULL),('huASapWvFDzqwOSbcN-JFQ','user','','root/import/timetracking/user',1147642483,1222803313,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'user user root import timetracking user','000001000001000046000003',NULL),('xSmREZO3GNzK3M5PaueOOQ','LDAP/Account','','root/import/auth/ldap/account',1147642466,1287545014,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'LDAP/Account LDAP/Account root import auth ldap account','000001000001000005000001',NULL),('0bx-xoL8TSXXubFuqKAoVQ','LDAP/Create','','root/import/auth/ldap/create',1147642466,1287545014,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'LDAP/Create LDAP/Create root import auth ldap create','000001000001000005000002',NULL),('taX2UYkFF21ALpFZY2rhMw','LDAP/Login','','root/import/auth/ldap/login',1147642466,1287545014,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'LDAP/Login LDAP/Login root import auth ldap login','000001000001000005000003',NULL),('K0q_N885Httqev1VCqUWxg','WebGUI/Account','','root/import/auth/webgui/account',1147642466,1287545014,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'WebGUI/Account WebGUI/Account root import auth webgui account','000001000001000005000004',NULL),('fq1ZkYhH24R5tb96kuT10Q','WebGUI/Create','','root/import/auth/webgui/create',1147642466,1287545014,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'WebGUI/Create WebGUI/Create root import auth webgui create','000001000001000005000005',NULL),('oHk7fAFhEEkB7dHzi0QOQA','WebGUI/Expired','','root/import/auth/webgui/expired',1147642466,1287545014,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'WebGUI/Expired WebGUI/Expired root import auth webgui expired','000001000001000005000006',NULL),('9M-lrlPQWeeNWfvnDnK_Xg','WebGUI/Login','','root/import/auth/webgui/login',1147642466,1287545014,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'WebGUI/Login WebGUI/Login root import auth webgui login','000001000001000005000007',NULL),('_gBYAdTcbkiyamnqi2Xskg','WebGUI/Recovery','','root/import/auth/webgui/recovery',1147642466,1287545014,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'WebGUI/Recovery WebGUI/Recovery root import auth webgui recovery','000001000001000005000008',NULL),('tBL7BWiQRZFed2Y-Zjo9tQ','AdminToggle','','root/import/macro/admintoggle',1147642471,1222803200,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'AdminToggle AdminToggle root import macro admintoggle','000001000001000021000001',NULL),('GdkQpvjRtJqtzOUbwIIQRA','a_account','','root/import/macro/a_account',1147642471,1222803205,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'a_account a_account root import macro a account','000001000001000021000002',NULL),('tnc5iYyynX2hfdEs9D3P8w','EditableToggle','','root/import/macro/editabletoggle',1147642472,1222803213,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'EditableToggle EditableToggle root import macro editabletoggle','000001000001000021000003',NULL),('vgXdBcFTqU7h4wBG1ewdBw','File','','root/import/macro/file',1147642472,1222803217,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'File File root import macro file','000001000001000021000004',NULL),('hcFlqnXlsmC1ujN6Id0F0A','GroupAdd','','root/import/macro/groupadd',1147642473,1222803234,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'GroupAdd GroupAdd root import macro groupadd','000001000001000021000005',NULL),('eRJR52fvlaxfetv3DQkQYw','GroupDelete','','root/import/macro/groupdelete',1147642473,1222803238,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'GroupDelete GroupDelete root import macro groupdelete','000001000001000021000006',NULL),('5HIDHq5lAWHV5gpYGS0zLg','H_homeLink','','root/import/macro/h_homelink',1147642473,1222803244,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'H_homeLink H_homeLink root import macro h homelink','000001000001000021000007',NULL),('rYEFwXXo0tkGhQTcbDibvg','LoginToggle','','root/import/macro/logintoggle',1147642473,1222803249,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'LoginToggle LoginToggle root import macro logintoggle','000001000001000021000008',NULL),('V3l5S5TtI7wMm1WpIMhvOA','L_loginBox','','root/import/macro/l_loginbox',1147642473,1222803253,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'L_loginBox L_loginBox root import macro l loginbox','000001000001000021000009',NULL),('nqNbSUAhk9Vd1zda2SCz9A','RandomThread','','root/import/macro/randomthread',1147642474,1222803258,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'RandomThread RandomThread root import macro randomthread','000001000001000021000010',NULL),('y8XkRdxIperLKkJ3bL5sSQ','r_printable','','root/import/macro/r_printable',1147642474,1222803264,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'r_printable r_printable root import macro r printable','000001000001000021000011',NULL),('UserListTmpl0000000002','UserList with search field selection','','root/import/userlist/userlist-with-search-field-selection',1212000800,1228125752,'3','7','12','WebGUI::Asset::Template',0,'UserList with search field selection UserList with search field selection root import userlist userlist with search field selection UserList','000001000001000047000002',NULL),('UserListTmpl0000000003','UserList with multiple search keywords','','root/import/userlist/userlist-with-multiple-search-keywords',1212001437,1228125758,'3','7','12','WebGUI::Asset::Template',0,'UserList with multiple search keywords UserList with multiple search keywords root import userlist userlist with multiple search keywords UserList','000001000001000047000003',NULL),('UserListTmpl0000000001','Default UserList','','root/import/userlist/default-userlist',1212159641,1228125743,'3','7','12','WebGUI::Asset::Template',0,'Default UserList Default UserList root import userlist default userlist UserList','000001000001000047000001',NULL),('BMybD3cEnmXVk2wQ_qEsRQ','Badge Builder (Default)','','root/import/ems/badge-builder-default',1208530113,1263962529,'3','7','12','WebGUI::Asset::Template',0,'Badge Builder Default Badge Builder Default root import ems badge builder default EMS/BadgeBuilder','000001000001000012000001',NULL),('OOyMH33plAy6oCj_QWrxtg','Lookup Registrant (Default)','','root/import/ems/lookup-registrant-default',1207951375,1257311886,'3','7','12','WebGUI::Asset::Template',0,'Lookup Registrant Default Lookup Registrant Default root import ems lookup registrant default EMS/LookupRegistrant','000001000001000012000002',NULL),('stevecoolmenu000000001','Site Nav','','webgui7/style3/hierarchical-top-nav',1147642505,1224116942,'3','7','12','WebGUI::Asset::Template',0,'Site Nav Site Nav webgui7 style3 hierarchical top nav Navigation','000001000001000051000001',NULL),('7-0-style0000000000051','css03.css','','style3/css03.css',1147642505,1224117026,'3','7','12','WebGUI::Asset::Snippet',0,'css03.css css03.css style3 css03.css body html margin:0px background-color:#b53018 padding:0px body a color:#EE963E;font-weight:bold letter-spacing:1px font-size:8pt main width:98 min-width:790px margin:0px padding:0px padding-top:20px padding-bottom:20px position:relative header background url(\'^FileUrl(style3/header_bg.jpg repeat-x width:100 margin:0px height:115px headerTitle background url(\'^FileUrl(style3/header_left.jpg no-repeat left top height:100 width:100 headerRight background url(\'^FileUrl(style3/header_right.jpg no-repeat right top width:100 height:100 text-align:right position:relative headerRight title position:absolute top:25px left:20px font-family:arial text-align:left title h1 text-transform:uppercase margin-bottom:0px font-weight:normal font-size:26pt margin-top:0px color:white title h1 a color:white text-decoration:none font-size 26pt font-weight normal title h2 margin:0px font-size:12pt color:#bebebe padding-left:20px title img z-index:5 login position:absolute font-size:8pt top:45 right:150px color:white z-index:6 font-family:arial login a color:white font-weight normal letter-spacing 0px loginBox font-size:8pt margin:0px display:inline loginBox input font-size:8pt mainBody width:100 margin:0px height:500px background fff position:relative z-index:0 main > mainBody height:auto min-height:500px contentArea z-index:2 position:relative padding-top:10px padding-left:10px padding-right:20px padding-bottom:20px moz-box-sizing:border-box font-family:verdana font-size:9pt min-height:500px html main mainBody contentArea height:1 topCorner width:100 height:214px position:absolute top:0px left:0px background url(^FileUrl(/style3/main_top.jpg no-repeat z-index:1 bottomCorner width:100 height:211px position:absolute bottom:59px right:0px background url(\'^FileUrl(style3/main_bottom.jpg no-repeat right z-index:1 html bottomCorner bottom:58px footer width:100 margin:0px background:#000 url(\'^FileUrl(style3/footer_right.jpg no-repeat right top height:57px border-top:solid B53018 2px text-align:right position:relative z-index:0 footer copyright color:#3b3b3b font-family:arial position:absolute top:20px left:30px font-size:8pt main yui-skin-sam font-family:verdana font-size:9pt font-weight:normal ','000001000001000051000002',NULL),('jVKLVakT_iA2010_oEuAwg','Style3 Coolmenu','','department_nav',1224116526,1224116526,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'Style3 Coolmenu Style3 Coolmenu department nav','000001000001000051000024',NULL),('UL-ItI4L1Z6-WSuhuXVvsQ','DataTable','','root/import/datatable',1225139673,1225139673,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'DataTable DataTable root import datatable','000001000001000011',NULL),('3rjnBVJRO6ZSkxlFkYh_ug','Default DataTable Template (YUI)','','root/import/datatable/default-datatable-template-yui',1225139643,1233861835,'3','7','3','WebGUI::Asset::Template',0,'Default DataTable Template YUI Default DataTable Template YUI root import datatable default datatable template yui DataTable','000001000001000011000001',NULL),('TuYPpHx7TUyk08639Pc8Bg','Default DataTable Template (HTML)','','root/import/datatable/default-datatable-template-html',1225139643,1233861621,'3','7','3','WebGUI::Asset::Template',0,'Default DataTable Template HTML Default DataTable Template HTML root import datatable default datatable template html DataTable','000001000001000011000002',NULL),('IZkrow_zwvbf4FCH-taVTQ','Inbox','','root/import/account/inbox',1226011853,1226011853,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Inbox Inbox root import account inbox','000001000001000002000002',NULL),('K0YjxqOqr7RupSo6sIdcAg','Friends','','root/import/account/friends',1227074310,1227074310,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Friends Friends root import account friends','000001000001000002000003',NULL),('_ilRXNR3s8F2vGJ_k9ePcg','User','','root/import/account/user',1226643205,1226643205,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'User User root import account user','000001000001000002000004',NULL),('AOjPG2NHgfL9Cq6dDJ7mew','Shop','','root/import/account/shop',1226659753,1236960881,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Shop Shop root import account shop','000001000001000002000005',NULL),('qaVcU0FFzzraMX_bzELqzw','Contributions','','root/import/account/contributions',1227074362,1227074362,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Contributions Contributions root import account contributions','000001000001000002000006',NULL),('matrixtmpl000000000004','Matrix Default Edit Listing','','default-matrix-edit-listing-template',1133743239,1281501163,'3','7','12','WebGUI::Asset::Template',0,'Matrix Default Edit Listing Matrix Default Edit Listing default matrix edit listing template Matrix/EditListing','000001000001000022000004',NULL),('kJf77eCr9GAMiEzWrzsBTA','matrix-ie.css','','new-matrix/matrix-ie.css',1229639255,1281501163,'3','7','12','WebGUI::Asset::Snippet',0,'matrix-ie.css matrix-ie.css new matrix matrix ie.css matrixLeft buttons span matrixRight buttons span padding:0px 0px 0px 0px matrixLeft buttons button matrixRight buttons a top:-3px left:-2px height:22px matrixRight buttons a color:black text-decoration:none padding:1px 3px ','000001000001000022000007',NULL),('4LQT4-bGW4FkiEQLSY5gvQ','show-hide.js','','new-matrix/show-hide.js',1232400287,1281501163,'3','7','12','WebGUI::Asset::Snippet',0,'show-hide.js show-hide.js new matrix show hide.js function showHide(theLink,theId var theId = document.getElementById(theId var theLink = document.getElementById(theLink if(theId.style.display == block theId.style.display = none theLink.innerHTML = Send Creator a Message theLink.className = showLink else theId.style.display = block theLink.innerHTML = Hide theLink.className = hideLink ','000001000001000022000008',NULL),('Vch1Ww7G_JpBhOhXX07RDg','matrx-nav','','new-matrix/matrix-nav',1232664082,1281501163,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'matrx-nav matrix-nav new matrix matrix nav','000001000001000022000010',NULL),('PBtmpl0000000000000063','Default Overview Report','','root/import/survey/default-overview-report',1124395696,1250243000,'3','7','12','WebGUI::Asset::Template',0,'Default Overview Report Default Overview Report root import survey default overview report Survey/Overview','000001000001000042000001',NULL),('HW-sPoDDZR8wBZ0YgFgPtg','images','','root/import/account/images',1227634350,1227634350,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'images images root import account images','000001000001000002000009',NULL),('hBpisL-_URyZnh9clR5ohA','no_photo.gif','','root/import/account/images/no_photo.gif',1227634417,1227634417,'3','7','12','WebGUI::Asset::File::Image',1,'no_photo.gif no_photo.gif root import account images no photo.gif','000001000001000002000009000001',NULL),('FOBV6KkifreXa4GmEAUU4A','no_photo_sm.gif','','root/import/account/images/no_photo_sm.gif',1227634447,1227634447,'3','7','12','WebGUI::Asset::File::Image',1,'no_photo_sm.gif no_photo_sm.gif root import account images no photo sm.gif','000001000001000002000009000002',NULL),('PBtmpl0000000000000061','Default Survey','','root/import/survey/default-survey',1124395696,1250243000,'3','7','12','WebGUI::Asset::Template',0,'Default Survey Default Survey root import survey default survey Survey','000001000001000042000003',NULL),('S2_LsvVa95OSqc66ITAoig','EMS Schedule Listing (default)','','root/import/ems/ems-schedule-listing-default2',1242730712,1257311887,'3','7','12','WebGUI::Asset::Template',0,'EMS Schedule Listing default EMS Schedule Listing default root import ems ems schedule listing default2 EMS/Schedule','000001000001000012000007',NULL),('VyCINX2KixKYr2pzQGX9Mg','layout.css','','layout.css',1246968584,1254881103,'3','7','12','WebGUI::Asset::Snippet',0,'layout.css layout.css layout.css styles for the layout asset wg-left float left wg-right float right wg-clear clear both sidebyside wg-content-position oneovertwo wg-content-position width 49 oneovertwo wg-top width 100 oneoverthree wg-first-column oneoverthree wg-second-column oneoverthree wg-third-column threeColumns wg-first-column threeColumns wg-second-column threeColumns wg-third-column width 32 oneoverthree wg-first-column threeColumns wg-first-column margin-right:2 rightcolumn wg-first-column width 65 rightcolumn wg-second-column width 33 ','000001000001000019000006',NULL),('jmlI9IK-lV8n2WMYmmPhAA','Ad Sku','','root/import/ad-sku',1238106173,1238106173,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Ad Sku Ad Sku root import ad sku','000001000001000001',NULL),('AldPGu0u-jm_5xK13atCSQ','Default Purchase Ad Sku Template','','root/import/ad-sku/default-purchase-ad-sku-template',1238106805,1251419124,'3','7','12','WebGUI::Asset::Template',0,'Default Purchase Ad Sku Template Default Purchase Ad Sku Template root import ad sku default purchase ad sku template AdSku/Purchase','000001000001000001000001',NULL),('ohjyzab5i-yW6GOWTeDUHg','Default Manage Ad Sku Template','','root/import/ad-sku/default-manage-ad-sku-template',1238106805,1251425384,'3','7','12','WebGUI::Asset::Template',0,'Default Manage Ad Sku Template Default Manage Ad Sku Template root import ad sku default manage ad sku template AdSku/Manage','000001000001000001000002',NULL),('PBtmpl0000000000000015','Default WebGUI Welcome Message Template','','root/import/auth/webgui/create/default-webgui-welcome-message-template',1237647040,1287545014,'3','7','12','WebGUI::Asset::Template',0,'Default WebGUI Welcome Message Template Default WebGUI Welcome Message Template root import auth webgui create default webgui welcome message template Auth/WebGUI/Welcome','000001000001000005000005000002',NULL),('PBtmpl0000000000000016','Default WebGUI Account Activation Template','','root/import/auth/webgui/create/default-webgui-account-activation-template',1237407798,1287545014,'3','7','3','WebGUI::Asset::Template',0,'Default WebGUI Account Activation Template Default WebGUI Account Activation Template root import auth webgui create default webgui account activation template Auth/WebGUI/Activation','000001000001000005000005000003',NULL),('wrq7hMxb1ewQqZ46xmd8Gg','equal-cols.js','','matrix/equal-cols.js',1235706620,1281501163,'3','7','12','WebGUI::Asset::Snippet',0,'equal-cols.js equal-cols.js matrix equal cols.js function equalCol var colOne = document.getElementById(\'compareForm var colTwo = document.getElementById(\'matrixRight var colOneH = colOne.offsetHeight var colTwoH = colTwo.offsetHeight alert(colOneH + + colTwoH colOne.style.overflow = scroll colOne.style.height = colTwoH 150 + px ','000001000001000022000011',NULL),('matrixtmpl000000000007','Matrix Default Screenshots Config','','matrix-default-screenshots-config',1236594030,1281501163,'3','7','12','WebGUI::Asset::Template',0,'Matrix Default Screenshots Config Matrix Default Screenshots Config matrix default screenshots config Matrix/ScreenshotsConfig','000001000001000022000012',NULL),('matrixtmpl000000000006','Matrix Default Screenshots','','matrix-default-screenshots',1236889702,1281501163,'3','7','12','WebGUI::Asset::Template',0,'Matrix Default Screenshots Matrix Default Screenshots matrix default screenshots Matrix/Screenshots','000001000001000022000013',NULL),('RSAMkc6WQmfRE3TOr1_3Mw','ExpireIncompleteSurveyResponses','','root/import/expireincompletesurveyresponses',1234828062,1250243000,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'ExpireIncompleteSurveyResponses ExpireIncompleteSurveyResponses root import expireincompletesurveyresponses','000001000001000042000011',NULL),('ExpireIncResptmpl00001','ExpireIncompleteSurveyResponses','','root/import/expireincompletesurveyresponses/expireincompletesurveyresponses',1236752721,1250243000,'3','7','12','WebGUI::Asset::Template',0,'ExpireIncompleteSurveyResponses ExpireIncompleteSurveyResponses root import expireincompletesurveyresponses expireincompletesurveyresponses ExpireIncompleteSurveyResponses','000001000001000042000011000001',NULL),('NBVSVNLp9X_bV7WrCprtCA','Annotate Image','','image3',1237842096,1237842096,'3','7','12','WebGUI::Asset::Template',0,'Annotate Image Annotate Image image3 ImageAsset','000001000001000017000002',NULL),('qsG6B24a0SC5KrhQjmdZBw','survey.css','','survey.css',1233860274,1287545015,'3','7','12','WebGUI::Asset::Snippet',0,'survey.css survey.css survey.css body margin 0 background-repeat repeat-y background-position 0px 0px survey-header width 80 height 20px margin-left 80px survey margin-left 80px width 85 div.dateanswer overflow auto div.slider-bg position relative background:url(/extras/wobject/Survey/bg-fader-500.gif 5px 0 no-repeat height:68px width:529px div.slider-thumb cursor:default position absolute top 30px left 4px div.slider-min-thumb cursor:default position absolute top 4px div.slider-max-thumb cursor:default position absolute top 4px headertitle display none headertext display none questions display none input.mcbutton font-size 10px font-weight bold text-decoration none background-color CCCCCC background-repeat repeat-x text-align center display block margin 0.5em padding 8em min-width 60px font-family Verdana Arial Helvetica sans-serif color 000000 background-image url(/extras/wobject/Survey/gradient-glossy.png input.mcbutton:hover background-color B6D2F1 font-family Verdana Arial Helvetica sans-serif font-size 10px color 000000 input.mcbutton-selected background-color 172D9D background-repeat repeat-x color FFFFFF font-family Verdana Arial Helvetica sans-serif font-size 10px margin 0.5em padding 8em width 60px text-align center display block font-weight bold background-image url(/extras/wobject/Survey/gradient-glossy.png background-position 0px 0px By default the marker for invalid required fields is a red survey-invalid-marker color FF0000 survey font-family Verdana Arial Helvetica sans-serif font-size 10px border 3px solid 1e1e1e survey survey-header background-color cfcfcf padding-top 1px survey headertitle padding-left 5px survey progress position relative top 26px right 5px text-align right font-style italic survey progress:before content Progress survey headertext border-bottom 2px solid 1e1e1e padding 5px survey questions survey question background-color dfdfdf padding 10px 5px 10px 5px survey question p:before content Q survey scale:before content A survey submitbutton margin-left 5px restartMessage color FF0000 chart float left width 200px height 113px ','000001000001000042000010',NULL),('6uvSLY-ak_w4p_wS8q33cA','Carousel','','root/import/carousel',1239213092,1239213092,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Carousel Carousel root import carousel','000001000001000007',NULL),('CarouselTmpl0000000001','Default Carousel','','root/import/carousel/carousel-default',1239290719,1301973997,'3','7','12','WebGUI::Asset::Template',0,'Default Carousel Default Carousel root import carousel carousel default Carousel','000001000001000007000001',NULL),('CarouselTmpl0000000002','Carousel hidden textareas','','root/import/carousel/carousel-hidden-textareas',1238878995,1239475937,'3','7','12','WebGUI::Asset::Template',0,'Carousel hidden textareas Carousel hidden textareas root import carousel carousel hidden textareas Carousel','000001000001000007000002',NULL),('GaBAW-2iVhLMJaZQzVLE5A','ThingyRecord Templates','','root/import/thingyrecord-templates',1240103565,1240103565,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'ThingyRecord Templates ThingyRecord Templates root import thingyrecord templates','000001000001000045',NULL),('TKmhv8boP3TD2xwSwUBq0g','Default ThingyRecord View','','home/thinyrecord-templates/default-thingyrecord-view',1240103436,1250243000,'3','7','3','WebGUI::Asset::Template',0,'Default ThingyRecord View Default ThingyRecord View home thinyrecord templates default thingyrecord view ThingyRecord/View','000001000001000045000001',NULL),('fowHfgOkJtAxdst7rugTog','Story Manager','','root/import/storymanager',1236184911,1252595993,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Story Manager Story Manager root import storymanager','000001000001000040',NULL),('3QpYtHrq_jmAk1FNutQM5A','Story Template','','root/import/storymanager/storytemplate',1239237827,1253636379,'3','7','4','WebGUI::Asset::Template',0,'Story Template Story Template root import storymanager storytemplate Story','000001000001000040000001',NULL),('yxD5ka7XHebPLD-LXBwJqw','StoryArchive','','root/import/storymanager/storyarchive',1239918573,1253635396,'3','7','4','WebGUI::Asset::Template',0,'StoryArchive StoryArchive root import storymanager storyarchive StoryArchive','000001000001000040000002',NULL),('A16v-YjWAShXWvSACsraeg','StoryTopic','','root/import/storymanager/storytopic',1239918710,1285124154,'3','7','4','WebGUI::Asset::Template',0,'StoryTopic StoryTopic root import storymanager storytopic StoryTopic','000001000001000040000005',NULL),('0EAJ9EYb9ap2XwfrcXfdLQ','Story Archive Asset List','','root/import/storymanager/keywordlist',1240262820,1250243000,'3','7','4','WebGUI::Asset::Template',0,'Story Archive Asset List Story Archive Asset List root import storymanager keywordlist StoryArchive/KeywordList','000001000001000040000006',NULL),('9j0_Z1j3Jd0QBbY2akb6qw','Default Map View','','home/map/map-templates/default-map-view',1238053232,1304392055,'3','7','3','WebGUI::Asset::Template',0,'Default Map View Default Map View home map map templates default map view Map/View','000001000001000020000001',NULL),('oHh0UqAJeY7u2n--WD-BAA','Default Edit Map Point','','home/map/map-templates/default-edit-map-point',1238040667,1304392055,'3','7','3','WebGUI::Asset::Template',0,'Default Edit Map Point Default Edit Map Point home map map templates default edit map point MapPoint/Edit','000001000001000020000002',NULL),('u9vfx33XDk5la1-QC5FK7g','Default Map Point View','','home/map/map-templates/default-map-point-view',1238048383,1304392055,'3','7','3','WebGUI::Asset::Template',0,'Default Map Point View Default Map Point View home map map templates default map point view MapPoint/View','000001000001000020000003',NULL),('kwTL1SWCk0GlpiJ5zAAEPQ','surveyedit.css','','root/import/survey/surveyedit.css',1244488512,1287545015,'3','7','12','WebGUI::Asset::Snippet',0,'surveyedit.css surveyedit.css root import survey surveyedit.css editor_container visibility hidden z-index 100 loading-mask position absolute left 0 top 0 width 100 height 100 z-index 20000 background-color white opacity:0.6 filter:alpha(opacity=60 loading position absolute left 50 top 50 padding 2px z-index 20001 height auto margin 35px 0 0 30px loading loading-indicator background url(^Extras(\"wobject/Survey/rel_interstitial_loading.gif no-repeat color 555 font bold 13px tahoma,arial,helvetica padding 18px 80px margin 0 text-align center height auto z-index 20002 div.testarea width 200px height 100px z-index 999 border 1px solid gray background f7f7f7 position absolute top 5 left:5 div.trashcan border 1px solid gray width 175px height 50px div.editarea margin-top:40px padding:10px float:left border 1px solid gray div.editquestion padding:10px float:left div.editanswer padding:10px float:left submitbutton padding:20px div.entry padding-bottom:10px padding-left:10px ul.draglist list-style none margin:0 padding:0 ul.draglist li margin 1px ul.questionList position relative background f7f7f7 border 1px solid gray list-style none margin:0 padding:0 min-height 40px li.section background-color CCCCFF border:1px solid 7EA6B2 cursor move min-height 10px li.question background-color D1E6EC border:1px solid 7EA6B2 cursor move padding-left:10px min-height 10px li.answer background-color F1FFB8 border:1px solid 7EA6B2 cursor move padding-left:15px min-height 10px sections-panel li.selected background-image url(^Extras(\"toolbar/bullet/moveRight.gif background-position:99 center background-repeat no-repeat font-weight:bold goto-yui-ac width:15em margin-top:0.5em wGwarning background-color:#FF6666 border:1px solid red margin:5px padding:10px warning padding 5px sections-panel bd overflow auto background-color:#fff padding:10px buttons height 30px sections-panel_c yui-resize yui-resize-handle-r right 6px make room for the scroll-bars sections-panel div.ft font-size 100 ','000001000001000042000014',NULL),('i5kt5aodVs_oepNEkE7Okw','poll.css','','poll.css',1242312883,1242312883,'3','7','12','WebGUI::Asset::Snippet',0,'poll.css poll.css poll.css styles for the poll asset pollColor background-color:#808080 pollOptions pollSubmit border:0 margin:0 padding:0 ','000001000001000027000002',NULL),('uCn31PzislTZlgt_79j7cQ','style.css','','css/style.css',1258524916,1258524916,'3','7','12','WebGUI::Asset::Snippet',0,'style.css style.css css style.css fail safe topWrapper font:82.5%/1.3 helvetica,arial,sans-serif width:98 overflow:hidden margin:0 auto 2em nav float:left width:20 margin:1em 0 2em nav menu list-style:none margin:0 padding:0 contentArea float:right width:77 margin:1em 0 2em padding:5px 1 border:1px solid ccc adminControls margin:1em 0 padding:1em 0 0 border-top:1px dotted ccc ','000001000001000041000006',NULL),('FJbUTvZ2nUTn65LpW6gjsA','Profile Account Layout','','root/import/account/profile/profile-account-layout',1227070381,1256092369,'3','7','12','WebGUI::Asset::Template',0,'Profile Account Layout Profile Account Layout root import account profile profile account layout Account/Layout','000001000001000002000001000001',NULL),('75CmQgpcCSkdsL-oawdn3Q','Default Edit Profile Template','','root/import/account/profile/default-edit-profile-template',1227052575,1253555614,'3','7','12','WebGUI::Asset::Template',0,'Default Edit Profile Template Default Edit Profile Template root import account profile default edit profile template Account/Profile/Edit','000001000001000002000001000002',NULL),('2CS-BErrjMmESOtGT90qOg','Default View Profile Template','','root/import/account/profile/default-view-profile-template',1227070888,1248549087,'3','7','12','WebGUI::Asset::Template',0,'Default View Profile Template Default View Profile Template root import account profile default view profile template Account/Profile/View','000001000001000002000001000003',NULL),('MBmWlA_YEA2I6D29OMGtRg','Default Profile Error Template','','root/import/account/profile/default-profile-error-template',1226542675,1248549086,'3','7','12','WebGUI::Asset::Template',0,'Default Profile Error Template Default Profile Error Template root import account profile default profile error template Account/Profile/Error','000001000001000002000001000004',NULL),('gfZOwaTWYjbSoVaQtHBBEw','Inbox Account Layout','','root/import/account/inbox-account-layout',1226974679,1249407461,'3','7','12','WebGUI::Asset::Template',0,'Inbox Account Layout Inbox Account Layout root import account inbox account layout Account/Layout','000001000001000002000002000001',NULL),('c8xrwVuu5QE0XtF9DiVzLw','Default Inbox View Template','','root/import/account/inbox/default-inbox-view-template',1226894351,1273032723,'3','7','12','WebGUI::Asset::Template',0,'Default Inbox View Template Default Inbox View Template root import account inbox default inbox view template Account/Inbox/View','000001000001000002000002000002',NULL),('0n4HtbXaWa_XJHkFjetnLQ','Default Inbox View Message Template','','root/import/account/inbox/default-inbox-view-message-template',1226894994,1248549086,'3','7','12','WebGUI::Asset::Template',0,'Default Inbox View Message Template Default Inbox View Message Template root import account inbox default inbox view message template Account/Inbox/ViewMessage','000001000001000002000002000003',NULL),('ErEzulFiEKDkaCDVmxUavw','Default Inbox Error Template','','root/import/account/inbox/default-inbox-error-template',1226895484,1248549086,'3','7','12','WebGUI::Asset::Template',0,'Default Inbox Error Template Default Inbox Error Template root import account inbox default inbox error template Account/Inbox/Error','000001000001000002000002000004',NULL),('6uQEULvXFgCYlRWnYzZsuA','Default Inbox Send Message Template','','root/import/account/inbox/default-inbox-send-message-template',1226896682,1279073450,'3','7','12','WebGUI::Asset::Template',0,'Default Inbox Send Message Template Default Inbox Send Message Template root import account inbox default inbox send message template Account/Inbox/SendMessage','000001000001000002000002000005',NULL),('DUoxlTBXhVS-Zl3CFDpt9g','Default Message Confirm Template','','root/import/account/inbox/default-message-confirm-template',1226896802,1248549086,'3','7','12','WebGUI::Asset::Template',0,'Default Message Confirm Template Default Message Confirm Template root import account inbox default message confirm template Account/Inbox/Confirm','000001000001000002000002000006',NULL),('1Q4Je3hKCJzeo0ZBB5YB8g','Default Manage Invitations Template','','root/import/account/inbox/default-manage-invitations-template',1226898445,1248549086,'3','7','12','WebGUI::Asset::Template',0,'Default Manage Invitations Template Default Manage Invitations Template root import account inbox default manage invitations template Account/Inbox/ManageInvitations','000001000001000002000002000007',NULL),('5A8Hd9zXvByTDy4x-H28qw','Default Invitation Confirmation Template','','root/import/account/inbox/default-invitation-confirmation-template',1226899462,1248549086,'3','7','12','WebGUI::Asset::Template',0,'Default Invitation Confirmation Template Default Invitation Confirmation Template root import account inbox default invitation confirmation template Account/Inbox/Confirm','000001000001000002000002000008',NULL),('VBkY05f-E3WJS50WpdKd1Q','Default View Invitation Template','','root/import/account/inbox/default-view-invitation-template',1226899241,1248549087,'3','7','12','WebGUI::Asset::Template',0,'Default View Invitation Template Default View Invitation Template root import account inbox default view invitation template Account/Inbox/ViewInvitation','000001000001000002000002000009',NULL),('XgcsoDrbC0duVla7N7JAdw','Default Invite User Email Template','','root/import/account/inbox/default-invite-user-email-template',1226973330,1248549086,'3','7','12','WebGUI::Asset::Template',0,'Default Invite User Email Template Default Invite User Email Template root import account inbox default invite user email template Account/Inbox/InviteUserMessage','000001000001000002000002000010',NULL),('cR0UFm7I1qUI2Wbpj--08Q','Default Invite User Form Template','','root/import/account/inbox/default-invite-user-form-template',1226964738,1248549086,'3','7','12','WebGUI::Asset::Template',0,'Default Invite User Form Template Default Invite User Form Template root import account inbox default invite user form template Account/Inbox/InviteUser','000001000001000002000002000011',NULL),('SVIhz68689hwUGgcDM-gWw','Default Invite User Confirm Template','','root/import/account/inbox/default-invite-user-confirm-template',1226973314,1248549086,'3','7','12','WebGUI::Asset::Template',0,'Default Invite User Confirm Template Default Invite User Confirm Template root import account inbox default invite user confirm template Account/Inbox/InviteUserConfirm','000001000001000002000002000012',NULL),('zrNpGbT3odfIkg6nFSUy8Q','Friends Layout Template','','root/import/account/friends/friends-layout-template',1226994016,1249407461,'3','7','12','WebGUI::Asset::Template',0,'Friends Layout Template Friends Layout Template root import account friends friends layout template Account/Layout','000001000001000002000003000001',NULL),('1Yn_zE_dSiNuaBGNLPbxtw','Default Friends View Template','','root/import/account/friends/default-friends-view-template',1226994422,1248549086,'3','7','12','WebGUI::Asset::Template',0,'Default Friends View Template Default Friends View Template root import account friends default friends view template Account/Friends/View','000001000001000002000003000002',NULL),('AZFU33p0jpPJ-E6qLSWZng','Default Friends Edit Template','','root/import/account/friends/default-friends-edit-template',1226994865,1248549086,'3','7','12','WebGUI::Asset::Template',0,'Default Friends Edit Template Default Friends Edit Template root import account friends default friends edit template Account/Friends/Edit','000001000001000002000003000003',NULL),('AGJBGviWGAwjnwziiPjvDg','Default Send Request Template','','root/import/account/friends/default-send-request-template',1226995497,1248549087,'3','7','12','WebGUI::Asset::Template',0,'Default Send Request Template Default Send Request Template root import account friends default send request template Account/Friends/SendRequest','000001000001000002000003000004',NULL),('7Ijdd8SW32lVgg2H8R-Aqw','Default Friends Error Template','','root/import/account/friends/default-friends-error-template',1226995714,1248549086,'3','7','12','WebGUI::Asset::Template',0,'Default Friends Error Template Default Friends Error Template root import account friends default friends error template Account/Friends/Error','000001000001000002000003000005',NULL),('K8F0j_cq_jgo8dvWY_26Ag','Default Friends Confirmation Template','','root/import/account/friends/default-friends-confirmation-template',1226995643,1248549086,'3','7','12','WebGUI::Asset::Template',0,'Default Friends Confirmation Template Default Friends Confirmation Template root import account friends default friends confirmation template Account/Friends/Confirm','000001000001000002000003000006',NULL),('G5V6neXIDiFXN05oL-U3AQ','Default Remove Friends Confirmation Template','','root/import/account/friends/default-remove-friends-confirmation-template',1226995768,1248549087,'3','7','12','WebGUI::Asset::Template',0,'Default Remove Friends Confirmation Template Default Remove Friends Confirmation Template root import account friends default remove friends confirmation template Account/Friends/Confirm','000001000001000002000003000007',NULL),('9ThW278DWLV0-Svf68ljFQ','Account Layout','','root/import/account/user/account-layout',1226647187,1249407460,'3','7','12','WebGUI::Asset::Template',0,'Account Layout Account Layout root import account user account layout Account/Layout','000001000001000002000004000001',NULL),('aUDsJ-vB9RgP-AYvPOy8FQ','Shop Account Layout','','root/import/account/shop/shop-account-layout',1226660439,1263962529,'3','7','12','WebGUI::Asset::Template',0,'Shop Account Layout Shop Account Layout root import account shop shop account layout Account/Layout','000001000001000002000005000001',NULL),('-zxyB-O50W8YnL39Ouoc4Q','Default My Sales Template','','root/import/default-my-sales-template',1236959717,1248563425,'3','7','12','WebGUI::Asset::Template',0,'Default My Sales Template Default My Sales Template root import default my sales template Shop/MySales','000001000001000002000005000002',NULL),('b4n3VyUIsAHyIvT-W-jziA','Contributions Layout','','root/import/account/contributions/contributions-layout',1227074747,1249407461,'3','7','12','WebGUI::Asset::Template',0,'Contributions Layout Contributions Layout root import account contributions contributions layout Account/Layout','000001000001000002000006000001',NULL),('1IzRpX0tgW7iuCfaU2Kk0A','Default Contributions View','','root/import/account/contributions/default-contributions-view',1227079721,1250243000,'3','7','12','WebGUI::Asset::Template',0,'Default Contributions View Default Contributions View root import account contributions default contributions view Account/Contrib/View','000001000001000002000006000002',NULL),('N716tpSna0iIQTKxS4gTWA','Default Account Layout','','root/import/account/default-account-layout2',1226604666,1281501163,'3','7','12','WebGUI::Asset::Template',0,'Default Account Layout Default Account Layout root import account default account layout2 Account/Layout','000001000001000002000007',NULL),('CalendarMonth000000001','Default Calendar Month','','root/import/calendar-templates/default-calendar-month',1204890713,1279073449,'3','7','12','WebGUI::Asset::Template',0,'Default Calendar Month Default Calendar Month root import calendar templates default calendar month Calendar/Month','000001000001000006000007',NULL),('q5O62aH4pjUXsrQR3Pq4lw','Default Gallery View Album Thumbnails','','root/import/gallery-templates/default-gallery-view-album-thumbnails',1197825772,1285124155,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery View Album Thumbnails Default Gallery View Album Thumbnails root import gallery templates default gallery view album thumbnails GalleryAlbum/ViewThumbnails','000001000001000015000004',NULL),('kaPRSaf8UKiskiGEgJgLAw','images','','root/import/gallery-templates/images',1197330678,1285124155,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'images images root import gallery templates images','000001000001000015000017',NULL),('matrixtmpl000000000001','Matrix Default View','','matrix-default-view-template',1133743238,1281501162,'3','7','12','WebGUI::Asset::Template',0,'Matrix Default View Matrix Default View matrix default view template Matrix','000001000001000022000002',NULL),('matrixtmpl000000000003','Matrix Default Detailed Listing','','matrix-default-detailed-listing',1133743238,1281501163,'3','7','12','WebGUI::Asset::Template',0,'Matrix Default Detailed Listing Matrix Default Detailed Listing matrix default detailed listing Matrix/Detail','000001000001000022000003',NULL),('alraubvBu-YJJ614jAHD5w','matrix-nav-tmpl','','new-matrix/matrix-nav-tmpl',1232664015,1281501163,'3','7','12','WebGUI::Asset::Template',0,'matrix-nav-tmpl matrix-nav-tmpl new matrix matrix nav tmpl Navigation','000001000001000022000009',NULL),('PBtmpl0000000000000062','Default Gradebook Report','','root/import/survey/default-gradebook-report',1124395696,1250243000,'3','7','12','WebGUI::Asset::Template',0,'Default Gradebook Report Default Gradebook Report root import survey default gradebook report Survey/Gradebook','000001000001000042000002',NULL),('d8jMMMRddSQ7twP4l1ZSIw','Default Survey Take','','root/import/survey/default-survey-take',1227248175,1253555614,'3','7','12','WebGUI::Asset::Template',0,'Default Survey Take Default Survey Take root import survey default survey take Survey/Take','000001000001000042000005',NULL),('E3tzZjzhmYoNlAyP2VW33Q','Edit Story','','root/import/storymanager/editstory',1239236292,1303183716,'3','7','4','WebGUI::Asset::Template',0,'Edit Story Edit Story root import storymanager editstory Story/Edit','000001000001000040000003',NULL),('TbDcVLbbznPi0I0rxQf2CQ','Story Template Topic','','root/import/storymanager/storytemplatetopic',1237524306,1253636379,'3','7','4','WebGUI::Asset::Template',0,'Story Template Topic Story Template Topic root import storymanager storytemplatetopic Story','000001000001000040000004',NULL),('brxm_faNdZX5tRo3p50g3g','Map Templates','','home/map/map-templates',1238054297,1304392055,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'Map Templates Map Templates home map map templates','000001000001000020',NULL),('i9-G00ALhJOr0gMh-vHbKA','Inbox SMS Notification','','root/import/inbox-sms-notification',1250408924,1250408924,'3','7','4','WebGUI::Asset::Template',0,'Inbox SMS Notification Inbox SMS Notification root import inbox sms notification Account/Inbox/Notification','000001000001000002000002000014',NULL),('S3zpVitAmhy58CAioH359Q','Default Test Results','','root/import/survey/default-test-results',1242893798,1250243000,'3','7','12','WebGUI::Asset::Template',0,'Default Test Results Default Test Results root import survey default test results Survey/TestResults','000001000001000042000013',NULL),('b1316COmd9xRv4fCI3LLGA','Inbox Notification','','inbox_notification',1236956475,1236956475,'3','7','4','WebGUI::Asset::Template',0,'Inbox Notification Inbox Notification inbox notification Account/Inbox/Notification','000001000001000002000002000013',NULL),('nWNVoMLrMo059mDRmfOp9g','Default Feedback','','root/import/survey/default-feedback',1242259265,1250243000,'3','7','12','WebGUI::Asset::Template',0,'Default Feedback Default Feedback root import survey default feedback Survey/Feedback','000001000001000042000015',NULL),('l0guT3vTR3B8cL6vtP-g3A','Contribute','You don\'t have to be a developer to become a project contributor. Examples of how you can contribute include:\n \n\nTranslators - Visit i18n.webgui.org\n and either help translate a few items in an existing language, or \ncreate a new translation. \nGraphic Des','contribute',1271445611,1285124369,'3','7','3','WebGUI::Asset::Wobject::Article',1,'Contribute contribute contribute You don\'t have to be a developer to become a project contributor Examples of how you can contribute include Translators Visit i18n.webgui.org and either help translate a few items in an existing language or create a new translation Graphic Designers Create WebGUI style themes icons or fix UI bugs You can contribute your items to WebGUI\'s Addons and Plugins area for others to download and use Usability Experts Help make WebGUI more accessable and easier to use by submitting RFEs Even better submit an RFE that\'s ready to implement by including the code Doc Writers Write documents in WebGUI\'s wiki help out on the boards improve WebGUI\'s built in documentation Testers Validate WebGUI\'s features against its documentation search for errors and report bugs Test writers If you have some Perl abilities you can help develop unit tests to make sure the WebGUI API is behaving as documented Developers Write a new feature for WebGUI like a macro asset wobject auth module or workflow activity and contribute it to the Addons and Plugins If you\'re interested in developing for WebGUI be sure to check out the Development Best Practices wiki article Bug Fixers Cruise the bug list and submit patches to correct the problem Core Developers Becoming a core developer is a privilege To earn it you have to demonstrate through bug fixes and/or contributions that you can make sound programming decisions without the need for someone to scrutinize everything you check in WebGUI is a very large and complex application so getting to this level can take some time Core developers are developers with commit privileges to the subversion repository Advocate Spread the word about WebGUI tell people about how you use it and how it\'s helped you.Encourage people to try it out Marketing and Promotion If you have a talent for marketing advertising or promotion you can be a super advocate Have a marketing idea Contact tavis AT plainblack DOT com Make a WebGUI banner or print ad and contribute it Maybe you have a design for a cool wallpaper or t-shirt anything to get the word out ','000001000002000004000002',NULL),('D6cJpRcey35aSkh9Q_FPUQ','Default EU User Screen','','root/import/default-eu-user-screen',1242407725,1313542961,'3','7','12','WebGUI::Asset::Template',0,'Default EU User Screen Default EU User Screen root import default eu user screen TaxDriver/EU/User','000001000001000036000019',NULL),('lo1rpxn3t8YPyKGers5eQg','Friend Manager','Templates for the Friend Manager ','root/import/account/friendmanager',1238625621,1238625621,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Friend Manager Friend Manager root import account friendmanager Templates for the Friend Manager','000001000001000002000010',NULL),('64tqS80D53Z0JoAs2cX2VQ','FriendManager View Template','','root/import/account/friendmanager/view',1239400975,1295931508,'3','7','4','WebGUI::Asset::Template',0,'FriendManager View Template FriendManager View Template root import account friendmanager view Account/FriendManager/View','000001000001000002000010000001',NULL),('lG2exkH9FeYvn4pA63idNg','Friend Manager Edit Friends','','root/import/account/friendmanager/edit',1239383808,1289967962,'3','7','4','WebGUI::Asset::Template',0,'Friend Manager Edit Friends Friend Manager Edit Friends root import account friendmanager edit Account/FriendManager/Edit','000001000001000002000010000002',NULL),('newslettercs0000000001','Newsletter Manager (default)','','newslettercstemplate',1185754569,1252682678,'3','7','3','WebGUI::Asset::Template',0,'Newsletter Manager default Newsletter Manager newslettercstemplate Collaboration','000001000001000026000002',NULL),('iCM9pRY5yYyjufROgaCDlg','storyManager.css','','storymanager.css',1253305659,1253305659,'3','7','12','WebGUI::Asset::Snippet',0,'storyManager.css storyManager.css storymanager.css editStory width 100 editStory legend font-size 1.8em border-bottom 2px solid editStory tbody width 943px editStory td padding 5px editStory story float:left editStory story label editStory photo label display block width 100 text-align right editStory photoContainer border 1px solid float:left margin 10px 0 0 20px editStory photoContainer photoHeader font-size 1.2em font-weight bold editStory buttons clear both text-align right padding 10px 0 editStory story_formId_tbl width 100 important editStory fieldset border none storyArchive width 100 storyArchive h3 border-bottom 2px solid margin-bottom 10px storyArchive storyList list-style-type none padding-left 0 storyArchive storyList li padding-left 10px margin-bottom 10px storyArchive pagination float left list-style-type none storyArchive keywords width 100 clear both storyArchive img border none storyArchive controls a margin-right 10px viewStory storyTitle viewStory storyUpdated viewStoryTopic storyTitle viewStoryTopic storyUpdated float left viewStory storyTitle viewStoryTopic storyTitle font-size 1.5em width 100 viewStory storyHighlights viewStoryTopic storyHighlights float:right margin-top 1.5em viewStory storyPhoto viewStoryTopic storyPhoto float left margin 0 10px 10px 0 viewStory photoCaption viewStoryTopic photoCaption width 496px padding 5px display:block viewStory clear viewStoryTopic clear clear both storyTopic width 100 storyTopic h3 border-bottom 2px solid storyTopic topStory width 340px float left storyTopic storyList width 250px float left storyTopic storyListBig width 100 float left htmltagcloud wg-clear clear:both ','000001000001000040000007',NULL),('zb_OPKNqcTuIjdvvbEkRjw','article.css','','article.css',1247484073,1256092368,'3','7','12','WebGUI::Asset::Snippet',0,'article.css article.css article.css styles for the article asset withImage articleContent linkedImage articleContent width:100 overflow:hidden withImage articleImage linkedImage articleImage float:right margin:0 0 10px 10px linkedImage caption display:block ','000001000001000004000005',NULL),('PBtmpl0000000000000210','Request Tracker Post Form','','request-tracker-template2',1147642410,1277868922,'3','7','12','WebGUI::Asset::Template',0,'Request Tracker Post Form Request Tracker Post Form request tracker template2 Collaboration/PostForm','000001000001000008000028',NULL),('pbrobot000000000000001','robots.txt','','robots.txt',1147642511,1256092369,'3','7','12','WebGUI::Asset::Snippet',0,'robots.txt robots.txt robots.txt User-agent Disallow op=auth Disallow op=account Disallow op=ajaxGetI18N Disallow op=makePrintable Disallow op=viewHelp Disallow op=viewHelpIndex','000001000001000033',NULL),('4qh0kIsFUdd4Ox-Iu1JZgg','EMS','','root/import/ems',1208725439,1257311886,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'EMS EMS root import ems','000001000001000012',NULL),('hreA_bgxiTX-EzWCSZCZJw','Print Remaining Tickets Template (default)','','root/import/ems/default-print-remaining-tickets-template',1257311887,1257311887,'3','7','12','WebGUI::Asset::Template',0,'Print Remaining Tickets Template default Print Remaining Tickets Template default root import ems default print remaining tickets template EMS/PrintRemainingTickets','000001000001000012000008',NULL),('P_4uog81vSUK4KxuW_4GUA','css','','css',1258524916,1258524916,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'css css css','000001000001000054',NULL),('H_-8zjtWsO1FUpQqNtkxNQ','wg-base.css','','css/wg-base.css',1258524916,1258524916,'3','7','12','WebGUI::Asset::Snippet',0,'wg-base.css wg-base.css css wg base.css In this stylesheet you can find the styles that are used in more than one template For example file/attachment icons pagination etc Elements that are styled with this stylesheet have a classname that starts with wg general wg-icon border:0px none vertical-align middle wg-clear clear:both inline list pagination wg-inline margin:0 0 1em padding:0 wg-inline li display:inline margin:0 padding:0 wg-inline li.active font-weight:bold forms wg-captchaImage border:0 none vertical-align:middle margin-left:5px ','000001000001000054000001',NULL),('0iMMbGN3BevuCBHjjLiQNA','WebGUI/Deactivate','','root/import/auth/webgui/deactivate',1269401469,1287545015,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'WebGUI/Deactivate WebGUI/Deactivate root import auth webgui deactivate','000001000001000005000009',NULL),('zaHUYsE_PgKk8hnVd8ffEQ','WebGUI Deactivate Account Template','','default_webgui_deactivate_account_template',1269401469,1287545015,'3','7','12','WebGUI::Asset::Template',0,'WebGUI Deactivate Account Template WebGUI Deactivate Account Template default webgui deactivate account template Auth/WebGUI/Deactivate','000001000001000005000009000001',NULL),('6A4yIjWwJfIE0Ep-I0jutg','LDAP/Deactivate','','root/import/auth/ldap/deactivate',1269401469,1287545015,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'LDAP/Deactivate LDAP/Deactivate root import auth ldap deactivate','000001000001000005000010',NULL),('_P4PMiraGsLTfOjK4fYQPQ','LDAP Deactivate Account Template','','default_ldap_deactivate_account_template',1269401469,1287545015,'3','7','12','WebGUI::Asset::Template',0,'LDAP Deactivate Account Template LDAP Deactivate Account Template default ldap deactivate account template Auth/LDAP/Deactivate','000001000001000005000010000001',NULL),('_XfvgNH__bY1ykMiKYSobQ','account.css','','root/import/account/account.css',1233168041,1281501163,'3','7','12','WebGUI::Asset::Snippet',0,'account.css account.css root import account account.css general WGsubContent WGsubContent a WGsubContent a:link color:#000000 important WGbutton float:right padding-right:10px centered text-align center WGaccount_message background-color white border solid BECEF8 1px height 300px margin-bottom 10px margin-left 60px margin-top 20px overflow:-moz-scrollbars-vertical overflow-x:hidden overflow-y:scroll padding:10px text-align left vertical-align:top width 90 WGprofileMember font-size:9px margin-right:20px text-align:right WGmember color:#3e4f77 font 9px Verdana Arial Helvetica sans-serif text-align:center WGphotostyle border:solid 3e4f77 2px margin-bottom:5px margin-top:5px rightalign float right WGsend float:right padding-right 75px bio addtonetwork network WGbordered border-bottom dashed BECEF8 2px padding-bottom 10px WGfriendpic border solid BECEF8 1px WGinvitemsg width 600px height 150px ol.WGProfile_interests color:#0B2259 font-size:15px font-weight:bold list-style-type:none margin:0px padding:0px padding:5px 5px ol.WGProfile_interests li margin-bottom:15px ol.WGProfile_interests span font-size:12px font-weight:normal color:black WGpBio border-bottom:solid DDE6FB 1px margin:0px margin-bottom:5px padding-bottom:5px WGpBio div background-color:#DDE6FB padding:2px 5px margin-bottom:2px WGprogram font-size 9px contributions WGContribCount font-size:12px text-align:left padding:3px WGContribTitle background-color:#f2f5fa border solid d8dee8 1px color:#0B2259 font-size:12px font-weight:bold min-height:25px padding:3px text-align:center text-decoration underline WGContribTitleLeft background-color:#f2f5fa border solid d8dee8 1px color:#0B2259 font-size:12px font-weight:bold min-height:25px padding:3px text-align:center text-decoration underline WGContribEntry text-align:center padding:3px WGContribEntryLeft text-align:left padding:3px edit box WGeditBox background:white url(images/edit_box_bg.jpg no-repeat bottom left border:solid 8DABF1 2px display:block font-family:verdana font-size:9px font-weight:bold left:100px moz-box-sizing:border-box padding:5px position:absolute top:100px width:590px z-index:100 WGeditBox input WGeditBox select font-size:9px friends WGfriends_name font-weight:bold width:90 WGfriends_photo font-weight:bold width:10 WGfriends_photo img height 50px width 50px WGfriends_private float:right padding-bottom 5px width 50 WGfriends_ninety vertical-align:top width 90 WGfriends_seventy vertical-align:top width 70 WGfriends_ten width 10 WGfriends_ten img height 50px width 50px WGfriends_twenty width 20 WGaccepts padding-bottom 5px inbox WGProfile_msgcontainer padding:2px WGinbox_count font-size:12px font-weight:bold padding:3px text-align:left WGinbox_errors font-weight:bold color:red text-align:center WG_inbox_InviteLabel width:50px text-align:right WG_inbox_InviteLabelView font-weight:bold width:120px WGmsgcontainer padding:6px display:block margin-bottom:6px inbox contacts WGdatacells border-bottom dashed BECEF8 1px WGinbox_contactsTbl background-color:#EEF2FD font-family:arial font-size:9pt width:100 contacts height 275px overflow auto inbox forms WGbuttons_left float left WGbuttons_right float right WGinbox_from color black font-weight normal text-decoration none WGinbox_subject width 530px WGinbox_messageTo background-color white border solid BECEF8 1px height 50px overflow:-moz-scrollbars-vertical overflow-x:hidden overflow-y:scroll width 530px inbox pagination WGinbox_buttons display:inline float:left font-size:10px text-align:left width:70 WGinbox_pagination display:inline text-align:right width:20 WGinbox_messagerpp font-size:10px display:inline text-align:right width:20 WGmessage display:inline float:left font-size:10px text-align:left width:70 WGmessagerpp font-size:10px display:inline text-align:right float right WG-previous-next float right inbox threads WGevenThread background-color e1e8fb border-bottom 1px solid bfcef9 padding 8px text-align:center WGoddThread background-color eef2fd border-bottom 1px solid bfcef9 padding 8px text-align center pagination WGProfile_pagination font-size:10px text-align:right width:20 WGProfile_messagerpp font-size:10px display:inline text-align:right width:20 WGProfile_paginationLeft font-size:10px text-align:left width:20 WGProfile_paginationCenter font-size:10px text-align:center width:20 WGProfile_pagination a background-color:#f2f5fa border:solid bfc8dc 1px font-size:10px font-weight:bold padding:1px 5px text-decoration:none WGProfile_pagination a:hover background-color:#d8dee8 color:white WGProfile_pagination prevNext background-color transparent border none color black WGProfile_pagination prevNext:hover background-color transparent border none color black WGProfile_pagination active background-color:#d8dee8 border:solid bfc8dc 1px color:white font-size:10px font-weight:bold padding:1px 5px text-decoration:none WGProfile_pagination img vertical-align:middle margin-top:2px border:none profile WGProfile_registration background:none border:none font-size:9pt font-family:arial margin:0 padding:0 width:100 WGProfile_registration header background-color:#818997 color:#3e4f77 font-size:10px font-weight:bold text-align:left WGProfile_registration header a color:white text-decoration:none WGProfile_registration help a font-weight:bold text-decoration:none WGProfile_registration inputText font-size:10px margin-right:1px WGProfile_registration label font-size:9pt font-weight:bold text-align:right white-space:nowrap width:1 WGProfile_registration labelLeft font-size:9pt font-weight:bold white-space:nowrap width:1 text-align left vertical-align top WGProfile_registration smallLabel font-size:8px text-align:center WGProfile_registration smallText font-size:9px WGinboxTbl display:block margin 4px padding 2px WGProfile_registration bar WGProfile_registration barRight background-color:#f2f5fa border solid d8dee8 1px color:#3e4f77 font-size:14px font-weight:bold margin:10px 0px 10px 0px min-height:25px padding:4px 4px 0px 4px vertical-align:middle WGProfile_registration bar text-align center WGProfile_registration barRight text-align right WGProfile_registration bar a color:#0B2259 font-size:10px font-weight:bold WGProfile_registration barFive background-color:#f2f5fa border solid d8dee8 1px color:#3e4f77 font-size:14px font-weight:bold text-align:center margin-right:3px min-height:25px padding:2px width:4.3 WGProfile_registration barTen background-color:#f2f5fa border solid d8dee8 1px color:#3e4f77 font-size:14px font-weight:bold min-height:25px padding:2px text-align:center width:7.2 WGProfile_registration barFifteen background-color:#f2f5fa border solid d8dee8 1px color:#3e4f77 font-size:14px font-weight:bold margin-right:3px min-height:25px padding:2px text-align:center width:15 WGProfile_registration barFifty background-color:#f2f5fa border solid d8dee8 1px color:#3e4f77 font-size:14px font-weight:bold margin-right:3px min-height:25px padding:2px text-align:center width:50 WGbarContainer display:block margin:10px 0px 10px 0px width:100 profile edit WGfields padding 2px WGfields_left padding:2px vertical-align:top width 15 WGfields_right display:inline float:right padding:2px text-align:right width:80 vertical-align top WGProfile display:table margin 0 padding 0 width:100 WGProfileFields border:0 padding 0 margin:0 width 100 WGProfileFields ol display inline list-style-type none WGProfileFields ul list-style-type none display inline WGProfileFields ul li display inline-block display inline zoom 1 profile view WGProfile_accepts text-align:right background-color:gray padding:4px width:100 WGviewContainer margin:0 padding:0 width:90 WGinternational background-color:red color:white display:inline font-weight:bold padding:4px text-align:center WGcategoryLabel vertical-align:top width:90 WGprivateMessage background-color:gray padding:4px text-align:right WGprofileAlert background-color:red color:white font-weight:bold padding:4px text-align:center width:100 WGprofilePhoto vertical-align:top profile errors WGprofileErrors background-color ff0000 color ffffff font-weight bold text-align center WGprofilefield_required_off WGprofilefield_required background-color ffd6bb WGprofilefield_error background-color FF9494 WGerrorMsg font-weight:bold color:red text-align:center user WGuserInvite_subject background-color white border solid BECEF8 1px height 25px text-align left width 500px margin-left 50px margin-bottom 20px overflow:-moz-scrollbars-vertical overflow-x:hidden overflow-y:scroll view profile WGprofile_canEdit text-align:center background-color:red padding:4px color:white font-weight:bold WGprofile_fieldLabel background DDE6FB padding:2px width:200px WGprofile_fieldData margin-left 5px WGprofile_fieldStatus padding:4px color:white font-weight:bold TABS TABS outer WGbottombutton float:right padding-right:2px padding-top 2px position relative WGcontent padding:10px WGcleartab clear both height:0 WGsubContent color setting for border under outer tabs that surrounds inner tabs border solid d8dee8 6px WGtopbutton float:right clear:both padding-right:2px padding-top 2px position relative ul.WGtopTabs ul.WGtopTabs li list-style-type:none margin:10px 0px 0px 0px padding:0px position:relative width:auto Xposition:relative zoom:1 ul.WGtopTabs li display:block float:left margin-right 3px ul.WGtopTabs li b background-color eef2fd border-top:solid d8dee8 1px display:block padding:4px 8px position:relative top:-1px ul.WGtopTabs a non-selected tabs color settings display:block color:#9ea0bb important font-size:12px font-family Arial Helvetica sans-serif text-decoration:none background-color:#f2f5fa border-left solid d8dee8 1px border-right solid d8dee8 1px ul.WGtopTabs a:hover ul.WGtopTabs a:hover b ul.WGtopTabs a.selected ul.WGtopTabs a.selected b selected tab color settings background-color:#d8dee8 color:#3e4f77 text-align right TABS YUI WGcleardiv clear both margin 0px 0px 0px 0px padding 0px WGviewProfile wgView border none font bold 10px Verdana color 3e4f77 text-decoration:none WGview position absolute right 4px top:4px WGprofile_displayView x-system-font:none border:medium none color:#0B2258 display:inline float:right font-family:Verdana font-size:10px font-size-adjust:none font-stretch:normal font-style:normal font-variant:normal font-weight:bold line-height:normal padding-right:8px padding-top:3px text-decoration none WGprofile_displaySubContent border around friends tab content border solid d8dee8 6px border-top solid d8dee8 18px Copyright c 2008 Yahoo Inc All rights reserved Code licensed under the BSD License http://developer.yahoo.net/yui/license.txt version 2.6.0 yui tabs color settings below yui-navset defaults to yui-navset-top WGsubContent yui-skin-sam yui-navset yui-nav WGsubContent yui-skin-sam yui-navset yui-navset-top yui-nav protect nested tabviews from other orientations border:solid eef2fd color between tab list and content border-width:0 0 5px Xposition:relative zoom:1 WGsubContent yui-skin-sam yui-navset yui-nav a WGsubContent yui-skin-sam yui-navset yui-navset-top yui-nav a background:#ffffff tab background border:solid ffffff border-width:0 1px color:#bfccdd position:relative text-decoration:none font-size:12px font-family Arial Helvetica sans-serif font-weight bold WGsubContent yui-skin-sam yui-navset yui-nav a em WGsubContent yui-skin-sam yui-navset yui-navset-top yui-nav a em border:solid eef2fd border-width:1px 0 0 cursor:hand padding:0.25em 75em left:0 right 0 bottom 0 protect from other orientations top:-1px for 1px rounded corners position:relative WGsubContent yui-skin-sam yui-navset yui-nav selected a WGsubContent yui-skin-sam yui-navset yui-nav selected a:focus no focus effect for selected WGsubContent yui-skin-sam yui-navset yui-nav selected a:hover no hover effect for selected background eef2fd selected tab background color 3e4f77 font-size:12px font-family Arial Helvetica sans-serif text-decoration:none font-weight bold WGsubContent yui-skin-sam yui-navset yui-nav selected a WGsubContent yui-skin-sam yui-navset yui-nav selected a em border-color:#eef2fd selected tab border color WGsubContent yui-skin-sam yui-navset yui-nav a:hover WGsubContent yui-skin-sam yui-navset yui-nav a:focus background eef2fd hover tab background color 3e4f77 outline:0 font-size:12px font-family Arial Helvetica sans-serif text-decoration:none font-weight bold WGsubContent yui-skin-sam yui-navset yui-content background eef2fd content background color WGsubContent yui-skin-sam yui-navset yui-content WGsubContent yui-skin-sam yui-navset yui-navset-top yui-content border:5px solid eef2fd content border padding:0.75em 1em content padding left and right orientations WGsubContent yui-skin-sam yui-navset-left yui-nav WGsubContent yui-skin-sam yui-navset yui-navset-left yui-nav WGsubContent yui-skin-sam yui-navset yui-navset-right yui-nav WGsubContent yui-skin-sam yui-navset-right yui-nav border-width:0 5px 0 0 Xposition:absolute from tabview-core have to reiterate for skin-sam due to pos:rel on skin-sam yui-nav top:0 bottom:0 stretch to fill content height WGsubContent yui-skin-sam yui-navset yui-navset-right yui-nav WGsubContent yui-skin-sam yui-navset-right yui-nav border-width:0 0 0 5px WGsubContent yui-skin-sam yui-navset-left yui-nav li WGsubContent yui-skin-sam yui-navset yui-navset-left yui-nav li WGsubContent yui-skin-sam yui-navset-right yui-nav li margin:0 0 0.3em space between tabs padding:0 0 0 1px gecko make room for overflow WGsubContent yui-skin-sam yui-navset-right yui-nav li padding:0 1px 0 0 gecko make room for overflow WGsubContent yui-skin-sam yui-navset-left yui-nav selected WGsubContent yui-skin-sam yui-navset yui-navset-left yui-nav selected margin:0 1px 0.16em 0 WGsubContent yui-skin-sam yui-navset-right yui-nav selected margin:0 0 0.16em 1px WGsubContent yui-skin-sam yui-navset-left yui-nav a WGsubContent yui-skin-sam yui-navset-right yui-nav a border-width:1px 0 WGsubContent yui-skin-sam yui-navset-left yui-nav a em WGsubContent yui-skin-sam yui-navset yui-navset-left yui-nav a em WGsubContent yui-skin-sam yui-navset-right yui-nav a em border-width:0 0 0 1px padding:0.2em 75em top:auto left:-1px for 1px rounded corners WGsubContent yui-skin-sam yui-navset-right yui-nav a em border-width:0 1px 0 0 left:auto right:-1px for 1px rounded corners WGsubContent yui-skin-sam yui-navset-left yui-nav a WGsubContent yui-skin-sam yui-navset-left yui-nav selected a WGsubContent yui-skin-sam yui-navset-left yui-nav a:hover WGsubContent yui-skin-sam yui-navset-right yui-nav a WGsubContent yui-skin-sam yui-navset-right yui-nav selected a WGsubContent yui-skin-sam yui-navset-right yui-nav a:hover WGsubContent yui-skin-sam yui-navset-bottom yui-nav a WGsubContent yui-skin-sam yui-navset-bottom yui-nav selected a WGsubContent yui-skin-sam yui-navset-bottom yui-nav a:hover background-image:none no left-right or bottom-top gradient WGsubContent yui-skin-sam yui-navset-left yui-content border:1px solid d8dee8 content border bottom orientation WGsubContent yui-skin-sam yui-navset-bottom yui-nav WGsubContent yui-skin-sam yui-navset yui-navset-bottom yui-nav border-width:5px 0 0 color between tab list and content WGsubContent yui-skin-sam yui-navset yui-navset-bottom yui-nav selected WGsubContent yui-skin-sam yui-navset-bottom yui-nav selected margin:-1px 0.3em 0 0 for overlap WGsubContent yui-skin-sam yui-navset yui-navset-bottom yui-nav li WGsubContent yui-skin-sam yui-navset-bottom yui-nav li padding:0 0 1px 0 gecko make room for overflow vertical-align:top WGsubContent yui-skin-sam yui-navset yui-navset-bottom yui-nav li a WGsubContent yui-skin-sam yui-navset-bottom yui-nav li a WGsubContent yui-skin-sam yui-navset yui-navset-bottom yui-nav a em WGsubContent yui-skin-sam yui-navset-bottom yui-nav a em border-width:0 0 1px top:auto bottom:-1px for 1px rounded corners WGsubContent yui-skin-sam yui-navset-bottom yui-content WGsubContent yui-skin-sam yui-navset yui-navset-bottom yui-content border:1px solid f2f5fa content border WGsubContent yui-skin-sam background-color d8dee8 padding 10px 5 5 5px display:block yui tab placement settings below WGsubContent yui-skin-sam yui-navset yui-nav li WGsubContent yui-skin-sam yui-navset yui-navset-top yui-nav li margin:0 0.3em 0 0 space between tabs padding:5px 0 0 gecko make room for overflow zoom:1 WGsubContent yui-skin-sam yui-navset yui-nav selected WGsubContent yui-skin-sam yui-navset yui-navset-top yui-nav selected margin:0 0.3em 1px 0 for overlap WGsubContent yui-navset yui-nav li,.yui-navset yui-navset-top yui-nav li WGsubContent yui-navset yui-navset-bottom yui-nav li margin:0 0.5em 0 0 WGsubContent yui-navset-left yui-nav li,.yui-navset-right yui-nav li margin:0 0 0.5em WGsubContent yui-navset yui-content yui-hidden display:none WGsubContent yui-navset yui-navset-left yui-nav,.yui-navset yui-navset-right yui-nav WGsubContent yui-navset-left yui-nav,.yui-navset-right yui-nav width:6em WGsubContent yui-navset-top yui-nav,.yui-navset-bottom yui-nav width:auto WGsubContent yui-navset yui-navset-left,.yui-navset-left padding:0 0 0 6em WGsubContent yui-navset-right padding:0 6em 0 0 WGsubContent yui-navset-top,.yui-navset-bottom padding:auto WGsubContent yui-nav,.yui-nav li list-style:none margin:0 padding:0 WGsubContent yui-navset li em font-style:normal WGsubContent yui-navset position:relative zoom:1 WGsubContent yui-navset yui-content zoom:1 WGsubContent yui-navset yui-nav li,.yui-navset yui-navset-top yui-nav li WGsubContent yui-navset yui-navset-bottom yui-nav li display:inline-block display:-moz-inline-stack display:inline vertical-align:bottom cursor:pointer zoom:1 WGsubContent yui-navset-left yui-nav li,.yui-navset-right yui-nav li display:block WGsubContent yui-navset yui-nav a position:relative WGsubContent yui-navset yui-nav li a,.yui-navset-top yui-nav li a WGsubContent yui-navset-bottom yui-nav li a display:block display:inline-block vertical-align:bottom zoom:1 WGsubContent yui-navset-left yui-nav li a,.yui-navset-right yui-nav li a display:block WGsubContent yui-navset-bottom yui-nav li a vertical-align:text-top WGsubContent yui-navset yui-nav li a em,.yui-navset-top yui-nav li a em WGsubContent yui-navset-bottom yui-nav li a em display:block WGsubContent yui-navset yui-navset-left yui-nav,.yui-navset yui-navset-right yui-nav WGsubContent yui-navset-left yui-nav,.yui-navset-right yui-nav position:absolute z-index:1 WGsubContent yui-navset-top yui-nav,.yui-navset-bottom yui-nav position:static WGsubContent yui-navset yui-navset-left yui-nav,.yui-navset-left yui-nav left:0 right:auto WGsubContent yui-navset yui-navset-right yui-nav,.yui-navset-right yui-nav left:auto right:0 WGsubContent yui-skin-sam yui-navset yui-nav selected a em padding:0.35em 0.75em WGsubContent yui-skin-sam yui-navset-left yui-nav,.yui-skin-sam yui-navset yui-navset-left yui-nav WGsubContent yui-skin-sam yui-navset yui-navset-right yui-nav,.yui-skin-sam yui-navset-right yui-nav border-width:0 5px 0 0 bottom:0 top:0 Xposition:absolute WGsubContent yui-skin-sam yui-navset yui-navset-right yui-nav,.yui-skin-sam yui-navset-right yui-nav border-width:0 0 0 5px WGsubContent yui-skin-sam yui-navset-left yui-nav li,.yui-skin-sam yui-navset yui-navset-left yui-nav li WGsubContent yui-skin-sam yui-navset-right yui-nav li margin:0 0 0.16em padding:0 0 0 1px WGsubContent yui-skin-sam yui-navset-right yui-nav li padding:0 1px 0 0 WGsubContent yui-skin-sam yui-navset-left yui-nav a,.yui-skin-sam yui-navset-right yui-nav a border-width:1px 0 WGsubContent yui-skin-sam yui-navset-left yui-nav a em,.yui-skin-sam yui-navset yui-navset-left yui-nav a em,.yui-skin-sam yui-navset-right yui-nav a em border-width:0 0 0 1px left:-1px padding:0.2em 75em top:auto WGsubContent yui-skin-sam yui-navset-right yui-nav a em border-width:0 1px 0 0 left:auto right:-1px WGsubContent yui-skin-sam yui-navset-left yui-nav a,.yui-skin-sam yui-navset-left yui-nav selected a,.yui-skin-sam yui-navset-left yui-nav a:hover WGsubContent yui-skin-sam yui-navset-right yui-nav a,.yui-skin-sam yui-navset-right yui-nav selected a,.yui-skin-sam yui-navset-right yui-nav a:hover WGsubContent yui-skin-sam yui-navset-bottom yui-nav a,.yui-skin-sam yui-navset-bottom yui-nav selected a WGsubContent yui-skin-sam yui-navset-bottom yui-nav a:hover background-image:none WGsubContent yui-skin-sam yui-navset yui-navset-bottom yui-nav selected WGsubContent yui-skin-sam yui-navset-bottom yui-nav selected margin:-1px 0.16em 0 0 WGsubContent yui-skin-sam yui-navset yui-navset-bottom yui-nav li WGsubContent yui-skin-sam yui-navset-bottom yui-nav li padding:0 0 1px 0 vertical-align:top ','000001000001000002000008',NULL),('_9_eiaPgxzF_x_upt6-PNQ','gallery.css','','root/import/gallery-templates/gallery.css',1197988920,1304392055,'3','7','3','WebGUI::Asset::Snippet',0,'gallery.css gallery.css root import gallery templates gallery.css FIXES FLOAT ISSUES WITHOUT THIS FLOATS GET ALL NUTSY ESPECIALLY IN OPERA AND SAFARI clearfix:after content display block height 0 clear both visibility hidden clearfix display inline-block END FLOAT FIX wgGallery font-family:verdana arial text-align:left firstBar background black color:white font-size:18px font-weight:bold firstBar title margin-left:20px line-height:42px firstBar title a font-size:18px font-weight:bold color:white firstBar buttons float:right firstBar buttons a display:block float:left height:42px line-height:42px font-size:10px color:white font-weight:bold text-align:center padding:0px 5px firstBar buttons rss display:block height:29px position:relative background:transparent padding-top:13px secondBar background F1F1F1 text-align:left border-top:solid 8B8B8B 5px color black overflow hidden secondBar author font-size:10px secondBar desc p margin-left 20px margin-top 0 color black pictures searchArea float:right searchArea float:left searchArea input.searchText border:solid black 1px width:100px margin:0px padding:2px margin-top:5px font-size:10px height:15px margin-right:10px searchArea input.searchBtn border:solid black 1px margin:0px padding:3px margin-top:5px font-size:10px vertical-align:middle cursor:pointer height:21px searchArea a:link searchArea a:visited secondBar author a:link secondBar author a:visited font-size:11px color:black searchArea current font-weight:bold text-transform:uppercase text-decoration:none font-size:10px wgAlbum display moz-inline-box Although this works in later versions of FireFox it does not work in 2.x display:block display inline-block Op Saf IE vertical-align top IE Mac non capisce e a volte crea extra v space width:250px margin:10px wgAlbum albumTitle background black color:white font-size:12px font-weight:bold padding:10px padding-right:50px border:solid 475f6f 1px border-bottom:solid 8B8B8B 5px text-align:left display:block wgAlbum albumImage background F1F1F1 border-left solid black 1px border-right solid black 1px padding-top:15px height:135px wgAlbum albumImage a height:135px width:200px overflow:hidden display:block margin:0px 23px wgAlbum albumImage img border-style:none display:block width:200px height:auto border:solid black 1px wgAlbum albumDesc background F1F1F1 border-left solid black 1px border-right solid black 1px border-bottom solid black 1px text-align:center padding 5px 23px wgAlbum description font-size:10px height:40px overflow:auto text-align:left border:solid silver 1px padding:5px background-color fff color:#222 albumDesc description margin:2px 0px PAGINATION STYLES wgGallery paginationContainer text-align:center background black height:42px wgGallery container clear:both text-align:center wgGallery pagination margin:0px auto 20px auto display:table list-style-type:none white-space:nowrap padding:0px height:42px wgGallery pagination li display:table-cell wgGallery pagination a display:block width:50px line-height:42px color:white font-size:10px text-align:center wgPicture a:link wgPicture a:visited color:black wgPicture width:250px margin:10px display moz-inline-box This does not work in earlier versions of Firefox display:block float:left display inline-block Op Saf IE vertical-align top IE Mac non capisce e a volte crea extra v space wgPicture title background:#e0e0e0 display:block font-size:12px text-align:center padding:2px 5px border:solid black 1px border-bottom:solid 8B8B8B 4px wgPicture title a font-size:12px wgPicture thumbnail text-align:center background F1F1F1 padding:15px 23px 15px 23px margin:0px border-left:solid black 1px border-right:solid black 1px wgPicture thumbnail a display:block width:200px height:120px overflow:hidden border:solid black 1px wgPicture thumbnail img border-style:none width:200px height:auto wgPicture pictureDesc padding:0px border-top:solid e1e1e1 1px border-bottom:solid gray 1px border-left:solid black 1px border-right:solid black 1px background:#F1F1F1 margin:0px wgPicture pictureDesc description margin:0px padding:5px font-size:10px wgPicture details background:#e0e0e0 border:solid 999 1px border-top:solid aaa 1px font-size:9px padding:1px 3px wgPicture details date float:right wgPicture details comments float:left wgPicture details a font-size:9px BEGIN STYLES FOR PHOTO VIEW The Photo view uses some/all of the above classes plus those in this section wgSnapshot float:left margin:10px max-width:250px width:25 wgSnapshot fieldset background-color:#fefefe border:solid 555 2px padding:10px background-color:#f9f9f9 text-align:center navigation width 100 text-align center font-weight bold color navy wgSnapshot p max-width:230px wgSnapshot navigation width:100 margin:5px 0 0 text-align:center wgSnapshot navigation img border none wgSnapshot legend color:#333 font-size:15px font-weight:bold max-width:250px wgSnapshot a.thumbnail img width:200px height:auto border:solid 555 2px wgSnapshot description font-size:9px border:solid 555555 2px padding:5px width:190px margin:0px auto background-color:#fff height:50px overflow:auto text-align:left overflow:auto wgSnapshot a.fullSize margin:0px auto wgPictureDetails float:left width:70 margin:10px overflow hidden wgPictureDetails a:link wgPictureDetails a:visited color:black wgPictureDetails fieldset background-color:#fefefe border:solid 555 2px padding:10px background-color:#f9f9f9 margin-bottom:10px wgPictureDetails legend color:#333 font-size:15px font-weight:bold rowOne rowTwo margin:1px color:black padding:3px rowOne background EFEFEF border:solid CDCDCD 1px rowTwo background DCDCDC border:solid DDDDDD 1px rowOne label rowTwo label margin-left:15px text-align:left font-weight:bold font-size:11px rowOne data rowTwo data font-size:10px margin-left:5px a.fullSize:link a.fullSize:visited color:black display:block text-align:center font-weight:bold font-size:10px wgComments font-size:9px margin:10px width:90 wgComments title font-size:14px font-weight:bold color:#333 border-bottom:solid 555555 2px padding-bottom:2px wgComments title a color:navy text-decoration:none wgComments comment wgComments commentAlt position:relative padding:5px wgComments comment background-color:#e1e1e1 border-top:solid F7F7F7 1px border-bottom:solid C9C9C9 1px wgComments commentAlt background-color:#f0f0f0 border-bottom:solid CDCDCD 1px border-top:solid FBFBFB 1px wgComments number float:left font-size:30px color:silver margin:5px 10px 5px 5px wgComments posted font-style:italic padding-top:3px font-size:9px color:gray wgComments posted a color:navy text-decoration:underline BEGIN STYLES FOR THUMBNAIL VIEW The Thumbnail view uses some/all of the above classes plus those in this section thumbView width:400px height:auto thumbView thumbnail a display:block width:350px height:auto border:solid black 1px thumbView thumbnail img border-style:none width:350px height:auto thumb width:100px height:65px overflow:hidden display:block float:left border:solid black 2px margin:10px z-index 0 position relative thumb:hover background-color transparent z-index 50 overflow visible thumb img width:100px height:auto border-style:none thumb:hover img bottom 65px left 75px position absolute width 250px BEGIN STYLES FOR SLIDESHOW VIEW The Slideshow view uses some/all of the above classes plus those in this section wgSlideshow controls background url(^FileUrl(root/import/gallery-templates/images/pagination_bg.jpg repeat-x width:500px height:42px margin:0px auto border:solid black 2px wgSlideshow text-align:center slideshow-container width:500px height:auto margin:0px auto text-align:center border:solid black 2px position:relative z-index:0 slideshow-container slideshow-item img width:100 height:auto border-style:none display:block slideshow-container slideshow-item title background-color:black padding:3px color:white border-top:solid white 1px border-bottom:solid white 1px slideshow-container slideshow-item title a color:white font-size:11px font-weight:bold slideshow-container slideshow-item counter background-color:black padding:3px color:white font-size:11px font-weight:bold slideshow-container slideshow-item synopsis width:494px background-color:white padding:3px color:black font-size:11px font-weight:bold border-top:solid black 1px text-align:left BEGIN STYLES FOR SEARCH VIEW The Search view uses some/all of the above classes plus those in this section adminWrapper margin-top:20px adminWrapper label background:black font-weight:bold font-size:10px color:white adminWrapper td.data input background f1f1f1 vertical-align:middle adminWrapper td.radio input border-style:none background:none adminWrapper forwardButton cursor:pointer float:rigbt adminWrapper forwardButton:hover color:gold ','000001000001000015000016',NULL),('i6-BofrJJYozovlzFBByXg','first-photo-button.png','','root/import/gallery-templates/images/first-photo-button.png',1270612331,1285124158,'3','7','3','WebGUI::Asset::File::Image',1,'first-photo-button.png first-photo-button.png root import gallery templates images first photo button.png','000001000001000015000017000031',NULL),('fU_OZCmtdFNJ8a6bMve8ng','previous-photo-button.png','','root/import/gallery-templates/images/previous-photo-button.png',1270612331,1285124158,'3','7','3','WebGUI::Asset::File::Image',1,'previous-photo-button.png previous-photo-button.png root import gallery templates images previous photo button.png','000001000001000015000017000032',NULL),('YXCtusAxb4vzZ5sTnUA5DA','next-photo-button.png','','root/import/gallery-templates/images/next-photo-button.png',1270612331,1285124158,'3','7','3','WebGUI::Asset::File::Image',1,'next-photo-button.png next-photo-button.png root import gallery templates images next photo button.png','000001000001000015000017000033',NULL),('k_xuE82wwp8gFVl9aaaG8g','last-photo-button.png','','root/import/gallery-templates/images/last-photo-button.png',1270612331,1285124158,'3','7','3','WebGUI::Asset::File::Image',1,'last-photo-button.png last-photo-button.png root import gallery templates images last photo button.png','000001000001000015000017000034',NULL),('NPM_WItpM5IzLWBhWjYfCA','photo-navigation-spacer.png','','root/import/gallery-templates/images/photo-navigation-spacer.png',1270612331,1285124158,'3','7','3','WebGUI::Asset::File::Image',1,'photo-navigation-spacer.png photo-navigation-spacer.png root import gallery templates images photo navigation spacer.png','000001000001000015000017000035',NULL),('30h5rHxzE_Q0CyI3Gg7EJw','Cash Summary Screen (Default)','','shopping-cart-collateral-items/cash-summary',1273032715,1313542961,'3','7','4','WebGUI::Asset::Template',0,'Cash Summary Screen Default Cash Summary Screen Default shopping cart collateral items cash summary Shop/Credentials','000001000001000036000020',NULL),('jysVZeUR0Bx2NfrKs5sulg','Ogone Summary Screen (Default)','','shopping-cart-collateral-items/ogone-summary',1273032715,1313542961,'3','7','4','WebGUI::Asset::Template',0,'Ogone Summary Screen Default Ogone Summary Screen Default shopping cart collateral items ogone summary Shop/Credentials','000001000001000036000021',NULL),('300AozDaeveAjB_KN0ljlQ','PayPal Standard Summary Screen (Default)','','shopping-cart-collateral-items/paypal-std-summary',1273032715,1313542962,'3','7','4','WebGUI::Asset::Template',0,'PayPal Standard Summary Screen Default PayPal Standard Summary Screen Default shopping cart collateral items paypal std summary Shop/Credentials','000001000001000036000022',NULL),('GqnZPB0gLoZmqQzYFaq7bg','PayPal Express Checkout Summary Screen (Default)','','shopping-cart-collateral-items/paypal-express-summary',1273032716,1313542962,'3','7','4','WebGUI::Asset::Template',0,'PayPal Express Checkout Summary Screen Default PayPal Express Checkout Summary Screen Default shopping cart collateral items paypal express summary Shop/Credentials','000001000001000036000023',NULL),('stevestyle000000000001','Style 01','by Steve from Plain Black http://plainblack.com\r\n\r\nThe first of the WebGUI 7 styles','style_01',1147642499,1273032722,'3','7','12','WebGUI::Asset::Template',0,'Style 01 Style 01 by Steve from Plain Black http://plainblack.com The first of the WebGUI 7 styles style 01 style','000001000001000049000026',NULL),('stevestyle000000000002','Style 02','by Steve from Plain Black http://plainblack.com\r\n\r\nThe second of the WebGUI 7 styles','style_02',1147642504,1273032718,'3','7','12','WebGUI::Asset::Template',0,'Style 02 Style 02 by Steve from Plain Black http://plainblack.com The second of the WebGUI 7 styles style 02 style','000001000001000050000016',NULL),('stevestyle000000000003','Style 03','by Steve from Plain Black http://plainblack.com\r\n\r\nThe last of the WebGUI 7 style templates.','style_03',1147642510,1273032720,'3','7','12','WebGUI::Asset::Template',0,'Style 03 Style 03 by Steve from Plain Black http://plainblack.com The last of the WebGUI 7 style templates style 03 style','000001000001000051000020',NULL),('t87D1138NhPHhA23-hozBA','CrystalX','','crystalx',1273032716,1273032716,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'CrystalX CrystalX crystalx','000001000001000055',NULL),('QtBumey5ffc-xffRp1-7Aw','img','','crystalx/img',1273032716,1273032716,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'img img crystalx img','000001000001000055000001',NULL),('-0sK2rX1cwQt1ipUSqsiQQ','bg.gif','','crystalx/img/bg.gif',1273032716,1273032716,'3','7','3','WebGUI::Asset::File::Image',1,'bg.gif bg.gif crystalx img bg.gif','000001000001000055000001000001',NULL),('hS_eOaVz9Qb5ixndK9EXAw','header.jpg','','crystalx/img/header.jpg',1273032716,1273032716,'3','7','3','WebGUI::Asset::File::Image',1,'header.jpg header.jpg crystalx img header.jpg','000001000001000055000001000002',NULL),('k2p-Be8C98pf2cRq7E-JHg','tab_link.gif','','crystalx/img/tab_link.gif',1273032716,1273032716,'3','7','3','WebGUI::Asset::File::Image',1,'tab_link.gif tab_link.gif crystalx img tab link.gif','000001000001000055000001000003',NULL),('aYG4fjbMPbC4LCuuMp4gGA','tab_hover.gif','','crystalx/img/tab_hover.gif',1273032716,1273032716,'3','7','3','WebGUI::Asset::File::Image',1,'tab_hover.gif tab_hover.gif crystalx img tab hover.gif','000001000001000055000001000004',NULL),('F122Ey0NtVAw6Lfv1M6G_Q','ico_archive.gif','','crystalx/img/ico_archive.gif',1273032716,1273032716,'3','7','3','WebGUI::Asset::File::Image',1,'ico_archive.gif ico_archive.gif crystalx img ico archive.gif','000001000001000055000001000005',NULL),('qmXHKrQ6EDLSOGkrEKRUDA','bg_page_in.jpg','','crystalx/img/bg_page_in.jpg',1273032716,1273032716,'3','7','3','WebGUI::Asset::File::Image',1,'bg_page_in.jpg bg_page_in.jpg crystalx img bg page in.jpg','000001000001000055000001000006',NULL),('4qZgXjPPO4fwV879yu5XUg','bg_page.JPG','','crystalx/img/bg_page.jpg',1273032716,1273032716,'3','7','3','WebGUI::Asset::File::Image',1,'bg_page.JPG bg_page.JPG crystalx img bg page.jpg','000001000001000055000001000007',NULL),('mb-xeAugm5GJdvu-Wh0MtQ','search_submit.gif','','crystalx/img/search_submit.gif',1273032717,1273032717,'3','7','3','WebGUI::Asset::File::Image',1,'search_submit.gif search_submit.gif crystalx img search submit.gif','000001000001000055000001000008',NULL),('84Y9CwgzP6eNU7wZnk019Q','ico_date.gif','','crystalx/img/ico_date.gif',1273032717,1273032717,'3','7','3','WebGUI::Asset::File::Image',1,'ico_date.gif ico_date.gif crystalx img ico date.gif','000001000001000055000001000009',NULL),('ikXTtJKZfHVxqw-47E4AQA','ico_user.gif','','crystalx/img/ico_user.gif',1273032717,1273032717,'3','7','3','WebGUI::Asset::File::Image',1,'ico_user.gif ico_user.gif crystalx img ico user.gif','000001000001000055000001000010',NULL),('DhRWPTgzhvju_-TbMN3CwA','ico_comments.gif','','crystalx/img/ico_comments.gif',1273032717,1273032717,'3','7','3','WebGUI::Asset::File::Image',1,'ico_comments.gif ico_comments.gif crystalx img ico comments.gif','000001000001000055000001000011',NULL),('6njI-pZz2bwsjWh-Q1_11g','ico_list.gif','','crystalx/img/ico_list2.gif',1273032717,1273032717,'3','7','3','WebGUI::Asset::File::Image',1,'ico_list.gif ico_list.gif crystalx img ico list2.gif','000001000001000055000001000012',NULL),('_Hz1Gnd3yEnJzVS7l7nJMQ','content_all_bg.PNG','','crystalx/img/content_all_bg.png',1273032717,1273032717,'3','7','3','WebGUI::Asset::File::Image',1,'content_all_bg.PNG content_all_bg.PNG crystalx img content all bg.png','000001000001000055000001000013',NULL),('VOOrXK5dFnkGih7aTkuDWA','search.PNG','','crystalx/img/search.png',1273032717,1273032717,'3','7','3','WebGUI::Asset::File::Image',1,'search.PNG search.PNG crystalx img search.png','000001000001000055000001000014',NULL),('ruf-QejOkUHDRtfgakHlbA','col_title_bg_long.GIF','','crystalx/img/col_title_bg_long.gif',1273032717,1273032717,'3','7','3','WebGUI::Asset::File::Image',1,'col_title_bg_long.GIF col_title_bg_long.GIF crystalx img col title bg long.gif','000001000001000055000001000015',NULL),('FSHy5KjQjkt599PHS41seA','footer.jpg','','crystalx/img/footer.jpg',1273032717,1273032717,'3','7','3','WebGUI::Asset::File::Image',1,'footer.jpg footer.jpg crystalx img footer.jpg','000001000001000055000001000016',NULL),('nuYYXAz4KNNxgfumfnpo_g','ico_top.gif','','crystalx/img/ico_top.gif',1273032718,1273032718,'3','7','3','WebGUI::Asset::File::Image',1,'ico_top.gif ico_top.gif crystalx img ico top.gif','000001000001000055000001000017',NULL),('Mr7ljjoy6n4fZojpQWajKQ','ico_links.gif','','crystalx/img/ico_links.gif',1273032718,1273032718,'3','7','3','WebGUI::Asset::File::Image',1,'ico_links.gif ico_links.gif crystalx img ico links.gif','000001000001000055000001000018',NULL),('ApkqpDOrJDxK3QrWBGSRIg','ico_archive2.gif','','crystalx/img/ico_archive2.gif',1273032718,1273032718,'3','7','3','WebGUI::Asset::File::Image',1,'ico_archive2.gif ico_archive2.gif crystalx img ico archive2.gif','000001000001000055000001000019',NULL),('AzzTY0Lay1f_YGeQJFnQCA','ico_list.gif','','crystalx/img/ico_list.gif',1273032718,1273032718,'3','7','3','WebGUI::Asset::File::Image',1,'ico_list.gif ico_list.gif crystalx img ico list.gif','000001000001000055000001000020',NULL),('OiJNwP1gAlcva8_yOtL4gA','CrystalX_style','by Ning from Pluton -- http://pluton.nl\n\nCrystalX gives your site a crystal-ish look and a strictly formal style. Feel free to download and apply it to your own site.\n\nOriginally designed by \"Nuvio Webdesign\" and collected by Open Source Web Design, converted to WebGUI theme by Ning.','crystalx_style',1273032718,1273032718,'3','7','3','WebGUI::Asset::Template',0,'CrystalX_style CrystalX_style by Ning from Pluton http://pluton.nl CrystalX gives your site a crystal-ish look and a strictly formal style Feel free to download and apply it to your own site Originally designed by Nuvio Webdesign and collected by Open Source Web Design converted to WebGUI theme by Ning crystalx style style','000001000001000055000002',NULL),('JOuCU4x5BJfVHfkfMkVQdQ','crystalx.css','','crystalx/crystalx.css',1273032718,1273032718,'3','7','3','WebGUI::Asset::Snippet',0,'crystalx.css crystalx.css crystalx crystalx.css Project CrystalX URL http://www.nuvio.cz Output device screen projection Author Vit Dlouhy vit.dlouhy@nuvio.cz Nuvio www.nuvio.cz Last revision 2006-12-05 12:00 GMT+1 Structure display | position | float | overflow | width | height | border | margin | padding | background | align | font min-height:1px body border:0 margin:0 padding:0 background:#F2F5FE url(\'^FileUrl(/crystalx/img/bg.gif 0 0 repeat-x font:70%/160 verdana\",sans-serif color:#192666 text-align:center a color:#192666 a:hover color:#4F6AD7 p border:0 margin:15px 0 padding:0 div display:block border:0 margin:0 padding:0 overflow:hidden h1 h2 h3 h4 h5 border:0 margin:15px 0 10px 0 padding:0 font-weight:bold h1 font-size:260 line-height:100 font-family:\"georgia\",serif font-weight:normal h2 font-size:180 line-height:100 font-family:\"georgia\",serif font-weight:normal h3 font-size:120 line-height:100 font-weight:bold h4 font-size:120 h5 font-size:100 table display:table border-collapse:collapse margin:15px 1px padding:0 border:1px solid B7CAF6 font-size:100 tr display:table-row th td display table-cell border:1px solid B7CAF6 margin:0 padding:5px vertical-align:top text-align:left th background:#E7ECFD text-align:center color:#192666 font-weight:bold ul ol display:block border:0 margin:15px 0 15px 40px padding:0 ol list-style-type:decimal li display:list-item border:0 margin:0 padding:0 min-height:1px ul ul ul ol ol ol ol ul margin 0 0 0 20px dl border-bottom:1px solid E0E8FA margin:0 padding:5px 10px background:#CEDBF9 dt border:0 margin:0 padding:0 font-weight:bold dd border:0 margin:0 0 0 30px padding:0 form border:0 margin:0 padding:0 fieldset border:1px solid ccc margin:15px 0 padding:10px legend margin-left:10px font-size:100 font-weight:bold color:#008 hr height:1px width:724px margin 5px 23px padding 0 background:#CCC border:0 solid CCC color:#CCC a img span border:0 margin:0 padding:0 overflow:hidden abbr acronym border-bottom:1px dotted CCC cursor:help del through text-decoration:line-through strong strong font-weight:bold cite em q var font-style:italic code kbd samp font-family:monospace font-size:110 box min-height:1px box:after content display:block line-height:0px font-size:0px visibility:hidden clear:both nom margin:0 noscreen display:none main width:770px margin:0 auto text-align:left Top empty space for the background img to fit main topspace position:relative top:0 left:0 height:50px margin:0 padding:0 Header header position:relative width:770px height:100px margin:0 padding:0 background:#233C9B url(\'^FileUrl(/crystalx/img/header.jpg 0 0 no-repeat color:#FFFFFF Header logo header logo position:absolute top:35px left:35px margin:0 header logo a font-size:260 line-height:100 font-family:\"georgia\",serif font-weight:bold color:#FFF header logo a:hover color:#B5C4E3 text-decoration:none Header Search header search form position:absolute top:35px right:20px height:30px header search formContents position:absolute top:0 right:0px width:200px height:28px margin:0 padding:0 border:0 background:url(\'^FileUrl(/crystalx/img/search.png 0 0 no-repeat font:bold 90%/100 verdana\",sans-serif color:#192666 header search input#keywords_formId width:140px margin:5px 8px padding:3px 0 border:0 background:#FFF font:bold 100%/100 verdana\",sans-serif color:#192666 header search search_form position:absolute top:0 right:0px width:41px height:28px cursor:point margin:0 padding:0 Search Result header search search_result position:absolute top:220px header search home_link header search no_result header search pagination visibility:hidden page page-in pagination color:#6182D1 font-weight:bold padding:5px text-align:right page page-in pagination a color:#6182D1 page page-in pagination a:hover color:#192666 page page-in home_link padding:5px 5px 15px color:#6182D1 font-weight:bold text-align:right page page-in home_link a color:#6182D1 page page-in home_link a:hover color:#192666 search_result margin:10px 0 dl#odd background:#A0B9F3 page page-in no_result margin:0 10px color:#192666 font-weight:bold Main menu tabs menu background:#192666 margin:0 5px padding:10px 10px 0 height:32px overflow:hidden menu a cursor:pointer font-size:11px Page dynamic page width:770px background:#FFFFFF url(\'^FileUrl(/crystalx/img/bg_page.jpg 0 0 repeat-y page-in min-height:400px background:url(\'^FileUrl(/crystalx/img/bg_page_in.jpg 0 0 no-repeat padding:10px 0 0 Strip strip position:relative clear:both padding:3px 20px 10px 20px color:#6182D1 Strip Location strip location float left background:url(\'^FileUrl(/crystalx/img/ico_comments.gif 0 50 no-repeat padding 0 15px strip location a color:#6182D1 strip location a:hover color:#192666 strip location a#currentpage font-weight:bold text-decoration:none Strip DateTime strip datetime float:right background:url(\'^FileUrl(/crystalx/img/ico_date.gif 0 50 no-repeat padding 0 10px 0 15px Content Container contentContainer margin:0 padding:0 20px width:730px overflow:hidden Contents contentContainer content clear:both margin:10px 10px 0 0 padding:20px max-width:710px background:url(\'^FileUrl(/crystalx/img/content_all_bg.png 0 0 no-repeat overflow:hidden contentContainer content h2 margin:0 10px padding:10px 25px color:#192666 background:url(\'^FileUrl(/crystalx/img/ico_list.gif 0 50 no-repeat contentContainer content p text-align:justify Utility utility background FFFFFF url(\'^FileUrl(/crystalx/img/bg_page.jpg 0 0 repeat-y padding 10px 0 15px Utility Toggles toggles font-size:10px font-weight:bold text-align:left margin-left:42px toggles a margin:0 10px padding:2px 0 text-decoration:none border-bottom:1px dashed color:#6182D1 toggles a:hover border-bottom:1px solid color:#4F6AD7 toggles span.userAcc background:url(\'^FileUrl(/crystalx/img/ico_user.gif 0 50 no-repeat margin 0 0 0 8px Footer footer position:relative clear:both width:770px height:80px margin-bottom:30px background:url(\'^FileUrl(/crystalx/img/footer.jpg 0 0 no-repeat color:#6685CC footer a color:#6685CC footer a:hover color:#192666 Footer back on top top position:absolute top:55px left:550px top p position:relative width:30px height:25px margin:0 overflow:hidden top p a display:block position:absolute left:0 top:0 z-index:1 width:30px height:25px background:url(\'^FileUrl(/crystalx/img/ico_top.gif 0 0 no-repeat cursor:pointer top a:hover background:url(\'^FileUrl(/crystalx/img/ico_top.gif 30px 0 no-repeat Footer copyright footer p#copyright position:absolute top:10px left:40px margin:0 Footer created by createdby position:absolute top:10px left:562px margin:0 color:#8CA3D8 createdby a color:#8CA3D8','000001000001000055000003',NULL),('Am1J-meNBmhqFfEIWy6Gag','crystalX_Navigation','','crystalx/crystalx_navigation',1273032718,1287545014,'3','7','3','WebGUI::Asset::Wobject::Navigation',1,'crystalX_Navigation crystalX_Navigation crystalx crystalx navigation','000001000001000055000004',NULL),('gaIOm5cr2TkT9Fk6QmZWug','crystalX_navi','','crystalx/crystalx_navi',1273032718,1273032718,'3','7','3','WebGUI::Asset::Template',0,'crystalX_navi crystalX_navi crystalx crystalx navi Navigation','000001000001000055000005',NULL),('w0QifHLhsrzeOpFKl-DX-Q','crystalx_navi.css','','crystalx/crystalx_navi.css',1273032718,1273032718,'3','7','3','WebGUI::Asset::Snippet',0,'crystalx_navi.css crystalx_navi.css crystalx crystalx navi.css ','000001000001000055000006',NULL),('x_hiUi1XZloBvV47Obnu8Q','crystalX_NavigationTrail','','crystalx/crystalx_navigationtrail',1273032718,1273032718,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'crystalX_NavigationTrail crystalX_NavigationTrail crystalx crystalx navigationtrail','000001000001000055000007',NULL),('hpCk0B3vQzgc-QJhSol41w','crystalX_navitrail','','crystalx/crystalx_navitrail',1273032718,1273032718,'3','7','12','WebGUI::Asset::Template',0,'crystalX_navitrail crystalX_navitrail crystalx crystalx navitrail Navigation','000001000001000055000008',NULL),('UUwEL6hLEPdrnkZnKRzFYQ','Site Search','','crystalx/site-search',1273032718,1273032718,'3','7','3','WebGUI::Asset::Wobject::Search',1,'Site Search Site Search crystalx site search','000001000001000055000009',NULL),('OfKbvK7CrfMnfc8WDoF4Rg','crystalx_search','','crystalx/crystalx_search',1273032718,1273032718,'3','7','3','WebGUI::Asset::Template',0,'crystalx_search crystalx_search crystalx crystalx search Search','000001000001000055000010',NULL),('CQp-RFA2pMh5lFSggPPPYg','[Style] Underground','Templates and images for the \"Underground\" style from StyleShout.com ','style-underground',1273032719,1301973995,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'Style Underground Style Underground style underground Templates and images for the Underground style from StyleShout.com','000001000001000056',NULL),('_Mi_NTd3x8UB96LWezWHnw','Images','','style-underground/images',1273032719,1301973995,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'Images Images style underground images','000001000001000056000001',NULL),('A_5LVQQWR73QZR8FFbny_w','bg.gif','','style-underground/images/bg.gif',1273032719,1301973995,'3','7','3','WebGUI::Asset::File::Image',1,'bg.gif bg.gif style underground images bg.gif','000001000001000056000001000001',NULL),('wywIfa_VuTsq0c5Ed-W-MA','bullet.gif','','style-underground/images/bullet.gif',1273032719,1301973995,'3','7','3','WebGUI::Asset::File::Image',1,'bullet.gif bullet.gif style underground images bullet.gif','000001000001000056000001000002',NULL),('xmykMFjri1O2NrYHbeToVQ','footerbg.gif','','style-underground/images/footerbg.gif',1273032719,1301973995,'3','7','3','WebGUI::Asset::File::Image',1,'footerbg.gif footerbg.gif style underground images footerbg.gif','000001000001000056000001000003',NULL),('0IIGNBs_-INzqBC5VLeJgw','headerbg.gif','','style-underground/images/headerbg.gif',1273032719,1301973996,'3','7','3','WebGUI::Asset::File::Image',1,'headerbg.gif headerbg.gif style underground images headerbg.gif','000001000001000056000001000004',NULL),('FXmePdyS0YKuZ1VCGGpK9w','quote.gif','','style-underground/images/quote.gif',1273032719,1301973996,'3','7','3','WebGUI::Asset::File::Image',1,'quote.gif quote.gif style underground images quote.gif','000001000001000056000001000005',NULL),('66qCywiE_fiL9u5YIaJhgw','tableft.gif','','style-underground/images/tableft.gif',1273032719,1301973996,'3','7','3','WebGUI::Asset::File::Image',1,'tableft.gif tableft.gif style underground images tableft.gif','000001000001000056000001000006',NULL),('n5VpG4lFsOG1elaWDQbilw','tabright.gif','','style-underground/images/tabright.gif',1273032719,1301973996,'3','7','3','WebGUI::Asset::File::Image',1,'tabright.gif tabright.gif style underground images tabright.gif','000001000001000056000001000007',NULL),('g3JH1PRq6m6Bj_PnGpcrSQ','CSS','','style-underground/css',1273032719,1301973996,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'CSS CSS style underground css','000001000001000056000002',NULL),('egpnaaFqWmJwYTZ5CvFH9g','Underground.css','','style-underground/css/underground.css',1273032719,1301973996,'3','7','3','WebGUI::Asset::Snippet',0,'Underground.css Underground.css style underground css underground.css AUTHOR Erwin Aligam WEBSITE http://www.styleshout.com TEMPLATE NAME Underground TEMPLATE CODE S-0006 VERSION 1.1 Changes for WebGUI by Doug Bell Preaction doug@plainblack.com HTML ELEMENTS top elements margin 0 padding 0 body margin 0 padding 0 font 70%/1.5 Verdana Tahoma Arial Helvetica sans-serif color 333 background FFF url(^FileUrl(style-underground/images/bg.gif repeat-x links a color 003366 background-color inherit text-decoration none a:hover color CC0001 background-color inherit headers h1 h2 h3 font-family Arial Trebuchet MS Sans-Serif font-weight bold color 333 h1 font-size 120 letter-spacing 5px h2 font-size 115 text-transform uppercase h3 font-size 115 color 003366 images img border 2px solid CCC img.float-right margin 5px 0px 10px 10px img.float-left margin 5px 10px 10px 0px h1 h2 h3 p padding 0 margin 10px ul ol margin 10px 20px padding 0 20px code margin 10px 0 padding 10px text-align left display block overflow auto font 500 1em/1.5em Lucida Console courier new monospace white-space pre background FAFAFA border 1px solid f2f2f2 border-left 4px solid CC0000 acronym cursor help border-bottom 1px solid 777 blockquote margin 10px padding 0 0 0 32px background FAFAFA url(^FileUrl(style-underground/images/quote.gif no-repeat 5px 10px important background-position 8px 10px border 1px solid f2f2f2 border-left 4px solid CC0000 font-weight bold form elements form margin:10px padding 0 5px border 1px solid f2f2f2 background-color FAFAFA label display:block font-weight:bold margin:5px 0 input padding 2px border:1px solid eee font normal 1em Verdana sans-serif color:#777 textarea width:400px padding:2px font normal 1em Verdana sans-serif border:1px solid eee height:100px display:block color:#777 input.button margin 0 font bolder 12px Arial Sans-serif border 1px solid CCC padding 1px background FFF color CC0000 search form form.search position absolute top 5px right 5px padding 0 margin 0 border none background-color transparent form.search input.textbox margin 0 width 120px border 1px solid CCC background FFF color 333 form.search input.searchbutton margin 0 font-size 100 font-family Arial Sans-serif border 1px solid CCC background FFFFFF url(^FileUrl(style-underground/images/headerbg.gif repeat-x bottom left padding 1px font-weight bold height 23px color 333 width 60px LAYOUT wrap margin 0 auto width 90 header header position relative margin 0 padding 0 height 60px header span#slogan z-index 3 position absolute left 3px bottom 7px font bold 1.2em Verdana Arial Tahoma Sans-serif color FFF header-logo position relative clear both height 50px margin 0 padding 0 header-logo logo position absolute top 3px left 5px font bold 30px trebuchet MS Arial Tahoma Sans-Serif margin 0 padding 0 letter-spacing 1px color 000 navigation tabs header ul position absolute margin:0 list-style:none right:-18px bottom 3px font bold 13px Trebuchet MS Arial Sans-serif header li display:inline margin:0 padding:0 header a float:left background url(^FileUrl(style-underground/images/tableft.gif no-repeat left top margin:0 padding:0 0 0 4px text-decoration:none header a span float:left display:block background url(^FileUrl(style-underground/images/tabright.gif no-repeat right top padding:5px 15px 4px 6px color:#FFF Commented Backslash Hack hides rule from IE5-Mac header a span float:none End IE5-Mac hack header a:hover span color:#FFF header a:hover background-position:0 42px header a:hover span background-position:100 42px header current a background-position:0 42px header current a span background-position:100 42px main column main float right margin 0 padding 0 width 78 main h1 margin 10px 0 padding 4px 0 4px 8px font-size 105 color FFF text-transform uppercase background-color CC0000 letter-spacing 5px sidebar sidebar float left width 20 margin 0 padding 0 background-color FFFFFF sidebar h1 margin 10px 0 0 0 padding 4px 0 4px 8px font bold 105 Arial Sans-Serif color FFF text-transform uppercase background 333 letter-spacing 1px sidebar left-box border 1px solid EBEBEB margin 0 0 5px 0 background FFF sidebar ul.sidemenu list-style none text-align left margin 3px 0px 8px 0 padding 0 text-decoration none sidebar ul.sidemenu li border-bottom 1px solid f2f2f2 background url(^FileUrl(style-underground/images/bullet.gif no-repeat 3px 2px padding 3px 5px 3px 25px margin 0 sidebar ul.sidemenu a font-weight bolder padding 3px 0px background none footer footer clear both border-top 1px solid f2f2f2 background FFF url(^FileUrl(style-underground/images/footerbg.gif repeat-x padding 2px 0 10px 0 text-align center line-height 1.5em font-size 95 footer a text-decoration none font-weight bold alignment classes float-left float left float-right float right align-left text-align left align-right text-align right display and additional classes clear clear both red color CC0000 comments margin 20px 10px 5px 10px padding 3px 0 border-bottom 1px dashed EFF0F1 border-top 1px dashed EFF0F1 ','000001000001000056000002000001',NULL),('G0hl4VilbFKipToyxKqFrg','Prototypes','This folder holds prototype WebGUI assets with the correct templates pre-selected. ','style-underground/prototypes',1273032719,1301973997,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'Prototypes Prototypes style underground prototypes This folder holds prototype WebGUI assets with the correct templates pre-selected','000001000001000056000003',NULL),('GWU2qZqe6yEuAKG-5HtBdg','Templates','','style-underground/templates',1273032719,1301973997,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'Templates Templates style underground templates','000001000001000056000004',NULL),('Qk24uXao2yowR6zxbVJ0xA','[style] Underground','by Doug from Plain Black http://plainblack.com\r\n\r\nThis is the Underground style from http://www.styleshout.com/ made into a WebGUI package. A simple, functional style.','style-underground/style-underground',1273032719,1301973997,'3','7','3','WebGUI::Asset::Template',0,'style Underground style Underground by Doug from Plain Black http://plainblack.com This is the Underground style from http://www.styleshout.com made into a WebGUI package A simple functional style style underground style underground style','000001000001000056000004000001',NULL),('39KNX53B4nYJAyIE1lu8ZQ','[nav] Underground Top Navigation','','style-underground/nav-underground-top-navigation',1273032720,1301973997,'3','7','3','WebGUI::Asset::Template',0,'nav Underground Top Navigation nav Underground Top Navigation style underground nav underground top navigation Navigation','000001000001000056000004000002',NULL),('ztfi__vHJLsQDsMenrEn-w','[nav] Underground Side Navigation','','style-underground/nav-underground-side-navigation',1273032720,1301973997,'3','7','3','WebGUI::Asset::Template',0,'nav Underground Side Navigation nav Underground Side Navigation style underground nav underground side navigation Navigation','000001000001000056000004000003',NULL),('8qyrDCNeggB4dzKiOoRuiQ','[admintoggle] Underground Admin Toggle','','style-underground/templates/admintoggle-underground-admin-toggle',1273032720,1301973997,'3','7','3','WebGUI::Asset::Template',0,'admintoggle Underground Admin Toggle admintoggle Underground Admin Toggle style underground templates admintoggle underground admin toggle AdminToggle','000001000001000056000004000004',NULL),('M1NyNeS5jpdIsiIWFiJprw','View My Account','','style-underground/templates/view-my-account',1273032720,1301973997,'3','7','3','WebGUI::Asset::Template',0,'View My Account View My Account style underground templates view my account Macro/a_account','000001000001000056000004000005',NULL),('AsfpsOpsGzZCb9m7MyxPuw','Navigation','','style-underground/navigation',1273032720,1301973997,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'Navigation Navigation style underground navigation','000001000001000056000005',NULL),('n-Vr_wgxOkwiHGt1nJto9w','Top Navigation','','style-underground/top-navigation',1273032720,1309236774,'3','7','3','WebGUI::Asset::Wobject::Navigation',1,'Top Navigation Top Navigation style underground top navigation','000001000001000056000005000001',NULL),('jmqLxnoWb6p92Cr12lf1hw','Side Navigation','','style-underground/side-navigation',1273032720,1301973997,'3','7','3','WebGUI::Asset::Wobject::Navigation',1,'Side Navigation Side Navigation style underground side navigation','000001000001000056000005000002',NULL),('8E2UOnj_XPEghTj7nfVM0g','Search','','style-underground/search',1273032720,1301973997,'3','7','3','WebGUI::Asset::Wobject::Search',1,'Search Search style underground search','000001000001000056000006',NULL),('1qFjOEiILIwr1xB5_ebppQ','Greenportal','','greenportal',1273032721,1301973998,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'Greenportal Greenportal greenportal','000001000001000057',NULL),('xD76UfQ_JnSgTLBNvytcpQ','greenportal_image','','greenportal_image',1273032721,1301973998,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'greenportal_image greenportal_image greenportal image','000001000001000057000001',NULL),('pAXR7Kby4O-dSxOwLp1GaA','menu_top.png','','greenportal_image/menu_top.png',1273032721,1301973998,'3','7','12','WebGUI::Asset::File::Image',1,'menu_top.png menu_top.png greenportal image menu top.png','000001000001000057000001000001',NULL),('TthzMLO4n3qxy59QZ5YBHg','menu_dark.png','','greenportal_image/menu_dark.png',1273032721,1301973998,'3','7','12','WebGUI::Asset::File::Image',1,'menu_dark.png menu_dark.png greenportal image menu dark.png','000001000001000057000001000002',NULL),('3n31SQjYa150TBrRBgMPhA','menu_light.png','','greenportal_image/menu_light.png',1273032721,1301973998,'3','7','12','WebGUI::Asset::File::Image',1,'menu_light.png menu_light.png greenportal image menu light.png','000001000001000057000001000003',NULL),('R4RxDufGbbIzEmpcoEcLrw','logo.jpg','','greenportal_image/logo.jpg',1273032721,1301973998,'3','7','12','WebGUI::Asset::File::Image',1,'logo.jpg logo.jpg greenportal image logo.jpg','000001000001000057000001000004',NULL),('KKt0VB_eoQxw9xEsHsAhag','Greenportal_style','by Ning from PlutonIT http://pluton.nl\n\nA Joomla! Open Source design released under the GNU/GPL License. Enhanced and converted into WebGUI theme by Ning. The original PHP and CSS file can be downloaded following the author\'s link: http://www.studentsdesign.de/','greenportal_style',1273032721,1301973998,'3','7','12','WebGUI::Asset::Template',0,'Greenportal_style Greenportal_style by Ning from PlutonIT http://pluton.nl A Joomla Open Source design released under the GNU/GPL License Enhanced and converted into WebGUI theme by Ning The original PHP and CSS file can be downloaded following the author\'s link http://www.studentsdesign.de greenportal style style','000001000001000057000003',NULL),('h0bOzz7WvdaVZXsjpwtkww','greenportal_Navigation','','greenportal_navigation',1273032721,1301973998,'3','7','3','WebGUI::Asset::Wobject::Navigation',1,'greenportal_Navigation greenportal_Navigation greenportal navigation','000001000001000057000004',NULL),('_z3ukLCqvoaUygfsbbkBzw','Greenportal_menu','','greenportal_menu',1273032721,1301973999,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_menu Greenportal_menu greenportal menu Navigation','000001000001000057000005',NULL),('qFOfW1sKyOTnGNcP6BXbwg','greenportal_NavigationTop','','greenportal_navigationtop',1273032721,1301973999,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'greenportal_NavigationTop greenportal_NavigationTop greenportal navigationtop','000001000001000057000006',NULL),('Pt38T5_MWSue2e1N36MLdw','Greenportal_menuTop','','greenportal_menutop',1273032721,1301973999,'3','7','12','WebGUI::Asset::Template',0,'Greenportal_menuTop Greenportal_menuTop greenportal menutop Navigation','000001000001000057000007',NULL),('LDcM1Iop17nF2MoSa7zo_Q','Greenportal_dataform','','greenportal_dataform',1273032721,1301973999,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_dataform Greenportal_dataform greenportal dataform DataForm','000001000001000057000008',NULL),('hVF1taXj4bfd7DuL4XDMYg','Greenportal_datalist','','greenportal_datalist',1273032721,1301973999,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_datalist Greenportal_datalist greenportal datalist DataForm/List','000001000001000057000009',NULL),('x4-2QYRSrIB_BJfnSKKj4w','Greenportal_acknowledgement','','greenportal_acknowledgement',1273032721,1301973999,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_acknowledgement Greenportal_acknowledgement greenportal acknowledgement DataForm','000001000001000057000010',NULL),('423R4Y6XIt3wUzlnLo-chg','Greenportal_forum','','greenportal_forum',1273032721,1301973999,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_forum Greenportal_forum greenportal forum Collaboration','000001000001000057000011',NULL),('oZ1Mk-zExYUyD-JsjTvaHg','Greenportal_thread','','greenportal_thread',1273032722,1301973999,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_thread Greenportal_thread greenportal thread Collaboration/Thread','000001000001000057000012',NULL),('mYwS8CZaOLMt0raaKXGZcQ','Greenportal_postform','','greenportal_postform',1273032722,1301973999,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_postform Greenportal_postform greenportal postform Collaboration/PostForm','000001000001000057000013',NULL),('kSGR4OHsKmhLQTuLkisOww','Greenportal_search','','greenportal_search',1273032722,1301973999,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_search Greenportal_search greenportal search Collaboration/Search','000001000001000057000014',NULL),('G5DgNizuG3jXkjPp6UaGrA','Greenportal_Calendar','','greenportal_calendar',1273032722,1301973999,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'Greenportal_Calendar Greenportal_Calendar greenportal calendar','000001000001000057000015',NULL),('U78V5IJHVljvRTb6ydsTHg','Greenportal_calendarMonth','','greenportal_calendar/greenportal_calendarmonth',1273032722,1301973999,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_calendarMonth Greenportal_calendarMonth greenportal calendar greenportal calendarmonth Calendar/Month','000001000001000057000015000001',NULL),('Xqc3qPUXoFE8dt9qocdWig','Greenportal_calendarWeek','','greenportal_calendar/greenportal_calendarweek',1273032722,1301973999,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_calendarWeek Greenportal_calendarWeek greenportal calendar greenportal calendarweek Calendar/Week','000001000001000057000015000002',NULL),('IBTb7wllSt7RxFmmvm9pkQ','Greenportal_calendarDay','','greenportal_calendar/greenportal_calendarday',1273032722,1301973999,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_calendarDay Greenportal_calendarDay greenportal calendar greenportal calendarday Calendar/Day','000001000001000057000015000003',NULL),('Z1EM7JMI_4SkyfaZffSElw','Greenportal_calendarEvent','','greenportal_calendar/greenportal_calendarevent',1273032722,1301973999,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_calendarEvent Greenportal_calendarEvent greenportal calendar greenportal calendarevent Calendar/Event','000001000001000057000015000004',NULL),('fJg7SKpGZwzSNx3_ebki1A','Greenportal_calendarEventEdit','','greenportal_calendar/greenportal_calendareventedit',1273032722,1301973999,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_calendarEventEdit Greenportal_calendarEventEdit greenportal calendar greenportal calendareventedit Calendar/EventEdit','000001000001000057000015000005',NULL),('ihf4Rx6p72xn_nVKaIeOaw','Greenportal_calendarSearch','','greenportal_calendar/greenportal_calendarsearch',1273032722,1301973999,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_calendarSearch Greenportal_calendarSearch greenportal calendar greenportal calendarsearch Calendar/Search','000001000001000057000015000006',NULL),('jrWJ6nHXkqgFbml7BZ9chw','Greenportal_submission','','greenportal_submission',1273032722,1301974000,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_submission Greenportal_submission greenportal submission Collaboration/Thread','000001000001000057000016',NULL),('Ys6f3vpe0y1uRcaCJ2TlFw','Greenportal_messageboard','','greenportal_messageboard',1273032722,1301974000,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_messageboard Greenportal_messageboard greenportal messageboard MessageBoard','000001000001000057000017',NULL),('default_CS_unsubscribe','Default Collaboration System Unsubscribe','','collaboration_unsubscribe',1274238758,1277868922,'3','7','4','WebGUI::Asset::Template',0,'Default Collaboration System Unsubscribe Default Collaboration System Unsubscribe collaboration unsubscribe Collaboration/Unsubscribe','000001000001000008000030',NULL),('_hELmIJfgbAyXFNqPyApxQ','admin.css','','root/import/gallery-templates/admin.css',1197330678,1285124155,'3','7','3','WebGUI::Asset::Snippet',0,'admin.css admin.css root import gallery templates admin.css adminWrapper text-align:left font-family:arial font-size:11px position relative z-index 2 h2 font-size:15px messageStyle font-weight:bold font-family:arial font-size:10px margin-bottom:8px adminButton border:solid silver 1px background-color:#e0e0e0 font-weight:bold font-size:10px color:#333 cursor:pointer padding 0.5em 1em adminTable border:solid silver 1px background-color:#F0F0F0 color black width:320px padding:5px adminTable select adminTable input adminTable textarea border:solid gray 1px font-size:10px padding-left:5px label white-space:nowrap text-align:right padding-right:10px font-weight:bold width:1px vertical-align:top galleryOrg list-style-type:none display:block width:95 margin-top:3px padding-top:10px margin-left:5px border:gray solid 1px text-align:center font-family:verdana,arial font-size:9pt background-color:#dedede galleryOrgList margin 0px padding 0px galleryOrg left float left width 36 galleryOrg right width 63 galleryOrg img display:block height:150px margin:0px auto border none galleryOrg select galleryOrg input galleryOrg textarea border:solid gray 1px font-size:10px padding-left:5px promote margin-left:3px promote img height:14px width:16px demote margin-right:3px demote img height:14px width:16px delete img height 14px numbering position:absolute top:0px left:0px padding:1px background-color:black color:white moz-border-radius-bottomRight:5px input.captionEnter width:93px clear:both margin-bottom:3px galleryOrg button border-style:none background:none galleryOrg button img width:16px height:auto galleryOrg synopsis input width:80px ','000001000001000015000015',NULL),('68sKwDgf9cGH58-NZcU4lg','Welcome','','home',1124395696,1286336676,'3','7','3','WebGUI::Asset::Wobject::Layout',1,'Welcome Home home','000001000002',NULL),('bX5rYxb6tZ9docY6sUhBlw','Getting Started','\nCongratulations on successfully installing the WebGUI Content Engine®. If you used the Site Starter to select a set of default pages, you will see those pages in the site navigation. You will also notice that a number of additional pages appear, such','getting_started/getting-started',1147642514,1278013772,'3','7','4','WebGUI::Asset::Wobject::Article',1,'Getting Started Getting Started getting started getting started Congratulations on successfully installing the WebGUI Content Engine® If you used the Site Starter to select a set of default pages you will see those pages in the site navigation You will also notice that a number of additional pages appear such as this page These are default pages added for your convenience to help you get started with WebGUI and find the resources you need Feel free to remove these extra pages whenever you are ready To get started managing content download the PDF document below This document provides a basic introduction to the WebGUI user interface WebGUI Basics PDF Once you have read this document you may want to head over to the Documentation section where you can find more WebGUI resources ','000001000002000001000001',NULL),('8Bb8gu-me2mhL3ljFyiWLg','Talk to the Experts','Plain Black® created the WebGUI Content Engine® and is here to answer \nyour questions and provide you with services to make sure your WebGUI \nimplementation is entirely successful. We bend over backwards to make \nsure you\'re a success. Contact us ','your_next_step',1124395696,1271359194,'3','7','3','WebGUI::Asset::Wobject::Layout',1,'Talk to the Experts Your Next Step your next step Plain Black® created the WebGUI Content Engine® and is here to answer your questions and provide you with services to make sure your WebGUI implementation is entirely successful We bend over backwards to make sure you\'re a success Contact us today to see how we can help you','000001000002000002',NULL),('ix1p0AbwKAz8QWB-T-HHfg','Get Support','Plain Black provides support packages to fit any budget or need. Start out with online support which costs only $500 per year, or work with Plain Black to build a custom support package tailored to your specific needs. No matter what level of support you ','yns/support',1147642516,1271359087,'3','7','4','WebGUI::Asset::Wobject::Article',1,'Get Support Get Support yns support Plain Black provides support packages to fit any budget or need Start out with online support which costs only $500 per year or work with Plain Black to build a custom support package tailored to your specific needs No matter what level of support you purchase you will get personalized and friendly service in a timely manner ','000001000002000002000001',NULL),('iCYOjohB9SKvAPr6bXElKA','Get Hosting','Plain Black\'s professionally trained WebGUI experts can handle the task\nof hosting your web site, intranet, or extranet. Let us deal with upgrades, security, and server management so you focus on building your WebGUI site, which is where your time and exp','yns/hosting',1147642516,1271445525,'3','7','4','WebGUI::Asset::Wobject::Article',1,'Get Hosting Get Hosting yns hosting Plain Black\'s professionally trained WebGUI experts can handle the task of hosting your web site intranet or extranet Let us deal with upgrades security and server management so you focus on building your WebGUI site which is where your time and expertise should be spent And when you sign up with hosting online support is included ','000001000002000002000002',NULL),('4Yfz9hqBqM8OYMGuQK8oLw','Get Features','WebGUI\'s robust API allows for easy customization. Plain Black\'s team of developers can create any features you need for your site. We\'ve built hundreds of custom applications for people. From simple macros, to custom single sign on systems, to applicatio','yns/features',1147642516,1271352537,'3','7','4','WebGUI::Asset::Wobject::Article',1,'Get Features Get Features yns features WebGUI\'s robust API allows for easy customization Plain Black\'s team of developers can create any features you need for your site We\'ve built hundreds of custom applications for people From simple macros to custom single sign on systems to applications that will manage your entire company our team will leverage the power of WebGUI to your advantage ','000001000002000002000003',NULL),('Wl8WZ43g2rK5AYr9o4zY7w','Get Style','Branding and visual appeal are powerful marketing tools. Don\'t let your site become a wallflower. Plain Black\'s professional design team can create a custom design to make your site stand out. Our team is fast, easy to work with, and can even migrate your','yns/style',1147642516,1271445539,'3','7','4','WebGUI::Asset::Wobject::Article',1,'Get Style Get Style yns style Branding and visual appeal are powerful marketing tools Don\'t let your site become a wallflower Plain Black\'s professional design team can create a custom design to make your site stand out Our team is fast easy to work with and can even migrate your existing content into your new WebGUI site ','000001000002000002000004',NULL),('2TqQc4OISddWCZmRY1_m8A','Join Us','The WebGUI project community is a diverse and talented group. If you \nwould like to contribute back to the project there are many ways to \nbecome involved. ','join_us',1124395696,1271357565,'3','7','3','WebGUI::Asset::Wobject::Layout',1,'Join Us Join Us join us The WebGUI project community is a diverse and talented group If you would like to contribute back to the project there are many ways to become involved','000001000002000004',NULL),('k2Qj03FrAOXYra8kDJYYXw','IRC (Internet Relay Chat)','You can find members of the community on the #webgui chat channel on the Freenode IRC network. If you\'re not \nfamiliar with IRC, it\'s essentially like a chat room. A few things you\'ll need to know: \n\n\n\nYou need an IRC client program. There are many availa','join_us/irc',1271357513,1271357513,'3','7','3','WebGUI::Asset::Wobject::Article',1,'IRC Internet Relay Chat IRC join us irc You can find members of the community on the webgui chat channel on the Freenode IRC network If you\'re not familiar with IRC it\'s essentially like a chat room A few things you\'ll need to know You need an IRC client program There are many available that can be downloaded free of charge The IRC network we use is Freenode Our channel is webgui Channel operators have an next to their name All channel operators in webgui are Plain Black employees Someone with a + next to their name is a recognized contributor in the WebGUI community People who have been recognized as one of the People Behind WebGUI are often given this designation If you\'re looking for a mentor recognized contributors are a good place to start ','000001000002000004000003',NULL),('ksSfkZdsr0uC62NwIk6hFQ','WebGUI Users Conference','An annual event, this is the one time a year when WebGUI users and Plain\n Black\'s staff come together to do all things WebGUI. This is by far \nthe best way to get involved with the community as nothing can replace \nface to face interaction and mentoring.','join_us/wuc',1271356973,1271356973,'3','7','3','WebGUI::Asset::Wobject::Article',1,'WebGUI Users Conference WUC join us wuc An annual event this is the one time a year when WebGUI users and Plain Black\'s staff come together to do all things WebGUI This is by far the best way to get involved with the community as nothing can replace face to face interaction and mentoring The conference is usually held in the fall of each year and more information on attending can be found on the WebGUI Users Conference website as details become available ','000001000002000004000004',NULL),('nWxS5jnA3o3DgPEwBeR7yQ','The Forums','WebGUI \nForums are available for WebGUI related\n discussion and community support. Bounce around ideas, discuss \nimportant issues, and ask community members for help and advice. WebGUI \nForums are broken up into: \n\nEt Cetera: general WebGUI discussion \nWe','join_us/forums',1271357239,1271357239,'3','7','3','WebGUI::Asset::Wobject::Article',1,'The Forums forums join us forums WebGUI Forums are available for WebGUI related discussion and community support Bounce around ideas discuss important issues and ask community members for help and advice WebGUI Forums are broken up into Et Cetera general WebGUI discussion Web Design Templates and Themes discuss making your site look pretty Admin Forum get your questions answered about everything from security to configuration Install/Upgrade Help get answers to your installation and upgrade questions WebGUI Dev a place to discuss WebGUI and WRE core development as well as writing your own custom modules ','000001000002000004000005',NULL),('AssetReportFolder00001','Asset Report','','asset_report',1281501163,1281501163,'3','3','4','WebGUI::Asset::Wobject::Folder',1,'Asset Report Asset Report asset report','000001000001000058',NULL),('sJtcUCfn0CVbKdb4QM61Yw','Asset Report Default Template','','asset-report/asset-report-default-template',1281501163,1283921584,'3','3','4','WebGUI::Asset::Template',0,'Asset Report Default Template Asset Report Default Template asset report asset report default template AssetReport','000001000001000058000001',NULL),('N7uMnnicbyTEulcuRi1sSg','PDFs','','media/pdfs',1283900195,1283900195,'3','7','4','WebGUI::Asset::Wobject::Folder',1,'PDFs PDFs media pdfs','000001000003000001',NULL),('bCGr7FRtZt-XYlBVUEJBjw','Getting_Started_doc.pdf','','media/pdfs/getting_started_doc.pdf',1278013724,1278013724,'3','7','4','WebGUI::Asset::File::Image',1,'Getting_Started_doc.pdf Getting_Started_doc.pdf media pdfs getting started doc.pdf','000001000003000001000001',NULL),('A3T7jpTBKLYws1h5mJ0t8A','makepageprintable.css','','makepageprintable.css',1286336607,1286336607,'3','7','12','WebGUI::Asset::Snippet',0,'makepageprintable.css makepageprintable.css makepageprintable.css This is the stylesheet for the Make Page Printable Style template reset html body div span applet object iframe h1 h2 h3 h4 h5 h6 p blockquote pre a abbr acronym address big cite code del dfn em font img ins kbd q s samp small strike strong sub sup tt var b u i center dl dt dd ol ul li fieldset form label legend table caption tbody tfoot thead tr th td margin:0 padding:0 border:0 outline:0 font-size:100 vertical-align:baseline background:transparent text-decoration:none font-weight:normal font-style:normal basic formatting body font:12px/18px Georgia,\"Bitstream Charter\",\"Liberation Serif\",\"Times New Roman\",Times,serif color:#000 h1 h2 h3 h4 h5 h6 font:12px/18px Helvetica,Arial,\"Liberation Sans\",sans-serif code font:11px/18px Lucida Console\",\"Courier New\",\"Liberation Mono\",monospace h1 h2 font-size:18px line-height:24px margin:24px 0 12px h3 font-size:14px margin:0 0 12px h4 margin:0 0 6px font-weight:bold h5 margin:0 0 6px h6 font-style:italic margin:0 0 6px p ul ol dl blockquote table form fieldset margin:0 0 18px a:link a:visited text-decoration:underline color:#000 a:hover a:active text-decoration:none color:#000 ol ul blockquote padding:0 0 0 27px ol ol ol ul ul ul ul ol margin:0 dd margin:0 0 3px blockquote font-style:italic font-size:15px quotes:none blockquote p font-style:italic margin:0 0 9px q quotes:none font-style:italic blockquote:before blockquote:after q:before q:after content content:none b strong dt font-weight:bold cite dfn i em ins font-style:italic abbr acronym text-transform:lowercase font-variant:small-caps del text-decoration:line-through sub vertical-align:sub font-size:8px sup vertical-align:super font-size:8px hr border-color:#aaa border-style:dotted border-width:1px 0 0 color:#fff background:#fff margin:18px 0 padding:0 width:100 legend font-weight:bold label display:block table border-collapse:collapse border-spacing:0 caption font-style:italic margin:0 0 6px tr border-bottom:1px dotted ccc thead tr border-top:1px solid ccc border-bottom:1px solid ccc th td padding:5px 9px 4px th font-variant:small-caps very basic positioning design header border-top:1px dotted aaa border-bottom:1px dotted aaa padding:17px 6px color:#666 header h1 font-weight:bold margin:0 text-transform:uppercase header a text-decoration:none font-style:italic color:#666 font-size:11px content padding:0 6px margin:18px 0 36px content a font-weight:bold content img margin:0 0 18px footer border-top:1px dotted aaa border-bottom:1px dotted aaa padding:17px 6px color:#666 ','000001000001000041000007',NULL),('j_1qEqM6iLfQLiR6VKy0aA','Free Documentation','There are hundreds of pages of free documentation available for WebGUI, provided by both Plain Black and the community at large. The following list is by no means comprehensive, but it should get you started in the right direction. \n \n\nPrimer - A downloa','documentation/free-documentation',1215718151,1299872071,'3','7','3','WebGUI::Asset::Wobject::Article',1,'Free Documentation Free Documentation documentation free documentation There are hundreds of pages of free documentation available for WebGUI provided by both Plain Black and the community at large The following list is by no means comprehensive but it should get you started in the right direction Primer A downloadable PDF that shows you the basics of publishing content in WebGUI WebGUI User Guides all commercial user guides previously published by Plain Black are in the process of being converted into wikis You can find these wikis on the WebGUI User Guides page of www.webgui.org This is an ongoing process until all books have been converted remaining books are being made available as free PDF downloads Wiki Hundreds of pages of WebGUI community contributed content featuring a variety of tutorials Worldwide A collection of WebGUI related web sites from all over the world that have documentation and other resources for WebGUI API Docs The documentation of all of the WebGUI source code Template Help The documentation of all of WebGUI\'s template variables ','000001000002000003000001',NULL),('diZvW4bSgZWwyyGP3qXi1g','Commercial Documentation','Plain Black has created a line of commercial books which total over 1500 pages of detailed documentation about WebGUI. Both black and white and full color editions of these books are available. Visit the book store today to stock your WebGUI library. Othe','documentation/commercial-documentation',1215717972,1285610019,'3','7','3','WebGUI::Asset::Wobject::Article',1,'Commercial Documentation Commercial Documentation documentation commercial documentation Plain Black has created a line of commercial books which total over 1500 pages of detailed documentation about WebGUI Both black and white and full color editions of these books are available Visit the book store today to stock your WebGUI library Other than hands on training there is no better way to hone your WebGUI skills No matter what your need Plain Black has created a book that\'s right for you and is creating new books each year In the fall of 2010 Plain Black announced that these books will be converted into free wikis You can now access all WebGUI user guides for free on the WebGUI User Guides page on www.webgui.org These books are available for WebGUI version 7.7 and earlier For later documentation see the free resources available on the WebGUI project website ','000001000002000003000003',NULL),('sK_0zVw4kwdJ1sqREIsSzA','WebGUI Auth Password Recovery Email Template','','root/import/auth/webgui/recoveryemail',1287545015,1287545015,'3','7','4','WebGUI::Asset::Template',0,'WebGUI Auth Password Recovery Email Template Password Recovery Email root import auth webgui recoveryemail Auth/WebGUI/RecoveryEmail','000001000001000005000011',NULL),('_cD6DLM_Fs5IlrLeWUjrjg','Workflow Activity Templates','Folder for holding Workflow Activity templates. ','root/import/workflow-activity-templates',1287545015,1287545015,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Workflow Activity Templates Workflow Activity Templates root import workflow activity templates Folder for holding Workflow Activity templates','000001000001000059',NULL),('lYhMheuuLROK_iNjaQuPKg','Notify About Version Tag','','root/import/workflow-activity-templates/notify-about-version-tag',1287545015,1287545015,'3','7','12','WebGUI::Asset::Template',0,'Notify About Version Tag Notify About Version Tag root import workflow activity templates notify about version tag NotifyAboutVersionTag','000001000001000059000001',NULL),('PBtmplHelp000000000001','Help','','root/import/adminconsole/help',1124395706,1147642410,'3','7','12','WebGUI::Asset::Template',0,'Help Help root import adminconsole help AdminConsole','000001000001000003000002',NULL),('2GxjjkRuRkdUg_PccRPjpA','Select Gateway (Default)','','shopping-cart-collateral-items/select-gateway-default',1257311888,1313542962,'3','7','3','WebGUI::Asset::Template',0,'Select Gateway Default Select Gateway Default shopping cart collateral items select gateway default Shop/selectGateway','000001000001000036000024',NULL),('qxd0WpRGqDPWP8WBicYvEA','dragdropsorting.js','','root/import/gallery-templates/dragdropsorting.js',1271820952,1285124158,'3','7','12','WebGUI::Asset::Snippet',0,'dragdropsorting.js dragdropsorting.js root import gallery templates dragdropsorting.js Create our own namespace For the moment we leave this here since there are no other JS modules for the gallery if typeof Gallery == undefined Gallery = Gallery.DDSorting = Configure the drag\'n\'drop sorting app Gallery.DDSorting.parentId = photos Element Id of the container element Gallery.DDSorting.draggableNodeTags = li Type of tag used for draggable items Gallery.DDSorting.idPrefix = photoId Prefix used in Ids of draggable items Create some shortcuts var Dom = YAHOO.util.Dom var Event = YAHOO.util.Event var DDM = YAHOO.util.DragDropMgr Drag\'n\'drop sorting app for the gallery Gallery.DDSorting.init = function Make list element containing photos a drop target new YAHOO.util.DDTarget(this.parentId Get all items within list of photos var items = document.getElementById(this.parentId).getElementsByTagName(this.draggableNodeTags Initialize DDList object for all list items for i=0 i < items.length i=i+1 new Gallery.DDList(this items[i].id gallery Custom drag and drop implementation Gallery.DDList = function(app id sGroup config Gallery.DDList.superclass.constructor.call(this id sGroup config var el = this.getDragEl Dom.setStyle(el opacity 0.67 The proxy is slightly transparent Assign reference to application object this.app = app Init variables for direction and replacement tracking this.goingUp = false this.goingLeft = false this.lastY = 0 this.lastX = 0 this.before = false this.lastReplaced = null YAHOO.extend(Gallery.DDList YAHOO.util.DDProxy startDrag function(x y Make the proxy look like the source element var dragEl = this.getDragEl var clickEl = this.getEl Dom.setStyle(clickEl visibility hidden Copy source element to proxy and set class dragEl.className = clickEl.className dragEl.innerHTML = clickEl.innerHTML endDrag function(e var srcEl = this.getEl var proxy = this.getDragEl Show the proxy element and animate it to the src element\'s location Dom.setStyle(proxy visibility var a = new YAHOO.util.Motion proxy points to Dom.getXY(srcEl 0.2 YAHOO.util.Easing.easeOut var proxyid = proxy.id var thisid = this.id Hide the proxy and show the source element when finished with the animation a.onComplete.subscribe(function Dom.setStyle(proxyid visibility hidden Dom.setStyle(thisid visibility a.animate Do nothing more if no element has been replaced if this.lastReplaced == null return Get assed ids of the target to move and the last photo replaced var target = srcEl.id.replace(this.app.idPrefix var dest = this.lastReplaced.id.replace(this.app.idPrefix Prepare call to ajax service of the gallery asset We need to set the action argument to moveFile provide the asset id of the target photo in target and the asset id of the photo replaced in before or after depending on order var args = args.action = moveFile args.target = target if this.before args.before = dest else args.after = dest Callback function for asynchronous request This is required for error handling var callback = success function o Parse answer from ajax service result = YAHOO.lang.JSON.parse(o.responseText Check for errors if result.err Display error message alert(\'Failed to move photo + result.errMessage Request a reload of the page so we are back in sync location.reload failure function o Display generic error message alert(\'AJAX service for moving photos is currently not available Failed to move photo Request a reload of the page so we are back in sync location.reload Convert args object to JSON string var postData = func=ajax;args= + encodeURI(YAHOO.lang.JSON.stringify(args Make asynchronous call to gallery asset YAHOO.util.Connect.asyncRequest(\"POST this.app.url callback postData onDrag function(e Keep track of the direction of the drag for use during onDragOver var y = Event.getPageY(e var x = Event.getPageX(e Check in vertical direction if y < this.lastY this.goingUp = true else if y > this.lastY this.goingUp = false Check in horizontal direction if x < this.lastX this.goingLeft = true else if x > this.lastX this.goingLeft = false this.lastY = y this.lastX = x onDragOver function(e id var srcEl = this.getEl var destEl = Dom.get(id We are only concerned with list items we ignore the dragover notifications for the list if destEl.nodeName.toLowerCase == this.app.draggableNodeTags var orig_p = srcEl.parentNode var p = destEl.parentNode if this.goingUp || this.goingLeft Insert above/before p.insertBefore(srcEl destEl Keep track of where we moved this.lastReplaced = destEl this.before = true else Insert below/after p.insertBefore(srcEl destEl.nextSibling Keep track of where we moved this.lastReplaced = destEl this.before = false DDM.refreshCache Start application after DOM is ready Event.onDOMReady(Gallery.DDSorting.init Gallery.DDSorting true','000001000001000015000026',NULL),('f2EktltCvwQpl_3-B1yR7g','Asset Templates','','root/import/asset_templates',1288748251,1288748251,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Asset Templates Asset Templates root import asset templates','000001000001000060',NULL),('BBpxqoSseIor5C9ei9JEFQ','Underground WebGUI.css','','style-underground/css/underground-webgui.css',1273032719,1301973996,'3','7','3','WebGUI::Asset::Snippet',0,'Underground WebGUI.css Underground WebGUI.css style underground css underground webgui.css wg-toolbar p margin 0px img.wg-toolbar-icon border 0px none toolbarIcon margin 0px label display inline ','000001000001000056000002000002',NULL),('xyyn5mz3xGyvrcI1rY8C-w','greenportal.css','','greenportal.css',1273032721,1301973998,'3','7','12','WebGUI::Asset::Snippet',0,'greenportal.css greenportal.css greenportal.css CSS Document body,html text-align:center height 100 margin 3px 3px 3px 3px font-family Verdana Sans-Serif line-height 125 color:#CCCCCC background 222625 h1,h2,h3,h4,h5,h6{font-weight:bold h1{font-size:18px h2{font-size:16px h3{font-size:14px h4{font-size:12px h5{font-size:11px h6{font-size:10px main width:80 height:100 margin-left:auto margin-right:auto position:relative body > main height:auto min-height:100 font-size:10px main mainHeader width:100 height:125px background url(\'^FileUrl(/greenportal_image/logo.jpg top center no-repeat margin-bottom:5px position:relative main mainHeader title position:absolute top:55px left:180px font-size:36pt font-family Edwardian Script ITC Arial Sans-Serif font-variant small-caps font-style italic color:#CCCCCC font-weight bold overflow visible padding 20px main mainHeader title a color:#CCCCCC text-decoration:none main mainHeader title a:hover color:#FFFFFF text-decoration:none font-size:37pt main mainMenu width:186px position:absolute top:125px left:0px main mainMenu li list-style none font-size 9pt text-align:left main mainMenu menuTop color:#99CC33 background url(\'^FileUrl(/greenportal_image/menu_top.png no-repeat margin-left:-3px padding:2px 0px 3px 26px width:162px 186px-24px font-size:10pt font-weight bold main mainMenu indent1 margin-left:0px width:186px main mainMenu indent2 margin-left:17px width:168px 186-17px main mainMenu a display:block height:24px font-weight:bold text-decoration:none color:#CCCCCC background url(\'^FileUrl(/greenportal_image/menu_dark.png no-repeat padding:2px 0px 0px 24px main mainMenu a:hover,active display:block height:24px font-weight:bold text-decoration:none color:#FFFFFF background url(\'^FileUrl(/greenportal_image/menu_light.png no-repeat padding:2px 0px 0px 24px main mainContent width:75 height:100 margin-top:5px margin-left:215px text-align:left border 1px solid CCCCCC main > mainContent margin-top:0px min-height:500px main > mainContent > p margin-top:0px main mainContent topMenu margin-right 10px text-align right font-size 8pt font-weight bold main mainContent topMenu a color 99CC33 text-decoration none main mainContent topMenu a:hover text-decoration:underline main mainContent mainText margin 10px 5px 5px 10px font-size:8pt padding 5px min-height 423px text-align left main mainContent mainText a color:#FFFFFF text-decoration none font-weight bold main mainContent mainText a:hover color:#FFFF00 text-decoration none font-weight bold main mainContent mainText yui-skin-sam a color 222625 text-decoration none font-weight bold main mainFooter text-align:left padding:10px margin:5px 0px 5px 200px width:75 font-size:9px background:url(^FileUrl(/greenportal_image/logo.jpg no-repeat main mainFooter a color:#CCCCCC font-weight:bold text-decoration:none main mainFooter a:hover color:#FFFFFF font-weight:bold text-decoration:none ','000001000001000057000002',NULL),('XdlKhCDvArs40uqBhvzR3w','Article With Pagination','','article-with-pagination',1254881103,1259133275,'3','7','12','WebGUI::Asset::Template',0,'Article With Pagination Article With Pagination article with pagination Article','000001000001000004000006',NULL),('mRtqRuVikSe82BQsYBlD0A','Bare Image','','bare_image',1263962529,1263962529,'3','7','12','WebGUI::Asset::Template',0,'Bare Image Bare Image bare image ImageAsset','000001000001000017000003',NULL),('8tqyQx-LwYUHIWOlKPjJrA','EMS Event Submission Template','','root/import/ems/ems-event-submission',1258524917,1279073449,'3','7','12','WebGUI::Asset::Template',0,'EMS Event Submission Template EMS Event Submission Template root import ems ems event submission EMS/Submission','000001000001000012000009',NULL),('DoVNijm6lMDE0cYrtvEbDQ','EMS Event Submission Main Template','','root/import/ems/ems-event-submission-main',1258524917,1279073449,'3','7','12','WebGUI::Asset::Template',0,'EMS Event Submission Main Template EMS Event Submission Main Template root import ems ems event submission main EMS/SubmissionMain','000001000001000012000010',NULL),('ktSvKU8riGimhcsxXwqvPQ','EMS Event Submission Queue','','root/import/ems/ems-event-submission-queue',1258524917,1279073450,'3','7','12','WebGUI::Asset::Template',0,'EMS Event Submission Queue EMS Event Submission Queue root import ems ems event submission queue EMS/SubmissionQueue','000001000001000012000011',NULL),('pbproto000000000000002','Request Tracker','','request-tracker-prototype',1147642465,1163019036,'3','7','12','WebGUI::Asset::Wobject::Collaboration',1,'Request Tracker Request Tracker request tracker prototype','000001000001000008000031',NULL),('VCFhB9WOsDsH2Apj3c6DpQ','Three Columns','','three-columns',1254881103,1259133276,'3','7','12','WebGUI::Asset::Template',0,'Three Columns Three Columns three columns Layout','000001000001000019000008',NULL),('_aE16Rr1-bXBf8SIaLZjCg','picklanguage','','media/picklanguage',1257311888,1257311888,'3','7','12','WebGUI::Asset::Template',0,'picklanguage picklanguage media picklanguage Macro/PickLanguage','000001000001000021000013',NULL),('mfHGkp6t9gdclmzN33OEnw','Default Twitter Choose Username','','root/import/auth/twitter/chooseusername/default-twitter-choose-username',1277868927,1277868927,'3','7','12','WebGUI::Asset::Template',0,'Default Twitter Choose Username Default Twitter Choose Username root import auth twitter chooseusername default twitter choose username Auth/Twitter/ChooseUsername','000001000001000005000012',NULL),('limMkk80fMB3fqNZVf162w','Default Asset Subscription','','root/import/default-asset-subscription',1253507213,1281501163,'3','7','3','WebGUI::Asset::Template',0,'Default Asset Subscription Default Asset Subscription root import default asset subscription AssetAspect/Subscribable','000001000001000060000001',NULL),('YP9WaMPJHvCJl-YwrLVcPw','Progress Bar','','admin_progress_bar',1245376837,1245376837,'3','7','12','WebGUI::Asset::Template',0,'Progress Bar Progress Bar admin progress bar AdminConsole/ProgressBar','000001000001000060000002',NULL),('Rqwgh50A3gGcOKIrdi_kxw','Authorize.net Credentials (Default)','','shopping-cart-collateral-items/authorizenet-credentials',1313542962,1313542962,'3','7','4','WebGUI::Asset::Template',0,'Authorize.net Credentials Default Authorize.net Credentials Default shopping cart collateral items authorizenet credentials Shop/Credentials','000001000001000036000025',NULL),('3n3H85BsdeRQ0I08WmvlOg','thingy.css','','root/import/thingy-templates/thingy.css',1212091492,1313542960,'3','7','12','WebGUI::Asset::Snippet',0,'thingy.css thingy.css root import thingy templates thingy.css wgThingy margin:5px wgThingy styleButton color:black margin:0px 5px display:block float:left wgThingy spacerOne padding-left:15px wgThingy rowOne wgThingy tr.rowOne td background EEEEEE margin:1px border:solid CDCDCD 1px color:#000 padding:2px wgThingy rowTwo wgThingy tr.rowTwo td background DBDBDB margin:1px border:solid DDDDDD 1px color:#000 padding:2px wgThingsWrapper img display:block vertical-align:middle float:left wgThingsWrapper label font-weight:bold padding-left:15px wgThingy h2.title background 000 height:42px color:white font-size:18px font-weight:bold letter-spacing:1px line-height:42px padding-left:15px margin-bottom:0px wgThingy span.smaller font-size:13px color:white wgThingy controls line-height:35px height:35px background f1f1f1 margin-top:0px margin-bottom:20px padding:0px overflow:visible wgThingy label background:black color:white padding:2px 5px font-family:arial font-size:11px font-weight:bold vertical-align:middle wgThingy label a color:white searchTable input editThing input background white border:solid 555 1px editThing margin-top:15px thingyList thingyList margin:0px padding:0px thingyList position:relative float:left overflow:visible thingyList goButton:link thingyList goButton:visited padding:2px 25px 2px 2px background F1F1F1 url(^FileUrl(root/import/thingy-templates/images/go-btn.gif no-repeat right line-height:20px border:solid a2a2a2 1px color:#a2a2a2 text-decoration:none font-family:verdana arial font-size:10px font-weight:bold margin-left:20px letter-spacing:0px thingyList goButton:hover background-color:white thingyList things padding:0px margin:0px width:300px z-index:5000 position:absolute top:27px left:20px border:solid a2a2a2 1px border-top-style:none thingyList things a:link thingyList things a:visited display:block background-color:#f1f1f1 border-top:solid a2a2a2 1px border-bottom:solid 727272 1px line-height:12px font-size:10px height:12px padding:2px 5px text-decoration:none font-weight:bold color:#a2a2a2 thingyList things a:hover background-color:white ','000001000001000044000006',NULL); -ALTER TABLE `assetIndex` ENABLE KEYS; -ALTER TABLE `assetVersionTag` DISABLE KEYS; -INSERT INTO `assetVersionTag` VALUES ('pbversion0000000000001','Base 7.10.23 Install',1,1315877146,'3',1315877146,'3',0,'','3','',NULL,NULL,NULL,NULL,0); -ALTER TABLE `assetVersionTag` ENABLE KEYS; -ALTER TABLE `authentication` DISABLE KEYS; -INSERT INTO `authentication` VALUES ('1','LDAP','ldapUrl',NULL),('3','LDAP','ldapUrl',''),('1','LDAP','connectDN',NULL),('3','LDAP','connectDN',''),('1','WebGUI','identifier','No Login'),('3','WebGUI','identifier','RvlMjeFPs2aAhQdo/xt/Kg'),('1','WebGUI','passwordLastUpdated','1078704037'),('1','WebGUI','passwordTimeout','3122064000'),('1','WebGUI','changeUsername','1'),('1','WebGUI','changePassword','1'),('3','WebGUI','passwordLastUpdated','1078704037'),('3','WebGUI','passwordTimeout','3122064000'),('3','WebGUI','changeUsername','1'),('3','WebGUI','changePassword','1'); -ALTER TABLE `authentication` ENABLE KEYS; -ALTER TABLE `databaseLink` DISABLE KEYS; -INSERT INTO `databaseLink` VALUES ('0',NULL,NULL,NULL,NULL,NULL,1,''); -ALTER TABLE `databaseLink` ENABLE KEYS; -ALTER TABLE `groupGroupings` DISABLE KEYS; -INSERT INTO `groupGroupings` VALUES ('11','12'),('3','11'),('3','12'),('3','13'),('3','2'),('3','4'),('3','6'),('3','7'),('3','8'),('3','pbgroup000000000000015'),('3','pbgroup000000000000016'),('3','pbgroup000000000000017'),('4','12'),('6','12'),('8','12'); -ALTER TABLE `groupGroupings` ENABLE KEYS; -ALTER TABLE `groupings` DISABLE KEYS; -INSERT INTO `groupings` VALUES ('1','1',2114402400,0),('3','3',2114402400,0),('7','1',2114402400,0),('7','3',2114402400,0),('2','3',2114402400,0); -ALTER TABLE `groupings` ENABLE KEYS; -ALTER TABLE `groups` DISABLE KEYS; -INSERT INTO `groups` VALUES ('1','Visitors','This is the public group that has no privileges.',314496000,1000000000,NULL,997938000,997938000,14,-14,NULL,0,NULL,0,0,'0',3600,NULL,0,1,NULL,NULL,NULL,NULL,NULL,0),('2','Registered Users','All registered users belong to this group automatically. There are no associated privileges other than that the user has an account and is logged in.',314496000,1000000000,NULL,997938000,997938000,14,-14,NULL,0,NULL,0,0,'0',3600,NULL,0,1,NULL,NULL,NULL,NULL,NULL,0),('3','Admins','Anyone who belongs to this group has privileges to do anything and everything.',314496000,1000000000,NULL,997938000,997938000,14,-14,NULL,0,NULL,0,0,'0',3600,NULL,1,1,NULL,NULL,NULL,NULL,NULL,0),('4','Content Managers','Users that have privileges to edit content on this site. The user still needs to be added to a group that has editing privileges on specific pages.',314496000,1000000000,NULL,997938000,997938000,14,-14,NULL,0,NULL,0,0,'0',3600,NULL,1,1,NULL,NULL,NULL,NULL,NULL,0),('6','Package Managers','Users that have privileges to add, edit, and delete packages of wobjects and pages to deploy.',314496000,1000000000,NULL,997938000,997938000,14,-14,NULL,0,NULL,0,0,'0',3600,NULL,1,1,NULL,NULL,NULL,NULL,NULL,0),('7','Everyone','A group that automatically includes all users including Visitors.',314496000,1000000000,NULL,997938000,997938000,14,-14,NULL,0,NULL,0,0,'0',3600,NULL,0,1,NULL,NULL,NULL,NULL,NULL,0),('8','Template Managers','Users that have privileges to edit templates for this site.',314496000,1000000000,NULL,997938000,997938000,14,-14,NULL,0,NULL,0,0,'0',3600,NULL,1,1,NULL,NULL,NULL,NULL,NULL,0),('13','Export Managers','Users in this group can export pages to disk.',314496000,1000000000,NULL,997938000,997938000,14,-14,NULL,0,NULL,0,0,'0',3600,NULL,1,1,NULL,NULL,NULL,NULL,NULL,0),('11','Secondary Admins','Users that have limited administrative privileges.',314496000,1000000000,NULL,997938000,997938000,14,-14,NULL,0,NULL,0,0,'0',3600,NULL,1,1,NULL,NULL,NULL,NULL,NULL,0),('12','Turn Admin On','These users can enable admin mode.',314496000,1000000000,NULL,997938000,997938000,14,-14,NULL,0,NULL,0,0,'0',3600,NULL,1,1,NULL,NULL,NULL,NULL,NULL,0),('pbgroup000000000000015','Workflow Managers','People who can create, edit, and delete workflows.',314496000,1000000000,NULL,1147642408,1147642408,14,-14,NULL,0,NULL,0,0,'0',3600,NULL,1,1,NULL,NULL,NULL,NULL,NULL,0),('pbgroup000000000000016','Version Tag Managers','People who can create, edit, and delete special version tags.',314496000,1000000000,NULL,1147642408,1147642408,14,-14,NULL,0,NULL,0,0,'0',3600,NULL,1,1,NULL,NULL,NULL,NULL,NULL,0),('pbgroup000000000000017','Ad Manager','These users will be able to manage advertisements.',314496000,1000000000,NULL,1147642437,1147642437,14,-14,NULL,0,NULL,0,0,'0',3600,NULL,1,1,NULL,NULL,NULL,NULL,NULL,0),('Fwa7nt7HAQkelbjCRrtqKQ','Admin Friends','Friends of user 3',1892160000,1000000000,NULL,1251850059,1251850059,14,-14,NULL,0,NULL,0,0,'0',3600,NULL,0,0,NULL,NULL,NULL,NULL,NULL,0); -ALTER TABLE `groups` ENABLE KEYS; -ALTER TABLE `imageColor` DISABLE KEYS; -INSERT INTO `imageColor` VALUES ('UVL-iDSq7VTks3RCH2FEWg','Green','#31ca31','99','#31ca31','00'),('3Tf0W_tkAjR902FJcGZxCg','Blue','#007dff','99','#007dff','00'),('fuFripVJ4es4bUBPOq3ENQ','Yellow','#ffda08','99','#ffda08','00'),('n3yfk8JGilmChSer2xuZ0w','Orange','#FF8000','99','#FF8000','00'),('W683fO6r8uHgZ-Z-VodY7w','Red','#FF2000','99','#FF2000','00'),('pSnxDIInB9r0n06q6kKV3w','Purple','#FF00B0','99','#FF00B0','00'); -ALTER TABLE `imageColor` ENABLE KEYS; -ALTER TABLE `imageFont` DISABLE KEYS; -INSERT INTO `imageFont` VALUES ('defaultFont','WebGUI default font',NULL,'default.ttf'); -ALTER TABLE `imageFont` ENABLE KEYS; -ALTER TABLE `imagePalette` DISABLE KEYS; -INSERT INTO `imagePalette` VALUES ('defaultPalette','Default palette'); -ALTER TABLE `imagePalette` ENABLE KEYS; -ALTER TABLE `imagePaletteColors` DISABLE KEYS; -INSERT INTO `imagePaletteColors` VALUES ('defaultPalette','UVL-iDSq7VTks3RCH2FEWg',1),('defaultPalette','3Tf0W_tkAjR902FJcGZxCg',2),('defaultPalette','fuFripVJ4es4bUBPOq3ENQ',3),('defaultPalette','n3yfk8JGilmChSer2xuZ0w',4),('defaultPalette','W683fO6r8uHgZ-Z-VodY7w',5),('defaultPalette','pSnxDIInB9r0n06q6kKV3w',6); -ALTER TABLE `imagePaletteColors` ENABLE KEYS; -ALTER TABLE `incrementer` DISABLE KEYS; -INSERT INTO `incrementer` VALUES ('submissionId',1); -ALTER TABLE `incrementer` ENABLE KEYS; -ALTER TABLE `ldapLink` DISABLE KEYS; -INSERT INTO `ldapLink` VALUES ('1uBbhUm686mkFZ1ghv7Lag','Default LDAP Connection','ldap://ldap.mycompany.com:389/o=MyCompany','','','cn','shortname','LDAP Shortname','LDAP Password','0','Welcome to our site.','PBtmpl0000000000000004','PBtmpl0000000000000005','PBtmpl0000000000000006',NULL,'_P4PMiraGsLTfOjK4fYQPQ'); -ALTER TABLE `ldapLink` ENABLE KEYS; -ALTER TABLE `passiveAnalyticsStatus` DISABLE KEYS; -INSERT INTO `passiveAnalyticsStatus` VALUES (NULL,NULL,0,'3'); -ALTER TABLE `passiveAnalyticsStatus` ENABLE KEYS; -ALTER TABLE `paymentGateway` DISABLE KEYS; -INSERT INTO `paymentGateway` VALUES ('gzUxkEZJxREF9JpylOg2zw','WebGUI::Shop::PayDriver::Cash','{\"summaryTemplateId\":\"30h5rHxzE_Q0CyI3Gg7EJw\",\"groupToUse\":7,\"label\":\"Cash\",\"enabled\":1}'),('BaSs55o1bnOlAj4F0hHYag','WebGUI::Shop::PayDriver::ITransact','{\"credentialsTemplateId\":\"itransact_credentials1\",\"groupToUse\":7,\"label\":\"ITransact\",\"enabled\":1}'); -ALTER TABLE `paymentGateway` ENABLE KEYS; -ALTER TABLE `replacements` DISABLE KEYS; -INSERT INTO `replacements` VALUES ('1','[quote]','
'),('2','[/quote]','
'),('3','[image]',''),('5','shit','crap'),('6','fuck','farg'),('7','asshole','icehole'),('8','nigger','guy'); -ALTER TABLE `replacements` ENABLE KEYS; -ALTER TABLE `search` DISABLE KEYS; -INSERT INTO `search` VALUES ('UUwEL6hLEPdrnkZnKRzFYQ',1273032718,'WebGUI::Asset\nWebGUI::Asset::Event\nWebGUI::Asset::File\nWebGUI::Asset::File::Image\nWebGUI::Asset::Post\nWebGUI::Asset::Post::Thread\nWebGUI::Asset::RichEdit\nWebGUI::Asset::RSSFromParent\nWebGUI::Asset::Snippet\nWebGUI::Asset::Template\nWebGUI::Asset::Wobject::Article\nWebGUI::Asset::Wobject::Calendar\nWebGUI::Asset::Wobject::Collaboration\nWebGUI::Asset::Wobject::DataForm\nWebGUI::Asset::Wobject::Folder\nWebGUI::Asset::Wobject::MessageBoard\nWebGUI::Asset::Wobject::Navigation\nWebGUI::Asset::Wobject::SyndicatedContent\nWebGUI::Asset::Wobject::Thingy','68sKwDgf9cGH58-NZcU4lg','OfKbvK7CrfMnfc8WDoF4Rg',1,10),('8E2UOnj_XPEghTj7nfVM0g',1301973997,NULL,'68sKwDgf9cGH58-NZcU4lg','PBtmpl0000000000000200',0,25); -ALTER TABLE `search` ENABLE KEYS; -ALTER TABLE `settings` DISABLE KEYS; -INSERT INTO `settings` VALUES ('maxAttachmentSize','100000'),('sessionTimeout','7200'),('smtpServer','localhost'),('companyEmail','info@mycompany.com'),('companyName','My Company'),('companyURL','http://www.mycompany.com'),('authMethod','WebGUI'),('anonymousRegistration','0'),('notFoundPage','68sKwDgf9cGH58-NZcU4lg'),('webguiRecoverPasswordEmail','Someone (probably you) requested your account information be sent. Your password has been reset. The following represents your new account information:'),('profileName','1'),('profileExtraContact','1'),('profileMisc','1'),('profileHome','0'),('profileWork','0'),('preventProxyCache','0'),('thumbnailSize','50'),('textBoxSize','30'),('defaultPage','68sKwDgf9cGH58-NZcU4lg'),('defaultVersionTagWorkflow','pbworkflow000000000003'),('useKarma','0'),('karmaPerLogin','1'),('runOnRegistration',''),('maxImageSize','100000'),('showDebug','0'),('richEditor','PBrichedit000000000001'),('selfDeactivation','1'),('snippetsPreviewLength','30'),('mailFooter','^c;\n^e;\n^u;\n'),('webguiSendWelcomeMessage','0'),('webguiWelcomeMessage','

Welcome to our site.

'),('encryptLogin','0'),('hostToUse','HTTP_HOST'),('webguiExpirePasswordOnCreation','0'),('webguiPasswordLength','0'),('webguiPasswordRecovery',''),('webguiPasswordTimeout','3122064000'),('webguiChangePassword','1'),('webguiChangeUsername','1'),('metaDataEnabled','0'),('passiveProfilingEnabled','0'),('urlExtension',''),('AdminConsoleTemplate','PBtmpl0000000000000001'),('userFunctionStyleId','Qk24uXao2yowR6zxbVJ0xA'),('webguiValidateEmail','0'),('webguiUseCaptcha','1'),('webguiAccountTemplate','PBtmpl0000000000000010'),('webguiCreateAccountTemplate','PBtmpl0000000000000011'),('webguiExpiredPasswordTemplate','PBtmpl0000000000000012'),('webguiLoginTemplate','PBtmpl0000000000000013'),('webguiPasswordRecoveryTemplate','PBtmpl0000000000000014'),('ldapConnection','1uBbhUm686mkFZ1ghv7Lag'),('debugIp',''),('showPerformanceIndicators','0'),('mailReturnPath',NULL),('webguiNonWordCharacters','0'),('webguiRequiredMixedCase','0'),('webguiRequiredDigits','0'),('automaticLDAPRegistration','0'),('trashWorkflow',''),('purgeWorkflow',''),('changeUrlWorkflow',''),('webguiPasswordRecoveryRequireUsername','1'),('groupIdCashier','3'),('skipCommitComments','1'),('groupIdAdminCache','3'),('groupIdAdminSpectre','3'),('groupIdAdminAdSpace','3'),('groupIdAdminWorkflow','pbgroup000000000000015'),('groupIdAdminGroupAdmin','11'),('groupIdAdminProfileSettings','3'),('groupIdAdminDatabaseLink','3'),('groupIdAdminActiveSessions','3'),('groupIdAdminLDAPLink','3'),('groupIdAdminStatistics','3'),('groupIdAdminHelp','7'),('groupIdAdminCommerce','3'),('groupIdAdminWorkflowRun','3'),('groupIdAdminUserAdd','11'),('groupIdAdminUser','3'),('groupIdAdminVersionTag','12'),('groupIdAdminGraphics','3'),('groupIdAdminGroup','3'),('groupIdAdminCron','3'),('groupIdAdminLoginHistory','3'),('groupIdAdminReplacements','3'),('runOnAdminCreateUser',''),('runOnAdminUpdateUser',''),('shopCartTemplateId','aIpCmr9Hi__vgdZnDTz1jw'),('shopAddressBookTemplateId','3womoo7Teyy2YKFa25-MZg'),('shopAddressTemplateId','XNd7a_g_cTvJVYrVHcx2Mw'),('shopMyPurchasesTemplateId','2gtFt7c0qAFNU3BG_uvNvg'),('shopMyPurchasesDetailTemplateId','g8W53Pd71uHB9pxaXhWf_A'),('showMessageOnLoginTimes','0'),('showMessageOnLogin','0'),('showMessageOnLoginBody',''),('versionTagMode','autoCommit'),('profileStyleTemplateId','stevestyle000000000003'),('profileLayoutTemplateId','FJbUTvZ2nUTn65LpW6gjsA'),('profileEditTemplateId','75CmQgpcCSkdsL-oawdn3Q'),('inboxStyleTemplateId','stevestyle000000000003'),('inboxViewTemplateId','c8xrwVuu5QE0XtF9DiVzLw'),('inboxViewMessageTemplateId','0n4HtbXaWa_XJHkFjetnLQ'),('inboxSendMessageTemplateId','6uQEULvXFgCYlRWnYzZsuA'),('inboxErrorTemplateId','ErEzulFiEKDkaCDVmxUavw'),('inboxMessageConfirmationTemplateId','DUoxlTBXhVS-Zl3CFDpt9g'),('inboxManageInvitationsTemplateId','1Q4Je3hKCJzeo0ZBB5YB8g'),('inboxViewInvitationTemplateId','VBkY05f-E3WJS50WpdKd1Q'),('inboxInvitationConfirmTemplateId','5A8Hd9zXvByTDy4x-H28qw'),('inboxInviteUserEnabled','0'),('inboxInviteUserRestrictSubject','0'),('inboxInviteUserSubject','^International(invite subject,Account_Inbox,^u;);'),('inboxInviteUserRestrictMessage','0'),('inboxInviteUserMessage','^International(invite message,Account_Inbox);'),('inboxInviteUserMessageTemplateId','XgcsoDrbC0duVla7N7JAdw'),('inboxInviteUserTemplateId','cR0UFm7I1qUI2Wbpj--08Q'),('inboxInviteUserConfirmTemplateId','SVIhz68689hwUGgcDM-gWw'),('friendsStyleTemplateId','stevestyle000000000003'),('friendsViewTemplateId','1Yn_zE_dSiNuaBGNLPbxtw'),('friendsEditTemplateId','AZFU33p0jpPJ-E6qLSWZng'),('friendsSendRequestTemplateId','AGJBGviWGAwjnwziiPjvDg'),('friendsErrorTemplateId','7Ijdd8SW32lVgg2H8R-Aqw'),('friendsConfirmTemplateId','K8F0j_cq_jgo8dvWY_26Ag'),('friendsRemoveConfirmTemplateId','G5V6neXIDiFXN05oL-U3AQ'),('userAccountStyleTemplateId','stevestyle000000000003'),('userAccountLayoutTemplateId','9ThW278DWLV0-Svf68ljFQ'),('shopStyleTemplateId','stevestyle000000000003'),('shopLayoutTemplateId','aUDsJ-vB9RgP-AYvPOy8FQ'),('contribStyleTemplateId','stevestyle000000000003'),('contribLayoutTemplateId','b4n3VyUIsAHyIvT-W-jziA'),('contribViewTemplateId','1IzRpX0tgW7iuCfaU2Kk0A'),('profileViewTemplateId','2CS-BErrjMmESOtGT90qOg'),('profileErrorTemplateId','MBmWlA_YEA2I6D29OMGtRg'),('inboxLayoutTemplateId','gfZOwaTWYjbSoVaQtHBBEw'),('friendsLayoutTemplateId','zrNpGbT3odfIkg6nFSUy8Q'),('inboxRichEditId','PBrichedit000000000001'),('useRecaptcha','0'),('recaptchaPublicKey',''),('recaptchaPrivateKey',''),('webguiAccountActivationTemplate','PBtmpl0000000000000016'),('groupIdAdminHistory','12'),('shopCartCheckoutMinimum','0.00'),('passiveAnalyticsInterval','300'),('passiveAnalyticsDeleteDelta','0'),('passiveAnalyticsEnabled','0'),('shopMySalesTemplateId','-zxyB-O50W8YnL39Ouoc4Q'),('webguiWelcomeMessageTemplate','PBtmpl0000000000000015'),('activeTaxPlugin','WebGUI::Shop::TaxDriver::Generic'),('globalHeadTags',''),('useMobileStyle','0'),('inboxCopySender','0'),('sendInboxNotificationsOnly','0'),('inboxNotificationTemplateId','b1316COmd9xRv4fCI3LLGA'),('smsGateway',''),('groupIdAdminFriends','3'),('fmViewTemplateId','64tqS80D53Z0JoAs2cX2VQ'),('fmEditTemplateId','lG2exkH9FeYvn4pA63idNg'),('groupsToManageFriends','2'),('overrideAbleToBeFriend','0'),('webguiUseEmailAsUsername','0'),('redirectAfterLoginUrl',''),('groupIdAdminFilePump','8'),('fmStyleTemplateId','stevestyle000000000003'),('fmLayoutTemplateId','N716tpSna0iIQTKxS4gTWA'),('smsGatewaySubject',''),('inboxNotificationsSubject',''),('inboxSmsNotificationTemplateId','i9-G00ALhJOr0gMh-vHbKA'),('shopSaleNotificationGroupId','3'),('shopReceiptEmailTemplateId','bPz1yk6Y9uwMDMBcmMsSCg'),('selectGatewayTemplateId','2GxjjkRuRkdUg_PccRPjpA'),('groupIdAdminClipboard','3'),('groupIdAdminTrash','3'),('maxCacheTimeout','86400'),('webguiDeactivateAccountTemplate','zaHUYsE_PgKk8hnVd8ffEQ'),('sendRejectNotice','1'),('twitterEnabled','0'),('twitterTemplateIdChooseUsername','mfHGkp6t9gdclmzN33OEnw'),('showMessageOnLoginReset','0'),('profileDisplayLayoutTemplateId',''),('webguiPasswordRecoveryEmailTemplate','sK_0zVw4kwdJ1sqREIsSzA'),('enableUsersAfterAnonymousRegistration','1'),('specialState','init'); -ALTER TABLE `settings` ENABLE KEYS; -ALTER TABLE `shipper` DISABLE KEYS; -INSERT INTO `shipper` VALUES ('defaultfreeshipping000','WebGUI::Shop::ShipDriver::FlatRate','{\"groupToUse\":7,\"label\":\"Free Shipping\",\"enabled\":1}'); -ALTER TABLE `shipper` ENABLE KEYS; -ALTER TABLE `snippet` DISABLE KEYS; -INSERT INTO `snippet` VALUES ('SynConXSLT000000000001','\n\n\n \n \n \n \n \n \nYou\'re viewing an RSS version 0.9 feed. Please use an RSS feed reader to view this content as intended.\n
\n
\n \n
\n
\n \n
\n
    \n \n
\n
\n
\n \n
  • \n \n \n \n
  • \n
    \n
    ','application/xml',1124395707,3600,'\n\n\n \n \n \n \n \n \nYou\'re viewing an RSS version 0.9 feed. Please use an RSS feed reader to view this content as intended.\n
    \n
    \n \n
    \n
    \n \n
    \n
      \n \n
    \n
    \n
    \n \n
  • \n \n \n \n
  • \n
    \n
    ',0,NULL),('SynConXSLT000000000002','\n\n\n \n \n \n \n \n \n
    \nYou\'re viewing an RSS version 0.91 feed. Please use an RSS feed reader to view this content as intended.\n
    \n \n
    \n
    \n \n
    \n
      \n \n
    \n\n
    \n
    \n \n
  • \n \n \n \n
    \n \n\n
    \n
  • \n
    \n
    ','application/xml',1124395707,3600,'\n\n\n \n \n \n \n \n \n
    \nYou\'re viewing an RSS version 0.91 feed. Please use an RSS feed reader to view this content as intended.\n
    \n \n
    \n
    \n \n
    \n
      \n \n
    \n\n
    \n
    \n \n
  • \n \n \n \n
    \n \n\n
    \n
  • \n
    \n
    ',0,NULL),('SynConXSLT000000000003','\n\n\n \n \n \n \n \n \n
    \nYou\'re viewing an RSS version 1.0 feed. Please use an RSS feed reader to view this content as intended.\n
    \n \n
    \n
    \n \n
    \n
      \n \n
    \n\n
    \n
    \n \n
  • \n \n \n \n \n (\n )\n \n\n
    \n \n
    \n
  • \n
    \n
    \n','application/xml',1124395707,3600,'\n\n\n \n \n \n \n \n \n
    \nYou\'re viewing an RSS version 1.0 feed. Please use an RSS feed reader to view this content as intended.\n
    \n \n
    \n
    \n \n
    \n
      \n \n
    \n\n
    \n
    \n \n
  • \n \n \n \n \n (\n )\n \n\n
    \n \n
    \n
  • \n
    \n
    \n',0,NULL),('SynConXSLT000000000004','\n\n\n \n \n \n \n \n \n
    \nYou\'re viewing an RSS version 2.0 feed. Please use an RSS feed reader to view this content as intended.\n
    \n \n
    \n
    \n \n
    \n
      \n \n
    \n\n
    \n
    \n \n
  • \n \n \n \n \n ()\n \n\n
    \n \n
    \n
  • \n
    \n
    ','application/xml',1124395707,3600,'\n\n\n \n \n \n \n \n \n
    \nYou\'re viewing an RSS version 2.0 feed. Please use an RSS feed reader to view this content as intended.\n
    \n \n
    \n
    \n \n
    \n
      \n \n
    \n\n
    \n
    \n \n
  • \n \n \n \n \n ()\n \n\n
    \n \n
    \n
  • \n
    \n
    ',0,NULL),('7-0-style0000000000003','body, html\n{\n text-align:center;\n margin:0px;\n height:100%; \n background-color:#494949;\n}\n\n#main\n{\n width:800px;\n background: url(\'^FileUrl(style1/main_bg.jpg);\') repeat-y;\n height:100%;\n margin-left:auto;\n margin-right:auto;\n margin-top:0px;\n margin-bottom:0px;\n position:relative;\n}\nbody > #main\n{\n height:auto;\n min-height:100%;\n}\n\n#main #mainHeader\n{\n width:800px;\n height:133px;\n background: url(\'^FileUrl(style1/header.jpg);\') top left no-repeat;\n margin-bottom:0px;\n position:relative;\n}\n#main #mainHeader #title\n{\n position:absolute;\n top:23px;\n left:145px;\n font-size:32pt;\n font-family:arial;\n color:white;\n font-weight:bold;\n}\n#main #mainHeader #title a {\n color:white;\n text-decoration:none;\n}\n\n#main #mainContent\n{\n background: url(\'^FileUrl(style1/orange_left01.jpg);\') left top no-repeat;\n width:100%;\n height:100%; \n margin-top:0px;\n text-align:left;\n border:solid red 0px;\n}\n#main > #mainContent\n{\n margin-top:0px;\n min-height:500px;\n}\n#main > #mainContent > p {\n margin-top:0px;\n}\n#main #mainContent #mainText a:link {\n color:#FF7F23;\n}\n#main #mainContent #mainText a:visited {\n color:#D25900;\n}\n\n/* LEVEL 1 AND 2 NAVIGATION */\n#main .mainNav_1, #main .mainNav_2 {\n border-bottom:dashed #DADADA 1px; \n width:621px;\n height:25px;\n text-align:left;\n position:relative;\n margin-left:137px; \n clear:both;\n}\n#main .mainNav_1 a:link, #main .mainNav_1 a:visited, #main .mainNav_2 a:link, #main .mainNav_2 a:visited {\n color:white;\n text-decoration:none;\n top:5px;\n position:relative;\n -moz-box-sizing:border-box;\n}\n#main .mainNav_1 a:hover,#main .mainNav_2 a:hover {\n color:black;\n}\n#main .mainNav_1 div .left, #main .mainNav_2 div .left {\n width:12px;\n height:25px;\n display:block;\n float:left;\n background: url(\'^FileUrl(style1/nav1_off_left.jpg);\') no-repeat top left;\n}\n#main .mainNav_2 div .left {\n background: url(\'^FileUrl(style1/nav2_off_left.jpg);\') no-repeat top left;\n}\n#main .mainNav_1 div .center, #main .mainNav_2 div .center { \n height:25px;\n display:block;\n float:left;\n background: url(\'^FileUrl(style1/nav1_off_center.jpg);\') repeat-x top left;\n color:white;\n font-family:arial, verdana;\n font-size:8pt;\n}\n#main .mainNav_2 div .center {\n background: url(\'^FileUrl(style1/nav2_off_center.jpg);\') repeat-x top left;\n}\n#main .mainNav_1 div .right, #main .mainNav_2 div .right {\n width:10px;\n height:25px;\n display:block;\n float:left;\n background: url(\'^FileUrl(style1/nav1_off_right.jpg);\') no-repeat top left;\n}\n#main .mainNav_2 div .right {\n background: url(\'^FileUrl(style1/nav2_off_right.jpg);\') no-repeat top left;\n}\n#main .mainNav_1 div.navOn .left {\n background: url(\'^FileUrl(style1/nav1_on_left.jpg);\') no-repeat top left;\n}\n#main .mainNav_1 div.navOn .center {\n background: url(\'^FileUrl(style1/nav1_center_on.jpg);\') repeat-x top left;\n}\n#main .mainNav_1 div.navOn .right {\n background: url(\'^FileUrl(style1/nav1_on_right.jpg);\') no-repeat top left;\n}\n#main .mainNav_2 div.navOn .left {\n background: url(\'^FileUrl(style1/nav2_on_left.jpg);\') no-repeat top left;\n}\n#main .mainNav_2 div.navOn .center {\n background: url(\'^FileUrl(style1/nav2_center_on.jpg);\') repeat-x top left;\n}\n#main .mainNav_2 div.navOn .right {\n background: url(\'^FileUrl(style1/nav2_on_right.jpg);\') no-repeat top left;\n} \n#main .mainNav_1 div.navOn a:link, #main .mainNav_1 div.navOn a:visited, #main .mainNav_2 div.navOn a:link, #main .mainNav_2 div.navOn a:visited {\n color:black;\n}\n/* ENDOF LEVEL 1 AND 2 NAVIGATION */\n\n#main #crumbTrail {\n margin-left:177px;\n margin-bottom:0px;\n color:gray;\n font-size:8pt;\n font-weight:bold;\n}\n#main #crumbTrail a.crumbTrail:visited, #main #crumbTrail a.crumbTrail:link {\n color:silver;\n font-size:8pt; \n font-family:arial;\n text-decoration:none;\n font-weight:normal;\n}\n#main #crumbTrail a.crumbTrail:hover {\n color:gray;\n}\n\n#main #mainText\n{\n padding-left:150px;\n font-family:verdana;\n font-size:9pt;\n width:600px;\n margin-top:0px;\n}\n\n#main #gui\n{\n bottom:0px;\n left:0px;\n position:absolute;\n width:135px;\n font-size:8pt;\n color:black;\n font-family:arial;\n text-align:right;\n}\n#main #gui .loginBox {\n padding-right:12px;\n -moz-box-sizing:border-box;\n width:100px; \n float:right;\n margin-bottom:10px;\n}\n#main #gui .loginBox .loginBoxField {\n width:75px;\n}\n#main #gui .loginBox .loginBoxButton {\n background-color:#D65501;\n color:white;\n border:solid white 2px;\n margin-top:4px;\n font-variant:small-caps;\n}\n#main #gui a\n{\n color:white; \n}\n#copyright {\n color:#fff;\n position:absolute;\n top:110px;\n right:40px;\n font-family:verdana;\n font-size:8pt;\n font-weight:bold;\n background-color:#2D2D2D;\n opacity:0.4;\n -moz-opacity:0.4;\n -khtml-opacity:0.4; \n padding:2px;\n}\n* html #copyright {\n background: transparent;\n}\n','text/css',1147642492,3600,'body,html{text-align:center;margin:0px;height:100%;background-color:#494949;}#main{width:800px;background:url(\'^FileUrl(style1/main_bg.jpg);\') repeat-y;height:100%;margin-left:auto;margin-right:auto;margin-top:0px;margin-bottom:0px;position:relative;}body > #main{height:auto;min-height:100%;}#main #mainHeader{width:800px;height:133px;background:url(\'^FileUrl(style1/header.jpg);\') top left no-repeat;margin-bottom:0px;position:relative;}#main #mainHeader #title{position:absolute;top:23px;left:145px;font-size:32pt;font-family:arial;color:white;font-weight:bold;}#main #mainHeader #title a{color:white;text-decoration:none;}#main #mainContent{background:url(\'^FileUrl(style1/orange_left01.jpg);\') left top no-repeat;width:100%;height:100%;margin-top:0px;text-align:left;border:solid red 0px;}#main > #mainContent{margin-top:0px;min-height:500px;}#main > #mainContent > p{margin-top:0px;}#main #mainContent #mainText a:link{color:#FF7F23;}#main #mainContent #mainText a:visited{color:#D25900;}#main .mainNav_1,#main .mainNav_2{border-bottom:dashed #DADADA 1px;width:621px;height:25px;text-align:left;position:relative;margin-left:137px;clear:both;}#main .mainNav_1 a:link,#main .mainNav_1 a:visited,#main .mainNav_2 a:link,#main .mainNav_2 a:visited{color:white;text-decoration:none;top:5px;position:relative;-moz-box-sizing:border-box;}#main .mainNav_1 a:hover,#main .mainNav_2 a:hover{color:black;}#main .mainNav_1 div .left,#main .mainNav_2 div .left{width:12px;height:25px;display:block;float:left;background:url(\'^FileUrl(style1/nav1_off_left.jpg);\') no-repeat top left;}#main .mainNav_2 div .left{background:url(\'^FileUrl(style1/nav2_off_left.jpg);\') no-repeat top left;}#main .mainNav_1 div .center,#main .mainNav_2 div .center{height:25px;display:block;float:left;background:url(\'^FileUrl(style1/nav1_off_center.jpg);\') repeat-x top left;color:white;font-family:arial,verdana;font-size:8pt;}#main .mainNav_2 div .center{background:url(\'^FileUrl(style1/nav2_off_center.jpg);\') repeat-x top left;}#main .mainNav_1 div .right,#main .mainNav_2 div .right{width:10px;height:25px;display:block;float:left;background:url(\'^FileUrl(style1/nav1_off_right.jpg);\') no-repeat top left;}#main .mainNav_2 div .right{background:url(\'^FileUrl(style1/nav2_off_right.jpg);\') no-repeat top left;}#main .mainNav_1 div.navOn .left{background:url(\'^FileUrl(style1/nav1_on_left.jpg);\') no-repeat top left;}#main .mainNav_1 div.navOn .center{background:url(\'^FileUrl(style1/nav1_center_on.jpg);\') repeat-x top left;}#main .mainNav_1 div.navOn .right{background:url(\'^FileUrl(style1/nav1_on_right.jpg);\') no-repeat top left;}#main .mainNav_2 div.navOn .left{background:url(\'^FileUrl(style1/nav2_on_left.jpg);\') no-repeat top left;}#main .mainNav_2 div.navOn .center{background:url(\'^FileUrl(style1/nav2_center_on.jpg);\') repeat-x top left;}#main .mainNav_2 div.navOn .right{background:url(\'^FileUrl(style1/nav2_on_right.jpg);\') no-repeat top left;}#main .mainNav_1 div.navOn a:link,#main .mainNav_1 div.navOn a:visited,#main .mainNav_2 div.navOn a:link,#main .mainNav_2 div.navOn a:visited{color:black;}#main #crumbTrail{margin-left:177px;margin-bottom:0px;color:gray;font-size:8pt;font-weight:bold;}#main #crumbTrail a.crumbTrail:visited,#main #crumbTrail a.crumbTrail:link{color:silver;font-size:8pt;font-family:arial;text-decoration:none;font-weight:normal;}#main #crumbTrail a.crumbTrail:hover{color:gray;}#main #mainText{padding-left:150px;font-family:verdana;font-size:9pt;width:600px;margin-top:0px;}#main #gui{bottom:0px;left:0px;position:absolute;width:135px;font-size:8pt;color:black;font-family:arial;text-align:right;}#main #gui .loginBox{padding-right:12px;-moz-box-sizing:border-box;width:100px;float:right;margin-bottom:10px;}#main #gui .loginBox .loginBoxField{width:75px;}#main #gui .loginBox .loginBoxButton{background-color:#D65501;color:white;border:solid white 2px;margin-top:4px;font-variant:small-caps;}#main #gui a{color:white;}#copyright{color:#fff;position:absolute;top:110px;right:40px;font-family:verdana;font-size:8pt;font-weight:bold;background-color:#2D2D2D;opacity:0.4;-moz-opacity:0.4;-khtml-opacity:0.4;padding:2px;}* html #copyright{background:transparent;}',0,'WebGUI::Asset::Template::HTMLTemplate'),('7-0-style0000000000033','body, html { \n height:100%; \n}\nbody {\n background:#7c9ab0 url(\'^FileUrl(style2/main_bg.jpg);\') repeat-y right; \n margin:0px;\n}\n.rightColumn {\n width:20%;\n height:100%;\n background: #eeeeee url(\'^FileUrl(style2/rightCol_bg.jpg);\') repeat-y right; \n text-align:center; \n}\n.rightColumn #pb_wg_bg {\n background: url(\'^FileUrl(style2/pb_wg_bg.jpg);\') repeat-x;\n width:100%;\n text-align:left; \n}\n.rightColumn #pb_wg {\n background: url(\'^FileUrl(style2/pb_wg.jpg);\') left no-repeat;\n height:53px;\n}\n.leftColumn { \n width:80%; \n background: white url(\'^FileUrl(style2/context_bg.jpg);\') repeat-y right; \n} \n.leftColumn #header {\n width:100%;\n background:#7c9ab0 url(\'^FileUrl(style2/leftCol_header.jpg);\') right no-repeat; \n height:86px;\n position:relative;\n}\n.leftColumn #header #title, .leftColumn #header #title_bg {\n color:white;\n font-size:36pt;\n font-weight:bold;\n font-family:arial;\n font-variant:small-caps;\n letter-spacing:12px;\n top:15px;\n left:5px;\n position:absolute;\n z-index:10;\n}\n.leftColumn #header #title a {\n color:white;\n text-decoration:none;\n}\n.leftColumn #header #title_bg {\n color:black;\n z-index:5;\n top:17px;\n left:7px;\n}\n.leftColumn #context {\n /*background: #fff url(\'^FileUrl(style2/context_bg.jpg);\') repeat-y right; */\n width:95%;\n font-family:verdana;\n font-size:9pt;\n color:#242424;\n -moz-box-sizing:border-box; \n position:relative;\n padding-left:1%;\n padding-right:1%;\n padding-bottom:15px;\n}\n.leftColumn #context a {\n color:#7C9AB0;\n font-weight:bold;\n}\n.leftColumn #context a:hover {\n text-decoration:none;\n}\n.leftColumn #pageTitleBG {\n background: url(\'^FileUrl(style2/page_title_bg.jpg);\') repeat-x; \n width:100%;\n}\n.leftColumn #pageTitleBG #pageTitle {\n background: url(\'^FileUrl(style2/page_title.jpg);\') right no-repeat; \n width:100%;\n height:50px;\n} \n.leftColumn #pageTitleBG #pageTitle h2 {\n font-size:14pt;\n color:#696969;\n font-family:arial;\n font-weight:normal;\n margin:0px;\n padding-top:2px;\n padding-left:25px;\n letter-spacing:3px;\n}\n.rightColumn #nav {\n width:85%;\n background: #b5b5b5 url(\'^FileUrl(style2/nav_bg.jpg);\') repeat-x top; \n border-right:solid #848484 1px;\n margin-left:auto;\n margin-right:auto;\n text-align:left;\n padding-left:3px;\n padding-top:7px;\n padding-bottom:7px;\n}\n.rightColumn #nav a {\n color:white;\n font-size:8pt;\n font-weight:bold;\n text-decoration:none;\n font-family:arial;\n line-height:8pt; \n} \n.rightColumn #nav .selectedMenuItem {\n color:yellow;\n}\n#loginStyles {\n font-size:8pt;\n font-family:arial;\n padding-bottom:25px;\n}\n#loginStyles a {\n color:#89ACCF;\n font-weight:bold; \n border-bottom:solid transparent 2px;\n text-decoration:none;\n}\n#loginStyles a:hover {\n border-bottom:dotted #B2C9D9 2px;\n} \n\n.copyright {\n border-top:solid silver 3px;\n background-color:gray;\n font-family:arial;\n font-size:9pt;\n color:silver; \n text-align:center;\n}\n','text/css',1147642500,3600,'body,html{height:100%;}body{background:#7c9ab0 url(\'^FileUrl(style2/main_bg.jpg);\') repeat-y right;margin:0px;}.rightColumn{width:20%;height:100%;background:#eeeeee url(\'^FileUrl(style2/rightCol_bg.jpg);\') repeat-y right;text-align:center;}.rightColumn #pb_wg_bg{background:url(\'^FileUrl(style2/pb_wg_bg.jpg);\') repeat-x;width:100%;text-align:left;}.rightColumn #pb_wg{background:url(\'^FileUrl(style2/pb_wg.jpg);\') left no-repeat;height:53px;}.leftColumn{width:80%;background:white url(\'^FileUrl(style2/context_bg.jpg);\') repeat-y right;}.leftColumn #header{width:100%;background:#7c9ab0 url(\'^FileUrl(style2/leftCol_header.jpg);\') right no-repeat;height:86px;position:relative;}.leftColumn #header #title,.leftColumn #header #title_bg{color:white;font-size:36pt;font-weight:bold;font-family:arial;font-variant:small-caps;letter-spacing:12px;top:15px;left:5px;position:absolute;z-index:10;}.leftColumn #header #title a{color:white;text-decoration:none;}.leftColumn #header #title_bg{color:black;z-index:5;top:17px;left:7px;}.leftColumn #context{width:95%;font-family:verdana;font-size:9pt;color:#242424;-moz-box-sizing:border-box;position:relative;padding-left:1%;padding-right:1%;padding-bottom:15px;}.leftColumn #context a{color:#7C9AB0;font-weight:bold;}.leftColumn #context a:hover{text-decoration:none;}.leftColumn #pageTitleBG{background:url(\'^FileUrl(style2/page_title_bg.jpg);\') repeat-x;width:100%;}.leftColumn #pageTitleBG #pageTitle{background:url(\'^FileUrl(style2/page_title.jpg);\') right no-repeat;width:100%;height:50px;}.leftColumn #pageTitleBG #pageTitle h2{font-size:14pt;color:#696969;font-family:arial;font-weight:normal;margin:0px;padding-top:2px;padding-left:25px;letter-spacing:3px;}.rightColumn #nav{width:85%;background:#b5b5b5 url(\'^FileUrl(style2/nav_bg.jpg);\') repeat-x top;border-right:solid #848484 1px;margin-left:auto;margin-right:auto;text-align:left;padding-left:3px;padding-top:7px;padding-bottom:7px;}.rightColumn #nav a{color:white;font-size:8pt;font-weight:bold;text-decoration:none;font-family:arial;line-height:8pt;}.rightColumn #nav .selectedMenuItem{color:yellow;}#loginStyles{font-size:8pt;font-family:arial;padding-bottom:25px;}#loginStyles a{color:#89ACCF;font-weight:bold;border-bottom:solid transparent 2px;text-decoration:none;}#loginStyles a:hover{border-bottom:dotted #B2C9D9 2px;}.copyright{border-top:solid silver 3px;background-color:gray;font-family:arial;font-size:9pt;color:silver;text-align:center;}',0,NULL),('4e-_rNs6mSWedZhQ_V5kJA','.wgShelf .product {\r\n margin:15px;\r\n margin-left:0px; \r\n float:left;\r\n text-align:left;\r\n background-color:#f1f1f1;\r\n border:solid #e1e1e1 1px;\r\n min-height:100px;\r\n min-width:200px;\r\n width:200px;\r\n height:100px;\r\n}\r\n.wgShelf .product .link {\r\n background: url(^FileUrl(root/import/shelf2/images/shelf-titles.jpg);) no-repeat top right;\r\n height:30px;\r\n padding:3px;\r\n line-height:24px;\r\n margin-bottom:5px; \r\n text-align:left;\r\n display:block; \r\n}','text/css',1210779672,0,'.wgShelf .product{margin:15px;margin-left:0px;float:left;text-align:left;background-color:#f1f1f1;border:solid #e1e1e1 1px;min-height:100px;min-width:200px;width:200px;height:100px;}.wgShelf .product .link{background:url(^FileUrl(root/import/shelf2/images/shelf-titles.jpg);) no-repeat top right;height:30px;padding:3px;line-height:24px;margin-bottom:5px;text-align:left;display:block;}',0,NULL),('usuxw9V3jN4d4pujRiEYxg','#contentArea {\r\n height:500px;\r\n padding-bottom:300px;\r\n}','text/css',1209494150,1,'#contentArea{height:500px;padding-bottom:300px;}',0,NULL),('5m5I7__l40C4hhv4ydqAHQ','#thingyList .things {\r\n padding:0px;\r\n margin:0px;\r\n width:200px;\r\n z-index:5000;\r\n position:absolute;\r\n top:27px;\r\n left:20px;\r\n border:solid #a2a2a2 1px;\r\n border-top-style:none;\r\n}\r\n\r\n#thingyList .things a:link,\r\n#thingyList .things a:visited {\r\n display:block;\r\n background-color:#f1f1f1;\r\n border-top:solid #a2a2a2 1px; \r\n border-bottom:solid #727272 1px;\r\n line-height:12px;\r\n font-size:10px;\r\n height:12px;\r\n padding:2px 5px;\r\n text-decoration:none;\r\n font-weight:bold;\r\n color:#a2a2a2;\r\n width:190px;\r\n}\r\n#thingyList .things a:hover {\r\n background-color:white;\r\n}','text/css',1216227786,3600,'#thingyList .things{padding:0px;margin:0px;width:200px;z-index:5000;position:absolute;top:27px;left:20px;border:solid #a2a2a2 1px;border-top-style:none;}#thingyList .things a:link,#thingyList .things a:visited{display:block;background-color:#f1f1f1;border-top:solid #a2a2a2 1px;border-bottom:solid #727272 1px;line-height:12px;font-size:10px;height:12px;padding:2px 5px;text-decoration:none;font-weight:bold;color:#a2a2a2;width:190px;}#thingyList .things a:hover{background-color:white;}',0,NULL),('1XOJDcg_ITRYwVM-QnIcPw',' .wgShelf {\r\n font-size:12px;\r\n font-family:arial, verdana; \r\n margin:15px 0px;\r\n }\r\n .wgShelf h2 {\r\n background: black;\r\n padding:5px;\r\n padding-left:15px;\r\n line-height:32px;\r\n color:white;\r\n margin:0px;\r\n height:32px;\r\n }\r\n .wgShelf .wgShelves {\r\n background: #F1F1F1;\r\n height:29px;\r\n padding:3px;\r\n line-height:29px;\r\n padding-left:30px;\r\n }\r\n .wgShelf .product {\r\n margin:15px;\r\n margin-left:0px; \r\n text-align:left;\r\n background-color:#f1f1f1;\r\n border:solid #e1e1e1 1px;\r\n width: 200px;\r\n display: -moz-inline-box; /* Moz */\r\n display: inline-block; /* Op, Saf, IE \\*/\r\n vertical-align: top; /* IE Mac non capisce e a volte crea extra v space */\r\n }\r\n .wgShelf .product .thumbnail {\r\n display:block;\r\n text-align:left;\r\n margin:3px;\r\n float:left;\r\n }\r\n .wgShelf .product .link {\r\n background: #e1e1e1;\r\n height:30px;\r\n padding:3px;\r\n line-height:24px;\r\n margin-bottom:5px; \r\n text-align:left;\r\n display:block;\r\n }\r\n .wgShelf .product .link a:link,\r\n .wgShelf .product .link a:visited {\r\n color:#000; \r\n display:block;\r\n }\r\n .wgShelf .product .link a:hover {\r\n text-decoration:underline;\r\n }\r\n .wgShelf .product .price {\r\n display:block;\r\n text-align:right;\r\n font-size:18px;\r\n font-weight:bold;\r\n }','text/css',1219175575,0,'.wgShelf{font-size:12px;font-family:arial,verdana;margin:15px 0px;}.wgShelf h2{background:black;padding:5px;padding-left:15px;line-height:32px;color:white;margin:0px;height:32px;}.wgShelf .wgShelves{background:#F1F1F1;height:29px;padding:3px;line-height:29px;padding-left:30px;}.wgShelf .product{margin:15px;margin-left:0px;text-align:left;background-color:#f1f1f1;border:solid #e1e1e1 1px;width:200px;display:-moz-inline-box;display:inline-block;/*\\*/\n vertical-align:top; /**/}.wgShelf .product .thumbnail{display:block;text-align:left;margin:3px;float:left;}.wgShelf .product .link{background:#e1e1e1;height:30px;padding:3px;line-height:24px;margin-bottom:5px;text-align:left;display:block;}.wgShelf .product .link a:link,.wgShelf .product .link a:visited{color:#000;display:block;}.wgShelf .product .link a:hover{text-decoration:underline;}.wgShelf .product .price{display:block;text-align:right;font-size:18px;font-weight:bold;}',0,NULL),('7-0-style0000000000051','body, html {\r\n margin:0px;\r\n background-color:#b53018;\r\n padding:0px;\r\n}\r\nbody a {\r\n color:#EE963E;font-weight:bold;\r\n letter-spacing:1px;\r\n font-size:8pt;\r\n}\r\n#main {\r\n width:98%;\r\n /*min-width:790px;*/\r\n margin:0px;\r\n padding:0px;\r\n padding-top:20px;\r\n padding-bottom:20px;\r\n position:relative;\r\n}\r\n#header { \r\n background: url(\'^FileUrl(style3/header_bg.jpg);\') repeat-x;\r\n width:100%;\r\n margin:0px;\r\n height:115px;\r\n}\r\n#headerTitle {\r\n background: url(\'^FileUrl(style3/header_left.jpg);\') no-repeat left top;\r\n height:100%;\r\n width:100%;\r\n}\r\n#headerRight {\r\n background: url(\'^FileUrl(style3/header_right.jpg);\') no-repeat right top;\r\n width:100%;\r\n height:100%;\r\n text-align:right;\r\n position:relative;\r\n}\r\n#headerRight #title {\r\n position:absolute;\r\n top:25px;\r\n left:20px;\r\n font-family:arial;\r\n text-align:left;\r\n}\r\n#title h1 {\r\n text-transform:uppercase;\r\n margin-bottom:0px;\r\n font-weight:normal;\r\n font-size:26pt;\r\n margin-top:0px;\r\n color:white;\r\n}\r\n#title h1 a {\r\n color:white;\r\n text-decoration:none; font-size: 26pt; font-weight: normal; \r\n}\r\n#title h2 {\r\n margin:0px;\r\n font-size:12pt;\r\n color:#bebebe;\r\n padding-left:20px;\r\n}\r\n#title img {\r\n z-index:5;\r\n}\r\n#login {\r\n position:absolute;\r\n font-size:8pt;\r\n top:45%;\r\n right:150px;\r\n color:white;\r\n z-index:6;\r\n font-family:arial;\r\n}\r\n#login a {\r\n color:white; font-weight: normal; letter-spacing: 0px;\r\n}\r\n.loginBox {\r\n font-size:8pt;\r\n margin:0px;\r\n display:inline;\r\n}\r\n.loginBox input {\r\n font-size:8pt;\r\n}\r\n\r\n#mainBody {\r\n width:100%;\r\n margin:0px;\r\n height:500px;\r\n background: #fff;\r\n position:relative;\r\n z-index:0;\r\n}\r\n#main > #mainBody {\r\n height:auto;\r\n min-height:500px;\r\n}\r\n#contentArea {\r\n z-index:2;\r\n position:relative;\r\n padding-top:10px;\r\n padding-left:10px;\r\n padding-right:20px;\r\n padding-bottom:20px;\r\n -moz-box-sizing:border-box;\r\n font-family:verdana;\r\n font-size:9pt;\r\n min-height:500px;\r\n}\r\nhtml #main #mainBody #contentArea {\r\n height:1%;\r\n}\r\n#topCorner {\r\n width:100%;\r\n height:214px;\r\n position:absolute;\r\n top:0px;\r\n left:0px;\r\n background: url(^FileUrl(/style3/main_top.jpg);) no-repeat;\r\n z-index:1;\r\n}\r\n#bottomCorner {\r\n width:100%;\r\n height:211px;\r\n position:absolute;\r\n bottom:59px;\r\n right:0px;\r\n background: url(\'^FileUrl(style3/main_bottom.jpg);\') no-repeat right;\r\n z-index:1;\r\n}\r\n* html #bottomCorner {\r\n bottom:58px;\r\n}\r\n\r\n#footer {\r\n width:100%;\r\n margin:0px;\r\n background:#000 url(\'^FileUrl(style3/footer_right.jpg);\') no-repeat right top;\r\n height:57px;\r\n border-top:solid #B53018 2px;\r\n text-align:right;\r\n position:relative;\r\n z-index:0;\r\n}\r\n#footer #copyright {\r\n color:#3b3b3b;\r\n font-family:arial;\r\n position:absolute;\r\n top:20px;\r\n left:30px;\r\n font-size:8pt;\r\n}\r\n#main .yui-skin-sam {\r\n font-family:verdana;\r\n font-size:9pt;\r\n font-weight:normal;\r\n}','text/css',1224117026,3600,'body,html{margin:0px;background-color:#b53018;padding:0px;}body a{color:#EE963E;font-weight:bold;letter-spacing:1px;font-size:8pt;}#main{width:98%;margin:0px;padding:0px;padding-top:20px;padding-bottom:20px;position:relative;}#header{background:url(\'^FileUrl(style3/header_bg.jpg);\') repeat-x;width:100%;margin:0px;height:115px;}#headerTitle{background:url(\'^FileUrl(style3/header_left.jpg);\') no-repeat left top;height:100%;width:100%;}#headerRight{background:url(\'^FileUrl(style3/header_right.jpg);\') no-repeat right top;width:100%;height:100%;text-align:right;position:relative;}#headerRight #title{position:absolute;top:25px;left:20px;font-family:arial;text-align:left;}#title h1{text-transform:uppercase;margin-bottom:0px;font-weight:normal;font-size:26pt;margin-top:0px;color:white;}#title h1 a{color:white;text-decoration:none;font-size:26pt;font-weight:normal;}#title h2{margin:0px;font-size:12pt;color:#bebebe;padding-left:20px;}#title img{z-index:5;}#login{position:absolute;font-size:8pt;top:45%;right:150px;color:white;z-index:6;font-family:arial;}#login a{color:white;font-weight:normal;letter-spacing:0px;}.loginBox{font-size:8pt;margin:0px;display:inline;}.loginBox input{font-size:8pt;}#mainBody{width:100%;margin:0px;height:500px;background:#fff;position:relative;z-index:0;}#main > #mainBody{height:auto;min-height:500px;}#contentArea{z-index:2;position:relative;padding-top:10px;padding-left:10px;padding-right:20px;padding-bottom:20px;-moz-box-sizing:border-box;font-family:verdana;font-size:9pt;min-height:500px;}html #main #mainBody #contentArea{height:1%;}#topCorner{width:100%;height:214px;position:absolute;top:0px;left:0px;background:url(^FileUrl(/style3/main_top.jpg);) no-repeat;z-index:1;}#bottomCorner{width:100%;height:211px;position:absolute;bottom:59px;right:0px;background:url(\'^FileUrl(style3/main_bottom.jpg);\') no-repeat right;z-index:1;}* html #bottomCorner{bottom:58px;}#footer{width:100%;margin:0px;background:#000 url(\'^FileUrl(style3/footer_right.jpg);\') no-repeat right top;height:57px;border-top:solid #B53018 2px;text-align:right;position:relative;z-index:0;}#footer #copyright{color:#3b3b3b;font-family:arial;position:absolute;top:20px;left:30px;font-size:8pt;}#main .yui-skin-sam{font-family:verdana;font-size:9pt;font-weight:normal;}',0,NULL),('FEDP3dk8J3Chw_gyr7_XEQ','/*/Horizontal Menu styles/*/\r\n.horizontalMenu ul.menu {\r\n padding: 0;\r\n margin: 0 0 1em;\r\n list-style: none;\r\n width: 100%; /*/clear floated li elements/*/\r\n overflow: auto; /*/clear floated li elements/*/\r\n}\r\n.horizontalMenu ul.menu li {\r\n float: left;\r\n}\r\n.horizontalMenu ul.menu li a {\r\n float: left;\r\n padding: 4px 8px;\r\n margin-right: 1px;\r\n background: #ddd;\r\n color: #000;\r\n text-decoration: none;\r\n}\r\n.horizontalMenu ul.menu li.current a {\r\n background:#eee;\r\n}\r\n.horizontalMenu ul.menu li a:hover {\r\n background:#fff;\r\n}\r\n\r\n/*/Tabs (tabbed navigation) styles/*/\r\n.tabsMenu ul.menu {\r\n margin: 0 0 1em;\r\n}\r\n.tabsMenu ul.menu li {\r\n display: inline;\r\n}\r\n.tabsMenu ul.menu li a {\r\n border: 1px solid #999;\r\n border-bottom: 0;\r\n padding: 5px 10px 2px;\r\n color: #777;\r\n text-decoration:none;\r\n}\r\n.tabsMenu ul.menu li.current a,\r\n.tabsMenu ul.menu li a:hover {\r\n border: 1px solid #000;\r\n border-bottom: 0;\r\n color: #000;\r\n}\r\n\r\n/*/Indent Nav styles/*/\r\n.indentMenu a.level0 {\r\n margin-left:0px;\r\n display:block;\r\n}\r\n.indentMenu a.level1 {\r\n margin-left:15px;\r\n display:block; \r\n}\r\n.indentMenu a.level2 {\r\n margin-left:30px;\r\n display:block;\r\n}\r\n.indentMenu a.level3 {\r\n margin-left:45px;\r\n display:block;\r\n}\r\n.indentMenu a.level4 {\r\n margin-left:60px;\r\n display:block;\r\n}','text/css',1246278679,3600,'.horizontalMenu ul.menu{padding:0;margin:0 0 1em;list-style:none;width:100%;overflow:auto;}.horizontalMenu ul.menu li{float:left;}.horizontalMenu ul.menu li a{float:left;padding:4px 8px;margin-right:1px;background:#ddd;color:#000;text-decoration:none;}.horizontalMenu ul.menu li.current a{background:#eee;}.horizontalMenu ul.menu li a:hover{background:#fff;}.tabsMenu ul.menu{margin:0 0 1em;}.tabsMenu ul.menu li{display:inline;}.tabsMenu ul.menu li a{border:1px solid #999;border-bottom:0;padding:5px 10px 2px;color:#777;text-decoration:none;}.tabsMenu ul.menu li.current a,.tabsMenu ul.menu li a:hover{border:1px solid #000;border-bottom:0;color:#000;}.indentMenu a.level0{margin-left:0px;display:block;}.indentMenu a.level1{margin-left:15px;display:block;}.indentMenu a.level2{margin-left:30px;display:block;}.indentMenu a.level3{margin-left:45px;display:block;}.indentMenu a.level4{margin-left:60px;display:block;}',0,NULL),('i5kt5aodVs_oepNEkE7Okw','/*/styles for the poll asset/*/\r\n.pollColor {\r\nbackground-color:#808080;\r\n}\r\n.pollOptions, .pollSubmit {\r\nborder:0;\r\nmargin:0;\r\npadding:0;\r\n}','text/css',1242312883,3600,'.pollColor{background-color:#808080;}.pollOptions,.pollSubmit{border:0;margin:0;padding:0;}',0,NULL),('uCn31PzislTZlgt_79j7cQ','/*/ fail safe /*/\r\n#topWrapper {\r\nfont:82.5%/1.3 helvetica,arial,sans-serif;\r\nwidth:98%;\r\noverflow:hidden;\r\nmargin:0 auto 2em;\r\n}\r\n.nav {\r\nfloat:left;\r\nwidth:20%;\r\nmargin:1em 0 2em;\r\n}\r\n.nav .menu {\r\nlist-style:none;\r\nmargin:0;\r\npadding:0;\r\n}\r\n#contentArea {\r\nfloat:right;\r\nwidth:77%;\r\nmargin:1em 0 2em;\r\npadding:5px 1%;\r\nborder:1px solid #ccc;\r\n}\r\n#adminControls {\r\nmargin:1em 0;\r\npadding:1em 0 0;\r\nborder-top:1px dotted #ccc;\r\n}\r\n\r\n','text/css',1258524916,0,'#topWrapper{font:82.5%/1.3 helvetica,arial,sans-serif;width:98%;overflow:hidden;margin:0 auto 2em;}.nav{float:left;width:20%;margin:1em 0 2em;}.nav .menu{list-style:none;margin:0;padding:0;}#contentArea{float:right;width:77%;margin:1em 0 2em;padding:5px 1%;border:1px solid #ccc;}#adminControls{margin:1em 0;padding:1em 0 0;border-top:1px dotted #ccc;}',0,NULL),('iCM9pRY5yYyjufROgaCDlg','.editStory { width: 100%;\r\n}\r\n\r\n.editStory legend {\r\n font-size: 1.8em;\r\n border-bottom: 2px solid;\r\n}\r\n\r\n.editStory tbody {\r\n width: 943px;\r\n}\r\n\r\n.editStory td {\r\n padding: 5px;\r\n}\r\n\r\n.editStory .story {\r\n float:left;\r\n}\r\n\r\n.editStory .story label, .editStory .photo label {\r\n display: block;\r\n width: 100%;\r\n text-align: right;}\r\n\r\n.editStory .photoContainer {\r\n border: 1px solid;\r\n float:left;\r\n margin: 10px 0 0 20px;\r\n}\r\n\r\n.editStory .photoContainer .photoHeader {\r\n font-size: 1.2em;\r\n font-weight: bold;\r\n}\r\n\r\n.editStory .buttons {\r\n clear: both;\r\n text-align: right;\r\n padding: 10px 0;\r\n}\r\n\r\n.editStory #story_formId_tbl {\r\n width: 100% !important;\r\n}\r\n\r\n.editStory fieldset {\r\n border: none;\r\n}\r\n\r\n\r\n\r\n.storyArchive { width: 100%;\r\n}\r\n\r\n.storyArchive h3 {\r\n border-bottom: 2px solid;\r\n margin-bottom: 10px;\r\n}\r\n\r\n.storyArchive .storyList {\r\n list-style-type: none;\r\n padding-left: 0;\r\n}\r\n\r\n.storyArchive .storyList li {\r\n padding-left: 10px;\r\n margin-bottom: 10px;\r\n}\r\n\r\n.storyArchive .pagination { \r\n float: left;\r\n list-style-type: none;\r\n}\r\n\r\n.storyArchive .keywords {\r\n width: 100%;\r\n clear: both;\r\n}\r\n\r\n.storyArchive img {\r\n border: none;\r\n}\r\n\r\n.storyArchive .controls a {\r\n margin-right: 10px;\r\n}\r\n\r\n.viewStory .storyTitle, .viewStory .storyUpdated, .viewStoryTopic .storyTitle, .viewStoryTopic .storyUpdated {\r\n float: left;\r\n}\r\n\r\n.viewStory .storyTitle, .viewStoryTopic .storyTitle {\r\n font-size: 1.5em;\r\n width: 100%;\r\n}\r\n\r\n.viewStory .storyHighlights, .viewStoryTopic .storyHighlights {\r\n float:right;\r\n margin-top: -1.5em;\r\n}\r\n\r\n.viewStory .storyPhoto, .viewStoryTopic .storyPhoto {\r\n float: left;\r\n margin: 0 10px 10px 0;\r\n}\r\n\r\n.viewStory .photoCaption, .viewStoryTopic .photoCaption {\r\n width: 496px;\r\n padding: 5px;\r\n display:block;\r\n}\r\n.viewStory .clear, .viewStoryTopic .clear {\r\n clear: both;\r\n}\r\n.storyTopic {\r\n width: 100%;\r\n}\r\n\r\n.storyTopic h3{ border-bottom: 2px solid;\r\n}\r\n.storyTopic .topStory {\r\n width: 340px;\r\n float: left;\r\n}\r\n\r\n.storyTopic .storyList {\r\n width: 250px;\r\n float: left;\r\n}\r\n\r\n.storyTopic .storyListBig {\r\n width: 100%;\r\n float: left;\r\n}\r\n\r\n#htmltagcloud, .wg-clear {\r\n clear:both;\r\n}\r\n','text/css',1253305659,3600,'.editStory{width:100%;}.editStory legend{font-size:1.8em;border-bottom:2px solid;}.editStory tbody{width:943px;}.editStory td{padding:5px;}.editStory .story{float:left;}.editStory .story label,.editStory .photo label{display:block;width:100%;text-align:right;}.editStory .photoContainer{border:1px solid;float:left;margin:10px 0 0 20px;}.editStory .photoContainer .photoHeader{font-size:1.2em;font-weight:bold;}.editStory .buttons{clear:both;text-align:right;padding:10px 0;}.editStory #story_formId_tbl{width:100% !important;}.editStory fieldset{border:none;}.storyArchive{width:100%;}.storyArchive h3{border-bottom:2px solid;margin-bottom:10px;}.storyArchive .storyList{list-style-type:none;padding-left:0;}.storyArchive .storyList li{padding-left:10px;margin-bottom:10px;}.storyArchive .pagination{float:left;list-style-type:none;}.storyArchive .keywords{width:100%;clear:both;}.storyArchive img{border:none;}.storyArchive .controls a{margin-right:10px;}.viewStory .storyTitle,.viewStory .storyUpdated,.viewStoryTopic .storyTitle,.viewStoryTopic .storyUpdated{float:left;}.viewStory .storyTitle,.viewStoryTopic .storyTitle{font-size:1.5em;width:100%;}.viewStory .storyHighlights,.viewStoryTopic .storyHighlights{float:right;margin-top:-1.5em;}.viewStory .storyPhoto,.viewStoryTopic .storyPhoto{float:left;margin:0 10px 10px 0;}.viewStory .photoCaption,.viewStoryTopic .photoCaption{width:496px;padding:5px;display:block;}.viewStory .clear,.viewStoryTopic .clear{clear:both;}.storyTopic{width:100%;}.storyTopic h3{border-bottom:2px solid;}.storyTopic .topStory{width:340px;float:left;}.storyTopic .storyList{width:250px;float:left;}.storyTopic .storyListBig{width:100%;float:left;}#htmltagcloud,.wg-clear{clear:both;}',0,NULL),('VyCINX2KixKYr2pzQGX9Mg','/*/ styles for the layout asset /*/\r\n.wg-left {\r\n float: left;\r\n}\r\n.wg-right {\r\n float: right;\r\n}\r\n.wg-clear {\r\n clear: both;\r\n}\r\n.sidebyside .wg-content-position, .oneovertwo .wg-content-position {\r\n width: 49%;\r\n}\r\n.oneovertwo .wg-top {\r\n width: 100%;\r\n}\r\n.oneoverthree .wg-first-column, .oneoverthree .wg-second-column, .oneoverthree .wg-third-column,\r\n.threeColumns .wg-first-column, .threeColumns .wg-second-column, .threeColumns .wg-third-column {\r\n width: 32%;\r\n}\r\n.oneoverthree .wg-first-column,\r\n.threeColumns .wg-first-column {\r\n margin-right:2%;\r\n}\r\n.rightcolumn .wg-first-column {\r\n width: 65%;\r\n}\r\n.rightcolumn .wg-second-column {\r\n width: 33%;\r\n}\r\n','text/css',1254881103,0,'.wg-left{float:left;}.wg-right{float:right;}.wg-clear{clear:both;}.sidebyside .wg-content-position,.oneovertwo .wg-content-position{width:49%;}.oneovertwo .wg-top{width:100%;}.oneoverthree .wg-first-column,.oneoverthree .wg-second-column,.oneoverthree .wg-third-column,.threeColumns .wg-first-column,.threeColumns .wg-second-column,.threeColumns .wg-third-column{width:32%;}.oneoverthree .wg-first-column,.threeColumns .wg-first-column{margin-right:2%;}.rightcolumn .wg-first-column{width:65%;}.rightcolumn .wg-second-column{width:33%;}',0,NULL),('zb_OPKNqcTuIjdvvbEkRjw','/*/ styles for the article asset /*/\r\n.withImage .articleContent, .linkedImage .articleContent {\r\n width:100%;\r\n overflow:hidden;\r\n}\r\n.withImage .articleImage, .linkedImage .articleImage {\r\n float:right;\r\n margin:0 0 10px 10px;\r\n}\r\n.linkedImage .caption {\r\n display:block;\r\n}\r\n','text/css',1256092368,0,'.withImage .articleContent,.linkedImage .articleContent{width:100%;overflow:hidden;}.withImage .articleImage,.linkedImage .articleImage{float:right;margin:0 0 10px 10px;}.linkedImage .caption{display:block;}',0,NULL),('pbrobot000000000000001','User-agent: *\nDisallow: *?op=auth\nDisallow: *?op=account\nDisallow: *?op=ajaxGetI18N\nDisallow: *?op=makePrintable\nDisallow: *?op=viewHelp\nDisallow: *?op=viewHelpIndex\n\n','text/plain',1256092369,3600,'User-agent: *\nDisallow: *?op=auth\nDisallow: *?op=account\nDisallow: *?op=ajaxGetI18N\nDisallow: *?op=makePrintable\nDisallow: *?op=viewHelp\nDisallow: *?op=viewHelpIndex\n\n',0,NULL),('H_-8zjtWsO1FUpQqNtkxNQ','/*/ In this stylesheet you can find the styles that are used\r\nin more than one template. For example: file/attachment icons,\r\npagination etc. /*/\r\n/*/ Elements that are styled with this stylesheet have a\r\nclassname that starts with \"wg-\". /*/\r\n\r\n/*/ general /*/\r\n.wg-icon {\r\nborder:0px none;\r\nvertical-align: middle;\r\n}\r\n.wg-clear {\r\nclear:both;\r\n}\r\n/*/ inline list (pagination) /*/\r\n.wg-inline {\r\nmargin:0 0 1em;\r\npadding:0;\r\n}\r\n.wg-inline li {\r\ndisplay:inline;\r\nmargin:0;\r\npadding:0;\r\n}\r\n.wg-inline li.active {\r\nfont-weight:bold;\r\n}\r\n/*/ forms /*/\r\n.wg-captchaImage {\r\nborder:0 none;\r\nvertical-align:middle;\r\nmargin-left:5px;\r\n}\r\n\r\n','text/css',1258524916,0,'.wg-icon{border:0px none;vertical-align:middle;}.wg-clear{clear:both;}.wg-inline{margin:0 0 1em;padding:0;}.wg-inline li{display:inline;margin:0;padding:0;}.wg-inline li.active{font-weight:bold;}.wg-captchaImage{border:0 none;vertical-align:middle;margin-left:5px;}',0,NULL),('JOuCU4x5BJfVHfkfMkVQdQ','/*\r\n Project: CrystalX\r\n URL: http://www.nuvio.cz\r\n \r\n Output device: screen, projection\r\n \r\n Author: Vit Dlouhy (vit.dlouhy@nuvio.cz); Nuvio (www.nuvio.cz)\r\n Last revision: 2006-12-05, 12:00 GMT+1\r\n\r\n Structure:\r\n display | position | float | overflow | width | height | border | margin | padding | background | align | font\r\n*/\r\n\r\n* {min-height:1px;}\r\nbody {border:0; margin:0; padding:0; background:#F2F5FE url(\'^FileUrl(/crystalx/img/bg.gif);\') 0 0 repeat-x; font:70%/160% \"verdana\",sans-serif; color:#192666; text-align:center;}\r\n\r\na {color:#192666;}\r\na:hover {color:#4F6AD7;}\r\n\r\np {border:0; margin:15px 0; padding:0;}\r\n\r\ndiv {display:block; border:0; margin:0; padding:0; overflow:hidden;}\r\n\r\nh1, h2, h3, h4, h5 {border:0; margin:15px 0 10px 0; padding:0; font-weight:bold;}\r\nh1 {font-size:260%; line-height:100%; font-family:\"georgia\",serif; font-weight:normal;}\r\nh2 {font-size:180%; line-height:100%; font-family:\"georgia\",serif; font-weight:normal;}\r\nh3 {font-size:120%; line-height:100%; font-weight:bold;}\r\nh4 {font-size:120%;}\r\nh5 {font-size:100%;}\r\n\r\ntable {display:table; border-collapse:collapse; margin:15px 1px; padding:0; border:1px solid #B7CAF6; font-size:100%;}\r\ntr {display:table-row;}\r\nth, td {display: table-cell; border:1px solid #B7CAF6; margin:0; padding:5px; vertical-align:top; text-align:left;}\r\nth {background:#E7ECFD; text-align:center; color:#192666; font-weight:bold;}\r\n\r\nul, ol {display:block; border:0; margin:15px 0 15px 40px; padding:0;}\r\nol {list-style-type:decimal;}\r\nli {display:list-item; border:0; margin:0; padding:0; min-height:1px;}\r\nul ul, ul ol, ol ol, ol ul {margin: 0 0 0 20px;}\r\n\r\ndl {border-bottom:1px solid #E0E8FA; margin:0; padding:5px 10px; background:#CEDBF9;}\r\ndt {border:0; margin:0; padding:0; font-weight:bold;}\r\ndd {border:0; margin:0 0 0 30px; padding:0;}\r\n\r\nform {border:0; margin:0; padding:0;}\r\nfieldset {border:1px solid #ccc; margin:15px 0; padding:10px;}\r\nlegend {margin-left:10px; font-size:100%; font-weight:bold; color:#008;}\r\n\r\nhr {height:1px; width:724px; margin: 5px 23px; padding: 0; background:#CCC; border:0 solid #CCC; color:#CCC;}\r\n\r\na, img, span {border:0; margin:0; padding:0; overflow:hidden;}\r\nabbr, acronym {border-bottom:1px dotted #CCC; cursor:help;}\r\n\r\ndel, .through {text-decoration:line-through;}\r\nstrong, .strong {font-weight:bold;}\r\ncite, em, q, var {font-style:italic;}\r\ncode, kbd, samp {font-family:monospace; font-size:110%;}\r\n\r\n.box {min-height:1px;}\r\n.box:after {content:\".\"; display:block; line-height:0px; font-size:0px; visibility:hidden; clear:both;}\r\n\r\n.nom {margin:0;}\r\n.noscreen {display:none;}\r\n\r\n/* -----------------...........--------------------------------------------------------------------------------------- */\r\n\r\n#main {width:770px; margin:0 auto; text-align:left;}\r\n\r\n/* Top (empty space for the background img to fit) */\r\n#main #topspace {position:relative; top:0; left:0; height:50px; margin:0; padding:0;}\r\n\r\n/* Header */\r\n#header {position:relative; width:770px; height:100px; margin:0; padding:0; background:#233C9B url(\'^FileUrl(/crystalx/img/header.jpg);\') 0 0 no-repeat; color:#FFFFFF;}\r\n\r\n /* Header - logo */\r\n #header #logo {position:absolute; top:35px; left:35px; margin:0;}\r\n #header #logo a {font-size:260%; line-height:100%; font-family:\"georgia\",serif; font-weight:bold; color:#FFF;}\r\n #header #logo a:hover {color:#B5C4E3; text-decoration:none;}\r\n\r\n /* Header - Search */\r\n #header #search form {position:absolute; top:35px; right:20px; height:30px;}\r\n #header #search .formContents {position:absolute; top:0; right:0px; width:200px; height:28px; margin:0; padding:0; border:0; background:url(\'^FileUrl(/crystalx/img/search.png);\') 0 0 no-repeat; font:bold 90%/100% \"verdana\",sans-serif; color:#192666;}\r\n #header #search input#keywords_formId {width:140px; margin:5px 8px; padding:3px 0; border:0; background:#FFF; font:bold 100%/100% \"verdana\",sans-serif; color:#192666;}\r\n #header #search #search_form {position:absolute; top:0; right:0px; width:41px; height:28px; cursor:point; margin:0; padding:0;}\r\n\r\n /* Search Result*/\r\n #header #search #search_result {position:absolute; top:220px;}\r\n #header #search #home_link, #header #search #no_result, #header #search #pagination {visibility:hidden;}\r\n #page #page-in #pagination {color:#6182D1; font-weight:bold; padding:5px; text-align:right;}\r\n #page #page-in #pagination a {color:#6182D1;}\r\n #page #page-in #pagination a:hover {color:#192666;}\r\n #page #page-in #home_link {padding:5px 5px 15px; color:#6182D1; font-weight:bold; text-align:right;}\r\n #page #page-in #home_link a {color:#6182D1;}\r\n #page #page-in #home_link a:hover {color:#192666;}\r\n #search_result {margin:10px 0;}\r\n dl#odd {background:#A0B9F3;}\r\n #page #page-in #no_result {margin:0 10px; color:#192666; font-weight:bold;}\r\n\r\n/* Main menu (tabs) */\r\n#menu {background:#192666; margin:0 5px; padding:10px 10px 0; height:32px; overflow:hidden;}\r\n#menu a {cursor:pointer; font-size:11px;}\r\n\r\n/* Page (dynamic) */\r\n#page {width:770px; background:#FFFFFF url(\'^FileUrl(/crystalx/img/bg_page.jpg);\') 0 0 repeat-y;}\r\n#page-in {min-height:400px; background:url(\'^FileUrl(/crystalx/img/bg_page_in.jpg);\') 0 0 no-repeat; padding:10px 0 0;}\r\n\r\n/* Strip */\r\n#strip {position:relative; clear:both; padding:3px 20px 10px 20px; color:#6182D1;}\r\n\r\n /* Strip - Location */\r\n #strip #location {float: left; background:url(\'^FileUrl(/crystalx/img/ico_comments.gif);\') 0 50% no-repeat; padding: 0 15px;}\r\n #strip #location a {color:#6182D1;}\r\n #strip #location a:hover {color:#192666;}\r\n #strip #location a#currentpage {font-weight:bold; text-decoration:none;}\r\n\r\n /* Strip - DateTime */\r\n #strip #datetime {float:right; background:url(\'^FileUrl(/crystalx/img/ico_date.gif);\') 0 50% no-repeat; padding: 0 10px 0 15px;}\r\n\r\n/* Content Container */\r\n#contentContainer {margin:0; padding:0 20px; width:730px; overflow:hidden;}\r\n\r\n /* Contents */\r\n #contentContainer .content {clear:both; margin:10px 10px 0 0; padding:20px; max-width:710px; background:url(\'^FileUrl(/crystalx/img/content_all_bg.png);\') 0 0 no-repeat; overflow:hidden;}\r\n #contentContainer .content h2 {margin:0 -10px; padding:10px 25px; color:#192666; background:url(\'^FileUrl(/crystalx/img/ico_list.gif);\') 0 50% no-repeat;}\r\n #contentContainer .content p {text-align:justify;}\r\n \r\n/* Utility */\r\n#utility {background: #FFFFFF url(\'^FileUrl(/crystalx/img/bg_page.jpg);\') 0 0 repeat-y; padding: 10px 0 15px;}\r\n\r\n /* Utility - Toggles */\r\n #toggles {font-size:10px; font-weight:bold; text-align:left; margin-left:42px;}\r\n #toggles a {margin:0 10px; padding:2px 0; text-decoration:none; border-bottom:1px dashed; color:#6182D1;}\r\n #toggles a:hover {border-bottom:1px solid; color:#4F6AD7;}\r\n #toggles span.userAcc {background:url(\'^FileUrl(/crystalx/img/ico_user.gif);\') 0 50% no-repeat; margin: 0 0 0 8px;}\r\n\r\n/* Footer */\r\n#footer {position:relative; clear:both; width:770px; height:80px; margin-bottom:30px; background:url(\'^FileUrl(/crystalx/img/footer.jpg);\') 0 0 no-repeat; color:#6685CC;}\r\n#footer a {color:#6685CC;}\r\n#footer a:hover {color:#192666;}\r\n\r\n /* Footer - \"back on top\" */\r\n #top {position:absolute; top:55px; left:550px;}\r\n #top p {position:relative; width:30px; height:25px; margin:0; overflow:hidden;}\r\n #top p a {display:block; position:absolute; left:0; top:0; z-index:1; width:30px; height:25px; background:url(\'^FileUrl(/crystalx/img/ico_top.gif);\') 0 0 no-repeat; cursor:pointer;}\r\n #top a:hover {background:url(\'^FileUrl(/crystalx/img/ico_top.gif);\') -30px 0 no-repeat;} \r\n\r\n /* Footer - copyright */\r\n #footer p#copyright {position:absolute; top:10px; left:40px; margin:0;}\r\n\r\n /* Footer - created by */\r\n #createdby {position:absolute; top:10px; left:562px; margin:0; color:#8CA3D8;}\r\n #createdby a {color:#8CA3D8;}\r\n','text/css',1273032718,3600,'*{min-height:1px;}body{border:0;margin:0;padding:0;background:#F2F5FE url(\'^FileUrl(/crystalx/img/bg.gif);\') 0 0 repeat-x;font:70%/160% \"verdana\",sans-serif;color:#192666;text-align:center;}a{color:#192666;}a:hover{color:#4F6AD7;}p{border:0;margin:15px 0;padding:0;}div{display:block;border:0;margin:0;padding:0;overflow:hidden;}h1,h2,h3,h4,h5{border:0;margin:15px 0 10px 0;padding:0;font-weight:bold;}h1{font-size:260%;line-height:100%;font-family:\"georgia\",serif;font-weight:normal;}h2{font-size:180%;line-height:100%;font-family:\"georgia\",serif;font-weight:normal;}h3{font-size:120%;line-height:100%;font-weight:bold;}h4{font-size:120%;}h5{font-size:100%;}table{display:table;border-collapse:collapse;margin:15px 1px;padding:0;border:1px solid #B7CAF6;font-size:100%;}tr{display:table-row;}th,td{display:table-cell;border:1px solid #B7CAF6;margin:0;padding:5px;vertical-align:top;text-align:left;}th{background:#E7ECFD;text-align:center;color:#192666;font-weight:bold;}ul,ol{display:block;border:0;margin:15px 0 15px 40px;padding:0;}ol{list-style-type:decimal;}li{display:list-item;border:0;margin:0;padding:0;min-height:1px;}ul ul,ul ol,ol ol,ol ul{margin:0 0 0 20px;}dl{border-bottom:1px solid #E0E8FA;margin:0;padding:5px 10px;background:#CEDBF9;}dt{border:0;margin:0;padding:0;font-weight:bold;}dd{border:0;margin:0 0 0 30px;padding:0;}form{border:0;margin:0;padding:0;}fieldset{border:1px solid #ccc;margin:15px 0;padding:10px;}legend{margin-left:10px;font-size:100%;font-weight:bold;color:#008;}hr{height:1px;width:724px;margin:5px 23px;padding:0;background:#CCC;border:0 solid #CCC;color:#CCC;}a,img,span{border:0;margin:0;padding:0;overflow:hidden;}abbr,acronym{border-bottom:1px dotted #CCC;cursor:help;}del,.through{text-decoration:line-through;}strong,.strong{font-weight:bold;}cite,em,q,var{font-style:italic;}code,kbd,samp{font-family:monospace;font-size:110%;}.box{min-height:1px;}.box:after{content:\".\";display:block;line-height:0px;font-size:0px;visibility:hidden;clear:both;}.nom{margin:0;}.noscreen{display:none;}#main{width:770px;margin:0 auto;text-align:left;}#main #topspace{position:relative;top:0;left:0;height:50px;margin:0;padding:0;}#header{position:relative;width:770px;height:100px;margin:0;padding:0;background:#233C9B url(\'^FileUrl(/crystalx/img/header.jpg);\') 0 0 no-repeat;color:#FFFFFF;}#header #logo{position:absolute;top:35px;left:35px;margin:0;}#header #logo a{font-size:260%;line-height:100%;font-family:\"georgia\",serif;font-weight:bold;color:#FFF;}#header #logo a:hover{color:#B5C4E3;text-decoration:none;}#header #search form{position:absolute;top:35px;right:20px;height:30px;}#header #search .formContents{position:absolute;top:0;right:0px;width:200px;height:28px;margin:0;padding:0;border:0;background:url(\'^FileUrl(/crystalx/img/search.png);\') 0 0 no-repeat;font:bold 90%/100% \"verdana\",sans-serif;color:#192666;}#header #search input#keywords_formId{width:140px;margin:5px 8px;padding:3px 0;border:0;background:#FFF;font:bold 100%/100% \"verdana\",sans-serif;color:#192666;}#header #search #search_form{position:absolute;top:0;right:0px;width:41px;height:28px;cursor:point;margin:0;padding:0;}#header #search #search_result{position:absolute;top:220px;}#header #search #home_link,#header #search #no_result,#header #search #pagination{visibility:hidden;}#page #page-in #pagination{color:#6182D1;font-weight:bold;padding:5px;text-align:right;}#page #page-in #pagination a{color:#6182D1;}#page #page-in #pagination a:hover{color:#192666;}#page #page-in #home_link{padding:5px 5px 15px;color:#6182D1;font-weight:bold;text-align:right;}#page #page-in #home_link a{color:#6182D1;}#page #page-in #home_link a:hover{color:#192666;}#search_result{margin:10px 0;}dl#odd{background:#A0B9F3;}#page #page-in #no_result{margin:0 10px;color:#192666;font-weight:bold;}#menu{background:#192666;margin:0 5px;padding:10px 10px 0;height:32px;overflow:hidden;}#menu a{cursor:pointer;font-size:11px;}#page{width:770px;background:#FFFFFF url(\'^FileUrl(/crystalx/img/bg_page.jpg);\') 0 0 repeat-y;}#page-in{min-height:400px;background:url(\'^FileUrl(/crystalx/img/bg_page_in.jpg);\') 0 0 no-repeat;padding:10px 0 0;}#strip{position:relative;clear:both;padding:3px 20px 10px 20px;color:#6182D1;}#strip #location{float:left;background:url(\'^FileUrl(/crystalx/img/ico_comments.gif);\') 0 50% no-repeat;padding:0 15px;}#strip #location a{color:#6182D1;}#strip #location a:hover{color:#192666;}#strip #location a#currentpage{font-weight:bold;text-decoration:none;}#strip #datetime{float:right;background:url(\'^FileUrl(/crystalx/img/ico_date.gif);\') 0 50% no-repeat;padding:0 10px 0 15px;}#contentContainer{margin:0;padding:0 20px;width:730px;overflow:hidden;}#contentContainer .content{clear:both;margin:10px 10px 0 0;padding:20px;max-width:710px;background:url(\'^FileUrl(/crystalx/img/content_all_bg.png);\') 0 0 no-repeat;overflow:hidden;}#contentContainer .content h2{margin:0 -10px;padding:10px 25px;color:#192666;background:url(\'^FileUrl(/crystalx/img/ico_list.gif);\') 0 50% no-repeat;}#contentContainer .content p{text-align:justify;}#utility{background:#FFFFFF url(\'^FileUrl(/crystalx/img/bg_page.jpg);\') 0 0 repeat-y;padding:10px 0 15px;}#toggles{font-size:10px;font-weight:bold;text-align:left;margin-left:42px;}#toggles a{margin:0 10px;padding:2px 0;text-decoration:none;border-bottom:1px dashed;color:#6182D1;}#toggles a:hover{border-bottom:1px solid;color:#4F6AD7;}#toggles span.userAcc{background:url(\'^FileUrl(/crystalx/img/ico_user.gif);\') 0 50% no-repeat;margin:0 0 0 8px;}#footer{position:relative;clear:both;width:770px;height:80px;margin-bottom:30px;background:url(\'^FileUrl(/crystalx/img/footer.jpg);\') 0 0 no-repeat;color:#6685CC;}#footer a{color:#6685CC;}#footer a:hover{color:#192666;}#top{position:absolute;top:55px;left:550px;}#top p{position:relative;width:30px;height:25px;margin:0;overflow:hidden;}#top p a{display:block;position:absolute;left:0;top:0;z-index:1;width:30px;height:25px;background:url(\'^FileUrl(/crystalx/img/ico_top.gif);\') 0 0 no-repeat;cursor:pointer;}#top a:hover{background:url(\'^FileUrl(/crystalx/img/ico_top.gif);\') -30px 0 no-repeat;}#footer p#copyright{position:absolute;top:10px;left:40px;margin:0;}#createdby{position:absolute;top:10px;left:562px;margin:0;color:#8CA3D8;}#createdby a{color:#8CA3D8;}',0,NULL),('w0QifHLhsrzeOpFKl-DX-Q','','text/css',1273032718,3600,'\n/taskEdit.css\" />\n\n\n
    \">\n\" />\n\n\" />\n\" />\n
    \n
    \" size=\"20\" class=\"inputBox\" />\n\n
    \n\n

    \n

    \n','ProjectManager_resourcePopup',1,1,'ProjectManagerTMPL0005',1229579830,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n<tmpl_var title>\n\n\n/taskEdit.css\" />\n\n\n
    \">\n\" />\n\n\" />\n\" />\n
    \n
    \" size=\"20\" class=\"inputBox\" />\n\n
    \n

    \n

    \n',0,NULL,NULL),('\n

    \n
    \n\n\n

    \n
    \n\n\n
    \n \n
    \n
    \n\n\n\n\n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \"> \n
    \">
    \n \">\n \n
    \n
    %;\">
    \n
    %
    \n
    \n
    \n \n \">/edit.gif\" style=\"border-style:none;\" title=\"\" alt=\"^International(edit,Asset);\" /> \n \'));\">/delete.gif\" style=\"border-style:none;\" title=\"\" alt=\"^International(delete,Asset);\" />\n
    ','ProjectManager_dashboard',1,1,'ProjectManagerTMPL0001',1229579830,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n
    \n\n
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\"> \n
    \">
    \n\">\n\n
    \n
    %;\">
    \n
    %
    \n
    \n
    \n\n\">/edit.gif\" style=\"border-style:none;\" title=\"\" alt=\"^International(edit,Asset);\" /> \n\'));\">/delete.gif\" style=\"border-style:none;\" title=\"\" alt=\"^International(delete,Asset);\" />\n
    ',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n\n \n

    \n\n\n\n \n \n \n \n \n ^International(Error: Search string,Asset_HttpProxy); ^International(not found in content,Asset_HttpProxy);.\n \n\n\n\n\n\n \n \n \n \n \n ^International(Warning: Ending search point,Asset_HttpProxy); ^International(not found in content,Asset_HttpProxy);.\n \n','HttpProxy',1,1,'PBtmpl0000000000000033',1230159454,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n\n

    \n\n\n\n\n\n\n\n^International(Error: Search string,Asset_HttpProxy); ^International(not found in content,Asset_HttpProxy);.\n\n\n\n\n\n\n\n\n\n^International(Warning: Ending search point,Asset_HttpProxy); ^International(not found in content,Asset_HttpProxy);.\n\n',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n\n \n

    \n\n\n\n \">^International(Download this data,Asset_SQLReport);\n\n\n\n

    \n
    \n\n\n\n\n \n\n\n\n \n \n \n \n \n \n \n \n \n \n \n\n
    \">\n \n \n \n \n \n
     \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \">\n \n \n \n \n \n
     \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \">\n \n \n \n \n \n
     \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \">\n \n \n \n \n \n
     \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n\n\n
    \n \n
    \n
    ','SQLReport',1,1,'PBtmpl0000000000000059',1229907401,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n\n

    \n\n\n\">^International(Download this data,Asset_SQLReport);\n\n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \">\n\n\n\n\n\n
     \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \">\n\n\n\n\n\n
     \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \">\n\n\n\n\n\n
     \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \">\n\n\n\n\n\n
     \n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n \n
    \n
    ',0,NULL,NULL),('\"> \n \n \n

    \n
    \n\n\n

    \n
    \n\n\n

    \n\n\n

    \n
    \n\n\n \n \n\n\n \n \n\n
    ^International(364,WebGUI);:\n \n
    ^International(For,WebGUI);: 
    \n
    \n
    ','MultiSearch',1,1,'MultiSearchTmpl0000001',1230269962,'WebGUI::Asset::Template::HTMLTemplate',1,'\">\n\n

    \n
    \n\n

    \n
    \n\n

    \n\n\n

    \n
    \n\n\n\n\n\n\n\n\n\n
    ^International(364,WebGUI);:\n\n
    ^International(For,WebGUI);: 
    \n
    \n
    ',0,NULL,NULL),('\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 \">^International(label day,Asset_Calendar);\r\n \">^International(label week,Asset_Calendar);\r\n \">^International(label month,Asset_Calendar);\r\n ?type=list\">^International(486,WebGUI);\r\n \">^International(label search,Asset_Calendar);\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
    :00
    \r\n
    \r\n
      \r\n
    • \r\n \">\r\n
    • \r\n
    \r\n
    \r\n
    ','Calendar/Day',1,1,'CalendarDay00000000001',1230358389,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\">^International(label day,Asset_Calendar);\n\">^International(label week,Asset_Calendar);\n\">^International(label month,Asset_Calendar);\n?type=list\">^International(486,WebGUI);\n\">^International(label search,Asset_Calendar);\n\n
    \n\n
    \n
    \n, , \n
    \n
    \n\n\n\n\n\n
    \n
    :00
    \n
    \n\n
    \n
    ',0,NULL,NULL),('\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 ?type=day\">^International(label day,Asset_Calendar);\r\n ?type=week\">^International(label week,Asset_Calendar);\r\n ?type=month\">^International(label month,Asset_Calendar);\r\n ?type=list\">^International(486,WebGUI);\r\n \">^International(label search,Asset_Calendar);\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
    ^International(keyword,Asset_Calendar);
    \r\n
    \r\n
    \r\n
    ^International(start date,Asset_Calendar);
    \r\n
    \r\n
    \r\n
    ^International(end date,Asset_Calendar);
    \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 ^International(search results,Asset_Calendar);\r\n ^International(page x of x,Asset_Calendar,,);\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 \" style=\"padding-left:10px\">\r\n
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n
    \r\n
    \r\n
    ','Calendar/Search',1,1,'CalendarSearch00000001',1230358389,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n?type=day\">^International(label day,Asset_Calendar);\n?type=week\">^International(label week,Asset_Calendar);\n?type=month\">^International(label month,Asset_Calendar);\n?type=list\">^International(486,WebGUI);\n\">^International(label search,Asset_Calendar);\n
    \n \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n
    ^International(keyword,Asset_Calendar);
    \n
    \n
    \n
    ^International(start date,Asset_Calendar);
    \n
    \n
    \n
    ^International(end date,Asset_Calendar);
    \n
    \n
    \n
    \n\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n
    \n^International(search results,Asset_Calendar);\n^International(page x of x,Asset_Calendar,,);\n
    \n
    \n
    \n\n\n\n
    \n
    \n\n\n\n\n\n
    \n
    \n
    \n\" style=\"padding-left:10px\">\n
    \n
    \n
    \n\n\n\n
    \n
    \n
    ',0,NULL,NULL),('\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 \">^International(label day,Asset_Calendar);\r\n \">^International(label week,Asset_Calendar);\r\n \">^International(label month,Asset_Calendar);\r\n ?type=list\">^International(486,WebGUI);\r\n \">^International(label search,Asset_Calendar);\r\n\r\n \r\n
    \r\n \r\n
    \r\n
    \r\n , to , \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n
    curDay\"> \r\n \r\n \r\n
    \r\n
    \r\n
    ','Calendar/Week',1,1,'CalendarWeek0000000001',1230358389,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\">^International(label day,Asset_Calendar);\n\">^International(label week,Asset_Calendar);\n\">^International(label month,Asset_Calendar);\n?type=list\">^International(486,WebGUI);\n\">^International(label search,Asset_Calendar);\n\n
    \n\n
    \n
    \n , to , \n
    \n
    \n\n\n\n\n\n
    \n
    \n
    curDay\">\n\n\n
    \n
    \n
    ',0,NULL,NULL),('\n\n\n\n\n/tools.css\" />\n\n\n\n\n\n\n \n \n \n \n \n \n
    \n
    \n \n \n \n \n \n
    ()\n \n
    1:23 PM EDT
    \n \n
    \n
    \n
    \n
    \n \n \n \n \n \n \n
    \n &t=1d&q=l&l=off&z=s&p=s\" alt=\"chart\" />\n \n \n \n \n \n \n \n \n \n \n
    Today5d1m3m1y5y20y
    \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ^International(stocks.last,Asset_StockData);
    ^International(Market Cap,Asset_StockData);
    ^International(Change,Asset_StockData); _up_down\" style=\"text-align: right; font-weight: bold;\">\n /\' alt=\"\" /> \n
    ^International(Open,Asset_StockData);
    ^International(Day High,Asset_StockData);
    ^International(stocks.bid,Asset_StockData);
    ^International(52 Wk High,Asset_StockData);
    ^International(EPS,Asset_StockData);
    ^International(stocks.ex_div,Asset_StockData);
    ^International(Yield,Asset_StockData);
    \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ^International(Last Trade,Asset_StockData);
    ^International(Volume,Asset_StockData); m
    ^International(% Change,Asset_StockData); _up_down\" style=\"text-align: right; font-weight: bold;\">%
    ^International(Prev Close,Asset_StockData);
    ^International(Day Low,Asset_StockData);
    ^International(stocks.ask,Asset_StockData);
    ^International(52 Wk Low,Asset_StockData);
    ^International(stocks.pe,Asset_StockData);
    ^International(Dividend,Asset_StockData);
    ^International(Exchange,Asset_StockData);
    \n
    \n
    \n\n\n\n','StockData/Display',1,1,'StockDataTMPL000000002',1229494994,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n\n/tools.css\" />\n\n\n\n\n\n\n\n\n\n\n\n
    \n
    \n\n\n\n\n\n
    ()\n\n
    1:23 PM EDT
    \n\n
    \n
    \n
    \n
    \n\n\n\n\n\n\n
    \n&t=1d&q=l&l=off&z=s&p=s\" alt=\"chart\" />\n\n\n\n\n\n\n\n\n\n\n
    Today5d1m3m1y5y20y
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(stocks.last,Asset_StockData);
    ^International(Market Cap,Asset_StockData);
    ^International(Change,Asset_StockData); _up_down\" style=\"text-align: right; font-weight: bold;\">\n/\' alt=\"\" /> \n
    ^International(Open,Asset_StockData);
    ^International(Day High,Asset_StockData);
    ^International(stocks.bid,Asset_StockData);
    ^International(52 Wk High,Asset_StockData);
    ^International(EPS,Asset_StockData);
    ^International(stocks.ex_div,Asset_StockData);
    ^International(Yield,Asset_StockData);
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(Last Trade,Asset_StockData);
    ^International(Volume,Asset_StockData); m
    ^International(% Change,Asset_StockData); _up_down\" style=\"text-align: right; font-weight: bold;\">%
    ^International(Prev Close,Asset_StockData);
    ^International(Day Low,Asset_StockData);
    ^International(stocks.ask,Asset_StockData);
    ^International(52 Wk Low,Asset_StockData);
    ^International(stocks.pe,Asset_StockData);
    ^International(Dividend,Asset_StockData);
    ^International(Exchange,Asset_StockData);
    \n
    \n
    \n\n\n',0,NULL,NULL),('
    \" class=\"dataTable\">\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
    ','DataTable',1,1,'TuYPpHx7TUyk08639Pc8Bg',1233861621,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"dataTable\">\n\n\n\n\n

    \n
    \n
    \n\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n
    ',0,NULL,NULL),('
    \" class=\"dataTable\">\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
    ','DataTable',1,1,'3rjnBVJRO6ZSkxlFkYh_ug',1233861835,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"dataTable\">\n\n

    \n
    \n\n

    \n
    \n
    \n\n
    \n
    \n\n
    \n
    ',0,NULL,NULL),('

    \" />
    ','ImageAsset',1,1,'NBVSVNLp9X_bV7WrCprtCA',1237842096,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \" />
    ',0,NULL,NULL),('
    \r\n \r\n

    \r\n
    \r\n\r\n \r\n

    • ^International(manage things label,Asset_Thingy);

    \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
    rowOnerowTwo\">\r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    ','Thingy',1,1,'ThingyTmpl000000000001',1237914005,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n

    \n
    \n\n

    • ^International(manage things label,Asset_Thingy);

    \n
    \n\n
    \n
    \n\n\n\n\n
    \n\n
    rowOnerowTwo\">\n \n
    \n
    \n
    \n
    \n
    ',0,NULL,NULL),('\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 ','Carousel',1,1,'CarouselTmpl0000000002',1239475937,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n
    \n
    \n\n\n',0,NULL,NULL),('^International(inbox notification,Account_Inbox);','Account/Inbox/Notification',1,1,'b1316COmd9xRv4fCI3LLGA',1236956475,'WebGUI::Asset::Template::HTMLTemplate',1,'^International(inbox notification,Account_Inbox);',0,NULL,NULL),('
    \n
    \n \n
    \n
    \n
    ^International(Working...,WebGUI);
    \n
     
    \n
    \n
    \n \" style=\"border-style:none;height:48px;width:48px;\" title=\"\" alt=\"\" />\n
    \n
    \n \"*\"\n
    \n
    ','AdminConsole/ProgressBar',1,1,'YP9WaMPJHvCJl-YwrLVcPw',1245376837,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    \n\n
    \n
    \n
    ^International(Working...,WebGUI);
    \n
     
    \n
    \n
    \n\" style=\"border-style:none;height:48px;width:48px;\" title=\"\" alt=\"\" />\n
    \n
    \n\"*\"\n
    \n
    ',0,NULL,NULL),('\r\n \r\n

    \r\n
    \r\n
    \r\n\r\n
    \r\n \" style=\"height:auto;min-height:100px;width:100%;display:block;\">\r\n \" /> \r\n \r\n
    ','FileAsset',1,1,'pbtmpl0000000000000220',1247488979,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n

    \n
    \n
    \n
    \n\" style=\"height:auto;min-height:100px;width:100%;display:block;\">\n\" />\n\n
    ',0,NULL,NULL),('\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n  \n
    \n \n \n \n \n \n
    \n  \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n \n \n \" >
    \n
    \n \n
    \n
    \n \n
    \n \n \">
    \n
    \n
    \n
    \n
    \n \">
    \n ^AdminToggle;
    \n ^LoginToggle;
    \n
    \n
    \n
    \n \n
    \n
    \n \n \')\">\"?\"\n \n
    \n
    \n \" style=\"border-style:none;height:48px;width:48px;\" title=\"\" alt=\"\" />\n
    \n
    \n\"*\"\n
    \n
    \n \" style=\"border-style:none;\" title=\"\" alt=\"\" />\n
    \n\n\n
    ','AdminConsole',1,1,'PBtmpl0000000000000001',1247535846,'WebGUI::Asset::Template::HTMLTemplate',1,'\n
    \n
    \n\n
    \n
    \n\n
    \n\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n\n\n\" >
    \n
    \n\n
    \n
    \n\n
    \n\n\">
    \n
    \n
    \n
    \n
    \n\">
    \n^AdminToggle;
    \n^LoginToggle;
    \n
    \n
    \n
    \n\n
    \n
    \n\n\')\">\"?\"\n\n
    \n
    \n\" style=\"border-style:none;height:48px;width:48px;\" title=\"\" alt=\"\" />\n
    \n
    \n\"*\"\n
    \n
    \n\" style=\"border-style:none;\" title=\"\" alt=\"\" />\n
    \n\n
    ',0,NULL,NULL),('

    \r\n

    \r\n\r\n\" />\" quality=\"high\" width=\"800\" height=\"600\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />\r\n

    ','FileAsset',1,1,'pbtmpl0000000000000221',1247487940,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n

    \n\n\" />\" quality=\"high\" width=\"800\" height=\"600\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />\n

    ',0,NULL,NULL),('
    \n \n

    \n
    \n\n \n

    \n
    \n\n
    \n ^ViewCart(); (^CartItemCount;)\n
    \n\n \n
    \n
    \n \n\n \n
    \n ^International(subcategories,Asset_Shelf);: \n \n \n \">\n \n
    \n
    \n\n \n
    \n \n \n \" class=\"thumbnail\">\" alt=\"\" />\n \n \n
    \n \n ()\n
    \n \n
    \n \n
    \n
    \n
    \n \n \n \n \n
    \n ^International(this shelf is empty,Asset_Shelf);\n
    \n \n \n
    \n ^International(You do not have permission to view the products on this shelf,Asset_Shelf);\n
    \n
    \n
    \n
    \n
    ','Shelf',1,1,'nFen0xjkZn8WkpM93C9ceQ',1247864696,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n

    \n
    \n\n

    \n
    \n
    \n^ViewCart(); (^CartItemCount;)\n
    \n\n
    \n
    \n\n
    \n^International(subcategories,Asset_Shelf);:\n\n\n\">\n\n
    \n
    \n\n\n\n\n\n\n\n
    \n^International(this shelf is empty,Asset_Shelf);\n
    \n\n\n
    \n^International(You do not have permission to view the products on this shelf,Asset_Shelf);\n
    \n
    \n
    \n
    \n
    ',0,NULL,NULL),('
    \n\n\n
    \n );\'\"/>\n  \n );\'\"/>\n
    \n\n \n
    \n ^International(friends only,Account_Profile);^International(private profile,Account_Profile);^International(public profile,Account_Profile);\n
    \n\n
    \n\n\n

    ^International(error label,Account_Inbox);

    \n

    \n

    \">^International(back label,Account_Profile);

    \n\n \n \n \n \n \n \n \n \n \n \n \n \n
    colspan=2 class=\"bar\">\n
    \n ^International(member since,Account_Inbox); ^D(%z,);\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    32\" class=\"bar\">
    greenredblue;\">
    \n
    \n );\" class=\"WGphotostyle\"/>
    \n
    \n
    \n \n
    \n );\'\"/>\n  \n );\'\"/>\n
    \n\n
    \n','Account/Profile/View',1,1,'2CS-BErrjMmESOtGT90qOg',1248549087,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    \n);\'\"/>\n \n);\'\"/>\n
    \n\n
    \n^International(friends only,Account_Profile);^International(private profile,Account_Profile);^International(public profile,Account_Profile);\n
    \n
    \n\n

    ^International(error label,Account_Inbox);

    \n

    \n

    \">^International(back label,Account_Profile);

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n
    colspan=2 class=\"bar\">\n
    \n^International(member since,Account_Inbox); ^D(%z,);\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    32\" class=\"bar\">
    greenredblue;\">
    \n
    \n);\" class=\"WGphotostyle\"/>
    \n
    \n
    \n
    \n);\'\"/>\n \n);\'\"/>\n
    \n
    ',1,NULL,NULL),('
    \n
    \n
    \n
    \n
    \n

    ^International(error label,Account_Inbox);

    \n

    \n

    \">^International(back label,Account_Profile);

    \n
    \n
    \n
    \n
    \n
    ','Account/Profile/Error',1,1,'MBmWlA_YEA2I6D29OMGtRg',1248549086,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    \n
    \n
    \n
    \n

    ^International(error label,Account_Inbox);

    \n

    \n

    \">^International(back label,Account_Profile);

    \n
    \n
    \n
    \n
    \n
    ',0,NULL,NULL),('\n\n
    \n','Account/Layout',1,1,'gfZOwaTWYjbSoVaQtHBBEw',1249407461,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n
    \n',0,NULL,NULL),('
    \n\n
    \n\n

    \n
    \n ^International(member since,Account_Inbox); ^D(%z,);\n

    \n

    \n disabled onclick=\"location.href=\'\'\"/> \'\" /> \'\" />\n \'\" disabled/> >\" onclick=\"location.href=\'\'\" disabled/>\n

    \n
    \n

    \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ^International(subject label,Account_Inbox);:
    ^International(from label,Account_Inbox);:
    ^International(received label,Account_Inbox);:^D(\"%z %Z\",);
    ^International(status label,Account_Inbox);:
    \n
    \n
    \n \n\n
    \n\n
    \n','Account/Inbox/ViewMessage',1,1,'0n4HtbXaWa_XJHkFjetnLQ',1248549086,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    \n

    \n
    \n^International(member since,Account_Inbox); ^D(%z,);\n

    \n

    \ndisabled onclick=\"location.href=\'\'\"/> \'\" /> \'\" />\n\'\" disabled/> >\" onclick=\"location.href=\'\'\" disabled/>\n

    \n
    \n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(subject label,Account_Inbox);:
    ^International(from label,Account_Inbox);:
    ^International(received label,Account_Inbox);:^D(\"%z %Z\",);
    ^International(status label,Account_Inbox);:
    \n
    \n
    \n
    \n
    ',0,NULL,NULL),('

    ^International(error label,Account_Inbox);

    \n

    \n

    \">^International(back label,Account_Inbox);

    \n','Account/Inbox/Error',1,1,'ErEzulFiEKDkaCDVmxUavw',1248549086,'WebGUI::Asset::Template::HTMLTemplate',1,'

    ^International(error label,Account_Inbox);

    \n

    \n

    \">^International(back label,Account_Inbox);

    ',0,NULL,NULL),('

    ^International(message sent label,Account_Inbox);

    \n

    ^International(message sent text,Account_Inbox);

    \n

    \">^International(back label,Account_Inbox);

    ','Account/Inbox/Confirm',1,1,'DUoxlTBXhVS-Zl3CFDpt9g',1248549086,'WebGUI::Asset::Template::HTMLTemplate',1,'

    ^International(message sent label,Account_Inbox);

    \n

    ^International(message sent text,Account_Inbox);

    \n

    \">^International(back label,Account_Inbox);

    ',0,NULL,NULL),('\n
    \n
    \n\n

    \n
    \n ^International(member since,Account_Inbox); ^D(%z,);\n

    \n\n

    \n \n \n\n \n \n \" class=\"prevNext\">\"Previous\" \n \"> \n  \" class=\"prevNext\">\"Next\"\n \n \n \n \n \n \n

    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n WGoddThreadWGevenThread\">\n \n \n \n \n \n \n \n \n \n \n \n \n
    \">^International(from label,Account_Inbox);\">^International(invitation label,Account_Inbox);\">^International(date label,Account_Inbox);
    \" class=\"WGinbox_from\">\">^International(invitation message,Account_Inbox,);
    ^International(no invitations,Account_Inbox);
    \n \n

    \n \n \n\n \n \n \" class=\"prevNext\">\"Previous\" \n \"> \n  \" class=\"prevNext\">\"Next\"\n \n \n \n \n \n \n

    \n\n

    \n ^International(invitation count,\'Account_Inbox\');\n

    \n\n
    \n
    \n','Account/Inbox/ManageInvitations',1,1,'1Q4Je3hKCJzeo0ZBB5YB8g',1248549086,'WebGUI::Asset::Template::HTMLTemplate',1,'\n
    \n
    \n

    \n
    \n^International(member since,Account_Inbox); ^D(%z,);\n

    \n

    \n \n\n\n\" class=\"prevNext\">\"Previous\" \n\"> \n \" class=\"prevNext\">\"Next\"\n\n\n\n\n

    \n\n\n\n\n\n\n\n\n\nWGoddThreadWGevenThread\">\n\n\n\n\n\n\n\n\n\n\n\n\n
    \">^International(from label,Account_Inbox);\">^International(invitation label,Account_Inbox);\">^International(date label,Account_Inbox);
    \" class=\"WGinbox_from\">\">^International(invitation message,Account_Inbox,);
    ^International(no invitations,Account_Inbox);
    \n

    \n \n\n\n\" class=\"prevNext\">\"Previous\" \n\"> \n \" class=\"prevNext\">\"Next\"\n\n\n\n\n

    \n

    \n ^International(invitation count,\'Account_Inbox\');\n

    \n
    \n
    \n',0,NULL,NULL),('

    ^International(invitation confirm label,Account_Inbox);

    \n

    ^International(invitation confirm message,Account_Inbox);

    \n\n \n \n \n \n \n
    ^International(\'you have not been added\',\'Friends\',);^International(\'you have been added\',\'Friends\',);
    \n

    \">^International(invitations back label,Account_Inbox);

    \n','Account/Inbox/Confirm',1,1,'5A8Hd9zXvByTDy4x-H28qw',1248549086,'WebGUI::Asset::Template::HTMLTemplate',1,'

    ^International(invitation confirm label,Account_Inbox);

    \n

    ^International(invitation confirm message,Account_Inbox);

    \n\n\n\n\n\n\n
    ^International(\'you have not been added\',\'Friends\',);^International(\'you have been added\',\'Friends\',);
    \n

    \">^International(invitations back label,Account_Inbox);

    ',0,NULL,NULL),('\n
    \n \n
    \n\n

    \n
    \n ^International(member since,Account_Inbox); ^D(%z,);\n

    \n
    \n \'\" /> \'\" disabled/> >\" onclick=\"location.href=\'\'\" disabled/>\n
    \n \n

    \n

    \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ^International(from label,Account_Inbox);:
    ^International(received label,Account_Inbox);:
    ^D(\"%z %Z\",);
    \n
    \n\n
    \n\n
    \n','Account/Inbox/ViewInvitation',1,1,'VBkY05f-E3WJS50WpdKd1Q',1248549087,'WebGUI::Asset::Template::HTMLTemplate',1,'\n
    \n
    \n

    \n
    \n^International(member since,Account_Inbox); ^D(%z,);\n

    \n
    \n \'\" /> \'\" disabled/> >\" onclick=\"location.href=\'\'\" disabled/>\n
    \n

    \n

    \n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(from label,Account_Inbox);:
    ^International(received label,Account_Inbox);:
    ^D(\"%z %Z\",);
    \n
    \n
    \n
    \n',0,NULL,NULL),('

    \n

    \n','Account/Inbox/InviteUserMessage',1,1,'XgcsoDrbC0duVla7N7JAdw',1248549086,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n

    ',0,NULL,NULL),(' \n
    \n \n
    \n\n

    \n
    \n ^International(member since,Account_Inbox); ^D(%z,);\n

    \n\n

    \n ^International(invite a friend,Account_Inbox);\n

    \n \n\n

    \n\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ^International(to label,Account_Inbox);:
    ^International(subject label,Account_Inbox);:
    \n   \n \'\" />\n
    \n\n
    \n
    \n','Account/Inbox/InviteUser',1,1,'cR0UFm7I1qUI2Wbpj--08Q',1248549086,'WebGUI::Asset::Template::HTMLTemplate',1,'\n
    \n
    \n

    \n
    \n^International(member since,Account_Inbox); ^D(%z,);\n

    \n

    \n^International(invite a friend,Account_Inbox);\n

    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(to label,Account_Inbox);:
    ^International(subject label,Account_Inbox);:
    \n  \n\'\" />\n
    \n
    \n
    \n',0,NULL,NULL),('

    ^International(invitation sent label,Account_Inbox);

    \n

    ^International(invitation sent text,Account_Inbox);

    \n

    \">^International(back label,Account_Inbox);

    ','Account/Inbox/InviteUserConfirm',1,1,'SVIhz68689hwUGgcDM-gWw',1248549086,'WebGUI::Asset::Template::HTMLTemplate',1,'

    ^International(invitation sent label,Account_Inbox);

    \n

    ^International(invitation sent text,Account_Inbox);

    \n

    \">^International(back label,Account_Inbox);

    ',0,NULL,NULL),('\n\n
    \n\" class=\"WGprofile_displayView\">^International(\'friends as others label\',\'Account_Friends\');\" class=\"WGprofile_displayView\">^International(\'edit my friends\',\'Account_Friends\');\" class=\"WGprofile_displayView\">^International(\'back label\',\'Account_Friends\');\n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    ','Account/Layout',1,1,'zrNpGbT3odfIkg6nFSUy8Q',1249407461,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n
    \n\" class=\"WGprofile_displayView\">^International(\'friends as others label\',\'Account_Friends\');\" class=\"WGprofile_displayView\">^International(\'edit my friends\',\'Account_Friends\');\" class=\"WGprofile_displayView\">^International(\'back label\',\'Account_Friends\');\n
    \n
    \n
    \n
    \n
    \n\n
    \n
    \n
    \n
    \n
    ',0,NULL,NULL),('\n
    \n\n\n

    \n
    \n ^International(member since,Account_Friends); ^D(%z,);\n

    \n\n \n\n
    \n\n
    \n\n

    \n \n \n \n

    \n \n \n \n

    \n\n \n
    class=\"bordered\">\n \n \n \n \n \n \n \n
    \">\"\"^Extras(account/images/no_photo.gif);\"/>\n \">
    \n \n ^International(member since,Account_Friends); ^D(%z,);
    \n
    \n
    \n
    \n
    \n \n

    \n \n \n \n

    \n \n \n \n

    \n\n
    \n','Account/Friends/View',1,1,'1Yn_zE_dSiNuaBGNLPbxtw',1248549086,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n

    \n
    \n^International(member since,Account_Friends); ^D(%z,);\n

    \n\n
    \n
    \n

    \n \n\n\n

    \n\n\n\n

    \n\n
    class=\"bordered\">\n\n\n\n\n\n\n\n
    \">\"\"^Extras(account/images/no_photo.gif);\"/>\n\">
    \n\n^International(member since,Account_Friends); ^D(%z,);
    \n
    \n
    \n
    \n
    \n

    \n \n\n\n

    \n\n\n\n

    \n
    ',0,NULL,NULL),('
    \n\n
    \n\n
    \n
    \n ^International(member since,Account_Inbox); ^D(%z,);\n
    \n\n \n\n
    \n\n
    \n\n

    \n \n \n \n

    \n \n \n \n

    \n\n \n \n \n \n \n \n
    class=\"WGbordered\" >\n \n \n \n \n \n \n \n \n
    \">\"Friend^Extras(account/images/no_photo.gif);\"/>
    ^International(online,Friends);^International(offline,Friends);
    \n \">
    \n \n ^International(member since,Account_Friends); ^D(%z,);
    \n ^User(homeCountry,);\n
    \n
    \n
    \n
    \n
    \n
    \n \n

    \n \n \n \n

    \n \n \n \n

    \n\n
    \n\n
    \n','Account/Friends/Edit',1,1,'AZFU33p0jpPJ-E6qLSWZng',1248549086,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    \n
    \n
    \n^International(member since,Account_Inbox); ^D(%z,);\n
    \n\n
    \n
    \n

    \n \n\n\n

    \n\n\n\n

    \n\n\n\n\n\n\n
    class=\"WGbordered\" >\n\n\n\n\n\n\n\n\n
    \">\"Friend^Extras(account/images/no_photo.gif);\"/>
    ^International(online,Friends);^International(offline,Friends);
    \n\">
    \n\n^International(member since,Account_Friends); ^D(%z,);
    \n^User(homeCountry,);\n
    \n
    \n
    \n
    \n
    \n
    \n

    \n \n\n\n

    \n\n\n\n

    \n
    \n
    ',0,NULL,NULL),('\n\n
    \n \n

    \n
    \n ^International(member since,Account_Friends); ^D(%z,);\n

    \n \n

    ^International(add to network label,Account_Friends);

    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ^International(adding user message,Account_Friends,);
    ^International(sending to message,Account_Friends);
    \n\n
    \n\n','Account/Friends/SendRequest',1,1,'AGJBGviWGAwjnwziiPjvDg',1248549087,'WebGUI::Asset::Template::HTMLTemplate',1,'\n
    \n

    \n
    \n^International(member since,Account_Friends); ^D(%z,);\n

    \n

    ^International(add to network label,Account_Friends);

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(adding user message,Account_Friends,);
    ^International(sending to message,Account_Friends);
    \n
    \n',0,NULL,NULL),('

    \n

    ^International(error label,Account_Friends);

    \n

    \n

    \">^International(back label,Account_Inbox);

    \n

    \n','Account/Friends/Error',1,1,'7Ijdd8SW32lVgg2H8R-Aqw',1248549086,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n

    ^International(error label,Account_Friends);

    \n

    \n

    \">^International(back label,Account_Inbox);

    \n

    ',0,NULL,NULL),('

    \n

    ^International(message sent label,Account_Friends);

    \n

    ^International(add to friends confirmation,Account_Friends,);

    \n

    \">^International(back to user profile,Account_Friends);

    \n

    ','Account/Friends/Confirm',1,1,'K8F0j_cq_jgo8dvWY_26Ag',1248549086,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n

    ^International(message sent label,Account_Friends);

    \n

    ^International(add to friends confirmation,Account_Friends,);

    \n

    \">^International(back to user profile,Account_Friends);

    \n

    ',0,NULL,NULL),('

    \n

    ^International(remove confirm label,Account_Friends);

    \n

    ^International(remove confirm message,Account_Friends,);

    \n

    \n \">^International(remove confirm no,Account_Friends); · \n \">^International(remove confirm yes,Account_Friends);\n

    \n

    ','Account/Friends/Confirm',1,1,'G5V6neXIDiFXN05oL-U3AQ',1248549087,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n

    ^International(remove confirm label,Account_Friends);

    \n

    ^International(remove confirm message,Account_Friends,);

    \n

    \n\">^International(remove confirm no,Account_Friends); · \n\">^International(remove confirm yes,Account_Friends);\n

    \n

    ',0,NULL,NULL),('\n\n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    ','Account/Layout',1,1,'9ThW278DWLV0-Svf68ljFQ',1249407460,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n
    \n
    \n
    \n
    ',0,NULL,NULL),('
    \n
    \n

    \n ^International(Payout Totals,Account_Shop);\n

    \n \n \n \n \n \n \n
    ^International(Paid,Account_Shop); :
    ^International(Scheduled for payment,Account_Shop); :
    ^International(Not yet scheduled,Account_Shop); : \n
    ^International(total,Shop); :
    \n \n

    ^International(my sales label,Account_Shop);

    \n \n \n \n \n \n \n \n \n \n \n \n \n WGoddThreadWGevenThread\">\n \n \n \n \n \n \n \n \n \n \n \n
    ^International(Product,Account_Shop);^International(quantity,Shop);^International(Payout,Account_Shop);
    \">
    ^International(no contributions,Account_Contributions);
    \n \n

    ^International(my sales label,Account_Shop); :: ^International(Products,Account_Shop);

    \n
    \n
    ','Shop/MySales',1,1,'-zxyB-O50W8YnL39Ouoc4Q',1248563425,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    \n

    \n^International(Payout Totals,Account_Shop);\n

    \n\n\n\n\n\n\n
    ^International(Paid,Account_Shop); :
    ^International(Scheduled for payment,Account_Shop); :
    ^International(Not yet scheduled,Account_Shop); : \n
    ^International(total,Shop); :
    \n

    ^International(my sales label,Account_Shop);

    \n\n\n\n\n\n\n\n\n\n\n\nWGoddThreadWGevenThread\">\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(Product,Account_Shop);^International(quantity,Shop);^International(Payout,Account_Shop);
    \">
    ^International(no contributions,Account_Contributions);
    \n

    ^International(my sales label,Account_Shop); :: ^International(Products,Account_Shop);

    \n
    \n
    ',0,NULL,NULL),('\n\n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    ','Account/Layout',1,1,'b4n3VyUIsAHyIvT-W-jziA',1249407461,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n
    \n
    \n
    \n
    ',0,NULL,NULL),('
    \n \" id=\"id\">\n\n \n
    \n
    \n\n \n

    \n
    \n\n \n \n
    \n \n

    \n ^ViewCart();
    \n \">^International(continue shopping button,Shop);\n \n ^ViewCart(); (^CartItemCount;)\n

    \n \n \n \n \n \n \n \n \n \n\n \n \n \n
      \n ^International(variants,Asset_Product);\n \n
    • \n
      \n
    \n \n \n \n
    \n
    \n \n \n \n \n \n
      \n ^International(30,Asset_Product);\n \n
    • \n
      \n
    \n
    \n \n \n
      \n ^International(54,Asset_Product);\n \n
    • \n
      \n
    \n
    \n\n \n
      \n ^International(31,Asset_Product);\n \n
    • :
    • \n
      \n
    \n
    \n \n \n
      \n ^International(32,Asset_Product);\n \n
    • \">
    • \n
      \n
    \n
    \n \n \n
      \n ^International(33,Asset_Product);\n \n
    • \">
    • \n
      \n
    \n
    \n
    \n \n
    \n
    \n\n','Product',1,1,'PBtmpl0000000000000056',1248729559,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\" id=\"id\">\n\n
    \n
    \n\n

    \n
    \n\n
    \n\n

    \n^ViewCart();
    \n\">^International(continue shopping button,Shop);\n\n^ViewCart(); (^CartItemCount;)\n

    \n\n\n\n\n\n\n\n\n\n\n\n
      \n^International(variants,Asset_Product);\n\n
    • \n
      \n
    \n\n\n\n
    \n
    \n\n
      \n^International(30,Asset_Product);\n\n
    • \n
      \n
    \n
    \n\n
      \n^International(54,Asset_Product);\n\n
    • \n
      \n
    \n
    \n\n
      \n^International(31,Asset_Product);\n\n
    • :
    • \n
      \n
    \n
    \n\n
      \n^International(32,Asset_Product);\n\n
    • \">
    • \n
      \n
    \n
    \n\n
      \n^International(33,Asset_Product);\n\n
    • \">
    • \n
      \n
    \n
    \n
    \n
    \n
    ',0,NULL,NULL),('^International(inbox sms notification,Account_Inbox);','Account/Inbox/Notification',1,1,'i9-G00ALhJOr0gMh-vHbKA',1250408924,'WebGUI::Asset::Template::HTMLTemplate',1,'^International(inbox sms notification,Account_Inbox);',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n

    ^International(\"form manage title\",\"Asset_AdSku\");

    \n

    \'>^International(\"form purchase link\",\"Asset_AdSku\");

    \n

    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n
    ^International(\"form manage table header title\",\"Asset_AdSku\");^International(\"form manage table header clicks\",\"Asset_AdSku\");^International(\"form manage table header impressions\",\"Asset_AdSku\");^International(\"form manage table header renew\",\"Asset_AdSku\");
    \">^International(\"form manage table value renew\",\"Asset_AdSku\");
    \n\n^ViewCart(); (^CartItemCount;)','AdSku/Manage',1,1,'ohjyzab5i-yW6GOWTeDUHg',1251425384,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n

    ^International(\"form manage title\",\"Asset_AdSku\");

    \n

    \'>^International(\"form purchase link\",\"Asset_AdSku\");

    \n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(\"form manage table header title\",\"Asset_AdSku\");^International(\"form manage table header clicks\",\"Asset_AdSku\");^International(\"form manage table header impressions\",\"Asset_AdSku\");^International(\"form manage table header renew\",\"Asset_AdSku\");
    \">^International(\"form manage table value renew\",\"Asset_AdSku\");
    \n^ViewCart(); (^CartItemCount;)',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n\n
    \n
    \n\n

    ^International(form added to cart thanks,Asset_AdSku);

    \n\n

    \n

    \n

    \">^International(form manage link,Asset_AdSku);

    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ^International(form purchase ad title,Asset_AdSku);
    ^International(form purchase ad link,Asset_AdSku);
    ^International(form purchase ad image,Asset_AdSku);
    ^International(form purchase number of clicks,Asset_AdSku);^International(form purchase per click,Asset_AdSku, );\n
    \n
    ^International(minimum clicks,Asset_AdSku,);
    ^International(form purchase number of impressions,Asset_AdSku);^International(form purchase per click,Asset_AdSku, );\n
    \n
    ^International(minimum impressions,Asset_AdSku,);
    \n \n
    \n^ViewCart(); (^CartItemCount;)','AdSku/Purchase',1,1,'AldPGu0u-jm_5xK13atCSQ',1251419124,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n
    \n
    \n\n

    ^International(form added to cart thanks,Asset_AdSku);

    \n\n

    \n

    \n

    \">^International(form manage link,Asset_AdSku);

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(form purchase ad title,Asset_AdSku);
    ^International(form purchase ad link,Asset_AdSku);
    ^International(form purchase ad image,Asset_AdSku);
    ^International(form purchase number of clicks,Asset_AdSku);^International(form purchase per click,Asset_AdSku, );\n
    \n
    ^International(minimum clicks,Asset_AdSku,);
    ^International(form purchase number of impressions,Asset_AdSku);^International(form purchase per click,Asset_AdSku, );\n
    \n
    ^International(minimum impressions,Asset_AdSku,);
    \n\n
    \n^ViewCart(); (^CartItemCount;)',0,NULL,NULL),('

    \n\n\n\n
    \n
    \n\n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \" style=\"display:none;\">\n \n \n \n \n
    ^International(\'answer label\',\'Asset_Survey\');^International(\'response count label\',\'Asset_Survey\');^International(\'response percent label\',\'Asset_Survey\');
    \');\">^International(\'show comments label\',\'Asset_Survey\');
    \n \n

    \n
    \n
    \n \n
    \n \');\">^International(\'show responses label\',\'Asset_Survey\');\n
    \n
    \" style=\"display:none;\">\n \n

    \n \n
    \n
    \n
    \n
    \n
    \n


    \n
    \n\n\n
    \n · · \n
    \n
    \n','Survey/Overview',1,1,'PBtmpl0000000000000063',1250243000,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n\n
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\" style=\"display:none;\">\n\n\n\n\n
    ^International(\'answer label\',\'Asset_Survey\');^International(\'response count label\',\'Asset_Survey\');^International(\'response percent label\',\'Asset_Survey\');
    \');\">^International(\'show comments label\',\'Asset_Survey\');
    \n\n

    \n
    \n
    \n\n
    \n\');\">^International(\'show responses label\',\'Asset_Survey\');\n
    \n
    \" style=\"display:none;\">\n\n

    \n\n
    \n
    \n
    \n
    \n
    \n


    \n
    \n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('\" id=\"id\">\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
    ^International(\'user label\',\'Asset_Survey\');^International(\'start date\',\'Asset_Survey\');^International(\'end date\',\'Asset_Survey\');^International(\'score label\',\'Asset_Survey\');^International(\'percentage label\',\'Asset_Survey\');
    \">/%
    \r\n\r\n\r\n\r\n
    \r\n · · \r\n
    \r\n
    \r\n','Survey/Gradebook',1,1,'PBtmpl0000000000000062',1250243000,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n\n

    \n\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(\'user label\',\'Asset_Survey\');^International(\'start date\',\'Asset_Survey\');^International(\'end date\',\'Asset_Survey\');^International(\'score label\',\'Asset_Survey\');^International(\'percentage label\',\'Asset_Survey\');
    \">/%
    \n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n\n \n

    \n\n\n

    \n\n\n','Survey',1,1,'PBtmpl0000000000000061',1250243000,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n\n

    \n\n

    \n',0,NULL,NULL),('
    \n
    \n
    \n
    \n\n\n
    \n

    \n^International(\'restart message\',\'Asset_Survey\');\n

    \n
    \n
    \n\n\n
    \n out of \n
    \n
    \n\n
    \n minutes left\n
    \n
    \n
    \n\n
    \n\n\n
    \n

    required\'>

    \n\n \n\n \n\n \n \n\n\n \n \n \n \n \n \' id=\'\' size=\'50\' />\n \n \n verbatim\' >\n \n \n \n \n\n \n \n \' value=\'\'>\n \n \n\n \n \n \n \n \n \" id=\"\">
    \n
    \n \n verbatim\'>\n \n \n
    \n
    \n\n \n \n \n \n \n
    \n
    \n \n verbatim\'>\n \n \n
    \n
    \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n button\" value=\"\">\n \n \n button\">\n \n \" id=\"\" value=\"\">\n \n \n \n \n \n verbatim\' name=\'verbatim\'>\n
    \n \n \n \n
    \n button\" value=\"\">\n \n \n button\">\n \n \" id=\"\" value=\"\">\n \n verbatim\' name=\'verbatim\'>\n \n
    \n
    \n\n \n \n \n \' id=\'\'>\n \n \n ^International(\'year\', \'Asset_Survey\');\n -year\' id=\'-year\' type=text size=4>\n ^International(\'month\', \'Asset_Survey\');\n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n \n \n \' id=\'\' type=text>\n button\'>\n
    container\'>
    \n \n
    \n
    \n
    \n\n \n \n\n \n \' name=\'\' value=0>\n \n \n \' name=\'\' value=\"\">\n \n\n \n

    \n
    \n \n show\'>0\n \n \n \n show\'>\n \n
    0  \n
    slider-bg\' tabindex=\'-1\' title=\'Slider\' class=slider-bg>\n \n
    slider-min-thumb\' class=slider-min-thumb>\n \n
    \n \n
    slider-max-thumb\' class=slider-max-thumb>\n \n
    \n
    \n \n \n
    \n \n
    \n\n \n\n \n \n \n\n \n

    \n
    \n | \' name=\'\'> | \n \n
      \n
    slider-bg\' tabindex=\'-1\' title=\'Slider\' class=slider-bg>\n
    slider-thumb\' class=slider-thumb>\n \n
    \n
    \n
    \n
    \n \n\n \n \n \n \n\n \n \n

    Comment:

    \n
    \n\n\n
    \n
    \n
    \n \n \n \n ^International(\'finish\', \'Asset_Survey\');^International(\'continue\', \'Asset_Survey\');\">\n
    \n
    \n\n
    \n\n
    \n\n\n\n\n\n\n','Survey/Take',1,1,'CxMpE_UPauZA3p8jdrOABw',1250243000,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    \n
    \n
    \n\n
    \n

    \n^International(\'restart message\',\'Asset_Survey\');\n

    \n
    \n
    \n\n
    \n out of \n
    \n
    \n\n
    \n minutes left\n
    \n
    \n
    \n
    \n\n
    \n

    required\'>

    \n\n\n\n\n\n\n\n\n\n\' id=\'\' size=\'50\' />\n\n\n verbatim\'>\n\n\n\n\n\n\n\' value=\'\'>\n\n\n\n\n\n\n\n\" id=\"\">
    \n
    \n\nverbatim\'>\n\n\n
    \n
    \n\n\n\n\n\n
    \n
    \n\nverbatim\'>\n\n\n
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \nbutton\" value=\"\">\n\n\nbutton\">\n\n\" id=\"\" value=\"\">\n\n\n\n\n\nverbatim\' name=\'verbatim\'>\n
    \n\n\n\n
    \nbutton\" value=\"\">\n\n\nbutton\">\n\n\" id=\"\" value=\"\">\n\nverbatim\' name=\'verbatim\'>\n\n
    \n
    \n\n\n\n\' id=\'\'>\n\n\n^International(\'year\', \'Asset_Survey\');\n-year\' id=\'-year\' type=text size=4>\n^International(\'month\', \'Asset_Survey\');\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\n\n\' id=\'\' type=text>\nbutton\'>\n
    container\'>
    \n\n
    \n
    \n
    \n\n\n\n\' name=\'\' value=0>\n\n\n\' name=\'\' value=\"\">\n\n\n

    \n
    \n\nshow\'>0\n\n\n\nshow\'>\n\n
    0  \n
    slider-bg\' tabindex=\'-1\' title=\'Slider\' class=slider-bg>\n\n
    slider-min-thumb\' class=slider-min-thumb>\n\n
    \n\n
    slider-max-thumb\' class=slider-max-thumb>\n\n
    \n
    \n\n\n
    \n\n
    \n\n\n\n\n\n

    \n
    \n| \' name=\'\'> | \n\n
      \n
    slider-bg\' tabindex=\'-1\' title=\'Slider\' class=slider-bg>\n
    slider-thumb\' class=slider-thumb>\n\n
    \n
    \n
    \n
    \n\n\n\n\n\n\n

    Comment:

    \n
    \n
    \n
    \n
    \n\n\n\n^International(\'finish\', \'Asset_Survey\');^International(\'continue\', \'Asset_Survey\');\">\n
    \n
    \n
    \n
    ',0,NULL,NULL),('
    \n
    ^International(\'please enter section information\',\'Asset_Survey\');
    \n
    \n
    \n \'>\n \n \n \n
    \n\n

    \n

    ^International(\'section number\',\'Asset_Survey\');\n
    ^International(\'section number description\',\'Asset_Survey\');
    \n
    \n

    \n \n

    \n

    ^International(\'section name\',\'Asset_Survey\');\n
    ^International(\'section name description\',\'Asset_Survey\');
    \n
    \n \' type=text>\n

    \n \n

    \n

    ^International(\'section custom variable name\',\'Asset_Survey\');\n
    ^International(\'section custom variable name description\',\'Asset_Survey\');
    \n
    \n \' name=\'variable\' size=\'2\'>\n

    \n \n \n

    \n

    \n
    ^International(\'jump to\',\'Asset_Survey\');\n
    ^International(\'jump to description\',\'Asset_Survey\');
    \n
    \n
    \n \">\n
    \n
    \n
    \n

    \n\n

    \n

    ^International(\'jump expression\',\'Asset_Survey\');\n
    ^International(\'jump expression description\',\'Asset_Survey\');
    \n
    \n
    \n \n
    \n

    \n \n \n
    \n \n

    \n

    ^International(\'randomize questions\',\'Asset_Survey\');\n
    ^International(\'randomize questions description\',\'Asset_Survey\');
    \n
    \n checked >^International(\'yes\',\'Asset_Survey\');\n checked >^International(\'no\',\'Asset_Survey\');\n

    \n \n\n

    \n

    ^International(\'questions per page\',\'Asset_Survey\');\n
    ^International(\'questions per page description\',\'Asset_Survey\');
    \n
    \n \n

    \n

    \n

    ^International(\'questions on section page\',\'Asset_Survey\');\n
    ^International(\'questions on section page description\',\'Asset_Survey\');
    \n
    \n \n ^International(\'yes\',\'Asset_Survey\');\n ^International(\'no\',\'Asset_Survey\');\n \n ^International(\'yes\',\'Asset_Survey\');\n ^International(\'no\',\'Asset_Survey\');\n \n

    \n \n \n

    \n

    ^International(\'title on every page\',\'Asset_Survey\');\n
    ^International(\'title on every page description\',\'Asset_Survey\');
    \n
    \n \n ^International(\'yes\',\'Asset_Survey\');\n ^International(\'no\',\'Asset_Survey\');\n \n ^International(\'yes\',\'Asset_Survey\');\n ^International(\'no\',\'Asset_Survey\');\n \n

    \n \n

    \n

    ^International(\'text on every page\',\'Asset_Survey\');\n
    ^International(\'text on every page description\',\'Asset_Survey\');
    \n
    \n \n ^International(\'yes\',\'Asset_Survey\');\n ^International(\'no\',\'Asset_Survey\');\n \n ^International(\'yes\',\'Asset_Survey\');\n ^International(\'no\',\'Asset_Survey\');\n \n

    \n \n

    \n

    ^International(\'terminal section\',\'Asset_Survey\');\n
    ^International(\'terminal section description\',\'Asset_Survey\');
    \n
    \n \n ^International(\'yes\',\'Asset_Survey\');\n ^International(\'no\',\'Asset_Survey\');\n \n ^International(\'yes\',\'Asset_Survey\');\n ^International(\'no\',\'Asset_Survey\');\n \n

    \n \n

    \n

    ^International(\'terminal section url\',\'Asset_Survey\');\n
    ^International(\'terminal section url description\',\'Asset_Survey\');
    \n
    \n \'>\n

    \n\n

    \n

    ^International(\'logical section\',\'Asset_Survey\');\n
    ^International(\'logical section help\',\'Asset_Survey\');
    \n
    \n \n ^International(\'yes\',\'Asset_Survey\');\n ^International(\'no\',\'Asset_Survey\');\n \n ^International(\'yes\',\'Asset_Survey\');\n ^International(\'no\',\'Asset_Survey\');\n \n

    \n \n
    \n \n

    \n

    ^International(\'section text\',\'Asset_Survey\');\n
    ^International(\'section text description\',\'Asset_Survey\');
    \n
    \n

    \n
    \n \n
    \n \n
    \n
    \n
    ','Survey/Edit',1,1,'1oBRscNIcFOI-pETrCOspA',1250243000,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    ^International(\'please enter section information\',\'Asset_Survey\');
    \n
    \n
    \n\'>\n\n\n
    \n

    \n

    ^International(\'section number\',\'Asset_Survey\');\n
    ^International(\'section number description\',\'Asset_Survey\');
    \n
    \n

    \n

    \n

    ^International(\'section name\',\'Asset_Survey\');\n
    ^International(\'section name description\',\'Asset_Survey\');
    \n
    \n\' type=text>\n

    \n

    \n

    ^International(\'section custom variable name\',\'Asset_Survey\');\n
    ^International(\'section custom variable name description\',\'Asset_Survey\');
    \n
    \n\' name=\'variable\' size=\'2\'>\n

    \n

    \n

    \n
    ^International(\'jump to\',\'Asset_Survey\');\n
    ^International(\'jump to description\',\'Asset_Survey\');
    \n
    \n
    \n\">\n
    \n
    \n
    \n

    \n

    \n

    ^International(\'jump expression\',\'Asset_Survey\');\n
    ^International(\'jump expression description\',\'Asset_Survey\');
    \n
    \n
    \n\n
    \n

    \n
    \n

    \n

    ^International(\'randomize questions\',\'Asset_Survey\');\n
    ^International(\'randomize questions description\',\'Asset_Survey\');
    \n
    \n checked >^International(\'yes\',\'Asset_Survey\');\n checked >^International(\'no\',\'Asset_Survey\');\n

    \n

    \n

    ^International(\'questions per page\',\'Asset_Survey\');\n
    ^International(\'questions per page description\',\'Asset_Survey\');
    \n
    \n\n

    \n

    \n

    ^International(\'questions on section page\',\'Asset_Survey\');\n
    ^International(\'questions on section page description\',\'Asset_Survey\');
    \n
    \n\n^International(\'yes\',\'Asset_Survey\');\n^International(\'no\',\'Asset_Survey\');\n\n^International(\'yes\',\'Asset_Survey\');\n^International(\'no\',\'Asset_Survey\');\n\n

    \n

    \n

    ^International(\'title on every page\',\'Asset_Survey\');\n
    ^International(\'title on every page description\',\'Asset_Survey\');
    \n
    \n\n^International(\'yes\',\'Asset_Survey\');\n^International(\'no\',\'Asset_Survey\');\n\n^International(\'yes\',\'Asset_Survey\');\n^International(\'no\',\'Asset_Survey\');\n\n

    \n

    \n

    ^International(\'text on every page\',\'Asset_Survey\');\n
    ^International(\'text on every page description\',\'Asset_Survey\');
    \n
    \n\n^International(\'yes\',\'Asset_Survey\');\n^International(\'no\',\'Asset_Survey\');\n\n^International(\'yes\',\'Asset_Survey\');\n^International(\'no\',\'Asset_Survey\');\n\n

    \n

    \n

    ^International(\'terminal section\',\'Asset_Survey\');\n
    ^International(\'terminal section description\',\'Asset_Survey\');
    \n
    \n\n^International(\'yes\',\'Asset_Survey\');\n^International(\'no\',\'Asset_Survey\');\n\n^International(\'yes\',\'Asset_Survey\');\n^International(\'no\',\'Asset_Survey\');\n\n

    \n

    \n

    ^International(\'terminal section url\',\'Asset_Survey\');\n
    ^International(\'terminal section url description\',\'Asset_Survey\');
    \n
    \n\'>\n

    \n

    \n

    ^International(\'logical section\',\'Asset_Survey\');\n
    ^International(\'logical section help\',\'Asset_Survey\');
    \n
    \n\n^International(\'yes\',\'Asset_Survey\');\n^International(\'no\',\'Asset_Survey\');\n\n^International(\'yes\',\'Asset_Survey\');\n^International(\'no\',\'Asset_Survey\');\n\n

    \n
    \n

    \n

    ^International(\'section text\',\'Asset_Survey\');\n
    ^International(\'section text description\',\'Asset_Survey\');
    \n
    \n

    \n
    \n\n
    \n
    \n
    \n
    ',0,NULL,NULL),('
    \n
    ^International(\'please enter question information\',\'Asset_Survey\');
    \n
    \n
    \n \'>\n \n \n \n \n \n
    \n \n

    \n

    ^International(\'question number\',\'Asset_Survey\');\n
    ^International(\'question number description\',\'Asset_Survey\');
    \n
    \n \n

    \n \n

    \n

    ^International(\'question variable name\',\'Asset_Survey\');\n
    ^International(\'question variable name description\',\'Asset_Survey\');
    \n
    \n \' name=\'variable\' size=\'2\'>\n

    \n \n

    \n

    ^International(\'question type\',\'Asset_Survey\');\n
    ^International(\'question type description\',\'Asset_Survey\');
    \n
    \n \n

    \n \n

    \n

    ^International(\'question score\',\'Asset_Survey\');\n
    ^International(\'question score description\',\'Asset_Survey\');
    \n
    \n \' name=\'value\'>\n

    \n \n

    \n

    ^International(\'required label\',\'Asset_Survey\');\n
    ^International(\'required description\',\'Asset_Survey\');
    \n
    \n checked >^International(\'yes\',\'Asset_Survey\');\n checked >^International(\'no\',\'Asset_Survey\');\n

    \n \n

    \n

    ^International(\'randomize answers\',\'Asset_Survey\');\n
    ^International(\'randomize answers description\',\'Asset_Survey\');
    \n
    \n checked >^International(\'yes\',\'Asset_Survey\');\n checked >^International(\'no\',\'Asset_Survey\');\n

    \n

    \n

    ^International(\'vertical display\',\'Asset_Survey\');\n
    ^International(\'vertical display description\',\'Asset_Survey\');
    \n
    \n checked >^International(\'yes\',\'Asset_Survey\');\n checked >^International(\'no\',\'Asset_Survey\');\n

    \n \n\n\n
    \n\n

    \n

    ^International(\'show text in button\',\'Asset_Survey\');\n
    ^International(\'show text in button description\',\'Asset_Survey\');
    \n
    \n checked >^International(\'yes\',\'Asset_Survey\');\n checked >^International(\'no\',\'Asset_Survey\');\n

    \n \n

    \n

    ^International(\'allow comment\',\'Asset_Survey\');\n
    ^International(\'allow comment description\',\'Asset_Survey\');
    \n
    \n checked >^International(\'yes\',\'Asset_Survey\');\n checked >^International(\'no\',\'Asset_Survey\');\n

    \n \n

    \n

    ^International(\'comment cols\',\'Asset_Survey\');\n
    ^International(\'cols description\',\'Asset_Survey\');
    \n
    \n \' name=\'commentCols\'>\n

    \n \n

    \n

    ^International(\'comment rows\',\'Asset_Survey\');\n
    ^International(\'rows description\',\'Asset_Survey\');
    \n
    \n \' name=\'commentRows\'> \n

    \n \n

    \n

    ^International(\'maximum number of answers\',\'Asset_Survey\');\n
    ^International(\'maximum number of answers description\',\'Asset_Survey\');
    \n
    \n \' name=\'maxAnswers\' size=\'2\'>\n

    \n\n\n
    \n\n

    \n

    \n
    ^International(\'jump to\',\'Asset_Survey\');\n
    ^International(\'jump to description\',\'Asset_Survey\');
    \n
    \n
    \n \">\n
    \n
    \n
    \n

    \n\n

    \n

    ^International(\'jump expression\',\'Asset_Survey\');\n
    ^International(\'jump expression description\',\'Asset_Survey\');
    \n
    \n
    \n \n
    \n

    \n\n \n
    \n \n

    \n

    ^International(\'question text\',\'Asset_Survey\');\n
    ^International(\'question text description\',\'Asset_Survey\');
    \n
    \n

    \n
    \n \n
    \n
    \n
    \n
    \n','Survey/Edit',1,1,'wAc4azJViVTpo-2NYOXWvg',1250243000,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    ^International(\'please enter question information\',\'Asset_Survey\');
    \n
    \n
    \n\'>\n\n\n\n\n\n
    \n

    \n

    ^International(\'question number\',\'Asset_Survey\');\n
    ^International(\'question number description\',\'Asset_Survey\');
    \n
    \n\n

    \n

    \n

    ^International(\'question variable name\',\'Asset_Survey\');\n
    ^International(\'question variable name description\',\'Asset_Survey\');
    \n
    \n\' name=\'variable\' size=\'2\'>\n

    \n

    \n

    ^International(\'question type\',\'Asset_Survey\');\n
    ^International(\'question type description\',\'Asset_Survey\');
    \n
    \n\n

    \n

    \n

    ^International(\'question score\',\'Asset_Survey\');\n
    ^International(\'question score description\',\'Asset_Survey\');
    \n
    \n\' name=\'value\'>\n

    \n

    \n

    ^International(\'required label\',\'Asset_Survey\');\n
    ^International(\'required description\',\'Asset_Survey\');
    \n
    \n checked >^International(\'yes\',\'Asset_Survey\');\n checked >^International(\'no\',\'Asset_Survey\');\n

    \n

    \n

    ^International(\'randomize answers\',\'Asset_Survey\');\n
    ^International(\'randomize answers description\',\'Asset_Survey\');
    \n
    \n checked >^International(\'yes\',\'Asset_Survey\');\n checked >^International(\'no\',\'Asset_Survey\');\n

    \n

    \n

    ^International(\'vertical display\',\'Asset_Survey\');\n
    ^International(\'vertical display description\',\'Asset_Survey\');
    \n
    \n checked >^International(\'yes\',\'Asset_Survey\');\n checked >^International(\'no\',\'Asset_Survey\');\n

    \n
    \n

    \n

    ^International(\'show text in button\',\'Asset_Survey\');\n
    ^International(\'show text in button description\',\'Asset_Survey\');
    \n
    \n checked >^International(\'yes\',\'Asset_Survey\');\n checked >^International(\'no\',\'Asset_Survey\');\n

    \n

    \n

    ^International(\'allow comment\',\'Asset_Survey\');\n
    ^International(\'allow comment description\',\'Asset_Survey\');
    \n
    \n checked >^International(\'yes\',\'Asset_Survey\');\n checked >^International(\'no\',\'Asset_Survey\');\n

    \n

    \n

    ^International(\'comment cols\',\'Asset_Survey\');\n
    ^International(\'cols description\',\'Asset_Survey\');
    \n
    \n\' name=\'commentCols\'>\n

    \n

    \n

    ^International(\'comment rows\',\'Asset_Survey\');\n
    ^International(\'rows description\',\'Asset_Survey\');
    \n
    \n\' name=\'commentRows\'> \n

    \n

    \n

    ^International(\'maximum number of answers\',\'Asset_Survey\');\n
    ^International(\'maximum number of answers description\',\'Asset_Survey\');
    \n
    \n\' name=\'maxAnswers\' size=\'2\'>\n

    \n
    \n

    \n

    \n
    ^International(\'jump to\',\'Asset_Survey\');\n
    ^International(\'jump to description\',\'Asset_Survey\');
    \n
    \n
    \n\">\n
    \n
    \n
    \n

    \n

    \n

    ^International(\'jump expression\',\'Asset_Survey\');\n
    ^International(\'jump expression description\',\'Asset_Survey\');
    \n
    \n
    \n\n
    \n

    \n
    \n

    \n

    ^International(\'question text\',\'Asset_Survey\');\n
    ^International(\'question text description\',\'Asset_Survey\');
    \n
    \n

    \n
    \n\n
    \n
    \n
    \n
    ',0,NULL,NULL),('
    \n
    ^International(\'please enter answer information\',\'Asset_Survey\');
    \n
    \n
    \n \'>\n \n \n \n \n \n
    \n \n

    \n

    ^International(\'answer number\',\'Asset_Survey\');\n
    ^International(\'answer number description\',\'Asset_Survey\');
    \n
    \n \n

    \n \n

    \n

    ^International(\'recorded answer\',\'Asset_Survey\');\n
    ^International(\'recorded answer description\',\'Asset_Survey\');
    \n
    \n \' name=\'recordedAnswer\'>\n

    \n \n

    \n

    ^International(\'answer score\',\'Asset_Survey\');\n
    ^International(\'answer score description\',\'Asset_Survey\');
    \n
    \n \' name=\'value\'>\n

    \n \n

    \n

    ^International(\'verbatim label\',\'Asset_Survey\');\n
    ^International(\'verbatim description\',\'Asset_Survey\');
    \n
    \n ^International(\'checked\',\'Asset_Survey\');>^International(\'yes\',\'Asset_Survey\');\n ^International(\'checked\',\'Asset_Survey\');>^International(\'no\',\'Asset_Survey\');\n

    \n \n

    \n

    ^International(\'min label\',\'Asset_Survey\');\n
    ^International(\'min description\',\'Asset_Survey\');
    \n
    \n \' name=\'min\' size=\'2\'>\n

    \n \n

    \n

    ^International(\'max label\',\'Asset_Survey\');\n
    ^International(\'max description\',\'Asset_Survey\');
    \n
    \n \' name=\'max\' size=\'2\'>\n

    \n \n

    \n

    ^International(\'step label\',\'Asset_Survey\');\n
    ^International(\'step description\',\'Asset_Survey\');
    \n
    \n \' name=\'step\' size=\'2\'>\n

    \n\n
    \n \n \n

    \n

    ^International(\'textCols label\',\'Asset_Survey\');\n
    ^International(\'cols description\',\'Asset_Survey\');
    \n
    \n \' name=\'textCols\'>\n

    \n \n

    \n

    ^International(\'textRows label\',\'Asset_Survey\');\n
    ^International(\'rows description\',\'Asset_Survey\');
    \n
    \n \' name=\'textRows\'>\n

    \n \n

    \n

    ^International(\'is this the correct answer\',\'Asset_Survey\');\n
    ^International(\'is this the correct answer description\',\'Asset_Survey\');
    \n
    \n checked>^International(\'yes\',\'Asset_Survey\');\n checked>^International(\'no\',\'Asset_Survey\');\n

    \n \n

    \n

    \n
    ^International(\'jump to\',\'Asset_Survey\');\n
    ^International(\'jump to description\',\'Asset_Survey\');
    \n
    \n
    \n \">\n
    \n
    \n
    \n

    \n \n

    \n

    ^International(\'jump expression\',\'Asset_Survey\');\n
    ^International(\'jump expression description\',\'Asset_Survey\');
    \n
    \n
    \n \n
    \n

    \n \n
    \n \n

    \n

    ^International(\'answer text\',\'Asset_Survey\');\n
    ^International(\'answer text description\',\'Asset_Survey\');
    \n
    \n

    \n
    \n \n
    \n \n
    \n
    \n
    \n','Survey/Edit',1,1,'AjhlNO3wZvN5k4i4qioWcg',1250243000,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    ^International(\'please enter answer information\',\'Asset_Survey\');
    \n
    \n
    \n\'>\n\n\n\n\n
    \n

    \n

    ^International(\'answer number\',\'Asset_Survey\');\n
    ^International(\'answer number description\',\'Asset_Survey\');
    \n
    \n\n

    \n

    \n

    ^International(\'recorded answer\',\'Asset_Survey\');\n
    ^International(\'recorded answer description\',\'Asset_Survey\');
    \n
    \n\' name=\'recordedAnswer\'>\n

    \n

    \n

    ^International(\'answer score\',\'Asset_Survey\');\n
    ^International(\'answer score description\',\'Asset_Survey\');
    \n
    \n\' name=\'value\'>\n

    \n

    \n

    ^International(\'verbatim label\',\'Asset_Survey\');\n
    ^International(\'verbatim description\',\'Asset_Survey\');
    \n
    \n^International(\'checked\',\'Asset_Survey\');>^International(\'yes\',\'Asset_Survey\');\n^International(\'checked\',\'Asset_Survey\');>^International(\'no\',\'Asset_Survey\');\n

    \n

    \n

    ^International(\'min label\',\'Asset_Survey\');\n
    ^International(\'min description\',\'Asset_Survey\');
    \n
    \n\' name=\'min\' size=\'2\'>\n

    \n

    \n

    ^International(\'max label\',\'Asset_Survey\');\n
    ^International(\'max description\',\'Asset_Survey\');
    \n
    \n\' name=\'max\' size=\'2\'>\n

    \n

    \n

    ^International(\'step label\',\'Asset_Survey\');\n
    ^International(\'step description\',\'Asset_Survey\');
    \n
    \n\' name=\'step\' size=\'2\'>\n

    \n
    \n

    \n

    ^International(\'textCols label\',\'Asset_Survey\');\n
    ^International(\'cols description\',\'Asset_Survey\');
    \n
    \n\' name=\'textCols\'>\n

    \n

    \n

    ^International(\'textRows label\',\'Asset_Survey\');\n
    ^International(\'rows description\',\'Asset_Survey\');
    \n
    \n\' name=\'textRows\'>\n

    \n

    \n

    ^International(\'is this the correct answer\',\'Asset_Survey\');\n
    ^International(\'is this the correct answer description\',\'Asset_Survey\');
    \n
    \nchecked>^International(\'yes\',\'Asset_Survey\');\nchecked>^International(\'no\',\'Asset_Survey\');\n

    \n

    \n

    \n
    ^International(\'jump to\',\'Asset_Survey\');\n
    ^International(\'jump to description\',\'Asset_Survey\');
    \n
    \n
    \n\">\n
    \n
    \n
    \n

    \n

    \n

    ^International(\'jump expression\',\'Asset_Survey\');\n
    ^International(\'jump expression description\',\'Asset_Survey\');
    \n
    \n
    \n\n
    \n

    \n
    \n

    \n

    ^International(\'answer text\',\'Asset_Survey\');\n
    ^International(\'answer text description\',\'Asset_Survey\');
    \n
    \n

    \n
    \n\n
    \n
    \n
    \n
    ',0,NULL,NULL),('Dear ,\r\n\r\nYour responses for the Survey have expired and have been deleted. \r\n\r\nSincerely,\r\n\r\n','ExpireIncompleteSurveyResponses',1,1,'ExpireIncResptmpl00001',1250243000,'WebGUI::Asset::Template::HTMLTemplate',1,'Dear ,\nYour responses for the Survey have expired and have been deleted.\nSincerely,\n',0,NULL,NULL),('
    \r\n \r\n

    \r\n Survey Summary Total Sections: Total Questions: Total Answers: \r\n

    \r\n

    \r\n Total Correct: Total Incorrect: \r\n

    \r\n

    \r\n

    \r\n

    \r\n \r\n
    \r\n
    \r\n Section: Correct: Incorrect: \r\n chart\'>\r\n
    \r\n
    datatable\'>
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n
    \r\n
    \r\n','Survey/Summary',1,1,'7F-BuEHi7t9bPi008H8xZQ',1250243000,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n

    \nSurvey Summary Total Sections: Total Questions: Total Answers: \n

    \n

    \nTotal Correct: Total Incorrect: \n

    \n

    \n

    \n

    \n\n
    \n
    \nSection: Correct: Incorrect: \nchart\'>\n
    \n
    datatable\'>
    \n
    \n
    \n\n\n\n
    \n
    ',0,NULL,NULL),('\n\n\n

    failpass\">^International(\'test results\', \'Asset_Survey\'); - \n ^International(\'fail\', \'Asset_Survey\');^International(\'pass\', \'Asset_Survey\');

    \n

    Tests=, Passed=, Failed=,

    \n \n \n \n \n \n \n \n failpass \">\n \n \n \n \n \n \n \n \n \n
    ^International(\'test name\', \'Asset_Survey\');^International(\'tests run\', \'Asset_Survey\');^International(\'tests passed\', \'Asset_Survey\');^International(\'tests failed\', \'Asset_Survey\');^International(\'test result\', \'Asset_Survey\');
    ^International(\'fail\', \'Asset_Survey\');^International(\'pass\', \'Asset_Survey\');\">^International(\'575\', \'WebGUI\');\">^International(\'run test\', \'Asset_Survey\');
    \n\n

    ^International(\'details\', \'Asset_Survey\');

    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    all_passed
    get_status
    failed
    parse_errors
    passed
    skipped
    todo
    todo_passed
    wait
    exit
    total
    has_problems
    has_errors
    \n\n\n\n

    failpass\">^International(\'test results\', \'Asset_Survey\'); - \n ^International(\'fail\', \'Asset_Survey\');^International(\'pass\', \'Asset_Survey\');

    \n \n \n \n passfail \">\n \n \n
    \n
    \n \n

    ^International(\'details\', \'Asset_Survey\');

    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    passed
    failed
    actual_passed
    actual_failed
    todo
    todo_passed
    skipped
    plan
    tests_planned
    tests_run
    skip_all
    has_problems
    exit
    wait
    \n\n
    ','Survey/TestResults',1,1,'S3zpVitAmhy58CAioH359Q',1250243000,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    failpass\">^International(\'test results\', \'Asset_Survey\'); -\n^International(\'fail\', \'Asset_Survey\');^International(\'pass\', \'Asset_Survey\');

    \n

    Tests=, Passed=, Failed=,

    \n\n\n\n\n\n\n\nfailpass \">\n\n\n\n\n\n\n\n\n\n
    ^International(\'test name\', \'Asset_Survey\');^International(\'tests run\', \'Asset_Survey\');^International(\'tests passed\', \'Asset_Survey\');^International(\'tests failed\', \'Asset_Survey\');^International(\'test result\', \'Asset_Survey\');
    ^International(\'fail\', \'Asset_Survey\');^International(\'pass\', \'Asset_Survey\');\">^International(\'575\', \'WebGUI\');\">^International(\'run test\', \'Asset_Survey\');
    \n

    ^International(\'details\', \'Asset_Survey\');

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    all_passed
    get_status
    failed
    parse_errors
    passed
    skipped
    todo
    todo_passed
    wait
    exit
    total
    has_problems
    has_errors
    \n\n

    failpass\">^International(\'test results\', \'Asset_Survey\'); -\n^International(\'fail\', \'Asset_Survey\');^International(\'pass\', \'Asset_Survey\');

    \n\n\npassfail \">\n\n\n
    \n
    \n

    ^International(\'details\', \'Asset_Survey\');

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    passed
    failed
    actual_passed
    actual_failed
    todo
    todo_passed
    skipped
    plan
    tests_planned
    tests_run
    skip_all
    has_problems
    exit
    wait
    \n
    ',0,NULL,NULL),('
    \n\n \n ^International(\'response complete\', \'Asset_Survey\'); on \n \n\n \n ^International(\'response restart\', \'Asset_Survey\'); on \n \n\n \n ^International(\'response timeout\', \'Asset_Survey\'); on \n \n\n \n ^International(\'response timeout restart\', \'Asset_Survey\'); on \n \n\n
    \n\n','Survey/Feedback',1,1,'nWNVoMLrMo059mDRmfOp9g',1250243000,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n^International(\'response complete\', \'Asset_Survey\'); on \n\n\n^International(\'response restart\', \'Asset_Survey\'); on \n\n\n^International(\'response timeout\', \'Asset_Survey\'); on \n\n\n^International(\'response timeout restart\', \'Asset_Survey\'); on \n\n
    ',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n\n \n\n\n

    \n \n \">\n |\n \n \n \">^International(my subscriptions,Asset_Newsletter);\n |\n \n \">\n

    \n\n

    \n\n\n

    \">
    \n

    \n\n\n\n
    \n \n
    \n
    \n','Collaboration',1,1,'newslettercs0000000001',1252682678,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n\n\n

    \n\n\">\n|\n\n\n\">^International(my subscriptions,Asset_Newsletter);\n|\n\n\">\n

    \n

    \n\n

    \">
    \n

    \n\n\n
    \n\n
    \n
    ',0,NULL,NULL),('
    \n
    \n\n

    \n
    \n ^International(member since,Account_Inbox); ^D(%z,);\n

    \n \n

    \n \n \n \" class=\"prevNext\">\"Previous\" \n \"> \n  \" class=\"prevNext\">\"Next\"\n \n \n \n

    \n \n \n \n \n \n \n \n \n \n \n \n \n WGoddThreadWGevenThread\">\n \n \n \n \n \n \n \n \n \n \n \n
    \">^International(title label,Account_Contributions);\">^International(type label,Account_Contributions);\">^International(date label,Account_Contributions);
    \">^D(,);
    ^International(no contributions,Account_Contributions);
    \n \n

    \n \n \n \" class=\"prevNext\">\"Previous\" \n \"> \n  \" class=\"prevNext\">\"Next\"\n \n \n \n

    \n \n \n

    ^International(contribution count,\'Account_Contributions\');

    \n
    \n
    ','Account/Contrib/View',1,1,'1IzRpX0tgW7iuCfaU2Kk0A',1250243000,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    \n

    \n
    \n^International(member since,Account_Inbox); ^D(%z,);\n

    \n

    \n\n\n\" class=\"prevNext\">\"Previous\" \n\"> \n \" class=\"prevNext\">\"Next\"\n\n\n\n

    \n\n\n\n\n\n\n\n\n\n\n\nWGoddThreadWGevenThread\">\n\n\n\n\n\n\n\n\n\n\n\n
    \">^International(title label,Account_Contributions);\">^International(type label,Account_Contributions);\">^International(date label,Account_Contributions);
    \">^D(,);
    ^International(no contributions,Account_Contributions);
    \n

    \n\n\n\" class=\"prevNext\">\"Previous\" \n\"> \n \" class=\"prevNext\">\"Next\"\n\n\n\n

    \n

    ^International(contribution count,\'Account_Contributions\');

    \n
    \n
    ',0,NULL,NULL),('','StoryArchive/KeywordList',1,1,'0EAJ9EYb9ap2XwfrcXfdLQ',1250243000,'WebGUI::Asset::Template::HTMLTemplate',1,'',0,NULL,NULL),('\r\n\r\n\r\n\r\n\r\n

    \r\n
    \r\n\r\n\r\n\r\n\r\n
    \r\n\">^International(continue shopping button,Shop);
    \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
    (add $)
    Hide?
    \r\n\r\n\r\n\r\n
    \r\n','ThingyRecord/View',1,1,'TKmhv8boP3TD2xwSwUBq0g',1250243000,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n

    \n
    \n\n\n
    \n\">^International(continue shopping button,Shop);
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    (add $)
    Hide?
    \n\n\n
    ',0,NULL,NULL),('\n
    \">\n
    \n\n
    \n
    \n
    \n ^International(member since,Account_Inbox); ^D(%z,);\n
    \n\n \n

    \n
    \n \n \n \n \n \n \n
    *
    \n \n \n
    \n\n
    \n
    \n
    ','Account/Profile/Edit',1,1,'75CmQgpcCSkdsL-oawdn3Q',1253555614,'WebGUI::Asset::Template::HTMLTemplate',1,'\n
    \">\n
    \n
    \n
    \n
    \n^International(member since,Account_Inbox); ^D(%z,);\n
    \n\n

    \n
    \n\n\n\n\n\n\n
    *
    \n
    \n
    \n
    \n
    ',0,NULL,NULL),('
    \n

    \n\n \n\n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n\n
    \n
    \n\n >\n >\n\n
    ','Survey/Take',1,1,'d8jMMMRddSQ7twP4l1ZSIw',1253555614,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n
    \n>\n>\n
    ',0,NULL,NULL),('\" id=\"id\">\n

    \n
    \n

    \n\n\n\n\n\">\n\n>\n\n

    \n


    \n\n

    \n

    \n

    ^International(last updated,Asset); ^International(ago,Asset_Story);

    \n

    ^International(by,Asset_Collaboration);

    \n


    \n\n \n \n \n
    \n \">\" alt=\"\" title=\"\" />

    \n ^International(Source,Asset_Story);: \n \n \n

      \n \n
    1. style=\"width:px;\">\n
      \n \">\" alt=\"\" title=\"\" />
      \n ^International(Source,Asset_Story);: \n
    2. \n
      \n
    \n \n \n \n\n

    \n

    ^International(keywords,Asset); \">

    \n
    ','Story',1,1,'3QpYtHrq_jmAk1FNutQM5A',1253636379,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n

    \n
    \n

    \n\n\n\n\n\">\n\n>\n\n

    \n


    \n\n

    \n

    \n

    ^International(last updated,Asset); ^International(ago,Asset_Story);

    \n

    ^International(by,Asset_Collaboration);

    \n


    \n\n\n\n\n
    \n\">\" alt=\"\" title=\"\" />

    \n^International(Source,Asset_Story);: \n\n\n

      \n\n
    1. style=\"width:px;\">\n
      \n\">\" alt=\"\" title=\"\" />
      \n^International(Source,Asset_Story);: \n
    2. \n
      \n
    \n\n\n\n\n

    \n

    ^International(keywords,Asset); \">

    \n
    ',0,NULL,NULL),('
    \" class=\"storyArchive\">\n\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n\n
    \n
    \n\n\n\n
      \n

      ^D(%c %D %y,);

      \n \n
    • \"> ^D(%Z,);
    • \n
      \n
    \n\n\n
      \n
    • \n\n class=\"active\">\n \">\n \n\n
    • \n
    \n
    \n\n\n
    ','StoryArchive',1,1,'yxD5ka7XHebPLD-LXBwJqw',1253635396,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"storyArchive\">\n\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n
    \n
    \n\n
      \n

      ^D(%c %D %y,);

      \n\n
    • \"> ^D(%Z,);
    • \n
      \n
    \n\n
      \n
    • \n\n class=\"active\">\n\">\n\n\n
    • \n
    \n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"viewStoryTopic\">\n\" id=\"id\">\n

    \n

    \n\n\n\n\n\">\n\n>\n\n

    \n

    \n

    \n

    ^International(last updated,Asset); ^International(ago,Asset_Story);

    \n
    \n
    \n\n \n \n \n
    \n \">\" alt=\"\" title=\"\" />

    \n ^International(Source,Asset_Story);: \n \n \n
      \n \n
    1. style=\"width:px;\">\n
      \n \">\" alt=\"\" title=\"\" />
      \n ^International(Source,Asset_Story);: \n
    2. \n
      \n
    \n \n
    \n \n\n
    \n

    ^International(by,Asset_Collaboration);

    \n \n \n
    \n

    ^International(keywords,Asset); \">

    \n
    \n','Story',1,1,'TbDcVLbbznPi0I0rxQf2CQ',1253636379,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"viewStoryTopic\">\n\" id=\"id\">\n

    \n

    \n\n\n\n\n\">\n\n>\n\n

    \n

    \n

    \n

    ^International(last updated,Asset); ^International(ago,Asset_Story);

    \n
    \n
    \n\n\n\n\n
    \n\">\" alt=\"\" title=\"\" />

    \n^International(Source,Asset_Story);: \n\n\n
      \n\n
    1. style=\"width:px;\">\n
      \n\">\" alt=\"\" title=\"\" />
      \n^International(Source,Asset_Story);: \n
    2. \n
      \n
    \n\n
    \n\n\n
    \n

    ^International(by,Asset_Collaboration);

    \n\n\n
    \n

    ^International(keywords,Asset); \">

    \n
    ',0,NULL,NULL),('\n\n\n
    \n\" class=\"WGprofile_displayView\">^International(\'back to profile label\',\'Account_Profile\');\n
    \n
    \n
    \n \n
    \n \n \n
    \n
    \n \n
    * -  ^International(\'required field\',Account_Profile);
    † - ^International(\'set by admin\',Account_Profile);
    \n
    \n
    \n
    \n
    \n
    \n','Account/Layout',1,1,'FJbUTvZ2nUTn65LpW6gjsA',1256092369,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n
    \n\" class=\"WGprofile_displayView\">^International(\'back to profile label\',\'Account_Profile\');\n
    \n
    \n
    \n\n
    \n\n\n
    \n
    \n\n
    * -  ^International(\'required field\',Account_Profile);
    † - ^International(\'set by admin\',Account_Profile);
    \n
    \n
    \n
    \n
    \n
    \n',0,NULL,NULL),('\n\n\n\n','EMS/LookupRegistrant',1,1,'OOyMH33plAy6oCj_QWrxtg',1257311886,'WebGUI::Asset::Template::HTMLTemplate',1,'\n',0,NULL,NULL),('\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','EMS/PrintBadge',1,1,'PsFn7dJt4wMwBa8hiE3hOA',1257311886,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n\n
    \n
    \n\n
    \n
    \n\n\n, \n
    \n
    \n\n
    \n
    \n\n',0,NULL,NULL),('\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','EMS/PrintTicket',1,1,'yBwydfooiLvhEFawJb0VTQ',1257311887,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n\n
    \n
    \n: \n
    \n
    \n\n / \n
    \n
    \n: \n
    \n
    \n\n',0,NULL,NULL),('\n

    \n
    \n\n

    \n
    \n\n

    \n
    \n\n\n
    \n
    \n
    \n
    \n
    \n
    \n\n\">^International(schedule back link,Asset_EventManagementSystem);\n\n\n','EMS/Schedule',1,1,'S2_LsvVa95OSqc66ITAoig',1257311887,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n

    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n\">^International(schedule back link,Asset_EventManagementSystem);\n',0,NULL,NULL),('\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','EMS/PrintRemainingTickets',1,1,'hreA_bgxiTX-EzWCSZCZJw',1257311887,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n\n
    \n\n
    \n
    \n: \n
    \n
    \n\n / \n
    \n
    \n
    \n
    \n\n',0,NULL,NULL),('\" id=\"id\">\n\n

    \n
    \n\n\n

    \n
    \n\n\n
      \n\n
    • \n\n
    \n
    \n\n\n
    \n \n
    \n
    \n\n\n
    \n \">\n • \">\n \n • \">\n \n \n • \">\n • \">\n \n
    \n
    \n\n\n\n\n \n \n \n\n\n \n \n \n \n\n\n
    \n \n \n *\n \n \n \n \n \n \n
    \n
    ^International(template captcha label,Asset_DataForm);
    \n\n\n','DataForm',1,1,'PBtmpl0000000000000020',1257311887,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n
      \n\n
    • \n\n
    \n
    \n\n
    \n\n
    \n
    \n\n
    \n\">\n• \">\n\n• \">\n\n\n• \">\n• \">\n\n
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\n*\n\n\n\n\n\n\n
    \n
    ^International(template captcha label,Asset_DataForm);
    \n',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n\n
    \n \n
    \n\n\n\n\n \n \n\n\n
    \n

    \n\" class=\"backLabel\">\n\n\n','DataForm',1,1,'PBtmpl0000000000000104',1257311888,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n
    \n\n
    \n\n\n\n\n\n\n\n
    \n

    \n\" class=\"backLabel\">',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n\n
      \n \n
    • \n
      \n
    \n
    \n\n\n
    \n \n
    \n
    \n\n\n
    \n \">\n • \">\n \n • \">\n \n \n • \">\n • \">\n \n
    \n
    \n\n\n
    \n \n )\" id=\"tab\" class=\"tab\">\n \n \n \n \n \n \n \n
    \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n \n \n \n \n \n *\n \n \n \n \n \n \n \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n^International(template captcha label,Asset_DataForm);
    \n\n\n\n','DataForm',1,1,'PBtmpl0000000000000116',1257311888,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n
      \n\n
    • \n
      \n
    \n
    \n\n
    \n\n
    \n
    \n\n
    \n\">\n• \">\n\n• \">\n\n\n• \">\n• \">\n\n
    \n
    \n\n
    \n\n)\" id=\"tab\" class=\"tab\">\n\n\n\n\n\n\n\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\n\n\n\n\n*\n\n\n\n\n\n\n\n
    \n\n
    \n
    \n\n
    \n
    \n\n
    \n^International(template captcha label,Asset_DataForm);
    \n\n\n',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n\n
      \n \n
    • \n
      \n
    \n
    \n\n\n \n

    \n\n\n\n

    \n \">\n • \">\n \n • \" onclick=\"\">\n \n \n • \" onclick=\"\">\n \n \n • \">\n • \">\n \n
    \n
    \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n \n \n \n \n \n *\n \n \n \n \n \n \n \n
    \n \n
    \n
    ^International(template captcha label,Asset_DataForm);
    \n
    \n\n\n\n','DataForm',1,1,'PBtmpl0000000000000141',1257311888,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n
      \n\n
    • \n
      \n
    \n
    \n\n\n

    \n\n\n

    \n\">\n• \">\n\n• \" onclick=\"\">\n\n\n• \" onclick=\"\">\n\n\n• \">\n• \">\n\n
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\n\n\n\n\n*\n\n\n\n\n\n\n\n
    \n\n
    \n
    ^International(template captcha label,Asset_DataForm);
    \n
    \n\n',0,NULL,NULL),('\r\n \">\r\n\r\n\">\r\n','Macro/PickLanguage',1,1,'_aE16Rr1-bXBf8SIaLZjCg',1257311888,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\">\n\n\">',0,NULL,NULL),('\r\n\r\n\r\n \r\n ^Page(\"title\"); - WebGUI\r\n \r\n \r\n\r\n\r\n\r\n\r\n\r\n\r\n ^AdminBar;\r\n
    \r\n\r\n ^AssetProxy(flexmenu);\r\n\r\n
    \r\n \r\n\r\n
      \r\n
    • ^H;
    • \r\n
    • ^a(^@;);
    • \r\n
    • ^LoginToggle;
    • \r\n ^GroupText(Turn Admin On,
    • ^AdminToggle;
    • );\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','style',0,1,'PBtmpl0000000000000060',1258524916,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n^Page(\"title\"); - WebGUI\n\n\n\n\n\n\n\n\n^AdminBar;\n
    \n^AssetProxy(flexmenu);\n
    \n\n
      \n
    • ^H;
    • \n
    • ^a(^@;);
    • \n
    • ^LoginToggle;
    • \n^GroupText(Turn Admin On,
    • ^AdminToggle;
    • );\n
    \n\n
    \n\n
    \n\n\n\n\n\n',0,NULL,NULL),('\r\n\r\n\r\n WebGUI <tmpl_var session.webgui.version>-<tmpl_var session.webgui.status> ^International(admin console,AdminConsole);\r\n \r\n \r\n \r\n\r\n\r\n \r\n\r\n','style',1,0,'PBtmpl0000000000000137',1258524916,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\nWebGUI <tmpl_var session.webgui.version>-<tmpl_var session.webgui.status> ^International(admin console,AdminConsole);\n\n\n\n\n\n\n\n',0,NULL,NULL),('','style',0,0,'PBtmpl0000000000000132',1258524916,'WebGUI::Asset::Template::HTMLTemplate',1,'',0,NULL,NULL),('\r\n\r\n\r\n \r\n ^Page(title); - ^c();\r\n \r\n \r\n \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n ^AdminBar();\r\n\r\n \r\n\r\n ^AdminToggle();\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n','style',1,1,'PBtmplBlankStyle000001',1258524916,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n^Page(title); - ^c();\n\n\n\n\n\n\n\n\n\n^AdminBar();\n\n^AdminToggle();\n\n\n\n\n\n',0,NULL,NULL),('
    \" class=\"nav dropMenu\">\n\n\" id=\"id\">\n\n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n
    \n\n

    \n\n

    \n
    \n\n\n\n\n
    \n','Navigation',1,1,'PBtmpl0000000000000117',1259133274,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"nav dropMenu\">\n\" id=\"id\">\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n
    \n\n

    \n\n

    \n
    \n\n\n
    ',0,NULL,NULL),('
    \" class=\"nav synopsisMenu\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n\n
    \n \n
    current\">\">
    \n
    \">
    \n
    \n
    \n
    \n\n\n
    \n','Navigation',1,1,'PBtmpl0000000000000136',1259133274,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"nav synopsisMenu\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n
    \n\n
    current\">\">
    \n
    \">
    \n
    \n
    \n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"nav crumbTrail\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n\n \n \n \"> >\n \n \n\n\n\n
    \n','Navigation',1,1,'PBtmpl0000000000000093',1259133274,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"nav crumbTrail\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n\n\n\"> >\n\n\n\n\n
    ',0,NULL,NULL),('
    \" class=\"syndicated articles\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n\n

    \">

    \n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n\n \n\n\n\n
    \n','SyndicatedContent',1,1,'GNvjCFQWjY2AF2uf0aCM8Q',1259133274,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"syndicated articles\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n

    \">

    \n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n\n\n\n
    ',0,NULL,NULL),('
    \" class=\"layout oneovertwo\">\n \n \" id=\"id\">\n\n \n \n \n\n \n

    \n \n

    \n
    \n\n \n
    \n \n \n
    \n
    \n \n \n
    \n \n \n \n \n \n\n \n \n \">\n \n \n \n \n\n \n \n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n \n\n \n \n \n \n
    \n
    \n
    \n\n \n
    \n\n \n
    \n \n \n \n \n \n\n \n \n \">\n \n \n \n \n\n \n \n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n \n\n \n \n \n \n
    \n
    \n
    \n\n \n
    \n\n \n
    \n \n \n \n \n \n\n \n \n \">\n \n \n \n \n\n \n \n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n \n\n \n \n\n \n
    \n
    \n
    \n\n \n
    \n\n
    \n\n \n \n \n \n \n
    \n
     
    \n
    \n \n
    \n\n\n
    \n','Layout',1,1,'-PkdI8l1idu-8gDX3iOdcw',1259133274,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"layout oneovertwo\">\n\" id=\"id\">\n\n\n\n\n

    \n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n
    \n\n\n\n\n\n\n\">\n\n\n\n\n\n\n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n\n\n\n\n
    \n
    \n
    \n\n
    \n\n
    \n\n\n\n\n\n\n\">\n\n\n\n\n\n\n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n\n\n\n\n
    \n
    \n
    \n\n
    \n\n
    \n\n\n\n\n\n\n\">\n\n\n\n\n\n\n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n\n\n\n\n
    \n
    \n
    \n\n
    \n
    \n\n\n\n\n\n
    \n
     
    \n
    \n\n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"article withImage\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n
    \n\n\n
    \n \" alt=\"\" />\n \n
    \n
    \n\n\n
    \n \n \n
    \n
    \n\n\n \n
    \n

    \">

    \n \n
    \n
    \n
    \n\n\n
    \n\n
    \n\n\n
    \n','Article',1,1,'PBtmpl0000000000000103',1259133275,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"article withImage\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n
    \n\n
    \n\" alt=\"\" />\n\n
    \n
    \n\n
    \n\n\n
    \n
    \n\n\n
    \n

    \">

    \n\n
    \n
    \n
    \n\n
    \n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"file\">\n\" id=\"id\">\n\n\n \n\n\n\" alt=\"\" class=\"wg-icon\" />\n\">\n\n\n
    \n','FileAsset',1,1,'PBtmpl0000000000000024',1259133275,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"file\">\n\" id=\"id\">\n\n\n\n\" alt=\"\" class=\"wg-icon\" />\n\">\n\n
    ',0,NULL,NULL),('
    \" class=\"article withPagination\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n
    \n\n\n
    \n \n \n
    \n
    \n\n\n \n \n
    \n

    \">

    \n \n
    \n
    \n
    \n
    \n\n\n
    \n\n\n \n
    \n
      \n \n
    • \n \" alt=\"\" class=\"wg-icon\" />\n \">\n
    • \n
      \n
    \n \n
    \n
    \n
    \n\n
    \n\n\n
      \n
    • \n \n class=\"active\">\n \">\n \n \n
    • \n
    \n
    \n\n\n
    \n','Article',1,1,'XdlKhCDvArs40uqBhvzR3w',1259133275,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"article withPagination\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n
    \n\n
    \n\n\n
    \n
    \n\n\n\n
    \n

    \">

    \n\n
    \n
    \n
    \n
    \n\n
    \n\n\n
    \n
      \n\n
    • \n\" alt=\"\" class=\"wg-icon\" />\n\">\n
    • \n
      \n
    \n\n
    \n
    \n
    \n
    \n\n
      \n
    • \n\n class=\"active\">\n\">\n\n\n
    • \n
    \n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"navigation indentMenu\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n \n\n \n \"\n class=\"level current ancestor\"\n onclick=\"window.open(this.href);return false;\">\n \n\n\n\n
    \n','Navigation',1,1,'PBnav00000000indentnav',1259133275,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"navigation indentMenu\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n\n\"\nclass=\"level current ancestor\"\nonclick=\"window.open(this.href);return false;\">\n\n\n\n
    ',0,NULL,NULL),('
    \" class=\"nav tabsMenu\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n\n
      \n \n class=\"current\" class=\"ancestor\">\n \">\n \n \n
    \n
    \n\n\n
    \n','Navigation',1,1,'PBtmpl0000000000000124',1259133275,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"nav tabsMenu\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n
      \n\n class=\"current\" class=\"ancestor\">\n\">\n\n\n
    \n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"layout rightcolumn\">\n\n \" id=\"id\">\n\n \n \n \n\n \n

    \n \n

    \n
    \n\n \n
    \n \n \n
    \n
    \n \n \n
    \n \n \n \n \n \n\n \n \n \">\n \n \n \n \n\n \n \n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n \n\n \n \n\n \n
    \n
    \n
    \n\n \n
    \n\n \n
    \n \n \n \n \n \n\n \n \n \">\n \n \n \n \n\n \n \n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n \n\n \n \n\n \n
    \n
    \n
    \n\n \n
    \n\n
    \n \n \n \n \n \n \n
    \n
     
    \n
    \n \n
    \n\n\n
    \n','Layout',1,1,'PBtmpl0000000000000131',1259133275,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"layout rightcolumn\">\n\" id=\"id\">\n\n\n\n\n

    \n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n
    \n\n\n\n\n\n\n\">\n\n\n\n\n\n\n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n\n\n\n\n
    \n
    \n
    \n\n
    \n\n
    \n\n\n\n\n\n\n\">\n\n\n\n\n\n\n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n\n\n\n\n
    \n
    \n
    \n\n
    \n
    \n\n\n\n\n\n
    \n
     
    \n
    \n\n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"nav topNav\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n
    \n\n \n
    \n
    \n
      \n \n \n
    \n
    \n
    \n \n
    \n
  • onclick=\"window.open(this.href); return false;\" href=\"\">\n \n
    \n
    \n
      \n \n \n \n \n \n \n
    \n \n
  • \n
    \n\n\n\n\n\n','Navigation',1,1,'PBtmpl0000000000000134',1259133275,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"nav topNav\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n
    \n\n\n
    \n
    \n
      \n\n\n
    \n
    \n
    \n\n
    \n
  • onclick=\"window.open(this.href); return false;\" href=\"\">\n\n
    \n
    \n
      \n\n\n\n\n\n\n
    \n\n
  • \n
    \n\n\n\n',0,NULL,NULL),('
    \" class=\"folder\">\n\n\" id=\"id\">\n\n\n \n\n \n\n

    \n
    \n \n\n
    \n \n\n
    \n
    \n \n\n

    \">

    \n
    \n\n \n\n \n\n \n \n\n\n\n\n \n\n\n \n \n \n \n\n\n\n
    \n \n \" class=\"wg-icon\" alt=\"\" />\n \">\n \n \" class=\"wg-icon\" alt=\"\" />\n \n \n \n \n
    \n \n \n \n \n \n \n \" class=\"wg-icon\" alt=\"\" />\n \">\n \n \" class=\"wg-icon\" alt=\"\" />\n \n \n \n \n \n ^D(\"%z %Z\",);\n \n \n
    \n\n\n
    \n','Folder',1,1,'PBtmpl0000000000000078',1259133275,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"folder\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n

    \">

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\" class=\"wg-icon\" alt=\"\" />\n\">\n\n\" class=\"wg-icon\" alt=\"\" />\n\n\n\n\n
    \n\n\n\n\n\n\n\" class=\"wg-icon\" alt=\"\" />\n\">\n\n\" class=\"wg-icon\" alt=\"\" />\n\n\n\n\n\n^D(\"%z %Z\",);\n\n\n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"poll\">\n\n\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n
    \n

    \n\n\n \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n \n\n \n \" alt=\"graph\" />\n \n \n
    \n \n \n \n \n \n
    \" class=\"pollColor\">^Spacer(1,1); % ()
    \n
    \n

    :

    \n
    \n
    \n
    \n\n\n
    \n','Poll',1,1,'PBtmpl0000000000000055',1259133275,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"poll\">\n\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n
    \n\n\n
    \n
    \n
    \n

    \n\n\n
    \n\n
    \n
    \n
    \n
    \n\n
    \n\n\n\n\" alt=\"graph\" />\n\n\n
    \n\n\n\n\n\n
    \" class=\"pollColor\">^Spacer(1,1); % ()
    \n
    \n

    :

    \n
    \n
    \n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"syndicated default\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n\n

    \">

    \n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n\n
      \n \n
    • \n \">\n - \n
    • \n
      \n
    \n
    \n\n\n
    \n','SyndicatedContent',1,1,'PBtmpl0000000000000065',1259133275,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"syndicated default\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n

    \">

    \n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n
      \n\n
    • \n\">\n- \n
    • \n
      \n
    \n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"layout default\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n\n
    \n\n \n \n \n \n \n \n \n \">\n \n \n \n \n \n \n \n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n \n \n \n \n \n \n
    \n
    \n
    \n\n \n
    \n\n
    \n\n\n \n \n \n \n
    \n
     
    \n
    \n\n
    \n\n\n
    \n','Layout',1,1,'PBtmpl0000000000000054',1259133276,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"layout default\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n
    \n\n\n\n\n\n\n\">\n\n\n\n\n\n\n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n\n\n\n\n
    \n
    \n
    \n\n
    \n
    \n\n\n\n\n\n
    \n
     
    \n
    \n\n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"nav horizontalMenu\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n\n \n\n\n\n
    \n','Navigation',1,1,'PBtmpl0000000000000108',1259133276,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"nav horizontalMenu\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n\n\n\n
    ',0,NULL,NULL),('
    \" class=\"article linkedImage\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n
    \n\n\n
    \n \n \">\" alt=\"\" />\n \n \" class=\"caption\">\n \n \n \" alt=\"\" />\n \n
    \n \n
    \n\n\n
    \n \n
    \n \n
    \n\n
    \n\n\n
    \n\n\n
    \n','Article',1,1,'PBtmpl0000000000000115',1259133276,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"article linkedImage\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n
    \n\n
    \n\n\">\" alt=\"\" />\n\n\" class=\"caption\">\n\n\n\" alt=\"\" />\n\n
    \n\n
    \n\n
    \n\n
    \n\n
    \n
    \n\n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"layout oneoverthree\">\n \n \" id=\"id\">\n\n \n \n \n\n \n

    \n \n

    \n
    \n\n \n
    \n \n \n
    \n
    \n \n \n
    \n \n \n \n \n \n\n \n \n \">\n \n \n \n \n\n \n \n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n \n\n \n \n \n \n
    \n
    \n
    \n\n \n
    \n\n
    \n\n \n
    \n \n \n \n \n \n\n \n \n \">\n \n \n \n \n\n \n \n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n \n\n \n \n \n \n
    \n
    \n
    \n\n \n
    \n\n \n
    \n \n \n \n \n \n\n \n \n \">\n \n \n \n \n\n \n \n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n \n\n \n \n\n \n
    \n
    \n
    \n\n \n
    \n\n \n
    \n \n \n \n \n \n\n \n \n \">\n \n \n \n \n\n \n \n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n \n\n \n \n \n \n
    \n
    \n
    \n\n \n
    \n\n
    \n\n \n \n \n \n \n
    \n
     
    \n
    \n \n
    \n\n\n
    \n','Layout',1,1,'PBtmpl0000000000000109',1259133276,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"layout oneoverthree\">\n\" id=\"id\">\n\n\n\n\n

    \n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n
    \n\n\n\n\n\n\n\">\n\n\n\n\n\n\n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n\n\n\n\n
    \n
    \n
    \n\n
    \n
    \n\n
    \n\n\n\n\n\n\n\">\n\n\n\n\n\n\n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n\n\n\n\n
    \n
    \n
    \n\n
    \n\n
    \n\n\n\n\n\n\n\">\n\n\n\n\n\n\n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n\n\n\n\n
    \n
    \n
    \n\n
    \n\n
    \n\n\n\n\n\n\n\">\n\n\n\n\n\n\n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n\n\n\n\n
    \n
    \n
    \n\n
    \n
    \n\n\n\n\n\n
    \n
     
    \n
    \n\n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"layout threeColumns\">\n\n \" id=\"id\">\n\n \n \n \n\n \n

    \n
    \n\n \n
    \n \n \n
    \n
    \n\n \n
    \n\n \n \n \n \n\n \n \n \">\n \n \n\n \n \n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n \n\n \n \n\n \n
    \n
    \n
    \n\n \n
    \n\n \n
    \n\n \n \n \n \n\n \n \n \">\n \n \n\n \n \n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n \n\n \n \n\n \n
    \n
    \n
    \n\n \n
    \n\n \n
    \n\n \n \n \n \n\n \n \n \">\n \n \n\n \n \n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n \n\n \n \n\n \n
    \n
    \n
    \n\n \n
    \n\n
    \n\n \n \n \n \n \n
     
    \n \n
    \n\n\n
    \n\n','Layout',1,1,'VCFhB9WOsDsH2Apj3c6DpQ',1259133276,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"layout threeColumns\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n
    \n\n\n\n\n\n\n\">\n\n\n\n\n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n\n\n\n\n
    \n
    \n
    \n\n
    \n\n
    \n\n\n\n\n\n\n\">\n\n\n\n\n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n\n\n\n\n
    \n
    \n
    \n\n
    \n\n
    \n\n\n\n\n\n\n\">\n\n\n\n\n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n\n\n\n\n
    \n
    \n
    \n\n
    \n
    \n\n\n\n\n\n
     
    \n\n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"article default\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n
    \n\n\n
    \n \n \n
    \n
    \n\n\n \n
    \n

    \">

    \n \n
    \n
    \n
    \n\n\n
    \n\n\n
    \n
      \n \n
    • \n \" alt=\"\" class=\"wg-icon\" />\n \">\n
    • \n
      \n
    \n \n
    \n
    \n\n
    \n\n\n
    \n','Article',1,1,'PBtmpl0000000000000002',1259133276,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"article default\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n
    \n\n
    \n\n\n
    \n
    \n\n\n
    \n

    \">

    \n\n
    \n
    \n
    \n\n
    \n\n
    \n
      \n\n
    • \n\" alt=\"\" class=\"wg-icon\" />\n\">\n
    • \n
      \n
    \n\n
    \n
    \n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"article item\">\n\n \" id=\"id\">\n\n \n \n \n \n

    \n \n \n \">\n \n \n \n \n \n \n

    \n \n \n
    \n \n
    \n \n
    \n \n \n
    \n
      \n \n
    • \n \" alt=\"\" class=\"wg-icon\" />\n \">\n
    • \n
      \n
    \n \n
    \n
    \n\n
    \n\n\n
    \n','Article',1,1,'PBtmpl0000000000000123',1259133276,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"article item\">\n\" id=\"id\">\n\n\n\n

    \n\n\n\">\n\n\n\n\n\n\n

    \n\n
    \n\n
    \n\n
    \n\n
    \n
      \n\n
    • \n\" alt=\"\" class=\"wg-icon\" />\n\">\n
    • \n
      \n
    \n\n
    \n
    \n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"layout sidebyside\">\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n\n
    \n\n \n \n \n \n \n \n \n \">\n \n \n \n \n \n \n \n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n \n \n \n \n \n \n
    \n
    \n
    \n\n \n
    \n\n\n
    \n\n \n \n \n \n \n \n \n \">\n \n \n \n \n \n \n \n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n \n \n \n \n \n \n
    \n
    \n
    \n\n \n
    \n\n
    \n\n\n \n \n \n \n
    \n
     
    \n
    \n\n
    \n\n\n
    \n','Layout',1,1,'PBtmpl0000000000000135',1259133276,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"layout sidebyside\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n
    \n\n\n\n\n\n\n\">\n\n\n\n\n\n\n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n\n\n\n\n
    \n
    \n
    \n\n
    \n\n
    \n\n\n\n\n\n\n\">\n\n\n\n\n\n\n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n\n\n\n\n
    \n
    \n
    \n\n
    \n
    \n\n\n\n\n\n
    \n
     
    \n
    \n\n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"nav bulletedList\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n\n
      \n\n\n\n
    \n \n\n\n class=\"current\" class=\"ancestor\"
    >\n onclick=\"window.open(this.href);return false;\" href=\"\">\n\n\n
      \">\n\n \n\n\n\n \n
    \n \n \n
    \n\n\n\n\n\n\n
    \n','Navigation',1,1,'PBnav00000000000bullet',1259133276,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"nav bulletedList\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n
      \n\n\n
    \n\n\n class=\"current\" class=\"ancestor\"
    >\nonclick=\"window.open(this.href);return false;\" href=\"\">\n\n
      \">\n\n\n\n\n\n
    \n\n\n
    \n\n\n\n\n
    ',0,NULL,NULL),('
    \" class=\"file swfobject\">\n\" id=\"id\">\n\n\n \n\n\n
    \n\n \" />\n \n \" width=\"400\" height=\"300\">\n \n \n \"Get\n \n \n \n \n\n
    \n\n\n
    \n','FileAsset',1,1,'MK4fCNoyrx5SE8eyDfOpxg',1259133276,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"file swfobject\">\n\" id=\"id\">\n\n\n\n
    \n\n\" />\n\n\" width=\"400\" height=\"300\">\n\n\n\"Get\n\n\n\n\n\n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"nav treeNav\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n\n
    \">\n
      \n\n\n \n
    \n \n \n\n class=\"expanded\" class=\"expanded\">\n \">\n\n \n
      \">\n \n \n \n\n \n \n
    \n \n \n
    \n\n\n\n
    \n\n\n\n
    \n\n\n
    \n\n','Navigation',1,1,'PBtmpl0000000000000130',1259133276,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"nav treeNav\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n
    \">\n
      \n\n\n
    \n\n\n class=\"expanded\" class=\"expanded\">\n\">\n\n
      \">\n\n\n\n\n\n
    \n\n\n
    \n\n\n
    \n\n
    \n\n
    ',0,NULL,NULL),('
    \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 \">^International(add a ticket,Asset_EventManagementSystem);\r\n •\r\n \">^International(meta fields,Asset_EventManagementSystem);\r\n •\r\n \">^International(import,Asset_EventManagementSystem);\r\n •\r\n \">^International(export,Asset_EventManagementSystem);\r\n •\r\n \">^International(print remaining tickets,Asset_EventManagementSystem);\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

    \">^International(add a ribbon,Asset_EventManagementSystem);

    \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

    \">^International(add a token,Asset_EventManagementSystem);

    \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^ViewCart;\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','EMS/BadgeBuilder',1,1,'BMybD3cEnmXVk2wQ_qEsRQ',1263962529,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    \n
    \n
    \n\n
    \n\n
    \n\n

    \n\">^International(add a ticket,Asset_EventManagementSystem);\n•\n\">^International(meta fields,Asset_EventManagementSystem);\n•\n\">^International(import,Asset_EventManagementSystem);\n•\n\">^International(export,Asset_EventManagementSystem);\n•\n\">^International(print remaining tickets,Asset_EventManagementSystem);\n

    \n
    \n


    \n

    \n

    \n
    \n\n
    \n\n
    \n\n

    \">^International(add a ribbon,Asset_EventManagementSystem);

    \n
    \n

    \n
    \n\n
    \n\n
    \n\n

    \">^International(add a token,Asset_EventManagementSystem);

    \n
    \n

    \n
    \n\n
    \n
    \n
    \n
    \n
    \n\n\n^ViewCart;\n
    \n\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n\n\n\n\n
    \n
    \n
    \n',0,NULL,NULL),('

    \" />','ImageAsset',1,1,'mRtqRuVikSe82BQsYBlD0A',1263962529,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \" />',0,NULL,NULL),('\n\n
    \n','Account/Layout',1,1,'aUDsJ-vB9RgP-AYvPOy8FQ',1263962529,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n
    \n',0,NULL,NULL),('
    \r\n\r\n\r\n\r\n

    ^International(errors,Asset_Event);

    \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 ^International(tab event,Asset_Event);\r\n ^International(recurrence,Asset_Event);\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 \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
    ^International(event title,Asset_Event);
    ^International(short title,Asset_Event);
    ^International(location,Asset_Event);
    ^International(description,Asset_Event);
    ^International(start date,Asset_Event);
    ^International(end date,Asset_Event);
    ^International(time,Asset_Event);
     
    ^International(related material,Asset_Event);\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
    \' type=\'button\' name=\'\' value=\'DEL\' onClick=\"return delete_link(\'\',\'\');\">\r\n \' value=\'\'>\r\n \' value=\"\">\r\n
    \'>\r\n\' name=\'\' value=\'\'>\r\n\' name=\'rel_delconfirm_\' value=\'0\'>\r\n
    \r\n
    \r\n
    ^International(group to view,Asset_Event);
    ^International(attachments for event,Asset_Event);
    \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
    ^International(recurrence pattern,Asset_Event);
    ^International(recurrence range,Asset_Event);\r\n

    ^International(start,Asset_Event);:

    \r\n

    \r\n

    ^International(end,Asset_Event);:

    \r\n
    \r\n
    \r\n
    \r\n\r\n\r\n\r\n\r\n','Calendar/EventEdit',1,1,'CalendarEventEdit00001',1269401468,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n\n

    ^International(errors,Asset_Event);

    \n
      \n\n
    • \n
      \n
    \n
    \n\n\n\n\n
    \n^International(tab event,Asset_Event);\n^International(recurrence,Asset_Event);\n\n\n
    \n\n\n\n\n\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(event title,Asset_Event);
    ^International(short title,Asset_Event);
    ^International(location,Asset_Event);
    ^International(description,Asset_Event);
    ^International(start date,Asset_Event);
    ^International(end date,Asset_Event);
    ^International(time,Asset_Event);
     
    ^International(related material,Asset_Event);\n\n\n\n\n\n\n\n\n\n\'>\n\n\n\n\n\n\n
    \n\n
    \' type=\'button\' name=\'\' value=\'DEL\' onClick=\"return delete_link(\'\',\'\');\">\n\' value=\'\'>\n\' value=\"\">\n
    \'>\n\' name=\'\' value=\'\'>\n\' name=\'rel_delconfirm_\' value=\'0\'>\n
    \n
    \n
    ^International(group to view,Asset_Event);
    ^International(attachments for event,Asset_Event);
    \n
    \n\n\n\n\n\n\n\n\n\n\n
    ^International(recurrence pattern,Asset_Event);
    ^International(recurrence range,Asset_Event);\n

    ^International(start,Asset_Event);:

    \n

    \n

    ^International(end,Asset_Event);:

    \n
    \n
    \n
    \n\n',0,NULL,NULL),('\n \n WebGUI ^International(assetName,Asset_Survey);\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n\n\n
    \n
    \n
    \n
    \n ^International(Loading...,WebGUI);\n
    \n
    \n
    \n\n\n \" id=\"id\">\n \n \n \n
    \n

    ^International(warnings,Asset_Survey);

    \n
    \n
    \n \n
    \n
    \n
    \n \n \n \n
    \n
    \n
    \n
    \n\n','Survey/Edit',1,1,'GRUNFctldUgop-qRLuo_DA',1269401469,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\nWebGUI ^International(assetName,Asset_Survey);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n
    \n
    \n
    \n^International(Loading...,WebGUI);\n
    \n
    \n
    \n\" id=\"id\">\n\n
    \n

    ^International(warnings,Asset_Survey);

    \n
    \n
    \n
    \n
    \n
    \n\n\n\n
    \n
    \n
    \n
    \n',0,NULL,NULL),('\n\n\n\n \n ^Page(title); - ^c;\n \n\n\n\n ^AdminBar;\n
    \n
     
    \n
    \n
    ^H(^c(););
    \n
    \n ^AssetProxy(crystalx/site-search);\n
    \n
    \n\n
    \n ^AssetProxy(crystalx/crystalx_navigation);\n
    \n\n
    \n
    \n
    \n
    You are here: ^AssetProxy(crystalx/crystalx_navigationtrail);
    \n
    ^D(\"%W, %D/%C/%y\");
    \n
    \n
    \n
    \n
    \n\n
    \n
    \n
    \n ^LoginToggle;  \n ^GroupText(\"Registered Users\",^a(^@;););  \n ^AdminToggle;\n
    \n
    \n\n
    \n

    © 2009 ^c; | Empowered by WebGUI

    \n

    Created by Nuvio | Webdesign

    \n

    \n
    \n
    \n\n\n\n','style',1,1,'OiJNwP1gAlcva8_yOtL4gA',1273032718,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n^Page(title); - ^c;\n\n\n\n^AdminBar;\n
    \n
     
    \n
    \n
    ^H(^c(););
    \n
    \n^AssetProxy(crystalx/site-search);\n
    \n
    \n
    \n^AssetProxy(crystalx/crystalx_navigation);\n
    \n
    \n
    \n
    \n
    You are here: ^AssetProxy(crystalx/crystalx_navigationtrail);
    \n
    ^D(\"%W, %D/%C/%y\");
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n^LoginToggle;  \n^GroupText(\"Registered Users\",^a(^@;););  \n^AdminToggle;\n
    \n
    \n
    \n

    © 2009 ^c; | Empowered by WebGUI

    \n

    Created by Nuvio | Webdesign

    \n

    \n
    \n
    \n\n',0,'pl9xiFGzrqfAgRzqwJ8xPg',NULL),('\n
    \n
    \n\n

    \n
    \n\n

    \n
    \n
    \n \n\n \n \n
    \" class=\"yuimenubar\">\n
    \n
      \n \n\n \n
    \n
    \n
    \n \n
    \n\n \n \n \n \n
  • \n onclick=\"window.open(this.href); return false;\"href=\"\">\n \n \n
  • \n onclick=\"window.open(this.href); return false;\"href=\"\">\n \n
  • \n onclick=\"window.open(this.href); return false;\" href=\"\">\n \n \n \n \n \n \n \n
  • \n \n
  • \n \n onclick=\"window.open(this.href); return false;\"href=\"\">\n \n \n
  • \n \n
  • \n \n onclick=\"window.open(this.href); return false;\" href=\"\">\n \n \n\n \n
    \n
    \n
      \n \n \n \n\n \n \n \n \n \n \n \n \n
    \n
    \n
    \n
  • \n \n \n
    \n \n
    \n\n \n\n\n\n','Navigation',1,1,'gaIOm5cr2TkT9Fk6QmZWug',1273032718,'WebGUI::Asset::Template::HTMLTemplate',1,'\n
    \n
    \n\n

    \n
    \n\n

    \n
    \n\n\n
    \n\n\n',0,NULL,NULL),('\r\n \r\n\r\n\r\n\r\n id=\"currentpage\"\r\n \r\n\r\n onclick=\"window.open(\'\')\" href=\"#\" \r\n href=\"\"\r\n \r\n >\r\n \r\n \r\n\r\n > \r\n\r\n\r\n','Navigation',1,1,'hpCk0B3vQzgc-QJhSol41w',1273032718,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\nid=\"currentpage\"\n\nonclick=\"window.open(\'\')\" href=\"#\"\nhref=\"\"\n>\n\n\n > \n',0,NULL,NULL),('\" id=\"id\">\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
    Go back to ^H(Home);
    \r\n\r\n \r\n
    \r\n \r\n
    id=\"odd\" >\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','Search',1,0,'OfKbvK7CrfMnfc8WDoF4Rg',1273032718,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n
    \n
    \n\n

    \n
    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n
    Go back to ^H(Home);
    \n\n
    \n\n
    id=\"odd\">\n
    );\">
    \n
    \n
    \n
    \n
    \n\n
    \n\n
    \n
    \n\n
    \n · · \n
    \n
    \n
    ',0,NULL,'[]'),('\r\n\r\n\r\n\r\n \r\n ^c; - ^Page(title);\r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n^AdminBar();\r\n\r\n\r\n \r\n \r\n\r\n\r\n \r\n\r\n
    \r\n
    \r\n
    ^H(^c;);
    \r\n
    ^c;
    \r\n
    \r\n
    \r\n

    ^Page(title);

    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \"plain\"webgui\"
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n ^AssetProxy(flexmenu);\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n ^L(\"\",\"\",\"PBtmpl0000000000000044\");\r\n ^AdminToggle;\r\n
    \r\n
    \r\n © ^D(%y); ^c;\r\n
    \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n','style',1,1,'stevestyle000000000002',1273032718,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n^c; - ^Page(title);\n\n\n\n\n\n\n\n\n\n\n^AdminBar();\n\n\n\n\n\n\n\n\n
    \n
    \n
    ^H(^c;);
    \n
    ^c;
    \n
    \n
    \n

    ^Page(title);

    \n
    \n
    \n
    \n\n
    \n
    \n
    \n
    \n\"plain\"webgui\"
    \n
    \n
    \n
    \n\n\n\n\n\n
    \n
    \n^AssetProxy(flexmenu);\n
    \n\n\n\n\n\n
    \n
    \n^L(\"\",\"\",\"PBtmpl0000000000000044\");\n^AdminToggle;\n
    \n
    \n© ^D(%y); ^c;\n
    \n\n\n\n\n\n',0,'ahKL5Wl1XmeUUCB32OzSbA',NULL),('

    \n\n
      \n
    • \n \n \"> - on by \n \n - on by \n \n ( \"> )\n \n \n
    • \n
    \n\n
    \"> | \"> | \">
    \n\n\n','WikiMaster_recentChanges',1,1,'WikiRCTmpl000000000001',1273032720,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n
      \n
    • \n\n\"> - on by \n\n - on by \n\n( \"> )\n\n\n
    • \n
    \n
    \"> | \"> | \">
    ',0,NULL,NULL),('

    \n\n

    \n\n\n

    \n\n
    \n\n

    ^International(categories label,Asset_Matrix);

    \n\n
    \n

    \n\n\n\"> ()
    \n
    \n
    \n

    \n
    \n
    \n\n

    Featured Article: \">

    \n\n
    \n\n
    \n

    \">

    \n
      \n
    • \n \n \">\n \n ()\n \n
    • \n
    \n
    \n
    \n

    \">

    \n
      \n
    1. \">
    2. \n
    \n\n
    \n
    \n\n
    \n\n\n','WikiMaster_front',1,1,'WikiFrontTmpl000000001',1273032720,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n\n

    \n\n

    \n\n
    \n\n

    ^International(categories label,Asset_Matrix);

    \n\n
    \n

    \n\n\n\"> ()
    \n
    \n
    \n

    \n
    \n
    \n\n

    Featured Article: \">

    \n\n
    \n
    \n

    \">

    \n
      \n
    • \n\n\">\n\n ()\n\n
    • \n
    \n
    \n
    \n

    \">

    \n
      \n
    1. \">
    2. \n
    \n
    \n
    \n
    ',0,NULL,NULL),('\n

    \n\n\n\n\n

    \n \n \n \n
    \n · · \n
    \n
    \n

    \n

    \">

    \n \n

    \n

    \">

    \n
    \n
    \n
    \"> | \"> | \">
    \n','WikiMaster_search',1,1,'WikiSearchTmpl00000001',1273032720,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n\n\n

    \n\n\n\n
    \n · · \n
    \n
    \n

    \n

    \">

    \n\n

    \n

    \">

    \n
    \n
    \n
    \"> | \"> | \">
    ',0,NULL,NULL),('\n
      \n\n
    • at () by
    • \n
      \n
    \n','WikiPage_pageHistory',1,1,'WikiPHTmpl000000000001',1273032720,'WebGUI::Asset::Template::HTMLTemplate',1,'
      \n\n
    • at () by
    • \n
      \n
    ',0,NULL,NULL),('

    \n

    \n\n
    \n
      \n
    • \n
    • \n
    \n
    \n
    \n
    ^International(locked,Asset_WikiPage);
    \n
    \n

    ^International(keywords,Asset);: \">

    \n
    \n
    \n
    \n
    \n
    \n\n\n\n
    \"> | \"> | \"> | \">
    ','WikiPage',1,1,'WikiPageTmpl0000000001',1273032720,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n

    \n
    \n
      \n
    • \n
    • \n
    \n
    \n
    \n
    ^International(locked,Asset_WikiPage);
    \n
    \n

    ^International(keywords,Asset);: \">

    \n
    \n
    \n
    \n
    \n
    \n\n\n\n
    \"> | \"> | \"> | \">
    ',0,NULL,NULL),('\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','WikiPage_edit',1,1,'WikiPageEditTmpl000001',1273032720,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\n\n\n',0,NULL,NULL),('

    \n\n
      \n
    1. \">
    2. \n
    \n\n
    \"> | \"> | \">
    \n\n','WikiMaster_mostPopular',1,1,'WikiMPTmpl000000000001',1273032720,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n
      \n
    1. \">
    2. \n
    \n
    \"> | \"> | \">
    ',0,NULL,NULL),('\r\n\r\n\r\n \r\n ^c; - ^Page(title);\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n\r\n\r\n^AdminBar();\r\n\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n ^L(\"\",\"\",\"PBtmpl0000000000000092\"); · ^AdminToggle;\r\n
    \r\n
    \r\n

    ^H(^c;);

    \r\n

    ^Page(title);

    \r\n
    \r\n \"webgui\"
    \r\n
    \r\n
    \r\n
    \r\n ^AssetProxy(style3_coolmenu);\r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n\r\n
    \r\n
    \r\n © ^D(%y); ^c;\r\n
    \r\n \"plain
    \r\n
    \r\n
    \r\n
    \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n','style',1,1,'stevestyle000000000003',1273032720,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n^c; - ^Page(title);\n\n\n\n\n\n\n\n\n\n\n\n^AdminBar();\n
    \n
    \n
    \n
    \n
    \n^L(\"\",\"\",\"PBtmpl0000000000000092\"); · ^AdminToggle;\n
    \n
    \n

    ^H(^c;);

    \n

    ^Page(title);

    \n
    \n\"webgui\"
    \n
    \n
    \n
    \n^AssetProxy(style3_coolmenu);\n
    \n
    \n\n
    \n
    \n
    \n
    \n
    \n© ^D(%y); ^c;\n
    \n\"plain
    \n
    \n
    \n
    \n\n\n\n\n\n',0,'Xr1JhO16oSMIEvCjcZILZQ',NULL),('\r\n\r\n\r\n \r\n ^Page(title);\r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n\r\n\r\n\r\n ^AdminBar();\r\n
    \r\n
    \r\n
    \r\n ^H(^c(););\r\n
    \r\n \r\n
    \r\n © ^D(%y); ^c;\r\n
    \r\n
    \r\n\r\n
    \r\n
    \r\n ^AssetProxy(roottab_level0);\r\n
    \r\n
    \r\n
    \r\n ^AssetProxy(roottab_level1);\r\n
    \r\n
    \r\n ^AssetProxy(crumbtrail); \r\n
    \r\n
     
    \r\n
    \r\n \r\n
    \r\n
     
    \r\n
    \r\n \r\n
    \r\n ^L(\"\",\"\",\"PBtmpl0000000000000044\");\r\n
    ^AdminToggle;
    \r\n ^AssetProxy(style1/gui_bottom.jpg);
    \r\n \"WebGUI\r\n
    \r\n
    \r\n\r\n\r\n\r\n\r\n\r\n \r\n','style',1,1,'stevestyle000000000001',1273032722,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n^Page(title);\n\n\n\n\n\n\n\n\n\n\n^AdminBar();\n
    \n
    \n
    \n^H(^c(););\n
    \n
    \n© ^D(%y); ^c;\n
    \n
    \n
    \n
    \n^AssetProxy(roottab_level0);\n
    \n
    \n
    \n^AssetProxy(roottab_level1);\n
    \n
    \n^AssetProxy(crumbtrail);\n
    \n
     
    \n
    \n\n
    \n
     
    \n
    \n
    \n^L(\"\",\"\",\"PBtmpl0000000000000044\");\n
    ^AdminToggle;
    \n^AssetProxy(style1/gui_bottom.jpg);
    \n\"WebGUI\n
    \n
    \n\n\n\n\n\n',0,'RE3ugPDieP57zCI6J_uJqw',NULL),('\n
    \n\n
    \n

    \n
    \n ^International(member since,Account_Inbox); ^D(%z,);\n

    \n \n

    \n location.href=\'\'alert(\'^International(no friends hover,Account_Inbox);\');\" />\n \n \n \" class=\"prevNext\">\"Previous\" \n \"> \n  \" class=\"prevNext\">\"Next\"\n \n \n \n

    \n \n \n \n \n \n \n \n \n \n \n \n WGoddThreadWGevenThread\">\n \n \n \n \n \n \n \n \n
     \">^International(from label,Account_Inbox);\">^International(subject label,Account_Inbox);\">^International(date label,Account_Inbox);\">^International(status label,Account_Inbox);
    old.pngnew.png);\" />\" class=\"inbox_from\">\">^D(,);
    \n \n

    \n location.href=\'\'alert(\'^International(no friends hover,Account_Inbox);\');\" />\n \n \n \" class=\"prevNext\">\"Previous\" \n \"> \n  \" class=\"prevNext\">\"Next\"\n \n \n \n

    \n\n

    \n ^International(message count,\'Account_Inbox\');\n

    \n \n
    \n\n
    \n','Account/Inbox/View',1,1,'c8xrwVuu5QE0XtF9DiVzLw',1273032723,'WebGUI::Asset::Template::HTMLTemplate',1,'\n
    \n
    \n

    \n
    \n^International(member since,Account_Inbox); ^D(%z,);\n

    \n

    \n location.href=\'\'alert(\'^International(no friends hover,Account_Inbox);\');\" />\n\n\n\" class=\"prevNext\">\"Previous\" \n\"> \n \" class=\"prevNext\">\"Next\"\n\n\n \n

    \n\n\n\n\n\n\n\n\n\n\nWGoddThreadWGevenThread\">\n\n\n\n\n\n\n\n\n
     \">^International(from label,Account_Inbox);\">^International(subject label,Account_Inbox);\">^International(date label,Account_Inbox);\">^International(status label,Account_Inbox);
    old.pngnew.png);\" />\" class=\"inbox_from\">\">^D(,);
    \n

    \n location.href=\'\'alert(\'^International(no friends hover,Account_Inbox);\');\" />\n\n\n\" class=\"prevNext\">\"Previous\" \n\"> \n \" class=\"prevNext\">\"Next\"\n\n\n \n

    \n

    \n ^International(message count,\'Account_Inbox\');\n

    \n
    \n
    \n',0,NULL,NULL),('\n

    \n\n\n\n
    ^International(Sub-keywords,Asset_WikiMaster);
    \n\n
    \n\n\n

    ^International(categories label,Asset_Matrix);

    \n

    \n\n\n\"> ()
    \n
    \n
    \n

    \n
    \n\n\n

    ^International(Related Pages,Asset_WikiMaster);

    \n\n
    \n\n\n
    \n · · \n
    \n
    \n\n\n\n','WikiMaster_byKeyword',1,1,'WikiKeyword00000000001',1274238756,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n\n\n
    ^International(Sub-keywords,Asset_WikiMaster);
    \n\n
    \n\n

    ^International(categories label,Asset_Matrix);

    \n

    \n\n\n\"> ()
    \n
    \n
    \n

    \n
    \n\n

    ^International(Related Pages,Asset_WikiMaster);

    \n\n
    \n\n
    \n · · \n
    \n
    \n',0,NULL,NULL),('
    \n \n

    \n
    \n\n \n

    \n
    \n\n \n
    \n
    \n \n\n \n \n \n \n \n\n

    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n
    \n \n \n \n \n \n \n \n \n \n
    \">
    \n \n
    \n\n \n

    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n wgRowOnewgRowTwo\">\n \n \n \n \n \n
    \">\n

    Search Results

    \n
    \n \">\n
    \n \n \n \n \n \">\n \n \n \n
    \n
    \n
    \n \n \n
    \n · · \n
    \n
    \n
    \n','Thingy/SearchThing',1,1,'ThingyTmpl000000000004',1277868920,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n

    \n
    \n\n

    \n
    \n\n
    \n
    \n\n\n\n\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n
    \n\n\n\n\n\n\n\n\n\n
    \">
    \n\n
    \n\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nwgRowOnewgRowTwo\">\n\n\n\n\n\n
    \">\n

    Search Results

    \n
    \n\">\n
    \n\n\n\n\n\">\n\n\n\n
    \n
    \n
    \n\n
    \n · · \n
    \n
    \n
    ',0,NULL,NULL),('\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n \n\n\n

    \n \n \">\n •\n \n \n \n \">\n \n \">\n \n •\n \n \">\n

    \n\n\n\n \n \n \n \n \n \n\n\n\n \n \n \n \n \n \n \n \n \n \n\n\n
    \">\">\">
    oddThreadevenThread\">oddThreadevenThread\">\"> ()oddThreadevenThread\">oddThreadevenThread\">oddThreadevenThread\">\">
    \n\n\n
    \n · · \n
    \n
    \n','Collaboration',1,1,'PBtmpl0000000000000066',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n\n\n\n

    \n
    \n\n\n\n

    \n\n\">\n•\n\n\n\n\">\n\n\">\n\n•\n\n\">\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \">\">\">
    oddThreadevenThread\">oddThreadevenThread\">\"> ()oddThreadevenThread\">oddThreadevenThread\">oddThreadevenThread\">\">
    \n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n \n\n\n

    \n \n \"> •\n \n \n \n \">\n \n \">\n \n \n •\n \n \n \n \">\n \n

    \n\n\n\n\n \n \n
    [\">]
    \n
    \n
    \n \n
    \n \n \n \n \n \n [\">]\n \n \n \n (\">)\n
    \n
    \n \" id=\"id\">
    \n \n

    \">[top]

    \n
    \n\n\n
    \n · · \n
    \n
    \n','Collaboration',1,1,'PBtmpl0000000000000080',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n\n\n\n

    \n
    \n\n\n\n

    \n\n\"> •\n\n\n\n\">\n\n\">\n\n\n•\n\n\n\n\">\n\n

    \n\n\n\n\n
    [\">]
    \n
    \n
    \n\n
    \n\n\n\n\n\n[\">]\n\n\n\n(\">)\n
    \n
    \n\" id=\"id\">
    \n\n

    \">[top]

    \n
    \n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n \n\n\n

    \n \n \">\n •\n \n \n \n \">\n \n \">\n \n •\n \n \">\n

    \n\n\n\n \n \n \n \n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n\n
    \">\">\">
    oddThreadevenThread\">oddThreadevenThread\">\"> ()oddThreadevenThread\" style=\"text-align: center;\">\n \n \">\" border=\"0\" alt=\"\" />\n \n  \n \n oddThreadevenThread\">oddThreadevenThread\">oddThreadevenThread\">\">
    \n\n\n
    \n
    \n · · \n
    \n
    \n','Collaboration',1,1,'PBtmpl0000000000000097',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n\n\n\n

    \n
    \n\n\n\n

    \n\n\">\n•\n\n\n\n\">\n\n\">\n\n•\n\n\">\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \">\">\">
    oddThreadevenThread\">oddThreadevenThread\">\"> ()oddThreadevenThread\" style=\"text-align: center;\">\n\n\">\" border=\"0\" alt=\"\" />\n\n \n\noddThreadevenThread\">oddThreadevenThread\">oddThreadevenThread\">\">
    \n\n
    \n
    \n · · \n
    \n
    ',0,NULL,NULL),('\n\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n\n \n\n\n

    \n \n \">\n •\n \n \n \n \">\n \n \">\n \n •\n \n \">\n

    \n\n

    \n\n\n

    \n \n
    \n
    \n \n \n \n \n \n \">\n \n -\n \n \n - \n \n \n - \n \n \n - \n \n \n \n \n \">\" border=\"0\" alt=\"\" align=\"right\" />\n \n \n
    \n \">\n
    \n
    \n

    \n\n\n\n

    \n \n
    \n\n','Collaboration',1,1,'PBtmpl0000000000000112',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n\n\n

    \n\n\">\n•\n\n\n\n\">\n\n\">\n\n•\n\n\">\n

    \n

    \n\n

    \n\n
    \n
    \n\n\n\n\n\n\">\n\n-\n\n\n- \n\n\n- \n\n\n- \n\n\n\n\n\">\" border=\"0\" alt=\"\" align=\"right\" />\n\n\n
    \n\">\n
    \n
    \n

    \n\n\n

    \n\n
    \n',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n\n \n\n\n

    \n \n \">\n •\n \n \n \n \">\n \n \">\n \n •\n \n \">\n

    \n\n
    \n\n\n
    \n
    \n
    ()
    \n \n \n
    \n
    \n
    \n\n
    \n\n\n
    \n · · \n
    \n
    \n','Collaboration',1,1,'PBtmpl0000000000000121',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n\n\n

    \n\n\">\n•\n\n\n\n\">\n\n\">\n\n•\n\n\">\n

    \n
    \n\n
    \n\n
    \n
    \n
    \n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('\" id=\"id\"> \n\n \n

    \n
    \n\n

    \n\n
    \n\n
    \n\" alt=\"\" />\n
    \n
    \n : \n \n \n \n \">\n \n
    \n :
    \n :
    \n : \n \n     [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n \n : [ \"> \"> ]
    \n \n \n :
    \n
    \n
    \n
    \n\n
    \n

    \n \n
    \n\n\n
    \n \n \n \n
    \n
    \n
    \n\n\n\n\n \n\n\n
    \n\n\n
    \n

    \n
    \n
    \n \n \">\n \n \">\n \n
    \n
    \n \n \n \n \n \n
    Current\">\n \">\n
    \n \n
    \n
    \n \n \n \n\n\n\n \n \n \n
    \n\" alt=\"\" />\n\n : \n \n \n \n \">\n \n
    \n : \n
    \n : \n \n     [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n :
    \n
    \n
    \n \n \n \n \n
    \n
    \n
    \n \n
    \n \n \n \n \n \n
    px;\">\n
    Current\">\n \">\n
    \n \n
    \n
    \n \n \n \n\n\n\n \n \n \n
    \n\" alt=\"\" />\n\n : \n \n \n \n \">\n \n
    \n : \n
    \n : \n \n     [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n :
    \n
    \n
    \n \n \n \n \n
    \n
    \n
    \n
    \n \n
    \n \n \n
    \n [ | | ]\n
    \n
    \n
    \n\n\n','Collaboration/Thread',1,1,'PBtmpl0000000000000067',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n

    \n
    \n\n
    \n\" alt=\"\" />\n
    \n
    \n:\n\n\n\n\">\n\n
    \n:
    \n:
    \n: \n\n    [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n\n: [ \"> \"> ]
    \n\n\n:
    \n
    \n
    \n
    \n
    \n

    \n\n
    \n\n
    \n\n\n\n
    \n
    \n
    \n\n\n\n
    \n\n
    \n

    \n
    \n
    \n\n\">\n\n\">\n\n
    \n
    \n\n\n\n\n
    Current\">\n\">\n
    \n\n
    \n
    \n\n\n\n\n\n\n\n\n\n
    \n\" alt=\"\" />\n\n:\n\n\n\n\">\n\n
    \n: \n
    \n: \n\n    [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n:
    \n
    \n
    \n\n\n\n\n
    \n
    \n
    \n\n
    \n\n\n\n\n
    px;\">\n
    Current\">\n\">\n
    \n\n
    \n
    \n\n\n\n\n\n\n\n\n\n
    \n\" alt=\"\" />\n\n:\n\n\n\n\">\n\n
    \n: \n
    \n: \n\n    [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n:
    \n
    \n
    \n\n\n\n\n
    \n
    \n
    \n
    \n\n
    \n\n
    \n[ | | ]\n
    \n
    \n
    \n',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n\n \n\n\n

    \n \n \">\n •\n \n \n \n \">\n \n \">\n \n •\n \n \">\n

    \n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n
    \">\">\">\">\">
    oddThreadevenThread\">oddThreadevenThread\">\">oddThreadevenThread\">oddThreadevenThread\">\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\"> @ oddThreadevenThread\" style=\"font-size: 11px;\">\n \">\n by\n \n \n \n \">\n \n on @ \n
    \n\n\n
    \n · · \n
    \n
    \n','Collaboration',1,1,'PBtmpl0000000000000026',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n\n\n

    \n\n\">\n•\n\n\n\n\">\n\n\">\n\n•\n\n\">\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \">\">\">\">\">
    oddThreadevenThread\">oddThreadevenThread\">\">oddThreadevenThread\">oddThreadevenThread\">\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\"> @ oddThreadevenThread\" style=\"font-size: 11px;\">\n\">\nby\n\n\n\n\">\n\non @ \n
    \n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n\n \n\n\n

    \n \n \">\n •\n \n \n \n \">\n \n \">\n \n •\n \n \">\n

    \n\n\n
    \n\n\n
    \n
    \n \">
    \n ()\n \n \n \n
    \n \n
    \n
    \n\n
    \n\n\n
    \n · · \n
    \n
    \n','Collaboration',1,1,'PBtmpl0000000000000128',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n\n\n

    \n\n\">\n•\n\n\n\n\">\n\n\">\n\n•\n\n\">\n

    \n
    \n\n
    \n\n\n
    \n
    \n
    \n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n \n\n\n

    \n \n \"> •\n \n \n \n \">\n \n \">\n \n \n \n  [\">]\n \n

    \n\n\n \n \n \">\n \n \n \n \n \n \n \n \n \"> •\n \n \n \n (\">)\n
    \n

    \n \n

    \n\n\n\n

    \n · · \n
    \n\n','Collaboration',1,1,'PBtmpl0000000000000079',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n\n\n\n

    \n
    \n\n\n\n

    \n\n\"> •\n\n\n\n\">\n\n\">\n\n\n\n [\">]\n\n

    \n\n\n\n\">\n\n\n\n\n\n\n\n\n\"> •\n\n\n\n(\">)\n
    \n

    \n\n

    \n\n\n

    \n · · \n
    \n',0,NULL,NULL),('\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n \n\n\n

    \n \n \"> •\n \n \n \n \">\n \n \">\n \n \n •\n \n \n \n \">\n \n

    \n\n\n \n \n [\">] \n \n \n \n \n \n \n \n \n [\">]\n \n \n \n (\">)\n \n

    \n \" target=\"_blank\">\n \n - \n \n

    \n
    \n\n\n
    \n · · \n
    \n
    \n','Collaboration',1,1,'PBtmpl0000000000000083',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n\n\n\n

    \n
    \n\n\n\n

    \n\n\"> •\n\n\n\n\">\n\n\">\n\n\n•\n\n\n\n\">\n\n

    \n\n\n\n[\">] \n\n\n\n\n\n\n\n\n[\">]\n\n\n\n(\">)\n\n

    \n\" target=\"_blank\">\n\n- \n\n

    \n
    \n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n \n\n\n

    \n \n \">\n •\n \n \n \n \">\n \n \">\n \n \n \n •\n \n \n \n \">\n \n

    \n\n\n\n\n
    \n · · \n
    \n
    \n','Collaboration',1,1,'PBtmpl0000000000000082',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n\n\n\n

    \n
    \n\n\n\n

    \n\n\">\n•\n\n\n\n\">\n\n\">\n\n\n•\n\n\n\n\">\n\n

    \n\n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n \n\n\n

    \n \n \"> •\n \n \n \n \">\n \n \">\n \n \n •\n \n \n \n \">\n \n

    \n\n\n\n\n\n\n\n\n
    \n\n

    \n\n\n\n\n

    \n · · \n
    \n\n','Collaboration',1,1,'PBtmpl0000000000000133',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n\n\n\n

    \n
    \n\n\n\n

    \n\n\"> •\n\n\n\n\">\n\n\">\n\n\n•\n\n\n\n\">\n\n

    \n\n\n\n\n\n\n
    \n\n

    \n\n\n

    \n · · \n
    \n',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n

    \n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n\n\n\n

    \n \n
    \n\n\n','Collaboration/PostForm',1,1,'PBtmpl0000000000000029',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\n

    \n\n
    ',0,NULL,NULL),('\n\n \n

    \n
    \n\n \n
    \n

    \">

    \n
    \n
    \n \n \">\n \n \">\n \n
    \n
    \n\n\n
    px;\">\n
    Current\">\n \">\n
    \n \n
    \n
    \n\n
    \n\" alt=\"\" />\n
    \n
    \n
    \n : \n \n \n \n \">\n \n
    \n :
    \n
    \n
    \n :
    \n : \n \n \n     [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n
    \n \n : [ \"> \"> ]
    \n
    \n
    \n
    \n \n \n
    \n \n \"> •\n \n \n \"> • \n \">\n \n
    \n
    \n
    \n
    \n
    \n\n\n
    \n [ | | ]\n
    \n
    \n\n
    \n \n \"> •\n \n \n \"> • \n \n \n \"> •\n \n \n \n \"> •\n \n \"> •\n \n \n \"> •\n \n \"> •\n \n \n \n \n \">\n \n \">\n \n \n
    \n\n','Collaboration/Thread',1,1,'PBtmpl0000000000000032',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n

    \n
    \n
    \n

    \">

    \n
    \n
    \n\n\">\n\n\">\n\n
    \n
    \n\n
    px;\">\n
    Current\">\n\">\n
    \n\n
    \n
    \n\n
    \n\" alt=\"\" />\n
    \n
    \n
    \n:\n\n\n\n\">\n\n
    \n:
    \n
    \n
    \n:
    \n: \n\n\n    [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n
    \n\n: [ \"> \"> ]
    \n
    \n
    \n
    \n\n\n
    \n\n\"> •\n\n\n\"> •\n\">\n\n
    \n
    \n
    \n
    \n
    \n\n
    \n[ | | ]\n
    \n
    \n
    \n\n\"> •\n\n\n\"> •\n\n\n\"> •\n\n\n\n\"> •\n\n\"> •\n\n\n\"> •\n\n\"> •\n\n\n\n\n\">\n\n\">\n\n\n
    ',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n\n

    \n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    class=\"odd\">\">class=\"odd\">class=\"odd\">\">class=\"odd\"> @
    \n
    \n\n\n
    \n · · \n
    \n
    \n\n\n','Collaboration/Search',1,1,'PBtmpl0000000000000031',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    class=\"odd\">\">class=\"odd\">class=\"odd\">\">class=\"odd\"> @
    \n
    \n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('\" id=\"id\">\n\n

    \n

    \n

    \n\n\n

    \n\n

    \n
    \n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n\n\n\n
    \n

    \n \n
    \n
    \n\n','Collaboration/PostForm',1,1,'PBtmpl0000000000000068',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n

    \n

    \n

    \n\n

    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\n
    \n

    \n\n
    \n
    ',0,NULL,NULL),('\" id=\"id\">\n\n

    \n

    \n\n\n

    \n\n

    \n
    \n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n\n\n\n
    \n

    \n \n
    \n
    \n\n\n','Collaboration/PostForm',1,1,'PBtmpl0000000000000099',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n

    \n

    \n\n

    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\n
    \n

    \n\n
    \n
    ',0,NULL,NULL),('\" id=\"id\">\n\n\n\n\n

    \n\n

    \n
    \n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n\n\n\n \n\n','Collaboration/PostForm',1,1,'PBtmpl0000000000000114',1277868922,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n\n

    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\n\n',0,NULL,NULL),('\" id=\"id\"> \n\n \n

    \n
    \n\n

    \n\n\n
    \n :     [ \"> \"> ]
    \n
    \n
    \n\n\n ^International(job description,Asset_Collaboration);
    \n

    \n
    \n\n\n ^International(job requirements,Asset_Collaboration);
    \n

    \n
    \n\n\n\n \n \n\n\n \n \n\n\n \n \n\n\n \n \n\n
    ^International(date posted,Asset_Collaboration); 
    ^International(location,Asset_Collaboration); 
    ^International(compensation,Asset_Collaboration); 
    ^International(views,Asset_Collaboration); 
    \n\n\n
    \n \n \n \n
    \n
    \n
    \n\n\n
    \n \n \">\n •\n \n \n \">\n •\n \">\n \n
    \n
    \n\n\n\n
    \n

    \n
    \n
    \n \n \">\n \n \">\n \n
    \n
    \n \n \n \n \n \n
    Current\">\n \">\n
    \n \n
    \n
    \n
    \n : \n \n \n \n \">\n \n
    \n :
    \n
    \n
    \n :
    \n : \n \n     [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n \n :
    \n
    \n
    \n
    \n \n \n
    \n \n \">\n •\n \n \n \">\n •\n \">\n \n
    \n
    \n
    \n
    \n
    \n \n
    \n \n \n \n \n \n
    px;\">\n
    Current\">\n \">\n
    \n \n
    \n
    \n
    \n : \n \n \n \n \">\n \n
    \n :
    \n
    \n
    \n :
    \n : \n \n     [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n \n :
    \n
    \n
    \n
    \n \n \n
    \n \n \">\n •\n \n \n \">\n •\n \">\n \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n \n \n
    \n [ | | ]\n
    \n
    \n
    \n\n
    \n \n \"> \n •\n \n \"> \n \n •\n \"> \n \n \n •\n \">\n •\n \n \n \n \">\n •\n \n \">\n •\n \n \n \">\n •\n \n \">\n •\n \n \n \n \n \"> \n \n \">\n \n \n
    ','Collaboration/Thread',1,1,'PBtmpl0000000000000098',1277868922,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n

    \n\n
    \n:     [ \"> \"> ]
    \n
    \n
    \n\n^International(job description,Asset_Collaboration);
    \n

    \n
    \n\n^International(job requirements,Asset_Collaboration);
    \n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(date posted,Asset_Collaboration); 
    ^International(location,Asset_Collaboration); 
    ^International(compensation,Asset_Collaboration); 
    ^International(views,Asset_Collaboration); 
    \n\n
    \n\n\n\n
    \n
    \n
    \n\n
    \n\n\">\n•\n\n\n\">\n•\n\">\n\n
    \n
    \n\n
    \n

    \n
    \n
    \n\n\">\n\n\">\n\n
    \n
    \n\n\n\n\n
    Current\">\n\">\n
    \n\n
    \n
    \n
    \n:\n\n\n\n\">\n\n
    \n:
    \n
    \n
    \n:
    \n: \n\n    [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n\n:
    \n
    \n
    \n
    \n\n\n
    \n\n\">\n•\n\n\n\">\n•\n\">\n\n
    \n
    \n
    \n
    \n
    \n\n
    \n\n\n\n\n
    px;\">\n
    Current\">\n\">\n
    \n\n
    \n
    \n
    \n:\n\n\n\n\">\n\n
    \n:
    \n
    \n
    \n:
    \n: \n\n    [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n\n:
    \n
    \n
    \n
    \n\n\n
    \n\n\">\n•\n\n\n\">\n•\n\">\n\n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n\n
    \n[ | | ]\n
    \n
    \n
    \n
    \n\n\">\n•\n\n\">\n\n•\n\">\n\n\n•\n\">\n•\n\n\n\n\">\n•\n\n\">\n•\n\n\n\">\n•\n\n\">\n•\n\n\n\n\n\">\n\n\">\n\n\n
    ',0,NULL,NULL),('\" id=\"id\">\n\n
    \n

    \n

    \n

    \n

    \n

    \n
    \n\n\n

    \n\n

    \n
    \n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n\n\n\n
    \n

    \n \n

    \n

    \n

    \n
    \n
    \n

    \n\n\n','Collaboration/PostForm',1,1,'PBtmpl0000000000000122',1277868922,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n

    \n

    \n

    \n

    \n

    \n

    \n
    \n\n

    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\n
    \n

    \n\n

    \n

    \n

    \n
    \n
    \n

    ',0,NULL,NULL),('\" id=\"id\">\n\n\n \n\n\n\n

    \n\n\n\n \n\n\n

    \n \n \"> •\n \n \n \n \"> \n \n \">\n \n \n •\n \n \n \n \">\n \n

    \n\n
    \n\n
    \n
    \n \n \">\n \n \n \n\n \n \n \n \n \n \"> •\n \n \n \n (\">)\n\n \n
    \n
    Q
    \n
    \n
    A
    \n\n
    \n\n\n
    \n · · \n
    \n
    \n','Collaboration',1,1,'PBtmpl0000000000000081',1277868922,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n\n\n\n

    \n
    \n\n\n\n

    \n\n\"> •\n\n\n\n\">\n\n\">\n\n\n•\n\n\n\n\">\n\n

    \n
    \n\n
    \n
    \n\n\">\n\n\n\n\n\n\n\n\n\"> •\n\n\n\n(\">)\n\n
    \n
    Q
    \n
    \n
    A
    \n\n
    \n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n \n\n\n

    \n \n \"> •\n \n \n \n \">\n \n \">\n \n \n •\n \n \n \n \">\n \n

    \n\n
      \n \n
    1. \n \n \n [\">]\n \n \n \n \n \n \n \n \n [\">]\n \n \n \n (\">)\n \n \" target=\"_blank\">\n \n - \n \n
    2. \n
      \n
    \n\n\n
    \n · · \n
    \n
    \n','Collaboration',1,1,'PBtmpl0000000000000101',1277868922,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n\n\n\n

    \n
    \n\n\n\n

    \n\n\"> •\n\n\n\n\">\n\n\">\n\n\n•\n\n\n\n\">\n\n

    \n
      \n\n
    1. \n\n\n[\">]\n\n\n\n\n\n\n\n\n[\">]\n\n\n\n(\">)\n\n\" target=\"_blank\">\n\n- \n\n
    2. \n
      \n
    \n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('\" id=\"id\"> \n\n \n

    \n
    \n\n

    \n\n\n
    \n :     [ \"> \"> ]
    \n
    \n
    \n\n\n
    \n ^International(Link Description,Asset_Collaboration);

    \n
    \n \n ^International(Link URL,Asset_Collaboration);

    \n \">

    \n
    \n
    \n\n\n\n\n
    \n \n \n \n
    \n
    \n
    \n\n\n
    \n \n \">\n •\n \n \n \">\n •\n \">\n \n
    \n
    \n\n\n\n
    \n

    \n
    \n
    \n \n \">\n \n \">\n \n
    \n
    \n \n \n \n \n \n
    Current\">\n \" id=\"id\">\n
    \n \n
    \n
    \n
    \n : \n \n \n \n \">\n \n
    \n :
    \n
    \n
    \n :
    \n : \n \n     [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n \n :
    \n
    \n
    \n
    \n \n \n
    \n \n \"> • \n \n \n \"> •\n \">\n \n
    \n
    \n
    \n
    \n
    \n \n
    \n \n \n \n \n \n
    px;\">\n
    Current\">\n \" id=\"id\">\n
    \n \n
    \n
    \n
    \n : \n \n \n \n \">\n \n
    \n :
    \n
    \n
    \n :
    \n : \n \n     [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n \n :
    \n
    \n
    \n
    \n \n \n
    \n \n \"> •\n \n \n \"> • \n \">\n \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n \n \n
    \n [ | | ]\n
    \n
    \n
    \n\n
    \n \n \"> \n •\n \n \">^International(List All Links,Asset_Collaboration);\n \n •\n \"> \n \n \n •\n \">\n \n \n •\n \n \">\n •\n \n \">\n •\n \n \n \">\n •\n \n \">\n •\n \n \n \n \n \">\n \n \">\n \n \n
    ','Collaboration/Thread',1,1,'PBtmpl0000000000000113',1277868922,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n

    \n\n
    \n:     [ \"> \"> ]
    \n
    \n
    \n\n
    \n^International(Link Description,Asset_Collaboration);

    \n
    \n^International(Link URL,Asset_Collaboration);

    \n\">

    \n
    \n
    \n\n
    \n\n\n\n
    \n
    \n
    \n\n
    \n\n\">\n•\n\n\n\">\n•\n\">\n\n
    \n
    \n\n
    \n

    \n
    \n
    \n\n\">\n\n\">\n\n
    \n
    \n\n\n\n\n
    Current\">\n\" id=\"id\">\n
    \n\n
    \n
    \n
    \n:\n\n\n\n\">\n\n
    \n:
    \n
    \n
    \n:
    \n: \n\n    [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n\n:
    \n
    \n
    \n
    \n\n\n
    \n\n\"> •\n\n\n\"> •\n\">\n\n
    \n
    \n
    \n
    \n
    \n\n
    \n\n\n\n\n
    px;\">\n
    Current\">\n\" id=\"id\">\n
    \n\n
    \n
    \n
    \n:\n\n\n\n\">\n\n
    \n:
    \n
    \n
    \n:
    \n: \n\n    [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n\n:
    \n
    \n
    \n
    \n\n\n
    \n\n\"> •\n\n\n\"> •\n\">\n\n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n\n
    \n[ | | ]\n
    \n
    \n
    \n
    \n\n\">\n•\n\n\">^International(List All Links,Asset_Collaboration);\n\n•\n\">\n\n\n•\n\">\n\n\n•\n\n\">\n•\n\n\">\n•\n\n\n\">\n•\n\n\">\n•\n\n\n\n\n\">\n\n\">\n\n\n
    ',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n\n \n\n\n

    \n \n \">\n •\n \n \n \n \">\n \n \">\n \n •\n \n \">\n

    \n\n\n\n \n \n\n \n\n \n \n \n \n \n\n\n\n\n \n \n \n \n \n \n\n \n\n \n \n \n \n \n\n\n
    \">\">\">\">\">\">
    oddThreadevenThread\">\">oddThreadevenThread\">oddThreadevenThread\">\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\"> @ oddThreadevenThread\" style=\"font-size: 11px;\">\n \">\n by\n \n \n \n \">\n \n on @ \n
    \n\n\n
    \n · · \n
    \n
    \n\n','Collaboration',1,1,'PBtmpl0000000000000208',1277868922,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n\n\n

    \n\n\">\n•\n\n\n\n\">\n\n\">\n\n•\n\n\">\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \">\">\">\">\">\">
    oddThreadevenThread\">\">oddThreadevenThread\">oddThreadevenThread\">\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\"> @ oddThreadevenThread\" style=\"font-size: 11px;\">\n\">\nby\n\n\n\n\">\n\non @ \n
    \n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('\" id=\"id\"> \n\n \n

    \n
    \n\n

    \n\n
    \n\n
    \n\" alt=\"\" />\n
    \n
    \n : \n \n \n \n \">\n \n
    \n :
    \n :
    \n :
    \n : \n \n     [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n \n :     [ \">     [ \"> ]
    \n \n \n :
    \n
    \n
    \n\n :
    \n:\n\n
    \n
    \n\n
    \n \n
    \n\n\n
    \n \n \n \n
    \n
    \n
    \n\n\n
    \n \n \">\n •\n \n \n \">\n •\n \">\n \n
    \n
    \n\n
    \n\n\n
    \n

    \n
    \n
    \n \n \">\n \n \">\n \n
    \n
    \n \n \n \n \n \n
    Current\">\n \">\n
    \n \n
    \n
    \n \n \n \n\n\n\n \n \n \n
    \n\" alt=\"\" />\n\n : \n \n \n \n \">\n \n
    \n : \n
    \n : \n \n     [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n
    \n
    \n \n \n
    \n \n \">\n •\n \n \n \">\n •\n \">\n \n
    \n
    \n
    \n
    \n
    \n \n
    \n \n \n \n \n \n
    px;\">\n
    Current\">\n \">\n
    \n \n
    \n
    \n \n \n \n\n\n\n \n \n \n
    \n\" alt=\"\" />\n\n : \n \n \n \n \">\n \n
    \n : \n
    \n : \n \n     [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n
    \n
    \n \n \n
    \n \n \">\n •\n \n \n \">\n •\n \">\n \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n \n \n
    \n [ | | ]\n
    \n
    \n
    \n\n
    \n \n \"> \n •\n \n \">\n \n \n •\n \"> \n \n \n •\n \">\n •\n \n \n \n \">\n •\n \n \">\n •\n \n \n \">\n •\n \n \">\n •\n \n \n \n \n \">\n \n \">\n \n \n
    \n','Collaboration/Thread',1,1,'PBtmpl0000000000000209',1277868922,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n

    \n
    \n\n
    \n\" alt=\"\" />\n
    \n
    \n:\n\n\n\n\">\n\n
    \n:
    \n:
    \n:
    \n: \n\n    [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n\n:     [ \">     [ \"> ]
    \n\n\n:
    \n
    \n
    \n\n:
    \n:\n\n
    \n
    \n
    \n\n
    \n\n
    \n\n\n\n
    \n
    \n
    \n\n
    \n\n\">\n•\n\n\n\">\n•\n\">\n\n
    \n
    \n
    \n\n
    \n

    \n
    \n
    \n\n\">\n\n\">\n\n
    \n
    \n\n\n\n\n
    Current\">\n\">\n
    \n\n
    \n
    \n\n\n\n\n\n\n\n\n\n
    \n\" alt=\"\" />\n\n:\n\n\n\n\">\n\n
    \n: \n
    \n: \n\n    [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n
    \n
    \n\n\n
    \n\n\">\n•\n\n\n\">\n•\n\">\n\n
    \n
    \n
    \n
    \n
    \n\n
    \n\n\n\n\n
    px;\">\n
    Current\">\n\">\n
    \n\n
    \n
    \n\n\n\n\n\n\n\n\n\n
    \n\" alt=\"\" />\n\n:\n\n\n\n\">\n\n
    \n: \n
    \n: \n\n    [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n
    \n
    \n\n\n
    \n\n\">\n•\n\n\n\">\n•\n\">\n\n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n\n
    \n[ | | ]\n
    \n
    \n
    \n
    \n\n\">\n•\n\n\">\n\n•\n\">\n\n\n•\n\">\n•\n\n\n\n\">\n•\n\n\">\n•\n\n\n\">\n•\n\n\">\n•\n\n\n\n\n\">\n\n\">\n\n\n
    ',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n

    \n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n\n
    \n\n\n\n

    \n \n
    \n','Collaboration/PostForm',1,1,'PBtmpl0000000000000210',1277868922,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n
    \n\n\n

    \n\n
    ',0,NULL,NULL),('

    ^International(post received,Asset_Post);

    \">^International(493,WebGUI);

    ','Collaboration/PostReceived',1,1,'default_post_received1',1277868922,'WebGUI::Asset::Template::HTMLTemplate',1,'

    ^International(post received,Asset_Post);

    \">^International(493,WebGUI);

    ',0,NULL,NULL),('

    ^International(Unsubscribe from %s,Asset_Collaboration,\'\">\');

    \n\n

    \n
    \n\n^International(480,WebGUI);
    \n^International(unsubscribe instructions,Asset_Collaboration);
    \n','Collaboration/Unsubscribe',1,1,'default_CS_unsubscribe',1277868922,'WebGUI::Asset::Template::HTMLTemplate',1,'

    ^International(Unsubscribe from %s,Asset_Collaboration,\'\">\');

    \n\n

    \n
    \n\n^International(480,WebGUI);
    \n^International(unsubscribe instructions,Asset_Collaboration);
    \n',0,NULL,NULL),('

    ^International(\"choose username title\",\"Auth_Twitter\");

    \r\n

    \r\n
    \r\n\r\n\r\n\r\n\r\n
    \r\n\r\n','Auth/Twitter/ChooseUsername',1,1,'mfHGkp6t9gdclmzN33OEnw',1277868927,'WebGUI::Asset::Template::HTMLTemplate',1,'

    ^International(\"choose username title\",\"Auth_Twitter\");

    \n

    \n
    \n\n\n\n\n
    ',0,NULL,NULL),('\n

    \n
    \n\n\n

    \n
    \n\n\n \n\n\n\n\n\n \n\n\n \n\n\n \n\n\n \n
    \n \">^International(label day,Asset_Calendar);\n \">^International(label week,Asset_Calendar);\n \">^International(label month,Asset_Calendar);\n ?type=list\">^International(486,WebGUI);\n \">^International(label search,Asset_Calendar);\n\n \n
    \n \n
    \n
    \n \n
    \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n
    \n\n
    \" class=\"moreDisplay\">\n
    \n
      \n \n
    • \">
    • \n
      \n
    \n
    \n
    \n
    ','Calendar/Month',1,1,'CalendarMonth000000001',1279073449,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\">^International(label day,Asset_Calendar);\n\">^International(label week,Asset_Calendar);\n\">^International(label month,Asset_Calendar);\n?type=list\">^International(486,WebGUI);\n\">^International(label search,Asset_Calendar);\n\n
    \n\n
    \n
    \n \n
    \n
    \n\n\n\n\n\n\n\n\n\n\n
    \n
    \n\n
    \" class=\"moreDisplay\">\n
    \n\n
    \n
    \n
    ',0,NULL,NULL),('\n\n

    \n
    \n
    \n \n

    \n
    \n \n

    \n
    \n\n \n
      \n \n
    • \n
      \n
    \n
    \n\n\n \n \n \n \n
    \n \n \n
    \n ^International(comments,Asset_EMSSubmission);\n \n
    \n\n
    \n\n','EMS/Submission',1,1,'8tqyQx-LwYUHIWOlKPjJrA',1279073449,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n

    \n
    \n
    \n\n

    \n
    \n\n

    \n
    \n\n
      \n\n
    • \n
      \n
    \n
    \n\n\n\n\n\n
    \n\n\n
    \n^International(comments,Asset_EMSSubmission);\n\n
    \n
    ',0,NULL,NULL),('\n

    \n
    \n\n

    \n
    \n \n

    \n
    \n\n\n\n\n\n
    \n
    \n
      \n \n
    • class=\"selected\">\">
    • \n
      \n
    \n
    \n \n
    \">
    \n
    \n
    \n
    \n
    \n\n\">^International(schedule back link,Asset_EventManagementSystem);\n\n\n\n\n\n\n\n','EMS/SubmissionMain',1,1,'DoVNijm6lMDE0cYrtvEbDQ',1279073449,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n

    \n
    \n\n\n
    \n
    \n
      \n\n
    • class=\"selected\">\">
    • \n
      \n
    \n
    \n\n
    \">
    \n
    \n
    \n
    \n
    \n\">^International(schedule back link,Asset_EventManagementSystem);\n\n\n\n\n',0,NULL,NULL),(' \n\n \n \n \n \n \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n
    \n ^International(member since,Account_Inbox); ^D(%z,);\n
    ^International(reply message label,Account_Inbox);^International(compose message label,Account_Inbox);
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ^International(recipients label,Account_Inbox);^International(to label,Account_Inbox);:
    class=\"inbox_messageTo\"> [];
    ^International(subject label,Account_Inbox);:
    32\" class=\"send\">\n   \n \'\" />\n
    \n
    \n
    \n\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n \n
    \n
    \n \n \n \n \n \n \n \n \n \n
    _name\"> []
    \n
    \n
    \n \n \n
    \n
    \n
    \n','Account/Inbox/SendMessage',1,1,'6uQEULvXFgCYlRWnYzZsuA',1279073450,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n\n\n\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n
    \n^International(member since,Account_Inbox); ^D(%z,);\n
    ^International(reply message label,Account_Inbox);^International(compose message label,Account_Inbox);
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(recipients label,Account_Inbox);^International(to label,Account_Inbox);:
    class=\"inbox_messageTo\"> [];
    ^International(subject label,Account_Inbox);:
    32\" class=\"send\">\n  \n\'\" />\n
    \n
    \n
    \n\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\n
    \n
    \n\n\n\n\n\n\n\n\n\n
    _name\"> []
    \n
    \n
    \n\n\n
    \n
    \n
    \n',0,NULL,NULL),('
    \n\n
    \n
    \n
    \n
    \n
    \n\n
    \n\n\n','EMS/SubmissionQueue',1,1,'ktSvKU8riGimhcsxXwqvPQ',1279073450,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    \n
    \n
    \n
    \n
    \n
    \n',0,NULL,NULL),('\n
    \n
    \n
    \n \n \n \n \n \n \n \n \n \n \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    ^International(\'comparison label\',\'Asset_Matrix\');
    \n
    \n \n \n \n \n \n \n \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n','Matrix/Compare',1,1,'matrixtmpl000000000002',1281501162,'WebGUI::Asset::Template::HTMLTemplate',1,'\n
    \n
    \n
    \n\n\n\n\n\n\n\n\n\n\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    ^International(\'comparison label\',\'Asset_Matrix\');
    \n
    \n\n\n\n\n\n\n
    \n
    \n
    \n
    \n
    \n
    \n
    ',0,NULL,'[]'),('\n

    \n
    \n\n

    \n\n\n
    \n \n
    \n
    \n\n\n\n
    \n
    \n \n \n
    \n
    \n \n \n \n \n \n \n \n \n
    \n
    \" enctype=\"multipart/form-data\" method=\"post\" name=\"doCompare\">

    \n
    \n
    \n
    \n
    \n\n
    \n
    \n \n
    \n
    \n
    \n\n
    \n
    \n
    \n \n
    \n
    \n \n ^International(\'add new listing text\',\'Asset_Matrix\');\n \n ^International(\'create account part1 text\',\'Asset_Matrix\'); ^International(\'create account part2 text\',\'Asset_Matrix\');\n \n
    \n \n \n
    \n \n
    \n
    ^International(\'listing statistics label\',\'Asset_Matrix\');
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ^International(\'most clicks label\',\'Asset_Matrix\');\"> ()
    ^International(\'most views label\',\'Asset_Matrix\');\"> ()
    ^International(\'most compares label\',\'Asset_Matrix\');\"> ()
    \n \n
    ^International(\'most recently updated label\',\'Asset_Matrix\');
    \n \n \n \n \n \n \n \n
    \">
    \n \n
    ^International(\'best rated label\',\'Asset_Matrix\');
    \n \n \n \n \n \n \n \n
    \"> (/10)
    \n \n
    ^International(\'worst rated label\',\'Asset_Matrix\');
    \n \n \n \n \n \n \n \n
    \"> (/10)
    \n \n
    ^International(\'site statistics label\',\'Asset_Matrix\');
    \n \n \n \n \n \n
    ^International(\'listing count label\',\'Asset_Matrix\');
    \n \n\n \n
    ^International(\'pending listings label\',\'Asset_Matrix\');:
    \n \n \n \n \n \n \n \n \n
    \">
    \n
    \n
    \n\n
    \n\n
    \n
    \n
    \n\n','Matrix',1,1,'matrixtmpl000000000001',1281501162,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n

    \n\n
    \n\n
    \n
    \n\n
    \n
    \n\n\n
    \n
    \n\n\n\n\n\n\n\n\n
    \n
    \" enctype=\"multipart/form-data\" method=\"post\" name=\"doCompare\">

    \n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n\n^International(\'add new listing text\',\'Asset_Matrix\');\n\n^International(\'create account part1 text\',\'Asset_Matrix\'); ^International(\'create account part2 text\',\'Asset_Matrix\');\n\n
    \n\n
    \n
    \n
    ^International(\'listing statistics label\',\'Asset_Matrix\');
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(\'most clicks label\',\'Asset_Matrix\');\"> ()
    ^International(\'most views label\',\'Asset_Matrix\');\"> ()
    ^International(\'most compares label\',\'Asset_Matrix\');\"> ()
    \n
    ^International(\'most recently updated label\',\'Asset_Matrix\');
    \n\n\n\n\n\n\n\n
    \">
    \n
    ^International(\'best rated label\',\'Asset_Matrix\');
    \n\n\n\n\n\n\n\n
    \"> (/10)
    \n
    ^International(\'worst rated label\',\'Asset_Matrix\');
    \n\n\n\n\n\n\n\n
    \"> (/10)
    \n
    ^International(\'site statistics label\',\'Asset_Matrix\');
    \n\n\n\n\n\n
    ^International(\'listing count label\',\'Asset_Matrix\');
    \n\n
    ^International(\'pending listings label\',\'Asset_Matrix\');:
    \n\n\n\n\n\n\n\n\n
    \">
    \n
    \n
    \n
    \n
    \n
    \n
    ',0,NULL,'[]'),('\n\n\n
    \n \n \n

    \n
    \n \n

    \n \n \n [\n ^AssetProxy(new-matrix/matrix-nav);\n blockblockblock\">\n \n • \">^International(\'edit label\',\'Asset_MatrixListing\');\n \n \n • \">^International(\'approve or deny label\',\'Asset_Matrix\');\n \n \n ]\n \n

    \n \n
    \n \n \n \n
    \n
    \n \n
    \n
    \n ^International(\'description label\',\'Asset_MatrixListing\');\n \n
    \n \n \n \n
    \n
      \n
    • ^International(\'web site label\',\'Asset_MatrixListing\');\')\" href=\"#\"> 
    • \n
    • ^International(\'version label\',\'Asset_MatrixListing\'); 
    • \n
    • ^International(\'manufacturer label\',\'Asset_MatrixListing\');\')\" href=\"#\"> 
    • \n
    • ^International(\'last updated label\',\'Asset_MatrixListing\');
    • \n
    • ^International(\'clicks label\',\'Asset_Matrix\');
    • \n
    • ^International(\'views label\',\'Asset_Matrix\');
    • \n
    • ^International(\'compares label\',\'Asset_Matrix\');
    • \n
    \n
    \n \n
    \n
    \n
    \n
    \n ^International(Comments,WebGUI);\n \n ^International(Send Creator a Message,Asset_MatrixListing);\n
    \n \n
    ^International(\'message sent message\',\'Asset_MatrixListing\');
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    ','Matrix/Detail',1,1,'matrixtmpl000000000003',1281501163,'WebGUI::Asset::Template::HTMLTemplate',1,'\n
    \n\n

    \n
    \n

    \n\n\n[\n^AssetProxy(new-matrix/matrix-nav);\nblockblockblock\">\n\n• \">^International(\'edit label\',\'Asset_MatrixListing\');\n\n\n• \">^International(\'approve or deny label\',\'Asset_Matrix\');\n\n\n]\n\n

    \n
    \n\n\n\n
    \n
    \n
    \n
    \n^International(\'description label\',\'Asset_MatrixListing\');\n\n
    \n\n\n\n
    \n
      \n
    • ^International(\'web site label\',\'Asset_MatrixListing\');\')\" href=\"#\"> 
    • \n
    • ^International(\'version label\',\'Asset_MatrixListing\'); 
    • \n
    • ^International(\'manufacturer label\',\'Asset_MatrixListing\');\')\" href=\"#\"> 
    • \n
    • ^International(\'last updated label\',\'Asset_MatrixListing\');
    • \n
    • ^International(\'clicks label\',\'Asset_Matrix\');
    • \n
    • ^International(\'views label\',\'Asset_Matrix\');
    • \n
    • ^International(\'compares label\',\'Asset_Matrix\');
    • \n
    \n
    \n\n
    \n
    \n
    \n
    \n^International(Comments,WebGUI);\n\n^International(Send Creator a Message,Asset_MatrixListing);\n
    \n\n
    ^International(\'message sent message\',\'Asset_MatrixListing\');
    \n
    \n\n
    \n
    \n
    \n
    \n
    \n
    ',0,NULL,'[]'),('

    ^International(\'edit matrix listing title\',\'Asset_MatrixListing\');

    \r\n\r\n','Matrix/EditListing',1,1,'matrixtmpl000000000004',1281501163,'WebGUI::Asset::Template::HTMLTemplate',1,'

    ^International(\'edit matrix listing title\',\'Asset_MatrixListing\');

    \n',0,NULL,'[]'),('\n\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n\n
    \n
    ^International(search label,Asset_Matrix);
    \n
    \n \n
    \n \n \n \n \n \n \n \n \n \n \n
    \n
    \n
    \n
    \n
    \n

    \">^International(Return to Matrix,Asset_Matrix);

    \n
    \n\n\n\n','Matrix/Search',1,1,'matrixtmpl000000000005',1281501163,'WebGUI::Asset::Template::HTMLTemplate',1,'\n
    \n
    \n\n
    \n
    \n\n
    \n
    \n
    \n
    \n
    ^International(search label,Asset_Matrix);
    \n
    \n\n
    \n\n\n\n\n\n\n\n\n\n\n
    \n
    \n
    \n
    \n
    \n

    \">^International(Return to Matrix,Asset_Matrix);

    \n
    ',0,NULL,'[]'),('\n\n\n\n \">^International(Return to Matrix,Asset_Matrix);\n\n\n','Navigation',1,1,'alraubvBu-YJJ614jAHD5w',1281501163,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\">^International(Return to Matrix,Asset_Matrix);\n\n',0,NULL,'[]'),('\r\n\r\n\r\n ?func=getScreenshots\r\n \r\n 400\r\n 300\r\n 0xDDDDEE\r\n 20\r\n 800\r\n 600 \r\n Verdana\r\n 12\r\n 0xFFFFFF\r\n\r\n 0x888888\r\n 0x000000\r\n true\r\n over \r\n 0\r\n\r\n 0xFFFFFF\r\n 0x888888\r\n 0x000000\r\n true\r\n\r\n 20\r\n 200\r\n\r\n 60\r\n 45\r\n 0x888888\r\n false\r\n true\r\n 100\r\n 8\r\n\r\n off \r\n false\r\n true\r\n false\r\n true\r\n \r\n \r\n\r\n rounded \r\n','Matrix/ScreenshotsConfig',1,1,'matrixtmpl000000000007',1281501163,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n?func=getScreenshots\n400\n300\n0xDDDDEE\n20\n800\n600\nVerdana\n12\n0xFFFFFF\n0x888888\n0x000000\ntrue\nover\n0\n0xFFFFFF\n0x888888\n0x000000\ntrue\n20\n200\n60\n45\n0x888888\nfalse\ntrue\n100\n8\noff\nfalse\ntrue\nfalse\ntrue\n\n\nrounded\n',0,NULL,'[]'),('\n\n\n Screenshots\n \n\n\n\n\n
    \n\n \n \n &width=800&height=600\" />\n \n \n &width=800&height=600\" />\n \n \n \"Get\n \n \n \n \n \n
    \n \n \n\n\n','Matrix/Screenshots',1,1,'matrixtmpl000000000006',1281501163,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\nScreenshots\n\n\n\n
    \n\n\n&width=800&height=600\" />\n\n\n&width=800&height=600\" />\n\n\n\"Get\n\n\n\n\n\n
    \n\n\n\n',0,NULL,'[]'),('
    \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','Account/Layout',1,1,'N716tpSna0iIQTKxS4gTWA',1281501163,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n
    \n
    \n
    \n
    ',0,NULL,'[]'),(' ^International(new post,AssetAspect_Subscribable);\n\n\n\n\n','AssetAspect/Subscribable',1,1,'limMkk80fMB3fqNZVf162w',1281501163,'WebGUI::Asset::Template::HTMLTemplate',1,' ^International(new post,AssetAspect_Subscribable);\n\n',0,NULL,'[]'),('\" id=\"id\">\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
    ^International(\"99\",\"Asset\");^International(\"creation_date\",\"Asset_AssetReport\");^International(\"created_by\",\"Asset_AssetReport\");
    \">^D(\'%C %D, %y %h:%s %p\',);^User(\'username\',);
    \r\n\r\n\r\n

    \r\n \r\n
    \r\n
    \r\n','AssetReport',1,1,'sJtcUCfn0CVbKdb4QM61Yw',1283921584,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(\"99\",\"Asset\");^International(\"creation_date\",\"Asset_AssetReport\");^International(\"created_by\",\"Asset_AssetReport\");
    \">^D(\'%C %D, %y %h:%s %p\',);^User(\'username\',);
    \n\n

    \n \n
    \n
    ',0,NULL,'[]'),('
    \" class=\"storyTopic\">\n\" id=\"id\">\n

    \n\n

    \n
    \n

    \">^International(rss,WebGUI); •\n\">Atom

    \n\n\n
    \n

    \">

    \n

    \n
    \n
    \n\n ','StoryTopic',1,1,'A16v-YjWAShXWvSACsraeg',1285124154,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"storyTopic\">\n\" id=\"id\">\n

    \n\n

    \n
    \n

    \">^International(rss,WebGUI); •\n\">Atom

    \n\n\n
    \n

    \">

    \n

    \n
    \n
    \n\n',0,NULL,NULL),('
    \r\n \r\n \r\n
    \r\n
    \r\n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\r\n \r\n \r\n \r\n
    \r\n
    \r\n ^International(\'template search title\',\'Asset_Gallery\');\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
    ^International(\'template search field title\',\'Asset_Gallery\');
    ^International(\'template search field description\',\'Asset_Gallery\');
    ^International(\'template search field keywords\',\'Asset_Gallery\');
    ^International(\'template search field location\',\'Asset_Gallery\');
    ^International(\'template search field className\',\'Asset_Gallery\');\r\n \r\n
    ^International(\'template search field creationDate\',\'Asset_Gallery\');^International(\'template search to\',\'Asset_Gallery\');
     \r\n \r\n
    \r\n
    \r\n \r\n\r\n

    \r\n\r\n \r\n
    \r\n \r\n
    \r\n ^International(\'template search results for\',\'Asset_Gallery\'); \"\".\r\n
    \r\n\r\n

    Albums

    \r\n \r\n \r\n
    \r\n \" class=\"albumTitle\">\r\n \r\n \r\n \r\n
    \r\n
    \r\n \r\n \r\n \r\n ?func=edit\">Add a Description\r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n \r\n

    Pictures

    \r\n \r\n \r\n
    \r\n \" class=\"title\">\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
    ^International(\"template file creationDate\",\"Asset_GalleryAlbum\"); ^D(\"%M/%d/%Y\",);
    \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
    ','Gallery/Search',1,1,'jME5BEDYVDlBZ8jIQA9-jQ',1285124155,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n
    \n
    \n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\n\n\n\n
    \n
    \n^International(\'template search title\',\'Asset_Gallery\');\n
    \n\n\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(\'template search field title\',\'Asset_Gallery\');
    ^International(\'template search field description\',\'Asset_Gallery\');
    ^International(\'template search field keywords\',\'Asset_Gallery\');
    ^International(\'template search field location\',\'Asset_Gallery\');
    ^International(\'template search field className\',\'Asset_Gallery\');\n\n
    ^International(\'template search field creationDate\',\'Asset_Gallery\');^International(\'template search to\',\'Asset_Gallery\');
     \n\n
    \n
    \n\n

    \n\n
    \n
    \n ^International(\'template search results for\',\'Asset_Gallery\'); \"\".\n
    \n

    Albums

    \n\n\n\n\n\n
    \n

    Pictures

    \n\n\n
    \n\" class=\"title\">\n\n\n\n\n
    \n
    \n\n
    \n
    \n
    \n
    \n\n
    ^International(\"template file creationDate\",\"Asset_GalleryAlbum\"); ^D(\"%M/%d/%Y\",);
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n
    \n
    ',0,NULL,NULL),('\r\n \r\n\r\n\r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\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 \" class=\"albumTitle\">\r\n \r\n \r\n \r\n
    \r\n
    \r\n \r\n \r\n \r\n ?func=edit\">Add a Description\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
    ','Gallery/ListAlbums',1,1,'azCqD0IjdQSlM3ar29k5Sg',1285124155,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n',0,NULL,NULL),('\n \n\n\n','GalleryAlbum/View',1,1,'05FpjceLYhq4csF1Kww1KQ',1285124155,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n',0,NULL,NULL),('\r\n \r\n\r\n\r\n
    \r\n \r\n\r\n
    \r\n
    \r\n \" class=\"current\">^International(template url_thumbnails,Asset_GalleryAlbum);  ·  \r\n \">^International(template url_slideshow,Asset_GalleryAlbum);  ·  \r\n \">^International(template url,Asset_GalleryAlbum);    \r\n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\r\n \r\n \r\n \r\n
    \r\n
    \r\n ·\r\n ^International(template by,Asset_Gallery);: \">\r\n
    \r\n\r\n \r\n\r\n
    \r\n \" class=\"title\">\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
    ^International(\'template creationDate\',\'Asset_Photo\');: ^D(\"%z %Z\",);
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n\r\n
    \r\n \r\n \" class=\"thumb\">\r\n \" />\r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    ','GalleryAlbum/ViewThumbnails',1,1,'q5O62aH4pjUXsrQR3Pq4lw',1285124155,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n',0,NULL,NULL),('\r\n \r\n\r\n\r\n
    \r\n \r\n \r\n
    \r\n
    \r\n \">^International(template url_thumbnails,Asset_GalleryAlbum);  ·  \r\n \" class=\"current\">^International(template url_slideshow,Asset_GalleryAlbum);  ·  \r\n \">^International(template url,Asset_GalleryAlbum);    \r\n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\r\n \r\n \r\n \r\n
    \r\n
    \r\n ·\r\n ^International(template by,Asset_Gallery);: \"> \r\n
    \r\n\r\n \r\n\r\n
    \r\n
    \r\n \"Previous\r\n \r\n \"Next\r\n
    \r\n
    \r\n \r\n
    \r\n \r\n
    \r\n \">\" style=\"border: none\" /> \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    ','GalleryAlbum/ViewSlideshow',1,1,'KAMdiUdJykjN02CPHpyZOw',1285124155,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n',0,NULL,NULL),('
    \n \n \n
    \n
    \n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\n \n \n \n
    \n
    \n \n
    \n\n \n\n

    ^International(template listFilesForUser albums title,Asset_Gallery);

    \n \n \n \n \n \n
    \n \n

    ^International(template listFilesForUser pictures title,Asset_Gallery);

    \n \n \n
    \n \" class=\"title\">\n \n \n \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    ^International(\'template file creationDate\',\'Asset_GalleryAlbum\'); ^D(\"%z\", );
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n \n \n
    ','Gallery/ListFilesForUser',1,1,'OkphOEdaSGTXnFGhK4GT5A',1285124155,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n
    \n
    \n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\n\n\n\n
    \n
    \n\n
    \n\n

    ^International(template listFilesForUser albums title,Asset_Gallery);

    \n\n\n\n
    \n

    ^International(template listFilesForUser pictures title,Asset_Gallery);

    \n\n
    \n\" class=\"title\">\n\n\n\n\n
    \n
    \n\n
    \n
    \n
    \n
    \n\n
    ^International(\'template file creationDate\',\'Asset_GalleryAlbum\'); ^D(\"%z\", );
    \n
    \n
    \n
    \n
    \n
    \n
    \n\n
    ',0,NULL,NULL),('\n \n\n\n
    \n \n\n
    \n
    \n \">^International(\'template url_album\',\'Asset_Photo\');    \n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\n \n \n \n
    \n
    \n ·\n ^International(\'template by\',\'Asset_Gallery\');: \">\n
    \n\n
    \n
    \n

    \n \" class=\"thumbnail\">\" alt=\"Image\" />\n \n
    \n \n
    \n
    \n \" class=\"fullSize\">^International(\'template fileUrl\',\'Asset_Photo\');\n
    \n
    \n\n
    \n \n \">\n \"first\n \n \n \"first\n \n \n \">\n \"first\n \n \n \"first\n \n \n \">\n \"first\n \n \n \"first\n \n \n \">\n \"first\n \n \n \"first\n \n
    \n\n
    \n\n
    \n
    \n ^International(template view details,Asset_Photo);\n
    \n \n ^International(\'template creationDate\',\'Asset_Photo\');:\n \n \n ^D(\"%z %Z\",);\n \n
    \n
    \n \n ^International(\'template views\',\'Asset_Photo\');:\n \n \n \n \n
    \n
    \n \n ^International(\'template by\',\'Asset_Gallery\');:\n \n \n \">\n (\">^International(\'template filesForUser\', \'Asset_Photo\');)\n \n
    \n
    \n \n ^International(\'template friendsOnly label\',\'Asset_Photo\');:\n \n \n ^International(\'template friendsOnly yes\',\'Asset_Photo\');^International(\'template friendsOnly no\',\'Asset_Photo\');\n \n
    \n
    \n \n ^International(\'template location\',\'Asset_Photo\');:\n \n \n \n \n
    \n
    \n \n ^International(template view available resolutions,Asset_Photo);\n \n \n \n \">\n \n \n
    \n
    \n \n
    \n ^International(\'template keywords\',\'Asset_Photo\');\n \n \">, \n \n
    \n
    \n
    \n ^International(more details,Asset_Photo);\n
    \n \n
    rowOnerowTwo\">\n \n :\n \n \n \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n ^International(\'template comments title\',\'Asset_Photo\'); [^International(post,Asset_Collaboration);]\n
    \n \n
    \n \n
    \n \n
    \n
    \n \n
    \n
    \n \n \n \n
    \n
    ','GalleryFile/View',1,1,'TEId5V-jEvUULsZA0wuRuA',1285124155,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n
    \n\n
    \n
    \n\">^International(\'template url_album\',\'Asset_Photo\');    \n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\n\n\n\n
    \n
    \n ·\n^International(\'template by\',\'Asset_Gallery\');: \">\n
    \n\n
    \n
    \n^International(template view details,Asset_Photo);\n
    \n\n^International(\'template creationDate\',\'Asset_Photo\');:\n\n\n^D(\"%z %Z\",);\n\n
    \n
    \n\n^International(\'template views\',\'Asset_Photo\');:\n\n\n\n\n
    \n
    \n\n^International(\'template by\',\'Asset_Gallery\');:\n\n\n\">\n(\">^International(\'template filesForUser\', \'Asset_Photo\');)\n\n
    \n
    \n\n^International(\'template friendsOnly label\',\'Asset_Photo\');:\n\n\n^International(\'template friendsOnly yes\',\'Asset_Photo\');^International(\'template friendsOnly no\',\'Asset_Photo\');\n\n
    \n
    \n\n^International(\'template location\',\'Asset_Photo\');:\n\n\n\n\n
    \n
    \n\n^International(template view available resolutions,Asset_Photo);\n\n\n\n\">\n\n\n
    \n
    \n\n
    \n^International(\'template keywords\',\'Asset_Photo\');\n\n\">, \n\n
    \n
    \n
    \n^International(more details,Asset_Photo);\n
    \n\n
    rowOnerowTwo\">\n\n:\n\n\n\n\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n^International(\'template comments title\',\'Asset_Photo\'); [^International(post,Asset_Collaboration);]\n
    \n\n
    \n\n
    \n\n
    \n
    \n\n
    \n
    \n\n\n\n
    \n
    ',0,NULL,NULL),('\n\n\n
    \n \n\n
    \n
    \n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\n \n \n \n
    \n
    \n \n ^International(\'template add\',\'Asset_GalleryAlbum\');\n \n ^International(\'template edit\',\'Asset_GalleryAlbum\');\n \n
    \n\n

    \n\n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n
    ^International(\'editForm title label\',\'Asset_GalleryAlbum\');
    ^International(\'editForm description label\',\'Asset_GalleryAlbum\');
    ^International(\'editForm othersCanAdd label\',\'Asset_GalleryAlbum\');
    \n
    \n \n
      \n \n
    1. \" class=\"galleryOrg\">\n
      \n \" href=\"?func=edit;proceed=editParent\">\" alt=\"\" />\n
      \n

      \n
      \n
      \n \n
      \n
      \n
    2. \n
      \n
    \n
    \n
    \n\n
    \n \n
    \n \n
    ','GalleryAlbum/Edit',1,1,'6X-7Twabn5KKO_AbgK3PEw',1285124155,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n
    \n\n
    \n
    \n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\n\n\n\n
    \n
    \n\n^International(\'template add\',\'Asset_GalleryAlbum\');\n\n^International(\'template edit\',\'Asset_GalleryAlbum\');\n\n
    \n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(\'editForm title label\',\'Asset_GalleryAlbum\');
    ^International(\'editForm description label\',\'Asset_GalleryAlbum\');
    ^International(\'editForm othersCanAdd label\',\'Asset_GalleryAlbum\');
    \n
    \n\n
      \n\n
    1. \" class=\"galleryOrg\">\n
      \n\" href=\"?func=edit;proceed=editParent\">\" alt=\"\" />\n
      \n

      \n
      \n
      \n\n
      \n
      \n
    2. \n
      \n
    \n
    \n
    \n
    \n\n
    \n\n
    ',0,NULL,NULL),('
    \n \n\n
    \n
    \n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\n \n \n \n
    \n
    \n \n ^International(\'template add\',\'Asset_GalleryAlbum\');\n \n ^International(\'template edit\',\'Asset_GalleryAlbum\');\n \n
    \n\n

    \n\n

    \n\n \n

    ^International(\'template error happened\',\'Asset_Photo\');

    \n
      \n \n
    • \n
      \n
    \n
    \n\n \n\n \n\n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ^International(\'template upload type\',\'Asset_GalleryAlbum\');\n ^International(\'template upload single\',\'Asset_GalleryAlbum\');\n \" class=\"adminButton\">^International(\'template upload archive\',\'Asset_GalleryAlbum\');\n
    ^International(\'editForm title label\',\'Asset_Photo\');\n \n
    ^International(\'editForm synopsis label\',\'Asset_Photo\');\n \n
    ^International(\'editForm photo new\',\'Asset_Photo\'); ^International(\'editForm photo replace\',\'Asset_Photo\');\n \n
    ^International(\'editForm keywords\',\'Asset_Photo\');\n \n
    ^International(\'editForm location\',\'Asset_Photo\');\n \n
    ^International(\'editForm friendsOnly\',\'Asset_Photo\');\n \n
    \n\n \n\n \n\n
    ','GalleryFile/Edit',1,1,'7JCTAiu1U_bT9ldr655Blw',1285124155,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n
    \n
    \n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\n\n\n\n
    \n
    \n\n^International(\'template add\',\'Asset_GalleryAlbum\');\n\n^International(\'template edit\',\'Asset_GalleryAlbum\');\n\n
    \n

    \n

    \n\n

    ^International(\'template error happened\',\'Asset_Photo\');

    \n
      \n\n
    • \n
      \n
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(\'template upload type\',\'Asset_GalleryAlbum\');\n^International(\'template upload single\',\'Asset_GalleryAlbum\');\n\" class=\"adminButton\">^International(\'template upload archive\',\'Asset_GalleryAlbum\');\n
    ^International(\'editForm title label\',\'Asset_Photo\');\n\n
    ^International(\'editForm synopsis label\',\'Asset_Photo\');\n\n
    ^International(\'editForm photo new\',\'Asset_Photo\'); ^International(\'editForm photo replace\',\'Asset_Photo\');\n\n
    ^International(\'editForm keywords\',\'Asset_Photo\');\n\n
    ^International(\'editForm location\',\'Asset_Photo\');\n\n
    ^International(\'editForm friendsOnly\',\'Asset_Photo\');\n\n
    \n\n\n
    ',0,NULL,NULL),('
    \r\n

    ^International(\'template addArchive title\',\'Asset_GalleryAlbum\');

    \r\n\r\n

    ^International(\'template addArchive body\',\'Asset_GalleryAlbum\');

    \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
    ^International(\'template upload type\',\'Asset_GalleryAlbum\');\r\n \" class=\"adminButton\">^International(\'template upload single\',\'Asset_GalleryAlbum\');\r\n ^International(\'template upload archive\',\'Asset_GalleryAlbum\');\r\n
    ^International(\'addArchive file\',\'Asset_GalleryAlbum\');\r\n \r\n
    ^International(\'addArchive keywords\',\'Asset_GalleryAlbum\');\r\n \r\n
    ^International(\'addArchive location\',\'Asset_GalleryAlbum\');\r\n \r\n
    ^International(\'addArchive sortBy\',\'Asset_GalleryAlbum\');
    ^International(\'addArchive friendsOnly\',\'Asset_GalleryAlbum\');
    \r\n \r\n
    \r\n \r\n
    \r\n \r\n \r\n\r\n
    ','GalleryAlbum/AddArchive',1,1,'0X4Q3tBWUb_thsVbsYz9xQ',1285124155,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n

    ^International(\'template addArchive title\',\'Asset_GalleryAlbum\');

    \n

    ^International(\'template addArchive body\',\'Asset_GalleryAlbum\');

    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(\'template upload type\',\'Asset_GalleryAlbum\');\n\" class=\"adminButton\">^International(\'template upload single\',\'Asset_GalleryAlbum\');\n^International(\'template upload archive\',\'Asset_GalleryAlbum\');\n
    ^International(\'addArchive file\',\'Asset_GalleryAlbum\');\n\n
    ^International(\'addArchive keywords\',\'Asset_GalleryAlbum\');\n\n
    ^International(\'addArchive location\',\'Asset_GalleryAlbum\');\n\n
    ^International(\'addArchive sortBy\',\'Asset_GalleryAlbum\');
    ^International(\'addArchive friendsOnly\',\'Asset_GalleryAlbum\');
    \n
    \n\n
    \n\n
    ',0,NULL,NULL),('
    \n \n\n
    \n
    \n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\n \n \n \n
    \n
    \n ^International(template makeShortcut title,Asset_Photo);\n
    \n\n

    \n\n
    \n\n \n \n \n \n \n \n \n \n \n \n
    ^International(template makeShortcut file,Asset_Photo);
    ^International(template makeShortcut album,Asset_Photo);
    \n\n
    \n \n
    \n\n \n
    \n
    ','GalleryFile/MakeShortcut',1,1,'m3IbBavqzuKDd2PGGhKPlA',1285124155,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n
    \n
    \n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\n\n\n\n
    \n
    \n^International(template makeShortcut title,Asset_Photo);\n
    \n

    \n
    \n\n\n\n\n\n\n\n\n\n\n
    ^International(template makeShortcut file,Asset_Photo);
    ^International(template makeShortcut album,Asset_Photo);
    \n
    \n \n
    \n\n
    \n
    ',0,NULL,NULL),('
    \n \n \n
    \n
    \n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\n \n \n \n
    \n
    \n^International(template url_delete,Asset_GalleryAlbum);\n
    \n\n

    \n\n \n\n
    ','GalleryAlbum/Delete',1,1,'UTNFeV7B_aSCRmmaFCq4Vw',1285124155,'WebGUI::Asset::Template::HTMLTemplate',1,'',0,NULL,NULL); -INSERT INTO `template` VALUES ('
    \n \n \n
    \n
    \n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\n \n \n \n
    \n
    \n^International(template url_delete,Asset_Photo);\n
    \n\n

    \n\n \n
    ','GalleryFile/Delete',1,1,'zcX-wIUct0S_np14xxOA-A',1285124155,'WebGUI::Asset::Template::HTMLTemplate',1,'',0,NULL,NULL),('\r\n\r\n\r\n<tmpl_var title>\r\n\r\n\r\n\r\n\r\n\r\n<tmpl_var title>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n','GalleryAlbum/ViewRss',1,1,'mM3bjP_iG9sv5nQb4S17tQ',1285124158,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n<tmpl_var title>\n\n\n\n\n<tmpl_var title>\n\n\n\n\n\n\n\n',0,NULL,NULL),('\r\n\r\n\r\n<tmpl_var title>\r\n\r\n\r\n\r\n\r\n\r\n<tmpl_var title>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n','Gallery/ListAlbumsRss',1,1,'ilu5BrM-VGaOsec9Lm7M6Q',1285124158,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n<tmpl_var title>\n\n\n\n\n<tmpl_var title>\n\n\n\n\n\n\n\n',0,NULL,NULL),('\r\n\r\n\r\n<tmpl_var title>\r\n\r\n\r\n\r\n\r\n\r\n<tmpl_var title>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n','Gallery/ListFilesForUserRss',1,1,'-ANLpoTEP-n4POAdRxCzRw',1285124158,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n<tmpl_var title>\n\n\n\n\n<tmpl_var title>\n\n\n\n\n\n\n\n',0,NULL,NULL),('
    \n \n\n
    \n
    \n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\n \n \"\"\n \n \"\"\n \"\"\n \n \"\"\n
    \n
    \n
    \n\n

    \n\n
    \n ^International(\"template comment add title\",\"Asset_Photo\");\n ^International(\"template comment edit title\",\"Asset_Photo\");\n \n \n
    \n
    \n \n
    \n \n
    \n
    \n \n
    \n
    ','GalleryFile/EditComment',1,1,'OxJWQgnGsgyGohP2L3zJPQ',1285124158,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n
    \n
    \n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\n\n\"\"\n\n\"\"\n\"\"\n\n\"\"\n
    \n
    \n
    \n

    \n
    \n^International(\"template comment add title\",\"Asset_Photo\");\n^International(\"template comment edit title\",\"Asset_Photo\");\n\n\n
    \n
    \n\n
    \n\n
    \n
    \n\n
    \n
    ',0,NULL,NULL),('\r\n\r\n\r\n\r\n^Page(title); · ^c();\r\n\r\n\r\n\r\n\r\n\r\n^AdminBar();\r\n\r\n
    \r\n

    ^c();

    \r\n ^u();\r\n
    \r\n\r\n
    \r\n \r\n
    \r\n\r\n
    \r\n ©^D(%y); ^c();\r\n
    \r\n\r\n\r\n \r\n\r\n\r\n\r\n\r\n','style',1,1,'PBtmpl0000000000000111',1286336607,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n^Page(title); · ^c();\n\n\n\n\n^AdminBar();\n
    \n

    ^c();

    \n^u();\n
    \n
    \n\n
    \n
    \n©^D(%y); ^c();\n
    \n\n\n\n\n',0,NULL,'[]'),('

    \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
    ','Auth/LDAP/Account',1,1,'PBtmpl0000000000000004',1287545014,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n\n

    \n\n\n

    \n\n\n\n\n\n
    \n\n\n\n
    \n
    \n
    \n\n
    ',0,NULL,NULL),('

    \n \n

    \n\n \n\n\n\n\n\n\n \n \n\n\n \n \n\n\n \n \n\n\n\n \n \n\n\n\n \n \n\n
    \n\n\n\n
    \n \n
    ','Auth/LDAP/Create',1,1,'PBtmpl0000000000000005',1287545014,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n
    \n\n
    ',0,NULL,NULL),('

    \n \n

    \n\n \n\n\n\n\n\n\n \n \n\n\n \n \n\n\n \n \n\n
    \n\n\n
    \n
      \n \n
    • \">
    • \n
      \n\n
    \n
    ','Auth/LDAP/Login',1,1,'PBtmpl0000000000000006',1287545014,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n
    \n\n
    ',0,NULL,NULL),('

    \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','Auth/WebGUI/Account',1,1,'PBtmpl0000000000000010',1287545014,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n
    \n\n
    ',0,NULL,NULL),('

    \n\n\n \n\n\n\n\n\n\n\n \n \n\n\n\n \n \n\n\n \n \n\n\n\n \n \n\n\n\n\n \n \n\n\n\n \n\n\n \n\n
     
    \n\n\n
    \n \n
    \n','Auth/WebGUI/Create',1,1,'PBtmpl0000000000000011',1287545014,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
     
    \n\n
    \n\n
    ',0,NULL,NULL),('^International(\'50\',\'WebGUI\');: \r\n^International(\'51\',\'WebGUI\');: \r\n\r\n','Auth/WebGUI/Welcome',1,1,'PBtmpl0000000000000015',1287545014,'WebGUI::Asset::Template::HTMLTemplate',1,'^International(\'50\',\'WebGUI\');: \n^International(\'51\',\'WebGUI\');: \n',0,NULL,NULL),('^International(\'email address validation email body\',\'AuthWebGUI\');\r\n\r\n','Auth/WebGUI/Activation',1,1,'PBtmpl0000000000000016',1287545014,'WebGUI::Asset::Template::HTMLTemplate',1,'^International(\'email address validation email body\',\'AuthWebGUI\');\n',0,NULL,NULL),('

    \n \n

    \n\n\n \n\n\n\n\n\n\n \n \n\n\n \n \n\n\n \n \n\n\n \n \n\n
    \n \n \n \n
    \n \n \n \n
    \n \n \n \n
    \n \n
    \n','Auth/WebGUI/Expired',1,1,'PBtmpl0000000000000012',1287545014,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\n\n
    \n\n\n\n
    \n\n\n\n
    \n\n
    \n',0,NULL,NULL),('

    \n \n

    \n\n\n \n\n\n\n\n\n\n \n \n\n\n \n \n\n\n \n \n\n
    \n\n\n
    \n \n
    ','Auth/WebGUI/Login',1,1,'PBtmpl0000000000000013',1287545014,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n
    \n\n
    ',0,NULL,NULL),('

    \n\n

    \n
    \n\n\n\n\n\n\n\n\n \n \n\n\n \n \n\n\n\n\n \n \n\n\n\n\n \n \n\n\n\n\n \n \n\n
    \n\n\n
    \n \n
    \n','Auth/WebGUI/Recovery2',1,1,'PBtmpl0000000000000014',1287545015,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n
    \n\n
    ',0,NULL,NULL),('

    \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','Auth/WebGUI/Deactivate',1,1,'zaHUYsE_PgKk8hnVd8ffEQ',1287545015,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n

    \n\n

    \n
    \n\">\n         \n\">\n
    ',0,NULL,NULL),('

    \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','Auth/LDAP/Deactivate',1,1,'_P4PMiraGsLTfOjK4fYQPQ',1287545015,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n

    \n\n

    \n
    \n\">\n         \n\">\n
    ',0,NULL,NULL),('^International(recover password email text1,AuthWebGUI,^u;);\n\n^International(recover password email text2,AuthWebGUI);\n\n\n\n^International(recover password email text3,AuthWebGUI);','Auth/WebGUI/RecoveryEmail',1,1,'sK_0zVw4kwdJ1sqREIsSzA',1287545015,'WebGUI::Asset::Template::HTMLTemplate',1,'^International(recover password email text1,AuthWebGUI,^u;);\n^International(recover password email text2,AuthWebGUI);\n\n^International(recover password email text3,AuthWebGUI);',0,NULL,NULL),('\n\n\n\n\">','NotifyAboutVersionTag',1,1,'lYhMheuuLROK_iNjaQuPKg',1287545015,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n',0,NULL,'[]'),('

    \n\n\n \n \n \n \n \n \n\n
    :
    \n\n\n

    \n\n\n \n \n \n \n \n \n\n
    :
    \n
    ','DataForm',1,1,'PBtmpl0000000000000085',1288747840,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n\n\n\n\n\n\n\n\n
    :
    \n
    \n\n

    \n\n\n\n\n\n\n\n\n
    :
    \n
    \n
    ',0,NULL,NULL),('\n

    \n
    \n\n

    \n
    \n\n

    \n
    \n\n\n\n\n\n','EMS',1,1,'2rC4ErZ3c77OJzJm7O5s3w',1288747841,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n

    \n
    \n\n',0,NULL,NULL),('

    Friends for

    \n

    \">^International(back to friend manager,Account_FriendManager);

    \n\n\n
    \n

    ^International(remove friends,Account_FriendManager);

    \n\n\n\n\n\n\n\n\n\n\n\n
    ^International(remove all,Account_FriendManager);
    \n
    \n
    \n
    \n

    ^International(add new friends,Account_FriendManager);

    \n\n

    ^International(group,WebGUI);: . \">^International(view users from all groups,Account_FriendManager);

    \n
    \n\n\n

    ^International(Add Friend Managers,Account_FriendManager);:

    \n
    \n
    \n
    \n\n','Account/FriendManager/Edit',1,1,'lG2exkH9FeYvn4pA63idNg',1289967962,'WebGUI::Asset::Template::HTMLTemplate',1,'

    Friends for

    \n

    \">^International(back to friend manager,Account_FriendManager);

    \n\n\n
    \n

    ^International(remove friends,Account_FriendManager);

    \n\n\n\n\n\n\n\n\n\n\n\n
    ^International(remove all,Account_FriendManager);
    \n
    \n
    \n
    \n

    ^International(add new friends,Account_FriendManager);

    \n\n

    ^International(group,WebGUI);: . \">^International(view users from all groups,Account_FriendManager);

    \n
    \n\n\n

    ^International(Add Friend Managers,Account_FriendManager);:

    \n
    \n
    \n
    \n\n',0,NULL,NULL),('\r\n

    \r\n

    \r\n\r\n\r\n

    \r\n \">^International(\"add entry\",\"Asset_DataForm\");\r\n • \">\r\n \r\n • \" onclick=\"\">\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
    ^International(Entry ID,Asset_DataForm);\r\n \r\n \r\n \r\n \r\n \r\n ^International(Submission Date,Asset_DataForm);
    \">
    \r\n\r\n
    \r\n [ | | ]\r\n
    \r\n
    \r\n','DataForm/List',1,1,'PBtmpl0000000000000021',1294721945,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n

    \n\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(Entry ID,Asset_DataForm);\n\n\n\n\n\n^International(Submission Date,Asset_DataForm);
    \">
    \n\n
    \n[ | | ]\n
    \n
    ',0,NULL,'[]'),('\n\n \n\n\n \n\n\n \n\n\n \n\n
    \n \">^International(label day,Asset_Calendar);\n \">^International(label week,Asset_Calendar);\n \">^International(label month,Asset_Calendar);\n \">^International(486,WebGUI);\n \">^International(label search,Asset_Calendar);\n \n \n
    \n \n \n
    \n ^International(event details,Asset_Event);\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n\n \n \n \n \n\n \n \n \n \n\n
    \n
    ^International(event title,Asset_Event);
    \n
    \n
    \n \n
    \n
    \n
    ^International(location,Asset_Event);
    \n
    \n
    \n \n
    \n
    \n
    ^International(description,Asset_Event);
    \n
    \n
    \n
    \n
    ^International(scheduled,Asset_Event);
    \n
    \n
    \n \n
    \n
    \n
    ^International(related material,Asset_Event);
    \n
    \n \n
    \n
    ^International(attachments,Asset_Event);
    \n
    \n
    \n
    ','Calendar/Event',1,1,'CalendarEvent000000001',1295931508,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\">^International(label day,Asset_Calendar);\n\">^International(label week,Asset_Calendar);\n\">^International(label month,Asset_Calendar);\n\">^International(486,WebGUI);\n\">^International(label search,Asset_Calendar);\n\n
    \n\n\n
    \n^International(event details,Asset_Event);\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n
    ^International(event title,Asset_Event);
    \n
    \n
    \n\n
    \n
    \n
    ^International(location,Asset_Event);
    \n
    \n
    \n\n
    \n
    \n
    ^International(description,Asset_Event);
    \n
    \n
    \n
    \n
    ^International(scheduled,Asset_Event);
    \n
    \n
    \n\n
    \n
    \n
    ^International(related material,Asset_Event);
    \n
    \n\n
    \n
    ^International(attachments,Asset_Event);
    \n
    \n
    \n
    ',0,NULL,NULL),('
    \n\n\n
    _pagination\">
    \n
    \">
    \n
    \n\n
    ','Account/FriendManager/View',1,1,'64tqS80D53Z0JoAs2cX2VQ',1295931508,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n\n
    \">
    \n
    \n\n
    ',0,NULL,NULL),('\n','Calendar/List',1,1,'kj3b-X3i6zRKnhLb4ZiCLw',1295931508,'WebGUI::Asset::Template::HTMLTemplate',1,'',0,NULL,'[]'),('\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n\n \n\n\n

    \n \n \">\n •\n \n \n \n \">\n \n \">\n \n •\n \n \">\n

    \n\n\n\n \n \n \n \n \n \n \n \n\n\n\n\n \n \n \n \n \n \n \n \n\n\n
    oddThreadevenThread\">oddThreadevenThread\">\"> ()oddThreadevenThread\">oddThreadevenThread\">oddThreadevenThread\">oddThreadevenThread\">
    \n\n\n
    \n · · \n
    \n
    \n','Collaboration',1,1,'PBtmpl0000000000000077',1298351263,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n\n\n

    \n\n\">\n•\n\n\n\n\">\n\n\">\n\n•\n\n\">\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    oddThreadevenThread\">oddThreadevenThread\">\"> ()oddThreadevenThread\">oddThreadevenThread\">oddThreadevenThread\">
    \n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('
    \n \n

    \n
    \n\n \n

    ^International(View,Icon);

    \n
    \n\n \n
    \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n wgRowOnewgRowTwo\">\n \n \">\n \n \n \n
    \n
    \n\n
    \n','Thingy/ViewThing',1,1,'ThingyTmpl000000000002',1299559129,'WebGUI::Asset::Template::HTMLTemplate',1,'',0,NULL,NULL),('
    \" class=\"image\">\n\" id=\"id\">\n\n\n
    \n
    \n\n\" alt=\"\" />\n\n\n
    ','ImageAsset',1,1,'PBtmpl0000000000000088',1300763663,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"image\">\n\" id=\"id\">\n\n
    \n
    \n\" />\n\n
    ',0,NULL,NULL),('
    \n \" id=\"id\">\n \n \n \n \n \n \n \n
    \n
    ^International(hide new content list,Asset_Dashboard);
    \n \n
    \n
    \n
    \n \n \n \n \">\n \n \n \n \n
    \n
    _div\" class=\"dragable\">\n
    \n
    \n _span\">\n \n \n \n \n \',\'\')\">\n \"\"\n \n \n \n \n \"\"\n \n \n \n \',\'\')\">\n \"\"\n \n \n \n \',\'\');\">\n \"\"\n \n \n \n
    \n
    \n \n
    _div\">\n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n \n \n \n \n
    \n
    ^International(Add New Content,Asset_Dashboard);
    \n
    \n \n

    \n
    \n \n \n

    \n
    \n \n \n

    \n
    \n \n
    \n \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n \n \n \">\n \n \n \n \n
    \n
    _div\" class=\"dragable\">\n \n
    \n
    \n _span\">\n \n \n \n \n \',\'\')\">\n \"\"\n \n \n \n \n \"\"\n \n \n \n \',\'\')\">\n \"\"\n \n \n \n \',\'\');\">\n \"\"\n \n \n
    \n
    \n
    \n
    \n \n
    _div\">\n \n
    \n \n
    \n
    \n
    \n \n \n \n \">\n \n \n \n \n
    \n
    _div\" class=\"dragable\">\n
    \n
    \n \n _span\">\n \n \n \n \n \n \n \',\'\')\">\n \"\"\n \n \n \n \n \n \"\"\n \n \n \n \n \',\'\')\">\n \"\"\n \n \n \n \n \',\'\');\">\n \"\"\n \n \n
    \n
    \n
    \n
    \n \n
    _div\">\n \n
    \n \n
    \n
    \n
    \n \n \n \n \">\n \n \n \n \n
    \n
    _div\" class=\"dragable\">\n
    \n
    \n \n _span\">\n \n \n \n \n \n \n \',\'\')\">\n \"\"\n \n \n \n \n \n \"\"\n \n \n \n \n \',\'\')\">\n \"\"\n \n \n \n \n \',\'\');\">\n \"\"\n \n \n
    \n
    \n
    \n
    \n \n
    _div\">\n \n
    \n \n
    \n
    \n
    \n
    \n \n \n \n \n \n \n
    \n
    \n
     
    \n
    \n
    \n \n \n
    \n
    ','Dashboard',1,1,'DashboardViewTmpl00001',1300763664,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\" id=\"id\">\n\n\n\n\n\n
    \n
    ^International(hide new content list,Asset_Dashboard);
    \n
    \n
    \n
    \n\n\n\n\">\n\n\n\n\n
    \n
    _div\" class=\"dragable\">\n
    \n
    \n_span\">\n\n\n\n\n\',\'\')\">\n\"\"\n\n\n\n\n\"\"\n\n\n\n\',\'\')\">\n\"\"\n\n\n
    \n\n\',\'\');\">\n\"\"\n\n\n
    \n
    \n
    \n\n
    _div\">\n\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n\n\n\n\n\n
    \n
    ^International(Add New Content,Asset_Dashboard);
    \n
    \n\n

    \n
    \n\n

    \n
    \n\n

    \n
    \n
    \n
    \n\n\n\n\n\n\n\n\n
    \n\n\n\n\">\n\n\n\n\n
    \n
    _div\" class=\"dragable\">\n
    \n
    \n_span\">\n\n\n\n\n\',\'\')\">\n\"\"\n\n\n\n\n\"\"\n\n\n\n\',\'\')\">\n\"\"\n\n\n\n\',\'\');\">\n\"\"\n\n\n
    \n
    \n
    \n
    \n
    _div\">\n\n
    \n
    \n
    \n
    \n\n\n\n\">\n\n\n\n\n
    \n
    _div\" class=\"dragable\">\n
    \n
    \n\n_span\">\n\n\n\n\n\n\',\'\')\">\n\"\"\n\n\n\n\n\"\"\n\n\n\n\',\'\')\">\n\"\"\n\n\n\n\',\'\');\">\n\"\"\n\n\n
    \n
    \n
    \n
    \n
    _div\">\n\n
    \n
    \n
    \n
    \n\n\n\n\">\n\n\n\n\n
    \n
    _div\" class=\"dragable\">\n
    \n
    \n\n_span\">\n\n\n\n\n\n\',\'\')\">\n\"\"\n\n\n\n\n\"\"\n\n\n\n\',\'\')\">\n\"\"\n\n\n\n\',\'\');\">\n\"\"\n\n\n
    \n
    \n
    \n
    \n
    _div\">\n\n
    \n
    \n
    \n
    \n
    \n\n\n\n\n\n
    \n
    \n
     
    \n
    \n
    \n\n
    \n
    ',0,NULL,'[]'),('\r\n\r\n\r\n\r\n^Page(title); - ^c;\r\n\r\n\r\n\r\n\r\n\r\n\r\n^AdminBar;\r\n\r\n
    \r\n\r\n \r\n
    \r\n ^AssetProxy(style-underground/top-navigation); \r\n
    \r\n \r\n
    \r\n \r\n
    yourname
    \r\n \r\n
    \r\n \r\n

    \r\n

    \r\n
    \r\n \r\n
    \r\n\r\n
    \r\n ^AssetProxy(style-underground/side-navigation);\r\n

    ^GroupText(\"Registered Users\",\"Hello, ^@;\",\"Login\");

    \r\n
    \r\n
      \r\n
    • ^LoginToggle();
    • \r\n ^a(\"View My Account\",\"style-underground/templates/view-my-account\");\r\n ^AdminToggle(\"\",\"\",\"style-underground/templates/admintoggle-underground-admin-toggle\");\r\n
    \r\n
    \r\n

    WebGUI Links

    \r\n \r\n
    \r\n \r\n
    \r\n\r\n
    \r\n \r\n\r\n
    \r\n \r\n

    \r\n © 2006 ^c;    \r\n Design by: styleshout |\r\n Valid XHTML |\r\n CSS\r\n       \r\n \r\n

    \r\n \r\n
    \r\n \r\n\r\n\r\n','style',1,1,'Qk24uXao2yowR6zxbVJ0xA',1301973997,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n^Page(title); - ^c;\n\n\n\n\n\n^AdminBar;\n\n
    \n\n
    \n^AssetProxy(style-underground/top-navigation);\n
    \n
    \n
    yourname
    \n
    \n\n

    \n

    \n
    \n
    \n
    \n^AssetProxy(style-underground/side-navigation);\n

    ^GroupText(\"Registered Users\",\"Hello, ^@;\",\"Login\");

    \n
    \n
      \n
    • ^LoginToggle();
    • \n^a(\"View My Account\",\"style-underground/templates/view-my-account\");\n^AdminToggle(\"\",\"\",\"style-underground/templates/admintoggle-underground-admin-toggle\");\n
    \n
    \n

    WebGUI Links

    \n\n
    \n
    \n\n
    \n\n
    \n

    \n© 2006 ^c;   \nDesign by: styleshout |\nValid XHTML |\nCSS\n      \n\n

    \n
    \n\n',0,'1riOzIrN9EgfdnGFyOq-_g','[]'),(' \n \n','Navigation',1,1,'39KNX53B4nYJAyIE1lu8ZQ',1301973997,'WebGUI::Asset::Template::HTMLTemplate',1,'\n',0,NULL,NULL),(' \r\n

    \r\n
    \r\n \r\n
    \r\n
    \r\n','Navigation',1,1,'ztfi__vHJLsQDsMenrEn-w',1301973997,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n
    ',0,NULL,NULL),('
  • \">
  • ','AdminToggle',1,1,'8qyrDCNeggB4dzKiOoRuiQ',1301973997,'WebGUI::Asset::Template::HTMLTemplate',1,'
  • \">
  • ',0,NULL,NULL),('
  • \">
  • ','Macro/a_account',1,1,'M1NyNeS5jpdIsiIWFiJprw',1301973997,'WebGUI::Asset::Template::HTMLTemplate',1,'
  • \">
  • ',0,NULL,NULL),('
    \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
    1. \" style=\"width:px; height:px;\">\r\n \r\n
    2. \r\n
      \r\n
    \r\n
    \r\n\r\n \r\n\r\n
    \r\n\r\n
    ','Carousel',1,1,'CarouselTmpl0000000001',1301973997,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n

    \n
    \n\n

    \n
    \n\n
    \n
    \n\n
    \">\n
      \n\n
    1. \" style=\"width:px; height:px;\">\n\n
    2. \n
      \n
    \n
    \n\n
    \n
    ',0,NULL,'[]'),('\n\n\n\n \n WebGUI - style Greenportal\n \n\n\n \n ^AdminBar;\n
    \n
    \n
    \n ^H(^c(););\n \n
    \n
    \n\n
    \n ^AssetProxy(greenportal_navigation);\n
    \n\n
    \n
    \n Currently viewing: ^AssetProxy(greenportal_navigationtop);\n
    \n\n
    \n \n
    \n
    \n\n
    \n © 2008 ^c; | Design from Joomla! Open Source\n
    \n
    \n\n\n','style',1,1,'KKt0VB_eoQxw9xEsHsAhag',1301973998,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\nWebGUI - style Greenportal\n\n\n\n^AdminBar;\n
    \n
    \n
    \n^H(^c(););\n\n
    \n
    \n
    \n^AssetProxy(greenportal_navigation);\n
    \n
    \n
    \nCurrently viewing: ^AssetProxy(greenportal_navigationtop);\n
    \n
    \n\n
    \n
    \n
    \n© 2008 ^c; | Design from Joomla! Open Source\n
    \n
    \n\n',0,'dHuYEH6gNfRu9NHXOVFa9g',NULL),('\r\n

    \r\n
    \r\n\r\n

    \r\n
    \r\n\r\n
    \r\n
    \r\n\r\n\r\n','Navigation',1,1,'_z3ukLCqvoaUygfsbbkBzw',1301973999,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n
    \n
    \n
      \n
    • Main Menu
    • \n\n\n
    • \"indent1\"\"indent2\">\n\nstyle=\"color:white;\"\n\n\nonclick=\"window.open(\'\')\" href=\"#\"\n\nhref=\"\"\n>\n\n\n
    • \n
      \n
      \n
    • User Panel
    • \n
    • ^LoginToggle;
    • \n
    • ^a(Hello‚ ^@;˜);
    • \n
    • ^AdminToggle;
    • \n
    ',0,NULL,NULL),('\r\n \r\n\r\n\r\n\r\n onclick=\"window.open(\'\')\" href=\"#\" \r\n href=\"\"\r\n \r\n >\r\n \r\n \r\n\r\n » \r\n\r\n\r\n','Navigation',1,1,'Pt38T5_MWSue2e1N36MLdw',1301973999,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\nonclick=\"window.open(\'\')\" href=\"#\"\nhref=\"\"\n>\n\n\n » \n',0,NULL,NULL),('\" id=\"id\">\r\n\r\n\r\n

    \r\n
    \r\n\r\n\r\n

    \r\n
    \r\n\r\n\r\n
      \r\n

      Registration failed because

      \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 • \" onclick=\"\">\r\n \r\n\r\n \r\n • \" onclick=\"\">\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 * required\r\n \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n\r\n\r\n','DataForm',1,1,'LDcM1Iop17nF2MoSa7zo_Q',1301973999,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n
      \n

      Registration failed because

      \n\n
    • \n
      \n
    \n
    \n\n\n

    \n\n

    \n\">\n• \">\n\n\n• \" onclick=\"\">\n\n\n• \" onclick=\"\">\n\n• \">\n• \">\n\n
    \n\n\n\n\n\n\n\n\n\n\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n* required\n\n
    \n\n
    \n
    \n
    \n\n',0,NULL,NULL),('\n

    \n

    \n\n

    Registration Database

    \n\n\n
    \n \">\n • \">\n \n \n • \" onclick=\"\">\n \n • \">\n • \">\n \n
    \n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
      Submission Date
    \" onclick=\"return confirm(\'Are you certain that you wish to delete this data entry?\')\">\"Delete\"
    \n\n','DataForm/List',1,1,'hVF1taXj4bfd7DuL4XDMYg',1301973999,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n

    \n

    Registration Database

    \n
    \n\">\n• \">\n\n\n• \" onclick=\"\">\n\n• \">\n• \">\n\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
      Submission Date
    \" onclick=\"return confirm(\'Are you certain that you wish to delete this data entry?\')\">\"Delete\"
    ',0,NULL,NULL),('\" id=\"id\">\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\">Change Info      \r\n\">\r\n\r\n\r\n','DataForm',1,1,'x4-2QYRSrIB_BJfnSKKj4w',1301973999,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n
    \n\n
    \n\n\n\n\n\n\n\n
    \n

    \n\">Change Info      \n\">',0,NULL,NULL),('\" id=\"id\">\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 \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
    \">\">\">\">\">
    oddThreadevenThread\">oddThreadevenThread\">\">oddThreadevenThread\">oddThreadevenThread\">\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\"> @ oddThreadevenThread\" style=\"font-size: 11px;\">\r\n \">\r\n by\r\n \r\n \r\n \r\n \">\r\n \r\n on @ \r\n
    \r\n\r\n\r\n
    \r\n · · \r\n
    \r\n
    \r\n','Collaboration',1,1,'423R4Y6XIt3wUzlnLo-chg',1301973999,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n\n\n

    \n\n\">\n•\n\n\n\n\">\n\n\">\n\n•\n\n\">\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \">\">\">\">\">
    oddThreadevenThread\">oddThreadevenThread\">\">oddThreadevenThread\">oddThreadevenThread\">\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\"> @ oddThreadevenThread\" style=\"font-size: 11px;\">\n\">\nby\n\n\n\n\">\n\non @ \n
    \n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('\r\n\r\n \r\n

    \r\n
    \r\n\r\n \r\n
    \r\n

    \">[Back]

    \r\n
    \r\n
    \r\n \r\n \">\r\n \r\n \">\r\n \r\n
    \r\n
    \r\n\r\n\r\n
    px;\">\r\n
    Current\">\r\n \">\r\n
    \r\n \r\n
    \r\n
    \r\n\r\n
    \r\n\" 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 \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','Collaboration/Thread',1,1,'oZ1Mk-zExYUyD-JsjTvaHg',1301973999,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n

    \n
    \n\n
    \n\n\">\n\n\">\n\n
    \n
    \n\n\n\n\n
    \n[ | | ]\n
    \n
    \n
    \n\n\"> •\n\n\n\"> •\n\n\n\">\n\n\n\n• \">\n\n• \">\n\n\n• \">\n\n• \">\n\n\n\n\n• \">\n\n• \">\n\n\n
    ',0,NULL,NULL),('\" id=\"id\">\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 \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
    \r\n\r\n\r\n','Collaboration/PostForm',1,1,'mYwS8CZaOLMt0raaKXGZcQ',1301973999,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\n

    \n\n
    ',0,NULL,NULL),('\" id=\"id\">\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
    class=\"odd\">\">class=\"odd\">class=\"odd\">\">class=\"odd\"> @
    \r\n
    \r\n\r\n\r\n
    \r\n · · \r\n
    \r\n
    \r\n\r\n\r\n','Collaboration/Search',1,1,'kSGR4OHsKmhLQTuLkisOww',1301973999,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    class=\"odd\">\">class=\"odd\">class=\"odd\">\">class=\"odd\"> @
    \n
    \n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('\n

    \n
    \n\n\n

    \n
    \n\n\n \n\n\n\n\n\n \n\n\n \n\n\n\n \n
    \n \">Day\n \">Week\n \">Month\n \">Search\n \n
     
    \n\n
    \n \">Add Event\n \">Print\n \n \n
    \n
    \n \" style=\"font-size:7pt; margin-right:12px;\">« prev\n \n \" style=\"font-size:7pt; padding-left:12px\">next » \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n
    active current\">\n \n \">\n \n\n \n \n \n\n /wobject/Calendar/images/more.gif\" />\n \n \n \n
    \n
    \n\n
    \" class=\"moreDisplay\">\n
    \n
      \n \n
    • \">
    • \n
      \n
    \n
    \n
    \n
    \n\n\n','Calendar/Month',1,1,'U78V5IJHVljvRTb6ydsTHg',1301973999,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\">Day\n\">Week\n\">Month\n\">Search\n
     
    \n
    \n\">Add Event\n\">Print\n\n\n
    \n
    \n\" style=\"font-size:7pt; margin-right:12px;\">« prev\n \n\" style=\"font-size:7pt; padding-left:12px\">next »\n
    \n\n\n\n\n\n\n\n\n\n\n
    active current\">\n\n\">\n\n\n\n\n/wobject/Calendar/images/more.gif\" />\n\n\n
    \n
    \n\n
    \" class=\"moreDisplay\">\n
    \n\n
    \n
    \n
    ',0,NULL,NULL),('\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 \" class=\"tab\">Day \r\n \" class=\"tabWeek\">Week \r\n \" class=\"tab\">Month \r\n \" class=\"tab\">Search\r\n\r\n
     
    \r\n\r\n
    \r\n \">Add Event\r\n \">Print\r\n \r\n \r\n
    \r\n
    \r\n \" style=\"margin-right:66px;\">« prev week\r\n , ~ , \r\n \" style=\"margin-left:66px\">next week » \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n
    curDay\"> \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n\r\n','Calendar/Week',1,1,'Xqc3qPUXoFE8dt9qocdWig',1301973999,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\" class=\"tab\">Day\n\" class=\"tabWeek\">Week\n\" class=\"tab\">Month\n\" class=\"tab\">Search\n
     
    \n
    \n\">Add Event\n\">Print\n\n\n
    \n
    \n\" style=\"margin-right:66px;\">« prev week\n , ~ , \n\" style=\"margin-left:66px\">next week »\n
    \n\n\n\n\n\n
    \n
    \n
    curDay\">\n\n\n
    \n
    \n
    ',0,NULL,NULL),('\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 \" class=\"tabDay\">Day\r\n \" class=\"tab\">Week\r\n \" class=\"tab\">Month\r\n \" class=\"tab\">Search\r\n\r\n
     
    \r\n\r\n
    \r\n \">Add Event\r\n \">Print\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
    :00
    \r\n
    \r\n
      \r\n
    • \r\n \">\r\n
    • \r\n
    \r\n
    \r\n
    \r\n\r\n','Calendar/Day',1,1,'IBTb7wllSt7RxFmmvm9pkQ',1301973999,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n
    \n\" class=\"tabDay\">Day\n\" class=\"tab\">Week\n\" class=\"tab\">Month\n\" class=\"tab\">Search\n
     
    \n
    \n\">Add Event\n\">Print\n\n\n
    \n
    \n\n
    \n\n\n\n\n\n
    \n
    :00
    \n
    \n\n
    \n
    ',0,NULL,NULL),('\r\n\r\n \r\n\r\n\r\n \r\n\r\n\r\n \r\n\r\n
    \r\n \" class=\"tab\">Day\r\n \" class=\"tab\">Week\r\n \" class=\"tab\">Month\r\n \" class=\"tab\">Search\r\n\r\n
     
    \r\n \r\n
    \r\n \r\n Edit \r\n • Delete • \r\n \r\n Print\r\n
    \r\n
    \r\n \" style=\"margin-right:106px;\">« prev event\r\n Event Details\r\n \" style=\"margin-left:106px\">next event »\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
    Event Title
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    Location
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    Description
    \r\n
    \r\n
    \r\n
    \r\n
    Scheduled
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    Related Material
    \r\n
    \r\n \">
    \r\n
    \r\n
    \r\n
    Attachments
    \r\n
    \r\n \"> \" />
    \r\n
    \r\n
    \r\n
    \r\n','Calendar/Event',1,1,'Z1EM7JMI_4SkyfaZffSElw',1301973999,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n\n\n\n\n\n\n
    \n\" class=\"tab\">Day\n\" class=\"tab\">Week\n\" class=\"tab\">Month\n\" class=\"tab\">Search\n
     
    \n
    \n\nEdit\n• Delete •\n\nPrint\n
    \n
    \n\" style=\"margin-right:106px;\">« prev event\nEvent Details\n\" style=\"margin-left:106px\">next event »\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n
    Event Title
    \n
    \n
    \n\n
    \n
    \n
    Location
    \n
    \n
    \n\n
    \n
    \n
    Description
    \n
    \n
    \n
    \n
    Scheduled
    \n
    \n
    \n\n
    \n
    \n
    Related Material
    \n
    \n\">
    \n
    \n
    \n
    Attachments
    \n
    \n
    \n
    ',0,NULL,NULL),('\n\n\n

    Errors!

    \n
      \n\n
    • \n
      \n
    \n
    \n\n\n\n \n\n
    \n Event\n Recurrence\n \n \n
     
    \n
    \n\n\n\n\n \n\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    Event Title
    Short Title
    Location
    Description
    Start Date
    End Date
    Time
     
    Related Links
    Group to View this Event
    Attachments for this Event
    \n
    \n \n \n\n\n\n\n\n \n \n\n\n \n \n\n\n
    Recurrence Pattern
    Recurrence Range\n

    Start:

    \n

    \n

    End:

    \n
    \n
    \n\n\n\n\n','Calendar/EventEdit',1,1,'fJg7SKpGZwzSNx3_ebki1A',1301973999,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n

    Errors!

    \n
      \n\n
    • \n
      \n
    \n
    \n\n\n\n\n
    \nEvent\nRecurrence\n\n\n
     
    \n
    \n\n\n\n\n\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    Event Title
    Short Title
    Location
    Description
    Start Date
    End Date
    Time
     
    Related Links
    Group to View this Event
    Attachments for this Event
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    Recurrence Pattern
    Recurrence Range\n

    Start:

    \n

    \n

    End:

    \n
    \n
    \n\n',0,NULL,NULL),('\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 \">^International(label day,Asset_Calendar);\r\n \">^International(label week,Asset_Calendar);\r\n \">^International(label month,Asset_Calendar);\r\n \">^International(label search,Asset_Calendar);\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
    ^International(keyword,Asset_Calendar);
    \r\n
    \r\n
    \r\n
    ^International(start date,Asset_Calendar);
    \r\n
    \r\n
    \r\n
    ^International(end date,Asset_Calendar);
    \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 ^International(search results,Asset_Calendar);\r\n ^International(page x of x,Asset_Calendar,,);\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 \" style=\"padding-left:10px\">\r\n
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n','Calendar/Search',1,1,'ihf4Rx6p72xn_nVKaIeOaw',1301973999,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\">^International(label day,Asset_Calendar);\n\">^International(label week,Asset_Calendar);\n\">^International(label month,Asset_Calendar);\n\">^International(label search,Asset_Calendar);\n
    \n \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n
    ^International(keyword,Asset_Calendar);
    \n
    \n
    \n
    ^International(start date,Asset_Calendar);
    \n
    \n
    \n
    ^International(end date,Asset_Calendar);
    \n
    \n
    \n
    \n\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n
    \n^International(search results,Asset_Calendar);\n^International(page x of x,Asset_Calendar,,);\n
    \n
    \n
    \n\n\n\n
    \n
    \n\n\n\n\n\n
    \n
    \n
    \n\" style=\"padding-left:10px\">\n
    \n
    \n
    \n\n\n\n
    \n
    \n
    ',0,NULL,NULL),('\" id=\"id\"> \r\n\r\n \r\n

    \r\n
    \r\n\r\n

    \">[]

    \r\n\r\n
    \r\n\r\n
    \r\n\" 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     [

    \">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />

    |

    \">\" alt=\"-\" style=\"border: 0px;vertical-align:middle;\" />

    ]\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
    \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
    Current\">\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\" 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     [

    \">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />

    |

    \">\" alt=\"-\" style=\"border: 0px;vertical-align:middle;\" />

    ]\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
    px;\">\r\n
    Current\">\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\" 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     [

    \">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />

    |

    \">\" alt=\"-\" style=\"border: 0px;vertical-align:middle;\" />

    ]\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 \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','Collaboration/Thread',1,1,'jrWJ6nHXkqgFbml7BZ9chw',1301974000,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n

    \">[]

    \n
    \n\n
    \n\" alt=\"\" />\n
    \n
    \n:\n\n\n\n\">\n\n
    \n:
    \n:
    \n: \n\n    [

    \">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />

    |

    \">\" alt=\"-\" style=\"border: 0px;vertical-align:middle;\" />

    ]\n
    \n
    \n\n: [ \"> \"> ]
    \n\n\n:
    \n
    \n
    \n
    \n
    \n

    \n\n
    \n\n
    \n\n\n\n
    \n
    \n
    \n\n
    \n\n\">\n\n\n•\n\">\n•\n\">\n\n
    \n
    \n
    \n\n
    \n

    \n
    \n
    \n\n\">\n\n\">\n\n
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n[ | | ]\n
    \n
    \n
    \n
    \n\n\">\n•\n\n\n\">\n•\n\n\n\">\n•\n\n\n\n\">\n•\n\n\">\n•\n\n\n\">\n•\n\n\">\n•\n\n\n\n\n\">\n\n\">\n\n\n
    \n
    ',0,NULL,NULL),('\" id=\"id\">\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 class=\"even\">\r\n \">
    \r\n \r\n \r\n class=\"even\" align=\"center\">\r\n class=\"even\" align=\"center\">\r\n class=\"even\" align=\"center\">\r\n class=\"even\" align=\"center\">\r\n class=\"even\">\r\n \">\r\n by\r\n \r\n \r\n \r\n \">\r\n \r\n on @ \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','MessageBoard',1,1,'Ys6f3vpe0y1uRcaCJ2TlFw',1301974000,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n\n

    \n\n\n\">\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n class=\"even\">\n\">
    \n\n\n class=\"even\" align=\"center\">\n class=\"even\" align=\"center\">\n class=\"even\" align=\"center\">\n class=\"even\" align=\"center\">\n class=\"even\">\n\">\nby\n\n\n\n\">\n\non @ \n\n
    \n\n
    \n\n

    \n\n
    \n
    \n\n

    \n\n',0,NULL,NULL),('

    \" class=\"search\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n
    \n
    \n \n \" size=\"30\" maxlength=\"255\" />\n \n
    \n
    \n\n\n \n
    \n ^International(\'resultsFeedback\',Asset_Search); \n ^International(\'page\',Asset_Search); ^International(\'of\',Asset_Search); \n \n
    \n \n

    \n
    \n\n
    \n \n
    );\">
    \n
    \n
    \n
    \n\n \n
      \n
    • \n \n class=\"active\">\n \">\n \n \n
    • \n
    \n
    \n\n
    \n\n\n
    \n','Search',1,1,'PBtmpl0000000000000200',1301974000,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"search\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n
    \n
    \n\n\" size=\"30\" maxlength=\"255\" />\n\n
    \n
    \n\n\n
    \n^International(\'resultsFeedback\',Asset_Search); \n^International(\'page\',Asset_Search); ^International(\'of\',Asset_Search); \n\n
    \n\n

    \n
    \n
    \n\n
    );\">
    \n
    \n
    \n
    \n\n
      \n
    • \n\n class=\"active\">\n\">\n\n\n
    • \n
    \n
    \n
    \n\n
    ',0,NULL,'[]'),('\n\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n\n

    \n\n\n\n \n \n \n \n \n \n
    \n
    \n \n \n \n \n \n
    ^International(Stock Watch,Asset_StockData);\n
    \">\n ^International(Last Update,Asset_StockData);: EDT
    \n \n
    \n
    \n
    \n \n \n \n \n \n \n \n \n \n \n qmmt_cycleqmmt_main\'>\n \n \n \n \n \n \n \n
    Name SymbolLastTickChg
    \n \')\">\n \n /\" alt=\"\" />\n _up_down\" style=\"text-align: right;whitespace:nowrap;\">
    \n
    ','StockData',1,1,'StockDataTMPL000000001',1315877144,'WebGUI::Asset::Template::HTMLTemplate',1,'\">\n\n

    \n
    \n\n

    \n
    \n\n

    \n\n\n\n\n\n\n\n\n
    \n
    \n\n\n\n\n\n
    ^International(Stock Watch,Asset_StockData);\n
    \n^International(Last Update,Asset_StockData);: EDT
    \n\n
    \n
    \n
    \n\n\n\n\n\n\n\n\n\n\nqmmt_cycleqmmt_main\'>\n\n\n\n\n\n\n\n
    Name SymbolLastTickChg
    \n\')\">\n\n/\" alt=\"\" />\n_up_down\" style=\"text-align: right;whitespace:nowrap;\">
    \n
    ',0,NULL,NULL),('\r\n

    \" class=\"editStory\">\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\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\r\n \r\n \r\n\r\n\r\n \r\n \r\n\r\n\r\n
    ^International(photo,WebGUI);
    \">\" alt=\"\" style=\"border-style:none;vertical-align:middle;\" />
    ^International(or,WebGUI);
    \r\n
    \r\n\r\n
    \r\n \r\n
    \r\n\r\n\r\n
    \r\n\r\n\r\n
    \r\n','Story/Edit',1,1,'E3tzZjzhmYoNlAyP2VW33Q',1303183716,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"editStory\">\n
    \n\n\n
    \n \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(photo,WebGUI);
    \">\" alt=\"\" style=\"border-style:none;vertical-align:middle;\"/>
    ^International(or,WebGUI);
    \n
    \n
    \n \n
    \n\n
    \n
    ',0,NULL,'[]'),('\r\n\r\n\r\n\r\n\r\n','Map/View',1,1,'9j0_Z1j3Jd0QBbY2akb6qw',1304392055,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n',0,NULL,NULL),('\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
    ','MapPoint/Edit',1,1,'oHh0UqAJeY7u2n--WD-BAA',1304392055,'WebGUI::Asset::Template::HTMLTemplate',1,'\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ',0,NULL,'[]'),('
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n,\r\n\r\n


    \r\n
    \r\n\">
    \r\n^International(phone label,Asset_MapPoint);:
    \r\n^International(fax label,Asset_MapPoint);:
    \r\n\">
    \r\n);\" />\r\n
    ','MapPoint/View',1,1,'u9vfx33XDk5la1-QC5FK7g',1304392055,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    \n
    \n
    \n
    \n,\n\n


    \n
    \n
    \">
    \n^International(phone label,Asset_MapPoint);:
    \n^International(fax label,Asset_MapPoint);:
    \n\">
    \n);\" />\n
    ',0,NULL,'[]'),('

    ^International(has posted to one of your subscriptions,Asset_Collaboration);

    \n\n\n\n\n\n

    ^International(attachments, Asset_Article);\n
    \n
    \n\n\n\n
    \n \n
    \n
    \n\n
    \n \n
    \n
    \n\n
    \n \n
    \n
    \n\n
    \n \n
    \n
    \n\n
    \n \n
    \n
    \n\n\n

    \">

    \n

    \">View this message on the web site.

    \n','Collaboration/Notification',1,1,'PBtmpl0000000000000027',1311652541,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
     
    ^International(has posted to one of your subscriptions,Asset_Collaboration);
    #\">#
      
    \n

    \">

    ',0,NULL,NULL),('
    \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\nalt\">\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\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\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
     
    ^International(remove button,Shop);^International(item,Shop);^International(price,Shop);^International(quantity,Shop);^International(extended price,Shop);^International(per item shipping,Shop);
    \r\n \r\n \r\n
    \r\n \r\n \r\n ^International(not applicable,Shop);\r\n
    \r\n
    \r\n
     
     
      
    ^International(Billing Address,Shop); ^International(Shipping Address,Shop);
    ^International(use same shipping as billing,Shop);
     
      
    \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 \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
    ^International(label help,Shop);
    \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 \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
    ^International(label help,Shop);
    \r\n
      
     
    ^International(tax,Shop);
    ^International(shipping,Shop);\r\n \r\n
    ^International(payment methods,PayDriver);\r\n \r\n
    ^International(in shop credit,Shop);(^International(available,Shop);: )
    ^International(total,Shop);
    (^International(required minimum order amount,Shop); )
      
     
    ^International(order for,Shop);
     
    \r\n\r\n\r\n
    \r\n

    ^International(50,WebGUI);\r\n^International(51,WebGUI);
    \">^International(407,WebGUI);

    \r\n
    \r\n
    \r\n','Shop/Cart',1,1,'aIpCmr9Hi__vgdZnDTz1jw',1313542961,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nalt\">\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
     
    ^International(remove button,Shop);^International(item,Shop);^International(price,Shop);^International(quantity,Shop);^International(extended price,Shop);^International(per item shipping,Shop);
    \n\n\n
    \n\n\n^International(not applicable,Shop);\n
    \n
    \n
     
     
      
    ^International(Billing Address,Shop); ^International(Shipping Address,Shop);
    ^International(use same shipping as billing,Shop);
     
      
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(label help,Shop);
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(label help,Shop);
    \n
      
     
    ^International(tax,Shop);
    ^International(shipping,Shop);\n\n
    ^International(payment methods,PayDriver);\n\n
    ^International(in shop credit,Shop);(^International(available,Shop);: )
    ^International(total,Shop);
    (^International(required minimum order amount,Shop); )
      
     
    ^International(order for,Shop);
     
    \n\n\n
    \n

    ^International(50,WebGUI);\n^International(51,WebGUI);
    \">^International(407,WebGUI);

    \n
    \n
    ',0,NULL,'[{\"url\":\"^Extras(/yui/build/yahoo-dom-event/yahoo-dom-event.js);\",\"type\":\"headScript\"},{\"url\":\"^Extras(/yui/build/json/json-min.js);\",\"type\":\"headScript\"},{\"url\":\"^Extras(/yui/build/connection/connection-min.js);\",\"type\":\"headScript\"},{\"url\":\"^Extras(/underscore/underscore-min.js);\",\"type\":\"headScript\"},{\"url\":\"^Extras(/shop/cart.js);\",\"type\":\"bodyScript\"}]'),('
    \r\n

    Add Address

    \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 \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
    ^International(label help,Shop);
    \r\n \r\n\r\n
    \r\n','Shop/Address',1,1,'XNd7a_g_cTvJVYrVHcx2Mw',1313542961,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n

    Add Address

    \n\n
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(label help,Shop);
    \n\n
    ',0,NULL,NULL),('

    ^International(thank you message,Shop);

    \n\n\n

    \">^International(order number,Shop);

    \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ^International(date,Shop);
    ^International(amount,Shop);
    ^International(in shop credit used,Shop);
    ^International(taxes,Shop);
    ^International(shipping method,Shop);
    ^International(shipping amount,Shop);
    ^International(shipping address,Shop);
    ^International(payment method,Shop);
    ^International(status message,Shop);
    ^International(payment address,Shop);
    \n
    \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n
    ^International(date,Shop);^International(item,Shop);^International(price,Shop);^International(quantity,Shop);^International(shipping address,Shop);^International(order status,Shop);^International(tracking number,Shop);
    \">
    \n ','Shop/EmailReceipt',1,1,'bPz1yk6Y9uwMDMBcmMsSCg',1313542961,'WebGUI::Asset::Template::HTMLTemplate',1,'

    ^International(thank you message,Shop);

    \n

    \">^International(order number,Shop);

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(date,Shop);
    ^International(amount,Shop);
    ^International(in shop credit used,Shop);
    ^International(taxes,Shop);
    ^International(shipping method,Shop);
    ^International(shipping amount,Shop);
    ^International(shipping address,Shop);
    ^International(payment method,Shop);
    ^International(status message,Shop);
    ^International(payment address,Shop);
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(date,Shop);^International(item,Shop);^International(price,Shop);^International(quantity,Shop);^International(shipping address,Shop);^International(order status,Shop);^International(tracking number,Shop);
    \">
    ',0,NULL,NULL),('
    \r\n \" id=\"id\">\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
    ^ViewCart;
    \r\n \">^International(continue shopping button,Shop);\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','Donation',1,1,'vrKXEtluIhbmAS9xmPukDA',1313542961,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\" id=\"id\">\n\n
    \n
    \n\n

    \n
    \n\n
    \n
    ^ViewCart;
    \n\">^International(continue shopping button,Shop);\n\n\n
    \n
    \n
    \n\n\n\n\n\n
    ',0,NULL,NULL),('\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

    \">^International(continue shopping button,Shop);\r\n\r\n\r\n\r\n\r\n','FlatDiscount',1,1,'63ix2-hU0FchXGIWkG3tow',1313542961,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n

    \n
    \n\n

    \n

    \">^International(continue shopping button,Shop);\n\n',0,NULL,NULL),('

    \r\n \" id=\"id\">\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
    \n','Subscription',1,1,'eqb9sWjFEVq0yHunGV8IGw',1313542961,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\" id=\"id\">\n\n
    \n
    \n
    \n\n

    \n
    \n\n\n\n
    \n\n
    \n
    \n
    (\">)
    \n\n\n\n
    \n
    \n
    ',0,NULL,NULL),('
    \n \n
    default\">\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n
    \n','Shop/AddressBook',1,1,'3womoo7Teyy2YKFa25-MZg',1313542961,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n
    default\">\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    ',0,NULL,NULL),('
    \r\n

    Cart

    \r\n
    \r\n \r\n
    ) ()
    \r\n
    \r\n
    \r\n
    \r\n ^International(total,Shop);: \r\n
    \r\n
    \r\n ^ViewCart;\r\n
    \r\n
    \r\n','Shop/MiniCart',1,1,'EBlxJpZQ9o-8VBOaGQbChA',1313542961,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n

    Cart

    \n
    \n\n
    ) ()
    \n
    \n
    \n
    \n^International(total,Shop);: \n
    \n
    \n^ViewCart;\n
    \n
    ',0,NULL,NULL),('
    \n \n
    \n
    \n\n

    ^International(order number,Shop);

    \n \n \n \n \n\n
      \n
    • ^International(date,Shop);
    • \n
    • ^International(Status,Shop);^International(Success,Shop);^International(Failed,Shop);
    • \n
    • ^International(amount,Shop);
    • \n
    • ^International(in shop credit used,Shop);
    • \n
    • ^International(taxes,Shop);
    • \n
    • ^International(shipping method,Shop);
    • \n
    • ^International(shipping amount,Shop);
    • \n
    • ^International(payment method,Shop);
    • \n
    • ^International(status message,Shop);
    • \n
    \n
    \n \n
    \n
    ^International(payment address,Shop);
    \n
    \n
    \n \n
    \n
    ^International(shipping address,Shop);
    \n
    \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ^International(date,Shop);^International(item,Shop);^International(price,Shop);^International(quantity,Shop);^International(shipping address,Shop);^International(order status,Shop);^International(tracking number,Shop);
    \n \n \">\n \n \n \n
    \n \n [\">] \n \n
    \n
    \n
    \n','Shop/MyPurchasesDetail',1,1,'g8W53Pd71uHB9pxaXhWf_A',1313542961,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n
    \n
    \n

    ^International(order number,Shop);

    \n\n\n\n
      \n
    • ^International(date,Shop);
    • \n
    • ^International(Status,Shop);^International(Success,Shop);^International(Failed,Shop);
    • \n
    • ^International(amount,Shop);
    • \n
    • ^International(in shop credit used,Shop);
    • \n
    • ^International(taxes,Shop);
    • \n
    • ^International(shipping method,Shop);
    • \n
    • ^International(shipping amount,Shop);
    • \n
    • ^International(payment method,Shop);
    • \n
    • ^International(status message,Shop);
    • \n
    \n
    \n
    \n
    ^International(payment address,Shop);
    \n
    \n
    \n
    \n
    ^International(shipping address,Shop);
    \n
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(date,Shop);^International(item,Shop);^International(price,Shop);^International(quantity,Shop);^International(shipping address,Shop);^International(order status,Shop);^International(tracking number,Shop);
    \n\">\n
    \n\n[\">]\n\n
    \n
    \n
    ',0,NULL,NULL),('\nBatch: \n\n\n
    \n\n','Operation/RedeemSubscription',1,1,'PBtmpl0000000000000053',1313542961,'WebGUI::Asset::Template::HTMLTemplate',1,'\nBatch: \n\n
    \n',0,NULL,NULL),('
    \n \n
    \n
      \n
    • \n
    \n
    \n
    \n\n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n
      
    ^International(subtotal,Shop);
    ^International(taxes,Shop);
    ^International(shipping,Shop);
    ^International(in shop credit,Shop);(^International(available,Shop);: )
    ^International(total,Shop);
      
    \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n
    ','Shop/Credentials',1,1,'itransact_credentials1',1313542961,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n
    \n
      \n
    • \n
    \n
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
      
    ^International(subtotal,Shop);
    ^International(taxes,Shop);
    ^International(shipping,Shop);
    ^International(in shop credit,Shop);(^International(available,Shop);: )
    ^International(total,Shop);
      
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n
    ',0,NULL,NULL),('

    ^International(Enter VAT numbers,TaxDriver_EU);

    \n\n\n

    \n ^International(70,WebGUI);: \n

    \n
    \n\n\n\n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n\n \n
    ^International(country,WebGUI);^International(vat number,TaxDriver_EU);^International(Approved for use,TaxDriver_EU);
    ^International(138,WebGUI);^Internation(139,WebGUI);\">^International(576,WebGUI);
    \n
    \n
    \n\n

    \n ^International(Add another VAT number,TaxDriver_EU);:
    \n \n

    ','TaxDriver/EU/User',1,1,'D6cJpRcey35aSkh9Q_FPUQ',1313542961,'WebGUI::Asset::Template::HTMLTemplate',1,'

    Enter VAT numbers

    \n\n

    \nError: \n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    CountryVAT NumberApproved for use
    yesno\">delete
    \n
    \n
    \n

    \nAdd another VAT Number:
    \n\n

    ',0,NULL,NULL),('\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n
      
    ^International(subtotal,Shop);
    ^International(taxes,Shop);
    ^International(shipping,Shop);
    ^International(in shop credit,Shop);(^International(available,Shop);: )
    ^International(total,Shop);
      
    \n','Shop/Credentials',1,1,'30h5rHxzE_Q0CyI3Gg7EJw',1313542961,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
      
    ^International(subtotal,Shop);
    ^International(taxes,Shop);
    ^International(shipping,Shop);
    ^International(in shop credit,Shop);(^International(available,Shop);: )
    ^International(total,Shop);
      
    ',0,NULL,NULL),('\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n
      
    ^International(subtotal,Shop);
    ^International(taxes,Shop);
    ^International(shipping,Shop);
    ^International(in shop credit,Shop);(^International(available,Shop);: )
    ^International(total,Shop);
      
    \n','Shop/Credentials',1,1,'jysVZeUR0Bx2NfrKs5sulg',1313542961,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
      
    ^International(subtotal,Shop);
    ^International(taxes,Shop);
    ^International(shipping,Shop);
    ^International(in shop credit,Shop);(^International(available,Shop);: )
    ^International(total,Shop);
      
    ',0,NULL,NULL),('\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n
      
    ^International(subtotal,Shop);
    ^International(taxes,Shop);
    ^International(shipping,Shop);
    ^International(in shop credit,Shop);(^International(available,Shop);: )
    ^International(total,Shop);
      
    \n','Shop/Credentials',1,1,'300AozDaeveAjB_KN0ljlQ',1313542962,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
      
    ^International(subtotal,Shop);
    ^International(taxes,Shop);
    ^International(shipping,Shop);
    ^International(in shop credit,Shop);(^International(available,Shop);: )
    ^International(total,Shop);
      
    ',0,NULL,NULL),('\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n
      
    ^International(subtotal,Shop);
    ^International(taxes,Shop);
    ^International(shipping,Shop);
    ^International(in shop credit,Shop);(^International(available,Shop);: )
    ^International(total,Shop);
      
    \n','Shop/Credentials',1,1,'GqnZPB0gLoZmqQzYFaq7bg',1313542962,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
      
    ^International(subtotal,Shop);
    ^International(taxes,Shop);
    ^International(shipping,Shop);
    ^International(in shop credit,Shop);(^International(available,Shop);: )
    ^International(total,Shop);
      
    ',0,NULL,NULL),('
    \r\n

    \r\n\r\n\r\n
    \r\n
    \r\n
    ','Shop/selectGateway',1,1,'2GxjjkRuRkdUg_PccRPjpA',1313542962,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n

    \n\n
    \n
    \n
    ',0,NULL,NULL),('
    \n \n
    \n
      \n
    • \n
    \n
    \n
    \n\n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n
      
    ^International(subtotal,Shop);
    ^International(taxes,Shop);
    ^International(shipping,Shop);
    ^International(in shop credit,Shop);(^International(available,Shop);: )
    ^International(total,Shop);
      
    \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n
    ','Shop/Credentials',1,1,'Rqwgh50A3gGcOKIrdi_kxw',1313542962,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n
    \n
      \n
    • \n
    \n
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
      
    ^International(subtotal,Shop);
    ^International(taxes,Shop);
    ^International(shipping,Shop);
    ^International(in shop credit,Shop);(^International(available,Shop);: )
    ^International(total,Shop);
      
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n
    ',0,NULL,NULL),('\n

    \n

    \n

    ^International(badge holder information,Asset_EventManagementSystem);

    \n\n\n

    \n
    \n\n\n \n \n \n \n \n \n \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ^International(name,Shop);
    ^International(organization,Asset_EventManagementSystem);
    ^International(address,Shop);
     
     
    ^International(city,Shop);
    ^International(state,Shop);
    ^International(code,Shop);
    ^International(country,Shop);
    ^International(phone number,Shop);
    ^International(email address,Asset_EventManagementSystem);
     
    \n
    \n
    \n
    \n
    \n
     
    \n\n\n\n\n\n\n\n\n\n\n','EMSBadge',1,1,'PBEmsBadgeTemplate0000',1313542962,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n

    \n

    ^International(badge holder information,Asset_EventManagementSystem);

    \n\n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(name,Shop);
    ^International(organization,Asset_EventManagementSystem);
    ^International(address,Shop);
     
     
    ^International(city,Shop);
    ^International(state,Shop);
    ^International(code,Shop);
    ^International(country,Shop);
    ^International(phone number,Shop);
    ^International(email address,Asset_EventManagementSystem);
    \n\n',0,NULL,NULL),('
    \n

    ^International(my purchases,Shop); · ^a(^International(Return to Account,Account););

    \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ^International(order number,Shop);^International(amount,Shop);^International(date,Shop);^International(Status,Shop);
    \">^International(Success,Shop);^International(Failed,Shop);
    \n
    \n','Shop/MyPurchases',1,1,'2gtFt7c0qAFNU3BG_uvNvg',1315877144,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n

    ^International(my purchases,Shop); · ^a(\"Return to Account\");

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(order number,Shop);^International(amount,Shop);^International(date,Shop);^International(Status,Shop);
    \">^International(Success,Shop);^International(Failed,Shop);
    \n
    ',0,NULL,NULL); -ALTER TABLE `template` ENABLE KEYS; -ALTER TABLE `userProfileCategory` DISABLE KEYS; -INSERT INTO `userProfileCategory` VALUES ('1','WebGUI::International::get(449,\"WebGUI\");','WebGUI::International::get(\"misc info short\",\"WebGUI\");',6,1,1,1),('2','WebGUI::International::get(440,\"WebGUI\");','WebGUI::International::get(\"contact info short\",\"WebGUI\");',2,1,1,1),('3','WebGUI::International::get(439,\"WebGUI\");','WebGUI::International::get(\"personal info short\",\"WebGUI\");',1,1,1,1),('4','WebGUI::International::get(445,\"WebGUI\");','WebGUI::International::get(\"preferences short\",\"WebGUI\");',7,0,1,1),('5','WebGUI::International::get(443,\"WebGUI\");','WebGUI::International::get(\"home info short\",\"WebGUI\");',3,1,1,1),('6','WebGUI::International::get(442,\"WebGUI\");','WebGUI::International::get(\"work info short\",\"WebGUI\");',4,1,1,1),('7','WebGUI::International::get(444,\"WebGUI\");','WebGUI::International::get(\"demographic info short\",\"WebGUI\");',5,1,1,1); -ALTER TABLE `userProfileCategory` ENABLE KEYS; -ALTER TABLE `userProfileData` DISABLE KEYS; -INSERT INTO `userProfileData` VALUES ('1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'English',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'America/Chicago',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'none',NULL,NULL,NULL,NULL,'none',0,NULL,NULL,NULL,'{\"workCity\":\"all\",\"department\":\"all\",\"uiLevel\":\"none\",\"homeCountry\":\"all\",\"homeZip\":\"all\",\"firstDayOfWeek\":\"none\",\"photo\":\"all\",\"email\":\"all\",\"homeAddress\":\"all\",\"allowPrivateMessages\":\"none\",\"timeZone\":\"none\",\"firstName\":\"all\",\"birthdate\":\"all\",\"toolbar\":\"none\",\"yahooIM\":\"all\",\"workPhone\":\"all\",\"showMessageOnLoginSeen\":\"none\",\"middleName\":\"all\",\"workURL\":\"all\",\"signature\":\"all\",\"homeURL\":\"all\",\"homeState\":\"all\",\"alias\":\"all\",\"discussionLayout\":\"none\",\"workAddress\":\"all\",\"workCountry\":\"all\",\"avatar\":\"all\",\"publicProfile\":\"none\",\"dateFormat\":\"none\",\"ableToBeFriend\":\"none\",\"workName\":\"all\",\"icq\":\"all\",\"workZip\":\"all\",\"timeFormat\":\"none\",\"cellPhone\":\"all\",\"lastName\":\"all\",\"homePhone\":\"all\",\"versionTagMode\":\"none\",\"gender\":\"all\",\"showOnline\":\"none\",\"language\":\"none\",\"homeCity\":\"all\",\"aim\":\"all\",\"workState\":\"all\",\"emailToPager\":\"all\",\"msnIM\":\"all\",\"pager\":\"all\",\"publicEmail\":\"none\"}',NULL,NULL,NULL,NULL),('3',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'English',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'America/Chicago',NULL,NULL,NULL,'0','9',NULL,NULL,'none',NULL,NULL,NULL,NULL,'all',NULL,NULL,NULL,NULL,'{\"workCity\":\"all\",\"department\":\"all\",\"uiLevel\":\"none\",\"homeCountry\":\"all\",\"homeZip\":\"all\",\"firstDayOfWeek\":\"none\",\"photo\":\"all\",\"email\":\"all\",\"homeAddress\":\"all\",\"allowPrivateMessages\":\"none\",\"timeZone\":\"none\",\"firstName\":\"all\",\"birthdate\":\"all\",\"toolbar\":\"none\",\"yahooIM\":\"all\",\"workPhone\":\"all\",\"showMessageOnLoginSeen\":\"none\",\"middleName\":\"all\",\"workURL\":\"all\",\"signature\":\"all\",\"homeURL\":\"all\",\"homeState\":\"all\",\"alias\":\"all\",\"discussionLayout\":\"none\",\"workAddress\":\"all\",\"workCountry\":\"all\",\"avatar\":\"all\",\"publicProfile\":\"none\",\"dateFormat\":\"none\",\"ableToBeFriend\":\"none\",\"workName\":\"all\",\"icq\":\"all\",\"workZip\":\"all\",\"timeFormat\":\"none\",\"cellPhone\":\"all\",\"lastName\":\"all\",\"homePhone\":\"all\",\"versionTagMode\":\"none\",\"gender\":\"all\",\"showOnline\":\"none\",\"language\":\"none\",\"homeCity\":\"all\",\"aim\":\"all\",\"workState\":\"all\",\"emailToPager\":\"all\",\"msnIM\":\"all\",\"pager\":\"all\",\"publicEmail\":\"all\"}',NULL,NULL,NULL,NULL); -ALTER TABLE `userProfileData` ENABLE KEYS; -ALTER TABLE `userProfileField` DISABLE KEYS; -INSERT INTO `userProfileField` VALUES ('email','WebGUI::International::get(56,\"WebGUI\");',1,1,'email',NULL,NULL,1,'2',1,1,1,1,0,NULL,'all'),('firstName','WebGUI::International::get(314,\"WebGUI\");',1,0,'text',NULL,NULL,1,'3',1,1,1,0,0,NULL,'all'),('middleName','WebGUI::International::get(315,\"WebGUI\");',1,0,'text',NULL,NULL,2,'3',1,1,1,0,0,NULL,'all'),('lastName','WebGUI::International::get(316,\"WebGUI\");',1,0,'text',NULL,NULL,3,'3',1,1,1,0,0,NULL,'all'),('icq','WebGUI::International::get(317,\"WebGUI\");',1,0,'text',NULL,NULL,2,'2',1,1,1,0,0,NULL,'all'),('aim','WebGUI::International::get(318,\"WebGUI\");',1,0,'text',NULL,NULL,3,'2',1,1,1,0,0,NULL,'all'),('msnIM','WebGUI::International::get(319,\"WebGUI\");',1,0,'text',NULL,NULL,4,'2',1,1,1,0,0,NULL,'all'),('yahooIM','WebGUI::International::get(320,\"WebGUI\");',1,0,'text',NULL,NULL,5,'2',1,1,1,0,0,NULL,'all'),('cellPhone','WebGUI::International::get(321,\"WebGUI\");',1,0,'phone',NULL,NULL,6,'2',1,1,1,0,0,NULL,'all'),('pager','WebGUI::International::get(322,\"WebGUI\");',1,0,'phone',NULL,NULL,7,'2',1,1,1,0,0,NULL,'all'),('emailToPager','WebGUI::International::get(441,\"WebGUI\");',1,0,'email',NULL,NULL,8,'2',1,1,1,0,0,NULL,'all'),('language','WebGUI::International::get(304,\"WebGUI\");',1,0,'selectBox','WebGUI::International::getLanguages()','\'English\'',1,'4',1,1,1,0,0,NULL,'none'),('homeAddress','WebGUI::International::get(323,\"WebGUI\");',1,0,'text',NULL,NULL,1,'5',1,1,1,0,0,NULL,'none'),('homeCity','WebGUI::International::get(324,\"WebGUI\");',1,0,'text',NULL,NULL,2,'5',1,1,1,0,0,NULL,'none'),('homeState','WebGUI::International::get(325,\"WebGUI\");',1,0,'text',NULL,NULL,3,'5',1,1,1,0,0,NULL,'none'),('homeZip','WebGUI::International::get(326,\"WebGUI\");',1,0,'zipcode',NULL,NULL,4,'5',1,1,1,0,0,NULL,'none'),('homeCountry','WebGUI::International::get(327,\"WebGUI\");',1,0,'text',NULL,NULL,5,'5',1,1,1,0,0,NULL,'none'),('homePhone','WebGUI::International::get(328,\"WebGUI\");',1,0,'phone',NULL,NULL,6,'5',1,1,1,0,0,NULL,'none'),('workAddress','WebGUI::International::get(329,\"WebGUI\");',1,0,'text',NULL,NULL,2,'6',1,1,1,0,0,NULL,'all'),('workCity','WebGUI::International::get(330,\"WebGUI\");',1,0,'text',NULL,NULL,3,'6',1,1,1,0,0,NULL,'all'),('workState','WebGUI::International::get(331,\"WebGUI\");',1,0,'text',NULL,NULL,4,'6',1,1,1,0,0,NULL,'all'),('workZip','WebGUI::International::get(332,\"WebGUI\");',1,0,'zipcode',NULL,NULL,5,'6',1,1,1,0,0,NULL,'all'),('workCountry','WebGUI::International::get(333,\"WebGUI\");',1,0,'text',NULL,NULL,6,'6',1,1,1,0,0,NULL,'all'),('workPhone','WebGUI::International::get(334,\"WebGUI\");',1,0,'phone',NULL,NULL,7,'6',1,1,1,0,0,NULL,'all'),('gender','WebGUI::International::get(335,\"WebGUI\");',1,0,'SelectBox','{\r\n \'other\'=>WebGUI::International::get(403),\r\n \'male\'=>WebGUI::International::get(339),\r\n \'female\'=>WebGUI::International::get(340)\r\n}','\'other\'',1,'7',1,1,0,0,0,'','none'),('birthdate','WebGUI::International::get(336,\"WebGUI\");',1,0,'date',NULL,NULL,2,'7',1,1,1,0,0,NULL,'none'),('homeURL','WebGUI::International::get(337,\"WebGUI\");',1,0,'url',NULL,NULL,7,'5',1,1,1,0,0,NULL,'none'),('workURL','WebGUI::International::get(446,\"WebGUI\");',1,0,'url',NULL,NULL,8,'6',1,1,1,0,0,NULL,'all'),('workName','WebGUI::International::get(450,\"WebGUI\");',1,0,'text',NULL,NULL,1,'6',1,1,1,0,0,NULL,'all'),('timeZone','WebGUI::International::get(\"timezone\",\"DateTime\");',1,0,'timeZone','','\'America/Chicago\'',3,'4',1,1,1,0,0,NULL,'none'),('dateFormat','WebGUI::International::get(461,\"WebGUI\");',1,0,'selectBox','{\n\'%d-%m-%y\'=>WebGUI::DateTime::epochToHuman(\"\",\"%d-%m-%y\"),\n\'%d.%m.%y\'=>WebGUI::DateTime::epochToHuman(\"\",\"%d.%m.%y\"),\r\n \'%M/%D/%y\'=>WebGUI::DateTime::epochToHuman(\"\",\"%M/%D/%y\"),\r\n \'%y-%m-%d\'=>WebGUI::DateTime::epochToHuman(\"\",\"%y-%m-%d\"),\r\n \'%D-%c-%y\'=>WebGUI::DateTime::epochToHuman(\"\",\"%D-%c-%y\"),\r\n \'%c %D, %y\'=>WebGUI::DateTime::epochToHuman(\"\",\"%c %D, %y\")\r\n}\r\n','\'%M/%D/%y\'',4,'4',1,1,1,0,0,NULL,'none'),('timeFormat','WebGUI::International::get(462,\"WebGUI\");',1,0,'selectBox','{\r\n \'%H:%n %p\'=>WebGUI::DateTime::epochToHuman(\"\",\"%H:%n %p\"),\r\n \'%H:%n:%s %p\'=>WebGUI::DateTime::epochToHuman(\"\",\"%H:%n:%s %p\"),\r\n \'%j:%n\'=>WebGUI::DateTime::epochToHuman(\"\",\"%j:%n\"),\r\n \'%j:%n:%s\'=>WebGUI::DateTime::epochToHuman(\"\",\"%j:%n:%s\")\r\n}\r\n','\'%H:%n %p\'',5,'4',1,1,1,0,0,NULL,'none'),('discussionLayout','WebGUI::International::get(509)',1,0,'selectBox','{\n flat=>WebGUI::International::get(510),\n nested=>WebGUI::International::get(1045)\n}','\'nested\'',6,'4',1,1,1,0,0,NULL,'none'),('firstDayOfWeek','WebGUI::International::get(699,\"WebGUI\");',1,0,'selectBox','{0=>WebGUI::International::get(\"sunday\",\"DateTime\"),1=>WebGUI::International::get(\"monday\",\"DateTime\")}','0',2,'4',1,1,1,0,0,'','none'),('uiLevel','WebGUI::International::get(739,\"WebGUI\");',0,0,'selectBox','{\r\n0=>WebGUI::International::get(729,\"WebGUI\"),\r\n1=>WebGUI::International::get(730,\"WebGUI\"),\r\n2=>WebGUI::International::get(731,\"WebGUI\"),\r\n3=>WebGUI::International::get(732,\"WebGUI\"),\r\n4=>WebGUI::International::get(733,\"WebGUI\"),\r\n5=>WebGUI::International::get(734,\"WebGUI\"),\r\n6=>WebGUI::International::get(735,\"WebGUI\"),\r\n7=>WebGUI::International::get(736,\"WebGUI\"),\r\n8=>WebGUI::International::get(737,\"WebGUI\"),\r\n9=>WebGUI::International::get(738,\"WebGUI\")\r\n}','\'5\'',7,'4',1,0,1,0,0,NULL,'none'),('alias','WebGUI::International::get(858)',1,0,'text','','',4,'3',1,1,1,0,0,NULL,'all'),('signature','WebGUI::International::get(859)',1,0,'HTMLArea','','',5,'3',1,1,1,0,0,NULL,'all'),('publicProfile','WebGUI::International::get(861)',1,0,'RadioList','{ all=>WebGUI::International::get(\'public label\',\'Account_Profile\'), friends=>WebGUI::International::get(\'friends only label\',\'Account_Profile\'), none=>WebGUI::International::get(\'private label\',\'Account_Profile\')}','[\"none\"]',8,'4',1,1,0,0,0,'','none'),('toolbar','WebGUI::International::get(746)',0,0,'selectBox','WebGUI::Icon::getToolbarOptions()','\'useLanguageDefault\'',9,'4',1,0,1,0,0,NULL,'none'),('photo','WebGUI::International::get(\"photo\",\"WebGUI\");',1,0,'Image','','',6,'3',1,1,1,0,0,NULL,'all'),('avatar','WebGUI::International::get(\"avatar\",\"WebGUI\");',1,0,'Image','','',1,'1',1,1,1,0,0,NULL,'none'),('department','WebGUI::International::get(\'Department\',\'Asset_InOutBoard\')',1,0,'selectBox','{\'IT\'=>WebGUI::International::get(\'IT\',\'Asset_InOutBoard\'),\'HR\'=>WebGUI::International::get(\'HR\',\'Asset_InOutBoard\'),\'Regular Staff\'=>WebGUI::International::get(\'Regular Staff\',\'Asset_InOutBoard\')}\n','\'Regular Staff\'',8,'6',0,1,1,0,0,NULL,'all'),('allowPrivateMessages','WebGUI::International::get(\"allow private messages label\",\"WebGUI\")',1,0,'RadioList','{ all=>WebGUI::International::get(\"user profile field private message allow label\",\"WebGUI\"), friends=>WebGUI::International::get(\"user profile field private message friends only label\",\"WebGUI\"), none=>WebGUI::International::get(\"user profile field private message allow none label\",\"WebGUI\"),}','[\"all\"]',10,'4',1,1,1,0,0,NULL,'none'),('ableToBeFriend','WebGUI::International::get(\'user profile field friend availability\',\'WebGUI\')',0,0,'yesNo',NULL,'1',2,'1',1,1,1,0,0,'','none'),('showMessageOnLoginSeen','WebGUI::International::get(\"showMessageOnLoginSeen\",\"Auth\");',0,0,'integer',NULL,'0',3,'1',1,0,1,0,0,NULL,'none'),('showOnline','WebGUI::International::get(\'Show when online?\',\'WebGUI\')',1,0,'YesNo',NULL,'0',11,'4',1,1,1,0,0,'','none'),('versionTagMode','WebGUI::International::get(\"version tag mode\",\"WebGUI\");',1,0,'selectBox','\n{\n inherited => WebGUI::International::get(\"versionTagMode inherited\"),\n multiPerUser => WebGUI::International::get(\"versionTagMode multiPerUser\"),\n singlePerUser => WebGUI::International::get(\"versionTagMode singlePerUser\"),\n siteWide => WebGUI::International::get(\"versionTagMode siteWide\"),\n autoCommit => WebGUI::International::get(\"versionTagMode autoCommit\"),\n}\n','inherited',12,'4',1,1,0,0,0,'','none'),('receiveInboxEmailNotifications','WebGUI::International::get(\'receive inbox emails\',\'WebGUI\')',1,0,'yesNo',NULL,'1',13,'4',1,1,1,0,0,'','none'),('receiveInboxSmsNotifications','WebGUI::International::get(\'receive inbox sms\',\'WebGUI\')',1,0,'yesNo',NULL,'0',14,'4',1,1,1,0,0,'','none'),('assetManagerSortColumn','WebGUI::International::get(\'assetManagerSortColumn label\', \'Account_Profile\')',0,0,'selectBox','{\n lineage => WebGUI::International::get(\'rank\', \'Asset\'),\n title => WebGUI::International::get(99, \'Asset\'),\n className => WebGUI::International::get(\'type\', \'Asset\'),\n revisionDate => WebGUI::International::get(\'revision date\', \'Asset\'),\n assetSize => WebGUI::International::get(\'size\', \'Asset\'),\n lockedBy => WebGUI::International::get(\'locked\', \'Asset\'),\n}\n','lineage',15,'4',1,0,1,0,0,'',NULL),('assetManagerSortDirection','WebGUI::International::get(\'assetManagerSortDirection label\', \'Account_Profile\')',0,0,'selectBox','{\n asc => WebGUI::International::get(\'ascending\', \'Account_Profile\'),\n desc => WebGUI::International::get(\'descending\', \'Account_Profile\'),\n}\n','asc',16,'4',1,0,1,0,0,'',NULL); -ALTER TABLE `userProfileField` ENABLE KEYS; -ALTER TABLE `users` DISABLE KEYS; -INSERT INTO `users` VALUES ('1','Visitor','WebGUI',1019867418,1238721273,0,'Active','0',''),('3','Admin','WebGUI',1019867418,1251850059,0,'Active','1','Fwa7nt7HAQkelbjCRrtqKQ'); -ALTER TABLE `users` ENABLE KEYS; -ALTER TABLE `vendor` DISABLE KEYS; -INSERT INTO `vendor` VALUES ('defaultvendor000000000','2008-06-12 19:43:10','Default Vendor','3',NULL,NULL,NULL,NULL); -ALTER TABLE `vendor` ENABLE KEYS; -ALTER TABLE `wobject` DISABLE KEYS; -INSERT INTO `wobject` VALUES (0,'This is the latest news from Plain Black and WebGUI pulled directly from the site every hour.','fK-HMSboA3uu0c1KYkYspA','stevestyle000000000003','PBtmpl0000000000000111',1124395696,'stevestyle000000000003'),(1,NULL,'PBasset000000000000002','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'7-0-style0000000000026','PBtmpl0000000000000060','',1147642499,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000001','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000014','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000015','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000016','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000017','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000018','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000019','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000020','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000021','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000002','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000006','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000007','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000008','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000009','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000010','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000011','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000012','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000013','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'7-0-style0000000000070','PBtmpl0000000000000060','PBtmpl0000000000000060',1147642510,'PBtmpl0000000000000060'),(1,NULL,'7-0-style0000000000001','PBtmpl0000000000000060','',1147642492,'PBtmpl0000000000000060'),(1,NULL,'7-0-style0000000000031','PBtmpl0000000000000060','',1147642500,'PBtmpl0000000000000060'),(0,NULL,'7-0-style0000000000025','PBtmpl0000000000000060','',1147642498,'PBtmpl0000000000000060'),(1,NULL,'PBasset000000000000003','PBtmpl0000000000000060','PBtmpl0000000000000111',1147642437,'PBtmpl0000000000000060'),(1,NULL,'nbSrhXZQuxIjhWFaFPSuVA','PBtmpl0000000000000060','',1147642465,'PBtmpl0000000000000060'),(1,NULL,'N13SD1Fpqk00UgBt1Z8ivQ','PBtmpl0000000000000060','',1147642470,'PBtmpl0000000000000060'),(1,NULL,'-WM2dt0ZGpDasuL2wWocxg','PBtmpl0000000000000060','PBtmpl0000000000000111',1222803056,'PBtmpl0000000000000060'),(1,NULL,'3uuBf8cYuj1sew2OJXl9tg','PBtmpl0000000000000060','',1147642470,'PBtmpl0000000000000060'),(1,NULL,'cj2y4papTVGZRFdwTI-_fw','PBtmpl0000000000000060','',1147642475,'PBtmpl0000000000000060'),(1,NULL,'bBzO4CWjqU_ile3gf5Iypw','PBtmpl0000000000000060','',1147642475,'PBtmpl0000000000000060'),(1,NULL,'Da6KWn805L4B5e4HFgQRQA','PBtmpl0000000000000060','',1147642479,'PBtmpl0000000000000060'),(1,NULL,'bbiA9Zq5Gy2oCFBlILO3QA','PBtmpl0000000000000060','',1147642480,'PBtmpl0000000000000060'),(1,NULL,'Efe2W0UgrSRDltNJ87jlfg','PBtmpl0000000000000060','',1147642480,'PBtmpl0000000000000060'),(1,NULL,'9wKWdum0_8z-OhhquWLtSQ','PBtmpl0000000000000060','',1147642483,'PBtmpl0000000000000060'),(1,NULL,'CSN-ZON7Uwv8kxf3F1fh5Q','PBtmpl0000000000000060','',1147642484,'PBtmpl0000000000000060'),(1,NULL,'TCtybxdqmdwdvRn555zpCQ','PBtmpl0000000000000060','',1147642484,'PBtmpl0000000000000060'),(1,NULL,'pbproto000000000000002','PBtmpl0000000000000060','',1163019036,'PBtmpl0000000000000060'),(1,NULL,'tempspace0000000000000','PBtmpl0000000000000060','PBtmpl0000000000000060',1185754574,'PBtmpl0000000000000060'),(1,NULL,'Tsg7xmPYv782j6IVz7yHFg','PBtmpl0000000000000060','PBtmpl0000000000000111',1213244777,'PBtmpl0000000000000060'),(1,NULL,'TYo2Bwl7aafzTtdHlS-arQ','PBtmpl0000000000000060','PBtmpl0000000000000060',1211664878,'PBtmpl0000000000000060'),(1,NULL,'6tK47xsaIH-ELw0IBo0uRQ','PBtmpl0000000000000060','PBtmpl0000000000000111',1210777115,'PBtmpl0000000000000060'),(1,NULL,'gbnRhcWNk1iQe32LFEB5eQ','PBtmpl0000000000000060','PBtmpl0000000000000111',1212086102,'PBtmpl0000000000000060'),(1,NULL,'6D4Z-oruXPS6OlH_Kx8pBg','PBtmpl0000000000000060','PBtmpl0000000000000111',1209509389,'PBtmpl0000000000000060'),(1,NULL,'C5fPz-Wg85vkYRvCdl-Xqw','PBtmpl0000000000000060','PBtmpl0000000000000111',1212160830,'PBtmpl0000000000000060'),(1,NULL,'jnYdqDkUR8x7Pv2eGR1qTA','PBtmpl0000000000000060','PBtmpl0000000000000111',1216250666,'PBtmpl0000000000000060'),(1,NULL,'2OcUWHVsu_L1sDFzIMWYqw','PBtmpl0000000000000060','PBtmpl0000000000000111',1222803070,'PBtmpl0000000000000060'),(1,NULL,'zyWi26q9na-iiZqL4yedog','PBtmpl0000000000000060','PBtmpl0000000000000111',1222803114,'PBtmpl0000000000000060'),(1,NULL,'tBL7BWiQRZFed2Y-Zjo9tQ','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803200,'PBtmpl0000000000000060'),(1,NULL,'GdkQpvjRtJqtzOUbwIIQRA','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803205,'PBtmpl0000000000000060'),(1,NULL,'tnc5iYyynX2hfdEs9D3P8w','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803213,'PBtmpl0000000000000060'),(1,NULL,'vgXdBcFTqU7h4wBG1ewdBw','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803217,'PBtmpl0000000000000060'),(1,NULL,'hcFlqnXlsmC1ujN6Id0F0A','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803234,'PBtmpl0000000000000060'),(1,NULL,'eRJR52fvlaxfetv3DQkQYw','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803238,'PBtmpl0000000000000060'),(1,NULL,'5HIDHq5lAWHV5gpYGS0zLg','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803244,'PBtmpl0000000000000060'),(1,NULL,'rYEFwXXo0tkGhQTcbDibvg','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803249,'PBtmpl0000000000000060'),(1,NULL,'V3l5S5TtI7wMm1WpIMhvOA','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803253,'PBtmpl0000000000000060'),(1,NULL,'nqNbSUAhk9Vd1zda2SCz9A','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803258,'PBtmpl0000000000000060'),(1,NULL,'y8XkRdxIperLKkJ3bL5sSQ','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803264,'PBtmpl0000000000000060'),(1,NULL,'vTymIDYL2YqEh6PV50F7ew','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803302,'PBtmpl0000000000000060'),(1,NULL,'lo1ac3BsoJx3ijGQ3gR-bQ','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803309,'PBtmpl0000000000000060'),(1,NULL,'huASapWvFDzqwOSbcN-JFQ','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803313,'PBtmpl0000000000000060'),(1,NULL,'9A-mg2gwWmaYi9o_1C7ArQ','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803338,'PBtmpl0000000000000060'),(1,NULL,'yD1SMHelczihzjEmx6eXBA','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803342,'PBtmpl0000000000000060'),(1,NULL,'pV7GnZdpjR3XpZaSINIoeg','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803347,'PBtmpl0000000000000060'),(1,NULL,'71e17KeduiXgODLMlUxiow','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803352,'PBtmpl0000000000000060'),(1,NULL,'Ik9HHky10DIyFTKehUD1dw','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803478,'PBtmpl0000000000000060'),(1,NULL,'NywJYmGWe1f6EBXJnWg9Xg','PBtmpl0000000000000060','PBtmpl0000000000000111',1222803638,'PBtmpl0000000000000060'),(1,NULL,'AgyFhx3eXlfZXNp2MkrsiQ','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803665,'PBtmpl0000000000000060'),(1,NULL,'F7MAQ-cpuvQ1KuC7J4P5zQ','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803673,'PBtmpl0000000000000060'),(1,NULL,'BmLaN4rmAANkCglXUViEbg','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803871,'PBtmpl0000000000000060'),(1,NULL,'X7DrzUcj8pOKFa_6k9D5iw','PBtmpl0000000000000060','PBtmpl0000000000000060',1222804045,'PBtmpl0000000000000060'),(1,NULL,'UL-ItI4L1Z6-WSuhuXVvsQ','stevestyle000000000003','PBtmpl0000000000000111',1225139673,'stevestyle000000000003'),(1,NULL,'7-0-style0000000000049','PBtmpl0000000000000060','PBtmpl0000000000000060',1224117144,'PBtmpl0000000000000060'),(0,NULL,'jVKLVakT_iA2010_oEuAwg','PBtmpl0000000000000060','PBtmpl0000000000000060',1224116526,'PBtmpl0000000000000060'),(1,'

     

    ','QpmlAiYZz6VsKBM-_0wXaw','stevestyle000000000003','PBtmpl0000000000000111',1224616691,'stevestyle000000000003'),(1,NULL,'HPDOcsj4gBme8D4svHodBw','PBtmpl0000000000000060','PBtmpl0000000000000111',1225404573,'PBtmpl0000000000000060'),(1,NULL,'IZkrow_zwvbf4FCH-taVTQ','PBtmpl0000000000000060','PBtmpl0000000000000111',1226011853,'PBtmpl0000000000000060'),(1,NULL,'K0YjxqOqr7RupSo6sIdcAg','PBtmpl0000000000000060','PBtmpl0000000000000111',1227074310,'PBtmpl0000000000000060'),(1,NULL,'_ilRXNR3s8F2vGJ_k9ePcg','PBtmpl0000000000000060','PBtmpl0000000000000111',1226643205,'PBtmpl0000000000000060'),(1,NULL,'qaVcU0FFzzraMX_bzELqzw','PBtmpl0000000000000060','PBtmpl0000000000000111',1227074362,'PBtmpl0000000000000060'),(1,NULL,'QHn6T9rU7KsnS3Y70KCNTg','PBtmpl0000000000000060','PBtmpl0000000000000111',1233173545,'PBtmpl0000000000000060'),(1,NULL,'HW-sPoDDZR8wBZ0YgFgPtg','PBtmpl0000000000000060','PBtmpl0000000000000111',1227634350,'PBtmpl0000000000000060'),(1,NULL,'AOjPG2NHgfL9Cq6dDJ7mew','PBtmpl0000000000000060','PBtmpl0000000000000111',1236960881,'PBtmpl0000000000000060'),(1,NULL,'jmlI9IK-lV8n2WMYmmPhAA','PBtmpl0000000000000060','PBtmpl0000000000000111',1238106173,'PBtmpl0000000000000060'),(1,NULL,'6uvSLY-ak_w4p_wS8q33cA','PBtmpl0000000000000060','PBtmpl0000000000000111',1239213092,'PBtmpl0000000000000060'),(1,NULL,'GaBAW-2iVhLMJaZQzVLE5A','stevestyle000000000003','PBtmpl0000000000000111',1240103565,'stevestyle000000000003'),(1,'

    Templates for the Friend Manager

    ','lo1rpxn3t8YPyKGers5eQg','PBtmpl0000000000000060','PBtmpl0000000000000111',1238625621,'PBtmpl0000000000000060'),(1,NULL,'aNNC62qLAS6TB-0_MCYjsw','PBtmpl0000000000000060','PBtmpl0000000000000060',1246969327,'PBtmpl0000000000000060'),(1,NULL,'BFfNj5wA9bDw8H3cnr8pTw','PBtmpl0000000000000060','PBtmpl0000000000000060',1247046273,'PBtmpl0000000000000060'),(1,NULL,'f_tn9FfoSfKWX43F83v_3w','PBtmpl0000000000000060','PBtmpl0000000000000060',1247053009,'PBtmpl0000000000000060'),(1,NULL,'oGfxez5sksyB_PcaAsEm_Q','PBtmpl0000000000000060','PBtmpl0000000000000060',1247053097,'PBtmpl0000000000000060'),(1,NULL,'tPagC0AQErZXjLFZQ6OI1g','PBtmpl0000000000000060','PBtmpl0000000000000060',1246966459,'PBtmpl0000000000000060'),(1,NULL,'GYaFxnMu9UsEG8oanwB6TA','PBtmpl0000000000000060','PBtmpl0000000000000060',1246965871,'PBtmpl0000000000000060'),(1,NULL,'VZK3CRgiMb8r4dBjUmCTgQ','PBtmpl0000000000000060','PBtmpl0000000000000060',1247046242,'PBtmpl0000000000000060'),(1,NULL,'tXwf1zaOXTvsqPn6yu-GSw','PBtmpl0000000000000060','PBtmpl0000000000000060',1246965607,'PBtmpl0000000000000060'),(1,NULL,'5bnNzteN7w3NnK9mF4XiCg','PBtmpl0000000000000060','PBtmpl0000000000000060',1250243000,'PBtmpl0000000000000060'),(1,NULL,'RSAMkc6WQmfRE3TOr1_3Mw','PBtmpl0000000000000060','PBtmpl0000000000000111',1250243000,'PBtmpl0000000000000060'),(1,NULL,'fowHfgOkJtAxdst7rugTog','PBtmpl0000000000000060','PBtmpl0000000000000111',1252595993,'PBtmpl0000000000000060'),(1,NULL,'TvOZs8U1kRXLtwtmyW75pg','PBtmpl0000000000000060','PBtmpl0000000000000060',1256092368,'PBtmpl0000000000000060'),(1,NULL,'4qh0kIsFUdd4Ox-Iu1JZgg','PBtmpl0000000000000060','PBtmpl0000000000000111',1257311886,'PBtmpl0000000000000060'),(1,'

     

    ','-K8Hj45mbelljN9-0CXZxg','PBtmpl0000000000000060','PBtmpl0000000000000060',1257311887,'PBtmpl0000000000000060'),(1,NULL,'P_4uog81vSUK4KxuW_4GUA','PBtmpl0000000000000060','PBtmpl0000000000000111',1258524916,'PBtmpl0000000000000060'),(0,NULL,'t87D1138NhPHhA23-hozBA','PBtmpl0000000000000060','PBtmpl0000000000000060',1273032716,'PBtmpl0000000000000060'),(0,NULL,'QtBumey5ffc-xffRp1-7Aw','PBtmpl0000000000000060','PBtmpl0000000000000060',1273032716,'PBtmpl0000000000000060'),(1,NULL,'x_hiUi1XZloBvV47Obnu8Q','OiJNwP1gAlcva8_yOtL4gA','PBtmpl0000000000000111',1273032718,'PBtmpl0000000000000060'),(0,NULL,'UUwEL6hLEPdrnkZnKRzFYQ','OiJNwP1gAlcva8_yOtL4gA','PBtmpl0000000000000111',1273032718,'PBtmpl0000000000000060'),(1,NULL,'Q4uX_C557arTp6D_jwB1jQ','PBtmpl0000000000000060','PBtmpl0000000000000060',1273032720,'PBtmpl0000000000000060'),(1,NULL,'GNOAsX98vCsl0JRwfwL-gg','PBtmpl0000000000000060','PBtmpl0000000000000060',1277868921,'PBtmpl0000000000000060'),(1,NULL,'_iHetEvMQUOoxS-T2CM0sQ','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1273172789,'stevestyle000000000003'),(0,'

    \nCongratulations on successfully installing the WebGUI Content Engine®. If you used the Site Starter to select a set of default pages, you will see those pages in the site navigation. You will also notice that a number of additional pages appear, such as this page. These are default pages added for your convenience to help you get started with WebGUI and find the resources you need. Feel free to remove these extra pages whenever you are ready.

    \n

    To get started managing content, download the PDF document below. This document provides a basic introduction to the WebGUI user interface. 

    \n

    WebGUI Basics (PDF)

    \n

    Once you have read this document, you may want to head over to the Documentation section where you can find more WebGUI resources.

    ','bX5rYxb6tZ9docY6sUhBlw','Qk24uXao2yowR6zxbVJ0xA','stevestyle000000000003',1278013772,'stevestyle000000000003'),(1,'

    Plain Black® created the WebGUI Content Engine® and is here to answer \nyour questions and provide you with services to make sure your WebGUI \nimplementation is entirely successful. We bend over backwards to make \nsure you\'re a success. Contact us today to \nsee how we can help you.

    ','8Bb8gu-me2mhL3ljFyiWLg','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1271359194,'stevestyle000000000003'),(1,'

    Plain Black provides support packages to fit any budget or need. Start out with online support which costs only $500 per year, or work with Plain Black to build a custom support package tailored to your specific needs. No matter what level of support you purchase, you will get personalized and friendly service in a timely manner.

    ','ix1p0AbwKAz8QWB-T-HHfg','Qk24uXao2yowR6zxbVJ0xA','stevestyle000000000003',1271359087,'stevestyle000000000003'),(1,'

    Plain Black\'s professionally trained WebGUI experts can handle the task\nof hosting your web site, intranet, or extranet. Let us deal with upgrades, security, and server management so you focus on building your WebGUI site, which is where your time and expertise should be spent. And when you sign up with hosting, online support is included!

    ','iCYOjohB9SKvAPr6bXElKA','Qk24uXao2yowR6zxbVJ0xA','stevestyle000000000003',1271445525,'stevestyle000000000003'),(1,'

    WebGUI\'s robust API allows for easy customization. Plain Black\'s team of developers can create any features you need for your site. We\'ve built hundreds of custom applications for people. From simple macros, to custom single sign on systems, to applications that will manage your entire company, our team will leverage the power of WebGUI to your advantage.

    ','4Yfz9hqBqM8OYMGuQK8oLw','Qk24uXao2yowR6zxbVJ0xA','stevestyle000000000003',1271352537,'stevestyle000000000003'),(1,'

    Branding and visual appeal are powerful marketing tools. Don\'t let your site become a wallflower. Plain Black\'s professional design team can create a custom design to make your site stand out. Our team is fast, easy to work with, and can even migrate your existing content into your new WebGUI site.

    ','Wl8WZ43g2rK5AYr9o4zY7w','Qk24uXao2yowR6zxbVJ0xA','stevestyle000000000003',1271445539,'stevestyle000000000003'),(1,'

    Let our team of professional translators bring your site to new customers by translating your content into additional languages. Our translation services are never machine automated. They\'re always done by professional translators that have years of experience reading, writing, and speaking many languages.

    ','LBuiKzg2mWwmOPS9AgV3bg','Qk24uXao2yowR6zxbVJ0xA','stevestyle000000000003',1271348789,'stevestyle000000000003'),(1,'

    Now that you have a brilliant WebGUI site, you need to get people to visit it. We can help there too. Our marketing specialists can work with you to develop and execute the right combination of search engine placement, advertising buys, and affilliate programs to ensure your site gets the traffic it needs.

    ','jTNggl7AoVSUc_ZzrvuCmw','Qk24uXao2yowR6zxbVJ0xA','stevestyle000000000003',1271348789,'stevestyle000000000003'),(1,'

    With any large system, having the right documentation to get you started is mandatory. The good news is that WebGUI has abundant documentation.

    ','mTOiwwk3q4k9g5-XykXhPA','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1271349647,'stevestyle000000000003'),(1,'

    The WebGUI project community is a diverse and talented group. If you \nwould like to contribute back to the project there are many ways to \nbecome involved.

    ','2TqQc4OISddWCZmRY1_m8A','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1271357565,'stevestyle000000000003'),(1,'

    You can find members of the community on the #webgui chat channel on the Freenode IRC network. If you\'re not \nfamiliar with IRC, it\'s essentially like a chat room. A few things you\'ll need to know:

    \n
      \n
    \n
      \n
    • You need an IRC client program. There are many available that \ncan be downloaded free of charge.
    • \n
    • The IRC network we use is Freenode
    • \n
    • Our channel is #webgui.
    • \n
    • Channel operators have an @ next to their name. All channel operators in #webgui are Plain Black employees.
    • \n
    • Someone with a + next to their name is a recognized contributor in the WebGUI community. People who have been recognized as one of the People Behind WebGUI are often given this designation.
    • \n
    \n
      \n\n\n
    \n

    If you\'re looking for a mentor, recognized contributors are a good place\n to start.

    ','k2Qj03FrAOXYra8kDJYYXw','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1271357513,'PBtmpl0000000000000060'),(1,'

    An annual event, this is the one time a year when WebGUI users and Plain\n Black\'s staff come together to do all things WebGUI.  This is by far \nthe best way to get involved with the community as nothing can replace \nface to face interaction and mentoring. The conference is usually held \nin the fall of each year and more information on attending can be found \non the WebGUI Users \nConference website as details become available.

    ','ksSfkZdsr0uC62NwIk6hFQ','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1271356973,'PBtmpl0000000000000060'),(1,'

    WebGUI \nForums are available for WebGUI related\n discussion and community support. Bounce around ideas, discuss \nimportant issues, and ask community members for help and advice. WebGUI \nForums are broken up into:

    \n','nWxS5jnA3o3DgPEwBeR7yQ','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1271357239,'PBtmpl0000000000000060'),(0,NULL,'x3OFY6OJh_qsXkZfPwug4A','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1271348790,'stevestyle000000000003'),(0,NULL,'pJd5TLAjfWMVXD6sCRLwUg','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1271348790,'stevestyle000000000003'),(0,'

    The WebGUI Content Engine® is a powerful, easy to use web application framework and content management system. WebGUI contains dozens of built-in features, and allows for full customization through its rich API. It\'s easy enough for the average business user to use, but powerful enough for any large enterprise.

    \n

    WebGUI serves thousands of small and large businesses, schools, universities, governments, associations, churches, projects and communities throughout the world. For examples of who is using WebGUI, visit the WebGUI Sightings page. Shouldn\'t your site be on this list?

    \n

    If you\'re new to WebGUI, visit the Getting Started section. Once you feel comfortable, explore some of the professional services available for your new WebGUI site. No matter what level you\'re at, tell your friends about WebGUI.

    ','OhdaFLE7sXOzo_SIP2ZUgA','Qk24uXao2yowR6zxbVJ0xA','stevestyle000000000003',1271445348,'stevestyle000000000003'),(1,'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n

    Rich User Interface

    \n
    \n

    Powerful API

    \n
    \n

    WebGUI has a rich user experience that allows users to place their \ncontent\nthrough a drag-n-drop interface; helps users pick dates, colors, and\nmore; and has a highly customizable rich editor to allow users to \nquickly and easily format\ncontent.

    \n
    \n

    WebGUI allows developers to quickly plug-in new functionality to\nget the most from a site. In addition, WebGUI\'s standardized plug-in\npoints maintain the upgrade path even with customizations.

    \n
    \n

    Short Friendly URLs

    \n
    \n

    Internationalization

    \n
    \n

    Never worry about ugly numeric \nID\'s or other things in URL\'s that\nmake it hard for search engines and people to use a site.

    \n
    \n

    Users can work in an interface in their native language, and content can\n be published in as many languages as necessary.

    \n
    \n

    Personalization

    \n
    \n

    Easy To Install

    \n
    \n

    Users see their own view of the site through dynamically\ngenerated navigation and content. In addition, content can be displayed \nbased upon users\' viewing habits.

    \n
    \n

    With the use of the WebGUI Runtime Environment (Unix, Mac OS X, Linux, \nBSD) and VMWare Appliance (Windows) setup takes minutes rather than\nhours.

    \n
    ','IWFxZDyGhQ3-SLZhELa3qw','Qk24uXao2yowR6zxbVJ0xA','stevestyle000000000003',1277737686,'stevestyle000000000003'),(1,NULL,'LdiozcIUciWuvt3Z-na5Ww','PBtmpl0000000000000060','PBtmpl0000000000000060',1281501162,'PBtmpl0000000000000060'),(1,NULL,'Vch1Ww7G_JpBhOhXX07RDg','PBtmpl0000000000000060','PBtmpl0000000000000111',1281501163,'PBtmpl0000000000000060'),(1,NULL,'AssetReportFolder00001','PBtmpl0000000000000060','PBtmpl0000000000000060',1281501163,'PBtmpl0000000000000060'),(1,'

    You don\'t have to be a developer to become a project contributor. Examples of how you can contribute include:\n

    \n
      \n
    • Translators - Visit i18n.webgui.org\n and either help translate a few items in an existing language, or \ncreate a new translation.

    • \n
    • Graphic Designers - Create WebGUI style themes, icons, or fix UI\n bugs. You can contribute your items to WebGUI\'s Addons and Plugins area for others to download and use.

    • \n
    • Usability Experts - Help make WebGUI more accessable and \neasier to use by submitting RFEs. Even better, submit an RFE that\'s ready to implement by including the code!

    • \n
    • Doc Writers - Write documents in WebGUI\'s wiki, help\n out on the boards, improve WebGUI\'s built in documentation.

    • \n
    • Testers - Validate WebGUI\'s features against its \ndocumentation, search for errors, and report bugs.

    • \n
    • Test writers - If you have some Perl abilities, you can help \ndevelop unit tests to make sure the WebGUI API is behaving as \ndocumented.

    • \n
    • Developers - Write a new feature for WebGUI like a macro, \nasset, wobject, auth module or workflow activity and contribute it to \nthe Addons and Plugins. If you\'re interested in developing for WebGUI, be sure to check out the Development Best Practices wiki article.

    • \n
    • Bug Fixers - Cruise the bug list and submit patches to \ncorrect the problem.

    • \n
    • Core Developers - Becoming a core developer is a privilege. To earn it, you have to demonstrate through bug fixes and/or \ncontributions that you can make sound programming decisions without the \nneed for someone to scrutinize everything you check in. WebGUI is a \nvery large and complex application so getting to this level can take \nsome time. Core developers are developers with commit privileges to the\n subversion repository.

    • \n
    • Advocate - Spread the word about WebGUI, tell people about \nhow you use it and how it\'s helped you.Encourage people to try it out.

    • \n
    • Marketing and Promotion - If you have a talent for marketing,\n advertising, or promotion you can be a super advocate! Have a marketing\n idea? Contact tavis AT plainblack DOT com.  Make a WebGUI banner or \nprint ad and contribute it!  Maybe you have a design for a cool \nwallpaper or t-shirt, anything to get the word out.
    • \n
    ','l0guT3vTR3B8cL6vtP-g3A','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1285124369,'PBtmpl0000000000000060'),(1,NULL,'N7uMnnicbyTEulcuRi1sSg','PBtmpl0000000000000060','PBtmpl0000000000000111',1283900195,'PBtmpl0000000000000060'),(1,'

     

    ','gI_TxK-5S4DNuv42wpImmw','PBtmpl0000000000000060','PBtmpl0000000000000111',1285124155,'PBtmpl0000000000000060'),(1,NULL,'kaPRSaf8UKiskiGEgJgLAw','PBtmpl0000000000000060','PBtmpl0000000000000111',1285124155,'2p9ygcqH_Z11qOUvQ1uBvw'),(1,NULL,'RrV4aAPnn4dM0ZcU3OXnlw','PBtmpl0000000000000060','PBtmpl0000000000000060',1286336607,'PBtmpl0000000000000060'),(0,'

    \nTo begin managing content, you should log in and click the Turn Admin On! link. The default username is \"admin\" and the default password is \"123qwe\", but you probably customized both of those when you visited this site for the very first time.\n

    \n

    \nNow that you\'re logged in, we recommend that you add a new user for yourself with admin privileges just in case you forget the login information for your primary admin account. Don\'t worry if you lock yourself out, you can always contact Plain Black® support to get instructions to get back in.\n

    \n

    NOTE: If you appear to get logged out while moving between pages, this is most likely your browser displaying a cached version of the page. Click on your browser\'s refresh button to correct the problem.

    \n

     

    \n

    \nFor more information about services related to WebGUI click here.\n

    \n

    \nEnjoy your new WebGUI site!\n

    ','NK8bqlwVRILJknqeCDPBHg','Qk24uXao2yowR6zxbVJ0xA','stevestyle000000000003',1285796040,'stevestyle000000000003'),(1,'

    Plain Black has created a line of commercial books which total over 1500 pages of detailed documentation about WebGUI. Both black and white and full color editions of these books are available. Visit the book store today to stock your WebGUI library. Other than hands on training, there is no better way to hone your WebGUI skills. No matter what your need, Plain Black has created a book that\'s right for you and is creating new books each year.

    \n

    In the fall of 2010, Plain Black announced that these books will be converted into free wikis. You can now access all WebGUI user guides for free on the WebGUI User Guides page on www.webgui.org.

    \n

    *These books are available for WebGUI version 7.7 and earlier. For later documentation, see the free resources available on the WebGUI project website.

    ','diZvW4bSgZWwyyGP3qXi1g','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1285610019,'stevestyle000000000003'),(1,NULL,'68sKwDgf9cGH58-NZcU4lg','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1286336676,'stevestyle000000000003'),(0,NULL,'Am1J-meNBmhqFfEIWy6Gag','OiJNwP1gAlcva8_yOtL4gA','PBtmpl0000000000000111',1287545014,'PBtmpl0000000000000060'),(1,NULL,'1z9J1O08n_7gVVlBwSRBJQ','PBtmpl0000000000000060','PBtmpl0000000000000111',1287545014,'PBtmpl0000000000000060'),(1,NULL,'xSmREZO3GNzK3M5PaueOOQ','PBtmpl0000000000000060','PBtmpl0000000000000060',1287545014,'PBtmpl0000000000000060'),(1,NULL,'0bx-xoL8TSXXubFuqKAoVQ','PBtmpl0000000000000060','PBtmpl0000000000000060',1287545014,'PBtmpl0000000000000060'),(1,NULL,'taX2UYkFF21ALpFZY2rhMw','PBtmpl0000000000000060','PBtmpl0000000000000060',1287545014,'PBtmpl0000000000000060'),(1,NULL,'K0q_N885Httqev1VCqUWxg','PBtmpl0000000000000060','PBtmpl0000000000000060',1287545014,'PBtmpl0000000000000060'),(1,NULL,'fq1ZkYhH24R5tb96kuT10Q','PBtmpl0000000000000060','PBtmpl0000000000000060',1287545014,'PBtmpl0000000000000060'),(1,NULL,'oHk7fAFhEEkB7dHzi0QOQA','PBtmpl0000000000000060','PBtmpl0000000000000060',1287545014,'PBtmpl0000000000000060'),(1,NULL,'9M-lrlPQWeeNWfvnDnK_Xg','PBtmpl0000000000000060','PBtmpl0000000000000060',1287545014,'PBtmpl0000000000000060'),(1,NULL,'_gBYAdTcbkiyamnqi2Xskg','PBtmpl0000000000000060','PBtmpl0000000000000060',1287545014,'PBtmpl0000000000000060'),(1,NULL,'0iMMbGN3BevuCBHjjLiQNA','PBtmpl0000000000000060','PBtmpl0000000000000111',1287545015,'PBtmpl0000000000000060'),(1,NULL,'6A4yIjWwJfIE0Ep-I0jutg','PBtmpl0000000000000060','PBtmpl0000000000000111',1287545015,'PBtmpl0000000000000060'),(1,'

    Folder for holding Workflow Activity templates.

    ','_cD6DLM_Fs5IlrLeWUjrjg','PBtmpl0000000000000060','PBtmpl0000000000000111',1287545015,'PBtmpl0000000000000060'),(1,NULL,'f2EktltCvwQpl_3-B1yR7g','PBtmpl0000000000000060','PBtmpl0000000000000111',1288748251,'PBtmpl0000000000000060'),(1,NULL,'S1A9iAwKcQQ6P20uTqw-Ew','PBtmpl0000000000000060','PBtmpl0000000000000060',1300763664,'PBtmpl0000000000000060'),(1,'

    There are hundreds of pages of free documentation available for WebGUI, provided by both Plain Black and the community at large. The following list is by no means comprehensive, but it should get you started in the right direction.

    \n

     

    \n
      \n
    • Primer - A downloadable PDF that shows you the basics of publishing content in WebGUI.
    • \n
    • WebGUI User Guides: all commercial user guides previously published by Plain Black are in the process of being converted into wikis. You can find these wikis on the WebGUI User Guides page of www.webgui.org. This is an ongoing process; until all books have been converted, remaining books are being made available as free PDF downloads.
    • \n
    • Wiki - Hundreds of pages of WebGUI community contributed content featuring a variety of tutorials.
    • \n
    • Worldwide - A collection of WebGUI related web sites from all over the world that have documentation and other resources for WebGUI.
    • \n
    • API Docs - The documentation of all of the WebGUI source code.
    • \n
    • Template Help - The documentation of all of WebGUI\'s template variables.
    • \n
    ','j_1qEqM6iLfQLiR6VKy0aA','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1299872071,'stevestyle000000000003'),(1,'

    Templates and images for the \"Underground\" style from StyleShout.com

    ','CQp-RFA2pMh5lFSggPPPYg','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1301973995,'PBtmpl0000000000000060'),(1,NULL,'_Mi_NTd3x8UB96LWezWHnw','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1301973995,'PBtmpl0000000000000060'),(1,NULL,'g3JH1PRq6m6Bj_PnGpcrSQ','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1301973996,'PBtmpl0000000000000060'),(1,'

    This folder holds prototype WebGUI assets with the correct templates pre-selected.

    ','G0hl4VilbFKipToyxKqFrg','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1301973997,'PBtmpl0000000000000060'),(1,NULL,'GWU2qZqe6yEuAKG-5HtBdg','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1301973997,'PBtmpl0000000000000060'),(1,NULL,'AsfpsOpsGzZCb9m7MyxPuw','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1301973997,'PBtmpl0000000000000060'),(1,NULL,'jmqLxnoWb6p92Cr12lf1hw','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1301973997,'PBtmpl0000000000000060'),(1,NULL,'8E2UOnj_XPEghTj7nfVM0g','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1301973997,'PBtmpl0000000000000060'),(1,NULL,'1qFjOEiILIwr1xB5_ebppQ','PBtmpl0000000000000060','PBtmpl0000000000000060',1301973998,'PBtmpl0000000000000060'),(1,NULL,'xD76UfQ_JnSgTLBNvytcpQ','PBtmpl0000000000000060','PBtmpl0000000000000111',1301973998,'PBtmpl0000000000000060'),(0,NULL,'h0bOzz7WvdaVZXsjpwtkww','KKt0VB_eoQxw9xEsHsAhag','PBtmpl0000000000000111',1301973998,'PBtmpl0000000000000060'),(1,NULL,'qFOfW1sKyOTnGNcP6BXbwg','6D98D8TIuhExiSoo2U1eqw','PBtmpl0000000000000111',1301973999,'PBtmpl0000000000000060'),(1,NULL,'G5DgNizuG3jXkjPp6UaGrA','PBtmpl0000000000000060','PBtmpl0000000000000060',1301973999,'PBtmpl0000000000000060'),(1,NULL,'brxm_faNdZX5tRo3p50g3g','PBtmpl0000000000000060','PBtmpl0000000000000111',1304392055,'PBtmpl0000000000000060'),(1,NULL,'n-Vr_wgxOkwiHGt1nJto9w','OiJNwP1gAlcva8_yOtL4gA','PBtmpl0000000000000111',1309236774,'PBtmpl0000000000000060'),(1,NULL,'aNmgn0cd6tldmC1FpW4KbA','PBtmpl0000000000000060','PBtmpl0000000000000060',1313542960,'PBtmpl0000000000000060'),(1,NULL,'jEz8iTGNWEt2I05IhVV19Q','PBtmpl0000000000000060','PBtmpl0000000000000060',1313542961,'PBtmpl0000000000000060'); -ALTER TABLE `wobject` ENABLE KEYS; -INSERT INTO webguiVersion (webguiVersion,versionType,dateApplied) VALUES ('7.10.23','Initial Install',UNIX_TIMESTAMP()); -SET CHARACTER_SET_CLIENT = @OLD_CHARACTER_SET_CLIENT; -SET CHARACTER_SET_RESULTS = @OLD_CHARACTER_SET_RESULTS; -SET CHARACTER_SET_CONNECTION = @OLD_CHARACTER_SET_CONNECTION; -SET COLLATION_CONNECTION = @OLD_COLLATION_CONNECTION; -SET TIME_ZONE = @OLD_TIME_ZONE; -SET UNIQUE_CHECKS = @OLD_UNIQUE_CHECKS; -SET FOREIGN_KEY_CHECKS = @OLD_FOREIGN_KEY_CHECKS; -SET SQL_MODE = @OLD_SQL_MODE; -SET SQL_NOTES = @OLD_SQL_NOTES; diff --git a/docs/templates.txt b/docs/templates.txt index b4ca279d4..fda56f651 100644 --- a/docs/templates.txt +++ b/docs/templates.txt @@ -1,6 +1,16 @@ This is a running list of template changes made during upgrades. If you have copied the default templates, you will need to apply these changes manually to your copies. +8.0 + + * Account Macro template variables renamed: + account.url => account_url + account.text => account_text + + * AdminToggle Macro template variables renamed: + toggle.url => toggle_url + toggle.text => toggle_text + 7.10.22 * Thingy CSS file - root/import/thingy-templates/thingy.css Add CSS to make sure that overflows are visible, to handle style that hide overflow by default. diff --git a/docs/upgrades/_upgrade.skeleton b/docs/upgrades/_upgrade.skeleton deleted file mode 100644 index a89ab3d63..000000000 --- a/docs/upgrades/_upgrade.skeleton +++ /dev/null @@ -1,123 +0,0 @@ -#!/usr/bin/env perl - -#------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. -#------------------------------------------------------------------- -# Please read the legal notices (docs/legal.txt) and the license -# (docs/license.txt) that came with this distribution before using -# this software. -#------------------------------------------------------------------- -# http://www.plainblack.com info@plainblack.com -#------------------------------------------------------------------- - -our ($webguiRoot); - -BEGIN { - $webguiRoot = "../.."; - unshift (@INC, $webguiRoot."/lib"); -} - -use strict; -use Getopt::Long; -use WebGUI::Session; -use WebGUI::Storage; -use WebGUI::Asset; - - -my $toVersion = "0.0.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 - - -#---------------------------------------------------------------------------- -# Describe what our function does -#sub exampleFunction { -# my $session = shift; -# print "\tWe're doing some stuff here that you should know about... " unless $quiet; -# # and here's our code -# print "DONE!\n" unless $quiet; -#} - - -# -------------- DO NOT EDIT BELOW THIS LINE -------------------------------- - -#---------------------------------------------------------------------------- -# Add a package to the import node -sub addPackage { - my $session = shift; - my $file = shift; - - print "\tUpgrading package $file\n" unless $quiet; - # Make a storage location for the package - my $storage = WebGUI::Storage->createTemp( $session ); - $storage->addFileFromFilesystem( $file ); - - # Import the package into the import node - my $package = eval { - my $node = WebGUI::Asset->getImportNode($session); - $node->importPackage( $storage, { - overwriteLatest => 1, - clearPackageFlag => 1, - setDefaultTemplate => 1, - } ); - }; - - if ($package eq 'corrupt') { - die "Corrupt package found in $file. Stopping upgrade.\n"; - } - if ($@ || !defined $package) { - die "Error during package import on $file: $@\nStopping upgrade\n."; - } - - return; -} - -#------------------------------------------------- -sub start { - my $configFile; - $|=1; #disable output buffering - GetOptions( - 'configFile=s'=>\$configFile, - 'quiet'=>\$quiet - ); - my $session = WebGUI::Session->open($webguiRoot,$configFile); - $session->user({userId=>3}); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->set({name=>"Upgrade to ".$toVersion}); - return $session; -} - -#------------------------------------------------- -sub finish { - my $session = shift; - updateTemplates($session); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->commit; - $session->db->write("insert into webguiVersion values (".$session->db->quote($toVersion).",'upgrade',".time().")"); - $session->close(); -} - -#------------------------------------------------- -sub updateTemplates { - my $session = shift; - return undef unless (-d "packages-".$toVersion); - print "\tUpdating packages.\n" unless ($quiet); - opendir(DIR,"packages-".$toVersion); - my @files = readdir(DIR); - closedir(DIR); - my $newFolder = undef; - foreach my $file (@files) { - next unless ($file =~ /\.wgpkg$/); - # Fix the filename to include a path - $file = "packages-" . $toVersion . "/" . $file; - addPackage( $session, $file ); - } -} - -#vim:ft=perl diff --git a/docs/upgrades/packages-7.10.0/asset-report_asset-report-default-template.wgpkg b/docs/upgrades/packages-7.10.0/asset-report_asset-report-default-template.wgpkg deleted file mode 100644 index 55388da89..000000000 Binary files a/docs/upgrades/packages-7.10.0/asset-report_asset-report-default-template.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.10.1/root_import_account_profile.wgpkg b/docs/upgrades/packages-7.10.1/root_import_account_profile.wgpkg deleted file mode 100644 index f609b3d3b..000000000 Binary files a/docs/upgrades/packages-7.10.1/root_import_account_profile.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.10.1/root_import_gallery-templates.wgpkg b/docs/upgrades/packages-7.10.1/root_import_gallery-templates.wgpkg deleted file mode 100644 index b8df8de83..000000000 Binary files a/docs/upgrades/packages-7.10.1/root_import_gallery-templates.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.10.1/root_import_storymanager_storytopic.wgpkg b/docs/upgrades/packages-7.10.1/root_import_storymanager_storytopic.wgpkg deleted file mode 100644 index bfd1d466e..000000000 Binary files a/docs/upgrades/packages-7.10.1/root_import_storymanager_storytopic.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.10.10/job_listing.wgpkg b/docs/upgrades/packages-7.10.10/job_listing.wgpkg deleted file mode 100644 index 7d8f7e399..000000000 Binary files a/docs/upgrades/packages-7.10.10/job_listing.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.10.11/templates_thingy-default-view-thing.wgpkg b/docs/upgrades/packages-7.10.11/templates_thingy-default-view-thing.wgpkg deleted file mode 100644 index 712fc387a..000000000 Binary files a/docs/upgrades/packages-7.10.11/templates_thingy-default-view-thing.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.10.12/image.wgpkg b/docs/upgrades/packages-7.10.12/image.wgpkg deleted file mode 100644 index b7865ddc7..000000000 Binary files a/docs/upgrades/packages-7.10.12/image.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.10.12/root_import_dashboard.wgpkg b/docs/upgrades/packages-7.10.12/root_import_dashboard.wgpkg deleted file mode 100644 index a80dcd47d..000000000 Binary files a/docs/upgrades/packages-7.10.12/root_import_dashboard.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.10.13/default_search2.wgpkg b/docs/upgrades/packages-7.10.13/default_search2.wgpkg deleted file mode 100644 index faee2be09..000000000 Binary files a/docs/upgrades/packages-7.10.13/default_search2.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.10.13/greenportal.wgpkg b/docs/upgrades/packages-7.10.13/greenportal.wgpkg deleted file mode 100644 index 51783d23d..000000000 Binary files a/docs/upgrades/packages-7.10.13/greenportal.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.10.13/root_import_carousel_carousel-default.wgpkg b/docs/upgrades/packages-7.10.13/root_import_carousel_carousel-default.wgpkg deleted file mode 100644 index edb86fb28..000000000 Binary files a/docs/upgrades/packages-7.10.13/root_import_carousel_carousel-default.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.10.13/style-underground.wgpkg b/docs/upgrades/packages-7.10.13/style-underground.wgpkg deleted file mode 100644 index 0d4c9e8e6..000000000 Binary files a/docs/upgrades/packages-7.10.13/style-underground.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.10.14/root_import_storymanager_editstory.wgpkg b/docs/upgrades/packages-7.10.14/root_import_storymanager_editstory.wgpkg deleted file mode 100644 index 5729a5db3..000000000 Binary files a/docs/upgrades/packages-7.10.14/root_import_storymanager_editstory.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.10.14/shopping-cart-collateral-items_email-receipt-default.wgpkg b/docs/upgrades/packages-7.10.14/shopping-cart-collateral-items_email-receipt-default.wgpkg deleted file mode 100644 index 1e15616b3..000000000 Binary files a/docs/upgrades/packages-7.10.14/shopping-cart-collateral-items_email-receipt-default.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.10.14/shopping-cart-collateral-items_my-purchases-detail-default.wgpkg b/docs/upgrades/packages-7.10.14/shopping-cart-collateral-items_my-purchases-detail-default.wgpkg deleted file mode 100644 index b83bef0bf..000000000 Binary files a/docs/upgrades/packages-7.10.14/shopping-cart-collateral-items_my-purchases-detail-default.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.10.15/home_map_map-templates.wgpkg b/docs/upgrades/packages-7.10.15/home_map_map-templates.wgpkg deleted file mode 100644 index e7cf69efb..000000000 Binary files a/docs/upgrades/packages-7.10.15/home_map_map-templates.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.10.15/root_import_gallery-templates_gallery.css.wgpkg b/docs/upgrades/packages-7.10.15/root_import_gallery-templates_gallery.css.wgpkg deleted file mode 100644 index 61bcaca76..000000000 Binary files a/docs/upgrades/packages-7.10.15/root_import_gallery-templates_gallery.css.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.10.18/default_forum_notification.wgpkg b/docs/upgrades/packages-7.10.18/default_forum_notification.wgpkg deleted file mode 100644 index aebd53790..000000000 Binary files a/docs/upgrades/packages-7.10.18/default_forum_notification.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.10.19/style-underground_top-navigation.wgpkg b/docs/upgrades/packages-7.10.19/style-underground_top-navigation.wgpkg deleted file mode 100644 index 96c6cc189..000000000 Binary files a/docs/upgrades/packages-7.10.19/style-underground_top-navigation.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.10.2/root_import_style.wgpkg b/docs/upgrades/packages-7.10.2/root_import_style.wgpkg deleted file mode 100644 index f1a4000a9..000000000 Binary files a/docs/upgrades/packages-7.10.2/root_import_style.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.10.21/default_forum_notification.wgpkg b/docs/upgrades/packages-7.10.21/default_forum_notification.wgpkg deleted file mode 100644 index 4c7c7afd8..000000000 Binary files a/docs/upgrades/packages-7.10.21/default_forum_notification.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.10.22/default_emsbadge.wgpkg b/docs/upgrades/packages-7.10.22/default_emsbadge.wgpkg deleted file mode 100644 index ad0fee1ac..000000000 Binary files a/docs/upgrades/packages-7.10.22/default_emsbadge.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.10.22/root_import_thingy-templates_thingy.css.wgpkg b/docs/upgrades/packages-7.10.22/root_import_thingy-templates_thingy.css.wgpkg deleted file mode 100644 index bbd08bc68..000000000 Binary files a/docs/upgrades/packages-7.10.22/root_import_thingy-templates_thingy.css.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.10.22/shopping-cart-collateral-items.wgpkg b/docs/upgrades/packages-7.10.22/shopping-cart-collateral-items.wgpkg deleted file mode 100644 index b48ee8eb8..000000000 Binary files a/docs/upgrades/packages-7.10.22/shopping-cart-collateral-items.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.10.23/shopping-cart-collateral-items_my-purchases-default.wgpkg b/docs/upgrades/packages-7.10.23/shopping-cart-collateral-items_my-purchases-default.wgpkg deleted file mode 100644 index dc14943b3..000000000 Binary files a/docs/upgrades/packages-7.10.23/shopping-cart-collateral-items_my-purchases-default.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.10.23/stockdatatmpl000000001.wgpkg b/docs/upgrades/packages-7.10.23/stockdatatmpl000000001.wgpkg deleted file mode 100644 index 77cf78f01..000000000 Binary files a/docs/upgrades/packages-7.10.23/stockdatatmpl000000001.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.10.24/root_import_calendar-templates_default-calendar-search.wgpkg b/docs/upgrades/packages-7.10.24/root_import_calendar-templates_default-calendar-search.wgpkg deleted file mode 100644 index 085d16cea..000000000 Binary files a/docs/upgrades/packages-7.10.24/root_import_calendar-templates_default-calendar-search.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.10.3/crystalx_crystalx_navigation.wgpkg b/docs/upgrades/packages-7.10.3/crystalx_crystalx_navigation.wgpkg deleted file mode 100644 index b1062cbec..000000000 Binary files a/docs/upgrades/packages-7.10.3/crystalx_crystalx_navigation.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.10.3/root_import_auth.wgpkg b/docs/upgrades/packages-7.10.3/root_import_auth.wgpkg deleted file mode 100644 index 21f95ac78..000000000 Binary files a/docs/upgrades/packages-7.10.3/root_import_auth.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.10.3/root_import_carousel_carousel-default.wgpkg b/docs/upgrades/packages-7.10.3/root_import_carousel_carousel-default.wgpkg deleted file mode 100644 index 5cec8f421..000000000 Binary files a/docs/upgrades/packages-7.10.3/root_import_carousel_carousel-default.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.10.3/root_import_survey_surveyedit.css.wgpkg b/docs/upgrades/packages-7.10.3/root_import_survey_surveyedit.css.wgpkg deleted file mode 100644 index 2ebe887b3..000000000 Binary files a/docs/upgrades/packages-7.10.3/root_import_survey_surveyedit.css.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.10.3/root_import_workflow-activity-templates.wgpkg b/docs/upgrades/packages-7.10.3/root_import_workflow-activity-templates.wgpkg deleted file mode 100644 index 31e32dc6a..000000000 Binary files a/docs/upgrades/packages-7.10.3/root_import_workflow-activity-templates.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.10.3/survey.css.wgpkg b/docs/upgrades/packages-7.10.3/survey.css.wgpkg deleted file mode 100644 index 0ef0ae2d9..000000000 Binary files a/docs/upgrades/packages-7.10.3/survey.css.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.10.4/default_email.wgpkg b/docs/upgrades/packages-7.10.4/default_email.wgpkg deleted file mode 100644 index 77ec09792..000000000 Binary files a/docs/upgrades/packages-7.10.4/default_email.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.10.4/root_import_ems_ems-badge-listing-default.wgpkg b/docs/upgrades/packages-7.10.4/root_import_ems_ems-badge-listing-default.wgpkg deleted file mode 100644 index da9b3d950..000000000 Binary files a/docs/upgrades/packages-7.10.4/root_import_ems_ems-badge-listing-default.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.10.5/root_import_account_friendmanager_edit.wgpkg b/docs/upgrades/packages-7.10.5/root_import_account_friendmanager_edit.wgpkg deleted file mode 100644 index 3dcb81cca..000000000 Binary files a/docs/upgrades/packages-7.10.5/root_import_account_friendmanager_edit.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.10.5/shopping-cart-collateral-items.wgpkg b/docs/upgrades/packages-7.10.5/shopping-cart-collateral-items.wgpkg deleted file mode 100644 index 023a2f9b0..000000000 Binary files a/docs/upgrades/packages-7.10.5/shopping-cart-collateral-items.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.10.7/data_list.wgpkg b/docs/upgrades/packages-7.10.7/data_list.wgpkg deleted file mode 100644 index c13b733db..000000000 Binary files a/docs/upgrades/packages-7.10.7/data_list.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.10.7/default-shopping-cart-template.wgpkg b/docs/upgrades/packages-7.10.7/default-shopping-cart-template.wgpkg deleted file mode 100644 index d684fba7f..000000000 Binary files a/docs/upgrades/packages-7.10.7/default-shopping-cart-template.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.10.7/home_map_map-templates_default-map-point-view.wgpkg b/docs/upgrades/packages-7.10.7/home_map_map-templates_default-map-point-view.wgpkg deleted file mode 100644 index 67c7e1f1a..000000000 Binary files a/docs/upgrades/packages-7.10.7/home_map_map-templates_default-map-point-view.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.10.7/root_import_calendar-templates_default-calendar-list-view.wgpkg b/docs/upgrades/packages-7.10.7/root_import_calendar-templates_default-calendar-list-view.wgpkg deleted file mode 100644 index f88764e91..000000000 Binary files a/docs/upgrades/packages-7.10.7/root_import_calendar-templates_default-calendar-list-view.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.10.8/root_import_account_friendmanager_view.wgpkg b/docs/upgrades/packages-7.10.8/root_import_account_friendmanager_view.wgpkg deleted file mode 100644 index 1f838ecad..000000000 Binary files a/docs/upgrades/packages-7.10.8/root_import_account_friendmanager_view.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.10.8/root_import_calendar-templates_default-calendar-event.wgpkg b/docs/upgrades/packages-7.10.8/root_import_calendar-templates_default-calendar-event.wgpkg deleted file mode 100644 index 45bf873f2..000000000 Binary files a/docs/upgrades/packages-7.10.8/root_import_calendar-templates_default-calendar-event.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.10.8/root_import_calendar-templates_default-calendar-list-view.wgpkg b/docs/upgrades/packages-7.10.8/root_import_calendar-templates_default-calendar-list-view.wgpkg deleted file mode 100644 index 1b059e2fe..000000000 Binary files a/docs/upgrades/packages-7.10.8/root_import_calendar-templates_default-calendar-list-view.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.10.8/root_import_default-eu-user-screen.wgpkg b/docs/upgrades/packages-7.10.8/root_import_default-eu-user-screen.wgpkg deleted file mode 100644 index d2de8f9ce..000000000 Binary files a/docs/upgrades/packages-7.10.8/root_import_default-eu-user-screen.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.10.9/style-underground.wgpkg b/docs/upgrades/packages-7.10.9/style-underground.wgpkg deleted file mode 100644 index 360a9c821..000000000 Binary files a/docs/upgrades/packages-7.10.9/style-underground.wgpkg and /dev/null differ diff --git a/docs/upgrades/packages-7.9.34-7.10.22/merged.wgpkg b/docs/upgrades/packages-7.9.34-7.10.22/merged.wgpkg deleted file mode 100644 index 58d5fa3c2..000000000 Binary files a/docs/upgrades/packages-7.9.34-7.10.22/merged.wgpkg and /dev/null differ diff --git a/docs/upgrades/upgrade_7.10.0-7.10.1.pl b/docs/upgrades/upgrade_7.10.0-7.10.1.pl deleted file mode 100644 index d9d3b54d2..000000000 --- a/docs/upgrades/upgrade_7.10.0-7.10.1.pl +++ /dev/null @@ -1,223 +0,0 @@ -#!/usr/bin/env perl - -#------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. -#------------------------------------------------------------------- -# Please read the legal notices (docs/legal.txt) and the license -# (docs/license.txt) that came with this distribution before using -# this software. -#------------------------------------------------------------------- -# http://www.plainblack.com info@plainblack.com -#------------------------------------------------------------------- - -our ($webguiRoot); - -BEGIN { - $webguiRoot = "../.."; - unshift (@INC, $webguiRoot."/lib"); -} - -use strict; -use Getopt::Long; -use WebGUI::Session; -use WebGUI::Storage; -use WebGUI::Asset; - - -my $toVersion = '7.10.1'; -my $quiet; # this line required - - -my $session = start(); # this line required - -# upgrade functions go here -uniqueProductLocations($session); -removeBadSpanishFile($session); -i18nForAddonsTitle($session); - -finish($session); # this line required - - -#---------------------------------------------------------------------------- -# Describe what our function does -sub uniqueProductLocations { - my $session = shift; - print "\tMake sure each Product revision has its own storage location... " unless $quiet; - use WebGUI::Asset::Sku::Product; - my $get_product = WebGUI::Asset::Sku::Product->getIsa($session); - # and here's our code - PRODUCT: while (1) { - my $product = eval { $get_product->(); }; - next PRODUCT if Exception::Class->caught(); - last PRODUCT unless $product; - next PRODUCT unless $product->getRevisionCount > 1; - my $products = $product->getRevisions; - ##We already have the first revision, so remove it. - shift @{ $products }; - foreach my $property (qw/image1 image2 image3 brochure manual warranty/) { - ##Check each property. If there's a duplicate, then make copy of the storage location and update the older version. - foreach my $revision (@{ $products }) { - if ($revision->get($property) eq $product->get($property)) { - $product->_duplicateFile($revision, $property,); - } - } - } - } - print "DONE!\n" unless $quiet; -} - -#---------------------------------------------------------------------------- -# This internationalizes the link text of the addons link in the adminconsole -sub i18nForAddonsTitle { - my $session = shift; - print "\tInternationalize the text of the addons link in the adminconsole... " unless $quiet; - $session->config->set('adminConsole/addons', - { - icon => "addons.png", - uiLevel => 1, - group => "12", - url => "http://www.webgui.org/addons", - title => "^International(Addons title,WebGUI);" - } - ); - print "DONE!\n" unless $quiet; -} -#---------------------------------------------------------------------------- -# Describe what our function does -sub removeBadSpanishFile { - my $session = shift; - print "\tRemove a bad Spanish translation file... " unless $quiet; - use File::Spec; - unlink File::Spec->catfile($webguiRoot, qw/lib WebGUi i18n Spanish .pm/); - # and here's our code - print "DONE!\n" unless $quiet; -} - -#---------------------------------------------------------------------------- -# Repack all templates since the packed columns may have been wiped out due to the bug. -sub repackTemplates { - my $session = shift; - - print "\tRepacking all templates, this may take a while..." unless $quiet; - my $sth = $session->db->read( "SELECT assetId, revisionDate FROM template" ); - while ( my ($assetId, $revisionDate) = $sth->array ) { - my $asset = WebGUI::Asset->newByDynamicClass( $session, $assetId, $revisionDate ); - next unless $asset; - $asset->update({ - template => $asset->get('template'), - }); - } - print "DONE!\n" unless $quiet; - - print "\tRepacking head tags in all assets, this may take a while..." unless $quiet; - $sth = $session->db->read( "SELECT assetId, revisionDate FROM assetData where usePackedHeadTags=1" ); - while ( my ($assetId, $revisionDate) = $sth->array ) { - my $asset = WebGUI::Asset->newByDynamicClass( $session, $assetId, $revisionDate ); - next unless $asset; - $asset->update({ - extraHeadTags => $asset->get('extraHeadTags'), - }); - } - print "DONE!\n" unless $quiet; - - print "\tRepacking all snippets, this may take a while..." unless $quiet; - $sth = $session->db->read( "SELECT assetId, revisionDate FROM snippet" ); - while ( my ($assetId, $revisionDate) = $sth->array ) { - my $asset = WebGUI::Asset->newByDynamicClass( $session, $assetId, $revisionDate ); - next unless $asset; - $asset->update({ - snippet => $asset->get('snippet'), - }); - } - - print "DONE!\n" unless $quiet; -} - - -#---------------------------------------------------------------------------- -# Describe what our function does -#sub exampleFunction { -# my $session = shift; -# print "\tWe're doing some stuff here that you should know about... " unless $quiet; -# # and here's our code -# print "DONE!\n" unless $quiet; -#} - - -# -------------- DO NOT EDIT BELOW THIS LINE -------------------------------- - -#---------------------------------------------------------------------------- -# Add a package to the import node -sub addPackage { - my $session = shift; - my $file = shift; - - print "\tUpgrading package $file\n" unless $quiet; - # Make a storage location for the package - my $storage = WebGUI::Storage->createTemp( $session ); - $storage->addFileFromFilesystem( $file ); - - # Import the package into the import node - my $package = eval { - my $node = WebGUI::Asset->getImportNode($session); - $node->importPackage( $storage, { - overwriteLatest => 1, - clearPackageFlag => 1, - setDefaultTemplate => 1, - } ); - }; - - if ($package eq 'corrupt') { - die "Corrupt package found in $file. Stopping upgrade.\n"; - } - if ($@ || !defined $package) { - die "Error during package import on $file: $@\nStopping upgrade\n."; - } - - return; -} - -#------------------------------------------------- -sub start { - my $configFile; - $|=1; #disable output buffering - GetOptions( - 'configFile=s'=>\$configFile, - 'quiet'=>\$quiet - ); - my $session = WebGUI::Session->open($webguiRoot,$configFile); - $session->user({userId=>3}); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->set({name=>"Upgrade to ".$toVersion}); - return $session; -} - -#------------------------------------------------- -sub finish { - my $session = shift; - updateTemplates($session); - repackTemplates( $session ); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->commit; - $session->db->write("insert into webguiVersion values (".$session->db->quote($toVersion).",'upgrade',".time().")"); - $session->close(); -} - -#------------------------------------------------- -sub updateTemplates { - my $session = shift; - return undef unless (-d "packages-".$toVersion); - print "\tUpdating packages.\n" unless ($quiet); - opendir(DIR,"packages-".$toVersion); - my @files = readdir(DIR); - closedir(DIR); - my $newFolder = undef; - foreach my $file (@files) { - next unless ($file =~ /\.wgpkg$/); - # Fix the filename to include a path - $file = "packages-" . $toVersion . "/" . $file; - addPackage( $session, $file ); - } -} - -#vim:ft=perl diff --git a/docs/upgrades/upgrade_7.10.1-7.10.2.pl b/docs/upgrades/upgrade_7.10.1-7.10.2.pl deleted file mode 100644 index 92698a6a4..000000000 --- a/docs/upgrades/upgrade_7.10.1-7.10.2.pl +++ /dev/null @@ -1,124 +0,0 @@ -#!/usr/bin/env perl - -#------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. -#------------------------------------------------------------------- -# Please read the legal notices (docs/legal.txt) and the license -# (docs/license.txt) that came with this distribution before using -# this software. -#------------------------------------------------------------------- -# http://www.plainblack.com info@plainblack.com -#------------------------------------------------------------------- - -our ($webguiRoot); - -BEGIN { - $webguiRoot = "../.."; - unshift (@INC, $webguiRoot."/lib"); -} - -use strict; -use Getopt::Long; -use WebGUI::Session; -use WebGUI::Storage; -use WebGUI::Asset; -use WebGUI::Inbox; - - -my $toVersion = '7.10.2'; -my $quiet; # this line required - - -my $session = start(); # this line required - -# upgrade functions go here - -finish($session); # this line required - - -#---------------------------------------------------------------------------- -# Describe what our function does -#sub exampleFunction { -# my $session = shift; -# print "\tWe're doing some stuff here that you should know about... " unless $quiet; -# # and here's our code -# print "DONE!\n" unless $quiet; -#} - - -# -------------- DO NOT EDIT BELOW THIS LINE -------------------------------- - -#---------------------------------------------------------------------------- -# Add a package to the import node -sub addPackage { - my $session = shift; - my $file = shift; - - print "\tUpgrading package $file\n" unless $quiet; - # Make a storage location for the package - my $storage = WebGUI::Storage->createTemp( $session ); - $storage->addFileFromFilesystem( $file ); - - # Import the package into the import node - my $package = eval { - my $node = WebGUI::Asset->getImportNode($session); - $node->importPackage( $storage, { - overwriteLatest => 1, - clearPackageFlag => 1, - setDefaultTemplate => 1, - } ); - }; - - if ($package eq 'corrupt') { - die "Corrupt package found in $file. Stopping upgrade.\n"; - } - if ($@ || !defined $package) { - die "Error during package import on $file: $@\nStopping upgrade\n."; - } - - return; -} - -#------------------------------------------------- -sub start { - my $configFile; - $|=1; #disable output buffering - GetOptions( - 'configFile=s'=>\$configFile, - 'quiet'=>\$quiet - ); - my $session = WebGUI::Session->open($webguiRoot,$configFile); - $session->user({userId=>3}); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->set({name=>"Upgrade to ".$toVersion}); - return $session; -} - -#------------------------------------------------- -sub finish { - my $session = shift; - updateTemplates($session); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->commit; - $session->db->write("insert into webguiVersion values (".$session->db->quote($toVersion).",'upgrade',".time().")"); - $session->close(); -} - -#------------------------------------------------- -sub updateTemplates { - my $session = shift; - return undef unless (-d "packages-".$toVersion); - print "\tUpdating packages.\n" unless ($quiet); - opendir(DIR,"packages-".$toVersion); - my @files = readdir(DIR); - closedir(DIR); - my $newFolder = undef; - foreach my $file (@files) { - next unless ($file =~ /\.wgpkg$/); - # Fix the filename to include a path - $file = "packages-" . $toVersion . "/" . $file; - addPackage( $session, $file ); - } -} - -#vim:ft=perl diff --git a/docs/upgrades/upgrade_7.10.10-7.10.11.pl b/docs/upgrades/upgrade_7.10.10-7.10.11.pl deleted file mode 100644 index 2c8305142..000000000 --- a/docs/upgrades/upgrade_7.10.10-7.10.11.pl +++ /dev/null @@ -1,123 +0,0 @@ -#!/usr/bin/env perl - -#------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. -#------------------------------------------------------------------- -# Please read the legal notices (docs/legal.txt) and the license -# (docs/license.txt) that came with this distribution before using -# this software. -#------------------------------------------------------------------- -# http://www.plainblack.com info@plainblack.com -#------------------------------------------------------------------- - -our ($webguiRoot); - -BEGIN { - $webguiRoot = "../.."; - unshift (@INC, $webguiRoot."/lib"); -} - -use strict; -use Getopt::Long; -use WebGUI::Session; -use WebGUI::Storage; -use WebGUI::Asset; - - -my $toVersion = '7.10.11'; -my $quiet; # this line required - - -my $session = start(); # this line required - -# upgrade functions go here - -finish($session); # this line required - - -#---------------------------------------------------------------------------- -# Describe what our function does -#sub exampleFunction { -# my $session = shift; -# print "\tWe're doing some stuff here that you should know about... " unless $quiet; -# # and here's our code -# print "DONE!\n" unless $quiet; -#} - - -# -------------- DO NOT EDIT BELOW THIS LINE -------------------------------- - -#---------------------------------------------------------------------------- -# Add a package to the import node -sub addPackage { - my $session = shift; - my $file = shift; - - print "\tUpgrading package $file\n" unless $quiet; - # Make a storage location for the package - my $storage = WebGUI::Storage->createTemp( $session ); - $storage->addFileFromFilesystem( $file ); - - # Import the package into the import node - my $package = eval { - my $node = WebGUI::Asset->getImportNode($session); - $node->importPackage( $storage, { - overwriteLatest => 1, - clearPackageFlag => 1, - setDefaultTemplate => 1, - } ); - }; - - if ($package eq 'corrupt') { - die "Corrupt package found in $file. Stopping upgrade.\n"; - } - if ($@ || !defined $package) { - die "Error during package import on $file: $@\nStopping upgrade\n."; - } - - return; -} - -#------------------------------------------------- -sub start { - my $configFile; - $|=1; #disable output buffering - GetOptions( - 'configFile=s'=>\$configFile, - 'quiet'=>\$quiet - ); - my $session = WebGUI::Session->open($webguiRoot,$configFile); - $session->user({userId=>3}); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->set({name=>"Upgrade to ".$toVersion}); - return $session; -} - -#------------------------------------------------- -sub finish { - my $session = shift; - updateTemplates($session); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->commit; - $session->db->write("insert into webguiVersion values (".$session->db->quote($toVersion).",'upgrade',".time().")"); - $session->close(); -} - -#------------------------------------------------- -sub updateTemplates { - my $session = shift; - return undef unless (-d "packages-".$toVersion); - print "\tUpdating packages.\n" unless ($quiet); - opendir(DIR,"packages-".$toVersion); - my @files = readdir(DIR); - closedir(DIR); - my $newFolder = undef; - foreach my $file (@files) { - next unless ($file =~ /\.wgpkg$/); - # Fix the filename to include a path - $file = "packages-" . $toVersion . "/" . $file; - addPackage( $session, $file ); - } -} - -#vim:ft=perl diff --git a/docs/upgrades/upgrade_7.10.11-7.10.12.pl b/docs/upgrades/upgrade_7.10.11-7.10.12.pl deleted file mode 100644 index 41e383391..000000000 --- a/docs/upgrades/upgrade_7.10.11-7.10.12.pl +++ /dev/null @@ -1,189 +0,0 @@ -#!/usr/bin/env perl - -#------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. -#------------------------------------------------------------------- -# Please read the legal notices (docs/legal.txt) and the license -# (docs/license.txt) that came with this distribution before using -# this software. -#------------------------------------------------------------------- -# http://www.plainblack.com info@plainblack.com -#------------------------------------------------------------------- - -our ($webguiRoot); - -BEGIN { - $webguiRoot = "../.."; - unshift (@INC, $webguiRoot."/lib"); -} - -use strict; -use Getopt::Long; -use WebGUI::Session; -use WebGUI::Storage; -use WebGUI::Asset; - - -my $toVersion = '7.10.12'; -my $quiet; # this line required - - -my $session = start(); # this line required - -# upgrade functions go here -installNewDashboardTables($session); -addStockDataCacheColumn($session); -addWeatherDataCacheColumn($session); -addLastModifiedByMacro($session); - - -finish($session); # this line required - - -#---------------------------------------------------------------------------- -# Describe what our function does -#sub exampleFunction { -# my $session = shift; -# print "\tWe're doing some stuff here that you should know about... " unless $quiet; -# # and here's our code -# print "DONE!\n" unless $quiet; -#} - -#---------------------------------------------------------------------------- -# Describe what our function does -sub addLastModifiedByMacro { - my $session = shift; - print "\tAdd LastModifiedBy macro to the config file... " unless $quiet; - # and here's our code - $session->config->addToHash('macros', 'LastModifiedBy', 'LastModifiedBy'); - print "DONE!\n" unless $quiet; -} - -#---------------------------------------------------------------------------- -# Describe what our function does -sub installNewDashboardTables { - my $session = shift; - print "\tInstall new Dashboard tables... " unless $quiet; - $session->db->write(<db->write(<db->write(<db->write(<createTemp( $session ); - $storage->addFileFromFilesystem( $file ); - - # Import the package into the import node - my $package = eval { - my $node = WebGUI::Asset->getImportNode($session); - $node->importPackage( $storage, { - overwriteLatest => 1, - clearPackageFlag => 1, - setDefaultTemplate => 1, - } ); - }; - - if ($package eq 'corrupt') { - die "Corrupt package found in $file. Stopping upgrade.\n"; - } - if ($@ || !defined $package) { - die "Error during package import on $file: $@\nStopping upgrade\n."; - } - - return; -} - -#------------------------------------------------- -sub start { - my $configFile; - $|=1; #disable output buffering - GetOptions( - 'configFile=s'=>\$configFile, - 'quiet'=>\$quiet - ); - my $session = WebGUI::Session->open($webguiRoot,$configFile); - $session->user({userId=>3}); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->set({name=>"Upgrade to ".$toVersion}); - return $session; -} - -#------------------------------------------------- -sub finish { - my $session = shift; - updateTemplates($session); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->commit; - $session->db->write("insert into webguiVersion values (".$session->db->quote($toVersion).",'upgrade',".time().")"); - $session->close(); -} - -#------------------------------------------------- -sub updateTemplates { - my $session = shift; - return undef unless (-d "packages-".$toVersion); - print "\tUpdating packages.\n" unless ($quiet); - opendir(DIR,"packages-".$toVersion); - my @files = readdir(DIR); - closedir(DIR); - my $newFolder = undef; - foreach my $file (@files) { - next unless ($file =~ /\.wgpkg$/); - # Fix the filename to include a path - $file = "packages-" . $toVersion . "/" . $file; - addPackage( $session, $file ); - } -} - -#vim:ft=perl diff --git a/docs/upgrades/upgrade_7.10.12-7.10.13.pl b/docs/upgrades/upgrade_7.10.12-7.10.13.pl deleted file mode 100644 index cb1f208eb..000000000 --- a/docs/upgrades/upgrade_7.10.12-7.10.13.pl +++ /dev/null @@ -1,165 +0,0 @@ -#!/usr/bin/env perl - -#------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. -#------------------------------------------------------------------- -# Please read the legal notices (docs/legal.txt) and the license -# (docs/license.txt) that came with this distribution before using -# this software. -#------------------------------------------------------------------- -# http://www.plainblack.com info@plainblack.com -#------------------------------------------------------------------- - -our ($webguiRoot); - -BEGIN { - $webguiRoot = "../.."; - unshift (@INC, $webguiRoot."/lib"); -} - -use strict; -use Getopt::Long; -use WebGUI::Session; -use WebGUI::Storage; -use WebGUI::Asset; - - -my $toVersion = '7.10.13'; -my $quiet; # this line required - - -my $session = start(); # this line required - -# upgrade functions go here -addAutoPlayToCarousel( $session ); -addProcessorDropdownToSnippet( $session ); - -finish($session); # this line required - - -#---------------------------------------------------------------------------- -# Describe what our function does -#sub exampleFunction { -# my $session = shift; -# print "\tWe're doing some stuff here that you should know about... " unless $quiet; -# # and here's our code -# print "DONE!\n" unless $quiet; -#} - -#---------------------------------------------------------------------------- -# Add AutoPlay fields to the Carousel -sub addAutoPlayToCarousel { - my $session = shift; - print "\tAdding Auto Play to Carousel... " unless $quiet; - $session->db->write( - "ALTER TABLE Carousel ADD COLUMN autoPlay INT, ADD COLUMN autoPlayInterval INT" - ); - print "DONE!\n" unless $quiet; -} - -#---------------------------------------------------------------------------- -sub addProcessorDropdownToSnippet { - my $session = shift; - my $db = $session->db; - print "\tUpdating the Snippet table to add templateProcessor option..." - unless $quiet; - - my $rows = $db->buildArrayRefOfHashRefs(q{ - select assetId, revisionDate from snippet where processAsTemplate = 1 - }); - - $db->write(q{ - alter table snippet - drop column processAsTemplate, - add column templateParser char(255) - }); - - my $default = $session->config->get('defaultTemplateParser'); - - for my $row (@$rows) { - $db->write(q{ - update snippet - set templateParser = ? - where assetId = ? and revisionDate = ? - }, [ $default, $row->{assetId}, $row->{revisionDate} ]); - } - - print "Done!\n"; -} - -# -------------- DO NOT EDIT BELOW THIS LINE -------------------------------- - -#---------------------------------------------------------------------------- -# Add a package to the import node -sub addPackage { - my $session = shift; - my $file = shift; - - print "\tUpgrading package $file\n" unless $quiet; - # Make a storage location for the package - my $storage = WebGUI::Storage->createTemp( $session ); - $storage->addFileFromFilesystem( $file ); - - # Import the package into the import node - my $package = eval { - my $node = WebGUI::Asset->getImportNode($session); - $node->importPackage( $storage, { - overwriteLatest => 1, - clearPackageFlag => 1, - setDefaultTemplate => 1, - } ); - }; - - if ($package eq 'corrupt') { - die "Corrupt package found in $file. Stopping upgrade.\n"; - } - if ($@ || !defined $package) { - die "Error during package import on $file: $@\nStopping upgrade\n."; - } - - return; -} - -#------------------------------------------------- -sub start { - my $configFile; - $|=1; #disable output buffering - GetOptions( - 'configFile=s'=>\$configFile, - 'quiet'=>\$quiet - ); - my $session = WebGUI::Session->open($webguiRoot,$configFile); - $session->user({userId=>3}); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->set({name=>"Upgrade to ".$toVersion}); - return $session; -} - -#------------------------------------------------- -sub finish { - my $session = shift; - updateTemplates($session); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->commit; - $session->db->write("insert into webguiVersion values (".$session->db->quote($toVersion).",'upgrade',".time().")"); - $session->close(); -} - -#------------------------------------------------- -sub updateTemplates { - my $session = shift; - return undef unless (-d "packages-".$toVersion); - print "\tUpdating packages.\n" unless ($quiet); - opendir(DIR,"packages-".$toVersion); - my @files = readdir(DIR); - closedir(DIR); - my $newFolder = undef; - foreach my $file (@files) { - next unless ($file =~ /\.wgpkg$/); - # Fix the filename to include a path - $file = "packages-" . $toVersion . "/" . $file; - addPackage( $session, $file ); - } -} - -#vim:ft=perl diff --git a/docs/upgrades/upgrade_7.10.13-7.10.14.pl b/docs/upgrades/upgrade_7.10.13-7.10.14.pl deleted file mode 100644 index 69a519076..000000000 --- a/docs/upgrades/upgrade_7.10.13-7.10.14.pl +++ /dev/null @@ -1,191 +0,0 @@ -#!/usr/bin/env perl - -#------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. -#------------------------------------------------------------------- -# Please read the legal notices (docs/legal.txt) and the license -# (docs/license.txt) that came with this distribution before using -# this software. -#------------------------------------------------------------------- -# http://www.plainblack.com info@plainblack.com -#------------------------------------------------------------------- - -our ($webguiRoot); - -BEGIN { - $webguiRoot = "../.."; - unshift (@INC, $webguiRoot."/lib"); -} - -use strict; -use Getopt::Long; -use WebGUI::Session; -use WebGUI::Storage; -use WebGUI::Asset; -use WebGUI::Asset::Wobject::Calendar; - - -my $toVersion = '7.10.14'; -my $quiet; # this line required - - -my $session = start(); # this line required - -# upgrade functions go here -addOrganizationsToTransaction($session); -removeDuplicateUndergroundStyleTemplates($session); -addRichEditToCarousel($session); -fixBadCalendarFeedStatus($session); - -finish($session); # this line required - - -#---------------------------------------------------------------------------- -# Describe what our function does -#sub exampleFunction { -# my $session = shift; -# print "\tWe're doing some stuff here that you should know about... " unless $quiet; -# # and here's our code -# print "DONE!\n" unless $quiet; -#} - - -#---------------------------------------------------------------------------- -# Describe what our function does -sub fixBadCalendarFeedStatus { - my $session = shift; - print "\tFix the name of the iCal status field in all Calendar assets... " unless $quiet; - # and here's our code - my $fetch_calendar = WebGUI::Asset::Wobject::Calendar->getIsa($session); - my $sth = $session->db->read('select assetId, revisionDate from Calendar'); - CALENDAR: while (my ($assetId, $revisionDate) = $sth->array) { - my $calendar = eval {WebGUI::Asset->new($session, $assetId, 'WebGUI::Asset::Wobject::Calendar', $revisionDate)}; - next CALENDAR if !$calendar; - FEED: foreach my $feed ( @{ $calendar->getFeeds } ) { - my $status = delete $feed->{status}; - if (!exists $feed->{lastResult}) { - $feed->{lastResult} = $status; - } - if (!exists $feed->{lastUpdated}) { - $feed->{lastUpdated} = 'never'; - } - $calendar->setFeed($feed->{feedId}, $feed); - } - } - $sth->finish; - print "DONE!\n" unless $quiet; -} - -#---------------------------------------------------------------------------- -# Describe what our function does -sub addOrganizationsToTransaction { - my $session = shift; - print "\tAdd organization fields to the addresses stored in the Transaction and TransactionItem... " unless $quiet; - # and here's our code - $session->db->write('ALTER TABLE transaction ADD COLUMN shippingOrganization CHAR(35)'); - $session->db->write('ALTER TABLE transaction ADD COLUMN paymentOrganization CHAR(35)'); - $session->db->write('ALTER TABLE transactionItem ADD COLUMN shippingOrganization CHAR(35)'); - print "DONE!\n" unless $quiet; -} - -#---------------------------------------------------------------------------- -# Describe what our function does -sub removeDuplicateUndergroundStyleTemplates { - my $session = shift; - print "\tRemove duplicate Underground Style templatess that were mistakenly added during the 7.10.13 upgrade... " unless $quiet; - # and here's our code - ASSETID: foreach my $assetId(qw/IeFioyemW2Ov-hFGFwD75A niYg8Da1sULTQnevZ8wYpw/) { - my $asset = WebGUI::Asset->newByDynamicClass($session, $assetId); - next ASSETID unless $asset; - $asset->purge; ##Kill it, crush it, grind its bits into dust. - } - print "DONE!\n" unless $quiet; -} - -#---------------------------------------------------------------------------- -# Describe what our function does -sub addRichEditToCarousel { - my $session = shift; - print "\tAdd RichEdit option to the Carousel... " unless $quiet; - # and here's our code - $session->db->write('ALTER TABLE Carousel ADD COLUMN richEditor CHAR(22) BINARY'); - $session->db->write(q!update Carousel set richEditor='PBrichedit000000000001'!); - print "DONE!\n" unless $quiet; -} - -# -------------- DO NOT EDIT BELOW THIS LINE -------------------------------- - -#---------------------------------------------------------------------------- -# Add a package to the import node -sub addPackage { - my $session = shift; - my $file = shift; - - print "\tUpgrading package $file\n" unless $quiet; - # Make a storage location for the package - my $storage = WebGUI::Storage->createTemp( $session ); - $storage->addFileFromFilesystem( $file ); - - # Import the package into the import node - my $package = eval { - my $node = WebGUI::Asset->getImportNode($session); - $node->importPackage( $storage, { - overwriteLatest => 1, - clearPackageFlag => 1, - setDefaultTemplate => 1, - } ); - }; - - if ($package eq 'corrupt') { - die "Corrupt package found in $file. Stopping upgrade.\n"; - } - if ($@ || !defined $package) { - die "Error during package import on $file: $@\nStopping upgrade\n."; - } - - return; -} - -#------------------------------------------------- -sub start { - my $configFile; - $|=1; #disable output buffering - GetOptions( - 'configFile=s'=>\$configFile, - 'quiet'=>\$quiet - ); - my $session = WebGUI::Session->open($webguiRoot,$configFile); - $session->user({userId=>3}); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->set({name=>"Upgrade to ".$toVersion}); - return $session; -} - -#------------------------------------------------- -sub finish { - my $session = shift; - updateTemplates($session); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->commit; - $session->db->write("insert into webguiVersion values (".$session->db->quote($toVersion).",'upgrade',".time().")"); - $session->close(); -} - -#------------------------------------------------- -sub updateTemplates { - my $session = shift; - return undef unless (-d "packages-".$toVersion); - print "\tUpdating packages.\n" unless ($quiet); - opendir(DIR,"packages-".$toVersion); - my @files = readdir(DIR); - closedir(DIR); - my $newFolder = undef; - foreach my $file (@files) { - next unless ($file =~ /\.wgpkg$/); - # Fix the filename to include a path - $file = "packages-" . $toVersion . "/" . $file; - addPackage( $session, $file ); - } -} - -#vim:ft=perl diff --git a/docs/upgrades/upgrade_7.10.14-7.10.15.pl b/docs/upgrades/upgrade_7.10.14-7.10.15.pl deleted file mode 100644 index ec2d3cc2a..000000000 --- a/docs/upgrades/upgrade_7.10.14-7.10.15.pl +++ /dev/null @@ -1,160 +0,0 @@ -#!/usr/bin/env perl - -#------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. -#------------------------------------------------------------------- -# Please read the legal notices (docs/legal.txt) and the license -# (docs/license.txt) that came with this distribution before using -# this software. -#------------------------------------------------------------------- -# http://www.plainblack.com info@plainblack.com -#------------------------------------------------------------------- - -our ($webguiRoot); - -BEGIN { - $webguiRoot = "../.."; - unshift (@INC, $webguiRoot."/lib"); -} - -use strict; -use Getopt::Long; -use WebGUI::Session; -use WebGUI::Storage; -use WebGUI::Asset; -use WebGUI::AssetAspect::Installable; -use WebGUI::Asset::MapPoint; -use WebGUI::Asset::Wobject::Thingy; - -my $toVersion = '7.10.15'; -my $quiet; # this line required - - -my $session = start(); # this line required - -# upgrade functions go here -alterAssetIndexTable($session); -reindexAllThingys($session); -WebGUI::AssetAspect::Installable::upgrade("WebGUI::Asset::MapPoint",$session); -addRenderThingDataMacro($session); - -finish($session); # this line required - - -#---------------------------------------------------------------------------- -# Describe what our function does -#sub exampleFunction { -# my $session = shift; -# print "\tWe're doing some stuff here that you should know about... " unless $quiet; -# # and here's our code -# print "DONE!\n" unless $quiet; -#} - -sub addRenderThingDataMacro { - my $session = shift; - print "\tAdd the new RenderThingData macro to the site config... " unless $quiet; - $session->config->addToHash('macros', 'RenderThingData', 'RenderThingData'); - print "DONE!\n" unless $quiet; -} - -sub alterAssetIndexTable { - my $session = shift; - print "\tExtend the assetIndex table so we can search things other than assets... " unless $quiet; - $session->db->write(<getIsa($session); - THINGY: while (1) { - my $thingy = eval { $get_thingy->() }; - next THINGY if Exception::Class->caught(); - last THINGY unless $thingy; - $thingy->indexContent; - } - print "DONE!\n" unless $quiet; -} - -# -------------- DO NOT EDIT BELOW THIS LINE -------------------------------- - -#---------------------------------------------------------------------------- -# Add a package to the import node -sub addPackage { - my $session = shift; - my $file = shift; - - print "\tUpgrading package $file\n" unless $quiet; - # Make a storage location for the package - my $storage = WebGUI::Storage->createTemp( $session ); - $storage->addFileFromFilesystem( $file ); - - # Import the package into the import node - my $package = eval { - my $node = WebGUI::Asset->getImportNode($session); - $node->importPackage( $storage, { - overwriteLatest => 1, - clearPackageFlag => 1, - setDefaultTemplate => 1, - } ); - }; - - if ($package eq 'corrupt') { - die "Corrupt package found in $file. Stopping upgrade.\n"; - } - if ($@ || !defined $package) { - die "Error during package import on $file: $@\nStopping upgrade\n."; - } - - return; -} - -#------------------------------------------------- -sub start { - my $configFile; - $|=1; #disable output buffering - GetOptions( - 'configFile=s'=>\$configFile, - 'quiet'=>\$quiet - ); - my $session = WebGUI::Session->open($webguiRoot,$configFile); - $session->user({userId=>3}); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->set({name=>"Upgrade to ".$toVersion}); - return $session; -} - -#------------------------------------------------- -sub finish { - my $session = shift; - updateTemplates($session); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->commit; - $session->db->write("insert into webguiVersion values (".$session->db->quote($toVersion).",'upgrade',".time().")"); - $session->close(); -} - -#------------------------------------------------- -sub updateTemplates { - my $session = shift; - return undef unless (-d "packages-".$toVersion); - print "\tUpdating packages.\n" unless ($quiet); - opendir(DIR,"packages-".$toVersion); - my @files = readdir(DIR); - closedir(DIR); - my $newFolder = undef; - foreach my $file (@files) { - next unless ($file =~ /\.wgpkg$/); - # Fix the filename to include a path - $file = "packages-" . $toVersion . "/" . $file; - addPackage( $session, $file ); - } -} - -#vim:ft=perl diff --git a/docs/upgrades/upgrade_7.10.15-7.10.16.pl b/docs/upgrades/upgrade_7.10.15-7.10.16.pl deleted file mode 100644 index 819a0511d..000000000 --- a/docs/upgrades/upgrade_7.10.15-7.10.16.pl +++ /dev/null @@ -1,135 +0,0 @@ -#!/usr/bin/env perl - -#------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. -#------------------------------------------------------------------- -# Please read the legal notices (docs/legal.txt) and the license -# (docs/license.txt) that came with this distribution before using -# this software. -#------------------------------------------------------------------- -# http://www.plainblack.com info@plainblack.com -#------------------------------------------------------------------- - -our ($webguiRoot); - -BEGIN { - $webguiRoot = "../.."; - unshift (@INC, $webguiRoot."/lib"); -} - -use strict; -use Getopt::Long; -use WebGUI::Session; -use WebGUI::Storage; -use WebGUI::Asset; - - -my $toVersion = '7.10.16'; -my $quiet; # this line required - - -my $session = start(); # this line required - -# upgrade functions go here -addAssetPropertyMacro($session); - -finish($session); # this line required - - -#---------------------------------------------------------------------------- -# Describe what our function does -#sub exampleFunction { -# my $session = shift; -# print "\tWe're doing some stuff here that you should know about... " unless $quiet; -# # and here's our code -# print "DONE!\n" unless $quiet; -#} - -#---------------------------------------------------------------------------- -sub addAssetPropertyMacro { - my $session = shift; - my $c = $session->config; - my $hash = $c->get('macros'); - unless (grep { $_ eq 'AssetProperty' } values %$hash) { - print "\tAdding AssetProperty macro... " unless $quiet; - $c->set('macros/AssetProperty' => 'AssetProperty'); - print "DONE!\n" unless $quiet; - } -} - -# -------------- DO NOT EDIT BELOW THIS LINE -------------------------------- - -#---------------------------------------------------------------------------- -# Add a package to the import node -sub addPackage { - my $session = shift; - my $file = shift; - - print "\tUpgrading package $file\n" unless $quiet; - # Make a storage location for the package - my $storage = WebGUI::Storage->createTemp( $session ); - $storage->addFileFromFilesystem( $file ); - - # Import the package into the import node - my $package = eval { - my $node = WebGUI::Asset->getImportNode($session); - $node->importPackage( $storage, { - overwriteLatest => 1, - clearPackageFlag => 1, - setDefaultTemplate => 1, - } ); - }; - - if ($package eq 'corrupt') { - die "Corrupt package found in $file. Stopping upgrade.\n"; - } - if ($@ || !defined $package) { - die "Error during package import on $file: $@\nStopping upgrade\n."; - } - - return; -} - -#------------------------------------------------- -sub start { - my $configFile; - $|=1; #disable output buffering - GetOptions( - 'configFile=s'=>\$configFile, - 'quiet'=>\$quiet - ); - my $session = WebGUI::Session->open($webguiRoot,$configFile); - $session->user({userId=>3}); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->set({name=>"Upgrade to ".$toVersion}); - return $session; -} - -#------------------------------------------------- -sub finish { - my $session = shift; - updateTemplates($session); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->commit; - $session->db->write("insert into webguiVersion values (".$session->db->quote($toVersion).",'upgrade',".time().")"); - $session->close(); -} - -#------------------------------------------------- -sub updateTemplates { - my $session = shift; - return undef unless (-d "packages-".$toVersion); - print "\tUpdating packages.\n" unless ($quiet); - opendir(DIR,"packages-".$toVersion); - my @files = readdir(DIR); - closedir(DIR); - my $newFolder = undef; - foreach my $file (@files) { - next unless ($file =~ /\.wgpkg$/); - # Fix the filename to include a path - $file = "packages-" . $toVersion . "/" . $file; - addPackage( $session, $file ); - } -} - -#vim:ft=perl diff --git a/docs/upgrades/upgrade_7.10.16-7.10.17.pl b/docs/upgrades/upgrade_7.10.16-7.10.17.pl deleted file mode 100644 index 3ef4b22e7..000000000 --- a/docs/upgrades/upgrade_7.10.16-7.10.17.pl +++ /dev/null @@ -1,139 +0,0 @@ -#!/usr/bin/env perl - -#------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. -#------------------------------------------------------------------- -# Please read the legal notices (docs/legal.txt) and the license -# (docs/license.txt) that came with this distribution before using -# this software. -#------------------------------------------------------------------- -# http://www.plainblack.com info@plainblack.com -#------------------------------------------------------------------- - -our ($webguiRoot); - -BEGIN { - $webguiRoot = "../.."; - unshift (@INC, $webguiRoot."/lib"); -} - -use strict; -use Getopt::Long; -use WebGUI::Session; -use WebGUI::Storage; -use WebGUI::Asset; - - -my $toVersion = '7.10.17'; -my $quiet; # this line required - - -my $session = start(); # this line required - -# upgrade functions go here -createThingyDBColumns($session); - -finish($session); # this line required - - -#---------------------------------------------------------------------------- -# Describe what our function does -#sub exampleFunction { -# my $session = shift; -# print "\tWe're doing some stuff here that you should know about... " unless $quiet; -# # and here's our code -# print "DONE!\n" unless $quiet; -#} - -#---------------------------------------------------------------------------- -# Creates new column in tables for Thingy_fields and Thingy_things -sub createThingyDBColumns { - my $session = shift; - print "\tAdding db. columns Thingy_fields.isUnique and Thingy_things.maxEntriesTotal.." unless $quiet; - # and here's our code - - my %tfHash = $session->db->quickHash("show columns from Thingy_fields where Field='isUnique'"); - my %ttHash = $session->db->quickHash("show columns from Thingy_things where Field='maxEntriesTotal'"); - - unless ( $tfHash{'Field'}) { $session->db->write("alter table Thingy_fields add isUnique int(1) default 0"); } - unless ( $ttHash{'Field'}) { $session->db->write("alter table Thingy_things add maxEntriesTotal int default null"); } - - print "DONE!\n" unless $quiet; -} - -# -------------- DO NOT EDIT BELOW THIS LINE -------------------------------- - -#---------------------------------------------------------------------------- -# Add a package to the import node -sub addPackage { - my $session = shift; - my $file = shift; - - print "\tUpgrading package $file\n" unless $quiet; - # Make a storage location for the package - my $storage = WebGUI::Storage->createTemp( $session ); - $storage->addFileFromFilesystem( $file ); - - # Import the package into the import node - my $package = eval { - my $node = WebGUI::Asset->getImportNode($session); - $node->importPackage( $storage, { - overwriteLatest => 1, - clearPackageFlag => 1, - setDefaultTemplate => 1, - } ); - }; - - if ($package eq 'corrupt') { - die "Corrupt package found in $file. Stopping upgrade.\n"; - } - if ($@ || !defined $package) { - die "Error during package import on $file: $@\nStopping upgrade\n."; - } - - return; -} - -#------------------------------------------------- -sub start { - my $configFile; - $|=1; #disable output buffering - GetOptions( - 'configFile=s'=>\$configFile, - 'quiet'=>\$quiet - ); - my $session = WebGUI::Session->open($webguiRoot,$configFile); - $session->user({userId=>3}); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->set({name=>"Upgrade to ".$toVersion}); - return $session; -} - -#------------------------------------------------- -sub finish { - my $session = shift; - updateTemplates($session); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->commit; - $session->db->write("insert into webguiVersion values (".$session->db->quote($toVersion).",'upgrade',".time().")"); - $session->close(); -} - -#------------------------------------------------- -sub updateTemplates { - my $session = shift; - return undef unless (-d "packages-".$toVersion); - print "\tUpdating packages.\n" unless ($quiet); - opendir(DIR,"packages-".$toVersion); - my @files = readdir(DIR); - closedir(DIR); - my $newFolder = undef; - foreach my $file (@files) { - next unless ($file =~ /\.wgpkg$/); - # Fix the filename to include a path - $file = "packages-" . $toVersion . "/" . $file; - addPackage( $session, $file ); - } -} - -#vim:ft=perl diff --git a/docs/upgrades/upgrade_7.10.17-7.10.18.pl b/docs/upgrades/upgrade_7.10.17-7.10.18.pl deleted file mode 100644 index bfb99781f..000000000 --- a/docs/upgrades/upgrade_7.10.17-7.10.18.pl +++ /dev/null @@ -1,172 +0,0 @@ -#!/usr/bin/env perl - -#------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. -#------------------------------------------------------------------- -# Please read the legal notices (docs/legal.txt) and the license -# (docs/license.txt) that came with this distribution before using -# this software. -#------------------------------------------------------------------- -# http://www.plainblack.com info@plainblack.com -#------------------------------------------------------------------- - -our ($webguiRoot); - -BEGIN { - $webguiRoot = "../.."; - unshift (@INC, $webguiRoot."/lib"); -} - -use strict; -use Getopt::Long; -use WebGUI::Session; -use WebGUI::Storage; -use WebGUI::Asset; - - -my $toVersion = '7.10.18'; -my $quiet; # this line required - - -my $session = start(); # this line required - -# upgrade functions go here -addAssetManagerSortPreferences($session); - -finish($session); # this line required - - -#---------------------------------------------------------------------------- -sub addAssetManagerSortPreferences { - my $cn = 'assetManagerSortColumn'; - my $on = 'assetManagerSortDirection'; - unless (WebGUI::ProfileField->new($session, $cn)) { - print 'Adding Asset Manager Sort Column profile field...' - unless $quiet; - - WebGUI::ProfileField->create($session, $cn => { - label => - "WebGUI::International::get('$cn label', 'Account_Profile')", - protected => 1, - fieldType => 'selectBox', - dataDefault => 'lineage', - possibleValues => <<'VALUES', -{ - lineage => WebGUI::International::get('rank', 'Asset'), - title => WebGUI::International::get(99, 'Asset'), - className => WebGUI::International::get('type', 'Asset'), - revisionDate => WebGUI::International::get('revision date', 'Asset'), - assetSize => WebGUI::International::get('size', 'Asset'), - lockedBy => WebGUI::International::get('locked', 'Asset'), -} -VALUES - }, 4); - print "Done!\n" unless $quiet; - } - unless (WebGUI::ProfileField->new($session, $on)) { - print 'Adding Asset Manager Sort Direction profile field...' - unless $quiet; - - WebGUI::ProfileField->create($session, $on => { - label => - "WebGUI::International::get('$on label', 'Account_Profile')", - protected => 1, - fieldType => 'selectBox', - dataDefault => 'asc', - possibleValues => <<'VALUES', -{ - asc => WebGUI::International::get('ascending', 'Account_Profile'), - desc => WebGUI::International::get('descending', 'Account_Profile'), -} -VALUES - }, 4); - print "Done!\n" unless $quiet; - } -} - -#---------------------------------------------------------------------------- -# Describe what our function does -#sub exampleFunction { -# my $session = shift; -# print "\tWe're doing some stuff here that you should know about... " unless $quiet; -# # and here's our code -# print "DONE!\n" unless $quiet; -#} - - -# -------------- DO NOT EDIT BELOW THIS LINE -------------------------------- - -#---------------------------------------------------------------------------- -# Add a package to the import node -sub addPackage { - my $session = shift; - my $file = shift; - - print "\tUpgrading package $file\n" unless $quiet; - # Make a storage location for the package - my $storage = WebGUI::Storage->createTemp( $session ); - $storage->addFileFromFilesystem( $file ); - - # Import the package into the import node - my $package = eval { - my $node = WebGUI::Asset->getImportNode($session); - $node->importPackage( $storage, { - overwriteLatest => 1, - clearPackageFlag => 1, - setDefaultTemplate => 1, - } ); - }; - - if ($package eq 'corrupt') { - die "Corrupt package found in $file. Stopping upgrade.\n"; - } - if ($@ || !defined $package) { - die "Error during package import on $file: $@\nStopping upgrade\n."; - } - - return; -} - -#------------------------------------------------- -sub start { - my $configFile; - $|=1; #disable output buffering - GetOptions( - 'configFile=s'=>\$configFile, - 'quiet'=>\$quiet - ); - my $session = WebGUI::Session->open($webguiRoot,$configFile); - $session->user({userId=>3}); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->set({name=>"Upgrade to ".$toVersion}); - return $session; -} - -#------------------------------------------------- -sub finish { - my $session = shift; - updateTemplates($session); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->commit; - $session->db->write("insert into webguiVersion values (".$session->db->quote($toVersion).",'upgrade',".time().")"); - $session->close(); -} - -#------------------------------------------------- -sub updateTemplates { - my $session = shift; - return undef unless (-d "packages-".$toVersion); - print "\tUpdating packages.\n" unless ($quiet); - opendir(DIR,"packages-".$toVersion); - my @files = readdir(DIR); - closedir(DIR); - my $newFolder = undef; - foreach my $file (@files) { - next unless ($file =~ /\.wgpkg$/); - # Fix the filename to include a path - $file = "packages-" . $toVersion . "/" . $file; - addPackage( $session, $file ); - } -} - -#vim:ft=perl diff --git a/docs/upgrades/upgrade_7.10.18-7.10.19.pl b/docs/upgrades/upgrade_7.10.18-7.10.19.pl deleted file mode 100644 index c592aaa48..000000000 --- a/docs/upgrades/upgrade_7.10.18-7.10.19.pl +++ /dev/null @@ -1,177 +0,0 @@ -#!/usr/bin/env perl - -#------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. -#------------------------------------------------------------------- -# Please read the legal notices (docs/legal.txt) and the license -# (docs/license.txt) that came with this distribution before using -# this software. -#------------------------------------------------------------------- -# http://www.plainblack.com info@plainblack.com -#------------------------------------------------------------------- - -our ($webguiRoot); - -BEGIN { - $webguiRoot = "../.."; - unshift (@INC, $webguiRoot."/lib"); -} - -use strict; -use Getopt::Long; -use WebGUI::Session; -use WebGUI::Storage; -use WebGUI::Asset; -use WebGUI::Asset::Wobject::Calendar; -use Exception::Class; - - -my $toVersion = '7.10.19'; -my $quiet; # this line required - - -my $session = start(); # this line required - -# upgrade functions go here -addTicketLimitToBadgeGroup( $session ); -fixBrokenCalendarFeedUrls ( $session ); -removeUndergroundUserStyleTemplate ( $session ); - -finish($session); # this line required - - -#---------------------------------------------------------------------------- -# Describe what our function does -#sub exampleFunction { -# my $session = shift; -# print "\tWe're doing some stuff here that you should know about... " unless $quiet; -# # and here's our code -# print "DONE!\n" unless $quiet; -#} - - -# Fix calendar feed urls that had adminId attached to them until they blew up -sub fixBrokenCalendarFeedUrls { - my $session = shift; - print "\tChecking all calendar feed URLs for adminId brokenness... " unless $quiet; - my $getCalendar = WebGUI::Asset::Wobject::Calendar->getIsa($session); - CALENDAR: while (1) { - my $calendar = eval { $getCalendar->(); }; - next CALENDAR if Exception::Class->caught; - last CALENDAR unless $calendar; - FEED: foreach my $feed (@{ $calendar->getFeeds }) { - $feed->{url} =~ s/adminId=[^;]{22};?//g; - $feed->{url} =~ s/\?$//; - $calendar->setFeed($feed->{feedId}, $feed); - } - } - print "DONE!\n" unless $quiet; -} - -#---------------------------------------------------------------------------- -# Add a ticket limit to badges in a badge group -sub removeUndergroundUserStyleTemplate { - my $session = shift; - print "\tRemove Underground User Style template... " unless $quiet; - if ($session->setting->get('userFunctionStyleId') eq 'zfDnOJgeiybz9vnmoEXRXA') { - $session->setting->set('userFunctionStyleId', 'Qk24uXao2yowR6zxbVJ0xA'); - } - my $underground_user = WebGUI::Asset->newByDynamicClass($session, 'zfDnOJgeiybz9vnmoEXRXA'); - if ($underground_user) { - $underground_user->purge; - } - print "DONE!\n" unless $quiet; -} - -#---------------------------------------------------------------------------- -# Add a ticket limit to badges in a badge group -sub addTicketLimitToBadgeGroup { - my $session = shift; - print "\tAdd ticket limit to badge groups... " unless $quiet; - # Make sure it hasn't been done already... - my $columns = $session->db->buildHashRef('describe EMSBadgeGroup'); - use List::MoreUtils qw(any); - if(!any { $_ eq 'ticketsPerBadge' } keys %{$columns}) { - $session->db->write(q{ - ALTER TABLE EMSBadgeGroup ADD COLUMN `ticketsPerBadge` INTEGER - }); - } - print "DONE!\n" unless $quiet; -} - -# -------------- DO NOT EDIT BELOW THIS LINE -------------------------------- - -#---------------------------------------------------------------------------- -# Add a package to the import node -sub addPackage { - my $session = shift; - my $file = shift; - - print "\tUpgrading package $file\n" unless $quiet; - # Make a storage location for the package - my $storage = WebGUI::Storage->createTemp( $session ); - $storage->addFileFromFilesystem( $file ); - - # Import the package into the import node - my $package = eval { - my $node = WebGUI::Asset->getImportNode($session); - $node->importPackage( $storage, { - overwriteLatest => 1, - clearPackageFlag => 1, - setDefaultTemplate => 1, - } ); - }; - - if ($package eq 'corrupt') { - die "Corrupt package found in $file. Stopping upgrade.\n"; - } - if ($@ || !defined $package) { - die "Error during package import on $file: $@\nStopping upgrade\n."; - } - - return; -} - -#------------------------------------------------- -sub start { - my $configFile; - $|=1; #disable output buffering - GetOptions( - 'configFile=s'=>\$configFile, - 'quiet'=>\$quiet - ); - my $session = WebGUI::Session->open($webguiRoot,$configFile); - $session->user({userId=>3}); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->set({name=>"Upgrade to ".$toVersion}); - return $session; -} - -#------------------------------------------------- -sub finish { - my $session = shift; - updateTemplates($session); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->commit; - $session->db->write("insert into webguiVersion values (".$session->db->quote($toVersion).",'upgrade',".time().")"); - $session->close(); -} - -#------------------------------------------------- -sub updateTemplates { - my $session = shift; - return undef unless (-d "packages-".$toVersion); - print "\tUpdating packages.\n" unless ($quiet); - opendir(DIR,"packages-".$toVersion); - my @files = readdir(DIR); - closedir(DIR); - my $newFolder = undef; - foreach my $file (@files) { - next unless ($file =~ /\.wgpkg$/); - # Fix the filename to include a path - $file = "packages-" . $toVersion . "/" . $file; - addPackage( $session, $file ); - } -} - -#vim:ft=perl diff --git a/docs/upgrades/upgrade_7.10.19-7.10.20.pl b/docs/upgrades/upgrade_7.10.19-7.10.20.pl deleted file mode 100644 index e079b4557..000000000 --- a/docs/upgrades/upgrade_7.10.19-7.10.20.pl +++ /dev/null @@ -1,147 +0,0 @@ -#!/usr/bin/env perl - -#------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. -#------------------------------------------------------------------- -# Please read the legal notices (docs/legal.txt) and the license -# (docs/license.txt) that came with this distribution before using -# this software. -#------------------------------------------------------------------- -# http://www.plainblack.com info@plainblack.com -#------------------------------------------------------------------- - -our ($webguiRoot); - -BEGIN { - $webguiRoot = "../.."; - unshift (@INC, $webguiRoot."/lib"); -} - -use strict; -use Getopt::Long; -use WebGUI::Session; -use WebGUI::Storage; -use WebGUI::Asset; - - -my $toVersion = '7.10.20'; -my $quiet; # this line required - -my $session = start(); # this line required - -addFormFieldMacroToConfig(); - -# upgrade functions go here -fixSpacesInTaxInfo ( $session ); - -sub addFormFieldMacroToConfig { - print "\tAdd FormField macro to config... " unless $quiet; - $session->config->addToHash( 'macros', FormField => 'FormField' ); - print "DONE!\n" unless $quiet; -} - -finish($session); # this line required - - -#---------------------------------------------------------------------------- -# Describe what our function does -#sub exampleFunction { -# my $session = shift; -# print "\tWe're doing some stuff here that you should know about... " unless $quiet; -# # and here's our code -# print "DONE!\n" unless $quiet; -#} - -#---------------------------------------------------------------------------- -# Fix calendar feed urls that had adminId attached to them until they blew up -sub fixSpacesInTaxInfo { - my $session = shift; - print "\tRemoving spaces around commas in generic tax rate information... " unless $quiet; - use WebGUI::Shop::TaxDriver::Generic; - my $taxer = WebGUI::Shop::TaxDriver::Generic->new($session); - my $taxIterator = $taxer->getItems; - while (my $taxInfo = $taxIterator->hashRef) { - my $taxId = $taxInfo->{taxId}; - $taxer->add($taxInfo); ##Automatically removes spaces now. - $taxer->delete({taxId => $taxId}); - } - print "DONE!\n" unless $quiet; -} - - -# -------------- DO NOT EDIT BELOW THIS LINE -------------------------------- - -#---------------------------------------------------------------------------- -# Add a package to the import node -sub addPackage { - my $session = shift; - my $file = shift; - - print "\tUpgrading package $file\n" unless $quiet; - # Make a storage location for the package - my $storage = WebGUI::Storage->createTemp( $session ); - $storage->addFileFromFilesystem( $file ); - - # Import the package into the import node - my $package = eval { - my $node = WebGUI::Asset->getImportNode($session); - $node->importPackage( $storage, { - overwriteLatest => 1, - clearPackageFlag => 1, - setDefaultTemplate => 1, - } ); - }; - - if ($package eq 'corrupt') { - die "Corrupt package found in $file. Stopping upgrade.\n"; - } - if ($@ || !defined $package) { - die "Error during package import on $file: $@\nStopping upgrade\n."; - } - - return; -} - -#------------------------------------------------- -sub start { - my $configFile; - $|=1; #disable output buffering - GetOptions( - 'configFile=s'=>\$configFile, - 'quiet'=>\$quiet - ); - my $session = WebGUI::Session->open($webguiRoot,$configFile); - $session->user({userId=>3}); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->set({name=>"Upgrade to ".$toVersion}); - return $session; -} - -#------------------------------------------------- -sub finish { - my $session = shift; - updateTemplates($session); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->commit; - $session->db->write("insert into webguiVersion values (".$session->db->quote($toVersion).",'upgrade',".time().")"); - $session->close(); -} - -#------------------------------------------------- -sub updateTemplates { - my $session = shift; - return undef unless (-d "packages-".$toVersion); - print "\tUpdating packages.\n" unless ($quiet); - opendir(DIR,"packages-".$toVersion); - my @files = readdir(DIR); - closedir(DIR); - my $newFolder = undef; - foreach my $file (@files) { - next unless ($file =~ /\.wgpkg$/); - # Fix the filename to include a path - $file = "packages-" . $toVersion . "/" . $file; - addPackage( $session, $file ); - } -} - -#vim:ft=perl diff --git a/docs/upgrades/upgrade_7.10.2-7.10.3.pl b/docs/upgrades/upgrade_7.10.2-7.10.3.pl deleted file mode 100644 index 3acbc26fe..000000000 --- a/docs/upgrades/upgrade_7.10.2-7.10.3.pl +++ /dev/null @@ -1,172 +0,0 @@ -#!/usr/bin/env perl - -#------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. -#------------------------------------------------------------------- -# Please read the legal notices (docs/legal.txt) and the license -# (docs/license.txt) that came with this distribution before using -# this software. -#------------------------------------------------------------------- -# http://www.plainblack.com info@plainblack.com -#------------------------------------------------------------------- - -our ($webguiRoot); - -BEGIN { - $webguiRoot = "../.."; - unshift (@INC, $webguiRoot."/lib"); -} - -use strict; -use Getopt::Long; -use WebGUI::Session; -use WebGUI::Storage; -use WebGUI::Asset; - - -my $toVersion = '7.10.3'; -my $quiet; # this line required - - -my $session = start(); # this line required - -# upgrade functions go here -pruneInboxMessagesFromDeletedUsers($session); -addTemplateToNotifyAboutVersionTag($session); -addPasswordRecoveryEmailTemplate($session); - -finish($session); # this line required - - -#---------------------------------------------------------------------------- -# Describe what our function does -sub pruneInboxMessagesFromDeletedUsers { - my $session = shift; - print "\tPruning inbox messages from deleted users. This may take a while... " unless $quiet; - my $sth = $session->db->prepare(<execute([]); - use WebGUI::Inbox; - my $inbox = WebGUI::Inbox->new($session); - while (my ($messageId, $userId) = $sth->array) { - my $message = $inbox->getMessage($messageId, $userId); - if ($message) { - $message->delete; - } - } - print "...DONE!\n" unless $quiet; -} - - -#---------------------------------------------------------------------------- -# Describe what our function does -sub addTemplateToNotifyAboutVersionTag { - my $session = shift; - print "\tAdd template to Notify About Version Tag workflow activities." unless $quiet; - use WebGUI::Workflow::Activity; - use WebGUI::Workflow::Activity::NotifyAboutVersionTag; - my $templateId = WebGUI::Workflow::Activity::NotifyAboutVersionTag->definition($session)->[0]->{properties}->{templateId}->{defaultValue}; - my $activityList = $session->db->read(q|select activityId from WorkflowActivity|); - while (my ($activityId) = $activityList->array) { - my $activity = WebGUI::Workflow::Activity->new($session, $activityId); - next unless $activity; - next unless $activity->isa('WebGUI::Workflow::Activity::NotifyAboutVersionTag') - || $activity->isa('WebGUI::Workflow::Activity::RequestApprovalForVersionTag') - ; - $activity->set('templateId', $templateId); - } - print "...DONE!\n" unless $quiet; -} - - -#---------------------------------------------------------------------------- -# Describe what our function does -sub addPasswordRecoveryEmailTemplate { - my $session = shift; - print "\tAdd a template for the password recovery email." unless $quiet; - $session->setting->add('webguiPasswordRecoveryEmailTemplate', 'sK_0zVw4kwdJ1sqREIsSzA'); - print "...DONE!\n" unless $quiet; -} - - -# -------------- DO NOT EDIT BELOW THIS LINE -------------------------------- - -#---------------------------------------------------------------------------- -# Add a package to the import node -sub addPackage { - my $session = shift; - my $file = shift; - - print "\tUpgrading package $file\n" unless $quiet; - # Make a storage location for the package - my $storage = WebGUI::Storage->createTemp( $session ); - $storage->addFileFromFilesystem( $file ); - - # Import the package into the import node - my $package = eval { - my $node = WebGUI::Asset->getImportNode($session); - $node->importPackage( $storage, { - overwriteLatest => 1, - clearPackageFlag => 1, - setDefaultTemplate => 1, - } ); - }; - - if ($package eq 'corrupt') { - die "Corrupt package found in $file. Stopping upgrade.\n"; - } - if ($@ || !defined $package) { - die "Error during package import on $file: $@\nStopping upgrade\n."; - } - - return; -} - -#------------------------------------------------- -sub start { - my $configFile; - $|=1; #disable output buffering - GetOptions( - 'configFile=s'=>\$configFile, - 'quiet'=>\$quiet - ); - my $session = WebGUI::Session->open($webguiRoot,$configFile); - $session->user({userId=>3}); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->set({name=>"Upgrade to ".$toVersion}); - return $session; -} - -#------------------------------------------------- -sub finish { - my $session = shift; - updateTemplates($session); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->commit; - $session->db->write("insert into webguiVersion values (".$session->db->quote($toVersion).",'upgrade',".time().")"); - $session->close(); -} - -#------------------------------------------------- -sub updateTemplates { - my $session = shift; - return undef unless (-d "packages-".$toVersion); - print "\tUpdating packages.\n" unless ($quiet); - opendir(DIR,"packages-".$toVersion); - my @files = readdir(DIR); - closedir(DIR); - my $newFolder = undef; - foreach my $file (@files) { - next unless ($file =~ /\.wgpkg$/); - # Fix the filename to include a path - $file = "packages-" . $toVersion . "/" . $file; - addPackage( $session, $file ); - } -} - -#vim:ft=perl diff --git a/docs/upgrades/upgrade_7.10.20-7.10.21.pl b/docs/upgrades/upgrade_7.10.20-7.10.21.pl deleted file mode 100644 index fc1bae8a2..000000000 --- a/docs/upgrades/upgrade_7.10.20-7.10.21.pl +++ /dev/null @@ -1,146 +0,0 @@ -#!/usr/bin/env perl - -#------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. -#------------------------------------------------------------------- -# Please read the legal notices (docs/legal.txt) and the license -# (docs/license.txt) that came with this distribution before using -# this software. -#------------------------------------------------------------------- -# http://www.plainblack.com info@plainblack.com -#------------------------------------------------------------------- - -our ($webguiRoot); - -BEGIN { - $webguiRoot = "../.."; - unshift (@INC, $webguiRoot."/lib"); -} - -use strict; -use Getopt::Long; -use WebGUI::Session; -use WebGUI::Storage; -use WebGUI::Asset; - - -my $toVersion = '7.10.21'; -my $quiet; # this line required - - -my $session = start(); # this line required -addWaitForConfirmationWorkflow($session); -addCreateUsersEnabledSetting($session); -finish($session); # this line required - - -#---------------------------------------------------------------------------- -sub addWaitForConfirmationWorkflow { - my $session = shift; - my $c = $session->config; - my $exists = $c->get('workflowActivities/WebGUI::User'); - my $class = 'WebGUI::Workflow::Activity::WaitForUserConfirmation'; - unless (grep { $_ eq $class } @$exists) { - print "Adding WaitForUserConfirmation workflow..." unless $quiet; - $c->addToArray('workflowActivities/WebGUI::User' => $class); - print "Done!\n" unless $quiet; - } -} - -#---------------------------------------------------------------------------- -sub addCreateUsersEnabledSetting { - my $session = shift; - my $s = $session->setting; - my $name = 'enableUsersAfterAnonymousRegistration'; - return if $s->has($name); - print "Adding $name setting..." unless $quiet; - $s->add($name => 1); - print "Done!\n" unless $quiet; -} - -#---------------------------------------------------------------------------- -# Describe what our function does -#sub exampleFunction { -# my $session = shift; -# print "\tWe're doing some stuff here that you should know about... " unless $quiet; -# # and here's our code -# print "DONE!\n" unless $quiet; -#} - - -# -------------- DO NOT EDIT BELOW THIS LINE -------------------------------- - -#---------------------------------------------------------------------------- -# Add a package to the import node -sub addPackage { - my $session = shift; - my $file = shift; - - print "\tUpgrading package $file\n" unless $quiet; - # Make a storage location for the package - my $storage = WebGUI::Storage->createTemp( $session ); - $storage->addFileFromFilesystem( $file ); - - # Import the package into the import node - my $package = eval { - my $node = WebGUI::Asset->getImportNode($session); - $node->importPackage( $storage, { - overwriteLatest => 1, - clearPackageFlag => 1, - setDefaultTemplate => 1, - } ); - }; - - if ($package eq 'corrupt') { - die "Corrupt package found in $file. Stopping upgrade.\n"; - } - if ($@ || !defined $package) { - die "Error during package import on $file: $@\nStopping upgrade\n."; - } - - return; -} - -#------------------------------------------------- -sub start { - my $configFile; - $|=1; #disable output buffering - GetOptions( - 'configFile=s'=>\$configFile, - 'quiet'=>\$quiet - ); - my $session = WebGUI::Session->open($webguiRoot,$configFile); - $session->user({userId=>3}); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->set({name=>"Upgrade to ".$toVersion}); - return $session; -} - -#------------------------------------------------- -sub finish { - my $session = shift; - updateTemplates($session); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->commit; - $session->db->write("insert into webguiVersion values (".$session->db->quote($toVersion).",'upgrade',".time().")"); - $session->close(); -} - -#------------------------------------------------- -sub updateTemplates { - my $session = shift; - return undef unless (-d "packages-".$toVersion); - print "\tUpdating packages.\n" unless ($quiet); - opendir(DIR,"packages-".$toVersion); - my @files = readdir(DIR); - closedir(DIR); - my $newFolder = undef; - foreach my $file (@files) { - next unless ($file =~ /\.wgpkg$/); - # Fix the filename to include a path - $file = "packages-" . $toVersion . "/" . $file; - addPackage( $session, $file ); - } -} - -#vim:ft=perl diff --git a/docs/upgrades/upgrade_7.10.21-7.10.22.pl b/docs/upgrades/upgrade_7.10.21-7.10.22.pl deleted file mode 100644 index 41f41d697..000000000 --- a/docs/upgrades/upgrade_7.10.21-7.10.22.pl +++ /dev/null @@ -1,198 +0,0 @@ -#!/usr/bin/env perl - -#------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. -#------------------------------------------------------------------- -# Please read the legal notices (docs/legal.txt) and the license -# (docs/license.txt) that came with this distribution before using -# this software. -#------------------------------------------------------------------- -# http://www.plainblack.com info@plainblack.com -#------------------------------------------------------------------- - -our ($webguiRoot); - -BEGIN { - $webguiRoot = "../.."; - unshift (@INC, $webguiRoot."/lib"); -} - -use strict; -use Getopt::Long; -use WebGUI::Session; -use WebGUI::Storage; -use WebGUI::Asset; - - -my $toVersion = '7.10.22'; -my $quiet; # this line required - - -my $session = start(); # this line required - -# upgrade functions go here -addAuthorizePaymentDriver($session); - -createAddressField($session); -addLinkedProfileAddress($session); - -finish($session); # this line required - - -#---------------------------------------------------------------------------- -# Describe what our function does -#sub exampleFunction { -# my $session = shift; -# print "\tWe're doing some stuff here that you should know about... " unless $quiet; -# # and here's our code -# print "DONE!\n" unless $quiet; -#} - -#---------------------------------------------------------------------------- -# Add the Authorize.net payment driver to each config file -sub addAuthorizePaymentDriver { - my $session = shift; - print "\tAdd the Authorize.net payment driver... " unless $quiet; - # and here's our code - $session->config->addToArray('paymentDrivers', 'WebGUI::Shop::PayDriver::CreditCard::AuthorizeNet'); - print "DONE!\n" unless $quiet; -} - -#---------------------------------------------------------------------------- -sub addLinkedProfileAddress { - my $session = shift; - print "\tAdding linked profile addresses for existing users... " unless $quiet; - - my $users = $session->db->buildArrayRef( q{ - select userId from users where userId not in ('1','3') - } ); - - foreach my $userId (@$users) { - #check to see if there is user profile information available - my $u = WebGUI::User->new($session,$userId); - #skip if user does not have any homeAddress fields filled in - next unless ( - $u->profileField("homeAddress") - || $u->profileField("homeCity") - || $u->profileField("homeState") - || $u->profileField("homeZip") - || $u->profileField("homeCountry") - || $u->profileField("homePhone") - ); - - #Get the address book for the user (one is created if it does not exist) - my $addressBook = WebGUI::Shop::AddressBook->newByUserId($session,$userId); - - #Add the profile address for the user - $addressBook->addAddress({ - label => "Profile Address", - firstName => $u->profileField("firstName"), - lastName => $u->profileField("lastName"), - address1 => $u->profileField("homeAddress"), - city => $u->profileField("homeCity"), - state => $u->profileField("homeState"), - country => $u->profileField("homeCountry"), - code => $u->profileField("homeZip"), - phoneNumber => $u->profileField("homePhone"), - email => $u->profileField("email"), - isProfile => 1, - }); - } - - print "DONE!\n" unless $quiet; -} - -#---------------------------------------------------------------------------- -sub createAddressField { - my $session = shift; - - #skip if field exists - my $columns = $session->db->buildArrayRef("show columns from address where Field='isProfile'"); - return if(scalar(@$columns)); - - print "\tAdding profile link to Address... " unless $quiet; - - $session->db->write( q{ - alter table address add isProfile tinyint default 0 - } ); - - print "DONE!\n" unless $quiet; -} - - -# -------------- DO NOT EDIT BELOW THIS LINE -------------------------------- - -#---------------------------------------------------------------------------- -# Add a package to the import node -sub addPackage { - my $session = shift; - my $file = shift; - - print "\tUpgrading package $file\n" unless $quiet; - # Make a storage location for the package - my $storage = WebGUI::Storage->createTemp( $session ); - $storage->addFileFromFilesystem( $file ); - - # Import the package into the import node - my $package = eval { - my $node = WebGUI::Asset->getImportNode($session); - $node->importPackage( $storage, { - overwriteLatest => 1, - clearPackageFlag => 1, - setDefaultTemplate => 1, - } ); - }; - - if ($package eq 'corrupt') { - die "Corrupt package found in $file. Stopping upgrade.\n"; - } - if ($@ || !defined $package) { - die "Error during package import on $file: $@\nStopping upgrade\n."; - } - - return; -} - -#------------------------------------------------- -sub start { - my $configFile; - $|=1; #disable output buffering - GetOptions( - 'configFile=s'=>\$configFile, - 'quiet'=>\$quiet - ); - my $session = WebGUI::Session->open($webguiRoot,$configFile); - $session->user({userId=>3}); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->set({name=>"Upgrade to ".$toVersion}); - return $session; -} - -#------------------------------------------------- -sub finish { - my $session = shift; - updateTemplates($session); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->commit; - $session->db->write("insert into webguiVersion values (".$session->db->quote($toVersion).",'upgrade',".time().")"); - $session->close(); -} - -#------------------------------------------------- -sub updateTemplates { - my $session = shift; - return undef unless (-d "packages-".$toVersion); - print "\tUpdating packages.\n" unless ($quiet); - opendir(DIR,"packages-".$toVersion); - my @files = readdir(DIR); - closedir(DIR); - my $newFolder = undef; - foreach my $file (@files) { - next unless ($file =~ /\.wgpkg$/); - # Fix the filename to include a path - $file = "packages-" . $toVersion . "/" . $file; - addPackage( $session, $file ); - } -} - -#vim:ft=perl diff --git a/docs/upgrades/upgrade_7.10.22-7.10.23.pl b/docs/upgrades/upgrade_7.10.22-7.10.23.pl deleted file mode 100644 index feea6eb2c..000000000 --- a/docs/upgrades/upgrade_7.10.22-7.10.23.pl +++ /dev/null @@ -1,141 +0,0 @@ -#!/usr/bin/env perl - -#------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. -#------------------------------------------------------------------- -# Please read the legal notices (docs/legal.txt) and the license -# (docs/license.txt) that came with this distribution before using -# this software. -#------------------------------------------------------------------- -# http://www.plainblack.com info@plainblack.com -#------------------------------------------------------------------- - -our ($webguiRoot); - -BEGIN { - $webguiRoot = "../.."; - unshift (@INC, $webguiRoot."/lib"); -} - -use strict; -use Getopt::Long; -use WebGUI::Session; -use WebGUI::Storage; -use WebGUI::Asset; - - -my $toVersion = '7.10.23'; -my $quiet; # this line required - - -my $session = start(); # this line required - -# upgrade functions go here -fixBadTemplateAttachments($session); - -finish($session); # this line required - - -#---------------------------------------------------------------------------- -# Describe what our function does -#sub exampleFunction { -# my $session = shift; -# print "\tWe're doing some stuff here that you should know about... " unless $quiet; -# # and here's our code -# print "DONE!\n" unless $quiet; -#} - -#---------------------------------------------------------------------------- -sub fixBadTemplateAttachments { - my $session = shift; - print "\tRemove template attachements in search templates that refer to an old, deleted CSS snippet... " unless $quiet; - # and here's our code - use WebGUI::Asset::Template; - my $get_template = WebGUI::Asset::Template->getIsa($session); - TEMPLATE: while (1) { - my $template = eval {$get_template->()}; - next TEMPLATE if Exception::Class->caught; - last TEMPLATE unless $template; - next TEMPLATE unless $template->get('namespace') eq 'Search'; - $template->removeAttachments(['^/(webgui.css);']); - } - print "DONE!\n" unless $quiet; -} - - -# -------------- DO NOT EDIT BELOW THIS LINE -------------------------------- - -#---------------------------------------------------------------------------- -# Add a package to the import node -sub addPackage { - my $session = shift; - my $file = shift; - - print "\tUpgrading package $file\n" unless $quiet; - # Make a storage location for the package - my $storage = WebGUI::Storage->createTemp( $session ); - $storage->addFileFromFilesystem( $file ); - - # Import the package into the import node - my $package = eval { - my $node = WebGUI::Asset->getImportNode($session); - $node->importPackage( $storage, { - overwriteLatest => 1, - clearPackageFlag => 1, - setDefaultTemplate => 1, - } ); - }; - - if ($package eq 'corrupt') { - die "Corrupt package found in $file. Stopping upgrade.\n"; - } - if ($@ || !defined $package) { - die "Error during package import on $file: $@\nStopping upgrade\n."; - } - - return; -} - -#------------------------------------------------- -sub start { - my $configFile; - $|=1; #disable output buffering - GetOptions( - 'configFile=s'=>\$configFile, - 'quiet'=>\$quiet - ); - my $session = WebGUI::Session->open($webguiRoot,$configFile); - $session->user({userId=>3}); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->set({name=>"Upgrade to ".$toVersion}); - return $session; -} - -#------------------------------------------------- -sub finish { - my $session = shift; - updateTemplates($session); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->commit; - $session->db->write("insert into webguiVersion values (".$session->db->quote($toVersion).",'upgrade',".time().")"); - $session->close(); -} - -#------------------------------------------------- -sub updateTemplates { - my $session = shift; - return undef unless (-d "packages-".$toVersion); - print "\tUpdating packages.\n" unless ($quiet); - opendir(DIR,"packages-".$toVersion); - my @files = readdir(DIR); - closedir(DIR); - my $newFolder = undef; - foreach my $file (@files) { - next unless ($file =~ /\.wgpkg$/); - # Fix the filename to include a path - $file = "packages-" . $toVersion . "/" . $file; - addPackage( $session, $file ); - } -} - -#vim:ft=perl diff --git a/docs/upgrades/upgrade_7.10.23-7.10.24.pl b/docs/upgrades/upgrade_7.10.23-7.10.24.pl deleted file mode 100644 index 879822753..000000000 --- a/docs/upgrades/upgrade_7.10.23-7.10.24.pl +++ /dev/null @@ -1,123 +0,0 @@ -#!/usr/bin/env perl - -#------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. -#------------------------------------------------------------------- -# Please read the legal notices (docs/legal.txt) and the license -# (docs/license.txt) that came with this distribution before using -# this software. -#------------------------------------------------------------------- -# http://www.plainblack.com info@plainblack.com -#------------------------------------------------------------------- - -our ($webguiRoot); - -BEGIN { - $webguiRoot = "../.."; - unshift (@INC, $webguiRoot."/lib"); -} - -use strict; -use Getopt::Long; -use WebGUI::Session; -use WebGUI::Storage; -use WebGUI::Asset; - - -my $toVersion = '7.10.24'; -my $quiet; # this line required - - -my $session = start(); # this line required - -# upgrade functions go here - -finish($session); # this line required - - -#---------------------------------------------------------------------------- -# Describe what our function does -#sub exampleFunction { -# my $session = shift; -# print "\tWe're doing some stuff here that you should know about... " unless $quiet; -# # and here's our code -# print "DONE!\n" unless $quiet; -#} - - -# -------------- DO NOT EDIT BELOW THIS LINE -------------------------------- - -#---------------------------------------------------------------------------- -# Add a package to the import node -sub addPackage { - my $session = shift; - my $file = shift; - - print "\tUpgrading package $file\n" unless $quiet; - # Make a storage location for the package - my $storage = WebGUI::Storage->createTemp( $session ); - $storage->addFileFromFilesystem( $file ); - - # Import the package into the import node - my $package = eval { - my $node = WebGUI::Asset->getImportNode($session); - $node->importPackage( $storage, { - overwriteLatest => 1, - clearPackageFlag => 1, - setDefaultTemplate => 1, - } ); - }; - - if ($package eq 'corrupt') { - die "Corrupt package found in $file. Stopping upgrade.\n"; - } - if ($@ || !defined $package) { - die "Error during package import on $file: $@\nStopping upgrade\n."; - } - - return; -} - -#------------------------------------------------- -sub start { - my $configFile; - $|=1; #disable output buffering - GetOptions( - 'configFile=s'=>\$configFile, - 'quiet'=>\$quiet - ); - my $session = WebGUI::Session->open($webguiRoot,$configFile); - $session->user({userId=>3}); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->set({name=>"Upgrade to ".$toVersion}); - return $session; -} - -#------------------------------------------------- -sub finish { - my $session = shift; - updateTemplates($session); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->commit; - $session->db->write("insert into webguiVersion values (".$session->db->quote($toVersion).",'upgrade',".time().")"); - $session->close(); -} - -#------------------------------------------------- -sub updateTemplates { - my $session = shift; - return undef unless (-d "packages-".$toVersion); - print "\tUpdating packages.\n" unless ($quiet); - opendir(DIR,"packages-".$toVersion); - my @files = readdir(DIR); - closedir(DIR); - my $newFolder = undef; - foreach my $file (@files) { - next unless ($file =~ /\.wgpkg$/); - # Fix the filename to include a path - $file = "packages-" . $toVersion . "/" . $file; - addPackage( $session, $file ); - } -} - -#vim:ft=perl diff --git a/docs/upgrades/upgrade_7.10.3-7.10.4.pl b/docs/upgrades/upgrade_7.10.3-7.10.4.pl deleted file mode 100644 index 43177f312..000000000 --- a/docs/upgrades/upgrade_7.10.3-7.10.4.pl +++ /dev/null @@ -1,190 +0,0 @@ -#!/usr/bin/env perl - -#------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. -#------------------------------------------------------------------- -# Please read the legal notices (docs/legal.txt) and the license -# (docs/license.txt) that came with this distribution before using -# this software. -#------------------------------------------------------------------- -# http://www.plainblack.com info@plainblack.com -#------------------------------------------------------------------- - -our ($webguiRoot); - -BEGIN { - $webguiRoot = "../.."; - unshift (@INC, $webguiRoot."/lib"); -} - -use strict; -use Getopt::Long; -use WebGUI::Session; -use WebGUI::Storage; -use WebGUI::Asset; -use List::Util qw(first); - -my $toVersion = '7.10.4'; -my $quiet; # this line required - - -my $session = start(); # this line required - -# upgrade functions go here -changeTemplateHelpUrl($session); -addForkTable($session); -installForkCleanup($session); - -finish($session); # this line required - - -#---------------------------------------------------------------------------- -# Describe what our function does -#sub exampleFunction { -# my $session = shift; -# print "\tWe're doing some stuff here that you should know about... " unless $quiet; -# # and here's our code -# print "DONE!\n" unless $quiet; -#} - -#---------------------------------------------------------------------------- -# Describe what our function does -sub changeTemplateHelpUrl { - my $session = shift; - print "\tChange the URL for the template that displays help variables... " unless $quiet; - # and here's our code - my $template = WebGUI::Asset->newByDynamicClass($session, 'PBtmplHelp000000000001'); - if ($template) { - $template->update({url => 'root/import/adminconsole/help'}); - my $rs = $template->session->db->read("select revisionDate from assetData where assetId=? and revisionDate<>?",[$template->getId, $template->get("revisionDate")]); - while (my ($version) = $rs->array) { - my $old = WebGUI::Asset->new($session, $template->getId, $template->get("className"), $version); - $old->purgeRevision if defined $old; - } - } - else { - print "\n\tNO TEMPLATE FOR DISPLAYING TEMPLATE VARIABLES..."; - } - print "DONE!\n" unless $quiet; -} - -#---------------------------------------------------------------------------- -# Creates a new table for tracking background processes -sub addForkTable { - my $session = shift; - my $db = $session->db; - my $sth = $db->dbh->table_info('', '', 'Fork', 'TABLE'); - return if ($sth->fetch); - print "\tAdding Fork table..." unless $quiet; - my $sql = q{ - CREATE TABLE Fork ( - id CHAR(22), - userId CHAR(22), - groupId CHAR(22), - status LONGTEXT, - error TEXT, - startTime BIGINT(20), - endTime BIGINT(20), - finished BOOLEAN DEFAULT FALSE, - latch BOOLEAN DEFAULT FALSE, - - PRIMARY KEY(id) - ); - }; - $db->write($sql); - print "DONE!\n" unless $quiet; -} - -#---------------------------------------------------------------------------- -# install a workflow to clean up old background processes -sub installForkCleanup { - my $session = shift; - print "\tInstalling Fork Cleanup workflow..." unless $quiet; - my $class = 'WebGUI::Workflow::Activity::RemoveOldForks'; - $session->config->addToArray('workflowActivities/None', $class); - my $wf = WebGUI::Workflow->new($session, 'pbworkflow000000000001'); - my $a = first { ref $_ eq $class } @{ $wf->getActivities }; - unless ($a) { - $a = $wf->addActivity($class); - $a->set(title => 'Remove Old Forks'); - }; - print "DONE!\n" unless $quiet; -} - - -# -------------- DO NOT EDIT BELOW THIS LINE -------------------------------- - -#---------------------------------------------------------------------------- -# Add a package to the import node -sub addPackage { - my $session = shift; - my $file = shift; - - print "\tUpgrading package $file\n" unless $quiet; - # Make a storage location for the package - my $storage = WebGUI::Storage->createTemp( $session ); - $storage->addFileFromFilesystem( $file ); - - # Import the package into the import node - my $package = eval { - my $node = WebGUI::Asset->getImportNode($session); - $node->importPackage( $storage, { - overwriteLatest => 1, - clearPackageFlag => 1, - setDefaultTemplate => 1, - } ); - }; - - if ($package eq 'corrupt') { - die "Corrupt package found in $file. Stopping upgrade.\n"; - } - if ($@ || !defined $package) { - die "Error during package import on $file: $@\nStopping upgrade\n."; - } - - return; -} - -#------------------------------------------------- -sub start { - my $configFile; - $|=1; #disable output buffering - GetOptions( - 'configFile=s'=>\$configFile, - 'quiet'=>\$quiet - ); - my $session = WebGUI::Session->open($webguiRoot,$configFile); - $session->user({userId=>3}); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->set({name=>"Upgrade to ".$toVersion}); - return $session; -} - -#------------------------------------------------- -sub finish { - my $session = shift; - updateTemplates($session); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->commit; - $session->db->write("insert into webguiVersion values (".$session->db->quote($toVersion).",'upgrade',".time().")"); - $session->close(); -} - -#------------------------------------------------- -sub updateTemplates { - my $session = shift; - return undef unless (-d "packages-".$toVersion); - print "\tUpdating packages.\n" unless ($quiet); - opendir(DIR,"packages-".$toVersion); - my @files = readdir(DIR); - closedir(DIR); - my $newFolder = undef; - foreach my $file (@files) { - next unless ($file =~ /\.wgpkg$/); - # Fix the filename to include a path - $file = "packages-" . $toVersion . "/" . $file; - addPackage( $session, $file ); - } -} - -#vim:ft=perl diff --git a/docs/upgrades/upgrade_7.10.4-7.10.5.pl b/docs/upgrades/upgrade_7.10.4-7.10.5.pl deleted file mode 100644 index 4e151cdf0..000000000 --- a/docs/upgrades/upgrade_7.10.4-7.10.5.pl +++ /dev/null @@ -1,123 +0,0 @@ -#!/usr/bin/env perl - -#------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. -#------------------------------------------------------------------- -# Please read the legal notices (docs/legal.txt) and the license -# (docs/license.txt) that came with this distribution before using -# this software. -#------------------------------------------------------------------- -# http://www.plainblack.com info@plainblack.com -#------------------------------------------------------------------- - -our ($webguiRoot); - -BEGIN { - $webguiRoot = "../.."; - unshift (@INC, $webguiRoot."/lib"); -} - -use strict; -use Getopt::Long; -use WebGUI::Session; -use WebGUI::Storage; -use WebGUI::Asset; - - -my $toVersion = '7.10.5'; -my $quiet; # this line required - - -my $session = start(); # this line required - -# upgrade functions go here - -finish($session); # this line required - - -#---------------------------------------------------------------------------- -# Describe what our function does -#sub exampleFunction { -# my $session = shift; -# print "\tWe're doing some stuff here that you should know about... " unless $quiet; -# # and here's our code -# print "DONE!\n" unless $quiet; -#} - - -# -------------- DO NOT EDIT BELOW THIS LINE -------------------------------- - -#---------------------------------------------------------------------------- -# Add a package to the import node -sub addPackage { - my $session = shift; - my $file = shift; - - print "\tUpgrading package $file\n" unless $quiet; - # Make a storage location for the package - my $storage = WebGUI::Storage->createTemp( $session ); - $storage->addFileFromFilesystem( $file ); - - # Import the package into the import node - my $package = eval { - my $node = WebGUI::Asset->getImportNode($session); - $node->importPackage( $storage, { - overwriteLatest => 1, - clearPackageFlag => 1, - setDefaultTemplate => 1, - } ); - }; - - if ($package eq 'corrupt') { - die "Corrupt package found in $file. Stopping upgrade.\n"; - } - if ($@ || !defined $package) { - die "Error during package import on $file: $@\nStopping upgrade\n."; - } - - return; -} - -#------------------------------------------------- -sub start { - my $configFile; - $|=1; #disable output buffering - GetOptions( - 'configFile=s'=>\$configFile, - 'quiet'=>\$quiet - ); - my $session = WebGUI::Session->open($webguiRoot,$configFile); - $session->user({userId=>3}); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->set({name=>"Upgrade to ".$toVersion}); - return $session; -} - -#------------------------------------------------- -sub finish { - my $session = shift; - updateTemplates($session); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->commit; - $session->db->write("insert into webguiVersion values (".$session->db->quote($toVersion).",'upgrade',".time().")"); - $session->close(); -} - -#------------------------------------------------- -sub updateTemplates { - my $session = shift; - return undef unless (-d "packages-".$toVersion); - print "\tUpdating packages.\n" unless ($quiet); - opendir(DIR,"packages-".$toVersion); - my @files = readdir(DIR); - closedir(DIR); - my $newFolder = undef; - foreach my $file (@files) { - next unless ($file =~ /\.wgpkg$/); - # Fix the filename to include a path - $file = "packages-" . $toVersion . "/" . $file; - addPackage( $session, $file ); - } -} - -#vim:ft=perl diff --git a/docs/upgrades/upgrade_7.10.5-7.10.6.pl b/docs/upgrades/upgrade_7.10.5-7.10.6.pl deleted file mode 100644 index 7073196be..000000000 --- a/docs/upgrades/upgrade_7.10.5-7.10.6.pl +++ /dev/null @@ -1,144 +0,0 @@ -#!/usr/bin/env perl - -#------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. -#------------------------------------------------------------------- -# Please read the legal notices (docs/legal.txt) and the license -# (docs/license.txt) that came with this distribution before using -# this software. -#------------------------------------------------------------------- -# http://www.plainblack.com info@plainblack.com -#------------------------------------------------------------------- - -our ($webguiRoot); - -BEGIN { - $webguiRoot = "../.."; - unshift (@INC, $webguiRoot."/lib"); -} - -use strict; -use Getopt::Long; -use WebGUI::Session; -use WebGUI::Storage; -use WebGUI::Asset; -use WebGUI::Workflow; - -my $toVersion = '7.10.6'; -my $quiet; # this line required - - -my $session = start(); # this line required - -# upgrade functions go here -addCollaborationSubscriptionWorkflow($session); - -finish($session); # this line required - - -#---------------------------------------------------------------------------- -sub addCollaborationSubscriptionWorkflow { - my $session = shift; - print "\tAdd Collaboration System subscriber validation workflow... " unless $quiet; - # and here's our code - $session->config->addToArray('workflowActivities/WebGUI::Asset', qw/WebGUI::Workflow::Activity::UpdateAssetSubscribers/); - my $workflow = WebGUI::Workflow->create($session, - { - mode => 'parallel', - enabled => 1, - title => 'Update CS Subscription members', - description => "This workflow will be run whenever the viewing permissions are changed on an Asset. It will update the members of the subscription group, and remove members who can no longer view the Asset.", - type => 'WebGUI::Asset', - }, - 'xR-_GRRbjBojgLsFx3dEMA' - ); - $workflow->addActivity('WebGUI::Workflow::Activity::UpdateAssetSubscribers'); - print "DONE!\n" unless $quiet; -} - -#---------------------------------------------------------------------------- -# Describe what our function does -#sub exampleFunction { -# my $session = shift; -# print "\tWe're doing some stuff here that you should know about... " unless $quiet; -# # and here's our code -# print "DONE!\n" unless $quiet; -#} - - -# -------------- DO NOT EDIT BELOW THIS LINE -------------------------------- - -#---------------------------------------------------------------------------- -# Add a package to the import node -sub addPackage { - my $session = shift; - my $file = shift; - - print "\tUpgrading package $file\n" unless $quiet; - # Make a storage location for the package - my $storage = WebGUI::Storage->createTemp( $session ); - $storage->addFileFromFilesystem( $file ); - - # Import the package into the import node - my $package = eval { - my $node = WebGUI::Asset->getImportNode($session); - $node->importPackage( $storage, { - overwriteLatest => 1, - clearPackageFlag => 1, - setDefaultTemplate => 1, - } ); - }; - - if ($package eq 'corrupt') { - die "Corrupt package found in $file. Stopping upgrade.\n"; - } - if ($@ || !defined $package) { - die "Error during package import on $file: $@\nStopping upgrade\n."; - } - - return; -} - -#------------------------------------------------- -sub start { - my $configFile; - $|=1; #disable output buffering - GetOptions( - 'configFile=s'=>\$configFile, - 'quiet'=>\$quiet - ); - my $session = WebGUI::Session->open($webguiRoot,$configFile); - $session->user({userId=>3}); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->set({name=>"Upgrade to ".$toVersion}); - return $session; -} - -#------------------------------------------------- -sub finish { - my $session = shift; - updateTemplates($session); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->commit; - $session->db->write("insert into webguiVersion values (".$session->db->quote($toVersion).",'upgrade',".time().")"); - $session->close(); -} - -#------------------------------------------------- -sub updateTemplates { - my $session = shift; - return undef unless (-d "packages-".$toVersion); - print "\tUpdating packages.\n" unless ($quiet); - opendir(DIR,"packages-".$toVersion); - my @files = readdir(DIR); - closedir(DIR); - my $newFolder = undef; - foreach my $file (@files) { - next unless ($file =~ /\.wgpkg$/); - # Fix the filename to include a path - $file = "packages-" . $toVersion . "/" . $file; - addPackage( $session, $file ); - } -} - -#vim:ft=perl diff --git a/docs/upgrades/upgrade_7.10.6-7.10.7.pl b/docs/upgrades/upgrade_7.10.6-7.10.7.pl deleted file mode 100644 index f88dc9013..000000000 --- a/docs/upgrades/upgrade_7.10.6-7.10.7.pl +++ /dev/null @@ -1,163 +0,0 @@ -#!/usr/bin/env perl - -#------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. -#------------------------------------------------------------------- -# Please read the legal notices (docs/legal.txt) and the license -# (docs/license.txt) that came with this distribution before using -# this software. -#------------------------------------------------------------------- -# http://www.plainblack.com info@plainblack.com -#------------------------------------------------------------------- - -our ($webguiRoot); - -BEGIN { - $webguiRoot = "../.."; - unshift (@INC, $webguiRoot."/lib"); -} - -use strict; -use Getopt::Long; -use WebGUI::Session; -use WebGUI::Storage; -use WebGUI::Asset; - - -my $toVersion = '7.10.7'; -my $quiet; # this line required - - -my $session = start(); # this line required - -# upgrade functions go here -addEmailIndexToProfile( $session ); -addIndecesToUserLoginLog($session); -addSSOOptionToConfigs($session); - -finish($session); # this line required - - -#---------------------------------------------------------------------------- -# Describe what our function does -#sub exampleFunction { -# my $session = shift; -# print "\tWe're doing some stuff here that you should know about... " unless $quiet; -# # and here's our code -# print "DONE!\n" unless $quiet; -#} - -#---------------------------------------------------------------------------- -# Add an index to the userProfileData table for email lookups -sub addSSOOptionToConfigs { - my $session = shift; - print "\tAdding SSO flag to config file to enable the feature... " unless $quiet; - $session->config->set('enableSimpleSSO', 0); - print "DONE!\n" unless $quiet; -} - -#---------------------------------------------------------------------------- -# Add an index to the userProfileData table for email lookups -sub addEmailIndexToProfile { - my $session = shift; - print "\tAdding index to email column on userProfileData table... " unless $quiet; - # and here's our code - $session->db->write( "ALTER TABLE userProfileData ADD INDEX email ( email )" ); - print "DONE!\n" unless $quiet; -} - -#---------------------------------------------------------------------------- -sub addIndecesToUserLoginLog { - my $session = shift; - print "\tAdd indeces to userLoginLog to speed cleanup... " unless $quiet; - # and here's our code - my $sth = $session->db->read('SHOW CREATE TABLE userLoginLog'); - my ($field,$stmt) = $sth->array; - $sth->finish; - unless ($stmt =~ m/KEY `userId`/i) { - $session->db->write("ALTER TABLE userLoginLog ADD INDEX userId (userId)"); - } - unless ($stmt =~ m/KEY `timeStamp`/i) { - $session->db->write("ALTER TABLE userLoginLog ADD INDEX timeStamp (timeStamp)"); - } - - print "DONE!\n" unless $quiet; -} - - -# -------------- DO NOT EDIT BELOW THIS LINE -------------------------------- - -#---------------------------------------------------------------------------- -# Add a package to the import node -sub addPackage { - my $session = shift; - my $file = shift; - - print "\tUpgrading package $file\n" unless $quiet; - # Make a storage location for the package - my $storage = WebGUI::Storage->createTemp( $session ); - $storage->addFileFromFilesystem( $file ); - - # Import the package into the import node - my $package = eval { - my $node = WebGUI::Asset->getImportNode($session); - $node->importPackage( $storage, { - overwriteLatest => 1, - clearPackageFlag => 1, - setDefaultTemplate => 1, - } ); - }; - - if ($package eq 'corrupt') { - die "Corrupt package found in $file. Stopping upgrade.\n"; - } - if ($@ || !defined $package) { - die "Error during package import on $file: $@\nStopping upgrade\n."; - } - - return; -} - -#------------------------------------------------- -sub start { - my $configFile; - $|=1; #disable output buffering - GetOptions( - 'configFile=s'=>\$configFile, - 'quiet'=>\$quiet - ); - my $session = WebGUI::Session->open($webguiRoot,$configFile); - $session->user({userId=>3}); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->set({name=>"Upgrade to ".$toVersion}); - return $session; -} - -#------------------------------------------------- -sub finish { - my $session = shift; - updateTemplates($session); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->commit; - $session->db->write("insert into webguiVersion values (".$session->db->quote($toVersion).",'upgrade',".time().")"); - $session->close(); -} - -#------------------------------------------------- -sub updateTemplates { - my $session = shift; - return undef unless (-d "packages-".$toVersion); - print "\tUpdating packages.\n" unless ($quiet); - opendir(DIR,"packages-".$toVersion); - my @files = readdir(DIR); - closedir(DIR); - my $newFolder = undef; - foreach my $file (@files) { - next unless ($file =~ /\.wgpkg$/); - # Fix the filename to include a path - $file = "packages-" . $toVersion . "/" . $file; - addPackage( $session, $file ); - } -} - -#vim:ft=perl diff --git a/docs/upgrades/upgrade_7.10.7-7.10.8.pl b/docs/upgrades/upgrade_7.10.7-7.10.8.pl deleted file mode 100644 index 14f011889..000000000 --- a/docs/upgrades/upgrade_7.10.7-7.10.8.pl +++ /dev/null @@ -1,123 +0,0 @@ -#!/usr/bin/env perl - -#------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. -#------------------------------------------------------------------- -# Please read the legal notices (docs/legal.txt) and the license -# (docs/license.txt) that came with this distribution before using -# this software. -#------------------------------------------------------------------- -# http://www.plainblack.com info@plainblack.com -#------------------------------------------------------------------- - -our ($webguiRoot); - -BEGIN { - $webguiRoot = "../.."; - unshift (@INC, $webguiRoot."/lib"); -} - -use strict; -use Getopt::Long; -use WebGUI::Session; -use WebGUI::Storage; -use WebGUI::Asset; - - -my $toVersion = '7.10.8'; -my $quiet; # this line required - - -my $session = start(); # this line required - -# upgrade functions go here - -finish($session); # this line required - - -#---------------------------------------------------------------------------- -# Describe what our function does -#sub exampleFunction { -# my $session = shift; -# print "\tWe're doing some stuff here that you should know about... " unless $quiet; -# # and here's our code -# print "DONE!\n" unless $quiet; -#} - - -# -------------- DO NOT EDIT BELOW THIS LINE -------------------------------- - -#---------------------------------------------------------------------------- -# Add a package to the import node -sub addPackage { - my $session = shift; - my $file = shift; - - print "\tUpgrading package $file\n" unless $quiet; - # Make a storage location for the package - my $storage = WebGUI::Storage->createTemp( $session ); - $storage->addFileFromFilesystem( $file ); - - # Import the package into the import node - my $package = eval { - my $node = WebGUI::Asset->getImportNode($session); - $node->importPackage( $storage, { - overwriteLatest => 1, - clearPackageFlag => 1, - setDefaultTemplate => 1, - } ); - }; - - if ($package eq 'corrupt') { - die "Corrupt package found in $file. Stopping upgrade.\n"; - } - if ($@ || !defined $package) { - die "Error during package import on $file: $@\nStopping upgrade\n."; - } - - return; -} - -#------------------------------------------------- -sub start { - my $configFile; - $|=1; #disable output buffering - GetOptions( - 'configFile=s'=>\$configFile, - 'quiet'=>\$quiet - ); - my $session = WebGUI::Session->open($webguiRoot,$configFile); - $session->user({userId=>3}); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->set({name=>"Upgrade to ".$toVersion}); - return $session; -} - -#------------------------------------------------- -sub finish { - my $session = shift; - updateTemplates($session); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->commit; - $session->db->write("insert into webguiVersion values (".$session->db->quote($toVersion).",'upgrade',".time().")"); - $session->close(); -} - -#------------------------------------------------- -sub updateTemplates { - my $session = shift; - return undef unless (-d "packages-".$toVersion); - print "\tUpdating packages.\n" unless ($quiet); - opendir(DIR,"packages-".$toVersion); - my @files = readdir(DIR); - closedir(DIR); - my $newFolder = undef; - foreach my $file (@files) { - next unless ($file =~ /\.wgpkg$/); - # Fix the filename to include a path - $file = "packages-" . $toVersion . "/" . $file; - addPackage( $session, $file ); - } -} - -#vim:ft=perl diff --git a/docs/upgrades/upgrade_7.10.8-7.10.9.pl b/docs/upgrades/upgrade_7.10.8-7.10.9.pl deleted file mode 100644 index cc81d1ba3..000000000 --- a/docs/upgrades/upgrade_7.10.8-7.10.9.pl +++ /dev/null @@ -1,123 +0,0 @@ -#!/usr/bin/env perl - -#------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. -#------------------------------------------------------------------- -# Please read the legal notices (docs/legal.txt) and the license -# (docs/license.txt) that came with this distribution before using -# this software. -#------------------------------------------------------------------- -# http://www.plainblack.com info@plainblack.com -#------------------------------------------------------------------- - -our ($webguiRoot); - -BEGIN { - $webguiRoot = "../.."; - unshift (@INC, $webguiRoot."/lib"); -} - -use strict; -use Getopt::Long; -use WebGUI::Session; -use WebGUI::Storage; -use WebGUI::Asset; - - -my $toVersion = '7.10.9'; -my $quiet; # this line required - - -my $session = start(); # this line required - -# upgrade functions go here - -finish($session); # this line required - - -#---------------------------------------------------------------------------- -# Describe what our function does -#sub exampleFunction { -# my $session = shift; -# print "\tWe're doing some stuff here that you should know about... " unless $quiet; -# # and here's our code -# print "DONE!\n" unless $quiet; -#} - - -# -------------- DO NOT EDIT BELOW THIS LINE -------------------------------- - -#---------------------------------------------------------------------------- -# Add a package to the import node -sub addPackage { - my $session = shift; - my $file = shift; - - print "\tUpgrading package $file\n" unless $quiet; - # Make a storage location for the package - my $storage = WebGUI::Storage->createTemp( $session ); - $storage->addFileFromFilesystem( $file ); - - # Import the package into the import node - my $package = eval { - my $node = WebGUI::Asset->getImportNode($session); - $node->importPackage( $storage, { - overwriteLatest => 1, - clearPackageFlag => 1, - setDefaultTemplate => 1, - } ); - }; - - if ($package eq 'corrupt') { - die "Corrupt package found in $file. Stopping upgrade.\n"; - } - if ($@ || !defined $package) { - die "Error during package import on $file: $@\nStopping upgrade\n."; - } - - return; -} - -#------------------------------------------------- -sub start { - my $configFile; - $|=1; #disable output buffering - GetOptions( - 'configFile=s'=>\$configFile, - 'quiet'=>\$quiet - ); - my $session = WebGUI::Session->open($webguiRoot,$configFile); - $session->user({userId=>3}); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->set({name=>"Upgrade to ".$toVersion}); - return $session; -} - -#------------------------------------------------- -sub finish { - my $session = shift; - updateTemplates($session); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->commit; - $session->db->write("insert into webguiVersion values (".$session->db->quote($toVersion).",'upgrade',".time().")"); - $session->close(); -} - -#------------------------------------------------- -sub updateTemplates { - my $session = shift; - return undef unless (-d "packages-".$toVersion); - print "\tUpdating packages.\n" unless ($quiet); - opendir(DIR,"packages-".$toVersion); - my @files = readdir(DIR); - closedir(DIR); - my $newFolder = undef; - foreach my $file (@files) { - next unless ($file =~ /\.wgpkg$/); - # Fix the filename to include a path - $file = "packages-" . $toVersion . "/" . $file; - addPackage( $session, $file ); - } -} - -#vim:ft=perl diff --git a/docs/upgrades/upgrade_7.10.9-7.10.10.pl b/docs/upgrades/upgrade_7.10.9-7.10.10.pl deleted file mode 100644 index 8076a8e85..000000000 --- a/docs/upgrades/upgrade_7.10.9-7.10.10.pl +++ /dev/null @@ -1,170 +0,0 @@ -#!/usr/bin/env perl - -#------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. -#------------------------------------------------------------------- -# Please read the legal notices (docs/legal.txt) and the license -# (docs/license.txt) that came with this distribution before using -# this software. -#------------------------------------------------------------------- -# http://www.plainblack.com info@plainblack.com -#------------------------------------------------------------------- - -our ($webguiRoot); - -BEGIN { - $webguiRoot = "../.."; - unshift (@INC, $webguiRoot."/lib"); -} - -use strict; -use Getopt::Long; -use WebGUI::Session; -use WebGUI::Storage; -use WebGUI::Asset; - - -my $toVersion = '7.10.10'; -my $quiet; # this line required - - -my $session = start(); # this line required - -# upgrade functions go here -convertCsMailInterval($session); -addVersioningToMetadata($session); -finish($session); # this line required - - -#---------------------------------------------------------------------------- -# Describe what our function does -#sub exampleFunction { -# my $session = shift; -# print "\tWe're doing some stuff here that you should know about... " unless $quiet; -# # and here's our code -# print "DONE!\n" unless $quiet; -#} - -#---------------------------------------------------------------------------- -sub convertCsMailInterval { - my $session = shift; - print "\tConvert the getMailInterval from seconds to enumeration... " unless $quiet; - # and here's our code - $session->db->write('alter table Collaboration modify column getMailInterval char(64)'); - my $get_row = $session->db->read('select assetId, revisionDate, getMailInterval from Collaboration'); - my $change_row = $session->db->prepare('update Collaboration set getMailInterval=? where assetId=? and revisionDate=?'); - while (my ($assetId, $revisionDate, $seconds ) = $get_row->array) { - my $interval; - if ($seconds <= 60) { $interval = 'every minute'; } - elsif ($seconds <= 120) { $interval = 'every other minute'; } - elsif ($seconds <= 300) { $interval = 'every 5 minutes'; } - elsif ($seconds <= 600) { $interval = 'every 10 minutes'; } - elsif ($seconds <= 900) { $interval = 'every 15 minutes'; } - elsif ($seconds <= 1200) { $interval = 'every 20 minutes'; } - elsif ($seconds <= 1800) { $interval = 'every 30 minutes'; } - elsif ($seconds <= 3600) { $interval = 'every hour'; } - elsif ($seconds <= 7200) { $interval = 'every other hour'; } - else { $interval = 'once per day'; } - $change_row->execute([$interval, $assetId, $revisionDate]); - } - $get_row->finish; - $change_row->finish; - print "DONE!\n" unless $quiet; -} - -sub addVersioningToMetadata { - my $session = shift; - print "\tAltering metadata tables for versioning..." unless $quiet; - my $db = $session->db; - $db->write(q{ - alter table metaData_values - add column revisionDate bigint, - drop primary key, - add primary key (fieldId, assetId, revisionDate); - }); - $db->write(q{ - create table metaData_classes ( - className char(255), - fieldId char(22) - ); - }); - print "DONE!\n" unless $quiet; -} - - -# -------------- DO NOT EDIT BELOW THIS LINE -------------------------------- - -#---------------------------------------------------------------------------- -# Add a package to the import node -sub addPackage { - my $session = shift; - my $file = shift; - - print "\tUpgrading package $file\n" unless $quiet; - # Make a storage location for the package - my $storage = WebGUI::Storage->createTemp( $session ); - $storage->addFileFromFilesystem( $file ); - - # Import the package into the import node - my $package = eval { - my $node = WebGUI::Asset->getImportNode($session); - $node->importPackage( $storage, { - overwriteLatest => 1, - clearPackageFlag => 1, - setDefaultTemplate => 1, - } ); - }; - - if ($package eq 'corrupt') { - die "Corrupt package found in $file. Stopping upgrade.\n"; - } - if ($@ || !defined $package) { - die "Error during package import on $file: $@\nStopping upgrade\n."; - } - - return; -} - -#------------------------------------------------- -sub start { - my $configFile; - $|=1; #disable output buffering - GetOptions( - 'configFile=s'=>\$configFile, - 'quiet'=>\$quiet - ); - my $session = WebGUI::Session->open($webguiRoot,$configFile); - $session->user({userId=>3}); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->set({name=>"Upgrade to ".$toVersion}); - return $session; -} - -#------------------------------------------------- -sub finish { - my $session = shift; - updateTemplates($session); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->commit; - $session->db->write("insert into webguiVersion values (".$session->db->quote($toVersion).",'upgrade',".time().")"); - $session->close(); -} - -#------------------------------------------------- -sub updateTemplates { - my $session = shift; - return undef unless (-d "packages-".$toVersion); - print "\tUpdating packages.\n" unless ($quiet); - opendir(DIR,"packages-".$toVersion); - my @files = readdir(DIR); - closedir(DIR); - my $newFolder = undef; - foreach my $file (@files) { - next unless ($file =~ /\.wgpkg$/); - # Fix the filename to include a path - $file = "packages-" . $toVersion . "/" . $file; - addPackage( $session, $file ); - } -} - -#vim:ft=perl diff --git a/docs/upgrades/upgrade_7.9.13-7.10.0.pl b/docs/upgrades/upgrade_7.9.13-7.10.0.pl deleted file mode 100644 index 51a13ae33..000000000 --- a/docs/upgrades/upgrade_7.9.13-7.10.0.pl +++ /dev/null @@ -1,140 +0,0 @@ -#!/usr/bin/env perl - -#------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. -#------------------------------------------------------------------- -# Please read the legal notices (docs/legal.txt) and the license -# (docs/license.txt) that came with this distribution before using -# this software. -#------------------------------------------------------------------- -# http://www.plainblack.com info@plainblack.com -#------------------------------------------------------------------- - -our ($webguiRoot); - -BEGIN { - $webguiRoot = "../.."; - unshift (@INC, $webguiRoot."/lib"); -} - -use strict; -use Getopt::Long; -use WebGUI::Session; -use WebGUI::Storage; -use WebGUI::Asset; - - -my $toVersion = '7.10.0'; -my $quiet; # this line required - - -my $session = start(); # this line required - -# upgrade functions go here -addAddonsToAdminConsole($session); - -finish($session); # this line required - -#---------------------------------------------------------------------------- -# Describe what our function does -sub addAddonsToAdminConsole { - my $session = shift; - print "\tAdd the Addons icon to the Admin Console... " unless $quiet; - # and here's our code - $session->config->addToHash('adminConsole', - addons => { - icon => "addons.png", - uiLevel => 1, - group => "12", - url => "http://www.webgui.org/addons", - title => "Addons" - }); - print "DONE!\n" unless $quiet; -} - -#---------------------------------------------------------------------------- -# Describe what our function does -#sub exampleFunction { -# my $session = shift; -# print "\tWe're doing some stuff here that you should know about... " unless $quiet; -# # and here's our code -# print "DONE!\n" unless $quiet; -#} - - -# -------------- DO NOT EDIT BELOW THIS LINE -------------------------------- - -#---------------------------------------------------------------------------- -# Add a package to the import node -sub addPackage { - my $session = shift; - my $file = shift; - - print "\tUpgrading package $file\n" unless $quiet; - # Make a storage location for the package - my $storage = WebGUI::Storage->createTemp( $session ); - $storage->addFileFromFilesystem( $file ); - - # Import the package into the import node - my $package = eval { - my $node = WebGUI::Asset->getImportNode($session); - $node->importPackage( $storage, { - overwriteLatest => 1, - clearPackageFlag => 1, - setDefaultTemplate => 1, - } ); - }; - - if ($package eq 'corrupt') { - die "Corrupt package found in $file. Stopping upgrade.\n"; - } - if ($@ || !defined $package) { - die "Error during package import on $file: $@\nStopping upgrade\n."; - } - - return; -} - -#------------------------------------------------- -sub start { - my $configFile; - $|=1; #disable output buffering - GetOptions( - 'configFile=s'=>\$configFile, - 'quiet'=>\$quiet - ); - my $session = WebGUI::Session->open($webguiRoot,$configFile); - $session->user({userId=>3}); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->set({name=>"Upgrade to ".$toVersion}); - return $session; -} - -#------------------------------------------------- -sub finish { - my $session = shift; - updateTemplates($session); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->commit; - $session->db->write("insert into webguiVersion values (".$session->db->quote($toVersion).",'upgrade',".time().")"); - $session->close(); -} - -#------------------------------------------------- -sub updateTemplates { - my $session = shift; - return undef unless (-d "packages-".$toVersion); - print "\tUpdating packages.\n" unless ($quiet); - opendir(DIR,"packages-".$toVersion); - my @files = readdir(DIR); - closedir(DIR); - my $newFolder = undef; - foreach my $file (@files) { - next unless ($file =~ /\.wgpkg$/); - # Fix the filename to include a path - $file = "packages-" . $toVersion . "/" . $file; - addPackage( $session, $file ); - } -} - -#vim:ft=perl diff --git a/docs/upgrades/upgrade_7.9.34-7.10.22.pl b/docs/upgrades/upgrade_7.9.34-7.10.22.pl deleted file mode 100644 index 33cb8dea8..000000000 --- a/docs/upgrades/upgrade_7.9.34-7.10.22.pl +++ /dev/null @@ -1,561 +0,0 @@ -#!/usr/bin/env perl - -#------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. -#------------------------------------------------------------------- -# Please read the legal notices (docs/legal.txt) and the license -# (docs/license.txt) that came with this distribution before using -# this software. -#------------------------------------------------------------------- -# http://www.plainblack.com info@plainblack.com -#------------------------------------------------------------------- - -our ($webguiRoot); - -BEGIN { - $webguiRoot = "../.."; - unshift (@INC, $webguiRoot."/lib"); -} - -use strict; -use Getopt::Long; -use WebGUI::Session; -use WebGUI::Storage; -use WebGUI::Asset; - -my $toVersion = "0.0.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 -i18nForAddonsTitle($session); -addForkTable($session); -installForkCleanup($session); -addVersioningToMetadata($session); -installNewDashboardTables($session); -addStockDataCacheColumn($session); -addWeatherDataCacheColumn($session); -addLastModifiedByMacro($session); -addAutoPlayToCarousel( $session ); -addProcessorDropdownToSnippet( $session ); -addRichEditToCarousel($session); -alterAssetIndexTable($session); -reindexAllThingys($session); -use WebGUI::Asset::MapPoint; -WebGUI::AssetAspect::Installable::upgrade("WebGUI::Asset::MapPoint",$session); -addRenderThingDataMacro($session); -addAssetPropertyMacro($session); -createThingyDBColumns($session); -addAssetManagerSortPreferences($session); -addTicketLimitToBadgeGroup( $session ); -addFormFieldMacroToConfig(); -addWaitForConfirmationWorkflow($session); -addCreateUsersEnabledSetting($session); -addAuthorizePaymentDriver($session); -createAddressField($session); -addLinkedProfileAddress($session); - -finish($session); # this line required - - -#---------------------------------------------------------------------------- -# Describe what our function does -#sub exampleFunction { -# my $session = shift; -# print "\tWe're doing some stuff here that you should know about... " unless $quiet; -# # and here's our code -# print "DONE!\n" unless $quiet; -#} - -#---------------------------------------------------------------------------- -# This internationalizes the link text of the addons link in the adminconsole -sub i18nForAddonsTitle { - my $session = shift; - print "\tInternationalize the text of the addons link in the adminconsole... " unless $quiet; - $session->config->set('adminConsole/addons', - { - icon => "addons.png", - uiLevel => 1, - group => "12", - url => "http://www.webgui.org/addons", - title => "^International(Addons title,WebGUI);" - } - ); - print "DONE!\n" unless $quiet; -} - -#---------------------------------------------------------------------------- -# Creates a new table for tracking background processes -sub addForkTable { - my $session = shift; - my $db = $session->db; - my $sth = $db->dbh->table_info('', '', 'Fork', 'TABLE'); - return if ($sth->fetch); - print "\tAdding Fork table..." unless $quiet; - my $sql = q{ - CREATE TABLE Fork ( - id CHAR(22), - userId CHAR(22), - groupId CHAR(22), - status LONGTEXT, - error TEXT, - startTime BIGINT(20), - endTime BIGINT(20), - finished BOOLEAN DEFAULT FALSE, - latch BOOLEAN DEFAULT FALSE, - - PRIMARY KEY(id) - ); - }; - $db->write($sql); - print "DONE!\n" unless $quiet; -} - -#---------------------------------------------------------------------------- -# install a workflow to clean up old background processes -sub installForkCleanup { - my $session = shift; - print "\tInstalling Fork Cleanup workflow..." unless $quiet; - my $class = 'WebGUI::Workflow::Activity::RemoveOldForks'; - $session->config->addToArray('workflowActivities/None', $class); - my $wf = WebGUI::Workflow->new($session, 'pbworkflow000000000001'); - use List::Util qw/first/; - my $a = first { ref $_ eq $class } @{ $wf->getActivities }; - unless ($a) { - $a = $wf->addActivity($class); - $a->set(title => 'Remove Old Forks'); - }; - print "DONE!\n" unless $quiet; -} - -sub addVersioningToMetadata { - my $session = shift; - print "\tAltering metadata tables for versioning..." unless $quiet; - my $db = $session->db; - $db->write(q{ - alter table metaData_values - add column revisionDate bigint, - drop primary key, - add primary key (fieldId, assetId, revisionDate); - }); - $db->write(q{ - create table metaData_classes ( - className char(255), - fieldId char(22) - ); - }); - print "DONE!\n" unless $quiet; -} - -#---------------------------------------------------------------------------- -# Describe what our function does -sub addLastModifiedByMacro { - my $session = shift; - print "\tAdd LastModifiedBy macro to the config file... " unless $quiet; - # and here's our code - $session->config->addToHash('macros', 'LastModifiedBy', 'LastModifiedBy'); - print "DONE!\n" unless $quiet; -} - -#---------------------------------------------------------------------------- -# Describe what our function does -sub installNewDashboardTables { - my $session = shift; - print "\tInstall new Dashboard tables... " unless $quiet; - $session->db->write(<db->write(<db->write(<db->write(<db->write( - "ALTER TABLE Carousel ADD COLUMN autoPlay INT, ADD COLUMN autoPlayInterval INT" - ); - print "DONE!\n" unless $quiet; -} - -#---------------------------------------------------------------------------- -sub addProcessorDropdownToSnippet { - my $session = shift; - my $db = $session->db; - print "\tUpdating the Snippet table to add templateProcessor option..." - unless $quiet; - - my $rows = $db->buildArrayRefOfHashRefs(q{ - select assetId, revisionDate from snippet where processAsTemplate = 1 - }); - - $db->write(q{ - alter table snippet - drop column processAsTemplate, - add column templateParser char(255) - }); - - my $default = $session->config->get('defaultTemplateParser'); - - for my $row (@$rows) { - $db->write(q{ - update snippet - set templateParser = ? - where assetId = ? and revisionDate = ? - }, [ $default, $row->{assetId}, $row->{revisionDate} ]); - } - - print "Done!\n"; -} - -#---------------------------------------------------------------------------- -# Describe what our function does -sub addRichEditToCarousel { - my $session = shift; - print "\tAdd RichEdit option to the Carousel... " unless $quiet; - # and here's our code - $session->db->write('ALTER TABLE Carousel ADD COLUMN richEditor CHAR(22) BINARY'); - $session->db->write(q!update Carousel set richEditor='PBrichedit000000000001'!); - print "DONE!\n" unless $quiet; -} - -sub addRenderThingDataMacro { - my $session = shift; - print "\tAdd the new RenderThingData macro to the site config... " unless $quiet; - $session->config->addToHash('macros', 'RenderThingData', 'RenderThingData'); - print "DONE!\n" unless $quiet; -} - -sub alterAssetIndexTable { - my $session = shift; - print "\tExtend the assetIndex table so we can search things other than assets... " unless $quiet; - $session->db->write(<getIsa($session); - THINGY: while (1) { - my $thingy = eval { $get_thingy->() }; - next THINGY if Exception::Class->caught(); - last THINGY unless $thingy; - $thingy->indexContent; - } - print "DONE!\n" unless $quiet; -} - -#---------------------------------------------------------------------------- -sub addAssetPropertyMacro { - my $session = shift; - my $c = $session->config; - my $hash = $c->get('macros'); - unless (grep { $_ eq 'AssetProperty' } values %$hash) { - print "\tAdding AssetProperty macro... " unless $quiet; - $c->set('macros/AssetProperty' => 'AssetProperty'); - print "DONE!\n" unless $quiet; - } -} - -#---------------------------------------------------------------------------- -# Creates new column in tables for Thingy_fields and Thingy_things -sub createThingyDBColumns { - my $session = shift; - print "\tAdding db. columns Thingy_fields.isUnique and Thingy_things.maxEntriesTotal.." unless $quiet; - # and here's our code - - my %tfHash = $session->db->quickHash("show columns from Thingy_fields where Field='isUnique'"); - my %ttHash = $session->db->quickHash("show columns from Thingy_things where Field='maxEntriesTotal'"); - - unless ( $tfHash{'Field'}) { $session->db->write("alter table Thingy_fields add isUnique int(1) default 0"); } - unless ( $ttHash{'Field'}) { $session->db->write("alter table Thingy_things add maxEntriesTotal int default null"); } - - print "DONE!\n" unless $quiet; -} - -#---------------------------------------------------------------------------- -sub addAssetManagerSortPreferences { - my $cn = 'assetManagerSortColumn'; - my $on = 'assetManagerSortDirection'; - use WebGUI::ProfileField; - unless (WebGUI::ProfileField->new($session, $cn)) { - print 'Adding Asset Manager Sort Column profile field...' - unless $quiet; - - WebGUI::ProfileField->create($session, $cn => { - label => - "WebGUI::International::get('$cn label', 'Account_Profile')", - protected => 1, - fieldType => 'selectBox', - dataDefault => 'lineage', - possibleValues => <<'VALUES', -{ - lineage => WebGUI::International::get('rank', 'Asset'), - title => WebGUI::International::get(99, 'Asset'), - className => WebGUI::International::get('type', 'Asset'), - revisionDate => WebGUI::International::get('revision date', 'Asset'), - assetSize => WebGUI::International::get('size', 'Asset'), - lockedBy => WebGUI::International::get('locked', 'Asset'), -} -VALUES - }, 4); - print "Done!\n" unless $quiet; - } - unless (WebGUI::ProfileField->new($session, $on)) { - print 'Adding Asset Manager Sort Direction profile field...' - unless $quiet; - - WebGUI::ProfileField->create($session, $on => { - label => - "WebGUI::International::get('$on label', 'Account_Profile')", - protected => 1, - fieldType => 'selectBox', - dataDefault => 'asc', - possibleValues => <<'VALUES', -{ - asc => WebGUI::International::get('ascending', 'Account_Profile'), - desc => WebGUI::International::get('descending', 'Account_Profile'), -} -VALUES - }, 4); - print "Done!\n" unless $quiet; - } -} - -#---------------------------------------------------------------------------- -# Add a ticket limit to badges in a badge group -sub addTicketLimitToBadgeGroup { - my $session = shift; - print "\tAdd ticket limit to badge groups... " unless $quiet; - # Make sure it hasn't been done already... - my $columns = $session->db->buildHashRef('describe EMSBadgeGroup'); - if(! grep { /ticketsPerBadge/ } keys %{$columns}) { - $session->db->write(q{ - ALTER TABLE EMSBadgeGroup ADD COLUMN `ticketsPerBadge` INTEGER - }); - } - print "DONE!\n" unless $quiet; -} - -sub addFormFieldMacroToConfig { - print "\tAdd FormField macro to config... " unless $quiet; - $session->config->addToHash( 'macros', FormField => 'FormField' ); - print "DONE!\n" unless $quiet; -} - -#---------------------------------------------------------------------------- -sub addWaitForConfirmationWorkflow { - my $session = shift; - my $c = $session->config; - my $exists = $c->get('workflowActivities/WebGUI::User'); - my $class = 'WebGUI::Workflow::Activity::WaitForUserConfirmation'; - unless (grep { $_ eq $class } @$exists) { - print "Adding WaitForUserConfirmation workflow..." unless $quiet; - $c->addToArray('workflowActivities/WebGUI::User' => $class); - print "Done!\n" unless $quiet; - } -} - -#---------------------------------------------------------------------------- -sub addCreateUsersEnabledSetting { - my $session = shift; - my $s = $session->setting; - my $name = 'enableUsersAfterAnonymousRegistration'; - return if $s->has($name); - print "Adding $name setting..." unless $quiet; - $s->add($name => 1); - print "Done!\n" unless $quiet; -} - -#---------------------------------------------------------------------------- -# Add the Authorize.net payment driver to each config file -sub addAuthorizePaymentDriver { - my $session = shift; - print "\tAdd the Authorize.net payment driver... " unless $quiet; - # and here's our code - $session->config->addToArray('paymentDrivers', 'WebGUI::Shop::PayDriver::CreditCard::AuthorizeNet'); - print "DONE!\n" unless $quiet; -} - -#---------------------------------------------------------------------------- -sub addLinkedProfileAddress { - my $session = shift; - print "\tAdding linked profile addresses for existing users... " unless $quiet; - - my $users = $session->db->buildArrayRef( q{ - select userId from users where userId not in ('1','3') - } ); - - use WebGUI::User; - use WebGUI::Shop::AddressBook; - foreach my $userId (@$users) { - #check to see if there is user profile information available - my $u = WebGUI::User->new($session,$userId); - #skip if user does not have any homeAddress fields filled in - next unless ( - $u->profileField("homeAddress") - || $u->profileField("homeCity") - || $u->profileField("homeState") - || $u->profileField("homeZip") - || $u->profileField("homeCountry") - || $u->profileField("homePhone") - ); - - #Get the address book for the user (one is created if it does not exist) - my $addressBook = WebGUI::Shop::AddressBook->newByUserId($session,$userId); - - #Add the profile address for the user - $addressBook->addAddress({ - label => "Profile Address", - firstName => $u->profileField("firstName"), - lastName => $u->profileField("lastName"), - address1 => $u->profileField("homeAddress"), - city => $u->profileField("homeCity"), - state => $u->profileField("homeState"), - country => $u->profileField("homeCountry"), - code => $u->profileField("homeZip"), - phoneNumber => $u->profileField("homePhone"), - email => $u->profileField("email"), - isProfile => 1, - }); - } - - print "DONE!\n" unless $quiet; -} - -#---------------------------------------------------------------------------- -sub createAddressField { - my $session = shift; - - #skip if field exists - my $columns = $session->db->buildArrayRef("show columns from address where Field='isProfile'"); - return if(scalar(@$columns)); - - print "\tAdding profile link to Address... " unless $quiet; - - $session->db->write( q{ - alter table address add isProfile tinyint default 0 - } ); - - print "DONE!\n" unless $quiet; -} - - - -# -------------- DO NOT EDIT BELOW THIS LINE -------------------------------- - -#---------------------------------------------------------------------------- -# Add a package to the import node -sub addPackage { - my $session = shift; - my $file = shift; - - print "\tUpgrading package $file\n" unless $quiet; - # Make a storage location for the package - my $storage = WebGUI::Storage->createTemp( $session ); - $storage->addFileFromFilesystem( $file ); - - # Import the package into the import node - my $package = eval { - my $node = WebGUI::Asset->getImportNode($session); - $node->importPackage( $storage, { - overwriteLatest => 1, - clearPackageFlag => 1, - setDefaultTemplate => 1, - } ); - }; - - if ($package eq 'corrupt') { - die "Corrupt package found in $file. Stopping upgrade.\n"; - } - if ($@ || !defined $package) { - die "Error during package import on $file: $@\nStopping upgrade\n."; - } - - return; -} - -#------------------------------------------------- -sub start { - my $configFile; - $|=1; #disable output buffering - GetOptions( - 'configFile=s'=>\$configFile, - 'quiet'=>\$quiet - ); - my $session = WebGUI::Session->open($webguiRoot,$configFile); - $session->user({userId=>3}); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->set({name=>"Upgrade to ".$toVersion}); - return $session; -} - -#------------------------------------------------- -sub finish { - my $session = shift; - updateTemplates($session); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->commit; - $session->db->write("insert into webguiVersion values (".$session->db->quote($toVersion).",'upgrade',".time().")"); - $session->close(); -} - -#------------------------------------------------- -sub updateTemplates { - my $session = shift; - print "\tUpdating packages.\n" unless ($quiet); - addPackage( $session, 'packages-7.9.34-7.10.22/merged.wgpkg' ); -} - -#vim:ft=perl diff --git a/eg/README b/eg/README new file mode 100644 index 000000000..4d7596693 --- /dev/null +++ b/eg/README @@ -0,0 +1,24 @@ +# Some ways to achieve the same thing from the command line: +# plackup -MWebGUI -e 'WebGUI->new' +# plackup -MWebGUI -e 'WebGUI->new("dev.localhost.localdomain.conf")' +# plackup -MWebGUI -e 'WebGUI->new(root => "/data/WebGUI", site => "dev.localhost.localdomain.conf")' +# +# Or from a .psgi file: +# my $app = WebGUI->new( root => '/data/WebGUI', site => 'dev.localhost.localdomain.conf' )->psgi_app; + + + + # Extras + my $extrasURL = $wg->config->get('extrasURL'); + my $extrasPath = $wg->config->get('extrasPath'); + enable 'Plack::Middleware::Static', + path => sub { s{^$extrasURL/}{} }, + root => "$extrasPath/"; + + # Uploads + my $uploadsURL = $wg->config->get('uploadsURL'); + my $uploadsPath = $wg->config->get('uploadsPath'); + enable 'Plack::Middleware::Static', + path => sub { s{^$uploadsURL/}{} }, + root => "$uploadsPath/"; + diff --git a/eg/apache.conf b/eg/apache.conf new file mode 100644 index 000000000..71ea48165 --- /dev/null +++ b/eg/apache.conf @@ -0,0 +1,27 @@ + + PerlOptions +Parent + PerlSwitches -I/data/WebGUI/lib + + # CGI + #AddHandler cgi-script cgi + #ScriptAlias / /data/WebGUI/etc/dev.localhost.localdomain.cgi/ + # + # Options +ExecCGI + # + + # Apache2 + #SetHandler perl-script + #PerlHandler Plack::Server::Apache2 + #PerlSetVar psgi_app /data/WebGUI/etc/dev.localhost.localdomain.psgi + + # FastCGI + FastCgiServer /data/WebGUI/etc/dev.localhost.localdomain.fcgi + ScriptAlias / /data/WebGUI/etc/dev.localhost.localdomain.fcgi/ + + # mod_psgi + # + # SetHandler psgi + # PSGIApp /data/WebGUI/etc/dev.localhost.localdomain.psgi + # + + diff --git a/eg/dev.localhost.localdomain.cgi b/eg/dev.localhost.localdomain.cgi new file mode 100755 index 000000000..71eee8fab --- /dev/null +++ b/eg/dev.localhost.localdomain.cgi @@ -0,0 +1,5 @@ +#!/usr/bin/perl +use Plack::Server::CGI; + +my $app = Plack::Util::load_psgi("/data/WebGUI/etc/dev.localhost.localdomain.psgi"); +Plack::Server::CGI->new->run($app); \ No newline at end of file diff --git a/eg/dev.localhost.localdomain.fcgi b/eg/dev.localhost.localdomain.fcgi new file mode 100755 index 000000000..ca633fef5 --- /dev/null +++ b/eg/dev.localhost.localdomain.fcgi @@ -0,0 +1,5 @@ +#!/usr/bin/perl +use Plack::Server::FCGI; + +my $app = Plack::Util::load_psgi("../app.psgi"); +Plack::Server::FCGI->new->run($app); diff --git a/eg/dev.localhost.localdomain.perlbal b/eg/dev.localhost.localdomain.perlbal new file mode 100644 index 000000000..98b85382e --- /dev/null +++ b/eg/dev.localhost.localdomain.perlbal @@ -0,0 +1,7 @@ + LOAD PSGI + CREATE SERVICE psgi + SET role = web_server + SET listen = 127.0.0.1:80 + SET plugins = psgi + PSGI_APP = dev.localhost.localdomain.psgi + ENABLE psgi \ No newline at end of file diff --git a/eg/urlmap.psgi b/eg/urlmap.psgi new file mode 100644 index 000000000..1d402c65e --- /dev/null +++ b/eg/urlmap.psgi @@ -0,0 +1,20 @@ +use lib '/data/WebGUI/lib'; +use WebGUI; + +my $wg1 = WebGUI->new; +my $wg2 = WebGUI->new; + +use Plack::Builder; +my $app = builder { + mount "http://dev.localhost.localdomain:5000/" => $wg1; + mount "/wg1" => $wg1; + mount "/wg2" => $wg2; + mount "/" => sub { [ 200, [ 'Content-Type' => 'text/html' ], [ <WebGUI + URLMap

    + +END_HTML +}; diff --git a/etc/.gitignore b/etc/.gitignore index 4ba60981f..4ae152ef8 100644 --- a/etc/.gitignore +++ b/etc/.gitignore @@ -1 +1,3 @@ /*.conf +/preload.custom +/preload.exclude diff --git a/etc/WebGUI.conf.original b/etc/WebGUI.conf.original index ee64dc0f8..bdc9762ed 100644 --- a/etc/WebGUI.conf.original +++ b/etc/WebGUI.conf.original @@ -88,24 +88,42 @@ #"webServerPort" : 80, -# What kind of cache do you wish to use? Available types are -# WebGUI::Cache::FileCache and WebGUI::Cache::Database. -# We highly recommend the database cache if you are running -# sites with more than a few hundred pages, or if you're -# running in a multi-server environment. The file cache is better -# for very small sites. +# The cache key defines the configuration of the caching mechanism. +# Required keys: +# driver -> one of "Memory", "DBI", "FastMmap", "Memcached" +# FastMmap is recommended for single-server sites +# Memcached is recommended for multi-server sites +# +# Optional keys: +# expires_variance -> Define a percentage of variance in a cache item's +# expiration. This prevents "cache miss stampedes" where +# many things will attempt to refresh the cache at once. +# Set as a decimal percentage: "0.10" = 10% variance +# l1_cache -> Define a Level 1 cache, a faster cache to use for commonly- +# accessed stuff. Uses the same format and keys as the top level. +# ex: +# "l1_cache" : { +# "driver" : "Memory" +# }, +# mirror_cache -> Define a write-only mirror. Used to warm up a new cache +# before switching over to it. Defined exactly like an l1_cache +# +"cache" : { + "driver" : "FastMmap", + "expires_variance" : "0.10", + "root_dir" : "/tmp/WebGUICache" +}, -"cacheType" : "WebGUI::Cache::FileCache", +# Sessions that are "hot", those that are not only not expired, +# but that are currently active on the site are kept in memory +# to make them exceptionally fast. The hotSessionFlushToDb +# directive allows you to say how often (in seconds) those +# sessions should be pushed down to the database. On most sites +# 10 minutes is a good duration. If you have an exceptionally +# short session timeout (in the settings) then you may wish to +# set it lower. -# Tell WebGUI where to store cached files. Defaults to the -# /tmp or c:\temp folder depending upon your operating system. - -# "fileCacheRoot" : "/path/to/cache", - -# Set this to 1 to disable WebGUI's caching subsystems. This is -# mainly useful for developers. - -"disableCache" : 0, +"hotSessionFlushToDb" : 600, # The database connection string. It usually takes the form of # DBI::;host: @@ -190,7 +208,7 @@ # List the authentication plug-ins you wish to be available on # this site. -"authMethods" : [ "LDAP", "WebGUI", "Twitter" ], +"authMethods" : [ "LDAP", "WebGUI", "Twitter", "Facebook"], # List the merchant gateways you have installed and wish to be # available on this site. @@ -217,7 +235,8 @@ # Specify the list of template parsers available in the system. "templateParsers" : [ - "WebGUI::Asset::Template::HTMLTemplate" + "WebGUI::Asset::Template::HTMLTemplate", + "WebGUI::Asset::Template::TemplateToolkit" ], # Enable the Survey Expression Engine, which allows goto expressions in @@ -259,13 +278,6 @@ "url" : "^PageUrl(\"\",func=manageClipboard);", "title" : "^International(948,WebGUI);" }, - "statistics" : { - "icon" : "statistics.gif", - "uiLevel" : 1, - "url" : "^PageUrl(\"\",op=viewStatistics);", - "title" : "^International(437,WebGUI);", - "groupSetting" : "groupIdAdminStatistics" - }, "users" : { "icon" : "users.gif", "uiLevel" : 5, @@ -488,7 +500,7 @@ } }, -# Specify a the list of assets you want to appear in your +# Specify the list of assets you want to appear in your # "New Content" menu categories. See "assetCategories" for details # about categories. Each listing has a key of class name, and then # has several properties, which are: @@ -589,9 +601,6 @@ "WebGUI::Asset::Wobject::StockData" : { "category" : "intranet" }, - "WebGUI::Asset::FilePile" : { - "category" : "basic" - }, "WebGUI::Asset::Wobject::Collaboration" : { "category" : "community" }, @@ -812,7 +821,6 @@ "#" : "Hash_userId", "/" : "Slash_gatewayUrl", "a" : "a_account", - "AdminBar" : "AdminBar", "AdminText" : "AdminText", "AdminToggle" : "AdminToggle", "AdSpace" : "AdSpace", @@ -827,9 +835,9 @@ "c" : "c_companyName", "D" : "D_date", "DeactivateAccount": "DeactivateAccount", - "EditableToggle" : "EditableToggle", "e" : "e_companyEmail", "Extras" : "Extras", + "FacebookLogin" : "FacebookLogin", "FetchMimeType" : "FetchMimeType", "FilePump" : "FilePump", "FileUrl" : "FileUrl", @@ -840,6 +848,7 @@ "H" : "H_homeLink", "If" : "If", "International" : "International", + "i18n" : "International", "LastModified" : "LastModified", "LastModifiedBy" : "LastModifiedBy", "L" : "L_loginBox", @@ -858,6 +867,7 @@ "SpectreCheck" : "SpectreCheck", "TwitterLogin" : "TwitterLogin", "Thumbnail" : "Thumbnail", + "TwitterLogin" : "TwitterLogin", "User" : "User", "UsersOnline" : "UsersOnline", "u" : "u_companyUrl", @@ -897,8 +907,6 @@ "WebGUI::Workflow::Activity::ArchiveOldStories", "WebGUI::Workflow::Activity::ArchiveOldThreads", "WebGUI::Workflow::Activity::CalendarUpdateFeeds", - "WebGUI::Workflow::Activity::CleanDatabaseCache", - "WebGUI::Workflow::Activity::CleanFileCache", "WebGUI::Workflow::Activity::CleanLoginHistory", "WebGUI::Workflow::Activity::CleanTempStorage", "WebGUI::Workflow::Activity::CreateCronJob", @@ -958,23 +966,6 @@ "WebGUI::Image::Graph::XYGraph::Line" ], -# Here you can define the dictionaries that are available through the tinyMCE spellchecker. You should set -# id to the name the dictionary is known by ASpell (eg. en or en_US or nl), use the name parameter to set -# the name the dictionary is displayed with in tinyMCE. To set the default dictionary please set the 'default' -# parameter. - -#"availableDictionaries" : [ -# { -# "id" : "en_US", -# "name" : "English", -# "default" : "1" -# }, -# { -# "id" : "nl", -# "name" : "Dutch" -# } -#], - # Optional script to run upon successful login. The script can contain macros # ex: /data/WebGUI/sbin/doLogin.pl --configFile=dev.localhost.localdomain.conf --loginPage=^PageUrl(); @@ -985,22 +976,6 @@ "runOnLogout" : "", -# URL handlers are used to associate functionality with a URL via a regular expression. - -"urlHandlers" : [ - { "^/extras" : "WebGUI::URL::PassThru" }, -# { "^/icons" : "WebGUI::URL::PassThru" }, -# { "^/documentation/pdf" : "WebGUI::URL::PassThru" }, -# { "^/my-custom-application$" : "WebGUI::URL::PassThru" }, -# { "^/server-status$" : "WebGUI::URL::PassThru" }, -# { "^/perl-status$" : "WebGUI::URL::PassThru" }, - { "^/uploads/dictionaries" : "WebGUI::URL::Unauthorized" }, - { "^/uploads" : "WebGUI::URL::Uploads" }, - { "^/\\*give-credit-where-credit-is-due\\*$" : "WebGUI::URL::Credits" }, - { "^/abcdefghijklmnopqrstuvwxyz$" : "WebGUI::URL::Snoop" }, - { ".*" : "WebGUI::URL::Content" } - ], - # Content handlers are used to produce content from the content URL handler. # Note, these handlers are processed in the order listed. Do not change # unless you know what you're doing. @@ -1009,7 +984,7 @@ "WebGUI::Content::Prefetch", "WebGUI::Content::Maintenance", "WebGUI::Content::Referral", - "WebGUI::Content::AssetManager", + "WebGUI::Content::Admin", "WebGUI::Content::AssetDiscovery", "WebGUI::Content::PassiveAnalytics", "WebGUI::Content::SetLanguage", @@ -1020,6 +995,7 @@ "WebGUI::Content::Wizard", "WebGUI::Content::Operation", "WebGUI::Content::Setup", + "WebGUI::Content::FacebookAuth", "WebGUI::Content::Shop", "WebGUI::Content::SiteIndex", "WebGUI::Content::Asset", @@ -1083,42 +1059,15 @@ # "extrasExclude": ["tinymce", "^blah$"] # }, -#A list of UserAgents of recognized mobile platforms. If useMobileStyle is set in the -#Admin settings, then the mobile style will be used for these browsers. - "mobileUserAgents" : [ - "AvantGo", - "DoCoMo", - "Vodafone", - "EudoraWeb", - "Minimo", - "UP\\.Browser", - "PLink", - "Plucker", - "NetFront", - "^WM5 PIE$", - "Xiino", - "iPhone", - "Opera Mobi", - "BlackBerry", - "Opera Mini", - "HP iPAQ", - "IEMobile", - "Profile/MIDP", - "Smartphone", - "Symbian ?OS", - "J2ME/MIDP", - "PalmSource", - "PalmOS", - "Windows CE", - "Opera Mini" - ], - # For the siteIndex content plugin. Whether or not the auto-generated siteIndex should # show hidden pages "siteIndex" : { "showHiddenPages" : 0 }, +#The complete path to the maintenance page. + "maintenancePage" : "/data/WebGUI/www/maintenance.html", + # An array of SPAM words. Used in the Post and WikiPage to block spam by sending the asset directly # to the trash. "spamStopWords" : [ diff --git a/sbin/preload.custom.example b/etc/preload.custom.example similarity index 100% rename from sbin/preload.custom.example rename to etc/preload.custom.example diff --git a/sbin/preload.exclude.example b/etc/preload.exclude.example similarity index 98% rename from sbin/preload.exclude.example rename to etc/preload.exclude.example index 9b2667aeb..c7fa1cc35 100644 --- a/sbin/preload.exclude.example +++ b/etc/preload.exclude.example @@ -2,7 +2,6 @@ # that you don't want to be loaded by modperl. This will decrease the overall # size of your modperl instances, which will increase performance, and reduce # memory use. -WebGUI::Cache::Database WebGUI::Auth::LDAP WebGUI::Asset::Wobject::WSClient WebGUI::Asset::File::ZipArchive diff --git a/lib/Plack/Middleware/Debug/Logger.pm b/lib/Plack/Middleware/Debug/Logger.pm new file mode 100644 index 000000000..dc7f4f1df --- /dev/null +++ b/lib/Plack/Middleware/Debug/Logger.pm @@ -0,0 +1,80 @@ +package Plack::Middleware::Debug::Logger; + +=head1 LEGAL + + ------------------------------------------------------------------- + WebGUI is Copyright 2001-2012 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 + ------------------------------------------------------------------- + +=head1 NAME + +Package Plack::Middleware::Debug::Logger + +=head1 DESCRIPTION + +This package is the interface to the WebGUI macro system. + +=cut + +use 5.008; +use strict; +use warnings; +use parent qw(Plack::Middleware::Debug::Base); +our $VERSION = '0.07'; + +=head2 run + +Entry subroutine for the Debug logger. Sets up $env->{'psgix.logger'} with a subref for +logging information to the Debug panel. + +=head3 $env->{'psgix.logger'} + +The subroutine takes a hash of arguments: + +=head4 level + +The severity level of the message. + +=head4 message + +The message to log. + +=cut + +sub run { + my ($self, $env, $panel) = @_; + + my $logger = $env->{'psgix.logger'}; + + my $log_output = []; + $env->{'psgix.logger'} = sub { + my ($args) = @_; + my $caller = (caller(1))[3] . '[' . (caller(0))[2] . '] '; + my $message = $args->{message}; + push @$log_output, $args->{level} => $caller . $message; + if ($logger) { + goto $logger; + } + }; + + return sub { + my $res = shift; + + if ($logger) { + $env->{'psgix.logger'} = $logger; + } + $panel->nav_subtitle(scalar @$log_output / 2 . ' messages'); + if (@$log_output) { + $panel->content('
    ' . $self->render_list_pairs( $log_output ) . '
    '); + } + }; +} + +1; + diff --git a/lib/Plack/Middleware/Debug/MySQLTrace.pm b/lib/Plack/Middleware/Debug/MySQLTrace.pm new file mode 100644 index 000000000..3e936b4de --- /dev/null +++ b/lib/Plack/Middleware/Debug/MySQLTrace.pm @@ -0,0 +1,103 @@ +package Plack::Middleware::Debug::MySQLTrace; +use 5.008; +use strict; +use warnings; +use parent qw(Plack::Middleware::Debug::Base); +use Plack::Util::Accessor qw(skip_packages); +use Sub::Uplevel (); +our $VERSION = '0.07'; + +sub run { + my($self, $env, $panel) = @_; + + my $old_trace; + my @output; + my $queries = 0; + if (defined &DBI::trace) { + $old_trace = DBI->trace; + open my $trace_handle, '>:via(Plack::Middleware::Debug::MySQLTrace::IO)', { + skip_packages => $self->skip_packages, + logger => sub { + my $sql = shift; + $sql =~ s/\s+\z//; + $sql =~ s/\A\s+//; + $queries++; + push @output, sprintf('%s - %s[%s]', $queries, (caller 1)[3], (caller 0)[2]), $sql; + }, + }; + DBI->trace('2,SQL', $trace_handle); + } + else { + return $panel->disable; + } + + return sub { + my $res = shift; + + if (defined $old_trace) { + DBI->trace($old_trace); + $panel->title('MySQL Trace'); + $panel->nav_title('MySQL Trace'); + $panel->nav_subtitle($queries . ' Queries'); + $panel->content('
    ' . $self->render_list_pairs(\@output) . '
    '); + } + }; +} + +package Plack::Middleware::Debug::MySQLTrace::IO; +use strict; +use 5.008; + +our $VERSION = '0.01'; + +sub PUSHED { + my ($class, $mode, $fh) = @_; + return bless {}, $class; +} + +sub OPEN { + my ($self, $logger, $mode, $fh) = @_; + %$self = %$logger; + return 1; +} + +sub WRITE { + my ($self, $buf, $fh) = @_; + if ($buf =~ /\ABinding parameters: /) { + my $sql = $buf; + $sql =~ s/\ABinding parameters: //; + my $depth; + for ( $depth = 1; caller($depth); $depth++) { + my $package = caller($depth); + next + if $package =~ /\ADB[ID](?:\z|::)/; + next + if $package =~ /::(?:st|db)\z/; + next + if $self->{skip_packages} && $package =~ $self->{skip_packages}; + last; + } + + Sub::Uplevel::uplevel $depth + 1, $self->{logger}, $sql; + } + return length($buf); +} + +sub CLOSE { + my $self = shift; + return 0; +} + +1; + +__END__ + +=head1 NAME + +Plack::Middleware::Debug::MySQLTrace - DBI MySQL trace panel + +=head1 SEE ALSO + +L + +=cut diff --git a/lib/Spectre/Admin.pm b/lib/Spectre/Admin.pm index 39da82de9..54003e58e 100644 --- a/lib/Spectre/Admin.pm +++ b/lib/Spectre/Admin.pm @@ -3,7 +3,7 @@ package Spectre::Admin; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -24,6 +24,9 @@ use POE::Component::IKC::Server; use POE::Component::IKC::Specifier; use Spectre::Cron; use Spectre::Workflow; +use WebGUI::Paths; +use WebGUI::Config; +use File::Spec; #------------------------------------------------------------------- @@ -135,38 +138,40 @@ Fetches the site from each defined site, and loads it into the Workflow and Cron =cut sub loadSiteData { - my ( $kernel, $self) = @_[ KERNEL, OBJECT ]; - my $configs = WebGUI::Config->readAllConfigs($self->{_config}->getWebguiRoot); + my ( $kernel, $self) = @_[ KERNEL, OBJECT ]; $self->debug("Reading site configs."); - foreach my $key (keys %{$configs}) { - next if $key =~ m/^demo/; - $self->debug("Fetching site data for $key"); - my $userAgent = new LWP::UserAgent; + my @configs = WebGUI::Paths->siteConfigs; + foreach my $configFile (@configs) { + my $shortName = (File::Spec->splitpath($configFile))[2]; + next if $shortName =~ m/\bdemo/; + my $siteConfig = WebGUI::Config->new($configFile); + $self->debug("Fetching site data for $shortName"); + my $userAgent = new LWP::UserAgent; if (!$self->config->get('ignoreEnvProxy')) { $userAgent->env_proxy; } $userAgent->agent("Spectre"); $userAgent->timeout(30); - my $url = "http://".$configs->{$key}->get("sitename")->[0].":".$self->{_config}->get("webguiPort").$configs->{$key}->get("gateway")."?op=spectreGetSiteData"; + my $url = "http://".$siteConfig->get("sitename")->[0].":".$self->{_config}->get("webguiPort").$siteConfig->get("gateway")."?op=spectreGetSiteData"; my $request = new HTTP::Request (GET => $url); my $response = $userAgent->request($request); if ($response->is_error) { - $self->error( "Couldn't connect to WebGUI site $key at $url. Response: " . $response->status_line ); + $self->error( "Couldn't connect to WebGUI site $shortName at $url. Response: " . $response->status_line ); } else { my $siteData = {}; eval { $siteData = JSON::decode_json($response->content); }; if ($@) { - $self->error("Couldn't fetch Spectre configuration data for $key : $@"); + $self->error("Couldn't fetch Spectre configuration data for $shortName : $@"); } else { - $self->debug("Loading workflow data for $key"); + $self->debug("Loading workflow data for $shortName"); foreach my $instance (@{$siteData->{workflow}}) { $kernel->post("workflow" ,"addInstance", $instance); } - $self->debug("Loading scheduler data for $key"); + $self->debug("Loading scheduler data for $shortName"); foreach my $task (@{$siteData->{cron}}) { - $task->{config} = $key; + $task->{config} = $shortName; $kernel->post("cron", "addJob", $task); } } @@ -194,7 +199,7 @@ sub new { my $class = shift; my $config = shift; my $debug = shift; - Log::Log4perl->init( $config->getWebguiRoot."/etc/log.conf" ); + Log::Log4perl->init( WebGUI::Paths->logConfig ); $Log::Log4perl::caller_depth = $Log::Log4perl::caller_depth+3; my $logger = Log::Log4perl->get_logger($config->getFilename); my $self = {_debug=>$debug, _config=>$config, _logger=>$logger}; @@ -244,29 +249,31 @@ sub runTests { my $class = shift; my $config = shift; print "Running connectivity tests.\n"; - my $configs = WebGUI::Config->readAllConfigs($config->getWebguiRoot); - foreach my $key (keys %{$configs}) { - next if $key =~ m/^demo/; - print "Testing $key\n"; + my @configs = WebGUI::Paths->siteConfigs; + foreach my $configFile (@configs) { + my $shortName = (File::Spec->splitpath($configFile))[2]; + next if $shortName =~ m/\bdemo/; + my $siteConfig = WebGUI::Config->new($configFile); + print "Testing $shortName\n"; my $userAgent = new LWP::UserAgent; if (!$config->get('ignoreEnvProxy')) { $userAgent->env_proxy; } $userAgent->agent("Spectre"); $userAgent->timeout(30); - my $url = "http://".$configs->{$key}->get("sitename")->[0].":".$config->get("webguiPort").$configs->{$key}->get("gateway")."?op=spectreTest"; + my $url = "http://".$siteConfig->get("sitename")->[0].":".$config->get("webguiPort").$siteConfig->get("gateway")."?op=spectreTest"; my $request = new HTTP::Request (GET => $url); my $response = $userAgent->request($request); if ($response->is_error) { - print "ERROR: Couldn't connect to WebGUI site $key\n"; + print "ERROR: Couldn't connect to WebGUI site $shortName\n"; } else { my $response = $response->content; if ($response eq "subnet") { - print "ERROR: Spectre cannot communicate with WebGUI. Perhaps you need to adjust the spectreSubnets setting in this config file: $key.\n"; + print "ERROR: Spectre cannot communicate with WebGUI. Perhaps you need to adjust the spectreSubnets setting in this config file: $shortName.\n"; } elsif ($response eq "spectre") { - print "ERROR: WebGUI cannot communicate with Spectre. Perhaps you need to adjust the spectreIp or spectrePort setting the this config file: $key."; + print "ERROR: WebGUI cannot communicate with Spectre. Perhaps you need to adjust the spectreIp or spectrePort setting the this config file: $shortName."; } elsif ($response ne "success") { - print "ERROR: Spectre received an invalid response ($response) from WebGUI while testing $key\n"; + print "ERROR: Spectre received an invalid response ($response) from WebGUI while testing $shortName\n"; } } } diff --git a/lib/Spectre/Cron.pm b/lib/Spectre/Cron.pm index d13f2b876..92a54175e 100644 --- a/lib/Spectre/Cron.pm +++ b/lib/Spectre/Cron.pm @@ -3,7 +3,7 @@ package Spectre::Cron; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -49,7 +49,6 @@ Gracefully shuts down the scheduler. sub _stop { my ($kernel, $self) = @_[KERNEL, OBJECT]; $self->debug("Stopping the scheduler."); - undef $self; } #------------------------------------------------------------------- diff --git a/lib/Spectre/Workflow.pm b/lib/Spectre/Workflow.pm index d265d13ca..a3a2389f5 100644 --- a/lib/Spectre/Workflow.pm +++ b/lib/Spectre/Workflow.pm @@ -3,7 +3,7 @@ package Spectre::Workflow; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -50,7 +50,6 @@ Gracefully shuts down the workflow manager. sub _stop { my ($kernel, $self) = @_[KERNEL, OBJECT]; $self->debug("Stopping workflow manager."); - undef $self; } #------------------------------------------------------------------- diff --git a/lib/WebGUI.pm b/lib/WebGUI.pm index 84c585bd8..73a2d5414 100644 --- a/lib/WebGUI.pm +++ b/lib/WebGUI.pm @@ -1,14 +1,12 @@ package WebGUI; - -our $VERSION = '7.10.24'; -our $STATUS = 'stable'; - +our $VERSION = '8.0.0'; +our $STATUS = 'beta'; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -20,19 +18,16 @@ our $STATUS = 'stable'; =cut use strict; -use Apache2::Access (); -use Apache2::Const -compile => qw(OK DECLINED HTTP_UNAUTHORIZED SERVER_ERROR); -use Apache2::Request; -use Apache2::RequestIO; -use Apache2::RequestUtil (); -use Apache2::ServerUtil (); -use APR::Request::Apache2; -use MIME::Base64 (); +use Moose; +use MooseX::NonMoose; use Scalar::Util qw/blessed/; use WebGUI::Config; use WebGUI::Pluggable; -use WebGUI::Session; -use WebGUI::User; +use WebGUI::Paths; +use WebGUI::Types; +use WebGUI::Exception; + +extends 'Plack::Component'; =head1 NAME @@ -40,7 +35,7 @@ Package WebGUI =head1 DESCRIPTION -An Apache mod_perl handler for WebGUI. +PSGI handler for WebGUI. =head1 SYNOPSIS @@ -52,143 +47,192 @@ These subroutines are available from this package: =cut -#------------------------------------------------------------------- +has config => ( + is => 'ro', + required => 1, + isa => 'WebGUI::Type::Config', + coerce => 1, +); -=head2 authen ( requestObject, user || undef, pass || undef, session ]) +=head2 call( $env ) -HTTP Basic auth for WebGUI. -Either called from L directly or indirectly when pushed back on the L handler stack. -HTTP Basic auth is an alternative authentication mechanism for WebGUI for robots such as RSS feed readers. -L does nothing with the return codes from here, but L uses them if this routine -gets pushed as a handler. +Every web requests results in a call to this subroutine. -=head3 requestObject - -The Apache2::RequestRec object passed in by Apache's mod_perl. - -=head3 user - -The username to authenticate with. Will pull from the request object if not specified. - -=head3 pass - -The password to authenticate with. Will pull from the request object if not specified. - -=head3 session - -A reference to a WebGUI::Session object. +=head3 $env =cut +sub call { + my $self = shift; + my $env = shift; -sub authen { - my ($request, $username, $password, $session) = @_; - $request = Apache2::Request->new($request); - my $log = $session->log; - my $server = Apache2::ServerUtil->server; - my $status = Apache2::Const::OK; + ##Enable size limiting + $env->{'psgix.harakiri'} = 1; - # set username and password if it's an auth handler - if ($username eq "") { - if ($request->auth_type eq "Basic") { - ($status, $password) = $request->get_basic_auth_pw; - $username = $request->user; - $username or return Apache2::Const::HTTP_UNAUTHORIZED; - } - else { - # per http://www.webgui.org/use/bugs/tracker/12198, failures result in the user remaining visitor, not them - # being denied access entirely. - # $status = Apache2::Const::HTTP_UNAUTHORIZED; # no - return $status; - } - } + my $session = $env->{'webgui.session'} + or die 'Missing WebGUI Session - check WebGUI::Middleware::Session'; + + # Handle the request + + $self->handle($session); + + my $response = $session->response; + my $psgi_response = $response->finalize; + + if ( ! $response->streaming ) { + + # Not streaming, so immediately tell the callback to return + # the response. In the future we could use an Event framework here + # to make this a non-blocking delayed response. + + return $psgi_response; - my $user = WebGUI::User->newByUsername($session, $username); - if ( ! defined $user ) { - # $status = Apache2::Const::HTTP_UNAUTHORIZED; # no - return $status; } + else { - my $authMethod = $user->authMethod; - if ($authMethod) { # we have an auth method, let's try to instantiate - my $auth = eval { WebGUI::Pluggable::instanciate("WebGUI::Auth::".$authMethod, "new", [ $session, $authMethod ] ) }; - if ($@) { # got an error - $log->error($@); - return Apache2::Const::SERVER_ERROR; - } - elsif ($auth->authenticate($username, $password)) { # lets try to authenticate - $log->info("BASIC AUTH: authenticated successfully"); - my $sessionId = $session->db->quickScalar("select sessionId from userSession where userId=?",[$user->userId]); - unless (defined $sessionId) { # no existing session found - $log->info("BASIC AUTH: creating new session"); - $sessionId = $session->id->generate; - $auth->_logLogin($user->userId, "success (HTTP Basic)"); + # Use the PSGI callback style response, which allows for nice things like + # delayed response/streaming body (server push). + # Delayed response prevents any nice MiddleWare::StackTrace-like modules from + # engaging so minimal error handling is done here. + + return sub { + my $responder = shift; + + # Construct the PSGI response + + eval { + # Ask PSGI server for a streaming writer object by returning only the first + # two elements of the array reference + my $writer = $responder->( [ $psgi_response->[0], $psgi_response->[1] ] ); + + # Store the writer object in the WebGUI::Session::Response object + $response->writer($writer); + + # Now call the callback that does the streaming + $response->streamer->($session); + + # And finally, clean up + $writer->close; + + # Close the session, because the WebGUI::Middleware::Session didn't + $session->close; + delete $env->{'webgui.session'}; + }; + if ( my $e = WebGUI::Error->caught ) { + if ($response->writer) { + # Response has already been started, so log error and close writer + $session->request->TRACE( + "Error detected after streaming response started: " . $e->message . "\n" . $e->trace->as_string + ); + $response->writer->close; + } + else { + $responder->( [ 500, [ 'Content-Type' => 'text/plain' ], [ "Internal Server Error" ] ] ); + } } - $session->{_var} = WebGUI::Session::Var->new($session, $sessionId); - $session->user({user=>$user}); - return Apache2::Const::OK; } } - - $log->security($username." failed to login using HTTP Basic Authentication"); - # $status = Apache2::Const::HTTP_UNAUTHORIZED; # no - return $status; } -#------------------------------------------------------------------- +=head2 handle ($session) -=head2 handler ( requestObject ) +Process the list of content handlers from the config file and then evaluate any Template objects which +may have been returned. -Primary http init/response handler for WebGUI. This method decides whether to hand off the request to contentHandler() or uploadsHandler() +=head3 $session -=head3 requestObject - -The Apache2::RequestRec object passed in by Apache's mod_perl. +A WebGUI::Session object. =cut -sub handler { - my $request = shift; #start with apache request object - $request = Apache2::Request->new($request); - my $configFile = shift || $request->dir_config('WebguiConfig'); #either we got a config file, or we'll build it from the request object's settings - my $server = Apache2::ServerUtil->server; #instantiate the server api - my $config = WebGUI::Config->new($server->dir_config('WebguiRoot'), $configFile); #instantiate the config object - my $error = ""; - my $matchUri = $request->uri; - my $gateway = $config->get("gateway"); - $matchUri =~ s{^$gateway}{/}; - my $gotMatch = 0; +sub handle { + my ( $self, $session ) = @_; - # url handlers - WEBGUI_FATAL: foreach my $handler (@{$config->get("urlHandlers")}) { - my ($regex) = keys %{$handler}; - if ($matchUri =~ m{$regex}i) { - my $output = eval { WebGUI::Pluggable::run($handler->{$regex}, "handler", [$request, $server, $config]) }; - if ($@) { - $error = $@; + # uncomment the following to short-circuit contentHandlers (for benchmarking PSGI scaffolding vs. modperl) + # $session->output->print("WebGUI PSGI with contentHandlers short-circuited for benchmarking\n"); + # return; + + # contentHandlers that return text will have that content returned as the response + # Alternatively, contentHandlers can stream the response body by calling: + # $session->response->stream_write() + # inside of a callback registered via: + # $session->response->stream( sub { } ) + # This is generally a good thing to do, unless you want to send a file. + + # uncomment the following to short-circuit contentHandlers with a streaming response: + # $session->response->stream( + # sub { + # my $session = shift; + # $session->output->print("WebGUI PSGI with contentHandlers short-circuited for benchmarking (streaming)\n"); + # #sleep 1; + # $session->output->print("...see?\n"); + # } + # ); + # return; + + local $SIG{__DIE__} = sub { WebGUI::Error::RunTime->throw( message => $_[0] ); }; + + # Look for the template preview HTTP headers + WebGUI::Asset::Template->processVariableHeaders($session); + + # TODO: refactor the following loop, find all instances of "chunked" and "empty" in codebase, etc.. + for my $handler (@{$session->config->get("contentHandlers")}) { + my $output = eval { WebGUI::Pluggable::run($handler, "handler", [ $session ] )}; + if ( $@ ) { + # re-throwing errors back out to plack is useless; to get the exception through to any middleware that + # want to report on it, we have to stash it in $env + # as long as our $SIG{__DIE__} is in effect, errors should always be objects + my $e = WebGUI::Error->caught; + $session->request->env->{'webgui.error'} = $e if $session->request->env->{'webgui.debug'}; + $session->log->error($e->package.":".$e->line." - ".$e->full_message, $@); + $session->log->debug($e->package.":".$e->line." - ".$e->trace, $@); + } + else { + + # Not an error + + # Stop if the contentHandler is going to stream the response body + return if $session->response->streaming; + + # We decide what to do next depending on what the contentHandler returned + + # A WebGUI::Asset::Template object means we should process it + if ( defined $output && blessed $output && $output->isa( 'WebGUI::Asset::Template' ) ) { + $session->response->sendHeader; + $session->output->print( $output->process ); last; } - else { - $gotMatch = 1; - if ($output ne Apache2::Const::DECLINED) { - return $output; - } + # "chunked" or "empty" means it took care of its own output needs + elsif (defined $output && ( $output eq "chunked" || $output eq "empty" )) { + #warn "chunked and empty no longer stream, use session->response->stream() instead"; + last; + } + # other non-empty output should be used as the response body + elsif (defined $output && $output ne "") { + # Auto-set the headers + $session->response->sendHeader; + + # Use contentHandler's return value as the output + $session->output->print($output); + last; + } + # Keep processing for success codes + elsif ($session->response->status < 200 || $session->response->status > 299) { + $session->response->sendHeader; + last; } } - } - return Apache2::Const::DECLINED if ($gotMatch); - - # can't handle the url due to error or misconfiguration - $request->push_handlers(PerlResponseHandler => sub { - print "This server is unable to handle the url '".$request->uri."' that you requested. ".$error; - return Apache2::Const::OK; - } ); - $request->push_handlers(PerlTransHandler => sub { return Apache2::Const::OK }); - return Apache2::Const::DECLINED; + } + + # Print out the template preview variables + $session->output->print( + WebGUI::Asset::Template->getVariableJson($session), 1 + ); + + return; } - - +no Moose; +__PACKAGE__->meta->make_immutable; 1; - diff --git a/lib/WebGUI/Account.pm b/lib/WebGUI/Account.pm index 622283d37..e6f6ec584 100644 --- a/lib/WebGUI/Account.pm +++ b/lib/WebGUI/Account.pm @@ -2,12 +2,42 @@ package WebGUI::Account; use strict; -use Class::InsideOut qw{ :std }; +use Moose; +use WebGUI::BestPractices; + +has session => ( + is => 'ro', + required => 1, +); + +has module => ( + is => 'ro', +); + +has method => ( + is => 'rw', + default => 'view', +); + +has uid => ( + is => 'rw', + default => '', +); + +has bare => ( + is => 'rw', + default => 0, +); + +has store => ( + is => 'rw', + default => sub { return {}; }, +); + use WebGUI::Exception; use Carp qw(croak); use WebGUI::International; use WebGUI::Pluggable; -use WebGUI::Utility; =head1 NAME @@ -37,8 +67,6 @@ Returns a reference to the current WebGUI::Session object. =cut -readonly session => my %session; - #------------------------------------------------------------------- =head2 module () @@ -47,8 +75,6 @@ Returns the string representation of the name of the last Account module called. =cut -readonly module => my %module; - #------------------------------------------------------------------- =head2 method () @@ -57,8 +83,6 @@ Returns the string representation of the name of the last method called on the m =cut -public method => my %method; - #------------------------------------------------------------------- =head2 uid ( [ userId ] ) @@ -71,8 +95,6 @@ Optionally set the userId. Normally this is never needed, but is provided for co =cut -public uid => my %uid; - #------------------------------------------------------------------- =head2 bare ( [ flag ] ) @@ -99,10 +121,6 @@ A hash reference of data to store. =cut -public store => my %store; #This is an all purpose hash to store stuff in: $self->store->{something} = "something" -public bare => my %bare; #This flag indicates that neither the layout nor style template should be applied - #to the output of the method. Think JSON/XML, etc. - #------------------------------------------------------------------- =head2 appendCommonVars ( var ) @@ -180,12 +198,11 @@ sub callMethod { } #Try to call the method - my $output = eval { $self->$method(@{$args}) }; - - #Croak on error - if($@) { - croak "Unable to run $method on $module: $@"; - return undef; + my $output = eval { $self->$method(@{$args}); }; + if( $@ ) { + my $e = WebGUI::Error->caught; + $e->{message} = "Unable to run $method on $module: $e->{message}"; + $e->rethrow; } #Return the output from the method call @@ -275,7 +292,7 @@ sub displayContent { return $output if($noStyle); #Wrap the layout in the user style - $session->http->setCacheControl("none"); + $session->response->setCacheControl("none"); return $session->style->process($output,$self->getStyleTemplateId); } @@ -303,7 +320,7 @@ Override this method to create settings for your Account Pluggin sub editSettingsForm { my $self = shift; - return ""; + return WebGUI::FormBuilder->new( $self->session ); } #------------------------------------------------------------------- @@ -425,31 +442,26 @@ The module being called =cut -sub new { - my $class = shift; - my $session = shift; - my $module = shift; - - unless (ref $session eq 'WebGUI::Session') { +around BUILDARGS => sub { + my $orig = shift; + my $class = shift; + my $properties; + if (ref $_[0] eq 'HASH') { + $properties = $_[0]; + } + else { + $properties->{session} = shift; + } + if (!(blessed $properties->{session} && ref $properties->{session} eq 'WebGUI::Session')) { WebGUI::Error::InvalidObject->throw( expected =>"WebGUI::Session", - got =>(ref $session), + got =>(ref $properties->{session}), error => q{Must provide a session variable} ); } - my $self = register $class; - my $id = id $self; - - $session { $id } = $session; - $module { $id } = $module; - $store { $id } = {}; - $method { $id } = "view"; - $uid { $id } = undef; - $bare { $id } = 0; - - return $self; -} + return $class->$orig($properties); +}; #------------------------------------------------------------------- @@ -488,9 +500,11 @@ sub processTemplate { return sprintf($i18n->get('Error: Cannot instantiate template'),$templateId,$className); } - $template = WebGUI::Asset->new($session, $templateId,"WebGUI::Asset::Template") unless (defined $template); + if (!defined $template) { + $template = eval { WebGUI::Asset->newById($session, $templateId); }; + } - unless (defined $template) { + if (Exception::Class->caught()) { $session->log->error("Can't instantiate template $templateId for class ".$className); my $i18n = WebGUI::International->new($session, 'Account'); return sprintf($i18n->get('Error: Cannot instantiate template'),$templateId,$className); @@ -536,25 +550,4 @@ sub showError { return $self->processTemplate($var,$templateId) } -#------------------------------------------------------------------- - -=head2 store ( ) - -This method returns an internal hash where you can store things for your Account Plugin. -The store is private to your plugin, to each user's copy of the plugin, and only lasts as -long as the session does. - -=cut - -#------------------------------------------------------------------- - -=head2 store ( ) - -This method returns an internal hash where you can store things for your Account Plugin. -The store is private to your plugin, to each user's copy of the plugin, and only lasts as -long as the session does. - -=cut - - 1; diff --git a/lib/WebGUI/Account/Contributions.pm b/lib/WebGUI/Account/Contributions.pm index 73e17c70c..57a2d95f2 100644 --- a/lib/WebGUI/Account/Contributions.pm +++ b/lib/WebGUI/Account/Contributions.pm @@ -5,8 +5,8 @@ use strict; use WebGUI::Exception; use WebGUI::International; use WebGUI::Pluggable; -use WebGUI::Utility; use WebGUI::Operation::Auth; +use Tie::IxHash; use base qw/WebGUI::Account/; @@ -41,23 +41,23 @@ sub editSettingsForm { my $session = $self->session; my $setting = $session->setting; my $i18n = WebGUI::International->new($session,'Account_Contributions'); - my $f = WebGUI::HTMLForm->new($session); + my $f = WebGUI::FormBuilder->new($session); - $f->template( + $f->addField( "template", name => "contribStyleTemplateId", value => $self->getStyleTemplateId, namespace => "style", label => $i18n->get("contrib style template label"), hoverHelp => $i18n->get("contrib style template hoverHelp") ); - $f->template( + $f->addField( "template", name => "contribLayoutTemplateId", value => $self->getLayoutTemplateId, namespace => "Account/Layout", label => $i18n->get("contrib layout template label"), hoverHelp => $i18n->get("contrib layout template hoverHelp") ); - $f->template( + $f->addField( "template", name => "contribViewTemplateId", value => $self->getViewTemplateId, namespace => "Account/Contrib/View", @@ -65,7 +65,7 @@ sub editSettingsForm { hoverHelp => $i18n->get("contrib view template hoverHelp") ); - return $f->printRowsOnly; + return $f; } #------------------------------------------------------------------- @@ -196,9 +196,13 @@ sub www_view { #Export page to template my @contribs = (); - foreach my $row ( @{$p->getPageData} ) { + ROW: foreach my $row ( @{$p->getPageData} ) { my $assetId = $row->{assetId}; - my $asset = WebGUI::Asset->newByDynamicClass( $session, $assetId ); + my $asset = eval { WebGUI::Asset->newById( $session, $assetId ); }; + if (Exception::Class->caught()) { + $session->log->error("Unable to instanciate assetId $assetId: $@"); + next ROW; + } my $props = $asset->get; $props->{url} = $asset->getUrl; push(@contribs,$props); @@ -211,12 +215,12 @@ sub www_view { tie my %rpps, "Tie::IxHash"; %rpps = (25 => "25", 50 => "50", 100=>"100"); - $var->{'contributions_rpp' } = WebGUI::Form::selectBox($session,{ + $var->{'contributions_rpp' } = WebGUI::Form::SelectBox->new($session,{ name =>"rpp", options => \%rpps, value => $session->form->get("rpp") || 25, extras => q{onchange="location.href='}.$var->{'rpp_url'}.q{;rpp='+this.options[this.selectedIndex].value"} - }); + })->toHtml; $self->appendCommonVars($var); $p->appendTemplateVars($var); diff --git a/lib/WebGUI/Account/FriendManager.pm b/lib/WebGUI/Account/FriendManager.pm index ae3333ea9..e28a90016 100644 --- a/lib/WebGUI/Account/FriendManager.pm +++ b/lib/WebGUI/Account/FriendManager.pm @@ -6,7 +6,7 @@ use WebGUI::Exception; use WebGUI::Friends; use WebGUI::International; use WebGUI::Pluggable; -use WebGUI::Utility; +use Tie::IxHash; use base qw/WebGUI::Account/; use List::MoreUtils qw/uniq/; @@ -87,29 +87,29 @@ sub editSettingsForm { my $self = shift; my $session = $self->session; my $i18n = WebGUI::International->new($session,'Account_FriendManager'); - my $f = WebGUI::HTMLForm->new($session); + my $f = WebGUI::FormBuilder->new($session); - $f->template( + $f->addField( "template", name => "fmStyleTemplateId", value => $self->getStyleTemplateId, namespace => "style", label => $i18n->get("style template label"), hoverHelp => $i18n->get("style template hoverHelp"), ); - $f->template( + $f->addField( "template", name => "fmLayoutTemplateId", value => $self->getLayoutTemplateId, namespace => "Account/Layout", label => $i18n->get("layout template label"), hoverHelp => $i18n->get("layout template hoverHelp"), ); - $f->group( + $f->addField( "group", name => "groupIdAdminFriends", value => $session->setting->get('groupIdAdminFriends'), label => $i18n->get("setting groupIdAdminFriends label"), hoverHelp => $i18n->get("setting groupIdAdminFriends hoverHelp"), ); - $f->group( + $f->addField( "group", name => "groupsToManageFriends", value => $session->setting->get('groupsToManageFriends'), multiple => 1, @@ -118,28 +118,28 @@ sub editSettingsForm { hoverHelp => $i18n->get("groupsToManageFriends hoverHelp"), defaultValue => [2,3], ); - $f->template( + $f->addField( "template", name => "fmViewTemplateId", value => $self->session->setting->get("fmViewTemplateId"), namespace => "Account/FriendManager/View", label => $i18n->get("view template label"), hoverHelp => $i18n->get("view template hoverHelp"), ); - $f->template( + $f->addField( "template", name => "fmEditTemplateId", value => $self->session->setting->get("fmEditTemplateId"), namespace => "Account/FriendManager/Edit", label => $i18n->get("edit template label"), hoverHelp => $i18n->get("edit template hoverHelp"), ); - $f->yesNo( + $f->addField( "yesNo", name => "overrideAbleToBeFriend", value => $self->session->setting->get("overrideAbleToBeFriend"), label => $i18n->get("override abletobefriend label"), hoverHelp => $i18n->get("override abletobefriend hoverHelp"), ); - return $f->printRowsOnly; + return $f; } #------------------------------------------------------------------- @@ -184,27 +184,13 @@ sub www_editFriends { my $groupName = shift || $form->get('groupName'); - ##List users in my friends group. Each friend gets a delete link. - my $friendsList = $user->friends->getUserList(); - my @friends_loop = (); - while (my ($userId, $username) = each %{ $friendsList }) { - push @friends_loop, { - userId => $userId, - username => $username, - checkForm => WebGUI::Form::checkbox($session, { - name => 'friendToAxe', - value => $userId, - }), - }; - } - - ##List users in all administrated groups. Friends are added one at a time. + # Get the users we can add my @manageableUsers = (); - if ($groupName) { + if ($groupName) { # Only adding users from a single group my $group = WebGUI::Group->find($session, $groupName); push @manageableUsers, @{ $group->getUsersNotIn($user->friends->getId, 'withoutExpired') }; } - else { + else { # Defaults to groups selected in settings my $groupIds = $session->setting->get('groupsToManageFriends'); my @groupIds = split "\n", $groupIds; foreach my $groupId (@groupIds) { @@ -214,11 +200,8 @@ sub www_editFriends { } @manageableUsers = uniq @manageableUsers; } - my %usersToAdd = (); - tie %usersToAdd, 'Tie::IxHash'; my $manager = $session->user; my $i18n = WebGUI::International->new($session); - $usersToAdd{0} = $i18n->get('Select One'); my @usersToAdd = (); my $overrideProfile = $session->setting->get('overrideAbleToBeFriend'); USERID: foreach my $newFriendId (@manageableUsers) { @@ -227,42 +210,52 @@ sub www_editFriends { ##We don't use acceptsFriendsRequests here because it's overkill. ##No need to check invitations, since friends are managed. ##Existing friends are already filtered out. - next USERID unless $user->profileField('ableToBeFriend') || $overrideProfile; + next USERID unless $user->get('ableToBeFriend') || $overrideProfile; push @usersToAdd, [ $newFriendId, $user->username ]; } + tie my %usersToAdd, 'Tie::IxHash'; + $usersToAdd{0} = $i18n->get('Select One'); @usersToAdd = sort { $a->[1] cmp $b->[1] } @usersToAdd; foreach my $newFriend (@usersToAdd) { $usersToAdd{$newFriend->[0]} = $newFriend->[1]; } my $var; - $var->{formHeader} = WebGUI::Form::formHeader($session, { - action => $self->getUrl('module=friendManager;do=editFriendsSave'), - }) - . WebGUI::Form::hidden($session, { name => 'userId', value => $user->userId } ); - if ($groupName) { - $var->{formHeader} .= WebGUI::Form::hidden($session, { name => 'groupName', value => $groupName }); - } - $var->{addUserForm} = WebGUI::Form::selectBox($session, { - name => 'userToAdd', - options => \%usersToAdd, - }); - $var->{friends_loop} = \@friends_loop; - $var->{has_friends} = scalar @friends_loop; - $var->{submit} = WebGUI::Form::submit($session); - $var->{formFooter} = WebGUI::Form::formFooter($session); + $var->{has_friends} = @{$user->friends->getUsers("noexpired")}; $var->{username} = $user->username; $var->{userId} = $user->userId; $var->{manageUrl} = $self->getUrl('module=friendManager;do=view'); - $var->{removeAll} = WebGUI::Form::checkbox($session, { name => 'removeAllFriends', value => 'all', }); - if (! $groupName) { - $var->{addManagers} = WebGUI::Form::checkbox($session, { name => 'addManagers', value => 'addManagers', }); - } if ($groupName) { $var->{groupName} = $groupName; $var->{viewAllUrl} = $self->getUrl('module=friendManager;do=editFriends;userId='.$userId); } + + my $fb = WebGUI::FormBuilder->new( $session, + name => "friendManager", + action => $self->getUrl('module=friendManager;do=editFriendsSave') + ); + $fb->addField( "Hidden", name => "userId", value => $user->userId ); + if ( $groupName ) { + $fb->addField( "Hidden", name => 'groupName', value => $groupName ); + } + + # Add checkboxes to remove friends + my $friendsList = $user->friends->getUserList(); + while (my ($userId, $username) = each %{ $friendsList }) { + $fb->addField( "Checkbox", name => 'friendToAxe', value => $userId, label => $username ); + } + + # Add a selectbox to add friends + $fb->addField( "SelectBox", name => 'userToAdd', options => \%usersToAdd ); + + $fb->addField( "Checkbox", name => 'removeAllFriends', value => 'all' ); + if (!$groupName) { + $fb->addField( "Checkbox", name => 'addManagers', value => 'addManagers' ); + } + $fb->addField( 'Submit', name => "send" ); + $fb->toTemplateVars( "form_", $var ); + return $self->processTemplate($var,$session->setting->get("fmEditTemplateId")); } @@ -380,7 +373,7 @@ sub www_getFriendsAsJson { $results{records} = \@records; $results{'sort'} = 'username'; $self->bare(1); - $session->http->setMimeType('application/json'); + $session->response->content_type('application/json'); my $json = JSON::to_json(\%results); return $json; } diff --git a/lib/WebGUI/Account/Friends.pm b/lib/WebGUI/Account/Friends.pm index 37dab7f08..b704a42da 100644 --- a/lib/WebGUI/Account/Friends.pm +++ b/lib/WebGUI/Account/Friends.pm @@ -5,7 +5,7 @@ use strict; use WebGUI::Exception; use WebGUI::International; use WebGUI::Pluggable; -use WebGUI::Utility; +use Tie::IxHash; use base qw/WebGUI::Account/; =head1 NAME @@ -66,12 +66,12 @@ sub canView { my $session = $self->session; my $uid = $self->uid; - return 1 if (($session->user->userId eq $uid || $uid eq "") && $session->user->profileField('ableToBeFriend')); + return 1 if (($session->user->userId eq $uid || $uid eq "") && $session->user->get('ableToBeFriend')); my $user = WebGUI::User->new($session,$uid); return 0 if($user->isVisitor); #This should never happen but let's make sure - return 0 unless ($user->profileField('ableToBeFriend')); #User doesn't have friends enabled - return WebGUI::User->new($session,$uid)->profileIsViewable($session->user); #User's profile isn't viewable by this user + return 0 unless ($user->get('ableToBeFriend')); #User doesn't have friends enabled + return $user->profileIsViewable($session->user); #User's profile isn't viewable by this user } #------------------------------------------------------------------- @@ -86,37 +86,37 @@ sub editSettingsForm { my $self = shift; my $session = $self->session; my $i18n = WebGUI::International->new($session,'Account_Friends'); - my $f = WebGUI::HTMLForm->new($session); + my $f = WebGUI::FormBuilder->new($session); - $f->template( + $f->addField( "template", name => "friendsStyleTemplateId", value => $self->getStyleTemplateId, namespace => "style", label => $i18n->get("friends style template label"), hoverHelp => $i18n->get("friends style template hoverHelp") ); - $f->template( + $f->addField( "template", name => "friendsLayoutTemplateId", value => $self->getLayoutTemplateId, namespace => "Account/Layout", label => $i18n->get("friends layout template label"), hoverHelp => $i18n->get("friends layout template hoverHelp") ); - $f->template( + $f->addField( "template", name => "friendsViewTemplateId", value => $self->getViewTemplateId, namespace => "Account/Friends/View", label => $i18n->get("friends view template label"), hoverHelp => $i18n->get("friends view template hoverHelp") ); - $f->template( + $f->addField( "template", name => "friendsEditTemplateId", value => $self->getEditTemplateId, namespace => "Account/Friends/Edit", label => $i18n->get("friends edit template label"), hoverHelp => $i18n->get("friends edit template hoverHelp") ); - $f->template( + $f->addField( "template", name => "friendsSendRequestTemplateId", value => $self->getSendRequestTemplateId, namespace => "Account/Friends/SendRequest", @@ -124,7 +124,7 @@ sub editSettingsForm { hoverHelp => $i18n->get("friends send request template hoverHelp") ); - $f->template( + $f->addField( "template", name => "friendsErrorTemplateId", value => $self->getErrorTemplateId, namespace => "Account/Friends/Error", @@ -132,7 +132,7 @@ sub editSettingsForm { hoverHelp => $i18n->get("friends error template hoverHelp") ); - $f->template( + $f->addField( "template", name => "friendsConfirmTemplateId", value => $self->getConfirmTemplateId, namespace => "Account/Friends/Confirm", @@ -140,7 +140,7 @@ sub editSettingsForm { hoverHelp => $i18n->get("friends confirm template hoverHelp") ); - $f->template( + $f->addField( "template", name => "friendsRemoveConfirmTemplateId", value => $self->getRemoveConfirmTemplateId, namespace => "Account/Friends/Confirm", @@ -148,7 +148,7 @@ sub editSettingsForm { hoverHelp => $i18n->get("friends remove confirm template hoverHelp") ); - return $f->printRowsOnly; + return $f; } #------------------------------------------------------------------- @@ -402,33 +402,37 @@ sub www_sendFriendsRequest { $var->{'user_full_name' } = $user->getWholeName; $var->{'user_member_since' } = $user->dateCreated; + $var->{'cancel_url' } = $user->getProfileUrl; + my $defaultComment = sprintf( $i18n->get('default friend comments'), $user->getFirstName, $session->user->getFirstName ); - $var->{'form_message_text'} = WebGUI::Form::textarea($session, { + + my $form = WebGUI::FormBuilder->new( $session, + name => "messageForm", + action => $self->getUrl( "module=friends;do=sendFriendsRequestSave;uid=$uid" ), + ); + $form->addField( "HTMLArea", + name => "message", + value => $defaultComment, + width => 600, + ); + + # Add an alternative to the rich editor + $var->{'form_message_text'} = WebGUI::Form::Textarea->new($session, { name =>"message", value =>$defaultComment, width =>600, height =>200 - }); + })->toHtml; - $var->{'form_message_rich'} = WebGUI::Form::HTMLArea($session, { - name => "message", - value => $defaultComment, - width => "600", - }); + $form->addField( "Submit", + name => "submit", + ); - $var->{'form_header' } = WebGUI::Form::formHeader($session,{ - action => $self->getUrl("module=friends;do=sendFriendsRequestSave;uid=$uid"), - extras => q{name="messageForm"} - }); - - $var->{'submit_button' } = WebGUI::Form::submit($session,{}); - $var->{'form_footer' } = WebGUI::Form::formFooter($session, {}); - - $var->{'cancel_url' } = $user->getProfileUrl; + $form->toTemplateVars( "form_", $var ); return $self->processTemplate($var,$self->getSendRequestTemplateId); } @@ -491,7 +495,7 @@ sub www_view { my $displayView = $uid ne ""; $var->{'display_message'} = $msg; - unless ($user->profileField('ableToBeFriend') && $user->profileIsViewable($session->user)) { + unless ($user->get('ableToBeFriend') && $user->profileIsViewable($session->user)) { my $i18n = WebGUI::International->new($session,"Account_Friends"); my $errorMsg = ""; if($var->{'can_edit'}) { diff --git a/lib/WebGUI/Account/Inbox.pm b/lib/WebGUI/Account/Inbox.pm index 7c02f1df7..434debabe 100644 --- a/lib/WebGUI/Account/Inbox.pm +++ b/lib/WebGUI/Account/Inbox.pm @@ -2,11 +2,12 @@ package WebGUI::Account::Inbox; use strict; -use WebGUI::Form; +use WebGUI::FormBuilder; use WebGUI::Exception; use WebGUI::International; use WebGUI::Pluggable; -use WebGUI::Utility; +use Tie::IxHash; +use Email::Valid; use base qw/WebGUI::Account/; =head1 NAME @@ -58,7 +59,7 @@ sub appendCommonVars { $var->{'view_invitations_url' } = $self->getUrl("module=inbox;do=manageInvitations"); $var->{'unread_message_count' } = $inbox->getUnreadMessageCount($user->userId); $var->{'invitation_count' } = $self->getInvitationCount; - $var->{'invitations_enabled' } = $user->profileField('ableToBeFriend'); + $var->{'invitations_enabled' } = $user->get('ableToBeFriend'); $var->{'user_invitations_enabled'} = $session->setting->get("inboxInviteUserEnabled"); $var->{'invite_friend_url' } = $self->getUrl("module=inbox;do=inviteUser"); @@ -95,168 +96,168 @@ sub editSettingsForm { my $session = $self->session; my $setting = $session->setting; my $i18n = WebGUI::International->new($session,'Account_Inbox'); - my $f = WebGUI::HTMLForm->new($session); + my $f = WebGUI::FormBuilder->new($session); - $f->template( + $f->addField( "Template", name => "inboxStyleTemplateId", value => $self->getStyleTemplateId, namespace => "style", label => $i18n->get("inbox style template label"), hoverHelp => $i18n->get("inbox style template hoverHelp") ); - $f->template( + $f->addField( "Template", name => "inboxLayoutTemplateId", value => $self->getLayoutTemplateId, namespace => "Account/Layout", label => $i18n->get("inbox layout template label"), hoverHelp => $i18n->get("inbox layout template hoverHelp") ); - $f->template( + $f->addField( "Template", name => "inboxViewTemplateId", value => $self->getViewTemplateId, namespace => "Account/Inbox/View", label => $i18n->get("inbox view template label"), hoverHelp => $i18n->get("inbox view template hoverHelp") ); - $f->template( + $f->addField( "Template", name => "inboxViewMessageTemplateId", value => $self->getViewMessageTemplateId, namespace => "Account/Inbox/ViewMessage", label => $i18n->get("inbox view message template label"), hoverHelp => $i18n->get("inbox view message template hoverHelp") ); - $f->template( + $f->addField( "Template", name => "inboxSendMessageTemplateId", value => $self->getSendMessageTemplateId, namespace => "Account/Inbox/SendMessage", label => $i18n->get("inbox send message template label"), hoverHelp => $i18n->get("inbox send message template hoverHelp") ); - $f->template( + $f->addField( "Template", name => "inboxMessageConfirmationTemplateId", value => $self->getMessageConfirmTemplateId, namespace => "Account/Inbox/Confirm", label => $i18n->get("inbox message confirm template label"), hoverHelp => $i18n->get("inbox message confirm template hoverHelp") ); - $f->template( + $f->addField( "Template", name => "inboxErrorTemplateId", value => $self->getInboxErrorTemplateId, namespace => "Account/Inbox/Error", label => $i18n->get("inbox error message template label"), hoverHelp => $i18n->get("inbox error message template hoverHelp") ); - $f->template( + $f->addField( "Template", name => "inboxManageInvitationsTemplateId", value => $self->getManageInvitationsTemplateId, namespace => "Account/Inbox/ManageInvitations", label => $i18n->get("inbox manage invitations template label"), hoverHelp => $i18n->get("inbox manage invitations template hoverHelp") ); - $f->template( + $f->addField( "Template", name => "inboxViewInvitationTemplateId", value => $self->getViewInvitationTemplateId, namespace => "Account/Inbox/ViewInvitation", label => $i18n->get("inbox view invitation template label"), hoverHelp => $i18n->get("inbox view invitation template hoverHelp") ); - $f->template( + $f->addField( "Template", name => "inboxInvitationConfirmTemplateId", value => $self->getInvitationConfirmTemplateId, namespace => "Account/Inbox/Confirm", label => $i18n->get("invitation confirm message template label"), hoverHelp => $i18n->get("invitation confirm message template hoverHelp") ); - $f->yesNo( + $f->addField( "YesNo", name => "inboxInviteUserEnabled", value => $setting->get("inboxInviteUserEnabled"), label => $i18n->get("invite user enabled template label"), hoverHelp => $i18n->get("invite user enabled template hoverHelp") ); - $f->yesNo( + $f->addField( "YesNo", name => "inboxInviteUserRestrictSubject", value => $setting->get("inboxInviteUserRestrictSubject"), label => $i18n->get("invite user restrict subject template label"), hoverHelp => $i18n->get("invite user restrict subject template hoverHelp") ); - $f->text( + $f->addField( "Text", name => "inboxInviteUserSubject", value => $setting->get("inboxInviteUserSubject"), label => $i18n->get("invite user subject template label"), hoverHelp => $i18n->get("invite user subject template hoverHelp") ); - $f->yesNo( + $f->addField( "YesNo", name => "inboxInviteUserRestrictMessage", value => $setting->get("inboxInviteUserRestrictMessage"), label => $i18n->get("invite user restrict message template label"), hoverHelp => $i18n->get("invite user restrict message template hoverHelp") ); - $f->textarea( + $f->addField( "Textarea", name => "inboxInviteUserMessage", value => $setting->get("inboxInviteUserMessage"), height => 300, label => $i18n->get("invite user message label"), hoverHelp => $i18n->get("invite user message hoverHelp") ); - $f->template( + $f->addField( "Template", name => "inboxInviteUserMessageTemplateId", value => $self->getInviteUserMessageTemplateId, namespace => "Account/Inbox/InviteUserMessage", label => $i18n->get("invite user message template label"), hoverHelp => $i18n->get("invite user message template hoverHelp") ); - $f->template( + $f->addField( "Template", name => "inboxInviteUserTemplateId", value => $self->getInviteUserTemplateId, namespace => "Account/Inbox/InviteUser", label => $i18n->get("invite user template label"), hoverHelp => $i18n->get("invite user template hoverHelp") ); - $f->template( + $f->addField( "Template", name => "inboxInviteUserConfirmTemplateId", value => $self->getInviteUserConfirmTemplateId, namespace => "Account/Inbox/InviteUserConfirm", label => $i18n->get("invite user confirm template label"), hoverHelp => $i18n->get("invite user confirm template hoverHelp") ); - $f->selectRichEditor( + $f->addField( "SelectRichEditor", name => "inboxRichEditId", value => $self->getRichEditorId, label => $i18n->get("inbox rich editor label"), hoverHelp => $i18n->get("inbox rich editor description"), ); - $f->yesNo( + $f->addField( "YesNo", name => "inboxCopySender", value => $setting->get("inboxCopySender"), label => $i18n->get("inbox copy sender label"), hoverHelp => $i18n->get("inbox copy sender hoverHelp") ); - $f->yesNo( + $f->addField( "YesNo", name => 'sendInboxNotificationsOnly', label => $i18n->get('send inbox notifications only'), hoverHelp => $i18n->get('send inbox notifications only help'), defaultValue => $setting->get('sendInboxNotificationsOnly'), ); - $f->yesNo( + $f->addField( "YesNo", name => 'sendRejectNotice', label => $i18n->get('send reject notice'), hoverHelp => $i18n->get('send reject notice help'), defaultValue => $setting->get('sendRejectNotice'), ); - $f->text( + $f->addField( "Text", name => 'inboxNotificationsSubject', label => $i18n->get('inbox notifications subject'), hoverHelp => $i18n->get('inbox notifications subject help'), defaultValue => $setting->get('inboxNotificationsSubject'), ); - $f->template( + $f->addField( "Template", name => 'inboxNotificationTemplateId', label => $i18n->get('inbox notification template'), hoverHelp => $i18n->get('inbox notification template help'), defaultValue => $self->getInboxNotificationTemplateId, namespace => 'Account/Inbox/Notification', ); - $f->template( + $f->addField( "Template", name => 'inboxSmsNotificationTemplateId', label => $i18n->get('inbox sms notification template'), hoverHelp => $i18n->get('inbox sms notification template help'), @@ -264,7 +265,7 @@ sub editSettingsForm { namespace => 'Account/Inbox/Notification', ); - return $f->printRowsOnly; + return $f; } #------------------------------------------------------------------- @@ -849,7 +850,7 @@ sub www_inviteUser { $var->{'submit_button' } = WebGUI::Form::submit($session,{}); $var->{'form_footer' } = WebGUI::Form::formFooter($session, {}); - $var->{'back_url' } = $session->env->get("HTTP_REFERER") || $var->{'view_inbox_url'}; + $var->{'back_url' } = $session->request->referer || $var->{'view_inbox_url'}; #Add common template variable for displaying the inbox $self->appendCommonVars($var); @@ -893,7 +894,7 @@ sub www_inviteUserSave { return $self->www_inviteUser($i18n->get('missing message')) unless $message; #Profile Email address check - my $email = $session->user->profileField('email'); + my $email = $session->user->get('email'); unless ($email) { return $self->www_inviteUser($i18n->get('no email')); } @@ -907,7 +908,7 @@ sub www_inviteUserSave { my $db = $session->db; my @toList = split /[;,]/, $to; for my $inviteeEmail (@toList) { - unless ( $inviteeEmail =~ WebGUI::Utility::emailRegex ) { + unless ( Email::Valid->address($inviteeEmail) ) { return $self->www_inviteUser( sprintf $i18n->get('invalid email'), $inviteeEmail ); } @@ -1098,7 +1099,7 @@ sub www_sendMessage { my $messageId = $form->get("messageId"); my $userId = $form->get("userId"); my $pageUrl = $session->url->page; - my $backUrl = $session->env->get("HTTP_REFERER") || $var->{'view_inbox_url'}; + my $backUrl = $session->request->referer || $var->{'view_inbox_url'}; my $errorMsg = ""; if($messageId) { @@ -1175,7 +1176,7 @@ sub www_sendMessage { $activeFriendCount++; } - my $isChecked = WebGUI::Utility::isIn($friendId,@friendsChecked); + my $isChecked = $friendId ~~ @friendsChecked; my $friendHash = { 'friend_id' => $friendId, 'friend_name' => $friends->{$friendId}, @@ -1358,8 +1359,8 @@ sub www_sendMessageSave { my $smsAddress = $user->getInboxSmsNotificationAddress; if ( $smsAddress && !$isSender ) { my $smsNotificationTemplate - = WebGUI::Asset::Template->new($session, $self->getInboxSmsNotificationTemplateId); - if ($smsNotificationTemplate) { + = WebGUI::Asset::Template->newById($session, $self->getInboxSmsNotificationTemplateId); + if (! Exception::Class->caught() ) { ##Create template variables my $var = { fromUsername => $fromUser->username, @@ -1391,8 +1392,8 @@ sub www_sendMessageSave { if (!$notificationAddresses) { $messageOptions->{no_email} = 1; } else { - my $template = WebGUI::Asset::Template->new($session, $self->getInboxNotificationTemplateId); - if ($template) { + my $template = eval { WebGUI::Asset::Template->newById($session, $self->getInboxNotificationTemplateId); }; + if (! Exception::Class->caught() ) { ##Create template variables my $var = { fromUsername => $fromUser->username, @@ -1532,7 +1533,7 @@ sub www_view { my $userSql = $inbox->getMessageSql(undef, { 'select' => <new($session, 'Account_Inbox'); diff --git a/lib/WebGUI/Account/Profile.pm b/lib/WebGUI/Account/Profile.pm index 6e2924cbd..5690337ad 100644 --- a/lib/WebGUI/Account/Profile.pm +++ b/lib/WebGUI/Account/Profile.pm @@ -7,7 +7,7 @@ use WebGUI::International; use WebGUI::Pluggable; use WebGUI::ProfileCategory; use WebGUI::ProfileField; -use WebGUI::Utility; +use WebGUI::Shop::AddressBook; use base qw/WebGUI::Account/; =head1 NAME @@ -114,7 +114,7 @@ sub appendCommonVars { $self->SUPER::appendCommonVars($var); $var->{'edit_profile_url' } = $self->getUrl("module=profile;do=edit"); - $var->{'invitations_enabled' } = $user->profileField('ableToBeFriend'); + $var->{'invitations_enabled' } = $user->get('ableToBeFriend'); $var->{'profile_category_loop'} = []; #Append the categories @@ -147,37 +147,37 @@ sub editSettingsForm { my $session = $self->session; my $setting = $session->setting; my $i18n = WebGUI::International->new($session,'Account_Profile'); - my $f = WebGUI::HTMLForm->new($session); + my $f = WebGUI::FormBuilder->new($session); - $f->template( + $f->addField( "template", name => "profileStyleTemplateId", value => $self->getStyleTemplateId, namespace => "style", label => $i18n->get("profile style template label"), hoverHelp => $i18n->get("profile style template hoverHelp") ); - $f->template( + $f->addField( "template", name => "profileLayoutTemplateId", value => $self->getLayoutTemplateId, namespace => "Account/Layout", label => $i18n->get("profile layout template label"), hoverHelp => $i18n->get("profile layout template hoverHelp") ); - $f->template( + $f->addField( "template", name => "profileEditTemplateId", value => $self->getEditTemplateId, namespace => "Account/Profile/Edit", label => $i18n->get("profile edit template label"), hoverHelp => $i18n->get("profile edit template hoverHelp") ); - $f->template( + $f->addField( "template", name => "profileViewTemplateId", value => $self->getViewTemplateId, namespace => "Account/Profile/View", label => $i18n->get("profile view template label"), hoverHelp => $i18n->get("profile view template hoverHelp") ); - $f->template( + $f->addField( "template", name => "profileErrorTemplateId", value => $self->getErrorTemplateId, namespace => "Account/Profile/Error", @@ -186,7 +186,7 @@ sub editSettingsForm { ); - return $f->printRowsOnly; + return $f; } @@ -243,9 +243,9 @@ sub getExtrasStyle { my $requiredStyle = q{class="profilefield_required"}; my $errorStyle = q{class="profilefield_error"}; #Required Field Not Filled In and Error Returend - return $errorStyle if(WebGUI::Utility::isIn($field->getId,@{$fieldErrors})); + return $errorStyle if $field->getId ~~ $fieldErrors; return "" unless ($field->isRequired); - return $requiredStyle unless($self->session->user->profileField($field->getId) || $fieldValue); + return $requiredStyle unless($self->session->user->get($field->getId) || $fieldValue); return $requiredStyleOff; } @@ -360,7 +360,7 @@ sub www_edit { foreach my $field (@{ $category->getFields( { editable => 1 } ) }) { my $fieldId = $field->getId; my $fieldLabel = $field->getLabel; - my $fieldForm = $field->formField({ extras=>$self->getExtrasStyle($field,\@errorFields,$user->profileField($fieldId)) }); + my $fieldForm = $field->formField({ extras=>$self->getExtrasStyle($field,\@errorFields,$user->get($fieldId)) }); my $fieldRequired = $field->isRequired; my $fieldExtras = $field->getExtras; my $fieldViewable = $field->isViewable; @@ -463,9 +463,7 @@ sub www_editSave { if($e = WebGUI::Error->caught('WebGUI::Error::ObjectNotFound')) { #Get home address only mappings to avoid creating addresses with just firstName, lastName, email my %home_address_map = %{$address_mappings}; - foreach my $exclude ( qw{ firstName lastName email } ) { - delete $home_address_map{$exclude}; - } + delete $home_address_map{qw/firstName lastName email/}; #Add the profile address for the user if there are homeAddress fields if( grep { $address->{$_} } values %home_address_map ) { $address->{label} = "Profile Address"; @@ -524,7 +522,7 @@ sub www_view { $self->appendCommonVars($var); - my $privacySetting = $user->profileField('publicProfile') || 'none'; + my $privacySetting = $user->get('publicProfile') || 'none'; $var->{"profile_privacy_$privacySetting"} = "true"; $var->{'acceptsPrivateMessages'} @@ -553,7 +551,7 @@ sub www_view { my $fieldId = $field->getId; my $fieldLabel = $field->getLabel; my $fieldValue = $field->formField(undef,2,$user); - my $fieldRaw = $user->profileField($fieldId);; + my $fieldRaw = $user->get($fieldId);; #Create a seperate template var for each field my $fieldBase = 'profile_field_'.$fieldId; $var->{$fieldBase.'_label' } = $fieldLabel; diff --git a/lib/WebGUI/Account/Shop.pm b/lib/WebGUI/Account/Shop.pm index f0a2716fb..5ce0f5231 100644 --- a/lib/WebGUI/Account/Shop.pm +++ b/lib/WebGUI/Account/Shop.pm @@ -5,7 +5,6 @@ use strict; use WebGUI::Exception; use WebGUI::International; use WebGUI::Pluggable; -use WebGUI::Utility; use WebGUI::Shop::Vendor; use JSON qw{ from_json }; @@ -52,7 +51,7 @@ sub appendCommonVars { my $method = $session->form->get("do"); $var->{ 'manage_purchases_url' } = $self->getUrl("module=shop;do=managePurchases"); - $var->{ 'managesPurchasesIsActive' } = WebGUI::Utility::isIn($method,("","managePurchases","view","viewTransaction")); + $var->{ 'managesPurchasesIsActive' } = $method ~~ ["","managePurchases","view","viewTransaction"]; $var->{ 'view_sales_url' } = $self->getUrl( 'module=shop;do=viewSales' ); $var->{ 'viewSalesIsActive' } = $method eq 'viewSales'; @@ -90,37 +89,37 @@ sub editSettingsForm { my $session = $self->session; my $i18n = WebGUI::International->new($session,'Account_Shop'); my $shopi18n = WebGUI::International->new($session,'Shop'); - my $f = WebGUI::HTMLForm->new($session); + my $f = WebGUI::FormBuilder->new($session); - $f->template( + $f->addField( "template", name => "shopStyleTemplateId", value => $self->getStyleTemplateId, namespace => "style", label => $i18n->get("shop style template label"), hoverHelp => $i18n->get("shop style template hoverHelp") ); - $f->template( + $f->addField( "template", name => "shopLayoutTemplateId", value => $self->getLayoutTemplateId, namespace => "Account/Layout", label => $i18n->get("shop layout template label"), hoverHelp => $i18n->get("shop layout template hoverHelp") ); - $f->template( + $f->addField( "template", name => "shopMyPurchasesTemplateId", value => $self->session->setting->get("shopMyPurchasesTemplateId"), namespace => "Shop/MyPurchases", label => $shopi18n->get("my purchases template"), hoverHelp => $shopi18n->get("my purchases template help") ); - $f->template( + $f->addField( "template", name => "shopMyPurchasesDetailTemplateId", value => $self->session->setting->get("shopMyPurchasesDetailTemplateId"), namespace => "Shop/MyPurchasesDetail", label => $shopi18n->get("my purchases detail template"), hoverHelp => $shopi18n->get("my purchases detail template help") ); - $f->template( + $f->addField( "template", name => 'shopMySalesTemplateId', value => $self->session->setting->get('shopMySalesTemplateId'), namespace => 'Shop/MySales', @@ -128,7 +127,7 @@ sub editSettingsForm { hoverHelp => $i18n->get('my sales template help'), ); - return $f->printRowsOnly; + return $f; } #------------------------------------------------------------------- @@ -277,7 +276,11 @@ sub www_viewSales { my $data = $row; # Add asset properties to tmpl_vars. - my $asset = WebGUI::Asset->newByDynamicClass( $session, $row->{ assetId } ); + my $asset = eval { WebGUI::Asset->newById( $session, $row->{ assetId } ); }; + if (Exception::Class->caught()) { + $session->log->error('Unable to instanciate assetId '.$row->{ assetId }.": $@"); + next; + } $row = { %{ $row }, %{ $asset->get } } if $asset; push @products, $row; diff --git a/lib/WebGUI/Account/User.pm b/lib/WebGUI/Account/User.pm index 51f190c9b..656439f52 100644 --- a/lib/WebGUI/Account/User.pm +++ b/lib/WebGUI/Account/User.pm @@ -5,7 +5,6 @@ use strict; use WebGUI::Exception; use WebGUI::International; use WebGUI::Pluggable; -use WebGUI::Utility; use WebGUI::Operation::Auth; use base qw/WebGUI::Account/; @@ -54,28 +53,28 @@ sub editSettingsForm { my $session = $self->session; my $setting = $session->setting; my $i18n = WebGUI::International->new($session,'Account_User'); - my $f = WebGUI::HTMLForm->new($session); + my $f = WebGUI::FormBuilder->new($session); - $f->template( + $f->addField( "template", name => "userAccountStyleTemplateId", value => $self->getStyleTemplateId, namespace => "style", label => $i18n->get("user style template label"), hoverHelp => $i18n->get("user style template hoverHelp") ); - $f->template( + $f->addField( "template", name => "userAccountLayoutTemplateId", value => $self->getLayoutTemplateId, namespace => "Account/Layout", label => $i18n->get("user layout template label"), hoverHelp => $i18n->get("user layout template hoverHelp") ); - $f->raw(q{ }); - $f->readOnly ( + $f->addField( "readOnly", + name => 'templateMessage', value => $i18n->get("templates in auth method message"), ); - return $f->printRowsOnly; + return $f; } #------------------------------------------------------------------- diff --git a/lib/WebGUI/Account/_NewModule.skeleton b/lib/WebGUI/Account/_NewModule.skeleton index bc3dcddc0..77d8b1fa1 100644 --- a/lib/WebGUI/Account/_NewModule.skeleton +++ b/lib/WebGUI/Account/_NewModule.skeleton @@ -52,23 +52,23 @@ sub editSettingsForm { my $self = shift; my $session = $self->session; my $i18n = WebGUI::International->new($session,'Account_NewModule'); - my $f = WebGUI::HTMLForm->new($session); + my $f = WebGUI::FormBuilder->new($session); - $f->template( + $f->addField( "Template", name => "moduleStyleTemplateId", value => $self->getStyleTemplateId, namespace => "style", label => $i18n->get("style template label"), hoverHelp => $i18n->get("style template hoverHelp") ); - $f->template( + $f->addField( "Template", name => "moduleLayoutTemplateId", value => $self->getLayoutTemplateId, namespace => "Account/Layout", label => $i18n->get("layout template label"), hoverHelp => $i18n->get("layout template hoverHelp") ); - $f->template( + $f->addField( "Template", name => "moduleViewTemplateId", value => $self->session->setting->get("moduleViewTemplateId"), namespace => "Account/NewModule/View", @@ -76,7 +76,7 @@ sub editSettingsForm { hoverHelp => $i18n->get("view template hoverHelp") ); - return $f->printRowsOnly; + return $f; } #------------------------------------------------------------------- diff --git a/lib/WebGUI/AdSpace.pm b/lib/WebGUI/AdSpace.pm index 259f58b73..346ec5362 100644 --- a/lib/WebGUI/AdSpace.pm +++ b/lib/WebGUI/AdSpace.pm @@ -3,7 +3,7 @@ package WebGUI::AdSpace; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -52,7 +52,7 @@ sub countClick { my $session = shift; my $id = shift; my ($url) = $session->db->quickArray("select url from advertisement where adId=?",[$id]); - return $url if $session->env->requestNotViewed(); + return $url if $session->request->requestNotViewed(); $session->db->write("update advertisement set clicks=clicks+1 where adId=?",[$id]); return $url; } @@ -106,19 +106,6 @@ sub delete { #------------------------------------------------------------------- -=head2 DESTROY ( ) - -Deconstructor. - -=cut - -sub DESTROY { - my $self = shift; - undef $self; -} - -#------------------------------------------------------------------- - =head2 displayImpression ( dontCount ) Finds out what the next ad is to display, increments it's impression counter, and returns the HTML to display it. @@ -132,7 +119,7 @@ A boolean that tells the ad system not to count this impression if true. sub displayImpression { my $self = shift; my $dontCount = shift; - return '' if $self->session->env->requestNotViewed(); + return '' if $self->session->request->requestNotViewed(); my ($id, $ad, $priority, $clicks, $clicksBought, $impressions, $impressionsBought) = $self->session->db->quickArray("select adId, renderedAd, priority, clicks, clicksBought, impressions, impressionsBought from advertisement where adSpaceId=? and isActive=1 order by nextInPriority asc limit 1",[$self->getId]); unless ($dontCount) { my $isActive = 1; diff --git a/lib/WebGUI/AdSpace/Ad.pm b/lib/WebGUI/AdSpace/Ad.pm index ca44a95f2..dbeb54135 100644 --- a/lib/WebGUI/AdSpace/Ad.pm +++ b/lib/WebGUI/AdSpace/Ad.pm @@ -3,7 +3,7 @@ package WebGUI::AdSpace::Ad; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -96,19 +96,6 @@ sub delete { #------------------------------------------------------------------- -=head2 DESTROY ( ) - -Deconstructor. - -=cut - -sub DESTROY { - my $self = shift; - undef $self; -} - -#------------------------------------------------------------------- - =head2 get ( name ) Returns the value of a property. diff --git a/lib/WebGUI/Admin.pm b/lib/WebGUI/Admin.pm new file mode 100644 index 000000000..1ae6267ec --- /dev/null +++ b/lib/WebGUI/Admin.pm @@ -0,0 +1,826 @@ +package WebGUI::Admin; + +# The new WebGUI Admin console + +=head1 NAME + +WebGUI::Admin - The WebGUI Admin Console + +=head1 DESCRIPTION + +The WebGUI Admin Console handles editing the Assets in the site, as well +as administrative tasks like managing Users and Groups. + +The base Admin Console does Assets and displays the list of Admin Plugins. +Admin Plugins do the administrative tasks. + +=head1 SEE ALSO + + WebGUI::Admin::Plugin + WebGUI::Operation + WebGUI::AssetHelper + +=cut + +use Moose; +use JSON qw( from_json to_json ); +use Scalar::Util; +use Search::QueryParser; +use WebGUI::Pluggable; +use WebGUI::Macro; +use WebGUI::Search; +use WebGUI::Fork; + +has 'session' => ( + is => 'ro', + isa => 'WebGUI::Session', + required => 1, +); + +sub BUILDARGS { + my ( $class, $session, @args ) = @_; + return { session => $session, @args }; +} + +=head1 METHODS + +=cut + +#---------------------------------------------------------------------- + +=head2 getAdminPluginTemplateVars + +Return an arrayref of hashrefs to define the Admin Plugins the current +user is allowed to use. + +=cut + +sub getAdminPluginTemplateVars { + my $self = shift; + my $session = $self->session; + my ( $user, $url, $setting ) = $session->quick(qw(user url setting)); + my $functions = $session->config->get("adminConsole"); + my %processed; # title => attributes + + # process the raw information from the config file + foreach my $funcId ( keys %{$functions} ) { + my $funcDef = $functions->{$funcId}; + my $var = {}; + + # If we have a class name, we've got a new WebGUI::Admin::Plugin + if ( $funcDef->{className} ) { + my $plugin = $funcDef->{className}->new( $session, id => $funcId, $funcDef ); + next unless $plugin->canView; + $var = { + id => $funcId, + title => $plugin->title, + icon => $plugin->icon, + 'icon.small' => $plugin->iconSmall, + }; + + # build the list of processed items + $processed{$plugin->title} = $var; + } + # Don't know what we have (old admin console functions) + # NOTE: This usage is deprecated and will be removed in a future version + else { + # make title + my $title = $funcDef->{title}; + WebGUI::Macro::process( $session, \$title ); + + # determine if the user can use this thing + my $canUse = 0; + if ( defined $funcDef->{group} ) { + $canUse = $user->isInGroup( $funcDef->{group} ); + } + elsif ( defined $funcDef->{groupSetting} ) { + $canUse = $user->isInGroup( $setting->get( $funcDef->{groupSetting} ) ); + } + if ( $funcDef->{uiLevel} > $user->get("uiLevel") ) { + $canUse = 0; + } + next unless $canUse; + + # build the attributes + $var = { + title => $title, + icon => $url->extras( "/adminConsole/" . $funcDef->{icon} ), + 'icon.small' => $url->extras( "adminConsole/small/" . $funcDef->{icon} ), + url => $funcDef->{url}, + }; + + # build the list of processed items + $processed{$title} = $var; + + } ## end else [ if ( $funcDef->{className...})] + + } ## end foreach my $funcId ( keys %...) + + #sort the functions alphabetically + return [ map { $processed{$_} } sort keys %processed ]; +} ## end sub getAdminFunctionTemplateVars + +#---------------------------------------------------------------------- + +=head2 getAssetData ( asset ) + +Get the required data for an asset, including the properties and helpers. +Returns a hashref. + +=cut + +sub getAssetData { + my ( $self, $asset ) = @_; + + # Populate the required fields to fill in + my %fields = ( + assetId => $asset->getId, + url => $asset->getUrl, + lineage => $asset->lineage, + title => $asset->menuTitle, + revisionDate => $asset->revisionDate, + childCount => $asset->getChildCount, + assetSize => $asset->assetSize, + lockedBy => ($asset->isLockedBy ? $asset->lockedBy->username : ''), + canEdit => $asset->canEdit && $asset->canEditIfLocked, + helpers => $asset->getHelpers, + icon => $asset->getIcon("small"), + type => $asset->getName, + className => $asset->className, + revisions => [ $asset->getRevisionDates ], + ); + + return \%fields; +} + +#---------------------------------------------------------------------- + +=head2 getAssetTypes ( ) + +Get a hash of className => info pairs containing information about the +asset class. Info will include at least the following keys: + + title => The i18n title of the asset + icon => The small icon + icon_full => The full sized icon + uiLevel => The UI Level of the asset + canAdd => True if the current user can add the asset + url => URL to add the asset + category => A string or an arrayref of categories + +=cut + +sub getAssetTypes { + my ( $self ) = @_; + my $session = $self->session; + my ( $config ) = $session->quick(qw( config )); + + my %configList = %{ $config->get('assets') }; + my %assetList = (); + for my $class ( keys %configList ) { + my $assetConfig = $configList{ $class }; + + # Create a dummy asset + my $dummy = WebGUI::Asset->newByPropertyHashRef( $session, { dummy => 1, className => $class } ); + next unless defined $dummy; + + $assetList{ $class } = { + ( %$assetConfig ), + url => 'func=add;className=' . $class, + icon => $dummy->getIcon(1), # default icon is small for back-compat + icon_full => $dummy->getIcon, + title => $dummy->getTitle, + uiLevel => $dummy->getUiLevel( $assetConfig->{uiLevel} ), + canAdd => $dummy->canAdd( $session ), + }; + } + + return %assetList; +} + +#---------------------------------------------------------------------- + +=head2 getKeywordString ( keywordString ) + +Munge the keyword string from the user into something mysql will Do The +Right Thing with + +=cut + +# Stolen from WebGUI::Search->search +sub getKeywordString { + my ( $self, $keywords ) = @_; + + # do wildcards for people like they'd expect unless they are doing it themselves + unless ($keywords =~ m/"|\*/) { + # split into 'words'. Ideographic characters (such as Chinese) are + # treated as distinct words. Everything else is space delimited. + my @terms = grep { $_ ne q{} } split /\s+|(\p{Ideographic})/, $keywords; + for my $term (@terms) { + # we add padding to ideographic characters to avoid minimum word length limits on indexing + if ($term =~ /\p{Ideographic}/) { + $term = q{''}.$term.q{''}; + } + $term .= q{*}; + next if WebGUI::Search->_isStopword( $term ); + next + if $term =~ /^[+-]/; + $term = q{+} . $term; + } + $keywords = join q{ }, @terms; + } + + return $keywords; +} + +#---------------------------------------------------------------------- + +=head2 getNewContentTemplateVars + +Get an array of tabs for the new content menu. Each tab contains items +of new content that can be added to the site. + +=cut + +sub getNewContentTemplateVars { + my ( $self ) = @_; + my $session = $self->session; + my ( $user, $config ) = $session->quick(qw( user config )); + my $i18n = WebGUI::International->new($session,'Macro_AdminBar'); + my $tabs = []; + + # Add a dummy asset to the session to pass canAdd checks + # The future canAdd will not check validParent, www_add will instead + # This asset is removed before we return... + $session->asset( WebGUI::Asset->getDefault( $session ) ); + + # Build the categories + my %rawCategories = %{ $config->get('assetCategories') }; + my %categories; # All the categories we have + my $userUiLevel = $user->get('uiLevel'); + foreach my $category ( keys %rawCategories ) { + # Check the ui level + next if $rawCategories{$category}{uiLevel} > $userUiLevel; + # Check group permissions + next if ( exists $rawCategories{$category}{group} && !$user->isInGroup( $rawCategories{$category}{group} ) ); + + my $title = $rawCategories{$category}{title}; + + # Process macros on the title + WebGUI::Macro::process( $session, \$title ); + + $categories{$category}{title} = $title; + } + + # assets + my %assetList = $self->getAssetTypes; + foreach my $assetClass ( keys %assetList ) { + my $assetConfig = $assetList{$assetClass}; + + next unless $assetConfig->{canAdd}; + next unless $assetConfig->{uiLevel} <= $userUiLevel; + + # Add the asset to all categories it should appear in + my @assetCategories = ref $assetConfig->{category} ? @{ $assetConfig->{category} } : $assetConfig->{category}; + for my $category (@assetCategories) { + next unless exists $categories{$category}; + $categories{$category}{items} ||= []; + push @{ $categories{$category}{items} }, $assetConfig; + } + } ## end foreach my $assetClass ( keys...) + + # packages + foreach my $package ( @{ WebGUI::Asset::getPackageList( $session ) } ) { + # Check permissions and UI level + next unless ( $package->canView && $package->canAdd($session) && $package->getUiLevel <= $userUiLevel ); + + # Create the "packages" category + $categories{packages}{items} ||= []; + + push @{ $categories{packages}{items} }, { + className => Scalar::Util::blessed( $package ), + url => "func=deployPackage;assetId=" . $package->getId, + title => $package->getTitle, + icon => $package->getIcon(1), + }; + } + # If we have any packages, fill in the package category title + if ( $categories{packages}{items} && @{ $categories{packages}{items} } ) { + $categories{packages}{title} = $i18n->get('packages'); + } + + # prototypes + foreach my $prototype ( @{ WebGUI::Asset::getPrototypeList( $session ) } ) { + # Check permissions and UI level + next unless ( $prototype->canView && $prototype->canAdd($session) && $prototype->getUiLevel <= $userUiLevel ); + + # Create the "prototypes" category + $categories{prototypes}{items} ||= []; + + push @{ $categories{prototypes}{items} }, { + className => $prototype->get('className'), + url => "func=add;className=" . $prototype->get('className') . ";prototype=" . $prototype->getId, + title => $prototype->getTitle, + icon => $prototype->getIcon(1), + }; + } + # If we have any prototypes, fill in the prototype category title + if ( $categories{prototypes}{items} && @{ $categories{prototypes}{items} } ) { + $categories{prototypes}{title} = $i18n->get('prototypes'); + } + + # sort the categories by title + my @sortedIds = map { $_->[0] } + sort { $a->[1] cmp $b->[1] } + map { [ $_, $categories{$_}->{title} ] } + grep { $categories{$_}->{items} && @{$categories{$_}->{items}} } + keys %categories; # Schwartzian transform + + foreach my $categoryId ( @sortedIds ) { + my $category = $categories{ $categoryId }; + my $tab = { + id => $categoryId, + title => $category->{title}, + items => [], + }; + push @{$tabs}, $tab; + + my $items = $category->{items}; + next unless ( ref $items eq 'ARRAY' ); # in case the category is empty + foreach my $item ( sort { $a->{title} cmp $b->{title} } @{$items} ) { + push @{ $tab->{items} }, $item; + } + } + + # Remove the session asset we added above + delete $session->{_asset}; + + return $tabs; +} + +#---------------------------------------------------------------------------- + +=head2 getSearchPaginator ( queryString ) + +Get a paginator for searching with the given queryString. + +=cut + +sub getSearchPaginator { + my ( $self, $queryString ) = @_; + my $session = $self->session; + + my $sql = 'SELECT assetId FROM assetIndex JOIN asset USING (assetId) WHERE ' + . ' ( ' . $self->getSqlFromQueryString( $queryString ) . ' ) ' + ; + + my $p = WebGUI::Paginator->new( $session ); + $p->setDataByQuery( $sql ); + return $p; +} + +#---------------------------------------------------------------------------- + +=head2 getSqlFromQueryString ( queryString ) + +Parse the query string and return a SQL boolean clause suitable to be used +as a WHERE clause. Does not return WHERE, as you could also use it for HAVING + +=cut + +sub getSqlFromQueryString { + my ( $self, $queryString ) = @_; + + my $dbh = $self->session->db->dbh; + my $sqp = Search::QueryParser->new( defField => 'keywords' ); + my $query = $sqp->parse( $queryString ); + + my %isValidOp; + @isValidOp{qw( = != < > <= >= : )} = 1; + + # Recursion is recursive + my $part = sub { + my ( $query, $conj ) = @_; + my @parts; + for my $part ( @$query ) { + if ( ref $part->{value} ) { + push @parts, $self->getSqlFromQueryString( $_ ); + } + elsif ( $part->{field} eq 'keywords' ) { + push @parts, "MATCH (" . $dbh->quote_identifier($part->{field}) . ") AGAINST (" + . $dbh->quote( $self->getKeywordString( $part->{value} ) ) + . ")"; + } + else { + next unless $isValidOp{ $part->{op} }; + if ( $part->{op} eq ':' ) { + my $value = '%' . $part->{value} . '%'; + push @parts, join " ", + $dbh->quote_identifier($part->{field}), + 'LIKE', + $dbh->quote($value), + ; + } + elsif ( $isValidOp{ $part->{op} } ) { + push @parts, join " ", + $dbh->quote_identifier($part->{field}), + $part->{op}, + $dbh->quote($part->{value}), + ; + } + } + } + return join " $conj ", @parts; + }; + my $must = $query->{'+'} ? '(' . $part->( $query->{'+'}, 'AND' ) . ')' : undef; + my $mustNot = $query->{'-'} ? 'NOT ( ' . $part->( $query->{'-'}, 'OR' ) . ')' : undef; + my $may = $query->{''} ? $part->( $query->{''}, 'OR' ) : undef; + + my $sql = $must . ( $must && $mustNot ? " AND " : '' ) . $mustNot + . ( $must || $mustNot ? " OR " : '' ) . $may + ; + return $sql; +} + +#---------------------------------------------------------------------------- + +=head2 getTreePaginator ( $asset ) + +Get a page for the Asset Tree view. Returns a WebGUI::Paginator object +filled with asset IDs. + +=cut + +sub getTreePaginator { + my ( $self, $asset ) = @_; + my $session = $self->session; + + my $orderByColumn = $session->form->get( 'orderByColumn' ) + || "lineage" + ; + my $orderByDirection = lc $session->form->get( 'orderByDirection' ) eq "desc" + ? "DESC" + : "ASC" + ; + + my $recordOffset = $session->form->get( 'recordOffset' ) || 1; + my $rowsPerPage = $session->form->get( 'rowsPerPage' ) || 100; + my $currentPage = int ( $recordOffset / $rowsPerPage ) + 1; + + my $p = WebGUI::Paginator->new( $session, '', $rowsPerPage, 'pn', $currentPage ); + + my $orderBy = $session->db->quote_identifier( $orderByColumn ) . ' ' . $orderByDirection; + $p->setDataByArrayRef( $asset->getLineage( ['children'], { orderByClause => $orderBy } ) ); + + return $p; +} + + +#---------------------------------------------------------------------- + +=head2 www_findUser ( ) + +Find a user based on a partial name, username, alias, or e-mail address + +=cut + +sub www_findUser { + my ( $self ) = @_; + my $session = $self->session; + my ( $form, $db, $url ) = $session->quick(qw( form db url )); + + my $query = '%' . $form->get('query') . '%'; + + my @places; # Places to look + for my $col ( 'username', 'alias', 'firstName', 'lastName', 'CONCAT(firstName," ",lastName)' ) { + push @places, $col . " LIKE ?"; + } + + my $sql = 'SELECT userId, CONCAT(firstName,lastName) AS name, username, alias, avatar + FROM users WHERE ' . join( ' || ', @places ); + my $params = [ ( $query ) x scalar @places ]; + + my $sth = $db->read( $sql, $params ); + my @results; + while ( my $result = $sth->hashRef ) { + $result->{avatar} ||= $url->extras('icon/user.png'); + push @results, $result; + } + + my $output = JSON->new->encode( { results => \@results } ); + return $output; +} + +#---------------------------------------------------------------------- + +=head2 www_getAssetData ( ) + +Get data for an asset, including properties and asset helpers. + +=cut + +sub www_getAssetData { + my ( $self ) = @_; + my $session = $self->session; + my $assetId = $session->form->get('assetId'); + my $asset = WebGUI::Asset->newById( $session, $assetId ); + return JSON->new->encode( $self->getAssetData( $asset ) ); +} + +#---------------------------------------------------------------------- + +=head2 www_getClipboard ( ) + +Get the assets currently on the user's clipboard + +=cut + +sub www_getClipboard { + my ( $self ) = @_; + my $session = $self->session; + my ( $user, $form ) = $session->quick(qw{ user form }); + + my $userOnly = !$form->get('all'); + + my $assets = WebGUI::Asset->getRoot( $session )->getAssetsInClipboard( $userOnly ); + my @assetInfo = (); + for my $asset ( @{$assets} ) { + push @assetInfo, $self->getAssetData( $asset ); + } + + return JSON->new->encode( \@assetInfo ); +} + +#---------------------------------------------------------------------- + +=head2 www_getCurrentVersionTag ( ) + +Get information about the current version tag + +=cut + +sub www_getCurrentVersionTag { + my ( $self ) = @_; + my $session = $self->session; + my $currentUrl = $session->url->getRequestedUrl; + + my $currentTag = WebGUI::VersionTag->getWorking( $session, "nocreate" ); + return JSON->new->encode( {} ) unless $currentTag; + + my %tagInfo = ( + tagId => $currentTag->getId, + name => $currentTag->get('name'), + editUrl => $currentTag->getEditUrl, + commitUrl => $currentTag->getCommitUrl, + leaveUrl => $currentUrl . '?op=leaveVersionTag', + ); + + return JSON->new->encode( \%tagInfo ); +} + +#---------------------------------------------------------------------- + +=head2 www_getTreeData ( ) + +Get the Tree data for a given asset URL + +=cut + +sub www_getTreeData { + my ( $self ) = @_; + my $session = $self->session; + my ( $user, $form ) = $session->quick(qw{ user form }); + + my $assetUrl = $form->get('assetUrl'); + my $asset = WebGUI::Asset->newByUrl( $session, $assetUrl ); + + my $i18n = WebGUI::International->new( $session, "Asset" ); + my $assetInfo = { assets => [] }; + my $p = $self->getTreePaginator( $asset ); + + for my $assetId ( @{ $p->getPageData } ) { + my $asset = WebGUI::Asset->newById( $session, $assetId ); + push @{ $assetInfo->{ assets } }, $self->getAssetData( $asset ); + } + + $assetInfo->{ totalAssets } = $p->getRowCount; + $assetInfo->{ sort } = $session->form->get( 'orderByColumn' ); + $assetInfo->{ dir } = lc $session->form->get( 'orderByDirection' ); + $assetInfo->{ currentAsset } = $self->getAssetData( $asset ); + $assetInfo->{ crumbtrail } = []; + for my $asset ( @{ $asset->getLineage( ['ancestors'], { returnObjects => 1 } ) } ) { + push @{ $assetInfo->{crumbtrail} }, $self->getAssetData( $asset ); + } + + $session->response->content_type( 'application/json' ); + + return to_json( $assetInfo ); +} + +#---------------------------------------------------------------------- + +=head2 www_getVersionTags + +Get the current version tags a user can join + +=cut + +sub www_getVersionTags { + my ( $self ) = @_; + my $session = $self->session; + my ( $user ) = $session->quick(qw( user )); + my $vars = []; + + my $current = WebGUI::VersionTag->getWorking( $session, "nocreate" ); + my $tags = WebGUI::VersionTag->getOpenTags($session); + if ( @$tags ) { + for my $tag ( @$tags ) { + next unless $user->isInGroup( $tag->get("groupToUse") ); + my $isCurrent = ( $current && $current->getId eq $tag->getId ) ? 1 : 0; + my $icon = $isCurrent + ? $session->url->extras( 'icon/tag_green.png' ) + : $session->url->extras( 'icon/tag_blue.png' ) + ; + push @$vars, { + tagId => $tag->getId, + name => $tag->get("name"), + isCurrent => $isCurrent, + joinUrl => $tag->getJoinUrl, + editUrl => $tag->getEditUrl, + icon => $icon, + }; + } + } + + return JSON->new->encode( $vars ); +} + +#---------------------------------------------------------------------- + +=head2 www_processAssetHelper ( ) + +Process the given asset helper with the given asset + +=cut + +sub www_processAssetHelper { + my ( $self ) = @_; + my $session = $self->session; + my ( $form ) = $session->quick(qw{ form }); + + my $assetId = $form->get('assetId'); + my $helperId = $form->get('helperId'); + my $asset = WebGUI::Asset->newById( $session, $assetId ); + + my $class = $asset->getHelpers->{ $helperId }->{ className }; + WebGUI::Pluggable::load( $class ); + my $helper = $class->new( id => $helperId, session => $self->session, asset => $asset ); + return JSON->new->encode( $helper->process ); +} + +#---------------------------------------------------------------------- + +=head2 www_processPlugin ( ) + +Process the given admin console plugin + +=cut + +sub www_processPlugin { + my ( $self ) = @_; + my $session = $self->session; + my ( $form ) = $session->quick(qw{ form }); + + my $id = $form->get('id'); + my $def = $session->config->get('adminConsole/' . $id ); + return JSON->new->encode( { error => 'No such admin plugin: ' . $id } ) + unless $def; + my $class = $def->{className}; + WebGUI::Pluggable::load( $class ); + return JSON->new->encode( $class->process( $session ) ); +} + +#---------------------------------------------------------------------- + +=head2 www_searchAssets ( ) + +Search the asset tree for the given keywords and filters + +=cut + +sub www_searchAssets { + my ( $self ) = @_; + my $session = $self->session; + my ( $user, $form ) = $session->quick(qw{ user form }); + + # Get the search + my $queryString = $form->get('query'); + return to_json( {} ) unless $queryString; + + my $i18n = WebGUI::International->new( $session, "Asset" ); + my $assetInfo = { assets => [] }; + my $p = $self->getSearchPaginator( $queryString ); + + for my $result ( @{ $p->getPageData } ) { + my $assetId = $result->{assetId}; + my $asset = WebGUI::Asset->newById( $session, $assetId ); + push @{ $assetInfo->{ assets } }, $self->getAssetData( $asset ); + } + + $assetInfo->{ totalAssets } = $p->getRowCount; + $assetInfo->{ sort } = $session->form->get( 'orderByColumn' ); + $assetInfo->{ dir } = lc $session->form->get( 'orderByDirection' ); + + $session->response->content_type( 'application/json' ); + + return to_json( $assetInfo ); +} + +#---------------------------------------------------------------------------- + +=head2 www_updateAsset( ) + +Update an asset. The assetId is given in a query parameter. The updated +properties are given as a JSON string in the POST body. + +The actual update will happen in a forked process, due to rank being a long +update. + +=cut + +sub www_updateAsset { + my ( $self ) = @_; + my $session = $self->session; + my $assetId = $session->form->get( 'assetId' ); + my $asset = eval { WebGUI::Asset->newById( $session, $assetId ); }; + if ( $@ || !$asset ) { + return to_json( { error => "Could not find asset" } ); + } + + my $props = eval { JSON->new->decode( $session->request->raw_body ); }; + if ( $@ ) { + return to_json( { error => "Unable to decode JSON body" } ); + } + + my $fork = WebGUI::Fork->start( + $session, __PACKAGE__, 'updateAsset', { assetId => $assetId, properties => $props }, + ); + + return to_json( { forkId => $fork->getId } ); +} + +sub updateAsset { + my ( $process, $args ) = @_; + my $session = $process->session; + my $props = $args->{properties}; + my $assetId = $args->{assetId}; + my $asset = WebGUI::Asset->newById( $session, $assetId ); + + # Update rank specially + if ( my $rank = delete $props->{rank} ) { + $asset->setRank( $rank ); + } + + # Update other properties + # TODO: Do we add a revision? or do they request a revision? +} + +#---------------------------------------------------------------------- + +=head2 www_view ( session ) + +Show the main Admin console wrapper + +=cut + +sub www_view { + my ( $self ) = @_; + my $session = $self->session; + my ( $user, $url, $style ) = $session->quick(qw{ user url style }); + + my $var; + $var->{backToSiteUrl} = $url->page; + + # Add vars for AdminBar + $var->{adminPlugins} = $self->getAdminPluginTemplateVars; + $var->{newContentTabs} = $self->getNewContentTemplateVars; + + # Add vars for current user + $var->{username} = $user->username; + $var->{profileUrl} = $user->getProfileUrl; + $var->{logoutUrl} = $url->page("op=auth;method=logout"); + + $var->{viewUrl} = $url->page; + $var->{homeUrl} = WebGUI::Asset->getDefault( $session )->getUrl; + + # Asset types for later use + $var->{assetTypesJson} = JSON->new->encode( { $self->getAssetTypes } ); + + my $tmpl = WebGUI::Asset::Template->newById( $session, $session->setting->get('templateIdAdmin') ); + my $output = $style->process( $tmpl->process( $var ), "PBtmpl0000000000000137" ); + + return $output; +} ## end sub www_view + +1; + diff --git a/lib/WebGUI/Admin/Plugin.pm b/lib/WebGUI/Admin/Plugin.pm new file mode 100644 index 000000000..138561567 --- /dev/null +++ b/lib/WebGUI/Admin/Plugin.pm @@ -0,0 +1,104 @@ +package WebGUI::Admin::Plugin; + +use Moose; +use Scalar::Util qw(blessed); + +has 'id' => ( + is => 'ro', + isa => 'Str', + required => 1, +); + +has 'title' => ( + is => 'rw', + isa => 'Str', +); + +has 'icon' => ( + is => 'rw', + isa => 'Str', + default => '', # Find a good default +); + +has 'iconSmall' => ( + is => 'rw', + isa => 'Str', + default => '', # Find a good default +); + +sub BUILDARGS { + my ( $class, $session, %args ) = @_; + return { session => $session, %args }; +} + +sub canView { + return 1; +} + +sub getUrl { + my ( $self, $method, $params ) = @_; + $method ||= "view"; + return '?op=admin;plugin=' . $self->id . ';method=' . $method . ';' . $params; +} + +1; + +=head1 NAME + +WebGUI::Admin::Plugin - Add items to the Admin Console + +=head1 SYNOPSIS + + package My::Admin::Plugin; + use Moose; + use WebGUI::BestPractices; + extends 'WebGUI::Admin::Plugin'; + + sub www_view { + my ( $self ) = @_; + + return "Hello, World\n"; + } + + # etc/site.conf + { + "adminConsole" : { + myPlugin : { + className : "My::Admin::Plugin", + title : "My Plugin", + icon : "^Extras(icon/gear.gif);", + iconSmall : "^Extras(icon/gear.gif);" + } + } + } + +=head1 ATTRIBUTES + +=head2 id + +The identifier from the configuration file. Read-only. + +=head2 title + +The i18n title for the plugin, usually specified from the config file. + +=head2 icon + +The full-size icon for the plugin. Used on the plugin page. + +=head2 iconSmall + +A smaller icon for the plugin, used in the admin menu. + +=head1 METHODS + +=head2 canView ( [user] ) + +Returns true if the user can use this admin plugin. If no user is specified, +defaults to the current session's user. + +=head2 getUrl ( method [, params ] ) + +Get a URL to the admin plugin's given www_ method optionally with more URL params. + + diff --git a/lib/WebGUI/AdminConsole.pm b/lib/WebGUI/AdminConsole.pm index 5fdb373a3..742fd148e 100644 --- a/lib/WebGUI/AdminConsole.pm +++ b/lib/WebGUI/AdminConsole.pm @@ -3,7 +3,7 @@ package WebGUI::AdminConsole; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -19,7 +19,6 @@ use WebGUI::International; use WebGUI::Asset::Template; use WebGUI::Macro; use WebGUI::VersionTag; -use WebGUI::HTMLForm; =head1 NAME @@ -169,7 +168,7 @@ sub getAdminFunction { elsif (defined $functions->{$function}{groupSetting}) { $canUse = $user->isInGroup($setting->get($functions->{$function}{groupSetting})); } - if ($functions->{$function}{uiLevel} > $user->profileField("uiLevel")) { + if ($functions->{$function}{uiLevel} > $user->get("uiLevel")) { $canUse = 0; } @@ -221,10 +220,6 @@ If supplied, provides a list of defaults such as title and icons for the admin c A hash reference of options with the following keys -=head4 showAdminBar - -If true, will show the admin bar on this admin console page - =cut sub new { @@ -259,12 +254,13 @@ A string that defaults to _function's title. sub render { my $self = shift; - $self->session->http->setCacheControl("none"); + my $session = $self->session; + $session->response->setCacheControl("none"); my %var; $var{"application_loop"} = $self->getAdminFunction; $var{"application.workarea"} = shift; $var{"application.title"} = shift || $self->{_function}{title}; - my $i18n = WebGUI::International->new($self->session, "AdminConsole"); + my $i18n = WebGUI::International->new($session, "AdminConsole"); $var{"backtosite.label"} = $i18n->get("493", "WebGUI"); $var{"toggle.on.label"} = $i18n->get("toggle on"); $var{"toggle.off.label"} = $i18n->get("toggle off"); @@ -280,21 +276,21 @@ sub render { $var{"console.canUse"} = $acParams->{canUse}; $var{"console.icon"} = $acParams->{icon}; $var{"help.url"} = $self->{_helpUrl}; - my $working = WebGUI::VersionTag->getWorking($self->session, 1); + my $working = WebGUI::VersionTag->getWorking($session, 1); my $workingId = ""; my @tags = (); if ($working) { $workingId = $working->getId; push(@tags, { - url=>$self->session->url->page("op=commitVersionTag;tagId=".$workingId), + url=>$session->url->page("op=commitVersionTag;tagId=".$workingId), title=>$i18n->get("commit my changes","Macro_AdminBar"), - icon=>$self->session->url->extras('adminConsole/small/versionTags.gif') + icon=>$session->url->extras('adminConsole/small/versionTags.gif') }); } - foreach my $tag (@{WebGUI::VersionTag->getOpenTags($self->session)}) { - next unless $self->session->user->isInGroup($tag->get("groupToUse")); + foreach my $tag (@{WebGUI::VersionTag->getOpenTags($session)}) { + next unless $session->user->isInGroup($tag->get("groupToUse")); push(@tags, { - url=>$self->session->url->page("op=setWorkingVersionTag;tagId=".$tag->getId), + url=>$session->url->page("op=setWorkingVersionTag;tagId=".$tag->getId), title=>($tag->getId eq $workingId) ? '* '.$tag->get("name") : $tag->get("name"), }); } @@ -302,21 +298,17 @@ sub render { $var{versionTags} = \@tags; } - $var{"backtosite.url"} = $self->session->url->getBackToSiteURL(); + $var{"backtosite.url"} = $session->url->getBackToSiteURL(); my $formId = $self->getSubmenuFormId; - $var{"formHeader"} = WebGUI::Form::formHeader($self->session, { action => $self->{_formUrl}, extras => qq|id='$formId'|, }); - $var{"formFooter"} = WebGUI::Form::formFooter($self->session); + $var{"formHeader"} = WebGUI::Form::formHeader($session, { action => $self->{_formUrl}, extras => qq|id='$formId'|, }); + $var{"formFooter"} = WebGUI::Form::formFooter($session); my $template - = WebGUI::Asset::Template->new( - $self->session, - $self->session->setting->get("AdminConsoleTemplate") + = WebGUI::Asset::Template->newById( + $session, + $session->setting->get("AdminConsoleTemplate") ); - if ( $self->{_options}->{showAdminBar} ) { - $var{adminBar} - = WebGUI::Macro::AdminBar::process($self->session); - } my $output = $template->process(\%var); - return $self->session->style->process($output,"PBtmpl0000000000000137"); + return $session->style->process($output,"PBtmpl0000000000000137"); } #------------------------------------------------------------------- diff --git a/lib/WebGUI/Affiliate.pm b/lib/WebGUI/Affiliate.pm index a4de4a072..81e2b3276 100644 --- a/lib/WebGUI/Affiliate.pm +++ b/lib/WebGUI/Affiliate.pm @@ -5,7 +5,7 @@ use strict; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Asset.pm b/lib/WebGUI/Asset.pm index 4499ab43a..d95bafcda 100644 --- a/lib/WebGUI/Asset.pm +++ b/lib/WebGUI/Asset.pm @@ -3,7 +3,7 @@ package WebGUI::Asset; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -14,12 +14,376 @@ package WebGUI::Asset; =cut -use Carp qw( croak confess ); use Scalar::Util qw( blessed weaken ); use Clone qw(clone); use JSON; use HTML::Packer; +use Moose; +use WebGUI::Types; +use Data::Dumper; +use WebGUI::FormBuilder; + +use WebGUI::Definition::Asset; +define assetName => ['asset', 'Asset']; +define tableName => 'assetData'; +define icon => 'assets.gif'; +property title => ( + tab => "properties", + label => ['99','Asset'], + hoverHelp => ['99 description','Asset'], + fieldType => 'text', + builder => '_default_title', + lazy => 1, + ); + +sub _default_title { + return 'Untitled'; +} + +around title => sub { + my $orig = shift; + my $self = shift; + if (@_ > 0) { + my $title = shift; + $title = WebGUI::HTML::filter($title, 'all'); + $title = $self->_default_title if $title eq ''; + unshift @_, $title; + } + $self->$orig(@_); +}; + +property menuTitle => ( + tab => "properties", + label => ['411','Asset'], + hoverHelp => ['411 description','Asset'], + uiLevel => 1, + fieldType => 'text', + builder => '_default_menuTitle', + lazy => 1, + ); +sub _default_menuTitle { + my $self = shift; + return $self->title; +} +around menuTitle => sub { + my $orig = shift; + my $self = shift; + if (@_ > 0) { + my $title = shift; + $title = WebGUI::HTML::filter($title, 'all'); + $title = $self->_default_menuTitle if $title eq ''; + unshift @_, $title; + } + $self->$orig(@_); +}; + +property url => ( + tab => "properties", + label => ['104','Asset'], + hoverHelp => ['104 description','Asset'], + uiLevel => 3, + fieldType => 'text', + lazy => 1, + builder => '_default_url', + ); +sub _default_url { + return $_[0]->fixUrl; +} + +around url => sub { + my $orig = shift; + my $self = shift; + if (@_ > 0) { + my $url = $_[0]; + $url = $self->fixUrl($url); + unshift @_, $url; + } + $self->$orig(@_); +}; +property isHidden => ( + tab => "display", + label => ['886','Asset'], + hoverHelp => ['886 description','Asset'], + uiLevel => 6, + fieldType => 'yesNo', + default => 0, + ); +property newWindow => ( + tab => "display", + label => ['940','Asset'], + hoverHelp => ['940 description','Asset'], + uiLevel => 9, + fieldType => 'yesNo', + default => 0, + ); +property encryptPage => ( + fieldType => 'yesNo', + noFormPost => sub { return $_[0]->session->config->get("sslEnabled"); }, + tab => "security", + label => ['encrypt page','Asset'], + hoverHelp => ['encrypt page description','Asset'], + uiLevel => 6, + default => 0, + ); +property ownerUserId => ( + tab => "security", + label => ['108','Asset'], + hoverHelp => ['108 description','Asset'], + uiLevel => 6, + fieldType => 'user', + default => '3', + trigger => sub { shift->_set_ownerUserId(@_) } , + ); +sub _set_ownerUserId { + return; +} +property groupIdView => ( + tab => "security", + label => ['872','Asset'], + hoverHelp => ['872 description','Asset'], + uiLevel => 6, + fieldType => 'group', + default => '7', + trigger => sub { shift->_set_groupIdView(@_) }, + ); +sub _set_groupIdView { + return; +} +property groupIdEdit => ( + tab => "security", + label => ['871','Asset'], + excludeGroups => [1,7], + hoverHelp => ['871 description','Asset'], + uiLevel => 6, + fieldType => 'group', + default => '4', + trigger => sub { shift->_set_groupIdEdit(@_) } , + ); +sub _set_groupIdEdit { + return; +} +property synopsis => ( + tab => "meta", + label => ['412','Asset'], + hoverHelp => ['412 description','Asset'], + uiLevel => 3, + fieldType => 'textarea', + default => undef, + ); +property extraHeadTags => ( + tab => "meta", + label => ["extra head tags",'Asset'], + hoverHelp => ['extra head tags description','Asset'], + uiLevel => 5, + fieldType => 'codearea', + default => undef, + customDrawMethod=> 'drawExtraHeadTags', + ); +around extraHeadTags => sub { + my $orig = shift; + my $self = shift; + if (@_ > 0) { + my $unpacked = $_[0]; + my $packed = $unpacked; ##Undo magic aliasing since a reference is passed below + return if !defined $packed; + HTML::Packer::minify( \$packed, { + remove_newlines => 1, + do_javascript => "shrink", + do_stylesheet => "minify", + } ); + $self->extraHeadTagsPacked($packed); + } + $self->$orig(@_); +}; +property extraHeadTagsPacked => ( + fieldType => 'hidden', + default => undef, + noFormPost => 1, + init_args => undef, + ); +property usePackedHeadTags => ( + tab => "meta", + label => ['usePackedHeadTags label','Asset'], + hoverHelp => ['usePackedHeadTags description','Asset'], + uiLevel => 7, + fieldType => 'yesNo', + default => 0, + ); +property isPackage => ( + label => ["make package",'Asset'], + tab => "meta", + hoverHelp => ['make package description','Asset'], + uiLevel => 7, + fieldType => 'yesNo', + default => 0, + ); +property isPrototype => ( + tab => "meta", + label => ["make prototype",'Asset'], + hoverHelp => ['make prototype description','Asset'], + uiLevel => 9, + fieldType => 'yesNo', + default => 0, + ); +property isExportable => ( + tab => 'meta', + label => ['make asset exportable','Asset'], + hoverHelp => ['make asset exportable description','Asset'], + uiLevel => 9, + fieldType => 'yesNo', + default => 1, + ); +property inheritUrlFromParent => ( + tab => 'meta', + label => ['does asset inherit URL from parent','Asset'], + hoverHelp => ['does asset inherit URL from parent description','Asset'], + uiLevel => 9, + fieldType => 'yesNo', + default => 0, + trigger => \&_set_inheritUrlFromParent, + ); +sub _set_inheritUrlFromParent { + my ($self, $new, $old) = @_; + if ($new && ($new != $old)) { + $self->url($self->url); + } +}; +property status => ( + noFormPost => 1, + fieldType => 'text', + default => 'approved', + ); +property lastModified => ( + noFormPost => 1, + fieldType => 'DateTime', + default => sub { return time() }, + ); +property assetSize => ( + noFormPost => 1, + fieldType => 'integer', + default => 0, + ); +property tagId => ( + noFormPost => 1, + fieldType => 'guid', + default => 0, + ); +property skipNotification => ( + autoGenerate => 0, + noFormPost => 1, + fieldType => 'yesNo', + default => 0, + ); + +has session => ( + is => 'ro', + required => 1, + ); +has assetId => ( + is => 'ro', + lazy => 1, + default => sub { shift->session->id->generate() }, + ); +has revisionDate => ( + is => 'rw', + ); +has uiLevel => ( + is => 'ro', + default => 1, + init_arg => undef, + ); +property revisedBy => ( + is => 'rw', + noFormPost => 1, + fieldType => 'guid', + ); +has [qw/parentId lineage + creationDate createdBy + state stateChanged stateChangedBy + isLockedBy isSystem lastExportedAs/] => ( + is => 'rw', + ); +has className => ( + is => 'ro', + builder => '_build_className', + lazy => 1, + init_arg => undef, + ); +sub _build_className { + my $self = shift; + return ref $self; +} +has keywords => ( + is => 'rw', + builder => '_build_assetKeywords', + lazy => 1, + traits => [ 'WebGUI::Definition::Meta::Settable' ], +); +sub _build_assetKeywords { + my $self = shift; + my $session = $self->session; + my $keywords = WebGUI::Keyword->new($session); + return $keywords->getKeywordsForAsset({asset => $self, }); +} + +around BUILDARGS => sub { + my $orig = shift; + my $className = shift; + + ##Original arguments start here. + if (ref $_[0] eq 'HASH') { + return $className->$orig(@_); + } + my $session = shift; + my $assetId = shift; + my $revisionDate = shift; + + unless ($assetId) { + WebGUI::Error::InvalidParam->throw(error => "Asset constructor new() requires an assetId."); + } + + if ( $revisionDate eq '' ) { + $revisionDate = $className->getCurrentRevisionDate( $session, $assetId ); + if ($revisionDate eq '') { + WebGUI::Error::InvalidParam->throw(error => "Cannot find revision date for assetId", param => $assetId); + } + } + elsif ( $revisionDate =~ /[^0-9]/) { + WebGUI::Error::InvalidParam->throw(error => "Invalid revision date given", param => $revisionDate); + } + + my $properties = $session->cache->get("asset".$assetId.$revisionDate); + unless (exists $properties->{assetId}) { # can we get it from cache? + my $sql = "select * from asset"; + my $where = " where asset.assetId=?"; + my $placeHolders = [$assetId]; + + # join all the tables + foreach my $table ($className->meta->get_tables) { + $sql .= ",".$table; + $where .= " and (asset.assetId=".$table.".assetId and ".$table.".revisionDate=?)"; + push @$placeHolders, $revisionDate; + } + + # fetch properties + $properties = $session->db->quickHashRef($sql.$where, $placeHolders); + unless (exists $properties->{assetId}) { + $session->log->error("Asset $assetId $className $revisionDate is missing properties. Consult your database tables for corruption. "); + return undef; + } + $session->cache->set("asset".$assetId.$revisionDate, $properties, 60*60*24); + } + + if (defined $properties) { + $properties->{session} = $session; + return $className->$orig($properties); + } + $session->log->error("Something went wrong trying to instanciate a '$className' with assetId '$assetId', but I don't know what!"); + return undef; +}; + + use WebGUI::AssetBranch; use WebGUI::AssetClipboard; use WebGUI::AssetExportHtml; @@ -28,22 +392,24 @@ use WebGUI::AssetMetaData; use WebGUI::AssetPackage; use WebGUI::AssetTrash; use WebGUI::AssetVersioning; +use WebGUI::Exception; use strict; use Tie::IxHash; -use WebGUI::AdminConsole; -use WebGUI::Cache; +require WebGUI::AdminConsole; +require WebGUI::Asset::Shortcut; use WebGUI::Form; use WebGUI::HTML; -use WebGUI::HTMLForm; +use WebGUI::FormBuilder; use WebGUI::Keyword; -use WebGUI::ProgressBar; +require WebGUI::ProgressBar; use WebGUI::ProgressTree; use Monkey::Patch; use WebGUI::Fork; use WebGUI::Search::Index; use WebGUI::TabForm; -use WebGUI::Utility; use WebGUI::PassiveAnalytics::Logging; +use WebGUI::Form::ButtonGroup; +use WebGUI::PassiveProfiling; =head1 NAME @@ -86,6 +452,87 @@ sub addEditLabel { return $addEdit.' '.$self->getName; } +#---------------------------------------------------------------------------- + +=head2 addEditSaveButtons ( form ) + +Add the save buttons to the given form. Used by www_add and www_edit to modify +the asset edit form. + +=cut + +sub addEditSaveButtons { + my ( $self, $form ) = @_; + my $session = $self->session; + my $i18n = WebGUI::International->new($session, "Asset"); + + ### + # Buttons + my $buttonGroup = WebGUI::Form::ButtonGroup->new( $session, + name => "saveButtons", + rowClass => 'saveButtons', + ); + +# # Approved status +# $buttonGroup->addButton( 'checkbox', { +# name => 'approved', +# id => 'approveCheckbox', +# value => 'approved', +# label => $i18n->get('560', 'WebGUI'), +# checked => ( $session->setting->get( 'versionTagMode' ) eq 'autoCommit' ? 1 : 0 ), +# } ); + + $buttonGroup->addButton( "submit", { + name => "save", + id => 'saveButton', + value => $i18n->get('save'), + } ); + + if ( $session->config->get("enableSaveAndCommit") ) { + $buttonGroup->addButton( 'Submit', { + name => "saveAndCommit", + id => 'saveAndCommitButton', + value => $i18n->get("save and commit"), + } ); + } + + $buttonGroup->addButton( 'Submit', { + name => "saveAndReturn", + id => 'saveAndReturnButton', + value => $i18n->get("apply"), + } ); + + $buttonGroup->addButton( 'Submit', { + name => 'cancel', + id => 'cancelButton', + value => $i18n->get('cancel','WebGUI'), + } ); + + return $form->addFieldAt( $buttonGroup, 0 ); +} + +#---------------------------------------------------------------------------- + +=head2 addEditSaveTabs ( form ) + +Add the tabs to the form for editing or saving the asset's properties. +This is broken out so that additional tabs with i18n'ed labels can be +added by subclasses or by Roles. + +=cut + +sub addEditSaveTabs { + my ( $self, $form ) = @_; + my $session = $self->session; + my $i18n = WebGUI::International->new($session, "Asset"); + # Not using loop to maintain correct order + $form->addTab( name => "properties", label => $i18n->get("properties") ); + $form->addTab( name => "display", label => $i18n->get(105) ); + $form->addTab( name => "security", label => $i18n->get(107) ); + $form->addTab( name => "meta", label => $i18n->get("Metadata") ); + return $form; +} + #------------------------------------------------------------------- =head2 addMissing ( url ) @@ -101,90 +548,16 @@ The missing URL. sub addMissing { my $self = shift; my $assetUrl = shift; - return undef unless ($self->session->var->isAdminOn); - my $ac = $self->getAdminConsole; + return undef unless ($self->session->isAdminOn); my $i18n = WebGUI::International->new($self->session, "Asset"); my $output = $i18n->get("missing page query"); $output .= ''; - return $ac->render($output); + return $output; } -#------------------------------------------------------------------- - -=head2 assetDbProperties ( session, assetId, className, revisionDate ) - -Class method to return all properties in all tables used by a particular Asset. -Returns a hash ref with data from the table. - -=head3 session - -A reference to the current session. - -=head3 assetId - -The assetId of the asset you're creating an object reference for. Must not be blank. - -=head3 className - -By default we'll use whatever class it is called by like WebGUI::Asset::File->new(), so WebGUI::Asset::File would be used. - -=head3 revisionDate - -An epoch date that represents a specific version of an asset. - -=cut - -sub assetDbProperties { - my $class = shift; - my $session = shift; - my ($assetId, $className, $revisionDate) = @_; - my $sql = "select * from asset"; - my $where = " where asset.assetId=?"; - my $placeHolders = [$assetId]; - foreach my $definition (@{$className->definition($session)}) { - $sql .= ",".$definition->{tableName}; - $where .= " and (asset.assetId=".$definition->{tableName}.".assetId and ".$definition->{tableName}.".revisionDate=".$revisionDate.")"; - } - return $session->db->quickHashRef($sql.$where, $placeHolders); -} - -#------------------------------------------------------------------- - -=head2 assetExists ( session, assetId, className, revisionDate ) - -Class method that checks to see if an asset exists in all the proper tables for -the requested asset class. Returns true or false. - -=head3 session - -A reference to the current session. - -=head3 assetId - -The assetId of the asset you're creating an object reference for. Must not be blank. - -=head3 className - -By default we'll use whatever class it is called by like WebGUI::Asset::File->new(), so WebGUI::Asset::File would be used. - -=head3 revisionDate - -An epoch date that represents a specific version of an asset. - -=cut - -sub assetExists { - my $class = shift; - my $session = shift; - my ($assetId, $className, $revisionDate) = @_; - my $dbProperties = $class->assetDbProperties($session, $assetId, $className, $revisionDate); - return exists $dbProperties->{assetId}; -} - - #------------------------------------------------------------------- =head2 canAdd ( session, [userId, groupId] ) @@ -290,10 +663,10 @@ sub canView { $user = $self->session->user; $userId = $user->userId(); } - if ($userId eq $self->get("ownerUserId")) { + if ($userId eq $self->ownerUserId) { return 1; } - elsif ($user->isInGroup($self->get("groupIdView"))) { + elsif ($user->isInGroup($self->groupIdView)) { return 1; } return $self->canEdit($userId); @@ -317,33 +690,34 @@ to SSL. sub checkView { my $self = shift; return $self->session->privilege->noAccess() unless $self->canView; - my ($conf, $env, $var, $http) = $self->session->quick(qw(config env var http)); - if ($conf->get("sslEnabled") && $self->get("encryptPage") && ! $env->sslRequest) { + my $session = $self->session; + my ($conf, $response) = $self->session->quick(qw(config response)); + if ($conf->get("sslEnabled") && $self->get("encryptPage") && ! $self->session->request->secure) { # getUrl already changes url to https if 'encryptPage' - $http->setRedirect($self->getUrl); - $http->sendHeader; + $response->setRedirect($self->getUrl); + $response->sendHeader; return "chunked"; } - elsif ($var->isAdminOn && $self->get("state") =~ /^trash/) { # show em trash + elsif ($session->isAdminOn && $self->get("state") =~ /^trash/) { # show em trash my $queryFrag = "func=manageTrash"; if ($self->session->form->process('revision')) { $queryFrag .= ";revision=".$self->session->form->process('revision'); } - $http->setRedirect($self->getUrl($queryFrag)); - $http->sendHeader; + $response->setRedirect($self->getUrl($queryFrag)); + $response->sendHeader; return "chunked"; } - elsif ($var->isAdminOn && $self->get("state") =~ /^clipboard/) { # show em clipboard + elsif ($session->isAdminOn && $self->get("state") =~ /^clipboard/) { # show em clipboard my $queryFrag = "func=manageClipboard"; if ($self->session->form->process('revision')) { $queryFrag .= ";revision=".$self->session->form->process('revision'); } - $http->setRedirect($self->getUrl($queryFrag)); - $http->sendHeader; + $response->setRedirect($self->getUrl($queryFrag)); + $response->sendHeader; return "chunked"; } elsif ($self->get("state") ne "published") { # tell em it doesn't exist anymore - $http->setStatus("410"); + $session->response->status(410); my $notFound = WebGUI::Asset->getNotFound($self->session); $self->session->asset($notFound); return $notFound->www_view; @@ -365,207 +739,24 @@ Returns the new Asset object. sub cloneFromDb { my $self = shift; - return WebGUI::Asset->new($self->session, + return WebGUI::Asset->newById($self->session, $self->getId, - $self->get('className'), - $self->get('revisionDate') + $self->revisionDate ); } #------------------------------------------------------------------- -=head2 definition ( session, [ definition ] ) +=head2 extraHeadTags ( value ) -Basic definition of an Asset. Properties, default values. Returns an array reference containing tableName,className,properties +Returns extraHeadTags -=head3 session +=head3 value -The current session object. - -=head3 definition - -An array reference containing additional information to include with the default definition. +If specified, stores it, but also updates extraHeadTagsPacked with the packed version. =cut -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift || []; - my $i18n = WebGUI::International->new($session, "Asset"); - my %properties; - tie %properties, 'Tie::IxHash'; - %properties = ( - title=>{ - tab=>"properties", - label=>$i18n->get(99), - hoverHelp=>$i18n->get('99 description'), - fieldType=>'text', - defaultValue=>'Untitled', - filter=>'fixTitle', - }, - menuTitle=>{ - tab=>"properties", - label=>$i18n->get(411), - hoverHelp=>$i18n->get('411 description'), - uiLevel=>1, - fieldType=>'text', - filter=>'fixTitle', - defaultValue=>'Untitled', - }, - url=>{ - tab=>"properties", - label=>$i18n->get(104), - hoverHelp=>$i18n->get('104 description'), - uiLevel=>3, - fieldType=>'text', - defaultValue=>'', - filter=>'fixUrl', - }, - isHidden=>{ - tab=>"display", - label=>$i18n->get(886), - hoverHelp=>$i18n->get('886 description'), - uiLevel=>6, - fieldType=>'yesNo', - defaultValue=>0, - }, - newWindow=>{ - tab=>"display", - label=>$i18n->get(940), - hoverHelp=>$i18n->get('940 description'), - uiLevel=>9, - fieldType=>'yesNo', - defaultValue=>0, - }, - encryptPage=>{ - fieldType => ($session->config->get("sslEnabled") ? 'yesNo' : 'hidden'), - tab => "security", - label => $i18n->get('encrypt page'), - hoverHelp => $i18n->get('encrypt page description'), - uiLevel => 6, - defaultValue => 0, - }, - ownerUserId=>{ - tab=>"security", - label=>$i18n->get(108), - hoverHelp=>$i18n->get('108 description'), - uiLevel=>6, - fieldType=>'user', - filter=>'fixId', - defaultValue=>'3', - }, - groupIdView=>{ - tab=>"security", - label=>$i18n->get(872), - hoverHelp=>$i18n->get('872 description'), - uiLevel=>6, - fieldType=>'group', - filter=>'fixId', - defaultValue=>'7', - }, - groupIdEdit=>{ - tab=>"security", - label=>$i18n->get(871), - excludeGroups=>[1,7], - hoverHelp=>$i18n->get('871 description'), - uiLevel=>6, - fieldType=>'group', - filter=>'fixId', - defaultValue=>'4', - }, - synopsis=>{ - tab=>"meta", - label=>$i18n->get(412), - hoverHelp=>$i18n->get('412 description'), - uiLevel=>3, - fieldType=>'textarea', - defaultValue=>undef, - }, - extraHeadTags=>{ - tab=>"meta", - label=>$i18n->get("extra head tags"), - hoverHelp=>$i18n->get('extra head tags description'), - uiLevel=>5, - fieldType=>'codearea', - defaultValue=>undef, - customDrawMethod => 'drawExtraHeadTags', - filter => 'packExtraHeadTags', - }, - extraHeadTagsPacked => { - fieldType => 'hidden', - defaultValue => undef, - noFormPost => 1, - }, - usePackedHeadTags => { - tab => "meta", - label => $i18n->get('usePackedHeadTags label'), - hoverHelp => $i18n->get('usePackedHeadTags description'), - uiLevel => 7, - fieldType => 'yesNo', - defaultValue => 0, - }, - isPackage=>{ - label=>$i18n->get("make package"), - tab=>"meta", - hoverHelp=>$i18n->get('make package description'), - uiLevel=>7, - fieldType=>'yesNo', - defaultValue=>0, - }, - isPrototype=>{ - tab=>"meta", - label=>$i18n->get("make prototype"), - hoverHelp=>$i18n->get('make prototype description'), - uiLevel=>9, - fieldType=>'yesNo', - defaultValue=>0, - }, - isExportable=>{ - tab=>'meta', - label=>$i18n->get('make asset exportable'), - hoverHelp=>$i18n->get('make asset exportable description'), - uiLevel=>9, - fieldType=>'yesNo', - defaultValue=>1, - }, - inheritUrlFromParent=>{ - tab=>'meta', - label=>$i18n->get('does asset inherit URL from parent'), - hoverHelp=>$i18n->get('does asset inherit URL from parent description'), - uiLevel=>9, - fieldType=>'yesNo', - defaultValue=>0, - }, - status=>{ - noFormPost=>1, - fieldType=>'hidden', - defaultValue=>'pending', - }, - lastModified=>{ - noFormPost=>1, - fieldType=>'hidden', - defaultValue=>time(), - }, - assetSize=>{ - noFormPost=>1, - fieldType=>'hidden', - defaultValue=>0, - }, - ); - push(@{$definition}, { - assetName=>$i18n->get("asset"), - tableName=>'assetData', - autoGenerateForms=>1, - className=>'WebGUI::Asset', - icon=>'assets.gif', - properties=>\%properties - } - ); - return $definition; -} - - #------------------------------------------------------------------- =head2 dispatch ( $fragment ) @@ -584,41 +775,51 @@ Any leftover part of the requested URL. sub dispatch { my ($self, $fragment) = @_; return undef if $fragment; + my $session = $self->session; my $state = $self->get('state'); + ##Only allow interaction with assets in certain states - return if $state ne 'published' && $state ne 'archived' && !$session->var->isAdminOn; - my $func = $session->form->param('func') || 'view'; - my $viewing = $func eq 'view' ? 1 : 0; - my $sub = $self->can('www_'.$func); - if (!$sub && $func ne 'view') { - $sub = $self->can('www_view'); - $viewing = 1; + return if $state ne 'published' && $state ne 'archived' && !$session->isAdminOn; + + # needed for tests that call straight here but otherwise redundant with same in WebGUI.pm + local $SIG{__DIE__} = sub { WebGUI::Error::RunTime->throw( message => $_[0] ); }; + + + for my $func ( $session->form->param('func'), 'view' ) { + + # if there's no output from the user specified func, try view next + + my $viewing = $func eq 'view' ? 1 : 0; + my $sub = $self->can('www_'.$func); + + if (!$sub && $func ne 'view') { + $sub = $self->can('www_view'); + $viewing = 1; + } + + return undef unless $sub; + + my $output = eval { $self->$sub(); }; + + if ( $@ ) { + my $e = Exception::Class->caught(); + # previously, this only handled WebGUI::Error::ObjectNotFound::Template + my $errstr = sprintf( + "Couldn't call method ``%s'' on asset for url ``%s'': Error: ``%s''", + "www_$func", $session->url->getRequestedUrl, $e->error, + ); + $errstr .= " templateId: " . $e->templateId if $e->can('templateId') and $e->templateId; + $errstr .= " assetId: " . $e->assetId if $e->can('assetId') and $e->assetId; + $session->log->error($errstr); + $e->rethrow if $session->request->env->{'webgui.debug'}; + } + + return $output if $output || $viewing; + } - return undef unless $sub; - my $output = eval { $self->$sub(); }; - if (my $e = Exception::Class->caught('WebGUI::Error::ObjectNotFound::Template')) { - #WebGUI::Error::ObjectNotFound::Template - $session->log->error(sprintf "%s templateId: %s assetId: %s", $e->error, $e->templateId, $e->assetId); - } - elsif ($@) { - my $message = $@; - $session->log->warn("Couldn't call method www_".$func." on asset for url: ".$session->url->getRequestedUrl." Root cause: ".$message); - } - return $output if $output || $viewing; - ##No output, try the view method instead - $output = eval { $self->www_view }; - if (my $e = Exception::Class->caught('WebGUI::Error::ObjectNotFound::Template')) { - $session->log->error(sprintf "%s templateId: %s assetId: %s", $e->error, $e->templateId, $e->assetId); - return "chunked"; - } - elsif ($@) { - warn "logged another warn: $@"; - my $message = $@; - $session->log->warn("Couldn't call method www_view on asset for url: ".$session->url->getRequestedUrl." Root cause: ".$@); - return "chunked"; - } - return $output; + + return ''; # not reached } @@ -640,81 +841,9 @@ sub drawExtraHeadTags { }); } - #------------------------------------------------------------------- -=head2 DESTROY ( ) - -Completely remove an asset from existence. - -=cut - -sub DESTROY { - my $self = shift; - - # Let the parent be garbage collected if no one else is referencing - # him. firstChild and lastChild are weak references, so no need to - # worry about them here. - delete $self->{_parent}; - - $self = undef; -} - - -#------------------------------------------------------------------- - -=head2 fixId ( id, fieldName ) - -Returns the default Id for a field if we get an invalid Id, otherwise returns the id passed in. An valid id either looks like a GUID or is an integer. - -=head3 id - -The id to check. - -=head3 fieldName - -The name of the property we're checking. This is used to retrieve whatever the default is set to in the definition. - -=cut - -sub fixId { - my $self = shift; - my $id = shift; - my $field = shift; - if ($id =~ m/\A \d{1,22} \z/xms || $id =~ m/\A [A-Za-z0-9\-\_]{22} \z/xms) { - return $id; - } - return $self->getValue($field); -} - - -#------------------------------------------------------------------- - -=head2 fixTitle ( string ) - -Fixes a title by eliminating HTML from it. - -=head3 string - -Any text string. Most likely will have been the Asset's name or title. If -no string is supplied, then it will fetch the default title for the asset, -or the word Untitled. - -=cut - -sub fixTitle { - my $self = shift; - my $string = shift; - if (lc($string) eq "untitled" || $string eq "") { - $string = $self->getValue("title") || 'Untitled'; - } - return WebGUI::HTML::filter($string, 'all'); -} - - -#------------------------------------------------------------------- - -=head2 fixUrl ( url ) +=head2 fixUrl ( [value] ) Returns a URL, removing invalid characters and making it unique by adding a digit to the end if necessary. URLs are not allowed to be @@ -728,7 +857,7 @@ Assets have a maximum length of 250 characters. Any URL longer than URLs will be passed through $session->url->urlize to make them WebGUI compliant. That includes any languages specific constraints set up in the default language pack. -=head3 url +=head3 value Any text string. Most likely will have been the Asset's name or title. If the string is not passed in, then a url will be constructed from @@ -741,22 +870,28 @@ sub fixUrl { # build a URL from the parent unless ($url) { - $url = $self->getParent->get("url"); + if (my $parent = $self->getParent) { + $url = $parent->url; + } $url =~ s/(.*)\..*/$1/; - $url .= '/'.$self->getValue("menuTitle"); + $url .= '/'.$self->menuTitle; } # if we're inheriting the URL from our parent, set that appropriately - if($self->get('inheritUrlFromParent')) { - $url = $self->fixUrlFromParent($url); + if ($self->inheritUrlFromParent) { + # if we're inheriting the URL from our parent, set that appropriately + my @parts = split(m{/}, $url); + # don't do anything unless we need to + my $inheritUrl = $self->getParent->get('url') . '/' . $parts[-1]; + $url = $inheritUrl if $url ne $inheritUrl; } $url = $self->session->url->urlize($url); # fix urls used by uploads and extras # and those beginning with http my @badUrls = ( - $self->session->config->get("extrasURL"), - $self->session->config->get("uploadsURL"), + $self->session->url->make_urlmap_work($self->session->config->get("extrasURL")), + $self->session->url->make_urlmap_work($self->session->config->get("uploadsURL")), ); foreach my $badUrl (@badUrls) { $badUrl =~ s{ / $ }{}x; # Remove trailing slashes from the end of the URL @@ -805,40 +940,12 @@ sub fixUrl { $parts[0] .= "2"; } $url = join(".",@parts); - $url = $self->fixUrl($url); + @_ = ($self, $url); + goto $self->can('fixUrl'); } return $url; } - -#------------------------------------------------------------------- - -=head2 fixUrlFromParent ( url ) - -URLs will be passed through $session->url->urlize to make them WebGUI compliant. -That includes any languages specific constraints set up in the default language pack. - -=head3 url - -Any text string. - -=cut - -sub fixUrlFromParent { - my $self = shift; - my $url = shift; - - # if we're inheriting the URL from our parent, set that appropriately - my @parts = split(m{/}, $url); - - # don't do anything unless we need to - if($url ne $self->getParent->get('url') . '/' . $parts[-1]) { - $url = $self->getParent->get('url') . '/' . $parts[-1]; - } - - return $url; -} - #------------------------------------------------------------------- =head2 forkWithStatusPage ($args) @@ -885,80 +992,55 @@ sub forkWithStatusPage { $args->{plugin}, { title => $i18n->get( $args->{title} ), icon => 'assets', + dialog => $args->{dialog}, + message => $args->{message}, proceed => $args->{redirect} || '', } ); - $session->http->setRedirect( $self->getUrl($pairs) ); + $session->response->setRedirect( $self->getUrl($pairs) ); return 'redirect'; } ## end sub forkWithStatusPage #------------------------------------------------------------------- -=head2 get ( [propertyName] ) +=head2 getClassById ( $session, $assetId ) -Returns a reference to a list of properties (or specified property) of an Asset. +Class method that looks up a className for an object in the database, using it's assetId. -If C is omitted, it will return a safe copy of the entire property hash. +If a class cannot be found for the requested assetId, then it throws a WebGUI::Error::InvalidParam +exception. -=head3 propertyName +=head3 $session -Any of the values associated with the properties of an Asset. Default choices are "title", "menutTitle", -"synopsis", "url", "groupIdEdit", "groupIdView", "ownerUserId", "keywords", and "assetSize". +A WebGUI::Session object. + +=head3 $assetId + +The assetId of the object to lookup in the database. =cut -sub get { - my $self = shift; - my $propertyName = shift; - if (defined $propertyName) { - if ($propertyName eq "keywords") { - return WebGUI::Keyword->new($self->session)->getKeywordsForAsset({asset => $self}); - } - return $self->{_properties}{$propertyName}; - } - my %copyOfHashRef = %{$self->{_properties}}; - my $keywords = WebGUI::Keyword->new($self->session)->getKeywordsForAsset({asset => $self}); - if( $keywords ne '' ) { $copyOfHashRef{ keywords } = $keywords ; } - return \%copyOfHashRef; -} +sub getClassById { + my $class = shift; + my $session = shift; + my $assetId = shift; + # Cache the className lookup + my $assetClass = $session->stow->get("assetClass"); + my $className = $assetClass->{$assetId}; + return $className if $className; + $className = $session->db->quickScalar( + "select className from asset where assetId=?", + [$assetId] + ); + $assetClass->{ $assetId } = $className; + $session->stow->set("assetClass", $assetClass); -#------------------------------------------------------------------- + return $className if $className; -=head2 getAdminConsole ( ) + WebGUI::Error::InvalidParam->throw(error => "Couldn't lookup className", param => $assetId); -Returns a reference to a WebGUI::AdminConsole object. - -=cut - -sub getAdminConsole { - my $self = shift; - unless (exists $self->{_adminConsole}) { - $self->{_adminConsole} = WebGUI::AdminConsole->new($self->session,"assets"); - } - $self->{_adminConsole}->setIcon($self->getIcon); - return $self->{_adminConsole}; -} - - -#------------------------------------------------------------------- - -=head2 getCache ( ) - -Returns a cache object specific to this asset, and whether or not the request is in SSL mode. - -=cut - -sub getCache { - my $self = shift; - my $session = $self->session; - my $cacheKey = "view_".$self->getId; - if ($session->env->sslRequest) { - $cacheKey .= '_ssl'; - } - my $cache = WebGUI::Cache->new($session, $cacheKey); - return $cache; } @@ -980,6 +1062,23 @@ sub getContainer { } } +#------------------------------------------------------------------- + +=head2 getContentLastModified + +Returns the overall modification time of the object and its content in Unix +epoch format, for the purpose of the Last-Modified HTTP header. Override this +for subclasses that contain content that is not solely lastModified property, +which gets updated every time update() is called. + +=cut + +sub getContentLastModified { + my $self = shift; + return $self->get("lastModified"); +} + + #------------------------------------------------------------------- =head2 getDefault ( session ) @@ -995,7 +1094,7 @@ A reference to the current session. sub getDefault { my $class = shift; my $session = shift; - return $class->newByDynamicClass($session, $session->setting->get("defaultPage")); + return $class->newById($session, $session->setting->get("defaultPage")); } @@ -1003,284 +1102,172 @@ sub getDefault { =head2 getEditForm () -Creates and returns a tabform to edit parameters of an Asset. See L for -adding additional tabs. +Creates and returns a WebGUI::FormBuilder form to edit parameters of an Asset. =cut sub getEditForm { - my $self = shift; - my $session = $self->session; - my $i18n = WebGUI::International->new($session, "Asset"); - my $ago = $i18n->get("ago"); - my $tabform = WebGUI::TabForm->new($session,undef,undef,$self->getUrl()); - my $overrides = $session->config->get("assets/".$self->get("className")); + my $self = shift; + my $session = $self->session; + my $i18n = WebGUI::International->new( $session, "Asset" ); + my $f = WebGUI::FormBuilder->new( $session ); - # Set the appropriate URL - # If we're adding a new asset, don't set anything - if ( $session->form->get( "func" ) ne "add" ) { - $tabform->formHeader( { action => $self->getUrl, method => "POST" } ); + ### + # Create the main tabset + $self->addEditSaveTabs($f); + + ### + # Asset ID and class name + my $assetId; + my $class; + if ( $self->getId eq "new" ) { + $assetId = "new"; } - - if ($session->config->get("enableSaveAndCommit")) { - $tabform->submitAppend(WebGUI::Form::submit($session, { - name => "saveAndCommit", - value => $i18n->get("save and commit"), - })); - } - - $tabform->submitAppend( - WebGUI::Form::submit ( $session, { - name => "saveAndReturn", - value => $i18n->get( "apply" ), - } ) + else { + $assetId = $self->getId; + } + $f->getTab("meta")->addField( "Guid", + name => "assetId", + value => $assetId, + label => $i18n->get( 'asset id' ), + hoverHelp => $i18n->get('asset id description'), + uiLevel => 9, + ); + $f->getTab("meta")->addField( "ClassName", + name => "className", + value => $self->className, + label => $i18n->get('class name', 'WebGUI'), + uiLevel => 9, ); - $tabform->hidden({ - name=>"func", - value=>"editSave" - }); - my $assetId; - my $class; - if ($self->getId eq "new") { - $assetId = "new"; - $class = $session->form->process("class","className"); - } - else { - # revision history - $assetId = $self->getId; - $class = $self->get('className'); - my $ac = $self->getAdminConsole; - $ac->addSubmenuItem($self->getUrl("func=manageRevisions"),$i18n->get("revisions").":"); - my $rs = $session->db->read("select revisionDate from assetData where assetId=? order by revisionDate desc limit 5", [$assetId]); - while (my ($version) = $rs->array) { - my ($interval, $units) = $session->datetime->secondsToInterval(time() - $version); - $ac->addSubmenuItem($self->getUrl("func=edit;revision=".$version), $interval." ".$units." ".$ago); - } - } - if (my $proceed = $session->form->process("proceed")) { - $tabform->hidden({ - name=>"proceed", - value=>$proceed, - }); - if (my $returnUrl = $session->form->process('returnUrl')) { - $tabform->hidden({ - name=>"returnUrl", - value=>$returnUrl, - }); + ### + # Keywords + $f->getTab( "meta" )->addField( 'Keywords', + name => 'keywords', + value => $self->get('keywords'), + label => $i18n->get( 'keywords' ), + hoverHelp => $i18n->get( 'keywords help' ), + ); + + ### + # Properties + my $overrides = $session->config->get("assets/".$self->className) || {}; + foreach my $property ( $self->getProperties ) { + my $fieldHash = $self->getFieldData( $property ); + next if $fieldHash->{noFormPost}; + + $fieldHash = $self->setupFormField($property, $fieldHash, $overrides); + # Create tabs to have labels added later + if ( !$f->getTab( $fieldHash->{tab} ) ) { + $f->addTab( name => $fieldHash->{tab}, label => $fieldHash->{tab} ); } - } - - # create tabs - tie my %tabs, 'Tie::IxHash'; - foreach my $tabspec ($self->getEditTabs) { - $tabs{$tabspec->[0]} = { - label => $tabspec->[1], - uiLevel => $tabspec->[2], - }; - } - foreach my $tab (keys %{$overrides->{tabs}}) { - foreach my $key (keys %{$overrides->{tabs}{$tab}}) { - $tabs{$tab}{$key} = $overrides->{tabs}{$tab}{$key}; - } - } - foreach my $tab (keys %tabs) { - $tabform->addTab($tab, $tabs{$tab}{label}, $tabs{$tab}{uiLevel}); - } - # process errors - my $errors = $session->stow->get('editFormErrors'); - if ($errors) { - $tabform->getTab("properties")->readOnly( - -value=>"

    Some error(s) occurred:

    • ".join('
    • ', @$errors).'

    ', - ); - } - - # build the definition to the generate form - my @definitions = reverse @{$self->definition($session)}; - tie my %baseProperties, 'Tie::IxHash'; - %baseProperties = ( - assetId => { - fieldType => "guid", - label => $i18n->get("asset id"), - value => $assetId, - hoverHelp => $i18n->get('asset id description'), - uiLevel => 9, - tab => "meta", - }, - class => { - fieldType => "className", - label => $i18n->get("class name",'WebGUI'), - value => $class, - uiLevel => 9, - tab => "meta", - }, - keywords => { - label => $i18n->get('keywords'), - hoverHelp => $i18n->get('keywords help'), - value => $self->get('keywords'), - fieldType => 'keywords', - tab => 'meta', - } - ); - unshift @definitions, { - autoGenerateForms => 1, - properties => \%baseProperties - }; - - # extend the definition with metadata - tie my %extendedProperties, 'Tie::IxHash'; - if ($session->setting->get("metaDataEnabled")) { - my $meta = $self->getMetaDataFields(); - foreach my $field (keys %$meta) { - my $fieldType = $meta->{$field}{fieldType} || "text"; - my $options = $meta->{$field}{possibleValues}; - # Add a "Select..." option on top of a select list to prevent from - # saving the value on top of the list when no choice is made. - if("\l$fieldType" eq "selectBox") { - $options = "|" . $i18n->get("Select") . "\n" . $options; - } - $extendedProperties{"metadata_".$meta->{$field}{fieldId}} = { - tab => "meta", - label => $meta->{$field}{fieldName}, - uiLevel => 5, - value => $meta->{$field}{value}, - extras => qq/title="$meta->{$field}{description}"/, - options => $options, - defaultValue => $meta->{$field}{defaultValue}, - fieldType => $fieldType - }; - } - # add metadata management - if ($session->user->isAdmin) { - $extendedProperties{_metadatamanagement} = { - tab => "meta", - fieldType => "readOnly", - value => '

    '.$i18n->get('Add new field').'

    ', - hoverHelp => $i18n->get('Add new field description'), - }; - } + $f->getTab( $fieldHash->{tab} )->addField( delete $fieldHash->{fieldType}, %{$fieldHash} ); } - push @definitions, { - autoGenerateForms => 1, - properties => \%extendedProperties - }; - - # generate the form - foreach my $definition (@definitions) { - my $properties = $definition->{properties}; - - # depricated...by WebGUI 8 they all must autogen forms - next unless ($definition->{autoGenerateForms}); - foreach my $fieldName (keys %{$properties}) { - my %fieldHash = %{$properties->{$fieldName}}; - my %params = (name => $fieldName, value => $self->getValue($fieldName)); - next if exists $fieldHash{autoGenerate} and not $fieldHash{autoGenerate}; + ### + # Meta data + if ( $session->setting->get("metaDataEnabled") ) { + my $meta = $self->getMetaDataFields(); + foreach my $field ( keys %$meta ) { + my $fieldType = $meta->{$field}{fieldType} || "text"; + my $options = $meta->{$field}{possibleValues}; - # apply config file changes - foreach my $key (keys %{$overrides->{fields}{$fieldName}}) { - $fieldHash{$key} = $overrides->{fields}{$fieldName}{$key}; - } - - # Kludge. - if (isIn($fieldHash{fieldType}, 'selectBox', 'workflow') and ref $params{value} ne 'ARRAY') { - $params{value} = [$params{value}]; - } - - if (exists $fieldHash{visible} and not $fieldHash{visible}) { - $params{fieldType} = 'hidden'; - } - else { - %params = (%params, %fieldHash); - delete $params{tab}; - } - - # if there isnt a tab specified lets define one - my $tab = $fieldHash{tab} || "properties"; - - # use a custom draw method - my $drawMethod = $properties->{$fieldName}{customDrawMethod}; - if ($drawMethod) { - $params{value} = $self->$drawMethod(\%params); - delete $params{name}; # don't want readOnly to generate a hidden field - $params{fieldType} = "readOnly"; + # Add a "Select..." option on top of a select list to prevent from + # saving the value on top of the list when no choice is made. + if ( "\l$fieldType" eq "selectBox" ) { + $options = "|" . $i18n->get("Select") . "\n" . $options; } + my $fieldName = "metadata_" . $meta->{$field}{fieldId}; + my $fieldData = { + label => $meta->{$field}{fieldName}, + uiLevel => 5, + value => $meta->{$field}{value}, + hoverHelp => $meta->{$field}{description}, + options => $options, + defaultValue => $meta->{$field}{defaultValue}, + }; + $f->getTab('meta')->addField( $fieldType, %{ $fieldData } ); + } ## end foreach my $field ( keys %$meta) + } ## end if ( $session->setting...) - #draw the field - $tabform->getTab($tab)->dynamicField(%params); - } - } + return $f; +} ## end sub getEditForm - # send back the object - return $tabform; -} +=head2 setupFormField ( $fieldName, $fieldHash, $overrides ) -sub setupFormField { - my ($self, $tabform, $fieldName, $extraFields, $overrides) = @_; - my %params = %{$extraFields->{$fieldName}}; - my $tab = delete $params{tab}; +Applies overrides from the WebGUI config file to a set of field data. The overridden +and updated field data is returned. - if (exists $overrides->{fields}{$fieldName}) { - my %overrideParams = %{$overrides->{fields}{$fieldName}}; - my $overrideTab = delete $overrideParams{tab}; - $tab = $overrideTab if defined $overrideTab; - foreach my $key (keys %overrideParams) { - (my $canon = $key) =~ s/^-//; - $params{$canon} = $overrideParams{$key}; - } - } +=head3 $fieldName - $tab ||= 'properties'; - return $tabform->getTab($tab)->dynamicField(%params); -} +The name of the field. -#------------------------------------------------------------------- +=head3 $fieldHash -=head2 getEditTabs () +A hash reference of field data for $fieldName. -Returns a list of arrayrefs, one per extra tab to add to the edit -form. The default is no extra tabs. Override this in a subclass to -add extra tabs. +=head3 $overrides -Each array ref will have 3 fields: - -=over 4 - -=item tabName - -This is the name of the tab that you will use in the definition subroutine to -add fields to the new tab. - -=item label - -This should be an internationalized label that will be displayed on the tab. - -=item uiLevel - -This is the UI level for the tab. - -=back - -Please see the example below for adding 1 tab. - - sub getEditTabs { - my $self = shift; - my $i18n = WebGUI::International->new($self->session,"myNamespace"); - return ($self->SUPER::getEditTabs, ['myTab', $i18n->get('myTabName'), 9]); - } +A hash reference of overrides from the config file. This is passed in instead of +looking it up each time as a speed optimization. =cut -sub getEditTabs { - my $self = shift; - my $i18n = WebGUI::International->new($self->session, "Asset"); - return (["properties", $i18n->get("properties"), 1], - ["display", $i18n->get(105), 5], - ["security", $i18n->get(107), 6], - ["meta", $i18n->get("Metadata"), 3]); +sub setupFormField { + my ( $self, $fieldName, $fieldHash, $overrides ) = @_; + + return $fieldHash unless exists $overrides->{fields}->{$fieldName}; + my %overrideParams = %{ $overrides->{fields}->{$fieldName} }; + foreach my $key ( keys %overrideParams ) { + (my $canon = $key) =~ s/^-//; + $fieldHash->{$canon} = $overrideParams{$key}; + } + return $fieldHash; + +} ## end sub setupFormField + +#------------------------------------------------------------------- + +=head2 getEditTemplate ( ) + +Get the template to edit this asset. Used by www_edit and www_add to present +the form to the user. Uses getEditTemplateId to get the template ID. + +=cut + +sub getEditTemplate { + my ( $self ) = @_; + my $f = eval { $self->getEditForm }; + if ( $@ ) { + $self->session->log->error( + sprintf "Couldn't build asset edit form for URL: '%s' because: %s", $self->url, $@ + ); + die $@; + } + $self->addEditSaveButtons( $f ); + $f->action( $self->getUrl ); # Must be changed for www_add/www_addSave + + my $template = WebGUI::Asset->newById( $self->session, $self->getEditTemplateId ); + $template->addForm( form => $f ); + $template->style( "PBtmpl0000000000000137" ); + + return $template; } +#------------------------------------------------------------------------- + +=head2 getEditTemplateId + +Get the edit template ID for this asset. Defaults to the Asset Edit template from +the settings + +=cut + +sub getEditTemplateId { + my ( $self ) = @_; + return $self->session->setting->get('templateIdAssetEdit'); +} #------------------------------------------------------------------- @@ -1292,12 +1279,131 @@ Returns the extraHeadTags stored in the asset. Called in $self->session->style- sub getExtraHeadTags { my $self = shift; - return $self->get('usePackedHeadTags') - ? $self->get('extraHeadTagsPacked') - : $self->get("extraHeadTags") + return $self->usePackedHeadTags + ? $self->extraHeadTagsPacked + : $self->extraHeadTags ; } +#---------------------------------------------------------------------------- + +=head2 getFieldData( property ) + +Returns the form field data for the given property name. Adds the +overrides from the config file. + +=cut + +sub getFieldData { + my ( $self, $property ) = @_; + my $session = $self->session; + my $overrides = $session->config->get( "assets/" . $self->get("className") . '/fields' ) || {}; + my $attr = $self->meta->find_attribute_by_name( $property ); + my $fieldType = $attr->fieldType; + my $fieldOverrides = $overrides->{ $property } || {}; + my $noFormPost = $attr->noFormPost; + if (ref $noFormPost eq 'CODE') { + $noFormPost = $self->$noFormPost; + } + my $fieldHash = { + fieldType => $fieldType, + noFormPost => $noFormPost, + tab => "properties", + %{ $self->getFormProperties( $property ) }, + %{ $overrides }, + name => $property, + value => $self->$property, + }; + + # Kludge... + if ( $fieldHash->{fieldType} ~~ ['selectBox', 'workflow'] and ref $fieldHash->{value} ne 'ARRAY' ) { + $fieldHash->{value} = [ $fieldHash->{value} ]; + } + + return $fieldHash; +}; + +#---------------------------------------------------------------------------- + +=head2 getHelpers ( ) + +Get the AssetHelpers for this asset. + +=cut + +sub getHelpers { + my ( $self ) = @_; + my $session = $self->session; + my ( $conf ) = $session->quick(qw{ config }); + my $i18n = WebGUI::International->new( $session, "Asset" ); + + my $default = { + change_url => { + className => 'WebGUI::AssetHelper::ChangeUrl', + label => $i18n->get('change url'), + }, + copy => { + className => 'WebGUI::AssetHelper::Copy', + label => $i18n->get('Copy'), + }, + copy_branch => { + className => 'WebGUI::AssetHelper::CopyBranch', + label => $i18n->get('copy branch'), + }, + shortcut => { + className => 'WebGUI::AssetHelper::CreateShortcut', + label => $i18n->get( 'create shortcut' ), + }, + duplicate => { + className => 'WebGUI::AssetHelper::Duplicate', + label => $i18n->get('duplicate'), + }, + cut => { + className => 'WebGUI::AssetHelper::Cut', + label => $i18n->get('cut'), + }, + edit => { + url => $self->getUrl( 'func=edit' ), + label => $i18n->get('edit'), + }, + edit_branch => { + className => 'WebGUI::AssetHelper::EditBranch', + label => $i18n->get( 'edit branch' ), + }, + export_html => { + className => 'WebGUI::AssetHelper::ExportHtml', + label => $i18n->get('export as html'), + }, + view => { + url => $self->getUrl( 'func=view' ), + label => $i18n->get('view'), + }, + lock => { + className => 'WebGUI::AssetHelper::Lock', + label => $i18n->get('lock'), + }, + delete => { + className => 'WebGUI::AssetHelper::Delete', + label => $i18n->get('delete'), + confirm => $i18n->get('43'), + }, + upload_files => { + className => 'WebGUI::AssetHelper::UploadFiles', + label => $i18n->get('upload files'), + }, + }; + + # Merge additional helpers for this class from config + my $confHelpers = $conf->get('assets/' . $self->className . '/helpers') || {}; + $default = { %$default, %$confHelpers }; + + # Process macros in labels + for my $helper ( values %$default ) { + WebGUI::Macro::process( \$helper->{label} ); + } + + return $default; +} #------------------------------------------------------------------- @@ -1312,10 +1418,8 @@ If this evaluates to True, then the smaller extras/adminConsole/small/assets.gif =cut sub getIcon { - my $self = shift; - my $small = shift; - my $definition = $self->definition($self->session); - my $icon = $definition->[0]{icon} || "assets.gif"; + my ($self, $small) = @_; + my $icon = $self->icon; return $self->session->url->extras('assets/small/'.$icon) if ($small); return $self->session->url->extras('assets/'.$icon); } @@ -1331,7 +1435,7 @@ Returns the assetId of an Asset. sub getId { my $self = shift; - return $self->get("assetId"); + return $self->assetId; } #------------------------------------------------------------------- @@ -1349,7 +1453,29 @@ A reference to the current session. sub getImportNode { my $class = shift; my $session = shift; - return WebGUI::Asset->newByDynamicClass($session, "PBasset000000000000002"); + return WebGUI::Asset->newById($session, "PBasset000000000000002"); +} + +#------------------------------------------------------------------- + +=head2 getInheritableProperties ( ) + +Returns a hash (list) of properties that should be inherited from a parent when creating an asset. + +=cut + +sub getInheritableProperties { + my $self = shift; + return ( + parentId => $self->getId, + groupIdView => $self->get("groupIdView"), + groupIdEdit => $self->get("groupIdEdit"), + ownerUserId => $self->get("ownerUserId"), + encryptPage => $self->get("encryptPage"), + styleTemplateId => $self->get("styleTemplateId"), + printableStyleTemplateId => $self->get("printableStyleTemplateId"), + isHidden => $self->get("isHidden"), + ); } @@ -1408,8 +1534,7 @@ sub getIsa { my $session = shift; my $offset = shift; my $options = shift; - my $def = $class->definition($session); - my $tableName = $def->[0]->{tableName}; + my $tableName = $class->tableName; #Strategy, generate the correct set of assetIds my $sql = "select assetId from assetData as ad "; if ($tableName ne 'assetData') { @@ -1469,7 +1594,7 @@ A reference to the current session. sub getMedia { my $class = shift; my $session = shift; - return WebGUI::Asset->newByDynamicClass($session, "PBasset000000000000003"); + return WebGUI::Asset->newById($session, "PBasset000000000000003"); } @@ -1482,11 +1607,12 @@ Returns the menu title of this asset. If it's not specified or it's "Untitled" t =cut sub getMenuTitle { - my $self = shift; - if ($self->get("menuTitle") eq "" || lc($self->get("menuTitle")) eq "untitled") { - return $self->getName; - } - return $self->get("menuTitle"); + my $self = shift; + my $menuTitle = $self->menuTitle; + if ( $menuTitle eq '' || lc $menuTitle eq 'untitled' ) { + return $self->getName; + } + return $menuTitle; } @@ -1494,14 +1620,18 @@ sub getMenuTitle { =head2 getName ( ) -Returns the internationalization of the word "Asset". +Returns the human readable name of the asset. =cut sub getName { my $self = shift; - my $definition = $self->definition($self->session); - return $definition->[0]{assetName}; + if ( ref $self->assetName eq 'ARRAY' ) { + return WebGUI::International->new($self->session, 'Asset')->get(@{ $self->assetName }); + } + else { + return $self->assetName; + } } @@ -1520,28 +1650,30 @@ A reference to the current session. sub getNotFound { my $class = shift; my $session = shift; - return WebGUI::Asset->newByDynamicClass($session, $session->setting->get("notFoundPage")); + return WebGUI::Asset->newById($session, $session->setting->get("notFoundPage")); } #------------------------------------------------------------------- -=head2 getPrototypeList ( ) +=head2 WebGUI::Asset::getPrototypeList ( session ) Returns an array of all assets that the user can view and edit that are prototypes. =cut sub getPrototypeList { - my $self = shift; - my $session = $self->session; + my $session = shift; + if ( $session->isa( 'WebGUI::Asset' ) ) { + $session = $session->session; + } my $db = $session->db; my @prototypeIds = $db->buildArray("select distinct assetId from assetData where isPrototype=1"); - my $userUiLevel = $session->user->profileField('uiLevel'); + my $userUiLevel = $session->user->get('uiLevel'); my @assets; ID: foreach my $id (@prototypeIds) { - my $asset = WebGUI::Asset->newByDynamicClass($session, $id); - next ID unless defined $asset; + my $asset = eval { WebGUI::Asset->newById($session, $id); }; + next ID if Exception::Class->caught(); next ID unless $asset->get('isPrototype'); next ID unless ($asset->get('status') eq 'approved' || $asset->get('tagId') eq $session->scratch->get("versionTag")); push @assets, $asset; @@ -1565,7 +1697,7 @@ A reference to the current session. sub getRoot { my $class = shift; my $session = shift; - return WebGUI::Asset->new($session, "PBasset000000000000001"); + return WebGUI::Asset->newById($session, "PBasset000000000000001"); } @@ -1616,7 +1748,7 @@ A reference to the current session. sub getTempspace { my $class = shift; my $session = shift; - return WebGUI::Asset->newByDynamicClass($session, "tempspace0000000000000"); + return WebGUI::Asset->newById($session, "tempspace0000000000000"); } @@ -1630,10 +1762,11 @@ Returns the title of this asset. If it's not specified or it's "Untitled" then t sub getTitle { my $self = shift; - if ($self->get("title") eq "" || lc($self->get("title")) eq "untitled") { + my $title = $self->title; + if ($title eq "" || lc($title) eq "untitled") { return $self->getName; } - return $self->get("title"); + return $title; } @@ -1641,129 +1774,16 @@ sub getTitle { =head2 getToolbar ( ) -Returns a toolbar with a set of icons that hyperlink to functions that delete, edit, promote, demote, cut, and copy. +Returns a toolbar placeholder, which can be filled in using the toolbar.js, located +in www/extras/admin/toolbar.js =cut sub getToolbar { my $self = shift; - return undef unless $self->canEdit && $self->session->var->isAdminOn; - return $self->{_toolbar} - if (exists $self->{_toolbar}); - my $userUiLevel = $self->session->user->profileField("uiLevel"); - my $uiLevels = $self->session->config->get("assetToolbarUiLevel"); - my $i18n = WebGUI::International->new($self->session, "Asset"); - my $toolbar = ""; - my $commit; - if ($self->canEditIfLocked) { - $toolbar .= $self->session->icon->delete('func=delete',$self->get("url"),$i18n->get(43)) - if ($userUiLevel >= $uiLevels->{"delete"}); - $toolbar .= $self->session->icon->edit('func=edit',$self->get("url")) - if ($userUiLevel >= $uiLevels->{"edit"}); - } - else { - $toolbar .= $self->session->icon->locked('func=manageRevisions',$self->get("url")) - if ($userUiLevel >= $uiLevels->{"revisions"}); - } - $toolbar .= $self->session->icon->cut('func=cut',$self->get("url")) - if ($userUiLevel >= $uiLevels->{"cut"}); - - if ($userUiLevel >= $uiLevels->{"copy"}) { - $toolbar .= $self->session->icon->copy('func=copy',$self->get("url")); - # if this asset has children, create a more full-featured menu for copying - if ($self->getChildCount) { - $toolbar - .= ''; - } - } - $toolbar .= $self->session->icon->shortcut('func=createShortcut',$self->get("url")) - if ($userUiLevel >= $uiLevels->{"shortcut"} && !$self->isa('WebGUI::Asset::Shortcut')); - - $self->session->style->setLink($self->session->url->extras('assetToolbar/assetToolbar.css'), {rel=>"stylesheet",type=>"text/css"}); - $self->session->style->setLink($self->session->url->extras('yui/build/menu/assets/skins/sam/menu.css'), {rel=>"stylesheet",type=>"text/css"}); - $self->session->style->setScript($self->session->url->extras('yui/build/yahoo-dom-event/yahoo-dom-event.js'), {type=>"text/javascript"}); - $self->session->style->setScript($self->session->url->extras('yui/build/container/container_core-min.js'), {type=>"text/javascript"}); - $self->session->style->setScript($self->session->url->extras('yui/build/menu/menu-min.js'), {type=>"text/javascript"}); - $self->session->style->setScript($self->session->url->extras('assetToolbar/assetToolbar.js'), {type=>"text/javascript"}); - my $output - = '
    ' - . '' . $self->getName . '' - . '
    ' - . '
    ' - . '
    ' . $toolbar . '
    '; - $self->{_toolbar} = $output; - return $output; + return sprintf '
    ', $self->getId; } -#------------------------------------------------------------------- - -=head2 getToolbarState ( ) - -Returns 0 if the state is normal, and 1 if the toolbar state has been toggled. See toggleToolbar() for details. - -=cut - -sub getToolbarState { - my $self = shift; - return $self->{_toolbarState}; -} - - #------------------------------------------------------------------- =head2 getUiLevel ( ) @@ -1778,7 +1798,7 @@ sub getUiLevel { my $className = $self->get("className"); return $uiLevel # passed in || $self->session->config->get("assets/".$className."/uiLevel") # from config - || $self->definition($self->session)->[0]{uiLevel} # from definition + || $self->uiLevel # from definition || 1; # if all else fails } @@ -1800,9 +1820,9 @@ Name value pairs to add to the URL in the form of: sub getUrl { my $self = shift; my $params = shift; - my $url = $self->get("url"); + my $url = $self->url; $url = $self->session->url->gateway($url,$params); - if ($self->get("encryptPage")) { + if ($self->encryptPage) { $url = $self->session->url->getSiteURL().$url; $url =~ s/http:/https:/; } @@ -1811,21 +1831,17 @@ sub getUrl { #------------------------------------------------------------------- -=head2 getContentLastModified +=head2 getViewCacheKey ( ) -Returns the overall modification time of the object and its content in Unix -epoch format, for the purpose of the Last-Modified HTTP header. Override this -for subclasses that contain content that is not solely lastModified property, -which gets updated every time update() is called. +Returns the cache key for content generated by this Asset's view method. =cut -sub getContentLastModified { +sub getViewCacheKey { my $self = shift; - return $self->get("lastModified"); + return 'view_'.$self->assetId; } - #------------------------------------------------------------------- =head2 getContentLastModifiedBy ( ) @@ -1841,35 +1857,21 @@ sub getContentLastModifiedBy { #------------------------------------------------------------------- -=head2 getValue ( key ) +=head2 getWwwCacheKey ( ) -Tries to look up C in the asset object's property cache. If it can't find it in there, then it -tries to look it up in the definition sub for the asset. - -Unlike get, it will not return the whole property hash if you omit the key. - -=head3 key - -An asset property name, or a propertyDefinition. +Returns a cache object specific to this asset, and whether or not the request is in SSL mode. =cut -sub getValue { - my $self = shift; - my $key = shift; - if (defined $key) { - my $storedValue = $self->get($key); - return $storedValue if (defined $storedValue); - unless (exists $self->{_propertyDefinitions}) { # check to see if the definitions have been merged and cached - my %properties; - foreach my $definition (@{$self->definition($self->session)}) { - %properties = (%properties, %{$definition->{properties}}); - } - $self->{_propertyDefinitions} = \%properties; - } - return $self->{_propertyDefinitions}{$key}{defaultValue}; - } - return undef; +sub getWwwCacheKey { + my $self = shift; + my $session = $self->session; + my $method = shift; + my $cacheKey = join '_', @_, $self->getId; + if ($session->request->secure) { + $cacheKey .= '_ssl'; + } + return $cacheKey; } @@ -1890,24 +1892,30 @@ sub indexContent { #------------------------------------------------------------------- -=head2 loadModule ( $session, $className ) +=head2 loadModule ( $className ) -Loads an asset module if it's not already in memory. This is a class -method. Returns undef on failure to load, otherwise returns the classname. -Will only load classes in the WebGUI::Asset namespace. +Loads an asset module if it's not already in memory. This is a class method. Returns +undef on failure to load, otherwise returns the classname. Will only load classes +in the WebGUI::Asset namespace. + +Throws a WebGUI::Invalid::Param error if a non-WebGUI::Asset class is requested to be +loaded. If there are compilation problems, it will throw a WebGUI::Error::Compile +exception. =cut sub loadModule { - my ($class, $session, $className) = @_; + my ($class, $className) = @_; if ($className !~ /^WebGUI::Asset(?:::\w+)*$/ ) { - return undef; + warn $className; + WebGUI::Error::InvalidParam->throw(param => $className, error => "Not a WebGUI::Asset class",); } (my $module = $className . '.pm') =~ s{::}{/}g; if (eval { require $module; 1 }) { return $className; } - $session->errorHandler->error("Couldn't compile asset package: ".$className.". Root cause: ".$@); + + WebGUI::Error::Compile->throw(class => $className, error => $@); return undef; } @@ -1931,9 +1939,43 @@ sub logView { #------------------------------------------------------------------- -=head2 new ( session, assetId [, className, revisionDate ] ) +=head2 title ( [value] ) -Constructor. This does not create an asset. +Returns the title of the asset. + +=head3 value + +If specified this value will be used to set the title after it goes through some validation checking. + +=cut + +#------------------------------------------------------------------- + +=head2 menuTitle ( [value] ) + +Returns the menuTitle of the asset, which is used in navigations. + +=head3 value + +If specified this value will be used to set the title after it goes through some validation checking. + +=cut + +#------------------------------------------------------------------- + +=head2 new ( propertyHashRef ) + +Asset Constructor. This does not create an asset in the database, or look up +properties in the database, but creates a WebGUI::Asset object. + +=head3 propertyHashRef + +A hash reference of properties to assign to the object. + +=head2 new ( session, assetId [,revisionDate ] ) + +Instanciator. This does not create an asset in the database, but looks up the object's +properties in the database and returns an object with the correct WebGUI::Asset subclass. =head3 session @@ -1943,10 +1985,6 @@ A reference to the current session. The assetId of the asset you're creating an object reference for. Must not be blank. -=head3 className - -By default we'll use whatever class it is called by like WebGUI::Asset::File->new(), so WebGUI::Asset::File would be used. - =head3 revisionDate An epoch date that represents a specific version of an asset. By default the most recent version will be used. If @@ -1954,71 +1992,14 @@ no revision date is available it will return undef. =cut -sub new { - my ( $class, $session, $assetId, $className, $revisionDate ) = @_; - weaken( $session ); - - unless (defined $assetId) { - $session->errorHandler->error("Asset constructor new() requires an assetId."); - return undef; - } - - if ($class eq 'WebGUI::Asset' && !$className) { - ($className) = $session->db->quickArray("select className from asset where assetId=?", [$assetId]); - unless ($className) { - $session->errorHandler->error("Couldn't instantiate asset: ".$assetId. ": couldn't find class name"); - return undef; - } - } - - if ($className) { - $class = $class->loadModule($session, $className); - return undef unless (defined $class); - } - - if ( !$revisionDate ) { - $revisionDate = $className - ? $className->getCurrentRevisionDate( $session, $assetId ) - : $class->getCurrentRevisionDate( $session, $assetId ); - return undef unless $revisionDate; - } - - my $cache = WebGUI::Cache->new($session, ["asset",$assetId,$revisionDate]); - my $properties = $cache->get; - if (exists $properties->{assetId}) { - # got properties from cache - } - else { - $properties = WebGUI::Asset->assetDbProperties($session, $assetId, $class, $revisionDate); - unless (exists $properties->{assetId}) { - $session->errorHandler->error("Asset $assetId $class $revisionDate is missing properties. Consult your database tables for corruption. "); - return undef; - } - # Deserialize - foreach my $definition (@{ $class->definition($session) }) { - foreach my $property (keys %{ $definition->{properties} }) { - if ($definition->{properties}->{$property}->{serialize} && $properties->{$property} ne '') { - $properties->{$property} = JSON->new->canonical->decode($properties->{$property}); - } - } - } - $cache->set($properties,60*60*24); - } - if (defined $properties) { - my $object = { _session=>$session, _properties => $properties }; - bless $object, $class; - return $object; - } - $session->errorHandler->error("Something went wrong trying to instanciate a '$className' with assetId '$assetId', but I don't know what!"); - return undef; -} - #------------------------------------------------------------------- -=head2 newByDynamicClass ( session, assetId [ , revisionDate ] ) +=head2 newById ( session, assetId [ , revisionDate ] ) -Instances an existing Asset, by looking up the classname of the asset specified by the assetId, and then calling new. -Returns undef if it can't find the classname. +Instances an existing Asset, by looking up the className of the asset specified by the assetId, and then calling new. + +If a class cannot be found for the requested assetId, then it throws a +WebGUI::Error::InvalidParam exception. =head3 session @@ -2026,49 +2007,29 @@ A reference to the current session. =head3 assetId -Must be a valid assetId +Must be a valid assetId. + +Throws a WebGUI::Error::InvalidParam exception if the assetId is not passed. =head3 revisionDate -A specific revision date for the asset to retrieve. If not specified, the most recent one will be used. +An optional, specific revision date for the asset to retrieve. If not specified, the most recent one will be used. =cut -sub newByDynamicClass { - my $class = shift; +sub newById { + my $requestedClass = shift; my $session = shift; my $assetId = shift; + if (!$assetId) { + WebGUI::Error::InvalidParam->throw(error => 'newById must get an assetId'); + } my $revisionDate = shift; - -# Some code requires that these situations not die. -# confess "newByDynamicClass requires WebGUI::Session" -# unless $session && blessed $session eq 'WebGUI::Session'; -# confess "newByDynamicClass requires assetId" -# unless $assetId; -# So just return instead - return undef unless ( $session && blessed $session eq 'WebGUI::Session' ) - && $assetId; - # Cache the className lookup - my $assetClass = $session->stow->get("assetClass"); - my $className = $assetClass->{$assetId}; + my $className = WebGUI::Asset->getClassById($session, $assetId); + my $class = WebGUI::Asset->loadModule($className); - unless ($className) { - $className - = $session->db->quickScalar( - "select className from asset where assetId=?", - [$assetId] - ); - $assetClass->{ $assetId } = $className; - $session->stow->set("assetClass", $assetClass); - } - - unless ( $className ) { - $session->errorHandler->error("Couldn't find className for asset '$assetId'"); - return undef; - } - - return WebGUI::Asset->new($session,$assetId,$className,$revisionDate); + return $class->new($session, $assetId, $revisionDate); } @@ -2076,7 +2037,10 @@ sub newByDynamicClass { =head2 newByPropertyHashRef ( session, properties ) -Constructor. This creates a standalone asset with no parent. It does not update the database. +Constructor. This is a class method. It creates a standalone asset with no parent, with a +varying class, determined by the className entry in the properties hash ref. + +The object created is not persisted to the database. =head3 session @@ -2084,19 +2048,20 @@ A reference to the current session. =head3 properties -A properties hash reference. The className of the properties hash must be valid. +A hash reference of Asset properties. =cut sub newByPropertyHashRef { - my $class = shift; - my $session = shift; - my $properties = shift; - return undef unless defined $properties; - return undef unless exists $properties->{className}; - my $className = $class->loadModule($session, $properties->{className}); + my $class = shift; + my $session = shift; + my $properties = shift || {}; + $properties->{className} //= $class; + $properties->{session} = $session; + my $className = $class->loadModule($properties->{className}); return undef unless (defined $className); - bless {_session=>$session, _properties => $properties}, $className; + my $object = $className->new($properties); + return $object; } #------------------------------------------------------------------- @@ -2122,23 +2087,20 @@ A specific revision to instanciate. By default we instanciate the newest publish =cut sub newByUrl { - my $class = shift; - my $session = shift; - my $url = shift || $session->url->getRequestedUrl; + my $class = shift; + my $session = shift; + my $url = shift || $session->url->getRequestedUrl; my $revisionDate = shift; - $url = lc($url); + $url = lc($url); $url =~ s/\/$//; $url =~ s/^\///; - $url =~ s/\'//; - $url =~ s/\"//; + $url =~ tr/'"//d; if ($url ne "") { - my ($id, $class) = $session->db->quickArray("select asset.assetId, asset.className from assetData join asset using (assetId) where assetData.url = ? limit 1", [ $url ]); - if ($id ne "" || $class ne "") { - return WebGUI::Asset->new($session,$id, $class, $revisionDate); - } else { - $session->errorHandler->warn("The URL $url was requested, but does not exist in your asset tree."); - return undef; - } + my ($id) = $session->db->quickArray("select assetId from assetData where url = ? limit 1", [ $url ]); + if (!$id) { + WebGUI::Error::ObjectNotFound->throw(error => "The URL was requested, but does not exist in your asset tree.", id => $url); + } + return WebGUI::Asset->newById($session, $id, $revisionDate); } return WebGUI::Asset->getDefault($session); } @@ -2155,24 +2117,25 @@ A reference to the current session. =head3 assetId -The asset's id +The asset's id. If an assetId is not passed, throws a WebGUI::Error::InvalidParam exception. If +a revision cannot be found for the requested assetId, then it throws a WebGUI::Error::InvalidParam +exception. =cut sub newPending { - my $class = shift; + my $class = shift; my $session = shift; my $assetId = shift; - croak "First parameter to newPending needs to be a WebGUI::Session object" - unless $session && $session->isa('WebGUI::Session'); - croak "Second parameter to newPending needs to be an assetId" - unless $assetId; - my ($className, $revisionDate) = $session->db->quickArray("SELECT asset.className, assetData.revisionDate FROM asset INNER JOIN assetData ON asset.assetId = assetData.assetId WHERE asset.assetId = ? ORDER BY assetData.revisionDate DESC LIMIT 1", [ $assetId ]); - if ($className ne "" || $revisionDate ne "") { - return WebGUI::Asset->new($session, $assetId, $className, $revisionDate); + if (!$assetId) { + WebGUI::Error::InvalidParam->throw(error => 'newPending must get an assetId'); + } + my $revisionDate = $session->db->quickScalar("SELECT revisionDate FROM assetData WHERE assetId = ? ORDER BY revisionDate DESC LIMIT 1", [ $assetId ]); + if ($revisionDate ne "") { + return WebGUI::Asset->newById($session, $assetId, $revisionDate); } else { - croak "Invalid asset id '$assetId' requested!"; + WebGUI::Error::InvalidParam->throw(error => "Couldn't lookup revisionDate", param => $assetId); } } @@ -2228,8 +2191,6 @@ The height of the iframe. Required for making widget-in-widget function properly The templateId for this widgetized asset to use. Required for making widget-in-widget function properly. -=cut - =head3 styleTemplateId The style templateId for this widgetized asset to use. Not required for making @@ -2250,7 +2211,7 @@ sub outputWidgetMarkup { my $assetId = $self->getId; my $hexId = $session->id->toHex($assetId); my $conf = $session->config; - my $extras = $conf->get('extrasURL'); + my $extras = $session->url->make_urlmap_work($conf->get('extrasURL')); # the widgetized version of content that has the widget macro in it is # executing in an iframe. this iframe doesn't have a style object. @@ -2317,32 +2278,6 @@ OUTPUT #------------------------------------------------------------------- -=head2 packExtraHeadTags ( unpacked ) - -Pack the extra head tags. Return the unpacked head tags (as per -filter guidelines). - -=cut - -sub packExtraHeadTags { - my ( $self, $unpacked ) = @_; - # If no more unpacked tags, remove the packed tags - if ( !$unpacked ) { - $self->update({ extraHeadTagsPacked => $unpacked }); - return; - } - my $packed = $unpacked; - HTML::Packer::minify( \$packed, { - remove_newlines => 1, - do_javascript => "shrink", - do_stylesheet => "minify", - } ); - $self->update({ extraHeadTagsPacked => $packed }); - return $unpacked; -} - -#------------------------------------------------------------------- - =head2 prepareView ( ) Executes what is necessary to make the view() method work with content chunking. @@ -2377,17 +2312,65 @@ asset open in a new window. sub prepareWidgetView { my $self = shift; my $templateId = shift; - my $template = WebGUI::Asset::Template->new($self->session, $templateId); - my $extras = $self->session->config->get('extrasURL'); + my $template = WebGUI::Asset::Template->newById($self->session, $templateId); + my $extras = $self->session->url->make_urlmap_work($self->session->config->get('extrasURL')); $template->prepare; $self->{_viewTemplate} = $template; } +#---------------------------------------------------------------------------- + +=head2 proceed ( [method] ) + +Redirect from a form submit based on the given method. By default, checks the "proceed" +form parameter. + +Proceed types: + + manageAssets - Go to the asset manager + viewParent - Go to the parent asset + editParent - Go to the parent asset edit form + goBackToPage - Go to the page specified in the "returnUrl" form param + * - Go to www_* method + - Go to the www_view method + +=cut + +sub proceed { + my ( $self, $proceed ) = @_; + my $session = $self->session; + + $proceed ||= $session->form->process('proceed'); + if ($proceed eq "manageAssets") { + $session->asset($self->getParent); + return $session->asset->www_manageAssets; + } + elsif ($proceed eq "viewParent") { + $session->response->setRedirect( $self->getParent->getUrl ); + return "redirect"; + } + elsif ($proceed eq "editParent") { + $session->response->setRedirect( $self->getParent->getUrl('func=edit') ); + return "redirect"; + } + elsif ($proceed eq "goBackToPage" && $session->form->process('returnUrl')) { + $session->response->setRedirect($session->form->process("returnUrl")); + return "redirect"; + } + elsif ($proceed ne "") { + $session->response->setRedirect( $self->getUrl( 'func=' . $proceed ) ); + return "redirect"; + } + + $session->response->setRedirect( $self->getUrl ); + return "redirect"; +} + #------------------------------------------------------------------- -=head2 processPropertiesFromFormPost ( ) +=head2 processEditForm ( ) Updates current Asset with data from Form. You can feed back errors by returning an arrayref containing the error messages. If there is no error you do not have to return @@ -2395,53 +2378,46 @@ anything. =cut -sub processPropertiesFromFormPost { - my $self = shift; - my %data; - my $form = $self->session->form; - my $overrides = $self->session->config->get("assets/".$self->get("className")."/fields"); +sub processEditForm { + my $self = shift; + my %data; + my $form = $self->session->form; + my $overrides = $self->session->config->get( "assets/" . $self->get("className") . "/fields" ); - foreach my $definition (@{$self->definition($self->session)}) { - foreach my $property (keys %{$definition->{properties}}) { - my %params = %{$definition->{properties}{$property}}; + foreach my $property ( $self->getProperties ) { + next if $self->meta->find_attribute_by_name( $property )->noFormPost; + + my $fieldType = $self->meta->find_attribute_by_name($property)->fieldType; + my $fieldOverrides = $overrides->{$property} || {}; + my $fieldHash = { + tab => "properties", + %{ $self->getFormProperties($property) }, + %{$overrides}, + name => $property, + value => $self->$property, + }; + + + # process the form element + my $defaultValue = $overrides->{defaultValue} // $self->$property; + $data{$property} = $form->process( $property, $fieldType, $defaultValue, $fieldHash ); + } ## end foreach my $property ( $self...) - # apply config file changes - foreach my $key (keys %{$overrides->{$property}}) { - $params{$key} = $overrides->{$property}{$key}; - } - - # deal with properties that can't be posted through the form - if ($params{noFormPost}) { - if ($form->process("assetId") eq "new" && $self->get($property) eq "") { - $data{$property} = $params{defaultValue}; - } - next; - } - - # process the form element - $params{name} = $property; - $params{value} = $self->get($property); - $data{$property} = $form->process( - $property, - $params{fieldType}, - $params{defaultValue}, - \%params - ); - } - } $data{keywords} = $form->process("keywords"); - if ($self->session->setting->get("metaDataEnabled")) { + if ( $self->session->setting->get("metaDataEnabled") ) { my $meta = $self->getMetaDataFields; - foreach my $field (keys %{$meta}) { - my $value = $form->process("metadata_".$field, $meta->{$field}{fieldType}, $meta->{$field}{defaultValue}); - $self->updateMetaData($field, $value); - } + foreach my $field ( keys %{$meta} ) { + my $value + = $form->process( "metadata_" . $field, $meta->{$field}{fieldType}, $meta->{$field}{defaultValue} ); + $self->updateMetaData( $field, $value ); + } } - $self->session->db->beginTransaction; - $self->update(\%data); - $self->session->db->commit; + + $self->session->db->beginTransaction; + $self->update( \%data ); + $self->session->db->commit; return undef; -} +} ## end sub processEditForm #------------------------------------------------------------------- @@ -2474,16 +2450,18 @@ sub processTemplate { # Sanity checks if (ref $var ne "HASH") { - $session->errorHandler->error("First argument to processTemplate() should be a hash reference."); + $session->log->error("First argument to processTemplate() should be a hash reference."); return "Error: Can't process template for asset ".$self->getId." of type ".$self->get("className"); } - $template = WebGUI::Asset->new($session, $templateId,"WebGUI::Asset::Template") unless (defined $template); - if (defined $template) { + if (!defined $template) { + $template = eval { WebGUI::Asset->newById($session, $templateId) }; + } + if (! Exception::Class->caught() ) { $var = { %{ $var }, %{ $self->getMetaDataAsTemplateVariables } }; - $var->{'controls'} = $self->getToolbar if $session->var->isAdminOn; + $var->{'controls'} = $self->getToolbar if $session->isAdminOn; $var->{'assetIdHex'} = $session->id->toHex($self->getId); my %vars = ( - %{$self->{_properties}}, + %{$self->get}, 'title' => $self->getTitle, 'menuTitle' => $self->getMenuTitle, 'keywords' => $self->get('keywords'), @@ -2492,7 +2470,7 @@ sub processTemplate { return $template->process(\%vars); } else { - $session->errorHandler->error("Can't instantiate template $templateId for asset ".$self->getId); + $session->log->error("Can't instantiate template $templateId for asset ".$self->getId); my $i18n = WebGUI::International->new($self->session, 'Asset'); return $i18n->get('Error: Cannot instantiate template').' '.$templateId; } @@ -2553,16 +2531,17 @@ sub publish { my $stateList = $self->session->db->quoteAndJoin($statesToPublish); my $where = ($statesToPublish) ? "and state in (".$stateList.")" : ""; - my $assetIds = $self->session->db->buildArrayRef("select assetId from asset where lineage like ".$self->session->db->quote($self->get("lineage").'%')." $where"); + my $assetIds = $self->session->db->buildArrayRef("select assetId from asset where lineage like ".$self->session->db->quote($self->lineage.'%')." $where"); my $idList = $self->session->db->quoteAndJoin($assetIds); $self->session->db->write("update asset set state='published', stateChangedBy=".$self->session->db->quote($self->session->user->userId).", stateChanged=".time()." where assetId in (".$idList.")"); - my $cache = WebGUI::Cache->new($self->session); foreach my $id (@{$assetIds}) { - # we do the purge directly cuz it's a lot faster than instantiating all these assets - $cache->deleteChunk(["asset",$id]); + my $asset = WebGUI::Asset->newPending($self->session, $id); + if (defined $asset) { + $asset->purgeCache; + } } - $self->{_properties}{state} = "published"; + $self->state("published"); # Also publish any shortcuts to this asset that are in the trash my $shortcuts @@ -2580,7 +2559,7 @@ sub publish { =head2 purgeCache ( ) -Purges all cache entries associated with this asset. +Purges all cache entries associated with this asset, CHI, Session->stow and object caches =cut @@ -2590,7 +2569,8 @@ sub purgeCache { $stow->delete('assetLineage'); $stow->delete('assetClass'); $stow->delete('assetRevision'); - WebGUI::Cache->new($self->session,["asset",$self->getId,$self->get("revisionDate")])->deleteChunk(["asset",$self->getId]); + $self->session->cache->remove("asset".$self->getId.$self->revisionDate); + $self->{_parent}; } @@ -2617,12 +2597,6 @@ Returns a reference to the current session. =cut -sub session { - my ($self) = @_; - return $self->{_session}; -} - - #------------------------------------------------------------------- =head2 setSize ( [extra] ) @@ -2643,9 +2617,9 @@ sub setSize { $sizetest .= $self->get($key); } my $size = length($sizetest) + $extra; - $self->session->db->write("update assetData set assetSize=".$size." where assetId=".$self->session->db->quote($self->getId)." and revisionDate=".$self->session->db->quote($self->get("revisionDate"))); + $self->session->db->write("update assetData set assetSize=? where assetId=? and revisionDate=?",[$size, $self->getId, $self->revisionDate]); $self->purgeCache; - $self->{_properties}{assetSize} = $size; + $self->assetSize($size); } #------------------------------------------------------------------- @@ -2672,149 +2646,65 @@ sub setState { $self->getId, ] ); - @{$self->{_properties}}{qw(state stateChangedBy stateChanged)} = @props; + $self->state($state); + $self->stateChangedBy($props[1]); + $self->stateChanged($props[2]); $self->purgeCache; } #------------------------------------------------------------------- -=head2 toggleToolbar ( ) +=head2 write ( ) -Toggles a toolbar to a special state so that custom toolbars can be rendered under special circumstances. This is mostly useful for macros that wish to proxy an asset but not display the toolbar. +Stores the current properties of the asset in the database. =cut -sub toggleToolbar { +sub write { my $self = shift; - if ($self->{_toolbarState}) { - $self->{_toolbarState} = 0; - } else { - $self->{_toolbarState} = 1; - } -} - - -#------------------------------------------------------------------- - -=head2 update ( properties ) - -Updates the properties of an existing revision. If you want to create a new revision, please use addRevision(). - -=head3 properties - -Hash reference of properties and values to set. - -NOTE: C is a special property that uses the WebGUI::Keyword API -to set the keywords for this asset. - -=cut - -sub update { - my $self = shift; - my $requestedProperties = shift; - my $properties = clone($requestedProperties); - $properties->{lastModified} = time(); + $self->lastModified(time()); - # if keywords were specified, then let's set them the right way - if (exists $properties->{keywords}) { - WebGUI::Keyword->new($self->session)->setKeywordsForAsset( - {keywords=>$properties->{keywords}, asset=>$self}); + my $db = $self->session->db; + my %data_by_table = (); + + PROPERTY: foreach my $property_name ($self->meta->get_all_property_list) { + my $property = $self->meta->find_attribute_by_name($property_name); + my $tableName = $property->tableName; + my $value = $self->$property_name; + if ($property->does('WebGUI::Definition::Meta::Property::Serialize')) { + $value = eval { JSON::to_json($value); } || ''; + } + push @{ $data_by_table{$tableName}->{NAMES} }, $property_name; + push @{ $data_by_table{$tableName}->{VALUES} }, $value; + } + CLASS: foreach my $tableName (keys %data_by_table) { + my $table = $db->quoteIdentifier($tableName); + my @values = @{ $data_by_table{$tableName}->{VALUES} }; + my @columnNames = map { $db->quoteIdentifier($_).'=?' } @{ $data_by_table{$tableName}->{NAMES}}; + push @values, $self->getId, $self->revisionDate; + $db->write("update ".$table." set ".join(",",@columnNames)." where assetId=? and revisionDate=?",\@values); } - ##If inheritUrlFromParent was sent, and it is true, then muck with the url - ##The URL may have been sent too, so use it or the current Asset's URL. - if (exists $properties->{inheritUrlFromParent} and $properties->{inheritUrlFromParent}) { - $properties->{'url'} = $self->fixUrlFromParent($properties->{'url'} || $self->get('url')); - } - - # check the definition of all properties against what was given to us - foreach my $definition (reverse @{$self->definition($self->session)}) { - my %setPairs = (); - - # get a list of the fields available in this table so we don't try to insert - # something for a field that doesn't exist - my %tableFields = (); - my $sth = $self->session->db->read('DESCRIBE `'.$definition->{tableName}.'`'); - while (my ($col) = $sth->array) { - $tableFields{$col} = 1; - } - - # deal with all the properties in this part of the definition - foreach my $property (keys %{$definition->{properties}}) { - -# # skip a property unless it was specified to be set by the properties field or has a default value -# next unless (exists $properties->{$property} || exists $definition->{properties}{$property}{defaultValue}); - # skip a property unless it was specified to be set by the properties field - next unless (exists $properties->{$property}); - my $propertyDefinition = $definition->{properties}{$property}; - # skip a property if it has the display only flag set - next if ($propertyDefinition->{displayOnly}); - - # skip properties that aren't yet in the table - if (!exists $tableFields{$property}) { - $self->session->log->error("update() tried to set field named '".$property."' which doesn't exist in table '".$definition->{tableName}."'"); - next; - } - - # use the update value - my $value = $properties->{$property}; - # use the current value because the update value was undef - unless (defined $value) { - $value = $self->get($property); - } - - # apply filter logic on a property to validate or fix it's value - if (exists $propertyDefinition->{filter}) { - my $filter = $propertyDefinition->{filter}; - $value = $self->$filter($value, $property); - } - - # if the value is undefined, use the default if possible - # unless allowEmpty has been set, do this for empty strings as well - if ( ( !defined $value || ( $value eq q{} && ! $propertyDefinition->{allowEmpty} ) ) - && exists $propertyDefinition->{defaultValue} ) { - $value = $propertyDefinition->{defaultValue}; - if (ref($value) eq 'ARRAY') { - $value = $value->[0]; - } - } - - # set the property - if ($propertyDefinition->{serialize}) { - # Only serialize references - if ( ref $value ) { - $setPairs{$property} = JSON->new->canonical->encode($value); - } - # Passing already serialized JSON string - elsif ( $value ) { - $setPairs{$property} = $value; - $value = JSON->new->decode( $value ); # for setting in _properties, below - } - } - else { - $setPairs{$property} = $value; - } - $self->{_properties}{$property} = $value; - } - - # if there's anything to update, then do so - if (scalar(keys %setPairs) > 0) { - my @values = values %setPairs; - my @columnNames = map { $_.'=?' } keys %setPairs; - push(@values, $self->getId, $self->get("revisionDate")); - $self->session->db->write("update ".$definition->{tableName}." set ".join(",",@columnNames)." where assetId=? and revisionDate=?",\@values); - } - } - - # we've changed something so we need to update our size + # update the asset's size, which also purges the cache. $self->setSize(); + WebGUI::Keyword->new($self->session)->setKeywordsForAsset({ asset => $self, keywords => $self->keywords }); - # we've changed something so cache is no longer valid - $self->purgeCache; + $self->purgeCache; } #------------------------------------------------------------------- +=head2 url ( [ value ] ) + +Returns the asset's url without any site specific prefixes. If you want a browser friendly url see the getUrl() method. + +=head3 value + +The new value to set the URL to. + +=cut + +#------------------------------------------------------------------- =head2 urlExists ( session, url [, options] ) @@ -2856,18 +2746,15 @@ sub urlExists { #------------------------------------------------------------------- -=head2 validParent ( ) +=head2 valid_parent_classes ( ) -Make sure that the current session asset is a valid parent for the child and return true or false. -For example, a WikiPage would check for a WikiMaster. It should be overridden by those children -that need to perform that kind of check. - -This is a class method. +Returns an arrayref of classes that this asset is allowed to be a child of. If +a candidate parent passes ->isa for any of these it is a valid parent. =cut -sub validParent { - return 1; +sub valid_parent_classes { + return [qw/WebGUI::Asset/]; } #------------------------------------------------------------------- @@ -2880,7 +2767,7 @@ The default view method for any asset that doesn't define one. Under all normal sub view { my $self = shift; - if ($self->session->var->isAdminOn) { + if ($self->session->isAdminOn) { return $self->getToolbar.' '.$self->getTitle; } else { return ""; @@ -2891,217 +2778,96 @@ sub view { =head2 www_add ( ) -Create a new, unsaved asset with a parent of this asset from C, C, and optional C parameters and present the -edit screen for it. -Calls C to configure the new asset; the default implementation inherits security and -style properties from the current asset, the parent. +Show the form to add a new child asset. =cut sub www_add { - my $self = shift; - my $class = $self->loadModule($self->session, $self->session->form->process("class","className")); - my $prototype = $self->session->form->process('prototype'); - my $url = scalar($self->session->form->param("url")); - + my $self = shift; + my $session = $self->session; + my ( $style, $url ) = $session->quick(qw( style url )); + my %prototypeProperties; + my $class = $self->loadModule($self->session->form->process("className","className")); return undef unless (defined $class); return $self->session->privilege->insufficient() unless ($class->canAdd($self->session)); - - my $newAsset = $class->get_add_instance( $self->session, $self, $url, $prototype ); - - $newAsset->{_parent} = $self; - return $newAsset->www_edit(); -} - -#------------------------------------------------------------------- - -=head2 get_add_instance ( $session, $parentAsset, $url, $prototype ) - -Class method. -Called from C by the parent asset on the class of the new asset being constructed. -Configures the new asset with defaults, including inheriting security and style properties from the current asset. -C<$prototype> is the optional assetId of an asset to initialize the new asset from. - -=cut - -sub get_add_instance { - my $class = shift; - my $session = shift; - my $parentAsset = shift; - my $url = shift; - my $prototype = shift; - - my %prototypeProperties; - - if ($prototype) { - my $prototype = WebGUI::Asset->new($session, $prototype, $class); - foreach my $definition (@{$prototype->definition($session)}) { # cycle through rather than copying properties to avoid grabbing stuff we shouldn't grab - foreach my $property (keys %{$definition->{properties}}) { - next if (isIn($property,qw(title menuTitle url isPrototype isPackage))); - next if ($definition->{properties}{$property}{noFormPost}); - $prototypeProperties{$property} = $prototype->get($property); - } + if ($self->session->form->process('prototype')) { + my $prototype = WebGUI::Asset->newById($self->session, $self->session->form->process("prototype")); + foreach my $property ($prototype->getProperties) { # cycle through rather than copying properties to avoid grabbing stuff we shouldn't grab + my $definition = $prototype->getProperty($property); + next if ( $property ~~ [qw(title menuTitle url isPrototype isPackage)]); + next if ($definition->{noFormPost}); + $prototypeProperties{$property} = $prototype->get($property); } } + my %properties = ( + %prototypeProperties, + className=>$class, + $self->getInheritableProperties, + assetId=>"new", + url=>scalar($self->session->form->param("url")), + ); + $properties{isHidden} = 1 unless $self->session->config->get("assets/".$class."/isContainer"); + my $newAsset = WebGUI::Asset->newByPropertyHashRef($self->session,\%properties); + $newAsset->{_parent} = $self; - my %properties = ( - %prototypeProperties, - parentId => $parentAsset->getId, - groupIdView => $parentAsset->get("groupIdView"), - groupIdEdit => $parentAsset->get("groupIdEdit"), - ownerUserId => $parentAsset->get("ownerUserId"), - encryptPage => $parentAsset->get("encryptPage"), - styleTemplateId => $parentAsset->get("styleTemplateId"), - printableStyleTemplateId => $parentAsset->get("printableStyleTemplateId"), - isHidden => $parentAsset->get("isHidden"), - className => $class, - assetId => "new", - url => $url, - ); - $properties{isHidden} = 1 unless $session->config->get("assets/".$class."/isContainer"); - - return WebGUI::Asset->newByPropertyHashRef($session, \%properties); - + my $template = eval { $newAsset->getEditTemplate }; + return $@ if $@; + if (! blessed $template ) { + return $template; + } + if ( $template->getForm("form") ) { + $template->getForm("form")->action( $self->getUrl ); + $template->getForm("form")->addField( "Hidden", name => "func", value => "addSave" ); + } + return $template; } -#------------------------------------------------------------------- +#---------------------------------------------------------------------------- -=head2 www_ajaxInlineView ( ) +=head2 www_addSave -Returns the view() method of the asset object if the requestor canView. +Process the add form, creating the new asset. =cut -sub www_ajaxInlineView { - my $self = shift; - return $self->session->privilege->noAccess() unless $self->canView; - $self->prepareView; - return $self->view; -} - - -#------------------------------------------------------------------- - -=head2 www_changeUrl ( ) - -Allows a user to change a url permanently to something else. - -=cut - -sub www_changeUrl { - my $self = shift; - return $self->session->privilege->insufficient() unless $self->canEdit; - my $i18n = WebGUI::International->new($self->session, "Asset"); - my $f = WebGUI::HTMLForm->new($self->session, action=>$self->getUrl); - $f->hidden(name=>"func", value=>"changeUrlConfirm"); - $f->hidden(name=>"proceed", value=>scalar($self->session->form->param("proceed"))); - $f->text(name=>"url", value=>$self->get('url'), label=>$i18n->get("104"), hoverHelp=>$i18n->get('104 description')); - $f->yesNo(name=>"confirm", value=>0, label=>$i18n->get("confirm change"), hoverHelp=>$i18n->get("confirm change url message"), subtext=>'
    '.$i18n->get("confirm change url message")); - $f->submit; - return $self->getAdminConsole->render($f->print,$i18n->get("change url")); -} - -#------------------------------------------------------------------- - -=head2 www_changeUrlConfirm ( ) - -This actually does the change url of the www_changeUrl() function. - -=cut - -sub www_changeUrlConfirm { - my $self = shift; - return $self->session->privilege->insufficient() unless $self->canEdit; - $self->_invokeWorkflowOnExportedFiles($self->session->setting->get('changeUrlWorkflow'), 1); - - if ($self->session->form->process("confirm","yesNo") && $self->session->form->process("url","text")) { - $self->update({url=>$self->session->form->process("url","text")}); - my $rs = $self->session->db->read("select revisionDate from assetData where assetId=? and revisionDate<>?",[$self->getId, $self->get("revisionDate")]); - while (my ($version) = $rs->array) { - my $old = WebGUI::Asset->new($self->session, $self->getId, $self->get("className"), $version); - $old->purgeRevision if defined $old; - } - } - - if ($self->session->form->param("proceed") eq "manageAssets") { - $self->session->http->setRedirect($self->getManagerUrl); - } else { - $self->session->http->setRedirect($self->getUrl()); - } - - return undef; -} - -#------------------------------------------------------------------- - -=head2 www_edit ( ) - -Renders an AdminConsole EditForm, unless canEdit returns False. - -=cut - -sub www_edit { - my $self = shift; - return $self->session->privilege->insufficient() unless $self->canEdit; - return $self->session->privilege->locked() unless $self->canEditIfLocked; - return $self->getAdminConsole->render($self->getEditForm->print, $self->addEditLabel); -} - -#------------------------------------------------------------------- - -=head2 www_editSave ( ) - -Saves and updates history. If canEdit, returns www_manageAssets() if a new Asset is created, otherwise returns www_view(). Will return an insufficient Privilege if canEdit returns False, or if the submitted form does not pass the C<$session->form->validToken> check. - -NOTE: Don't try to override or overload this method. It won't work. What you are looking for is processPropertiesFromFormPost(). - -=cut - -sub www_editSave { +sub www_addSave { my $self = shift; my $session = $self->session; + my ( $form ) = $session->quick(qw{ form }); - ##If this is a new asset (www_add), the parent may be locked. We should still be able to add a new asset. - my $isNewAsset = $session->form->process("assetId") eq "new" ? 1 : 0; - return $session->privilege->locked() if (!$self->canEditIfLocked and !$isNewAsset); - return $session->privilege->insufficient() unless $self->canEdit && $session->form->validToken; + return $session->privilege->insufficient() unless $self->canEdit; if ($self->session->config->get("maximumAssets")) { my ($count) = $self->session->db->quickArray("select count(*) from asset"); my $i18n = WebGUI::International->new($self->session, "Asset"); - return $self->session->style->userStyle($i18n->get("over max assets")) if ( $self->session->config->get("maximumAssets") <= $count && $isNewAsset ); + return $self->session->style->userStyle($i18n->get("over max assets")) if ($self->session->config->get("maximumAssets") <= $count); } + + # Add the new asset my $object; - if ($isNewAsset) { - my $className = $session->form->process("class","className"); - return $session->privilege->insufficient() if ($isNewAsset && !$className->canAdd($session)); - $object = $self->addChild({className=> $className}); - return $self->www_view unless defined $object; - $object->{_parent} = $self; - $object->{_properties}{url} = undef; - } - else { - if ($self->canEditIfLocked) { - $object = $self->addRevision; - } - else { - return $session->asset($self->getContainer)->www_view; - } + my $className = $form->process('className','className') || $form->process('class','className'); + $object = $self->addChild({ + className => $className, + revisedBy => $session->user->userId, + }); + if ( !defined $object ) { + my $url = $session->url->page; + $session->log->error( "Could not add child $className to $url!" ); + return $self->www_view; } + $object->{_parent} = $self; + $object->url(undef); # Process properties from form post - my $errors = $object->processPropertiesFromFormPost; + my $errors = $object->processEditForm; if (ref $errors eq 'ARRAY') { + my $url = $session->url->page; + $session->log->error( "Cannot add asset $className to $url: '" . join( "', '", @$errors ) . q{'} ); $session->stow->set('editFormErrors', $errors); - if ($session->form->process('assetId') eq 'new') { - $object->purge; - return $self->www_add(); - } else { - $object->purgeRevision; - return $self->www_edit(); - } + $object->purge; + return $self->www_add(); } - $object->updateHistory("edited"); + $object->updateHistory("added"); # we handle auto commit assets here in case they didn't handle it themselves if ($object->getAutoCommitWorkflowId) { @@ -3133,61 +2899,108 @@ sub www_editSave { } # Handle "proceed" form parameter - my $proceed = $session->form->process('proceed'); - if ($proceed eq "manageAssets") { - $session->asset($object->getParent); - return $session->asset->www_manageAssets; - } - elsif ($proceed eq "viewParent") { - $session->asset($object->getParent); - return $session->asset->www_view; - } - elsif ($proceed eq "editParent") { - $session->asset($object->getParent); - return $session->asset->www_edit; - } - elsif ($proceed eq "goBackToPage" && $session->form->process('returnUrl')) { - $session->http->setRedirect($session->form->process("returnUrl")); - return undef; - } - elsif ($proceed ne "") { - my $method = "www_".$session->form->process("proceed"); - $session->asset($object); - return $session->asset->$method(); - } - - $session->asset($object->getContainer); - return $session->asset->www_view; -} - - -#------------------------------------------------------------------- - -=head2 www_manageAssets ( ) - -Redirect to the asset manager content handler (for backwards compatibility) - -=cut - -sub www_manageAssets { - my $self = shift; - $self->session->http->setRedirect( $self->getManagerUrl ); - return "redirect"; + return $object->proceed; } #------------------------------------------------------------------- -=head2 www_searchAssets ( ) +=head2 www_ajaxInlineView ( ) -Redirect to the asset manager content handler (for backwards -compatibility) +Returns the view() method of the asset object if the requestor canView. =cut -sub www_searchAssets { +sub www_ajaxInlineView { + my $self = shift; + return $self->session->privilege->noAccess() unless $self->canView; + $self->prepareView; + return $self->view; +} + +#------------------------------------------------------------------- + +=head2 www_edit ( ) + +Renders an AdminConsole EditForm, unless canEdit returns False. + +=cut + +sub www_edit { my $self = shift; - $self->session->http->setRedirect( $self->getSearchUrl ); - return "redirect"; + my $session = $self->session; + my ( $style, $url ) = $session->quick(qw( style url )); + return $self->session->privilege->insufficient() unless $self->canEdit; + return $self->session->privilege->locked() unless $self->canEditIfLocked; + + my $template = $self->getEditTemplate; + if ( my $form = $template->getForm('form') ) { + $form->addField( "Hidden", name => "func", value => "editSave" ); + } + + return $template; +} + +#------------------------------------------------------------------- + +=head2 www_editSave ( ) + +Save a new revision of this asset. + +=cut + +sub www_editSave { + my $self = shift; + my $session = $self->session; + my ( $form ) = $session->quick(qw{ form }); + + ##If this is a new asset (www_add), the parent may be locked. We should still be able to add a new asset. + return $session->privilege->locked() unless $self->canEditIfLocked; + return $session->privilege->insufficient() unless $self->canEdit; + + # Add the new revision + my $object = $self->addRevision(); + + # Process properties from form post + my $errors = $object->processEditForm; + if (ref $errors eq 'ARRAY') { + $session->stow->set('editFormErrors', $errors); + $object->purgeRevision; + return $self->www_edit(); + } + + $object->updateHistory("edited"); + + # we handle auto commit assets here in case they didn't handle it themselves + if ($object->getAutoCommitWorkflowId) { + $object->requestAutoCommit; + #Since the version tag makes new objects, fetch a fresh one here. + $object = $object->cloneFromDb; + } + # else, try to to auto commit + else { + my $commitStatus = WebGUI::VersionTag->autoCommitWorkingIfEnabled($session, { + override => scalar $session->form->process('saveAndCommit'), + allowComments => 1, + returnUrl => $self->getUrl, + }); + if ($commitStatus eq 'redirect') { + ##Redirect set by tag. Return nothing to send the user over to the redirect. + return 'redirect'; + } + elsif ($commitStatus eq 'commit') { + ##Commit was successful. Update the local object cache so that it will no longer + ##register as locked. + $object = $object->cloneFromDb; + } + } + + # Handle "saveAndReturn" button + if ( $session->form->process( "saveAndReturn" ) ne "" ) { + return $object->www_edit; + } + + # Handle "proceed" form parameter + return $self->proceed; } #------------------------------------------------------------------- @@ -3203,7 +3016,7 @@ sub www_view { # don't allow viewing of the root asset if ($self->getId eq "PBasset000000000000001") { - $self->session->http->setRedirect($self->getDefault($self->session)->getUrl); + $self->session->response->setRedirect($self->getDefault($self->session)->getUrl); return undef; } @@ -3246,4 +3059,5 @@ sub www_widgetView { return $self->outputWidgetMarkup($width, $height, $templateId, $styleTemplateId); } +__PACKAGE__->meta->make_immutable; 1; diff --git a/lib/WebGUI/Asset/EMSSubmission.pm b/lib/WebGUI/Asset/EMSSubmission.pm index 8d4af8b19..7a287b62d 100644 --- a/lib/WebGUI/Asset/EMSSubmission.pm +++ b/lib/WebGUI/Asset/EMSSubmission.pm @@ -3,7 +3,7 @@ package WebGUI::Asset::EMSSubmission; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -14,11 +14,142 @@ package WebGUI::Asset::EMSSubmission; =cut -use Class::C3; use strict; +use Moose; +use WebGUI::Definition::Asset; +use WebGUI::Asset; +use WebGUI::International; +use WebGUI::Form::Combo; +use WebGUI::Form::SelectBox; +use WebGUI::Form::CheckList; + +extends 'WebGUI::Asset'; +define tableName => 'EMSSubmission'; +define assetNae => ['assetName', 'Asset_EMSSubmission']; +define icon => 'EMSSubmission.gif'; + +property submissionId => ( + noFormPost => 1, + fieldType => "hidden", + default => undef, +); +property submissionStatus => ( + fieldType => "selectList", + default => 'pending', + customDrawMethod => 'drawStatusField', + label => [ "submission status", 'Asset_EMSSubmission' ], + hoverHelp => [ "submission status help", 'Asset_EMSSubmission' ] +); +property description => ( + tab => "properties", + fieldType => "HTMLArea", + default => undef, + label => [ "description", 'Asset_Sku' ], + hoverHelp => [ "description help", 'Asset_Sku' ] +); +property sku => ( + tab => "shop", + fieldType => "text", + builder => '_builder_sku', + lazy => 1, + label => [ "sku", 'Asset_Sku' ], + hoverHelp => [ "sku help", 'Asset_Sku' ] +); +sub _builder_sku { + my $self = shift; + return $self->session->id->generate; +} +property displayTitle => ( + tab => "display", + fieldType => "yesNo", + default => 1, + label => [ "display title", 'Asset_Sku' ], + hoverHelp => [ "display title help", 'Asset_Sku' ] +); +property vendorId => ( + tab => "shop", + fieldType => "vendor", + default => 'defaultvendor000000000', + label => [ "vendor", 'Asset_Sku' ], + hoverHelp => [ "vendor help", 'Asset_Sku' ] +); +property shipsSeparately => ( + tab => 'shop', + fieldType => 'yesNo', + default => 0, + label => [ 'shipsSeparately', 'Asset_Sku' ], + hoverHelp => [ 'shipsSeparately help', 'Asset_Sku' ], +); + +property price => ( + tab => "shop", + fieldType => "float", + default => 0.00, + label => [ "price", 'Asset_EMSSubmission' ], + hoverHelp => [ "price help", 'Asset_EMSSubmission' ], +); +property seatsAvailable => ( + tab => "shop", + fieldType => "integer", + default => 25, + label => [ "seats available", 'Asset_EMSSubmission' ], + hoverHelp => [ "seats available help", 'Asset_EMSSubmission' ], +); +property startDate => ( + noFormPost => 1, + fieldType => "dateTime", + builder => '_default_startDate', + label => [ "add/edit event start date", 'Asset_EMSSubmission' ], + hoverHelp => [ "add/edit event start date help", 'Asset_EMSSubmission' ], + autoGenerate => 0, +); +sub _default_startDate { + return WebGUI::DateTime->new()->toMysql; +} +property duration => ( + tab => "properties", + fieldType => "float", + default => 1.0, + subtext => [ 'hours', 'Asset_EMSSubmission' ], + label => [ "duration", 'Asset_EMSSubmission' ], + hoverHelp => [ "duration help", 'Asset_EMSSubmission' ], +); +property location => ( + fieldType => "combo", + tab => "properties", + customDrawMethod => 'drawLocationField', + label => [ "location", 'Asset_EMSSubmission' ], + hoverHelp => [ "location help", 'Asset_EMSSubmission' ], +); +property relatedBadgeGroups => ( + tab => "properties", + fieldType => "checkList", + customDrawMethod => 'drawRelatedBadgeGroupsField', + label => [ "related badge groups", 'Asset_EMSSubmission' ], + hoverHelp => [ "related badge groups ticket help", 'Asset_EMSSubmission' ], +); +property relatedRibbons => ( + tab => "properties", + fieldType => "checkList", + customDrawMethod => 'drawRelatedRibbonsField', + label => [ "related ribbons", 'Asset_EMSSubmission' ], + hoverHelp => [ "related ribbons help", 'Asset_EMSSubmission' ], +); +property eventMetaData => ( + noFormPost => 1, + fieldType => "hidden", + default => '{}', +); +property ticketId => ( + noFormPost => 1, + fieldType => "hidden", + default => '', +); + +with 'WebGUI::Role::Asset::Comments'; + use Tie::IxHash; -use base qw(WebGUI::AssetAspect::Comments WebGUI::Asset); -use WebGUI::Utility; +use base qw(WebGUI::Asset); use WebGUI::Inbox; =head1 NAME @@ -58,173 +189,15 @@ send email when a comment is added =cut -sub addComment { +around addComment => sub { + my $orig = shift; my $self = shift; $self->update({lastReplyBy => $self->session->user->userId}); - $self->next::method(@_); + $self->$orig(@_); $self->sendEmailUpdate; -} +}; -#------------------------------------------------------------------- - -=head2 addRevision - -This method exists for demonstration purposes only. The superclass -handles revisions to NewAsset Assets. - -=cut - -#sub addRevision { -# my $self = shift; -# my $newSelf = $self->next::method(@_); -# return $newSelf; -#} - -#------------------------------------------------------------------- - -=head2 definition ( session, definition ) - -defines asset properties for New Asset instances. You absolutely need -this method in your new Assets. - -=head3 session - -=head3 definition - -A hash reference passed in from a subclass definition. - -=cut - -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift; - my $i18n = WebGUI::International->new( $session, "Asset_EMSSubmission" ); - my $EMS_i18n = WebGUI::International->new($session, "Asset_EventManagementSystem"); - my $SKU_i18n = WebGUI::International->new($session, "Asset_Sku"); - tie my %properties, 'Tie::IxHash', ( - submissionId => { - noFormPost => 1, - fieldType => "hidden", - defaultValue => undef, - }, - submissionStatus => { - fieldType =>"selectList", - defaultValue => 'pending', - customDrawMethod=> 'drawStatusField', - label => $i18n->get("submission status"), - hoverHelp => $i18n->get("submission status help") - }, - description => { - tab => "properties", - fieldType => "HTMLArea", - defaultValue => undef, - label => $SKU_i18n->get("description"), - hoverHelp => $SKU_i18n->get("description help") - }, - sku => { - tab => "shop", - fieldType => "text", - defaultValue => $session->id->generate, - label => $SKU_i18n->get("sku"), - hoverHelp => $SKU_i18n->get("sku help") - }, - displayTitle => { - tab => "display", - fieldType => "yesNo", - defaultValue => 1, - label => $SKU_i18n->get("display title"), - hoverHelp => $SKU_i18n->get("display title help") - }, - vendorId => { - tab => "shop", - fieldType => "vendor", - defaultValue => 'defaultvendor000000000', - label => $SKU_i18n->get("vendor"), - hoverHelp => $SKU_i18n->get("vendor help") - }, - shipsSeparately => { - tab => 'shop', - fieldType => 'yesNo', - defaultValue => 0, - label => $SKU_i18n->get('shipsSeparately'), - hoverHelp => $SKU_i18n->get('shipsSeparately help'), - }, - - price => { - tab => "shop", - fieldType => "float", - defaultValue => 0.00, - label => $EMS_i18n->get("price"), - hoverHelp => $EMS_i18n->get("price help"), - }, - seatsAvailable => { - tab => "shop", - fieldType => "integer", - defaultValue => 25, - label => $EMS_i18n->get("seats available"), - hoverHelp => $EMS_i18n->get("seats available help"), - }, - startDate => { - noFormPost => 1, - fieldType => "dateTime", - defaultValue => '', - label => $EMS_i18n->get("add/edit event start date"), - hoverHelp => $EMS_i18n->get("add/edit event start date help"), - autoGenerate => 0, - }, - duration => { - tab => "properties", - fieldType => "float", - defaultValue => 1.0, - subtext => $EMS_i18n->get('hours'), - label => $EMS_i18n->get("duration"), - hoverHelp => $EMS_i18n->get("duration help"), - }, - location => { - fieldType => "combo", - tab => "properties", - customDrawMethod=> 'drawLocationField', - label => $EMS_i18n->get("location"), - hoverHelp => $EMS_i18n->get("location help"), - }, - relatedBadgeGroups => { - tab => "properties", - fieldType => "checkList", - customDrawMethod=> 'drawRelatedBadgeGroupsField', - label => $EMS_i18n->get("related badge groups"), - hoverHelp => $EMS_i18n->get("related badge groups ticket help"), - }, - relatedRibbons => { - tab => "properties", - fieldType => "checkList", - customDrawMethod=> 'drawRelatedRibbonsField', - label => $EMS_i18n->get("related ribbons"), - hoverHelp => $EMS_i18n->get("related ribbons help"), - }, - eventMetaData => { - noFormPost => 1, - fieldType => "hidden", - defaultValue => '{}', - }, - ticketId => { - noFormPost => 1, - fieldType => "hidden", - defaultValue => '', - }, - ); - push @{$definition}, { - assetName => $i18n->get('assetName'), - icon => 'EMSSubmission.gif', - autoGenerateForms => 1, - tableName => 'EMSSubmission', - className => 'WebGUI::Asset::EMSSubmission', - properties => \%properties, - }; - return $class->next::method( $session, $definition ); -} ## end sub definition - #------------------------------------------------------------------- =head2 drawLocationField () @@ -238,17 +211,17 @@ sub drawLocationField { my $ems = $self->ems; my $options = { map { $_ => $_ } ( @{ $ems->getSubmissionLocations || [ $ems->getLocations ] } ) } ; if( $ems->isRegistrationStaff ) { - return WebGUI::Form::combo($self->session, { + return WebGUI::Form::Combo->new($self->session, { name => 'location', value => $self->get('location'), options => $options, - }); + })->toHtml; } else { - return WebGUI::Form::selectBox($self->session, { + return WebGUI::Form::SelectBox->new($self->session, { name => 'location', value => $self->get('location'), options => $options, - }); + })->toHtml; } } @@ -262,12 +235,12 @@ Draws the field for the relatedBadgeGroups property. sub drawRelatedBadgeGroupsField { my ($self, $params) = @_; - return WebGUI::Form::checkList($self->session, { + return WebGUI::Form::CheckList->new($self->session, { name => $params->{name}, value => $self->get($params->{name}), vertical => 1, options => $self->getParent->getParent->getBadgeGroups, - }); + })->toHtml; } #------------------------------------------------------------------- @@ -284,12 +257,12 @@ sub drawRelatedRibbonsField { foreach my $ribbon (@{$self->getParent->getParent->getRibbons}) { $ribbons{$ribbon->getId} = $ribbon->getTitle; } - return WebGUI::Form::checkList($self->session, { + return WebGUI::Form::CheckList->new($self->session, { name => $params->{name}, value => $self->get($params->{name}), vertical => 1, options => \%ribbons, - }); + })->toHtml; } #------------------------------------------------------------------- @@ -305,30 +278,14 @@ sub drawStatusField { for my $key ( qw/pending created failed/ ) { delete $options->{$key} unless $currentStatus eq $key; } - return WebGUI::Form::SelectBox($self->session, { + return WebGUI::Form::SelectBox->new($self->session, { name => 'submissionStatus', value => $currentStatus, options => $options, - }); + })->toHtml; } -#------------------------------------------------------------------- - -=head2 duplicate - -This method exists for demonstration purposes only. The superclass -handles duplicating NewAsset Assets. This method will be called -whenever a copy action is executed - -=cut - -#sub duplicate { -# my $self = shift; -# my $newAsset = $self->next::method(@_); -# return $newAsset; -#} - #------------------------------------------------------------------- =head2 ems @@ -396,33 +353,33 @@ sub www_editSubmission { my $assetId = $self ? $self->getId : $params->{assetId} || $session->form->get('assetId') || 'new'; if( $assetId ne 'new' ) { - $self ||= WebGUI::Asset->newByDynamicClass($session,$assetId); - if (!defined $self) { - $session->errorHandler->error(__PACKAGE__ . " - failed to instanciate asset with assetId $assetId"); + $self ||= eval { WebGUI::Asset->newById($session,$assetId); }; + if (Exception::Class->caught()) { + $session->log->error(__PACKAGE__ . " - failed to instanciate asset with assetId $assetId"); } } my $asset = $self || $parent; my $url = $asset->getUrl('func=editSubmissionSave'); - my $newform = WebGUI::HTMLForm->new($session,action => $url); - $newform->hidden(name => 'assetId', value => $assetId); + my $newform = WebGUI::FormBuilder->new($session,action => $url); + $newform->addField( "hidden", name => 'assetId', value => $assetId); my $formDescription = $parent->getFormDescription; - my @defs = reverse @{__PACKAGE__->definition($session)}; my @fieldNames = qw/title submissionStatus startDate duration seatsAvailable location description/; my $fields; - for my $def ( @defs ) { - my $properties = $def->{properties}; - for my $fieldName ( keys %$properties ) { - if( defined $formDescription->{$fieldName} ) { - $fields->{$fieldName} = { %{$properties->{$fieldName}} }; # a simple first level copy - if( $fieldName eq 'description' ) { - $fields->{description}{height} = 200; - $fields->{description}{width} = 350; - } - $fields->{$fieldName}{fieldId} = $fieldName; - $fields->{$fieldName}{name} = $fieldName; - $fields->{$fieldName}{value} = $self->get($fieldName) if $self; - } - } + my $class = 'WebGUI::Asset::EMSSubmission'; + foreach my $fieldName (@fieldNames) { + my $attr = $class->meta->find_attribute_by_name( $fieldName ); + $fields->{$fieldName} = { + fieldId => $fieldName, + name => $fieldName, + fieldType => $attr->fieldType, + noFormPost => $attr->noFormPost, + %{ $class->getFormProperties( $session, $fieldName ) }, + }; + if( $fieldName eq 'description' ) { + $fields->{description}{height} = 200; + $fields->{description}{width} = 350; + } + $fields->{$fieldName}{value} = $self->get($fieldName) if $self; } # add the meta field for my $metaField ( @{$parent->getParent->getEventMetaFields} ) { @@ -434,6 +391,8 @@ sub www_editSubmission { $fields->{$fieldId}{fieldType} = $metaField->{dataType}; $fields->{$fieldId}{name} = $fieldId; $fields->{$fieldId}{value} = $self->get($fieldId) if $self; + $fields->{$fieldId}{options} = $metaField->{possibleValues}; + $fields->{$fieldId}{defaultValue} = $metaField->{defaultValues}; } } @@ -447,11 +406,11 @@ sub www_editSubmission { my $drawMethod = __PACKAGE__ . '::' . $field->{customDrawMethod}; if ($asset->can( $drawMethod )) { $field->{value} = $asset->$drawMethod($field); - delete $field->{name}; # don't want readOnly to generate a hidden field + $field->{addHidden} = 0; $field->{fieldType} = "readOnly"; } - $newform->dynamicField(%$field); + $newform->addField( $field->{fieldType}, %$field); } else { my $value; # TODO see that the data gets formatted @@ -461,14 +420,14 @@ sub www_editSubmission { } else { $value = $field->{value} || '[ ]'; } - $newform->readOnly( + $newform->addField( "readOnly", label => $field->{label}, value => $value, fieldId => $field->{fieldId}, ); } } - $newform->submit; + $newform->addField( "submit", name => "send" ); my $title = $asset->get('title'); my $content = $asset->processTemplate({ @@ -476,18 +435,19 @@ sub www_editSubmission { isDynamic => $session->form->get('asJson') || 0, backUrl => $parent->getUrl, pageTitle => $title, - pageForm => $newform->print, + pageForm => $newform->toHtml, commentForm => $self ? $self->getFormattedComments : '', commentFlag => $self ? 1 : 0 , + %{ $newform->toTemplateVars }, },$parent->getParent->get('eventSubmissionTemplateId')); WebGUI::Macro::process( $session, \$content ); if( $params->{asHashRef} ) { return { text => $content, title => $title, }; } elsif( $session->form->get('asJson') ) { - $session->http->setMimeType( 'application/json' ); + $session->response->content_type( 'application/json' ); return JSON->new->encode( { text => $content, title => $title, id => $assetId ne 'new' ? $assetId : 'new' . rand } ); } else { - $session->http->setMimeType( 'text/html' ); + $session->response->content_type( 'text/html' ); return $asset->processStyle( $content ); } } @@ -505,7 +465,9 @@ sub www_editSubmissionSave { my $formParams = $self->processForm; if( $formParams->{_isValid} ) { delete $formParams->{_isValid}; - $self->addRevision($formParams); + my $tag = WebGUI::VersionTag->getWorking( $session ); + my $newRevision = $self->addRevision({%$formParams,tagId => $tag->getId, status => "pending",}); + $newRevision->setVersionLock; WebGUI::VersionTag->autoCommitWorkingIfEnabled($session, { override => 1, allowComments => 0 }); $self = $self->cloneFromDb; $self->sendEmailUpdate; @@ -527,52 +489,6 @@ sub www_view { $_[0]->ems->www_viewSubmissionQueue } #------------------------------------------------------------------- -=head2 getEditForm ( ) - -Extends the base class to add Tax information for the Sku, in a new tab. - -=cut - -sub getEditForm { - my $self = shift; - my $session = $self->session; - - my $tabform = $self->SUPER::getEditForm; - - # TODO once comments can be submitted using AJAX this will work... - # be sure to uncomment the tab in the next function also... - #my $comments = $tabform->getTab( 'comments' ); - -# $comments->div({name => 'comments', -# contentCallback => sub { $self->getFormattedComments }, -# }); - - return $tabform; -} - -#------------------------------------------------------------------- - -=head2 getEditTabs ( ) - -defines 2 new tabs. -the shop tab is created here to mimic the function of the sku-created -shop tab. this class holds data like Sku assets so that they can be assigned -in the future when the sku asset is created from this data. - -=cut - -sub getEditTabs { - my $self = shift; - my $i18n = WebGUI::International->new($self->session,"Asset_EMSSubmission"); - my $sku_i18n = WebGUI::International->new($self->session,"Asset_Sku"); - return ($self->SUPER::getEditTabs(), ['shop', $sku_i18n->get('shop'), 9], - # The comment tab is not available because comments are not AJAX yet... - # ['comments', $i18n->get('comments'), 9] - ); -} - -#------------------------------------------------------------------- - =head2 getQueueUrl returns the URL for the submission queue page with the submisison id in the hash part @@ -592,11 +508,11 @@ Making private. See WebGUI::Asset::indexContent() for additonal details. =cut -sub indexContent { +override indexContent => sub { my $self = shift; - my $indexer = $self->next::method; + my $indexer = super(); $indexer->setIsPublic(0); -} +}; #------------------------------------------------------------------- @@ -609,10 +525,6 @@ See WebGUI::Asset::prepareView() for details. sub prepareView { my $self = shift; $self->ems->prepareView; - #$self->next::method(); - #my $template = WebGUI::Asset::Template->new( $self->session, $self->get("templateId") ); - #$template->prepare($self->getMetaDataAsTemplateVariables); - #$self->{_viewTemplate} = $template; } #---------------------------------------------------------------- @@ -659,50 +571,6 @@ sub processForm { return $params; } -#------------------------------------------------------------------- - -=head2 processPropertiesFromFormPost ( ) - -Used to process properties from the form posted. Do custom things with -noFormPost fields here, or do whatever you want. This method is called -when /yourAssetUrl?func=editSave is requested/posted. - -=cut - -sub processPropertiesFromFormPost { - my $self = shift; - $self->next::method; -} - -#------------------------------------------------------------------- - -=head2 purge ( ) - -This method is called when data is purged by the system. -removes collateral data associated with a NewAsset when the system -purges it's data. This method is unnecessary, but if you have -auxiliary, ancillary, or "collateral" data or files related to your -asset instances, you will need to purge them here. - -=cut - -#sub purge { -# my $self = shift; -# return $self->next::method; -#} - -#------------------------------------------------------------------- - -=head2 purgeRevision ( ) - -This method is called when data is purged by the system. - -=cut - -#sub purgeRevision { -# my $self = shift; -# return $self->next::method; -#} #------------------------------------------------------------------- @@ -721,25 +589,6 @@ sub view { #return $self->processTemplate( $var, undef, $self->{_viewTemplate} ); } -#------------------------------------------------------------------- - -=head2 www_edit ( ) - -Web facing method which is the default edit page. Unless the method needs -special handling or formatting, it does not need to be included in -the module. - -=cut - -sub www_edit { - my $self = shift; - my $session = $self->session; - return $session->privilege->insufficient() unless $self->canEdit; - return $session->privilege->locked() unless $self->canEditIfLocked; - my $i18n = WebGUI::International->new( $session, 'Asset_EMSSubmission' ); - return $self->getAdminConsole->render( $self->getEditForm->print, $i18n->get('edit asset') ); -} - 1; #vim:ft=perl diff --git a/lib/WebGUI/Asset/EMSSubmissionForm.pm b/lib/WebGUI/Asset/EMSSubmissionForm.pm index 085ecfd3d..cd74b5a0e 100644 --- a/lib/WebGUI/Asset/EMSSubmissionForm.pm +++ b/lib/WebGUI/Asset/EMSSubmissionForm.pm @@ -4,7 +4,7 @@ package WebGUI::Asset::EMSSubmissionForm; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -16,10 +16,69 @@ package WebGUI::Asset::EMSSubmissionForm; =cut use strict; +use Moose; +use WebGUI::Definition::Asset; +extends 'WebGUI::Asset'; + +define assetName => ['assetName','Asset_EMSSubmissionForm']; +define icon => 'EMSSubmissionForm.gif'; +define tableName => 'EMSSubmissionForm'; + +property canSubmitGroupId => ( + tab => "security", + fieldType => "group", + default => 2, + label => ["can submit group label", 'Asset_EMSSubmissionForm'], + hoverHelp => ["can submit group label help", 'Asset_EMSSubmissionForm'] + ); +property daysBeforeCleanup => ( + tab => "properties", + fieldType => "integer", + default => 7, + label => ["days before cleanup label", 'Asset_EMSSubmissionForm'], + hoverHelp => ["days before cleanup label help", 'Asset_EMSSubmissionForm'] + ); +property deleteCreatedItems => ( + tab => "properties", + fieldType => "yesNo", + default => undef, + label => ["delete created items label", 'Asset_EMSSubmissionForm'], + hoverHelp => ["delete created items label help", 'Asset_EMSSubmissionForm'] + ); +property submissionDeadline => ( + tab => "properties", + fieldType => "Date", + builder => '_default_submissionDeadline', + label => ["submission deadline label", 'Asset_EMSSubmissionForm'], + hoverHelp => ["submission deadline label help", 'Asset_EMSSubmissionForm'] + ); +sub _default_submissionDeadline { + return time() + ( 30 * 24 * 60 * 60 ); # 30 days +} +property pastDeadlineMessage => ( + tab => "properties", + fieldType => "HTMLArea", + builder => '_default_pastDeadlineMessage', + lazy => 1, + label => ["past deadline label", 'Asset_EMSSubmissionForm'], + hoverHelp => ["past deadline label help", 'Asset_EMSSubmissionForm'] + ); +sub _default_pastDeadlineMessage { + my $self = shift; + my $i18n = WebGUI::International->new($self->session, 'Asset_EMSSubmissionForm'); + return $i18n->get('past deadline message'); +} +property formDescription => ( + tab => "properties", + fieldType => "textarea", + default => '{ }', + label => ["form dscription label", 'Asset_EMSSubmissionForm'], + hoverHelp => ["form dscription label help", 'Asset_EMSSubmissionForm'] + ); + use Tie::IxHash; -use base 'WebGUI::Asset'; use JSON; -use WebGUI::Utility; +with 'WebGUI::Role::Asset::AlwaysHidden'; =head1 NAME @@ -64,7 +123,6 @@ sub addSubmission { $newParams->{submissionId} = $self->ems->getNextSubmissionId; my $newAsset = $self->addChild($newParams); WebGUI::VersionTag->autoCommitWorkingIfEnabled($self->session, { override => 1, allowComments => 0 }); - $self = $self->cloneFromDb; return $newAsset; } @@ -84,81 +142,6 @@ sub canSubmit { #------------------------------------------------------------------- -=head2 definition ( session, definition ) - -defines asset properties for New Asset instances. You absolutely need -this method in your new Assets. - -=head3 session - -=head3 definition - -A hash reference passed in from a subclass definition. - -=cut - -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift; - my $i18n = WebGUI::International->new( $session, "Asset_EMSSubmissionForm" ); - tie my %properties, 'Tie::IxHash', ( - canSubmitGroupId => { - tab => "security", - fieldType => "group", - defaultValue => 2, - label => $i18n->get("can submit group label"), - hoverHelp => $i18n->get("can submit group label help") - }, - daysBeforeCleanup => { - tab => "properties", - fieldType => "integer", - defaultValue => 7, - label => $i18n->get("days before cleanup label"), - hoverHelp => $i18n->get("days before cleanup label help") - }, - deleteCreatedItems => { - tab => "properties", - fieldType => "yesNo", - defaultValue => undef, - label => $i18n->get("delete created items label"), - hoverHelp => $i18n->get("delete created items label help") - }, - submissionDeadline => { - tab => "properties", - fieldType => "Date", - defaultValue => time + ( 30 * 24 * 60 * 60 ) , # 30 days - label => $i18n->get("submission deadline label"), - hoverHelp => $i18n->get("submission deadline label help") - }, - pastDeadlineMessage => { - tab => "properties", - fieldType => "HTMLArea", - defaultValue => $i18n->get('past deadline message'), - label => $i18n->get("past deadline label"), - hoverHelp => $i18n->get("past deadline label help") - }, - formDescription => { - tab => "properties", - fieldType => "textarea", - defaultValue => '{ }', - label => $i18n->get("form dscription label"), - hoverHelp => $i18n->get("form dscription label help") - }, - ); - push @{$definition}, { - assetName => $i18n->get('assetName'), - icon => 'EMSSubmissionForm.gif', - autoGenerateForms => 1, - tableName => 'EMSSubmissionForm', - className => 'WebGUI::Asset::EMSSubmissionForm', - properties => \%properties, - }; - return $class->SUPER::definition( $session, $definition ); -} ## end sub definition - -#------------------------------------------------------------------- - =head2 ems returns the ems ansestor of this asset @@ -187,131 +170,156 @@ optional set of possibly incorrect submission form params =cut sub www_editSubmissionForm { - my $this = shift; - my $self; - my $parent; - if( $this eq __PACKAGE__ ) { # called as constructor or menu - $parent = shift; - } else { - $self = $this; - $parent = $self->getParent; - } - my $params = shift || { }; - my $session = $parent->session; - my $i18n = WebGUI::International->new($session,'Asset_EventManagementSystem'); - my $assetId = $self ? $self->getId : $params->{assetId} || $session->form->get('assetId'); + my $this = shift; + my $self; + my $parent; + if ( $this eq __PACKAGE__ ) { # called as constructor or menu + $parent = shift; + } + else { + $self = $this; + $parent = $self->getParent; + } + my $params = shift || {}; + my $session = $parent->session; + my $i18n = WebGUI::International->new( $session, 'Asset_EventManagementSystem' ); + my $assetId = $self ? $self->getId : $params->{assetId} || $session->form->get('assetId'); - if( ! defined( $assetId ) ) { - my $res = $parent->getLineage(['children'],{ returnObjects => 1, - includeOnlyClasses => ['WebGUI::Asset::EMSSubmissionForm'], - } ); - if( scalar(@$res) == 1 ) { - $self = $res->[0]; - $assetId = $self->getId; - } else { - my $makeAnchorList =sub{ my $u=shift; my $n=shift; my $d=shift; - return qq{
  • $n
  • } } ; - my $listOfLinks = join '', ( map { - $makeAnchorList->( - $_->getQueueUrl, - $_->get('title'), - WebGUI::HTML::filter($_->get('description'),'all') - ) - } ( @$res ) ); - my $title = $i18n->get('select form to edit') ; - my $content = '

    ' . $title . '

      ' . $listOfLinks . '
    ' ; - if( $params->{asHashRef} ) { - return { text => $content, title => $title, } ; - } elsif( $session->form->get('asJson') ) { - $session->http->setMimeType( 'application/json' ); - return JSON->new->encode( { text => $content, title => $title, id => 'list' . rand } ); - } else { - $session->http->setMimeType( 'text/html' ); - return $parent->ems->processStyle( $content ); - } - } - } elsif( $assetId ne 'new' ) { - $self ||= WebGUI::Asset->newByDynamicClass($session,$assetId); - if (!defined($self)) { - $session->errorHandler->error(__PACKAGE__ . " - failed to instanciate asset with assetId $assetId"); - } + if ( !defined($assetId) ) { + my $res = $parent->getLineage( + ['children'], { + returnObjects => 1, + includeOnlyClasses => ['WebGUI::Asset::EMSSubmissionForm'], + } + ); + if ( scalar(@$res) == 1 ) { + $self = $res->[0]; + $assetId = $self->getId; } - my $asset = $self || $parent; - my $url = $asset->getUrl('func=editSubmissionFormSave'); - my $newform = WebGUI::HTMLForm->new( $session, action => $url ); - $newform->hidden(name => 'assetId', value => $assetId); - my @fieldNames = qw/title description startDate duration seatsAvailable location/; - my $fields; - my @defs = reverse @{WebGUI::Asset::EMSSubmission->definition($session)}; - for my $def ( @defs ) { - foreach my $fieldName ( @fieldNames ) { - my $properties = $def->{properties}; - if( defined $properties->{$fieldName} ) { - $fields->{$fieldName} = { %{$properties->{$fieldName}} }; # a simple first level copy - # field definitions don't contain their own name, we will need it later on - $fields->{$fieldName}{fieldId} = $fieldName; - }; - } - } - for my $metaField ( @{$parent->getEventMetaFields} ) { - push @fieldNames, $metaField->{fieldId}; - $fields->{$metaField->{fieldId}} = { %$metaField }; # a simple first level copy - # meta fields call it data type, we copy it to simplify later on - $fields->{$metaField->{fieldId}}{fieldType} = $metaField->{dataType}; - $fields->{$metaField->{fieldId}}{hoverHelp} = $metaField->{helpText}; - } - $newform->hidden( name => 'fieldNames', value => join( ' ', @fieldNames ) ); - @defs = reverse @{WebGUI::Asset::EMSSubmissionForm->definition($session)}; - for my $def ( @defs ) { - my $properties = $def->{properties}; - for my $fieldName ( qw/title menuTitle url description canSubmitGroupId daysBeforeCleanup - deleteCreatedItems submissionDeadline pastDeadlineMessage/ ) { - if( defined $properties->{$fieldName} ) { - my %fieldParams = %{$properties->{$fieldName}}; - $fieldParams{name} = $fieldName; - $fieldParams{value} = $params->{$fieldName} || $self ? $self->get($fieldName) : undef ; - $newform->dynamicField(%fieldParams); - } - } + else { + my $makeAnchorList = sub { + my $u = shift; + my $n = shift; + my $d = shift; + return qq{
  • $n
  • }; + }; + my $listOfLinks = join '', ( + map { + $makeAnchorList->( + $_->getQueueUrl, $_->get('title'), WebGUI::HTML::filter( $_->get('description'), 'all' ) + ) + } (@$res) + ); + my $title = $i18n->get('select form to edit'); + my $content = '

    ' . $title . '

      ' . $listOfLinks . '
    '; + if ( $params->{asHashRef} ) { + return { text => $content, title => $title, }; + } + elsif ( $session->form->get('asJson') ) { + $session->response->content_type('application/json'); + return JSON->new->encode( { text => $content, title => $title, id => 'list' . rand } ); + } + else { + $session->response->content_type('text/html'); + return $parent->ems->processStyle($content); + } + } ## end else [ if ( scalar(@$res) == ...)] + } ## end if ( !defined($assetId...)) + elsif ( $assetId ne 'new' ) { + $self ||= WebGUI::Asset->newById( $session, $assetId ); + if ( !defined($self) ) { + $session->log->error( __PACKAGE__ . " - failed to instanciate asset with assetId $assetId" ); } + } + my $asset = $self || $parent; + my $url = $asset->getUrl('func=editSubmissionFormSave'); + my $newform = WebGUI::FormBuilder->new( $session, action => $url ); + $newform->addField( "hidden",name => 'assetId', value => $assetId ); + my @fieldNames = qw/title description startDate duration seatsAvailable location/; + my $fields; + my $class = 'WebGUI::Asset::EMSSubmission'; + foreach my $fieldName (@fieldNames) { + my $attr = $class->meta->find_attribute_by_name( $fieldName ); + $fields->{$fieldName} = { + fieldId => $fieldName, + name => $fieldName, + fieldType => $attr->fieldType, + noFormPost => $attr->noFormPost, + %{ $class->getFormProperties( $session, $fieldName ) }, + }; + } + for my $metaField ( @{ $parent->getEventMetaFields } ) { + push @fieldNames, $metaField->{fieldId}; + $fields->{ $metaField->{fieldId} } = {%$metaField}; # a simple first level copy + # meta fields call it data type, we copy it to simplify later on + $fields->{ $metaField->{fieldId} }{fieldType} = $metaField->{dataType}; + $fields->{ $metaField->{fieldId} }{hoverHelp} = $metaField->{helpText}; + } + $newform->addField( "hidden", name => 'fieldNames', value => join( ' ', @fieldNames ) ); + $class = 'WebGUI::Asset::EMSSubmissionForm'; + for my $fieldName ( + qw/title menuTitle url description canSubmitGroupId daysBeforeCleanup + deleteCreatedItems submissionDeadline pastDeadlineMessage/ + ) + { + my $attr = $class->meta->find_attribute_by_name( $fieldName ); + next unless $attr; + my %fieldParams = ( + fieldId => $fieldName, + name => $fieldName, + fieldType => $attr->fieldType, + noFormPost => $attr->noFormPost, + %{ $class->getFormProperties( $session, $fieldName ) }, + value => $params->{$fieldName} || $self ? $self->get($fieldName) : undef, + ); + $newform->addField( $attr->fieldType, %fieldParams); + } - my $formDescription = $params->{formDescription} || $self ? $self->getFormDescription : { }; - for my $fieldId ( @fieldNames ) { - next if $fieldId eq 'submissionStatus'; - my $field = $fields->{$fieldId}; - $newform->yesNo( - label => $field->{label}, - name => $field->{fieldId} . '_yesNo', - defaultValue => 0, - value => $formDescription->{$field->{fieldId}}, - ); - } - $newform->submit; - my $title = $assetId eq 'new' ? $i18n->get('new form') || 'new' : $asset->get('title'); - if( $params->{asHashRef} ) { - ; # not setting mimie type - } elsif( $session->form->get('asJson') ) { - $session->http->setMimeType( 'application/json' ); - } else { - $session->http->setMimeType( 'text/html' ); - } - my $content = $asset->processTemplate({ - errors => $params->{errors} || [], - isDynamic => $session->form->get('asJson') || 0, - backUrl => $parent->getUrl, - pageTitle => $title, - pageForm => $newform->print, - },$parent->get('eventSubmissionTemplateId')); - WebGUI::Macro::process( $session, \$content ); - if( $params->{asHashRef} ) { - return { text => $content, title => $title }; - } elsif( $session->form->get('asJson') ) { - return JSON->new->encode( { text => $content, title => $title, id => $assetId ne 'new' ? $assetId : 'new' . rand } ); - } else { - return $asset->ems->processStyle( $content ); - } + my $formDescription = $params->{formDescription} || $self ? $self->getFormDescription : {}; + for my $fieldId (@fieldNames) { + next if $fieldId eq 'submissionStatus'; + my $field = $fields->{$fieldId}; + $newform->addField( "yesNo", + label => $field->{label}, + name => $field->{fieldId} . '_yesNo', + defaultValue => 0, + value => $formDescription->{ $field->{fieldId} }, + ); + } + $newform->addField( "submit", name => "send" ); + my $title = $assetId eq 'new' ? $i18n->get('new form') || 'new' : $asset->get('title'); + if ( $params->{asHashRef} ) { + ; # not setting mimie type + } + elsif ( $session->form->get('asJson') ) { + $session->response->content_type('application/json'); + } + else { + $session->response->content_type('text/html'); + } + my $content = $asset->processTemplate( { + errors => $params->{errors} || [], + isDynamic => $session->form->get('asJson') || 0, + backUrl => $parent->getUrl, + pageTitle => $title, + pageForm => $newform->toHtml, + %{ $newform->toTemplateVars }, + }, + $parent->get('eventSubmissionTemplateId') + ); + WebGUI::Macro::process( $session, \$content ); + if ( $params->{asHashRef} ) { + return { text => $content, title => $title }; + } + elsif ( $session->form->get('asJson') ) { + return JSON->new->encode( + { text => $content, title => $title, id => $assetId ne 'new' ? $assetId : 'new' . rand } ); + } + else { + return $asset->ems->processStyle($content); + } -} +} ## end sub www_editSubmissionForm #------------------------------------------------------------------- @@ -327,7 +335,9 @@ sub www_editSubmissionFormSave { my $formParams = $self->processForm(); if( $formParams->{_isValid} ) { delete $formParams->{_isValid}; - $self->addRevision($formParams); + my $tag = WebGUI::VersionTag->getWorking( $self->session ); + my $newRevision = $self->addRevision({%$formParams,tagId => $tag->getId, status => "pending",}); + $newRevision->setVersionLock; WebGUI::VersionTag->autoCommitWorkingIfEnabled($self->session); $self = $self->cloneFromDb; return $self->getParent->www_viewSubmissionQueue; @@ -491,14 +501,15 @@ We overload the update method from WebGUI::Asset in order to handle file system =cut -sub update { +around update => sub { + my $orig = shift; my $self = shift; my $properties = shift; if( ref $properties->{formDescription} eq 'HASH' ) { $properties->{formDescription} = JSON->new->encode($properties->{formDescription}); } - $self->SUPER::update({%$properties, isHidden => 1}); -} + $self->$orig({%$properties}); +}; 1; diff --git a/lib/WebGUI/Asset/Event.pm b/lib/WebGUI/Asset/Event.pm index 6a7f7d872..aa2a2397c 100644 --- a/lib/WebGUI/Asset/Event.pm +++ b/lib/WebGUI/Asset/Event.pm @@ -7,7 +7,7 @@ our $VERSION = "0.0.0"; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -18,7 +18,6 @@ our $VERSION = "0.0.0"; =cut -use Tie::IxHash; use Carp qw(croak); use WebGUI::International; @@ -30,12 +29,151 @@ use DateTime::Event::ICal; use DateTime::Set; use Data::ICal::Entry::Event; -use base 'WebGUI::Asset'; +use Moose; +use WebGUI::Definition::Asset; +extends 'WebGUI::Asset'; +define assetName => ['assetName', 'Asset_Event']; +define icon => 'calendar.gif'; +define tableName => 'Event'; +property description => ( + label => ['description', 'Asset_Event'], + fieldType => "HTMLArea", + default => "", + ); +property startDate => ( + label => ['start date', 'Asset_Event'], + fieldType => "Date", + builder => '_defaultMysqlDate', + lazy => 1, + ); +property endDate => ( + label => ['end date', 'Asset_Event'], + fieldType => "Date", + builder => '_defaultMysqlDate', + lazy => 1, + ); +sub _defaultMysqlDate { + my $self = shift; + my $dt = WebGUI::DateTime->new($self->session, time); + return $dt->toMysqlDate; +} +property startTime => ( + label => ['start', 'Asset_Event'], + fieldType => "TimeField", + default => undef, + format => 'mysql', + + ); +around startTime => sub { + my $orig = shift; + my $self = shift; + return $self->$orig unless @_; + my $startTime = shift; + my ($startHour, $startMinute, $startSecond) = $startTime =~ /^ (\d+) : (\d+) (?: :(\d+)) /x; + if ($startHour > 23) { + $startHour = 0; + my $startDate = $self->startDate; + my $startDt = WebGUI::DateTime->new($self->session, $startDate); + $startDt->add(days => 1); + $self->startDate($startDt->toMysqlDate); + $startSecond = '00' if ! $startSecond; + $startTime = sprintf '%02d:%02d:%02d', $startHour, $startMinute, $startSecond; + } + return $self->$orig($startTime); +}; +property endTime => ( + label => ['end', 'Asset_Event'], + fieldType => "TimeField", + default => undef, + format => 'mysql', + ); +around endTime => sub { + my $orig = shift; + my $self = shift; + return $self->$orig unless @_; + my $endTime = shift; + my ($endHour, $endMinute, $endSecond) = $endTime =~ /^ (\d+) : (\d+) (?: :(\d+)) /x; + if ($endHour > 23) { + $endHour = 0; + my $endDate = $self->endDate; + my $endDt = WebGUI::DateTime->new($self->session, $endDate); + $endDt->add(days => 1); + $self->endDate($endDt->toMysqlDate); + $endSecond = '00' if ! $endSecond; + $endTime = sprintf '%02d:%02d:%02d', $endHour, $endMinute, $endSecond; + } + return $self->$orig($endTime); +}; + +property recurId => ( + label => ['recurrence', 'Asset_Event'], + fieldType => "Text", + default => undef, + ); + +property location => ( + label => ['location', 'Asset_Event'], + fieldType => "Text", + default => undef, + ); +property feedId => ( + noFormPost => 1, + fieldType => "Text", + default => undef, + ); +property storageId => ( + label => ['attachments for event', 'Asset_Event'], + fieldType => "Image", + default => '', + maxAttachments => 1, + ); +property feedUid => ( + noFormPost => 1, + fieldType => "Text", + default => undef, + ); +property timeZone => ( + label => ['time zone', 'DateTime'], + fieldType => 'TimeZone', + ); +property sequenceNumber => ( + noFormPost => 1, + fieldType => 'hidden', + ); +property iCalSequenceNumber => ( + noFormPost => 1, + fieldType => 'hidden', + ); +property userDefined1 => ( + label => 'userDefined1', + fieldType => 'text', + default => '', + ); +property userDefined2 => ( + label => 'userDefined2', + fieldType => 'text', + default => '', + ); +property userDefined3 => ( + label => 'userDefined3', + fieldType => 'text', + default => '', + ); +property userDefined4 => ( + label => 'userDefined4', + fieldType => 'text', + default => '', + ); +property userDefined5 => ( + label => 'userDefined5', + fieldType => 'text', + default => '', + ); + +with 'WebGUI::Role::Asset::AlwaysHidden'; use WebGUI::DateTime; - - =head1 NAME WebGUI::Asset::Event @@ -57,10 +195,10 @@ Extent the method from the super class to handle iCalSequenceNumbers. =cut -sub addRevision { +override addRevision => sub { my $self = shift; - my $newRev = $self->SUPER::addRevision(@_); - my $sequenceNumber = $newRev->get('iCalSequenceNumber'); + my $newRev = super(); + my $sequenceNumber = $newRev->iCalSequenceNumber; if (defined $sequenceNumber) { $sequenceNumber++; } @@ -68,12 +206,12 @@ sub addRevision { $sequenceNumber = 0; } $newRev->update({iCalSequenceNumber => $sequenceNumber}); - if ($newRev->get("storageId") && $newRev->get("storageId") eq $self->get('storageId')) { - my $newStorage = WebGUI::Storage->get($self->session,$self->get("storageId"))->copy; + if ($newRev->storageId && $newRev->storageId eq $self->storageId) { + my $newStorage = WebGUI::Storage->get($self->session,$self->storageId)->copy; $newRev->update({storageId => $newStorage->getId}); } return $newRev; -} +}; #################################################################### @@ -259,106 +397,16 @@ sub dateSet { } -#################################################################### - -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift; - - my $i18n = WebGUI::International->new($session, 'Asset_Event'); - my $dt = WebGUI::DateTime->new($session, time); - - ### Set up list options ### - - - - ### Build properties hash ### - my %properties; - tie %properties, 'Tie::IxHash'; - %properties = ( - - ##### DEFAULTS ##### - 'description' => { - fieldType => "HTMLArea", - defaultValue => "", - }, - 'startDate' => { - fieldType => "Date", - defaultValue => $dt->toMysqlDate, - }, - 'endDate' => { - fieldType => "Date", - defaultValue => $dt->toMysqlDate, - }, - 'startTime' => { - fieldType => "TimeField", - defaultValue => undef, - format => 'mysql', - }, - 'endTime' => { - fieldType => "TimeField", - defaultValue => undef, - format => 'mysql', - }, - - 'recurId' => { - fieldType => "Text", - defaultValue => undef, - }, - - 'location' => { - fieldType => "Text", - defaultValue => undef, - }, - 'feedId' => { - fieldType => "Text", - defaultValue => undef, - }, - 'storageId' => { - fieldType => "Image", - defaultValue => '', - maxAttachments => 1, - }, - 'feedUid' => { - fieldType => "Text", - defaultValue => undef, - }, - 'timeZone' => { - fieldType => 'TimeZone', - }, - sequenceNumber => { - fieldType => 'hidden', - }, - iCalSequenceNumber => { - fieldType => 'hidden', - }, - ); - - - ### Add user defined fields - for my $num (1..5) { - $properties{"userDefined".$num} = { - fieldType => "text", - defaultValue => "", - }; - } - - - push(@{$definition}, { - assetName => $i18n->get('assetName'), - icon => 'calendar.gif', - tableName => 'Event', - className => 'WebGUI::Asset::Event', - properties => \%properties - }); - - return $class->SUPER::definition($session, $definition); -} - - #------------------------------------------------------------------- +=head2 duration ( ) + +Returns a DateTime::Duration object that represents the difference in time between the end +and start times of the event. + +=cut + + sub duration { my $self = shift; return $self->getDateTimeEnd - $self->getDateTimeStart; @@ -376,11 +424,12 @@ The session variable. =cut -sub canAdd { +around canAdd => sub { + my $orig = shift; my $class = shift; my $session = shift; - $class->SUPER::canAdd($session, undef, '7'); -} + $class->$orig($session, undef, '7'); +}; #################################################################### @@ -403,7 +452,7 @@ sub canEdit { $userId = $self->session->user->userId; } - return 1 if ( $userId eq $self->get('ownerUserId') ); + return 1 if ( $userId eq $self->ownerUserId ); return $self->getParent->canEdit( $userId ); } @@ -415,9 +464,9 @@ Extend the super class to duplicate the storage location. =cut -sub duplicate { +override duplicate => sub { my $self = shift; - my $newAsset = $self->SUPER::duplicate(@_); + my $newAsset = super(); my $newStorage = $self->getStorageLocation->copy; $newAsset->update({storageId=>$newStorage->getId}); my $links = $self->getRelatedLinks(); @@ -429,7 +478,7 @@ sub duplicate { } $newAsset->setRelatedLinks($links); return $newAsset; -} +}; #------------------------------------------------------------------- @@ -498,7 +547,7 @@ sub getAutoCommitWorkflowId { my $self = shift; my $parent = $self->getParent; if ($parent->hasBeenCommitted) { - return $parent->get('workflowIdCommit') + return $parent->workflowIdCommit || $self->session->setting->get('defaultVersionTagWorkflow'); } return undef; @@ -522,13 +571,13 @@ adjusted. sub getDateTimeStart { my $self = shift; - my $date = $self->get("startDate"); - my $time = $self->get("startTime"); + my $date = $self->startDate; + my $time = $self->startTime; my $tz = $self->session->datetime->getTimeZone; - #$self->session->errorHandler->warn($self->getId.":: Date: $date -- Time: $time"); + #$self->session->log->warn($self->getId.":: Date: $date -- Time: $time"); if (!$date) { - $self->session->errorHandler->warn("Event::getDateTimeStart -- This event (".$self->get("assetId").") has no start date."); + $self->session->log->warn("Event::getDateTimeStart -- This event (".$self->get("assetId").") has no start date."); return undef; } @@ -561,13 +610,13 @@ adjusted. sub getDateTimeEnd { my $self = shift; - my $date = $self->get("endDate"); - my $time = $self->get("endTime"); + my $date = $self->endDate; + my $time = $self->endTime; my $tz = $self->session->datetime->getTimeZone; - #$self->session->errorHandler->warn($self->getId.":: Date: $date -- Time: $time"); + #$self->session->log->warn($self->getId.":: Date: $date -- Time: $time"); if (!$date) { - $self->session->errorHandler->warn("Event::getDateTimeEnd -- This event (".$self->get("assetId").") has no end date."); + $self->session->log->warn("Event::getDateTimeEnd -- This event (".$self->get("assetId").") has no end date."); return undef; } @@ -601,7 +650,7 @@ is used EVERYWHERE. sub getDateTimeEndNI { my $self = shift; my $dt = $self->getDateTimeEnd; - if ($self->get('endTime') ) { + if ($self->endTime ) { $dt->subtract(seconds => 1); } return $dt; @@ -624,20 +673,20 @@ sub getEventNext { my $self = shift; my $db = $self->session->db; - my $where = 'Event.startDate > "'.$self->get("startDate").'"' - . '|| (Event.startDate = "'.$self->get("startDate").'" && '; + my $where = 'Event.startDate > "'.$self->startDate.'"' + . '|| (Event.startDate = "'.$self->startDate.'" && '; # All day events must either look for null time or greater than 00:00:00 if ($self->isAllDay) { $where .= "((Event.startTime IS NULL " - . "&& assetData.title > ".$db->quote($self->get("title")).") " + . "&& assetData.title > ".$db->quote($self->title).") " . "|| Event.startTime >= '00:00:00')"; } # Non all-day events must look for greater than time else { - $where .= "((Event.startTime = '".$self->get("startTime")."' " - . "&& assetData.title > ".$db->quote($self->get("title")).")" - . "|| Event.startTime > '".$self->get("startTime")."')"; + $where .= "((Event.startTime = '".$self->startTime."' " + . "&& assetData.title > ".$db->quote($self->title).")" + . "|| Event.startTime > '".$self->startTime."')"; } $where .= ")"; @@ -685,19 +734,19 @@ sub getEventPrev { my $self = shift; my $db = $self->session->db; - my $where = 'Event.startDate < "'.$self->get("startDate").'"' - . '|| (Event.startDate = "'.$self->get("startDate").'" && '; + my $where = 'Event.startDate < "'.$self->startDate.'"' + . '|| (Event.startDate = "'.$self->startDate.'" && '; # All day events must either look for null time or greater than 00:00:00 if ($self->isAllDay) { $where .= "(Event.startTime IS NULL " - . "&& assetData.title < ".$db->quote($self->get("title")).")"; + . "&& assetData.title < ".$db->quote($self->title).")"; } # Non all-day events must look for greater than time else { - $where .= "((Event.startTime = '".$self->get("startTime")."' " - . "&& assetData.title < ".$db->quote($self->get("title")).")" - . "|| Event.startTime < '".$self->get("startTime")."')"; + $where .= "((Event.startTime = '".$self->startTime."' " + . "&& assetData.title < ".$db->quote($self->title).")" + . "|| Event.startTime < '".$self->startTime."')"; } $where .= ")"; @@ -745,13 +794,13 @@ sub getIcalStart { my $self = shift; if ($self->isAllDay) { - my $date = $self->get("startDate"); + my $date = $self->startDate; $date =~ s/\D//g; return $date; } else { - my $date = $self->get("startDate"); - my $time = $self->get("startTime"); + my $date = $self->startDate; + my $time = $self->startTime; $date =~ s/\D//g; $time =~ s/\D//g; @@ -784,8 +833,8 @@ sub getIcalEnd { return $date; } else { - my $date = $self->get("endDate"); - my $time = $self->get("endTime"); + my $date = $self->endDate; + my $time = $self->endTime; $date =~ s/\D//g; $time =~ s/\D//g; @@ -883,16 +932,16 @@ A list of months that this event recurs on sub getRecurrence { my $self = shift; - return undef unless $self->get("recurId"); + return undef unless $self->recurId; return $self->{recurrence} ||= do { #use Data::Dumper; - #$self->session->errorHandler->warn("recurId: ".$self->get("recurId")); + #$self->session->log->warn("recurId: ".$self->recurId); my %data = $self->session->db->quickHash( "select * from Event_recur where recurId=?", - [$self->get("recurId")] + [$self->recurId] ); my %recurrence = ( @@ -1103,11 +1152,11 @@ Get the storage location associated with this Event. sub getStorageLocation { my $self = shift; unless (exists $self->{_storageLocation}) { - if ($self->get("storageId") eq "") { + if ($self->storageId eq "") { $self->{_storageLocation} = WebGUI::Storage->create($self->session); $self->update({storageId=>$self->{_storageLocation}->getId}); } else { - $self->{_storageLocation} = WebGUI::Storage->get($self->session,$self->get("storageId")); + $self->{_storageLocation} = WebGUI::Storage->get($self->session,$self->storageId); } } return $self->{_storageLocation}; @@ -1132,9 +1181,9 @@ sub getTemplateVars { # Some miscellaneous stuff $var{'canEdit'} = $self->canEdit; $var{"isPublic"} = 1 - if $self->get("groupIdView") eq "7"; - $var{"groupToView"} = $self->get("groupIdView"); - $var{"timeZone"} = $self->get('timeZone'); + if $self->groupIdView eq "7"; + $var{"groupToView"} = $self->groupIdView; + $var{"timeZone"} = $self->timeZone; # Start date/time my $dtStart = $self->getDateTimeStart; @@ -1228,7 +1277,7 @@ sub getTemplateVars { my $gotImage; my $gotAttachment; $var{'attachment_loop'} = []; - unless ($self->get("storageId") eq "") { + unless ($self->storageId eq "") { my $storage = $self->getStorageLocation; foreach my $filename (@{$storage->getFiles}) { # Set top-level template vars for the first image and first non-image @@ -1267,20 +1316,21 @@ Indexing the content of attachments and user defined fields. See WebGUI::Asset:: =cut -sub indexContent { +around indexContent => sub { + my $orig = shift; my $self = shift; - my $indexer = $self->SUPER::indexContent; - $indexer->addKeywords($self->get("userDefined1")); - $indexer->addKeywords($self->get("userDefined2")); - $indexer->addKeywords($self->get("userDefined3")); - $indexer->addKeywords($self->get("userDefined4")); - $indexer->addKeywords($self->get("userDefined5")); - $indexer->addKeywords($self->get("location")); + my $indexer = $self->$orig(@_); + $indexer->addKeywords($self->userDefined1); + $indexer->addKeywords($self->userDefined2); + $indexer->addKeywords($self->userDefined3); + $indexer->addKeywords($self->userDefined4); + $indexer->addKeywords($self->userDefined5); + $indexer->addKeywords($self->location); my $storage = $self->getStorageLocation; foreach my $file (@{$storage->getFiles}) { - $indexer->addFile($storage->getPath($file)); + $indexer->addFile($storage->getPath($file)); } -} +}; @@ -1295,7 +1345,7 @@ Returns true if this event is an all day event. sub isAllDay { my $self = shift; - return 1 unless ($self->get("startTime") || $self->get("endTime")); + return 1 unless ($self->startTime || $self->endTime); return 0; } @@ -1340,18 +1390,18 @@ sub prepareView { if ($parent) { if ($self->session->form->param("print")) { - $templateId = $parent->get("templateIdPrintEvent"); + $templateId = $parent->templateIdPrintEvent; $self->session->style->makePrintable(1); } else { - $templateId = $parent->get("templateIdEvent"); + $templateId = $parent->templateIdEvent; } } else { $templateId = "CalendarEvent000000001"; } - my $template = WebGUI::Asset::Template->new($self->session,$templateId); + my $template = WebGUI::Asset::Template->newById($self->session,$templateId); $template->prepare($self->getMetaDataAsTemplateVariables); $self->{_viewTemplate} = $template; @@ -1363,7 +1413,7 @@ sub prepareView { #################################################################### -=head2 processPropertiesFromFormPost +=head2 processEditForm Processes the Event Edit form. @@ -1382,9 +1432,9 @@ Requests that the events be committed =cut -sub processPropertiesFromFormPost { +override processEditForm => sub { my $self = shift; - $self->SUPER::processPropertiesFromFormPost; # Updates the event + super(); my $session = $self->session; my $form = $session->form; @@ -1406,8 +1456,8 @@ sub processPropertiesFromFormPost { } # If the dates are the same and the start time is after the end time - if ($self->get("startDate") eq $self->get("endDate") - && $self->get("startTime") gt $self->get("endTime") + if ($self->startDate eq $self->endDate + && $self->startTime gt $self->endTime ) { push @errors, $i18n->get("The event end time must be after the event start time."); } @@ -1416,16 +1466,7 @@ sub processPropertiesFromFormPost { return \@errors; } - # Since we may be adding more events, set out version tag to be active if needed - # Leave the original version tag available, we will need to reactivate it before returning - my $activeVersionTag = WebGUI::VersionTag->getWorking($session, 'nocreate'); - # if our version tag is active, we don't need a new one, and don't need to reactivate anything later - if ($activeVersionTag && $activeVersionTag->getId eq $self->get('tagId')) { - undef $activeVersionTag; - } - else { - WebGUI::VersionTag->new($session, $self->get('tagId'))->setWorking; - } + my $tag = WebGUI::VersionTag->getWorking( $session ); ### Form is verified, fix properties if (!$session->form->hasParam('groupIdView')) { @@ -1435,8 +1476,8 @@ sub processPropertiesFromFormPost { } if (!$session->form->hasParam('groupIdEdit')) { - my $groupIdEdit = $self->getParent->get("groupIdEventEdit") - || $self->getParent->get("groupIdEdit") + my $groupIdEdit = $self->getParent->groupIdEventEdit + || $self->getParent->groupIdEdit ; $self->update({ @@ -1454,17 +1495,17 @@ sub processPropertiesFromFormPost { } # Non-allday events need timezone conversion else { - my $tz = $self->get('timeZone'); + my $tz = $self->timeZone; my $dtStart = WebGUI::DateTime->new($session, - mysql => $self->get("startDate") . " " . $self->get("startTime"), + mysql => $self->startDate . " " . $self->startTime, time_zone => $tz, ); my $dtEnd = WebGUI::DateTime->new($session, - mysql => $self->get("endDate") . " " . $self->get("endTime"), + mysql => $self->endDate . " " . $self->endTime, time_zone => $tz, ); @@ -1478,8 +1519,8 @@ sub processPropertiesFromFormPost { my $top_val = $session->db->dbh->selectcol_arrayref("SELECT sequenceNumber FROM Event ORDER BY sequenceNumber desc LIMIT 1")->[0]; $top_val += 16384; - my $assetId = $self->get('assetId'); - my $revisionDate = $self->get('revisionDate'); + my $assetId = $self->getId; + my $revisionDate = $self->revisionDate; $session->db->write("UPDATE Event SET sequenceNumber =? WHERE assetId = ? AND revisionDate =?",[(scalar($form->param('sequenceNumber')) || $top_val), $assetId, $revisionDate]); @@ -1554,14 +1595,12 @@ sub processPropertiesFromFormPost { # Pattern keys if (!eq_deeply($recurrence_new, $recurrence_old)) { # Delete all old events and create new ones - my $old_id = $self->get("recurId"); + my $old_id = $self->recurId; # Set the new recurrence pattern if ($recurrence_new) { my $new_id = $self->setRecurrence($recurrence_new); if (! $new_id) { - $activeVersionTag->setWorking - if $activeVersionTag; return ["There is something wrong with your recurrence pattern."]; } @@ -1603,7 +1642,7 @@ sub processPropertiesFromFormPost { my $events = $self->getLineageIterator(["siblings"], { includeOnlyClasses => ['WebGUI::Asset::Event'], joinClass => 'WebGUI::Asset::Event', - whereClause => q{Event.recurId = "}.$self->get("recurId").q{"}, + whereClause => q{Event.recurId = "}.$self->recurId.q{"}, }); while ( 1 ) { @@ -1615,20 +1654,21 @@ sub processPropertiesFromFormPost { } last unless $event; # Add a revision - $properties{ startDate } = $event->get("startDate"); - $properties{ endDate } = $event->get("endDate"); + $properties{ startDate } = $event->startDate; + $properties{ endDate } = $event->endDate; + $properties{ tagId } = $tag->getId; + $properties{ status } = "pending"; # addRevision returns the new revision - $event = $event->addRevision(\%properties, undef, { skipAutoCommitWorkflows => 1 }); + $event = $event->addRevision(\%properties); + $event->setVersionLock; } } } - $activeVersionTag->setWorking - if $activeVersionTag; delete $self->{_storageLocation}; return undef; -} +}; #------------------------------------------------------------------- @@ -1638,12 +1678,12 @@ Extent the method from the super class to delete all storage locations. =cut -sub purge { - my $self = shift; +override purge => sub { + my $self = shift; my $id = $self->getId; my $session = $self->session; my @storageIds = $session->db->buildArray("select storageId from Event where assetId=?",[$id]); - my $success = $self->SUPER::purge; + my $success = super(); return 0 unless $success; foreach my $storageId (@storageIds) { my $storage = WebGUI::Storage->get($session, $storageId); @@ -1651,7 +1691,7 @@ sub purge { } $session->db->write('delete from Event_relatedlink where assetId=?',[$id]); return 1; -} +}; #------------------------------------------------------------------- @@ -1661,11 +1701,11 @@ Extent the method from the super class to delete the storage location for this r =cut -sub purgeRevision { +override purgeRevision => sub { my $self = shift; $self->getStorageLocation->delete; - return $self->SUPER::purgeRevision; -} + return super(); +}; #################################################################### @@ -1788,64 +1828,16 @@ sub setRelatedLinks { return undef; } -#################################################################### - -=head2 update - -Wrap update so that isHidden is always set to be a 1. - -=cut - -sub update { - my $self = shift; - my $properties = shift; - my $session = $self->session; - if (my $startTime = $properties->{startTime}) { - my ($startHour, $startMinute, $startSecond) = $startTime =~ /^ (\d+) : (\d+) (?: :(\d+)) /x; - if ($startHour > 23) { - $startHour = 0; - my $startDate = exists $properties->{startDate} ? $properties->{startDate} : $self->get('startDate'); - $session->log->warn('startDate: '. $startDate); - my $startDt = WebGUI::DateTime->new($session, $startDate); - $startDt->add(days => 1); - $properties->{startDate} = $startDt->toMysqlDate; - $session->log->warn('startDate: '. $properties->{startDate}); - $startSecond = '00' if ! $startSecond; - $properties->{startTime} = sprintf '%02d:%02d:%02d', $startHour, $startMinute, $startSecond; - } - } - if (my $endTime = $properties->{endTime}) { - my ($endHour, $endMinute, $endSecond) = $endTime =~ /^ (\d+) : (\d+) (?: :(\d+)) /x; - if ($endHour > 23) { - $endHour = 0; - my $endDate = exists $properties->{endDate} ? $properties->{endDate} : $self->get('endDate'); - $session->log->warn('endDate: '. $endDate); - my $endDt = WebGUI::DateTime->new($session, $endDate); - $endDt->add(days => 1); - $properties->{endDate} = $endDt->toMysqlDate; - $session->log->warn('endDate: '. $properties->{endDate}); - $endSecond = '00' if ! $endSecond; - $properties->{endTime} = sprintf '%02d:%02d:%02d', $endHour, $endMinute, $endSecond; - } - } - return $self->SUPER::update({%$properties, isHidden => 1}); -} - - #------------------------------------------------------------------- -=head2 validParent +=head2 valid_parent_classes Make sure that the current session asset is a Calendar for pasting and adding checks. -This is a class method. - =cut -sub validParent { - my $class = shift; - my $session = shift; - return $session->asset->isa('WebGUI::Asset::Wobject::Calendar'); +sub valid_parent_classes { + return [qw/WebGUI::Asset::Wobject::Calendar/]; } #################################################################### @@ -1902,18 +1894,18 @@ sub www_deleteFile { #################################################################### -=head2 www_edit +=head2 getEditTemplate -Edit the event. +Override the base class to handle the custom edit template. =cut # Author's note: This sub is ugly and should be reformatted according to PBP -sub www_edit { +sub getEditTemplate { my $self = shift; my $session = $self->session; my $form = $self->session->form; - my $tz = $form->param('timeZone') || $self->get('timeZone') || $session->datetime->getTimeZone; + my $tz = $form->param('timeZone') || $self->timeZone || $session->datetime->getTimeZone; my $func = lc $session->form->param("func"); my $var = {}; @@ -1929,13 +1921,17 @@ sub www_edit { value => "new", }) . WebGUI::Form::hidden($self->session, { - name => "class", - value => $self->session->form->process("class","className"), + name => "className", + value => $self->session->form->process("className","className"), }) . WebGUI::Form::hidden( $self->session, { name => 'ownerUserId', value => $self->session->user->userId, } ) + . WebGUI::Form::hidden($self->session, { + name => "func", + value => "addSave" + }) ; } else { @@ -1945,23 +1941,23 @@ sub www_edit { }) . WebGUI::Form::hidden($self->session, { name => "sequenceNumber", - value => $self->get("sequenceNumber"), + value => $self->sequenceNumber, }) . WebGUI::Form::hidden( $self->session, { name => 'ownerUserId', value => $self->session->user->userId, } ) + . WebGUI::Form::hidden($self->session, { + name => "func", + value => "editSave" + }) ; } - $var->{"formHeader"} - .= WebGUI::Form::hidden($self->session, { - name => "func", - value => "editSave" - }) - . WebGUI::Form::hidden($self->session, { + $var->{"formHeader"} .= + WebGUI::Form::hidden($self->session, { name => "recurId", - value => $self->get("recurId"), + value => $self->recurId, }); $var->{"formFooter"} = WebGUI::Form::formFooter($session); @@ -1972,14 +1968,14 @@ sub www_edit { $var->{"formTitle"} = WebGUI::Form::text($session, { name => "title", - value => $form->process("title") || $self->get("title"), + value => $form->process("title") || $self->title, }); # menu title AS short title $var->{"formMenuTitle"} = WebGUI::Form::text($session, { name => "menuTitle", - value => $form->process("menuTitle") || $self->get("menuTitle"), + value => $form->process("menuTitle") || $self->menuTitle, maxlength => 15, size => 22, }); @@ -1995,27 +1991,27 @@ sub www_edit { $var->{"formGroupIdView"} = WebGUI::Form::Group($session, { name => "groupIdView", - value => $form->process("groupIdView") || $self->get("groupIdView"), - defaultValue => $self->getParent->get("groupIdView"), + value => $form->process("groupIdView") || $self->groupIdView, + defaultValue => $self->getParent->groupIdView, }); # location $var->{"formLocation"} = WebGUI::Form::text($session, { name => "location", - value => $form->process("location") || $self->get("location"), + value => $form->process("location") || $self->location, }); # description $var->{"formDescription"} = WebGUI::Form::HTMLArea($session, { name => "description", - value => $form->process("description") || $self->get("description"), + value => $form->process("description") || $self->description, }); # User defined for my $x (1..5) { - my $userDefinedValue = $self->getValue("userDefined".$x); + my $userDefinedValue = $self->get("userDefined".$x); $var->{'formUserDefined'.$x} = WebGUI::Form::text($session, { name => "userDefined" . $x, value => $userDefinedValue, @@ -2043,7 +2039,7 @@ sub www_edit { = WebGUI::Form::Image($session, { name => "storageId", maxAttachments => 5, - value => $form->process("storageId") || $self->get("storageId"), + value => $form->process("storageId") || $self->storageId, deleteFileUrl=>$self->getUrl("func=deleteFile;filename=") }); @@ -2160,8 +2156,8 @@ sub www_edit { $_->{delete_id} = "rel_del_id_".$_->{eventlinkId}; $_->{group_id} = WebGUI::Form::Group($session, { name => "rel_group_id_".$_->{eventlinkId}, - value => $form->process("rel_group_id_".$_->{eventlinkId}) || $_->{groupIdView} || $self->getParent->get("groupIdView"), - defaultValue => $self->getParent->get("groupIdView"), + value => $form->process("rel_group_id_".$_->{eventlinkId}) || $_->{groupIdView} || $self->getParent->groupIdView, + defaultValue => $self->getParent->groupIdView, }); $_->{seq_num_name} = "rel_seq_".$_->{eventlinkId}; $_->{seq_num_id} = "rel_seq_id_".$_->{eventlinkId}; @@ -2171,8 +2167,8 @@ sub www_edit { $var->{"genericGroup"} = WebGUI::Form::Group($session, { name => "rel_group_id_ZZZZZZZZZZ", - value => $self->getParent->get("groupIdView"), - defaultValue => $self->getParent->get("groupIdView"), + value => $self->getParent->groupIdView, + defaultValue => $self->getParent->groupIdView, }); chomp $var->{"genericGroup"}; @@ -2316,7 +2312,7 @@ sub www_edit { = WebGUI::Form::date($session, { name => "recurStart", value => $recur->{startDate}, - defaultValue => $self->get("startDate"), + defaultValue => $self->startDate, }); # End @@ -2429,33 +2425,20 @@ ENDJS ### Load the template - my $parent = $self->getParent; + my $parent = $self->getParent; my $template; if ($parent) { - $template - = WebGUI::Asset::Template->new($session,$parent->get("templateIdEventEdit")); + $template = WebGUI::Asset::Template->newById($session,$parent->templateIdEventEdit); + $template->style($parent->getStyleTemplateId); } else { - $template - = WebGUI::Asset::Template->new($session,"CalendarEventEdit00001"); + $template = WebGUI::Asset::Template->newById($session,"CalendarEventEdit00001"); } - - - ### Show the processed template - $session->http->sendHeader; - my $style = $self->getParent->processStyle($self->getSeparator); - my ($head, $foot) = split($self->getSeparator,$style); - $self->session->output->print($head, 1); - $self->session->output->print($self->processTemplate($var, undef, $template)); - $self->session->output->print($foot, 1); - return "chunked"; + $template->setParam(%{ $var }); + return $template } - - - - #################################################################### =head2 www_view @@ -2479,10 +2462,11 @@ sub www_view { return $self->session->privilege->noAccess() unless $self->canView; my $check = $self->checkView; return $check if (defined $check); - $self->session->http->setCacheControl($self->get("visitorCacheTimeout")) if ($self->session->user->isVisitor); - $self->session->http->sendHeader; + my $calendar = $self->getParent; + $self->session->response->setCacheControl($calendar->visitorCacheTimeout) if ($self->session->user->isVisitor); + $self->session->response->sendHeader; $self->prepareView; - my $style = $self->getParent->processStyle($self->getSeparator); + my $style = $calendar->processStyle($self->getSeparator); my ($head, $foot) = split($self->getSeparator,$style); $self->session->output->print($head,1); $self->session->output->print($self->view); @@ -2523,5 +2507,6 @@ equal and then choose by assetId. =cut +__PACKAGE__->meta->make_immutable; 1; diff --git a/lib/WebGUI/Asset/File.pm b/lib/WebGUI/Asset/File.pm index 57aef5c45..3d6a83ed9 100644 --- a/lib/WebGUI/Asset/File.pm +++ b/lib/WebGUI/Asset/File.pm @@ -3,7 +3,7 @@ package WebGUI::Asset::File; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -15,12 +15,53 @@ package WebGUI::Asset::File; =cut use strict; -use base 'WebGUI::Asset'; use Carp; -use WebGUI::Cache; + +use Number::Format (); +use Moose; +use WebGUI::Definition::Asset; +extends 'WebGUI::Asset'; + +define assetName => ['assetName', 'Asset_File']; +define tableName => 'FileAsset'; +property cacheTimeout => ( + tab => "display", + fieldType => "interval", + default => 3600, + uiLevel => 8, + label => ["cache timeout", 'Asset_File'], + hoverHelp => ["cache timeout help", 'Asset_File'], + ); +property filename => ( + noFormPost => 1, + fieldType => 'hidden', + default => '', + ); +property storageId => ( + noFormPost => 1, + fieldType => 'hidden', + default => '', + trigger => \&_set_storageId, + ); +sub _set_storageId { + my ($self, $new, $old) = @_; + if ($new ne $old) { + $self->setStorageLocation; + } +} +property templateId => ( + fieldType => 'template', + default => 'PBtmpl0000000000000024', + label => ['file template', 'Asset_File'], + hoverHelp => ['file template description', 'Asset_File'], + namespace => "FileAsset", + tab => 'display', + ); + +with 'WebGUI::Role::Asset::SetStoragePermissions'; + use WebGUI::Storage; use WebGUI::SQL; -use WebGUI::Utility; use WebGUI::Event; =head1 NAME @@ -52,18 +93,18 @@ Override the default method in order to deal with attachments. =cut -sub addRevision { - my $self = shift; - my $newSelf = $self->SUPER::addRevision(@_); +override addRevision => sub { + my $self = shift; + my $newSelf = super(); - if ($newSelf->get("storageId") && $newSelf->get("storageId") eq $self->get('storageId')) { - my $newStorage = $self->getStorageClass->get($self->session,$self->get("storageId"))->copy; + if ($newSelf->storageId && $newSelf->storageId eq $self->storageId) { + my $newStorage = $self->getStorageClass->get($self->session, $self->storageId)->copy; $newSelf->update({storageId => $newStorage->getId}); $newSelf->applyConstraints; } return $newSelf; -} +}; #------------------------------------------------------------------- @@ -86,9 +127,9 @@ sub applyConstraints { sub setPrivileges { my $self = shift; $self->getStorageLocation->setPrivileges( - $self->get('ownerUserId'), - $self->get('groupIdView'), - $self->get('groupIdEdit'), + $self->ownerUserId, + $self->groupIdView, + $self->groupIdEdit, ); } @@ -101,65 +142,15 @@ locations =cut -sub commit { +override commit => sub { my ( $self, @args ) = @_; for my $rev ( grep { $_->get("revisionDate") < $self->get("revisionDate") } @{$self->getRevisions} ) { $rev->getStorageLocation->trash; } - return $self->SUPER::commit( @args ); -} - -#------------------------------------------------------------------- - -=head2 definition ( definition ) - -Defines the properties of this asset. - -=head3 definition - -A hash reference passed in from a subclass definition. - -=cut - -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift; - my $i18n = WebGUI::International->new($session,"Asset_File"); - push(@{$definition}, { - assetName=>$i18n->get('assetName'), - tableName=>'FileAsset', - className=>'WebGUI::Asset::File', - properties=>{ - cacheTimeout => { - tab => "display", - fieldType => "interval", - defaultValue => 3600, - uiLevel => 8, - label => $i18n->get("cache timeout"), - hoverHelp => $i18n->get("cache timeout help") - }, - filename=>{ - noFormPost=>1, - fieldType=>'hidden', - defaultValue=>'', - }, - storageId=>{ - noFormPost=>1, - fieldType=>'hidden', - defaultValue=>'', - }, - templateId=>{ - fieldType=>'template', - defaultValue=>'PBtmpl0000000000000024' - } - } - }); - return $class->SUPER::definition($session, $definition); -} - + return super(); +}; #------------------------------------------------------------------- @@ -169,13 +160,13 @@ Extend the master method to duplicate the storage location. =cut -sub duplicate { +override duplicate => sub { my $self = shift; - my $newAsset = $self->SUPER::duplicate(@_); + my $newAsset = super(); my $newStorage = $self->getStorageLocation->copy; $newAsset->update({storageId=>$newStorage->getId}); return $newAsset; -} +}; #------------------------------------------------------------------- @@ -186,12 +177,12 @@ See WebGUI::AssetPackage::exportAssetData() for details. =cut -sub exportAssetData { +override exportAssetData => sub { my $self = shift; - my $data = $self->SUPER::exportAssetData; - push(@{$data->{storage}}, $self->get("storageId")) if ($self->get("storageId") ne ""); + my $data = super(); + push(@{$data->{storage}}, $self->storageId) if ($self->storageId ne ""); return $data; -} +}; #------------------------------------------------------------------- @@ -224,8 +215,8 @@ sub exportWriteFile { WebGUI::Error->throw(error => "could not make directory " . $parent->absolute->stringify); } - if ( ! File::Copy::copy($self->getStorageLocation->getPath($self->get('filename')), $dest->stringify) ) { - WebGUI::Error->throw(error => "can't copy " . $self->getStorageLocation->getPath($self->get('filename')) + if ( ! File::Copy::copy($self->getStorageLocation->getPath($self->filename), $dest->stringify) ) { + WebGUI::Error->throw(error => "can't copy " . $self->getStorageLocation->getPath($self->filename) . ' to ' . $dest->absolute->stringify . ": $!"); } fire $self->session, 'asset::export' => $dest; @@ -235,54 +226,33 @@ sub exportWriteFile { =head2 getEditForm ( ) -Returns the TabForm object that will be used in generating the edit page for this asset. +Returns the WebGUI::FormBuilder object that will be used in generating the edit page for this asset. =cut -sub getEditForm { +override getEditForm => sub { my $self = shift; - my $tabform = $self->SUPER::getEditForm(); + my $f = super(); my $i18n = WebGUI::International->new($self->session, 'Asset_File'); - $tabform->getTab("properties")->raw( - ''.$i18n->get('new file').'' - . $self->getEditFormUploadControl - . '' - ); - - return $tabform; -} - -#---------------------------------------------------------------------------- - -=head2 getEditFormUploadControl - -Returns the HTML to display the current photo, if it has one, and a file chooser -to either upload one, or replace the current one. - -=cut - -sub getEditFormUploadControl { - my $self = shift; - my $session = $self->session; - my $i18n = WebGUI::International->new($session, 'Asset_File'); - my $html = ''; - - if ($self->get("filename") ne "") { - $html .= WebGUI::Form::readOnly( $session, { - value => '

    '.$self->get( '.$self->get("filename").'

    ' - }); + # Add field to upload file + if ($self->filename ne "") { + $f->getTab("properties")->addField( + "ReadOnly", + name => "viewFile", + value => '

    '.$self->filename.' '.$self->filename.'

    ', + ); } - # Control to upload a new file - $html .= WebGUI::Form::file( $session, { + $f->getTab( "properties" )->addField( + "File", name => 'newFile', label => $i18n->get('new file'), hoverHelp => $i18n->get('new file description'), - }); + ); - return $html; -} + return $f; +}; #------------------------------------------------------------------- @@ -295,7 +265,7 @@ Returns the URL for the file stored in the storage location. sub getFileUrl { my $self = shift; #return $self->get("url"); - return $self->getStorageLocation->getUrl($self->get("filename")); + return $self->getStorageLocation->getUrl($self->filename); } #------------------------------------------------------------------- @@ -309,8 +279,8 @@ file, then it returns undef. sub getFileIconUrl { my $self = shift; - return undef unless $self->get("filename"); ## Why do I have to do this when creating new Files? - return $self->getStorageLocation->getFileIconUrl($self->get("filename")); + return undef unless $self->filename; ## Why do I have to do this when creating new Files? + return $self->getStorageLocation->getFileIconUrl($self->filename); } @@ -364,7 +334,7 @@ sub getStorageFromPost { my $self = shift; my $storageId = shift; my $fileStorageId = WebGUI::Form::File->new($self->session, {name => 'newFile', value=>$storageId })->getValue; - $self->session->errorHandler->info( "File Storage Id: $fileStorageId" ); + $self->session->log->info( "File Storage Id: $fileStorageId" ); return $self->getStorageClass->get($self->session, $fileStorageId); } @@ -395,12 +365,13 @@ Indexing the content of the attachment. See WebGUI::Asset::indexContent() for ad =cut -sub indexContent { +around indexContent => sub { + my $orig = shift; my $self = shift; - my $indexer = $self->SUPER::indexContent; - $indexer->addFile($self->getStorageLocation->getPath($self->get("filename"))); - return $indexer; -} + my $indexer = $self->$orig(@_); + $indexer->addFile($self->getStorageLocation->getPath($self->filename)); + return $indexer; +}; #------------------------------------------------------------------- @@ -411,32 +382,32 @@ See WebGUI::Asset::prepareView() for details. =cut -sub prepareView { +override prepareView => sub { my $self = shift; - $self->SUPER::prepareView(); - my $template = WebGUI::Asset::Template->new($self->session, $self->get("templateId")); + super(); + my $template = WebGUI::Asset::Template->newById($self->session, $self->templateId); $template->prepare($self->getMetaDataAsTemplateVariables); $self->{_viewTemplate} = $template; -} +}; #------------------------------------------------------------------- -=head2 processPropertiesFromFormPost +=head2 processEditForm Extend the master method to handle file uploads and applying constraints. =cut -sub processPropertiesFromFormPost { +override processEditForm => sub { my $self = shift; my $session = $self->session; - my $errors = $self->SUPER::processPropertiesFromFormPost || []; + my $errors = super() || []; return $errors if @$errors; if (my $storageId = $session->form->get('newFile','File')) { - $session->errorHandler->info("Got a new file for asset " . $self->getId); + $session->log->info("Got a new file for asset " . $self->getId); my $storage = $self->getStorageClass->get( $session, $storageId); my $filePath = $storage->getPath( $storage->getFiles->[0] ); $self->setFile( $filePath ); @@ -447,7 +418,7 @@ sub processPropertiesFromFormPost { } return undef; -} +}; #------------------------------------------------------------------- @@ -457,15 +428,15 @@ Extends the master method to delete all storage locations associated with this a =cut -sub purge { +override purge => sub { my $self = shift; my $sth = $self->session->db->read("select storageId from FileAsset where assetId=".$self->session->db->quote($self->getId)); while (my ($storageId) = $sth->array) { $self->getStorageClass->get($self->session,$storageId)->delete; } $sth->finish; - return $self->SUPER::purge; -} + return super(); +}; #------------------------------------------------------------------- @@ -475,11 +446,11 @@ Extends the master method to clear the view cache. =cut -sub purgeCache { +override purgeCache => sub { my $self = shift; - WebGUI::Cache->new($self->session,"view_".$self->getId)->delete; - $self->SUPER::purgeCache; -} + $self->session->cache->remove("view_".$self->getId); + super(); +}; #------------------------------------------------------------------- @@ -489,11 +460,11 @@ Extends the master method to delete the storage location for this asset. =cut -sub purgeRevision { +override purgeRevision => sub { my $self = shift; $self->getStorageLocation->delete; - return $self->SUPER::purgeRevision; -} + return super(); +}; #---------------------------------------------------------------------------- @@ -503,11 +474,11 @@ Override trash restore to restore storage location =cut -sub restore { - my ( $self, @args ) = @_; +override restore => sub { + my ( $self ) = @_; $self->setPrivileges; - return $self->SUPER::restore( @args ); -} + return super(); +}; #---------------------------------------------------------------------------- @@ -551,7 +522,8 @@ the asset size. =cut -sub setSize { +around setSize => sub { + my $orig = shift; my $self = shift; my $fileSize = shift || 0; my $storage = $self->getStorageLocation; @@ -560,8 +532,8 @@ sub setSize { $fileSize += $storage->getFileSize($file); } } - return $self->SUPER::setSize($fileSize); -} + return $self->$orig($fileSize); +}; #------------------------------------------------------------------- @@ -589,7 +561,7 @@ sub setStorageLocation { $self->update({storageId=>$self->{_storageLocation}->getId}); } else { - $self->{_storageLocation} = $self->getStorageClass->get($self->session,$self->get("storageId")); + $self->{_storageLocation} = $self->getStorageClass->get($self->session,$self->storageId); } } @@ -601,40 +573,14 @@ Override to put the attached file in the trash too =cut -sub trash { - my ( $self, @args ) = @_; - my $return = $self->SUPER::trash( @args ); +override trash => sub { + my ( $self ) = @_; + my $return = super(); $self->getStorageLocation->trash; return $return; -} - -#------------------------------------------------------------------- - -=head2 update - -We override the update method from WebGUI::Asset in order to handle file system privileges. - -=cut - -sub update { - my $self = shift; - my %before = ( - owner => $self->get("ownerUserId"), - view => $self->get("groupIdView"), - edit => $self->get("groupIdEdit"), - storageId => $self->get('storageId'), - ); - $self->SUPER::update(@_); - ##update may have entered a new storageId. Reset the cached one just in case. - if ($self->get("storageId") ne $before{storageId}) { - delete $self->{_storageLocation}; - } - if ($self->get("ownerUserId") ne $before{owner} || $self->get("groupIdEdit") ne $before{edit} || $self->get("groupIdView") ne $before{view}) { - $self->setPrivileges; - } -} +}; #---------------------------------------------------------------------------- @@ -650,7 +596,7 @@ sub updatePropertiesFromStorage { my $self = shift; my $storage = $self->getStorageLocation; my $filename = $storage->getFiles->[0]; - $self->session->errorHandler->info("Updating file asset filename to $filename"); + $self->session->log->info("Updating file asset filename to $filename"); $self->update({ filename => $filename, }); @@ -667,47 +613,21 @@ Generate the view method for the Asset, and handle caching. sub view { my $self = shift; - if (!$self->session->var->isAdminOn && $self->get("cacheTimeout") > 10) { - my $cache = $self->getCache; - my $out = $cache->get if defined $cache; + if (!$self->session->isAdminOn && $self->get("cacheTimeout") > 10) { + my $out = $self->session->cache->get($self->getViewCacheKey); return $out if $out; } my %var = %{$self->get}; $var{controls} = $self->getToolbar; $var{fileUrl} = $self->getFileUrl; $var{fileIcon} = $self->getFileIconUrl; - $var{fileSize} = formatBytes($self->get("assetSize")); + $var{fileSize} = Number::Format::format_bytes($self->get("assetSize")); $var{extension} = WebGUI::Storage->getFileExtension( $self->get("filename")); - - my $out = $self->processTemplate(\%var,undef,$self->{_viewTemplate}); - if (!$self->session->var->isAdminOn && $self->get("cacheTimeout") > 10) { - WebGUI::Cache->new($self->session,"view_".$self->getId)->set($out,$self->get("cacheTimeout")); + my $out = $self->processTemplate(\%var,undef,$self->{_viewTemplate}); + if (!$self->session->isAdminOn && $self->get("cacheTimeout") > 10) { + $self->session->cache->set($self->getViewCacheKey, $out, $self->get("cacheTimeout")); } - return $out; -} - - -#------------------------------------------------------------------- - -=head2 www_edit - -Display the edit form to the user. Manually handles the template for displaying -the inline view of the asset. - -=cut - -sub www_edit { - my $self = shift; - return $self->session->privilege->insufficient() unless $self->canEdit; - return $self->session->privilege->locked() unless $self->canEditIfLocked; - my $i18n = WebGUI::International->new($self->session); - my $tabform = $self->getEditForm; - $tabform->getTab("display")->template( - -value=>$self->getValue("templateId"), - -hoverHelp=>$i18n->get('file template description','Asset_File'), - -namespace=>"FileAsset" - ); - return $self->getAdminConsole->render($tabform->print,$self->addEditLabel); + return $out; } #------------------------------------------------------------------- @@ -724,17 +644,18 @@ sub www_view { return $session->privilege->noAccess() unless $self->canView; # Check to make sure it's not in the trash or some other weird place - if ($self->get("state") ne "published") { + if ($self->state ne "published") { my $i18n = WebGUI::International->new($session,'Asset_File'); - $session->http->setStatus("404"); + $session->response->status(404); return sprintf($i18n->get("file not found"), $self->getUrl()); } - $session->http->setRedirect($self->getFileUrl) unless $session->config->get('enableStreamingUploads'); - $session->http->setStreamedFile($self->getStorageLocation->getPath($self->get("filename"))); - $session->http->sendHeader; + # sendFile does either a redirect or starts a stream depending on how we're configured + + $session->response->sendFile($self->getStorageLocation, $self->filename); + return 'chunked'; } - +__PACKAGE__->meta->make_immutable; 1; diff --git a/lib/WebGUI/Asset/File/GalleryFile.pm b/lib/WebGUI/Asset/File/GalleryFile.pm index 7ee58f527..1889f9700 100644 --- a/lib/WebGUI/Asset/File/GalleryFile.pm +++ b/lib/WebGUI/Asset/File/GalleryFile.pm @@ -3,7 +3,7 @@ package WebGUI::Asset::File::GalleryFile; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -15,7 +15,36 @@ package WebGUI::Asset::File::GalleryFile; =cut use strict; -use base 'WebGUI::Asset::File'; +use Tie::IxHash; +use Moose; +use WebGUI::Definition::Asset; +extends 'WebGUI::Asset::File'; +define assetName => ['assetName', 'Asset_GalleryFile']; +define tableName => 'GalleryFile'; +property views => ( + fieldType => 'integer', + noFormPost => 1, + default => 0, + ); +property friendsOnly => ( + fieldType => 'yesNo', + label => ['editForm friendsOnly','Asset_Photo'], + default => 0, + ); +property rating => ( + fieldType => 'integer', + noFormPost => 1, + default => 0, + ); +for my $i ( 1 .. 5 ) { + property 'userDefined'.$i => ( + default => undef, + label => '', + fieldType => 'text', + ); +} + +with 'WebGUI::Role::Asset::AlwaysHidden'; use Carp qw( croak confess ); use URI::Escape; @@ -38,50 +67,6 @@ These methods are available from this class =cut -#------------------------------------------------------------------- - -=head2 definition ( session, definition ) - -Define the properties of all GalleryFile assets. - -=cut - -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift; - my $i18n = WebGUI::International->new($session,'Asset_Photo'); - - tie my %properties, 'Tie::IxHash', ( - views => { - defaultValue => 0, - }, - friendsOnly => { - defaultValue => 0, - }, - rating => { - defaultValue => 0, - }, - ); - - # UserDefined Fields - for my $i (1 .. 5) { - $properties{"userDefined".$i} = { - defaultValue => undef, - }; - } - - push @{$definition}, { - assetName => $i18n->get('assetName'), - autoGenerateForms => 0, - tableName => 'GalleryFile', - className => 'WebGUI::Asset::File::GalleryFile', - properties => \%properties, - }; - - return $class->SUPER::definition($session, $definition); -} - #---------------------------------------------------------------------------- =head2 appendTemplateVarsCommentForm ( var [, comment ] ) @@ -137,7 +122,7 @@ sub appendTemplateVarsCommentForm { $var->{ commentForm_bodyText } = WebGUI::Form::HTMLArea( $session, { name => "bodyText", - richEditId => $self->getGallery->get("richEditIdComment"), + richEditId => $self->getGallery->richEditIdComment, value => $comment->{ bodyText }, }); @@ -203,7 +188,7 @@ sub canEdit { my $userId = shift || $self->session->user->userId; my $album = $self->getParent; - return 1 if $userId eq $self->get("ownerUserId"); + return 1 if $userId eq $self->ownerUserId; return $album && $album->canEdit($userId); } @@ -241,8 +226,8 @@ sub canView { my $album = $self->getParent; return 0 unless $album && $album->canView($userId); - if ($self->isFriendsOnly && $userId ne $self->get("ownerUserId") ) { - my $owner = WebGUI::User->new( $self->session, $self->get("ownerUserId") ); + if ($self->isFriendsOnly && $userId ne $self->ownerUserId ) { + my $owner = WebGUI::User->new( $self->session, $self->ownerUserId ); return 0 unless WebGUI::Friends->new($self->session, $owner)->isFriend($userId); } @@ -284,7 +269,7 @@ sub getAutoCommitWorkflowId { my $self = shift; my $gallery = $self->getGallery; if ($gallery->hasBeenCommitted) { - return $gallery->get("workflowIdCommit") + return $gallery->workflowIdCommit || $self->session->setting->get('defaultVersionTagWorkflow'); } return undef; @@ -358,7 +343,7 @@ are authorized to see them. =cut -sub getCurrentRevisionDate { +override getCurrentRevisionDate => sub { my $class = shift; my $session = shift; my $assetId = shift; @@ -373,17 +358,17 @@ sub getCurrentRevisionDate { return undef unless $revisionDate; - my $asset = WebGUI::Asset->new( $session, $assetId, $class, $revisionDate ); + my $asset = WebGUI::Asset->newById( $session, $assetId, $revisionDate ); return undef unless $asset; - if ( $asset->get( 'status' ) eq "approved" || $asset->canEdit ) { + if ( $asset->status eq 'approved' || $asset->canEdit ) { return $revisionDate; } else { - return $class->SUPER::getCurrentRevisionDate( $session, $assetId ); + return super(); } -} +}; #---------------------------------------------------------------------------- @@ -410,9 +395,9 @@ Get the parent GalleryAlbum. If the only revision of the GalleryAlbum is =cut -sub getParent { +override getParent => sub { my $self = shift; - if ( my $album = $self->SUPER::getParent ) { + if ( my $album = super() ) { return $album; } # Only get the pending version if we're allowed to see this photo in its pending status @@ -423,7 +408,7 @@ sub getParent { statusToInclude => [ 'pending', 'approved' ], invertTree => 1, } )->[ 0 ]; - if ( ($gallery && $gallery->canEdit) || $self->get( 'ownerUserId' ) eq $self->session->user->userId ) { + if ( ($gallery && $gallery->canEdit) || $self->ownerUserId eq $self->session->user->userId ) { my $album = $self->getLineage( ['ancestors'], { includeOnlyClasses => [ 'WebGUI::Asset::Wobject::GalleryAlbum' ], @@ -434,7 +419,7 @@ sub getParent { return $album; } return undef; -} +}; #---------------------------------------------------------------------------- @@ -450,7 +435,7 @@ sub getFirstFile { my $allFileIds = $self->getParent->getFileIds; return undef unless @{ $allFileIds }; - return WebGUI::Asset->newByDynamicClass( $self->session, shift @{ $allFileIds }); + return WebGUI::Asset->newById( $self->session, shift @{ $allFileIds }); } #---------------------------------------------------------------------------- @@ -467,7 +452,7 @@ sub getLastFile { my $allFileIds = $self->getParent->getFileIds; return undef unless @{ $allFileIds }; - return WebGUI::Asset->newByDynamicClass( $self->session, pop @{ $allFileIds }); + return WebGUI::Asset->newById( $self->session, pop @{ $allFileIds }); } #---------------------------------------------------------------------------- @@ -484,7 +469,7 @@ sub getNextFile { return $self->{_nextFile} if $self->{_nextFile}; my $nextId = $self->getParent->getNextFileId( $self->getId ); return undef unless $nextId; - $self->{_nextFile} = WebGUI::Asset->newByDynamicClass( $self->session, $nextId ); + $self->{_nextFile} = WebGUI::Asset->newById( $self->session, $nextId ); return $self->{_nextFile}; } @@ -502,7 +487,7 @@ sub getPreviousFile { return $self->{_previousFile} if $self->{_previousFile}; my $previousId = $self->getParent->getPreviousFileId( $self->getId ); return undef unless $previousId; - $self->{_previousFile} = WebGUI::Asset->newByDynamicClass( $self->session, $previousId ); + $self->{_previousFile} = WebGUI::Asset->newById( $self->session, $previousId ); return $self->{_previousFile}; } @@ -534,15 +519,12 @@ sub getTemplateVars { my $self = shift; my $session = $self->session; my $var = $self->get; - my $owner = WebGUI::User->new( $session, $self->get("ownerUserId") ); + my $owner = WebGUI::User->new( $session, $self->ownerUserId ); $var->{ fileUrl } = $self->getFileUrl; $var->{ thumbnailUrl } = $self->getThumbnailUrl; - # Set a flag for pending files - if ( $self->get( "status" ) eq "pending" ) { - $var->{ 'isPending' } = 1; - } + $var->{ isPending } = $self->status eq "pending"; # Fix 'undef' vars since HTML::Template does inheritence on them for my $key ( qw( synopsis ) ) { @@ -552,7 +534,7 @@ sub getTemplateVars { } # Add a text-only synopsis - $var->{ synopsis_textonly } = WebGUI::HTML::filter( $self->get('synopsis'), "all" ); + $var->{ synopsis_textonly } = WebGUI::HTML::filter( $self->synopsis, "all" ); # Figure out on what page of the album the gallery file belongs. my $album = $self->getParent; @@ -561,7 +543,7 @@ sub getTemplateVars { my $pageNumber = int ( ( first_index { $_ eq $id } @{ $fileIdsInAlbum } ) # Get index of file in album - / $album->getParent->get( 'defaultFilesPerPage' ) # Divide by the number of files per page + / $album->getParent->defaultFilesPerPage # Divide by the number of files per page ) + 1; # Round upwards $var->{ canComment } = $self->canComment; @@ -582,7 +564,7 @@ sub getTemplateVars { $var->{ url_slideshow } = $self->getParent->getUrl('func=slideshow'); $var->{ url_makeShortcut } = $self->getUrl('func=makeShortcut'); $var->{ url_listFilesForOwner } - = $self->getGallery->getUrl('func=listFilesForUser;userId=' . $self->get("ownerUserId")); + = $self->getGallery->getUrl('func=listFilesForUser;userId=' . $self->ownerUserId); $var->{ url_promote } = $self->getUrl('func=promote'); if ( my $firstFile = $self->getFirstFile ) { @@ -619,7 +601,7 @@ Returns true if this GalleryFile is friends only. Returns false otherwise. sub isFriendsOnly { my $self = shift; - return $self->get("friendsOnly"); + return $self->friendsOnly; } #---------------------------------------------------------------------------- @@ -642,7 +624,7 @@ sub makeShortcut { croak "GalleryFile->makeShortcut: parentId must be defined" unless $parentId; - my $parent = WebGUI::Asset->newByDynamicClass($session, $parentId) + my $parent = WebGUI::Asset->newById($session, $parentId) || croak "GalleryFile->makeShortcut: Could not instanciate asset '$parentId'"; my $shortcut @@ -675,10 +657,9 @@ Prepare the template to be used for the C method. sub prepareView { my $self = shift; - $self->SUPER::prepareView(); my $template - = WebGUI::Asset::Template->new($self->session, $self->getGallery->get("templateIdViewFile")); + = WebGUI::Asset::Template->newById($self->session, $self->getGallery->templateIdViewFile); $template->prepare($self->getMetaDataAsTemplateVariables); $self->{_viewTemplate} = $template; @@ -715,7 +696,7 @@ sub processCommentEditForm { ; my $visitorIp = $session->user->isVisitor - ? $session->env->get("REMOTE_ADDR") + ? $session->request->remote_host : undef ; @@ -733,19 +714,19 @@ sub processCommentEditForm { #---------------------------------------------------------------------------- -=head2 processPropertiesFromFormPost ( ) +=head2 processEditForm ( ) =cut -sub processPropertiesFromFormPost { +override processEditForm => sub { my $self = shift; my $i18n = WebGUI::International->new( $self->session,'Asset_Photo' ); my $form = $self->session->form; - my $errors = $self->SUPER::processPropertiesFromFormPost || []; + my $errors = super() || []; # Make sure we have the disk space for this - if ( !$self->getGallery->hasSpaceAvailable( $self->get( 'assetSize' ) ) ) { + if ( !$self->getGallery->hasSpaceAvailable( $self->assetSize ) ) { push @{ $errors }, $i18n->get( "error no space" ); } @@ -755,14 +736,14 @@ sub processPropertiesFromFormPost { ### Passes all checks # If the album doesn't yet have a thumbnail, make this File the thumbnail - if ( !$self->getParent->get('assetIdThumbnail') ) { + if ( !$self->getParent->assetIdThumbnail ) { $self->getParent->update( { assetIdThumbnail => $self->getId, } ); } return; -} +}; #---------------------------------------------------------------------------- @@ -785,15 +766,15 @@ Purge the asset. Remove all comments on the GalleryFile. =cut -sub purge { +override purge => sub { my $self = shift; for my $commentId ( @{ $self->getCommentIds } ) { $self->deleteComment( $commentId ); } - return $self->SUPER::purge; -} + return super(); +}; #---------------------------------------------------------------------------- @@ -831,32 +812,16 @@ sub setComment { ); } -#################################################################### +#------------------------------------------------------------------- -=head2 update +=head2 valid_parent_classes -Wrap update so that isHidden is always set to be a 1. +Restrict valid parents to GalleryAlbums and Shortcuts. =cut -sub update { - my $self = shift; - my $properties = shift; - return $self->SUPER::update({%$properties, isHidden => 1}); -} - - -#---------------------------------------------------------------------------- - -=head2 validParent ( ) - -Override validParent to only allow GalleryAlbums to hold GalleryFiles. - -=cut - -sub validParent { - my ($class, $session) = @_; - return $session->asset->isa('WebGUI::Asset::Wobject::GalleryAlbum'); +sub valid_parent_classes { + return [qw/WebGUI::Asset::Wobject::GalleryAlbum WebGUI::Asset::Shortcut/]; } #---------------------------------------------------------------------------- @@ -909,8 +874,8 @@ sub view { url_searchKeywordUser => $self->getGallery->getUrl( "func=search;submit=1;" - . "userId=" . $self->get("ownerUserId") . ';' - . 'keywords=' . uri_escape_utf8( $keyword ) + . "userId=" . $self->ownerUserId . ';' + . 'keywords=' . uri_escape_utf8( $keyword ) ), }; } @@ -957,7 +922,7 @@ sub www_delete { # TODO Get albums with shortcuts to this asset return $self->processStyle( - $self->processTemplate( $var, $self->getGallery->get("templateIdDeleteFile") ) + $self->processTemplate( $var, $self->getGallery->templateIdDeleteFile ) ); } @@ -1055,7 +1020,7 @@ sub www_editComment { $var->{ isNew } = $commentId eq "new"; return $self->processStyle( - $self->processTemplate( $var, $self->getGallery->get("templateIdEditComment") ) + $self->processTemplate( $var, $self->getGallery->templateIdEditComment ) ); } @@ -1134,9 +1099,9 @@ sub www_makeShortcut { my $albums = $self->getGallery->getAlbumIds; my %albumOptions; for my $assetId ( @$albums ) { - my $asset = WebGUI::Asset->newByDynamicClass($session, $assetId); + my $asset = WebGUI::Asset->newById($session, $assetId); if ($asset->canAddFile) { - $albumOptions{ $assetId } = $asset->get("title"); + $albumOptions{ $assetId } = $asset->title; } } $var->{ form_parentId } @@ -1147,7 +1112,7 @@ sub www_makeShortcut { }); return $self->processStyle( - $self->processTemplate($var, $self->getGallery->get("templateIdMakeShortcut")) + $self->processTemplate($var, $self->getGallery->templateIdMakeShortcut) ); } @@ -1186,10 +1151,10 @@ sub www_view { return $self->session->privilege->insufficient unless $self->canView; # Add to views - $self->update({ views => $self->get('views') + 1 }); + $self->update({ views => $self->views + 1 }); - $self->session->http->setLastModified($self->getContentLastModified); - $self->session->http->sendHeader; + $self->session->response->setLastModified($self->getContentLastModified); + $self->session->response->sendHeader; $self->prepareView; my $style = $self->processStyle($self->getSeparator); my ($head, $foot) = split($self->getSeparator,$style); @@ -1205,4 +1170,5 @@ sub setPrivileges { } +__PACKAGE__->meta->make_immutable; 1; # Who knew the truth would be so obvious? diff --git a/lib/WebGUI/Asset/File/GalleryFile/Photo.pm b/lib/WebGUI/Asset/File/GalleryFile/Photo.pm index f14ae7e42..49967d7ee 100644 --- a/lib/WebGUI/Asset/File/GalleryFile/Photo.pm +++ b/lib/WebGUI/Asset/File/GalleryFile/Photo.pm @@ -3,7 +3,7 @@ package WebGUI::Asset::File::GalleryFile::Photo; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -15,17 +15,30 @@ package WebGUI::Asset::File::GalleryFile::Photo; =cut use strict; -use base 'WebGUI::Asset::File::GalleryFile'; +use Moose; +use WebGUI::Definition::Asset; +extends 'WebGUI::Asset::File::GalleryFile'; +define assetName => ['assetName', 'Asset_Photo']; +define icon => 'photo.gif'; +define tableName => 'Photo'; +property exifData => ( + fieldType => 'text', + noFormPost => 1, + default => undef, + ); +property location => ( + fieldType => 'text', + label => ['editForm location','Asset_Photo'], + default => undef, + ); use Carp qw( carp croak ); use Image::ExifTool qw( :Public ); use JSON qw/ to_json from_json /; use URI::Escape; -use Tie::IxHash; use WebGUI::DateTime; use WebGUI::Friends; -use WebGUI::Utility; use WebGUI::Storage; @@ -58,47 +71,12 @@ These methods are available from this class: =cut -#------------------------------------------------------------------- - -=head2 definition ( session, definition ) - -Define the properties of the Photo asset. - -=cut - -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift; - my $i18n = WebGUI::International->new($session, 'Asset_Photo'); - - tie my %properties, 'Tie::IxHash', ( - exifData => { - defaultValue => undef, - }, - location => { - defaultValue => undef, - }, - ); - - push @{$definition}, { - assetName => $i18n->get('assetName'), - autoGenerateForms => 0, - icon => 'photo.gif', - tableName => 'Photo', - className => 'WebGUI::Asset::File::GalleryFile::Photo', - properties => \%properties, - }; - - return $class->SUPER::definition($session, $definition); -} - #---------------------------------------------------------------------------- =head2 applyConstraints ( options ) Apply the constraints to the original file. Called automatically by C -and C. +and C. This is a sort of catch-all method for applying things to the file after it's uploaded. This method simply calls other methods to do its work. @@ -107,16 +85,16 @@ C is a hash reference of options and is currently not used. =cut -sub applyConstraints { +override applyConstraints => sub { my $self = shift; my $options = shift; my $gallery = $self->getGallery; # Update the asset's size and make a thumbnail - my $maxImageSize = $gallery->get("imageViewSize") - || $self->session->setting->get("maxImageSize"); + my $maxImageSize = $gallery->imageViewSize + || $self->session->setting->get("maxImageSize"); my $storage = $self->getStorageLocation; - my $file = $self->get("filename"); + my $file = $self->filename; # Adjust orientation based on exif data. Do this before we start to # generate resolutions so that all images have the correct orientation. @@ -127,17 +105,13 @@ sub applyConstraints { $self->makeResolutions; # adjust density before size, so that the dimensions won't change - $storage->resize( $file, undef, undef, $gallery->get( 'imageDensity' ) ); + $storage->resize( $file, undef, undef, $gallery->imageDensity ); $storage->adjustMaxImageSize($file, $maxImageSize); $self->generateThumbnail; $self->updateExifDataFromFile; - - # setSize method is already called by WebGUI::Asset::File::applyConstraints (SUPER) - # $self->setSize; - - $self->SUPER::applyConstraints( $options ); -} + super(); +}; #---------------------------------------------------------------------------- @@ -204,8 +178,8 @@ Generates a thumbnail for this image. sub generateThumbnail { my $self = shift; $self->getStorageLocation->generateThumbnail( - $self->get("filename"), - $self->getGallery->get("imageThumbnailSize"), + $self->filename, + $self->getGallery->imageThumbnailSize, ); return; } @@ -236,8 +210,7 @@ sub getDownloadFileUrl { =head2 getEditFormUploadControl Returns the HTML to display the current photo, if it has one, and a file chooser -to either upload one, or replace the current one. Subclasses the master class -to change i18n labels. +to either upload one, or replace the current one. =cut @@ -247,9 +220,9 @@ sub getEditFormUploadControl { my $i18n = WebGUI::International->new($session, 'Asset_File'); my $html = ''; - if ($self->get("filename") ne "") { + if ($self->filename ne "") { $html .= WebGUI::Form::readOnly( $session, { - value => '

    '.$self->get( '.$self->get("filename").'

    ' + value => '

    '.$self->filename.' '.$self->filename.'

    ' }); } @@ -265,6 +238,123 @@ sub getEditFormUploadControl { } +#---------------------------------------------------------------------------- + +=head2 getEditTemplate ( ) + +Override the method in the base class to get the parent's templates and data. + +=cut + +sub getEditTemplate { + my $self = shift; + my $session = $self->session; + my $form = $session->form; + + my $i18n = WebGUI::International->new($session, 'WebGUI'); + + # Prepare the template variables + # Cannot get all template vars since they require a storage location, doesn't work for + # creating new assets. + #my $var = $self->getTemplateVars; + my $var = { + url_addArchive => $self->getParent->getUrl('func=addArchive'), + url_album => $self->getParent->getUrl('func=album'), + }; + + # Process errors if any + if ( $session->stow->get( 'editFormErrors' ) ) { + for my $error ( @{ $session->stow->get( 'editFormErrors' ) } ) { + push @{ $var->{ errors } }, { + error => $error, + }; + } + } + + if ( $form->get('func') eq "add" ) { + $var->{ isNewPhoto } = 1; + } + + # Generate the form + if ( $var->{ isNewPhoto } ) { + $var->{ form_start } + = WebGUI::Form::formHeader( $session, { + action => $self->getParent->getUrl('func=addSave;assetId=new;className='.__PACKAGE__), + extras => 'name="photoAdd"', + }) + . WebGUI::Form::hidden( $session, { + name => 'ownerUserId', + value => $session->user->userId, + }) + ; + } + else { + $var->{ form_start } + = WebGUI::Form::formHeader( $session, { + action => $self->getUrl('func=editSave'), + extras => 'name="photoEdit"', + }) + . WebGUI::Form::hidden( $session, { + name => 'ownerUserId', + value => $self->ownerUserId, + }) + ; + } + $var->{ form_start } + .= WebGUI::Form::hidden( $session, { + name => "proceed", + value => $form->get('proceed') || "showConfirmation", + }); + + $var->{ form_end } = WebGUI::Form::formFooter( $session ); + + $var->{ form_submit } + = WebGUI::Form::submit( $session, { + name => "submit", + value => $i18n->get('save'), + }); + + $var->{ form_title } + = WebGUI::Form::Text( $session, { + name => "title", + value => ( $form->get("title") || $self->title ), + }); + + $var->{ form_synopsis } + = WebGUI::Form::HTMLArea( $session, { + name => "synopsis", + value => ( $form->get("synopsis") || $self->synopsis ), + richEditId => $self->getGallery->richEditIdFile, + }); + + $var->{ form_photo } = $self->getEditFormUploadControl; + + $var->{ form_keywords } + = WebGUI::Form::Text( $session, { + name => "keywords", + value => ( $form->get("keywords") || $self->keywords ), + }); + + $var->{ form_location } + = WebGUI::Form::Text( $session, { + name => "location", + value => ( $form->get("location") || $self->location ), + }); + + $var->{ form_friendsOnly } + = WebGUI::Form::yesNo( $session, { + name => "friendsOnly", + value => ( $form->get("friendsOnly") || $self->friendsOnly ), + defaultValue => undef, + }); + + my $gallery = $self->getGallery; + my $template = eval { WebGUI::Asset->newById($session, $gallery->getTemplateIdEditFile) }; + $template->setParam(%{ $var }); + $template->style($gallery->getStyleTemplateId); + return $template; +} + #---------------------------------------------------------------------------- =head2 getExifData ( ) @@ -276,14 +366,14 @@ Gets a hash reference of Exif data about this Photo. sub getExifData { my $self = shift; - return unless $self->get('exifData'); + return unless $self->exifData; # Our processing and eliminating of bad / unparsable keys # isn't perfect, so handle errors gracefully - my $exif = eval { from_json( $self->get('exifData') ) }; + my $exif = eval { from_json( $self->exifData ) }; if ( $@ ) { - $self->session->errorHandler->warn( - "Could not parse JSON data for EXIF in Photo '" . $self->get('title') + $self->session->log->warn( + "Could not parse JSON data for EXIF in Photo '" . $self->title . "' (" . $self->getId . "): " . $@ ); return; @@ -336,10 +426,10 @@ Get a hash reference of template variables shared by all views of this asset. =cut -sub getTemplateVars { +override getTemplateVars => sub { my $self = shift; my $session = $self->session; - my $var = $self->SUPER::getTemplateVars; + my $var = super(); ### Download resolutions for my $resolution ( @{ $self->getResolutions } ) { @@ -364,7 +454,7 @@ sub getTemplateVars { } return $var; -} +}; #---------------------------------------------------------------------------- @@ -377,7 +467,7 @@ Get the URL to the thumbnail for this Photo. sub getThumbnailUrl { my $self = shift; return $self->getStorageLocation->getThumbnailUrl( - $self->get("filename") + $self->filename ); } @@ -390,12 +480,12 @@ additonal details. =cut -sub indexContent { +override indexContent => sub { my $self = shift; - my $indexer = $self->SUPER::indexContent; + my $indexer = super(); $indexer->addKeywords($self->get("location")); return $indexer; -} +}; #---------------------------------------------------------------------------- @@ -427,7 +517,7 @@ sub makeResolutions { $resolutions ||= $self->getGallery->getImageResolutions; my $storage = $self->getStorageLocation; - $self->session->errorHandler->info(" Making resolutions for '" . $self->get("filename") . q{'}); + $self->session->log->info(" Making resolutions for '" . $self->filename . q{'}); for my $res ( @$resolutions ) { # carp if resolution is bad @@ -436,14 +526,14 @@ sub makeResolutions { next; } my $newFilename = $res . ".jpg"; - $storage->copyFile( $self->get("filename"), $newFilename ); - $storage->resize( $newFilename, $res, undef, $self->getGallery->get( 'imageDensity' ) ); + $storage->copyFile( $self->filename, $newFilename ); + $storage->resize( $newFilename, $res, undef, $self->getGallery->imageDensity ); } } #---------------------------------------------------------------------------- -=head2 processPropertiesFromFormPost ( ) +=head2 processEditForm ( ) Process the asset edit form. @@ -451,11 +541,11 @@ Make the default title into the file name minus the extention. =cut -sub processPropertiesFromFormPost { +override processEditForm => sub { my $self = shift; my $i18n = WebGUI::International->new( $self->session,'Asset_Photo' ); my $form = $self->session->form; - my $errors = $self->SUPER::processPropertiesFromFormPost || []; + my $errors = super() || []; # Make sure there is an image file attached to this asset. if ( !$self->get('filename') ) { @@ -469,7 +559,7 @@ sub processPropertiesFromFormPost { # If no title was given, make it the file name if ( !$form->get('title') ) { - my $title = $self->get('filename'); + my $title = $self->filename; $title =~ s/\.[^.]*$//; $title =~ tr/-/ /; # De-mangle the spaces at the expense of the dashes $self->update( { @@ -480,13 +570,13 @@ sub processPropertiesFromFormPost { # If this is a new Photo, change some other things too if ( $form->get('assetId') eq "new" ) { $self->update( { - url => $self->session->url->urlize( join "/", $self->getParent->get('url'), $title ), + url => $self->session->url->urlize( join "/", $self->getParent->url, $title ), } ); } } return undef; -} +}; #---------------------------------------------------------------------------- @@ -519,11 +609,11 @@ Extend the superclass setFile to automatically generate thumbnails. =cut -sub setFile { +override setFile => sub { my $self = shift; - $self->SUPER::setFile(@_); + super(); $self->generateThumbnail; -} +}; #---------------------------------------------------------------------------- @@ -539,7 +629,7 @@ sub updateExifDataFromFile { my $exifTool = Image::ExifTool->new; $exifTool->Options( PrintConv => 1 ); - my $info = $exifTool->ImageInfo( $storage->getPath( $self->get('filename') ) ); + my $info = $exifTool->ImageInfo( $storage->getPath( $self->filename ) ); # Sanitize Exif data by removing keys with references as values for my $key ( keys %$info ) { @@ -574,143 +664,20 @@ sub www_download { my $storage = $self->getStorageLocation; - $self->session->http->setMimeType( "image/jpeg" ); - $self->session->http->setLastModified( $self->getContentLastModified ); + $self->session->response->content_type( "image/jpeg" ); + $self->session->response->setLastModified( $self->getContentLastModified ); my $resolution = $self->session->form->get("resolution"); if ($resolution) { return $storage->getFileContentsAsScalar( $resolution . ".jpg" ); } else { - return $storage->getFileContentsAsScalar( $self->get("filename") ); + return $storage->getFileContentsAsScalar( $self->filename ); } } #---------------------------------------------------------------------------- -=head2 www_edit ( ) - -Web facing method which is the default edit page - -This page is only available to those who can edit this Photo. - -=cut - -sub www_edit { - my $self = shift; - my $session = $self->session; - my $form = $session->form; - - return $session->privilege->insufficient unless $self->canEdit; - return $session->privilege->locked unless $self->canEditIfLocked; - - my $i18n = WebGUI::International->new($session, 'WebGUI'); - - # Prepare the template variables - # Cannot get all template vars since they require a storage location, doesn't work for - # creating new assets. - #my $var = $self->getTemplateVars; - my $var = { - url_addArchive => $self->getParent->getUrl('func=addArchive'), - url_album => $self->getParent->getUrl('func=album'), - }; - - # Process errors if any - if ( $session->stow->get( 'editFormErrors' ) ) { - for my $error ( @{ $session->stow->get( 'editFormErrors' ) } ) { - push @{ $var->{ errors } }, { - error => $error, - }; - } - } - - if ( $form->get('func') eq "add" ) { - $var->{ isNewPhoto } = 1; - } - - # Generate the form - if ($form->get("func") eq "add") { - $var->{ form_start } - = WebGUI::Form::formHeader( $session, { - action => $self->getParent->getUrl('func=editSave;assetId=new;class='.__PACKAGE__), - extras => 'name="photoAdd"', - }) - . WebGUI::Form::hidden( $session, { - name => 'ownerUserId', - value => $session->user->userId, - }) - ; - } - else { - $var->{ form_start } - = WebGUI::Form::formHeader( $session, { - action => $self->getUrl('func=editSave'), - extras => 'name="photoEdit"', - }) - . WebGUI::Form::hidden( $session, { - name => 'ownerUserId', - value => $self->get('ownerUserId'), - }) - ; - } - $var->{ form_start } - .= WebGUI::Form::hidden( $session, { - name => "proceed", - value => $form->get('proceed') || "showConfirmation", - }); - - $var->{ form_end } = WebGUI::Form::formFooter( $session ); - - $var->{ form_submit } - = WebGUI::Form::submit( $session, { - name => "submit", - value => $i18n->get('save'), - }); - - $var->{ form_title } - = WebGUI::Form::Text( $session, { - name => "title", - value => ( $form->get("title") || $self->get("title") ), - }); - - $self->getGallery; - - $var->{ form_synopsis } - = WebGUI::Form::HTMLArea( $session, { - name => "synopsis", - value => ( $form->get("synopsis") || $self->get("synopsis") ), - richEditId => $self->getGallery->get("richEditIdFile"), - }); - - $var->{ form_photo } = $self->getEditFormUploadControl; - - $var->{ form_keywords } - = WebGUI::Form::Text( $session, { - name => "keywords", - value => ( $form->get("keywords") || $self->get("keywords") ), - }); - - $var->{ form_location } - = WebGUI::Form::Text( $session, { - name => "location", - value => ( $form->get("location") || $self->get("location") ), - }); - - $var->{ form_friendsOnly } - = WebGUI::Form::yesNo( $session, { - name => "friendsOnly", - value => ( $form->get("friendsOnly") || $self->get("friendsOnly") ), - defaultValue => undef, - }); - - - return $self->processStyle( - $self->processTemplate( $var, $self->getGallery->getTemplateIdEditFile ) - ); -} - -#---------------------------------------------------------------------------- - =head2 www_showConfirmation ( ) Shows the confirmation message after adding / editing a gallery album. @@ -725,9 +692,10 @@ sub www_showConfirmation { return $self->processStyle( sprintf( $i18n->get('save message'), $self->getUrl, - $self->getParent->getUrl('func=add;class='.__PACKAGE__), + $self->getParent->getUrl('func=add;className='.__PACKAGE__), ) ); } +__PACKAGE__->meta->make_immutable; 1; diff --git a/lib/WebGUI/Asset/File/Image.pm b/lib/WebGUI/Asset/File/Image.pm index 536c83d31..8e5b87eb9 100644 --- a/lib/WebGUI/Asset/File/Image.pm +++ b/lib/WebGUI/Asset/File/Image.pm @@ -3,7 +3,7 @@ package WebGUI::Asset::File::Image; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -15,12 +15,38 @@ package WebGUI::Asset::File::Image; =cut use strict; -use base 'WebGUI::Asset::File'; use WebGUI::Storage; -use WebGUI::HTMLForm; -use WebGUI::Utility; use WebGUI::Form::Image; +use Moose; +use WebGUI::Definition::Asset; +extends 'WebGUI::Asset::File'; +define assetName => ['assetName', 'Asset_Image']; +define tableName => 'ImageAsset'; +define icon => 'image.gif'; +property thumbnailSize => ( + label => ['thumbnail size', 'Asset_Image'], + hoverHelp => ['Thumbnail size description', 'Asset_Image'], + fieldType => 'integer', + builder => '_default_thumbnailSize', + lazy => 1, + ); +sub _default_thumbnailSize { + my $self = shift; + return $self->session->setting->get('thumbnailSize'); +} +property parameters => ( + label => ['parameters', 'Asset_Image'], + hoverHelp => ['Parameters description', 'Asset_Image'], + fieldType => 'textarea', + default => 'style="border-style:none;"', + ); +property annotations => ( + fieldType => 'hidden', + noFormPost => 1, + default => '', + ); + =head1 NAME Package WebGUI::Asset::File::Image @@ -62,62 +88,18 @@ An integer (in pixels) representing the longest edge a thumbnail may have. =cut -sub applyConstraints { +override applyConstraints => sub { my $self = shift; my $options = shift; - $self->SUPER::applyConstraints($options); - my $maxImageSize = $options->{maxImageSize} || $self->get('maxImageSize') || $self->session->setting->get("maxImageSize"); - my $thumbnailSize = $options->{thumbnailSize} || $self->get('thumbnailSize') || $self->session->setting->get("thumbnailSize"); - my $storage = $self->getStorageLocation; - my $file = $self->get("filename"); + super(); + my $maxImageSize = $options->{maxImageSize} || $self->session->setting->get("maxImageSize"); + my $thumbnailSize = $options->{thumbnailSize} || $self->thumbnailSize || $self->session->setting->get("thumbnailSize"); + my $storage = $self->getStorageLocation; + my $file = $self->filename; $storage->adjustMaxImageSize($file, $maxImageSize); $self->generateThumbnail($thumbnailSize); $self->setSize; -} - - - -#------------------------------------------------------------------- - -=head2 definition ( definition ) - -Defines the properties of this asset. - -=head3 definition - -A hash reference passed in from a subclass definition. - -=cut - -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift; - my $i18n = WebGUI::International->new($session,"Asset_Image"); - push @{$definition}, { - assetName => $i18n->get('assetName'), - tableName => 'ImageAsset', - className => 'WebGUI::Asset::File::Image', - icon => 'image.gif', - properties => { - thumbnailSize => { - fieldType => 'integer', - defaultValue => $session->setting->get("thumbnailSize"), - }, - parameters => { - fieldType => 'textarea', - defaultValue => 'style="border-style:none;"', - allowEmpty => 1, - }, - annotations => { - fieldType => 'hidden', - noFormPost => 1, - defaultValue => '', - }, - }, - }; - return $class->SUPER::definition($session,$definition); -} +}; @@ -139,7 +121,7 @@ sub generateThumbnail { if (defined $thumbnailSize) { $self->update({thumbnailSize=>$thumbnailSize}); } - $self->getStorageLocation->generateThumbnail($self->get("filename"),$self->get("thumbnailSize")); + $self->getStorageLocation->generateThumbnail($self->filename,$self->thumbnailSize); } @@ -147,58 +129,77 @@ sub generateThumbnail { =head2 getEditForm ( ) -Returns the TabForm object that will be used in generating the edit page for this asset. +Returns the WebGUI::FormBuilder object that will be used in generating the edit page for this asset. =cut -sub getEditForm { +override getEditForm => sub { my $self = shift; - my $tabform = $self->SUPER::getEditForm(); - -# Add the fields defined locally and apply any overrides from the config file + my $f = super(); my $i18n = WebGUI::International->new($self->session,"Asset_Image"); - tie my %extraFields, "Tie::IxHash"; + # Fix templateId to use correct namespace and default + my $template = $f->getTab('display')->getField('templateId'); + $template->set( hoverHelp => $i18n->get('image template description') ); + $template->set( namespace => 'ImageAsset' ); + $template->set( defaultValue => 'PBtmpl0000000000000088' ); - $extraFields{thumbnailSize} = { - fieldType => "integer", - name => "thumbnailSize", - label => $i18n->get('thumbnail size'), - hoverHelp => $i18n->get('Thumbnail size description'), - value => $self->getValue("thumbnailSize"), - }; - $extraFields{parameters} = { - fieldType => "textarea", - name => "parameters", - label => $i18n->get('parameters'), - hoverHelp => $i18n->get('Parameters description'), - value => $self->getValue("parameters"), - }; - if ($self->get("filename") ne "") { - my ($x, $y) = $self->getStorageLocation->getSizeInPixels($self->get("filename")); + # Add the fields defined locally and apply any overrides from the config file + my $overrides = $self->session->config->get("assets/".$self->className); - $extraFields{thumbnail} = { - fieldType => "readOnly", + if ($self->filename ne "") { + my ($x, $y) = $self->getStorageLocation->getSizeInPixels($self->filename); + + $f->getTab('properties')->addField( "ReadOnly", + name => 'thumbnail', label => $i18n->get('thumbnail'), hoverHelp => $i18n->get('Thumbnail description'), - value => 'thumbnail' - }; - $extraFields{imageSize} = { - fieldType => "readOnly", + value => 'thumbnail', + ( $overrides->{thumbnail} ? %{$overrides->{thumbnail}} : () ), + ); + $f->getTab('properties')->addField( "ReadOnly", + name => 'imageSize', label => $i18n->get('image size'), value => $x.' x '.$y, - }; + ( $overrides->{imageSize} ? %{$overrides->{imageSize}} : () ), + ); } - my $overrides = $self->session->config->get("assets/".$self->get("className")); + return $f; +}; - foreach my $fieldName (keys %extraFields) { - $self->setupFormField($tabform, $fieldName, \%extraFields, $overrides); - } +#------------------------------------------------------------------- - return $tabform; -} +=head2 getHelpers ( ) + +Add the image helpers + +=cut + +override getHelpers => sub { + my ( $self ) = @_; + + my $helpers = super(); + $helpers->{resize} = { + className => 'WebGUI::AssetHelper::Image::Resize', + label => 'Resize Image', + }; + $helpers->{rotate} = { + className => 'WebGUI::AssetHelper::Image::Rotate', + label => 'Rotate Image', + }; + $helpers->{crop} = { + className => 'WebGUI::AssetHelper::Image::Crop', + label => 'Crop Image', + }; + $helpers->{annotate} = { + url => $self->getUrl( 'func=annotate' ), + label => "Annotate Image", + }; + + return $helpers; +}; #------------------------------------------------------------------- @@ -210,21 +211,7 @@ Returns the URL to the thumbnail of the image stored in the Asset. sub getThumbnailUrl { my $self = shift; - return $self->getStorageLocation->getThumbnailUrl($self->get("filename")); -} - -#------------------------------------------------------------------- - -=head2 getToolbar ( ) - -Returns a toolbar with a set of icons that hyperlink to functions that delete, edit, promote, demote, cut, and copy. - -=cut - -sub getToolbar { - my $self = shift; - return undef if ($self->getToolbarState); - return $self->SUPER::getToolbar(); + return $self->getStorageLocation->getThumbnailUrl($self->filename); } #------------------------------------------------------------------- @@ -236,11 +223,12 @@ Renders this asset. =cut sub view { - my $self = shift; + my $self = shift; my $session = $self->session; - if (!$session->var->isAdminOn && $self->get("cacheTimeout") > 10) { - my $cache = $self->getCache; - my $out = $cache->get if defined $cache; + my $cache = $session->cache; + my $cacheKey = $self->getWwwCacheKey('view'); + if (!$session->isAdminOn && $self->cacheTimeout > 10) { + my $out = $cache->get( $cacheKey ); return $out if $out; } my %var = %{$self->get}; @@ -249,21 +237,21 @@ sub view { if ($crop_js) { my ($style, $url) = $session->quick(qw(style url)); - $style->setLink($url->extras('yui/build/fonts/fonts-min.css'), {rel=>'stylesheet', type=>'text/css'}); - $style->setLink($url->extras('yui/container/assets/container.css'), {rel=>'stylesheet', type=>'text/css'}); - $style->setScript($url->extras('yui/build/yahoo-dom-event/yahoo-dom-event.js'), {type=>'text/javascript'}); - $style->setScript($url->extras('yui/build/container/container-min.js'), {type=>'text/javascript'}); + $style->setCss($url->extras('yui/build/fonts/fonts-min.css')); + $style->setCss($url->extras('yui/container/assets/container.css')); + $style->setScript($url->extras('yui/build/yahoo-dom-event/yahoo-dom-event.js')); + $style->setScript($url->extras('yui/build/container/container-min.js')); } $var{controls} = $self->getToolbar; $var{fileUrl} = $self->getFileUrl; $var{fileIcon} = $self->getFileIconUrl; $var{thumbnail} = $self->getThumbnailUrl; - $var{annotateJs} = "$crop_js$domMe"; - $var{parameters} .= sprintf(q{ id="%s"}, $self->getId()); + $var{annotateJs} = $crop_js . $domMe; + $var{parameters} .= sprintf(q{ id="%s"}, $self->getId); my $out = $self->processTemplate(\%var,undef,$self->{_viewTemplate}); - if (!$session->var->isAdminOn && $self->get("cacheTimeout") > 10) { - WebGUI::Cache->new($self->session,"view_".$self->getId)->set($out,$self->get("cacheTimeout")); + if (!$session->isAdminOn && $self->cacheTimeout > 10) { + $cache->set( $cacheKey, $out, $self->get("cacheTimeout") ); } return $out; } @@ -277,64 +265,11 @@ Extend the superclass setFile to automatically generate thumbnails. =cut -sub setFile { +override setFile => sub { my $self = shift; - $self->SUPER::setFile(@_); + super(); $self->generateThumbnail; -} - -#------------------------------------------------------------------- - -=head2 www_edit - -Override the master class to add image editing controls to the edit screen. -Also adds the Image template form variable. - -=cut - -sub www_edit { - my $self = shift; - my $session = $self->session; - return $session->privilege->insufficient() unless $self->canEdit; - return $session->privilege->locked() unless $self->canEditIfLocked; - my $i18n = WebGUI::International->new($session, 'Asset_Image'); - if ($self->get('filename')) { - my $ac = $self->getAdminConsole; - $ac->addSubmenuItem($self->getUrl('func=resize'), $i18n->get("resize image")); - $ac->addSubmenuItem($self->getUrl('func=rotate'), $i18n->get("rotate image")); - $ac->addSubmenuItem($self->getUrl('func=crop'), $i18n->get("crop image")); - $ac->addSubmenuItem($self->getUrl('func=annotate'), $i18n->get("annotate image")); - $ac->addSubmenuItem($self->getUrl('func=undo'), $i18n->get("undo image")); - } - my $tabform = $self->getEditForm; - $tabform->getTab("display")->template( - -value => $self->get("templateId"), - -namespace => "ImageAsset", - -hoverHelp => $i18n->get('image template description'), - -defaultValue => "PBtmpl0000000000000088", - ); - return $self->getAdminConsole->render($tabform->print,$i18n->get("edit image")); -} - -#------------------------------------------------------------------- - -=head2 www_undo - -Rolls back the last revision of this asset, undoing any work that may -have been done to it. - -=cut - -sub www_undo { - my $self = shift; - my $previous = (@{$self->getRevisions()})[1]; - if ($previous) { - $self->purgeRevision(); - $self = $previous; - $self->generateThumbnail; - } - return $self->www_edit(); -} +}; #------------------------------------------------------------------- @@ -356,10 +291,12 @@ sub www_annotate { return $session->privilege->insufficient() unless $self->canEdit; return $session->privilege->locked() unless $self->canEditIfLocked; if (1) { - my $newSelf = $self->addRevision(); + my $tag = WebGUI::VersionTag->getWorking( $session ); + my $newSelf = $self->addRevision({ tagId => $tag->getId, status => "pending" }); + $newSelf->setVersionLock; delete $newSelf->{_storageLocation}; - $newSelf->getStorageLocation->annotate($newSelf->get("filename"),$newSelf,$session->form); - $newSelf->setSize($newSelf->getStorageLocation->getFileSize($newSelf->get("filename"))); + $newSelf->getStorageLocation->annotate($newSelf->filename,$newSelf,$session->form); + $newSelf->setSize($newSelf->getStorageLocation->getFileSize($newSelf->filename)); $self = $newSelf; $self->generateThumbnail; WebGUI::VersionTag->autoCommitWorkingIfEnabled($session, { allowComments => 0 }); @@ -367,17 +304,17 @@ sub www_annotate { my ($style, $url) = $session->quick(qw(style url)); - $style->setLink($url->extras('yui/build/resize/assets/skins/sam/resize.css'), {rel=>'stylesheet', type=>'text/css'}); - $style->setLink($url->extras('yui/build/fonts/fonts-min.css'), {rel=>'stylesheet', type=>'text/css'}); - $style->setLink($url->extras('yui/build/imagecropper/assets/skins/sam/imagecropper.css'), {rel=>'stylesheet', type=>'text/css'}); + $style->setCss($url->extras('yui/build/resize/assets/skins/sam/resize.css')); + $style->setCss($url->extras('yui/build/fonts/fonts-min.css')); + $style->setCss($url->extras('yui/build/imagecropper/assets/skins/sam/imagecropper.css')); - $style->setScript($url->extras('yui/build/yahoo-dom-event/yahoo-dom-event.js'), {type=>'text/javascript'}); - $style->setScript($url->extras('yui/build/element/element-min.js'), {type=>'text/javascript'}); - $style->setScript($url->extras('yui/build/dragdrop/dragdrop-min.js'), {type=>'text/javascript'}); - $style->setScript($url->extras('yui/build/resize/resize-min.js'), {type=>'text/javascript'}); - $style->setScript($url->extras('yui/build/imagecropper/imagecropper-min.js'), {type=>'text/javascript'}); + $style->setScript($url->extras('yui/build/yahoo-dom-event/yahoo-dom-event.js')); + $style->setScript($url->extras('yui/build/element/element-min.js')); + $style->setScript($url->extras('yui/build/dragdrop/dragdrop-min.js')); + $style->setScript($url->extras('yui/build/resize/resize-min.js')); + $style->setScript($url->extras('yui/build/imagecropper/imagecropper-min.js')); - my @pieces = split(/\n/, $self->get('annotations')); + my @pieces = split(/\n/, $self->annotations); my ($img_null, $tooltip_block, $tooltip_none) = ('', '', ''); for (my $i = 0; $i < $#pieces; $i += 3) { @@ -387,52 +324,52 @@ sub www_annotate { my $j = $i + 2; } - my $image = '
    '.$self->get(
    '; + my $image = '
    '.$self->filename.'
    '; - my ($width, $height) = $self->getStorageLocation->getSize($self->get("filename")); + my ($width, $height) = $self->getStorageLocation->getSize($self->filename); my @checkboxes = (); my $i18n = WebGUI::International->new($session,"Asset_Image"); - my $f = WebGUI::HTMLForm->new($session); + my $f = WebGUI::FormBuilder->new($session); - $self->getAdminConsole->addSubmenuItem($self->getUrl('func=edit'),$i18n->get("edit image")); - $f->hidden( + $f->addField( "hidden", -name=>"func", -value=>"annotate" ); - $f->text( + $f->addField( "text", -label=>$i18n->get('annotate image'), -value=>'', -hoverHelp=>$i18n->get('annotate image description'), -name=>'annotate_text' ); - $f->integer( + $f->addField( "integer", -label=>$i18n->get('top'), -name=>"annotate_top", -value=>, ); - $f->integer( + $f->addField( "integer", -label=>$i18n->get('left'), -name=>"annotate_left", -value=>, ); - $f->integer( + $f->addField( "integer", -label=>$i18n->get('width'), -name=>"annotate_width", -value=>, ); - $f->integer( + $f->addField( "integer", -label=>$i18n->get('height'), -name=>"annotate_height", -value=>, ); - $f->button( + $f->addField( "button", -value=>$i18n->get('annotate'), -extras=>'onclick="switchState();"', ); - $f->submit; + $f->addField( "submit", name => "send" ); my ($crop_js, $domMe) = $self->annotate_js(); - return $self->getAdminConsole->render($f->print."$image$crop_js$domMe",$i18n->get("annotate image")); + my $output = '

    ' . $i18n->get('annotate image') . '

    ' . $f->toHtml . $image . $crop_js . $domMe; + return $style->process( $output, "PBtmplBlankStyle000001" ); } #------------------------------------------------------------------- @@ -453,7 +390,7 @@ sub annotate_js { my $self = shift; my $opts = shift; - my @pieces = split(/\n/, $self->get('annotations')); + my @pieces = split(/\n/, $self->annotations); # warn("pieces: $#pieces: ". $self->getId()); return "" if !@pieces && $opts->{just_image}; @@ -558,287 +495,5 @@ sub annotate_js { return($crop_js, $domMe); } -#------------------------------------------------------------------- - -=head2 www_rotate - -Displays a form to the user to rotate their image. If the C form variable -is true, does the rotation as well. - -Returns the user to the roate form. - -=cut - -sub www_rotate { - my $self = shift; - my $session = $self->session; - return $session->privilege->insufficient() unless $self->canEdit; - return $session->privilege->locked() unless $self->canEditIfLocked; - if (defined $session->form->process("Rotate")) { - my $newSelf = $self->addRevision(); - delete $newSelf->{_storageLocation}; - $newSelf->getStorageLocation->rotate($newSelf->get("filename"),$session->form->process("Rotate")); - $newSelf->setSize($newSelf->getStorageLocation->getFileSize($newSelf->get("filename"))); - $self = $newSelf; - $self->generateThumbnail; - WebGUI::VersionTag->autoCommitWorkingIfEnabled($session, { allowComments => 0 }); - } - - my ($x, $y) = $self->getStorageLocation->getSizeInPixels($self->get("filename")); - - ##YUI specific datatable CSS - my ($style, $url) = $session->quick(qw(style url)); - - my $img_name = $self->getStorageLocation->getUrl($self->get("filename")); - my $img_file = $self->get("filename"); - my $image = '
    '.$self->get(
    '; - - my $i18n = WebGUI::International->new($session,"Asset_Image"); - $self->getAdminConsole->addSubmenuItem($self->getUrl('func=edit'),$i18n->get("edit image")); - my $f = WebGUI::HTMLForm->new($session); - $f->hidden( - -name=>"func", - -value=>"rotate" - ); - $f->button( - -value=>"Left", - -extras=>qq(onclick="var deg = document.getElementById('Rotate_formId').value; deg = parseInt(deg) + 90; document.getElementById('Rotate_formId').value = deg;"), - ); - $f->button( - -value=>"Right", - -extras=>qq(onclick="var deg = document.getElementById('Rotate_formId').value; deg = parseInt(deg) - 90; document.getElementById('Rotate_formId').value = deg;"), - ); - $f->integer( - -label=>$i18n->get('degree'), - -name=>"Rotate", - -value=>0, - ); - $f->submit; - return $self->getAdminConsole->render($f->print.$image,$i18n->get("rotate image")); -} - -#------------------------------------------------------------------- - -=head2 www_resize - -Displays a form for the user to resize this image. If either of the C or -C form variables are true, also does the resizing. - -Returns the user to the resize form. - -=cut - -sub www_resize { - my $self = shift; - my $session = $self->session; - return $session->privilege->insufficient() unless $self->canEdit; - return $session->privilege->locked() unless $self->canEditIfLocked; - if ($session->form->process("newWidth") || $session->form->process("newHeight")) { - my $newSelf = $self->addRevision(); - delete $newSelf->{_storageLocation}; - $newSelf->getStorageLocation->resize($newSelf->get("filename"),$session->form->process("newWidth"),$session->form->process("newHeight")); - $newSelf->setSize($newSelf->getStorageLocation->getFileSize($newSelf->get("filename"))); - $self = $newSelf; - $self->generateThumbnail; - WebGUI::VersionTag->autoCommitWorkingIfEnabled($session, { allowComments => 0 }); - } - - my ($x, $y) = $self->getStorageLocation->getSizeInPixels($self->get("filename")); - - ##YUI specific datatable CSS - my ($style, $url) = $session->quick(qw(style url)); - - $style->setLink($url->extras('yui/build/fonts/fonts-min.css'), {rel=>'stylesheet', type=>'text/css'}); - $style->setLink($url->extras('yui/build/resize/assets/skins/sam/resize.css'), {rel=>'stylesheet', type=>'text/css'}); - $style->setScript($url->extras('yui/build/yahoo-dom-event/yahoo-dom-event.js'), {type=>'text/javascript'}); - $style->setScript($url->extras('yui/build/element/element-min.js'), {type=>'text/javascript'}); - $style->setScript($url->extras('yui/build/dragdrop/dragdrop-min.js'), {type=>'text/javascript'}); - $style->setScript($url->extras('yui/build/resize/resize-min.js'), {type=>'text/javascript'}); - $style->setScript($url->extras('yui/build/animation/animation-min.js'), {type=>'text/javascript'}); - - my $resize_js = qq( - - ); - - my $i18n = WebGUI::International->new($session,"Asset_Image"); - $self->getAdminConsole->addSubmenuItem($self->getUrl('func=edit'),$i18n->get("edit image")); - my $f = WebGUI::HTMLForm->new($session); - $f->hidden( - -name=>"func", - -value=>"resize" - ); - $f->readOnly( - -label=>$i18n->get('image size'), - -hoverHelp=>$i18n->get('image size description'), - -value=>$x.' x '.$y, - ); - $f->integer( - -label=>$i18n->get('new width'), - -hoverHelp=>$i18n->get('new width description'), - -name=>"newWidth", - -value=>$x, - ); - $f->integer( - -label=>$i18n->get('new height'), - -hoverHelp=>$i18n->get('new height description'), - -name=>"newHeight", - -value=>$y, - ); - $f->submit; - my $image = '
    '.$self->get(
    '.$resize_js; - return $self->getAdminConsole->render($f->print.$image,$i18n->get("resize image")); -} - -#------------------------------------------------------------------- - -=head2 www_crop - -Display a form that allows the user to Crop their images. Also does the -cropping if any of the C, C, C or C form -variables are true. - -Returns the user to the cropping form. - -=cut - -sub www_crop { - my $self = shift; - my $session = $self->session; - return $session->privilege->insufficient() unless $self->canEdit; - return $session->privilege->locked() unless $self->canEditIfLocked; - - if ($session->form->process("Width") || $session->form->process("Height") - || $session->form->process("Top") || $session->form->process("Left")) { - my $newSelf = $self->addRevision(); - delete $newSelf->{_storageLocation}; - $newSelf->getStorageLocation->crop( - $newSelf->get("filename"), - $session->form->process("Width"), - $session->form->process("Height"), - $session->form->process("Top"), - $session->form->process("Left") - ); - $self = $newSelf; - $self->generateThumbnail; - WebGUI::VersionTag->autoCommitWorkingIfEnabled($session, { allowComments => 0 }); - } - - my $filename = $self->get("filename"); - - ##YUI specific datatable CSS - my ($style, $url) = $session->quick(qw(style url)); - - my $crop_js = qq( - - ); - - $style->setLink($url->extras('yui/build/resize/assets/skins/sam/resize.css'), {rel=>'stylesheet', type=>'text/css'}); - $style->setLink($url->extras('yui/build/fonts/fonts-min.css'), {rel=>'stylesheet', type=>'text/css'}); - $style->setLink($url->extras('yui/build/imagecropper/assets/skins/sam/imagecropper.css'), {rel=>'stylesheet', type=>'text/css'}); - $style->setScript($url->extras('yui/build/yahoo-dom-event/yahoo-dom-event.js'), {type=>'text/javascript'}); - $style->setScript($url->extras('yui/build/element/element-min.js'), {type=>'text/javascript'}); - $style->setScript($url->extras('yui/build/dragdrop/dragdrop-min.js'), {type=>'text/javascript'}); - $style->setScript($url->extras('yui/build/resize/resize-min.js'), {type=>'text/javascript'}); - $style->setScript($url->extras('yui/build/imagecropper/imagecropper-min.js'), {type=>'text/javascript'}); - - my $i18n = WebGUI::International->new($session,"Asset_Image"); - - $self->getAdminConsole->addSubmenuItem($self->getUrl('func=edit'),$i18n->get("edit image")); - my $f = WebGUI::HTMLForm->new($session); - $f->hidden( - -name=>"degree", - -value=>"0" - ); - $f->hidden( - -name=>"func", - -value=>"crop" - ); - my ($x, $y) = $self->getStorageLocation->getSizeInPixels($filename); - $f->integer( - -label=>$i18n->get('width'), - -hoverHelp=>$i18n->get('new width description'), - -name=>"Width", - -value=>$x, - ); - $f->integer( - -label=>$i18n->get('height'), - -hoverHelp=>$i18n->get('new height description'), - -name=>"Height", - -value=>$y, - ); - $f->integer( - -label=>$i18n->get('top'), - -hoverHelp=>$i18n->get('new width description'), - -name=>"Top", - -value=>$x, - ); - $f->integer( - -label=>$i18n->get('left'), - -hoverHelp=>$i18n->get('new height description'), - -name=>"Left", - -value=>$y, - ); - $f->submit; - - my $image = '
    '.$filename.'
    '.$crop_js; - - return $self->getAdminConsole->render($f->print.$image,$i18n->get("crop image")); -} - +__PACKAGE__->meta->make_immutable; 1; diff --git a/lib/WebGUI/Asset/File/ZipArchive.pm b/lib/WebGUI/Asset/File/ZipArchive.pm index 25306bc7d..f12faada3 100644 --- a/lib/WebGUI/Asset/File/ZipArchive.pm +++ b/lib/WebGUI/Asset/File/ZipArchive.pm @@ -3,7 +3,7 @@ package WebGUI::Asset::File::ZipArchive; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -15,10 +15,31 @@ package WebGUI::Asset::File::ZipArchive; =cut use strict; -use base 'WebGUI::Asset::File'; -use WebGUI::HTMLForm; + +use Moose; +use WebGUI::Definition::Asset; +extends 'WebGUI::Asset::File'; +define assetName => ['assetName', 'Asset_ZipArchive']; +define tableName => 'ZipArchiveAsset'; +define icon => 'ziparchive.gif'; +property showPage => ( + tab => "properties", + label => ['show page', 'Asset_ZipArchive'], + hoverHelp => ['show page description', 'Asset_ZipArchive'], + fieldType => 'text', + default => 'index.html', + ); +property templateId => ( + tab => "display", + label => ['template label', 'Asset_ZipArchive'], + hoverHelp => ['template description', 'Asset_ZipArchive'], + namespace => "ZipArchiveAsset", + fieldType => 'template', + default => 'ZipArchiveTMPL00000001', + ); + + use WebGUI::SQL; -use WebGUI::Utility; use Archive::Tar; use Archive::Zip; @@ -26,7 +47,6 @@ use Cwd (); use Scope::Guard (); - =head1 NAME Package WebGUI::Asset::ZipArchive @@ -77,7 +97,7 @@ sub unzip { if ($filename =~ m/\.zip$/i) { my $zip = Archive::Zip->new(); unless ($zip->read($filename) == $zip->AZ_OK){ - $self->session->errorHandler->warn($i18n->get("zip_error")); + $self->session->log->warn($i18n->get("zip_error")); return 0; } $zip->extractTree(); @@ -85,76 +105,17 @@ sub unzip { } elsif ($filename =~ m/\.tar$/i) { Archive::Tar->extract_archive($filepath.'/'.$filename,1); if (Archive::Tar->error) { - $self->session->errorHandler->warn(Archive::Tar->error); + $self->session->log->warn(Archive::Tar->error); return 0; } $self->fixFilenames; } else { - $self->session->errorHandler->warn($i18n->get("bad_archive")); + $self->session->log->warn($i18n->get("bad_archive")); } return 1; } -#------------------------------------------------------------------- - -=head2 addRevision ( ) - -This method exists for demonstration purposes only. The superclass -handles revisions to ZipArchive Assets. - -=cut - -sub addRevision { - my $self = shift; - my $newSelf = $self->SUPER::addRevision(@_); - return $newSelf; -} - -#------------------------------------------------------------------- - -=head2 definition ( definition ) - -Defines the properties of this asset. - -=head3 definition - -A hash reference passed in from a subclass definition. - -=cut - -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift; - my $i18n = WebGUI::International->new($session,"Asset_ZipArchive"); - push(@{$definition}, { - assetName=>$i18n->get('assetName'), - tableName=>'ZipArchiveAsset', - autoGenerateForms=>1, - icon=>'ziparchive.gif', - className=>'WebGUI::Asset::File::ZipArchive', - properties=>{ - showPage=>{ - tab=>"properties", - label=>$i18n->get('show page'), - hoverHelp=>$i18n->get('show page description'), - fieldType=>'text', - defaultValue=>'index.html' - }, - templateId=>{ - tab=>"display", - label=>$i18n->get('template label'), - namespace=>"ZipArchiveAsset", - fieldType=>'template', - defaultValue=>'ZipArchiveTMPL00000001', - }, - } - }); - return $class->SUPER::definition($session,$definition); -} - - #------------------------------------------------------------------- =head2 fixFilenames ( ) @@ -170,7 +131,7 @@ sub fixFilenames { my $files = $storage->getFiles('all'); FILE: foreach my $file (@{ $files }) { my $extension = $storage->getFileExtension($file); - next FILE unless isIn($extension, qw/pl perl pm cgi php asp sh/); + next FILE unless $extension ~~ [qw/pl perl pm cgi php asp sh/]; my $newFile = $file; #$newFile =~ s/\.$extension$/_$extension.txt/; $newFile =~ s/\.$extension$/_$extension.txt/; @@ -186,31 +147,31 @@ See WebGUI::Asset::prepareView() for details. =cut -sub prepareView { +override prepareView => sub { my $self = shift; - $self->SUPER::prepareView(); - my $template = WebGUI::Asset::Template->new($self->session, $self->get("templateId")); + super(); + my $template = WebGUI::Asset::Template->newById($self->session, $self->get("templateId")); $template->prepare($self->getMetaDataAsTemplateVariables); $self->{_viewTemplate} = $template; -} +}; #------------------------------------------------------------------- -=head2 processPropertiesFromFormPost ( ) +=head2 processEditForm ( ) Used to process properties from the form posted. In this asset, we use this method to deflate the zip file into the proper folder =cut -sub processPropertiesFromFormPost { +override processEditForm => sub { my $self = shift; #File should be saved here by the superclass - $self->SUPER::processPropertiesFromFormPost; + super(); my $storage = $self->getStorageLocation(); - my $file = $self->get("filename"); + my $file = $self->filename; #return undef unless $file; my $i18n = WebGUI::International->new($self->session, 'Asset_ZipArchive'); @@ -228,10 +189,10 @@ sub processPropertiesFromFormPost { return undef; } - unless ($self->unzip($storage,$self->get("filename"))) { - $self->session->errorHandler->warn($i18n->get("unzip_error")); + unless ($self->unzip($storage,$self->filename)) { + $self->session->log->warn($i18n->get("unzip_error")); } -} +}; #------------------------------------------------------------------- @@ -245,52 +206,35 @@ used to show the file to administrators. sub view { my $self = shift; - if (!$self->session->var->isAdminOn && $self->get("cacheTimeout") > 10) { - my $cache = $self->getCache; - my $out = $cache->get if defined $cache; + my $cache = $self->session->cache; + my $cacheKey = $self->getWwwCacheKey('view'); + if (!$self->session->isAdminOn && $self->cacheTimeout > 10) { + my $out = $cache->get( $cacheKey ); return $out if $out; } my %var = %{$self->get}; - #$self->session->errorHandler->warn($self->getId); + #$self->session->log->warn($self->getId); $var{controls} = $self->getToolbar; if($self->session->scratch->get("za_error")) { $var{error} = $self->session->scratch->get("za_error"); } $self->session->scratch->delete("za_error"); my $storage = $self->getStorageLocation; - if($self->get("filename") ne "") { - $var{fileUrl} = $storage->getUrl($self->get("showPage")); - $var{fileIcon} = $storage->getFileIconUrl($self->get("showPage")); + if($self->filename ne "") { + $var{fileUrl} = $storage->getUrl($self->showPage); + $var{fileIcon} = $storage->getFileIconUrl($self->showPage); } - unless($self->get("showPage")) { + unless($self->showPage) { $var{pageError} = "true"; } my $i18n = WebGUI::International->new($self->session,"Asset_ZipArchive"); $var{noInitialPage} = $i18n->get('noInitialPage'); $var{noFileSpecified} = $i18n->get('noFileSpecified'); my $out = $self->processTemplate(\%var,undef,$self->{_viewTemplate}); - if (!$self->session->var->isAdminOn && $self->get("cacheTimeout") > 10) { - WebGUI::Cache->new($self->session,"view_".$self->getId)->set($out,$self->get("cacheTimeout")); - } - return $out; -} - - -#------------------------------------------------------------------- - -=head2 www_edit ( ) - -Web facing method which is the default edit page - -=cut - -sub www_edit { - my $self = shift; - return $self->session->privilege->insufficient() unless $self->canEdit; - return $self->session->privilege->locked() unless $self->canEditIfLocked; - my $i18n = WebGUI::International->new($self->session, 'Asset_Wobject'); - my $addEdit = ($self->session->form->process("func") eq 'add') ? $i18n->get('add') : $i18n->get('edit'); - return $self->getAdminConsole->render($self->getEditForm->print, $self->addEditLabel); + if (!$self->session->isAdminOn && $self->cacheTimeout > 10) { + $cache->set( $cacheKey, $out, $self->cacheTimeout); + } + return $out; } #------------------------------------------------------------------- @@ -305,13 +249,14 @@ Web facing method which is the default view page. This method does a sub www_view { my $self = shift; return $self->session->privilege->noAccess() unless $self->canView; - if ($self->session->var->isAdminOn) { + if ($self->session->isAdminOn) { return $self->session->asset($self->getContainer)->www_view; } - $self->session->http->setRedirect($self->getFileUrl($self->getValue("showPage"))); + $self->session->response->setRedirect($self->getFileUrl($self->showPage)); return "1"; } +__PACKAGE__->meta->make_immutable; 1; diff --git a/lib/WebGUI/Asset/FilePile.pm b/lib/WebGUI/Asset/FilePile.pm deleted file mode 100644 index 1806e78c4..000000000 --- a/lib/WebGUI/Asset/FilePile.pm +++ /dev/null @@ -1,275 +0,0 @@ -package WebGUI::Asset::FilePile; - -=head1 LEGAL - - ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. - ------------------------------------------------------------------- - Please read the legal notices (docs/legal.txt) and the license - (docs/license.txt) that came with this distribution before using - this software. - ------------------------------------------------------------------- - http://www.plainblack.com info@plainblack.com - ------------------------------------------------------------------- - -=cut - -use strict; -use WebGUI::Asset; -use WebGUI::Asset::File; -use WebGUI::Asset::File::Image; -use WebGUI::SQL; -use WebGUI::Storage; -use WebGUI::TabForm; -use WebGUI::Utility; - -our @ISA = qw(WebGUI::Asset); - - -=head1 NAME - -Package WebGUI::Asset::FilePile - -=head1 DESCRIPTION - -Provides a mechanism to upload files to WebGUI. - -=head1 SYNOPSIS - -use WebGUI::Asset::FilePile; - -=head1 METHODS - -These methods are available from this class: - -=cut - -#------------------------------------------------------------------- - -=head2 edit - -Hand draw a form where users can upload multiple files at a time. - -=cut - -sub edit { - my $self = shift; - my $tabform = WebGUI::TabForm->new($self->session,); - if ($self->session->config->get("enableSaveAndCommit")) { - $tabform->submitAppend(WebGUI::Form::submit($self->session, { - name => "saveAndCommit", - value => WebGUI::International->new($self->session, 'Asset')->get("save and commit"), - })); - } - my $i18n = WebGUI::International->new($self->session, 'Asset_FilePile'); - $tabform->hidden({ - name=>"func", - value=>"add" - }); - $tabform->hidden({ - name=>"doit", - value=>"1" - }); - $tabform->hidden({ - name=>"class", - value=>"WebGUI::Asset::FilePile" - }); - if ($self->session->form->process("proceed")) { - $tabform->hidden({ - name=>"proceed", - value=>$self->session->form->process("proceed") - }); - } - $tabform->addTab("properties",$i18n->get("properties","Asset")); - $tabform->getTab("properties")->yesNo( - -name=>"isHidden", - -value=>1, - -label=>$i18n->get(886, 'Asset'), - -hoverHelp=>$i18n->get('886 description', 'Asset'), - -uiLevel=>6 - ); - $tabform->getTab("properties")->yesNo( - -name=>"newWindow", - -value=>0, - -label=>$i18n->get(940, 'Asset'), - -hoverHelp=>$i18n->get('940 description', 'Asset'), - -uiLevel=>6 - ); - $tabform->addTab("security",$i18n->get(107,"Asset"),6); - my $subtext; - if ($self->session->user->isAdmin) { - $subtext = $self->session->icon->manage('op=listUsers'); - } else { - $subtext = ""; - } - my $clause; - if ($self->session->user->isAdmin) { - my $group = WebGUI::Group->new($self->session,4); - my $contentManagers = $group->getAllUsers(); - push (@$contentManagers, $self->session->user->userId); - $clause = "userId in (".$self->session->db->quoteAndJoin($contentManagers).")"; - } else { - $clause = "userId=".$self->session->db->quote($self->get("ownerUserId")); - } - my $users = $self->session->db->buildHashRef("select userId,username from users where $clause order by username"); - $tabform->getTab("security")->selectBox( - -name=>"ownerUserId", - -options=>$users, - -label=>$i18n->get(108, 'Asset'), - -hoverHelp=>$i18n->get('108 description', 'Asset'), - -value=>[$self->get("ownerUserId")], - -subtext=>$subtext, - -uiLevel=>6 - ); - $tabform->getTab("security")->group( - -name=>"groupIdView", - -label=>$i18n->get(872, 'Asset'), - -hoverHelp=>$i18n->get('872 description', 'Asset'), - -value=>[$self->get("groupIdView")], - -uiLevel=>6 - ); - $tabform->getTab("security")->group( - -name=>"groupIdEdit", - -label=>$i18n->get(871, 'Asset'), - -hoverHelp=>$i18n->get('871 description', 'Asset'), - -value=>[$self->get("groupIdEdit")], - -excludeGroups=>[1,7], - -uiLevel=>6 - ); - $tabform->getTab("properties")->file( - -label=>$i18n->get("upload files"), - -hoverHelp=>$i18n->get("upload files description"), - -maxAttachments=>100 - ); - return $self->getAdminConsole->render($tabform->print,$i18n->get("add pile")); -} - -#------------------------------------------------------------------- - -=head2 editSave - -Upload files and create assets for each one. - -=cut - -sub editSave { - my $self = shift; - return $self->session->privilege->locked() unless $self->canEditIfLocked; - return $self->session->privilege->insufficient() unless $self->canEdit; - if ($self->session->config("maximumAssets")) { - my ($count) = $self->session->db->quickArray("select count(*) from asset"); - my $i18n = WebGUI::International->new($self->session, "Asset"); - return $self->session->style->userStyle($i18n->get("over max assets")) if ($self->session->config("maximumAssets") <= $count); - } - - ##This is a hack. File uploads should go through the WebGUI::Form::File API - my $tempFileStorageId = WebGUI::Form::File->new($self->session,{name => 'file'})->getValue; - my $tempStorage = WebGUI::Storage->get($self->session, $tempFileStorageId); - - foreach my $filename (@{$tempStorage->getFiles}) { - #my $storage = WebGUI::Storage->create($self->session); - #$storage->addFileFromFilesystem($tempStorage->getPath($filename)); - - #$storage->setPrivileges($self->getParent->get("ownerUserId"),$self->getParent->get("groupIdView"),$self->getParent->get("groupIdEdit")); - my %data; - my $selfName = 'WebGUI::Asset::File'; - $selfName = "WebGUI::Asset::File::Image" if ($tempStorage->isImage($filename)); - - foreach my $definition (@{$selfName->definition($self->session)}) { - foreach my $property (keys %{$definition->{properties}}) { - $data{$property} = $self->session->form->process( - $property, - $definition->{properties}{$property}{fieldType}, - $definition->{properties}{$property}{defaultValue} - ); - } - } - - $data{className} = $selfName; - #$data{storageId} = $storage->getId; - $data{filename} = $data{title} = $data{menuTitle} = $filename; - $data{templateId} = 'PBtmpl0000000000000024'; - if ($selfName eq "WebGUI::Asset::File::Image") { - $data{templateId} = 'PBtmpl0000000000000088'; - } - $data{url} = $self->getParent->get('url').'/'.$filename; - - #Create the new asset - my $newAsset = $self->getParent->addChild(\%data); - - #Get the current storage location - my $storage = $newAsset->getStorageLocation(); - $storage->addFileFromFilesystem($tempStorage->getPath($filename)); - $newAsset->applyConstraints; - - #Now remove the reference to the storeage location to prevent problems with different revisions. - delete $newAsset->{_storageLocation}; - - } - $tempStorage->delete; - - if (WebGUI::VersionTag->autoCommitWorkingIfEnabled($self->session, { - override => scalar $self->session->form->process("saveAndCommit"), - allowComments => 1, - returnUrl => $self->getUrl, - }) eq 'redirect') { - return undef; - }; - - return $self->getParent->www_manageAssets if ($self->session->form->process("proceed") eq "manageAssets"); - return $self->getParent->www_view; -} - -#------------------------------------------------------------------- - -=head2 getIcon - -Override the master class since FilePile does not use a definition subroutine. - -=cut - -sub getIcon { - my $self = shift; - my $small = shift; - if ($small) { - return $self->session->url->extras('assets/small/filePile.gif'); - } - return $self->session->url->extras('assets/filePile.gif'); -} - - -#------------------------------------------------------------------- - -=head2 getName - -Returns the displayable name of this asset. - -=cut - -sub getName { - my $self = shift; - my $i18n = WebGUI::International->new($self->session); - return $i18n->get('assetName',"Asset_FilePile"); -} - - - -#------------------------------------------------------------------- - -=head2 www_edit - -This method dispatches to edit, and editSave based on the form variable C - -=cut - -sub www_edit { - my $self = shift; - unless ($self->session->form->process("doit")) { - return $self->edit; - } else { - return $self->editSave; - } -} - -1; - diff --git a/lib/WebGUI/Asset/MapPoint.pm b/lib/WebGUI/Asset/MapPoint.pm index 413bee2fd..b48bdfe27 100644 --- a/lib/WebGUI/Asset/MapPoint.pm +++ b/lib/WebGUI/Asset/MapPoint.pm @@ -3,7 +3,7 @@ package WebGUI::Asset::MapPoint; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -15,16 +15,120 @@ package WebGUI::Asset::MapPoint; =cut use strict; -use Tie::IxHash; -use base 'WebGUI::Asset'; -use WebGUI::Utility; +use Moose; +use WebGUI::Definition::Asset; use Geo::Coder::Googlev3; -use Data::Dumper; - -# To get an installer for your wobject, add the Installable AssetAspect -# See WebGUI::AssetAspect::Installable and sbin/installClass.pl for more -# details +extends 'WebGUI::Asset'; +define assetName => ['assetName', 'Asset_MapPoint']; +define icon => 'mappoint.png'; +define tableName => 'MapPoint'; +property latitude => ( + tab => "properties", + fieldType => "float", + label => ["latitude label", 'Asset_MapPoint'], + hoverHelp => ["latitude description", 'Asset_MapPoint'], + ); +property longitude => ( + tab => "properties", + fieldType => "float", + label => ["longitude label", 'Asset_MapPoint'], + hoverHelp => ["longitude description", 'Asset_MapPoint'], + ); +property website => ( + tab => "properties", + fieldType => "text", + label => ["website label", 'Asset_MapPoint'], + hoverHelp => ["website description", 'Asset_MapPoint'], + ); +property address1 => ( + tab => "properties", + fieldType => "text", + label => ["address1 label", 'Asset_MapPoint'], + hoverHelp => ["address1 description", 'Asset_MapPoint'], + ); +property address2 => ( + tab => "properties", + fieldType => "text", + label => ["address2 label", 'Asset_MapPoint'], + hoverHelp => ["address2 description", 'Asset_MapPoint'], + ); +property city => ( + tab => "properties", + fieldType => "text", + label => ["city label", 'Asset_MapPoint'], + hoverHelp => ["city description", 'Asset_MapPoint'], + ); +property region => ( + tab => "properties", + fieldType => "text", + label => ["state label", 'Asset_MapPoint'], + hoverHelp => ["state description", 'Asset_MapPoint'], + ); +property zipCode => ( + tab => "properties", + fieldType => "text", + label => ["zipCode label", 'Asset_MapPoint'], + hoverHelp => ["zipCode description", 'Asset_MapPoint'], + ); +property country => ( + tab => "properties", + fieldType => "country", + label => ["country label", 'Asset_MapPoint'], + hoverHelp => ["country description", 'Asset_MapPoint'], + ); +property phone => ( + tab => "properties", + fieldType => "phone", + label => ["phone label", 'Asset_MapPoint'], + hoverHelp => ["phone description", 'Asset_MapPoint'], + ); +property fax => ( + tab => "properties", + fieldType => "phone", + label => ["fax label", 'Asset_MapPoint'], + hoverHelp => ["fax description", 'Asset_MapPoint'], + ); +property email => ( + tab => "properties", + fieldType => "email", + label => ["email label", 'Asset_MapPoint'], + hoverHelp => ["email description", 'Asset_MapPoint'], + ); +property storageIdPhoto => ( + tab => "properties", + fieldType => "image", + forceImageOnly => 1, + label => ["storageIdPhoto label", 'Asset_MapPoint'], + hoverHelp => ["storageIdPhoto description", 'Asset_MapPoint'], + noFormPost => 1, + ); +property userDefined1 => ( + fieldType => "hidden", + noFormPost => 1, + ); +property userDefined2 => ( + fieldType => "hidden", + noFormPost => 1, + ); +property userDefined3 => ( + fieldType => "hidden", + noFormPost => 1, + ); +property userDefined4 => ( + fieldType => "hidden", + noFormPost => 1, + ); +property userDefined5 => ( + fieldType => "hidden", + noFormPost => 1, + ); +property isGeocoded => ( + fieldType => "yesNo", + tab => "properties", + label => ["isGeocoded label",'Asset_MapPoint'], + hoverHelp => ["isGeocoded description",'Asset_MapPoint'], + ); =head1 NAME @@ -47,141 +151,6 @@ These methods are available from this class: #------------------------------------------------------------------- -=head2 definition ( session, definition ) - -defines asset properties for New Asset instances. You absolutely need -this method in your new Assets. - -=head3 session - -=head3 definition - -A hash reference passed in from a subclass definition. - -=cut - -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift; - my $i18n = WebGUI::International->new( $session, "Asset_MapPoint" ); - tie my %properties, 'Tie::IxHash', ( - latitude => { - tab => "properties", - fieldType => "float", - label => $i18n->get("latitude label"), - hoverHelp => $i18n->get("latitude description"), - }, - longitude => { - tab => "properties", - fieldType => "float", - label => $i18n->get("longitude label"), - hoverHelp => $i18n->get("longitude description"), - }, - website => { - tab => "properties", - fieldType => "text", - label => $i18n->get("website label"), - hoverHelp => $i18n->get("website description"), - }, - address1 => { - tab => "properties", - fieldType => "text", - label => $i18n->get("address1 label"), - hoverHelp => $i18n->get("address1 description"), - }, - address2 => { - tab => "properties", - fieldType => "text", - label => $i18n->get("address2 label"), - hoverHelp => $i18n->get("address2 description"), - }, - city => { - tab => "properties", - fieldType => "text", - label => $i18n->get("city label"), - hoverHelp => $i18n->get("city description"), - }, - region => { - tab => "properties", - fieldType => "text", - label => $i18n->get("state label"), - hoverHelp => $i18n->get("state description"), - }, - zipCode => { - tab => "properties", - fieldType => "text", - label => $i18n->get("zipCode label"), - hoverHelp => $i18n->get("zipCode description"), - }, - country => { - tab => "properties", - fieldType => "country", - label => $i18n->get("country label"), - hoverHelp => $i18n->get("country description"), - }, - phone => { - tab => "properties", - fieldType => "phone", - label => $i18n->get("phone label"), - hoverHelp => $i18n->get("phone description"), - }, - fax => { - tab => "properties", - fieldType => "phone", - label => $i18n->get("fax label"), - hoverHelp => $i18n->get("fax description"), - }, - email => { - tab => "properties", - fieldType => "email", - label => $i18n->get("email label"), - hoverHelp => $i18n->get("email description"), - }, - storageIdPhoto => { - tab => "properties", - fieldType => "image", - forceImageOnly => 1, - label => $i18n->get("storageIdPhoto label"), - hoverHelp => $i18n->get("storageIdPhoto description"), - noFormPost => 1, - }, - isGeocoded => { - fieldType => "yesNo", - tab => "properties", - label => $i18n->get("isGeocoded label"), - hoverHelp => $i18n->get("isGeocoded description"), - }, - userDefined1 => { - fieldType => "hidden", - }, - userDefined2 => { - fieldType => "hidden", - }, - userDefined3 => { - fieldType => "hidden", - }, - userDefined4 => { - fieldType => "hidden", - }, - userDefined5 => { - fieldType => "hidden", - }, - ); - - push @{$definition}, { - assetName => $i18n->get('assetName'), - icon => 'mappoint.png', - autoGenerateForms => 1, - tableName => 'MapPoint', - className => 'WebGUI::Asset::MapPoint', - properties => \%properties, - }; - return $class->SUPER::definition( $session, $definition ); -} ## end sub definition - -#------------------------------------------------------------------- - =head2 canEdit ( [userId] ) Returns true if the user can edit this MapPoint. Only the owner or the @@ -189,12 +158,13 @@ group to edit the parent Map are allowed to edit MapPoint. =cut -sub canEdit { +around canEdit => sub { + my $orig = shift; my $self = shift; my $userId = shift || $self->session->user->userId; - return 1 if $userId eq $self->get('ownerUserId'); - return $self->SUPER::canEdit( $userId ); -} + return 1 if $userId eq $self->ownerUserId; + return $self->$orig( $userId ); +}; #------------------------------------------------------------------- @@ -206,7 +176,7 @@ Get the workflowId to commit this MapPoint sub getAutoCommitWorkflowId { my ( $self ) = @_; - return $self->getParent->get('workflowIdPoint'); + return $self->getParent->workflowIdPoint; } #------------------------------------------------------------------- @@ -240,7 +210,7 @@ sub getMapInfo { $var->{ assetId } = $self->getId; my @keys = qw( latitude longitude title userDefined1 userDefined2 userDefined3 userDefined4 userDefined5 isGeocoded ); for my $key ( @keys ) { - $var->{ $key } = $self->get( $key ); + $var->{ $key } = $self->$key; } # Get permissions @@ -296,23 +266,23 @@ sub getTemplateVarsEditForm { $var->{ form_header } = WebGUI::Form::formHeader( $session ) - . WebGUI::Form::hidden( $session, { + . WebGUI::Form::Hidden->new( $session, { name => 'func', value => 'ajaxEditPointSave', - } ) - . WebGUI::Form::hidden( $session, { + } )->toHtml + . WebGUI::Form::Hidden->new( $session, { name => 'assetId', value => $self->getId, defaultValue => 'new', - } ) - . WebGUI::Form::hidden( $session, { + } )->toHtml + . WebGUI::Form::Hidden->new( $session, { name => 'latitude', - value => $self->get('latitude'), - } ) - . WebGUI::Form::hidden( $session, { + value => $self->latitude, + } )->toHtml + . WebGUI::Form::Hidden->new( $session, { name => 'longitude', - value => $self->get('longitude'), - } ) + value => $self->longitude, + } )->toHtml ; $var->{ form_footer } = WebGUI::Form::formFooter( $session ); @@ -321,52 +291,50 @@ sub getTemplateVarsEditForm { } ); # Stuff from this class's definition - my $definition = __PACKAGE__->definition($session)->[0]->{properties}; - for my $key ( keys %{$definition} ) { - next if $definition->{$key}->{noFormPost}; + foreach my $key ( $self->getProperties ) { + my $fieldHash = $self->getFieldData( $key ); + next if $fieldHash->{noFormPost}; next if $key eq 'latitude' || $key eq 'longitude'; - $definition->{$key}->{name} = $key; - $definition->{$key}->{value} = $self->getValue($key); $var->{ "form_$key" } - = WebGUI::Form::dynamicField( $session, %{$definition->{$key}} ); + = WebGUI::Form::dynamicField( $session, $fieldHash ); } # Stuff from Asset $var->{ "form_title" } - = WebGUI::Form::text( $session, { + = WebGUI::Form::Text->new( $session, { name => "title", - value => $self->get("title"), - } ); + value => $self->title, + } )->toHtml; $var->{ "form_synopsis" } - = WebGUI::Form::textarea( $session, { + = WebGUI::Form::Textarea->new( $session, { name => "synopsis", - value => $self->get("synopsis"), + value => $self->synopsis, resizable => 0, - } ); + } )->toHtml; #Only allow people who can edit the parent to change isHidden if($var->{'can_edit_map'}) { my $isHidden = (defined $self->get("isHidden")) ? $self->get("isHidden") : 1; $var->{ "form_isHidden" } - = WebGUI::Form::yesNo( $session, { + = WebGUI::Form::YesNo->toHtml( $session, { name => "isHidden", value => $isHidden, - } ); + } )->toHtml; } my $isGeocoded = ( $self->getId ) ? $self->get("isGeocoded") : 1; $var->{"form_isGeocoded"} - = WebGUI::Form::checkbox( $session, { + = WebGUI::Form::Checkbox->new( $session, { name => "isGeocoded", value => 1, checked => $isGeocoded - } ); + } )->toHtml; # Fix storageIdPhoto because scripts do not get executed in ajax requests $var->{ "form_storageIdPhoto" } = ''; - if ( $self->get('storageIdPhoto') ) { - my $storage = WebGUI::Storage->get( $self->session, $self->get('storageIdPhoto') ); + if ( $self->storageIdPhoto ) { + my $storage = WebGUI::Storage->get( $self->session, $self->storageIdPhoto ); $var->{ "currentPhoto" } = sprintf '', $storage->getUrl($storage->getFiles->[0]); } @@ -382,9 +350,9 @@ Indexing the content of attachments and user defined fields. See WebGUI::Asset:: =cut -sub indexContent { +override indexContent => sub { my $self = shift; - my $indexer = $self->SUPER::indexContent; + my $indexer = super(); $indexer->addKeywords($self->get("website")); $indexer->addKeywords($self->get("address1")); $indexer->addKeywords($self->get("address2")); @@ -401,7 +369,7 @@ sub indexContent { $indexer->addKeywords($self->get("userDefined4")); $indexer->addKeywords($self->get("userDefined5")); return $indexer; -} +}; #------------------------------------------------------------------- @@ -419,9 +387,8 @@ sub processAjaxEditForm { my $prop = {}; # Stuff from this class's definition - my $definition = __PACKAGE__->definition($session)->[0]->{properties}; - for my $key ( keys %{$definition} ) { - my $field = $definition->{$key}; + for my $key ( $self->getProperties ) { + my $field = $self->getFieldData( $key ); next if $field->{noFormPost}; $prop->{$key} = $form->get($key,$field->{fieldType},$field->{defaultValue},$field); @@ -462,8 +429,8 @@ sub processAjaxEditForm { # Photo magic if ( $form->get('storageIdPhoto') ) { my $storage; - if ( $self->get('storageIdPhoto') ) { - $storage = WebGUI::Storage->get( $session, $self->get('storageIdPhoto') ); + if ( $self->storageIdPhoto ) { + $storage = WebGUI::Storage->get( $session, $self->storageIdPhoto ); $storage->deleteFile( $storage->getFiles->[0] ); } else { @@ -503,13 +470,13 @@ so that this point is automatically shown. sub www_view { my $self = shift; - $self->session->http->setRedirect( + $self->session->response->setRedirect( $self->getParent->getUrl('focusOn=' . $self->getId ) ); return "redirect"; } - +__PACKAGE__->meta->make_immutable; 1; #vim:ft=perl diff --git a/lib/WebGUI/Asset/MatrixListing.pm b/lib/WebGUI/Asset/MatrixListing.pm index 1ffd68b65..59a5a4a9a 100644 --- a/lib/WebGUI/Asset/MatrixListing.pm +++ b/lib/WebGUI/Asset/MatrixListing.pm @@ -3,7 +3,7 @@ package WebGUI::Asset::MatrixListing; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -16,10 +16,107 @@ package WebGUI::Asset::MatrixListing; use strict; use Tie::IxHash; -use Class::C3; -use base qw(WebGUI::AssetAspect::Comments WebGUI::Asset); -use WebGUI::Utility; +use Moose; +use WebGUI::Definition::Asset; +extends 'WebGUI::Asset'; +define assetName => ['assetName', 'Asset_MatrixListing']; +define tableName => 'MatrixListing'; +property screenshots => ( + tab => "properties", + fieldType => "image", + default => undef, + maxAttachments => 20, + label => ["screenshots label", 'Asset_MatrixListing'], + hoverHelp => ["screenshots description", 'Asset_MatrixListing'], + ); +property description => ( + tab => "properties", + fieldType => "HTMLArea", + default => undef, + label => ["description label", 'Asset_MatrixListing'], + hoverHelp => ["description description", 'Asset_MatrixListing'], + ); +property version => ( + tab => "properties", + fieldType => "text", + default => undef, + label => ["version label", 'Asset_MatrixListing'], + hoverHelp => ["version description", 'Asset_MatrixListing'], + ); +property score => ( + fieldType => 'integer', + default => 0, + noFormPost => 1, + ); +property views => ( + fieldType => 'integer', + default => 0, + noFormPost => 1, + ); +property compares => ( + fieldType => 'integer', + default => 0, + noFormPost => 1, + ); +property clicks => ( + fieldType => 'integer', + default => 0, + noFormPost => 1, + ); +property viewsLastIp => ( + fieldType => 'text', + default => undef, + noFormPost => 1, + ); +property comparesLastIp => ( + fieldType => 'text', + default => undef, + noFormPost => 1, + ); +property clicksLastIp => ( + fieldType => 'text', + default => undef, + noFormPost => 1, + ); +property maintainer => ( + tab => "properties", + fieldType => "user", + builder => '_maintainer_default', + lazy => 1, + label => ["maintainer label", 'Asset_MatrixListing'], + hoverHelp => ["maintainer description", 'Asset_MatrixListing'], + ); +sub _maintainer_default { + return shift->session->user->userId; +} +property manufacturerName => ( + tab => "properties", + fieldType => "text", + default => undef, + label => ["manufacturerName label", 'Asset_MatrixListing'], + hoverHelp => ["manufacturerName description", 'Asset_MatrixListing'] + ); +property manufacturerURL => ( + tab => "properties", + fieldType => "url", + default => undef, + label => ["manufacturerURL label", 'Asset_MatrixListing'], + hoverHelp => ["manufacturerURL description", 'Asset_MatrixListing'] + ); +property productURL => ( + tab => "properties", + fieldType => "url", + default => undef, + label => ["productURL label", 'Asset_MatrixListing'], + hoverHelp => ["productURL description", 'Asset_MatrixListing'] + ); +property lastUpdated => ( + default => sub { time() }, + noFormPost => 1, + fieldType => 'hidden', + ); +with 'WebGUI::Role::Asset::Comments'; =head1 NAME @@ -41,23 +138,6 @@ These methods are available from this class: =cut - - -#------------------------------------------------------------------- - -=head2 addRevision - - This method exists for demonstration purposes only. The superclass - handles revisions to MatrixListing Assets. - -=cut - -sub addRevision { - my $self = shift; - my $newSelf = $self->next::method(@_); - return $newSelf; -} - #---------------------------------------------------------------------------- =head2 canAdd ( ) @@ -97,145 +177,6 @@ sub canEdit { #------------------------------------------------------------------- -=head2 definition ( session, definition ) - -defines asset properties for MatrixListing instances. - -=head3 session - -=head3 definition - -A hash reference passed in from a subclass definition. - -=cut - -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift; - my %properties; - tie %properties, 'Tie::IxHash'; - my $i18n = WebGUI::International->new($session, "Asset_MatrixListing"); - %properties = ( - screenshots => { - tab =>"properties", - fieldType =>"image", - defaultValue =>undef, - maxAttachments =>20, - label =>$i18n->get("screenshots label"), - hoverHelp =>$i18n->get("screenshots description") - }, - description => { - tab =>"properties", - fieldType =>"HTMLArea", - defaultValue =>undef, - label =>$i18n->get("description label"), - hoverHelp =>$i18n->get("description description") - }, - version => { - tab =>"properties", - fieldType =>"text", - defaultValue =>undef, - label =>$i18n->get("version label"), - hoverHelp =>$i18n->get("version description") - }, - score => { - defaultValue =>0, - autoGenerate =>0, - noFormPost =>1, - }, - views => { - defaultValue =>0, - autoGenerate =>0, - noFormPost =>1, - }, - compares => { - defaultValue =>0, - autoGenerate =>0, - noFormPost =>1, - }, - clicks => { - defaultValue =>0, - autoGenerate =>0, - noFormPost =>1, - }, - viewsLastIp => { - defaultValue =>undef, - autoGenerate =>0, - noFormPost =>1, - }, - comparesLastIp => { - defaultValue =>undef, - autoGenerate =>0, - noFormPost =>1, - }, - clicksLastIp => { - defaultValue =>undef, - autoGenerate =>0, - noFormPost =>1, - }, - maintainer => { - tab =>"properties", - fieldType =>"user", - defaultValue =>$session->user->userId, - label =>$i18n->get("maintainer label"), - hoverHelp =>$i18n->get("maintainer description") - }, - manufacturerName => { - tab =>"properties", - fieldType =>"text", - defaultValue =>undef, - label =>$i18n->get("manufacturerName label"), - hoverHelp =>$i18n->get("manufacturerName description") - }, - manufacturerURL => { - tab =>"properties", - fieldType =>"url", - defaultValue =>undef, - label =>$i18n->get("manufacturerURL label"), - hoverHelp =>$i18n->get("manufacturerURL description") - }, - productURL => { - tab =>"properties", - fieldType =>"url", - defaultValue =>undef, - label =>$i18n->get("productURL label"), - hoverHelp =>$i18n->get("productURL description") - }, - lastUpdated => { - defaultValue =>time(), - fieldType =>'hidden', - }, - ); - push(@{$definition}, { - assetName=>$i18n->get('assetName'), - autoGenerateForms=>1, - tableName=>'MatrixListing', - className=>'WebGUI::Asset::MatrixListing', - properties=>\%properties - }); - return $class->next::method($session, $definition); -} - - -#------------------------------------------------------------------- - -=head2 duplicate - - This method exists for demonstration purposes only. The superclass - handles duplicating MatrixListing Assets. This method will be called - whenever a copy action is executed - -=cut - -sub duplicate { - my $self = shift; - my $newAsset = $self->next::method(@_); - return $newAsset; -} - -#------------------------------------------------------------------- - =head2 getAutoCommitWorkflowId Gets the WebGUI::VersionTag workflow to use to automatically commit MatrixListings. @@ -256,7 +197,7 @@ sub getAutoCommitWorkflowId { =head2 getEditForm ( ) -Returns the TabForm object that will be used in generating the edit page for this asset. +Returns the FormBuilder object that will be used in generating the edit page for this asset. =cut @@ -268,48 +209,55 @@ sub getEditForm { my $i18n = WebGUI::International->new($session, 'Asset_MatrixListing'); my $func = $session->form->process("func"); - my $form = WebGUI::HTMLForm->new($session); - - if ($func eq "add" || ( $func eq "editSave" && $session->form->process("assetId") eq "new")) { - $form->hidden( - -name =>'assetId', - -value =>'new', + my $form = WebGUI::FormBuilder->new($session, action => $self->getParent->getUrl, ); + + if ($func eq "add" || ( $func eq "addSave" && $session->form->process("assetId") eq "new")) { + $form->addField( "hidden", + name => 'assetId', + value => 'new', ); - $form->hidden( - -name =>'class', - -value =>'WebGUI::Asset::MatrixListing', + $form->addField( "hidden", + name => 'className', + value => 'WebGUI::Asset::MatrixListing', + ); + $form->addField( "hidden", + name =>'func', + value =>'addSave', ); } - $form->hidden( - -name =>'func', - -value =>'editSave', + else { + $form->addField( "hidden", + name =>'func', + value =>'editSave', ); - $form->text( - -name =>'title', - -defaultValue =>'Untitled', - -label =>$i18n->get("product name label"), - -hoverHelp =>$i18n->get('product name description'), - -value =>$self->getValue('title'), + } + $form->addField( "text", + name =>'title', + defaultValue =>'Untitled', + label =>$i18n->get("product name label"), + hoverHelp =>$i18n->get('product name description'), + value =>$self->title, + ); + + $form->addField( "image", + name =>'screenshots', + defaultValue =>undef, + maxAttachments =>20, + label =>$i18n->get("screenshots label"), + hoverHelp =>$i18n->get("screenshots description"),, + value =>$self->screenshots, ); - $form->image( - -name =>'screenshots', - -defaultValue =>undef, - -maxAttachments =>20, - -label =>$i18n->get("screenshots label"), - -hoverHelp =>$i18n->get("screenshots description"),, - -value =>$self->getValue('screenshots'), - ); - $form->HTMLArea( - -name =>'description', - -defaultValue =>undef, - -label =>$i18n->get("description label"), - -hoverHelp =>$i18n->get("description description"), - -value =>$self->getValue('description'), + $form->addField( "HTMLArea", + name =>'description', + defaultValue =>undef, + label =>$i18n->get("description label"), + hoverHelp =>$i18n->get("description description"), + value =>$self->description, ); if ($self->getParent->canEdit) { - $form->user( + $form->addField( "user", name =>"ownerUserId", - value =>$self->getValue('ownerUserId'), + value =>$self->ownerUserId, label =>$i18n->get('maintainer label'), hoverHelp =>$i18n->get('maintainer description'), ); @@ -322,42 +270,42 @@ sub getEditForm { else{ $userId = $self->get('ownerUserId'); } - $form->hidden( - -name =>'ownerUserId', - -value =>$userId, + $form->addField( "hidden", + name =>'ownerUserId', + value =>$userId, ); } - $form->text( - -name =>'version', - -defaultValue =>undef, - -label =>$i18n->get("version label"), - -hoverHelp =>$i18n->get("version description"), - -value =>$self->getValue('version'), + $form->addField( "text", + name =>'version', + defaultValue =>undef, + label =>$i18n->get("version label"), + hoverHelp =>$i18n->get("version description"), + value =>$self->version, ); - $form->text( - -name =>'manufacturerName', - -defaultValue =>undef, - -label =>$i18n->get("manufacturerName label"), - -hoverHelp =>$i18n->get("manufacturerName description"), - -value =>$self->getValue('manufacturerName'), + $form->addField( "text", + name =>'manufacturerName', + defaultValue =>undef, + label =>$i18n->get("manufacturerName label"), + hoverHelp =>$i18n->get("manufacturerName description"), + value =>$self->manufacturerName, ); - $form->url( - -name =>'manufacturerURL', - -defaultValue =>undef, - -label =>$i18n->get("manufacturerURL label"), - -hoverHelp =>$i18n->get("manufacturerURL description"), - -value =>$self->getValue('manufacturerURL'), + $form->addField( "url", + name =>'manufacturerURL', + defaultValue =>undef, + label =>$i18n->get("manufacturerURL label"), + hoverHelp =>$i18n->get("manufacturerURL description"), + value =>$self->manufacturerURL, ); - $form->url( - -name =>'productURL', - -defaultValue =>undef, - -label =>$i18n->get("productURL label"), - -hoverHelp =>$i18n->get("productURL description"), - -value =>$self->getValue('productURL'), + $form->addField( "url", + name =>'productURL', + defaultValue =>undef, + label =>$i18n->get("productURL label"), + hoverHelp =>$i18n->get("productURL description"), + value =>$self->productURL, ); foreach my $category (keys %{$self->getParent->getCategories}) { - $form->raw(''.$category.''); + my $fieldset = $form->addFieldset( name => $category, label => $category ); my $attributes = $db->read("select * from Matrix_attribute where category = ? and assetId = ?", [$category,$matrixId]); while (my $attribute = $attributes->hashRef) { @@ -377,25 +325,43 @@ sub getEditForm { $attribute->{options} = \%options; $attribute->{extras} = "style='width:120px'"; } - $form->dynamicField(%{$attribute}); + $fieldset->addField( delete $attribute->{fieldType}, %{$attribute}); } } - $form->raw( - ''. - WebGUI::Form::Submit($session, {}). - WebGUI::Form::Button($session, { - -value => $i18n->get('cancel', 'WebGUI'), - -extras => q|onclick="history.go(-1);" class="backwardButton"| - }). - '' - ); + my $buttons = $form->addField( "ButtonGroup", name => "saveButtons", rowClass => "saveButtons" ); + $buttons->addButton( "Submit", { name => "send", }); + $buttons->addButton( "Button", { + name => "cancel", + value => $i18n->get('cancel', 'WebGUI'), + extras => q{onclick="history.go(-1);" class="backwardButton"}, + } ); return $form; } #------------------------------------------------------------------- +=head2 getEditTemplate ( ) + +Override the base method to get the template from the parent Matrix asset. + +=cut + +sub getEditTemplate { + my $self = shift; + my $var = $self->get; + my $matrix = $self->getParent; + my $template = eval { WebGUI::Asset->newById($self->session, $matrix->get('editListingTemplateId')); }; + # TODO: Change to FormBuilder + $var->{form} = $self->getEditForm->toHtml; + $template->setParam(%{ $var }); + $template->style($matrix->getStyleTemplateId); + return $template; +} + +#------------------------------------------------------------------- + =head2 hasRated ( ) Returns whether the user has already rated this listing or not. @@ -408,7 +374,7 @@ sub hasRated { my $hasRated = $self->session->db->quickScalar("select count(*) from MatrixListing_rating where ((userId=? and userId<>'1') or (userId='1' and ipAddress=?)) and listingId=?", - [$session->user->userId,$session->env->get("HTTP_X_FORWARDED_FOR"),$self->getId]); + [$session->user->userId,$session->request->env->{"HTTP_X_FORWARDED_FOR"}, $self->getId]); return $hasRated; } @@ -430,7 +396,7 @@ sub incrementCounter { my $db = $self->session->db; my $counter = shift; - my $currentIp = $self->session->env->get("HTTP_X_FORWARDED_FOR"); + my $currentIp = $self->session->request->env->{"HTTP_X_FORWARDED_FOR"}; unless ($self->get($counter."LastIp") && ($self->get($counter."LastIp") eq $currentIp)) { $self->update({ @@ -449,12 +415,13 @@ Making private. See WebGUI::Asset::indexContent() for additonal details. =cut -sub indexContent { +around indexContent => sub { + my $orig = shift; my $self = shift; - my $indexer = $self->next::method; + my $indexer = $self->$orig(@_); $indexer->setIsPublic(0); return undef; -} +}; #------------------------------------------------------------------- @@ -468,7 +435,7 @@ See WebGUI::Asset::prepareView() for details. sub prepareView { my $self = shift; $self->next::method(); - my $template = WebGUI::Asset::Template->new($self->session, $self->getParent->get('detailTemplateId')); + my $template = WebGUI::Asset::Template->newById($self->session, $self->getParent->get('detailTemplateId')); $template->prepare; $self->{_viewTemplate} = $template; return undef; @@ -477,13 +444,13 @@ sub prepareView { #------------------------------------------------------------------- -=head2 processPropertiesFromFormPost ( ) +=head2 processEditForm ( ) Used to process properties from the form posted. =cut -sub processPropertiesFromFormPost { +sub processEditForm { my $self = shift; my $session = $self->session; my $score = 0; @@ -550,7 +517,7 @@ purges it's data. =cut -sub purge { +override purge => sub { my $self = shift; my $db = $self->session->db; @@ -558,21 +525,8 @@ sub purge { $db->write("delete from MatrixListing_rating where listingId=?" ,[$self->getId]); $db->write("delete from MatrixListing_ratingSummary where listingId=?" ,[$self->getId]); - return $self->next::method; -} - -#------------------------------------------------------------------- - -=head2 purgeRevision ( ) - -This method is called when data is purged by the system. - -=cut - -sub purgeRevision { - my $self = shift; - return $self->next::method; -} + return super(); +}; #------------------------------------------------------------------- @@ -598,13 +552,13 @@ sub setRatings { $db->write("insert into MatrixListing_rating (userId, category, rating, timeStamp, listingId, ipAddress, assetId) values (?,?,?,?,?,?,?)", [$session->user->userId,$category,$ratings->{$category},time(),$self->getId, - $session->env->get("HTTP_X_FORWARDED_FOR"),$matrixId]); + $session->request->env->{"HTTP_X_FORWARDED_FOR"}, $matrixId]); } my $sql = "from MatrixListing_rating where listingId=? and category=?"; my $sum = $db->quickScalar("select sum(rating) $sql", [$self->getId,$category]); my $count = $db->quickScalar("select count(*) $sql", [$self->getId,$category]); - my $half = round($count/2); + my $half = sprintf('%.0f', $count/2); my $mean = $sum / ($count || 1); my $median = $db->quickScalar("select rating $sql order by rating limit $half,1",[$self->getId,$category]); @@ -690,18 +644,12 @@ sub view { $var->{productUrl_click} .= ';revision='.$revisionDate; } - $self->session->style->setScript($self->session->url->extras('yui/build/utilities/utilities.js'), - {type => 'text/javascript'}); - $self->session->style->setScript($self->session->url->extras('yui/build/datasource/datasource-min.js'), - {type => 'text/javascript'}); - $self->session->style->setScript($self->session->url->extras('yui/build/datatable/datatable-min.js'), - {type =>'text/javascript'}); - $self->session->style->setScript($self->session->url->extras('yui/build/button/button-min.js'), - {type =>'text/javascript'}); - $self->session->style->setScript($self->session->url->extras('yui/build/json/json-min.js'), - {type => 'text/javascript'}); - $self->session->style->setLink($self->session->url->extras('yui/build/datatable/assets/skins/sam/datatable.css'), - {type =>'text/css', rel=>'stylesheet'}); + $self->session->style->setScript($self->session->url->extras('yui/build/utilities/utilities.js')); + $self->session->style->setScript($self->session->url->extras('yui/build/datasource/datasource-min.js')); + $self->session->style->setScript($self->session->url->extras('yui/build/datatable/datatable-min.js')); + $self->session->style->setScript($self->session->url->extras('yui/build/button/button-min.js')); + $self->session->style->setScript($self->session->url->extras('yui/build/json/json-min.js')); + $self->session->style->setCss($self->session->url->extras('yui/build/datatable/assets/skins/sam/datatable.css')); # Attributes @@ -816,7 +764,7 @@ sub view { $mailForm->email( -extras =>'class="content"', -name =>"from", - -value =>$session->user->profileField("email"), + -value =>$session->user->get("email"), -label =>$i18n->get('your email label'), ); $mailForm->selectBox( @@ -863,10 +811,10 @@ sub www_click { $self->incrementCounter('clicks'); if ($session->form->process("manufacturer")) { - $session->http->setRedirect( $self->get('manufacturerURL') ); + $session->response->setRedirect( $self->get('manufacturerURL') ); } else { - $session->http->setRedirect( $self->get('productURL') ); + $session->response->setRedirect( $self->get('productURL') ); } return undef; } @@ -891,32 +839,6 @@ sub www_deleteStickied { #------------------------------------------------------------------- -=head2 www_edit ( ) - -Web facing method which is the default edit page - -=cut - -sub www_edit { - my $self = shift; - my $i18n = WebGUI::International->new($self->session, "Asset_MatrixListing"); - - if($self->session->form->process('func') eq 'add'){ - return $self->session->privilege->noAccess() unless $self->getParent->canAddMatrixListing(); - }else{ - return $self->session->privilege->insufficient() unless $self->canEdit; - return $self->session->privilege->locked() unless $self->canEditIfLocked; - } - - my $var = $self->get; - my $matrix = $self->getParent; - $var->{form} = $self->getEditForm->print; - - return $matrix->processStyle($self->processTemplate($var,$matrix->get("editListingTemplateId"))); -} - -#------------------------------------------------------------------- - =head2 www_getAttributes ( ) Gets a listings attributes grouped by category as json. @@ -931,7 +853,7 @@ sub www_getAttributes { return $session->privilege->noAccess() unless $self->canView; - $session->http->setMimeType("application/json"); + $session->response->content_type("application/json"); my @results; my @categories = keys %{$self->getParent->getCategories}; @@ -978,7 +900,7 @@ sub www_getScreenshots { return $self->session->privilege->noAccess() unless $self->canView; - $self->session->http->setMimeType('text/xml'); + $self->session->response->content_type('text/xml'); my $xml = qq | @@ -1004,7 +926,7 @@ sub www_getScreenshots { ".$storage->getUrl($thumb)." ".$width." ".$height." - + "; } } @@ -1032,7 +954,7 @@ sub www_getScreenshotsConfig { return $self->session->privilege->noAccess() unless $self->canView; - $self->session->http->setMimeType('text/xml'); + $self->session->response->content_type('text/xml'); return $self->processTemplate($var,$self->getParent->get("screenshotsConfigTemplateId")); } @@ -1094,7 +1016,7 @@ sub www_sendEmail { if ($form->process("body") ne "") { my $user = WebGUI::User->new($self->session, $self->get('maintainerId')); my $mail = WebGUI::Mail::Send->create($self->session,{ - to =>$user->profileField("email"), + to =>$user->get("email"), subject =>$self->get('productName')." - ".$form->process("subject"), from=>$form->process("from") }); @@ -1160,6 +1082,8 @@ sub www_viewScreenshots { return $self->processTemplate($var,$self->getParent->get("screenshotsTemplateId")); } + +__PACKAGE__->meta->make_immutable; 1; #vim:ft=perl diff --git a/lib/WebGUI/Asset/Post.pm b/lib/WebGUI/Asset/Post.pm index 3f58019f7..461335774 100644 --- a/lib/WebGUI/Asset/Post.pm +++ b/lib/WebGUI/Asset/Post.pm @@ -1,7 +1,7 @@ package WebGUI::Asset::Post; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -11,15 +11,76 @@ package WebGUI::Asset::Post; #------------------------------------------------------------------- use strict; -use Tie::CPHash; -use Tie::IxHash; -use WebGUI::Asset; -use WebGUI::Asset::Template; -use WebGUI::Asset::Post::Thread; -use WebGUI::Cache; +use Moose; +use WebGUI::Definition::Asset; +extends 'WebGUI::Asset'; +define assetName => ['assetName', 'Asset_Post']; +define icon => 'post.gif'; +define tableName => 'Post'; +property storageId => ( + fieldType => "image", + default => '', + enforceSizeLimits => 0, + label => ['attachement', 'Asset_Collaboration'], + ); +property threadId => ( + noFormPost => 1, + fieldType => "hidden", + default => '', + ); +property originalEmail => ( + noFormPost => 1, + fieldType => "hidden", + default => undef, + ); +property username => ( + noFormPost => 1, + fieldType => "hidden", + builder => '_username_builder', + lazy => 1, + ); +sub _username_builder { + my $session = shift->session; + return $session->form->process("visitorUsername") + || $session->user->get("alias") + || $session->user->username; +} +property rating => ( + noFormPost => 1, + fieldType => "hidden", + default => undef, + ); +property views => ( + noFormPost => 1, + fieldType => "hidden", + default => undef, + ); +property contentType => ( + label => ['contentType', 'Asset_Collaboration'], + fieldType => "contentType", + default => "mixed", + ); +for my $i ( 1 .. 5 ) { + property 'userDefined'.$i => ( + default => undef, + label => '', + fieldType => 'HTMLArea', + ); +} +property content => ( + label => ['message', 'Asset_Collaboration'], + fieldType => "HTMLArea", + default => undef, + ); + +with 'WebGUI::Role::Asset::AlwaysHidden'; + +with 'WebGUI::Role::Asset::SetStoragePermissions'; + +with 'WebGUI::Role::Asset::AutoSynopsis'; + use WebGUI::Group; use WebGUI::HTML; -use WebGUI::HTMLForm; use WebGUI::Form::DynamicField; use WebGUI::International; use WebGUI::Inbox; @@ -30,13 +91,7 @@ use WebGUI::Paginator; use WebGUI::SQL; use WebGUI::Storage; use WebGUI::User; -use WebGUI::Utility; use WebGUI::VersionTag; -use Class::C3; -use base qw( - WebGUI::AssetAspect::AutoSynopsis - WebGUI::Asset -); #------------------------------------------------------------------- @@ -64,9 +119,9 @@ sub _fixReplyCount { orderByClause => 'assetData.revisionDate desc', limit => 1, } )->[0]; - - if (my $lastPost = WebGUI::Asset->newByDynamicClass( $self->session, $lastPostId ) ) { - $asset->incrementReplies( $lastPost->get( 'revisionDate' ), $lastPost->getId ); + my $lastPost = eval { WebGUI::Asset->newById( $self->session, $lastPostId ); }; + if ( ! Exception::Class->caught() ) { + $asset->incrementReplies( $lastPost->revisionDate, $lastPost->getId ); } else { $asset->incrementReplies( undef, undef ); @@ -75,52 +130,34 @@ sub _fixReplyCount { #------------------------------------------------------------------- -=head2 addChild ( ) - -Overriding to limit the types of children allowed. - -=cut - -sub addChild { - my $self = shift; - my $properties = shift; - my @other = @_; - if ($properties->{className} ne "WebGUI::Asset::Post") { - $self->session->errorHandler->security("add a ".$properties->{className}." to a ".$self->get("className")); - return undef; - } - return $self->next::method($properties, @other); -} - -#------------------------------------------------------------------- - =head2 addRevision ( ) Override the default method in order to deal with attachments. =cut -sub addRevision { - my $self = shift; - my $newSelf = $self->next::method(@_); - if ($newSelf->get("storageId") && $newSelf->get("storageId") eq $self->get('storageId')) { - my $newStorage = WebGUI::Storage->get($self->session,$self->get("storageId"))->copy; - $newSelf->update({storageId=>$newStorage->getId}); +override addRevision => sub { + my $self = shift; + my $newSelf = super(); + if ( $newSelf->storageId && $newSelf->storageId eq $self->storageId ) { + my $newStorage = WebGUI::Storage->get( $self->session, $self->storageId )->copy; + $newSelf->update( { storageId => $newStorage->getId } ); + } + my $threadId = $newSelf->threadId; + my $now = time(); + if ( $threadId eq "" ) { # new post + if ( $newSelf->getParent->isa("WebGUI::Asset::Wobject::Collaboration") ) { + $newSelf->update( { threadId => $newSelf->getId } ); } - my $threadId = $newSelf->get("threadId"); - my $now = time(); - if ($threadId eq "") { # new post - if ($newSelf->getParent->isa("WebGUI::Asset::Wobject::Collaboration")) { - $newSelf->update({threadId=>$newSelf->getId}); - } else { - $newSelf->update({threadId=>$newSelf->getParent->get("threadId")}); - } - delete $newSelf->{_thread}; - } - $newSelf->getThread->unmarkRead; + else { + $newSelf->update( { threadId => $newSelf->getParent->threadId } ); + } + delete $newSelf->{_thread}; + } + $newSelf->getThread->unmarkRead; - return $newSelf; -} + return $newSelf; +}; #------------------------------------------------------------------- @@ -167,21 +204,21 @@ sub canEdit { ( $form->get("func") eq "add" || ( $form->get("func") eq "editSave" && $form->get("assetId") eq "new" ) ) - && $form->get("class") eq "WebGUI::Asset::Post" + && $form->get("className") eq "WebGUI::Asset::Post" ) { return $self->getThread->getParent->canPost; } # User who posted can edit their own post if ( $self->isPoster( $userId ) ) { - my $editTimeout = $self->getThread->getParent->get( 'editTimeout' ); - if ( $editTimeout > time - $self->get( "revisionDate" ) ) { + my $editTimeout = $self->getThread->getParent->editTimeout; + if ( $editTimeout > time - $self->revisionDate ) { return 1; } } # Users in groupToEditPost of the Collab can edit any post - if ( $user->isInGroup( $self->getThread->getParent->get('groupToEditPost') ) ) { + if ( $user->isInGroup( $self->getThread->getParent->groupToEditPost ) ) { return 1; } @@ -198,12 +235,16 @@ Returns a boolean indicating whether the user can view the current post. sub canView { my $self = shift; - if (($self->get("status") eq "approved" || $self->get("status") eq "archived") && $self->getThread->getParent->canView) { + my $userId = shift || $self->session->user->userId; + $self->session->log->info( "$userId " . $self->status ); + if (($self->status eq "approved" || $self->status eq "archived") && $self->getThread->getParent->canView( $userId )) { + $self->session->log->info( "CAN VIEW" ); return 1; - } elsif ($self->canEdit) { + } elsif ($self->canEdit( $userId )) { + $self->session->log->info( "CAN EDIT" ); return 1; } else { - $self->getThread->getParent->canEdit; + return $self->getThread->getParent->canEdit( $userId ); } } @@ -218,7 +259,7 @@ Cuts a title string off at 30 characters. sub chopTitle { my $self = shift; - return substr($self->get("title"),0,30); + return substr($self->title,0,30); } #------------------------------------------------------------------- @@ -230,20 +271,20 @@ increment replies for the parent thread. =cut -sub commit { - my $self = shift; - $self->next::method; - - $self->notifySubscribers unless ($self->shouldSkipNotification); - - if ($self->isNew) { - if ($self->session->setting->get("useKarma") && $self->getThread->getParent->get("karmaPerPost")) { - my $u = WebGUI::User->new($self->session, $self->get("ownerUserId")); - $u->karma($self->getThread->getParent->get("karmaPerPost"), $self->getId, "Collaboration post"); - } - $self->getThread->incrementReplies($self->get("revisionDate"),$self->getId);# if ($self->isReply); - } -} +override commit => sub { + my $self = shift; + super(); + + $self->notifySubscribers unless ( $self->shouldSkipNotification ); + + if ( $self->isNew ) { + if ( $self->session->setting->get("useKarma") && $self->getThread->getParent->karmaPerPost ) { + my $u = WebGUI::User->new( $self->session, $self->ownerUserId ); + $u->karma( $self->getThread->getParent->karmaPerPost, $self->getId, "Collaboration post" ); + } + $self->getThread->incrementReplies( $self->revisionDate, $self->getId ); # if ($self->isReply); + } +}; #------------------------------------------------------------------- @@ -254,7 +295,7 @@ the parent thread. =cut -sub cut { +override cut => sub { my $self = shift; # Fetch the Thread and CS before cutting the asset. @@ -262,7 +303,7 @@ sub cut { my $cs = $thread->getParent; # Cut the asset - my $result = $self->next::method; + my $result = super(); # If a post is being cut update the thread reply count first if ($thread->getId ne $self->getId) { @@ -274,85 +315,7 @@ sub cut { $self->_fixReplyCount( $cs ); return $result; -} - -#------------------------------------------------------------------- -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift; - my $i18n = WebGUI::International->new($session,"Asset_Post"); - - my $properties = { - storageId => { - fieldType=>"image", - defaultValue=>'', - enforceSizeLimits => 0, - }, - threadId => { - noFormPost=>1, - fieldType=>"hidden", - defaultValue=>'', - }, - originalEmail => { - noFormPost=>1, - fieldType=>"hidden", - defaultValue=>undef - }, - username => { - fieldType=>"hidden", - defaultValue=>$session->form->process("visitorUsername") || $session->user->profileField("alias") || $session->user->username - }, - rating => { - noFormPost=>1, - fieldType=>"hidden", - defaultValue=>undef - }, - views => { - noFormPost=>1, - fieldType=>"hidden", - defaultValue=>undef - }, - contentType => { - fieldType=>"contentType", - defaultValue=>"mixed" - }, - userDefined1 => { - fieldType=>"HTMLArea", - defaultValue=>undef - }, - userDefined2 => { - fieldType=>"HTMLArea", - defaultValue=>undef - }, - userDefined3 => { - fieldType=>"HTMLArea", - defaultValue=>undef - }, - userDefined4 => { - fieldType=>"HTMLArea", - defaultValue=>undef - }, - userDefined5 => { - fieldType=>"HTMLArea", - defaultValue=>undef - }, - content => { - fieldType=>"HTMLArea", - defaultValue=>undef - }, - }; - - push(@{$definition}, { - assetName=>$i18n->get('assetName'), - icon=>'post.gif', - tableName=>'Post', - className=>'WebGUI::Asset::Post', - properties=>$properties, - }); - return $class->next::method($session,$definition); -} - +}; #------------------------------------------------------------------- @@ -381,7 +344,7 @@ sub disqualifyAsLastPost { $thread->update({ lastPostId => $secondary_post->getId, lastPostDate => $secondary_post->get('creationDate'), }); } else { - $thread->update({ lastPostId => '', lastPostDate => '', }); + $thread->update({ lastPostId => '', lastPostDate => 0 }); } } my $cs = $thread->getParent; @@ -396,7 +359,7 @@ sub disqualifyAsLastPost { $cs->update({ lastPostId => $secondary_post->getId, lastPostDate => $secondary_post->get('creationDate'), }); } else { - $cs->update({ lastPostId => '', lastPostDate => '', }); + $cs->update({ lastPostId => '', lastPostDate => 0 }); } } } @@ -409,17 +372,17 @@ Extend the base method to handle duplicate storage locations and groups. =cut -sub duplicate { +override duplicate => sub { my $self = shift; my $session = $self->session; - my $copy = $self->SUPER::duplicate(@_); + my $copy = super(@_); if ($self->get('storageId')) { my $storage = $self->getStorageLocation; my $copied_storage = $storage->copy; $copy->update({storageId => $copied_storage->getId}); } return $copy; -} +}; #------------------------------------------------------------------- @@ -429,10 +392,9 @@ Extend the base method to delete the locally cached thread object. =cut -sub DESTROY { - my $self = shift; - $self->{_thread}->DESTROY if (exists $self->{_thread} && ref $self->{_thread} =~ /Thread/); - $self->next::method; +sub DEMOLISH { + my $self = shift; + $self->{_thread}->DESTROY if (exists $self->{_thread} && ref $self->{_thread} =~ /Thread/); } @@ -444,12 +406,12 @@ Extend the base class to handle storage locations. =cut -sub exportAssetData { +override exportAssetData => sub { my $self = shift; - my $data = $self->next::method; - push(@{$data->{storage}}, $self->get("storageId")) if ($self->get("storageId") ne ""); + my $data = super(); + push(@{$data->{storage}}, $self->storageId) if ($self->storageId ne ""); return $data; -} +}; #------------------------------------------------------------------- @@ -463,13 +425,14 @@ The url of the post =cut -sub fixUrl { - my $self = shift; - my $url = shift; - $url =~ s/\./_/g; +around fixUrl => sub { + my $orig = shift; + my $self = shift; + my $url = shift; + $url =~ s/\./_/g; - $self->next::method($url); -} + $self->$orig($url); +}; #------------------------------------------------------------------- @@ -489,16 +452,16 @@ The content type to use for formatting. Defaults to the content type specified i sub formatContent { my $self = shift; - my $content = shift || $self->get("content"); - my $contentType = shift || $self->get("contentType"); + my $content = shift || $self->content; + my $contentType = shift || $self->contentType; my $msg = undef ; if (!$self->isa("WebGUI::Asset::Post::Thread")) { # apply appropriate content filter - $msg = WebGUI::HTML::filter($content,$self->getThread->getParent->get("replyFilterCode")); + $msg = WebGUI::HTML::filter($content,$self->getThread->getParent->replyFilterCode); } else { - $msg = WebGUI::HTML::filter($content,$self->getThread->getParent->get("filterCode")); + $msg = WebGUI::HTML::filter($content,$self->getThread->getParent->filterCode); } $msg = WebGUI::HTML::format($msg, $contentType); - if ($self->getThread->getParent->get("useContentFilter")) { + if ($self->getThread->getParent->useContentFilter) { $msg = WebGUI::HTML::processReplacements($self->session,$msg); } return $msg; @@ -516,7 +479,7 @@ sub getAutoCommitWorkflowId { my $self = shift; my $cs = $self->getThread->getParent; if ($cs->hasBeenCommitted) { - return $cs->get('approvalWorkflow') + return $cs->approvalWorkflow || $self->session->setting->get('defaultVersionTagWorkflow'); } return undef; @@ -533,10 +496,10 @@ Returns a URL to the owner's avatar. sub getAvatarUrl { my $self = shift; my $parent = $self->getThread->getParent; - return '' unless $parent and $parent->getValue("avatarsEnabled"); - my $user = WebGUI::User->new($self->session, $self->get('ownerUserId')); + return '' unless $parent and $parent->avatarsEnabled; + my $user = WebGUI::User->new($self->session, $self->ownerUserId); #Get avatar field, storage Id. - my $storageId = $user->profileField("avatar"); + my $storageId = $user->get("avatar"); return '' unless $storageId; my $avatar = WebGUI::Storage->get($self->session,$storageId); my $avatarUrl = ''; @@ -562,7 +525,7 @@ Formats the url to delete a post. sub getDeleteUrl { my $self = shift; - return $self->getUrl("func=delete;revision=".$self->get("revisionDate")); + return $self->getUrl("func=delete;revision=".$self->revisionDate); } #------------------------------------------------------------------- @@ -593,6 +556,322 @@ sub getThreadLinkUrl { } +#------------------------------------------------------------------- + +=head2 getEditTemplate ( ) + +Override the master class to handle custom edit templates. This doesn't use WebGUI::FormBuilder, +but adds the template variables from the old www_edit directly to the template. + +=cut + +sub getEditTemplate { + my $self = shift; + my $session = $self->session; + my $cs = $self->getThread->getParent; + my $template = WebGUI::Asset->newById($self->session, $cs->postFormTemplateId); + $template->style($cs->getStyleTemplateId); + + my (%var, $content, $title, $synopsis); + my $form = $session->form; + my $privilege = $session->privilege; + my $user = $session->user; + my $func = $form->process("func"); + my $i18n = WebGUI::International->new($session); + my $className = $form->process("className","className") || $self->className; + if ($func eq "add" || ($func eq "editSave" && $form->process("assetId") eq "new")) { # new post + #Post to the parent if this is a new request + my $action = $self->getParent->getUrl; + #Post to self if there was an error Posting to a Thread (not a Collaboration) + $action = $self->getUrl if($func eq "editSave" && $className ne "WebGUI::Asset::Post::Thread"); + + #Add Form Header for all new posts + $var{'form.header'} = WebGUI::Form::formHeader($session,{ + action=>$action + }); + $var{'form.header'} .= WebGUI::Form::hidden($session, { + name=>"func", + value=>"add" + }); + $var{'form.header'} .= WebGUI::Form::hidden($session, { + name=>"save_func", + value=>"addSave" + }); + $var{'form.header'} .= WebGUI::Form::hidden($session, { + name=>"assetId", + value=>"new" + }); + $var{'form.header'} .= WebGUI::Form::hidden($session, { + name=>"className", + value=>$className, + }); + + if($cs->useCaptcha) { + $var{'useCaptcha' } = "true"; + + use WebGUI::Form::Captcha; + my $captcha = WebGUI::Form::Captcha->new($self->session,{ + "name"=>"captcha" + }); + $var{'captcha_form' } + = $captcha->toHtml. ''.$captcha->get('subtext').''; + } + + $var{'isNewPost' } = 1; + + $content = $form->process("content"); + $title = $form->process("title"); + $synopsis = $form->process("synopsis"); + + if ($className eq "WebGUI::Asset::Post") { # new reply + #If editSave comes back on a reply to a new thread, you wind up with a post who's parent is a collaboration system. + my $parent = $self->getParent; + if(ref $self->getParent eq "WebGUI::Asset::Wobject::Collaboration") { + $self->{_thread} = $self->getThread; + $parent = $self; + } else { + $self->{_thread} = $self->getParent->getThread; + } + + return $privilege->insufficient() unless ($self->getThread->canReply); + + $var{'isReply' } = 1; + $var{'reply.title' } = $title || $parent->title; + $var{'reply.synopsis'} = $synopsis || $parent->synopsis; + $var{'reply.content' } = $content || $parent->formatContent; + for my $i (1..5) { + $var{'reply.userDefined'.$i} = WebGUI::HTML::filter($parent->get('userDefined'.$i),"macros"); + } + unless ($content || $title) { + $content = "[quote]".$parent->content."[/quote]" if ($form->process("withQuote")); + $title = $parent->title; + $title = "Re: ".$title unless ($title =~ /^Re:/i); + } + my $subscribe = $form->process("subscribe"); + $var{'subscribe.form'} = WebGUI::Form::yesNo($session, { + name=>"subscribe", + value => defined $subscribe ? $subscribe : $self->getThread->isSubscribed, + }); + } + elsif ($className eq "WebGUI::Asset::Post::Thread") { # new thread + return $privilege->insufficient() unless ($cs->canPost); + $var{'isThread' } = 1; + $var{'isNewThread' } = 1; + my $subscribe = $form->process("subscribe"); + $var{'subscribe.form'} = WebGUI::Form::yesNo($session, { + name=>"subscribe", + value => defined $subscribe ? $subscribe : 1, + }); + } + $content .= "\n\n".$user->get("signature") if ($user->get("signature") && !$form->process("content")); + } + else { # edit + return $privilege->insufficient() unless ($self->canEdit); + $var{'isThread' } = !$self->isReply; + $var{'form.header'} = WebGUI::Form::formHeader($session,{ + action=>$self->getUrl + }); + $var{'form.header'} .= WebGUI::Form::hidden($session, { + name=>"func", + value=>"edit" + }); + $var{'form.header'} .= WebGUI::Form::hidden($session, { + name=>"save_func", + value=>"editSave" + }); + $var{'form.header'} .= WebGUI::Form::hidden($session, { + name=>"revision", + value=>$form->param("revision") || $self->revisionDate + }); + $var{'form.header'} .= WebGUI::Form::hidden($session, { + name=>"ownerUserId", + value=>$self->ownerUserId + }); + $var{'form.header'} .= WebGUI::Form::hidden($session, { + name=>"username", + value=>$self->username + }); + $var{isEdit} = 1; + $content = $form->process('content') || $self->content; + $title = $form->process('title') || $self->title; + $synopsis = $form->process('synopsis') || $self->synopsis; + } + + $var{'archive.form'} = WebGUI::Form::yesNo($session, { + name=>"archive" + }); + $var{'isSubscribedToCs'} = $cs->isSubscribed; + $var{'form.header'} .= WebGUI::Form::hidden($session, { + name=>"proceed", + value=>"showConfirmation" + }); + + if ($form->process("title") || $form->process("content") || $form->process("synopsis")) { + $var{'preview.title'} = WebGUI::HTML::filter($form->process("title"),"all"); + ($var{'preview.synopsis'}, $var{'preview.content'}) = $self->getSynopsisAndContent($form->process("synopsis","textarea"), $form->process("content","HTMLArea")); + $var{'preview.content'} = $self->formatContent($var{'preview.content'},$form->process("contentType")); + for my $i (1..5) { + $var{'preview.userDefined'.$i} = WebGUI::HTML::filter($form->process('userDefined'.$i),"macros"); + } + } + $var{'form.footer' } = WebGUI::Form::formFooter($session); + $var{'usePreview' } = $cs->usePreview; + $var{'user.isModerator'} = $cs->canModerate; + $var{'user.isVisitor' } = ($user->isVisitor); + $var{'visitorName.form'} = WebGUI::Form::text($session, { + name => "visitorName", + value => $form->process('visitorName') || $self->username + }); + + for my $x (1..5) { + my $userDefinedValue + = $form->process("userDefined".$x) + || $self->get("userDefined".$x) + ; + $var{'userDefined'.$x} = $userDefinedValue; + $var{'userDefined'.$x.'.form'} + = WebGUI::Form::text($session, { + name => "userDefined".$x, + value => $userDefinedValue, + }); + $var{'userDefined'.$x.'.form.yesNo'} + = WebGUI::Form::yesNo($session, { + name => "userDefined".$x, + value => $userDefinedValue, + }); + $var{'userDefined'.$x.'.form.textarea'} + = WebGUI::Form::textarea($session, { + name => "userDefined".$x, + value => $userDefinedValue, + }); + $var{'userDefined'.$x.'.form.htmlarea'} + = WebGUI::Form::HTMLArea($session, { + name => "userDefined".$x, + value => $userDefinedValue, + richEditId => ($self->isa("WebGUI::Asset::Post::Thread") + ? $self->getThread->getParent->get("richEditor") + : $self->getThread->getParent->get("replyRichEditor") + ), + }); + $var{'userDefined'.$x.'.form.float'} + = WebGUI::Form::Float($session, { + name => "userDefined".$x, + value => $userDefinedValue, + }); + } + + $title = WebGUI::HTML::filter($title,"all"); + $content = WebGUI::HTML::filter($content,"macros"); + $synopsis = WebGUI::HTML::filter($synopsis,"all"); + + $var{'title.form' } = WebGUI::Form::text($session, { + name=>"title", + value=>$title + }); + $var{'title.form.textarea'} = WebGUI::Form::textarea($session, { + name=>"title", + value=>$title + }); + $var{'synopsis.form'} = WebGUI::Form::textarea($session, { + name=>"synopsis", + value=>$synopsis, + }); + $var{'content.form'} = WebGUI::Form::HTMLArea($session, { + name=>"content", + value=>$content, + richEditId=>($self->isa("WebGUI::Asset::Post::Thread") ? + $self->getThread->getParent->richEditor : + $self->getThread->getParent->replyRichEditor), + }); + ##Edit variables just for Threads + if ($className eq 'WebGUI::Asset::Post::Thread' && $self->getThread->getParent->canEdit) { + $var{'sticky.form'} = WebGUI::Form::yesNo($session, { + name=>'isSticky', + value=>$form->process('isSticky') || $self->isSticky, + }); + $var{'lock.form' } = WebGUI::Form::yesNo($session, { + name=>'isLocked', + value=>$form->process('isLocked') || $self->isLocked, + }); + } + $var{'form.submit'} = WebGUI::Form::submit($session, { + extras=>"onclick=\"this.value='".$i18n->get(452)."'; this.form.func.value=this.form.save_func.value;return true;\"" + }); + $var{'form.cancel'} = WebGUI::Form::button( $session, { + name => "cancel", + value => $i18n->get("cancel"), + extras => 'onclick="history.go(-1)"', + }); + $var{'karmaScale.form'} = WebGUI::Form::integer($session, { + name=>"karmaScale", + defaultValue=>$self->getThread->getParent->defaultKarmaScale, + value=>$self->getThread->karmaScale, + }); + $var{karmaIsEnabled} = $session->setting->get('useKarma'); + $var{'form.preview'} = WebGUI::Form::submit($session, { + value=>$i18n->get("preview","Asset_Collaboration") + }); + my $numberOfAttachments = $self->getThread->getParent->attachmentsPerPost; + $var{'attachment.form'} = WebGUI::Form::image($session, { + name=>"storageId", + value=>$self->storageId, + maxAttachments=>$numberOfAttachments, + ##Removed deleteFileUrl, since it will go around the revision control system. + }) if ($numberOfAttachments); + + $var{'contentType.form'} = WebGUI::Form::contentType($session, { + name=>'contentType', + value=>$self->contentType || "mixed", + }); + $var{'skipNotification.form'} = WebGUI::Form::yesNo($session, { + name=>'skip_notification', + value=>$form->get("skip_notification",'yesNo') || 0, + }); + if ($session->setting->get("metaDataEnabled") + && $self->getThread->getParent->enablePostMetaData) { + my $meta = $self->getMetaDataFields(); + my $formGen = $form; + my @meta_loop = (); + foreach my $field (keys %{ $meta }) { + my $fieldType = $meta->{$field}{fieldType} || "Text"; + my $options = $meta->{$field}{possibleValues}; + # Add a "Select..." option on top of a select list to prevent from + # saving the value on top of the list when no choice is made. + if("\l$fieldType" eq "selectBox") { + $options = "|" . $i18n->get("select") . "\n" . $options; + } + my $form = WebGUI::Form::DynamicField->new($session, + name => "metadata_".$meta->{$field}{fieldId}, + uiLevel => 5, + value => $meta->{$field}{value}, + defaultValue => $meta->{$field}{defaultValue}, + extras => qq/title="$meta->{$field}{description}"/, + options => $options, + fieldType => $fieldType, + )->toHtml; + push @meta_loop, { + field => $form, + name => $meta->{$field}{fieldName}, + }; + my $fieldName = $meta->{$field}{fieldName}; + $fieldName =~ tr/ /_/; + $fieldName = lc $fieldName; + $var{'meta_'.$fieldName.'_form'} = $form; ##By name interface + } + $var{meta_loop} = \@meta_loop; + } + #keywords field + $var{'keywords.form'} = WebGUI::Form::text($session,{ + name => 'keywords', + value => $self->keywords, + }); + + $cs->appendTemplateLabels(\%var); + $template->setParam(%var); + return $template; +} + + #------------------------------------------------------------------- =head2 getEditUrl ( ) @@ -603,7 +882,7 @@ Formats the url to edit a post. sub getEditUrl { my $self = shift; - return $self->getUrl("func=edit;revision=".$self->get("revisionDate")); + return $self->getUrl("func=edit;revision=".$self->revisionDate); } @@ -618,7 +897,7 @@ are not stored files, it returns undef. sub getImageUrl { my $self = shift; - return undef if ($self->get("storageId") eq ""); + return undef if ($self->storageId eq ""); my $storage = $self->getStorageLocation; my $url; foreach my $filename (@{$storage->getFiles}) { @@ -641,7 +920,7 @@ Formats the url to view a users profile. sub getPosterProfileUrl { my $self = shift; - return WebGUI::User->new($self->session,$self->get("ownerUserId"))->getProfileUrl; + return WebGUI::User->new($self->session,$self->ownerUserId)->getProfileUrl; } #------------------------------------------------------------------- @@ -677,7 +956,7 @@ If specified the reply with automatically quote the parent post. sub getReplyUrl { my $self = shift; my $withQuote = shift || 0; - return $self->getUrl("func=add;class=WebGUI::Asset::Post;withQuote=".$withQuote); + return $self->getUrl("func=add;className=WebGUI::Asset::Post;withQuote=".$withQuote); } #------------------------------------------------------------------- @@ -690,7 +969,7 @@ Returns the status of this Post, 'approved', 'pending', or 'archived'. sub getStatus { my $self = shift; - my $status = $self->get("status"); + my $status = $self->status; my $i18n = WebGUI::International->new($self->session,"Asset_Post"); if ($status eq "approved") { return $i18n->get('approved'); @@ -713,11 +992,11 @@ creates one. sub getStorageLocation { my $self = shift; unless (exists $self->{_storageLocation}) { - if ($self->get("storageId") eq "") { + if ($self->storageId eq "") { $self->{_storageLocation} = WebGUI::Storage->create($self->session); $self->update({storageId=>$self->{_storageLocation}->getId}); } else { - $self->{_storageLocation} = WebGUI::Storage->get($self->session,$self->get("storageId")); + $self->{_storageLocation} = WebGUI::Storage->get($self->session,$self->storageId); } } return $self->{_storageLocation}; @@ -739,7 +1018,7 @@ sub getTemplateMetadataVars { my $self = shift; my $var = shift; if ($self->session->setting->get("metaDataEnabled") - && $self->getThread->getParent->get('enablePostMetaData')) { + && $self->getThread->getParent->enablePostMetaData) { my $meta = $self->getMetaDataFields(); my @meta_loop = (); foreach my $field (keys %{ $meta }) { @@ -768,14 +1047,14 @@ sub getTemplateVars { my $self = shift; my $session = $self->session; my %var = %{$self->get}; - my $postUser = WebGUI::User->new($session, $self->get("ownerUserId")); - $var{"userId"} = $self->get("ownerUserId"); + my $postUser = WebGUI::User->new($session, $self->ownerUserId); + $var{"userId"} = $self->ownerUserId; $var{"user.isPoster"} = $self->isPoster; $var{"avatar.url"} = $self->getAvatarUrl; $var{"userProfile.url"} = $postUser->getProfileUrl($self->getUrl()); - $var{"hideProfileUrl" } = $self->get('ownerUserId') eq '1' || $session->user->isVisitor; - $var{"dateSubmitted.human"} = $self->session->datetime->epochToHuman($self->get("creationDate")); - $var{"dateUpdated.human"} = $self->session->datetime->epochToHuman($self->get("revisionDate")); + $var{"hideProfileUrl" } = $self->ownerUserId eq '1' || $session->user->isVisitor; + $var{"dateSubmitted.human"} = $self->session->datetime->epochToHuman($self->creationDate); + $var{"dateUpdated.human"} = $self->session->datetime->epochToHuman($self->revisionDate); $var{'title.short'} = $self->chopTitle; $var{content} = $self->formatContent if ($self->getThread); $var{'user.canEdit'} = $self->canEdit if ($self->getThread); @@ -786,14 +1065,14 @@ sub getTemplateVars { $var{'reply.withquote.url'} = $self->getReplyUrl(1); $var{'url'} = $self->getUrl.'#id'.$self->getId; $var{'url.raw'} = $self->getUrl; - $var{'rating.value'} = $self->get("rating")+0; + $var{'rating.value'} = $self->rating+0; $var{'rate.url.thumbsUp'} = $self->getRateUrl(1); $var{'rate.url.thumbsDown'} = $self->getRateUrl(-1); $var{'hasRated'} = $self->hasRated; my $gotImage; my $gotAttachment; @{$var{'attachment_loop'}} = (); - unless ($self->get("storageId") eq "") { + unless ($self->storageId eq "") { my $storage = $self->getStorageLocation; foreach my $filename (@{$storage->getFiles}) { my $isImage = $storage->isImage($filename); @@ -834,16 +1113,18 @@ Returns the Thread that this Post belongs to. The method caches the result of t sub getThread { my $self = shift; unless (defined $self->{_thread}) { - my $threadId = $self->get("threadId"); + my $threadId = $self->threadId; if ($threadId eq "") { # new post if ($self->getParent->isa("WebGUI::Asset::Wobject::Collaboration")) { $threadId=$self->getId; } else { - $threadId=$self->getParent->get("threadId"); + $threadId=$self->getParent->threadId; } } - $self->{_thread} = WebGUI::Asset::Post::Thread->new($self->session, $threadId); + $self->{_thread} = WebGUI::Asset::Post::Thread->newById($self->session, $threadId); } + else { + } return $self->{_thread}; } @@ -858,7 +1139,7 @@ is stored in it. Otherwise, it returns undef. sub getThumbnailUrl { my $self = shift; - return undef if ($self->get("storageId") eq ""); + return undef if ($self->storageId eq ""); my $storage = $self->getStorageLocation; my $url; foreach my $filename (@{$storage->getFiles}) { @@ -884,7 +1165,7 @@ sub hasRated { return 1 if $self->isPoster; my $flag = 0; if ($self->session->user->isVisitor) { - ($flag) = $self->session->db->quickArray("select count(*) from Post_rating where assetId=? and ipAddress=?",[$self->getId, $self->session->env->getIp]); + ($flag) = $self->session->db->quickArray("select count(*) from Post_rating where assetId=? and ipAddress=?",[$self->getId, $self->session->request->address]); } else { ($flag) = $self->session->db->quickArray("select count(*) from Post_rating where assetId=? and userId=?",[$self->getId, $self->session->user->userId]); } @@ -899,21 +1180,22 @@ Indexing the content of attachments and user defined fields. See WebGUI::Asset:: =cut -sub indexContent { - my $self = shift; - my $indexer = $self->next::method; - $indexer->addKeywords($self->get("content")); - $indexer->addKeywords($self->get("userDefined1")); - $indexer->addKeywords($self->get("userDefined2")); - $indexer->addKeywords($self->get("userDefined3")); - $indexer->addKeywords($self->get("userDefined4")); - $indexer->addKeywords($self->get("userDefined5")); - $indexer->addKeywords($self->get("username")); - my $storage = $self->getStorageLocation; - foreach my $file (@{$storage->getFiles}) { - $indexer->addFile($storage->getPath($file)); - } -} +around indexContent => sub { + my $orig = shift; + my $self = shift; + my $indexer = $self->$orig(@_); + $indexer->addKeywords($self->content); + $indexer->addKeywords($self->userDefined1); + $indexer->addKeywords($self->userDefined2); + $indexer->addKeywords($self->userDefined3); + $indexer->addKeywords($self->userDefined4); + $indexer->addKeywords($self->userDefined5); + $indexer->addKeywords($self->username); + my $storage = $self->getStorageLocation; + foreach my $file (@{$storage->getFiles}) { + $indexer->addFile($storage->getPath($file)); + } +}; #------------------------------------------------------------------- @@ -925,7 +1207,7 @@ Increments the views counter for this post. sub incrementViews { my ($self) = @_; - $self->update({views=>$self->get("views")+1}); + $self->update({views=>$self->views+1}); } #------------------------------------------------------------------- @@ -948,7 +1230,7 @@ sub insertUserPostRating { $self->session->db->write("insert into Post_rating (assetId,userId,ipAddress,dateOfRating,rating) values (?,?,?,?,?)", [$self->getId, $self->session->user->userId, - $self->session->env->getIp, + $self->session->request->address, time(), $rating,] ); @@ -964,7 +1246,7 @@ Returns a boolean indicating whether this post is new (not an edit). sub isNew { my $self = shift; - return $self->get("creationDate") == $self->get("revisionDate"); + return $self->creationDate == $self->revisionDate; } #------------------------------------------------------------------- @@ -978,7 +1260,7 @@ Returns a boolean that is true if the current user created this post and is not sub isPoster { my $self = shift; my $userId = shift || $self->session->user->userId; - return ( $userId ne "1" && $userId eq $self->get("ownerUserId") ); + return ( $userId ne "1" && $userId eq $self->ownerUserId ); } @@ -992,7 +1274,7 @@ Returns a boolean indicating whether this post is a reply. sub isReply { my $self = shift; - return $self->getId ne $self->get("threadId"); + return $self->getId ne $self->threadId; } @@ -1015,13 +1297,13 @@ sub notifySubscribers { my $siteurl = $self->session->url->getSiteURL(); $var->{url} = $siteurl.$self->getUrl; $var->{'notify.subscription.message'} = $i18n->get(875,"Asset_Post"); - my $user = WebGUI::User->new($self->session, $self->get("ownerUserId")); + my $user = WebGUI::User->new($self->session, $self->ownerUserId); my $setting = $self->session->setting; my $returnAddress = $setting->get("mailReturnPath"); my $companyAddress = $setting->get("companyEmail"); - my $listAddress = $cs->get("mailAddress"); + my $listAddress = $cs->mailAddress; my $posterAddress = $user->getProfileFieldPrivacySetting('email') eq "all" - ? $user->profileField('email') + ? $user->get('email') : ''; my $from = $posterAddress || $listAddress || $companyAddress; my $replyTo = $listAddress || $returnAddress || $companyAddress; @@ -1029,21 +1311,21 @@ sub notifySubscribers { my $returnPath = $returnAddress || $sender; my $listId = $sender; $listId =~ s/\@/\./; - my $domain = $cs->get("mailAddress"); + my $domain = $cs->mailAddress; $domain =~ s/.*\@(.*)/$1/; my $messageId = "cs-".$self->getId.'@'.$domain; my $replyId = ""; if ($self->isReply) { $replyId = "cs-".$self->getParent->getId.'@'.$domain; } - my $subject = $cs->get("mailPrefix").$self->get("title"); + my $subject = $cs->mailPrefix.$self->title; foreach my $subscriptionAsset ($cs, $thread) { $var->{unsubscribeUrl} = $siteurl.$subscriptionAsset->getUnsubscribeUrl; $var->{unsubscribeLinkText} = $i18n->get("unsubscribe","Asset_Collaboration"); - my $message = $self->processTemplate($var, $cs->get("notificationTemplateId")); + my $message = $self->processTemplate($var, $cs->notificationTemplateId); WebGUI::Macro::process($self->session, \$message); - my $groupId = $subscriptionAsset->get('subscriptionGroupId'); + my $groupId = $subscriptionAsset->subscriptionGroupId; my $mail = WebGUI::Mail::Send->create($self->session, { from=>"<".$from.">", returnPath => "<".$returnPath.">", @@ -1085,16 +1367,16 @@ Extends the master method to handle incrementing replies. =cut -sub paste { +override paste => sub { my $self = shift; - $self->next::method(@_); + super(); # First, figure out what Thread we're under my $thread = $self->getThread; # If the pasted asset is not a thread we'll have to update the threadId of it and all posts below it. - if ( $self->get('threadId') ne $self->getId ) { + if ( $self->threadId ne $self->getId ) { # Check if we're actually pasting under a thread. if ($thread) { # If so, get the threadId from the thread and fetch all posts that must be updated. @@ -1117,27 +1399,27 @@ sub paste { # Recount the replies under the thread. $thread->sumReplies; -} +}; #------------------------------------------------------------------- -=head2 processPropertiesFromFormPost +=head2 processEditForm Extend the base method to handle archiving and unarchiving, making sticky and non-sticky, locking and unlocking posts. Calls postProcess when it is done. =cut -sub processPropertiesFromFormPost { +override processEditForm => sub { my $self = shift; - $self->next::method; + super(); my $session = $self->session; my $form = $session->form; my $i18n = WebGUI::International->new($session); if ($form->process("assetId") eq "new") { my %data = ( ownerUserId => $session->user->userId, - username => $form->process("visitorName") || $session->user->profileField("alias") || $session->user->username, + username => $form->process("visitorName") || $session->user->get("alias") || $session->user->username, ); $self->update(\%data); } @@ -1145,7 +1427,7 @@ sub processPropertiesFromFormPost { $self->update({synopsis => ($form->process("synopsis") || "")}); if ($form->process("archive") && $self->getThread->getParent->canModerate) { $self->getThread->archive; - } elsif ($self->getThread->get("status") eq "archived") { + } elsif ($self->getThread->status eq "archived") { $self->getThread->unarchive; } if ($form->process("subscribe")) { @@ -1163,7 +1445,8 @@ sub processPropertiesFromFormPost { } delete $self->{_storageLocation}; $self->postProcess; -} + return; +}; #------------------------------------------------------------------- @@ -1178,7 +1461,7 @@ adding edit stamp to posts and setting the size. sub postProcess { my $self = shift; my %data = (); - ($data{synopsis}, $data{content}) = $self->getSynopsisAndContent($self->get("synopsis"), $self->get("content")); + ($data{synopsis}, $data{content}) = $self->getSynopsisAndContent($self->synopsis, $self->content); my $spamStopWords = $self->session->config->get('spamStopWords'); if (ref $spamStopWords eq 'ARRAY' && @{ $spamStopWords }) { my $spamRegex = join('|',@{$spamStopWords}); @@ -1190,18 +1473,18 @@ sub postProcess { } my $i18n = WebGUI::International->new($self->session, "Asset_Post"); if ($self->getThread->getParent->get("addEditStampToPosts")) { - $data{content} .= "

    \n\n --- (".$i18n->get('Edited_on')." ".$self->session->datetime->epochToHuman(undef,"%z %Z [GMT%O]")." ".$i18n->get('By')." ".$self->session->user->profileField("alias").") --- \n

    "; + $data{content} .= "

    \n\n --- (".$i18n->get('Edited_on')." ".$self->session->datetime->epochToHuman(undef,"%z %Z [GMT%O]")." ".$i18n->get('By')." ".$self->session->user->get("alias").") --- \n

    "; } - $data{url} = $self->fixUrl($self->getThread->get("url")."/1") if ($self->isReply && $self->isNew); - $data{groupIdView} = $self->getThread->getParent->get("groupIdView"); - $data{groupIdEdit} = $self->getThread->getParent->get("groupIdEdit"); + $data{url} = $self->fixUrl($self->getThread->url."/1") if ($self->isReply && $self->isNew); + $data{groupIdView} = $self->getThread->getParent->groupIdView; + $data{groupIdEdit} = $self->getThread->getParent->groupIdEdit; $self->update(\%data); my $size = 0; my $storage = $self->getStorageLocation; foreach my $file (@{$storage->getFiles}) { if ($storage->isImage($file)) { - $storage->adjustMaxImageSize($file, $self->getThread->getParent->get('maxImageSize')); - $storage->generateThumbnail($file, $self->getThread->getParent->get("thumbnailSize")); + $storage->adjustMaxImageSize($file, $self->getThread->getParent->maxImageSize); + $storage->generateThumbnail($file, $self->getThread->getParent->thumbnailSize); } $size += $storage->getFileSize($file); } @@ -1232,20 +1515,20 @@ Extend the base method to handle cleaning up storage locations. =cut -sub purge { +override purge => sub { my $self = shift; - my $purged = $self->next::method; + my $purged = super(); if ($purged) { - my $sth = $self->session->db->read("select storageId from Post where assetId=".$self->session->db->quote($self->getId)); + my $sth = $self->session->db->read("select storageId from Post where assetId=?",[$self->getId]); while (my ($storageId) = $sth->array) { - my $storage = WebGUI::Storage->get($self->session, $storageId); - $storage->delete if defined $storage; + my $storage = WebGUI::Storage->get($self->session, $storageId); + $storage->delete if defined $storage; } $sth->finish; $self->disqualifyAsLastPost; } - return $purged; -} + return super(); +}; #------------------------------------------------------------------- @@ -1255,11 +1538,12 @@ Extend the base class to handle caching. =cut -sub purgeCache { +override purgeCache => sub { my $self = shift; - WebGUI::Cache->new($self->session,"view_".$self->getThread->getId)->delete if ($self->getThread); - $self->next::method; -} + $self->session->cache->remove("view_".$self->getThread->getId) if ($self->getThread); + super(); + delete $self->{_thread}; +}; #------------------------------------------------------------------- @@ -1269,11 +1553,11 @@ Extend the base method to handle deleting the storage location. =cut -sub purgeRevision { +override purgeRevision => sub { my $self = shift; $self->getStorageLocation->delete; - return $self->next::method; -} + return super(); +}; @@ -1325,10 +1609,10 @@ sub rate { my $thread = $self->getThread; $thread->updateThreadRating(); if ($session->setting->get("useKarma") - && $session->user->karma > $thread->getParent->get('karmaSpentToRate')) { - $session->user->karma(-$thread->getParent->get("karmaSpentToRate"), "Rated Post ".$self->getId, "Rated a CS Post."); - my $u = WebGUI::User->new($session, $self->get("ownerUserId")); - $u->karma($thread->getParent->get("karmaRatingMultiplier"), "Post ".$self->getId." Rated by ".$session->user->userId, "Had post rated."); + && $session->user->karma > $thread->getParent->karmaSpentToRate) { + $session->user->karma(-$thread->getParent->karmaSpentToRate, "Rated Post ".$self->getId, "Rated a CS Post."); + my $u = WebGUI::User->new($session, $self->ownerUserId); + $u->karma($thread->getParent->karmaRatingMultiplier, "Post ".$self->getId." Rated by ".$session->user->userId, "Had post rated."); } } @@ -1355,12 +1639,12 @@ the thread rating. =cut -sub restore { +override restore => sub { my $self = shift; - $self->next::method(@_); + super(); $self->getThread->sumReplies; $self->getThread->updateThreadRating; -} +}; #------------------------------------------------------------------- @@ -1394,12 +1678,12 @@ An asset object to make the parent of this asset. =cut -sub setParent { - my $self = shift; - my $newParent = shift; - return 0 unless ($newParent->get("className") eq "WebGUI::Asset::Post" || $newParent->get("className") eq "WebGUI::Asset::Post::Thread"); - return $self->next::method($newParent); -} +override setParent => sub { + my $self = shift; + my $newParent = shift; + return 0 unless ($newParent->isa('WebGUI::Asset::Post')); + return super(); +}; #------------------------------------------------------------------- @@ -1431,7 +1715,7 @@ Updates the last post information in the parent Thread and CS if applicable. sub setStatusUnarchived { my ($self) = @_; - $self->update({status=>'approved'}) if ($self->get("status") eq "archived"); + $self->update({status=>'approved'}) if ($self->status eq "archived"); $self->qualifyAsLastPost; } @@ -1444,38 +1728,13 @@ and updates any lastPost information in the parent Thread, and CS. =cut -sub trash { +override trash => sub { my $self = shift; - $self->next::method; + super(); $self->getThread->sumReplies if ($self->isReply); $self->getThread->updateThreadRating; $self->disqualifyAsLastPost; -} - -#------------------------------------------------------------------- - -=head2 update ( ) - -We overload the update method from WebGUI::Asset in order to handle file system privileges. - -=cut - -sub update { - my $self = shift; - my $properties = shift; - my %before = ( - owner => $self->get("ownerUserId"), - view => $self->get("groupIdView"), - edit => $self->get("groupIdEdit") - ); - $self->next::method({%$properties, isHidden => 1}); - if ($self->get("ownerUserId") ne $before{owner} || $self->get("groupIdEdit") ne $before{edit} || $self->get("groupIdView") ne $before{view}) { - my $storage = $self->getStorageLocation; - if (-d $storage->getPath) { - $storage->setPrivileges($self->get("ownerUserId"),$self->get("groupIdView"),$self->get("groupIdEdit")); - } - } -} +}; #------------------------------------------------------------------- @@ -1485,13 +1744,30 @@ Extend the base method to also prepare the Thread containing this Post. =cut -sub prepareView { +override prepareView => sub { my $self = shift; - $self->next::method; + super(); unless ($self->getThread->getId eq $self->getId) { # Need the unless to avoid infinite recursion. $self->getThread->prepareView; } +}; + +#------------------------------------------------------------------- + +=head2 valid_parent_classes + +Make sure that the current session asset is a Thread or Post for pasting and adding checks. + +Technically, we really only need WebGUI::Asset::Post, but it drives some testing code crazy +so we explicitly list Thread, too. + +=cut + +sub valid_parent_classes { + my $class = shift; + my $session = shift; + return [qw/WebGUI::Asset::Post::Thread WebGUI::Asset::Post/]; } #------------------------------------------------------------------- @@ -1525,310 +1801,6 @@ sub www_deleteFile { } -#------------------------------------------------------------------- - -=head2 www_edit - -Renders a template form for adding and editing posts. - -=cut - -sub www_edit { - my $self = shift; - my $session = $self->session; - my $form = $session->form; - my $privilege = $session->privilege; - my $user = $session->user; - my $func = $form->process("func"); - - my (%var, $content, $title, $synopsis); - my $i18n = WebGUI::International->new($session); - - my $className = $form->process("class","className") || $self->get('className'); - if ($func eq "add" || ($func eq "editSave" && $form->process("assetId") eq "new")) { # new post - #Post to the parent if this is a new request - my $action = $self->getParent->getUrl; - #Post to self if there was an error Posting to a Thread (not a Collaboration) - $action = $self->getUrl if($func eq "editSave" && $className ne "WebGUI::Asset::Post::Thread"); - - #Add Form Header for all new posts - $var{'form.header'} = WebGUI::Form::formHeader($session,{ - action=>$action - }); - $var{'form.header'} .= WebGUI::Form::hidden($session, { - name=>"func", - value=>"add" - }); - $var{'form.header'} .= WebGUI::Form::hidden($session, { - name=>"assetId", - value=>"new" - }); - $var{'form.header'} .= WebGUI::Form::hidden($session, { - name=>"class", - value=>$form->process("class","className") - }); - - if($self->getThread->getParent->getValue("useCaptcha")) { - $var{'useCaptcha' } = "true"; - - use WebGUI::Form::Captcha; - my $captcha = WebGUI::Form::Captcha->new($self->session,{ - "name"=>"captcha" - }); - $var{'captcha_form' } - = $captcha->toHtml. ''.$captcha->get('subtext').''; - } - - $var{'isNewPost' } = 1; - - $content = $form->process("content"); - $title = $form->process("title"); - $synopsis = $form->process("synopsis"); - - if ($className eq "WebGUI::Asset::Post") { # new reply - #If editSave comes back on a reply to a new thread, you wind up with a post who's parent is a collaboration system. - my $parent = $self->getParent; - if(ref $self->getParent eq "WebGUI::Asset::Wobject::Collaboration") { - $self->{_thread} = $self->getThread; - $parent = $self; - } else { - $self->{_thread} = $self->getParent->getThread; - } - - return $privilege->insufficient() unless ($self->getThread->canReply); - - $var{'isReply' } = 1; - $var{'reply.title' } = $title || $parent->get("title"); - $var{'reply.synopsis'} = $synopsis || $parent->get("synopsis"); - $var{'reply.content' } = $content || $parent->formatContent; - for my $i (1..5) { - $var{'reply.userDefined'.$i} = WebGUI::HTML::filter($parent->get('userDefined'.$i),"macros"); - } - unless ($content || $title) { - $content = "[quote]".$parent->get("content")."[/quote]" if ($form->process("withQuote")); - $title = $parent->get("title"); - $title = "Re: ".$title unless ($title =~ /^Re:/i); - } - my $subscribe = $form->process("subscribe"); - $var{'subscribe.form'} = WebGUI::Form::yesNo($session, { - name=>"subscribe", - value => defined $subscribe ? $subscribe : $self->getThread->isSubscribed, - }); - } - elsif ($className eq "WebGUI::Asset::Post::Thread") { # new thread - return $privilege->insufficient() unless ($self->getThread->getParent->canPost); - $var{'isThread' } = 1; - $var{'isNewThread' } = 1; - my $subscribe = $form->process("subscribe"); - $var{'subscribe.form'} = WebGUI::Form::yesNo($session, { - name=>"subscribe", - value => defined $subscribe ? $subscribe : 1, - }); - } - $content .= "\n\n".$user->profileField("signature") if ($user->profileField("signature") && !$form->process("content")); - } - else { # edit - return $privilege->insufficient() unless ($self->canEdit); - $var{'isThread' } = !$self->isReply; - $var{'form.header'} = WebGUI::Form::formHeader($session,{ - action=>$self->getUrl - }); - $var{'form.header'} .= WebGUI::Form::hidden($session, { - name=>"func", - value=>"edit" - }); - $var{'form.header'} .= WebGUI::Form::hidden($session, { - name=>"revision", - value=>$form->param("revision") - }); - $var{'form.header'} .= WebGUI::Form::hidden($session, { - name=>"ownerUserId", - value=>$self->getValue("ownerUserId") - }); - $var{'form.header'} .= WebGUI::Form::hidden($session, { - name=>"username", - value=>$self->getValue("username") - }); - $var{isEdit} = 1; - $content = $form->process('content') || $self->getValue("content"); - $title = $form->process('title') || $self->getValue("title"); - $synopsis = $form->process('synopsis') || $self->getValue("synopsis"); - } - - $var{'archive.form'} = WebGUI::Form::yesNo($session, { - name=>"archive" - }); - $var{'isSubscribedToCs'} = $self->getThread->getParent->isSubscribed; - $var{'form.header'} .= WebGUI::Form::hidden($session, { - name=>"proceed", - value=>"showConfirmation" - }); - - if ($form->process("title") || $form->process("content") || $form->process("synopsis")) { - $var{'preview.title'} = WebGUI::HTML::filter($form->process("title"),"all"); - ($var{'preview.synopsis'}, $var{'preview.content'}) = $self->getSynopsisAndContent($form->process("synopsis","textarea"), $form->process("content","HTMLArea")); - $var{'preview.content'} = $self->formatContent($var{'preview.content'},$form->process("contentType")); - for my $i (1..5) { - $var{'preview.userDefined'.$i} = WebGUI::HTML::filter($form->process('userDefined'.$i),"macros"); - } - } - $var{'form.footer' } = WebGUI::Form::formFooter($session); - $var{'usePreview' } = $self->getThread->getParent->get("usePreview"); - $var{'user.isModerator'} = $self->getThread->getParent->canModerate; - $var{'user.isVisitor' } = ($user->isVisitor); - $var{'visitorName.form'} = WebGUI::Form::text($session, { - name => "visitorName", - value => $form->process('visitorName') || $self->getValue("visitorName") - }); - - for my $x (1..5) { - my $userDefinedValue - = $form->process("userDefined".$x) - || $self->getValue("userDefined".$x) - ; - $var{'userDefined'.$x} = $userDefinedValue; - $var{'userDefined'.$x.'.form'} - = WebGUI::Form::text($session, { - name => "userDefined".$x, - value => $userDefinedValue, - }); - $var{'userDefined'.$x.'.form.yesNo'} - = WebGUI::Form::yesNo($session, { - name => "userDefined".$x, - value => $userDefinedValue, - }); - $var{'userDefined'.$x.'.form.textarea'} - = WebGUI::Form::textarea($session, { - name => "userDefined".$x, - value => $userDefinedValue, - }); - $var{'userDefined'.$x.'.form.htmlarea'} - = WebGUI::Form::HTMLArea($session, { - name => "userDefined".$x, - value => $userDefinedValue, - richEditId => ($self->isa("WebGUI::Asset::Post::Thread") - ? $self->getThread->getParent->get("richEditor") - : $self->getThread->getParent->get("replyRichEditor") - ), - }); - $var{'userDefined'.$x.'.form.float'} - = WebGUI::Form::Float($session, { - name => "userDefined".$x, - value => $userDefinedValue, - }); - } - - $title = WebGUI::HTML::filter($title,"all"); - $content = WebGUI::HTML::filter($content,"macros"); - $synopsis = WebGUI::HTML::filter($synopsis,"all"); - - $var{'title.form' } = WebGUI::Form::text($session, { - name=>"title", - value=>$title - }); - $var{'title.form.textarea'} = WebGUI::Form::textarea($session, { - name=>"title", - value=>$title - }); - $var{'synopsis.form'} = WebGUI::Form::textarea($session, { - name=>"synopsis", - value=>$synopsis, - }); - $var{'content.form'} = WebGUI::Form::HTMLArea($session, { - name=>"content", - value=>$content, - richEditId=>($self->isa("WebGUI::Asset::Post::Thread") ? - $self->getThread->getParent->get("richEditor") : - $self->getThread->getParent->get("replyRichEditor")), - }); - ##Edit variables just for Threads - if ($className eq 'WebGUI::Asset::Post::Thread' && $self->getThread->getParent->canEdit) { - $var{'sticky.form'} = WebGUI::Form::yesNo($session, { - name=>'isSticky', - value=>$form->process('isSticky') || $self->get('isSticky'), - }); - $var{'lock.form' } = WebGUI::Form::yesNo($session, { - name=>'isLocked', - value=>$form->process('isLocked') || $self->get('isLocked'), - }); - } - $var{'form.submit'} = WebGUI::Form::submit($session, { - extras=>"onclick=\"this.value='".$i18n->get(452)."'; this.form.func.value='editSave';return true;\"" - }); - $var{'form.cancel'} = WebGUI::Form::button( $session, { - name => "cancel", - value => $i18n->get("cancel"), - extras => 'onclick="history.go(-1)"', - }); - $var{'karmaScale.form'} = WebGUI::Form::integer($session, { - name=>"karmaScale", - defaultValue=>$self->getThread->getParent->get("defaultKarmaScale"), - value=>$self->getValue("karmaScale"), - }); - $var{karmaIsEnabled} = $session->setting->get("useKarma"); - $var{'form.preview'} = WebGUI::Form::submit($session, { - value=>$i18n->get("preview","Asset_Collaboration") - }); - my $numberOfAttachments = $self->getThread->getParent->getValue("attachmentsPerPost"); - $var{'attachment.form'} = WebGUI::Form::image($session, { - name=>"storageId", - value=>$self->get("storageId"), - maxAttachments=>$numberOfAttachments, - ##Removed deleteFileUrl, since it will go around the revision control system. - }) if ($numberOfAttachments); - - $var{'contentType.form'} = WebGUI::Form::contentType($session, { - name=>'contentType', - value=>$self->getValue("contentType") || "mixed", - }); - $var{'skipNotification.form'} = WebGUI::Form::yesNo($session, { - name=>'skip_notification', - value=>$form->get("skip_notification",'yesNo') || 0, - }); - if ($session->setting->get("metaDataEnabled") - && $self->getThread->getParent->get('enablePostMetaData')) { - my $meta = $self->getMetaDataFields(); - my $formGen = $form; - my @meta_loop = (); - foreach my $field (keys %{ $meta }) { - my $fieldType = $meta->{$field}{fieldType} || "Text"; - my $options = $meta->{$field}{possibleValues}; - # Add a "Select..." option on top of a select list to prevent from - # saving the value on top of the list when no choice is made. - if("\l$fieldType" eq "selectBox") { - $options = "|" . $i18n->get("select") . "\n" . $options; - } - my $form = WebGUI::Form::DynamicField->new($session, - name => "metadata_".$meta->{$field}{fieldId}, - uiLevel => 5, - value => $meta->{$field}{value}, - defaultValue => $meta->{$field}{defaultValue}, - extras => qq/title="$meta->{$field}{description}"/, - options => $options, - fieldType => $fieldType, - )->toHtml; - push @meta_loop, { - field => $form, - name => $meta->{$field}{fieldName}, - }; - my $fieldName = $meta->{$field}{fieldName}; - $fieldName =~ tr/ /_/; - $fieldName = lc $fieldName; - $var{'meta_'.$fieldName.'_form'} = $form; ##By name interface - } - $var{meta_loop} = \@meta_loop; - } - #keywords field - $var{'keywords.form'} = WebGUI::Form::text($session,{ - name => 'keywords', - value => $self->get('keywords'), - }); - - $self->getThread->getParent->appendTemplateLabels(\%var); - return $self->getThread->getParent->processStyle($self->processTemplate(\%var,$self->getThread->getParent->get("postFormTemplateId"))); -} - - #------------------------------------------------------------------- =head2 www_editSave ( ) @@ -1837,21 +1809,21 @@ We're extending www_editSave() here to deal with editing a post that has been de =cut -sub www_editSave { +override www_editSave => sub { my $self = shift; my $assetId = $self->session->form->param("assetId"); - if($assetId eq "new" && $self->getThread->getParent->getValue("useCaptcha")) { + if($assetId eq "new" && $self->getThread->getParent->useCaptcha) { my $captcha = $self->session->form->process("captcha","Captcha"); unless ($captcha) { return $self->www_edit; } } my $currentTag; - if ($assetId ne "new" && $self->get("status") eq "pending") { + if ($assetId ne "new" && $self->status eq "pending") { # When editting posts pending approval, temporarily switch to their version tag so # we don't get denied because it is locked $currentTag = WebGUI::VersionTag->getWorking($self->session, 1); - my $tag = WebGUI::VersionTag->new($self->session, $self->get("tagId")); + my $tag = WebGUI::VersionTag->new($self->session, $self->tagId); if ($tag) { if ($tag->getId eq $currentTag->getId) { undef $currentTag; # don't restore tag afterward if we are already using it @@ -1861,12 +1833,12 @@ sub www_editSave { } } } - my $output = $self->next::method(); + my $output = super(); if ($currentTag) { # Go back to our original tag $currentTag->setWorking; } return $output; -} +}; #------------------------------------------------------------------- @@ -1908,8 +1880,8 @@ sub www_showConfirmation { else { $collabSystem = $parent->getParent; } - my $templateId = $collabSystem->get('postReceivedTemplateId'); - my $template = WebGUI::Asset->new($self->session, $templateId); + my $templateId = $collabSystem->postReceivedTemplateId; + my $template = WebGUI::Asset->newById($self->session, $templateId); my %var = ( url => $url, ); @@ -1932,6 +1904,6 @@ sub www_view { return $self->getThread->www_view($self); } - +__PACKAGE__->meta->make_immutable; 1; diff --git a/lib/WebGUI/Asset/Post/Thread.pm b/lib/WebGUI/Asset/Post/Thread.pm index 0c69584c9..f520fd50a 100644 --- a/lib/WebGUI/Asset/Post/Thread.pm +++ b/lib/WebGUI/Asset/Post/Thread.pm @@ -1,7 +1,7 @@ package WebGUI::Asset::Post::Thread; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -11,17 +11,72 @@ package WebGUI::Asset::Post::Thread; #------------------------------------------------------------------- use strict; +use Moose; +use WebGUI::Definition::Asset; +extends 'WebGUI::Asset::Post'; +define assetName => ['assetName', 'Asset_Thread']; +define icon => 'thread.gif'; +define tableName => 'Thread'; +property subscriptionGroupId => ( + noFormPost => 1, + fieldType => "hidden", + default => '', + ); +property replies => ( + noFormPost => 1, + fieldType => "hidden", + default => 0, + ); +property isSticky => ( + label => ['sticky', 'Asset_Collaboration'], + fieldType => "yesNo", + default => 0 + ); +property isLocked => ( + label => ['lock', 'Asset_Collaboration'], + fieldType => "yesNo", + default => 0, + ); +property lastPostId => ( + noFormPost => 1, + fieldType => "hidden", + default => '', + ); +property lastPostDate => ( + noFormPost => 1, + fieldType => "dateTime", + default => 0, + ); +property karma => ( + noFormPost => 1, + fieldType => "integer", + default => 0, + ); +property karmaRank => ( + noFormPost => 1, + fieldType => "float", + default => 0, + ); +property karmaScale => ( + noFormPost => 1, + fieldType => "integer", + default => 10, + ); +property threadRating => ( + noFormPost => 1, + fieldType => "hidden", + default => undef, + ); + + use WebGUI::Asset::Template; use WebGUI::Asset::Post; -use WebGUI::Cache; use WebGUI::Group; use WebGUI::International; use WebGUI::Paginator; use WebGUI::SQL; -use WebGUI::Utility; use POSIX qw/ceil/; -our @ISA = qw(WebGUI::Asset::Post); #------------------------------------------------------------------- @@ -31,12 +86,12 @@ Extend the base method to handle creating a subscription group for this Thread. =cut -sub addRevision { - my $self = shift; - my $newSelf = $self->SUPER::addRevision(@_); +override addRevision => sub { + my $self = shift; + my $newSelf = super(); $newSelf->createSubscriptionGroup; return $newSelf; -} +}; #------------------------------------------------------------------- @@ -87,7 +142,7 @@ sub canReply { my $self = shift; my $userId = shift || $self->session->user->userId; return !$self->isThreadLocked - && $self->getParent->get("allowReplies") + && $self->getParent->allowReplies && $self->getParent->canPost( $userId ) ; } @@ -120,13 +175,13 @@ Extends the base method to increment the number of threads in the parent CS. =cut -sub commit { - my $self = shift; - $self->SUPER::commit; - if ($self->isNew) { - $self->getParent->incrementThreads($self->get("revisionDate"),$self->getId); - } -} +override commit => sub { + my $self = shift; + super(); + if ($self->isNew) { + $self->getParent->incrementThreads($self->revisionDate,$self->getId); + } +}; #------------------------------------------------------------------- # Override duplicateBranch here so that new posts get their threadId set correctly. @@ -139,9 +194,9 @@ to update the Thread with the lastPost information. =cut -sub duplicateBranch { +override duplicateBranch => sub { my $self = shift; - my $newAsset = $self->SUPER::duplicateBranch(@_); + my $newAsset = super(); foreach my $post (@{$newAsset->getPosts}) { $post->rethreadUnder($newAsset); @@ -149,7 +204,7 @@ sub duplicateBranch { $newAsset->normalizeLastPost; return $newAsset; -} +}; #------------------------------------------------------------------- @@ -162,7 +217,7 @@ already have one. sub createSubscriptionGroup { my $self = shift; - return undef if ($self->get("subscriptionGroupId")); + return undef if ($self->subscriptionGroupId); my $group = WebGUI::Group->new($self->session, "new"); $group->name($self->getId); $group->description("The group to store subscriptions for the thread ".$self->getId); @@ -174,71 +229,6 @@ sub createSubscriptionGroup { }); } -#------------------------------------------------------------------- -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift; - my $i18n = WebGUI::International->new($session,"Asset_Thread"); - push(@{$definition}, { - assetName=>$i18n->get('assetName'), - icon=>'thread.gif', - tableName=>'Thread', - className=>'WebGUI::Asset::Post::Thread', - properties=>{ - subscriptionGroupId => { - noFormPost=>1, - fieldType=>"hidden", - defaultValue=>'', - }, - replies => { - noFormPost=>1, - fieldType=>"hidden", - defaultValue=>0, - }, - isSticky => { - fieldType=>"yesNo", - defaultValue=>0 - }, - isLocked => { - fieldType=>"yesNo", - defaultValue=>0, - }, - lastPostId => { - noFormPost=>1, - fieldType=>"hidden", - defaultValue=>'', - }, - lastPostDate => { - noFormPost=>1, - fieldType=>"dateTime", - defaultValue=>undef - }, - karma => { - noFormPost=>1, - fieldType=>"integer", - defaultValue=>0 - }, - karmaRank => { - noFormPost=>1, - fieldType=>"float", - defaultValue=>0 - }, - karmaScale => { - noFormPost=>1, - fieldType=>"integer", - defaultValue=>10 - }, - threadRating => { - noFormPost=>1, - fieldType=>"hidden", - defaultValue=>undef - }, - }, - }); - return $class->SUPER::definition($session,$definition); -} - #------------------------------------------------------------------- =head2 DESTROY @@ -248,12 +238,11 @@ and next threads, and to delete the parent CS. =cut -sub DESTROY { - my $self = shift; - return undef unless defined $self; - $self->{_next}->DESTROY if (defined $self->{_next}); - $self->{_previous}->DESTROY if (defined $self->{_previous}); - $self->SUPER::DESTROY; +sub DEMOLISH { + my $self = shift; + return undef unless defined $self; + $self->{_next}->DESTROY if (defined $self->{_next}); + $self->{_previous}->DESTROY if (defined $self->{_previous}); } #------------------------------------------------------------------- @@ -264,10 +253,10 @@ Extends the base method to handle creating a new subscription group. =cut -sub duplicate { +override duplicate => sub { my $self = shift; my $session = $self->session; - my $copy = $self->SUPER::duplicate(@_); + my $copy = super(); my $key = 'subscriptionGroupId'; my $oldGroupId = $self->get($key); @@ -281,7 +270,7 @@ sub duplicate { } } return $copy; -} +}; #------------------------------------------------------------------- @@ -302,7 +291,7 @@ sub getAdjacentThread { my $sortCompareValue = $self->get($sortByField); # make sortBy safe to include directly in SQL - $sortBy = join('.', map { $session->db->dbh->quote_identifier($_) } split(/\./, $sortBy)); + $sortBy = join('.', map { $session->db->quote_identifier($_) } split(/\./, $sortBy)); my $versionTag = WebGUI::VersionTag->getWorking($session, 'nocreate'); my $tagId = $versionTag ? $versionTag->getId : undef; @@ -332,10 +321,10 @@ sub getAdjacentThread { ORDER BY $sortBy $sortOrder, assetData.revisionDate $sortOrder LIMIT 1 END_SQL - [$self->get('parentId'), $self->getId, $sortCompareValue, $tagId, $session->user->userId] + [$self->parentId, $self->getId, $sortCompareValue, $tagId, $session->user->userId] ); if ($id) { - return WebGUI::Asset->new($session, $id, $class, $version); + return WebGUI::Asset->newById($session, $id, $version); } return undef; } @@ -363,7 +352,7 @@ Override the base method to fetch the threadApprovalWorkflow from the parent CS. sub getAutoCommitWorkflowId { my $self = shift; - return $self->getThread->getParent->get("threadApprovalWorkflow"); + return $self->getThread->getParent->threadApprovalWorkflow; } #------------------------------------------------------------------- @@ -425,16 +414,16 @@ Extend the base method from Post to remove the pagination query fragment =cut -sub getThreadLinkUrl { +override getThreadLinkUrl => sub { my $self = shift; - my $url = $self->SUPER::getThreadLinkUrl(); + my $url = super(); $url =~ s/\?pn=\d+//; if ($url =~ m{;revision=\d+}) { $url =~ s/;revision/?revision/; } return $url; -} +}; #------------------------------------------------------------------- @@ -447,13 +436,13 @@ Fetches the last post in this thread, otherwise, returns itself. sub getLastPost { my $self = shift; - my $lastPostId = $self->get("lastPostId"); - my $lastPost; - if ($lastPostId) { - $lastPost = WebGUI::Asset::Post->new($self->session, $lastPostId); - } - return $lastPost if (defined $lastPost); - return $self; + my $lastPostId = $self->lastPostId; + return $self unless $lastPostId; + my $lastPost = eval { WebGUI::Asset->newById($self->session, $lastPostId); }; + if (Exception::Class->caught()) { + return $self; + } + return $lastPost; } #------------------------------------------------------------------- @@ -648,7 +637,7 @@ Returns a boolean indicating whether this thread is locked from new posts and ot sub isThreadLocked { my ($self) = @_; - return $self->get("isLocked"); + return $self->isLocked; } @@ -684,7 +673,7 @@ Increments the views counter for this thread. sub incrementViews { my ($self) = @_; - $self->update({views=>$self->get("views")+1}); + $self->update({views=>$self->views+1}); $self->getParent->incrementViews; } @@ -703,20 +692,6 @@ sub isMarkedRead { return $isRead; } -#------------------------------------------------------------------- - -=head2 isSticky ( ) - -Returns a boolean indicating whether this thread should be "stuck" a the top of the forum and not be sorted with the rest of the threads. - -=cut - -sub isSticky { - my ($self) = @_; - return $self->get("isSticky"); -} - - #------------------------------------------------------------------- =head2 isSubscribed ( ) @@ -727,7 +702,7 @@ Returns a boolean indicating whether the user is subscribed to this thread. sub isSubscribed { my $self = shift; - return $self->session->user->isInGroup($self->get("subscriptionGroupId")); + return $self->session->user->isInGroup($self->subscriptionGroupId); } #------------------------------------------------------------------- @@ -765,13 +740,13 @@ See WebGUI::Asset::prepareView() for details. =cut -sub prepareView { +override prepareView => sub { my $self = shift; - $self->SUPER::prepareView(); - my $template = WebGUI::Asset::Template->new($self->session, $self->getParent->get("threadTemplateId")); + super(); + my $template = WebGUI::Asset::Template->newById($self->session, $self->getParent->threadTemplateId); $template->prepare($self->getMetaDataAsTemplateVariables); $self->{_viewTemplate} = $template; -} +}; #------------------------------------------------------------------- @@ -782,35 +757,35 @@ Extend the base method from Post to process the karmaScale. =cut -sub postProcess { +override postProcess => sub { my $self = shift; if ($self->getParent->canEdit) { - my $karmaScale = $self->session->form->process("karmaScale","integer") || $self->getParent->get("defaultKarmaScale"); - my $karmaRank = $self->get("karma")/$karmaScale; + my $karmaScale = $self->session->form->process("karmaScale","integer") || $self->getParent->defaultKarmaScale; + my $karmaRank = $self->karma/$karmaScale; $self->update({karmaScale=>$karmaScale, karmaRank=>$karmaRank}); } - $self->SUPER::postProcess; -} + super(); +}; #------------------------------------------------------------------- -=head2 processPropertiesFromFormPost +=head2 processEditForm Extend the base method to do captcha processing. =cut -sub processPropertiesFromFormPost { +override processEditForm => sub { my $self = shift; - if ($self->isNew && $self->getParent->getValue('useCaptcha')) { + if ($self->isNew && $self->getParent->useCaptcha) { my $captchaOk = $self->session->form->process("captcha","Captcha"); return [ 'invalid captcha' ] unless $captchaOk; } - return $self->SUPER::processPropertiesFromFormPost; -} + return super(); +}; #------------------------------------------------------------------- @@ -821,15 +796,15 @@ the subscriptionGroup for this thread. =cut -sub purge { +override purge => sub { my $self = shift; $self->session->db->write("delete from Thread_read where threadId=?",[$self->getId]); - my $group = WebGUI::Group->new($self->session, $self->get("subscriptionGroupId")); + my $group = WebGUI::Group->new($self->session, $self->subscriptionGroupId); if ($group) { $group->delete; } - $self->SUPER::purge; -} + super(); +}; #------------------------------------------------------------------- @@ -843,22 +818,22 @@ An integer between 1 and 5 (5 being best) to rate this post with. =cut -sub rate { +override rate => sub { my $self = shift; my $rating = shift; return undef unless ($rating == -1 || $rating == 1); return undef if $self->hasRated; - $self->SUPER::rate($rating); + super(); ##Thread specific karma adjustment for CS if ($self->session->setting->get("useKarma")) { - my $poster = WebGUI::User->new($self->session, $self->get("ownerUserId")); - $poster->karma($rating*$self->getParent->get("karmaRatingMultiplier"),"collaboration rating","someone rated post ".$self->getId); + my $poster = WebGUI::User->new($self->session, $self->ownerUserId); + $poster->karma($rating*$self->getParent->karmaRatingMultiplier,"collaboration rating","someone rated post ".$self->getId); my $rater = WebGUI::User->new($self->session->user->userId); - $rater->karma(-$self->getParent->get("karmaSpentToRate"),"collaboration rating","spent karma to rate post ".$self->getId); + $rater->karma(-$self->getParent->karmaSpentToRate,"collaboration rating","spent karma to rate post ".$self->getId); } -} +}; #------------------------------------------------------------------- @@ -947,7 +922,7 @@ Subscribes the user to this thread. sub subscribe { my $self = shift; $self->createSubscriptionGroup; - my $group = WebGUI::Group->new($self->session,$self->get("subscriptionGroupId")); + my $group = WebGUI::Group->new($self->session,$self->subscriptionGroupId); $group->addUsers([$self->session->user->userId]); } @@ -973,12 +948,12 @@ Moves thread to the trash and updates reply counter on thread. =cut -sub trash { +override trash => sub { my $self = shift; - $self->SUPER::trash; + super(); $self->getParent->sumReplies; - if ($self->getParent->get("lastPostId") eq $self->getId) { - my $parentLineage = $self->getThread->get("lineage"); + if ($self->getParent->lastPostId eq $self->getId) { + my $parentLineage = $self->getThread->lineage; my ($id, $date) = $self->session->db->quickArray("select assetId, creationDate from asset where lineage like ? and assetId<>? and asset.state='published' and className like 'WebGUI::Asset::Post%' order by creationDate desc",[$parentLineage.'%', $self->getId]); @@ -989,7 +964,7 @@ sub trash { $self->getParent->setLastPost('',''); } } -} +}; #------------------------------------------------------------------- @@ -1061,8 +1036,8 @@ An optional user object to unsubscribe. If the object isn't passed, then it use sub unsubscribe { my $self = shift; my $user = shift || $self->session->user; - my $group = WebGUI::Group->new($self->session,$self->get("subscriptionGroupId")); - return unless $group; + my $group = WebGUI::Group->new($self->session,$self->subscriptionGroupId); + return if !$group; $group->deleteUsers([$user->userId]); } @@ -1100,14 +1075,14 @@ sub updateThreadRating { $parent->recalculateRating; } else { - $self->session->errorHandler->error("Couldn't get parent for thread ".$self->getId); + $self->session->log->error("Couldn't get parent for thread ".$self->getId); } } #------------------------------------------------------------------- -=head2 validParent +=head2 valid_parent_classes Make sure that the current session asset is a CS for pasting and adding checks. @@ -1115,10 +1090,8 @@ This is a class method. =cut -sub validParent { - my $class = shift; - my $session = shift; - return $session->asset->isa('WebGUI::Asset::Wobject::Collaboration'); +sub valid_parent_classes { + return [qw/WebGUI::Asset::Wobject::Collaboration/]; } #------------------------------------------------------------------- @@ -1134,12 +1107,13 @@ sub view { my $currentPost = shift || $self; $self->markRead; $self->incrementViews unless ($self->session->form->process("func") eq 'rate'); + my $cache = $self->session->cache; if ($self->session->user->isVisitor && !$self->session->form->process("layout")) { - my $out = WebGUI::Cache->new($self->session,"view_".$self->getId)->get; + my $out = eval{$cache->get("view_".$self->getId)}; return $out if $out; } $self->session->scratch->set("discussionLayout",$self->session->form->process("layout")) if ($self->session->form->process("layout")); - my $layout = $self->session->scratch->get("discussionLayout") || $self->session->user->profileField("discussionLayout"); + my $layout = $self->session->scratch->get("discussionLayout") || $self->session->user->get("discussionLayout"); my $var = $self->getTemplateVars; $self->getParent->appendTemplateLabels($var); @@ -1148,7 +1122,7 @@ sub view { $var->{'user.isModerator' } = $self->getParent->canModerate; $var->{'user.canPost' } = $self->getParent->canPost; $var->{'user.canReply' } = $self->canReply; - $var->{'repliesAllowed' } = $self->getParent->get("allowReplies"); + $var->{'repliesAllowed' } = $self->getParent->allowReplies; $var->{'layout.nested.url' } = $self->getLayoutUrl("nested"); $var->{'layout.flat.url' } = $self->getLayoutUrl("flat"); @@ -1162,7 +1136,7 @@ sub view { $var->{'thumbsUp.icon.url' } = $self->session->url->extras('thumbup.gif'); $var->{'thumbsDown.icon.url'} = $self->session->url->extras('thumbdown.gif'); - $var->{'isArchived' } = $self->get("status") eq "archived"; + $var->{'isArchived' } = $self->status eq "archived"; $var->{'archive.url' } = $self->getArchiveUrl; $var->{'unarchive.url' } = $self->getUnarchiveUrl; @@ -1189,10 +1163,10 @@ sub view { $var->{'transfer.karma.form'} .= WebGUI::Form::submit($self->session); $var->{'transfer.karma.form'} .= WebGUI::Form::formFooter($self->session); - my $p = WebGUI::Paginator->new($self->session,$self->getUrl,$self->getParent->get("postsPerPage")); + my $p = WebGUI::Paginator->new($self->session,$self->getUrl,$self->getParent->postsPerPage); my $sql = "select asset.assetId, asset.className, assetData.revisionDate as revisionDate, assetData.url as url from asset left join assetData on assetData.assetId=asset.assetId - where asset.lineage like ".$self->session->db->quote($self->get("lineage").'%') + where asset.lineage like ".$self->session->db->quote($self->lineage.'%') ." and asset.state='published' and asset.className like 'WebGUI::Asset::Post%' and assetData.revisionDate=(SELECT max(assetData.revisionDate) from assetData where assetData.assetId=asset.assetId @@ -1215,7 +1189,7 @@ sub view { $p->setDataByQuery($sql, undef, undef, undef, "url", $currentPageUrl); foreach my $dataSet (@{$p->getPageData()}) { next unless ($dataSet->{className} eq "WebGUI::Asset::Post" || $dataSet->{className} eq "WebGUI::Asset::Post::Thread"); #handle non posts! - my $reply = WebGUI::Asset::Post->new($self->session, $dataSet->{assetId}, $dataSet->{className}, $dataSet->{revisionDate}); + my $reply = WebGUI::Asset::Post->newById($self->session, $dataSet->{assetId}, $dataSet->{revisionDate}); $reply->{'_thread' } = $self; # caching thread for better performance my %replyVars = %{$reply->getTemplateVars}; $replyVars{isCurrent } = ($reply->getId eq $currentPost->getId); @@ -1237,12 +1211,12 @@ sub view { $var->{"search.url" } = $self->getParent->getSearchUrl; $var->{"collaboration.url" } = $self->getThread->getParent->getUrl; - $var->{'collaboration.title' } = $self->getParent->get("title"); - $var->{'collaboration.description'} = $self->getParent->get("description"); + $var->{'collaboration.title' } = $self->getParent->title; + $var->{'collaboration.description'} = $self->getParent->description; my $out = $self->processTemplate($var,undef,$self->{_viewTemplate}); if ($self->session->user->isVisitor && !$self->session->form->process("layout")) { - WebGUI::Cache->new($self->session,"view_".$self->getId)->set($out,$self->getThread->getParent->get("visitorCacheTimeout")); + eval{$cache->set("view_".$self->getId, $out, $self->getThread->getParent->visitorCacheTimeout)}; } return $out; } @@ -1361,8 +1335,8 @@ sub www_transferKarma { # cant have them giving more karma then they have if ($amount > 0 && $amount <= $self->session->user->karma) { $self->session->user->karma(-$amount, "Thread ".$self->getId, "Transferring karma to a thread."); - my $newKarma = $self->get("karma")+$amount; - my $karmaScale = $self->get("karmaScale") || 1; + my $newKarma = $self->karma+$amount; + my $karmaScale = $self->karmaScale || 1; $self->update({karma=>$newKarma,karmaRank=>$newKarma/$karmaScale}); } return $self->www_view; @@ -1477,23 +1451,25 @@ Renders self->view based upon current style, subject to timeouts. Returns Privil =cut sub www_view { - my $self = shift; - my $currentPost = shift; - return $self->session->privilege->noAccess() unless $self->canView; - my $check = $self->checkView; - return $check if (defined $check); - $self->session->http->setCacheControl($self->get("visitorCacheTimeout")) if ($self->session->user->isVisitor); - $self->session->http->sendHeader; - $self->prepareView; - my $style = $self->getParent->processStyle($self->getSeparator); - my ($head, $foot) = split($self->getSeparator,$style); - $self->session->output->print($head,1); - $self->session->output->print($self->view($currentPost)); - $self->session->output->print($foot,1); - return "chunked"; + my $self = shift; + my $currentPost = shift; + return $self->session->privilege->noAccess() unless $self->canView; + my $check = $self->checkView; + return $check if (defined $check); + my $cs = $self->getParent; + $self->session->response->setCacheControl($cs->visitorCacheTimeout) if ($self->session->user->isVisitor); + $self->session->response->sendHeader; + $self->prepareView; + my $style = $cs->processStyle($self->getSeparator); + my ($head, $foot) = split($self->getSeparator,$style); + $self->session->output->print($head,1); + $self->session->output->print($self->view($currentPost)); + $self->session->output->print($foot,1); + return "chunked"; } +__PACKAGE__->meta->make_immutable; 1; diff --git a/lib/WebGUI/Asset/Redirect.pm b/lib/WebGUI/Asset/Redirect.pm index 8c625924f..cfd5f1409 100644 --- a/lib/WebGUI/Asset/Redirect.pm +++ b/lib/WebGUI/Asset/Redirect.pm @@ -3,7 +3,7 @@ package WebGUI::Asset::Redirect; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -15,10 +15,41 @@ package WebGUI::Asset::Redirect; =cut use strict; -use WebGUI::Asset; use WebGUI::Macro; -our @ISA = qw(WebGUI::Asset); +use Moose; +use WebGUI::Definition::Asset; +extends 'WebGUI::Asset'; +define assetName => ['assetName', 'Asset_Redirect']; +define icon => 'redirect.gif'; +define tableName => 'redirect'; +property redirectUrl => ( + tab => "properties", + label => ['redirect url', 'Asset_Redirect'], + hoverHelp => ['redirect url description', 'Asset_Redirect'], + fieldType => 'url', + default => undef, + ); +property redirectType => ( + tab => "properties", + label => ['Redirect Type', 'Asset_Redirect'], + hoverHelp => ['redirect type description', 'Asset_Redirect'], + fieldType => 'selectBox', + default => 302, + options => \&_redirectType_options, + ); +sub _redirectType_options { + my $session = shift->session; + my $i18n = WebGUI::International->new($session, "Asset_Redirect"); + return { + 302 => $i18n->get('302 Moved Temporarily'), + 301 => $i18n->get('301 Moved Permanently'), + }; +} +has '+uiLevel' => ( + default => 9, +); + =head1 NAME @@ -40,56 +71,6 @@ These methods are available from this class: =cut - - -#------------------------------------------------------------------- - -=head2 definition ( definition ) - -Defines the properties of this asset. - -=head3 definition - -A hash reference passed in from a subclass definition. - -=cut - -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift; - my $i18n = WebGUI::International->new($session,"Asset_Redirect"); - push(@{$definition}, { - assetName=>$i18n->get('assetName'), - uiLevel => 9, - autoGenerateForms=>1, - icon=>'redirect.gif', - tableName=>'redirect', - className=>'WebGUI::Asset::Redirect', - properties=>{ - redirectUrl=>{ - tab => "properties", - label => $i18n->get('redirect url'), - hoverHelp => $i18n->get('redirect url description'), - fieldType => 'url', - defaultValue => undef - }, - redirectType=>{ - tab => "properties", - label => $i18n->get('Redirect Type'), - hoverHelp => $i18n->get('redirect type description'), - fieldType => 'selectBox', - defaultValue => 302, - options => { - 302 => $i18n->get('302 Moved Temporarily'), - 301 => $i18n->get('301 Moved Permanently'), - } - }, - }, - }); - return $class->SUPER::definition($session,$definition); -} - #------------------------------------------------------------------- =head2 exportHtml_view @@ -101,10 +82,10 @@ Override the method from AssetExportHtml to handle the redirect. sub exportHtml_view { my $self = shift; return $self->session->privilege->noAccess() unless $self->canView; - my $url = $self->get("redirectUrl"); + my $url = $self->redirectUrl; WebGUI::Macro::process($self->session, \$url); - return '' if ($url eq $self->get("url")); - $self->session->http->setRedirect($url); + return '' if ($url eq $self->url); + $self->session->response->setRedirect($url); return $self->session->style->process('', 'PBtmpl0000000000000060'); } @@ -118,8 +99,8 @@ Display the redirect url when in admin mode. sub view { my $self = shift; - if ($self->session->var->isAdminOn) { - return $self->getToolbar.' '.$self->getTitle.' '.$self->get('redirectUrl'); + if ($self->session->isAdminOn) { + return $self->getToolbar.' '.$self->getTitle.' '.$self->redirectUrl; } else { return ""; @@ -138,22 +119,25 @@ sub www_view { my $self = shift; return $self->session->privilege->noAccess() unless $self->canView; my $i18n = WebGUI::International->new($self->session, "Asset_Redirect"); - my $url = $self->get("redirectUrl"); + my $url = $self->redirectUrl; WebGUI::Macro::process($self->session, \$url); - if ($self->session->var->isAdminOn() && $self->canEdit) { - return $self->getAdminConsole->render($i18n->get("what do you want to do with this redirect").' + if ($self->session->isAdminOn() && $self->canEdit) { + return '

    ' . $i18n->get('assetName') . '

    ' + . $i18n->get("what do you want to do with this redirect").' ',$i18n->get("assetName")); + ' + ; } - unless ($url eq $self->get("url")) { - $self->session->http->setRedirect($url,$self->get('redirectType')); + unless ($url eq $self->url) { + $self->session->response->setRedirect($url,$self->redirectType); return undef; } return $i18n->get('self_referential'); } +__PACKAGE__->meta->make_immutable; 1; diff --git a/lib/WebGUI/Asset/RichEdit.pm b/lib/WebGUI/Asset/RichEdit.pm index 96f80e3d2..83d73aeb8 100644 --- a/lib/WebGUI/Asset/RichEdit.pm +++ b/lib/WebGUI/Asset/RichEdit.pm @@ -3,7 +3,7 @@ package WebGUI::Asset::RichEdit; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -15,13 +15,163 @@ package WebGUI::Asset::RichEdit; =cut use strict; -use WebGUI::Asset; use WebGUI::Form; -use WebGUI::Utility; use WebGUI::International; use JSON; +use Tie::IxHash; -our @ISA = qw(WebGUI::Asset); +use Moose; +use WebGUI::Definition::Asset; +extends 'WebGUI::Asset'; +define assetName => ['assetName', 'Asset_RichEdit']; +define icon => 'richEdit.gif'; +define tableName => 'RichEdit'; +property disableRichEditor => ( + fieldType => 'yesNo', + default => 0, + label => ['disable rich edit', 'Asset_RichEdit'], + hoverHelp => ['disable rich edit description', 'Asset_RichEdit'], + ); +property askAboutRichEdit => ( + fieldType => 'yesNo', + default => 0, + label => ['using rich edit', 'Asset_RichEdit'], + hoverHelp => ['using rich edit description', 'Asset_RichEdit'], + ); +property validElements => ( + fieldType => 'textarea', + default => 'a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]', + label => ['elements', 'Asset_RichEdit'], + hoverHelp => ['elements description', 'Asset_RichEdit'], + subtext => ['elements subtext', 'Asset_RichEdit'], + uiLevel => 9, + ); +property preformatted => ( + fieldType => 'yesNo', + default => 0, + label => ['preformatted', 'Asset_RichEdit'], + hoverHelp => ['preformatted description', 'Asset_RichEdit'], + uiLevel => 9, + ); +property editorWidth => ( + fieldType => 'integer', + default => 0, + label => ['editor width', 'Asset_RichEdit'], + hoverHelp => ['editor width description', 'Asset_RichEdit'], + uiLevel => 9, + ); +property editorHeight => ( + fieldType => 'integer', + default => 0, + label => ['editor height', 'Asset_RichEdit'], + hoverHelp => ['editor height description', 'Asset_RichEdit'], + uiLevel => 9, + ); +property sourceEditorWidth => ( + fieldType => 'integer', + default => 0, + label => ['source editor height', 'Asset_RichEdit'], + hoverHelp => ['source editor height description', 'Asset_RichEdit'], + ); +property sourceEditorHeight => ( + fieldType => 'integer', + default => 0, + label => ['source editor height', 'Asset_RichEdit'], + hoverHelp => ['source editor height description', 'Asset_RichEdit'], + ); +property useBr => ( + fieldType => 'yesNo', + default => 0, + label => ['use br', 'Asset_RichEdit'], + hoverHelp => ['use br description', 'Asset_RichEdit'], + uiLevel => 9, + ); +property removeLineBreaks => ( + fieldType => 'yesNo', + default => 0, + label => ['remove line breaks', 'Asset_RichEdit'], + hoverHelp => ['remove line breaks description', 'Asset_RichEdit'], + uiLevel => 9, + ); +property nowrap => ( + fieldType => 'yesNo', + default => 0, + label => ['no wrap', 'Asset_RichEdit'], + hoverHelp => ['no wrap description', 'Asset_RichEdit'], + uiLevel => 9, + ); +property directionality => ( + fieldType => 'selectBox', + default => 'ltr', + label => ['directionality', 'Asset_RichEdit'], + hoverHelp => ['directionality description', 'Asset_RichEdit'], + options => \&_directionality_options, + ); +sub _directionality_options { + my $session = shift->session; + my $i18n = WebGUI::International->new($session, 'Asset_RichEdit'); + return { + ltr=>$i18n->get('left to right'), + rtl=>$i18n->get('right to left'), + }; +} +property toolbarLocation => ( + fieldType => 'selectBox', + default => 'bottom', + label => ['toolbar location', 'Asset_RichEdit'], + hoverHelp => ['toolbar location description', 'Asset_RichEdit'], + options => \&_toolbarLocation_options, + ); +sub _toolbarLocation_options { + my $session = shift->session; + my $i18n = WebGUI::International->new($session, 'Asset_RichEdit'); + return { + top => $i18n->get('top'), + bottom => $i18n->get('bottom'), + }; +} +property cssFile => ( + fieldType => 'text', + default => undef, + label => ['css file', 'Asset_RichEdit'], + hoverHelp => ['css file description', 'Asset_RichEdit'], + ); +property toolbarRow1 => ( + fieldType => 'checkList', + default => undef, + label => '', + ); +property toolbarRow2 => ( + fieldType => 'checkList', + default => undef, + label => '', + ); +property toolbarRow3 => ( + fieldType => 'checkList', + default => undef, + label => '', + ); +property enableContextMenu => ( + fieldType => "yesNo", + default => 0, + label => ['enable context menu', 'Asset_RichEdit'], + hoverHelp => ['enable context menu description', 'Asset_RichEdit'], + ); +property inlinePopups => ( + fieldType => "yesNo", + default => 0, + label => ['inline popups', 'Asset_RichEdit'], + hoverHelp => ['inline popups description', 'Asset_RichEdit'], + ); +property allowMedia => ( + fieldType => "yesNo", + default => 0, + label => ['editForm allowMedia label', 'Asset_RichEdit'], + hoverHelp => ['editForm allowMedia description', 'Asset_RichEdit'], + ); +has '+uiLevel' => ( + default => 5, +); =head1 NAME @@ -45,406 +195,158 @@ These methods are available from this class: -#------------------------------------------------------------------- - -=head2 definition ( definition ) - -Defines the properties of this asset. - -=head3 definition - -A hash reference passed in from a subclass definition. - -=cut - -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift; - my $i18n = WebGUI::International->new($session,'Asset_RichEdit'); - push(@{$definition}, { - assetName => $i18n->get('assetName'), - icon => 'richEdit.gif', - uiLevel => 5, - tableName => 'RichEdit', - className => 'WebGUI::Asset::RichEdit', - properties => { - disableRichEditor => { - fieldType => 'yesNo', - defaultValue => 0, - }, - askAboutRichEdit => { - fieldType => 'yesNo', - defaultValue => 0, - }, - validElements => { - fieldType => 'textarea', - defaultValue => 'a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]', - }, - preformatted => { - fieldType => 'yesNo', - defaultValue => 0, - }, - editorWidth => { - fieldType => 'integer', - defaultValue => 0, - }, - editorHeight => { - fieldType => 'integer', - defaultValue => 0, - }, - sourceEditorWidth => { - fieldType => 'integer', - defaultValue => 0, - }, - sourceEditorHeight => { - fieldType => 'integer', - defaultValue => 0, - }, - useBr => { - fieldType => 'yesNo', - defaultValue => 0, - }, - removeLineBreaks => { - fieldType => 'yesNo', - defaultValue => 0, - }, - nowrap=>{ - fieldType => 'yesNo', - defaultValue => 0, - }, - directionality => { - fieldType => 'selectBox', - defaultValue => 'ltr', - }, - toolbarLocation => { - fieldType => 'selectBox', - defaultValue => 'bottom', - }, - cssFile => { - fieldType => 'text', - defaultValue => undef, - }, - toolbarRow1 => { - fieldType => 'checkList', - defaultValue => undef, - }, - toolbarRow2 => { - fieldType => 'checkList', - defaultValue => undef, - }, - toolbarRow3 => { - fieldType => 'checkList', - defaultValue => undef, - }, - enableContextMenu => { - fieldType => "yesNo", - defaultValue => 0, - }, - inlinePopups => { - fieldType => "yesNo", - defaultValue => 0, - }, - allowMedia => { - fieldType => "yesNo", - defaultValue => 0, - }, - }, - }); - return $class->SUPER::definition($session, $definition); -} - - - #------------------------------------------------------------------- =head2 getEditForm ( ) -Returns the TabForm object that will be used in generating the edit page for this asset. +Returns the WebGUI::FormBuilder object that will be used in generating the edit page for this asset. =cut -sub getEditForm { - my $self = shift; - my $tabform = $self->SUPER::getEditForm(); - my $i18n = WebGUI::International->new($self->session,'Asset_RichEdit'); - my %buttons; - tie %buttons, "Tie::IxHash"; - %buttons = ( - 'search' => $i18n->get('search'), - 'replace' => $i18n->get('replace'), - 'cut' => $i18n->get('cut'), - 'copy' => $i18n->get('Copy'), - 'paste' => $i18n->get('paste'), - 'pastetext' => $i18n->get('pastetext'), - 'pasteword' => $i18n->get('pasteword'), - 'undo' => $i18n->get('undo'), - 'redo' => $i18n->get('redo'), - 'bold' => $i18n->get('bold'), - 'italic' => $i18n->get('italic'), - 'underline' => $i18n->get('underline'), - 'strikethrough' => $i18n->get('strikethrough'), - 'justifyleft' => $i18n->get('justifyleft'), - 'justifycenter' => $i18n->get('justifycenter'), - 'justifyright' => $i18n->get('justifyright'), - 'justifyfull' => $i18n->get('justifyfull'), - 'bullist' => $i18n->get('bullist'), - 'numlist' => $i18n->get('numlist'), - 'outdent' => $i18n->get('outdent'), - 'indent' => $i18n->get('indent'), - 'sub' => $i18n->get('sub'), - 'sup' => $i18n->get('sup'), - 'styleselect' => $i18n->get('styleselect'), - 'formatselect' => $i18n->get('formatselect'), - 'fontselect' => $i18n->get('fontselect'), - 'fontsizeselect' => $i18n->get('fontsizeselect'), - 'forecolor' => $i18n->get('forecolor'), - 'backcolor' => $i18n->get('backcolor'), - 'link' => $i18n->get('link'), - 'wgpagetree' => $i18n->get('pagetree'), - 'anchor' => $i18n->get('anchor'), - 'unlink' => $i18n->get('unlink'), - 'tablecontrols' => $i18n->get('tablecontrols'), - 'visualaid' => $i18n->get('visualaid'), - 'hr' => $i18n->get('hr'), - 'advhr' => $i18n->get('advhr'), - 'inserttime' => $i18n->get('inserttime'), - 'insertdate' => $i18n->get('insertdate'), - 'image' => $i18n->get('image'), - 'wginsertimage' => $i18n->get('insertImage'), - 'media' => $i18n->get('media'), - 'charmap' => $i18n->get('charmap'), - 'wgmacro' => $i18n->get('collateral'), - 'emotions' => $i18n->get('emotions'), - 'help' => $i18n->get('help'), - 'iespell' => $i18n->get('iespell'), - 'removeformat' => $i18n->get('removeformat'), - 'code' => $i18n->get('code'), - 'cleanup' => $i18n->get('cleanup'), - 'save' => $i18n->get('save'), - 'preview' => $i18n->get('preview'), - 'fullscreen' => $i18n->get('fullscreen'), - 'print' => $i18n->get('print'), - 'spellchecker' => $i18n->get('Server Side Spell Checker'), -# 'advlink' => "Advanced Link", -# 'spacer' => "Toolbar Spacer", -# 'separator' => "Toolbar Separator", -# 'rowseparator' => "Toolbar Row Separator", -# 'advimage' => "Advanced Image", - ); - my $buttonGrid = sprintf qq! - - - - - - - !, - $i18n->get('button'), - $i18n->get('row 1'), - $i18n->get('row 2'), - $i18n->get('row 3'); - my @toolbarRow1 = split("\n",$self->getValue("toolbarRow1")); - my @toolbarRow2 = split("\n",$self->getValue("toolbarRow2")); - my @toolbarRow3 = split("\n",$self->getValue("toolbarRow3")); - my $evenOddToggle = 0; - foreach my $key (keys %buttons) { - $evenOddToggle = $evenOddToggle ? 0 : 1; - my $checked1 = isIn($key,@toolbarRow1); - my $checked2 = isIn($key,@toolbarRow2); - my $checked3 = isIn($key,@toolbarRow3); - $buttonGrid .= ' - - - - - - - '; - } - $buttonGrid .= "
    %s%s%s%s
    '.$buttons{$key}.''.WebGUI::Form::checkbox($self->session, { - value=>$key, - name=>"toolbarRow1", - checked=>$checked1 - }).''.WebGUI::Form::checkbox($self->session, { - value=>$key, - name=>"toolbarRow2", - checked=>$checked2 - }).''.WebGUI::Form::checkbox($self->session, { - value=>$key, - name=>"toolbarRow3", - checked=>$checked3 - }).''; - if ($key eq 'spellchecker' && !($self->session->config->get('availableDictionaries'))) { - $buttonGrid .= $i18n->get('no dictionaries'); - } - $buttonGrid .= '
    "; - $tabform->getTab("properties")->readOnly( - -label=>$i18n->get('toolbar buttons'), - -hoverHelp=>$i18n->get('toolbar buttons description'), - -value=>$buttonGrid - ); - $tabform->getTab("properties")->yesNo( - -value=>$self->getValue("disableRichEditor"), - -label=>$i18n->get('disable rich edit'), - -hoverHelp=>$i18n->get('disable rich edit description'), - -name=>"disableRichEditor" - ); - $tabform->getTab("properties")->yesNo( - -value=>$self->getValue("askAboutRichEdit"), - -label=>$i18n->get('using rich edit'), - -hoverHelp=>$i18n->get('using rich edit description'), - -name=>"askAboutRichEdit" - ); - $tabform->getTab("properties")->yesNo( - -value=>$self->getValue("preformatted"), - -label=>$i18n->get('preformatted'), - -hoverHelp=>$i18n->get('preformatted description'), - -name=>"preformatted", - -uiLevel=>9 - ); - $tabform->getTab("security")->textarea( - -value=>$self->getValue("validElements"), - -name=>"validElements", - -label=>$i18n->get('elements'), - -hoverHelp=>$i18n->get('elements description'), - -subtext=>$i18n->get('elements subtext'), - -uiLevel=>9 - ); - $tabform->getTab("display")->integer( - -value=>$self->getValue("editorHeight"), - -label=>$i18n->get('editor height'), - -hoverHelp=>$i18n->get('editor height description'), - -name=>"editorHeight", - -uiLevel=>9 - ); - $tabform->getTab("display")->integer( - -value=>$self->getValue("editorWidth"), - -label=>$i18n->get('editor width'), - -hoverHelp=>$i18n->get('editor width description'), - -name=>"editorWidth", - -uiLevel=>9 - ); - $tabform->getTab("display")->integer( - -value=>$self->getValue("sourceEditorHeight"), - -label=>$i18n->get('source editor height'), - -hoverHelp=>$i18n->get('source editor height description'), - -name=>"sourceEditorHeight" - ); - $tabform->getTab("display")->integer( - -value=>$self->getValue("sourceEditorWidth"), - -label=>$i18n->get('source editor width'), - -hoverHelp=>$i18n->get('source editor width description'), - -name=>"sourceEditorWidth" - ); - $tabform->getTab("properties")->yesNo( - -value=>$self->getValue("useBr"), - -label=>$i18n->get('use br'), - -hoverHelp=>$i18n->get('use br description'), - -name=>"useBr", - -uiLevel=>9 - ); - $tabform->getTab("properties")->yesNo( - -value=>$self->getValue("removeLineBreaks"), - -label=>$i18n->get('remove line breaks'), - -hoverHelp=>$i18n->get('remove line breaks description'), - -name=>"removeLineBreaks", - -uiLevel=>9 - ); - $tabform->getTab("display")->yesNo( - -value=>$self->getValue("nowrap"), - -label=>$i18n->get('no wrap'), - -hoverHelp=>$i18n->get('no wrap description'), - -name=>"nowrap", - -uiLevel=>9 - ); - $tabform->getTab("properties")->selectBox( - -value=>[$self->getValue("directionality")], - -label=>$i18n->get('directionality'), - -hoverHelp=>$i18n->get('directionality description'), - -name=>"directionality", - -options=>{ - ltr=>$i18n->get('left to right'), - rtl=>$i18n->get('right to left'), - } - ); - $tabform->getTab("display")->selectBox( - -value=>[$self->getValue("toolbarLocation")], - -label=>$i18n->get('toolbar location'), - -hoverHelp=>$i18n->get('toolbar location description'), - -name=>"toolbarLocation", - -options=>{ - top=>$i18n->get('top'), - bottom=>$i18n->get('bottom'), - } - ); - $tabform->getTab("properties")->text( - -value=>$self->getValue("cssFile"), - -label=>$i18n->get('css file'), - -hoverHelp=>$i18n->get('css file description'), - -name=>"cssFile" - ); - $tabform->getTab("properties")->yesNo( - -value=>$self->getValue("enableContextMenu"), - -label=>$i18n->get('enable context menu'), - -hoverHelp=>$i18n->get('enable context menu description'), - -name=>"enableContextMenu" - ); - $tabform->getTab("properties")->yesNo( - -value=>$self->getValue("inlinePopups"), - -label=>$i18n->get('inline popups'), - -hoverHelp=>$i18n->get('inline popups description'), - -name=>"inlinePopups" +override getEditForm => sub { + my $self = shift; + my $f = super(); + my $i18n = WebGUI::International->new($self->session,'Asset_RichEdit'); + my %buttons; + tie %buttons, "Tie::IxHash"; + %buttons = ( + 'formatselect' => $i18n->get('formatselect'), + 'styleselect' => $i18n->get('styleselect'), + 'fontselect' => $i18n->get('fontselect'), + 'fontsizeselect' => $i18n->get('fontsizeselect'), + 'bold' => $i18n->get('bold'), + 'italic' => $i18n->get('italic'), + 'underline' => $i18n->get('underline'), + 'strikethrough' => $i18n->get('strikethrough'), + 'sub' => $i18n->get('sub'), + 'sup' => $i18n->get('sup'), + 'justifyleft' => $i18n->get('justifyleft'), + 'justifycenter' => $i18n->get('justifycenter'), + 'justifyright' => $i18n->get('justifyright'), + 'numlist' => $i18n->get('numlist'), + 'outdent' => $i18n->get('outdent'), + 'indent' => $i18n->get('indent'), + 'forecolor' => $i18n->get('forecolor'), + 'backcolor' => $i18n->get('backcolor'), + 'link' => $i18n->get('link'), + 'unlink' => $i18n->get('unlink'), + 'wgpagetree' => $i18n->get('pagetree'), + 'image' => $i18n->get('image'), + 'wginsertimage' => $i18n->get('insertImage'), + 'media' => $i18n->get('media'), + 'emotions' => $i18n->get('emotions'), + 'wgmacro' => $i18n->get('collateral'), + 'hr' => $i18n->get('hr'), + 'advhr' => $i18n->get('advhr'), + 'inserttime' => $i18n->get('inserttime'), + 'insertdate' => $i18n->get('insertdate'), + 'anchor' => $i18n->get('anchor'), + 'tablecontrols' => $i18n->get('tablecontrols'), + 'visualaid' => $i18n->get('visualaid'), + 'charmap' => $i18n->get('charmap'), + 'search' => $i18n->get('search'), + 'replace' => $i18n->get('replace'), + 'cut' => $i18n->get('cut'), + 'copy' => $i18n->get('Copy'), + 'paste' => $i18n->get('paste'), + 'undo' => $i18n->get('undo'), + 'redo' => $i18n->get('redo'), + 'pastetext' => $i18n->get('pastetext'), + 'pasteword' => $i18n->get('pasteword'), + 'removeformat' => $i18n->get('removeformat'), + 'cleanup' => $i18n->get('cleanup'), + 'iespell' => $i18n->get('iespell'), + 'save' => $i18n->get('save'), + 'preview' => $i18n->get('preview'), + 'print' => $i18n->get('print'), + 'code' => $i18n->get('code'), + 'fullscreen' => $i18n->get('fullscreen'), + 'help' => $i18n->get('help'), +# 'advlink' => "Advanced Link", +# 'spacer' => "Toolbar Spacer", +# 'separator' => "Toolbar Separator", +# 'rowseparator' => "Toolbar Row Separator", +# 'advimage' => "Advanced Image", + ); + my $buttonGrid = sprintf qq! + + + + + + + !, + $i18n->get('button'), + $i18n->get('row 1'), + $i18n->get('row 2'), + $i18n->get('row 3'); + my @toolbarRow1 = split("\n",$self->toolbarRow1); + my @toolbarRow2 = split("\n",$self->toolbarRow2); + my @toolbarRow3 = split("\n",$self->toolbarRow3); + my $evenOddToggle = 0; + foreach my $key (keys %buttons) { + $evenOddToggle = $evenOddToggle ? 0 : 1; + my $checked1 = $key ~~ @toolbarRow1; + my $checked2 = $key ~~ @toolbarRow2; + my $checked3 = $key ~~ @toolbarRow3; + $buttonGrid .= ' + + + + + + + '; + } + $buttonGrid .= "
    %s%s%s%s
    '.$buttons{$key}.''.WebGUI::Form::checkbox($self->session, { + value=>$key, + name=>"toolbarRow1", + checked=>$checked1 + }).''.WebGUI::Form::checkbox($self->session, { + value=>$key, + name=>"toolbarRow2", + checked=>$checked2 + }).''.WebGUI::Form::checkbox($self->session, { + value=>$key, + name=>"toolbarRow3", + checked=>$checked3 + }).''; + $buttonGrid .= '
    "; + my $tab = $f->addTab(name => "buttons", label => $i18n->get("buttons") ); + $tab->addField( "ReadOnly", + label => $i18n->get('toolbar buttons'), + hoverHelp => $i18n->get('toolbar buttons description'), + value => $buttonGrid, ); - $tabform->getTab("properties")->yesNo( - value => $self->getValue("allowMedia"), - label => $i18n->get('editForm allowMedia label'), - hoverHelp => $i18n->get('editForm allowMedia description'), - name => "allowMedia", - ); - return $tabform; -} -#---------------------------------------------------------------------------- - -=head2 getAllButtons ( ) - -Get a list of all the buttons in this MCE - -=cut + return $f; +}; +# Get a list of all the buttons in this MCE sub getAllButtons { my ( $self ) = @_; - my @toolbarRows = map{[split "\n", $self->getValue("toolbarRow$_")]} (1..3); + my @toolbarRows = map{[split "\n", $self->get("toolbarRow$_")]} (1..3); my @toolbarButtons = map{ @{$_} } @toolbarRows; return @toolbarButtons; } -#---------------------------------------------------------------------------- - -=head2 getConfig ( ) - -Get a hashref of configuration to create this MCE. You must run the code -from getLoadPlugins before you can successfully initialize an MCE. You -must also specify the "elements" key so TinyMCE knows what textarea to -replace. - -=cut - +# Get a hashref of configuration to create this MCE. You must run the code +# from getLoadPlugins before you can successfully initialize an MCE. You +# must also specify the "elements" key so TinyMCE knows what textarea to +# replace. sub getConfig { my ($self) = @_; my $i18n = WebGUI::International->new($self->session, 'Asset_RichEdit'); my @plugins; push @plugins, "safari"; - push @plugins, "paste"; push @plugins, "contextmenu" - if $self->getValue("enableContextMenu"); + if $self->get("enableContextMenu"); push @plugins, "inlinepopups" - if $self->getValue("inlinePopups"); + if $self->get("inlinePopups"); push @plugins, "media" - if $self->getValue( 'allowMedia' ); + if $self->get( 'allowMedia' ); - my @toolbarRows = map{[split "\n", $self->getValue("toolbarRow$_")]} (1..3); + my @toolbarRows = map{[split "\n", $self->get("toolbarRow$_")]} (1..3); my @toolbarButtons = map{ @{$_} } @toolbarRows; my %config = ( mode => 'exact', @@ -458,27 +360,19 @@ sub getConfig { ( map { "theme_advanced_buttons" . ( $_ + 1 ) => ( join ',', @{ $toolbarRows[$_] } ) } ( 0 .. $#toolbarRows ) ), ask => JSON::false(), - preformatted => $self->getValue("preformatted") ? JSON::true() : JSON::false(), - force_br_newlines => $self->getValue("useBr") ? JSON::true() : JSON::false(), - force_p_newlines => $self->getValue("useBr") ? JSON::false() : JSON::true(), - $self->getValue("useBr") ? ( forced_root_block => JSON::false() ) : (), - remove_linebreaks => $self->getValue("removeLineBreaks") ? JSON::true() : JSON::false(), - nowrap => $self->getValue("nowrap") ? JSON::true() : JSON::false(), - directionality => $self->getValue("directionality"), - theme_advanced_toolbar_location => $self->getValue("toolbarLocation"), + preformatted => $self->get("preformatted") ? JSON::true() : JSON::false(), + force_br_newlines => $self->get("useBr") ? JSON::true() : JSON::false(), + force_p_newlines => $self->get("useBr") ? JSON::false() : JSON::true(), + $self->get("useBr") ? ( forced_root_block => JSON::false() ) : (), + remove_linebreaks => $self->get("removeLineBreaks") ? JSON::true() : JSON::false(), + nowrap => $self->get("nowrap") ? JSON::true() : JSON::false(), + directionality => $self->get("directionality"), + theme_advanced_toolbar_location => $self->get("toolbarLocation"), theme_advanced_statusbar_location => "bottom", - valid_elements => $self->getValue("validElements"), + valid_elements => $self->get("validElements"), wg_userIsVisitor => $self->session->user->isVisitor ? JSON::true() : JSON::false(), - paste_postprocess => 'tinyMCE_WebGUI_paste_postprocess', ); foreach my $button (@toolbarButtons) { - if ( $button eq "spellchecker" && $self->session->config->get('availableDictionaries') ) { - push( @plugins, "-wgspellchecker" ); - $config{spellchecker_rpc_url} = $self->session->url->gateway( '', "op=spellCheck" ); - $config{spellchecker_languages} = join( ',', - map { ( $_->{default} ? '+' : '' ) . $_->{name} . '=' . $_->{id} } - @{ $self->session->config->get('availableDictionaries') } ); - } push( @plugins, "table" ) if ( $button eq "tablecontrols" ); push( @plugins, "save" ) if ( $button eq "save" ); push( @plugins, "advhr" ) if ( $button eq "advhr" ); @@ -520,10 +414,10 @@ sub getConfig { push @plugins, "-wgmacro"; } if ( $button eq "code" ) { - $config{theme_advanced_source_editor_width} = $self->getValue("sourceEditorWidth") - if ( $self->getValue("sourceEditorWidth") > 0 ); - $config{theme_advanced_source_editor_height} = $self->getValue("sourceEditorHeight") - if ( $self->getValue("sourceEditorHeight") > 0 ); + $config{theme_advanced_source_editor_width} = $self->get("sourceEditorWidth") + if ( $self->get("sourceEditorWidth") > 0 ); + $config{theme_advanced_source_editor_height} = $self->get("sourceEditorHeight") + if ( $self->get("sourceEditorHeight") > 0 ); } } ## end foreach my $button (@toolbarButtons) my $language = $i18n->getLanguage( '', "languageAbbreviation" ); @@ -531,10 +425,10 @@ sub getConfig { $language = $i18n->getLanguage( "English", "languageAbbreviation" ); } $config{language} = $language; - $config{content_css} = $self->getValue("cssFile") + $config{content_css} = $self->get("cssFile") || $self->session->url->extras('tinymce-webgui/defaultcontent.css'); - $config{width} = $self->getValue("editorWidth") if ( $self->getValue("editorWidth") > 0 ); - $config{height} = $self->getValue("editorHeight") if ( $self->getValue("editorHeight") > 0 ); + $config{width} = $self->get("editorWidth") if ( $self->get("editorWidth") > 0 ); + $config{height} = $self->get("editorHeight") if ( $self->get("editorHeight") > 0 ); $config{plugins} = join( ",", @plugins ); return \%config; @@ -558,28 +452,18 @@ my $sql = "select asset.assetId, assetData.revisionDate from RichEdit left join my %richEditors; tie %richEditors, 'Tie::IxHash'; while (my ($id, $version) = $sth->array) { - $richEditors{$id} = WebGUI::Asset::RichEdit->new($session, $id, undef, $version)->getTitle; + $richEditors{$id} = WebGUI::Asset::RichEdit->newById($session, $id, $version)->getTitle; } $sth->finish; return \%richEditors; } -#------------------------------------------------------------------- - -=head2 getLoadPlugins ( ) - -Get the JS code to load the plugins for this MCE. Needs to be called once -on the page this MCE will be on - -=cut - +# Get the JS code to load the plugins for this MCE. Needs to be called once +# on the page this MCE will be on sub getLoadPlugins { my ( $self ) = @_; my %loadPlugins; for my $button ( $self->getAllButtons ) { - if ( $button eq 'spellchecker' ) { - $loadPlugins{wgspellchecker} = $self->session->url->extras("tinymce-webgui/plugins/wgspellchecker/editor_plugin.js"); - } if ( $button eq 'wginsertimage' ) { $loadPlugins{wginsertimage} = $self->session->url->extras("tinymce-webgui/plugins/wginsertimage/editor_plugin.js"); } @@ -598,22 +482,6 @@ sub getLoadPlugins { return $out; } -#------------------------------------------------------------------- - -=head2 getToolbar ( ) - -Returns a toolbar with a set of icons that hyperlink to functions that delete, edit, promote, demote, cut, and copy. - -=cut - -sub getToolbar { - my $self = shift; - return undef if ($self->getToolbarState); - return $self->SUPER::getToolbar(); -} - - - #------------------------------------------------------------------- =head2 getRichEditor ( $nameId ) @@ -629,18 +497,22 @@ for a HTML tag. sub getRichEditor { my $self = shift; - return '' if ($self->getValue('disableRichEditor')); + return '' if ($self->disableRichEditor); my $nameId = shift; my $i18n = WebGUI::International->new($self->session, 'Asset_RichEdit'); - my $ask = $self->getValue("askAboutRichEdit"); + my $ask = $self->askAboutRichEdit; # if ($ask) { # $config{oninit} = 'turnOffTinyMCE_'.$nameId; # } - $self->richedit_headTags; + $self->session->style->setScript($self->session->url->extras('yui/build/yahoo/yahoo-min.js'),{type=>"text/javascript"}); + $self->session->style->setScript($self->session->url->extras('yui/build/event/event-min.js'),{type=>"text/javascript"}); + $self->session->style->setScript($self->session->url->extras('tinymce/jscripts/tiny_mce/tiny_mce_src.js'),{type=>"text/javascript"}); + $self->session->style->setScript($self->session->url->extras("tinymce-webgui/callbacks.js"),{type=>"text/javascript"}); my $out = ''; if ($ask) { $out = q||.$i18n->get('Toggle editor').q||; } + $self->richedit_headTags; $out .= qq| EOSCRIPT - return $self->SUPER::getEditForm; -} ## end sub getEditForm + return super(); +}; ## end sub getEditForm #---------------------------------------------------------------------------- @@ -268,10 +241,10 @@ it is purchased. C is the WebGUI::Shop::TransactionItem for this item =cut -sub getPostPurchaseActions { +override getPostPurchaseActions => sub { my ( $self, $item ) = @_; my $session = $self->session; - my $opts = $self->SUPER::getPostPurchaseActions(); + my $opts = super(); my $i18n = WebGUI::International->new( $session, "Asset_ThingyRecord" ); my $recordId = $item->get('options')->{recordId}; @@ -280,7 +253,7 @@ sub getPostPurchaseActions { = $self->getUrl( 'func=editRecord;recordid=' . $recordId ); return $opts; -} +}; #---------------------------------------------------------------------------- @@ -292,8 +265,8 @@ Get the price sub getPrice { my ($self) = @_; - my $price = $self->get('price'); - my $fieldPrice = JSON->new->decode( $self->get('fieldPrice') || '{}' ); + my $price = $self->price; + my $fieldPrice = JSON->new->decode( $self->fieldPrice || '{}' ); my $option = $self->getOptions; my $record = $RECORD_CLASS->new( $self->session, $option->{recordId} ); my $fields = JSON->new->decode( $record->get('fields') ); @@ -367,7 +340,7 @@ sub getThingOptions { tie my %things, 'Tie::IxHash', ( $session->db->buildHash( "SELECT thingId, label FROM Thingy_things WHERE assetId=?", [ $thingy->getId ] ) ); - $options{ $thingy->get('title') } = \%things; + $options{ $thingy->title } = \%things; } return \%options; @@ -383,7 +356,7 @@ Get a row of data from a thing. Returns a hashref sub getThingRecord { my ( $self, $thingId, $recordId ) = @_; - my $table = $self->session->db->dbh->quote_identifier( "Thingy_" . $thingId ); + my $table = $self->session->db->quote_identifier( "Thingy_" . $thingId ); return $self->session->db->quickHashRef( "SELECT * FROM " . $table . " WHERE thingDataId=?", [$recordId] ); } @@ -399,9 +372,9 @@ sub getThingy { my ($self) = @_; my $thingyId = $self->session->db->quickScalar( "SELECT assetId FROM Thingy_things WHERE thingId=?", - [ $self->get('thingId') ], + [ $self->thingId ], ); - return WebGUI::Asset->newByDynamicClass( $self->session, $thingyId ); + return WebGUI::Asset->newById( $self->session, $thingyId ); } #------------------------------------------------------------------- @@ -423,7 +396,7 @@ sub onCompletePurchase { # Update record $record->update( { - expires => $now + $self->get('duration'), + expires => $now + $self->duration, transactionId => $item->transaction->getId, isHidden => 0, } @@ -431,26 +404,26 @@ sub onCompletePurchase { # Add to thingy data my $data = JSON->new->decode( $record->get('fields') ); - $self->updateThingRecord( $self->get('thingId'), $record->getId, $data ); + $self->updateThingRecord( $self->thingId, $record->getId, $data ); } elsif ( $option->{action} eq "renew" ) { # Renew a currently active record if ( $record->get('expires') > $now ) { - $record->update( { expires => $record->get('expires') + $self->get('duration'), } ); + $record->update( { expires => $record->get('expires') + $self->duration, } ); } # Renew an expired but not deleted record else { $record->update( { - expires => $now + $self->get('duration'), + expires => $now + $self->duration, isHidden => 0, } ); # Add to thingy data my $data = JSON->new->decode( $record->get('fields') ); - $self->updateThingRecord( $self->get('thingId'), $record->getId, $data ); + $self->updateThingRecord( $self->thingId, $record->getId, $data ); } } ## end elsif ( $option->{action}...) } ## end sub onCompletePurchase @@ -484,13 +457,13 @@ See WebGUI::Asset::prepareView() for details. =cut -sub prepareView { +override prepareView => sub { my $self = shift; - $self->SUPER::prepareView(); - my $template = WebGUI::Asset::Template->new( $self->session, $self->get("templateIdView") ); + super(); + my $template = WebGUI::Asset::Template->newById( $self->session, $self->templateIdView ); $template->prepare( $self->getMetaDataAsTemplateVariables ); $self->{_viewTemplate} = $template; -} +}; #------------------------------------------------------------------- @@ -503,9 +476,9 @@ Process the edit record form and return the record sub processEditRecordForm { my ($self) = @_; my $var = {}; - my $fieldPrice = JSON->new->decode( $self->get('fieldPrice') ); + my $fieldPrice = JSON->new->decode( $self->fieldPrice ); - my $fields = $self->getThingFields( $self->get('thingId') ); + my $fields = $self->getThingFields( $self->thingId ); for my $field ( @{$fields} ) { my $fieldName = 'field_' . $field->{fieldId}; my $fieldType = $field->{fieldType}; @@ -531,7 +504,7 @@ Remove all collateral associated with the ThingyRecord sku =cut -sub purge { +override purge => sub { my $self = shift; my $options = { constraints => [ { 'assetId = ?' => $self->getId } ] }; @@ -543,8 +516,8 @@ sub purge { # XXX: Should we also remove the records from the Thingy? - return $self->SUPER::purge; -} + return super(); +}; #------------------------------------------------------------------- @@ -583,7 +556,7 @@ sub view { $var->{isNew} = 1; $var->{message} = $options->{addedToCart} - ? $self->get('thankYouText') + ? $self->thankYouText : $options->{message}; if ( $options->{addedToCart} ) { $var->{addedToCart} = 1; @@ -680,7 +653,7 @@ sub www_editRecord { ); } - return $self->processStyle( $self->processTemplate( $var, $self->get('templateIdView') ) ); + return $self->processStyle( $self->processTemplate( $var, $self->templateIdView ) ); } ## end sub www_editRecord #---------------------------------------------------------------------------- @@ -709,10 +682,10 @@ sub www_editRecordSave { ); if ($hide) { - $self->deleteThingRecord( $self->get('thingId'), $recordId ); + $self->deleteThingRecord( $self->thingId, $recordId ); } else { - $self->updateThingRecord( $self->get('thingId'), $recordId, $recordData ); + $self->updateThingRecord( $self->thingId, $recordId, $recordData ); } return $self->www_editRecord( { message => $i18n->get('saved') } ); @@ -744,6 +717,7 @@ sub www_renew { return $self->www_editRecord( { message => $i18n->get('renewal added to cart') . ' ^ViewCart;' } ); } ## end sub www_renew +__PACKAGE__->meta->make_immutable; 1; #vim:ft=perl diff --git a/lib/WebGUI/Asset/Snippet.pm b/lib/WebGUI/Asset/Snippet.pm index 03d56192e..a20b5455c 100644 --- a/lib/WebGUI/Asset/Snippet.pm +++ b/lib/WebGUI/Asset/Snippet.pm @@ -3,7 +3,7 @@ package WebGUI::Asset::Snippet; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -15,14 +15,101 @@ package WebGUI::Asset::Snippet; =cut use strict; -use WebGUI::Asset; +use Moose; +use WebGUI::Definition::Asset; +extends 'WebGUI::Asset'; use WebGUI::Asset::Template; use WebGUI::Macro; use HTML::Packer; use JavaScript::Packer; use CSS::Packer; -our @ISA = qw(WebGUI::Asset); +define assetName => ['assetName','Asset_Snippet']; +define icon => 'snippet.gif'; +define tableName => 'snippet'; + +property snippet => ( + fieldType => 'codearea', + tab => "properties", + label => ['assetName','Asset_Snippet'], + hoverHelp => ['snippet description','Asset_Snippet'], + default => undef, + trigger => \&_trigger_snippet, +); +sub _trigger_snippet { + my $self = shift; + my ($new, $old) = @_; + if ($new ne $old) { + $self->_clear_snippetPacked; + } +} +property snippetPacked => ( + fieldType => "hidden", + noFormPost => 1, + lazy => 1, + clearer => '_clear_snippetPacked', + builder => '_build_snippetPacked', +); + +sub _build_snippetPacked { + my $self = shift; + my $snippet = $self->snippet; + if ( !defined $snippet ) { + # do nothing + } + elsif ( $self->mimeType eq "text/html" ) { + HTML::Packer::minify( \$snippet, { + do_javascript => "shrink", + do_stylesheet => "minify", + } ); + } + elsif ( $self->mimeType eq "text/css" ) { + CSS::Packer::minify( \$snippet, { + compress => 'minify', + }); + } + elsif ( $self->mimeType eq 'text/javascript' ) { + JavaScript::Packer::minify( \$snippet, { + compress => "shrink", + }); + } + $snippet; +} + +property usePacked => ( + tab => 'properties', + fieldType => 'yesNo', + label => ['usePacked label','Asset_Snippet'], + hoverHelp => ['usePacked description','Asset_Snippet'], + default => 0, +); +property cacheTimeout => ( + tab => "display", + fieldType => "interval", + default => 3600, + uiLevel => 8, + label => ["cache timeout",'Asset_Snippet'], + hoverHelp => ["cache timeout help",'Asset_Snippet'], +); +property mimeType => ( + tab => "properties", + hoverHelp => ['mimeType description','Asset_Snippet'], + label => ['mimeType','Asset_Snippet'], + fieldType => 'mimeType', + default => 'text/html', +); +property templateParser => ( + fieldType => 'templateParser', + allowNone => 1, + label => ['parser','Asset_Template'], + hoverHelp => ['parser description','Asset_Template'], + tab => 'properties', + defaultValue => '', + ); + +has '+uiLevel' => ( + default => 5, +); =head1 NAME @@ -31,13 +118,16 @@ Package WebGUI::Asset::Snippet =head1 DESCRIPTION -Provides a mechanism to publish arbitrary code snippets to WebGUI for reuse in other pages. Can be used for things like HTML segments, javascript, and cascading style sheets. You can also specify the MIME type of the snippet, allowing you to serve XML, CSS and other text files directly from the WebGUI asset system and have browsers recognize them correctly. +Provides a mechanism to publish arbitrary code snippets to WebGUI for reuse +in other pages. Can be used for things like HTML segments, javascript, and +cascading style sheets. You can also specify the MIME type of the snippet, +allowing you to serve XML, CSS and other text files directly from the WebGUI +asset system and have browsers recognize them correctly. =head1 SYNOPSIS use WebGUI::Asset::Snippet; - =head1 METHODS These methods are available from this class: @@ -46,98 +136,6 @@ These methods are available from this class: -#------------------------------------------------------------------- - -=head2 definition ( definition ) - -Defines the properties of this asset. - -=head3 definition - -A hash reference passed in from a subclass definition. - -=cut - -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift; - my $i18n = WebGUI::International->new($session,"Asset_Snippet"); - my $t18n = WebGUI::International->new($session,'Asset_Template'); - my %properties; - tie %properties, 'Tie::IxHash'; - %properties = ( - snippet=>{ - fieldType=>'codearea', - tab=>"properties", - label=>$i18n->get('assetName'), - hoverHelp=>$i18n->get('snippet description'), - defaultValue=>undef, - filter => "packSnippet", - }, - snippetPacked => { - fieldType => "hidden", - defaultValue => undef, - noFormPost => 1, - }, - usePacked => { - tab => 'properties', - fieldType => 'yesNo', - label => $i18n->get('usePacked label'), - hoverHelp => $i18n->get('usePacked description'), - defaultValue => 0, - }, - cacheTimeout => { - tab => "display", - fieldType => "interval", - defaultValue => 3600, - uiLevel => 8, - label => $i18n->get("cache timeout"), - hoverHelp => $i18n->get("cache timeout help") - }, - templateParser => { - fieldType => 'templateParser', - allowNone => 1, - label => $t18n->get('parser'), - hoverHelp => $t18n->get('parser description'), - tab => 'properties', - defaultValue => '', - }, - mimeType=>{ - tab=>"properties", - hoverHelp=>$i18n->get('mimeType description'), - label=>$i18n->get('mimeType'), - fieldType=>'mimeType', - defaultValue=>'text/html' - } - - ); - push(@{$definition}, { - assetName=>$i18n->get('assetName'), - uiLevel => 5, - icon=>'snippet.gif', - autoGenerateForms=>1, - tableName=>'snippet', - className=>'WebGUI::Asset::Snippet', - properties=>\%properties - }); - return $class->SUPER::definition($session,$definition); -} - -#------------------------------------------------------------------- - -=head2 addRevision ( properties, ... ) - -Force the packed snippet to be regenerated. - -=cut - -sub addRevision { - my ( $self, $properties, @args ) = @_; - delete $properties->{ snippetPacked }; - return $self->SUPER::addRevision( $properties, @args ); -} - #------------------------------------------------------------------- =head2 exportGetUrlAsPath ( index ) @@ -178,91 +176,19 @@ sub exportGetUrlAsPath { #------------------------------------------------------------------- -=head2 getCache ( $calledAsWebMethod ) - -Overrides the base method to handle Snippet specific caching. - -=head3 $calledAsWebMethod - -If this is true, then change the cache key. - -=cut - -sub getCache { - my $self = shift; - my $calledAsWebMethod = shift; - my $session = $self->session; - my $cacheKey = "view_".$calledAsWebMethod.'_'.$self->getId; - if ($session->env->sslRequest) { - $cacheKey .= '_ssl'; - } - my $cache = WebGUI::Cache->new($session, $cacheKey); - return $cache; -} - -#------------------------------------------------------------------- - -=head2 getToolbar ( ) - -Returns a toolbar with a set of icons that hyperlink to functions that delete, edit, promote, demote, cut, and copy. - -=cut - -sub getToolbar { - my $self = shift; - return undef if ($self->getToolbarState); - return '

    '.$self->SUPER::getToolbar().'

    '; -} - -#------------------------------------------------------------------- - =head2 indexContent ( ) Indexing the content of the snippet. See WebGUI::Asset::indexContent() for additonal details. =cut -sub indexContent { +around indexContent => sub { + my $orig = shift; my $self = shift; - my $indexer = $self->SUPER::indexContent; - $indexer->addKeywords($self->get("snippet")); + my $indexer = $self->$orig(@_); + $indexer->addKeywords($self->snippet); $indexer->setIsPublic(0); -} - -#------------------------------------------------------------------- - -=head2 packSnippet ( unpacked ) - -Pack the snippet if possible. We can pack HTML, CSS, and JS snippets. - -=cut - -sub packSnippet { - my ( $self, $unpacked ) = @_; - return $unpacked if !$unpacked; - my $packed = $unpacked; - - if ( $self->get('mimeType') eq "text/html" ) { - HTML::Packer::minify( \$packed, { - do_javascript => "shrink", - do_stylesheet => "minify", - } ); - } - elsif ( $self->get('mimeType') eq "text/css" ) { - CSS::Packer::minify( \$packed, { - compress => 'minify', - }); - } - elsif ( $self->get('mimeType') eq 'text/javascript' ) { - JavaScript::Packer::minify( \$packed, { - compress => "shrink", - }); - } - - $self->update({ snippetPacked => $packed }); - - return $unpacked; -} +}; #------------------------------------------------------------------- @@ -272,15 +198,29 @@ Extending purgeCache to handle caching of the rendered snippet =cut -sub purgeCache { +override purgeCache => sub { my $self = shift; + my $cache = $self->session->cache; + eval { + $cache->remove("view__".$self->getId); + $cache->remove("view_1_".$self->getId); + $cache->remove("view__".$self->getId . '_ssl'); + $cache->remove("view_1_".$self->getId . '_ssl'); + }; + super(); +}; - WebGUI::Cache->new($self->session,"view__".$self->getId)->delete; - WebGUI::Cache->new($self->session,"view_1_".$self->getId)->delete; - WebGUI::Cache->new($self->session,"view__".$self->getId."_ssl")->delete; - WebGUI::Cache->new($self->session,"view_1_".$self->getId."_ssl")->delete; - $self->SUPER::purgeCache(); -} +#------------------------------------------------------------------- + +=head2 snippet ( value ) + +Returns the snippet's content. + +=head3 value + +If specified, sets the value, and also packs the content and inserts it into packedSnippet. + +=cut #------------------------------------------------------------------- @@ -301,28 +241,27 @@ sub view { my $session = $self->session; my $versionTag = WebGUI::VersionTag->getWorking($session, 1); my $noCache = - $session->var->isAdminOn - || $self->get("cacheTimeout") <= 10 - || ($versionTag && $versionTag->getId eq $self->get("tagId")); + $session->isAdminOn + || $self->cacheTimeout <= 10 + || ($versionTag && $versionTag->getId eq $self->tagId); + my $cacheKey = $self->getWwwCacheKey('view', $calledAsWebMethod); unless ($noCache) { - my $cache = $self->getCache($calledAsWebMethod); - my $out = $cache->get if defined $cache; + my $out = $session->cache->get( $cacheKey ); return $out if $out; } my $output = $self->get('usePacked') ? $self->get("snippetPacked") : $self->get('snippet') ; - $output = $self->getToolbar.$output if ($session->var->isAdminOn && !$calledAsWebMethod); - if (my $parser = $self->getValue('templateParser')) { + $output = $self->getToolbar.$output if ($session->isAdminOn && !$calledAsWebMethod); + if (my $parser = $self->templateParser) { $output = WebGUI::Asset::Template->processRaw( $session, $output, $self->get, $parser ); } WebGUI::Macro::process($session,\$output); unless ($noCache) { - my $cache = $self->getCache($calledAsWebMethod); - $cache->set($output,$self->get("cacheTimeout")); + $session->cache->set( $cacheKey, $output, $self->cacheTimeout); } return $output; } @@ -338,9 +277,9 @@ A web accessible version of the view method. sub www_view { my $self = shift; return $self->session->privilege->insufficient() unless $self->canView; - my $mimeType=$self->getValue('mimeType'); - $self->session->http->setMimeType($mimeType || 'text/html'); - $self->session->http->setCacheControl($self->get("cacheTimeout")); + my $mimeType=$self->mimeType; + $self->session->response->content_type($mimeType || 'text/html'); + $self->session->response->setCacheControl($self->cacheTimeout); my $output = $self->view(1); if (!defined $output) { $output = 'empty'; @@ -348,6 +287,6 @@ sub www_view { return $output; } - +__PACKAGE__->meta->make_immutable; 1; diff --git a/lib/WebGUI/Asset/Story.pm b/lib/WebGUI/Asset/Story.pm index 928984c01..a2389e7ce 100644 --- a/lib/WebGUI/Asset/Story.pm +++ b/lib/WebGUI/Asset/Story.pm @@ -3,7 +3,7 @@ package WebGUI::Asset::Story; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -15,10 +15,62 @@ package WebGUI::Asset::Story; =cut use strict; -use Class::C3; -use base 'WebGUI::Asset'; -use Tie::IxHash; -use WebGUI::Utility; +use Moose; +use WebGUI::Definition::Asset; +extends 'WebGUI::Asset'; +define assetName => ['assetName', 'Asset_Story']; +define icon => 'story.gif'; +define tableName => 'Story'; +property headline => ( + fieldType => 'text', + label => ['headline', 'Asset_Story'], + hoverHelp => ['headline help', 'Asset_Story'], + default => '', + ); +property subtitle => ( + fieldType => 'text', + label => ['subtitle', 'Asset_Story'], + hoverHelp => ['subtitle help', 'Asset_Story'], + default => '', + ); +property byline => ( + fieldType => 'text', + label => ['byline', 'Asset_Story'], + hoverHelp => ['byline help', 'Asset_Story'], + default => '', + ); +property location => ( + fieldType => 'text', + label => ['location', 'Asset_Story'], + hoverHelp => ['location help', 'Asset_Story'], + default => '', + ); +property highlights => ( + fieldType => 'textarea', + label => ['highlights', 'Asset_Story'], + hoverHelp => ['highlights help', 'Asset_Story'], + default => '', + ); +property story => ( + fieldType => 'HTMLArea', + label => ['highlights', 'Asset_Story'], + hoverHelp => ['highlights help', 'Asset_Story'], + richEditId => \&_story_richEditId, + default => '', + ); +sub _story_richEditId { + my $self = shift; + # return $self->parent->getStoryRichEdit; + return undef; +} +property photo => ( + fieldType => 'textarea', + default => '[]', + noFormPost => 1, + ); + +with 'WebGUI::Role::Asset::AlwaysHidden'; + use WebGUI::International; use JSON qw/from_json to_json/; @@ -63,16 +115,16 @@ Request autocommit. =cut -sub addRevision { +around addRevision => sub { + my $orig = shift; my $self = shift; - my $session = $self->session; - my $newSelf = $self->next::method(@_); + my $newSelf = $self->$orig(@_); my $newPhotoData = $newSelf->duplicatePhotoData; $newSelf->setPhotoData($newPhotoData); return $newSelf; -} +}; #------------------------------------------------------------------- @@ -82,95 +134,17 @@ You can't add children to a Story. =cut -sub canEdit { +around canEdit => sub { + my $orig = shift; my $self = shift; my $userId = shift || $self->session->user->userId; - if ($userId eq $self->get("ownerUserId")) { + if ($userId eq $self->ownerUserId) { return 1; } my $user = WebGUI::User->new($self->session, $userId); - return $self->SUPER::canEdit($userId) + return $self->$orig($userId) || $self->getArchive->canPostStories($userId); -} - -#------------------------------------------------------------------- - -=head2 definition ( session, definition ) - -defines asset properties for New Asset instances. You absolutely need -this method in your new Assets. - -=head3 session - -=head3 definition - -A hash reference passed in from a subclass definition. - -=cut - -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift; - my %properties; - tie %properties, 'Tie::IxHash'; - my $i18n = WebGUI::International->new($session, 'Asset_Story'); - %properties = ( - headline => { - fieldType => 'text', - #label => $i18n->get('headline'), - #hoverHelp => $i18n->get('headline help'), - defaultValue => '', - }, - subtitle => { - fieldType => 'text', - #label => $i18n->get('subtitle'), - #hoverHelp => $i18n->get('subtitle help'), - defaultValue => '', - }, - byline => { - fieldType => 'text', - #label => $i18n->get('byline'), - #hoverHelp => $i18n->get('byline help'), - defaultValue => '', - }, - location => { - fieldType => 'text', - #label => $i18n->get('location'), - #hoverHelp => $i18n->get('location help'), - defaultValue => '', - }, - highlights => { - fieldType => 'textarea', - #label => $i18n->get('highlights'), - #hoverHelp => $i18n->get('highlights help'), - defaultValue => '', - }, - story => { - fieldType => 'HTMLArea', - #label => $i18n->get('highlights'), - #hoverHelp => $i18n->get('highlights help'), - #richEditId => $self->parent->getStoryRichEdit, - defaultValue => '', - }, - photo => { - fieldType => 'textarea', - defaultValue => '[]', - noFormPost => 1, - autoGenerate => 0, - }, - ); - push(@{$definition}, { - assetName => $i18n->get('assetName'), - icon => 'story.gif', - tableName => 'Story', - className => 'WebGUI::Asset::Story', - properties => \%properties, - autoGenerateForms => 0, - }); - return $class->next::method($session, $definition); -} - +}; #------------------------------------------------------------------- @@ -237,9 +211,9 @@ Overriden to include any topics in which this story would appear. =cut -sub exportGetRelatedAssetIds { +override exportGetRelatedAssetIds => sub { my $self = shift; - my $rel = $self->SUPER::exportGetRelatedAssetIds(@_); + my $rel = super(); push @$rel, @{ WebGUI::Keyword->new($self->session)->getMatchingAssets({ keywords => WebGUI::Keyword::string2list($self->get('keywords')), @@ -247,7 +221,7 @@ sub exportGetRelatedAssetIds { }) }; return $rel; -} +}; #------------------------------------------------------------------- @@ -264,7 +238,7 @@ The date this was last updated. If left blank, it uses the revisionDate. sub formatDuration { my ($self, $lastUpdated) = @_; - $lastUpdated = defined $lastUpdated ? $lastUpdated : $self->get('revisionDate'); + $lastUpdated = defined $lastUpdated ? $lastUpdated : $self->revisionDate; my $session = $self->session; my $datetime = $session->datetime; my $duration = time() - $lastUpdated; @@ -278,7 +252,7 @@ sub formatDuration { if ($hours[0]) { $formattedDuration = join ' ', @hours; } - my $minutes = round(($duration - $hours)/60)*60; + my $minutes = sprintf('%.0f', ($duration - $hours) / 60 ) * 60; my @minutes = $datetime->secondsToInterval($minutes); if ($minutes[0]) { $formattedDuration .= ', ', if $formattedDuration; @@ -317,7 +291,7 @@ sub getAutoCommitWorkflowId { my $self = shift; my $archive = $self->getArchive; if ($archive->hasBeenCommitted) { - return $archive->get('approvalWorkflowId') + return $archive->approvalWorkflowId || $self->session->setting->get('defaultVersionTagWorkflow'); } return undef; @@ -369,13 +343,13 @@ sub getCrumbTrail { #------------------------------------------------------------------- -=head2 getEditForm ( ) +=head2 getEditTemplate ( ) -Returns a templated form for adding or editing Stories. +Templated form from the containing Archive =cut -sub getEditForm { +sub getEditTemplate { my $self = shift; my $session = $self->session; my $i18n = WebGUI::International->new($session, 'Asset_Story'); @@ -386,7 +360,7 @@ sub getEditForm { my $title = $self->getTitle; my $var = { formHeader => WebGUI::Form::formHeader($session, {action => $url}) - . WebGUI::Form::hidden($session, { name => 'func', value => 'editSave' }) + . WebGUI::Form::hidden($session, { name => 'func', value => ($isNew ? 'addSave' : 'editSave') }) . WebGUI::Form::hidden($session, { name => 'proceed', value => 'showConfirmation' }) , formFooter => WebGUI::Form::formFooter($session), @@ -395,23 +369,23 @@ sub getEditForm { : $i18n->get('editing','Asset_WikiPage').' '.$title, headlineForm => WebGUI::Form::text($session, { name => 'headline', - value => $form->get('headline') || $self->get('headline'), + value => $form->get('headline') || $self->headline, } ), titleForm => WebGUI::Form::text($session, { name => 'title', - value => $form->get('title') || $self->get('title'), + value => $form->get('title') || $self->title, } ), subtitleForm => WebGUI::Form::text($session, { name => 'subtitle', - value => $form->get('subtitle') || $self->get('subtitle') + value => $form->get('subtitle') || $self->subtitle } ), bylineForm => WebGUI::Form::text($session, { name => 'byline', - value => $form->get('byline') || $self->get('byline') + value => $form->get('byline') || $self->byline } ), locationForm => WebGUI::Form::text($session, { name => 'location', - value => $form->get('location') || $self->get('location') + value => $form->get('location') || $self->location } ), keywordsForm => WebGUI::Form::keywords($session, { name => 'keywords', @@ -419,12 +393,12 @@ sub getEditForm { } ), highlightsForm => WebGUI::Form::textarea($session, { name => 'highlights', - value => $form->get('highlights') || $self->get('highlights') + value => $form->get('highlights') || $self->highlights } ), storyForm => WebGUI::Form::HTMLArea($session, { name => 'story', - value => $form->get('story') || $self->get('story'), - richEditId => $archive->get('richEditorId') + value => $form->get('story') || $self->story, + richEditId => $archive->richEditorId }), saveButton => WebGUI::Form::submit($session, { name => 'saveStory', @@ -517,13 +491,16 @@ sub getEditForm { }), }; if ($isNew) { - $var->{formHeader} .= WebGUI::Form::hidden($session, { name => 'assetId', value => 'new' }) - . WebGUI::Form::hidden($session, { name => 'class', value => $form->process('class', 'className') }); + $var->{formHeader} .= WebGUI::Form::hidden($session, { name => 'assetId', value => 'new' }) + . WebGUI::Form::hidden($session, { name => 'className', value => $form->process('className', 'className') }); } else { $var->{formHeader} .= WebGUI::Form::hidden($session, { name => 'url', value => $url}); } - return $self->processTemplate($var, $archive->get('editStoryTemplateId')); + my $template = WebGUI::Asset->newById($session, $archive->editStoryTemplateId); + $template->style($archive->getStyleTemplateId); + $template->setParam(@{ $var }); + return $template; } @@ -537,7 +514,7 @@ Returns the photo hash formatted as perl data. See also L. sub getPhotoData { my $self = shift; - my $json = $self->get('photo'); + my $json = $self->photo; $json ||= '[]'; my $photoData = from_json($json); return $photoData; @@ -557,13 +534,13 @@ sub getRssData { my $session = $self->session; my $url = $session->url->getSiteURL.$self->getUrl; my $data = { - title => $self->get('headline') || $self->getTitle, - description => $self->get('story'), + title => $self->headline || $self->getTitle, + description => $self->story, 'link' => $url, guid => $url, - author => $self->get('byline'), - date => $self->get('lastModified'), - pubDate => $session->datetime->epochToMail($self->get('creationDate')), + author => $self->byline, + date => $self->lastModified, + pubDate => $self->session->datetime->epochToMail($self->creationDate), }; return $data; } @@ -576,11 +553,12 @@ Extend the base class to index Story properties like headline, byline, etc. =cut -sub indexContent { +around indexContent => sub { + my $orig = shift; my $self = shift; - my $indexer = $self->next::method(); - $indexer->addKeywords($self->get('headline'), $self->get('subtitle'), $self->get('location'), $self->get('highlights'), $self->get('byline'), $self->get('story'), ); -} + my $indexer = $self->$orig(@_); + $indexer->addKeywords($self->headline, $self->subtitle, $self->location, $self->highlights, $self->byline, $self->story, ); +}; #------------------------------------------------------------------- @@ -597,12 +575,12 @@ sub prepareView { my $templateId; my $topic = $self->topic; if ($topic) { - $templateId = $topic->get('storyTemplateId'); + $templateId = $topic->storyTemplateId; } else { - $templateId = $self->getArchive->get('storyTemplateId'); + $templateId = $self->getArchive->storyTemplateId; } - my $template = WebGUI::Asset::Template->new($self->session, $templateId); + my $template = WebGUI::Asset::Template->newById($self->session, $templateId); $template->prepare; $self->{_viewTemplate} = $template; } @@ -610,13 +588,13 @@ sub prepareView { #------------------------------------------------------------------- -=head2 processPropertiesFromFormPost ( ) +=head2 processEditForm ( ) Handle photos and photo metadata, like captions, etc. =cut -sub processPropertiesFromFormPost { +sub processEditForm { my $self = shift; my $session = $self->session; $self->next::method; @@ -647,8 +625,8 @@ sub processPropertiesFromFormPost { my $filename = $upload->getFiles->[0]; $storage->addFileFromFilesystem($upload->getPath($filename)); my ($width, $height) = $storage->getSizeInPixels($filename); - if ($width > $self->getArchive->get('photoWidth')) { - $storage->resize($filename, $self->getArchive->get('photoWidth')); + if ($width > $self->getArchive->photoWidth) { + $storage->resize($filename, $self->getArchive->photoWidth); } $upload->delete; } @@ -704,7 +682,7 @@ Cleaning up all storage objects in all revisions. =cut -sub purge { +override purge => sub { my $self = shift; ##Delete all storage locations from all revisions of the Asset my $sth = $self->session->db->read("select photo from Story where assetId=?",[$self->getId]); @@ -717,8 +695,8 @@ sub purge { } } $sth->finish; - return $self->next::method; -} + return super(); +}; #------------------------------------------------------------------- @@ -728,7 +706,7 @@ Remove the storage locations for this revision of the Asset. =cut -sub purgeRevision { +override purgeRevision => sub { my $self = shift; my $session = $self->session; PHOTO: foreach my $photo ( @{ $self->getPhotoData} ) { @@ -736,8 +714,8 @@ sub purgeRevision { my $storage = WebGUI::Storage->get($session, $id); $storage->delete if $storage; } - return $self->next::method; -} + return super(); +}; #------------------------------------------------------------------- @@ -843,21 +821,7 @@ sub topic { #------------------------------------------------------------------- -=head2 update - -Extend the superclass to make sure that the asset always stays hidden from navigation. - -=cut - -sub update { - my $self = shift; - my $properties = shift; - return $self->next::method({%$properties, isHidden => 1}); -} - -#------------------------------------------------------------------- - -=head2 validParent +=head2 valid_parent_classes Make sure that the current session asset is a StoryArchive for pasting and adding checks. @@ -865,13 +829,8 @@ This is a class method. =cut -sub validParent { - my $class = shift; - my $session = shift; - return $session->asset - && ( $session->asset->isa('WebGUI::Asset::Wobject::StoryArchive') - || ($session->asset->isa('WebGUI::Asset::Wobject::Folder') && $session->asset->getParent->isa('WebGUI::Asset::Wobject::StoryArchive') ) - ); +sub valid_parent_classes { + return [qw/WebGUI::Asset::Wobject::StoryArchive WebGUI::Asset::Wobject::Folder/]; } #------------------------------------------------------------------- @@ -936,7 +895,7 @@ sub viewTemplateVariables { }; } $var->{updatedTime} = $self->formatDuration(); - $var->{updatedTimeEpoch} = $self->get('revisionDate'); + $var->{updatedTimeEpoch} = $self->revisionDate; $var->{crumb_loop} = $self->getCrumbTrail(); my $photoData = $self->getPhotoData; @@ -969,31 +928,11 @@ sub viewTemplateVariables { $var->{hasPhotos} = $photoCounter; $var->{singlePhoto} = $photoCounter == 1; $var->{canEdit} = $self->canEdit; - $var->{photoWidth} = $archive->get('photoWidth'); + $var->{photoWidth} = $archive->photoWidth; return $var; } -#------------------------------------------------------------------- - -=head2 www_edit ( ) - -Web facing method which is the default edit page. Unless the method needs -special handling or formatting, it does not need to be included in -the module. - -Overridden because the standard, autogenerated form is not used. - -=cut - -sub www_edit { - my $self = shift; - my $session = $self->session; - return $session->privilege->insufficient() unless $self->canEdit; - return $session->privilege->locked() unless $self->canEditIfLocked; - return $self->getArchive->processStyle($self->getEditForm); -} - #------------------------------------------------------------------- =head2 www_showConfirmation ( ) @@ -1020,12 +959,13 @@ the Story Archive that contains them. sub www_view { my $self = shift; return $self->session->privilege->noAccess unless $self->canView; - $self->session->http->sendHeader; + $self->session->response->sendHeader; $self->prepareView; return $self->getArchive->processStyle($self->view); } +__PACKAGE__->meta->make_immutable; 1; #vim:ft=perl diff --git a/lib/WebGUI/Asset/Template.pm b/lib/WebGUI/Asset/Template.pm index c2b4b5587..4943d2b2b 100644 --- a/lib/WebGUI/Asset/Template.pm +++ b/lib/WebGUI/Asset/Template.pm @@ -3,7 +3,7 @@ package WebGUI::Asset::Template; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -15,10 +15,128 @@ package WebGUI::Asset::Template; =cut use strict; -use base 'WebGUI::Asset'; + +use Moose; +use WebGUI::Definition::Asset; +extends 'WebGUI::Asset'; + +define assetName => ['assetName', 'Asset_Template']; +define icon => 'template.gif'; +define tableName => 'template'; + +property template => ( + fieldType => 'codearea', + syntax => "html", + default => undef, + trigger => \&_template_autopack, + label => ['assetName', 'Asset_Template'], + hoverHelp => ['template description', 'Asset_Template'], + ); +sub _template_autopack { + my ($self, $new, $old) = @_; + return if $new eq $old; + $self->_clear_templatePacked; +} +property isEditable => ( + noFormPost => 1, + fieldType => 'hidden', + default => 1, + ); +property isDefault => ( + noFormPost => 1, + fieldType => 'hidden', + default => 0, + ); +property showInForms => ( + fieldType => 'yesNo', + default => 1, + label => ['show in forms', 'Asset_Template'], + hoverHelp => ['show in forms description', 'Asset_Template'], + ); +property parser => ( + noFormPost => 1, + fieldType => 'selectBox', + lazy => 1, + builder => '_default_parser', + options => sub { + my $self = shift; + my $session = $self->session; + tie my %parsers, 'Tie::IxHash'; + for my $class ( @{$session->config->get('templateParsers')} ) { + $parsers{$class} = $self->getParser($session, $class)->getName(); + } + }, + ); +sub _default_parser { + my $self = shift; + return $self->session->config->get('defaultTemplateParser'); +} +property namespace => ( + fieldType => 'combo', + default => undef, + label => ['namespace', 'Asset_Template'], + hoverHelp => ['namespace description', 'Asset_Template'], + options => sub { + my $namespaces = shift->session->dbSlave->buildHashRef("select distinct(namespace) from template order by namespace"); + }, + ); +property templatePacked => ( + fieldType => 'hidden', + noFormPost => 1, + lazy => 1, + clearer => '_clear_templatePacked', + builder => '_build_templatePacked', + ); +sub _build_templatePacked { + my $self = shift; + my $template = $self->template; + if (defined $template) { + HTML::Packer::minify( \$template, { + do_javascript => 'shrink', + do_stylesheet => 'minify', + } ); + } + $template; +} + +property usePacked => ( + fieldType => 'yesNo', + default => 0, + label => ['usePacked label', 'Asset_Template'], + hoverHelp => ['usePacked description', 'Asset_Template'], + ); + +property storageIdExample => ( + fieldType => 'image', + label => ['field storageIdExample', 'Asset_Template'], + hoverHelp => ['field storageIdExample description', 'Asset_Template'], + ); + +property attachmentsJson => ( + fieldType => 'JsonTable', + label => [ "attachment display label", "Asset_Template" ], + fields => [ + { + type => "text", + name => "url", + label => [ 'attachment header url', 'Asset_Template' ], + size => '48', + }, + { + type => "select", + name => "type", + label => ['attachment header type','Asset_Template'], + options => [ + stylesheet => ['css label','Asset_Template'], + headScript => ['js head label','Asset_Template'], + bodyScript => ['js body label','Asset_Template'], + ], + }, + ], +); + use WebGUI::International; use WebGUI::Asset::Template::HTMLTemplate; -use WebGUI::Utility; use WebGUI::Form; use WebGUI::Exception; use List::MoreUtils qw{ any }; @@ -38,9 +156,79 @@ Provides a mechanism to provide a templating system in WebGUI. =head1 SYNOPSIS -use WebGUI::Asset::Template; + my $template = WebGUI::Asset::Template->newById( $session, "template id" ); + $template->setParam( param => "value", param2 => "value" ); + print $template->process; +=head1 ATTRIBUTES + +#---------------------------------------------------------------------------- + +=head2 forms + +A hash of WebGUI::FormBuilder objects to be included in this template. +The forms' template variables will be automatically added to the L hash +when the template is processed. + +Hash keys are the form's unique name, which will be prefixed to the form's +template variables + +=cut + +has forms => ( + traits => ['Hash'], + is => 'rw', + isa => 'HashRef', + default => sub { {} }, + handles => { + addForm => 'set', + getForm => 'get', + deleteForm => 'delete', + hasForms => 'count', + }, +); + +#---------------------------------------------------------------------------- + +=head2 param + +Save params in the template for later processing. This allows a template to be +passed around, adding variables until finally it is processed and output for +the user. + +Use L method to set parameters. + +=cut + +has param => ( + traits => [ 'Hash' ], + is => 'rw', + isa => 'HashRef', + default => sub { {} }, + handles => { + setParam => 'set', + getParam => 'get', + deleteParam => 'delete', + }, +); + +#---------------------------------------------------------------------------- + +=head2 style + +Attach a style template to this template. This will allow you to return the +template from a www_ method and have the WebGUI PSGI handler do the processing. + +Accepts an asset ID + +=cut + +has style => ( + is => 'rw', + isa => 'Maybe[Str]', +); + =head1 METHODS These methods are available from this class: @@ -84,88 +272,14 @@ If the current template is the User Function Style template with the Fail Safe t =cut -sub cut { - my ( $self ) = @_; - my $returnValue = $self->SUPER::cut(); +around cut => sub { + my ( $orig, $self ) = @_; + my $returnValue = $self->$orig(); if ($returnValue && $self->getId eq $self->session->setting->get('userFunctionStyleId')) { $self->session->setting->set('userFunctionStyleId', 'PBtmpl0000000000000060'); } return $returnValue; -} - -#------------------------------------------------------------------- - -=head2 definition ( session, definition ) - -Defines the properties of this asset. - -=head3 session - -A reference to an existing session. - -=head3 definition - -A hash reference passed in from a subclass definition. - -=cut - -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift; - my $i18n = WebGUI::International->new($session,"Asset_Template"); - push @{$definition}, { - assetName => $i18n->get('assetName'), - icon => 'template.gif', - tableName => 'template', - className => 'WebGUI::Asset::Template', - properties => { - template => { - fieldType => 'codearea', - syntax => "html", - defaultValue => undef, - filter => 'packTemplate', - }, - isEditable => { - noFormPost => 1, - fieldType => 'hidden', - defaultValue => 1, - }, - isDefault => { - fieldType => 'hidden', - defaultValue => 0, - }, - showInForms => { - fieldType => 'yesNo', - defaultValue => 1, - }, - parser => { - fieldType => 'templateParser', - defaultValue => $session->config->get('defaultTemplateParser'), - }, - namespace => { - fieldType => 'combo', - defaultValue => undef, - }, - templatePacked => { - fieldType => 'hidden', - defaultValue => undef, - noFormPost => 1, - }, - usePacked => { - fieldType => 'yesNo', - defaultValue => 0, - }, - storageIdExample => { - fieldType => 'image', - }, - attachmentsJson => { - fieldType => 'JsonTable', - }, - }, - }; - return $class->SUPER::definition($session,$definition); -} +}; #------------------------------------------------------------------- @@ -175,31 +289,12 @@ Override the master addRevision to copy attachments =cut -sub addRevision { +override addRevision => sub { my ( $self, $properties, @args ) = @_; - my $asset = $self->SUPER::addRevision($properties, @args); + my $asset = super(); delete $properties->{templatePacked}; return $asset; -} - -#------------------------------------------------------------------- - -=head2 drawExtraHeadTags ( ) - -Override the master drawExtraHeadTags to prevent Style template from having -Extra Head Tags. - -=cut - -sub drawExtraHeadTags { - my ($self, $params) = @_; - if ($self->get('namespace') eq 'style') { - my $i18n = WebGUI::International->new($self->session); - return $i18n->get(881); - } - return $self->SUPER::drawExtraHeadTags($params); -} - +}; #------------------------------------------------------------------- @@ -210,16 +305,16 @@ copy. =cut -sub duplicate { - my $self = shift; - my $newTemplate = $self->SUPER::duplicate(@_); +override duplicate => sub { + my $self = shift; + my $newTemplate = super(); $newTemplate->update({isDefault => 0}); if ( my $storageId = $self->get('storageIdExample') ) { my $newStorage = WebGUI::Storage->get( $self->session, $storageId )->copy; $newTemplate->update({ storageIdExample => $newStorage->getId }); } return $newTemplate; -} +}; #------------------------------------------------------------------- @@ -229,14 +324,14 @@ Override to add attachments to package data =cut -sub exportAssetData { +override exportAssetData => sub { my ( $self ) = @_; - my $data = $self->SUPER::exportAssetData; + my $data = super(); if ( $self->get('storageIdExample') ) { push @{$data->{storage}}, $self->get('storageIdExample'); } return $data; -} +}; #------------------------------------------------------------------- @@ -278,76 +373,29 @@ sub getAttachments { =head2 getEditForm ( ) -Returns the TabForm object that will be used in generating the edit page for this asset. +Returns the WebGUI::FormBuilder object that will be used in generating the edit page for this asset. =cut -sub getEditForm { +override getEditForm => sub { my $self = shift; - my $session = $self->session; - - my ( $db, $url, $style, $form, $config ) - = $session->quick(qw( db url style form config )); - - my $tabform = $self->SUPER::getEditForm(); + my $tabform = super(); + my $session = $self->session; + my ( $url, $style ) = $session->quick(qw( url style )); my $i18n = WebGUI::International->new($session, 'Asset_Template'); - - my ( $properties, $meta, $display ) = - map { $tabform->getTab($_) } qw( properties meta display ); - - my $returnUrl = $form->get('returnUrl'); - $tabform->hidden({ + my $returnUrl = $session->form->get("returnUrl"); + $tabform->addField( "hidden", name=>"returnUrl", value=>$returnUrl, - }); - if ($self->getValue("namespace") eq "") { - my $namespaces = $db->buildHashRef("select distinct(namespace) from template order by namespace"); - $properties->combo( - -name=>"namespace", - -options=>$namespaces, - -label=>$i18n->get('namespace'), - -hoverHelp=>$i18n->get('namespace description'), - -value=>[$form->get("namespace")] - ); - } else { - $meta->readOnly( - -label=>$i18n->get('namespace'), - -hoverHelp=>$i18n->get('namespace description'), - -value=>$self->getValue("namespace") - ); - $meta->hidden( - -name=>"namespace", - -value=>$self->getValue("namespace") - ); - } - $display->yesNo( - -name=>"showInForms", - -value=>$self->getValue("showInForms"), - -label=>$i18n->get('show in forms'), - -hoverHelp=>$i18n->get('show in forms description'), ); - $properties->codearea( - -name=>"template", - -label=>$i18n->get('assetName'), - -hoverHelp=>$i18n->get('template description'), - -syntax => "html", - -value=>$self->getValue("template") - ); - $properties->raw(qq( - - - ${\ $i18n->get('Preview') } - - - - - - - )); + + my $previewButtons + = $tabform->getTab('properties')->addField( "ButtonGroup", + name => 'previewButtons', + label => $i18n->get('Preview'), + ); + $previewButtons->addButton( 'Button' => { id => 'preview', value => $i18n->get('Preview') } ); + $previewButtons->addButton( 'Button' => { id => 'previewConfig', value => $i18n->get('Configure') } ); my $cform = WebGUI::HTMLForm->new($session); $cform->yesNo( id => 'previewRaw', @@ -375,10 +423,9 @@ sub getEditForm { $cform->hidden(id => 'previewId', value => $self->getId); $cform->hidden(id => 'previewGateway', value => $url->gateway); - $properties->raw(qq( - - - + $tabform->getTab('properties')->addField("ReadOnly", + name => 'previewDialog', + value => qq(
    ${\ $i18n->get('Configure Preview') }
    ${\ $cform->printRowsOnly }
    @@ -386,16 +433,8 @@ sub getEditForm {
    - - - )); - - $properties->yesNo( - name => "usePacked", - label => $i18n->get('usePacked label'), - hoverHelp => $i18n->get('usePacked description'), - value => $self->getValue("usePacked"), - ); + ), + ); $style->setScript($url->extras($_)) for qw( yui/build/json/json-min.js @@ -403,46 +442,15 @@ sub getEditForm { templatePreview.js ); - $properties->templateParser( - name => 'parser', - label => $i18n->get('parser'), - hoverHelp => $i18n->get('parser description'), - value => $self->getValue('parser'), - ); - - $properties->jsonTable( - name => 'attachmentsJson', - value => $self->get('attachmentsJson'), - label => $i18n->get("attachment display label"), - fields => [ - { - type => "text", - name => "url", - label => $i18n->get('attachment header url'), - size => '48', - }, - { - type => "select", - name => "type", - label => $i18n->get('attachment header type'), - options => [ - stylesheet => $i18n->get('css label'), - headScript => $i18n->get('js head label'), - bodyScript => $i18n->get('js body label'), - ], - }, - ], - ); - - $properties->image( - name => 'storageIdExample', - value => $self->getValue('storageIdExample'), - label => $i18n->get('field storageIdExample'), - hoverHelp => $i18n->get('field storageIdExample description'), - ); + $tabform->getTab('properties')->addField( image => + name => 'storageIdExample', + value => $self->storageIdExample, + label => $i18n->get('field storageIdExample'), + hoverHelp => $i18n->get('field storageIdExample description'), + ); return $tabform; -} +}; #------------------------------------------------------------------- @@ -499,8 +507,10 @@ sub getList { my $sth = $session->dbSlave->read($sql, [$namespace, $session->scratch->get("versionTag")]); my %templates; tie %templates, 'Tie::IxHash'; - while (my ($id, $version) = $sth->array) { - $templates{$id} = WebGUI::Asset::Template->new($session,$id,undef,$version)->getTitle; + TEMPLATE: while (my ($id, $version) = $sth->array) { + my $template = eval { WebGUI::Asset::Template->newById($session,$id,$version); }; + next TEMPLATE if Exception::Class->caught(); + $templates{$id} = $template->getTitle; } $sth->finish; return \%templates; @@ -570,14 +580,13 @@ Override to import attachments from old versions of WebGUI =cut -sub importAssetCollateralData { +override importAssetCollateralData => sub { my ( $self, $data, @args ) = @_; if ( $data->{template_attachments} ) { $self->update( { attachmentsJson => JSON::to_json($data->{template_attachments}) } ); } - return $self->SUPER::importAssetCollateralData( $data, @args ); -} - + return super(); +}; #------------------------------------------------------------------- @@ -587,31 +596,13 @@ Making private. See WebGUI::Asset::indexContent() for additonal details. =cut -sub indexContent { +around indexContent => sub { + my $orig = shift; my $self = shift; - my $indexer = $self->SUPER::indexContent; - $indexer->addKeywords($self->get("namespace")); + my $indexer = $self->$orig(@_); + $indexer->addKeywords($self->namespace); $indexer->setIsPublic(0); -} - -#------------------------------------------------------------------- - -=head2 packTemplate ( template ) - -Pack the template into a minified version for faster downloads. - -=cut - -sub packTemplate { - my ( $self, $template ) = @_; - my $packed = $template; - HTML::Packer::minify( \$packed, { - do_javascript => "shrink", - do_stylesheet => "minify", - } ); - $self->update({ templatePacked => $packed }); - return $template; -} +}; #------------------------------------------------------------------- @@ -637,11 +628,11 @@ sub prepare { my $id = $self->getId; # don't send head block if we've already sent it for this template - return if isIn($id, @$sent); + return if $id ~~ $sent; my $session = $self->session; my ($db, $style) = $session->quick(qw(db style)); - my $parser = $self->getParser($session, $self->get('parser')); + my $parser = $self->getParser($session, $self->parser); my $headBlock = $parser->process($self->getExtraHeadTags, $vars); $style->setRawHeadTags($headBlock); @@ -674,10 +665,14 @@ Evaluate a template replacing template commands for HTML. If the internal prope is set to true, the packed, minimized template will be used. Otherwise, the original template will be used. +Will also process the style template attached to this template + =head3 vars A hash reference containing template variables and loops. Automatically includes the entire WebGUI session. +These parameters will override any parameters set by L and L + =cut sub process { @@ -685,23 +680,37 @@ sub process { my $vars = shift; my $session = $self->session; - if ($self->get('state') =~ /^trash/) { + if ($self->state =~ /^trash/) { my $i18n = WebGUI::International->new($session, 'Asset_Template'); - $session->errorHandler->warn('process called on template in trash: '.$self->getId - .'. The template was called through this url: '.$session->asset->get('url')); - return $session->var->isAdminOn ? $i18n->get('template in trash') : ''; + $session->log->warn('process called on template in trash: '.$self->getId + .'. The template was called through this url: '.$session->asset->url); + return $session->isAdminOn ? $i18n->get('template in trash') : ''; } - elsif ($self->get('state') =~ /^clipboard/) { + elsif ($self->state =~ /^clipboard/) { my $i18n = WebGUI::International->new($session, 'Asset_Template'); - $session->errorHandler->warn('process called on template in clipboard: '.$self->getId - .'. The template was called through this url: '.$session->asset->get('url')); - return $session->var->isAdminOn ? $i18n->get('template in clipboard') : ''; + $session->log->warn('process called on template in clipboard: '.$self->getId + .'. The template was called through this url: '.$session->asset->url); + return $session->isAdminOn ? $i18n->get('template in clipboard') : ''; } + # Merge the forms with the prepared vars + if ( $self->hasForms ) { + for my $name ( keys %{$self->forms} ) { + my $form = $self->forms->{$name}; + $self->setParam( %{$form->toTemplateVars( "${name}_" )} ); + } + } + + # Merge the passed-in vars with the prepared vars + if ( keys %$vars > 0 ) { # can't call setParam with an empty hash + $self->setParam( %$vars ); + } + + # Return a JSONinfied version of vars if JSON is the only requested content type. - if ( defined $session->request && $session->request->headers_in->{Accept} eq 'application/json' ) { - $session->http->setMimeType( 'application/json' ); - return to_json( $vars ); + if ( defined $session->request && $session->request->header('Accept') eq 'application/json' ) { + $session->response->content_type( 'application/json' ); + return to_json( $self->param ); } my $stow = $session->stow; @@ -714,18 +723,25 @@ sub process { } $self->prepare unless ($self->{_prepared}); - my $parser = $self->getParser($session, $self->get("parser")); - my $template = $self->get('usePacked') - ? $self->get('templatePacked') - : $self->get('template') + my $parser = $self->getParser($session, $self->parser); + my $template = $self->usePacked + ? $self->templatePacked + : $self->template ; my $output; - eval { $output = $parser->process($template, $vars); }; + eval { $output = $parser->process($template, $self->param); }; if (my $e = Exception::Class->caught) { - $session->log->error(sprintf "Error processing template: %s, %s, %s", $self->getUrl, $self->getId, $e->error); + my $message = ref $e ? $e->error : $e; + $session->log->error(sprintf "Error processing template: %s, %s, %s", $self->getUrl, $self->getId, $message); my $i18n = WebGUI::International->new($session, 'Asset_Template'); - $output = sprintf $i18n->get('template error').$e->error, $self->getUrl, $self->getId; + $output = sprintf $i18n->get('template error').$message, $self->getUrl, $self->getId; } + + # Process the style template + if ( $self->style ) { + $output = $self->session->style->process( $output, $self->style ); + } + return $output; } @@ -764,13 +780,14 @@ sub process { sub processVariableHeaders { my ($class, $session) = @_; my $r = $session->request; - if (my $id = $r->headers_in->{$head}) { + if (my $id = $r->headers->header($head)) { my $rnd = join('', map { $chr[int(rand($#chr))] } (1..32)); - my $out = $r->headers_out; + my $out = {}; my $st = ""; $out->{"$head-Start"} = $st; $out->{"$head-End"} = $end; + $session->response->headers( $out ); $session->stow->set( showTemplateVars => { assetId => $id, @@ -784,22 +801,22 @@ sub process { #------------------------------------------------------------------- -=head2 processPropertiesFromFormPost +=head2 processEditForm Extends the master class to handle template parsers, namespaces and template attachments. =cut -sub processPropertiesFromFormPost { +override processEditForm => sub { my $self = shift; + super(); my $session = $self->session; - $self->SUPER::processPropertiesFromFormPost; # TODO: Perhaps add a way to check template syntax before it blows stuff up? my %data; my $needsUpdate = 0; - if ($self->getValue("parser") ne $self->session->form->process("parser","className") && ($self->session->form->process("parser","className") ne "")) { + if ($self->parser ne $self->session->form->process("parser","className") && ($self->session->form->process("parser","className") ne "")) { $needsUpdate = 1; - if (isIn($self->session->form->process("parser","className"),@{$self->session->config->get("templateParsers")})) { + if ($self->session->form->process("parser","className") ~~ $self->session->config->get("templateParsers") ) { %data = ( parser => $self->session->form->process("parser","className") ); } else { %data = ( parser => $self->session->config->get("defaultTemplateParser") ); @@ -818,7 +835,7 @@ sub processPropertiesFromFormPost { $self->update({ attachmentsJson => $session->form->process( 'attachmentsJson', 'JsonTable' ), }); return; -} +}; #------------------------------------------------------------------- @@ -836,7 +853,7 @@ A scalar containing the template text. =head3 vars -A hash reference containing template variables. +A hash reference containing template variables to add to the existing params. =head3 parser @@ -862,14 +879,17 @@ If the current template is the User Function Style template with the Fail Safe t =cut -sub purge { +around purge => sub { + my $orig = shift; my $self = shift; - my $returnValue = $self->SUPER::purge; - if ($returnValue && $self->getId eq $self->session->setting->get('userFunctionStyleId')) { - $self->session->setting->set('userFunctionStyleId', 'PBtmpl0000000000000060'); + my $session = $self->session; + my $assetId = $self->assetId; + my $returnValue = $self->$orig(@_); + if ($returnValue && $assetId eq $session->setting->get('userFunctionStyleId')) { + $session->setting->set('userFunctionStyleId', 'PBtmpl0000000000000060'); } return $returnValue; -} +}; #------------------------------------------------------------------- @@ -890,37 +910,33 @@ sub removeAttachments { my @attachments = (); if ($urls) { - @attachments = grep { !isIn($_->{url}, @{ $urls }) } @{ $self->getAttachments() }; + @attachments = grep { ! ($_->{url} ~~ $urls) } @{ $self->getAttachments() }; } my $json = JSON->new->encode( \@attachments ); $self->update({ attachmentsJson => $json, }); } -#------------------------------------------------------------------- +#---------------------------------------------------------------------------- -=head2 update +=head2 replaceParamName ( oldName, newName ) -Override update from Asset.pm to handle backwards compatibility with the old -packages that contain headBlocks. This will be removed in the future. Don't plan -on this being here. +Replace all instances of oldName with newName. Updates the template instance with +the new names and returns the new template data. This is only to be used to alter +the names of template parameters. =cut -sub update { - my $self = shift; - my $requestedProperties = shift; - my $properties = clone($requestedProperties); +sub replaceParamName { + my ( $self, $oldName, $newName ) = @_; - if (exists $properties->{headBlock}) { - $properties->{extraHeadTags} .= $properties->{headBlock}; - delete $properties->{headBlock}; - } - - $self->SUPER::update($properties); + # We're lazy here. If this fails, we'll add more checks, or call out to the parser + my $template = $self->template; + $template =~ s/$oldName/$newName/g; + $self->template( $template ); + return $template; } - #------------------------------------------------------------------- =head2 www_edit @@ -930,7 +946,7 @@ default template. =cut -sub www_edit { +override www_edit => sub { my $self = shift; return $self->session->privilege->insufficient() unless $self->canEdit; return $self->session->privilege->locked() unless $self->canEditIfLocked; @@ -938,7 +954,7 @@ sub www_edit { my $form = $session->form; my $url = $session->url; my $i18n = WebGUI::International->new($session, "Asset_Template"); - my $output = ''; + my $template = super(); # Add an unfriendly warning message if this is a default template if ( $self->get( 'isDefault' ) ) { @@ -950,33 +966,20 @@ sub www_edit { $duplicateUrl = $url->append( $duplicateUrl, "returnUrl=" . $form->get( "returnUrl" ) ); } } - - $session->style->setRawHeadTags( <<'ENDHTML' ); - -ENDHTML - $output .= q{

    } + my $errors = $template->getParam('errors') || []; + my $message .= q{

    } . $i18n->get( "warning default template" ) . q{

    } . sprintf( q{%s}, $i18n->get( "make duplicate label" ) ) - . q{

    } + . q{

    } ; + push @$errors, $message; + $template->setParam( 'errors' => $errors ); } - - $output .= $self->getEditForm->print; - $self->getAdminConsole->addSubmenuItem($self->getUrl('func=styleWizard'),$i18n->get("style wizard")) if ($self->get("namespace") eq "style"); - return $self->getAdminConsole->render( $output, $i18n->get('edit template') ); -} + return $template; +}; #------------------------------------------------------------------- @@ -989,7 +992,7 @@ the user back to the site. sub www_goBackToPage { my $self = shift; - $self->session->http->setRedirect($self->session->form->get("returnUrl")) if ($self->session->form->get("returnUrl")); + $self->session->response->setRedirect($self->session->form->get("returnUrl")) if ($self->session->form->get("returnUrl")); return undef; } @@ -1025,7 +1028,9 @@ sub www_editDuplicate { next PROP unless lc $properties->{ $prop }->{ fieldType } eq "template"; next PROP unless $asset->get( $prop ) eq $self->getId; if ( $properties->{ $prop }->{ namespace } eq $self->get( "namespace" ) ) { - $asset->addRevision( { $prop => $newTemplate->getId } ); + my $tag = WebGUI::VersionTag->getWorking( $session ); + $asset->addRevision( { $prop => $newTemplate->getId, tagId => $tag->getId, status => "pending" } ); + $asset->setVersionLock; # Auto-commit our revision if necessary # TODO: This needs to be handled automatically somehow... @@ -1059,261 +1064,6 @@ sub www_manage { return $self->getParent->www_manageAssets; } - -#------------------------------------------------------------------- - -=head2 www_styleWizard - -Edit form for building style templates in a WYSIWIG fashion. - -=cut - -sub www_styleWizard { - my $self = shift; - return $self->session->privilege->insufficient() unless $self->canEdit; - return $self->session->privilege->locked() unless $self->canEditIfLocked; - my $i18n = WebGUI::International->new($self->session, "Asset_Template"); - my $form = $self->session->form; - my $output = ""; - if ($form->get("step") == 2) { - my $f = WebGUI::HTMLForm->new($self->session,{action=>$self->getUrl}); - $f->hidden(name=>"func", value=>"styleWizard"); - $f->hidden(name=>"proceed", value=>"manageAssets") if ($form->get("proceed")); - $f->hidden(name=>"step", value=>3); - $f->hidden(name=>"layout", value=>$form->get("layout")); - $f->text( - name=>"heading", - value=>"My Site", - label=>$i18n->get("site name"), - hoverHelp=>$i18n->get("site name description") - ); - $f->file( - name=>"logo", - label=>$i18n->get("logo"), - hoverHelp=>$i18n->get("logo description"), - subtext=>$i18n->get("logo subtext") - ); - $f->color( - name=>"pageBackgroundColor", - value=>"#ccccdd", - label=>$i18n->get("page background color"), - hoverHelp=>$i18n->get("page background color description"), - ); - $f->color( - name=>"headingBackgroundColor", - value=>"#ffffff", - label=>$i18n->get("header background color"), - hoverHelp=>$i18n->get("header background color description"), - ); - $f->color( - name=>"headingForegroundColor", - value=>"#000000", - label=>$i18n->get("header text color"), - hoverHelp=>$i18n->get("header text color description"), - ); - $f->color( - name=>"bodyBackgroundColor", - value=>"#ffffff", - label=>$i18n->get("body background color"), - hoverHelp=>$i18n->get("body background color description"), - ); - $f->color( - name=>"bodyForegroundColor", - value=>"#000000", - label=>$i18n->get("body text color"), - hoverHelp=>$i18n->get("body text color description"), - ); - $f->color( - name=>"menuBackgroundColor", - value=>"#eeeeee", - label=>$i18n->get("menu background color"), - hoverHelp=>$i18n->get("menu background color description"), - ); - $f->color( - name=>"linkColor", - value=>"#0000ff", - label=>$i18n->get("link color"), - hoverHelp=>$i18n->get("link color description"), - ); - $f->color( - name=>"visitedLinkColor", - value=>"#ff00ff", - label=>$i18n->get("visited link color"), - hoverHelp=>$i18n->get("visited link color description"), - ); - $f->submit; - $output = $f->print; - } elsif ($form->get("step") == 3) { - my $storageId = $form->get("logo","file"); - my $logo; - my $logoContent = ''; - if ($storageId) { - my $storage = WebGUI::Storage->get($self->session,$storageId); - $logo = $self->addChild({ - className=>"WebGUI::Asset::File::Image", - title=>join(' ', $form->get("heading"), $i18n->get('logo')), - menuTitle=>join(' ', $form->get("heading"), $i18n->get('logo')), - url=>join(' ', $form->get("heading"), $i18n->get('logo')), - storageId=>$storage->getId, - filename=>@{$storage->getFiles}[0], - templateId=>"PBtmpl0000000000000088" - }); - $logo->generateThumbnail; - $logoContent = ''; - } - my $customHead = ''; - if ($form->get("layout") eq "1") { - $customHead .= ' - .bodyContent { - background-color: '.$form->get("bodyBackgroundColor","color").'; - color: '.$form->get("bodyForegroundColor","color").'; - width: 70%; - float: left; - } - .menu { - width: 30%; - float: left; - } - .wrapper { - width: 80%; - margin-right: 10%; - margin-left: 10%; - background-color: '.$form->get("menuBackgroundColor","color").'; - } - '; - } else { - $customHead .= ' - .bodyContent { - background-color: '.$form->get("bodyBackgroundColor","color").'; - color: '.$form->get("bodyForegroundColor","color").'; - width: 100%; - } - .menu { - background-color: '.$form->get("menuBackgroundColor","color").'; - width: 100%; - text-align: center; - } - .wrapper { - width: 80%; - margin-right: 10%; - margin-left: 10%; - } - '; - } - my $style = ' - - - ^Page(title); - ^c; - - - -^AdminBar; -
    -
    - '.$logoContent.' - '.$form->get("heading").' -
    -
    -
    -
    - -
    -
    -
    -
    -
    -
    -
    -
    ^a(^@;); ^AdminToggle;
    - -
    -
    -
    - -'; - return $self->addRevision({ - template=>$style - })->www_edit; - } else { - $output = WebGUI::Form::formHeader($self->session,{action=>$self->getUrl}).WebGUI::Form::hidden($self->session,{name=>"func", value=>"styleWizard"}); - $output .= WebGUI::Form::hidden($self->session,{name=>"proceed", value=>"manageAssets"}) if ($form->get("proceed")); - $output .= ''; - $output .= $i18n->get('choose a layout'); - $output .= WebGUI::Form::hidden($self->session,{name=>"step", value=>2}); - $output .= '
    '.WebGUI::Form::radio($self->session,{name=>"layout", value=>1, checked=>1}).sprintf(q| - - -
    %s%s
    %s%s
    |, - $i18n->get('logo'), - $i18n->get('heading'), - $i18n->get('menu'), - $i18n->get('body content'), - ); - $output .= '
    '.WebGUI::Form::radio($self->session,{name=>"layout", value=>2}).sprintf(q| - - - -
    %s%s
    %s
    %s
    |, - $i18n->get('logo'), - $i18n->get('heading'), - $i18n->get('menu'), - $i18n->get('body content'), - ); - $output .= WebGUI::Form::submit($self->session); - $output .= WebGUI::Form::formFooter($self->session); - } - $self->getAdminConsole->addSubmenuItem($self->getUrl('func=edit'),$i18n->get("edit template")) if ($self->get("url")); - return $self->getAdminConsole->render($output,$i18n->get('style wizard')); -} - #------------------------------------------------------------------- =head2 www_preview @@ -1327,8 +1077,8 @@ sub www_preview { my $session = $self->session; return $session->privilege->insufficient unless $self->canEdit; - my $form = $session->form; - my $http = $session->http; + my $form = $session->form; + my $response = $session->response; try { my $output = $self->processRaw( @@ -1338,14 +1088,14 @@ sub www_preview { $form->get('parser'), ); if ($form->get('plainText')) { - $http->setMimeType('text/plain'); + $response->content_type('text/plain'); } elsif ($output !~ //) { $output = $session->style->userStyle($output); } return $output; } catch { - $http->setMimeType('text/plain'); + $response->content_type('text/plain'); $_[0]; } } @@ -1365,5 +1115,6 @@ sub www_view { } +__PACKAGE__->meta->make_immutable; 1; diff --git a/lib/WebGUI/Asset/Template/HTMLTemplate.pm b/lib/WebGUI/Asset/Template/HTMLTemplate.pm index 8bd4f293f..f4976c5ee 100644 --- a/lib/WebGUI/Asset/Template/HTMLTemplate.pm +++ b/lib/WebGUI/Asset/Template/HTMLTemplate.pm @@ -3,7 +3,7 @@ package WebGUI::Asset::Template::HTMLTemplate; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Asset/Template/HTMLTemplateExpr.pm b/lib/WebGUI/Asset/Template/HTMLTemplateExpr.pm index 0812b2a9a..b165b8c9a 100644 --- a/lib/WebGUI/Asset/Template/HTMLTemplateExpr.pm +++ b/lib/WebGUI/Asset/Template/HTMLTemplateExpr.pm @@ -3,7 +3,7 @@ package WebGUI::Asset::Template::HTMLTemplateExpr; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Asset/Template/Parser.pm b/lib/WebGUI/Asset/Template/Parser.pm index b37f606f5..9367144ca 100644 --- a/lib/WebGUI/Asset/Template/Parser.pm +++ b/lib/WebGUI/Asset/Template/Parser.pm @@ -3,7 +3,7 @@ package WebGUI::Asset::Template::Parser; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -37,9 +37,9 @@ sub addSessionVars { # These are the only session template variables used in the core as # of 6.8.5. Further use of session template vars is deprecated. $vars->{"session.user.username"} = $self->session->user->username; - $vars->{"session.user.firstDayOfWeek"} = $self->session->user->profileField("firstDayOfWeek"); + $vars->{"session.user.firstDayOfWeek"} = $self->session->user->get("firstDayOfWeek"); $vars->{"session.config.extrasurl"} = $self->session->url->extras(); - $vars->{"session.var.adminOn"} = $self->session->var->isAdminOn; + $vars->{"session.var.adminOn"} = $self->session->isAdminOn; $vars->{"session.setting.companyName"} = $self->session->setting->get("companyName"); $vars->{"session.setting.anonymousRegistration"} = $self->session->setting->get("anonymousRegistration"); my $forms = $self->session->form->paramsHashRef(); diff --git a/lib/WebGUI/Asset/Template/TemplateToolkit.pm b/lib/WebGUI/Asset/Template/TemplateToolkit.pm index a0b445465..ab2f3529b 100644 --- a/lib/WebGUI/Asset/Template/TemplateToolkit.pm +++ b/lib/WebGUI/Asset/Template/TemplateToolkit.pm @@ -3,7 +3,7 @@ package WebGUI::Asset::Template::TemplateToolkit; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -17,6 +17,7 @@ package WebGUI::Asset::Template::TemplateToolkit; use strict; use base 'WebGUI::Asset::Template::Parser'; use Template; +use WebGUI::Template::Provider; #------------------------------------------------------------------- sub _rewriteVars { # replace dots with underscrores in keys (except in keys that aren't usable as variables (URLs etc.)) @@ -27,7 +28,12 @@ sub _rewriteVars { # replace dots with underscrores in keys (except in keys that $newKey =~ s/\./_/g if $newKey !~ /\//; if ( ref $vars->{$key} eq 'ARRAY') { foreach my $entry (@{$vars->{$key}}) { + if ( ref $entry eq 'HASH' ) { push(@{$newVars->{$newKey}}, _rewriteVars($entry)); + } + else { + push(@{$newVars->{$newKey}}, $entry ); + } } } elsif(ref $vars->{$key} eq 'HASH') { $newVars->{$newKey} = _rewriteVars($vars->{$key}); @@ -76,16 +82,26 @@ sub process { my $vars = $self->addSessionVars(shift); my ($t,$output); eval { - $t = Template->new({ - INTERPOLATE => 1, # expand "$var" in plain text - POST_CHOMP => 1, # cleanup whitespace - EVAL_PERL => 0, # evaluate Perl code blocks - }); + my $config = $self->session->config->get( 'template' ) || {}; + $config->{INTERPOLATE} //= 1; # expand "$var" in plain text + $config->{POST_CHOMP} //= 1; # cleanup whitespace + $config->{EVAL_PERL} //= 0; # evaluate Perl code blocks + # Add WebGUI::Template::Plugin to PLUGIN_BASE + if ( defined $config->{PLUGIN_BASE} && !ref $config->{PLUGIN_BASE} ) { + $config->{PLUGIN_BASE} = [ $config->{PLUGIN_BASE} ]; + } + elsif ( !defined $config->{PLUGIN_BASE} ) { + $config->{PLUGIN_BASE} = []; + } + push @{$config->{PLUGIN_BASE}}, 'WebGUI::Template::Plugin'; + + # Allow WebGUI assets to be included in templates + $config->{LOAD_TEMPLATES} = [ WebGUI::Template::Provider->new( $self->session, $config ) ]; + + $t = Template->new( $config ); $vars = _rewriteVars($vars); - # store the session so plugins can access it. - # underscore prefix prevents direct access from templates $vars->{_session} = $self->session; - unless ($t->process( \$template, $vars,\$output)) { + unless ($t->process( \$template, $vars, \$output)) { my $e = $t->error; $self->session->log->error($e); die $e; diff --git a/lib/WebGUI/Asset/Template/_parser.skeleton b/lib/WebGUI/Asset/Template/_parser.skeleton index 88109604a..bcd782313 100644 --- a/lib/WebGUI/Asset/Template/_parser.skeleton +++ b/lib/WebGUI/Asset/Template/_parser.skeleton @@ -3,7 +3,7 @@ package WebGUI::Asset::Template::SomeTemplateType; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Asset/WikiPage.pm b/lib/WebGUI/Asset/WikiPage.pm index cd8a46831..6c3db8de4 100644 --- a/lib/WebGUI/Asset/WikiPage.pm +++ b/lib/WebGUI/Asset/WikiPage.pm @@ -1,7 +1,7 @@ package WebGUI::Asset::WikiPage; # ------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. # ------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -11,16 +11,59 @@ package WebGUI::Asset::WikiPage; # ------------------------------------------------------------------- use strict; -use Class::C3; -use base qw( - WebGUI::AssetAspect::Subscribable - WebGUI::AssetAspect::Comments - WebGUI::AssetAspect::AutoSynopsis - WebGUI::Asset -); -use Tie::IxHash; + +use Moose; +use WebGUI::Definition::Asset; +extends 'WebGUI::Asset'; + +define assetName => ['assetName', 'Asset_WikiPage']; +define icon => 'wikiPage.gif'; +define tableName => 'WikiPage'; + +property content => ( + label => ['contentLabel', 'Asset_WikiPage'], + fieldType => "HTMLArea", + default => undef + ); +property views => ( + fieldType => "integer", + default => 0, + noFormPost => 1 + ); +property isProtected => ( + fieldType => "yesNo", + default => 0, + noFormPost => 1 + ); +property actionTaken => ( + fieldType => "text", + default => '', + noFormPost => 1, + ); +property actionTakenBy => ( + fieldType => "user", + default => '', + noFormPost => 1, + ); +property isFeatured => ( + fieldType => "yesNo", + default => 0, + noFormPost => 1, + ); + +override _default_title => sub { + my $self = shift; + my $title = $self->session->form->get('title') || super(); + return $title; +}; + +with 'WebGUI::Role::Asset::AlwaysHidden'; +with 'WebGUI::Role::Asset::Subscribable'; +with 'WebGUI::Role::Asset::Comments'; +with 'WebGUI::Role::Asset::AutoSynopsis'; + use WebGUI::International; -use WebGUI::Utility; + use WebGUI::VersionTag; @@ -38,24 +81,6 @@ sub addChild { #------------------------------------------------------------------- -=head2 addRevision ( ) - -Override the default method in order to deal with attachments. - -=cut - -sub addRevision { - my $self = shift; - my $newSelf = $self->next::method(@_); - my $now = time(); - $newSelf->update({ - isHidden => 1, - }); - return $newSelf; -} - -#------------------------------------------------------------------- - =head2 canAdd ($session) This functions as a class or an object method. It sets the subclassGroupId to 7 @@ -63,11 +88,12 @@ instead of the default of 12. =cut -sub canAdd { +around canAdd => sub { + my $orig = shift; my $class = shift; my $session = shift; - return $class->next::method($session, undef, '7'); -} + return $class->$orig($session, undef, '7'); +}; #------------------------------------------------------------------- @@ -87,66 +113,12 @@ sub canEdit { my $form = $self->session->form; my $addNew = $form->process("func" ) eq "add"; my $editSave = $form->process("assetId" ) eq "new" - && $form->process("func" ) eq "editSave" - && $form->process("class","className" ) eq "WebGUI::Asset::WikiPage"; + && $form->process("func" ) eq "addSave" + && $form->process("className","className" ) eq "WebGUI::Asset::WikiPage"; return $wiki->canAdminister || ( $wiki->canEditPages && ( $addNew || $editSave || !$self->isProtected) ); } -#------------------------------------------------------------------- -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift; - my $i18n = WebGUI::International->new($session, "Asset_WikiPage"); - - my %properties; - tie %properties, 'Tie::IxHash'; - %properties = - ( - content => { fieldType => "HTMLArea", - defaultValue => undef }, - views => { - fieldType => "integer", - defaultValue => 0, - noFormPost => 1 - }, - isProtected => { - fieldType => "yesNo", - defaultValue => 0, - noFormPost => 1 - }, - actionTaken => { - fieldType => "text", - defaultValue => '', - noFormPost => 1, - }, - actionTakenBy => { - fieldType => "user", - defaultValue => '', - noFormPost => 1, - }, - isFeatured => { - fieldType => "yesNo", - defaultValue => 0, - noFormPost => 1, - }, - ); - - push @$definition, - { - assetName => $i18n->get('assetName'), - icon => 'wikiPage.gif', - autoGenerateForms => 1, - tableName => 'WikiPage', - className => 'WebGUI::Asset::WikiPage', - properties => \%properties, - }; - - return $class->next::method($session, $definition); -} - - #------------------------------------------------------------------- =head2 getAutoCommitWorkflowId @@ -168,8 +140,8 @@ sub getAutoCommitWorkflowId { if (ref $spamStopWords eq 'ARRAY' && @{ $spamStopWords }) { my $spamRegex = join('|',@{$spamStopWords}); $spamRegex =~ s/\s/\\ /g; - if ($self->get('content') =~ m{$spamRegex}xmsi) { - my $tag = WebGUI::VersionTag->new($self->session, $self->get('tagId')); + if ($self->content =~ m{$spamRegex}xmsi) { + my $tag = WebGUI::VersionTag->new($self->session, $self->assetId); $self->purgeRevision; if ($tag->getAssetCount == 0) { $tag->rollback; @@ -178,7 +150,7 @@ sub getAutoCommitWorkflowId { } } - return $wiki->get('approvalWorkflow') + return $wiki->approvalWorkflow || $self->session->setting->get('defaultVersionTagWorkflow'); } return undef; @@ -187,36 +159,41 @@ sub getAutoCommitWorkflowId { #------------------------------------------------------------------- -=head2 getEditForm +=head2 getEditTemplate Renders a templated edit form for adding or editing a wiki page. =cut -sub getEditForm { +sub getEditTemplate { my $self = shift; my $session = $self->session; my $form = $session->form; my $i18n = WebGUI::International->new($session, "Asset_WikiPage"); - my $newPage = 0; my $wiki = $self->getWiki; my $url = ($self->getId eq "new") ? $wiki->getUrl : $self->getUrl; + use WebGUI::Form::HTMLArea; + use WebGUI::Form::Submit; + use WebGUI::Form::YesNo; + use WebGUI::Form::Hidden; + use WebGUI::Form::Keywords; + use WebGUI::Form::Attachments; my $var = { - title=> $i18n->get("editing")." ".(defined($self->get('title'))? $self->get('title') : $i18n->get("assetName")), + title=> $i18n->get("editing")." ".(defined($self->title)? $self->title : $i18n->get("assetName")), formHeader => WebGUI::Form::formHeader($session, { action => $url}) - .WebGUI::Form::hidden($session, { name => 'func', value => 'editSave' }) - .WebGUI::Form::hidden($session, { name=>"proceed", value=>"showConfirmation" }), - formTitle => WebGUI::Form::text($session, { name => 'title', maxlength => 255, size => 40, - value => $self->get('title'), defaultValue=>$form->get("title","text") }), - formContent => WebGUI::Form::HTMLArea($session, { name => 'content', richEditId => $wiki->get('richEditor'), value => $self->get('content') }) , - formSubmit => WebGUI::Form::submit($session, { value => 'Save' }), - formProtect => WebGUI::Form::yesNo($session, { name => "isProtected", value=>$self->getValue("isProtected")}), - formFeatured => WebGUI::Form::yesNo( $session, { name => 'isFeatured', value=>$self->getValue('isFeatured')}), - formKeywords => WebGUI::Form::keywords($session, { + .WebGUI::Form::Hidden->new($session, { name => 'func', value => ( $self->getId eq 'new' ? 'addSave' : 'editSave' ) })->toHtml + .WebGUI::Form::Hidden->new($session, { name=>"proceed", value=>"showConfirmation" })->toHtml, + formTitle => WebGUI::Form::Text->new($session, { name => 'title', maxlength => 255, size => 40, + value => $self->title, defaultValue=>$form->get("title","text") })->toHtml, + formContent => WebGUI::Form::HTMLArea->new($session, { name => 'content', richEditId => $wiki->richEditor, value => $self->content })->toHtml , + formSubmit => WebGUI::Form::Submit->new($session, { value => 'Save' })->toHtml, + formProtect => WebGUI::Form::YesNo->new($session, { name => "isProtected", value=>$self->isProtected})->toHtml, + formFeatured => WebGUI::Form::YesNo->new( $session, { name => 'isFeatured', value=>$self->isFeatured})->toHtml, + formKeywords => WebGUI::Form::Keywords->new($session, { name => "keywords", value => WebGUI::Keyword->new($session)->getKeywordsForAsset({asset=>$self}), - }), - allowsAttachments => $wiki->get("allowAttachments"), + })->toHtml, + allowsAttachments => $wiki->allowAttachments, formFooter => WebGUI::Form::formFooter($session), isNew => ($self->getId eq "new"), canAdminister => $wiki->canAdminister, @@ -231,18 +208,21 @@ sub getEditForm { }; my $children = []; if ($self->getId eq "new") { - $var->{formHeader} .= WebGUI::Form::hidden($session, { name=>"assetId", value=>"new" }) - .WebGUI::Form::hidden($session, { name=>"class", value=>$form->process("class","className") }); + $var->{formHeader} .= WebGUI::Form::Hidden->new($session, { name=>"assetId", value=>"new" })->toHtml + .WebGUI::Form::Hidden->new($session, { name=>"className", value=>$form->process("className","className") })->toHtml; } else { $children = $self->getLineage(["children"]); } - $var->{formAttachment} = WebGUI::Form::Attachments($session, { + $var->{formAttachment} = WebGUI::Form::Attachments->new($session, { value => $children, - maxAttachments => $wiki->get("allowAttachments"), - maxImageSize => $wiki->get("maxImageSize"), - thumbnailSize => $wiki->get("thumbnailSize"), - }); - return $self->processTemplate($var, $wiki->getValue('pageEditTemplateId')); + maxAttachments => $wiki->allowAttachments, + maxImageSize => $wiki->maxImageSize, + thumbnailSize => $wiki->thumbnailSize, + })->toHtml; + my $template = WebGUI::Asset->newById( $session, $wiki->pageEditTemplateId ); + $template->style( $wiki->getStyleTemplateId ); + $template->setParam( %$var ); + return $template; } #------------------------------------------------------------------- @@ -269,7 +249,7 @@ sub getTemplateVars { my $session = $self->session; my $i18n = WebGUI::International->new($session, "Asset_WikiPage"); my $wiki = $self->getWiki; - my $owner = WebGUI::User->new( $session, $self->get('ownerUserId') ); + my $owner = WebGUI::User->new( $session, $self->ownerUserId ); my $keyObj = WebGUI::Keyword->new($session); my $keywords = $keyObj->getKeywordsForAsset({ @@ -301,14 +281,14 @@ sub getTemplateVars { wikiHomeUrl => $wiki->getUrl, historyUrl => $self->getUrl("func=getHistory"), editContent => $self->getEditForm, - allowsAttachments => $wiki->get("allowAttachments"), - comments => $self->getFormattedComments(), + allowsAttachments => $wiki->allowAttachments, + comments => $self->getFormattedComments, canEdit => $self->canEdit, canAdminister => $wiki->canAdminister, isProtected => $self->isProtected, content => $wiki->autolinkHtml( $self->scrubContent, - {skipTitles => [$self->get('title')]}, + {skipTitles => [$self->title]}, ), isSubscribed => $self->isSubscribed, subscribeUrl => $self->getSubscribeUrl, @@ -342,25 +322,13 @@ Extends the master class to handle indexing the wiki content. =cut -sub indexContent { +around indexContent => sub { + my $orig = shift; my $self = shift; - my $indexer = $self->next::method; - $indexer->addKeywords($self->get('content')); + my $indexer = $self->$orig(@_); + $indexer->addKeywords($self->content); return $indexer; -} - -#------------------------------------------------------------------- - -=head2 isProtected - -Returns a boolean indicating whether or not this WikiPage is protected. - -=cut - -sub isProtected { - my $self = shift; - return $self->get("isProtected"); -} +}; #------------------------------------------------------------------- @@ -375,7 +343,7 @@ sub preparePageTemplate { my $self = shift; return $self->{_pageTemplate} if $self->{_pageTemplate}; $self->{_pageTemplate} = - WebGUI::Asset::Template->new($self->session, $self->getWiki->get('pageTemplateId')); + WebGUI::Asset::Template->newById($self->session, $self->getWiki->pageTemplateId); $self->{_pageTemplate}->prepare; return $self->{_pageTemplate}; } @@ -388,32 +356,32 @@ Extends the master class to handle preparing the main view template for the page =cut -sub prepareView { +override prepareView => sub { my $self = shift; - $self->next::method; + super(); $self->preparePageTemplate; -} +}; #------------------------------------------------------------------- -=head2 processPropertiesFromFormPost +=head2 processEditForm Extends the master method to handle properties and attachments. =cut -sub processPropertiesFromFormPost { +override processEditForm => sub { my $self = shift; my $session = $self->session; - $self->next::method(@_); + super(); my $actionTaken = ($session->form->process("assetId") eq "new") ? "Created" : "Edited"; my $wiki = $self->getWiki; my $properties = { - groupIdView => $wiki->get('groupIdView'), - groupIdEdit => $wiki->get('groupToAdminister'), - actionTakenBy => $self->session->user->userId, - actionTaken => $actionTaken, + groupIdView => $wiki->groupIdView, + groupIdEdit => $wiki->groupToAdminister, + actionTakenBy => $session->user->userId, + actionTaken => $actionTaken, }; if ($wiki->canAdminister) { @@ -427,25 +395,25 @@ sub processPropertiesFromFormPost { # deal with attachments from the attachments form control my $options = { - maxImageSize => $wiki->get('maxImageSize'), - thumbnailSize => $wiki->get('thumbnailSize'), + maxImageSize => $wiki->maxImageSize, + thumbnailSize => $wiki->thumbnailSize, }; my @attachments = $session->form->param("attachments"); my @tags = (); foreach my $assetId (@attachments) { - my $asset = WebGUI::Asset->newByDynamicClass($session, $assetId); + my $asset = WebGUI::Asset->newById($session, $assetId); if (defined $asset) { - unless ($asset->get("parentId") eq $self->getId) { + unless ($asset->parentId eq $self->getId) { $asset->setParent($self); $asset->update({ - ownerUserId => $self->get( "ownerUserId" ), - groupIdEdit => $wiki->get( "groupToEditPages" ), - groupIdView => $self->get( "groupIdView" ), + ownerUserId => $self->ownerUserId, + groupIdEdit => $self->groupIdEdit, + groupIdView => $self->groupIdView, }); } $asset->applyConstraints($options); - push(@tags, $asset->get("tagId")); - $asset->setVersionTag($self->get("tagId")); + push(@tags, $asset->tagId); + $asset->setVersionTag($self->tagId); } } @@ -458,7 +426,7 @@ sub processPropertiesFromFormPost { } } } -} +}; #------------------------------------------------------------------- @@ -474,12 +442,12 @@ Optionally pass the ontent that we want to run the filters on. Otherwise we get sub scrubContent { my $self = shift; - my $content = shift || $self->get("content"); + my $content = shift || $self->content; $content =~ s/\^-\;//g; my $scrubbedContent = WebGUI::HTML::filter($content, $self->getWiki->get("filterCode")); - if ($self->getWiki->get("useContentFilter")) { + if ($self->getWiki->useContentFilter) { $scrubbedContent = WebGUI::HTML::processReplacements($self->session, $scrubbedContent); } @@ -488,22 +456,7 @@ sub scrubContent { #------------------------------------------------------------------- -=head2 update - -Wrap update to force isHidden to be on, all the time. - -=cut - -sub update { - my $self = shift; - my $properties = shift; - $properties->{isHidden} = 1; - return $self->next::method($properties); -} - -#------------------------------------------------------------------- - -=head2 validParent +=head2 valid_parent_classes Make sure that the current session asset is a WikiMaster for pasting and adding checks. @@ -511,10 +464,8 @@ This is a class method. =cut -sub validParent { - my $class = shift; - my $session = shift; - return $session->asset->isa('WebGUI::Asset::Wobject::WikiMaster'); +sub valid_parent_classes { + return [qw/WebGUI::Asset::Wobject::WikiMaster/]; } #------------------------------------------------------------------- @@ -527,7 +478,7 @@ Renders this asset. sub view { my $self = shift; - return $self->processTemplate($self->getTemplateVars, $self->getWiki->get("pageTemplateId")); + return $self->processTemplate($self->getTemplateVars, $self->getWiki->pageTemplateId); } #------------------------------------------------------------------- @@ -549,21 +500,6 @@ sub www_delete { #------------------------------------------------------------------- -=head2 www_edit - -Overrides the master class to render the edit form in the parent wiki's style. - -=cut - -sub www_edit { - my $self = shift; - return $self->session->privilege->insufficient unless $self->canEdit; - return $self->session->privilege->locked unless $self->canEditIfLocked; - return $self->getWiki->processStyle($self->getEditForm); -} - -#------------------------------------------------------------------- - =head2 www_getHistory Returns the version history of this wiki page. The output is templated. @@ -579,16 +515,16 @@ sub www_getHistory { foreach my $revision (@{$self->getRevisions}) { my $user = WebGUI::User->new($self->session, $revision->get("actionTakenBy")); push(@{$var->{pageHistoryEntries}}, { - toolbar => $icon->delete("func=purgeRevision;revisionDate=".$revision->get("revisionDate"), $revision->get("url"), $i18n->get("delete confirmation")) - .$icon->edit('func=edit;revision='.$revision->get("revisionDate"), $revision->get("url")) - .$icon->view('func=view;revision='.$revision->get("revisionDate"), $revision->get("url")), - date => $date->epochToHuman($revision->get("revisionDate")), - username => $user->profileField('alias') || $user->username, - actionTaken => $revision->get("actionTaken"), - interval => join(" ", $date->secondsToInterval(time() - $revision->get("revisionDate"))) + toolbar => $icon->delete("func=purgeRevision;revisionDate=".$revision->revisionDate, $revision->url, $i18n->get("delete confirmation")) + .$icon->edit('func=edit;revision='.$revision->revisionDate, $revision->url) + .$icon->view('func=view;revision='.$revision->revisionDate, $revision->url), + date => $date->epochToHuman($revision->revisionDate), + username => $user->get('alias') || $user->username, + actionTaken => $revision->actionTaken, + interval => join(" ", $date->secondsToInterval(time() - $revision->revisionDate)) }); } - return $self->processTemplate($var, $self->getWiki->get('pageHistoryTemplateId')); + return $self->processTemplate($var, $self->getWiki->pageHistoryTemplateId); } #------------------------------------------------------------------- @@ -612,7 +548,7 @@ sub www_purgeRevision { $asset->purgeRevision; if ($session->form->process("proceed") eq "manageRevisionsInTag") { my $working = (defined $self) ? $self : $parent; - $session->http->setRedirect($working->getUrl("op=manageRevisionsInTag")); + $session->response->setRedirect($working->getUrl("op=manageRevisionsInTag")); return undef; } unless (defined $self) { @@ -663,15 +599,15 @@ and to render it with the parent's style. sub www_view { my $self = shift; return $self->session->privilege->noAccess unless $self->canView; - $self->update({ views => $self->get('views')+1 }); + $self->update({ views => $self->views+1 }); # TODO: This should probably exist, as the CS has one. -# $self->session->http->setCacheControl($self->getWiki->get('visitorCacheTimeout')) +# $self->session->response->setCacheControl($self->getWiki->get('visitorCacheTimeout')) # if ($self->session->user->isVisitor); - $self->session->http->sendHeader; + $self->session->response->sendHeader; $self->prepareView; return $self->getWiki->processStyle($self->view); } - +__PACKAGE__->meta->make_immutable; 1; diff --git a/lib/WebGUI/Asset/Wobject.pm b/lib/WebGUI/Asset/Wobject.pm index 32aa004a6..fbc243682 100644 --- a/lib/WebGUI/Asset/Wobject.pm +++ b/lib/WebGUI/Asset/Wobject.pm @@ -3,7 +3,7 @@ package WebGUI::Asset::Wobject; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -14,17 +14,53 @@ package WebGUI::Asset::Wobject; =cut -#use CGI::Util qw(rearrange); -use DBI; -use strict qw(subs vars); -use Tie::IxHash; +use Moose; +use WebGUI::Definition::Asset; use WebGUI::Asset; use WebGUI::International; -use WebGUI::Macro; -use WebGUI::SQL; -use WebGUI::Utility; - -our @ISA = qw(WebGUI::Asset); +extends 'WebGUI::Asset'; +define tableName => 'wobject'; +define assetName => ['Wobject', 'Asset_Wobject']; +property description => ( + fieldType => 'HTMLArea', + default => undef, + tab => "properties", + label => [85,'Asset_Wobject'], + hoverHelp => ['85 description','Asset_Wobject'], + ); +property displayTitle => ( + fieldType => 'yesNo', + default => 1, + tab => "display", + label => [174,'Asset_Wobject'], + hoverHelp => ['174 description','Asset_Wobject'], + uiLevel => 5 + ); +property styleTemplateId => ( + fieldType => 'template', + default => 'PBtmpl0000000000000060', + tab => "display", + label => [1073,'Asset_Wobject'], + hoverHelp => ['1073 description','Asset_Wobject'], + namespace => 'style' + ); +property printableStyleTemplateId => ( + fieldType => 'template', + default => 'PBtmpl0000000000000060', + tab => "display", + label => [1079,'Asset_Wobject'], + hoverHelp => ['1079 description','Asset_Wobject'], + namespace => 'style' + ); +property mobileStyleTemplateId => ( + fieldType => 'template', + noFormPost => sub { return !$_[0]->session->setting->get('useMobileStyle'); }, + default => 'PBtmpl0000000000000060', + tab => 'display', + label => ['mobileStyleTemplateId label','Asset_Wobject'], + hoverHelp => ['mobileStyleTemplateId description','Asset_Wobject'], + namespace => 'style', + ); =head1 NAME @@ -49,78 +85,6 @@ These methods are available from this class: #------------------------------------------------------------------- -=head2 definition ( session, [definition] ) - -Returns an array reference of definitions. Adds tableName, className, properties to array definition. - -=head3 definition - -An array of hashes to prepend to the list - -=cut - -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift; - my $i18n = WebGUI::International->new($session,'Asset_Wobject'); - my %properties; - tie %properties, 'Tie::IxHash'; - %properties = ( - description=>{ - fieldType=>'HTMLArea', - defaultValue=>undef, - tab=>"properties", - label=>$i18n->get(85), - hoverHelp=>$i18n->get('85 description') - }, - displayTitle=>{ - fieldType=>'yesNo', - defaultValue=>1, - tab=>"display", - label=>$i18n->get(174), - hoverHelp=>$i18n->get('174 description'), - uiLevel=>5 - }, - styleTemplateId=>{ - fieldType=>'template', - defaultValue=>'PBtmpl0000000000000060', - tab=>"display", - label=>$i18n->get(1073), - hoverHelp=>$i18n->get('1073 description'), - filter=>'fixId', - namespace=>'style' - }, - printableStyleTemplateId=>{ - fieldType=>'template', - defaultValue=>'PBtmpl0000000000000060', - tab=>"display", - label=>$i18n->get(1079), - hoverHelp=>$i18n->get('1079 description'), - filter=>'fixId', - namespace=>'style' - }, - mobileStyleTemplateId => { - fieldType => ( $session->setting->get('useMobileStyle') ? 'template' : 'hidden' ), - defaultValue => 'PBtmpl0000000000000060', - tab => 'display', - label => $i18n->get('mobileStyleTemplateId label'), - hoverHelp => $i18n->get('mobileStyleTemplateId description'), - filter => 'fixId', - namespace => 'style', - }, - ); - push(@{$definition}, { - tableName=>'wobject', - className=>'WebGUI::Asset::Wobject', - autoGenerateForms=>1, - properties => \%properties - }); - return $class->SUPER::definition($session,$definition); -} - -#------------------------------------------------------------------- - =head2 copyCollateral ( tableName, keyName, keyValue ) Copies a row of collateral data where keyName=keyValue. Generates a new key for keyName. @@ -148,11 +112,11 @@ sub copyCollateral { my $newId = $self->session->id->generate; my $temp = $self->session->db->buildArrayRefOfHashRefs( - "select * from ".$db->dbh->quote_identifier($table)." where ".$db->dbh->quote_identifier($keyName)."=".$db->quote($keyValue)); + "select * from ".$db->quote_identifier($table)." where ".$db->dbh->quote_identifier($keyName)."=".$db->quote($keyValue)); my $hash = $temp->[0]; $hash->{$keyName} = $newId; my @keys = keys %$hash; - my $sql = "insert into ".$db->dbh->quote_identifier($table) + my $sql = "insert into ".$db->quote_identifier($table) ." (".join(',',map("`$_`",@keys)).") values(".join(',',map("?",@keys)).")"; $self->session->db->write($sql,[map($hash->{$_},@keys)]); } @@ -183,8 +147,8 @@ sub deleteCollateral { my $keyName = shift; my $keyValue = shift; my $db = $self->session->db; - $self->session->db->write("delete from ".$db->dbh->quote_identifier($table) - ." where ".$db->dbh->quote_identifier($keyName)."=".$db->quote($keyValue)); + $self->session->db->write("delete from ".$db->quote_identifier($table) + ." where ".$db->quote_identifier($keyName)."=".$db->quote($keyValue)); $self->updateHistory("deleted collateral item ".$keyName." ".$keyValue); } @@ -256,12 +220,41 @@ sub getCollateral { if ($keyValue eq "new" || $keyValue eq "") { return {$keyName=>"new"}; } else { - return $db->quickHashRef("select * from ".$db->dbh->quote_identifier($table) - ." where ".$db->dbh->quote_identifier($keyName)."=?",[$keyValue]); + return $db->quickHashRef("select * from ".$db->quote_identifier($table) + ." where ".$db->quote_identifier($keyName)."=?",[$keyValue]); } } +#------------------------------------------------------------------- + +=head2 getInheritableProperties ( ) + +Extend the base class to include the mobileStyleTemplateId. + +=cut + +override getInheritableProperties => sub { + my $self = shift; + my %properties = super(); + $properties{mobileStyleTemplateId} = $self->mobileStyleTemplateId; + return %properties; +}; + +#------------------------------------------------------------------- + +=head2 getStyleTemplateId + +This returns the correct style to use, either a regular style or a mobile style, +based on $session->style->useMobileStyle. + +=cut + +sub getStyleTemplateId { + my $self = shift; + return $self->session->style->useMobileStyle ? $self->mobileStyleTemplateId : $self->styleTemplateId; +} + #------------------------------------------------------------------- =head2 moveCollateralDown ( tableName, keyName, keyValue [ , setName, setValue ] ) @@ -377,15 +370,12 @@ Returns output parsed under the current style. See also Asset::processStyle. =cut -sub processStyle { +override processStyle => sub { my ($self, $output, $options) = @_; - $output = $self->SUPER::processStyle($output, $options); + $output = super(); my $style = $self->session->style; - if ($style->useMobileStyle) { - return $style->process($output,$self->get("mobileStyleTemplateId")); - } - return $style->process($output,$self->get("styleTemplateId")); -} + return $style->process($output,$self->getStyleTemplateId); +}; #------------------------------------------------------------------- @@ -489,13 +479,13 @@ sub setCollateral { if ($properties->{$keyName} eq "new" || $properties->{$keyName} eq "") { $properties->{$keyName} = $self->session->id->generate(); - $sql = "insert into ".$db->dbh->quote_identifier($table)." ("; + $sql = "insert into ".$db->quote_identifier($table)." ("; my $dbkeys = ""; my $dbvalues = ""; unless ($useSequence eq "0") { unless (exists $properties->{sequenceNumber}) { my ($seq) = $self->session->db->quickArray("select max(sequenceNumber) " - ." from ".$db->dbh->quote_identifier($table)." where $setName=?",[$setValue]); + ." from ".$db->quote_identifier($table)." where $setName=?",[$setValue]); $properties->{sequenceNumber} = $seq+1; } } @@ -507,20 +497,20 @@ sub setCollateral { $dbkeys .= ','; $dbvalues .= ','; } - $dbkeys .= $db->dbh->quote_identifier($key); + $dbkeys .= $db->quote_identifier($key); $dbvalues .= $self->session->db->quote($properties->{$key}); } $sql .= $dbkeys.') values ('.$dbvalues.')'; $self->updateHistory("added collateral item ".$table." ".$properties->{$keyName}); } else { - $sql = "update ".$db->dbh->quote_identifier($table)." set "; + $sql = "update ".$db->quote_identifier($table)." set "; foreach my $key (keys %{$properties}) { unless ($key eq "sequenceNumber" && $updateSequence ne "1") { $sql .= ',' if ($counter++ > 0); - $sql .= $db->dbh->quote_identifier($key)."=".$db->quote($properties->{$key}); + $sql .= $db->quote_identifier($key)."=".$db->quote($properties->{$key}); } } - $sql .= " where ".$db->dbh->quote_identifier($keyName)."=".$db->quote($properties->{$keyName}); + $sql .= " where ".$db->quote_identifier($keyName)."=".$db->quote($properties->{$keyName}); $self->updateHistory("edited collateral item ".$table." ".$properties->{$keyName}); } $self->session->db->write($sql); @@ -541,8 +531,8 @@ sub www_view { my $self = shift; my $check = $self->checkView; return $check if (defined $check); - $self->session->http->setLastModified($self->getContentLastModified); - $self->session->http->sendHeader; + $self->session->response->setLastModified($self->getContentLastModified); + $self->session->response->sendHeader; ##Have to dupe this code here because Wobject does not call SUPER. $self->prepareView; my $style = $self->processStyle($self->getSeparator, { noHeadTags => 1 }); @@ -553,5 +543,6 @@ sub www_view { return "chunked"; } +__PACKAGE__->meta->make_immutable; 1; diff --git a/lib/WebGUI/Asset/Wobject/Article.pm b/lib/WebGUI/Asset/Wobject/Article.pm index 3e55e2c7c..773863faa 100644 --- a/lib/WebGUI/Asset/Wobject/Article.pm +++ b/lib/WebGUI/Asset/Wobject/Article.pm @@ -1,7 +1,7 @@ package WebGUI::Asset::Wobject::Article; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -11,11 +11,70 @@ package WebGUI::Asset::Wobject::Article; #------------------------------------------------------------------- use strict; -use Tie::IxHash; use WebGUI::International; -use WebGUI::Cache; use WebGUI::Paginator; -use WebGUI::Asset::Wobject; + +use Moose; +use WebGUI::Definition::Asset; +extends 'WebGUI::Asset::Wobject'; +define assetName => ['assetName', 'Asset_Article']; +define icon => 'article.gif'; +define tableName => 'Article'; +property cacheTimeout => ( + tab => "display", + fieldType => "interval", + default => 3600, + uiLevel => 8, + label => ["cache timeout", 'Asset_Article'], + hoverHelp => ["cache timeout help", 'Asset_Article'], + ); +property templateId => ( + tab => "display", + fieldType => "template", + default => 'PBtmpl0000000000000002', + namespace => "Article", + hoverHelp => ['article template description', 'Asset_Article'], + label => ['72', 'Asset_Article'], + ); +property linkTitle => ( + tab => "properties", + fieldType => 'text', + default => undef, + label => ['7', 'Asset_Article'], + hoverHelp => ['link title description', 'Asset_Article'], + uiLevel => 3 + ); +property linkURL => ( + tab => "properties", + fieldType => 'url', + default => undef, + label => ['8', 'Asset_Article'], + hoverHelp => ['link url description', 'Asset_Article'], + uiLevel => 3 + ); +property storageId => ( + tab => "properties", + fieldType => "image", + deleteFileUrl => \&_storageId_deleteFileUrl, + maxAttachments => 2, + persist => 1, + default => undef, + label => ["attachments", 'Asset_Article'], + hoverHelp => ["attachments help", 'Asset_Article'], + trigger => \&_set_storageId, + ); +sub _set_storageId { + my ($self, $new, $old) = @_; + if ($new ne $old) { + delete $self->{_storageLocation}; + } +} +sub _storageId_deleteFileUrl { + return shift->session->url->page("func=deleteFile;filename="); +} + +with 'WebGUI::Role::Asset::SetStoragePermissions'; + use WebGUI::Storage; use WebGUI::HTML; @@ -70,79 +129,15 @@ Override the default method in order to deal with attachments. =cut -sub addRevision { +override addRevision => sub { my $self = shift; - my $newSelf = $self->SUPER::addRevision(@_); - if ($newSelf->get("storageId") && $newSelf->get("storageId") eq $self->get('storageId')) { - my $newStorage = WebGUI::Storage->get($self->session,$self->get("storageId"))->copy; + my $newSelf = super(); + if ($newSelf->storageId && $newSelf->storageId eq $self->storageId) { + my $newStorage = WebGUI::Storage->get($self->session,$self->storageId)->copy; $newSelf->update({storageId => $newStorage->getId}); } return $newSelf; -} - -#------------------------------------------------------------------- -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift; - my $i18n = WebGUI::International->new($session,'Asset_Article'); - my %properties; - tie %properties, 'Tie::IxHash'; - %properties = ( - cacheTimeout => { - tab => "display", - fieldType => "interval", - defaultValue => 3600, - uiLevel => 8, - label => $i18n->get("cache timeout"), - hoverHelp => $i18n->get("cache timeout help") - }, - templateId =>{ - fieldType=>"template", - defaultValue=>'PBtmpl0000000000000002', - tab=>"display", - namespace=>"Article", - hoverHelp=>$i18n->get('article template description'), - label=>$i18n->get(72) - }, - linkTitle=>{ - tab=>"properties", - fieldType=>'text', - defaultValue=>undef, - label=>$i18n->get(7), - hoverHelp=>$i18n->get('link title description'), - uiLevel=>3 - }, - linkURL=>{ - tab=>"properties", - fieldType=>'url', - defaultValue=>undef, - label=>$i18n->get(8), - hoverHelp=>$i18n->get('link url description'), - uiLevel=>3 - }, - storageId=>{ - tab=>"properties", - fieldType=>"image", - deleteFileUrl=>$session->url->page("func=deleteFile;filename="), - maxAttachments=>2, - persist => 1, - defaultValue=>undef, - label=>$i18n->get("attachments"), - hoverHelp=>$i18n->get("attachments help") - } - ); - push(@{$definition}, { - assetName=>$i18n->get('assetName'), - icon=>'article.gif', - autoGenerateForms=>1, - tableName=>'Article', - className=>'WebGUI::Asset::Wobject::Article', - properties=>\%properties - }); - return $class->SUPER::definition($session, $definition); -} - +}; #------------------------------------------------------------------- @@ -152,13 +147,13 @@ Extend the super class to duplicate the storage location. =cut -sub duplicate { +override duplicate => sub { my $self = shift; - my $newAsset = $self->SUPER::duplicate(@_); + my $newAsset = super(); my $newStorage = $self->getStorageLocation->copy; $newAsset->update({storageId=>$newStorage->getId}); return $newAsset; -} +}; #------------------------------------------------------------------- @@ -168,12 +163,12 @@ See WebGUI::AssetPackage::exportAssetData() for details. =cut -sub exportAssetData { +override exportAssetData => sub { my $self = shift; - my $data = $self->SUPER::exportAssetData; - push(@{$data->{storage}}, $self->get("storageId")) if ($self->get("storageId") ne ""); + my $data = super(); + push(@{$data->{storage}}, $self->storageId) if ($self->storageId ne ""); return $data; -} +}; #------------------------------------------------------------------- @@ -188,11 +183,13 @@ then make one. Build an internal cache of the storage object. sub getStorageLocation { my $self = shift; unless (exists $self->{_storageLocation}) { - if ($self->get("storageId") eq "") { - $self->{_storageLocation} = WebGUI::Storage->create($self->session); - $self->update({storageId=>$self->{_storageLocation}->getId}); - } else { - $self->{_storageLocation} = WebGUI::Storage->get($self->session,$self->get("storageId")); + if ($self->storageId eq "") { + my $storage = WebGUI::Storage->create($self->session); + $self->update({ storageId => $storage->getId }); + $self->{_storageLocation} = $storage; + } + else { + $self->{_storageLocation} = WebGUI::Storage->get($self->session,$self->storageId); } } return $self->{_storageLocation}; @@ -206,16 +203,16 @@ Indexing the content of attachments and user defined fields. See WebGUI::Asset:: =cut -sub indexContent { - my $self = shift; - my $indexer = $self->SUPER::indexContent; - $indexer->addKeywords($self->get("linkTitle")); - $indexer->addKeywords($self->get("linkUrl")); - my $storage = $self->getStorageLocation; - foreach my $file (@{$storage->getFiles}) { - $indexer->addFile($storage->getPath($file)); - } -} +override indexContent => sub { + my $self = shift; + my $indexer = super(); + $indexer->addKeywords($self->linkTitle); + $indexer->addKeywords($self->linkURL); + my $storage = $self->getStorageLocation; + foreach my $file (@{$storage->getFiles}) { + $indexer->addFile($storage->getPath($file)); + } +}; #------------------------------------------------------------------- @@ -225,14 +222,14 @@ See WebGUI::Asset::prepareView() for details. =cut -sub prepareView { +override prepareView => sub { my $self = shift; - $self->SUPER::prepareView(); - my $templateId = $self->get("templateId"); + super(); + my $templateId = $self->templateId; if ($self->session->form->process("overrideTemplateId") ne "") { $templateId = $self->session->form->process("overrideTemplateId"); } - my $template = WebGUI::Asset::Template->new($self->session, $templateId); + my $template = WebGUI::Asset::Template->newById($self->session, $templateId); if (!$template) { WebGUI::Error::ObjectNotFound::Template->throw( error => qq{Template not found}, @@ -242,53 +239,27 @@ sub prepareView { } $template->prepare($self->getMetaDataAsTemplateVariables); $self->{_viewTemplate} = $template; -} +}; #------------------------------------------------------------------- -=head2 processPropertiesFromFormPost ( ) +=head2 processEditForm ( ) Extend the super class to calculate total asset size from any files stored in the storage location. =cut -sub processPropertiesFromFormPost { +override processEditForm => sub { my $self = shift; - $self->SUPER::processPropertiesFromFormPost(@_); + super(); my $size = 0; my $storage = $self->getStorageLocation; foreach my $file (@{$storage->getFiles}) { $size += $storage->getFileSize($file); } $self->setSize($size); -} - -#------------------------------------------------------------------- - -=head2 update ( ) - -Extend the super class to handle the storage location. Sets -the correct privileges and deletes the internally cached -Storage object. - -=cut - -sub update { - my $self = shift; - my $previousStorageId = $self->get('storageId'); - $self->SUPER::update(@_); - ##update may have entered a new storageId. Reset the cached one just in case. - if ($self->get("storageId") ne $previousStorageId) { - delete $self->{_storageLocation}; - } - $self->getStorageLocation->setPrivileges( - $self->get("ownerUserId"), - $self->get("groupIdView"), - $self->get("groupIdEdit"), - ); -} - +}; #------------------------------------------------------------------- @@ -298,16 +269,16 @@ Extend the super class to delete all storage locations. =cut -sub purge { - my $self = shift; - my $sth = $self->session->db->read("select storageId from Article where assetId=?",[$self->getId]); - while (my ($storageId) = $sth->array) { - my $storage = WebGUI::Storage->get($self->session,$storageId); - $storage->delete if defined $storage; - } - $sth->finish; - return $self->SUPER::purge; -} +override purge => sub { + my $self = shift; + my $sth = $self->session->db->read("select storageId from Article where assetId=?",[$self->getId]); + while (my ($storageId) = $sth->array) { + my $storage = WebGUI::Storage->get($self->session,$storageId); + $storage->delete if defined $storage; + } + $sth->finish; + return super(); +}; #------------------------------------------------------------------- @@ -317,11 +288,11 @@ See WebGUI::Asset::purgeCache() for details. =cut -sub purgeCache { +override purgeCache => sub { my $self = shift; - WebGUI::Cache->new($self->session,"view_".$self->getId)->delete; - $self->SUPER::purgeCache; -} + $self->session->cache->remove("view_".$self->getId); + super(); +}; #------------------------------------------------------------------- @@ -331,11 +302,11 @@ Extend the super class to delete the storage location for this revision. =cut -sub purgeRevision { +override purgeRevision => sub { my $self = shift; $self->getStorageLocation->delete; - return $self->SUPER::purgeRevision; -} + return super(); +}; #------------------------------------------------------------------- @@ -348,14 +319,14 @@ returns the output. sub view { my $self = shift; - if (!$self->session->var->isAdminOn && $self->get("cacheTimeout") > 10 && !$self->session->form->process("overrideTemplateId") && + my $cache = $self->session->cache; + if (!$self->session->isAdminOn && $self->cacheTimeout > 10 && !$self->session->form->process("overrideTemplateId") && !$self->session->form->process($self->paginateVar) && !$self->session->form->process("makePrintable")) { - my $cache = $self->getCache; - my $out = $cache->get if defined $cache; + my $out = $cache->get($self->getViewCacheKey); return $out if $out; } my %var; - if ($self->get("storageId")) { + if ($self->storageId) { my $storage = $self->getStorageLocation; my @loop = (); foreach my $file (@{$storage->getFiles}) { @@ -377,7 +348,7 @@ sub view { }); } } - $var{description} = $self->get("description"); + $var{description} = $self->description; $var{"new.template"} = $self->getUrl("func=view").";overrideTemplateId="; $var{"description.full"} = $var{description}; $var{"description.full"} =~ s/\^\-\;//g; @@ -414,9 +385,9 @@ sub view { } $p->appendTemplateVars(\%var); my $out = $self->processTemplate(\%var,undef,$self->{_viewTemplate}); - if (!$self->session->var->isAdminOn && $self->get("cacheTimeout") > 10 && !$self->session->form->process("overrideTemplateId") && + if (!$self->session->isAdminOn && $self->cacheTimeout > 10 && !$self->session->form->process("overrideTemplateId") && !$self->session->form->process($self->paginateVar) && !$self->session->form->process("makePrintable")) { - WebGUI::Cache->new($self->session,"view_".$self->getId)->set($out,$self->get("cacheTimeout")); + $cache->set($self->getViewCacheKey, $out, $self->cacheTimeout); } return $out; } @@ -446,7 +417,7 @@ Deletes and attached file. sub www_deleteFile { my $self = shift; return $self->session->privilege->insufficient unless $self->canEdit; - if ($self->get("storageId") ne "") { + if ($self->storageId ne "") { my $storage = $self->getStorageLocation; $storage->deleteFile($self->session->form->param("filename")); } @@ -461,12 +432,13 @@ See WebGUI::Asset::Wobject::www_view() for details. =cut -sub www_view { +override www_view => sub { my $self = shift; - $self->session->http->setCacheControl($self->get("cacheTimeout")); - $self->SUPER::www_view(@_); -} + $self->session->response->setCacheControl($self->cacheTimeout); + super(); +}; +__PACKAGE__->meta->make_immutable; 1; diff --git a/lib/WebGUI/Asset/Wobject/AssetReport.pm b/lib/WebGUI/Asset/Wobject/AssetReport.pm index 9415be618..c3178f7eb 100644 --- a/lib/WebGUI/Asset/Wobject/AssetReport.pm +++ b/lib/WebGUI/Asset/Wobject/AssetReport.pm @@ -3,7 +3,7 @@ package WebGUI::Asset::Wobject::AssetReport; $VERSION = "1.0.0"; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -16,10 +16,35 @@ use strict; use Tie::IxHash; use WebGUI::International; use WebGUI::Paginator; -use WebGUI::Utility; -use Class::C3; use WebGUI::Form::AssetReportQuery; -use base qw/WebGUI::Asset::Wobject/; + +use Moose; +use WebGUI::Definition::Asset; +extends 'WebGUI::Asset::Wobject'; + +define assetName => ['assetName', 'Asset_AssetReport']; +define tableName => 'AssetReport'; +property settings => ( + tab => 'properties', + fieldType => 'AssetReportQuery', + default => undef, + label => '', + ); +property templateId => ( + tab => "display", + fieldType => "template", + namespace => "AssetReport", + default => "sJtcUCfn0CVbKdb4QM61Yw", + label => ["templateId label", 'Asset_AssetReport'], + hoverHelp => ["templateId description", 'Asset_AssetReport'], + ); +property paginateAfter => ( + tab => 'display', + fieldType => 'integer', + default => 25, + label => [ 'paginateAfter label' , 'Asset_AssetReport'], + hoverHelp => [ 'paginateAfter description' , 'Asset_AssetReport'], + ); #------------------------------------------------------------------- @@ -38,57 +63,12 @@ The session variable. =cut -sub canAdd { +around canAdd => sub { + my $orig = shift; my $class = shift; my $session = shift; - $class->SUPER::canAdd($session, undef, '3'); -} - -#------------------------------------------------------------------- - -=head2 definition ( session, definition ) - -=cut - -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift; - my $i18n = WebGUI::International->new( $session, 'Asset_AssetReport' ); - - tie my %properties, 'Tie::IxHash', ( - settings => { - tab => 'properties', - fieldType => 'AssetReportQuery', - defaultValue => undef, - }, - templateId => { - tab => "display", - fieldType => "template", - namespace => "AssetReport", - defaultValue => "sJtcUCfn0CVbKdb4QM61Yw", - label => $i18n->get("templateId label"), - hoverHelp => $i18n->get("templateId description"), - }, - paginateAfter => { - tab => 'display', - fieldType => 'integer', - defaultValue => 25, - label => $i18n->get( 'paginateAfter label' ), - hoverHelp => $i18n->get( 'paginateAfter description' ), - }, - ); - - push @{$definition}, { - assetName => $i18n->get('assetName'), - autoGenerateForms => 1, - tableName => 'AssetReport', - className => 'WebGUI::Asset::Wobject::AssetReport', - properties => \%properties, - }; - - return $class->SUPER::definition( $session, $definition ); -} + return $class->$orig($session, undef, '3'); +}; #---------------------------------------------------------------------------- @@ -99,13 +79,14 @@ Prepare the view. Add stuff to HEAD. =cut -sub prepareView { +around prepareView => sub { + my $orig = shift; my $self = shift; - $self->SUPER::prepareView(@_); + $self->$orig(@_); my $session = $self->session; # Prepare the template - my $template = WebGUI::Asset::Template->new( $session, $self->get("templateId") ); + my $template = WebGUI::Asset::Template->new( $session, $self->templateId ); if (!$template) { WebGUI::Error::ObjectNotFound::Template->throw( error => qq{Template not found}, @@ -117,7 +98,7 @@ sub prepareView { $self->{_template} = $template; return; -} +}; #---------------------------------------------------------------------------- @@ -135,12 +116,12 @@ sub getTemplateVars { my $var = $self->get; #Build the lineage query - my $settings = JSON->new->decode($self->getValue("settings")); + my $settings = JSON->new->decode($self->settings); #TO DO - ADD CACHE CONTROL my $assetId = $settings->{startNode}; - my $asset = WebGUI::Asset->newByDynamicClass($session,$assetId); + my $asset = WebGUI::Asset->newById($session,$assetId); my $rules = {}; $rules->{'isa'} = $settings->{className}; @@ -182,14 +163,15 @@ sub getTemplateVars { } my $sql = $asset->getLineageSql(["descendants"],$rules); - my $p = WebGUI::Paginator->new($session,$self->getUrl,$self->get("paginateAfter")); + my $p = WebGUI::Paginator->new($session,$self->getUrl,$self->paginateAfter); $p->setDataByQuery($sql); #Build the data for all the assets on the page $var->{'asset_loop'} = []; my $data = $p->getPageData; foreach my $row (@{$data}) { - my $returnAsset = WebGUI::Asset->new($session,$row->{assetId},$row->{className},$row->{revisionDate}); + my $returnAsset = eval { WebGUI::Asset->newById($session, $row->{assetId}); }; + next ROW if Exception::Class->caught(); push(@{$var->{'asset_loop'}}, { %{$returnAsset->get}, %{$returnAsset->getMetaDataAsTemplateVariables} @@ -219,10 +201,10 @@ sub secure_identifier { if(scalar(@parts) > 1) { my $table = $parts[0]; my $column = $parts[1]; - $identifier = $db->dbh->quote_identifier($table).".".$db->dbh->quote_identifier($column); + $identifier = $db->quote_identifier($table).".".$db->dbh->quote_identifier($column); } else { - $identifier = $db->dbh->quote_identifier($identifier); + $identifier = $db->quote_identifier($identifier); } return $identifier; diff --git a/lib/WebGUI/Asset/Wobject/Calendar.pm b/lib/WebGUI/Asset/Wobject/Calendar.pm index bc1f1ab08..b93270115 100644 --- a/lib/WebGUI/Asset/Wobject/Calendar.pm +++ b/lib/WebGUI/Asset/Wobject/Calendar.pm @@ -3,7 +3,7 @@ package WebGUI::Asset::Wobject::Calendar; use strict; #---------------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 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,18 +12,299 @@ use strict; # http://www.plainblack.com info@plainblack.com #---------------------------------------------------------------------------- +#use base qw/WebGUI::Asset::Wobject WebGUI::JSONCollateral/; +use Moose; use Tie::IxHash; +use WebGUI::Definition::Asset; +extends 'WebGUI::Asset::Wobject'; +with 'WebGUI::Role::Asset::JSONCollateral'; + +define assetName => ['assetName', 'Asset_Calendar']; +define icon => 'calendar.gif'; +define tableName => 'Calendar'; +property defaultView => ( + fieldType => "SelectBox", + default => "month", + options => \&_defaultView_options, + tab => "display", + label => ["defaultView label", 'Asset_Calendar'], + hoverHelp => ["defaultView description", 'Asset_Calendar'], + ); +sub _defaultView_options { + my $self = shift; + my $i18n = WebGUI::International->new($self->session, 'Asset_Calendar'); + tie my %optionsDefaultView, 'Tie::IxHash', ( + month => $i18n->get("defaultView value month"), + week => $i18n->get("defaultView value week"), + day => $i18n->get("defaultView value day"), + list => $i18n->get('defaultView value list'), + ); + return %optionsDefaultView; +} + +property defaultDate => ( + fieldType => "SelectBox", + default => 'current', + options => \&_defaultDate_options, + tab => "display", + label => ["defaultDate label", 'Asset_Calendar'], + hoverHelp => ["defaultDate description", 'Asset_Calendar'], + ); +sub _defaultDate_options { + my $self = shift; + my $i18n = WebGUI::International->new($self->session, 'Asset_Calendar'); + tie my %optionsDefaultDate, 'Tie::IxHash', ( + current => $i18n->get("defaultDate value current"), + first => $i18n->get("defaultDate value first"), + last => $i18n->get("defaultDate value last"), + ); + return %optionsDefaultDate; +} + + ##### GROUPS / ACCESS ##### + # Edit events +property groupIdEventEdit => ( + fieldType => "group", + default => "3", + tab => "security", + label => ["groupIdEventEdit label", 'Asset_Calendar'], + hoverHelp => ["groupIdEventEdit description", 'Asset_Calendar'], + ); + +property groupIdSubscribed => ( + noFormPost => 1, + fieldType => 'hidden', + ); + + ##### TEMPLATES - DISPLAY ##### + # Month +property templateIdMonth => ( + fieldType => "template", + default => 'CalendarMonth000000001', + tab => "display", + namespace => "Calendar/Month", + hoverHelp => ['templateIdMonth description', 'Asset_Calendar'], + label => ['templateIdMonth label', 'Asset_Calendar'], + ); + + # Week +property templateIdWeek => ( + fieldType => "template", + default => 'CalendarWeek0000000001', + tab => "display", + namespace => "Calendar/Week", + hoverHelp => ['templateIdWeek description', 'Asset_Calendar'], + label => ['templateIdWeek label', 'Asset_Calendar'], + ); + + # Day +property templateIdDay => ( + fieldType => "template", + default => 'CalendarDay00000000001', + tab => "display", + namespace => "Calendar/Day", + hoverHelp => ['templateIdDay description', 'Asset_Calendar'], + label => ['templateIdDay label', 'Asset_Calendar'], + ); + + # List +property templateIdList => ( + fieldType => "template", + default => 'kj3b-X3i6zRKnhLb4ZiCLw', + tab => "display", + namespace => "Calendar/List", + hoverHelp => ['editForm templateIdList description', 'Asset_Calendar'], + label => ['editForm templateIdList label', 'Asset_Calendar'], + ); + + # Event Details +property templateIdEvent => ( + fieldType => "template", + default => 'CalendarEvent000000001', + tab => "display", + namespace => "Calendar/Event", + hoverHelp => ['templateIdEvent description', 'Asset_Calendar'], + label => ['templateIdEvent label', 'Asset_Calendar'], + ); + + # Event Edit +property templateIdEventEdit => ( + fieldType => "template", + default => 'CalendarEventEdit00001', + tab => "display", + namespace => "Calendar/EventEdit", + hoverHelp => ['templateIdEventEdit description', 'Asset_Calendar'], + label => ['templateIdEventEdit label', 'Asset_Calendar'], + ); + + # Search +property templateIdSearch => ( + fieldType => "template", + default => 'CalendarSearch00000001', + tab => "display", + namespace => "Calendar/Search", + hoverHelp => ['templateIdSearch description', 'Asset_Calendar'], + label => ['templateIdSearch label', 'Asset_Calendar'], + ); + + + ##### TEMPLATES - PRINT ##### + # Month +property templateIdPrintMonth => ( + fieldType => "template", + default => 'CalendarPrintMonth0001', + tab => "display", + namespace => "Calendar/Print/Month", + hoverHelp => ['templateIdPrintMonth description', 'Asset_Calendar'], + label => ['templateIdPrintMonth label', 'Asset_Calendar'], + ); + + # Week +property templateIdPrintWeek => ( + fieldType => "template", + default => 'CalendarPrintWeek00001', + tab => "display", + namespace => "Calendar/Print/Week", + hoverHelp => ['templateIdPrintWeek description', 'Asset_Calendar'], + label => ['templateIdPrintWeek label', 'Asset_Calendar'], + ); + + # Day +property templateIdPrintDay => ( + fieldType => "template", + default => 'CalendarPrintDay000001', + tab => "display", + namespace => "Calendar/Print/Day", + hoverHelp => ['templateIdPrintDay description', 'Asset_Calendar'], + label => ['templateIdPrintDay label', 'Asset_Calendar'], + ); + + # List +property templateIdPrintList => ( + fieldType => "template", + default => '', + tab => "display", + namespace => "Calendar/Print/List", + hoverHelp => ['editForm templateIdPrintList description', 'Asset_Calendar'], + label => ['editForm templateIdPrintList label', 'Asset_Calendar'], + ); + + # Event Details +property templateIdPrintEvent => ( + fieldType => "template", + default => 'CalendarPrintEvent0001', + tab => "display", + namespace => "Calendar/Print/Event", + hoverHelp => ['templateIdPrintEvent description', 'Asset_Calendar'], + label => ['templateIdPrintEvent label', 'Asset_Calendar'], + ); + + + ##### Miscellany ##### +property visitorCacheTimeout => ( + fieldType => "integer", + default => "60", + tab => "display", + hoverHelp => ['visitorCacheTimeout description', 'Asset_Calendar'], + label => ['visitorCacheTimeout label', 'Asset_Calendar'], + ); +property sortEventsBy => ( + fieldType => "SelectBox", + default => "time", + options => \&_sortEventsBy_options, + tab => "display", + label => ["sortEventsBy label", 'Asset_Calendar'], + hoverHelp => ["sortEventsBy description", 'Asset_Calendar'], + ); +sub _sortEventsBy_options { + my $self = shift; + my $i18n = WebGUI::International->new($self->session, 'Asset_Calendar'); + tie my %optionsEventSort, 'Tie::IxHash', ( + time => $i18n->get("sortEventsBy value time"), + sequencenumber => $i18n->get("sortEventsBy value sequencenumber"), + ); + return %optionsEventSort; +} + + +property listViewPageInterval => ( + fieldType => "interval", + builder => '_listViewPageInterval_builder', + tab => "display", + label => ['editForm listViewPageInterval label', 'Asset_Calendar'], + hoverHelp => ['editForm listViewPageInterval description', 'Asset_Calendar'], + unitsAvailable => [ qw( days weeks months years ) ], + lazy => 1, + ); +sub _listViewPageInterval_builder { + my $self = shift; + return $self->session->datetime->intervalToSeconds( 3, 'months' ); +} + +property icalFeeds => ( + fieldType => "JsonTable", + default => sub { return []; }, + isa => 'WebGUI::Type::JSONArray', + coerce => 1, + traits => ['Array', 'WebGUI::Definition::Meta::Property::Serialize',], + tab => "feeds", + label => ['feeds','Asset_Calendar'], + fields => [ + { + name => 'feedId', + type => 'id', + }, + { + name => 'url', + type => 'text', + size => '40', + label => ['Feed URL','Asset_Calendar'], + }, + { + name => 'lastResult', + type => 'readonly', + label => ['434','WebGUI'], + }, + { + name => 'lastUpdated', + type => 'readonly', + label => ['454', 'WebGUI'], + }, + ], + ); + +property icalInterval => ( + fieldType => "interval", + builder => '_icalInterval_builder', + lazy => 1, + tab => "display", + label => ['editForm icalInterval label', 'Asset_Calendar'], + hoverHelp => ['editForm icalInterval description', 'Asset_Calendar'], + unitsAvailable => [ qw( days weeks months years ) ], + ); +sub _icalInterval_builder { + return shift->session->datetime->intervalToSeconds( 3, 'months' ); +} + +property workflowIdCommit => ( + fieldType => "workflow", + builder => '_workflowIdCommit_builder', + lazy => 1, + tab => 'security', + label => ['editForm workflowIdCommit label', 'Asset_Calendar'], + hoverHelp => ['editForm workflowIdCommit description', 'Asset_Calendar'], + type => 'WebGUI::VersionTag', + ); +sub _workflowIdCommit_builder { + return shift->session->setting->get('defaultVersionTagWorkflow'), +} -use WebGUI::Utility; use WebGUI::International; use WebGUI::Search; use WebGUI::Form; use WebGUI::HTML; -use WebGUI::ICal; use WebGUI::DateTime; -use Class::C3; - -use base qw/WebGUI::Asset::Wobject WebGUI::JSONCollateral/; +use WebGUI::ICal; use DateTime; use JSON; @@ -44,281 +325,6 @@ use Text::Wrap; #---------------------------------------------------------------------------- -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift || []; - - my $i18n = WebGUI::International->new($session, 'Asset_Calendar'); - - ### Set up list options ### - tie my %optionsDefaultView, 'Tie::IxHash', ( - month => $i18n->get("defaultView value month"), - week => $i18n->get("defaultView value week"), - day => $i18n->get("defaultView value day"), - list => $i18n->get('defaultView value list'), - ); - - tie my %optionsDefaultDate, 'Tie::IxHash', ( - current => $i18n->get("defaultDate value current"), - first => $i18n->get("defaultDate value first"), - last => $i18n->get("defaultDate value last"), - ); - - tie my %optionsEventSort, 'Tie::IxHash', ( - time => $i18n->get("sortEventsBy value time"), - sequencenumber => $i18n->get("sortEventsBy value sequencenumber"), - ); - - - ### Build properties hash ### - tie my %properties, 'Tie::IxHash', ( - ##### DEFAULTS ##### - defaultView => { - fieldType => "SelectBox", - defaultValue => "month", - options => \%optionsDefaultView, - tab => "display", - label => $i18n->get("defaultView label"), - hoverHelp => $i18n->get("defaultView description"), - }, - - defaultDate => { - fieldType => "SelectBox", - defaultValue => 'current', - options => \%optionsDefaultDate, - tab => "display", - label => $i18n->get("defaultDate label"), - hoverHelp => $i18n->get("defaultDate description"), - }, - - ##### GROUPS / ACCESS ##### - # Edit events - groupIdEventEdit => { - fieldType => "group", - defaultValue => "3", - tab => "security", - label => $i18n->get("groupIdEventEdit label"), - hoverHelp => $i18n->get("groupIdEventEdit description"), - }, - - groupIdSubscribed => { - fieldType => 'hidden', - }, - - - ##### TEMPLATES - DISPLAY ##### - # Month - templateIdMonth => { - fieldType => "template", - defaultValue => 'CalendarMonth000000001', - tab => "display", - namespace => "Calendar/Month", - hoverHelp => $i18n->get('templateIdMonth description'), - label => $i18n->get('templateIdMonth label'), - }, - - # Week - templateIdWeek => { - fieldType => "template", - defaultValue => 'CalendarWeek0000000001', - tab => "display", - namespace => "Calendar/Week", - hoverHelp => $i18n->get('templateIdWeek description'), - label => $i18n->get('templateIdWeek label'), - }, - - # Day - templateIdDay => { - fieldType => "template", - defaultValue => 'CalendarDay00000000001', - tab => "display", - namespace => "Calendar/Day", - hoverHelp => $i18n->get('templateIdDay description'), - label => $i18n->get('templateIdDay label'), - }, - - # List - templateIdList => { - fieldType => "template", - defaultValue => 'kj3b-X3i6zRKnhLb4ZiCLw', - tab => "display", - namespace => "Calendar/List", - hoverHelp => $i18n->get('editForm templateIdList description'), - label => $i18n->get('editForm templateIdList label'), - }, - - # Event Details - templateIdEvent => { - fieldType => "template", - defaultValue => 'CalendarEvent000000001', - tab => "display", - namespace => "Calendar/Event", - hoverHelp => $i18n->get('templateIdEvent description'), - label => $i18n->get('templateIdEvent label'), - }, - - # Event Edit - templateIdEventEdit => { - fieldType => "template", - defaultValue => 'CalendarEventEdit00001', - tab => "display", - namespace => "Calendar/EventEdit", - hoverHelp => $i18n->get('templateIdEventEdit description'), - label => $i18n->get('templateIdEventEdit label'), - }, - - # Search - templateIdSearch => { - fieldType => "template", - defaultValue => 'CalendarSearch00000001', - tab => "display", - namespace => "Calendar/Search", - hoverHelp => $i18n->get('templateIdSearch description'), - label => $i18n->get('templateIdSearch label'), - }, - - - ##### TEMPLATES - PRINT ##### - # Month - templateIdPrintMonth => { - fieldType => "template", - defaultValue => 'CalendarPrintMonth0001', - tab => "display", - namespace => "Calendar/Print/Month", - hoverHelp => $i18n->get('templateIdPrintMonth description'), - label => $i18n->get('templateIdPrintMonth label'), - }, - - # Week - templateIdPrintWeek => { - fieldType => "template", - defaultValue => 'CalendarPrintWeek00001', - tab => "display", - namespace => "Calendar/Print/Week", - hoverHelp => $i18n->get('templateIdPrintWeek description'), - label => $i18n->get('templateIdPrintWeek label'), - }, - - # Day - templateIdPrintDay => { - fieldType => "template", - defaultValue => 'CalendarPrintDay000001', - tab => "display", - namespace => "Calendar/Print/Day", - hoverHelp => $i18n->get('templateIdPrintDay description'), - label => $i18n->get('templateIdPrintDay label'), - }, - - # List - templateIdPrintList => { - fieldType => "template", - defaultValue => '', - tab => "display", - namespace => "Calendar/Print/List", - hoverHelp => $i18n->get('editForm templateIdPrintList description'), - label => $i18n->get('editForm templateIdPrintList label'), - }, - - # Event Details - templateIdPrintEvent => { - fieldType => "template", - defaultValue => 'CalendarPrintEvent0001', - tab => "display", - namespace => "Calendar/Print/Event", - hoverHelp => $i18n->get('templateIdPrintEvent description'), - label => $i18n->get('templateIdPrintEvent label'), - }, - - - ##### Miscellany ##### - visitorCacheTimeout => { - fieldType => "integer", - defaultValue => "60", - tab => "display", - hoverHelp => $i18n->get('visitorCacheTimeout description'), - label => $i18n->get('visitorCacheTimeout label'), - }, - sortEventsBy => { - fieldType => "SelectBox", - defaultValue => "time", - options => \%optionsEventSort, - tab => "display", - label => $i18n->get("sortEventsBy label"), - hoverHelp => $i18n->get("sortEventsBy description"), - }, - - listViewPageInterval => { - fieldType => "interval", - defaultValue => $session->datetime->intervalToSeconds( 3, 'months' ), - tab => "display", - label => $i18n->get('editForm listViewPageInterval label'), - hoverHelp => $i18n->get('editForm listViewPageInterval description'), - unitsAvailable => [ qw( days weeks months years ) ], - }, - - icalFeeds => { - fieldType => "JsonTable", - defaultValue => [], - serialize => 1, - tab => "feeds", - fields => [ - { - name => 'feedId', - type => 'id', - }, - { - name => 'url', - type => 'text', - size => '40', - label => $i18n->get('Feed URL'), - }, - { - name => 'lastResult', - type => 'readonly', - label => $i18n->get('434','WebGUI'), - }, - { - name => 'lastUpdated', - type => 'readonly', - label => $i18n->get('454', 'WebGUI'), - }, - ], - }, - - icalInterval => { - fieldType => "interval", - defaultValue => $session->datetime->intervalToSeconds( 3, 'months' ), - tab => "display", - label => $i18n->get('editForm icalInterval label'), - hoverHelp => $i18n->get('editForm icalInterval description'), - unitsAvailable => [ qw( days weeks months years ) ], - }, - - workflowIdCommit => { - fieldType => "workflow", - defaultValue => $session->setting->get('defaultVersionTagWorkflow'), - tab => 'security', - label => $i18n->get('editForm workflowIdCommit label'), - hoverHelp => $i18n->get('editForm workflowIdCommit description'), - type => 'WebGUI::VersionTag', - }, - ); - - push @{$definition}, { - assetName => $i18n->get('assetName'), - icon => 'calendar.gif', - tableName => 'Calendar', - className => 'WebGUI::Asset::Wobject::Calendar', - properties => \%properties, - autoGenerateForms => 1, - }; - - return $class->SUPER::definition($session, $definition); -} - -#---------------------------------------------------------------------------- - =head2 addFeed ( $feedParams ) Adds a new Feed to this calendar. This is a wrapper around WebGUI::JSONCollateral's setJSONCollateral @@ -425,7 +431,8 @@ around the canEdit check when www_editSave is being used to add an asset). =cut -sub canEdit { +around canEdit => sub { + my $orig = shift; my $self = shift; my $userId = shift || $self->session->user->userId; my $form = $self->session->form; @@ -438,18 +445,18 @@ sub canEdit { return 1 if ( $self->canAddEvent( $userId ) && $form->process("assetId") eq "new" - && $form->process("func") eq "editSave" - && $form->process("class") eq "WebGUI::Asset::Event" + && $form->process("func") eq "addSave" + && $form->process("className") eq "WebGUI::Asset::Event" ); # Who can edit the Calendar can do everything - if ( $self->SUPER::canEdit( $userId ) ) { + if ( $self->$orig( $userId ) ) { return 1; } # Fails all checks return 0; -} +}; #---------------------------------------------------------------------------- @@ -472,8 +479,8 @@ sub canAddEvent { ; return 1 if ( - $user->isInGroup( $self->get("groupIdEventEdit") ) - || $self->SUPER::canEdit( $userId ) + $user->isInGroup( $self->groupIdEventEdit ) + || $self->SUPER::canEdit($userId) ); } @@ -524,20 +531,6 @@ sub deleteFeed { #---------------------------------------------------------------------------- -=head2 getEditTabs ( ) - -Add the feeds tab to the edit form - -=cut - -sub getEditTabs { - my ( $self ) = @_; - my $i18n = WebGUI::International->new($self->session,"Asset_Calendar"); - return $self->SUPER::getEditTabs, ["feeds",$i18n->get("feeds"), 6]; -} - -#---------------------------------------------------------------------------- - =head2 getEvent ( assetId ) Gets an Event object from the database. Returns a WebGUI::Asset::Event object @@ -550,20 +543,20 @@ sub getEvent { my $self = shift; my $assetId = shift; # Warn and return undef if no assetId - $self->session->errorHandler->warn("WebGUI::Asset::Wobject::Calendar->getEvent :: No asset ID."), return + $self->session->log->warn("WebGUI::Asset::Wobject::Calendar->getEvent :: No asset ID."), return unless $assetId; # ? Perhaps use Stow to cache events ? - my $event = WebGUI::Asset->newByDynamicClass($self->session, $assetId); + my $event = WebGUI::Asset->newById($self->session, $assetId); unless ( $event ) { - $self->session->errorHandler->warn("Event '$assetId' doesn't exist!"); + $self->session->log->warn("Event '$assetId' doesn't exist!"); return undef; } - $self->session->errorHandler->warn("WebGUI::Asset::Wobject::Calendar->getEvent :: Event '$assetId' not a child of calendar '".$self->getId."'"), return - unless $event->get("parentId") eq $self->getId; + $self->session->log->warn("WebGUI::Asset::Wobject::Calendar->getEvent :: Event '$assetId' not a child of calendar '".$self->getId."'"), return + unless $event->parentId eq $self->getId; return $event; } @@ -610,11 +603,11 @@ sub getEventsIn { my $params = shift; $params->{order} = '' if $params->{order} !~ /^(?:time|sequencenumber)/i; - my $order_by_type = $params->{order} ? lc($params->{order}) : $self->get('sortEventsBy'); + my $order_by_type = $params->{order} ? lc($params->{order}) : $self->sortEventsBy; # Warn and return undef if no startDate or endDate unless ($start && $end) { - $self->session->errorHandler->warn("WebGUI::Asset::Wobject::Calendar->getEventsIn() called with not enough arguments at ".join('::',(caller)[1,2])); + $self->session->log->warn("WebGUI::Asset::Wobject::Calendar->getEventsIn() called with not enough arguments at ".join('::',(caller)[1,2])); return undef; } @@ -721,7 +714,7 @@ TODO: Format lastUpdated into the user's time zone sub getFeeds { my $self = shift; - my $feeds = $self->get('icalFeeds'); + my $feeds = $self->icalFeeds; return $feeds if (ref $feeds); $self->session->log->warn('improperly stored icalFeed in calendar assetId:'.$self->getId); return JSON::from_json($feeds); @@ -737,7 +730,7 @@ Gets the first event in this calendar. Returns the Event object. sub getFirstEvent { my $self = shift; - my $lineage = $self->get("lineage"); + my $lineage = $self->lineage; my ($assetId) = $self->session->db->quickArray(<get("lineage"); + my $lineage = $self->lineage; my ($assetId) = $self->session->db->quickArray(< sub { my $self = shift; - $self->SUPER::prepareView(); + super(); my $view = ucfirst lc $self->session->form->param("type") - || ucfirst $self->get("defaultView") + || ucfirst $self->defaultView || "Month"; if ($self->session->form->param("print")){ @@ -832,9 +825,9 @@ sub prepareView { $self->session->style->makePrintable(1); } - #$self->session->errorHandler->warn("Prepare view ".$view." with template ".$self->get("templateId".$view)); + #$self->session->log->warn("Prepare view ".$view." with template ".$self->get("templateId".$view)); - my $template = WebGUI::Asset::Template->new($self->session, $self->get("templateId".$view)); + my $template = WebGUI::Asset::Template->newById($self->session, $self->get("templateId".$view)); if (!$template) { WebGUI::Error::ObjectNotFound::Template->throw( error => qq{Template not found}, @@ -845,11 +838,11 @@ sub prepareView { $template->prepare($self->getMetaDataAsTemplateVariables); $self->{_viewTemplate} = $template; -} +}; #---------------------------------------------------------------------------- -=head2 processPropertiesFromFormPost ( ) +=head2 processEditForm ( ) Process the Calendar Edit form. @@ -859,13 +852,13 @@ Adds / removes feeds from the feed trough. =cut -sub processPropertiesFromFormPost { +override processEditForm => sub { my $self = shift; my $session = $self->session; my $form = $self->session->form; - $self->SUPER::processPropertiesFromFormPost; + super(); - unless ($self->get("groupIdSubscribed")) { + unless ($self->groupIdSubscribed) { $self->createSubscriptionGroup(); } @@ -881,7 +874,7 @@ sub processPropertiesFromFormPost { } return; -} +}; #---------------------------------------------------------------------------- @@ -932,7 +925,7 @@ sub view { # Get the form parameters my $params = {}; - $params->{type} = $form->param("type") || $self->get( 'defaultView' ); + $params->{type} = $form->param("type") || $self->defaultView; $params->{start} = $form->param("start"); # Validate type passed, or recover from session scratchpad @@ -940,7 +933,7 @@ sub view { $session->scratch->set('cal_view_type', $params->{'type'}); } else { - $params->{type} = $session->scratch->get('cal_view_type') || $self->get( 'defaultView' ) || 'month'; + $params->{type} = $session->scratch->get('cal_view_type') || $self->defaultView || 'month'; $session->scratch->set('cal_view_type', $params->{'type'}); } @@ -955,9 +948,9 @@ sub view { # Set defaults if necessary if (!$params->{start}) { $params->{start} - = $self->get("defaultDate") eq "first" && $self->getFirstEvent + = $self->defaultDate eq "first" && $self->getFirstEvent ? $self->getFirstEvent->getDateTimeStart - : $self->get("defaultDate") eq "last" && $self->getLastEvent + : $self->defaultDate eq "last" && $self->getLastEvent ? $self->getLastEvent->getDateTimeStart : WebGUI::DateTime->new($session, time)->toUserTimeZone ; @@ -971,13 +964,13 @@ sub view { : lc $params->{type} eq "week" ? $self->viewWeek( $params ) : lc $params->{type} eq "day" ? $self->viewDay( $params ) : lc $params->{type} eq "list" ? $self->viewList( $params ) - : return $self->errorHandler->error("Calendar invalid 'type=' url parameter") + : return $self->log->error("Calendar invalid 'type=' url parameter") ; ##### Process the template # Add any global variables # Admin - if ($self->session->var->isAdminOn) { + if ($self->session->isAdminOn) { $var->{'admin'} = 1; $var->{'adminControls'} = $self->getToolbar; } @@ -985,7 +978,7 @@ sub view { # Event editor if ($self->canAddEvent) { $var->{'editor'} = 1; - $var->{"urlAdd"} = $self->getUrl("func=add;class=WebGUI::Asset::Event;type=".$params->{type}.";start=$params->{start}"); + $var->{"urlAdd"} = $self->getUrl("func=add;className=WebGUI::Asset::Event;type=".$params->{type}.";start=$params->{start}"); } # URLs @@ -1124,7 +1117,7 @@ sub viewList { ### Get the events my $dtStart = WebGUI::DateTime->new( $session, $params->{start} ); $dtStart->set_time_zone($tz); - my $dtEnd = $dtStart->clone->add( seconds => $self->get('listViewPageInterval') ); + my $dtEnd = $dtStart->clone->add( seconds => $self->listViewPageInterval ); my @events = $self->getEventsIn( @@ -1133,7 +1126,7 @@ sub viewList { ); ### Build the event vars - my $dtLast = $dtStart; # The DateTime of the last event + my $dtLast = WebGUI::DateTime->new(0); # The DateTime of the last event EVENT: for my $event (@events) { next EVENT unless $event && $event->canView(); my ( %eventVar, %eventDate ) @@ -1142,12 +1135,15 @@ sub viewList { # Add the change flags my $dt = $event->getDateTimeStart; if ( $dt->year > $dtLast->year ) { - $eventVar{ new_year } = 1; - } - if ( $dt->month > $dtLast->month ) { + $eventVar{ new_year } = 1; $eventVar{ new_month } = 1; + $eventVar{ new_day } = 1; } - if ( $dt->day > $dtLast->day ) { + elsif ( $dt->month > $dtLast->month ) { + $eventVar{ new_month } = 1; + $eventVar{ new_day } = 1; + } + elsif ( $dt->day > $dtLast->day ) { $eventVar{ new_day } = 1; } @@ -1163,7 +1159,7 @@ sub viewList { # Previous and next pages if ( $self->getFirstEvent && $self->getFirstEvent->getDateTimeStart < $dtStart ) { my $dtPrevious - = $dtStart->clone->add( seconds => 0 - $self->get('listViewPageInterval') ); + = $dtStart->clone->add( seconds => 0 - $self->listViewPageInterval ); $var->{ url_previousPage } = $self->getUrl( 'type=list;start=' . $dtPrevious->toDatabase ); } @@ -1220,7 +1216,7 @@ sub viewMonth { #### Create the template parameters ## The grid - my $first_dow = $session->user->profileField("firstDayOfWeek") || 0; + my $first_dow = $session->user->get("firstDayOfWeek") || 0; # 0 - sunday # 1 - mon # 2 - tue @@ -1353,7 +1349,7 @@ sub viewWeek { $dt->truncate( to => "day"); # Apply First Day of Week settings - my $first_dow = $session->user->profileField("firstDayOfWeek") || 0; + my $first_dow = $session->user->get("firstDayOfWeek") || 0; # 0 - sunday # 1 - monday # 2 - tuesday, etc... @@ -1364,7 +1360,7 @@ sub viewWeek { my $dtEnd = $dt->clone->add(days => 7)->add( seconds => -1); my $end = $dtEnd->toMysql; # Clone to prevent saving change - my $sort_by_sequence++ if $self->get('sortEventsBy') eq 'sequencenumber'; + my $sort_by_sequence++ if $self->sortEventsBy eq 'sequencenumber'; my $can_edit_order++ if $self->canEdit && $sort_by_sequence; my $reorder_request++ if $can_edit_order && $session->form->param( 'eventMove' ) =~ /^(?:UP|DOWN)$/; @@ -1380,7 +1376,7 @@ sub viewWeek { for my $event ( @events ) { next unless $event->canView(); - my $event_asset_id = $event->get( 'assetId' ); + my $event_asset_id = $event->getId; # Add Event object use by assetId $event_asset_of{ $event_asset_id }{ object } = $event; @@ -1486,7 +1482,7 @@ sub viewWeek { $session->db->dbh->do ("UPDATE Event SET sequenceNumber = ? WHERE assetId = ? AND revisionDate = ?",{}, - $prev_seq_num-$incr, $event_asset_id, $event_object->get( 'revisionDate' ) + $prev_seq_num-$incr, $event_asset_id, $event_object->revisionDate ); # warn "Moved Asset New Seq Num: ".($prev_seq_num - $incr)." by $incr\n"; @@ -1515,7 +1511,7 @@ sub viewWeek { $session->db->dbh->do ("UPDATE Event SET sequenceNumber = ? WHERE assetId = ? AND revisionDate = ?",{}, - $next_seq_num + $incr, $event_asset_id, $event_object->get( 'revisionDate' ) + $next_seq_num + $incr, $event_asset_id, $event_object->revisionDate ); # warn "Moved Asset New Seq Num: ".($next_seq_num + $incr)." by $incr\n"; } @@ -1571,7 +1567,7 @@ sub viewWeek { my %eventTemplateVariables = $self->getEventVars($event); foreach my $weekDay ($start_dow .. $end_dow) { - my $eventAssetId = $event->get( 'assetId' ); + my $eventAssetId = $event->getId; my %hash = %eventTemplateVariables; @@ -1665,28 +1661,6 @@ sub wrapIcal { #---------------------------------------------------------------------------- -=head2 www_edit ( ) - -Adds a submenu to the default edit page that includes links to Add an Event. - -=cut - -sub www_edit { - my $self = shift; - my $session = $self->session; - my $i18n = WebGUI::International->new($session, 'Asset_Calendar'); - - return $session->privilege->insufficient() unless $self->canEdit; - - - return $self->getAdminConsole->render( - $self->getEditForm->print, - $i18n->get("assetName") - ); -} - -#---------------------------------------------------------------------------- - =head2 www_ical Export an iCalendar feed of this Events Calendar's events. @@ -1712,7 +1686,7 @@ sub www_ical { my ($spectreTest) = $self->session->db->quickArray( "SELECT value FROM userSessionScratch WHERE sessionId=? and name=?", - [$adminId,$self->get("assetId")] + [$adminId,$self->getId] ); if ($spectreTest eq "SPECTRE") { @@ -1745,7 +1719,7 @@ sub www_ical { ); } else { - $dt_end = $dt_start->clone->add( seconds => $self->get('icalInterval') ); + $dt_end = $dt_start->clone->add( seconds => $self->icalInterval ); } my $ical = WebGUI::ICal->new(); @@ -1809,7 +1783,7 @@ sub www_search { my %rules = ( keywords => $keywords, classes => ['WebGUI::Asset::Event'], - lineage => [$self->get("lineage")], + lineage => [$self->lineage], join => "join Event on assetIndex.assetId=Event.assetId and assetIndex.revisionDate=Event.revisionDate", columns => ['Event.startDate','Event.startTime'], ); @@ -1916,7 +1890,7 @@ sub www_search { # This is very bad! It should be $self->processStyle or whatnot. return $self->processStyle( - $self->processTemplate( $var, $self->get('templateIdSearch') ) + $self->processTemplate( $var, $self->templateIdSearch ) ); } @@ -1968,5 +1942,6 @@ toUserTimeZone methods of WebGUI::DateTime for to make less confusion. =cut +__PACKAGE__->meta->make_immutable; 1; diff --git a/lib/WebGUI/Asset/Wobject/Carousel.pm b/lib/WebGUI/Asset/Wobject/Carousel.pm index d4075efc9..e13bdd431 100644 --- a/lib/WebGUI/Asset/Wobject/Carousel.pm +++ b/lib/WebGUI/Asset/Wobject/Carousel.pm @@ -3,7 +3,7 @@ package WebGUI::Asset::Wobject::Carousel; $VERSION = "1.0.0"; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2008 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -14,107 +14,54 @@ $VERSION = "1.0.0"; use strict; use JSON; -use Tie::IxHash; use WebGUI::International; -use WebGUI::Utility; -use base 'WebGUI::Asset::Wobject'; - -#------------------------------------------------------------------- - -=head2 definition ( ) - -defines wobject properties for New Wobject instances. You absolutely need -this method in your new Wobjects. If you choose to "autoGenerateForms", the -getEditForm method is unnecessary/redundant/useless. - -=cut - -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift; - my $i18n = WebGUI::International->new($session, 'Asset_Carousel'); - my %properties; - tie %properties, 'Tie::IxHash'; - %properties = ( - templateId =>{ - fieldType =>"template", - defaultValue =>'CarouselTmpl0000000001', - tab =>"display", - noFormPost =>0, - namespace =>"Carousel", - hoverHelp =>$i18n->get('carousel template description'), - label =>$i18n->get('carousel template label'), - }, - slideWidth =>{ - fieldType => "integer", - defaultValue => 0, - tab => "display", - hoverHelp => $i18n->get('carousel slideWidth description'), - label => $i18n->get('carousel slideWidth label'), - }, - slideHeight =>{ - fieldType => "integer", - defaultValue => 0, - tab => "display", - hoverHelp => $i18n->get('carousel slideHeight description'), - label => $i18n->get('carousel slideHeight label'), - }, - richEditor =>{ - fieldType => "selectRichEditor", - defaultValue => "PBrichedit000000000001", - tab => 'display', - label => $i18n->get('rich editor', 'Asset_Collaboration'), - hoverHelp => $i18n->get('rich editor description'), - }, - items =>{ - noFormPost =>1, - fieldType =>'text', - autoGenerate =>0, - }, - autoPlay => { - fieldType => 'yesNo', - defaultValue => 0, - tab => "properties", - hoverHelp => $i18n->get('carousel autoPlay description'), - label => $i18n->get('carousel autoPlay label'), - }, - autoPlayInterval => { - fieldType => 'Integer', - defaultValue => 4, - tab => 'properties', - hoverHelp => $i18n->get('carousel autoPlayInterval description'), - label => $i18n->get('carousel autoPlayInterval label'), - }, - - ); - push(@{$definition}, { - assetName=>$i18n->get('assetName'), - icon=>'Carousel.png', - autoGenerateForms=>1, - tableName=>'Carousel', - className=>'WebGUI::Asset::Wobject::Carousel', - properties=>\%properties - }); - return $class->SUPER::definition($session, $definition); -} - - -#------------------------------------------------------------------- - -=head2 duplicate ( ) - -duplicates a New Wobject. This method is unnecessary, but if you have -auxiliary, ancillary, or "collateral" data or files related to your -wobject instances, you will need to duplicate them here. - -=cut - -sub duplicate { - my $self = shift; - my $newAsset = $self->SUPER::duplicate(@_); - return $newAsset; -} +use Moose; +use WebGUI::Definition::Asset; +extends 'WebGUI::Asset::Wobject'; +define assetName => [ 'assetName', 'Asset_Carousel' ]; +define icon => 'Carousel.png'; +define tableName => 'Carousel'; +property templateId => ( + fieldType => "template", + default => 'CarouselTmpl0000000001', + tab => "display", + noFormPost => 0, + namespace => "Carousel", + hoverHelp => [ 'carousel template description', 'Asset_Carousel' ], + label => [ 'carousel template label', 'Asset_Carousel' ], +); +property slideWidth => ( + fieldType => "integer", + default => 0, + tab => "display", + hoverHelp => [ 'carousel slideWidth description', 'Asset_Carousel' ], + label => [ 'carousel slideWidth label', 'Asset_Carousel' ], +); +property slideHeight => ( + fieldType => "integer", + default => 0, + tab => "display", + hoverHelp => ['carousel slideHeight description', 'Asset_Carousel' ], + label => ['carousel slideHeight label', 'Asset_Carousel' ], +); +property items => ( + noFormPost => 1, + fieldType => 'text', +); +property autoPlay => ( + fieldType => 'yesNo', + defaultValue => 0, + tab => "properties", + hoverHelp => ['carousel autoPlay description', 'Asset_Carousel' ], + label => ['carousel autoPlay label', 'Asset_Carousel' ], +); +property autoPlayInterval => ( + fieldType => 'Integer', + defaultValue => 4, + tab => 'properties', + hoverHelp => ['carousel autoPlayInterval description', 'Asset_Carousel'], + label => ['carousel autoPlayInterval label', 'Asset_Carousel'], +); #------------------------------------------------------------------- @@ -125,9 +72,9 @@ This method is optional if you set autoGenerateForms=1 in the definition. =cut -sub getEditForm { +override getEditForm => sub { my $self = shift; - my $tabform = $self->SUPER::getEditForm(); + my $tabform = super(); my $i18n = WebGUI::International->new($self->session, "Asset_Carousel"); $self->session->style->setScript($self->session->url->extras('yui/build/yahoo-dom-event/yahoo-dom-event.js'), {type => @@ -147,28 +94,71 @@ sub getEditForm { $self->session->style->setScript($self->session->url->extras('wobject/Carousel/carousel.js'), {type => 'text/javascript'}); - my $tableRowStart = - '' - .'
    '.$i18n->get("items description").'
    ' - .' ' - .' ' - .'
    ' - ."
    \n"; + my $tableRowStart = '
    '.$i18n->get("items description").'
    ' + . ' ' + . '
    ' + . "
    \n"; - $tabform->getTab("properties")->raw($tableRowStart); + $tabform->getTab("properties")->addField('ReadOnly', value => $tableRowStart); + + if($self->items){ + my @items = @{JSON->new->decode($self->items)->{items}}; + + foreach my $item (@items){ + my $itemNr = $item->{sequenceNumber}; + my $itemHTML = "
    \n" + ."\n" + .$i18n->get("id label").'
    '.$i18n->get("id description").'
    : ' + .'' + ."
    \n" + ."\n" + .'
    \n"; + + $itemHTML .= + " \n" + ."
    \n"; + $tabform->getTab("properties")->addField('ReadOnly', value => $itemHTML); + } + } + else{ + my $itemHTML = "
    \n" + ."\n" + .$i18n->get("id label").'
    '.$i18n->get("id description").'
    : ' + .' ' + ."
    \n" + ."\n" + .'
    \n"; + + $itemHTML .= + "\n"; + $tabform->getTab("properties")->addField('ReadOnly', value => $itemHTML); + } $self->session->log->warn('richedit:' .$self->get('richEditor')); my $richEditId = $self->get('richEditor') || "PBrichedit000000000001"; - my $richedit = WebGUI::Asset->newByDynamicClass( $self->session, $richEditId ); + my $richedit = WebGUI::Asset->newById( $self->session, $richEditId ); my $config = JSON->new->encode( $richedit->getConfig ); my $loadMcePlugins = $richedit->getLoadPlugins; my $items = $self->get('items') ? JSON->new->decode($self->get('items'))->{items} : []; $items = JSON->new->encode( $items ); my $i18nJson = JSON->new->encode( { "delete" => $i18n->get("delete") } ); - $tabform->getTab('properties')->raw(<<"ENDHTML"); + $tabform->getTab('properties')->addField( "ReadOnly", name => 'editor', value => <<"ENDHTML");
    ENDHTML - my $tableRowEnd = qq| - - - |; - $tabform->getTab("properties")->raw($tableRowEnd); - return $tabform; -} +}; #------------------------------------------------------------------- @@ -195,56 +179,37 @@ See WebGUI::Asset::prepareView() for details. =cut -sub prepareView { +override prepareView => sub { my $self = shift; - $self->SUPER::prepareView(); - my $template = WebGUI::Asset::Template->new($self->session, $self->get("templateId")); + super(); + my $template = WebGUI::Asset::Template->newById($self->session, $self->templateId); if (!$template) { WebGUI::Error::ObjectNotFound::Template->throw( error => qq{Template not found}, - templateId => $self->get("templateId"), + templateId => $self->templateId, assetId => $self->getId, ); } $template->prepare; $self->{_viewTemplate} = $template; -} +}; #------------------------------------------------------------------- -=head2 processPropertiesFromFormPost ( ) +=head2 processEditForm ( ) Used to process properties from the form posted. =cut -sub processPropertiesFromFormPost { +override processEditForm => sub { my $self = shift; my $form = $self->session->form; - $self->SUPER::processPropertiesFromFormPost(@_); - - my $items = JSON->new->decode( $form->get("items") ); + super(); + my $items = JSON->new->decode( $form->get("items") ); $self->update({ items => JSON->new->encode({ items => $items }) }); return undef; -} - -#------------------------------------------------------------------- - -=head2 purge ( ) - -removes collateral data associated with a Carousel when the system -purges it's data. This method is unnecessary, but if you have -auxiliary, ancillary, or "collateral" data or files related to your -wobject instances, you will need to purge them here. - -=cut - -sub purge { - my $self = shift; - #purge your wobject-specific data here. This does not include fields - # you create for your Carousel asset/wobject table. - return $self->SUPER::purge; -} +}; #------------------------------------------------------------------- @@ -263,8 +228,8 @@ sub view { #This automatically creates template variables for all of your wobject's properties. my $var = $self->get; - if($self->getValue('items')){ - $var->{item_loop} = JSON->new->decode($self->getValue('items'))->{items}; + if($self->items){ + $var->{item_loop} = JSON->new->decode($self->items)->{items}; } #This is an example of debugging code to help you diagnose problems. @@ -273,5 +238,6 @@ sub view { return $self->processTemplate($var, undef, $self->{_viewTemplate}); } +__PACKAGE__->meta->make_immutable; 1; #vim:ft=perl diff --git a/lib/WebGUI/Asset/Wobject/Collaboration.pm b/lib/WebGUI/Asset/Wobject/Collaboration.pm index b2bbeac51..61687d623 100644 --- a/lib/WebGUI/Asset/Wobject/Collaboration.pm +++ b/lib/WebGUI/Asset/Wobject/Collaboration.pm @@ -1,7 +1,7 @@ package WebGUI::Asset::Wobject::Collaboration; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 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,17 +12,464 @@ package WebGUI::Asset::Wobject::Collaboration; use strict; use Tie::IxHash; +use Moose; +use WebGUI::Definition::Asset; +extends 'WebGUI::Asset::Wobject'; +define assetName => ['assetName', 'Asset_Collaboration']; +define icon => 'collaboration.gif'; +define tableName => 'Collaboration'; +property visitorCacheTimeout => ( + tab => "display", + fieldType => "interval", + default => 3600, + uiLevel => 8, + label => [ "visitor cache timeout", 'Asset_Collaboration' ], + hoverHelp => [ "visitor cache timeout help", 'Asset_Collaboration' ] +); +property autoSubscribeToThread => ( + fieldType => "yesNo", + default => 1, + tab => 'mail', + label => [ "auto subscribe to thread", 'Asset_Collaboration' ], + hoverHelp => [ "auto subscribe to thread help", 'Asset_Collaboration' ], +); +property requireSubscriptionForEmailPosting => ( + fieldType => "yesNo", + default => 1, + tab => 'mail', + label => [ "require subscription for email posting", 'Asset_Collaboration' ], + hoverHelp => [ "require subscription for email posting help", 'Asset_Collaboration' ], +); +property approvalWorkflow => ( + fieldType => "workflow", + default => "pbworkflow000000000003", + type => 'WebGUI::VersionTag', + tab => 'security', + label => [ 'approval workflow', 'Asset_Collaboration' ], + hoverHelp => [ 'approval workflow description', 'Asset_Collaboration' ], +); +property threadApprovalWorkflow => ( + fieldType => "workflow", + default => "pbworkflow000000000003", + type => 'WebGUI::VersionTag', + tab => 'security', + label => [ 'thread approval workflow', 'Asset_Collaboration' ], + hoverHelp => [ 'thread approval workflow description', 'Asset_Collaboration' ], +); +property thumbnailSize => ( + fieldType => "integer", + default => 0, + tab => "display", + label => [ "thumbnail size", 'Asset_Collaboration' ], + hoverHelp => [ "thumbnail size help", 'Asset_Collaboration' ] +); +property maxImageSize => ( + fieldType => "integer", + default => 0, + tab => "display", + label => [ "max image size", 'Asset_Collaboration' ], + hoverHelp => [ "max image size help", 'Asset_Collaboration' ] +); +property mailServer => ( + fieldType => "text", + default => undef, + tab => 'mail', + label => [ "mail server", 'Asset_Collaboration' ], + hoverHelp => [ "mail server help", 'Asset_Collaboration' ], +); +property mailAccount => ( + fieldType => "text", + default => undef, + tab => 'mail', + label => [ "mail account", 'Asset_Collaboration' ], + hoverHelp => [ "mail account help", 'Asset_Collaboration' ], + extras => 'autocomplete="off"', +); +property mailPassword => ( + fieldType => "password", + default => undef, + tab => 'mail', + label => [ "mail password", 'Asset_Collaboration' ], + hoverHelp => [ "mail password help", 'Asset_Collaboration' ], +); +property mailAddress => ( + fieldType => "email", + default => undef, + tab => 'mail', + label => [ "mail address", 'Asset_Collaboration' ], + hoverHelp => [ "mail address help", 'Asset_Collaboration' ], +); +property mailPrefix => ( + fieldType => "text", + default => undef, + tab => 'mail', + label => [ "mail prefix", 'Asset_Collaboration' ], + hoverHelp => [ "mail prefix help", 'Asset_Collaboration' ], +); +property getMailCronId => ( + fieldType => "hidden", + default => undef, + noFormPost => 1 +); +property getMail => ( + fieldType => "yesNo", + default => 0, + tab => 'mail', + label => [ "get mail", 'Asset_Collaboration' ], + hoverHelp => [ "get mail help", 'Asset_Collaboration' ], +); +property getMailInterval => ( + fieldType => "interval", + default => 300, + tab => 'mail', + label => [ "get mail interval", 'Asset_Collaboration' ], + hoverHelp => [ "get mail interval help", 'Asset_Collaboration' ], +); +property displayLastReply => ( + fieldType => "yesNo", + default => 0, + tab => 'display', + label => [ 'display last reply', 'Asset_Collaboration' ], + hoverHelp => [ 'display last reply description', 'Asset_Collaboration' ], +); +property allowReplies => ( + fieldType => "yesNo", + default => 1, + tab => 'security', + label => [ 'allow replies', 'Asset_Collaboration' ], + hoverHelp => [ 'allow replies description', 'Asset_Collaboration' ], +); +property threadsPerPage => ( + fieldType => "integer", + default => 30, + tab => 'display', + label => [ 'threads/page', 'Asset_Collaboration' ], + hoverHelp => [ 'threads/page description', 'Asset_Collaboration' ], +); +property postsPerPage => ( + fieldType => "integer", + default => 10, + tab => 'display', + label => [ 'posts/page', 'Asset_Collaboration' ], + hoverHelp => [ 'posts/page description', 'Asset_Collaboration' ], +); +property archiveEnabled => ( + fieldType => "yesNo", + default => 1, + tab => 'properties', + label => [ 'editForm archiveEnabled label', 'Asset_Collaboration' ], + hoverHelp => [ 'editForm archiveEnabled description', 'Asset_Collaboration' ], +); +property archiveAfter => ( + fieldType => "interval", + default => 31536000, + tab => 'properties', + label => [ 'archive after', 'Asset_Collaboration' ], + hoverHelp => [ 'archive after description', 'Asset_Collaboration' ], +); +property lastPostDate => ( + noFormPost => 1, + fieldType => "hidden", + default => undef +); +property lastPostId => ( + noFormPost => 1, + fieldType => "hidden", + default => undef +); +property rating => ( + noFormPost => 1, + fieldType => "hidden", + default => undef +); +property replies => ( + noFormPost => 1, + fieldType => "hidden", + default => undef +); +property views => ( + noFormPost => 1, + fieldType => "hidden", + default => undef +); +property threads => ( + noFormPost => 1, + fieldType => "hidden", + default => undef +); +property useContentFilter => ( + fieldType => "yesNo", + default => 1, + tab => 'display', + label => [ 'content filter', 'Asset_Collaboration' ], + hoverHelp => [ 'content filter description', 'Asset_Collaboration' ], +); +property filterCode => ( + fieldType => "filterContent", + default => 'most', + tab => 'security', + label => [ 'filter code', 'Asset_Collaboration' ], + hoverHelp => [ 'filter code description', 'Asset_Collaboration' ], +); +property replyFilterCode => ( + fieldType => "filterContent", + default => 'most', + tab => 'security', + label => [ 'reply filter code', 'Asset_Collaboration' ], + hoverHelp => [ 'reply filter code description', 'Asset_Collaboration' ], +); +property richEditor => ( + fieldType => "selectRichEditor", + default => "PBrichedit000000000002", + tab => 'display', + label => [ 'rich editor', 'Asset_Collaboration' ], + hoverHelp => [ 'rich editor description', 'Asset_Collaboration' ], +); +property replyRichEditor => ( + fieldType => "selectRichEditor", + default => "PBrichedit000000000002", + tab => 'display', + label => [ 'reply rich editor', 'Asset_Collaboration' ], + hoverHelp => [ 'reply rich editor description', 'Asset_Collaboration' ], +); +property attachmentsPerPost => ( + fieldType => "integer", + default => 0, + tab => 'properties', + label => [ 'attachments/post', 'Asset_Collaboration' ], + hoverHelp => [ 'attachments/post description', 'Asset_Collaboration' ], +); +property editTimeout => ( + fieldType => "interval", + default => 3600, + tab => 'security', + label => [ 'edit timeout', 'Asset_Collaboration' ], + hoverHelp => [ 'edit timeout description', 'Asset_Collaboration' ], +); +property addEditStampToPosts => ( + fieldType => "yesNo", + default => 0, + tab => 'security', + label => [ 'edit stamp', 'Asset_Collaboration' ], + hoverHelp => [ 'edit stamp description', 'Asset_Collaboration' ], +); +property usePreview => ( + fieldType => "yesNo", + default => 1, + tab => 'properties', + label => [ 'use preview', 'Asset_Collaboration' ], + hoverHelp => [ 'use preview description', 'Asset_Collaboration' ], +); +property sortOrder => ( + fieldType => "selectBox", + default => 'desc', + tab => 'display', + options => \&_sortOrder_options, + label => [ 'sort order', 'Asset_Collaboration' ], + hoverHelp => [ 'sort order description', 'Asset_Collaboration' ], +); +sub _sortOrder_options { + my $session = shift->session; + my $i18n = WebGUI::International->new($session,"Asset_Collaboration"); + return { + asc => $i18n->get('ascending'), + desc => $i18n->get('descending'), + }; +} +property sortBy => ( + fieldType => "selectBox", + default => 'assetData.revisionDate', + tab => 'display', + options => \&_sortBy_options, + label => [ 'sort by', 'Asset_Collaboration' ], + hoverHelp => [ 'sort by description', 'Asset_Collaboration' ], +); +sub _sortBy_options { + my $self = shift; + my $session = $self->session; + my $i18n = WebGUI::International->new($session,"Asset_Collaboration"); + tie my %sortByOptions, 'Tie::IxHash'; + %sortByOptions = ( + lineage => $i18n->get('sequence'), + "assetData.revisionDate" => $i18n->get('date updated'), + creationDate => $i18n->get('date submitted'), + title => $i18n->get('title'), + userDefined1 => $i18n->get('user defined 1'), + userDefined2 => $i18n->get('user defined 2'), + userDefined3 => $i18n->get('user defined 3'), + userDefined4 => $i18n->get('user defined 4'), + userDefined5 => $i18n->get('user defined 5'), + ); + if ($self->_useKarma) { + $sortByOptions{karmaRank} = $i18n->get('karma rank'); + } + return \%sortByOptions; +} +property notificationTemplateId => ( + fieldType => "template", + namespace => "Collaboration/Notification", + default => 'PBtmpl0000000000000027', + tab => 'mail', + label => [ 'notification template', 'Asset_Collaboration' ], + hoverHelp => [ 'notification template description', 'Asset_Collaboration' ], +); +property searchTemplateId => ( + fieldType => "template", + namespace => "Collaboration/Search", + default => 'PBtmpl0000000000000031', + tab => 'display', + label => [ 'search template', 'Asset_Collaboration' ], + hoverHelp => [ 'search template description', 'Asset_Collaboration' ], +); +property postFormTemplateId => ( + fieldType => "template", + namespace => "Collaboration/PostForm", + default => 'PBtmpl0000000000000029', + tab => 'display', + label => [ 'post template', 'Asset_Collaboration' ], + hoverHelp => [ 'post template description', 'Asset_Collaboration' ], +); +property threadTemplateId => ( + fieldType => "template", + namespace => "Collaboration/Thread", + default => 'PBtmpl0000000000000032', + tab => 'display', + label => [ 'thread template', 'Asset_Collaboration' ], + hoverHelp => [ 'thread template description', 'Asset_Collaboration' ], +); +property collaborationTemplateId => ( + fieldType => "template", + namespace => 'Collaboration', + default => 'PBtmpl0000000000000026', + tab => 'display', + label => [ 'system template', 'Asset_Collaboration' ], + hoverHelp => [ 'system template description', 'Asset_Collaboration' ], +); +property karmaPerPost => ( + fieldType => "integer", + default => 0, + tab => 'properties', + noFormPost => \&_disableForKarma, + label => [ 'karma/post', 'Asset_Collaboration' ], + hoverHelp => [ 'karma/post description', 'Asset_Collaboration' ], +); +sub _disableForKarma { + my $self = shift; + return ! $self->_useKarma; +} +property karmaSpentToRate => ( + fieldType => "integer", + default => 0, + tab => 'properties', + noFormPost => \&_disableForKarma, + label => [ 'karma spent to rate', 'Asset_Collaboration' ], + hoverHelp => [ 'karma spent to rate description', 'Asset_Collaboration' ], +); +property karmaRatingMultiplier => ( + fieldType => "integer", + default => 1, + tab => 'properties', + noFormPost => \&_disableForKarma, + label => [ 'karma rating multiplier', 'Asset_Collaboration' ], + hoverHelp => [ 'karma rating multiplier description', 'Asset_Collaboration' ], +); +property avatarsEnabled => ( + fieldType => "yesNo", + default => 0, + tab => 'properties', + label => [ 'enable avatars', 'Asset_Collaboration' ], + hoverHelp => [ 'enable avatars description', 'Asset_Collaboration' ], +); +property enablePostMetaData => ( + fieldType => "yesNo", + default => 0, + tab => 'meta', + label => [ 'enable metadata', 'Asset_Collaboration' ], + hoverHelp => [ 'enable metadata description', 'Asset_Collaboration' ], +); +property postGroupId => ( + fieldType => "group", + default => '2', + tab => 'security', + label => [ 'who posts', 'Asset_Collaboration' ], + hoverHelp => [ 'who posts description', 'Asset_Collaboration' ], +); +property canStartThreadGroupId => ( + fieldType => "group", + default => '2', + tab => 'security', + label => [ 'who threads', 'Asset_Collaboration' ], + hoverHelp => [ 'who threads description', 'Asset_Collaboration' ], +); +property defaultKarmaScale => ( + fieldType => "integer", + default => 1, + tab => 'properties', + noFormPost => \&_disableForKarma, + label => [ "default karma scale", 'Asset_Collaboration' ], + hoverHelp => [ 'default karma scale help', 'Asset_Collaboration' ], +); +property useCaptcha => ( + fieldType => "yesNo", + default => '0', + tab => 'security', + label => [ 'use captcha label', 'Asset_Collaboration' ], + hoverHelp => [ 'use captcha hover help', 'Asset_Collaboration' ], +); +property subscriptionGroupId => ( + fieldType => "subscriptionGroup", + tab => 'security', + label => [ "subscription group label", 'Asset_Collaboration' ], + hoverHelp => [ "subscription group hoverHelp", 'Asset_Collaboration' ], + noFormPost => 1, + default => undef, +); +property groupToEditPost => ( + tab => "security", + label => [ 'group to edit label', 'Asset_Collaboration' ], + excludeGroups => [ 1, 7 ], + hoverHelp => [ 'group to edit hoverhelp', 'Asset_Collaboration' ], + uiLevel => 6, + fieldType => 'group', + builder => '_groupToEditPost_builder', # groupToEditPost should default to groupIdEdit + lazy => 1, +); +sub _groupToEditPost_builder { + my $session = shift->session; + my $groupIdEdit; + if($session->asset) { + $groupIdEdit = $session->asset->groupIdEdit; + } + else { + $groupIdEdit = '4'; + } + return $groupIdEdit; +} +property postReceivedTemplateId => ( + fieldType => 'template', + namespace => 'Collaboration/PostReceived', + tab => 'display', + label => [ 'post received template', 'Asset_Collaboration' ], + hoverHelp => [ 'post received template hoverHelp', 'Asset_Collaboration' ], + default => 'default_post_received1', +); +property unsubscribeTemplateId => ( + fieldType => 'template', + namespace => 'Collaboration/Unsubscribe', + tab => 'display', + label => [ 'unsubscribe template', 'Asset_Collaboration' ], + hoverHelp => [ 'unsubscribe template hoverHelp', 'Asset_Collaboration' ], + default => 'default_CS_unsubscribe', +); + +with 'WebGUI::Role::Asset::RssFeed'; + use WebGUI::Group; -use WebGUI::Cache; use WebGUI::HTML; use WebGUI::International; use WebGUI::Paginator; -use WebGUI::Utility; use WebGUI::Asset::Wobject; use WebGUI::Workflow::Cron; -use Class::C3; -use base qw(WebGUI::AssetAspect::RssFeed WebGUI::Asset::Wobject); - #------------------------------------------------------------------- sub _computePostCount { @@ -54,6 +501,19 @@ sub _get_rfc822_date { $mday, $month, $year, $hour, $min, $sec); } + +#------------------------------------------------------------------- + +=head2 _useKarma + +Internal method for determining if the karma is enabled in settings. + +=cut + +sub _useKarma { + my $self = shift; + return $self->session->setting->get('useKarma'); +} #------------------------------------------------------------------- sub _visitorCacheKey { my $self = shift; @@ -95,35 +555,35 @@ sub appendPostListTemplateVars { my ($icon, $datetime) = $session->quick(qw(icon datetime)); my $isVisitor = $session->user->isVisitor; foreach my $row (@$page) { - my $post = WebGUI::Asset->new($session,$row->{assetId}, $row->{className}, $row->{revisionDate}); + my $post = WebGUI::Asset->newById($session,$row->{assetId}, $row->{revisionDate}); $post->{_parent} = $self; # caching parent for efficiency - my $controls = $icon->delete('func=delete',$post->get("url"),"Delete") . $icon->edit('func=edit',$post->get("url")); - if ($self->get("sortBy") eq "lineage") { - if ($self->get("sortOrder") eq "desc") { - $controls .= $icon->moveUp('func=demote',$post->get("url")).$icon->moveDown('func=promote',$post->get("url")); + my $controls = $icon->delete('func=delete',$post->url,"Delete") . $icon->edit('func=edit',$post->url); + if ($self->sortBy eq "lineage") { + if ($self->sortOrder eq "desc") { + $controls .= $icon->moveUp('func=demote',$post->url).$icon->moveDown('func=promote',$post->url); } else { - $controls .= $icon->moveUp('func=promote',$post->get("url")).$icon->moveDown('func=demote',$post->get("url")); + $controls .= $icon->moveUp('func=promote',$post->url).$icon->moveDown('func=demote',$post->url); } } my @rating_loop; - for (my $i=0;$i<=$post->get("rating");$i++) { + for (my $i=0;$i<=$post->rating;$i++) { push(@rating_loop,{'rating_loop.count'=>$i}); } my %lastReply; my $hasRead = 0; - if ($post->get("className") =~ /Thread/) { - if ($self->get("displayLastReply")) { + if ($post->isa('WebGUI::Asset::Post::Thread')) { + if ($self->displayLastReply) { my $lastPost = $post->getLastPost(); %lastReply = ( "lastReply.url" => $lastPost->getThreadLinkUrl, - "lastReply.title" => $lastPost->get("title"), - "lastReply.user.isVisitor" => $lastPost->get("ownerUserId") eq "1", - "lastReply.username" => $lastPost->get("username"), - "lastReply.hideProfileUrl" => $lastPost->get("ownerUserId") eq "1" || $isVisitor, + "lastReply.title" => $lastPost->title, + "lastReply.user.isVisitor" => $lastPost->ownerUserId eq "1", + "lastReply.username" => $lastPost->username, + "lastReply.hideProfileUrl" => $lastPost->ownerUserId eq "1" || $isVisitor, "lastReply.userProfile.url" => $lastPost->getPosterProfileUrl(), - "lastReply.dateSubmitted.human" => $datetime->epochToHuman($lastPost->get("creationDate"),"%z"), - "lastReply.timeSubmitted.human" => $datetime->epochToHuman($lastPost->get("creationDate"),"%Z"), + "lastReply.dateSubmitted.human" => $datetime->epochToHuman($lastPost->creationDate,"%z"), + "lastReply.timeSubmitted.human" => $datetime->epochToHuman($lastPost->creationDate,"%Z"), ); } $hasRead = $post->isMarkedRead; @@ -137,13 +597,13 @@ sub appendPostListTemplateVars { "status" => $post->getStatus, "thumbnail" => $post->getThumbnailUrl, "image.url" => $post->getImageUrl, - "dateSubmitted.human" => $datetime->epochToHuman($post->get("creationDate"),"%z"), - "dateUpdated.human" => $datetime->epochToHuman($post->get("revisionDate"),"%z"), - "timeSubmitted.human" => $datetime->epochToHuman($post->get("creationDate"),"%Z"), - "timeUpdated.human" => $datetime->epochToHuman($post->get("revisionDate"),"%Z"), - "hideProfileUrl" => $post->get('ownerUserId') eq '1' || $isVisitor, + "dateSubmitted.human" => $datetime->epochToHuman($post->creationDate,"%z"), + "dateUpdated.human" => $datetime->epochToHuman($post->revisionDate,"%z"), + "timeSubmitted.human" => $datetime->epochToHuman($post->creationDate,"%Z"), + "timeUpdated.human" => $datetime->epochToHuman($post->revisionDate,"%Z"), + "hideProfileUrl" => $post->ownerUserId eq '1' || $isVisitor, "userProfile.url" => $post->getPosterProfileUrl, - "user.isVisitor" => $post->get("ownerUserId") eq "1", + "user.isVisitor" => $post->ownerUserId eq "1", "edit.url" => $post->getEditUrl, 'controls' => $controls, "isSecond" => (($i+1) == 2), @@ -157,7 +617,7 @@ sub appendPostListTemplateVars { ); $post->getTemplateMetadataVars(\%postVars); if ($row->{className} =~ m/^WebGUI::Asset::Post::Thread/) { - $postVars{'rating'} = $post->get('threadRating'); + $postVars{'rating'} = $post->threadRating; } push(@{$var->{post_loop}}, \%postVars ); $i++; @@ -267,24 +727,25 @@ the current session user. =cut -sub canEdit { - my $self = shift; - my $userId = shift || $self->session->user->userId; - return ( - ( - ( - $self->session->form->process("func") eq "add" || - ( - $self->session->form->process("assetId") eq "new" && - $self->session->form->process("func") eq "editSave" && - $self->session->form->process("class") eq "WebGUI::Asset::Post::Thread" - ) - ) && - $self->canStartThread( $userId ) - ) || # account for new threads - $self->next::method( $userId ) - ); -} +around canEdit => sub { + my $orig = shift; + my $self = shift; + my $userId = shift || $self->session->user->userId; + return ( + ( + ( + $self->session->form->process("func") eq "add" || + ( + $self->session->form->process("assetId") eq "new" && + $self->session->form->process("func") eq "addSave" && + $self->session->form->process("className") eq "WebGUI::Asset::Post::Thread" + ) + ) && + $self->canStartThread( $userId ) + ) || # account for new threads + $self->$orig( $userId ) + ); +}; #------------------------------------------------------------------- @@ -329,11 +790,11 @@ sub canPost { ; # checks to make sure that the cs has been committed at least once - if ( $self->get("status") ne "approved" && $self->getTagCount <= 1 ) { + if ( $self->status ne "approved" && $self->getTagCount <= 1 ) { return 0; } # Users in the postGroupId can post - elsif ( $user->isInGroup( $self->get("postGroupId") ) ) { + elsif ( $user->isInGroup( $self->postGroupId ) ) { return 1; } # Users who can edit the collab can post @@ -391,7 +852,7 @@ sub canStartThread { : $self->session->user ; return ( - $user->isInGroup($self->get("canStartThreadGroupId")) + $user->isInGroup($self->canStartThreadGroupId) || $self->WebGUI::Asset::canEdit( $userId ) ); } @@ -407,12 +868,12 @@ in that case. =cut -sub commit { +override commit => sub { my $self = shift; - $self->next::method; + super(); my $cron = undef; - if ($self->get("getMailCronId")) { - $cron = WebGUI::Workflow::Cron->new($self->session, $self->get("getMailCronId")); + if ($self->getMailCronId) { + $cron = WebGUI::Workflow::Cron->new($self->session, $self->getMailCronId); } my $i18n = WebGUI::International->new($self->session, "Asset_Collaboration"); unless (defined $cron) { @@ -431,7 +892,7 @@ sub commit { title => $self->getTitle." ".$i18n->get("mail"), $self->getCronIntervals(), }); -} +}; #------------------------------------------------------------------- @@ -454,474 +915,6 @@ sub createSubscriptionGroup { }); } -#------------------------------------------------------------------- -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift; - my $i18n = WebGUI::International->new($session,"Asset_Collaboration"); - my $useKarma = $session->setting->get('useKarma'); - - # obtain the groupIdEdit default value. Try to get it from the parent asset - # if it exists. If not, default to the value specified in WebGUI::Asset's - # definition. - my $groupIdEdit; - if($session->asset) { - $groupIdEdit = $session->asset->get('groupIdEdit'); - } - else { - $groupIdEdit = '4'; - } - - - my %sortByOptions; - tie %sortByOptions, 'Tie::IxHash'; - %sortByOptions = (lineage=>$i18n->get('sequence'), - "assetData.revisionDate"=>$i18n->get('date updated'), - creationDate=>$i18n->get('date submitted'), - title=>$i18n->get('title'), - userDefined1=>$i18n->get('user defined 1'), - userDefined2=>$i18n->get('user defined 2'), - userDefined3=>$i18n->get('user defined 3'), - userDefined4=>$i18n->get('user defined 4'), - userDefined5=>$i18n->get('user defined 5'), - ($useKarma? (karmaRank=>$i18n->get('karma rank')) : ()), - ); - - tie my %mailIntervalOptions, 'Tie::IxHash'; - %mailIntervalOptions = ( - 'every minute' => $i18n->get('every minute'), - "every other minute" => $i18n->get('every other minute'), - 'every 5 minutes' => $i18n->get('every 5 minutes'), - 'every 10 minutes' => $i18n->get('every 10 minutes'), - 'every 15 minutes' => $i18n->get('every 15 minutes'), - 'every 20 minutes' => $i18n->get('every 20 minutes'), - 'every 30 minutes' => $i18n->get('every 30 minutes'), - 'every hour' => $i18n->get('every hour'), - 'every other hour' => $i18n->get('every other hour'), - 'once per day' => $i18n->get('once per day'), - ); - - my %properties; - tie %properties, 'Tie::IxHash'; - %properties = ( - visitorCacheTimeout => { - tab => "display", - fieldType => "interval", - defaultValue => 3600, - uiLevel => 8, - label => $i18n->get("visitor cache timeout"), - hoverHelp => $i18n->get("visitor cache timeout help") - }, - autoSubscribeToThread => { - fieldType=>"yesNo", - defaultValue=>1, - tab=>'mail', - label=>$i18n->get("auto subscribe to thread"), - hoverHelp=>$i18n->get("auto subscribe to thread help"), - }, - requireSubscriptionForEmailPosting => { - fieldType=>"yesNo", - defaultValue=>1, - tab=>'mail', - label=>$i18n->get("require subscription for email posting"), - hoverHelp=>$i18n->get("require subscription for email posting help"), - }, - approvalWorkflow =>{ - fieldType=>"workflow", - defaultValue=>"pbworkflow000000000003", - type=>'WebGUI::VersionTag', - tab=>'security', - label=>$i18n->get('approval workflow'), - hoverHelp=>$i18n->get('approval workflow description'), - }, - threadApprovalWorkflow =>{ - fieldType=>"workflow", - defaultValue=>"pbworkflow000000000003", - type=>'WebGUI::VersionTag', - tab=>'security', - label=>$i18n->get('thread approval workflow'), - hoverHelp=>$i18n->get('thread approval workflow description'), - }, - thumbnailSize => { - fieldType => "integer", - defaultValue => 0, - tab => "display", - label => $i18n->get("thumbnail size"), - hoverHelp => $i18n->get("thumbnail size help") - }, - maxImageSize => { - fieldType => "integer", - defaultValue => 0, - tab => "display", - label => $i18n->get("max image size"), - hoverHelp => $i18n->get("max image size help") - }, - mailServer=>{ - fieldType=>"text", - defaultValue=>undef, - tab=>'mail', - label=>$i18n->get("mail server"), - hoverHelp=>$i18n->get("mail server help"), - }, - mailAccount=>{ - fieldType=>"text", - defaultValue=>undef, - tab=>'mail', - label=>$i18n->get("mail account"), - hoverHelp=>$i18n->get("mail account help"), - extras => 'autocomplete="off"', - }, - mailPassword=>{ - fieldType=>"password", - defaultValue=>undef, - tab=>'mail', - label=>$i18n->get("mail password"), - hoverHelp=>$i18n->get("mail password help"), - extras => 'autocomplete="off"', - }, - mailAddress=>{ - fieldType=>"email", - defaultValue=>undef, - tab=>'mail', - label=>$i18n->get("mail address"), - hoverHelp=>$i18n->get("mail address help"), - }, - mailPrefix=>{ - fieldType=>"text", - defaultValue=>undef, - tab=>'mail', - label=>$i18n->get("mail prefix"), - hoverHelp=>$i18n->get("mail prefix help"), - }, - getMailCronId=>{ - fieldType=>"hidden", - defaultValue=>undef, - noFormPost=>1 - }, - getMail=>{ - fieldType=>"yesNo", - defaultValue=>0, - tab=>'mail', - label=>$i18n->get("get mail"), - hoverHelp=>$i18n->get("get mail help"), - }, - getMailInterval=>{ - #fieldType=>"interval", - #defaultValue=>300, - fieldType=>"selectBox", - defaultValue => 'every 10 minutes', - options => \%mailIntervalOptions, - tab=>'mail', - label=>$i18n->get("get mail interval"), - hoverHelp=>$i18n->get("get mail interval help"), - }, - displayLastReply =>{ - fieldType=>"yesNo", - defaultValue=>0, - tab=>'display', - label=>$i18n->get('display last reply'), - hoverHelp=>$i18n->get('display last reply description'), - }, - allowReplies =>{ - fieldType=>"yesNo", - defaultValue=>1, - tab=>'security', - label=>$i18n->get('allow replies'), - hoverHelp=>$i18n->get('allow replies description'), - }, - threadsPerPage =>{ - fieldType=>"integer", - defaultValue=>30, - tab=>'display', - label=>$i18n->get('threads/page'), - hoverHelp=>$i18n->get('threads/page description'), - }, - postsPerPage =>{ - fieldType=>"integer", - defaultValue=>10, - tab=>'display', - label=>$i18n->get('posts/page'), - hoverHelp=>$i18n->get('posts/page description'), - }, - archiveEnabled => { - fieldType => "yesNo", - defaultValue => 1, - tab => 'properties', - label => $i18n->get('editForm archiveEnabled label'), - hoverHelp => $i18n->get('editForm archiveEnabled description'), - }, - archiveAfter =>{ - fieldType=>"interval", - defaultValue=>31536000, - tab=>'properties', - label=>$i18n->get('archive after'), - hoverHelp=>$i18n->get('archive after description'), - }, - lastPostDate =>{ - noFormPost=>1, - fieldType=>"hidden", - defaultValue=>undef - }, - lastPostId =>{ - noFormPost=>1, - fieldType=>"hidden", - defaultValue=>undef - }, - rating =>{ - noFormPost=>1, - fieldType=>"hidden", - defaultValue=>undef - }, - replies =>{ - noFormPost=>1, - fieldType=>"hidden", - defaultValue=>undef - }, - views =>{ - noFormPost=>1, - fieldType=>"hidden", - defaultValue=>undef - }, - threads =>{ - noFormPost=>1, - fieldType=>"hidden", - defaultValue=>undef - }, - useContentFilter =>{ - fieldType=>"yesNo", - defaultValue=>1, - tab=>'display', - label=>$i18n->get('content filter'), - hoverHelp=>$i18n->get('content filter description'), - }, - filterCode =>{ - fieldType=>"filterContent", - defaultValue=>'most', - tab=>'security', - label=>$i18n->get('filter code'), - hoverHelp=>$i18n->get('filter code description'), - }, - replyFilterCode =>{ - fieldType=>"filterContent", - defaultValue=>'most', - tab=>'security', - label=>$i18n->get('reply filter code'), - hoverHelp=>$i18n->get('reply filter code description'), - }, - richEditor =>{ - fieldType=>"selectRichEditor", - defaultValue=>"PBrichedit000000000002", - tab=>'display', - label=>$i18n->get('rich editor'), - hoverHelp=>$i18n->get('rich editor description'), - }, - replyRichEditor =>{ - fieldType=>"selectRichEditor", - defaultValue=>"PBrichedit000000000002", - tab=>'display', - label=>$i18n->get('reply rich editor'), - hoverHelp=>$i18n->get('reply rich editor description'), - }, - attachmentsPerPost =>{ - fieldType=>"integer", - defaultValue=>0, - tab=>'properties', - label=>$i18n->get('attachments/post'), - hoverHelp=>$i18n->get('attachments/post description'), - }, - editTimeout =>{ - fieldType=>"interval", - defaultValue=>3600, - tab=>'security', - label=>$i18n->get('edit timeout'), - hoverHelp=>$i18n->get('edit timeout description'), - }, - addEditStampToPosts =>{ - fieldType=>"yesNo", - defaultValue=>0, - tab=>'security', - label=>$i18n->get('edit stamp'), - hoverHelp=>$i18n->get('edit stamp description'), - }, - usePreview =>{ - fieldType=>"yesNo", - defaultValue=>1, - tab=>'properties', - label=>$i18n->get('use preview'), - hoverHelp=>$i18n->get('use preview description'), - }, - sortOrder =>{ - fieldType=>"selectBox", - defaultValue=>'desc', - tab=>'display', - options=>{ asc => $i18n->get('ascending'), - desc => $i18n->get('descending') }, - label=>$i18n->get('sort order'), - hoverHelp=>$i18n->get('sort order description'), - }, - sortBy =>{ - fieldType=>"selectBox", - defaultValue=>'assetData.revisionDate', - tab=>'display', - options=>\%sortByOptions, - label=>$i18n->get('sort by'), - hoverHelp=>$i18n->get('sort by description'), - }, - notificationTemplateId =>{ - fieldType=>"template", - namespace=>"Collaboration/Notification", - defaultValue=>'PBtmpl0000000000000027', - tab=>'mail', - label=>$i18n->get('notification template'), - hoverHelp=>$i18n->get('notification template description'), - }, - searchTemplateId =>{ - fieldType=>"template", - namespace=>"Collaboration/Search", - defaultValue=>'PBtmpl0000000000000031', - tab=>'display', - label=>$i18n->get('search template'), - hoverHelp=>$i18n->get('search template description'), - }, - postFormTemplateId =>{ - fieldType=>"template", - namespace=>"Collaboration/PostForm", - defaultValue=>'PBtmpl0000000000000029', - tab=>'display', - label=>$i18n->get('post template'), - hoverHelp=>$i18n->get('post template description'), - }, - threadTemplateId =>{ - fieldType=>"template", - namespace=>"Collaboration/Thread", - defaultValue=>'PBtmpl0000000000000032', - tab=>'display', - label=>$i18n->get('thread template'), - hoverHelp=>$i18n->get('thread template description'), - }, - collaborationTemplateId =>{ - fieldType=>"template", - namespace=>'Collaboration', - defaultValue=>'PBtmpl0000000000000026', - tab=>'display', - label=>$i18n->get('system template'), - hoverHelp=>$i18n->get('system template description'), - }, - karmaPerPost =>{ - fieldType=>"integer", - defaultValue=>0, - tab=>'properties', - visible=>$useKarma, - label=>$i18n->get('karma/post'), - hoverHelp=>$i18n->get('karma/post description'), - }, - karmaSpentToRate => { - fieldType => "integer", - defaultValue=> 0, - tab=>'properties', - visible => $useKarma, - label => $i18n->get('karma spent to rate'), - hoverHelp => $i18n->get('karma spent to rate description'), - }, - karmaRatingMultiplier => { - fieldType => "integer", - defaultValue=> 1, - tab=>'properties', - visible => $useKarma, - label=>$i18n->get('karma rating multiplier'), - hoverHelp=>$i18n->get('karma rating multiplier description'), - }, - avatarsEnabled =>{ - fieldType=>"yesNo", - defaultValue=>0, - tab=>'properties', - label=>$i18n->get('enable avatars'), - hoverHelp=>$i18n->get('enable avatars description'), - }, - enablePostMetaData =>{ - fieldType=>"yesNo", - defaultValue=>0, - tab=>'meta', - label=>$i18n->get('enable metadata'), - hoverHelp=>$i18n->get('enable metadata description'), - }, - postGroupId =>{ - fieldType=>"group", - defaultValue=>'2', - tab=>'security', - label=>$i18n->get('who posts'), - hoverHelp=>$i18n->get('who posts description'), - }, - canStartThreadGroupId =>{ - fieldType=>"group", - defaultValue=>'2', - tab=>'security', - label=>$i18n->get('who threads'), - hoverHelp=>$i18n->get('who threads description'), - }, - defaultKarmaScale => { - fieldType=>"integer", - defaultValue=>1, - tab=>'properties', - visible=>$useKarma, - label=>$i18n->get("default karma scale"), - hoverHelp=>$i18n->get('default karma scale help'), - }, - useCaptcha => { - fieldType=>"yesNo", - defaultValue=>'0', - tab=>'security', - label=>$i18n->get('use captcha label'), - hoverHelp=>$i18n->get('use captcha hover help'), - }, - subscriptionGroupId =>{ - fieldType=>"subscriptionGroup", - tab=>'security', - label=>$i18n->get("subscription group label"), - hoverHelp=>$i18n->get("subscription group hoverHelp"), - noFormPost=>1, - defaultValue=>undef, - }, - groupToEditPost=>{ - tab=>"security", - label=>$i18n->get('group to edit label'), - excludeGroups=>[1,7], - hoverHelp=>$i18n->get('group to edit hoverhelp'), - uiLevel=>6, - fieldType=>'group', - filter=>'fixId', - defaultValue=>$groupIdEdit, # groupToEditPost should default to groupIdEdit - }, - postReceivedTemplateId =>{ - fieldType=>'template', - namespace=>'Collaboration/PostReceived', - tab=>'display', - label=>$i18n->get('post received template'), - hoverHelp=>$i18n->get('post received template hoverHelp'), - defaultValue=>'default_post_received1', - }, - unsubscribeTemplateId =>{ - fieldType=>'template', - namespace=>'Collaboration/Unsubscribe', - tab=>'display', - label=>$i18n->get('unsubscribe template'), - hoverHelp=>$i18n->get('unsubscribe template hoverHelp'), - defaultValue=>'default_CS_unsubscribe', - }, - ); - - push(@{$definition}, { - assetName=>$i18n->get('assetName'), - autoGenerateForms=>1, - icon=>'collaboration.gif', - tableName=>'Collaboration', - className=>'WebGUI::Asset::Wobject::Collaboration', - properties=>\%properties, - }); - return $class->next::method($session, $definition); -} - #------------------------------------------------------------------- =head2 duplicate @@ -964,7 +957,7 @@ sub duplicateBranch { return $newAsset; } -#------------------------------------------------------------------- +#---------------------------------------------------------------------------- =head2 getCronIntervals @@ -1047,17 +1040,25 @@ sub getCronIntervals { #------------------------------------------------------------------- -=head2 getEditTabs +=head2 getHelpers ( ) -Add a tab for the mail interface. +Add the collaboration-specific asset helpers =cut -sub getEditTabs { - my $self = shift; - my $i18n = WebGUI::International->new($self->session,"Asset_Collaboration"); - return ($self->next::method, ['mail', $i18n->get('mail'), 9]); -} +override getHelpers => sub { + my ( $self ) = @_; + my $helpers = super(); + + my $i18n = WebGUI::International->new($self->session, 'Asset_Collaboration'); + $helpers->{ unarchiveAll } = { + label => $i18n->get("unarchive all"), + url => $self->getUrl( 'func=unarchiveAll' ), + confirm => $i18n->get("unarchive confirm"), + }; + + return $helpers; +}; #------------------------------------------------------------------- @@ -1069,7 +1070,7 @@ Formats the url to start a new thread. sub getNewThreadUrl { my $self = shift; - $self->getUrl("func=add;class=WebGUI::Asset::Post::Thread"); + $self->getUrl("func=add;className=WebGUI::Asset::Post::Thread"); } #------------------------------------------------------------------- @@ -1085,7 +1086,7 @@ sub getRssFeedItems { # XXX copied and reformatted this query from www_viewRSS, but why is it constructed like this? # And it's duplicated inside view, too! Eeeagh! And it uses the versionTag scratch var... - my ($sortBy, $sortOrder) = ($self->getValue('sortBy'), $self->getValue('sortOrder')); + my ($sortBy, $sortOrder) = ($self->sortBy, $self->sortOrder); my @postIds = $self->session->db->buildArray(<<"SQL", [$self->getId, $self->session->scratch->get('versionTag')]); SELECT asset.assetId @@ -1103,9 +1104,9 @@ SQL my $datetime = $self->session->datetime; my @posts; - my $rssLimit = $self->get('itemsPerFeed'); + my $rssLimit = $self->itemsPerFeed; for my $postId (@postIds) { - my $post = WebGUI::Asset->new($self->session, $postId, 'WebGUI::Asset::Post::Thread'); + my $post = WebGUI::Asset->newById($self->session, $postId); my $postUrl = $siteUrl . $post->getUrl; # Buggo: this is an abuse of 'author'. 'author' is supposed to be an email address. # But this is how it was in the original Collaboration RSS, so. @@ -1113,7 +1114,7 @@ SQL # Create the attachment template loop my $storage = $post->getStorageLocation; my $attachmentLoop = []; - if ($post->get('storageId')) { + if ($post->storageId) { for my $file (@{$storage->getFiles}) { push @{$attachmentLoop}, { 'attachment.url' => $storage->getUrl($file), @@ -1125,19 +1126,19 @@ SQL } push @posts, { - author => $post->get('username'), - title => $post->get('title'), + author => $post->username, + title => $post->title, 'link' => $postUrl, guid => $postUrl, - description => $post->get('synopsis'), - epochDate => $post->get('creationDate'), - pubDate => $datetime->epochToMail($post->get('creationDate')), + description => $post->synopsis, + epochDate => $post->creationDate, + pubDate => $datetime->epochToMail($post->creationDate), attachmentLoop => $attachmentLoop, - userDefined1 => $post->get("userDefined1"), - userDefined2 => $post->get("userDefined2"), - userDefined3 => $post->get("userDefined3"), - userDefined4 => $post->get("userDefined4"), - userDefined5 => $post->get("userDefined5"), + userDefined1 => $post->userDefined1, + userDefined2 => $post->userDefined2, + userDefined3 => $post->userDefined3, + userDefined4 => $post->userDefined4, + userDefined5 => $post->userDefined5, }; last if $rssLimit <= scalar(@posts); @@ -1188,7 +1189,7 @@ Retrieves the field to sort by sub getSortBy { my $self = shift; my $scratchSortBy = $self->getId."_sortBy"; - my $sortBy = $self->session->scratch->get($scratchSortBy) || $self->getValue("sortBy"); + my $sortBy = $self->session->scratch->get($scratchSortBy) || $self->sortBy; # XXX: This should be fixed in an upgrade and in the definition, NOT HERE if ( $sortBy eq "rating" ) { $sortBy = "threadRating"; @@ -1207,7 +1208,7 @@ Retrieves the direction to sort in sub getSortOrder { my $self = shift; my $scratchSortOrder = $self->getId."_sortDir"; - my $sortOrder = $self->session->scratch->get($scratchSortOrder) || $self->getValue("sortOrder"); + my $sortOrder = $self->session->scratch->get($scratchSortOrder) || $self->sortOrder; return $sortOrder; } @@ -1235,17 +1236,17 @@ Collaboration System sub getThreadsPaginator { my $self = shift; - my $session = $self->session; + my $session = $self->session; my $scratchSortBy = $self->getId."_sortBy"; my $scratchSortOrder = $self->getId."_sortDir"; my $sortBy = $self->session->form->process("sortBy") || $self->session->scratch->get($scratchSortBy) - || $self->get("sortBy"); + || $self->sortBy; $sortBy =~ s/^\w+\.//; # Sort by the thread rating instead of the post rating. other places don't care about threads. $sortBy = $sortBy eq 'rating' ? 'threadRating' : $sortBy; - if (! WebGUI::Utility::isIn($sortBy, qw/userDefined1 userDefined2 userDefined3 userDefined4 userDefined5 title lineage revisionDate creationDate karmaRank threadRating views replies lastPostDate/)) { + if (! ($sortBy ~~ [qw/userDefined1 userDefined2 userDefined3 userDefined4 userDefined5 title lineage revisionDate creationDate karmaRank threadRating views replies lastPostDate/])) { $sortBy = 'revisionDate'; } if ($sortBy eq 'assetId' || $sortBy eq 'revisionDate') { @@ -1269,39 +1270,39 @@ sub getThreadsPaginator { } $self->session->scratch->set($scratchSortOrder, $sortOrder); } - $sortBy = join('.', map { $self->session->db->dbh->quote_identifier($_) } split(/\./, $sortBy)); + $sortBy = join('.', map { $self->session->db->quote_identifier($_) } split(/\./, $sortBy)); $sortOrder ||= 'desc'; my $sql = " - select + select asset.assetId, asset.className, - assetData.revisionDate as revisionDate - from Thread - left join asset on Thread.assetId=asset.assetId - left join Post on Post.assetId=Thread.assetId and Thread.revisionDate = Post.revisionDate - left join assetData on assetData.assetId=Thread.assetId and Thread.revisionDate = assetData.revisionDate - where - asset.parentId=".$self->session->db->quote($self->getId)." - and asset.state='published' - and asset.className='WebGUI::Asset::Post::Thread' + assetData.revisionDate as revisionDate + from Thread + left join asset on Thread.assetId=asset.assetId + left join Post on Post.assetId=Thread.assetId and Thread.revisionDate = Post.revisionDate + left join assetData on assetData.assetId=Thread.assetId and Thread.revisionDate = assetData.revisionDate + where + asset.parentId=".$self->session->db->quote($self->getId)." + and asset.state='published' + and asset.className='WebGUI::Asset::Post::Thread' and assetData.revisionDate=( select - max(revisionDate) - from - assetData - where - assetData.assetId=asset.assetId + max(revisionDate) + from + assetData + where + assetData.assetId=asset.assetId and (status='approved' or status='archived') - ) + ) and status='approved' - group by - assetData.assetId - order by - Thread.isSticky desc, + group by + assetData.assetId + order by + Thread.isSticky desc, ".$sortBy." ".$sortOrder; - my $p = WebGUI::Paginator->new($self->session,$self->getUrl,$self->get("threadsPerPage")); + my $p = WebGUI::Paginator->new($session,$self->getUrl,$self->threadsPerPage); $p->setDataByQuery($sql); return $p; @@ -1362,6 +1363,35 @@ sub getViewTemplateVars { return \%var; } +#-------------------------------------------------------------------------- + +=head2 groupIdView ( [newvalue] ) + +Override the existing accessor to update the subscription group if the value +changes. + +=cut + +around groupIdView => sub { + my $orig = shift; + my $self = shift; + my ( $newValue ) = @_; + my $oldValue = $self->$orig; + my $return = $self->$orig(@_); + # Update the subscription group so if they can't see the collab, they don't get e-mailed + if ( $newValue && $newValue ne $oldValue ) { + my $instance_data = { + workflowId => 'xR-_GRRbjBojgLsFx3dEMA', + className => 'WebGUI::Asset', + methodName => 'newPending', + parameters => $self->getId, + }; + my $instance = WebGUI::Workflow::Instance->create($self->session, $instance_data); + $instance->start('skipRealtime'); + } + return $return; +}; + #------------------------------------------------------------------- =head2 incrementReplies ( lastPostDate, lastPostId ) @@ -1416,7 +1446,7 @@ Increments the views counter on this forum. sub incrementViews { my ($self) = @_; - $self->update({views=>$self->get("views")+1}); + $self->update({views=>$self->views+1}); } #------------------------------------------------------------------- @@ -1429,7 +1459,7 @@ Returns a boolean indicating whether the user is subscribed to the forum. sub isSubscribed { my $self = shift; - return $self->session->user->isInGroup($self->get("subscriptionGroupId")); + return $self->session->user->isInGroup($self->subscriptionGroupId); } #------------------------------------------------------------------- @@ -1443,11 +1473,11 @@ See WebGUI::Asset::prepareView() for details. sub prepareView { my $self = shift; $self->next::method; - my $template = WebGUI::Asset::Template->new($self->session, $self->get("collaborationTemplateId")); + my $template = WebGUI::Asset::Template->newById($self->session, $self->collaborationTemplateId); if (!$template) { WebGUI::Error::ObjectNotFound::Template->throw( error => qq{Template not found}, - templateId => $self->get("collaborationTemplateId"), + templateId => $self->collaborationTemplateId, assetId => $self->getId, ); } @@ -1458,7 +1488,7 @@ sub prepareView { #------------------------------------------------------------------- -=head2 processPropertiesFromFormPost +=head2 processEditForm Extend the base method to handle creating subscription groups, propagating group privileges to all descendants and clearing scratch variables for sort key @@ -1466,31 +1496,31 @@ and direction. =cut -sub processPropertiesFromFormPost { +sub processEditForm { my $self = shift; - my $updatePrivs = ($self->session->form->process("groupIdView") ne $self->get("groupIdView") || $self->session->form->process("groupIdEdit") ne $self->get("groupIdEdit")); + my $updatePrivs = ($self->session->form->process("groupIdView") ne $self->groupIdView || $self->session->form->process("groupIdEdit") ne $self->groupIdEdit); $self->next::method; - if ($self->get("subscriptionGroupId") eq "") { + if ($self->subscriptionGroupId eq "") { $self->createSubscriptionGroup; } - if ($updatePrivs) { - my $descendantIter = $self->getLineageIterator(['descendants']); - while ( 1 ) { - my $descendant; - eval { $descendant = $descendantIter->() }; - if ( my $x = WebGUI::Error->caught('WebGUI::Error::ObjectNotFound') ) { - $self->session->log->error($x->full_message); - next; - } - last unless $descendant; - $descendant->update({ - groupIdView=>$self->get("groupIdView"), - groupIdEdit=>$self->get("groupIdEdit") - }); - } + if ($updatePrivs) { + my $descendantIter = $self->getLineageIterator(['descendants']); + while ( 1 ) { + my $descendant; + eval { $descendant = $descendantIter->() }; + if ( my $x = WebGUI::Error->caught('WebGUI::Error::ObjectNotFound') ) { + $self->session->log->error($x->full_message); + next; + } + last unless $descendant; + $descendant->update({ + groupIdView=>$self->groupIdView, + groupIdEdit=>$self->groupIdEdit + }); } - $self->session->scratch->delete($self->getId."_sortBy"); - $self->session->scratch->delete($self->getId."_sortDir"); + } + $self->session->scratch->delete($self->getId."_sortBy"); + $self->session->scratch->delete($self->getId."_sortDir"); } @@ -1502,18 +1532,18 @@ Extend the base method to delete the subscription group and cron job for emails. =cut -sub purge { +override purge => sub { my $self = shift; - my $group = WebGUI::Group->new($self->session, $self->get("subscriptionGroupId")); + my $group = WebGUI::Group->new($self->session, $self->subscriptionGroupId); if ($group) { $group->delete; } - if ($self->get("getMailCronId")) { - my $cron = WebGUI::Workflow::Cron->new($self->session, $self->get("getMailCronId")); + if ($self->getMailCronId) { + my $cron = WebGUI::Workflow::Cron->new($self->session, $self->getMailCronId); $cron->delete if defined $cron; } - $self->next::method; -} + super(); +}; #------------------------------------------------------------------- @@ -1523,12 +1553,15 @@ Extend the base method to delete view and visitor caches. =cut -sub purgeCache { +override purgeCache => sub { my $self = shift; - WebGUI::Cache->new($self->session,"view_".$self->getId)->delete; - WebGUI::Cache->new($self->session,$self->_visitorCacheKey)->delete; - $self->next::method; -} + my $cache = $self->session->cache; + eval { + $cache->remove("view_".$self->getId); + $cache->remove($self->_visitorCacheKey); + }; + super(); +}; #------------------------------------------------------------------- @@ -1565,7 +1598,7 @@ sub recalculateRating { [$self->getId] ); - my $average = round($sum/$count); + my $average = sprintf('%.0f', $sum/$count); $self->update({rating=>$average}); } @@ -1632,13 +1665,13 @@ Subscribes a user to this collaboration system. sub subscribe { my $self = shift; my $group; - my $subscriptionGroup = $self->get('subscriptionGroupId'); + my $subscriptionGroup = $self->subscriptionGroupId; if ($subscriptionGroup) { $group = WebGUI::Group->new($self->session,$subscriptionGroup); } if (!$group) { $self->createSubscriptionGroup; - $group = WebGUI::Group->new($self->session,$self->get('subscriptionGroupId')); + $group = WebGUI::Group->new($self->session,$self->subscriptionGroupId); } $group->addUsers([$self->session->user->userId]); } @@ -1658,37 +1691,11 @@ An optional user object to unsubscribe. If the object isn't passed, then it use sub unsubscribe { my $self = shift; my $user = shift || $self->session->user; - my $group = WebGUI::Group->new($self->session,$self->get("subscriptionGroupId")); - return unless $group; + my $group = WebGUI::Group->new($self->session,$self->subscriptionGroupId); + return unless $group; $group->deleteUsers([$user->userId]); } - -#------------------------------------------------------------------- - -=head2 update ( ) - -Update the base method to handle checking valid users in the subscription group if -view permissions have changed. - -=cut - -sub update { - my $self = shift; - my $origGroupIdView = $self->get('groupIdView'); - $self->next::method(@_); - return if $self->get('groupIdView') eq $origGroupIdView; - my $instance_data = { - workflowId => 'xR-_GRRbjBojgLsFx3dEMA', - className => 'WebGUI::Asset', - methodName => 'newPending', - parameters => $self->getId, - }; - my $instance = WebGUI::Workflow::Instance->create($self->session, $instance_data); - $instance->start('skipRealtime'); -} - - #------------------------------------------------------------------- =head2 view @@ -1699,9 +1706,10 @@ Render the CS, and handle local caching. sub view { my $self = shift; + my $cache = $self->session->cache; if ($self->_visitorCacheOk) { - my $out = WebGUI::Cache->new($self->session,$self->_visitorCacheKey)->get; - $self->session->errorHandler->debug("HIT") if $out; + my $out = $cache->get($self->_visitorCacheKey); + $self->session->log->debug("HIT") if $out; return $out if $out; } @@ -1711,30 +1719,13 @@ sub view { $self->prepareView unless ($self->{_viewTemplate}); my $out = $self->processTemplate($self->getViewTemplateVars,undef,$self->{_viewTemplate}); if ($self->_visitorCacheOk) { - WebGUI::Cache->new($self->session,$self->_visitorCacheKey)->set($out,$self->get("visitorCacheTimeout")); + $cache->set($self->_visitorCacheKey, $out, $self->visitorCacheTimeout); } return $out; } #------------------------------------------------------------------- -=head2 www_edit - -Override the master class to add an "Unarchive All" link. - -=cut - -sub www_edit { - my $self = shift; - return $self->session->privilege->insufficient() unless $self->canEdit; - return $self->session->privilege->locked() unless $self->canEditIfLocked; - my $i18n = WebGUI::International->new($self->session, 'Asset_Collaboration'); - $self->getAdminConsole->addConfirmedSubmenuItem($self->getUrl('func=unarchiveAll'),$i18n->get("unarchive all"),$i18n->get("unarchive confirm")); - return $self->getAdminConsole->render($self->getEditForm->print,$self->getName); -} - -#------------------------------------------------------------------- - =head2 www_search ( ) The web method to display and use the forum search interface. @@ -1768,13 +1759,13 @@ sub www_search { my $search = WebGUI::Search->new($self->session); $search->search({ keywords=>$query, - lineage=>[$self->get("lineage")], + lineage=>[$self->lineage], classes=>["WebGUI::Asset::Post", "WebGUI::Asset::Post::Thread"] }); - my $p = $search->getPaginatorResultSet($self->getUrl("func=search;doit=1;query=".$query), $self->get("threadsPerPage")); + my $p = $search->getPaginatorResultSet($self->getUrl("func=search;doit=1;query=".$query), $self->threadsPerPage); $self->appendPostListTemplateVars($var, $p); } - return $self->processStyle($self->processTemplate($var, $self->get("searchTemplateId"))); + return $self->processStyle($self->processTemplate($var, $self->searchTemplateId)); } #------------------------------------------------------------------- @@ -1894,7 +1885,7 @@ Extend the base method to handle the visitor cache timeout. sub www_view { my $self = shift; my $disableCache = ($self->session->form->process("sortBy") ne ""); - $self->session->http->setCacheControl($self->get("visitorCacheTimeout")) if ($self->session->user->isVisitor && !$disableCache); + $self->session->response->setCacheControl($self->visitorCacheTimeout) if ($self->session->user->isVisitor && !$disableCache); return $self->next::method(@_); } @@ -1911,5 +1902,6 @@ sub www_viewRSS { return $self->www_viewRss; } +__PACKAGE__->meta->make_immutable; 1; diff --git a/lib/WebGUI/Asset/Wobject/Collaboration/Newsletter.pm b/lib/WebGUI/Asset/Wobject/Collaboration/Newsletter.pm index febbce785..564631c28 100644 --- a/lib/WebGUI/Asset/Wobject/Collaboration/Newsletter.pm +++ b/lib/WebGUI/Asset/Wobject/Collaboration/Newsletter.pm @@ -1,7 +1,7 @@ package WebGUI::Asset::Wobject::Collaboration::Newsletter; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -11,99 +11,66 @@ package WebGUI::Asset::Wobject::Collaboration::Newsletter; #------------------------------------------------------------------- use strict; -use Tie::IxHash; -use WebGUI::Form; -use WebGUI::International; -use WebGUI::Utility; -use base 'WebGUI::Asset::Wobject::Collaboration'; - -#------------------------------------------------------------------- - -=head2 definition ( ) - -defines wobject properties for Newsletter instances. You absolutely need -this method in your new Wobjects. If you choose to "autoGenerateForms", the -getEditForm method is unnecessary/redundant/useless. - -=cut - -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift; - my $i18n = WebGUI::International->new($session, 'Asset_Newsletter'); - my %properties; - tie %properties, 'Tie::IxHash'; - %properties = ( - newsletterHeader => { - defaultValue=>undef, - fieldType=>"HTMLArea", - tab=>"mail", - label=>$i18n->get("newsletter header"), - hoverHelp=>$i18n->get("newsletter header help"), - }, - newsletterFooter => { - defaultValue=>undef, - fieldType=>"HTMLArea", - tab=>"mail", - label=>$i18n->get("newsletter footer"), - hoverHelp=>$i18n->get("newsletter footer help"), - }, - newsletterTemplateId => { - defaultValue=>'newsletter000000000001', - fieldType=>"template", - namespace=>"newsletter", - tab=>"mail", - label=>$i18n->get("newsletter template"), - hoverHelp=>$i18n->get("newsletter template help"), - }, - mySubscriptionsTemplateId => { - defaultValue=>'newslettersubscrip0001', - fieldType=>"template", - namespace=>"newsletter/mysubscriptions", - tab=>"display", - label=>$i18n->get("my subscriptions template"), - hoverHelp=>$i18n->get("my subscriptions template help"), - }, - ); - if ($session->setting->get("metaDataEnabled")) { - $properties{newsletterCategories} = { - defaultValue=>undef, - fieldType=>"checkList", - tab=>"properties", - options=>$session->db->buildHashRef("select fieldId, fieldName from metaData_properties where - fieldType in ('selectBox', 'checkList', 'radioList') order by fieldName"), - label=>$i18n->get("newsletter categories"), - hoverHelp=>$i18n->get("newsletter categories help"), - vertical=>1, - }; - } - else { - $properties{newsletterCategories} = { - fieldType=>"readOnly", - value=>''.$i18n->get("content profiling needed").'', - }; - } - push(@{$definition}, { - assetName=>$i18n->get('assetName'), - icon=>'newsletter.gif', - autoGenerateForms=>1, - tableName=>'Newsletter', - className=>'WebGUI::Asset::Wobject::Collaboration::Newsletter', - properties=>\%properties - }); - $class->SUPER::definition($session, $definition); - - # Change the default Collaboration template - for my $def ( @$definition ) { - if ( exists $def->{properties}->{collaborationTemplateId} ) { - $def->{properties}->{collaborationTemplateId}->{defaultValue} = 'newslettercs0000000001'; - } - } - - return $definition; +use Moose; +use WebGUI::Definition::Asset; +extends 'WebGUI::Asset::Wobject::Collaboration'; +define assetName => ['assetName', 'Asset_Newsletter']; +define icon => 'newsletter.gif'; +define tableName => 'Newsletter'; +property newsletterHeader => ( + default => undef, + fieldType => "HTMLArea", + tab => "mail", + label => [ "newsletter header", 'Asset_Newsletter' ], + hoverHelp => [ "newsletter header help", 'Asset_Newsletter' ], +); +property newsletterFooter => ( + default => undef, + fieldType => "HTMLArea", + tab => "mail", + label => [ "newsletter footer", 'Asset_Newsletter' ], + hoverHelp => [ "newsletter footer help", 'Asset_Newsletter' ], +); +property newsletterTemplateId => ( + default => 'newsletter000000000001', + fieldType => "template", + namespace => "newsletter", + tab => "mail", + label => [ "newsletter template", 'Asset_Newsletter' ], + hoverHelp => [ "newsletter template help", 'Asset_Newsletter' ], +); +property mySubscriptionsTemplateId => ( + default => 'newslettersubscrip0001', + fieldType => "template", + namespace => "newsletter/mysubscriptions", + tab => "display", + label => [ "my subscriptions template", 'Asset_Newsletter' ], + hoverHelp => [ "my subscriptions template help", 'Asset_Newsletter' ], +); +property newsletterCategories => ( + default => undef, + fieldType => "checkList", + tab => "properties", + options => \&_newsletterCategories_options, + label => [ "newsletter categories", 'Asset_Newsletter' ], + hoverHelp => [ "newsletter categories help", 'Asset_Newsletter' ], + vertical => 1, +); +sub _newsletterCategories_options { + my $session = shift->session; + return $session->db->buildHashRef("select fieldId, fieldName from metaData_properties where fieldType in ('selectBox', 'checkList', 'radioList') order by fieldName"); } +# XXX TODO: Do this in Moose instead, if we can. +# # Change the default Collaboration template +# for my $def ( @$definition ) { +# if ( exists $def->{properties}->{collaborationTemplateId} ) { +# $def->{properties}->{collaborationTemplateId}->{defaultValue} = 'newslettercs0000000001'; +# } +# } + +use WebGUI::Form; +use WebGUI::International; #------------------------------------------------------------------- @@ -134,12 +101,12 @@ Extends the base method to add custom template variables for the Newsletter. =cut -sub getViewTemplateVars { +override getViewTemplateVars => sub { my $self = shift; - my $var = $self->SUPER::getViewTemplateVars; + my $var = super(); $var->{mySubscriptionsUrl} = $self->getUrl("func=mySubscriptions"); return $var; -} +}; @@ -151,11 +118,11 @@ Extend the base method to handle deleting information from the Newsletter_subscr =cut -sub purge { +override purge => sub { my $self = shift; $self->session->db->write("delete from Newsletter_subscriptions where assetId=?", [$self->getId]); - $self->SUPER::purge(@_); -} + super(); +}; #------------------------------------------------------------------- @@ -224,7 +191,7 @@ sub www_mySubscriptions { my @userPrefs = $self->getUserSubscriptions; foreach my $id (keys %{$meta}) { my @options = (); - if (isIn($id, split("\n", $self->get("newsletterCategories")))) { + if ($id ~~ [split("\n", $self->newsletterCategories)]) { foreach my $option (split("\n", $meta->{$id}{possibleValues})) { $option =~ s/\s+$//; # remove trailing spaces next if $option eq ""; # skip blank values @@ -234,7 +201,7 @@ sub www_mySubscriptions { optionForm => WebGUI::Form::checkbox($self->session, { name => "subscriptions", value => $preferenceName, - checked => isIn($preferenceName, @userPrefs), + checked => $preferenceName ~~ @userPrefs, }) }); } @@ -251,7 +218,7 @@ sub www_mySubscriptions { $var{formFooter} = WebGUI::Form::formFooter($self->session); $var{formSubmit} = WebGUI::Form::submit($self->session); } - return $self->processStyle($self->processTemplate(\%var, $self->get("mySubscriptionsTemplateId"))); + return $self->processStyle($self->processTemplate(\%var, $self->mySubscriptionsTemplateId)); } #------------------------------------------------------------------- @@ -270,4 +237,5 @@ sub www_mySubscriptionsSave { return $self->www_view; } +__PACKAGE__->meta->make_immutable; 1; diff --git a/lib/WebGUI/Asset/Wobject/Dashboard.pm b/lib/WebGUI/Asset/Wobject/Dashboard.pm index 40e911a94..c8dea389c 100644 --- a/lib/WebGUI/Asset/Wobject/Dashboard.pm +++ b/lib/WebGUI/Asset/Wobject/Dashboard.pm @@ -1,7 +1,7 @@ package WebGUI::Asset::Wobject::Dashboard; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -11,14 +11,71 @@ package WebGUI::Asset::Wobject::Dashboard; #------------------------------------------------------------------- use strict; -use Tie::IxHash; use WebGUI::International; -use WebGUI::Utility; use WebGUI::ProfileField; use Time::HiRes; use WebGUI::Asset::Wobject; -our @ISA = qw(WebGUI::Asset::Wobject); +use Moose; +use WebGUI::Definition::Asset; +extends 'WebGUI::Asset::Wobject'; +define assetName => [ 'assetName', 'Asset_Dashboard' ]; +define icon => 'dashboard.gif'; +define tableName => 'Dashboard'; +property templateId => ( + fieldType => "template", + default => 'DashboardViewTmpl00001', + namespace => "Dashboard", + tab => 'display', + label => [ 'dashboard template field label', 'Asset_Dashboard' ], + hoverHelp => [ 'dashboard template description', 'Asset_Dashboard' ], +); + +property adminsGroupId => ( + fieldType => "group", + default => '4', + tab => 'security', + label => [ 'dashboard adminsGroupId field label', 'Asset_Dashboard' ], + hoverHelp => [ 'dashboard adminsGroupId description', 'Asset_Dashboard' ], +); + +property usersGroupId => ( + fieldType => "group", + default => '2', + label => [ 'dashboard usersGroupId field label', 'Asset_Dashboard' ], + hoverHelp => [ 'dashboard usersGroupId description', 'Asset_Dashboard' ], +); + +property isInitialized => ( + fieldType => "yesNo", + default => 0, + noFormPost => 1, +); + +property assetsToHide => ( + default => undef, + fieldType => "checkList", + noFormPost => \&_assetsToHide_noFormPost, + label => [ 'assets to hide', 'Asset_Dashboard' ], + hoverHelp => [ 'assets to hide description', 'Asset_Dashboard' ], + vertical => 1, + uiLevel => 9, + options => \&_assetsToHide_options, +); +sub _assetsToHide_noFormPost { + my $self = shift; + return $self->session->form->process("func") eq "add" ? 1 : 0; +} +sub _assetsToHide_options { + my $self = shift; + my $session = $self->session; + my $children = $self->getLineage(["children"],{"returnObjects"=>1, excludeClasses=>["WebGUI::Asset::Wobject::Layout"]}); + my %childIds; + foreach my $child (@{$children}) { + $childIds{$child->getId} = $child->getTitle.' ['.ref($child).']'; + } + return \%childIds; +} #------------------------------------------------------------------- @@ -34,7 +91,7 @@ in the dashboard's adminsGroup. sub canManage { my $self = shift; return 0 if $self->session->user->isVisitor; - return $self->session->user->isInGroup($self->get("adminsGroupId")); + return $self->session->user->isInGroup($self->adminsGroupId); } #------------------------------------------------------------------- @@ -50,67 +107,7 @@ in this dashboard's userGroup. sub canPersonalize { my $self = shift; return 0 if $self->session->user->isVisitor; - return $self->session->user->isInGroup($self->get("usersGroupId")); -} - -#------------------------------------------------------------------- -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift; - my $i18n = WebGUI::International->new($session,"Asset_Dashboard"); - - my %properties; - tie %properties, 'Tie::IxHash'; - %properties = ( - templateId => { - fieldType => "template", - defaultValue => 'DashboardViewTmpl00001', - namespace => "Dashboard", - tab => 'display', - label => $i18n->get('dashboard template field label'), - hoverHelp => $i18n->get('dashboard template description'), - }, - - adminsGroupId => { - fieldType => "group", - defaultValue => '4', - tab => 'security', - label => $i18n->get('dashboard adminsGroupId field label'), - hoverHelp=>$i18n->get('dashboard adminsGroupId description'), - }, - - usersGroupId => { - fieldType => "group", - defaultValue => '2', - label => $i18n->get('dashboard usersGroupId field label'), - hoverHelp => $i18n->get('dashboard usersGroupId description'), - }, - - isInitialized => { - fieldType => "yesNo", - defaultValue => 0, - noFormPost => 1, - autoGenerate => 0, - }, - - assetsToHide => { - defaultValue => undef, - fieldType => "checkList", - autoGenerate => 0, - }, - ); - - push(@{$definition}, { - assetName => $i18n->get('assetName'), - icon => 'dashboard.gif', - tableName => 'Dashboard', - className => 'WebGUI::Asset::Wobject::Dashboard', - properties => \%properties, - autoGenerateForms => 1, - }); - - return $class->SUPER::definition($session, $definition); + return $self->session->user->isInGroup($self->usersGroupId); } #------------------------------------------------------------------- @@ -124,7 +121,7 @@ Dashboard that Visitor would see, or their own. sub discernUserId { my $self = shift; - return ($self->canManage && $self->session->var->isAdminOn) ? '1' : $self->session->user->userId; + return ($self->canManage && $self->session->isAdminOn) ? '1' : $self->session->user->userId; } #------------------------------------------------------------------- @@ -138,7 +135,7 @@ then return default locations. sub getContentPositions { my $self = shift; - my $dummy = $self->initialize unless $self->get("isInitialized"); + my $dummy = $self->initialize unless $self->isInitialized; my $u = WebGUI::User->new($self->session, $self->discernUserId); return $u->profileField($self->getContentPositionsId) || $self->getContentPositionsDefault; @@ -169,7 +166,7 @@ Returns the default content positions for this Dashboard. sub getContentPositionsDefault { my $self = shift; - my $dummy = $self->initialize unless $self->get("isInitialized"); + my $dummy = $self->initialize unless $self->isInitialized; # The default positions are saved under the "Visitor" user my $u = WebGUI::User->new($self->session, 1); return $u->profileField($self->getContentPositionsId); @@ -183,12 +180,12 @@ Extend the base method to display lists of assets to hide or show. =cut -sub getEditForm { +override getEditForm => sub { my $self = shift; - my $tabform = $self->SUPER::getEditForm; - my $i18n = WebGUI::International->new($self->session, "Asset_Dashboard"); + my $tabform = super(); if ($self->session->form->process("func") ne "add") { - my @assetsToHide = split("\n",$self->getValue("assetsToHide")); + my $i18n = WebGUI::International->new($self->session, "Asset_Dashboard"); + my @assetsToHide = split("\n",$self->assetsToHide); my $childIter = $self->getLineageIterator(["children"],{excludeClasses=>["WebGUI::Asset::Wobject::Layout"]}); my %childIds; while ( 1 ) { @@ -201,18 +198,18 @@ sub getEditForm { last unless $child; $childIds{$child->getId} = $child->getTitle.' ['.ref($child).']'; } - $tabform->getTab("display")->checkList( - -name=>"assetsToHide", - -value=>\@assetsToHide, - -options=>\%childIds, - -label=>$i18n->get('assets to hide'), - -hoverHelp=>$i18n->get('assets to hide description'), - -vertical=>1, - -uiLevel=>9 + $tabform->getTab("display")->addField( "checkList", + name=>"assetsToHide", + value=>\@assetsToHide, + options=>\%childIds, + label=>$i18n->get('assets to hide'), + hoverHelp=>$i18n->get('assets to hide description'), + vertical=>1, + uiLevel=>9 ); } return $tabform; -} +}; #------------------------------------------------------------------- @@ -246,7 +243,7 @@ turned on. sub isManaging { my $self = shift; - return 1 if ($self->canManage && $self->session->var->isAdminOn()); + return 1 if ($self->canManage && $self->session->isAdminOn()); return 0; } @@ -259,10 +256,10 @@ their templates. =cut -sub prepareView { +override prepareView => sub { my $self = shift; - $self->SUPER::prepareView; - my @hidden = split("\n",$self->get("assetsToHide")); + super(); + my @hidden = split("\n",$self->assetsToHide); my $childIter = $self->getLineageIterator( ["children"], {excludeClasses=>["WebGUI::Asset::Wobject::Layout","WebGUI::Asset::Wobject::Dashboard"] }); while ( 1 ) { my $child; @@ -272,33 +269,33 @@ sub prepareView { next; } last unless $child; - unless (isIn($child->getId, @hidden) || !($child->canView)) { + unless ( $child->getId ~~ @hidden || !$child->canView) { $self->session->style->setRawHeadTags($child->getExtraHeadTags); $child->prepareView; } } -} +}; #------------------------------------------------------------------- -=head2 processPropertiesFromFormPost +=head2 processEditForm Extends the base method to handle assetsToHide. =cut -sub processPropertiesFromFormPost { +override processEditForm => sub { my $self = shift; - $self->SUPER::processPropertiesFromFormPost; + super(); if ($self->session->form->process("assetId") eq "new" && $self->session->form->process("class") eq 'WebGUI::Asset::Wobject::Dashboard') { $self->initialize; if (ref $self->getParent eq 'WebGUI::Asset::Wobject::Layout') { - $self->getParent->update({assetsToHide=>$self->getParent->get("assetsToHide")."\n".$self->getId}); + $self->getParent->update({assetsToHide=>$self->getParent->assetsToHide."\n".$self->getId}); } $self->update({styleTemplateId=>'PBtmplBlankStyle000001'}); } -} +}; #------------------------------------------------------------------- @@ -309,14 +306,14 @@ for this dashboard. =cut -sub purge { +override purge => sub { my $self = shift; my $userPrefField = WebGUI::ProfileField->new($self->session,$self->getContentPositionsId); if (defined $userPrefField) { $userPrefField->delete; } - $self->SUPER::purge(@_); -} + super(); +}; #------------------------------------------------------------------- @@ -335,30 +332,27 @@ sub view { $vars{canEdit} = $self->canEdit; $vars{fullUrl} = $self->getUrl; - $self->session->style->setScript( - $self->session->url->extras('yui/build/utilities/utilities.js'), - { type=>'text/javascript' } - ); + $self->session->style->setScript( $self->session->url->extras('yui/build/utilities/utilities.js')); - my $templateId = $self->get("templateId"); - # XXX Not using getLineageIterator because we loop over the children three times... + my $templateId = $self->templateId; + # XXX Not using getLineageIterator because we loop over the children three times... # I'm sure there's a more efficient way to do this. We'll figure it out someday. my $children = $self->getLineage( ["children"], { returnObjects=>1, excludeClasses=>["WebGUI::Asset::Wobject::Layout","WebGUI::Asset::Wobject::Dashboard"] }); my @positions = split(/\./,$self->getContentPositions); - my @hidden = split("\n",$self->get("assetsToHide")); + my @hidden = split("\n",$self->assetsToHide); foreach my $child (@{$children}) { - push(@hidden,$child->get('shortcutToAssetId')) if ref $child eq 'WebGUI::Asset::Shortcut'; + push(@hidden,$child->shortcutToAssetId) if ref $child eq 'WebGUI::Asset::Shortcut'; #the following loop will initially place just-dashletted assets. for (my $i = 0; $i < scalar(@positions); $i++) { - next unless isIn($child->get('shortcutToAssetId'),@hidden); + next unless $child->shortcutToAssetId ~~ @hidden; my $newChildId = $child->getId; - my $oldChildId = $child->get('shortcutToAssetId'); + my $oldChildId = $child->shortcutToAssetId; $positions[$i] =~ s/${oldChildId}/${newChildId}/g; } } my $i = 1; - my $templateAsset = WebGUI::Asset->newByDynamicClass($self->session, $templateId) || WebGUI::Asset->getImportNode($self->session); - my $template = $templateAsset->get("template"); + my $templateAsset = WebGUI::Asset->newById($self->session, $templateId) || WebGUI::Asset->getImportNode($self->session); + my $template = $templateAsset->template; my $numPositions = 1; foreach my $j (2..15) { $numPositions = $j if $template =~ m/position${j}\_loop/; @@ -366,7 +360,7 @@ sub view { my @found; my $newStuff; - my $showPerformance = $self->session->errorHandler->canShowPerformanceIndicators(); + my $showPerformance = $self->session->log->performanceLogger(); my $user = $self->session->user; foreach my $position (@positions) { my @assets = split(",",$position); @@ -376,7 +370,7 @@ sub view { push(@found, $child->getId); ##Filter based on visibility next CHILD unless $child->canView; - next CHILD if isIn($asset, @hidden); + next CHILD if $asset ~~ @hidden; ##Detect child types my $is_shortcut = $child->isa('WebGUI::Asset::Shortcut'); my $is_dashlet = $child->can('getOverrideFormDefinition'); @@ -421,14 +415,14 @@ sub view { } # deal with unplaced children, they go into position 1 foreach my $child (@{$children}) { - unless (isIn($child->getId, @found)||isIn($child->getId,@hidden)) { + unless ($child->getId ~~ @found || $child->getId ~~ @hidden) { if ($child->canView) { my $is_shortcut = $child->isa('WebGUI::Asset::Shortcut'); my $is_dashlet = $child->can('getOverrideFormDefinition'); my $title = $child->{_properties}{title} = $is_shortcut ? $child->getShortcut->getTitle : $child->getTitle; my $options = $session->db->quickHashRef('select * from Dashboard_dashlets where dashboardAssetId=? and dashletAssetId=?', [$self->getId, $child->getId]); my $canMove = $self->canPersonalize && !$options->{isStatic}; - my $editFormUrl = ($is_shortcut && $child->getPrefsFieldToShow) ? $child->getUrl('func=getUserPrefsForm') + my $editFormUrl = ($is_shortcut && $child->getPrefFieldsToShow) ? $child->getUrl('func=getUserPrefsForm') : ($is_dashlet && $child->getOverrideFormDefinition) ? $self->getUrl('func=customizeDashlet;dashletAssetId='.$child->getId) : '' ; @@ -450,7 +444,7 @@ sub view { } } } - $vars{showAdmin} = ($self->session->var->isAdminOn && $self->canEdit); + $vars{showAdmin} = ($self->session->isAdminOn && $self->canEdit); $vars{"dragger.init"} = ' ENDHTML - $style->setScript('http://gmaps-utility-library.googlecode.com/svn/trunk/markermanager/release/src/markermanager.js', {type=>"text/javascript"}); - $style->setScript($url->extras('yui/build/yahoo-dom-event/yahoo-dom-event.js'),{type=>'text/javascript'}); - $style->setScript($url->extras('yui/build/connection/connection-min.js'),{type=>'text/javascript'}); - $style->setScript($url->extras('yui/build/dragdrop/dragdrop-min.js'),{type=>'text/javascript'}); - $style->setScript($url->extras('yui/build/element/element-min.js'),{type=>'text/javascript'}); - $style->setScript($url->extras('yui/build/button/button-min.js'),{type=>'text/javascript'}); - $style->setScript($url->extras('yui/build/container/container-min.js'),{type=>'text/javascript'}); - $style->setScript($url->extras('yui/build/json/json-min.js'),{type=>'text/javascript'}); - $style->setScript($url->extras('yui-webgui/build/map/map.js'),{type=>'text/javascript'}); + $style->setScript('http://gmaps-utility-library.googlecode.com/svn/trunk/markermanager/release/src/markermanager.js'); + $style->setScript($url->extras('yui/build/yahoo-dom-event/yahoo-dom-event.js')); + $style->setScript($url->extras('yui/build/connection/connection-min.js')); + $style->setScript($url->extras('yui/build/dragdrop/dragdrop-min.js')); + $style->setScript($url->extras('yui/build/element/element-min.js')); + $style->setScript($url->extras('yui/build/button/button-min.js')); + $style->setScript($url->extras('yui/build/container/container-min.js')); + $style->setScript($url->extras('yui/build/json/json-min.js')); + $style->setScript($url->extras('yui-webgui/build/map/map.js')); return; } @@ -342,20 +325,20 @@ See WebGUI::Asset::prepareView() for details. =cut -sub prepareView { +override prepareView => sub { my $self = shift; - $self->SUPER::prepareView(); - my $template = WebGUI::Asset::Template->new( $self->session, $self->get("templateIdView") ); + super(); + my $template = WebGUI::Asset::Template->newById( $self->session, $self->templateIdView ); if (!$template) { WebGUI::Error::ObjectNotFound::Template->throw( error => qq{Template not found}, - templateId => $self->get("templateIdView"), + templateId => $self->templateIdView, assetId => $self->getId, ); } $template->prepare; $self->{_viewTemplate} = $template; -} +}; #------------------------------------------------------------------- @@ -378,12 +361,12 @@ sub view { # Build the map container my $mapHtml = sprintf '
    ', $self->getId, - $self->get('mapHeight'), - $self->get('mapWidth'), + $self->mapHeight, + $self->mapWidth, ; # The script to load the map into the container - $mapHtml .= sprintf <<'ENDHTML', $self->getId, $self->getUrl, $self->get('startLatitude'), $self->get('startLongitude'), $self->get('startZoom'), $session->url->extras; + $mapHtml .= sprintf <<'ENDHTML', $self->getId, $self->getUrl, $self->startLatitude, $self->startLongitude, $self->startZoom, $session->url->extras; "); - return $tabform; -} - - - -#------------------------------------------------------------------- - -=head2 getToolbar ( ) - -Returns a toolbar with a set of icons that hyperlink to functions that delete, edit, promote, demote, cut, and copy. - -=cut - -sub getToolbar { - my $self = shift; - return undef - unless $self->canEdit && $self->session->var->isAdminOn; - if ($self->getToolbarState) { - my $toolbar = ''; - if ($self->canEditIfLocked) { - my $userUiLevel = $self->session->user->profileField("uiLevel"); - my $uiLevels = $self->session->config->get("assetToolbarUiLevel"); - my $returnUrl = ''; - if ($self->session->asset) { - $returnUrl = ";proceed=goBackToPage;returnUrl=".$self->session->url->escape($self->session->asset->getUrl); - } - $toolbar = $self->session->icon->edit('func=edit'.$returnUrl,$self->get("url")) - if ($userUiLevel >= $uiLevels->{"edit"}); +override getEditForm => sub { + my $self = shift; + my $fb = super(); + my $i18n = WebGUI::International->new($self->session, "Asset_Navigation"); + my ( $descendantsChecked, $ancestorsChecked, $selfChecked, $pedigreeChecked, $siblingsChecked ); + my @assetsToInclude = split( "\n", $self->assetsToInclude ); + my $afterScript; + foreach my $item (@assetsToInclude) { + if ( $item eq "self" ) { + $selfChecked = 1; } - $self->session->style->setLink($self->session->url->extras('assetToolbar/assetToolbar.css'), {rel=>"stylesheet",type=>"text/css"}); - $self->session->style->setLink($self->session->url->extras('yui/build/menu/assets/skins/sam/menu.css'), {rel=>"stylesheet",type=>"text/css"}); - $self->session->style->setScript($self->session->url->extras('yui/build/yahoo-dom-event/yahoo-dom-event.js'), {type=>"text/javascript"}); - $self->session->style->setScript($self->session->url->extras('yui/build/container/container_core-min.js'), {type=>"text/javascript"}); - $self->session->style->setScript($self->session->url->extras('yui/build/menu/menu-min.js'), {type=>"text/javascript"}); - $self->session->style->setScript($self->session->url->extras('assetToolbar/assetToolbar.js'), {type=>"text/javascript"}); - my $i18n = WebGUI::International->new($self->session, "Asset"); - return '
    ' - . '' . $self->getName . '' - . '$toolbar
    "; - } - return $self->SUPER::getToolbar; -} - - + elsif ( $item eq "descendants" ) { + $descendantsChecked = 1; + $afterScript = "displayNavEndPoint = false;"; + } + elsif ( $item eq "ancestors" ) { + $ancestorsChecked = 1; + } + elsif ( $item eq "siblings" ) { + $siblingsChecked = 1; + } + elsif ( $item eq "pedigree" ) { + $pedigreeChecked = 1; + } + } ## end foreach my $item (@assetsToInclude) + $fb->getTab("properties")->addField( "selectBox", + name => "startType", + options => { + specificUrl => $i18n->get('Specific URL'), + relativeToCurrentUrl => $i18n->get('Relative To Current URL'), + relativeToRoot => $i18n->get('Relative To Root') + }, + value => [ $self->startType ], + label => $i18n->get("Start Point Type"), + hoverHelp => $i18n->get("Start Point Type description"), + id => "navStartType", + extras => 'onchange="changeStartPoint()"' + ); + $fb->getTab("properties")->addField( "ReadOnly", + label => $i18n->get("Start Point"), + hoverHelp => $i18n->get("Start Point description"), + value => '' + ); + tie my %ancestorEndPointOptions, 'Tie::IxHash', ( + '1' => '../ (-1)', + '2' => '../../ (-2)', + '3' => '../../../ (-3)', + '4' => '../../../../ (-4)', + '5' => '../../../../../ (-5)', + '55' => $i18n->get('Infinity') + ); + $fb->getTab("properties")->addField( "SelectBox" => + name => "ancestorEndPoint", + value => [ $self->ancestorEndPoint ], + options => \%ancestorEndPointOptions, + label => $i18n->get('Ancestor End Point'), + rowClass => 'navAncestorEnd', + ); + $fb->getTab("properties")->addField( "ReadOnly" => + label => $i18n->get("Relatives To Include"), + hoverHelp => $i18n->get("Relatives To Include description"), + value => WebGUI::Form::checkbox( + $self->session, { + checked => $ancestorsChecked, + name => "assetsToInclude", + extras => 'onchange="toggleAncestorEndPoint()"', + value => "ancestors" + } + ) + . $i18n->get('Ancestors') + . '
    ' + . WebGUI::Form::checkbox( + $self->session, { + checked => $selfChecked, + name => "assetsToInclude", + value => "self" + } + ) + . $i18n->get('Self') + . '
    ' + . WebGUI::Form::checkbox( + $self->session, { + checked => $siblingsChecked, + name => "assetsToInclude", + value => "siblings" + } + ) + . $i18n->get('Siblings') + . '
    ' + . WebGUI::Form::checkbox( + $self->session, { + checked => $descendantsChecked, + name => "assetsToInclude", + value => "descendants", + extras => 'onchange="toggleDescendantEndPoint()"' + } + ) + . $i18n->get('Descendants') + . '
    ' + . WebGUI::Form::checkbox( + $self->session, { + checked => $pedigreeChecked, + name => "assetsToInclude", + value => "pedigree" + } + ) + . $i18n->get('Pedigree') + . '
    ' + ); + tie my %descendantEndPointOptions, 'Tie::IxHash', ( + '1' => './a/ (+1)', + '2' => './a/b/ (+2)', + '3' => './a/b/c/ (+3)', + '4' => './a/b/c/d/ (+4)', + '5' => './a/b/c/d/e/ (+5)', + '55' => $i18n->get('Infinity') + ); + $fb->getTab("properties")->addField( "selectBox", + name => "descendantEndPoint", + label => $i18n->get('Descendant End Point'), + value => [ $self->descendantEndPoint ], + options => \%descendantEndPointOptions, + rowClass => "navDescendantEnd", + ); + my $start = $self->startPoint; + $fb->addField( "ReadOnly", + value => + "" + ); + return $fb; +}; #------------------------------------------------------------------- @@ -343,20 +301,20 @@ Extend the superclass to add metadata and to preprocess the template. =cut -sub prepareView { +override prepareView => sub { my $self = shift; - $self->SUPER::prepareView(); - my $template = WebGUI::Asset::Template->new($self->session, $self->get("templateId")); + super(); + my $template = WebGUI::Asset::Template->newById($self->session, $self->templateId); # part of Couldn't lookup className (param: PBtmpl0000000000000048) if (!$template) { WebGUI::Error::ObjectNotFound::Template->throw( error => qq{Template not found}, - templateId => $self->get("templateId"), + templateId => $self->templateId, assetId => $self->getId, ); } $template->prepare($self->getMetaDataAsTemplateVariables); $self->{_viewTemplate} = $template; -} +}; #------------------------------------------------------------------- @@ -384,42 +342,44 @@ sub view { my @interestingProperties = ('assetId', 'parentId', 'ownerUserId', 'synopsis', 'newWindow'); # Add properties from current asset foreach my $property (@interestingProperties) { - $var->{'currentPage.'.$property} = $current->get($property); + $var->{'currentPage.'.$property} = $current->$property; } - $var->{'currentPage.menuTitle'} = $current->getMenuTitle; - $var->{'currentPage.title'} = $current->getTitle; - $var->{'currentPage.isHome'} = ($current->getId eq $self->session->setting->get("defaultPage")); - $var->{'currentPage.url'} = $current->getUrl; - $var->{'currentPage.hasChild'} = $current->hasChildren; - $var->{'currentPage.rank'} = $current->getRank; - $var->{'currentPage.rankIs'.$current->getRank} = 1; + $var->{'currentPage.menuTitle'} = $current->getMenuTitle; + $var->{'currentPage.title'} = $current->getTitle; + $var->{'currentPage.isHome'} = ($current->getId eq $self->session->setting->get("defaultPage")); + $var->{'currentPage.url'} = $current->getUrl; + $var->{'currentPage.hasChild'} = $current->hasChildren; + $var->{'currentPage.rank'} = $current->getRank; + $var->{'currentPage.rankIs'.$current->getRank} = 1; # Build the asset tree - if ($self->get("startType") eq "specificUrl") { - $start = WebGUI::Asset->newByUrl($self->session,$self->get("startPoint")); - } elsif ($self->get("startType") eq "relativeToRoot") { - unless (($self->get("startPoint")+1) >= $current->getLineageLength) { - $start = WebGUI::Asset->newByLineage($self->session,substr($current->get("lineage"),0, ($self->get("startPoint") + 1) * 6)); + if ($self->startType eq "specificUrl") { + $start = WebGUI::Asset->newByUrl($self->session,$self->startPoint); + } + elsif ($self->startType eq "relativeToRoot") { + unless (($self->startPoint+1) >= $current->getLineageLength) { + $start = WebGUI::Asset->newByLineage($self->session,substr($current->lineage,0, ($self->startPoint + 1) * 6)); } - } elsif ($self->get("startType") eq "relativeToCurrentUrl") { - $start = WebGUI::Asset->newByLineage($self->session,substr($current->get("lineage"),0, ($current->getLineageLength + $self->get("startPoint")) * 6)); + } + elsif ($self->startType eq "relativeToCurrentUrl") { + $start = WebGUI::Asset->newByLineage($self->session,substr($current->lineage,0, ($current->getLineageLength + $self->startPoint) * 6)); } $start = $current unless (defined $start); # if none of the above results in a start point, then the current page must be it - my @includedRelationships = split("\n",$self->get("assetsToInclude")); + my @includedRelationships = split("\n",$self->assetsToInclude); my %rules; - $rules{endingLineageLength} = $start->getLineageLength+$self->get("descendantEndPoint"); - $rules{assetToPedigree} = $current if (isIn("pedigree",@includedRelationships)); - $rules{ancestorLimit} = $self->get("ancestorEndPoint"); - $rules{orderByClause} = 'rpad(asset.lineage, 255, 9) desc' if ($self->get('reversePageLoop')); + $rules{endingLineageLength} = $start->getLineageLength+$self->descendantEndPoint; + $rules{assetToPedigree} = $current if ("pedigree" ~~ @includedRelationships); + $rules{ancestorLimit} = $self->ancestorEndPoint; + $rules{orderByClause} = 'rpad(asset.lineage, 255, 9) desc' if ($self->reversePageLoop); my $assetIter = $start->getLineageIterator(\@includedRelationships,\%rules); - my $currentLineage = $current->get("lineage"); + my $currentLineage = $current->lineage; my $lineageToSkip = "noskip"; my $absoluteDepthOfLastPage; my $absoluteDepthOfFirstPage; # Will set on first iteration of loop, below my %lastChildren; my $previousPageData = undef; - my $eh = $self->session->errorHandler; + my $log = $self->session->log; while ( 1 ) { my $asset; eval { $asset = $assetIter->() }; @@ -430,18 +390,18 @@ sub view { last unless $asset; # skip pages we shouldn't see - my $pageLineage = $asset->get("lineage"); + my $pageLineage = $asset->lineage; next if ($pageLineage =~ m/^$lineageToSkip/); - if ($asset->get("isHidden") && !$self->get("showHiddenPages")) { + if ($asset->isHidden && !$self->showHiddenPages) { $lineageToSkip = $pageLineage unless ($pageLineage eq "000001"); next; } - if ($asset->get("isSystem") && !$self->get("showSystemPages")) { + if ($asset->isSystem && !$self->showSystemPages) { $lineageToSkip = $pageLineage unless ($pageLineage eq "000001"); next; } - unless ($self->get("showUnprivilegedPages") || $asset->canView) { + unless ($self->showUnprivilegedPages || $asset->canView) { $lineageToSkip = $pageLineage unless ($pageLineage eq "000001"); next; } @@ -463,11 +423,11 @@ sub view { $pageData->{"page.rank"} = $asset->getRank; $pageData->{"page.absDepth"} = $asset->getLineageLength; $pageData->{"page.relDepth"} = $asset->getLineageLength - $absoluteDepthOfFirstPage; - $pageData->{"page.isSystem"} = $asset->get("isSystem"); - $pageData->{"page.isHidden"} = $asset->get("isHidden"); + $pageData->{"page.isSystem"} = $asset->isSystem; + $pageData->{"page.isHidden"} = $asset->isHidden; $pageData->{"page.isViewable"} = $asset->canView; - $pageData->{'page.isContainer'} = $self->session->config->get("assets/".$asset->get("className")."/isContainer"); - $pageData->{'page.isUtility'} = $self->session->config->get("assets/".$asset->get("className")."/category") eq "utilities"; + $pageData->{'page.isContainer'} = $self->session->config->get("assets/".$asset->className."/isContainer"); + $pageData->{'page.isUtility'} = $self->session->config->get("assets/".$asset->className."/category") eq "utilities"; $pageData->{"page.url"} = $asset->getUrl; my $indent = $asset->getLineageLength - $absoluteDepthOfFirstPage; $pageData->{"page.indent_loop"} = []; @@ -475,15 +435,15 @@ sub view { $pageData->{"page.indent"} = "   " x $indent; $pageData->{"page.isBranchRoot"} = ($pageData->{"page.absDepth"} == 1); $pageData->{"page.isTopOfBranch"} = ($pageData->{"page.absDepth"} == 2); - $pageData->{"page.isChild"} = ($asset->get("parentId") eq $current->getId); - $pageData->{"page.isParent"} = ($asset->getId eq $current->get("parentId")); + $pageData->{"page.isChild"} = ($asset->parentId eq $current->getId); + $pageData->{"page.isParent"} = ($asset->getId eq $current->parentId); $pageData->{"page.isCurrent"} = ($asset->getId eq $current->getId); $pageData->{"page.isDescendant"} = ( $pageLineage =~ m/^$currentLineage/ && !$pageData->{"page.isCurrent"}); $pageData->{"page.isAncestor"} = ( $currentLineage =~ m/^$pageLineage/ && !$pageData->{"page.isCurrent"}); my $currentBranchLineage = substr($currentLineage,0,12); $pageData->{"page.inBranchRoot"} = ($pageLineage =~ m/^$currentBranchLineage/); $pageData->{"page.isSibling"} = ( - $asset->get("parentId") eq $current->get("parentId") && + $asset->parentId eq $current->parentId && $asset->getId ne $current->getId ); $pageData->{"page.inBranch"} = ( @@ -512,7 +472,7 @@ sub view { my $parent = $asset->getParent; if (defined $parent) { foreach my $property (@interestingProperties) { - $pageData->{"page.parent.".$property} = $parent->get($property); + $pageData->{"page.parent.".$property} = $parent->$property; } $pageData->{'page.parent.menuTitle'} = $parent->getMenuTitle; $pageData->{'page.parent.title'} = $parent->getTitle; @@ -544,7 +504,7 @@ Do a redirect to the form parameter returnUrl if it exists. sub www_goBackToPage { my $self = shift; - $self->session->http->setRedirect($self->session->form->process("returnUrl")) if ($self->session->form->process("returnUrl")); + $self->session->response->setRedirect($self->session->form->process("returnUrl")) if ($self->session->form->process("returnUrl")); return undef; } @@ -557,18 +517,19 @@ other types aside from text/html. =cut -sub www_view { +override www_view => sub { my $self = shift; - my $mimeType = $self->getValue('mimeType') || 'text/html'; + my $mimeType = $self->mimeType || 'text/html'; if ($mimeType eq 'text/html') { - return $self->SUPER::www_view(); + return super(); } else { $self->prepareView(); - $self->session->http->setMimeType($mimeType || 'text/html'); + $self->session->response->content_type($mimeType); return $self->view(); } -} +}; +__PACKAGE__->meta->make_immutable; 1; diff --git a/lib/WebGUI/Asset/Wobject/Poll.pm b/lib/WebGUI/Asset/Wobject/Poll.pm index 0b411652f..d16571e9f 100644 --- a/lib/WebGUI/Asset/Wobject/Poll.pm +++ b/lib/WebGUI/Asset/Wobject/Poll.pm @@ -2,7 +2,7 @@ package WebGUI::Asset::Wobject::Poll; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -17,176 +17,197 @@ use WebGUI::Form; use WebGUI::International; use WebGUI::SQL; use WebGUI::User; -use WebGUI::Utility; use WebGUI::Asset::Wobject; use WebGUI::Image::Graph; use WebGUI::Storage; use JSON; +use Try::Tiny; -our @ISA = qw(WebGUI::Asset::Wobject); +use Moose; +use WebGUI::Definition::Asset; +extends 'WebGUI::Asset::Wobject'; +define assetName => ['assetName', 'Asset_Poll']; +define tableName => 'Poll'; +define icon => 'poll.gif'; +property templateId => ( + tab => 'display', + fieldType => "template", + default => 'PBtmpl0000000000000055', + label => [73, 'Asset_Poll'], + hoverHelp => ['73 description', 'Asset_Poll'], + namespace => "Poll", + ); +property active => ( + tab => 'properties', + fieldType => "yesNo", + default => 1, + label => [3, 'Asset_Poll'], + hoverHelp => ['3 description', 'Asset_Poll'], + ); +property karmaPerVote => ( + fieldType => 'integer', + noFormPost => \&_karmaPerVote_noFormPost, + default => 0, + label => [20, 'Asset_Poll'], + hoverHelp => ['20 description', 'Asset_Poll'], + ); +sub _karmaPerVote_noFormPost { + my $self = shift; + return ! $self->session->setting->get('useKarma'); +} +property graphWidth => ( + fieldType => "integer", + default => 150, + label => [5, 'Asset_Poll'], + hoverHelp => ['5 description', 'Asset_Poll'], + ); +property voteGroup => ( + tab => 'security', + fieldType => "group", + default => 7, + label => [4, 'Asset_Poll'], + hoverHelp => ['4 description', 'Asset_Poll'], + ); +property question => ( + tab => 'properties', + fieldType => "text", + default => undef, + label => [6, 'Asset_Poll'], + hoverHelp => ['6 description', 'Asset_Poll'], + ); +property randomizeAnswers => ( + tab => 'properties', + fieldType => "yesNo", + default => 1, + label => [72, 'Asset_Poll'], + hoverHelp => ['72 description', 'Asset_Poll'], + ); +property a1 => ( + fieldType => "hidden", + default => undef, + noFormPost => 1, +); +property a2 => ( + fieldType => "hidden", + default => undef, + noFormPost => 1, +); +property a3 => ( + fieldType => "hidden", + default => undef, + noFormPost => 1, +); +property a4 => ( + fieldType => "hidden", + default => undef, + noFormPost => 1, +); +property a5 => ( + fieldType => "hidden", + default => undef, + noFormPost => 1, +); +property a6 => ( + fieldType => "hidden", + default => undef, + noFormPost => 1, +); +property a7 => ( + fieldType => "hidden", + default => undef, + noFormPost => 1, +); +property a8 => ( + fieldType => "hidden", + default => undef, + noFormPost => 1, +); +property a9 => ( + fieldType => "hidden", + default => undef, + noFormPost => 1, +); +property a10 => ( + fieldType => "hidden", + default => undef, + noFormPost => 1, +); +property a11 => ( + fieldType => "hidden", + default => undef, + noFormPost => 1, +); +property a12 => ( + fieldType => "hidden", + default => undef, + noFormPost => 1, +); +property a13 => ( + fieldType => "hidden", + default => undef, + noFormPost => 1, +); +property a14 => ( + fieldType => "hidden", + default => undef, + noFormPost => 1, +); +property a15 => ( + fieldType => "hidden", + default => undef, + noFormPost => 1, +); +property a16 => ( + fieldType => "hidden", + default => undef, + noFormPost => 1, +); +property a17 => ( + fieldType => "hidden", + default => undef, + noFormPost => 1, +); +property a18 => ( + fieldType => "hidden", + default => undef, + noFormPost => 1, +); +property a19 => ( + fieldType => "hidden", + default => undef, + noFormPost => 1, +); +property a20 => ( + fieldType => "hidden", + default => undef, + noFormPost => 1, +); +property graphConfiguration => ( + fieldType => "hidden", + default => undef, + noFormPost => 1, +); +property generateGraph => ( + noFormPost => \&_generateGraph_noFormPost, + fieldType => 'yesNo', + default => 0, + label => ['generate graph', 'Asset_Poll'], + hoverHelp => ['generate graph description', 'Asset_Poll'], + ); +sub _generateGraph_noFormPost { + my $self = shift; + return WebGUI::Image::Graph->getPluginList($self->session) ? 1 : 0; +} #------------------------------------------------------------------- sub _hasVoted { my $self = shift; my ($hasVoted) = $self->session->db->quickArray("select count(*) from Poll_answer where assetId=".$self->session->db->quote($self->getId)." and ((userId=".$self->session->db->quote($self->session->user->userId)." - and userId<>'1') or (userId=".$self->session->db->quote($self->session->user->userId)." and ipAddress='".$self->session->env->getIp."'))"); + and userId<>'1') or (userId=".$self->session->db->quote($self->session->user->userId)." and ipAddress='".$self->session->request->address."'))"); return $hasVoted; } -#------------------------------------------------------------------- -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift; - my $i18n = WebGUI::International->new($session,"Asset_Poll"); - push(@{$definition}, { - assetName=>$i18n->get('assetName'), - tableName=>'Poll', - icon=>'poll.gif', - className=>'WebGUI::Asset::Wobject::Poll', - autoGenerateForms=>1, - properties=>{ - templateId =>{ - tab => 'display', - fieldType => "template", - defaultValue => 'PBtmpl0000000000000055', - label => $i18n->get(73), - hoverHelp => $i18n->get('73 description'), - namespace => "Poll", - }, - active=>{ - tab => 'properties', - fieldType => "yesNo", - defaultValue => 1, - label => $i18n->get(3), - hoverHelp => $i18n->get('3 description'), - }, - karmaPerVote=>{ - fieldType=>"integer", - defaultValue=>0, - autoGenerate=>0, - }, - graphWidth=>{ - fieldType=>"integer", - defaultValue=>150, - autoGenerate=>0, - }, - voteGroup=>{ - tab => 'security', - fieldType => "group", - defaultValue => 7, - label => $i18n->get(4), - hoverHelp => $i18n->get('4 description'), - }, - question=>{ - tab => 'properties', - fieldType => "text", - defaultValue => undef, - label => $i18n->get(6), - hoverHelp => $i18n->get('6 description'), - }, - randomizeAnswers=>{ - tab => 'properties', - fieldType => "yesNo", - defaultValue => 1, - label => $i18n->get(72), - hoverHelp => $i18n->get('72 description'), - }, - a1=>{ - fieldType=>"hidden", - defaultValue=>undef - }, - a2=>{ - fieldType=>"hidden", - defaultValue=>undef - }, - a3=>{ - fieldType=>"hidden", - defaultValue=>undef - }, - a4=>{ - fieldType=>"hidden", - defaultValue=>undef - }, - a5=>{ - fieldType=>"hidden", - defaultValue=>undef - }, - a6=>{ - fieldType=>"hidden", - defaultValue=>undef - }, - a7=>{ - fieldType=>"hidden", - defaultValue=>undef - }, - a8=>{ - fieldType=>"hidden", - defaultValue=>undef - }, - a9=>{ - fieldType=>"hidden", - defaultValue=>undef - }, - a10=>{ - fieldType=>"hidden", - defaultValue=>undef - }, - a11=>{ - fieldType=>"hidden", - defaultValue=>undef - }, - a12=>{ - fieldType=>"hidden", - defaultValue=>undef - }, - a13=>{ - fieldType=>"hidden", - defaultValue=>undef - }, - a14=>{ - fieldType=>"hidden", - defaultValue=>undef - }, - a15=>{ - fieldType=>"hidden", - defaultValue=>undef - }, - a16=>{ - fieldType=>"hidden", - defaultValue=>undef - }, - a17=>{ - fieldType=>"hidden", - defaultValue=>undef - }, - a18=>{ - fieldType=>"hidden", - defaultValue=>undef - }, - a19=>{ - fieldType=>"hidden", - defaultValue=>undef - }, - a20=>{ - fieldType=>"hidden", - defaultValue=>undef - }, - graphConfiguration=>{ - fieldType=>"hidden", - defaultValue=>undef, - }, - generateGraph => { - fieldType => "yesNo", - defaultValue => 0, - autoGenerate => 0, - }, - } - }); - return $class->SUPER::definition($session, $definition); -} - #------------------------------------------------------------------- =head2 duplicate @@ -195,16 +216,16 @@ Extend the base method to handle copying Poll answer data. =cut -sub duplicate { +override duplicate => sub { my $self = shift; - my $newAsset = $self->SUPER::duplicate(@_); + my $newAsset = super(); my $sth = $self->session->db->read("select * from Poll_answer where assetId=?", [$self->getId]); while (my $data = $sth->hashRef) { $newAsset->setVote($data->{answer}, $data->{userId}, $data->{ipAddress}); } $sth->finish; return $newAsset; -} +}; #---------------------------------------------------------------------------- @@ -234,64 +255,45 @@ Extend the base class to handle the answers and graphing plugins. ##TODO: Pull out all form elements which can come from the definition sub ##and only have hand code in here. -sub getEditForm { +override getEditForm => sub { my $self = shift; - my $tabform = $self->SUPER::getEditForm; + my $fb = super(); my $i18n = WebGUI::International->new($self->session,"Asset_Poll"); my ($i, $answers); for ($i=1; $i<=20; $i++) { if ($self->get('a'.$i) =~ /\C/) { - $answers .= $self->getValue("a".$i)."\n"; + $answers .= $self->get("a".$i)."\n"; } } - if ($self->session->setting->get("useKarma")) { - $tabform->getTab("properties")->integer( - -name=>"karmaPerVote", - -label=>$i18n->get(20), - -hoverHelp=>$i18n->get('20 description'), - -value=>$self->getValue("karmaPerVote") - ); - } else { - $tabform->getTab("properties")->hidden( - -name=>"karmaPerVote", - -value=>$self->getValue("karmaPerVote") - ); - } - $tabform->getTab("display")->integer( - -name=>"graphWidth", - -label=>$i18n->get(5), - -hoverHelp=>$i18n->get('5 description'), - -value=>$self->getValue("graphWidth") - ); - $tabform->getTab("properties")->textarea( - -name=>"answers", - -label=>$i18n->get(7), - -hoverHelp=>$i18n->get('7 description'), - -subtext=>('
    '.$i18n->get(8).'
    '), - -value=>$answers - ); - $tabform->getTab("properties")->yesNo( - -name=>"resetVotes", - -label=>$i18n->get(10), - -hoverHelp=>$i18n->get('10 description') + $fb->getTab("properties")->addField( "textarea", + name=>"answers", + label=>$i18n->get(7), + hoverHelp=>$i18n->get('7 description'), + subtext=>('
    '.$i18n->get(8).'
    '), + value=>$answers + ); + $fb->getTab("properties")->addField( "YesNo", + name=>"resetVotes", + label=>$i18n->get(10), + hoverHelp=>$i18n->get('10 description') ) if $self->session->form->process("func") ne 'add'; if (WebGUI::Image::Graph->getPluginList($self->session)) { my $config = $self->getGraphConfig; - $tabform->addTab('graph', $i18n->get('Graphing','Image_Graph')); - $tabform->getTab('graph')->yesNo( - -name => 'generateGraph', - -label => $i18n->get('generate graph'), - -hoverHelp => $i18n->get('generate graph description'), - -value => $self->getValue('generateGraph'), + my $graphTab = $fb->addTab(name => 'graph', label => $i18n->get('Graphing','Image_Graph')); + $graphTab->addField( "yesNo", + name => 'generateGraph', + label => $i18n->get('generate graph'), + hoverHelp => $i18n->get('generate graph description'), + value => $self->generateGraph, ); - $tabform->getTab('graph')->raw(WebGUI::Image::Graph->getGraphingTab($self->session, $config)); + WebGUI::Image::Graph->getGraphingTab($graphTab, $config) } - return $tabform; -} + return $fb; +}; #---------------------------------------------------------------------------- @@ -318,11 +320,12 @@ Indexing question and answers. See WebGUI::Asset::indexContent() for additonal d =cut -sub indexContent { +around indexContent => sub { + my $orig = shift; my $self = shift; - my $indexer = $self->SUPER::indexContent; + my $indexer = $self->$orig(@_); $indexer->addKeywords($self->get("question")." ".$self->get("answers")); -} +}; #------------------------------------------------------------------- @@ -333,10 +336,10 @@ See WebGUI::Asset::prepareView() for details. =cut -sub prepareView { +override prepareView => sub { my $self = shift; - $self->SUPER::prepareView(); - my $template = WebGUI::Asset::Template->new($self->session, $self->get("templateId")); + super(); + my $template = WebGUI::Asset::Template->newById($self->session, $self->get("templateId")); if (!$template) { WebGUI::Error::ObjectNotFound::Template->throw( error => qq{Template not found}, @@ -346,20 +349,20 @@ sub prepareView { } $template->prepare($self->getMetaDataAsTemplateVariables); $self->{_viewTemplate} = $template; -} +}; #------------------------------------------------------------------- -=head2 processPropertiesFromFormPost +=head2 processEditForm Extend the base method to handle the answers and the Graphing plugin. =cut -sub processPropertiesFromFormPost { +override processEditForm => sub { my $self = shift; - $self->SUPER::processPropertiesFromFormPost; + super(); my $property = {}; my $answers = $self->session->form->process("answers"); $answers =~ s{\r}{}xmsg; @@ -369,13 +372,20 @@ sub processPropertiesFromFormPost { } if (WebGUI::Image::Graph->getPluginList($self->session)) { - my $graph = WebGUI::Image::Graph->processConfigurationForm($self->session); - $self->setGraphConfig( $graph->getConfiguration ); + my $graph; + try { + $graph = WebGUI::Image::Graph->processConfigurationForm($self->session); + } catch { + $self->session->log->error( "Graph plugin not available or not functional: Error: ``$_''" ); + }; + if( $graph ) { + $self->setGraphConfig( $graph->getConfiguration ); + } } $self->update($property); $self->session->db->write("delete from Poll_answer where assetId=".$self->session->db->quote($self->getId)) if ($self->session->form->process("resetVotes")); -} +}; #------------------------------------------------------------------- @@ -386,11 +396,11 @@ Extend the base method to handle Poll answers. =cut -sub purge { +override purge => sub { my $self = shift; $self->session->db->write("delete from Poll_answer where assetId=".$self->session->db->quote($self->getId)); - $self->SUPER::purge(); -} + super(); +}; #---------------------------------------------------------------------------- @@ -495,9 +505,9 @@ sub view { push(@answers,{ "answer.form"=>WebGUI::Form::radio($self->session,{name=>"answer",value=>"a".$i}), "answer.text"=>$self->get('a'.$i), - "answer.graphWidth"=>round($self->get("graphWidth")*$tally/$totalResponses), + "answer.graphWidth"=>sprintf('%.0f', $self->get("graphWidth")*$tally/$totalResponses), "answer.number"=>$i, - "answer.percent"=>round(100*$tally/$totalResponses), + "answer.percent"=>sprintf('%0.f', 100*$tally/$totalResponses), "answer.total"=>($tally+0) }); push(@dataset, ($tally+0)); @@ -507,7 +517,7 @@ sub view { @answers = List::Util::shuffle(@answers) if ($self->get("randomizeAnswers")); $var{answer_loop} = \@answers; - if ($self->getValue('generateGraph')) { + if ($self->generateGraph) { my $config = $self->getGraphConfig; if ($config) { my $graph = WebGUI::Image::Graph->loadByConfiguration($self->session, $config); @@ -523,7 +533,7 @@ sub view { $var{graphUrl} = $storage->getUrl($filename); $var{hasImageGraph} = 1; } else { - $self->session->errorHandler->error('The graph configuration hash of the Poll ('.$self->getUrl.') is corrupt.'); + $self->session->log->error('The graph configuration hash of the Poll ('.$self->getUrl.') is corrupt.'); } } @@ -543,7 +553,7 @@ sub www_vote { my $self = shift; my $u; if ($self->session->form->process("answer") ne "" && $self->session->user->isInGroup($self->get("voteGroup")) && !($self->_hasVoted())) { - $self->setVote($self->session->form->process("answer"),$self->session->user->userId,$self->session->env->getIp); + $self->setVote($self->session->form->process("answer"),$self->session->user->userId,$self->session->request->address); if ($self->session->setting->get("useKarma")) { $self->session->user->karma($self->get("karmaPerVote"),"Poll (".$self->getId.")","Voted on this poll."); } @@ -555,5 +565,6 @@ sub www_vote { +__PACKAGE__->meta->make_immutable; 1; diff --git a/lib/WebGUI/Asset/Wobject/ProjectManager.pm b/lib/WebGUI/Asset/Wobject/ProjectManager.pm index 1353b0296..f2c1a8ab2 100644 --- a/lib/WebGUI/Asset/Wobject/ProjectManager.pm +++ b/lib/WebGUI/Asset/Wobject/ProjectManager.pm @@ -4,7 +4,7 @@ use strict; our $VERSION = "1.0.0"; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -16,10 +16,70 @@ our $VERSION = "1.0.0"; use DateTime; use Tie::IxHash; use WebGUI::International; -use WebGUI::Utility; +use Number::Format (); use WebGUI::HTML; use POSIX qw(ceil floor); -use base 'WebGUI::Asset::Wobject'; +use Moose; +use WebGUI::Definition::Asset; +extends 'WebGUI::Asset::Wobject'; +define assetName => ['assetName', 'Asset_ProjectManager']; +define icon => 'projManagement.gif'; +define tableName => 'PM_wobject'; +property projectDashboardTemplateId => ( + fieldType => "template", + default => 'ProjectManagerTMPL0001', + tab => "display", + namespace => "ProjectManager_dashboard", + hoverHelp => ['projectDashboardTemplate hoverhelp', 'Asset_ProjectManager'], + label => ['projectDashboardTemplate label', 'Asset_ProjectManager'], + ); +property projectDisplayTemplateId => ( + fieldType => "template", + default => 'ProjectManagerTMPL0002', + tab => "display", + namespace => "ProjectManager_project", + hoverHelp => ['projectDisplayTemplate hoverhelp', 'Asset_ProjectManager'], + label => ['projectDisplayTemplate label', 'Asset_ProjectManager'], + ); +property ganttChartTemplateId => ( + fieldType => "template", + default => 'ProjectManagerTMPL0003', + tab => "display", + namespace => "ProjectManager_gantt", + hoverHelp => ['ganttChartTemplate hoverhelp', 'Asset_ProjectManager'], + label => ['ganttChartTemplate label', 'Asset_ProjectManager'], + ); +property editTaskTemplateId => ( + fieldType => "template", + default => 'ProjectManagerTMPL0004', + tab => "display", + namespace => "ProjectManager_editTask", + hoverHelp => ['editTaskTemplate hoverhelp', 'Asset_ProjectManager'], + label => ['editTaskTemplate label', 'Asset_ProjectManager'], + ); +property resourcePopupTemplateId => ( + fieldType => "template", + default => 'ProjectManagerTMPL0005', + tab => "display", + namespace => "ProjectManager_resourcePopup", + hoverHelp => ['resourcePopupTemplate hoverhelp', 'Asset_ProjectManager'], + label => ['resourcePopupTemplate label', 'Asset_ProjectManager'], + ); +property resourceListTemplateId => ( + fieldType => "template", + default => 'ProjectManagerTMPL0006', + tab => "display", + namespace => "ProjectManager_resourceList", + hoverHelp => ['resourceListTemplate hoverhelp', 'Asset_ProjectManager'], + label => ['resourceListTemplate label', 'Asset_ProjectManager'], + ); +property groupToAdd => ( + fieldType => "group", + default => 3, + tab => "security", + hoverHelp => ['groupToAdd hoverhelp', 'Asset_ProjectManager'], + label => ['groupToAdd label', 'Asset_ProjectManager'], + ); #------------------------------------------------------------------- @@ -30,7 +90,7 @@ use base 'WebGUI::Asset::Wobject'; sub _addDaysForMonth { my $self = shift; my $dt = $self->session->datetime; - my $eh = $self->session->errorHandler; + my $log = $self->session->log; my $days_loop = $_[0]; my $hash = $_[1]; @@ -48,13 +108,13 @@ sub _addDaysForMonth { while ($monday < $monthEnd) { my $hash = {}; $hash->{'day.number'} = $dt->epochToHuman($monday,"%d"); - #$eh->warn($hash->{'day.number'}); + #$log->warn($hash->{'day.number'}); $monday += 604800; # Add one week to the first monday of the month push(@{$days_loop},$hash); $colCount++; } $hash->{'month.colspan'} = $colCount; - #$eh->warn($dt->epochToHuman($firstMonday)); + #$log->warn($dt->epochToHuman($firstMonday)); } #------------------------------------------------------------------- @@ -203,7 +263,7 @@ sub _htmlOfResourceList { $subvar->{resourceIcon} = 'groups.gif'; } elsif ($resourceKind eq 'user') { my $user = WebGUI::User->new($self->session, $resourceId); - my ($firstName, $lastName, $username) = ($user->profileField('firstName'), $user->profileField('lastName'), $user->username); + my ($firstName, $lastName, $username) = ($user->get('firstName'), $user->get('lastName'), $user->username); my $displayName = do { if (length($firstName) && length($lastName)) { "$lastName, $firstName" } elsif (length($firstName)) { $firstName } @@ -213,13 +273,13 @@ sub _htmlOfResourceList { $subvar->{resourceName} = WebGUI::HTML::format($displayName, 'text'); $subvar->{resourceIcon} = 'users.gif'; } else { - $self->session->errorHandler->fatal("Unknown kind of resource '$resourceKind'!"); + $self->session->log->fatal("Unknown kind of resource '$resourceKind'!"); } push @{$var->{resourceLoop}}, $subvar; } - return $self->processTemplate($var, $self->getValue('resourceListTemplateId')); + return $self->processTemplate($var, $self->resourceListTemplateId); } #------------------------------------------------------------------- @@ -306,7 +366,7 @@ sub _resourceSearchPopup { $var->{doingSearch} = 0; } - return $self->processTemplate($var, $self->getValue('resourcePopupTemplateId')); + return $self->processTemplate($var, $self->resourcePopupTemplateId); } #------------------------------------------------------------------- @@ -325,7 +385,6 @@ sub _userSearchQuery { my $query = <<"SQL"; SELECT 'user' AS resourceKind, users.userId AS resourceId FROM users - LEFT JOIN userProfileData ON users.userId = userProfileData.userId WHERE (LOWER(lastName) LIKE ? OR LOWER(firstName) LIKE ? OR LOWER(users.username) LIKE ?) AND (users.userId NOT IN $excludePlaceholders) ORDER BY lastName, firstName @@ -363,7 +422,7 @@ sub _updateDependantDates { my $pred = $taskHash->{$predecessor}; unless ($pred) { # Predecessor has to have a lower sequence number, right? Right? - $self->session->errorHandler->error("Internal: predecessor '$predecessor' of task with seqNum '$seqNum' not in task hash?!"); + $self->session->log->error("Internal: predecessor '$predecessor' of task with seqNum '$seqNum' not in task hash?!"); next; } @@ -405,7 +464,7 @@ sub _userCanManageProject { my $user = shift; my $projectId = shift; my ($managerGroup) = $self->session->db->quickArray("select projectManager from PM_project where projectId = ?", [$projectId]); - return $self->canView($user->userId) && ($user->isInGroup($managerGroup) || $user->isInGroup($self->get('groupToAdd'))); + return $self->canView($user->userId) && ($user->isInGroup($managerGroup) || $user->isInGroup($self->groupToAdd)); } #------------------------------------------------------------------- @@ -417,7 +476,7 @@ sub _userCanManageProject { sub _userCanManageProjectList { my $self = shift; my $user = shift; - return $self->canView($user->userId) && $user->isInGroup($self->get('groupToAdd')); + return $self->canView($user->userId) && $user->isInGroup($self->groupToAdd); } #------------------------------------------------------------------- @@ -431,92 +490,9 @@ sub _userCanObserveProject { my $user = shift; my $projectId = shift; my ($managerGroup, $observerGroup) = $self->session->db->quickArray("select projectManager, projectObserver from PM_project where projectId = ?", [$projectId]); - return $self->canView($user->userId) && ($user->isInGroup($managerGroup) || $user->isInGroup($observerGroup) || $user->isInGroup($self->get('groupToAdd'))); + return $self->canView($user->userId) && ($user->isInGroup($managerGroup) || $user->isInGroup($observerGroup) || $user->isInGroup($self->groupToAdd)); } -#------------------------------------------------------------------- - -=head2 definition - -=cut - -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift; - my $i18n = WebGUI::International->new($session,'Asset_ProjectManager'); - my $db = $session->db; - my %properties; - tie %properties, 'Tie::IxHash'; - %properties = ( - projectDashboardTemplateId =>{ - fieldType=>"template", - defaultValue=>'ProjectManagerTMPL0001', - tab=>"display", - namespace=>"ProjectManager_dashboard", - hoverHelp=>$i18n->get('projectDashboardTemplate hoverhelp'), - label=>$i18n->get('projectDashboardTemplate label') - }, - projectDisplayTemplateId => { - fieldType=>"template", - defaultValue=>'ProjectManagerTMPL0002', - tab=>"display", - namespace=>"ProjectManager_project", - hoverHelp=>$i18n->get('projectDisplayTemplate hoverhelp'), - label=>$i18n->get('projectDisplayTemplate label') - }, - ganttChartTemplateId => { - fieldType=>"template", - defaultValue=>'ProjectManagerTMPL0003', - tab=>"display", - namespace=>"ProjectManager_gantt", - hoverHelp=>$i18n->get('ganttChartTemplate hoverhelp'), - label=>$i18n->get('ganttChartTemplate label') - }, - editTaskTemplateId =>{ - fieldType=>"template", - defaultValue=>'ProjectManagerTMPL0004', - tab=>"display", - namespace=>"ProjectManager_editTask", - hoverHelp=>$i18n->get('editTaskTemplate hoverhelp'), - label=>$i18n->get('editTaskTemplate label') - }, - resourcePopupTemplateId =>{ - fieldType=>"template", - defaultValue=>'ProjectManagerTMPL0005', - tab=>"display", - namespace=>"ProjectManager_resourcePopup", - hoverHelp=>$i18n->get('resourcePopupTemplate hoverhelp'), - label=>$i18n->get('resourcePopupTemplate label') - }, - resourceListTemplateId =>{ - fieldType=>"template", - defaultValue=>'ProjectManagerTMPL0006', - tab=>"display", - namespace=>"ProjectManager_resourceList", - hoverHelp=>$i18n->get('resourceListTemplate hoverhelp'), - label=>$i18n->get('resourceListTemplate label') - }, - groupToAdd => { - fieldType=>"group", - defaultValue=>3, - tab=>"security", - hoverHelp=>$i18n->get('groupToAdd hoverhelp'), - label=>$i18n->get('groupToAdd label') - } - ); - push(@{$definition}, { - assetName=>$i18n->get('assetName'), - icon=>'projManagement.gif', - autoGenerateForms=>1, - tableName=>'PM_wobject', - className=>'WebGUI::Asset::Wobject::ProjectManager', - properties=>\%properties - }); - return $class->SUPER::definition($session, $definition); -} - - #------------------------------------------------------------------- #API method called by Time Tracker to return the instance of the PM wobject which this project blongs @@ -532,7 +508,7 @@ sub getProjectInstance { return undef unless $projectId; my ($assetId) = $db->quickArray("select assetId from PM_project where projectId=?",[$projectId]); if($assetId) { - return WebGUI::Asset->newByDynamicClass($session,$assetId); + return WebGUI::Asset->newById($session,$assetId); } return undef; } @@ -612,20 +588,20 @@ sub i18n { =cut -sub prepareView { +override prepareView => sub { my $self = shift; - $self->SUPER::prepareView(); - my $template = WebGUI::Asset::Template->new($self->session, $self->get("projectDashboardTemplateId")); + super(); + my $template = WebGUI::Asset::Template->newById($self->session, $self->projectDashboardTemplateId); if (!$template) { WebGUI::Error::ObjectNotFound::Template->throw( error => qq{Template not found}, - templateId => $self->get("projectDashboardTemplateId"), + templateId => $self->projectDashboardTemplateId, assetId => $self->getId, ); } $template->prepare($self->getMetaDataAsTemplateVariables); $self->{_viewTemplate} = $template; -} +}; #------------------------------------------------------------------- @@ -647,19 +623,6 @@ sub processErrors { } -#------------------------------------------------------------------- - -=head2 purge - -=cut - -sub purge { - my $self = shift; - #purge your wobject-specific data here. This does not include fields - # you create for your NewWobject asset/wobject table. - return $self->SUPER::purge; -} - #------------------------------------------------------------------- =head2 setSessionVars @@ -691,7 +654,7 @@ sub setSessionVars { sub updateProjectTask { my $self = shift; my $db = $self->session->db; - my $eh = $self->session->errorHandler; + my $log = $self->session->log; my $taskId = $_[0]; my $projectId = $_[1]; @@ -762,9 +725,9 @@ sub view { my ($session,$privilege,$form,$db,$datetime,$i18n,$user) = $self->setSessionVars; my $config = $session->config; - my $eh = $session->errorHandler; + my $log = $session->log; - $var->{'extras'} = $config->get("extrasURL")."/wobject/ProjectManager"; + $var->{'extras'} = $session->url->make_urlmap_work($config->get("extrasURL"))."/wobject/ProjectManager"; $var->{'project.create'} = $self->getUrl("func=editProject;projectId=new"); $var->{'project.create.label'} = $i18n->get("project new label"); @@ -785,7 +748,7 @@ sub view { #Project Data my @projects = (); - my $sth = $db->read("select * from PM_project where assetId=".$db->quote($self->get("assetId"))); + my $sth = $db->read("select * from PM_project where assetId=".$db->quote($self->assetId)); while (my $project = $sth->hashRef) { my $hash = {}; my $projectId = $project->{projectId}; @@ -798,8 +761,8 @@ sub view { $hash->{'project.description.data'} = $project->{description}; $hash->{'project.startDate.data'} = $project->{startDate}?$datetime->epochToSet($project->{startDate}):$i18n->get("N_A"); $hash->{'project.endDate.data'} = $project->{endDate}?$datetime->epochToSet($project->{endDate}):$i18n->get("N_A"); - $hash->{'project.cost.data.int'} = WebGUI::Utility::commify(int($project->{targetBudget})); - $hash->{'project.cost.data.float'} = WebGUI::Utility::commify($project->{targetBudget}); + $hash->{'project.cost.data.int'} = Number::Format::format_number($project->{targetBudget}, 0); + $hash->{'project.cost.data.float'} = Number::Format::format_number($project->{targetBudget}); $hash->{'project.complete.data.int'} = int($project->{percentComplete}); $hash->{'project.complete.data.int'} = 100 if($hash->{'project.complete.data.int'} > 100); $hash->{'project.complete.data.float'} = sprintf("%2.2f",$project->{percentComplete}); @@ -875,18 +838,18 @@ sub www_deleteTask { #Reorder dependants and tasks my $tasks = $db->buildArrayRefOfHashRefs("select * from PM_task where projectId=? order by sequenceNumber",[$projectId]); my $taskLen = scalar(@{$tasks}); - #$eh->warn("Task Length = $taskLen"); + #$log->warn("Task Length = $taskLen"); foreach my $tsk (@{$tasks}) { my $seqNum = $tsk->{sequenceNumber}; next unless ($seqNum >= $taskRank); - #$eh->warn("Fixing task $seqNum"); + #$log->warn("Fixing task $seqNum"); my $dependant = $tsk->{dependants}; - #$eh->warn("Dependant is $dependant"); + #$log->warn("Dependant is $dependant"); #Only decrement the dependant if it's greater than the rank point of the deleted task if($dependant >= $taskRank){ $dependant--; } - #$eh->warn("New dependant is $dependant"); + #$log->warn("New dependant is $dependant"); $db->write("update PM_task set dependants=? where taskId=?",[$dependant,$tsk->{taskId}]); } $self->reorderCollateral("PM_task","taskId","projectId",$projectId); @@ -907,7 +870,7 @@ sub www_drawGanttChart { my ($session,$privilege,$form,$db,$dt,$i18n,$user) = $self->setSessionVars; my $config = $session->config; my $style = $session->style; - my $eh = $session->errorHandler; + my $log = $session->log; #Set up some the task data my $projectId = $_[0]; @@ -927,7 +890,7 @@ sub www_drawGanttChart { my ($dunits,$hoursPerDay) = $db->quickArray("select durationUnits,hoursPerDay from PM_project where projectId=".$db->quote($projectId)); - $var->{'extras'} = $config->get("extrasURL")."/wobject/ProjectManager"; + $var->{'extras'} = $session->url->make_urlmap_work($config->get("extrasURL"))."/wobject/ProjectManager"; #Initialize display settings my $projectDisplay = "weeks"; @@ -944,7 +907,7 @@ sub www_drawGanttChart { ($startMonth) = $db->quickArray("select min(startDate) from PM_task where projectId=".$db->quote($projectId)); ($endMonth) = $db->quickArray("select max(endDate) from PM_task where projectId=".$db->quote($projectId)); - #$eh->warn("Interval is: ".$dt->getDaysInInterval($startMonth,$endMonth)); + #$log->warn("Interval is: ".$dt->getDaysInInterval($startMonth,$endMonth)); if($dt->getDaysInInterval($startMonth,$endMonth) < 60) { $endMonth = $dt->addToDate($startMonth,0,3); } @@ -953,8 +916,8 @@ sub www_drawGanttChart { $endMonth = $dt->addToDate($startMonth,0,3); } - #$eh->warn($dt->epochToSet($startMonth)); - #$eh->warn($dt->epochToSet($endMonth)); + #$log->warn($dt->epochToSet($startMonth)); + #$log->warn($dt->epochToSet($endMonth)); #Build the loops of weeks and days my @monthsLoop = (); my @daysLoop = (); @@ -975,8 +938,8 @@ sub www_drawGanttChart { $i18n->get("friday label"), $i18n->get("saturday label"), ); - #$eh->warn($dt->epochToSet($sundayOfFirstWeek)); - #$eh->warn($dt->epochToSet($endMonth)); + #$log->warn($dt->epochToSet($sundayOfFirstWeek)); + #$log->warn($dt->epochToSet($endMonth)); my $datecounter = $startMonth; my $counter = 0; while($datecounter <= $endMonth || $counter++ == 1000) { @@ -988,7 +951,7 @@ sub www_drawGanttChart { foreach (@days) { push(@daysLoop,{'day.number' => $_ }); } - #$eh->warn($dt->epochToSet($datecounter)); + #$log->warn($dt->epochToSet($datecounter)); $datecounter = $dt->addToDateTime($datecounter,0,0,7); } @@ -1080,7 +1043,7 @@ sub www_drawGanttChart { } #Adjust top for MSIE - my $isMSIE = ($session->env->get("HTTP_USER_AGENT") =~ /msie/i); + my $isMSIE = $session->request->browser->ie; my $divTop = $isMSIE ? 45 : 45; #Start at 45 px and add 20px as the start of the new task #Set the propert mutiplier @@ -1089,15 +1052,15 @@ sub www_drawGanttChart { my $daysFromStart = $dt->getDaysInInterval($startMonth,$startDate); #Add day part of predecessor if necessary - #$eh->warn("Task $seq is currently $daysFromStart days from the first day on ".$dt->epochToHuman($startDate)); + #$log->warn("Task $seq is currently $daysFromStart days from the first day on ".$dt->epochToHuman($startDate)); my $daysLeft = $daysFromStart; #Only adjust for predecessor if the start date of the task falls on the same day as it's predecessors end date if($startDate eq $predEndDate) { $daysLeft += $predDayPart; - #$eh->warn("Adjusting this by $predDayPart days"); + #$log->warn("Adjusting this by $predDayPart days"); } $hash->{'task.div.left'} = int(($daysLeft * $pixelSize)); #Each day is 23 pixels so calculate the days and round - #$eh->warn("Starts at: $daysLeft * $pixelSize :".$hash->{'task.div.left'}); + #$log->warn("Starts at: $daysLeft * $pixelSize :".$hash->{'task.div.left'}); # Buggo. Refactor. $hash->{'task.isUntimed'} = ($task->{taskType} ne 'timed'); @@ -1111,7 +1074,7 @@ sub www_drawGanttChart { my $rduration = $task->{duration}; #Adjust duration of days to only include the part of the day used - #$eh->warn("day part is being set to: $duration - ".floor($duration)." : ".($duration-floor($duration))); + #$log->warn("day part is being set to: $duration - ".floor($duration)." : ".($duration-floor($duration))); $duration = $duration - floor($duration); $hash->{'task.div.percentComplete'} = $task->{percentComplete} || 0; @@ -1141,7 +1104,7 @@ sub www_drawGanttChart { my $scrollWidth = (1- (560 / $projVar->{'project.table.width'})) * 100; $var->{'project.scroll.percentWidth'} = $projVar->{'project.scroll.percentWidth'} = sprintf("%2.2f",$scrollWidth); - return $self->processTemplate($var,$self->getValue("ganttChartTemplateId")); + return $self->processTemplate($var,$self->ganttChartTemplateId); } #------------------------------------------------------------------- @@ -1164,83 +1127,78 @@ sub www_editProject { my $addEditText = ($projectId eq "new")?$i18n->get("create project"):$i18n->get("edit project"); #Build Form - my $f = WebGUI::HTMLForm->new($self->session,-action=>$self->getUrl, -extras=>q|onsubmit="return checkform(this);"|); - $f->hidden( - -name=>"func", - -value=>"editProjectSave" + my $f = WebGUI::FormBuilder->new($self->session, + action=>$self->getUrl, + extras=>q|onsubmit="return checkform(this);"| + ); + $f->addField( "hidden", + name=>"func", + value=>"editProjectSave" ); - $f->hidden( - -name=>"projectId", - -value=>$projectId + $f->addField( "hidden", + name=>"projectId", + value=>$projectId ); - $f->readOnly( - -label=>$i18n->get("project id"), - -hoverHelp => $i18n->get('project name hoverhelp'), - -value=>$projectId + $f->addField( "readOnly", + label=>$i18n->get("project id"), + hoverHelp => $i18n->get('project name hoverhelp'), + value=>$projectId ); - $f->text( - -name => "name", - -value => $form->get("name") || $project->{name}, - -hoverHelp => $i18n->get('project name hoverhelp'), - -label => $i18n->get('project name label') + $f->addField( "text", + name => "name", + value => $form->get("name") || $project->{name}, + hoverHelp => $i18n->get('project name hoverhelp'), + label => $i18n->get('project name label') ); - $f->HTMLArea( - -name => "description", - -value => $form->get("description") || $project->{description}, - -hoverHelp => $i18n->get('project description hoverhelp'), - -label => $i18n->get('project description label') + $f->addField( "HTMLArea", + name => "description", + value => $form->get("description") || $project->{description}, + hoverHelp => $i18n->get('project description hoverhelp'), + label => $i18n->get('project description label') ); - $f->group( - -name=> "projectManager", - -value=> $form->get("projectManager") || $project->{projectManager} || $self->get("groupToAdd"), - -hoverHelp=> $i18n->get('project manager hoverhelp'), - -label => $i18n->get('project manager label') + $f->addField( "group", + name=> "projectManager", + value=> $form->get("projectManager") || $project->{projectManager} || $self->groupToAdd, + hoverHelp=> $i18n->get('project manager hoverhelp'), + label => $i18n->get('project manager label') ); - $f->group( - -name=> "projectObserver", - -value=> $form->get("projectObserver") || $project->{projectObserver} || '7', - -hoverHelp=> $i18n->get('project observer hoverhelp'), - -label => $i18n->get('project observer label') + $f->addField( "group", + name=> "projectObserver", + value=> $form->get("projectObserver") || $project->{projectObserver} || '7', + hoverHelp=> $i18n->get('project observer hoverhelp'), + label => $i18n->get('project observer label') ); my $dunitValue = $form->get("durationUnits") || $project->{durationUnits} || "hours"; - $f->selectBox( - -name=>"durationUnits", - -value=> $dunitValue, - -options=>$self->_getDurationUnitHash, - -hoverHelp => $i18n->get('duration units hoverhelp'), - -label => $i18n->get('duration units label'), - -extras=> q|onchange="if(this.value == 'hours'){ document.getElementById('hoursper').style.display='' } else { document.getElementById('hoursper').style.display='none' }"| + $f->addField( "selectBox", + name=>"durationUnits", + value=> $dunitValue, + options=>$self->_getDurationUnitHash, + hoverHelp => $i18n->get('duration units hoverhelp'), + label => $i18n->get('duration units label'), + extras=> q|onchange="if(this.value == 'hours'){ document.getElementById('hoursper').style.display='' } else { document.getElementById('hoursper').style.display='none' }"| ); - my $hpdLabel = $i18n->get('hours per day label'); - my $hpdHoverHelp = $i18n->get('hours per day hoverhelp'); - my $hpdValue = $form->get("hoursPerDay") || $project->{hoursPerDay} || "8.0"; - my $hpdStyle = ($dunitValue eq "days"?"display:none":""); - my $html = qq| - - -
    $hpdHoverHelp
    - - - - - - |; - $f->raw($html); - - $f->float ( - -name=>"targetBudget", - -value=> $form->get("targetBudget") || $project->{targetBudget} || "0.00", - -hoverHelp => $i18n->get('target budget hoverhelp'), - -label=> $i18n->get('target budget label') + $f->addField( "text", + name => 'hoursPerDay', + label => $i18n->get('hours per day label'), + hoverHelp => $i18n->get('hours per day hoverhelp'), + value => $form->get("hoursPerDay") || $project->{hoursPerDay} || "8.0", + extras => ($dunitValue eq "days"? q{ style="display:none"} :""), + ); + + $f->addField( "float", + name=>"targetBudget", + value=> $form->get("targetBudget") || $project->{targetBudget} || "0.00", + hoverHelp => $i18n->get('target budget hoverhelp'), + label=> $i18n->get('target budget label') ); - $f->submit( - -extras=>"name='subbutton'", - -value=>$addEditText + $f->addField( "submit", + extras=>"name='subbutton'", + value=>$addEditText ); my $jscript = qq| @@ -1258,8 +1216,8 @@ sub www_editProject { my $errors = $self->processErrors($_[0]); - my $output = $jscript."\n".$errors.$f->print; - return $self->getAdminConsole->render($output,$addEditText); + my $output = $jscript."\n".$errors.$f->toHtml; + return '

    ' . $addEditText . '

    ' . $output; } #------------------------------------------------------------------- @@ -1272,7 +1230,7 @@ sub www_editProjectSave { my $self = shift; #Set Method Helpers my ($session,$privilege,$form,$db,$dt,$i18n,$user) = $self->setSessionVars; - my $eh = $session->errorHandler; + my $log = $session->log; #Check Privileges return $privilege->insufficient unless $self->_userCanManageProjectList($user); @@ -1517,8 +1475,8 @@ sub www_editTask { }); $var->{'form.footer'} = WebGUI::Form::formFooter($session); - $var->{'extras'} = $config->get("extrasURL"); - $var->{'assetExtras'} = $config->get("extrasURL").'/wobject/ProjectManager'; + $var->{'extras'} = $session->url->make_urlmap_work($config->get("extrasURL")); + $var->{'assetExtras'} = $session->url->make_urlmap_work($config->get("extrasURL")).'/wobject/ProjectManager'; $var->{'task_name_label'} = $i18n->get('task name label'); $var->{'task_start_label'} = $i18n->get('task start label'); @@ -1530,7 +1488,7 @@ sub www_editTask { $var->{'task_resource_label'} = $i18n->get('task resource label'); $var->{'task_save_label'} = $i18n->get('task save label'); - return $self->processTemplate($var,$self->getValue("editTaskTemplateId")); + return $self->processTemplate($var,$self->editTaskTemplateId); } #------------------------------------------------------------------- @@ -1545,7 +1503,7 @@ sub www_editTaskSave { #Set Method Helpers my ($session,$privilege,$form,$db,$dt,$i18n,$user) = $self->setSessionVars; my $config = $session->config; - my $eh = $session->errorHandler; + my $log = $session->log; my $projectId = $form->get("projectId"); my $project = $db->quickHashRef("select * from PM_project where projectId=".$db->quote($projectId)); @@ -1596,26 +1554,26 @@ sub www_editTaskSave { #Reorder tasks if task is inserted my $insertAt = $form->get("insertAt"); if($insertAt) { - #$eh->warn("Inserting at $insertAt"); + #$log->warn("Inserting at $insertAt"); my $tasks = $db->buildArrayRefOfHashRefs("select * from PM_task where projectId=? order by sequenceNumber",[$projectId]); my $taskLen = scalar(@{$tasks}); - #$eh->warn("Task Length = $taskLen"); + #$log->warn("Task Length = $taskLen"); foreach my $task (@{$tasks}) { my $seqNum = $task->{sequenceNumber}; next unless ($seqNum >= $insertAt); - #$eh->warn("Fixing task $seqNum"); + #$log->warn("Fixing task $seqNum"); my $newSeq = $seqNum + 1; if($seqNum eq $taskLen) { $newSeq = $insertAt; } - #$eh->warn("New seqNum is $newSeq"); + #$log->warn("New seqNum is $newSeq"); my $dependant = $task->{dependants}; - #$eh->warn("Dependant is $dependant"); + #$log->warn("Dependant is $dependant"); #Only increment the dependant if it's greater than or equal to the insertAt point if($dependant >= $insertAt){ $dependant++; } - #$eh->warn("New dependant is $dependant"); + #$log->warn("New dependant is $dependant"); $db->write("update PM_task set sequenceNumber=?, dependants=? where taskId=?",[$newSeq,$dependant,$task->{taskId}]); } $self->reorderCollateral("PM_task","taskId","projectId",$projectId); @@ -1742,90 +1700,47 @@ sub www_viewProject { my $user = $session->user; my $config = $session->config; my $style = $session->style; - my $eh = $session->errorHandler; + my $log = $session->log; my $projectId = shift || $form->get("projectId"); #Check Privileges return $privilege->insufficient unless $self->_userCanObserveProject($user, $projectId); #Set extras template variables - my $extras = $config->get("extrasURL"); - my $assetExtras = $config->get("extrasURL")."/wobject/ProjectManager"; + my $extras = $session->url->make_urlmap_work($config->get("extrasURL")); + my $assetExtras = $session->url->make_urlmap_work($config->get("extrasURL"))."/wobject/ProjectManager"; $var->{'extras' } = $assetExtras; $var->{'extras.base'} = $extras; #Set page styles - $style->setLink($assetExtras."/subModal.css", { - rel=>"stylesheet", - type=>"text/css", - } - ); - $style->setLink($assetExtras."/taskEdit.css", { - rel=>"stylesheet", - type=>"text/css", - } - ); - $style->setLink($assetExtras."/cMenu.css",{ - rel=>"stylesheet", - type=>"text/css", - } - ); + $style->setCss($assetExtras."/subModal.css"); + $style->setCss($assetExtras."/taskEdit.css"); + $style->setCss($assetExtras."/cMenu.css"); #Set page scripts - $style->setScript($assetExtras."/cMenu.js",{ - type=>"text/javascript", - } - ); + $style->setScript($assetExtras."/cMenu.js"); - $style->setScript($extras."/contextMenu/contextMenu.js",{ - type=>"text/javascript" - } - ); + $style->setScript($extras."/contextMenu/contextMenu.js"); - $self->session->style->setScript( - $self->session->url->extras('yui/build/yahoo/yahoo-min.js'), - { type=>'text/javascript' } - ); + $self->session->style->setScript( $self->session->url->extras('yui/build/yahoo/yahoo-min.js')); - $self->session->style->setScript( - $self->session->url->extras('yui/build/event/event-min.js'), - { type=>'text/javascript' } - ); + $self->session->style->setScript( $self->session->url->extras('yui/build/event/event-min.js')); - $self->session->style->setScript( - $self->session->url->extras('yui/build/dom/dom-min.js'), - { type=>'text/javascript' } - ); + $self->session->style->setScript( $self->session->url->extras('yui/build/dom/dom-min.js')); - $self->session->style->setScript( - $self->session->url->extras('yui/build/connection/connection-min.js'), - { type=>'text/javascript' } - ); + $self->session->style->setScript( $self->session->url->extras('yui/build/connection/connection-min.js')); - $self->session->style->setScript( - $self->session->url->extras('yui/build/container/container-min.js'), - { type=>'text/javascript' } - ); - - $style->setScript($assetExtras."/modal.js",{ - type=>"text/javascript" - } - ); + $self->session->style->setScript( $self->session->url->extras('yui/build/container/container-min.js')); + $style->setScript($assetExtras."/modal.js"); #$self->session->style->setScript( # $self->session->url->extras('yui-webgui/build/datepicker/datepicker.js'), # { type=>'text/javascript' } #); - $style->setScript($assetExtras."/projectDisplay.js",{ - type=>"text/javascript" - } - ); - $style->setScript($assetExtras."/taskEdit.js",{ - type=>"text/javascript" - } - ); + $style->setScript($assetExtras."/projectDisplay.js"); + $style->setScript($assetExtras."/taskEdit.js"); #Get Project Data my $sql = q|select * from PM_project where projectId=?|; @@ -2018,8 +1933,8 @@ sub www_viewProject { $var->{'task.back.label'} = $i18n->get("task back label"); $var->{'task.back.url'} = $self->getUrl; - return $self->processStyle($self->processTemplate($var,$self->getValue("projectDisplayTemplateId"))); + return $self->processStyle($self->processTemplate($var,$self->projectDisplayTemplateId)); } - +__PACKAGE__->meta->make_immutable; 1; diff --git a/lib/WebGUI/Asset/Wobject/SQLReport.pm b/lib/WebGUI/Asset/Wobject/SQLReport.pm index 72643c1c9..b04ead36c 100644 --- a/lib/WebGUI/Asset/Wobject/SQLReport.pm +++ b/lib/WebGUI/Asset/Wobject/SQLReport.pm @@ -1,7 +1,7 @@ package WebGUI::Asset::Wobject::SQLReport; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -16,208 +16,280 @@ use WebGUI::International; use WebGUI::Macro; use WebGUI::Paginator; use WebGUI::SQL; -use WebGUI::Utility; use WebGUI::Asset::Wobject; -use WebGUI::Cache; use WebGUI::Text qw(:csv); +use Tie::IxHash; -our @ISA = qw(WebGUI::Asset::Wobject); - - - -#------------------------------------------------------------------- -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift; - my $i18n = WebGUI::International->new($session,"Asset_SQLReport"); - my %properties; - tie %properties, 'Tie::IxHash'; - %properties = ( - templateId =>{ - fieldType=>"template", - defaultValue=>'PBtmpl0000000000000059', - label=>$i18n->get(72), - }, - cacheTimeout=>{ - fieldType=>"interval", - defaultValue=>0, - label=>$i18n->get('cache timeout'), - }, - paginateAfter=>{ - fieldType=>"integer", - defaultValue=>50, - label=>$i18n->get(14), - }, - dbQuery1=>{ - fieldType=>"codearea", - defaultValue=>undef, - label=>$i18n->get(4) . ' 1', - }, - prequeryStatements1=>{ - fieldType=>"codearea", - defaultValue=>undef, - label => $i18n->get('Prequery statements') . ' 1', - }, - preprocessMacros1=>{ - fieldType=>"yesNo", - defaultValue=>0, - label=>$i18n->get(15) . ' 1', - }, - placeholderParams1=>{ - fieldType=>"textarea", - defaultValue=>undef, - label=>$i18n->get('Placeholder Parameters') . ' 1', - }, - databaseLinkId1=>{ - fieldType=>"databaseLink", - defaultValue=>0, - label=>$i18n->get("1075", 'WebGUI').' 1', - }, - dbQuery2=>{ - fieldType=>"codearea", - defaultValue=>undef, - label=>$i18n->get(4) . ' 2', - }, - prequeryStatements2=>{ - fieldType=>"codearea", - defaultValue=>undef, - label => $i18n->get('Prequery statements') . ' 2', - }, - preprocessMacros2=>{ - fieldType=>"yesNo", - defaultValue=>0, - label=>$i18n->get(15) . ' 2', - }, - placeholderParams2=>{ - fieldType=>"textarea", - defaultValue=>undef, - label=>$i18n->get('Placeholder Parameters') . ' 2', - }, - databaseLinkId2=>{ - fieldType=>"databaseLink", - defaultValue=>0, - label=>$i18n->get("1075", 'WebGUI').' 2', - }, - dbQuery3=>{ - fieldType=>"codearea", - defaultValue=>undef, - label=>$i18n->get(4) . ' 3', - }, - prequeryStatements3=>{ - fieldType=>"codearea", - defaultValue=>undef, - label => $i18n->get('Prequery statements') . ' 3', - }, - preprocessMacros3=>{ - fieldType=>"yesNo", - defaultValue=>0, - label=>$i18n->get(15) . ' 3', - }, - placeholderParams3=>{ - fieldType=>"textarea", - defaultValue=>undef, - label=>$i18n->get('Placeholder Parameters') . ' 3', - }, - databaseLinkId3=>{ - fieldType=>"databaseLink", - defaultValue=>0, - label=>$i18n->get("1075", 'WebGUI').' 3', - }, - dbQuery4=>{ - fieldType=>"codearea", - defaultValue=>undef, - label=>$i18n->get(4) . ' 4', - }, - prequeryStatements4=>{ - fieldType=>"codearea", - defaultValue=>undef, - label => $i18n->get('Prequery statements') . ' 4', - }, - preprocessMacros4=>{ - fieldType=>"yesNo", - defaultValue=>0, - label=>$i18n->get(15) . ' 4', - }, - placeholderParams4=>{ - fieldType=>"textarea", - defaultValue=>undef, - label=>$i18n->get('Placeholder Parameters') . ' 4', - }, - databaseLinkId4=>{ - fieldType=>"databaseLink", - defaultValue=>0, - label=>$i18n->get("1075", 'WebGUI').' 4', - }, - dbQuery5=>{ - fieldType=>"codearea", - defaultValue=>undef, - label=>$i18n->get(4) . ' 5', - }, - prequeryStatements5=>{ - fieldType=>"codearea", - defaultValue=>undef, - label => $i18n->get('Prequery statements') . ' 5', - }, - preprocessMacros5=>{ - fieldType=>"yesNo", - defaultValue=>0, - label=>$i18n->get(15) . '5', - }, - placeholderParams5=>{ - fieldType=>"textarea", - defaultValue=>undef, - label=>$i18n->get('Placeholder Parameters') . ' 5', - }, - databaseLinkId5=>{ - fieldType=>"databaseLink", - defaultValue=>0, - label=>$i18n->get("1075", 'WebGUI').' 5', - }, - debugMode=>{ - fieldType=>"yesNo", - defaultValue=>0, - label=>$i18n->get(16), - }, +use Moose; +use WebGUI::Definition::Asset; +extends 'WebGUI::Asset::Wobject'; +define assetName => ['assetName', 'Asset_SQLReport']; +define icon => 'sqlReport.gif'; +define tableName => 'SQLReport'; +property templateId => ( + fieldType => "template", + default => 'PBtmpl0000000000000059', + label => [72, 'Asset_SQLReport'], + hoverHelp => ['72 description', 'Asset_SQLReport'], + namespace => "SQLReport" + ); +property cacheTimeout => ( + fieldType => "interval", + default => 0, + label => ['cache timeout', 'Asset_SQLReport'], + hoverHelp => ['cache timeout description', 'Asset_SQLReport'], + uiLevel => 8, + ); +property paginateAfter => ( + fieldType => "integer", + default => 50, + label => ['14', 'Asset_SQLReport'], + hoverHelp => ['14 description', 'Asset_SQLReport'], + ); +property dbQuery1 => ( + fieldType => "codearea", + default => undef, + label => [4, 'Asset_SQLReport', 1], + hoverHelp => ['4 description', 'Asset_RichEdit'], + rowClass => 'query1', + ); +property prequeryStatements1 => ( + fieldType => "codearea", + default => undef, + label => ['Prequery statements %s', 'Asset_SQLReport', 1], + rowClass => 'query1', + ); +property preprocessMacros1 => ( + fieldType => "yesNo", + default => 0, + label => ['Preprocess macros on query %s?', 'Asset_SQLReport', 1], + hoverHelp => ['15 description', 'Asset_RichEdit'], + rowClass => 'query1', + ); +property placeholderParams1 => ( + fieldType => "textarea", + default => undef, + label => ['Placeholder Parameters %s', 'Asset_SQLReport', 1], + hoverHelp => ['Placeholder Parameters description', 'Asset_RichEdit'], + rowClass => 'query1', + ); +property databaseLinkId1 => ( + fieldType => "databaseLink", + default => 0, + label => ['Database Link %s', 'Asset_SQLReport', 1], + rowClass => 'query1', + ); +property dbQuery2 => ( + fieldType => "codearea", + default => undef, + label => [4, 'Asset_SQLReport', 2], + hoverHelp => ['4 description', 'Asset_RichEdit'], + rowClass => 'query2', + ); +property prequeryStatements2 => ( + fieldType => "codearea", + default => undef, + label => ['Prequery statements %s', 'Asset_SQLReport', 2], + hoverHelp => ['15 description', 'Asset_RichEdit'], + rowClass => 'query2', + ); +property preprocessMacros2 => ( + fieldType => "yesNo", + default => 0, + label => ['Preprocess macros on query %s?', 'Asset_SQLReport', 2], + hoverHelp => ['15 description', 'Asset_RichEdit'], + rowClass => 'query2', + ); +property placeholderParams2 => ( + fieldType => "textarea", + default => undef, + label => ['Placeholder Parameters %s', 'Asset_SQLReport', 2], + hoverHelp => ['Placeholder Parameters description', 'Asset_RichEdit'], + rowClass => 'query2', + ); +property databaseLinkId2 => ( + fieldType => "databaseLink", + default => 0, + label => ['Database Link %s', 'Asset_SQLReport', 2], + rowClass => 'query2', + ); +property dbQuery3 => ( + fieldType => "codearea", + default => undef, + label => [4, 'Asset_SQLReport', 3], + hoverHelp => ['4 description', 'Asset_RichEdit'], + rowClass => 'query3', + ); +property prequeryStatements3 => ( + fieldType => "codearea", + default => undef, + label => ['Prequery statements %s', 'Asset_SQLReport', 3], + hoverHelp => ['15 description', 'Asset_RichEdit'], + rowClass => 'query3', + ); +property preprocessMacros3 => ( + fieldType => "yesNo", + default => 0, + label => ['Preprocess macros on query %s?', 'Asset_SQLReport', 3], + hoverHelp => ['15 description', 'Asset_RichEdit'], + rowClass => 'query3', + ); +property placeholderParams3 => ( + fieldType => "textarea", + default => undef, + label => ['Placeholder Parameters %s', 'Asset_SQLReport', 3], + hoverHelp => ['Placeholder Parameters description', 'Asset_RichEdit'], + rowClass => 'query3', + ); +property databaseLinkId3 => ( + fieldType => "databaseLink", + default => 0, + label => ['Database Link %s', 'Asset_SQLReport', 3], + rowClass => 'query3', + ); +property dbQuery4 => ( + fieldType => "codearea", + default => undef, + label => [4, 'Asset_SQLReport', 4], + hoverHelp => ['4 description', 'Asset_RichEdit'], + rowClass => 'query4', + ); +property prequeryStatements4 => ( + fieldType => "codearea", + default => undef, + label => ['Prequery statements %s', 'Asset_SQLReport', 4], + hoverHelp => ['15 description', 'Asset_RichEdit'], + rowClass => 'query4', + ); +property preprocessMacros4 => ( + fieldType => "yesNo", + default => 0, + label => ['Preprocess macros on query %s?', 'Asset_SQLReport', 4], + hoverHelp => ['15 description', 'Asset_RichEdit'], + rowClass => 'query4', + ); +property placeholderParams4 => ( + fieldType => "textarea", + default => undef, + label => ['Placeholder Parameters %s', 'Asset_SQLReport', 4], + hoverHelp => ['Placeholder Parameters description', 'Asset_RichEdit'], + rowClass => 'query4', + ); +property databaseLinkId4 => ( + fieldType => "databaseLink", + default => 0, + label => ['Database Link %s', 'Asset_SQLReport', 4], + rowClass => 'query4', + ); +property dbQuery5 => ( + fieldType => "codearea", + default => undef, + label => [4, 'Asset_SQLReport', 5], + hoverHelp => ['4 description', 'Asset_RichEdit'], + rowClass => 'query5', + ); +property prequeryStatements5 => ( + fieldType => "codearea", + default => undef, + label => ['Prequery statements %s', 'Asset_SQLReport', 5], + hoverHelp => ['15 description', 'Asset_RichEdit'], + rowClass => 'query5', + ); +property preprocessMacros5 => ( + fieldType => "yesNo", + default => 0, + label => ['Preprocess macros on query %s?', 'Asset_SQLReport', 5], + hoverHelp => ['15 description', 'Asset_RichEdit'], + rowClass => 'query5', + ); +property placeholderParams5 => ( + fieldType => "textarea", + default => undef, + label => ['Placeholder Parameters %s', 'Asset_SQLReport', 5], + hoverHelp => ['Placeholder Parameters description', 'Asset_RichEdit'], + rowClass => 'query5', + ); +property databaseLinkId5 => ( + fieldType => "databaseLink", + default => 0, + label => ['Database Link %s', 'Asset_SQLReport', 5], + rowClass => 'query5', + ); +property debugMode => ( + fieldType => "yesNo", + default => 0, + label => [16, 'Asset_SQLReport'], + hoverHelp => ['16 description', 'Asset_SQLReport'], + ); # download - downloadType=>{ - fieldType=>"text", - defaultValue=>"none", - label=>$i18n->get("download type"), - }, - downloadFilename=>{ - fieldType=>"text", - defaultValue=>"", - label=>$i18n->get("download filename"), - }, - downloadTemplateId=>{ - fieldType=>"template", - defaultValue=>'SQLReportDownload00001', - label=>$i18n->get("download template"), - }, - downloadMimeType=>{ - fieldType=>"text", - defaultValue=>"text/html", - label=>$i18n->get("download mimetype"), - }, - downloadUserGroup=>{ - fieldType => "group", - defaultValue => "7", - label => $i18n->get("download usergroup"), - }, - ); - push(@{$definition}, { - assetName=>$i18n->get('assetName'), - uiLevel => 5, - icon=>'sqlReport.gif', - tableName=>'SQLReport', - className=>'WebGUI::Asset::Wobject::SQLReport', - properties => \%properties, - autoGenerateForms => 0, - }); - return $class->SUPER::definition($session, $definition); +property downloadType => ( + fieldType => "text", + default => "none", + label => ["download type", 'Asset_SQLReport'], + hoverHelp => ["download type description", 'Asset_RichEdit'], + vertical => 1, + options => \&_downloadType_options, + extras => "onclick='changeDownloadType(this)'" + ); +sub _downloadType_options { + my $self = shift; + tie my %downloadTypes, 'Tie::IxHash', + "none" => "No Download", + "csv" => "CSV", + "template" => "Template", + ; + return \%downloadTypes; } +property downloadFilename => ( + fieldType => "text", + default => "", + label => ["download filename", 'Asset_SQLReport'], + hoverHelp => ["download filename description", 'Asset_SQLReport'], + ); +property downloadTemplateId => ( + fieldType => "template", + default => 'SQLReportDownload00001', + label => ["download template", 'Asset_SQLReport'], + hoverHelp => ["download template description", 'Asset_SQLReport'], + namespace => "SQLReport/Download", + ); +property downloadMimeType => ( + fieldType => "text", + default => "text/html", + label => ["download mimetype", 'Asset_SQLReport'], + hoverHelp => ["download mimetype description", 'Asset_SQLReport'], + options => \&_downloadMimeType_options, + ); +sub _downloadMimeType_options { + my $self = shift; + my %downloadMimeType; + tie %downloadMimeType, 'Tie::IxHash', + "application/octet-stream" => "application/octet-stream", + "application/xml" => "application/xml", + "application/csv" => "application/csv", + "text/html" => "text/html", + "text/plain" => "text/plain", + ; + return \%downloadMimeType; +} +property downloadUserGroup => ( + fieldType => "group", + builder => '_downloadUserGroup_default', + lazy => 1, + label => ["download usergroup", 'Asset_SQLReport'], + hoverHelp => ["download usergroup description", 'Asset_SQLReport'], + ); +sub _downloadUserGroup_default { + my $self = shift; + return $self->groupIdView; +} +has '+uiLevel' => ( + default => 5, +); + + + #------------------------------------------------------------------- @@ -230,7 +302,7 @@ touched. Default to using $self->get('cacheTimeout') seconds ago. sub getContentLastModified { my $self = shift; - return (time - $self->get("cacheTimeout")); + return (time - $self->cacheTimeout); } #------------------------------------------------------------------- @@ -241,193 +313,19 @@ Manually make the edit form due to javascript for adding more queries. =cut -sub getEditForm { - my $self = shift; - my $tabform = $self->SUPER::getEditForm(); - my $i18n = WebGUI::International->new($self->session,"Asset_SQLReport"); - $tabform->getTab("display")->template( - -value=>$self->getValue('templateId'), - -label=>$i18n->get(72), - -hoverHelp=>$i18n->get('72 description'), - -namespace=>"SQLReport" - ); - $tabform->getTab("properties")->yesNo( - -name=>"debugMode", - -label=>$i18n->get(16), - -hoverHelp=>$i18n->get('16 description'), - -value=>$self->getValue("debugMode") - ); - $tabform->getTab("display")->interval( - -name=>"cacheTimeout", - -label=>$i18n->get('cache timeout'), - -hoverHelp=>$i18n->get('cache timeout description'), - -uiLevel => 8, - -value=>$self->getValue("cacheTimeout") - ); - - - ### Download - # Download Type - my %downloadTypes; - tie %downloadTypes, 'Tie::IxHash', - "none" => $i18n->get("No Download"), - "csv" => $i18n->get("CSV"), - "template" => $i18n->get("Template"), - ; - - $tabform->getTab("properties")->radioList( - -name=>"downloadType", # ID is downloadType_formId - -label=>$i18n->get("download type"), - -hoverHelp=>$i18n->get("download type description"), - -vertical=>1, - -options=> \%downloadTypes, - -defaultValue=>"none", - -value=>$self->getValue("downloadType"), - -extras=> "onclick='changeDownloadType(this)'" - ); - - # Download Filename - $tabform->getTab("properties")->text( - -name=>"downloadFilename", # ID is downloadFilename_formId - -label=>$i18n->get("download filename"), - -hoverHelp=>$i18n->get("download filename description"), - -value=>$self->getValue("downloadFilename"), - ); - - # Download template (if necessary) - $tabform->getTab("properties")->template( - -name=>"downloadTemplateId", # ID is downloadTemplateId_formId - -label=>$i18n->get("download template"), - -hoverHelp=>$i18n->get("download template description"), - -value=>$self->getValue("downloadTemplateId"), - -namespace=>"SQLReport/Download", - ); - - # Download mimeType (if necessary) - my %downloadMimeType; - tie %downloadMimeType, 'Tie::IxHash', - "application/octet-stream" => "application/octet-stream", - "application/xml" => "application/xml", - "application/csv" => "application/csv", - "text/html" => "text/html", - "text/plain" => "text/plain", - ; +override getEditForm => sub { + my $self = shift; + my $session = $self->session; + my ( $style, $url ) = $session->quick( qw( style url ) ); - $tabform->getTab("properties")->selectBox( - -name=>"downloadMimeType", - -label=>$i18n->get("download mimetype"), - -hoverHelp=>$i18n->get("download mimetype description"), - -options=> \%downloadMimeType, - -value=>$self->getValue("downloadMimeType"), - -defaultValue=>"application/octet-stream", - ); - - # Download UserGroup - $tabform->getTab("security")->group( - -name=>"downloadUserGroup", - -label=>$i18n->get("download usergroup"), - -hoverHelp=>$i18n->get("download usergroup description"), - -value=>$self->getValue("downloadUserGroup"), - -defaultValue=>$self->getValue("groupIdView"), - ); - - # javascript - $self->session->style->setScript($self->session->url->extras("wobject/SQLReport/editFormDownload.js"), {type => 'text/javascript',}); - - ### /DOWNLOAD - - - # Add toggleQuery javascript - $tabform->getTab("properties")->raw(qq| - - |); + # Add javascript + $style->setScript( $url->extras("wobject/SQLReport/editFormDownload.js"), { type => 'text/javascript', } ); + $style->setScript( $url->extras("yui/build/yahoo-dom-event/yahoo-dom-event.js"), { type => 'text/javascript' } ); - for my $nr (1..5) { - # Set TR class for this query properties - $tabform->getTab("properties")->trClass("query".$nr); + # TODO: Add query toggling back - $tabform->getTab("properties")->readOnly( - -value=>"
    ", - -label=>join '', "", $i18n->get('4'), $nr,":", - ); - $tabform->getTab("properties")->yesNo( - -name=>"preprocessMacros".$nr, - -label=>$i18n->get(15), - -hoverHelp=>$i18n->get('15 description'), - -value=>$self->getValue("preprocessMacros".$nr) - ); - $tabform->getTab("properties")->textarea( - -name=>"placeholderParams".$nr, - -label=>$i18n->get('Placeholder Parameters'), - -hoverHelp=>$i18n->get('Placeholder Parameters description'), - -value=>$self->getValue("placeholderParams".$nr) - ); - $tabform->getTab("properties")->codearea( - -name => "prequeryStatements".$nr, - -label => $i18n->get('Prequery statements'), - -hoverHelp => $i18n->get('Prequery statements description'), - -syntax => "sql", - -value => $self->getValue("prequeryStatements".$nr), - ); - $tabform->getTab("properties")->codearea( - -name=>"dbQuery".$nr, - -label=>$i18n->get(4), - -hoverHelp=>$i18n->get('4 description'), - -syntax => "sql", - -value=>$self->getValue("dbQuery".$nr) - ); - $tabform->getTab("properties")->databaseLink( - -name=>"databaseLinkId".$nr, - -value=>$self->getValue("databaseLinkId".$nr) - ); - - # Add a "Add another query" button - if ($nr < 5 and ($self->get("dbQuery".($nr+1)) eq "" || ($self->get("dbQuery".($nr)) eq "" and $self->get("dbQuery".($nr+1)) ne ""))) { - $tabform->getTab("properties")->button( - -value=>$i18n->get('Add another query'), - -extras=>'onclick="toggleQuery(\''.($nr+1).'\'); this.style.display=\'none\';"', - -noWait=>1 - ); - } - - # Make empty query blocks invisible - if ($nr > 1 && ($self->get("dbQuery".$nr) eq "" || $self->get("dbQuery".($nr-1)) eq "")) { - $tabform->getTab("properties")->raw(qq| - - |); - } - - } - - # Undefine TR class - $tabform->getTab("properties")->trClass(); - - $tabform->getTab("display")->integer( - -name=>"paginateAfter", - -label=>$i18n->get(14), - -hoverHelp=>$i18n->get('14 description'), - -value=>$self->getValue("paginateAfter") - ); - - return $tabform; -} + return super(); +}; #------------------------------------------------------------------- @@ -443,7 +341,7 @@ sub download { my $self = shift; # Instead of going through some costly exercises... - return undef if ($self->getValue("downloadType") eq "none"); + return undef if ($self->downloadType eq "none"); # Initiate an empty debug loop $self->{_debug_loop} = [] ; @@ -452,7 +350,7 @@ sub download { $self->_storeQueries(); # If we're downloading CSV - if ($self->getValue("downloadType") eq "csv") { + if ($self->downloadType eq "csv") { my $data = $self->_processQuery(0,0); my $out = ""; @@ -472,9 +370,9 @@ sub download { return $out; } - elsif ($self->getValue("downloadType") eq "template") { + elsif ($self->downloadType eq "template") { my $data = $self->_processQuery(1,0); - my $output = $self->processTemplate($data,$self->get("downloadTemplateId")); + my $output = $self->processTemplate($data,$self->downloadTemplateId); WebGUI::Macro::process($self->session, \$output); return $output; } @@ -494,20 +392,20 @@ See WebGUI::Asset::prepareView() for details. =cut -sub prepareView { +override prepareView => sub { my $self = shift; - $self->SUPER::prepareView(); - my $template = WebGUI::Asset::Template->new($self->session, $self->get("templateId")); + super(); + my $template = WebGUI::Asset::Template->newById($self->session, $self->templateId); if (!$template) { WebGUI::Error::ObjectNotFound::Template->throw( error => qq{Template not found}, - templateId => $self->get("templateId"), + templateId => $self->templateId, assetId => $self->getId, ); } $template->prepare($self->getMetaDataAsTemplateVariables); $self->{_viewTemplate} = $template; -} +}; #------------------------------------------------------------------- @@ -518,11 +416,11 @@ See WebGUI::Asset::purgeCache() for details. =cut -sub purgeCache { +override purgeCache => sub { my $self = shift; - WebGUI::Cache->new($self->session,"view_".$self->getId)->delete; - $self->SUPER::purgeCache; -} + $self->session->cache->remove("view_".$self->getId); + super(); +}; #------------------------------------------------------------------- @@ -535,9 +433,10 @@ if the user is not in Admin Mode. sub view { my $self = shift; - if (!$self->session->var->isAdminOn && $self->get("cacheTimeout") > 10) { - my $cache = $self->getCache; - my $out = $cache->get if defined $cache; + my $cache = $self->session->cache; + my $cacheKey = $self->getWwwCacheKey( 'view' ); + if (!$self->session->isAdminOn && $self->cacheTimeout > 10) { + my $out = eval{ $cache->get( $cacheKey ) }; return $out if $out; } # Initiate an empty debug loop @@ -554,18 +453,18 @@ sub view { #use Data::Dumper; return '
    '.Dumper($var).'
    '; # Add the "Download data" link if the user is allowed to download - if ($self->getValue("downloadType") ne "none" - && $self->session->user->isInGroup($self->getValue("downloadUserGroup")) + if ($self->downloadType ne "none" + && $self->session->user->isInGroup($self->downloadUserGroup) ) { $var->{'canDownload'} = 1; $var->{'downloadLink'} = $self->_getDownloadLink($self); } my $out = $self->processTemplate($var,undef,$self->{_viewTemplate}); - if (!$self->session->var->isAdminOn && $self->get("cacheTimeout") > 10) { - WebGUI::Cache->new($self->session,"view_".$self->getId)->set($out,$self->get("cacheTimeout")); - } - return $out; + if (!$self->session->isAdminOn && $self->cacheTimeout > 10) { + eval { $cache->set( $cacheKey, $out, $self->cacheTimeout ) }; + } + return $out; } #------------------------------------------------------------------- @@ -656,7 +555,7 @@ sub _processQuery { } if (! $self->{_query}{$nr}{dbQuery} || $self->{_query}{$nr}{dbQuery} =~ m{\A \s* \Z}msx) { - $self->session->errorHandler->warn("No query specified for query $nr on '" . $self->getId . "'"); + $self->session->log->warn("No query specified for query $nr on '" . $self->getId . "'"); push @{$self->{_debug_loop}}, { 'debug.output' => sprintf($i18n->get('No query specified for query'), $nr) }; return \%var; } @@ -676,7 +575,7 @@ sub _processQuery { push(@{$self->{_debug_loop}},{'debug.output'=>$i18n->get('debug placeholder parameters').join(",",@$placeholderParams)}); my $dbLink = WebGUI::DatabaseLink->new($self->session,$self->{_query}{$nr}{databaseLinkId}); if (!$dbLink) { - $self->session->errorHandler->error("Could not find database link for query #$nr: '".$self->{_query}{$nr}{databaseLinkId}."'. Has it been created?"); + $self->session->log->error("Could not find database link for query #$nr: '".$self->{_query}{$nr}{databaseLinkId}."'. Has it been created?"); push @{$self->{_debug_loop}}, { 'debug.output' => 'Could not find database link'}; return \%var; } @@ -684,7 +583,7 @@ sub _processQuery { if (defined $dbh) { if ($dbLink->queryIsAllowed($query)) { # Check and execute prequery statements first - foreach (split(/\n/, $self->getValue("prequeryStatements".$nr))) { + foreach (split(/\n/, $self->get('prequeryStatements' .$nr))) { my $prequeryStatement = $_; WebGUI::Macro::process($self->session, \$prequeryStatement) if ($self->{_query}{$nr}{preprocessMacros}); @@ -714,12 +613,12 @@ sub _processQuery { .'='.$self->session->url->escape($self->session->form->process($_))); } } - my $paginateAfter = ($page == 1) ? $self->get("paginateAfter") : 99999999; + my $paginateAfter = ($page == 1) ? $self->paginateAfter : 99999999; my $paginatePage = ($nr > 1) ? 1 : $self->session->form->param('pn'); my $p = WebGUI::Paginator->new($self->session,$url,$paginateAfter, undef, $paginatePage); my $error = $p->setDataByQuery($query,$dbh,1,$placeholderParams); if ($error ne "") { - $self->session->errorHandler->warn("There was a problem with the query: ".$error); + $self->session->log->warn("There was a problem with the query: ".$error); push(@{$self->{_debug_loop}},{'debug.output'=>$i18n->get(11)." ".$error}); } else { @@ -771,12 +670,12 @@ sub _processQuery { } } else { push(@{$self->{_debug_loop}},{'debug.output'=>$i18n->get(10)}); - $self->session->errorHandler->warn("SQLReport [".$self->getId."] The SQL query is improperly formatted."); + $self->session->log->warn("SQLReport [".$self->getId."] The SQL query is improperly formatted."); } $dbLink->disconnect; } else { push(@{$self->{_debug_loop}},{'debug.output'=>$i18n->get(12)}); - $self->session->errorHandler->warn("SQLReport [".$self->getId."] Could not connect to database."); + $self->session->log->warn("SQLReport [".$self->getId."] Could not connect to database."); } return \%var; } @@ -793,21 +692,19 @@ sub www_download { my $self = shift; # Only allow if download type is not "none" - return undef if $self->getValue("downloadType") eq "none"; + return undef if $self->downloadType eq "none"; # Only allow users in appropriate group return $self->session->privilege->noAccess() - unless $self->session->user->isInGroup($self->getValue("downloadUserGroup")); + unless $self->session->user->isInGroup($self->downloadUserGroup); # Set filename and mimetype - if ($self->getValue("downloadType") eq "csv") { - $self->session->http->setFilename($self->getValue("downloadFilename"),"application/octet-stream"); - } - else { - $self->session->http->setFilename($self->getValue("downloadFilename"),$self->getValue("downloadMimeType")); - } + $self->session->response->header( 'Content-Disposition' => qq{attachment; filename="}.$self->downloadFilename().'"'); + $self->session->response->content_type( + $self->downloadType eq 'csv' ? "application/octet-stream" : $self->downloadMimeType + ); - $self->session->http->sendHeader; + $self->session->response->sendHeader; return $self->download; @@ -823,11 +720,12 @@ See WebGUI::Asset::Wobject::www_view() for details. =cut -sub www_view { +override www_view => sub { my $self = shift; - $self->session->http->setCacheControl($self->get("cacheTimeout")); - $self->SUPER::www_view(@_); -} + $self->session->response->setCacheControl($self->cacheTimeout); + super(); +}; +__PACKAGE__->meta->make_immutable; 1; diff --git a/lib/WebGUI/Asset/Wobject/Search.pm b/lib/WebGUI/Asset/Wobject/Search.pm index 4846e3c4f..346d7570d 100644 --- a/lib/WebGUI/Asset/Wobject/Search.pm +++ b/lib/WebGUI/Asset/Wobject/Search.pm @@ -1,7 +1,7 @@ package WebGUI::Asset::Wobject::Search; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -11,8 +11,63 @@ package WebGUI::Asset::Wobject::Search; #------------------------------------------------------------------- use strict; -use base "WebGUI::Asset::Wobject"; -use Tie::IxHash; +use Moose; +use WebGUI::Definition::Asset; +extends "WebGUI::Asset::Wobject"; +define assetName => ['assetName', 'Asset_Search']; +define icon => 'search.gif'; +define tableName => 'search'; +property templateId => ( + fieldType => "template", + default => 'PBtmpl0000000000000200', + tab => "display", + namespace => "Search", + hoverHelp => ['search template description', 'Asset_Search'], + label => ['search template', 'Asset_Search'], + ); +property searchRoot => ( + fieldType => "asset", + builder => '_searchRoot_builder', + tab => "properties", + hoverHelp => ["search root description", 'Asset_Search'], + label => ['search root', 'Asset_Search'], + lazy => 1, + ); +sub _searchRoot_builder { + my $session = shift->session; + return $session->setting->get("defaultPage"); +} +property classLimiter => ( + fieldType => "checkList", + default => undef, + vertical => 1, + tab => "properties", + hoverHelp => ["class limiter description", 'Asset_Search'], + label => ["class limiter", 'Asset_Search'], + options => \&_classLimiter_options, + showSelectAll => 1, + ); +sub _classLimiter_options { + my $session = shift->session; + return $session->db->buildHashRef("select distinct(className) from asset"); +} +property useContainers => ( + tab => "properties", + hoverHelp => ["useContainers help", 'Asset_Search'], + label => ["useContainers", 'Asset_Search'], + fieldType => "yesNo", + default => 0, + ); +property paginateAfter => ( + hoverHelp => ["paginate after help", 'Asset_Search'], + label => ["paginate after", 'Asset_Search'], + tab => "display", + fieldType => "integer", + default => 25, + ); + + + use WebGUI::International; use WebGUI::Paginator; use WebGUI::Search; @@ -33,98 +88,6 @@ These methods are available from this package: =cut -#------------------------------------------------------------------- - -=head2 definition ( class, definition ) - -This method defines all properties of a Search and is used to autogenerate most methods. - -=head3 class - -$class is used to make sure that inheritance works on Assets and Wobjects. - -=head3 definition - -Definition hashref from subclasses. - -=head3 Search specific properties - -These properties are added just for this asset. - -=head4 templateId - -ID of a tempate from the Search namespace to display the search results. - -=head4 searchRoot - -An asset id of the point at which a search should start. - -=head4 classLimiter - -An array reference of asset classnames that are valid for the search. - -=cut - -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift; - my $i18n = WebGUI::International->new($session,'Asset_Search'); - my %properties; - tie %properties, 'Tie::IxHash'; - %properties = ( - templateId => { - fieldType => "template", - defaultValue => 'PBtmpl0000000000000200', - tab => "display", - namespace => "Search", - hoverHelp => $i18n->get('search template description'), - label => $i18n->get('search template') - }, - searchRoot => { - fieldType => "asset", - defaultValue => $session->setting->get("defaultPage"), - tab => "properties", - hoverHelp => $i18n->get("search root description"), - label => $i18n->get('search root') - }, - classLimiter => { - fieldType => "checkList", - defaultValue => undef, - vertical => 1, - tab => "properties", - hoverHelp => $i18n->get("class limiter description"), - label => $i18n->get("class limiter"), - options => $session->db->buildHashRef("select distinct(className) from asset"), - showSelectAll => 1, - }, - useContainers => { - tab => "properties", - hoverHelp => $i18n->get("useContainers help"), - label => $i18n->get("useContainers"), - fieldType => "yesNo", - defaultValue => 0, - }, - paginateAfter => { - hoverHelp => $i18n->get("paginate after help"), - label => $i18n->get("paginate after"), - tab => "display", - fieldType => "integer", - defaultValue => 25, - }, - ); - - push(@{$definition}, { - assetName=>$i18n->get('assetName'), - icon=>'search.gif', - autoGenerateForms=>1, - tableName=>'search', - className=>'WebGUI::Asset::Wobject::Search', - properties=>\%properties - }); - return $class->SUPER::definition($session, $definition); -} - #------------------------------------------------------------------- =head2 prepareView ( ) @@ -133,20 +96,20 @@ See WebGUI::Asset::prepareView() for details. =cut -sub prepareView { +override prepareView => sub { my $self = shift; - $self->SUPER::prepareView(); - my $template = WebGUI::Asset::Template->new($self->session, $self->get("templateId")); + super(); + my $template = WebGUI::Asset::Template->newById($self->session, $self->templateId); if (!$template) { WebGUI::Error::ObjectNotFound::Template->throw( error => qq{Template not found}, - templateId => $self->get("templateId"), + templateId => $self->templateId, assetId => $self->getId, ); } $template->prepare($self->getMetaDataAsTemplateVariables); $self->{_viewTemplate} = $template; -} +}; #------------------------------------------------------------------- @@ -181,7 +144,7 @@ sub view { value=>$keywords }); $var{'no_results' } = $i18n->get("no results"); - my $searchRoot = $self->getValue('searchRoot'); + my $searchRoot = $self->searchRoot; if (my $searchOverride = $form->get('searchroot', 'asset')) { $searchRoot = $searchOverride; } @@ -191,10 +154,10 @@ sub view { my %rules = ( keywords =>$keywords, lineage =>[ - WebGUI::Asset->newByDynamicClass($session, $searchRoot)->get("lineage"), + WebGUI::Asset->newById($session,$searchRoot)->get("lineage") ], ); - my @classes = split("\n",$self->get("classLimiter")); + my @classes = split("\n",$self->classLimiter); $rules{classes} = \@classes if (scalar(@classes)); $search->search(\%rules); @@ -209,7 +172,7 @@ sub view { #Set up the paginator my $p = $search->getPaginatorResultSet ( $self->getUrl('doit=1;keywords='.$session->url->escape($keywords)), - $self->get("paginateAfter"), + $self->paginateAfter, ); my @results = (); @@ -220,7 +183,7 @@ sub view { || $user->isInGroup($data->{groupIdEdit}) ); - my $asset = WebGUI::Asset->new($session, $data->{assetId}, $data->{className}); + my $asset = WebGUI::Asset->newById($session, $data->{assetId}); next ENTRY unless defined $asset; my $properties = $asset->get; ##Overlay the asset properties with the original data to handle sub-entries for assets @@ -247,5 +210,6 @@ sub view { return $self->processTemplate(\%var, undef, $self->{_viewTemplate}); } +__PACKAGE__->meta->make_immutable; 1; diff --git a/lib/WebGUI/Asset/Wobject/Shelf.pm b/lib/WebGUI/Asset/Wobject/Shelf.pm index cb1a1f165..dae734a0c 100644 --- a/lib/WebGUI/Asset/Wobject/Shelf.pm +++ b/lib/WebGUI/Asset/Wobject/Shelf.pm @@ -1,7 +1,7 @@ package WebGUI::Asset::Wobject::Shelf; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 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,243 +12,51 @@ package WebGUI::Asset::Wobject::Shelf; use strict; use List::MoreUtils; -use Tie::IxHash; use WebGUI::International; -use base 'WebGUI::Asset::Wobject'; +use Moose; +use WebGUI::Definition::Asset; +extends 'WebGUI::Asset::Wobject'; use WebGUI::Text; use WebGUI::Storage; use WebGUI::Exception::Shop; use WebGUI::Asset::Sku::Product; -#------------------------------------------------------------------- +define assetName => ['assetName', 'Asset_Shelf']; +define icon => 'Shelf.gif'; +define tableName => 'Shelf'; -=head2 definition ( ) +property templateId => ( + fieldType => "template", + default => 'nFen0xjkZn8WkpM93C9ceQ', + tab => "display", + namespace => "Shelf", + hoverHelp => ['shelf template help', 'Asset_Shelf'], + label => ['shelf template', 'Asset_Shelf'], +); -Add our custom properties of templateId to this asset. +#---------------------------------------------------------------------------- + +=head2 getHelpers ( ) + +Add the importCSV and exportCSV helpers to the Shelf =cut -sub definition { - my ($class, $session, $definition) = @_; - my $i18n = WebGUI::International->new($session, 'Asset_Shelf'); - my %properties; - tie %properties, 'Tie::IxHash'; - %properties = ( - templateId =>{ - fieldType => "template", - defaultValue => 'nFen0xjkZn8WkpM93C9ceQ', - tab => "display", - namespace => "Shelf", - hoverHelp => $i18n->get('shelf template help'), - label => $i18n->get('shelf template'), - } - ); - push(@{$definition}, { - assetName => $i18n->get('assetName'), - icon => 'Shelf.gif', - autoGenerateForms => 1, - tableName => 'Shelf', - className => 'WebGUI::Asset::Wobject::Shelf', - properties => \%properties - }); - return $class->SUPER::definition($session, $definition); -} +override getHelpers => sub { + my ( $self ) = @_; + my $helpers = super(); -#------------------------------------------------------------------- - -=head2 exportProducts ( ) - -Export all products from the WebGUI system in a CSV file. For details -about the file format, see importProducts. - -Returns a temporary WebGUI::Storage object containing the file. The -file will be named siteProductData.csv. - -=cut - -sub exportProducts { - my $self = shift; - my $session = $self->session; - my @columns = qw{varSku shortdescription price weight quantity}; - my $productData = WebGUI::Text::joinCSV(qw{mastersku title}, @columns) . "\n"; - @columns = map { $_ eq 'shortdescription' ? 'shortdesc' : $_ } @columns; - my $getAProduct = WebGUI::Asset::Sku::Product->getIsa($session); - while (my $product = $getAProduct->()) { - my $mastersku = $product->get('sku'); - my $title = $product->getTitle; - my $collateri = $product->getAllCollateral('variantsJSON'); - foreach my $collateral (@{ $collateri }) { - my @productFields = @{ $collateral }{ @columns }; - $productData .= WebGUI::Text::joinCSV($mastersku, $title, @productFields); - $productData .= "\n"; - } - } - my $storage = WebGUI::Storage->createTemp($session); - $storage->addFileFromScalar('siteProductData.csv', $productData); - return $storage; -} - -#------------------------------------------------------------------- - -=head2 importProducts ( $filePath ) - -Import products into the WebGUI system. If the master sku of a product -exists in the system, it will be updated. If master skus do not exist, -they will be added. - -The first line of the file should contain only the name of the columns, -in any order. It may not contain comments. - -These are the column names, each is required: - -=over 4 - -=item * - -mastersku - -=item * - -varsku - -=item * - -title - -=item * - -shortdescription - -=item * - -price - -=item * - -weight - -=item * - -quantity - -=back - -The following lines will contain product information. Blank -lines and anything following a '#' sign will be ignored from -the second line of the file, on to the end. - -Returns 1 if the import has taken place. This is to help you know -if old data has been deleted and new has been inserted. - -=cut - -sub importProducts { - my $self = shift; - my $filePath = shift; - my $session = $self->session; - WebGUI::Error::InvalidParam->throw(error => q{Must provide the path to a file}) - unless $filePath; - WebGUI::Error::InvalidFile->throw(error => qq{File could not be found}, brokenFile => $filePath) - unless -e $filePath; - WebGUI::Error::InvalidFile->throw(error => qq{File is not readable}, brokenFile => $filePath) - unless -r $filePath; - open my $table, '<', $filePath or - WebGUI::Error->throw(error => qq{Unable to open $filePath for reading: $!\n}); - - my $headers; - $headers = <$table>; - chomp $headers; - $headers =~ tr/\r//d; - $headers =~ s/\bsku\b/varSku/; - my @headers = WebGUI::Text::splitCSV($headers); - WebGUI::Error::InvalidFile->throw(error => qq{Bad header found in the CSV file}, brokenFile => $filePath) - unless (join(q{-}, sort @headers) eq 'mastersku-price-quantity-shortdescription-title-varSku-weight') - and (scalar @headers == 7); - - my @productData = (); - my $line = 1; - while (my $productRow = <$table>) { - chomp $productRow; - $productRow =~ tr/\r//d; - $productRow =~ s/\s*#.+$//; - next unless $productRow; - local $_; - my @productRow = WebGUI::Text::splitCSV($productRow); - WebGUI::Error::InvalidFile->throw(error => qq{Error found in the CSV file}, brokenFile => $filePath, brokenLine => $line) - unless scalar @productRow == 7; - push @productData, [ @productRow ]; - } - - return unless scalar @productData; - - ##Okay, if we got this far, then the data looks fine. - my $fetchProductId = $session->db->prepare('select p.assetId from Product as p join sku as s on p.assetId=s.assetId and p.revisionDate=s.revisionDate where s.sku=? order by p.revisionDate DESC limit 1'); - my $node = $self; - @headers = map { $_ eq 'shortdescription' ? 'shortdesc' : $_ } @headers; - my @collateralFields = grep { $_ ne 'title' and $_ ne 'mastersku' } @headers; - PRODUCT: foreach my $productRow (@productData) { - my %productRow; - ##Order the data according to the headers, in whatever order they exist. - @productRow{ @headers } = @{ $productRow }; - $productRow{price} =~ tr/0-9.//cd; - ##Isolate just the collateral from the other product information - my %productCollateral; - @productCollateral{ @collateralFields } = @productRow{ @collateralFields }; - - $fetchProductId->execute([$productRow{mastersku}]); - my $asset = $fetchProductId->hashRef; - - ##If the assetId exists, we update data for it - if ($asset->{assetId}) { - $session->log->warn("Modifying an existing product: $productRow{sku} = $asset->{assetId}\n"); - my $assetId = $asset->{assetId}; - my $product = WebGUI::Asset->newPending($session, $assetId); - - ##Error handling for locked assets - if ($product->isLocked) { - $session->log->warn("Product is locked"); - next PRODUCT if $product->isLocked; - } - - if ($productRow{title} ne $product->getTitle) { - my $newTitle = $product->fixTitle($productRow{title}); - $product->update({ - title => $newTitle, - menuTitle => $newTitle, - }); - } - - my $collaterals = $product->getAllCollateral('variantsJSON'); - my $collateralSet = 0; - ROW: foreach my $collateral (@{ $collaterals }) { - next ROW unless $collateral->{varSku} eq $productRow{varSku}; - @{ $collateral}{ @collateralFields } = @productCollateral{ @collateralFields }; ##preserve the variant Id field, assign all others - $product->setCollateral('variantsJSON', 'variantId', $collateral->{variantId}, $collateral); - $collateralSet=1; - } - if (!$collateralSet) { - ##It must be a new variant - $product->setCollateral('variantsJSON', 'variantId', 'new', \%productCollateral); - } - } - else { - ##Insert a new product; - $session->log->warn("Making a new product: $productRow{sku}\n"); - my $newProduct = $node->addChild({className => 'WebGUI::Asset::Sku::Product'}); - my $newTitle = $newProduct->fixTitle($productRow{title}); - $newProduct->update({ - title => $newTitle, - menuTitle => $newTitle, - url => $newProduct->fixUrl($productRow{title}), - sku => $productRow{mastersku}, - }); - $newProduct->setCollateral('variantsJSON', 'variantId', 'new', \%productCollateral); - $newProduct->commit; - } - } - return 1; -} + $helpers->{import_products} = { + className => 'WebGUI::AssetHelper::Product::ImportCSV', + label => 'Import Products', + }; + $helpers->{export_products} = { + className => 'WebGUI::AssetHelper::Product::ExportCSV', + label => 'Export Products', + }; + return $helpers; +}; #------------------------------------------------------------------- @@ -258,10 +66,10 @@ See WebGUI::Asset::prepareView() for details. =cut -sub prepareView { +override prepareView => sub { my $self = shift; - $self->SUPER::prepareView(); - my $template = WebGUI::Asset::Template->new($self->session, $self->get("templateId")); + super(); + my $template = WebGUI::Asset::Template->newById($self->session, $self->templateId); # boom XXX if (!$template) { WebGUI::Error::ObjectNotFound::Template->throw( error => qq{Template not found}, @@ -271,7 +79,7 @@ sub prepareView { } $template->prepare($self->getMetaDataAsTemplateVariables); $self->{_viewTemplate} = $template; -} +}; #------------------------------------------------------------------- @@ -309,7 +117,7 @@ sub view { my @childSkus = @{$self->getLineage(['children'],{isa=>'WebGUI::Asset::Sku'})}; # find products based upon keywords - my @keywords = $self->get('keywords'); + my @keywords = $self->keywords; my $keywordBasedAssetIds = WebGUI::Keyword->new($session)->getMatchingAssets({ matchAssetKeywords => $self, isa => 'WebGUI::Asset::Sku', @@ -319,9 +127,9 @@ sub view { my @productIds = List::MoreUtils::uniq(@childSkus, @{$keywordBasedAssetIds}); my @products = (); PRODUCT: foreach my $id (@productIds) { - my $asset = WebGUI::Asset->newByDynamicClass($session, $id); + my $asset = WebGUI::Asset->newById($session, $id); if (!defined $asset) { - $session->errorHandler->error(q|Couldn't instanciate SKU with assetId |.$id.q| on shelf with assetId |.$self->getId); + $session->log->error(q|Couldn't instanciate SKU with assetId |.$id.q| on shelf with assetId |.$self->getId); next PRODUCT; } push @products, $asset if $asset->canView; @@ -353,101 +161,5 @@ sub view { return $self->processTemplate(\%var, undef, $self->{_viewTemplate}); } - -#------------------------------------------------------------------- - -=head2 www_edit ( ) - -Override the superclass to add import and exprt items to the AdminConsole submenu. - -=cut - -sub www_edit { - my $self = shift; - my $i18n = WebGUI::International->new($self->session, 'Asset_Shelf'); - if ($self->getId ne "new") { - $self->getAdminConsole->addSubmenuItem($self->getUrl('func=exportProducts'),$i18n->get("export")); - $self->getAdminConsole->addSubmenuItem($self->getUrl('func=importProducts'),$i18n->get("import")); - } - return $self->SUPER::www_edit(); -} - -#------------------------------------------------------------------- - -=head2 www_exportProducts ( ) - -Export all product SKUs as a CSV file. Returns a WebGUI::Storage -object containg the product file, named 'siteProductData.csv'. - -=cut - -sub www_exportProducts { - my $self = shift; - my $session = $self->session; - return $session->privilege->insufficient - unless $self->canEdit; - my $storage = $self->exportProducts(); - $session->http->setRedirect($storage->getUrl($storage->getFiles->[0])); - return "redirect"; -} - -#------------------------------------------------------------------- - -=head2 www_importProducts ( ) - -Import new product data from a file provided by the user. This will create new products -or alter existing products. - -=cut - -sub www_importProducts { - my $self = shift; - my $session = $self->session; - return $session->privilege->insufficient unless $self->canEdit; - my $i18n=WebGUI::International->new($session, 'Asset_Shelf'); - my $status_message; - if ( $session->form->get('doit')) { - my $storage = WebGUI::Storage->create($session); - my $productFile = $storage->addFileFromFormPost('importFile', 1); - eval { - $self->importProducts($storage->getPath($productFile)) if $productFile; - }; - my $exception; - if ($exception = Exception::Class->caught('WebGUI::Error::InvalidFile')) { - $status_message = sprintf 'A problem was found with your file: %s', - $exception->error; - if ($exception->brokenLine) { - $status_message .= sprintf ' on line %d', $exception->brokenLine; - } - } - elsif ($exception = Exception::Class->caught()) { - $status_message = sprintf 'A problem happened during the import: %s', $exception->error; - } - else { - $status_message = $i18n->get('import successful'); - if (WebGUI::VersionTag->autoCommitWorkingIfEnabled($self->session, { - allowComments => 1, - returnUrl => $self->getUrl, - }) eq 'redirect') { - return undef; - }; - } - } - - my $output; - if ($status_message) { - $output = '
    '.$status_message.'
    '; - } - - $output .= WebGUI::Form::formHeader($session,{action => $self->getUrl}) - . WebGUI::Form::hidden($session, {name=>"func", value=>"importProducts"}) - . WebGUI::Form::hidden($session, {name=>"doit", value=>1}) - . q{} - . WebGUI::Form::submit($session,{value=>$i18n->get('import'), extras=>q{style="float: left;"} }) - . WebGUI::Form::formFooter($session); - - return $self->getAdminConsole->render($output, $i18n->get('import')); -} - - +__PACKAGE__->meta->make_immutable; 1; diff --git a/lib/WebGUI/Asset/Wobject/StockData.pm b/lib/WebGUI/Asset/Wobject/StockData.pm index e0e39e351..942dc4a57 100644 --- a/lib/WebGUI/Asset/Wobject/StockData.pm +++ b/lib/WebGUI/Asset/Wobject/StockData.pm @@ -1,7 +1,7 @@ package WebGUI::Asset::Wobject::StockData; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 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,12 +12,56 @@ package WebGUI::Asset::Wobject::StockData; use strict; use WebGUI::International; -use WebGUI::Utility; use WebGUI::Asset::Wobject; use Finance::Quote; +use Tie::IxHash; +use Number::Format (); -use Class::C3; -use base qw/WebGUI::Asset::Wobject WebGUI::AssetAspect::Dashlet/; +use Moose; +use WebGUI::Definition::Asset; +extends 'WebGUI::Asset::Wobject'; +with 'WebGUI::Role::Asset::Dashlet'; +define tableName => 'StockData'; +define icon => 'stockData.gif'; +define assetName => ["assetName", 'Asset_StockData']; +property templateId => ( + fieldType => "template", + default => 'StockDataTMPL000000001', + tab => 'display', + namespace => 'StockData', + label => ["template_label", 'Asset_StockData'], + hoverHelp => ["template_label_description", 'Asset_StockData'], + ); +property displayTemplateId => ( + fieldType => "template", + default => 'StockDataTMPL000000002', + tab => 'display', + namespace => "StockData/Display", + label => ["display_template_label", 'Asset_StockData'], + hoverHelp => ["display_template_label_description", 'Asset_StockData'], + ); +property defaultStocks => ( + fieldType => "textarea", + default => "DELL\nMSFT\nORCL\nSUNW\nYHOO", + tab => 'properties', + label => ["default_stock_label", 'Asset_StockData'], + hoverHelp => ["default_stock_label_description", 'Asset_StockData'], + dashletOverridable => 1, + ); +property source => ( + fieldType => "selectList", + default => "usa", + tab => 'properties', + options => &_getStockSources, + label => ["stock_source", 'Asset_StockData'], + hoverHelp => ["stock_source_description", 'Asset_StockData'], + ); +property failover => ( + fieldType => "yesNo", + default => undef, + label => ["failover_label", 'Asset_StockData'], + hoverHelp => ["failover_description", 'Asset_StockData'], + ); #------------------------------------------------------------------- @@ -65,10 +109,10 @@ sub _appendStockVars { } $hash->{'stocks.p_change'} = _na($data->{$symbol,"p_change"}); $hash->{'stocks.volume'} = _na($data->{$symbol,"volume"}); - $hash->{'stocks.volume.millions'} = _na(WebGUI::Utility::round(($hash->{'stocks.volume'}/1000000),2)); + $hash->{'stocks.volume.millions'} = _na(sprintf('%.2f', $hash->{'stocks.volume'}/1000000)); $hash->{'stocks.avg_vol'} = _na($data->{$symbol,"avg_vol"}); $hash->{'stocks.bid'} = _na($data->{$symbol,"bid"}); - $hash->{'stocks.ask'} = _na(WebGUI::Utility::commify($data->{$symbol,"ask"})); + $hash->{'stocks.ask'} = _na(Number::Format::format_number($data->{$symbol,"ask"})); $hash->{'stocks.close'} = _na($data->{$symbol,"close"}); $hash->{'stocks.open'} = _na($data->{$symbol,"open"}); $hash->{'stocks.day_range'} = _na($data->{$symbol,"day_range"}); @@ -161,7 +205,7 @@ sub _convertToEpoch { my ($month,$day,$year) = split("/",$date); $month = $self->_appendZero($month); $day = $self->_appendZero($day); - my $tfixed = substr($time,0,-2); + my $tfixed = substr($time,0,5); my ($hour,$minute) = split(":",$tfixed); if($time =~ m/pm/i) { $hour += 12; @@ -194,20 +238,19 @@ sub _getStocks { # Create a new Finance::Quote object my $q = Finance::Quote->new; # Disable failover if specified - unless ($self->getValue("failover")) { + unless ($self->failover) { $q->failover(0); } # Hardcoded timeout for now. $q->timeout(15); - my $source = $self->getValue('source'); + my $source = $self->source; my %stocks = (); my @stocks_to_fetch = (); STOCK: foreach my $stock (@{$stocks}) { $stock = uc $stock; - my $cache = WebGUI::Cache->new($session, [$self->getId, $source, $stock]); - if ($cache->get()) { - my $value = $cache->get(); + my $value = $session->cache->get( join "", $self->getId, $source, $stock ); + if ($value) { %stocks = (%stocks, %{ $value }); } else { @@ -220,11 +263,10 @@ sub _getStocks { foreach my $stock (@stocks_to_fetch) { $stock = uc $stock; my @stock_keys = grep { /$stock\b/ } keys %new_stocks; - my $cache = WebGUI::Cache->new($session, [$self->getId, $source, $stock]); my %slice; @slice{ @stock_keys } = @new_stocks{ @stock_keys }; $slice{$stock,'last_fetch'} = time(); - $cache->set(\%slice, $self->get('cacheTimeout')); + $session->cache->set( join( "", $self->getId, $source, $stock ), \%slice, $self->get('cacheTimeout') ); %stocks = (%stocks, %slice); } return \%stocks; @@ -276,119 +318,28 @@ sub _trim { #------------------------------------------------------------------- -=head2 definition ( ) - -defines wobject properties for Stock Data instances - -=cut - -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift; - my $i18n = WebGUI::International->new($session,"Asset_StockData"); - - my %properties; - tie %properties, 'Tie::IxHash'; - %properties = ( - templateId =>{ - fieldType=>"template", - defaultValue=>'StockDataTMPL000000001', - tab=>'display', - namespace=>'StockData', - label=>$i18n->get("template_label"), - hoverHelp=>$i18n->get("template_label_description"), - }, - displayTemplateId=>{ - fieldType=>"template", - defaultValue=>'StockDataTMPL000000002', - tab=>'display', - namespace=>"StockData/Display", - label=>$i18n->get("display_template_label"), - hoverHelp=>$i18n->get("display_template_label_description"), - }, - defaultStocks=>{ - fieldType=>"textarea", - defaultValue=>"DELL\nMSFT\nORCL\nSUNW\nYHOO", - tab=>'properties', - label=> $i18n->get("default_stock_label"), - hoverHelp=> $i18n->get("default_stock_label_description"), - dashletOverridable => 1, - }, - source=>{ - fieldType=>"selectList", - defaultValue=>"usa", - tab=>'properties', - label=> $i18n->get("stock_source"), - options=>$class->_getStockSources(), - hoverHelp=>$i18n->get("stock_source_description"), - }, - failover=>{ - fieldType=>"yesNo", - defaultValue=>undef, - label=> $i18n->get("failover_label"), - hoverHelp=> $i18n->get("failover_description"), - }, - cacheTimeout => { - tab => "display", - fieldType => "interval", - defaultValue => 3600, - uiLevel => 5, - label => $i18n->get("cache timeout", 'Asset_Snippet'), - hoverHelp => $i18n->get("cache timeout help"), - }, - ); - - push(@{$definition}, { - tableName=>'StockData', - className=>'WebGUI::Asset::Wobject::StockData', - icon=>'stockData.gif', - assetName=>$i18n->get("assetName"), - autoGenerateForms=>1, - properties=>\%properties - }); - - return $class->SUPER::definition($session, $definition); -} - -#------------------------------------------------------------------- - =head2 prepareView ( ) See WebGUI::Asset::prepareView() for details. =cut -sub prepareView { +override prepareView => sub { my $self = shift; - $self->SUPER::prepareView(); - my $template = WebGUI::Asset::Template->new($self->session, $self->get("templateId")); + super(); + my $template = WebGUI::Asset::Template->newById($self->session, $self->templateId); if (!$template) { WebGUI::Error::ObjectNotFound::Template->throw( error => qq{Template not found}, - templateId => $self->get("templateId"), + templateId => $self->templateId, assetId => $self->getId, ); } $template->prepare($self->getMetaDataAsTemplateVariables); $self->{_viewTemplate} = $template; -} +}; -#------------------------------------------------------------------- - -=head2 purge ( ) - -removes collateral data associated with a StockData when the system -purges it's data. - -=cut - -sub purge { - my $self = shift; - return $self->SUPER::purge; -} - #------------------------------------------------------------------- =head2 view ( ) @@ -409,7 +360,7 @@ sub view { #Build list of stocks as an array my $overrides = $self->fetchUserOverrides($self->getParent->getId); - my $defaults = $overrides->{defaultStocks} || $self->getValue("defaultStocks"); + my $defaults = $overrides->{defaultStocks} || $self->defaultStocks; #replace any windows newlines $defaults =~ s/\r//; my @array = split("\n",$defaults); @@ -476,8 +427,9 @@ sub www_displayStock { ('(not available)') x 2; } - return $self->processTemplate($var, $self->get("displayTemplateId")); + return $self->processTemplate($var, $self->displayTemplateId); } +__PACKAGE__->meta->make_immutable; 1; diff --git a/lib/WebGUI/Asset/Wobject/StoryArchive.pm b/lib/WebGUI/Asset/Wobject/StoryArchive.pm index d5f096169..959554e9d 100644 --- a/lib/WebGUI/Asset/Wobject/StoryArchive.pm +++ b/lib/WebGUI/Asset/Wobject/StoryArchive.pm @@ -3,7 +3,7 @@ package WebGUI::Asset::Wobject::StoryArchive; our $VERSION = "1.0.0"; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,16 +13,116 @@ our $VERSION = "1.0.0"; #------------------------------------------------------------------- use strict; -use Tie::IxHash; + +use Moose; +use WebGUI::Definition::Asset; +extends 'WebGUI::Asset::Wobject'; +define assetName => ['assetName', 'Asset_StoryArchive']; +define icon => 'storyarchive.gif'; +define tableName => 'StoryArchive'; +property storiesPerPage => ( + tab => 'display', + fieldType => 'integer', + label => ['stories per page', 'Asset_StoryArchive'], + hoverHelp => ['stories per page help', 'Asset_StoryArchive'], + default => 25, + ); +property groupToPost => ( + tab => 'security', + fieldType => 'group', + label => ['group to post', 'Asset_StoryArchive'], + hoverHelp => ['group to post help', 'Asset_StoryArchive'], + default => '12', + ); +property templateId => ( + tab => 'display', + fieldType => 'template', + label => ['template', 'Asset_StoryArchive'], + hoverHelp => ['template help', 'Asset_StoryArchive'], + namespace => 'StoryArchive', + default => 'yxD5ka7XHebPLD-LXBwJqw', + ); +property storyTemplateId => ( + tab => 'display', + fieldType => 'template', + label => ['story template', 'Asset_StoryArchive'], + hoverHelp => ['story template help', 'Asset_StoryArchive'], + namespace => 'Story', + default => '3QpYtHrq_jmAk1FNutQM5A', + ); +property photoWidth => ( + tab => 'display', + fieldType => 'integer', + label => ['photo width', 'Asset_StoryArchive'], + hoverHelp => ['photo width help', 'Asset_StoryArchive'], + default => '300', + ); +property editStoryTemplateId => ( + tab => 'display', + fieldType => 'template', + label => ['edit story template', 'Asset_StoryArchive'], + hoverHelp => ['edit story template help', 'Asset_StoryArchive'], + namespace => 'Story/Edit', + default => 'E3tzZjzhmYoNlAyP2VW33Q', + ); +property keywordListTemplateId => ( + tab => 'display', + fieldType => 'template', + label => ['keyword list template', 'Asset_StoryArchive'], + hoverHelp => ['keyword list template help', 'Asset_StoryArchive'], + namespace => 'StoryArchive/KeywordList', + default => '0EAJ9EYb9ap2XwfrcXfdLQ', + ); +property archiveAfter => ( + tab => 'display', + fieldType => 'interval', + label => ['archive after', 'Asset_StoryArchive'], + hoverHelp => ['archive after help', 'Asset_StoryArchive'], + default => 31536000, + ); +property richEditorId => ( + tab => 'display', + fieldType => 'selectRichEditor', + label => ['rich editor', 'Asset_StoryArchive'], + hoverHelp => ['rich editor help', 'Asset_StoryArchive'], + default => 'PBrichedit000000000002', + ); +property approvalWorkflowId => ( + tab => 'security', + fieldType => 'workflow', + default => 'pbworkflow000000000003', + type => 'WebGUI::VersionTag', + label => ['approval workflow', 'Asset_StoryArchive'], + hoverHelp => ['approval workflow help', 'Asset_StoryArchive'], + ); +property storySortOrder => ( + fieldType => "selectBox", + tab => 'display', + default => 'Chronologically', + options => \&_storySortOrder_options, + label => ['sortAlphabeticallyChronologically', 'Asset_StoryArchive'], + hoverHelp => ['sortAlphabeticallyChronologically description', 'Asset_StoryArchive'], + ); + +sub _storySortOrder_options { + my $self = shift; + my $i18n = WebGUI::International->new($self->session, 'Asset_StoryArchive'); + return { + Alphabetically => $i18n->get('alphabetically'), + Chronologically => $i18n->get('chronologically'), + }; +} + +with 'WebGUI::Role::Asset::RssFeed'; + use WebGUI::International; -use WebGUI::Utility; use WebGUI::Asset::Story; use WebGUI::Asset::Wobject::Folder; use WebGUI::Paginator; use WebGUI::Keyword; use WebGUI::Search; -use Class::C3; -use base qw/WebGUI::AssetAspect::RssFeed WebGUI::Asset::Wobject WebGUI::AssetAspect::Installable/; +use WebGUI::VersionTag; + use File::Path; use constant DATE_FORMAT => '%c_%D_%y'; @@ -37,19 +137,19 @@ does not exist, then make it. =cut -sub addChild { +override addChild => sub { my $self = shift; my ($properties) = @_; ##Allow subclassing if ($properties->{className} eq 'WebGUI::Asset::Wobject::Folder') { - return $self->SUPER::addChild(@_); + return super(); } return undef unless $properties->{className} =~ /^WebGUI::Asset::Story/; my $todayFolder = $self->getFolder; return undef unless $todayFolder; my $story = $todayFolder->addChild(@_); return $story; -} +}; #------------------------------------------------------------------- @@ -68,126 +168,9 @@ sub canPostStories { my ($self, $userId) = @_; $userId ||= $self->session->user->userId; my $user = WebGUI::User->new($self->session, $userId); - return $user->isInGroup($self->get("groupToPost")) || $self->canEdit($userId); + return $user->isInGroup($self->groupToPost) || $self->canEdit($userId); } -#------------------------------------------------------------------- - -=head2 definition ( ) - -defines wobject properties for New Wobject instances. You absolutely need -this method in your new Wobjects. If you choose to "autoGenerateForms", the -getEditForm method is unnecessary/redundant/useless. - -=cut - -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift; - my $i18n = WebGUI::International->new($session, 'Asset_StoryArchive'); - my %properties; - tie %properties, 'Tie::IxHash'; - %properties = ( - storiesPerPage => { - tab => 'display', - fieldType => 'integer', - label => $i18n->get('stories per page'), - hoverHelp => $i18n->get('stories per page help'), - defaultValue => 25, - }, - groupToPost => { - tab => 'security', - fieldType => 'group', - label => $i18n->get('group to post'), - hoverHelp => $i18n->get('group to post help'), - defaultValue => '12', - }, - templateId => { - tab => 'display', - fieldType => 'template', - label => $i18n->get('template'), - hoverHelp => $i18n->get('template help'), - namespace => 'StoryArchive', - defaultValue => 'yxD5ka7XHebPLD-LXBwJqw', - }, - storyTemplateId => { - tab => 'display', - fieldType => 'template', - label => $i18n->get('story template'), - hoverHelp => $i18n->get('story template help'), - namespace => 'Story', - defaultValue => '3QpYtHrq_jmAk1FNutQM5A', - }, - photoWidth => { - tab => 'display', - fieldType => 'integer', - label => $i18n->get('photo width'), - hoverHelp => $i18n->get('photo width help'), - defaultValue => '300', - }, - editStoryTemplateId => { - tab => 'display', - fieldType => 'template', - label => $i18n->get('edit story template'), - hoverHelp => $i18n->get('edit story template help'), - namespace => 'Story/Edit', - defaultValue => 'E3tzZjzhmYoNlAyP2VW33Q', - }, - keywordListTemplateId => { - tab => 'display', - fieldType => 'template', - label => $i18n->get('keyword list template'), - hoverHelp => $i18n->get('keyword list template help'), - namespace => 'StoryArchive/KeywordList', - defaultValue => '0EAJ9EYb9ap2XwfrcXfdLQ', - }, - archiveAfter => { - tab => 'display', - fieldType => 'interval', - label => $i18n->get('archive after'), - hoverHelp => $i18n->get('archive after help'), - defaultValue => 31536000, - }, - richEditorId => { - tab => 'display', - fieldType => 'selectRichEditor', - label => $i18n->get('rich editor'), - hoverHelp => $i18n->get('rich editor help'), - defaultValue => 'PBrichedit000000000002', - }, - approvalWorkflowId =>{ - tab => 'security', - fieldType => 'workflow', - defaultValue => 'pbworkflow000000000003', - type => 'WebGUI::VersionTag', - label => $i18n->get('approval workflow'), - hoverHelp => $i18n->get('approval workflow help'), - }, - storySortOrder => { - fieldType => "selectBox", - tab => 'display', - defaultValue => 'Chronologically', - options => { - Alphabetically => $i18n->get('alphabetically'), - Chronologically => $i18n->get('chronologically') - }, - label => $i18n->get('sortAlphabeticallyChronologically'), - hoverHelp => $i18n->get('sortAlphabeticallyChronologically description'), - }, - ); - push(@{$definition}, { - assetName=>$i18n->get('assetName'), - icon=>'storyarchive.gif', - autoGenerateForms=>1, - tableName=>'StoryArchive', - className=>'WebGUI::Asset::Wobject::StoryArchive', - properties=>\%properties, - }); - return $class->SUPER::definition($session, $definition); -} - - #------------------------------------------------------------------- =head2 exportAssetCollateral (basePath, params, session) @@ -232,13 +215,7 @@ sub exportAssetCollateral { } # open another session to handle printing... - my $printSession = WebGUI::Session->open( - $self->session->config->getWebguiRoot, - $self->session->config->getFilename, - undef, - undef, - $self->session->getId, - ); + my $printSession = $self->session->duplicate; my $keywordObj = WebGUI::Keyword->new($printSession); my $keywords = $keywordObj->findKeywords({ @@ -246,7 +223,7 @@ sub exportAssetCollateral { limit => 50, ##This is based on the tagcloud setting }); - my $listTemplate = WebGUI::Asset->new($session, $self->get('keywordListTemplateId'), 'WebGUI::Asset::Template'); + my $listTemplate = WebGUI::Asset->newById($session, $self->keywordListTemplateId); foreach my $keyword (@{ $keywords }) { ##Keywords may not be URL safe, so urlize them my $keyword_url = $self->getKeywordFilename($keyword); @@ -275,7 +252,7 @@ sub exportAssetCollateral { }); my $listOfStories = []; STORYID: foreach my $storyId (@{ $storyIds }) { - my $story = WebGUI::Asset->newByDynamicClass($session, $storyId); + my $story = WebGUI::Asset->newById($session, $storyId); next STORYID unless $story; push @{ $listOfStories }, { title => $story->getTitle, @@ -323,8 +300,9 @@ sub getFolder { my $session = $self->session; my $folderName = $session->datetime->epochToHuman($date, DATE_FORMAT); my $folderUrl = $self->getFolderUrl($folderName); - my $folder = WebGUI::Asset->newByUrl($session, $folderUrl); - return $folder if $folder; + my $folder = eval { WebGUI::Asset->newByUrl($session, $folderUrl); }; + return $folder if !Exception::Class->caught(); + ##The requested folder doesn't exist. Make it and autocommit it. ##For a fully automatic commit, save the current tag, create a new one @@ -339,21 +317,22 @@ sub getFolder { $newVersionTag->set({ name => 'Adding folder '. $folderName. ' to archive '. $self->getUrl}); } + ##Call SUPER because my addChild calls getFolder - $folder = $self->SUPER::addChild({ + $folder = $self->addChild({ className => 'WebGUI::Asset::Wobject::Folder', title => $folderName, menuTitle => $folderName, url => $folderUrl, isHidden => 1, - styleTemplateId => $self->get('styleTemplateId'), + styleTemplateId => $self->styleTemplateId, }); $newVersionTag->commit() if $newVersionTag; ##Restore the old one, if it exists $oldVersionTag->setWorking() if $oldVersionTag; ##Get a new version of the asset from the db with the correct state - $folder = WebGUI::Asset->newByUrl($session, $folderUrl); + $folder = $folder->cloneFromDb(); return $folder; } @@ -440,7 +419,7 @@ sub getRssFeedItems { excludeClasses => ['WebGUI::Asset::Wobject::Folder'], orderByClause => 'creationDate desc, lineage', returnObjects => 1, - limit => $self->get('itemsPerFeed'), + limit => $self->itemsPerFeed, }); my $storyData = []; while ( 1 ) { @@ -464,20 +443,21 @@ See WebGUI::Asset::prepareView() for details. =cut -sub prepareView { +around prepareView => sub { + my $orig = shift; my $self = shift; - $self->SUPER::prepareView(); - my $template = WebGUI::Asset::Template->new($self->session, $self->get("templateId")); + $self->$orig(@_); + my $template = WebGUI::Asset::Template->newById($self->session, $self->templateId); if (!$template) { WebGUI::Error::ObjectNotFound::Template->throw( error => qq{Template not found}, - templateId => $self->get("templateId"), + templateId => $self->templateId, assetId => $self->getId, ); } $template->prepare; $self->{_viewTemplate} = $template; -} +}; #------------------------------------------------------------------- @@ -553,7 +533,7 @@ sub viewTemplateVariables { keywords => $wordList, isa => 'WebGUI::Asset::Story', usePaginator => 1, - rowsPerPage => $self->get('storiesPerPage'), + rowsPerPage => $self->storiesPerPage, }); $p->setBaseUrl($self->getUrl("func=view;keyword=".$keywords)); } @@ -562,7 +542,7 @@ sub viewTemplateVariables { my $search = WebGUI::Search->new($session); $search->search({ keywords => $query, - lineage => [ $self->get('lineage'), ], + lineage => [ $self->lineage, ], classes => [ qw/WebGUI::Asset::Story/, ], }); $p = $search->getPaginatorResultSet($self->getUrl, $self->get('storiesPerPage')); @@ -575,7 +555,7 @@ sub viewTemplateVariables { excludeClasses => ['WebGUI::Asset::Wobject::Folder'], orderByClause => $orderBy, }); - my $storiesPerPage = $self->get('storiesPerPage'); + my $storiesPerPage = $self->storiesPerPage; if ($exporting) { ##10 pages worth of data on 1 page in export mode $storiesPerPage *= 10; @@ -595,14 +575,14 @@ sub viewTemplateVariables { my $datePointer = undef; my $icon = $session->icon; - my $userUiLevel = $session->user->profileField("uiLevel"); + my $userUiLevel = $session->user->get("uiLevel"); my $uiLevels = $session->config->get('assetToolbarUiLevel'); ##Only build objects for the assets that we need STORY: foreach my $storyId (@{ $storyIds }) { - my $story = WebGUI::Asset->new($session, $storyId->{assetId}, $storyId->{className}, $storyId->{revisionDate}); + my $story = WebGUI::Asset->newById($session, $storyId->{assetId}, $storyId->{revisionDate}); next STORY unless $story; - my $creationDate = $story->get('creationDate'); + my $creationDate = $story->creationDate; my ($creationDay,undef) = $session->datetime->dayStartEnd($creationDate); my $storyDate = $session->datetime->epochToHuman($creationDay, DATE_FORMAT); if ($storyDate ne $lastStoryDate) { @@ -618,17 +598,17 @@ sub viewTemplateVariables { creationDate => $creationDate, }; if ($story->canEdit && $userUiLevel >= $uiLevels->{delete} && !$exporting) { - $storyVars->{deleteIcon} = $icon->delete('func=delete', $story->get('url'), $i18n->get(43)); + $storyVars->{deleteIcon} = $icon->delete('func=delete', $story->url, $i18n->get(43)); } if ($story->canEdit && $userUiLevel >= $uiLevels->{edit} && !$exporting) { - $storyVars->{editIcon} = $icon->edit('func=edit', $story->get('url')); + $storyVars->{editIcon} = $icon->edit('func=edit', $story->url); } push @{$datePointer->{story_loop}}, $storyVars; } $var->{canPostStories} = $self->canPostStories; $var->{addStoryUrl} = $var->{canPostStories} - ? $self->getUrl('func=add;class=WebGUI::Asset::Story') + ? $self->getUrl('func=add;className=WebGUI::Asset::Story') : ''; $var->{rssUrl} = $self->getRssFeedUrl; $var->{atomUrl} = $self->getAtomFeedUrl; @@ -678,5 +658,6 @@ sub www_add { $todayFolder->www_add; } +__PACKAGE__->meta->make_immutable; 1; #vim:ft=perl diff --git a/lib/WebGUI/Asset/Wobject/StoryTopic.pm b/lib/WebGUI/Asset/Wobject/StoryTopic.pm index ba234f9bc..869eb901c 100644 --- a/lib/WebGUI/Asset/Wobject/StoryTopic.pm +++ b/lib/WebGUI/Asset/Wobject/StoryTopic.pm @@ -3,7 +3,7 @@ package WebGUI::Asset::Wobject::StoryTopic; $VERSION = "1.0.0"; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,89 +13,67 @@ $VERSION = "1.0.0"; #------------------------------------------------------------------- use strict; -use Tie::IxHash; -use WebGUI::International; -use WebGUI::Utility; -use WebGUI::Asset::Story; -use Class::C3; -use base qw/WebGUI::AssetAspect::RssFeed WebGUI::Asset::Wobject/; - -use constant DATE_FORMAT => '%c_%D_%y'; - -#------------------------------------------------------------------- - -=head2 definition ( ) - -defines wobject properties for New Wobject instances. You absolutely need -this method in your new Wobjects. If you choose to "autoGenerateForms", the -getEditForm method is unnecessary/redundant/useless. - -=cut - -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift; - my $i18n = WebGUI::International->new($session, 'Asset_StoryTopic'); - my $other_i18n = WebGUI::International->new($session, 'Asset_StoryArchive'); - my %properties; - tie %properties, 'Tie::IxHash'; - %properties = ( - storiesPer => { +use Moose; +use WebGUI::Definition::Asset; +extends 'WebGUI::Asset::Wobject'; +define assetName => ['assetName', 'Asset_StoryTopic']; +define icon => 'storytopic.gif'; +define tableName => 'StoryTopic'; +property storiesPer => ( tab => 'display', fieldType => 'integer', - label => $i18n->get('stories per topic'), - hoverHelp => $i18n->get('stories per topic help'), - defaultValue => 15, - }, - storiesShort => { + label => ['stories per topic', 'Asset_StoryTopic'], + hoverHelp => ['stories per topic help', 'Asset_StoryTopic'], + default => 15, + ); +property storiesShort => ( tab => 'display', fieldType => 'integer', - label => $i18n->get('stories short'), - hoverHelp => $i18n->get('stories short help'), - defaultValue => 5, - }, - templateId => { + label => ['stories short', 'Asset_StoryTopic'], + hoverHelp => ['stories short help', 'Asset_StoryTopic'], + default => 5, + ); +property templateId => ( tab => 'display', fieldType => 'template', - label => $i18n->get('template'), - hoverHelp => $i18n->get('template help'), - filter => 'fixId', + label => ['template', 'Asset_StoryTopic'], + hoverHelp => ['template help', 'Asset_StoryTopic'], namespace => 'StoryTopic', - defaultValue => 'A16v-YjWAShXWvSACsraeg', - }, - storyTemplateId => { + default => 'A16v-YjWAShXWvSACsraeg', + ); +property storyTemplateId => ( tab => 'display', fieldType => 'template', - label => $i18n->get('story template'), - hoverHelp => $i18n->get('story template help'), - filter => 'fixId', + label => ['story template', 'Asset_StoryTopic'], + hoverHelp => ['story template help', 'Asset_StoryTopic'], namespace => 'Story', - defaultValue => 'TbDcVLbbznPi0I0rxQf2CQ', - }, - storySortOrder => { + default => 'TbDcVLbbznPi0I0rxQf2CQ', + ); +property storySortOrder => ( fieldType => "selectBox", tab => 'display', - defaultValue => 'Chronologically', - options => { - Alphabetically => $other_i18n->get('alphabetically'), - Chronologically => $other_i18n->get('chronologically') - }, - label => $other_i18n->get('sortAlphabeticallyChronologically'), - hoverHelp => $other_i18n->get('sortAlphabeticallyChronologically description'), - }, - ); - push(@{$definition}, { - assetName=>$i18n->get('assetName'), - icon=>'storytopic.gif', - autoGenerateForms=>1, - tableName=>'StoryTopic', - className=>'WebGUI::Asset::Wobject::StoryTopic', - properties=>\%properties, - }); - return $class->SUPER::definition($session, $definition); + default => 'Chronologically', + options => \&_storySortOrder_options, + label => ['sortAlphabeticallyChronologically', 'Asset_StoryArchive'], + hoverHelp => ['sortAlphabeticallyChronologically description', 'Asset_StoryArchive'], + ); +sub _storySortOrder_options { + my $session = shift->session; + my $i18n = WebGUI::International->new($session, 'Asset_StoryArchive'); + return { + Alphabetically => $i18n->get('alphabetically'), + Chronologically => $i18n->get('chronologically'), + }; } +with 'WebGUI::Role::Asset::RssFeed'; + + +use WebGUI::International; +use WebGUI::Asset::Story; + +use constant DATE_FORMAT => '%c_%D_%y'; + #------------------------------------------------------------------- =head2 getRssFeedItems ( ) @@ -108,16 +86,16 @@ for generating an RSS and Atom feeds. sub getRssFeedItems { my ($self) = @_; my $session = $self->session; - my $wordList = WebGUI::Keyword::string2list($self->get('keywords')); + my $wordList = WebGUI::Keyword::string2list($self->keywords); my $key = WebGUI::Keyword->new($session); my $storyIds = $key->getMatchingAssets({ keywords => $wordList, isa => 'WebGUI::Asset::Story', - rowsPerPage => $self->get('storiesPer'), + rowsPerPage => $self->storiesPer, }); my $storyData = []; STORY: foreach my $storyId (@{ $storyIds }) { - my $story = WebGUI::Asset->newByDynamicClass($session, $storyId); + my $story = WebGUI::Asset->newById($session, $storyId); next STORY unless $story; push @{ $storyData }, $story->getRssData; } @@ -132,20 +110,21 @@ See WebGUI::Asset::prepareView() for details. =cut -sub prepareView { +around prepareView => sub { + my $orig = shift; my $self = shift; - $self->SUPER::prepareView(); - my $template = WebGUI::Asset::Template->new($self->session, $self->get("templateId")); + $self->$orig(@_); + my $template = WebGUI::Asset::Template->newById($self->session, $self->templateId); if (!$template) { WebGUI::Error::ObjectNotFound::Template->throw( error => qq{Template not found}, - templateId => $self->get("templateId"), + templateId => $self->templateId, assetId => $self->getId, ); } $template->prepare; $self->{_viewTemplate} = $template; -} +}; #------------------------------------------------------------------- @@ -180,10 +159,10 @@ sub viewTemplateVariables { my $session = $self->session; my $exporting = $session->scratch->get('isExporting'); my $numberOfStories = $self->{_standAlone} - ? $self->get('storiesPer') - : $self->get('storiesShort'); + ? $self->storiesPer + : $self->storiesShort; my $var = $self->get(); - my $wordList = WebGUI::Keyword::string2list($self->get('keywords')); + my $wordList = WebGUI::Keyword::string2list($self->keywords); my $key = WebGUI::Keyword->new($session); my $p = $key->getMatchingAssets({ sortOrder => $self->get('storySortOrder') || 'Chronologically', @@ -195,7 +174,7 @@ sub viewTemplateVariables { my $storyIds = $p->getPageData(); my $icon = $session->icon; - my $userUiLevel = $session->user->profileField("uiLevel"); + my $userUiLevel = $session->user->get("uiLevel"); my $uiLevels = $session->config->get('assetToolbarUiLevel'); my $i18n = WebGUI::International->new($session); my $url = $session->url; @@ -224,9 +203,7 @@ sub viewTemplateVariables { } grep { $_ } map { - WebGUI::Asset->new( - $session, @{ $_ }{ qw( assetId className revisionDate ) } - ) + WebGUI::Asset->newById( $session, $_->{assetId} ) } @{ $storyIds } ]; @@ -235,12 +212,12 @@ sub viewTemplateVariables { my $topStoryData = $storyIds->[0]; my $topStoryVars = shift @{ $var->{story_loop} }; ##Note, this could have saved from the loop above, but this looks more clean and encapsulated to me. - my $topStory = WebGUI::Asset->new($session, $topStoryData->{assetId}, $topStoryData->{className}, $topStoryData->{revisionDate}); + my $topStory = WebGUI::Asset->newById($session, $topStoryData->{assetId}, $topStoryData->{revisionDate}); $var->{topStory} = $topStoryVars; $var->{topStoryTitle} = $topStory->getTitle; - $var->{topStorySubtitle} = $topStory->get('subtitle'); + $var->{topStorySubtitle} = $topStory->subtitle; $var->{topStoryUrl} = $session->url->append($self->getUrl, 'func=viewStory;assetId='.$topStoryData->{assetId}), - $var->{topStoryCreationDate} = $topStory->get('creationDate'); + $var->{topStoryCreationDate} = $topStory->creationDate; $var->{topStoryEditIcon} = $topStoryVars->{editIcon}; $var->{topStoryDeleteIcon} = $topStoryVars->{deleteIcon}; ##TODO: Photo variables @@ -277,11 +254,11 @@ variables are set correctly in viewTemplateVars. =cut -sub www_view { +override www_view => sub { my $self = shift; $self->{_standAlone} = 1; - return $self->SUPER::www_view; -} + return super(); +}; #------------------------------------------------------------------- @@ -298,7 +275,7 @@ sub www_viewStory { my $storyId = $session->form->get('assetId'); my $story; if ($storyId) { - $story = WebGUI::Asset->new($session, $storyId); + $story = WebGUI::Asset->newById($session, $storyId); } if (! $story) { my $notFound = WebGUI::Asset->getNotFound($session); @@ -310,5 +287,6 @@ sub www_viewStory { } +__PACKAGE__->meta->make_immutable; 1; #vim:ft=perl diff --git a/lib/WebGUI/Asset/Wobject/Survey.pm b/lib/WebGUI/Asset/Wobject/Survey.pm index 4ed7a96b2..2c01df7d2 100644 --- a/lib/WebGUI/Asset/Wobject/Survey.pm +++ b/lib/WebGUI/Asset/Wobject/Survey.pm @@ -1,7 +1,7 @@ package WebGUI::Asset::Wobject::Survey; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -11,12 +11,221 @@ package WebGUI::Asset::Wobject::Survey; #------------------------------------------------------------------- use strict; -use Tie::IxHash; use JSON; use WebGUI::International; use WebGUI::Form::File; -use WebGUI::Utility; -use base 'WebGUI::Asset::Wobject'; +use Moose; +use WebGUI::Definition::Asset; +extends 'WebGUI::Asset::Wobject'; +define assetName => ['assetName', 'Asset_Survey']; +define icon => 'survey.gif'; +define tableName => 'Survey'; +property exitURL => ( + fieldType => 'text', + default => undef, + tab => 'properties', + label => ['Survey Exit URL', 'Asset_Survey'], + hoverHelp => ['Survey Exit URL help', 'Asset_Survey'], + ); +property timeLimit => ( + fieldType => 'integer', + default => 0, + tab => 'properties', + label => ['timelimit', 'Asset_Survey'], + hoverHelp => ['timelimit hoverHelp', 'Asset_Survey'], + ); +property maxResponsesPerUser => ( + fieldType => 'integer', + tab => 'properties', + default => 1, + label => ['Max user responses', 'Asset_Survey'], + hoverHelp => ['Max user responses help', 'Asset_Survey'], + ); +property doAfterTimeLimit => ( + fieldType => 'selectBox', + default => 'exitUrl', + tab => 'properties', + hoverHelp => ['do after timelimit hoverHelp', 'Asset_Survey'], + label => ['do after timelimit label', 'Asset_Survey'], + options => \&_doAfterTimeLimit_options, + ); +sub _doAfterTimeLimit_options { + my $session = shift->session; + my $i18n = WebGUI::International->new($session, 'Asset_Survey'); + my $options = { + 'exitUrl' => $i18n->get('exit url label'), + 'restartSurvey' => $i18n->get('restart survey label'), + }; + return $options; +} +property onSurveyEndWorkflowId => ( + tab => 'properties', + default => undef, + type => 'WebGUI::Asset::Wobject::Survey', + fieldType => 'workflow', + label => 'Survey End Workflow', + hoverHelp => 'Workflow to run when user completes the Survey', + ); +property allowBackBtn => ( + fieldType => 'yesNo', + default => 0, + tab => 'properties', + label => ['Allow back button', 'Asset_Survey'], + hoverHelp => ['Allow back button help', 'Asset_Survey'], + ); + + # Display Tab +property templateId => ( + fieldType => 'template', + default => 'PBtmpl0000000000000061', + tab => 'display', + namespace => 'Survey', + label => ['survey template', 'Asset_Survey'], + hoverHelp => ['survey template help', 'Asset_Survey'], + ); +property surveySummaryTemplateId => ( + tab => 'display', + fieldType => 'template', + label => ['Survey Summary Template', 'Asset_Survey'], + hoverHelp => ['Survey Summary Template help', 'Asset_Survey'], + default => '7F-BuEHi7t9bPi008H8xZQ', + namespace => 'Survey/Summary', + ); +property surveyTakeTemplateId => ( + tab => 'display', + fieldType => 'template', + label => ['Take Survey Template', 'Asset_Survey'], + hoverHelp => ['Take Survey Template help', 'Asset_Survey'], + default => 'd8jMMMRddSQ7twP4l1ZSIw', + namespace => 'Survey/Take', + ); +property surveyQuestionsId => ( + tab => 'display', + fieldType => 'template', + label => ['Questions Template', 'Asset_Survey'], + hoverHelp => ['Questions Template help', 'Asset_Survey'], + default => 'CxMpE_UPauZA3p8jdrOABw', + namespace => 'Survey/Take', + ); +property surveyEditTemplateId => ( + tab => 'display', + fieldType => 'template', + label => ['Survey Edit Template', 'Asset_Survey'], + hoverHelp => ['Survey Edit Template help', 'Asset_Survey'], + default => 'GRUNFctldUgop-qRLuo_DA', + namespace => 'Survey/Edit', + ); +property sectionEditTemplateId => ( + tab => 'display', + fieldType => 'template', + label => ['Section Edit Template', 'Asset_Survey'], + hoverHelp => ['Section Edit Template help', 'Asset_Survey'], + default => '1oBRscNIcFOI-pETrCOspA', + namespace => 'Survey/Edit', + ); +property questionEditTemplateId => ( + tab => 'display', + fieldType => 'template', + label => ['Question Edit Template', 'Asset_Survey'], + hoverHelp => ['Question Edit Template help', 'Asset_Survey'], + default => 'wAc4azJViVTpo-2NYOXWvg', + namespace => 'Survey/Edit', + ); +property answerEditTemplateId => ( + tab => 'display', + fieldType => 'template', + label => ['Answer Edit Template', 'Asset_Survey'], + hoverHelp => ['Answer Edit Template help', 'Asset_Survey'], + default => 'AjhlNO3wZvN5k4i4qioWcg', + namespace => 'Survey/Edit', + ); +property feedbackTemplateId => ( + tab => 'display', + fieldType => 'template', + default => 'nWNVoMLrMo059mDRmfOp9g', + label => ['Feedback Template', 'Asset_Survey'], + hoverHelp => ['Feedback Template help', 'Asset_Survey'], + namespace => 'Survey/Feedback', + ); +property overviewTemplateId => ( + tab => 'display', + fieldType => 'template', + default => 'PBtmpl0000000000000063', + label => ['Overview Report Template', 'Asset_Survey'], + hoverHelp => ['Overview Report Template help', 'Asset_Survey'], + namespace => 'Survey/Overview', + ); +property gradebookTemplateId => ( + tab => 'display', + fieldType => 'template', + label => ['Gradebook Report Template', 'Asset_Survey'], + hoverHelp => ['Gradebook Report Template help', 'Asset_Survey'], + default => 'PBtmpl0000000000000062', + namespace => 'Survey/Gradebook', + ); +property testResultsTemplateId => ( + tab => 'display', + fieldType => 'template', + label => ['test results template', 'Asset_Survey'], + hoverHelp => ['test results template help', 'Asset_Survey'], + default => 'S3zpVitAmhy58CAioH359Q', + namespace => 'Survey/TestResults', + ); +property showProgress => ( + fieldType => 'yesNo', + default => 0, + tab => 'display', + label => ['Show user their progress', 'Asset_Survey'], + hoverHelp => ['Show user their progress help', 'Asset_Survey'], + ); +property showTimeLimit => ( + fieldType => 'yesNo', + default => 0, + tab => 'display', + label => ['Show user their time remaining', 'Asset_Survey'], + hoverHelp => ['Show user their time remaining', 'Asset_Survey'], + ); +property quizModeSummary => ( + fieldType => 'yesNo', + default => 0, + tab => 'display', + label => ['Quiz mode summaries', 'Asset_Survey'], + hoverHelp => ['Quiz mode summaries help', 'Asset_Survey'], + ); + + # Security Tab +property groupToEditSurvey => ( + fieldType => 'group', + tab => 'security', + default => 4, + label => ['Group to edit survey', 'Asset_Survey'], + hoverHelp => ['Group to edit survey help', 'Asset_Survey'], + ); +property groupToTakeSurvey => ( + fieldType => 'group', + tab => 'security', + default => 2, + label => ['Group to take survey', 'Asset_Survey'], + hoverHelp => ['Group to take survey help', 'Asset_Survey'], + ); +property groupToViewReports => ( + fieldType => 'group', + tab => 'security', + default => 4, + label => ['Group to view reports', 'Asset_Survey'], + hoverHelp => ['Group to view reports help', 'Asset_Survey'], + ); + + # Other +property surveyJSON => ( + fieldType => 'text', + default => '', + autoGenerate => 0, + noFormPost => 1, + ); + + + use WebGUI::Asset::Wobject::Survey::SurveyJSON; use WebGUI::Asset::Wobject::Survey::ResponseJSON; use WebGUI::Asset::Wobject::Survey::Test; @@ -24,241 +233,48 @@ use WebGUI::Form::Country; use WebGUI::VersionTag; use Text::CSV_XS; use Params::Validate qw(:all); -use WebGUI::Macro; Params::Validate::validation_options( on_fail => sub { WebGUI::Error::InvalidParam->throw( error => shift ) } ); -#------------------------------------------------------------------- +#---------------------------------------------------------------------------- -=head2 definition ( session, [definition] ) +=head2 getHelpers ( ) -Returns an array reference of definitions. Adds tableName, className, properties to array definition. - -=head3 definition - -An array of hashes to prepend to the list +Add survey-specific URLs to the asset helpers list =cut -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift; - my $i18n = WebGUI::International->new( $session, 'Asset_Survey' ); - my %properties; - tie %properties, 'Tie::IxHash'; ## no critic - %properties = ( - # Properties Tab - exitURL => { - fieldType => 'text', - defaultValue => undef, - tab => 'properties', - label => $i18n->get('Survey Exit URL'), - hoverHelp => $i18n->get('Survey Exit URL help'), - }, - maxResponsesPerUser => { - fieldType => 'integer', - tab => 'properties', - defaultValue => 1, - label => $i18n->get('Max user responses'), - hoverHelp => $i18n->get('Max user responses help'), - }, - timeLimit => { - fieldType => 'integer', - defaultValue => 0, - tab => 'properties', - label => $i18n->get('timelimit'), - hoverHelp => $i18n->get('timelimit hoverHelp'), - }, - doAfterTimeLimit => { - fieldType => 'selectBox', - defaultValue => 'exitUrl', - tab => 'properties', - hoverHelp => $i18n->get('do after timelimit hoverHelp'), - label => $i18n->get('do after timelimit label'), - options => { - 'exitUrl' => $i18n->get('exit url label'), - 'restartSurvey' => $i18n->get('restart survey label'), - }, - }, - onSurveyEndWorkflowId => { - tab => 'properties', - defaultValue => undef, - type => 'WebGUI::Asset::Wobject::Survey', - fieldType => 'workflow', - label => 'Survey End Workflow', - hoverHelp => 'Workflow to run when user completes the Survey', - none => 1, - }, - allowBackBtn => { - fieldType => 'yesNo', - defaultValue => 0, - tab => 'properties', - label => $i18n->get('Allow back button'), - hoverHelp => $i18n->get('Allow back button help'), - }, - - # Display Tab - templateId => { - fieldType => 'template', - defaultValue => 'PBtmpl0000000000000061', - tab => 'display', - namespace => 'Survey', - label => $i18n->get('survey template'), - hoverHelp => $i18n->get('survey template help'), - }, - surveySummaryTemplateId => { - tab => 'display', - fieldType => 'template', - label => $i18n->get('Survey Summary Template'), - hoverHelp => $i18n->get('Survey Summary Template help'), - defaultValue => '7F-BuEHi7t9bPi008H8xZQ', - namespace => 'Survey/Summary', - }, - surveyTakeTemplateId => { - tab => 'display', - fieldType => 'template', - label => $i18n->get('Take Survey Template'), - hoverHelp => $i18n->get('Take Survey Template help'), - defaultValue => 'd8jMMMRddSQ7twP4l1ZSIw', - namespace => 'Survey/Take', - }, - surveyQuestionsId => { - tab => 'display', - fieldType => 'template', - label => $i18n->get('Questions Template'), - hoverHelp => $i18n->get('Questions Template help'), - defaultValue => 'CxMpE_UPauZA3p8jdrOABw', - namespace => 'Survey/Take', - }, - surveyEditTemplateId => { - tab => 'display', - fieldType => 'template', - label => $i18n->get('Survey Edit Template'), - hoverHelp => $i18n->get('Survey Edit Template help'), - defaultValue => 'GRUNFctldUgop-qRLuo_DA', - namespace => 'Survey/Edit', - }, - sectionEditTemplateId => { - tab => 'display', - fieldType => 'template', - label => $i18n->get('Section Edit Template'), - hoverHelp => $i18n->get('Section Edit Template help'), - defaultValue => '1oBRscNIcFOI-pETrCOspA', - namespace => 'Survey/Edit', - }, - questionEditTemplateId => { - tab => 'display', - fieldType => 'template', - label => $i18n->get('Question Edit Template'), - hoverHelp => $i18n->get('Question Edit Template help'), - defaultValue => 'wAc4azJViVTpo-2NYOXWvg', - namespace => 'Survey/Edit', - }, - answerEditTemplateId => { - tab => 'display', - fieldType => 'template', - label => $i18n->get('Answer Edit Template'), - hoverHelp => $i18n->get('Answer Edit Template help'), - defaultValue => 'AjhlNO3wZvN5k4i4qioWcg', - namespace => 'Survey/Edit', - }, - feedbackTemplateId => { - tab => 'display', - fieldType => 'template', - defaultValue => 'nWNVoMLrMo059mDRmfOp9g', - label => $i18n->get('Feedback Template'), - hoverHelp => $i18n->get('Feedback Template help'), - namespace => 'Survey/Feedback', - }, - overviewTemplateId => { - tab => 'display', - fieldType => 'template', - defaultValue => 'PBtmpl0000000000000063', - label => $i18n->get('Overview Report Template'), - hoverHelp => $i18n->get('Overview Report Template help'), - namespace => 'Survey/Overview', - }, - gradebookTemplateId => { - tab => 'display', - fieldType => 'template', - label => $i18n->get('Gradebook Report Template'), - hoverHelp => $i18n->get('Gradebook Report Template help'), - defaultValue => 'PBtmpl0000000000000062', - namespace => 'Survey/Gradebook', - }, - testResultsTemplateId => { - tab => 'display', - fieldType => 'template', - label => $i18n->get('test results template'), - hoverHelp => $i18n->get('test results template help'), - defaultValue => 'S3zpVitAmhy58CAioH359Q', - namespace => 'Survey/TestResults', - }, - showProgress => { - fieldType => 'yesNo', - defaultValue => 0, - tab => 'display', - label => $i18n->get('Show user their progress'), - hoverHelp => $i18n->get('Show user their progress help'), - }, - showTimeLimit => { - fieldType => 'yesNo', - defaultValue => 0, - tab => 'display', - label => $i18n->get('Show user their time remaining'), - hoverHelp => $i18n->get('Show user their time remaining'), - }, - quizModeSummary => { - fieldType => 'yesNo', - defaultValue => 0, - tab => 'display', - label => $i18n->get('Quiz mode summaries'), - hoverHelp => $i18n->get('Quiz mode summaries help'), - }, - - # Security Tab - groupToEditSurvey => { - fieldType => 'group', - tab => 'security', - defaultValue => 4, - label => $i18n->get('Group to edit survey'), - hoverHelp => $i18n->get('Group to edit survey help'), - }, - groupToTakeSurvey => { - fieldType => 'group', - tab => 'security', - defaultValue => 2, - label => $i18n->get('Group to take survey'), - hoverHelp => $i18n->get('Group to take survey help'), - }, - groupToViewReports => { - fieldType => 'group', - tab => 'security', - defaultValue => 4, - label => $i18n->get('Group to view reports'), - hoverHelp => $i18n->get('Group to view reports help'), - }, - - # Other - surveyJSON => { - fieldType => 'text', - defaultValue => '', - autoGenerate => 0, - noFormPost => 1, - }, - ); +override getHelpers => sub { + my ( $self ) = @_; + my $helpers = super(); + my $i18n = WebGUI::International->new($self->session, "Asset_Survey"); - push @{$definition}, { - assetName => $i18n->get('assetName'), - icon => 'survey.gif', - autoGenerateForms => 1, - tableName => 'Survey', - className => 'WebGUI::Asset::Wobject::Survey', - properties => \%properties - }; + $helpers->{edit_survey} = { + url => $self->getUrl("func=editSurvey"), + label => $i18n->get('edit survey'), + }; + $helpers->{take_survey} = { + url => $self->getUrl("func=takeSurvey"), + label => $i18n->get('take survey'), + }; + $helpers->{graph} = { + url => $self->getUrl("func=graph"), + label => $i18n->get('visualize'), + }; + $helpers->{edit_tests} = { + url => $self->getUrl("func=editTestSuite"), + label => $i18n->get("test suite"), + }; + $helpers->{run_tests} = { + url => $self->getUrl("func=runTests"), + label => $i18n->get("run all tests"), + }; + $helpers->{run_tests_tap} = { + url => $self->getUrl("func=runTests;format=tap"), + label => $i18n->get("run all tests") . " (TAP)", + }; - return $class->SUPER::definition( $session, $definition ); -} + return $helpers; +}; #------------------------------------------------------------------- @@ -271,7 +287,7 @@ and automatically calls L<"persistSurveyJSON"> afterwards. sub surveyJSON_update { my $self = shift; - my $ret = $self->surveyJSON->update(@_); + my $ret = $self->getSurveyJSON->update(@_); $self->persistSurveyJSON(); return $ret; } @@ -287,7 +303,7 @@ and automatically calls L<"persistSurveyJSON"> afterwards. sub surveyJSON_copy { my $self = shift; - my $ret =$self->surveyJSON->copy(@_); + my $ret =$self->getSurveyJSON->copy(@_); $self->persistSurveyJSON(); return $ret; } @@ -303,7 +319,7 @@ and automatically calls L<"persistSurveyJSON"> afterwards. sub surveyJSON_remove { my $self = shift; - my $ret = $self->surveyJSON->remove(@_); + my $ret = $self->getSurveyJSON->remove(@_); $self->persistSurveyJSON(); return $ret; } @@ -319,7 +335,7 @@ and automatically calls L<"persistSurveyJSON"> afterwards. sub surveyJSON_newObject { my $self = shift; - my $ret = $self->surveyJSON->newObject(@_); + my $ret = $self->getSurveyJSON->newObject(@_); $self->persistSurveyJSON(); return $ret; } @@ -342,7 +358,7 @@ sub recordResponses { #------------------------------------------------------------------- -=head2 surveyJSON ( [json] ) +=head2 getSurveyJSON ( [json] ) Lazy-loading mutator for the L property. @@ -358,7 +374,7 @@ will be used to instantiate the SurveyJSON instance rather than querying the dat =cut -sub surveyJSON { +sub getSurveyJSON { my $self = shift; my ($json) = validate_pos(@_, { type => SCALAR, optional => 1 }); @@ -366,7 +382,7 @@ sub surveyJSON { # See if we need to load surveyJSON from the database if ( !defined $json ) { - $json = $self->get("surveyJSON"); + $json = $self->surveyJSON; } # Instantiate the SurveyJSON instance, and store it @@ -414,7 +430,7 @@ sub responseJSON { } # Instantiate the ResponseJSON instance, and store it - $self->{_responseJSON} = WebGUI::Asset::Wobject::Survey::ResponseJSON->new( $self->surveyJSON, $json ); + $self->{_responseJSON} = WebGUI::Asset::Wobject::Survey::ResponseJSON->new( $self->getSurveyJSON, $json ); } return $self->{_responseJSON}; @@ -544,7 +560,7 @@ sub graph { my @fall_through; my $sNum = 0; - foreach my $s ( @{ $self->surveyJSON->sections } ) { + foreach my $s ( @{ $self->getSurveyJSON->sections } ) { $sNum++; my $s_id = $s->{variable} || "S$sNum"; @@ -670,36 +686,10 @@ sub www_editSurvey { my $self = shift; return $self->session->privilege->insufficient() - if !$self->session->user->isInGroup( $self->get('groupToEditSurvey') ); + if !$self->session->user->isInGroup( $self->groupToEditSurvey ); return $self->session->privilege->locked() unless $self->canEditIfLocked; - return $self->processTemplate( {}, $self->get('surveyEditTemplateId') ); -} - -#------------------------------------------------------------------- - -=head2 getAdminConsole - -Extends the base class to add in survey controls like edit, view graph, run tests, and -test suite. - -=cut - -sub getAdminConsole { - my $self = shift; - my $ac = $self->SUPER::getAdminConsole; - unless ($self->{_modifiedAdminConsole}) { - my $i18n = WebGUI::International->new($self->session, "Asset_Survey"); - $ac->addSubmenuItem($self->session->url->page("func=edit"), WebGUI::International->new($self->session, "WebGUI")->get(575)); - $ac->addSubmenuItem($self->session->url->page("func=editSurvey"), $i18n->get('edit survey')); - $ac->addSubmenuItem($self->session->url->page("func=takeSurvey"), $i18n->get('take survey')); - $ac->addSubmenuItem($self->session->url->page("func=graph"), $i18n->get('visualize')); - $ac->addSubmenuItem($self->session->url->page("func=editTestSuite"), $i18n->get("test suite")); - $ac->addSubmenuItem($self->session->url->page("func=runTests"), $i18n->get("run all tests")); - $ac->addSubmenuItem($self->session->url->page("func=runTests;format=tap"), $i18n->get("run all tests") . " (TAP)"); - $self->{_modifiedAdminConsole} = 1; - } - return $ac; + return $self->processTemplate( {}, $self->surveyEditTemplateId ); } #------------------------------------------------------------------- @@ -716,26 +706,24 @@ sub www_graph { my $session = $self->session; return $self->session->privilege->insufficient() - if !$self->session->user->isInGroup( $self->get('groupToEditSurvey') ); + if !$self->session->user->isInGroup( $self->groupToEditSurvey ); my $i18n = WebGUI::International->new($session, "Asset_Survey"); - my $ac = $self->getAdminConsole; - eval { require GraphViz }; if ($@) { - return $ac->render('Survey Visualization requires the GraphViz module', $i18n->get('survey visualization')); + return '

    ' . $i18n->get('survey visualization') . '

    Survey Visualization requires the GraphViz module'; } my $format = $self->session->form->param('format'); my $layout = $self->session->form->param('layout'); - my $f = WebGUI::HTMLForm->new($session); - $f->hidden( + my $f = WebGUI::FormBuilder->new($session, action => $self->getUrl); + $f->addField( "hidden", name=>'func', value=>'graph' ); - $f->selectBox( + $f->addField( "selectBox", name => 'format', label => $i18n->get('visualization format'), hoverHelp => $i18n->get('visualization format help'), @@ -743,7 +731,7 @@ sub www_graph { defaultValue => [$format], sortByValue => 1, ); - $f->selectBox( + $f->addField( "selectBox", name => 'layout', label => $i18n->get('visualization layout algorithm'), hoverHelp => $i18n->get('visualization layout algorithm help'), @@ -751,7 +739,7 @@ sub www_graph { defaultValue => [$layout], sortByValue => 1, ); - $f->submit( + $f->addField( "submit", defaultValue => $i18n->get('generate'), ); @@ -761,7 +749,7 @@ sub www_graph { $output .= "

    " . $i18n->get('visualization success') . qq{ survey.$format

    }; } } - return $ac->render($f->print . $output, $i18n->get('survey visualization')); + return '

    ' . $i18n->get('survey visualization') . '

    ' . $f->toHtml . $output; } =head2 hasResponses @@ -777,7 +765,7 @@ sub hasResponses { return $self->session->db->quickScalar( 'select count(*) from Survey_response where assetId = ? and revisionDate = ?', - [ $self->getId, $self->get('revisionDate') ] ) > 0; + [ $self->getId, $self->revisionDate ] ) > 0; } #------------------------------------------------------------------- @@ -796,7 +784,7 @@ How long the user has to take the survey, in minutes. Defaults to the value of C sub hasTimedOut { my $self = shift; my $limit = shift; - $limit = $self->get('timeLimit') if not defined $limit; + $limit = $self->timeLimit if not defined $limit; return $limit > 0 && $self->startDate + $limit * 60 < time; } @@ -860,20 +848,19 @@ sub submitObjectEdit { # We will create a new revision if any responses exist for the current revision if ($self->hasResponses) { $self->session->log->debug( "Creating a new revision, responses exist for the current revision: " - . $self->get('revisionDate') ); + . $self->revisionDate ); # New revision should be created and then committed automatically - my $oldVersionTag = WebGUI::VersionTag->getWorking($session, 'noCreate'); my $newVersionTag = WebGUI::VersionTag->create($session, { workflowId => 'pbworkflow00000000003', }); - $newVersionTag->setWorking; # Create the new revision - $survey = $self->addRevision; + $survey = $self->addRevision({ + tagId => $newVersionTag->getId, + status => "pending", + }); $newVersionTag->commit(); - - #Restore the old one, if it exists - $oldVersionTag->setWorking() if $oldVersionTag; + $survey = $survey->cloneFromDb; } # See if any special actions were requested.. @@ -913,7 +900,7 @@ sub www_submitObjectEdit { my $self = shift; return $self->session->privilege->insufficient() - unless $self->session->user->isInGroup( $self->get('groupToEditSurvey') ); + unless $self->session->user->isInGroup( $self->groupToEditSurvey ); return $self->session->privilege->locked() unless $self->canEditIfLocked; @@ -941,7 +928,7 @@ sub www_jumpTo { my $self = shift; return $self->session->privilege->insufficient() - if !$self->session->user->isInGroup( $self->get('groupToEditSurvey') ); + if !$self->session->user->isInGroup( $self->groupToEditSurvey ); my $id = $self->session->form->param('id'); @@ -1006,7 +993,7 @@ Specifies which questionType to delete. sub removeType{ my $self = shift; my $address = shift; - $self->surveyJSON->removeType($address); + $self->getSurveyJSON->removeType($address); $self->persistSurveyJSON(); return $self->www_loadSurvey( { address => $address } ); @@ -1032,7 +1019,7 @@ sub addType{ my $self = shift; my $name = shift; my $address = shift; - $self->surveyJSON->addType($name,$address); + $self->getSurveyJSON->addType($name,$address); $self->persistSurveyJSON(); return $self->www_loadSurvey( { address => $address } ); } @@ -1108,7 +1095,7 @@ sub www_newObject { my $self = shift; return $self->session->privilege->insufficient() - if !$self->session->user->isInGroup( $self->get('groupToEditSurvey') ); + if !$self->session->user->isInGroup( $self->groupToEditSurvey ); my $ref; @@ -1117,7 +1104,7 @@ sub www_newObject { my @inAddress = split /-/, $ids; # Don't save after this as the new object should not stay in the survey - my $address = $self->surveyJSON->newObject( \@inAddress ); + my $address = $self->getSurveyJSON->newObject( \@inAddress ); # The new temp object has an address of NEW, which means it is not a real final address. return $self->www_loadSurvey( { address => $address, message => undef } ); @@ -1137,15 +1124,15 @@ sub www_dragDrop { my $self = shift; return $self->session->privilege->insufficient() - if !$self->session->user->isInGroup( $self->get('groupToEditSurvey') ); + if !$self->session->user->isInGroup( $self->groupToEditSurvey ); my $p = from_json( $self->session->form->process('data') ); my @tid = split /-/, $p->{target}->{id}; my @bid = split /-/, $p->{before}->{id}; - my $target = $self->surveyJSON->getObject( \@tid ); - $self->surveyJSON->remove( \@tid, 1 ); + my $target = $self->getSurveyJSON->getObject( \@tid ); + $self->getSurveyJSON->remove( \@tid, 1 ); my $address = [0]; if ( @tid == 1 ) { @@ -1158,7 +1145,7 @@ sub www_dragDrop { #If target is being moved down, then before has just moved up do to the target being deleted $bid[0]-- if($tid[0] < $bid[0]); - $address = $self->surveyJSON->insertObject( $target, [ $bid[0] ] ); + $address = $self->getSurveyJSON->insertObject( $target, [ $bid[0] ] ); } elsif ( @tid == 2 ) { #questions can be moved to any section, but a pushed to the end of a new section. if ( $bid[0] !~ /\d/ ) { @@ -1176,27 +1163,27 @@ sub www_dragDrop { } else { #else move to the end of the selected section - $bid[1] = $#{ $self->surveyJSON->questions( [ $bid[0] ] ) }; + $bid[1] = $#{ $self->getSurveyJSON->questions( [ $bid[0] ] ) }; } } ## end elsif ( @bid == 1 ) else{ #Moved within the same section $bid[1]-- if($tid[1] < $bid[1]); } - $address = $self->surveyJSON->insertObject( $target, [ $bid[0], $bid[1] ] ); + $address = $self->getSurveyJSON->insertObject( $target, [ $bid[0], $bid[1] ] ); } ## end elsif ( @tid == 2 ) elsif ( @tid == 3 ) { #answers can only be rearranged in the same question if ( @bid == 2 and $bid[1] == $tid[1] ) {#moved to the top of the question $bid[2] = -1; - $address = $self->surveyJSON->insertObject( $target, [ $bid[0], $bid[1], $bid[2] ] ); + $address = $self->getSurveyJSON->insertObject( $target, [ $bid[0], $bid[1], $bid[2] ] ); } elsif ( @bid == 3 ) { #If target is being moved down, then before has just moved up do to the target being deleted $bid[2]-- if($tid[2] < $bid[2]); - $address = $self->surveyJSON->insertObject( $target, [ $bid[0], $bid[1], $bid[2] ] ); + $address = $self->getSurveyJSON->insertObject( $target, [ $bid[0], $bid[1], $bid[2] ] ); } else { #else put it back where it was - $address = $self->surveyJSON->insertObject( $target, \@tid ); + $address = $self->getSurveyJSON->insertObject( $target, \@tid ); } } @@ -1242,23 +1229,23 @@ sub www_loadSurvey { my $var = defined $options->{var} ? $options->{var} - : $self->surveyJSON->getEditVars($address); + : $self->getSurveyJSON->getEditVars($address); my $editHtml; if ( $var->{type} eq 'section' ) { - $editHtml = $self->processTemplate( $var, $self->get('sectionEditTemplateId') ); + $editHtml = $self->processTemplate( $var, $self->sectionEditTemplateId ); } elsif ( $var->{type} eq 'question' ) { - $editHtml = $self->processTemplate( $var, $self->get('questionEditTemplateId') ); + $editHtml = $self->processTemplate( $var, $self->questionEditTemplateId ); } elsif ( $var->{type} eq 'answer' ) { - $editHtml = $self->processTemplate( $var, $self->get('answerEditTemplateId') ); + $editHtml = $self->processTemplate( $var, $self->answerEditTemplateId ); } WebGUI::Macro::process($self->session, \$editHtml); # Generate the list of valid goto targets - my $gotoTargets = $self->surveyJSON->getGotoTargets; + my $gotoTargets = $self->getSurveyJSON->getGotoTargets; my %buttons; $buttons{question} = $address->[0]; @@ -1266,7 +1253,7 @@ sub www_loadSurvey { $buttons{answer} = "$address->[0]-$address->[1]"; } - my $data = $self->surveyJSON->getDragDropList($address); + my $data = $self->getSurveyJSON->getDragDropList($address); my $html; my ( $scount, $qcount, $acount ) = ( -1, -1, -1 ); my $lastType; @@ -1307,7 +1294,7 @@ sub www_loadSurvey { } } $html = "
      $html
    "; - my $warnings = $self->surveyJSON->validateSurvey(); + my $warnings = $self->getSurveyJSON->validateSurvey(); my $return = { address => $address, # the address of the focused object @@ -1320,7 +1307,7 @@ sub www_loadSurvey { warnings => $warnings #List of warnings to display to the user }; - $self->session->http->setMimeType('application/json'); + $self->session->response->content_type('application/json'); return to_json($return); } @@ -1333,14 +1320,14 @@ See WebGUI::Asset::prepareView() for details. =cut -sub prepareView { +override prepareView => sub { my $self = shift; - $self->SUPER::prepareView(); - my $templateId = $self->get('templateId'); + super(); + my $templateId = $self->templateId; if ( $self->session->form->process('overrideTemplateId') ne q{} ) { $templateId = $self->session->form->process('overrideTemplateId'); } - my $template = WebGUI::Asset::Template->new( $self->session, $templateId ); + my $template = WebGUI::Asset::Template->newById( $self->session, $templateId ); if (!$template) { WebGUI::Error::ObjectNotFound::Template->throw( error => qq{Template not found}, @@ -1351,7 +1338,7 @@ sub prepareView { $template->prepare; $self->{_viewTemplate} = $template; return; -} +}; #------------------------------------------------------------------- @@ -1361,27 +1348,13 @@ Completely remove from WebGUI. =cut -sub purge { +override purge => sub { my $self = shift; $self->session->db->write( 'delete from Survey_response where assetId = ?', [ $self->getId() ] ); $self->session->db->write( 'delete from Survey_tempReport where assetId = ?', [ $self->getId() ] ); $self->session->db->write( 'delete from Survey where assetId = ?', [ $self->getId() ] ); - return $self->SUPER::purge; -} - -#------------------------------------------------------------------- - -=head2 purgeCache ( ) - -See WebGUI::Asset::purgeCache() for details. - -=cut - -sub purgeCache { - my $self = shift; - WebGUI::Cache->new( $self->session, 'view_' . $self->getId )->delete; - return $self->SUPER::purgeCache; -} + return super(); +}; #------------------------------------------------------------------- @@ -1399,7 +1372,7 @@ sub view { my $responseDetails = $self->getResponseDetails || {}; # Add lastResponse template vars - for my $tv qw(endDate complete restart timeout timeoutRestart) { + for my $tv (qw(endDate complete restart timeout timeoutRestart)) { $var->{"lastResponse\u$tv"} = $responseDetails->{$tv}; } $var->{lastResponseFeedback} = $responseDetails->{templateText}; @@ -1428,8 +1401,8 @@ sub getMenuVars { view_statistical_overview_url => $self->getUrl('func=viewStatisticalOverview'), view_grade_book_url => $self->getUrl('func=viewGradeBook'), user_canTakeSurvey => $self->canTakeSurvey, - user_canViewReports => $self->session->user->isInGroup( $self->get('groupToViewReports') ), - user_canEditSurvey => $self->session->user->isInGroup( $self->get('groupToEditSurvey') ), + user_canViewReports => $self->session->user->isInGroup( $self->groupToViewReports ), + user_canEditSurvey => $self->session->user->isInGroup( $self->groupToEditSurvey ), }; } @@ -1464,7 +1437,7 @@ sub getResponseDetails { my %opts = validate(@_, { userId => 0, responseId => 0, templateId => 0, isComplete => 0} ); my $responseId = $opts{responseId}; my $userId = $opts{userId} || $self->session->user->userId; - my $templateId = $opts{templateId} || $self->get('feedbackTemplateId') || 'nWNVoMLrMo059mDRmfOp9g'; + my $templateId = $opts{templateId} || $self->feedbackTemplateId || 'nWNVoMLrMo059mDRmfOp9g'; my $isComplete = $opts{isComplete}; # By default, get most recent completed response with any complete code (e.g. isComplete > 0) @@ -1477,9 +1450,9 @@ sub getResponseDetails { "select Survey_responseId, revisionDate from Survey_response where userId = ? and assetId = ? and $isCompleteClause order by endDate desc limit 1", [ $userId, $self->getId ]); - if ($responseId && $revisionDate != $self->get('revisionDate')) { + if ($responseId && $revisionDate != $self->revisionDate) { $self->session->log->debug("Revision Date $revisionDate for retrieved responseId $responseId does not match instantiated object " - . $self->getId . " revision date " . $self->get('revisionDate') . ". getResponseDetails could possibly do weird things."); + . $self->getId . " revision date " . $self->revisionDate . ". getResponseDetails could possibly do weird things."); } } @@ -1563,7 +1536,7 @@ sub newByResponseId { return; } - if (my $survey = $class->new($session, $assetId, 'WebGUI::Asset::Wobject::Survey', $revisionDate)) { + if (my $survey = $class->newById($session, $assetId, $revisionDate)) { # Set the responseId manually rather than calling $self->responseId so that we # can load a response regardless of whether it's marked isComplete $survey->{responseId} = $responseId; @@ -1600,7 +1573,7 @@ sub www_takeSurvey { my $responseId = $self->responseId({ignoreRevisionDate => 1}); my $revision = $self->session->db->quickScalar("select revisionDate from Survey_response where Survey_responseId = ?", [ $responseId ]); - my $out = $self->processTemplate( { revision => $revision }, $self->get('surveyTakeTemplateId') ); + my $out = $self->processTemplate( { revision => $revision }, $self->surveyTakeTemplateId ); return $self->processStyle($out); } @@ -1616,7 +1589,7 @@ sub www_deleteResponses { my $self = shift; return $self->session->privilege->insufficient() - if !$self->session->user->isInGroup( $self->get('groupToEditSurvey') ); + if !$self->session->user->isInGroup( $self->groupToEditSurvey ); $self->session->db->write( 'delete from Survey_response where assetId = ?', [ $self->getId ] ); @@ -1704,7 +1677,7 @@ sub www_goBack { return $self->surveyEnd(); } - if ( !$self->get('allowBackBtn') ) { + if ( !$self->allowBackBtn ) { $self->session->log->debug('allowBackBtn false, delegating to www_loadQuestions'); return $self->www_loadQuestions(); } @@ -1728,7 +1701,7 @@ the survey summary template. sub getSummary { my $self = shift; my $summary = $self->responseJSON->showSummary(); - my $out = $self->processTemplate( $summary, $self->get('surveySummaryTemplateId') ); + my $out = $self->processTemplate( $summary, $self->surveySummaryTemplateId ); return ($summary,$out); } @@ -1759,14 +1732,14 @@ sub www_showFeedback { return if !$responseUser; # Only continue if current user is allowed to view this response - unless ( $self->session->user->userId eq $responseUserId || $self->session->user->isInGroup( $self->get('groupToViewReports') ) ) { + unless ( $self->session->user->userId eq $responseUserId || $self->session->user->isInGroup( $self->groupToViewReports ) ) { $self->session->log->warn("User is not allowed to view responseId: $responseId, which belongs to user: $responseUserId"); return $self->session->privilege->insufficient(); } my $rd = $self->getResponseDetails( { responseId => $responseId } ) || {}; my $out = $rd->{templateText}; - return $self->session->style->process( $out, $self->get('styleTemplateId') ); + return $self->session->style->process( $out, $self->styleTemplateId ); } #------------------------------------------------------------------- @@ -1797,11 +1770,11 @@ sub www_loadQuestions { if ( $self->responseJSON->surveyEnd() ) { $self->session->log->debug('Response surveyEnd, so calling surveyEnd'); - if ( $self->get('quizModeSummary') ) { + if ( $self->quizModeSummary ) { if(! $self->session->form->param('shownsummary')){ my ($summary,$html) = $self->getSummary(); my $json = to_json( { type => 'summary', summary => $summary, html => $html }); - $self->session->http->setMimeType('application/json'); + $self->session->response->content_type('application/json'); return $json; } } @@ -1858,7 +1831,7 @@ sub surveyEnd { if ( my $responseId = $self->responseId( { noCreate => 1 } ) ) { # Decide if we should flag any special actions such as restart or timeout my $restart = $opts{restart}; - my $timeoutRestart = $opts{timeout} && $self->get('doAfterTimeLimit') eq 'restartSurvey'; + my $timeoutRestart = $opts{timeout} && $self->doAfterTimeLimit eq 'restartSurvey'; my $timeout = $opts{timeout}; # First thing to do is to end the current response (and flag why it happened) @@ -1888,7 +1861,7 @@ sub surveyEnd { } # Trigger workflow for everything else - if ( my $workflowId = $self->get('onSurveyEndWorkflowId') ) { + if ( my $workflowId = $self->onSurveyEndWorkflowId ) { $self->session->log->debug("Triggering onSurveyEndWorkflowId workflow: $workflowId"); WebGUI::Workflow::Instance->create( $self->session, @@ -1905,10 +1878,10 @@ sub surveyEnd { my $exitUrl = $opts{exitUrl}; undef $exitUrl if $exitUrl !~ /\w/; undef $exitUrl if $exitUrl eq 'undefined'; - $exitUrl = $exitUrl || $self->get('exitURL') || $self->getUrl || q{/}; + $exitUrl = $exitUrl || $self->exitURL || $self->getUrl || q{/}; $exitUrl = $self->session->url->gateway($exitUrl) if($exitUrl !~ /^https?:/i); my $json = to_json( { type => 'forward', url => $exitUrl } ); - $self->session->http->setMimeType('application/json'); + $self->session->response->content_type('application/json'); return $json; } @@ -1936,7 +1909,7 @@ sub prepareShowSurveyTemplate { elsif ( $text{ $q->{questionType} } ) { $q->{textType} = 1; } elsif ( $textArea{ $q->{questionType} } ) { $q->{textAreaType} = 1; } elsif ( $hidden{ $q->{questionType} } ) { $q->{hidden} = 1; } - elsif ( $self->surveyJSON->multipleChoiceTypes->{ $q->{questionType} } ) { + elsif ( $self->getSurveyJSON->multipleChoiceTypes->{ $q->{questionType} } ) { $q->{multipleChoice} = 1; if ( $q->{maxAnswers} > 1 ) { $q->{maxMoreOne} = 1; @@ -1989,20 +1962,20 @@ sub prepareShowSurveyTemplate { $section->{questions} = $questions; $section->{questionsAnswered} = $self->responseJSON->{questionsAnswered}; $section->{totalQuestions} = @{ $self->responseJSON->surveyOrder }; - $section->{showProgress} = $self->get('showProgress'); - $section->{showTimeLimit} = $self->get('showTimeLimit'); + $section->{showProgress} = $self->showProgress; + $section->{showTimeLimit} = $self->showTimeLimit; $section->{minutesLeft} - = int( ( ( $self->startDate() + ( 60 * $self->get('timeLimit') ) ) - time() ) / 60 ); + = int( ( ( $self->startDate() + ( 60 * $self->timeLimit ) ) - time() ) / 60 ); if(scalar @{$questions} == ($section->{totalQuestions} - $section->{questionsAnswered})){ $section->{isLastPage} = 1 } - $section->{allowBackBtn} = $self->get('allowBackBtn'); + $section->{allowBackBtn} = $self->allowBackBtn; - my $out = $self->processTemplate( $section, $self->get('surveyQuestionsId') ); + my $out = $self->processTemplate( $section, $self->surveyQuestionsId ); WebGUI::Macro::process($self->session, \$out); - $self->session->http->setMimeType('application/json'); + $self->session->response->content_type('application/json'); return to_json( { type => 'displayquestions', section => $section, questions => $questions, html => $out } ); } @@ -2013,14 +1986,14 @@ sub prepareShowSurveyTemplate { Serializes the SurveyJSON instance and persists it to the database. Calling this method is only required if you have directly accessed and modified -the L<"surveyJSON"> object. +the L object. =cut sub persistSurveyJSON { my $self = shift; - my $data = $self->surveyJSON->freeze(); + my $data = $self->getSurveyJSON->freeze(); $self->update({surveyJSON=>$data}); return; @@ -2082,7 +2055,7 @@ sub responseId { my $ignoreRevisionDate = $opts{ignoreRevisionDate}; my $user = WebGUI::User->new( $self->session, $userId ); - my $ip = $self->session->env->getIp; + my $ip = $self->session->request->address; my $responseId = $self->{responseId}; return $responseId if $responseId; @@ -2097,9 +2070,9 @@ sub responseId { [ $userId, $self->getId ] ); - if (!$ignoreRevisionDate && $responseId && $revisionDate != $self->get('revisionDate')) { + if (!$ignoreRevisionDate && $responseId && $revisionDate != $self->revisionDate) { $self->session->log->warn("Revision Date $revisionDate for retrieved responseId $responseId does not match instantiated object " - . $self->getId . " revision date " . $self->get('revisionDate') . ". Refusing to return response"); + . $self->getId . " revision date " . $self->revisionDate . ". Refusing to return response"); return; } } @@ -2112,7 +2085,7 @@ sub responseId { # If no current in-progress response exists, create one (as long as we're allowed to) # N.B. Response is bound to current Survey revisionDate if ( !$responseId ) { - my $maxResponsesPerUser = $self->get('maxResponsesPerUser'); + my $maxResponsesPerUser = $self->maxResponsesPerUser; my $takenCount = $self->takenCount( { userId => $userId } ); if ( $maxResponsesPerUser == 0 || $takenCount < $maxResponsesPerUser ) { # Create a new response @@ -2127,7 +2100,7 @@ sub responseId { startDate => $startDate, endDate => 0, assetId => $self->getId, - revisionDate => $self->get('revisionDate'), + revisionDate => $self->revisionDate, anonId => undef, } ); @@ -2185,7 +2158,7 @@ sub takenCount { my $sql = 'select count(*) from Survey_response where'; $sql .= ' assetId = ' . $self->session->db->quote($self->getId); $sql .= ' and isComplete = ' . $self->session->db->quote($isComplete); - for my $o qw(userId ipAddress) { + for my $o (qw(userId ipAddress)) { if (my $o_value = $opts{$o}) { $sql .= " and $o = " . $self->session->db->quote($o_value); } @@ -2210,12 +2183,12 @@ sub canTakeSurvey { return $self->{canTake} if ( defined $self->{canTake} ); # Immediately reject if not in groupToTakeSurvey or groupToEditSurvey - if ( !$self->session->user->isInGroup( $self->get('groupToTakeSurvey') ) && !$self->session->user->isInGroup( $self->get('groupToEditSurvey') ) ) { + if ( !$self->session->user->isInGroup( $self->groupToTakeSurvey ) && !$self->session->user->isInGroup( $self->groupToEditSurvey ) ) { return 0; } - my $maxResponsesPerUser = $self->getValue('maxResponsesPerUser'); - my $ip = $self->session->env->getIp; + my $maxResponsesPerUser = $self->maxResponsesPerUser; + my $ip = $self->session->request->address; my $userId = $self->session->user->userId(); my $takenCount = 0; @@ -2249,7 +2222,7 @@ sub www_viewGradeBook { my $db = $self->session->db; return $self->session->privilege->insufficient() - if !$self->session->user->isInGroup( $self->get('groupToViewReports') ); + if !$self->session->user->isInGroup( $self->groupToViewReports ); my $var = $self->getMenuVars; @@ -2270,7 +2243,7 @@ order by username, ipAddress, startDate END_SQL my $rows = $paginator->getPageData; - $var->{question_count} = $self->surveyJSON->questionCount; + $var->{question_count} = $self->getSurveyJSON->questionCount; my @responseloop; foreach my $row ( @{$rows} ) { @@ -2290,7 +2263,7 @@ END_SQL && WebGUI::DateTime->new( $self->session, $row->{endDate} )->toUserTimeZone, response_user_name => ( $row->{userId} eq '1' ) ? $row->{ipAddress} : $row->{username}, response_count_correct => $correctCount, - response_percent => round( ( $correctCount / $var->{question_count} ) * 100 ), + response_percent => sprintf('%.0f', ( $correctCount / $var->{question_count} ) * 100 ), }; } $var->{response_loop} = \@responseloop; @@ -2299,7 +2272,7 @@ END_SQL # Clean up $self->clearTempReportTable; - my $out = $self->processTemplate( $var, $self->get('gradebookTemplateId') ); + my $out = $self->processTemplate( $var, $self->gradebookTemplateId ); return $self->processStyle($out); } @@ -2316,10 +2289,10 @@ sub www_viewStatisticalOverview { my $db = $self->session->db; return $self->session->privilege->insufficient() - if !$self->session->user->isInGroup( $self->get('groupToViewReports') ); + if !$self->session->user->isInGroup( $self->groupToViewReports ); $self->loadTempReportTable(); - my $survey = $self->surveyJSON; + my $survey = $self->getSurveyJSON; my $var = $self->getMenuVars; my $paginator = WebGUI::Paginator->new($self->session,$self->getUrl('func=viewStatisticalOverview')); @@ -2340,7 +2313,7 @@ sub www_viewStatisticalOverview { [$sectionIndex,$questionIndex,$answerIndex]); my $responsePercent; if ($totalResponses) { - $responsePercent = round(($numResponses/$totalResponses)*100); + $responsePercent = sprintf('%.0f', ($numResponses/$totalResponses)*100); } else { $responsePercent = 0; } @@ -2392,7 +2365,7 @@ sub www_viewStatisticalOverview { # Clean up $self->clearTempReportTable; - my $out = $self->processTemplate( $var, $self->get('overviewTemplateId') ); + my $out = $self->processTemplate( $var, $self->overviewTemplateId ); return $self->processStyle($out); } @@ -2449,13 +2422,61 @@ sub export { # Clean up $self->clearTempReportTable; - my $filename = $self->session->url->escape( $self->get("title") . "_$opts{name}.$format" ); - $self->session->http->setFilename($filename,"text/$format"); + my $filename = $self->session->url->escape( $self->title . "_$opts{name}.$format" ); + $self->session->response->header( 'Content-Disposition' => qq{attachment; filename="}.$filename.'"'); + $self->session->response->content_type("text/$format"); return $content; } #------------------------------------------------------------------- +=head2 exportAssetData () + +Extend the base method to include custom question types added to this Survey. + +=cut + +sub exportAssetData { + my $self = shift; + my $asset_data = $self->SUPER::exportAssetData(); + my $questions = $self->getSurveyJSON->questions(); + my $multiple_choice = $self->getSurveyJSON->multipleChoiceTypes(); + my %question_types = (); + my $get_question = $self->session->db->prepare('select answers from Survey_questionTypes where questionType=?'); + foreach my $question (@{ $questions }) { + my $type = $question->{questionType}; + next unless $multiple_choice->{$type}; + next if $question_types{$type}; + $get_question->execute([$type]); + my ($answers) = $get_question->array(); + $question_types{$type} = $answers; + } + #my $question_types = $self->db->buildArrayRefOfHashRefs('select * from Survey_questionTypes'); + $get_question->finish; + $asset_data->{question_types} = \%question_types; + return $asset_data; +} + +#------------------------------------------------------------------- + +=head2 importAssetCollateralData ($data) + +Extend the base method to include custom question types added to this Survey. + +=cut + +sub importAssetCollateralData { + my $self = shift; + my $data = shift; + $self->SUPER::importAssetCollateralData($data); + my $custom_types = $data->{question_types}; + while (my ($question, $answer) = each %{ $custom_types }) { + $self->session->db->write("INSERT INTO Survey_questionTypes VALUES(?,?) ON DUPLICATE KEY UPDATE answers = ?",[$question,$answer,$answer]); + } +} + +#------------------------------------------------------------------- + =head2 www_exportSimpleResults () Exports transposed results as CSV (or tabbed depending on the C form param) @@ -2466,7 +2487,7 @@ sub www_exportSimpleResults { my $self = shift; return $self->session->privilege->insufficient() - if !$self->session->user->isInGroup( $self->get('groupToViewReports')); + if !$self->session->user->isInGroup( $self->groupToViewReports); $self->loadTempReportTable( ignoreRevisionDate => 1 ); @@ -2489,7 +2510,7 @@ Returns transposed results as CSV (or tabbed depending on the C form par sub www_exportTransposedResults { my $self = shift; return $self->session->privilege->insufficient() - if !$self->session->user->isInGroup( $self->get('groupToViewReports') ); + if !$self->session->user->isInGroup( $self->groupToViewReports ); $self->loadTempReportTable( ignoreRevisionDate => 1, ); @@ -2520,7 +2541,7 @@ sub www_exportStructure { my $self = shift; return $self->session->privilege->insufficient() - unless ( $self->session->user->isInGroup( $self->get('groupToEditSurvey') ) ); + unless ( $self->session->user->isInGroup( $self->groupToEditSurvey ) ); if ($self->session->form->param('format') eq 'html') { my $output = < END_HTML my $sNum = 1; - for my $s (@{$self->surveyJSON->sections}) { + for my $s (@{$self->getSurveyJSON->sections}) { $output .= "S$sNum: ($s->{variable}) “$s->{title}”"; $output .= '
      '; my $qNum = 0; @@ -2561,7 +2582,7 @@ END_HTML } else { my @rows = ([qw( numbering type variable recordedValue score text goto gotoExpression)]); my $sNum = 0; - for my $s (@{$self->surveyJSON->sections}) { + for my $s (@{$self->getSurveyJSON->sections}) { $sNum++; push @rows, ["S$sNum", 'Section', $s->{variable}, '', '', $s->{text}, $s->{goto}, $s->{gotoExpression}]; my $qNum = 0; @@ -2580,8 +2601,9 @@ END_HTML my @lines = map {$csv->combine(@$_); $csv->string} @rows; my $output = join "\n", @lines; - my $filename = $self->session->url->escape( $self->get("title") . "_structure.csv" ); - $self->session->http->setFilename($filename,"text/csv"); + my $filename = $self->session->url->escape( $self->title . "_structure.csv" ); + $self->session->response->header( 'Content-Disposition' => qq{attachment; filename="}.$filename.'"'); + $self->session->response->content_type("text/csv"); return $output; } @@ -2633,7 +2655,7 @@ sub loadTempReportTable { # Mostly it only makes sense to export responses for a single revisionDate (because Survey # structure can change between revisions) - $sql .= ' and revisionDate = ' . $self->session->db->quote($self->get('revisionDate')) unless $opts{ignoreRevisionDate}; + $sql .= ' and revisionDate = ' . $self->session->db->quote($self->revisionDate) unless $opts{ignoreRevisionDate}; # Populate the temp report table with new data my $refs = $self->session->db->buildArrayRefOfHashRefs( $sql, [ $self->getId() ] ); @@ -2703,10 +2725,11 @@ Sends the user a json file of the default question types, which can be imported sub www_downloadDefaultQuestionTypes{ my $self = shift; return $self->session->privilege->insufficient() - if !$self->session->user->isInGroup( $self->get('groupToViewReports') ); + if !$self->session->user->isInGroup( $self->groupToViewReports ); - my $content = to_json($self->surveyJSON->{multipleChoiceTypes}); - $self->session->http->setFilename('WebGUI-Survey-DefaultQuestionTypes.json', "application/json"); + my $content = to_json($self->getSurveyJSON->{multipleChoiceTypes}); + $self->session->response->header( 'Content-Disposition' => qq{attachment; filename="WebGUI-Survey-DefaultQuestionTypes.json"}); + $self->session->response->content_type("application/json"); return $content; } @@ -2723,7 +2746,7 @@ sub www_deleteTest { my $session = $self->session; return $self->session->privilege->insufficient() - unless $self->session->user->isInGroup( $self->get('groupToEditSurvey') ); + unless $self->session->user->isInGroup( $self->groupToEditSurvey ); my $test = WebGUI::Asset::Wobject::Survey::Test->new($session, $session->form->get("testId")); if (defined $test) { @@ -2745,7 +2768,7 @@ sub www_demoteTest { my $session = $self->session; return $self->session->privilege->insufficient() - unless $self->session->user->isInGroup( $self->get('groupToEditSurvey') ); + unless $self->session->user->isInGroup( $self->groupToEditSurvey ); my $test = WebGUI::Asset::Wobject::Survey::Test->new($session, $session->form->get("testId")); if (defined $test) { @@ -2772,7 +2795,7 @@ sub www_editTestSuite { my $session = $self->session; return $self->session->privilege->insufficient() - unless $self->session->user->isInGroup( $self->get('groupToEditSurvey') ); + unless $self->session->user->isInGroup( $self->groupToEditSurvey ); if ($error) { $error = qq|
      $error
      \n|; @@ -2803,8 +2826,7 @@ sub www_editTestSuite { my $out = $error . $addmenu; $out .= $tests if $testsFound; - my $ac = $self->getAdminConsole; - return $ac->render($out, 'Survey'); + return '

      Survey

      ' . $out; } @@ -2822,7 +2844,7 @@ sub www_editTest { my $session = $self->session; return $self->session->privilege->insufficient() - unless $self->session->user->isInGroup( $self->get('groupToEditSurvey') ); + unless $self->session->user->isInGroup( $self->groupToEditSurvey ); if ($error) { $error = qq|
      $error
      \n|; @@ -2836,25 +2858,22 @@ sub www_editTest { else { ##We need a temporary test so that we can call dynamicForm, below $testId = 'new'; - $test = WebGUI::Asset::Wobject::Survey::Test->create($session, { assetId => $self->getId }); + $test = WebGUI::Asset::Wobject::Survey::Test->new($session, { assetId => $self->getId }); } ##Build the form - my $form = WebGUI::HTMLForm->new($session); - $form->hidden( name=>"func", value=>"editTestSave"); - $form->hidden( name=>"testId", value=>$testId); - $form->hidden( name=>"assetId", value=>$self->getId); - $form->dynamicForm([WebGUI::Asset::Wobject::Survey::Test->crud_definition($session)], 'properties', $test); - $form->submit; + my $form = WebGUI::FormBuilder->new($session, action => $self->getUrl); + $form->addField( "hidden", name=>"func", value=>"editTestSave"); + $form->addField( "hidden", name=>"testId", value=>$testId); + $form->addField( "hidden", name=>"assetId", value=>$self->getId); + $test->crud_form($form, $test); + $form->addField( "submit", name => "save" ); if ($testId eq 'new') { $test->delete; } - my $ac = $self->getAdminConsole; my $i18n = WebGUI::International->new($session, 'Asset_Survey'); - $ac->addSubmenuItem($self->session->url->page("func=editTest;testId=$testId"), $i18n->get('edit test')); - $ac->addSubmenuItem($self->session->url->page("func=runTest;testId=$testId"), $i18n->get('run test')); - return $ac->render($error.$form->print, $i18n->get('edit test')); + return '

      ' . $i18n->get('edit test') . '

      ' . $error . $form->toHtml; } #------------------------------------------------------------------- @@ -2870,7 +2889,7 @@ sub www_editTestSave { my $session = $self->session; return $self->session->privilege->insufficient() - unless $self->session->user->isInGroup( $self->get('groupToEditSurvey') ); + unless $self->session->user->isInGroup( $self->groupToEditSurvey ); my $form = $session->form; @@ -2888,7 +2907,7 @@ sub www_editTestSave { my $testId = $form->get('testId'); my $test; if ($testId eq 'new') { - $test = WebGUI::Asset::Wobject::Survey::Test->create($session, { assetId => $self->getId }); + $test = WebGUI::Asset::Wobject::Survey::Test->new($session, { assetId => $self->getId }); } else { $test = WebGUI::Asset::Wobject::Survey::Test->new($session, $testId); @@ -2915,7 +2934,7 @@ sub www_promoteTest { my $session = $self->session; return $self->session->privilege->insufficient() - unless $self->session->user->isInGroup( $self->get('groupToEditSurvey') ); + unless $self->session->user->isInGroup( $self->groupToEditSurvey ); my $test = WebGUI::Asset::Wobject::Survey::Test->new($session, $session->form->get("testId")); if (defined $test) { @@ -2937,7 +2956,7 @@ sub www_runTest { my $session = $self->session; return $self->session->privilege->insufficient() - unless $self->session->user->isInGroup( $self->get('groupToEditSurvey') ); + unless $self->session->user->isInGroup( $self->groupToEditSurvey ); my $i18n = WebGUI::International->new($session, 'Asset_Survey'); my $ac = $self->getAdminConsole; @@ -2959,9 +2978,7 @@ sub www_runTest { my $parsed = $self->parseTap($tap) or return $self->www_editTestSuite('Unable to parse test output'); - $ac->addSubmenuItem($self->session->url->page("func=editTest;testId=$testId"), $i18n->get('edit test')); - $ac->addSubmenuItem($self->session->url->page("func=runTest;testId=$testId"), $i18n->get('run test')); - return $ac->render($parsed->{templateText}, 'Test Results'); + return '

      Test Results

      ' . $parsed->{templateText}; } =head2 parseTap @@ -3019,7 +3036,7 @@ sub parseTap { )) { $var->{$key} = $parser->$key; } - my $out = $self->processTemplate($var, $self->get('testResultsTemplateId') || 'S3zpVitAmhy58CAioH359Q'); + my $out = $self->processTemplate($var, $self->testResultsTemplateId || 'S3zpVitAmhy58CAioH359Q'); return { templateText => $out, @@ -3044,7 +3061,7 @@ sub www_runTests { my $i18n = WebGUI::International->new($self->session, "Asset_Survey"); my $ac = $self->getAdminConsole; return $self->session->privilege->insufficient() - unless $self->session->user->isInGroup( $self->get('groupToEditSurvey') ); + unless $self->session->user->isInGroup( $self->groupToEditSurvey ); # Remove any in-progress reponses for current user $self->session->db->write( 'delete from Survey_response where assetId = ? and userId = ? and isComplete = 0', @@ -3112,7 +3129,7 @@ sub www_runTests { )) { $var->{$key} = $aggregate->$key; } - my $out = $self->processTemplate($var, $self->get('testResultsTemplateId') || 'S3zpVitAmhy58CAioH359Q'); + my $out = $self->processTemplate($var, $self->testResultsTemplateId || 'S3zpVitAmhy58CAioH359Q'); if ($format eq 'tap') { @@ -3129,4 +3146,5 @@ END_SUMMARY } } +__PACKAGE__->meta->make_immutable; 1; diff --git a/lib/WebGUI/Asset/Wobject/Survey/ExpressionEngine.pm b/lib/WebGUI/Asset/Wobject/Survey/ExpressionEngine.pm index 3afa244d0..23fa85c34 100644 --- a/lib/WebGUI/Asset/Wobject/Survey/ExpressionEngine.pm +++ b/lib/WebGUI/Asset/Wobject/Survey/ExpressionEngine.pm @@ -509,7 +509,7 @@ sub run { # Instantiate the asset to check it is a Survey instance, and to grab its assetId if ( $session->id->valid($asset_spec) ) { - $asset = WebGUI::Asset->new( $session, $asset_spec ); + $asset = WebGUI::Asset->newById( $session, $asset_spec ); } if ( !$asset ) { $asset = WebGUI::Asset->newByUrl( $session, $asset_spec ); diff --git a/lib/WebGUI/Asset/Wobject/Survey/ResponseJSON.pm b/lib/WebGUI/Asset/Wobject/Survey/ResponseJSON.pm index 844e9b635..b3cd4793a 100644 --- a/lib/WebGUI/Asset/Wobject/Survey/ResponseJSON.pm +++ b/lib/WebGUI/Asset/Wobject/Survey/ResponseJSON.pm @@ -3,7 +3,7 @@ package WebGUI::Asset::Wobject::Survey::ResponseJSON; =head1 LEGAL ------------------------------------------------------------------- -WebGUI is Copyright 2001-2009 Plain Black Corporation. +WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Asset/Wobject/Survey/SurveyJSON.pm b/lib/WebGUI/Asset/Wobject/Survey/SurveyJSON.pm index bb139e387..20b96eed7 100644 --- a/lib/WebGUI/Asset/Wobject/Survey/SurveyJSON.pm +++ b/lib/WebGUI/Asset/Wobject/Survey/SurveyJSON.pm @@ -3,7 +3,7 @@ package WebGUI::Asset::Wobject::Survey::SurveyJSON; =head1 LEGAL ------------------------------------------------------------------- -WebGUI is Copyright 2001-2009 Plain Black Corporation. +WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -169,7 +169,7 @@ sub addType { my $questionType = shift; my $address = shift; my $question = $self->question($address); - my $ansString = $question->{answers} ? to_json $question->{answers} : {}; + my $ansString = $question->{answers} ? to_json $question->{answers} : '{}'; $self->session->db->write("INSERT INTO Survey_questionTypes VALUES(?,?) ON DUPLICATE KEY UPDATE answers = ?",[$questionType,$ansString,$ansString]); $question->{questionType} = $questionType; } @@ -659,19 +659,19 @@ sub compress { my $newA = {}; while (my($key, $value) = each %$a) { next if ref $value; - $newA->{$key} = $value unless WebGUI::Utility::scalarEquals($value, $amold->{$key}); + $newA->{$key} = $value unless $value eq $amold->{$key}; } push @{$newQ->{answers}}, $newA; } while (my($key, $value) = each %$q) { next if ref $value; - $newQ->{$key} = $value unless WebGUI::Utility::scalarEquals($value, $qmold->{$key}); + $newQ->{$key} = $value unless $value eq $qmold->{$key}; } push @{$newS->{questions}}, $newQ; } while (my($key, $value) = each %$s) { next if ref $value; - $newS->{$key} = $value unless WebGUI::Utility::scalarEquals($value, $smold->{$key}); + $newS->{$key} = $value unless $value eq $smold->{$key}; } push @sections, $newS; } diff --git a/lib/WebGUI/Asset/Wobject/Survey/Test.pm b/lib/WebGUI/Asset/Wobject/Survey/Test.pm index 1a0ccc32d..631494d78 100644 --- a/lib/WebGUI/Asset/Wobject/Survey/Test.pm +++ b/lib/WebGUI/Asset/Wobject/Survey/Test.pm @@ -1,9 +1,49 @@ package WebGUI::Asset::Wobject::Survey::Test; use strict; -use base qw/WebGUI::Crud/; +use Test::Deep::NoTest qw/eq_deeply/; +use Moose; +use WebGUI::Definition::Crud; +extends qw/WebGUI::Crud/; +define tableName => 'Survey_test'; +define tableKey => 'testId'; +define sequenceKey => 'assetId'; +has testId => ( + required => 1, + is => 'ro', +); +property assetId => ( + label => 'assetId', + fieldType => 'hidden', + default => undef, + ); +property name => ( + fieldType => 'text', + label => [ 'test name', 'Asset_Survey' ], + hoverHelp => [ 'test name help', 'Asset_Survey' ], + default => '', + ); +property test => ( + fieldType => 'codearea', + label => [ 'test spec', 'Asset_Survey' ], + hoverHelp => [ 'test spec help', 'Asset_Survey' ], + syntax => 'js', + default => <SUPER::crud_definition($session); - $definition->{tableName} = 'Survey_test'; - $definition->{tableKey} = 'testId'; - $definition->{sequenceKey} = 'assetId'; - my $properties = $definition->{properties}; - my $i18n = WebGUI::International->new($session); - $properties->{assetId} = { - fieldType => 'hidden', - defaultValue => undef, - }; - $properties->{name} = { - fieldType => 'text', - label => $i18n->get( 'test name', 'Asset_Survey' ), - hoverHelp => $i18n->get( 'test name help', 'Asset_Survey' ), - defaultValue => '', - }; - $properties->{test} = { - fieldType => 'codearea', - label => $i18n->get( 'test spec', 'Asset_Survey' ), - hoverHelp => $i18n->get( 'test spec help', 'Asset_Survey' ), - syntax => 'js', - defaultValue => < 'Bail Out! enableSurveyExpressionEngine config option disabled' }; } - my $spec = $self->get('test') + my $spec = $self->test or return { tap => "Bail Out! Test spec undefined" }; # Use JSON::PP rather than JSON::XS so that we can use things like allow_barekey @@ -126,8 +96,8 @@ sub run { return { tap => "Bail Out! Invalid test spec: $error" }; } - my $assetId = $self->get('assetId'); - my $survey = WebGUI::Asset::Wobject::Survey->new($session, $assetId); + my $assetId = $self->assetId; + my $survey = WebGUI::Asset::Wobject::Survey->newById($session, $assetId); if (!$survey || !$survey->isa('WebGUI::Asset::Wobject::Survey') ) { return { tap => "Bail Out! Unable to instantiate Survey using assetId: $assetId" }; } diff --git a/lib/WebGUI/Asset/Wobject/SyndicatedContent.pm b/lib/WebGUI/Asset/Wobject/SyndicatedContent.pm index b9ca71a3a..a4e17da1b 100644 --- a/lib/WebGUI/Asset/Wobject/SyndicatedContent.pm +++ b/lib/WebGUI/Asset/Wobject/SyndicatedContent.pm @@ -1,7 +1,7 @@ package WebGUI::Asset::Wobject::SyndicatedContent; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 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,13 +12,89 @@ package WebGUI::Asset::Wobject::SyndicatedContent; use strict; use HTML::Entities; -use Tie::IxHash; -use WebGUI::Cache; use WebGUI::Exception; use WebGUI::HTML; use WebGUI::International; -use Class::C3; -use base qw(WebGUI::AssetAspect::RssFeed WebGUI::Asset::Wobject); +use LWP::UserAgent; + +use Moose; +use WebGUI::Definition::Asset; +extends 'WebGUI::Asset::Wobject'; + +define assetName => ['assetName','Asset_SyndicatedContent']; +define icon => 'syndicatedContent.gif'; +define tableName => 'SyndicatedContent'; +property cacheTimeout => ( + tab => "display", + fieldType => "interval", + default => 3600, + uiLevel => 8, + label => ["cache timeout", 'Asset_SyndicatedContent'], + hoverHelp => ["cache timeout help", 'Asset_SyndicatedContent'], + ); +property templateId => ( + tab => "display", + fieldType => 'template', + default => 'PBtmpl0000000000000065', + namespace => 'SyndicatedContent', + label => [72, 'Asset_SyndicatedContent'], + hoverHelp => ['72 description', 'Asset_SyndicatedContent'], + ); +property rssUrl => ( + tab => "properties", + default => undef, + fieldType => 'textarea', + label => [1, 'Asset_SyndicatedContent'], + hoverHelp => ['1 description', 'Asset_SyndicatedContent'], + ); +property processMacroInRssUrl => ( + tab => "properties", + default => 0, + fieldType => 'yesNo', + label => ['process macros in rss url', 'Asset_SyndicatedContent'], + hoverHelp => ['process macros in rss url description', 'Asset_SyndicatedContent'], + ); +property maxHeadlines => ( + tab => "display", + fieldType => 'integer', + default => 10, + label => [3, 'Asset_SyndicatedContent'], + hoverHelp => ['3 description', 'Asset_SyndicatedContent'], + ); +property hasTerms => ( + tab => "properties", + fieldType => 'text', + default => '', + label => ['hasTermsLabel', 'Asset_SyndicatedContent'], + hoverHelp => ['hasTermsLabel description', 'Asset_SyndicatedContent'], + maxlength => 255, + ); +property sortItems => ( + tab => 'properties', + fieldType => 'selectBox', + default => 'none', + label => ['sortItemsLabel', 'Asset_SyndicatedContent'], + hoverHelp => ['sortItemsLabel description', 'Asset_SyndicatedContent'], + options => \&_sortItems_options, + ); +sub _sortItems_options { + my $session = shift->session; + my $i18n = WebGUI::International->new($session,'Asset_SyndicatedContent'); + tie my %o, 'Tie::IxHash', ( + none => $i18n->get('no order'), + feed => $i18n->get('feed order'), + pubDate_asc => $i18n->get('publication date ascending'), + pubDate_des => $i18n->get('publication date descending'), + ); + return \%o; +} +has '+uiLevel' => ( + default => 6, +); + + + +with 'WebGUI::Role::Asset::RssFeed'; use WebGUI::Macro; use XML::FeedPP; use XML::FeedPP::MediaRSS; @@ -42,100 +118,6 @@ These methods are available from this class: =cut -#------------------------------------------------------------------- - -=head2 definition ( definition ) - -Defines the properties of this asset. - -=head3 definition - -A hash reference passed in from a subclass definition. - -=cut - -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift; - my %properties; - tie %properties, 'Tie::IxHash'; - my $i18n = WebGUI::International->new($session,'Asset_SyndicatedContent'); - %properties = ( - cacheTimeout => { - tab => "display", - fieldType => "interval", - defaultValue => 3600, - uiLevel => 8, - label => $i18n->get("cache timeout"), - hoverHelp => $i18n->get("cache timeout help") - }, - templateId =>{ - tab=>"display", - fieldType=>'template', - defaultValue=>'PBtmpl0000000000000065', - namespace=>'SyndicatedContent', - label=>$i18n->get(72), - hoverHelp=>$i18n->get('72 description') - }, - rssUrl=>{ - tab=>"properties", - defaultValue=>undef, - fieldType=>'textarea', - label=>$i18n->get(1), - hoverHelp=>$i18n->get('1 description') - }, - processMacroInRssUrl=>{ - tab=>"properties", - defaultValue=>0, - fieldType=>'yesNo', - label=>$i18n->get('process macros in rss url'), - hoverHelp=>$i18n->get('process macros in rss url description'), - }, - maxHeadlines=>{ - tab=>"display", - fieldType=>'integer', - defaultValue=>10, - label=>$i18n->get(3), - hoverHelp=>$i18n->get('3 description') - }, - hasTerms=>{ - tab=>"properties", - fieldType=>'text', - defaultValue=>'', - label=>$i18n->get('hasTermsLabel'), - hoverHelp=>$i18n->get('hasTermsLabel description'), - maxlength=>255 - }, - sortItems => { - tab => 'properties', - fieldType => 'selectBox', - options => do { - tie my %o, 'Tie::IxHash', ( - none => $i18n->get('no order'), - feed => $i18n->get('feed order'), - pubDate_asc => $i18n->get('publication date ascending'), - pubDate_des => - $i18n->get('publication date descending'), - ); \%o; - }, - defaultValue => 'none', - label => $i18n->get('sortItemsLabel'), - hoverHelp => $i18n->get('sortItemsLabel description'), - }, - ); - push(@{$definition}, { - assetName=>$i18n->get('assetName'), - uiLevel=>6, - autoGenerateForms=>1, - icon=>'syndicatedContent.gif', - tableName=>'SyndicatedContent', - className=>'WebGUI::Asset::Wobject::SyndicatedContent', - properties=>\%properties - }); - return $class->next::method($session, $definition); -} - #------------------------------------------------------------------- =head2 generateFeed () @@ -145,29 +127,41 @@ Combines all feeds into a single XML::FeedPP object. =cut sub generateFeed { - my $self = shift; - my $limit = shift || $self->get('maxHeadlines'); - my $log = $self->session->log; - my $sort = $self->get('sortItems'); + my $self = shift; + my $limit = shift || $self->maxHeadlines; + my $session = $self->session; + my $log = $session->log; + my $cache = $session->cache; + my $sort = $self->sortItems; my @opt = (use_ixhash => 1) if $sort eq 'feed'; my $feed = XML::FeedPP::Atom->new(@opt); # build one feed out of many my $newlyCached = 0; - foreach my $url (split(/\s+/, $self->get('rssUrl'))) { + foreach my $url (split(/\s+/, $self->rssUrl)) { $log->info("Processing FEED: ".$url); $url =~ s/^feed:/http:/; - if ($self->get('processMacroInRssUrl')) { + if ($self->processMacroInRssUrl) { WebGUI::Macro::process($self->session, \$url); } - my $cache = WebGUI::Cache->new($self->session, $url, "RSS"); - my $value = $cache->get; - #warn "got this: $value\n"; - unless ($value) { - $value = $cache->setByHTTP($url, $self->get("cacheTimeout")); - $newlyCached = 1; - } + + my $value = $cache->compute( $url, sub { + my $ua = LWP::UserAgent->new( + env_proxy => 1, + agent => "WebGUI/" . $WebGUI::VERSION, + timeout => 30, + ); + + my $r = $ua->get( $url ); + if ( $r->is_error ) { + $session->log->warn( "Could not get syndicated content from '$url': " . $r->status_line ); + } + else { + $newlyCached = 1; + return $r->decoded_content; + } + }, $self->cacheTimeout ); eval { my $singleFeed = XML::FeedPP->new($value, utf8_flag => 1, -type => 'string', xml_deref => 1, @opt); @@ -175,13 +169,13 @@ sub generateFeed { $feed->merge_item($singleFeed); }; if ($@) { - $log->error("Syndicated Content asset (".$self->getId.") has a bad feed URL (".$url."). Failed with ".$@); + $log->warn("Syndicated Content asset (".$self->getId.") has a bad feed URL (".$url."). Failed with ".$@); } } # build a new feed that matches the term the user is interested in - if ($self->get('hasTerms') ne '') { - my @terms = split /,\s*/, $self->get('hasTerms'); # get the list of terms + if ($self->hasTerms ne '') { + my @terms = split /,\s*/, $self->hasTerms; # get the list of terms my $termRegex = join("|", map quotemeta($_), @terms); # turn the terms into a regex string my @items = $feed->match_item(title => qr/$termRegex/msi); push @items, $feed->match_item(description => qr/$termRegex/msi); @@ -191,7 +185,7 @@ sub generateFeed { } } - my %seen = {}; + my %seen = (); my @items = $feed->get_item; $feed->clear_item; ITEM: foreach my $item (@items) { @@ -221,48 +215,28 @@ sub generateFeed { #------------------------------------------------------------------- -=head2 getFeed () +=head2 getRssFeedItems () -Override the one in the parent... +Go through the items, and produce a new RSS feed for them so that the SC is an aggregator +and producer. =cut -sub getFeed { - my $self = shift; - my $feed = shift; - foreach my $item ($self->generateFeed( $self->get('itemsPerFeed') )->get_item) { - my $set_permalink_false = 0; - my $new_item = $feed->add_item( $item ); - if (!$new_item->guid) { - if ($new_item->link) { - $new_item->guid( $new_item->link ); - } else { - $new_item->guid( $self->session->id->generate ); - $set_permalink_false = 1; - } - } - $new_item->guid( $new_item->guid, isPermaLink => 0 ) if $set_permalink_false; +sub getRssFeedItems { + my $self = shift; + my @items = (); + foreach my $item ($self->generateFeed( $self->itemsPerFeed )->get_item) { + my %feed_item = ( + title => $item->title, + description => $item->description, + pubDate => $item->pubDate, + category => $item->category, + author => $item->author, + guid => $item->guid, + ); + push @items, \%feed_item; } - $feed->title( $self->get('feedTitle') || $self->get('title') ); - $feed->description( $self->get('feedDescription') || $self->get('synopsis') ); - $feed->pubDate( $self->getContentLastModified ); - $feed->copyright( $self->get('feedCopyright') ); - $feed->link( $self->getUrl ); - # $feed->language( $lang ); - if ($self->get('feedImage')) { - my $storage = WebGUI::Storage->get($self->session, $self->get('feedImage')); - my @files = @{ $storage->getFiles }; - if (scalar @files) { - $feed->image( - $storage->getUrl( $files[0] ), - $self->get('feedImageDescription') || $self->getTitle, - $self->get('feedImageUrl') || $self->getUrl, - $self->get('feedImageDescription') || $self->getTitle, - ( $storage->getSizeInPixels( $files[0] ) ) # expands to width and height - ); - } - } - return $feed; + return \@items; } #------------------------------------------------------------------- @@ -351,20 +325,21 @@ See WebGUI::Asset::prepareView() for details. =cut -sub prepareView { +around prepareView => sub { + my $orig = shift; my $self = shift; - $self->next::method; - my $template = WebGUI::Asset::Template->new($self->session, $self->get("templateId")); - if (!$template) { + $self->$orig(); + my $template = eval { WebGUI::Asset->newById($self->session, $self->templateId); }; + if (Exception::Class->caught()) { WebGUI::Error::ObjectNotFound::Template->throw( error => qq{Template not found}, - templateId => $self->get("templateId"), + templateId => $self->templateId, assetId => $self->getId, ); } $template->prepare($self->getMetaDataAsTemplateVariables); $self->{_viewTemplate} = $template; -} +}; #------------------------------------------------------------------- @@ -375,11 +350,11 @@ See WebGUI::Asset::purgeCache() for details. =cut -sub purgeCache { +override purgeCache => sub { my $self = shift; - WebGUI::Cache->new($self->session,"view_".$self->getId)->delete; - $self->next::method; -} + $self->session->cache->remove("view_".$self->getId); + super(); +}; #------------------------------------------------------------------- @@ -394,16 +369,16 @@ sub view { my $session = $self->session; # try the cached version - my $cache = WebGUI::Cache->new($session,"view_".$self->getId); - my $out = $cache->get; - return $out if ($out ne "" && !$session->var->isAdminOn); + my $cache = $session->cache; + my $out = $cache->get("view_".$self->getId); + return $out if ($out ne "" && !$session->isAdminOn); #return $out if $out; # generate from scratch my $feed = $self->generateFeed; $out = $self->processTemplate($self->getTemplateVariables($feed),undef,$self->{_viewTemplate}); - if (!$session->var->isAdminOn && $self->get("cacheTimeout") > 10) { - $cache->set($out,$self->get("cacheTimeout")); + if (!$session->isAdminOn && $self->cacheTimeout > 10) { + $cache->set("view_".$self->getId, $out, $self->cacheTimeout); } return $out; } @@ -416,63 +391,12 @@ See WebGUI::Asset::Wobject::www_view() for details. =cut -sub www_view { - my $self = shift; - $self->session->http->setCacheControl($self->get("cacheTimeout")); - $self->next::method(@_); -} - -#------------------------------------------------------------------- - -=head2 www_viewRSS090 ( ) - -Deprecated. Use www_viewRss() instead. - -=cut - -sub www_viewRSS090 { - my $self = shift; - return $self->www_viewRss; -} - -#------------------------------------------------------------------- - -=head2 www_viewRSS091 ( ) - -Deprecated. Use www_viewRss() instead. - -=cut - -sub www_viewRSS091 { - my $self = shift; - return $self->www_viewRss; -} - -#------------------------------------------------------------------- - -=head2 www_viewRSS10 ( ) - -Deprecated. Use www_viewRdf() instead. - -=cut - -sub www_viewRSS10 { - my $self = shift; - return $self->www_viewRdf; -} - -#------------------------------------------------------------------- - -=head2 www_viewRSS20 ( ) - -Deprecated. Use www_viewRss() instead. - -=cut - -sub www_viewRSS20 { - my $self = shift; - return $self->www_viewRss; -} +override www_view => sub { + my $self = shift; + $self->session->response->setCacheControl($self->cacheTimeout); + super(); +}; +__PACKAGE__->meta->make_immutable; 1; diff --git a/lib/WebGUI/Asset/Wobject/Thingy.pm b/lib/WebGUI/Asset/Wobject/Thingy.pm index 127fc6cfa..fec98e950 100644 --- a/lib/WebGUI/Asset/Wobject/Thingy.pm +++ b/lib/WebGUI/Asset/Wobject/Thingy.pm @@ -1,7 +1,7 @@ package WebGUI::Asset::Wobject::Thingy; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -14,13 +14,37 @@ use strict; use Tie::IxHash; use JSON; use WebGUI::International; -use WebGUI::Utility; use WebGUI::Text; use WebGUI::Form::File; use WebGUI::DateTime; -use base 'WebGUI::Asset::Wobject'; -use Data::Dumper; use PerlIO::eol qw/NATIVE/; +use Moose; +use WebGUI::Definition::Asset; + +extends 'WebGUI::Asset::Wobject'; +define assetName => ['assetName', 'Asset_Thingy']; +define icon => 'thingy.gif'; +define tableName => 'Thingy'; +property templateId => ( + fieldType => "template", + default => 'ThingyTmpl000000000001', + tab => "display", + namespace => "Thingy", + hoverHelp => ['thingy template description', 'Asset_Thingy'], + label => ['thingy template label', 'Asset_Thingy'], + ); +property defaultThingId => ( + default => undef, + fieldType => "selectBox", + label => ["default thing label", 'Asset_Thingy'], + options => \&_defaultThingId_options, + ); +sub _defaultThingId_options { + my $self = shift; + my $things = $self->session->db->buildHashRef('select thingId, label from Thingy_things where assetId = ?',[$self->getId]); + return $things; +} + use WebGUI::ProgressBar; @@ -49,10 +73,10 @@ sub addField { my $dbDataType = shift || $self->_getDbDataType($field->{fieldType}); my $session = $self->session; my $db = $session->db; - my $error = $session->errorHandler; + my $log = $session->log; my ($oldFieldId, $newFieldId,$useAssetId,$useSequence); - $error->info("Adding Field, label: ".$field->{label}.", fieldId: ".$field->{fieldId}.",thingId: ".$field->{thingId}); + $log->info("Adding Field, label: ".$field->{label}.", fieldId: ".$field->{fieldId}.",thingId: ".$field->{thingId}); if ($isImport){ $oldFieldId = $field->{fieldId}; @@ -74,8 +98,8 @@ sub addField { my $thingyTableName = "Thingy_".$field->{thingId}; my $columnName = "field_".$newFieldId; $db->write( - "ALTER TABLE ".$db->dbh->quote_identifier($thingyTableName) - ." ADD ".$db->dbh->quote_identifier($columnName)." ". $dbDataType + "ALTER TABLE ".$db->quote_identifier($thingyTableName) + ." ADD ".$db->quote_identifier($columnName)." ". $dbDataType ); return $newFieldId; @@ -103,10 +127,10 @@ sub addThing { my $thing = shift; my $isImport = shift; my $db = $self->session->db; - my $error = $self->session->errorHandler; + my $log = $self->session->log; my ($oldThingId, $newThingId,$useAssetId); - $error->info("Adding Thing, label: ".$thing->{label}.", id: ".$thing->{thingId}); + $log->info("Adding Thing, label: ".$thing->{label}.", id: ".$thing->{thingId}); if ($isImport){ $oldThingId = $thing->{thingId}; @@ -132,7 +156,7 @@ sub addThing { } } - $db->write("create table ".$db->dbh->quote_identifier("Thingy_".$newThingId)."( + $db->write("create table ".$db->quote_identifier("Thingy_".$newThingId)."( thingDataId CHAR(22) binary not null, dateCreated int not null, createdById CHAR(22) not null, @@ -228,57 +252,12 @@ sub badOtherThing { my ($otherThingTableExists) = $db->quickArray('show tables like ?',[$tableName]); return $i18n->get('other thing missing message') unless $otherThingTableExists; my ($otherThingFieldExists) = $db->quickArray( - sprintf('show columns from %s like ?', $db->dbh->quote_identifier($tableName)), + sprintf('show columns from %s like ?', $db->quote_identifier($tableName)), [$fieldName]); return $i18n->get('other thing field missing message') unless $otherThingFieldExists; return undef; } -#------------------------------------------------------------------- - -=head2 definition ( ) - -defines wobject properties for Thingy instances. If you choose to "autoGenerateForms", the -getEditForm method is unnecessary/redundant/useless. - -=cut - -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift; - my $i18n = WebGUI::International->new($session, 'Asset_Thingy'); - my %properties; - tie %properties, 'Tie::IxHash'; - - %properties = ( - templateId =>{ - fieldType=>"template", - defaultValue=>'ThingyTmpl000000000001', - tab=>"display", - noFormPost=>0, - namespace=>"Thingy", - hoverHelp=>$i18n->get('thingy template description'), - label=>$i18n->get('thingy template label'), - }, - defaultThingId => { - autoGenerate => 0, - default=>undef, - fieldType=>"selectBox", - }, - ); - push(@{$definition}, { - assetName=>$i18n->get('assetName'), - icon=>'thingy.gif', - autoGenerateForms=>1, - tableName=>'Thingy', - className=>'WebGUI::Asset::Wobject::Thingy', - properties=>\%properties - }); - return $class->SUPER::definition($session, $definition); -} - - #------------------------------------------------------------------- =head2 deleteThingIndex ( $thingId ) @@ -305,12 +284,12 @@ Duplicates a Thingy, including the definitions of the Things in this Thingy and =cut -sub duplicate { +override duplicate => sub { my $self = shift; my $options = shift; - my $newAsset = $self->SUPER::duplicate($options); + my $newAsset = super(); my $db = $self->session->db; - my $assetId = $self->get("assetId"); + my $assetId = $self->getId; my $fields; my $otherThingFields = $db->buildHashRefOfHashRefs( @@ -349,10 +328,10 @@ sub duplicate { where fieldInOtherThingId = ? and assetId = ?', [$otherThingFields->{$otherThingField}->{newFieldType}, $otherThingFields->{$otherThingField}->{newFieldId}, - $otherThingFields->{$otherThingField}->{fieldInOtherThingId}, $newAsset->get('assetId')]); + $otherThingFields->{$otherThingField}->{fieldInOtherThingId}, $newAsset->getId]); } return $newAsset; -} +}; #------------------------------------------------------------------- @@ -419,7 +398,7 @@ sub deleteField { my $thingId = shift; my $keepSequenceNumbers = shift; my $db = $self->session->db; - my $error = $self->session->errorHandler; + my $log = $self->session->log; my $deletedSequenceNumber; if ($keepSequenceNumbers ne "1"){ @@ -432,14 +411,14 @@ sub deleteField { ,[$deletedSequenceNumber]); } - my ($columnExists) = $db->quickArray("show columns from ".$db->dbh->quote_identifier("Thingy_".$thingId) + my ($columnExists) = $db->quickArray("show columns from ".$db->quote_identifier("Thingy_".$thingId) ." like ".$db->quote("field_".$fieldId)); if ($columnExists){ - $db->write("ALTER TABLE ".$db->dbh->quote_identifier("Thingy_".$thingId)." DROP " - .$db->dbh->quote_identifier("field_".$fieldId)); + $db->write("ALTER TABLE ".$db->quote_identifier("Thingy_".$thingId)." DROP " + .$db->quote_identifier("field_".$fieldId)); } $self->reindexThings; - $error->info("Deleted field: $fieldId in thing: $thingId."); + $log->info("Deleted field: $fieldId in thing: $thingId."); return undef; } @@ -583,13 +562,13 @@ sub deleteThing { my $self = shift; my $thingId = shift; my $session = $self->session; - my $error = $session->errorHandler; + my $log = $session->log; $self->deleteCollateral("Thingy_things","thingId",$thingId); $self->deleteCollateral("Thingy_fields","thingId",$thingId); - $session->db->write("drop table if exists ".$session->db->dbh->quote_identifier("Thingy_".$thingId)); + $session->db->write("drop table if exists ".$session->db->quote_identifier("Thingy_".$thingId)); - $error->info("Deleted thing: $thingId."); + $log->info("Deleted thing: $thingId."); $self->deleteThingIndex($thingId); return undef; } @@ -630,10 +609,10 @@ sub editThingDataSave { if ($thingDataId eq "new"){ $thingData{dateCreated} = time(); $thingData{createdById} = $session->user->userId; - $thingData{ipAddress} = $session->env->getIp; + $thingData{ipAddress} = $session->request->address; } else { - %thingData = $session->db->quickHash("select * from ".$session->db->dbh->quote_identifier("Thingy_".$thingId) + %thingData = $session->db->quickHash("select * from ".$session->db->quote_identifier("Thingy_".$thingId) ." where thingDataId = ?",[$thingDataId]); } @@ -721,17 +700,17 @@ See WebGUI::AssetPackage::exportAssetData() for details. =cut -sub exportAssetData { +override exportAssetData => sub { my $self = shift; - my $data = $self->SUPER::exportAssetData; + my $data = super(); my $db = $self->session->db; - my $assetId = $self->get("assetId"); + my $assetId = $self->getId; $data->{things} = $db->buildArrayRefOfHashRefs('select * from Thingy_things where assetId = ?',[$assetId]); $data->{fields} = $db->buildArrayRefOfHashRefs('select * from Thingy_fields where assetId = ?',[$assetId]); return $data; -} +}; #------------------------------------------------------------------- @@ -805,30 +784,32 @@ sub getEditFieldForm { my $self = shift; my $session = $self->session; my $field = shift; - my (%fieldStatus, $f, %fieldTypes, $things); my $fieldId = $field->{fieldId} || "new"; my $i18n = WebGUI::International->new($session, 'Asset_Thingy'); my $defaultValue; - tie %fieldStatus, 'Tie::IxHash'; - tie %fieldTypes, 'Tie::IxHash'; - %fieldStatus = ( + my @fieldStatus = ( "hidden" => $i18n->get('fieldstatus hidden label'), "visible" => $i18n->get('fieldstatus visible label'), "editable" => $i18n->get('fieldstatus editable label'), "required" => $i18n->get('fieldstatus required label'), ); - %fieldTypes = %{WebGUI::Form::FieldType->new($session)->getTypes}; - %fieldTypes = WebGUI::Utility::sortHash(%fieldTypes); + my $fieldType = WebGUI::Pluggable::instanciate( "WebGUI::Form::FieldType", "new", [ $session ] ); + my %fieldTypes = %{$fieldType->getTypes}; - $things = $self->session->db->read('select thingId, Thingy_things.label, count(*) from Thingy_things ' + my $things = $self->session->db->read('select thingId, Thingy_things.label, count(*) from Thingy_things ' .'left join Thingy_fields using(thingId) where Thingy_things.assetId = ? and fieldId != "" ' .'group by thingId',[$self->getId]); while (my $thing = $things->hashRef) { my $fieldType = "otherThing_".$thing->{thingId}; $fieldTypes{$fieldType} = $thing->{label}; } + my @fieldTypes = + map { @$_ } + sort { $a->[1] cmp $b->[1] } + map { [ $_, $fieldTypes{$_} ] } + keys %fieldTypes; my $dialogPrefix; if ($field->{oldFieldId}){ @@ -841,131 +822,177 @@ sub getEditFieldForm { $dialogPrefix = "edit_".$fieldId."_Dialog"; } - $f = WebGUI::HTMLForm->new($self->session,{ + my $f = WebGUI::FormBuilder->new($self->session, action=>$self->getUrl, - tableExtras=>' cellpadding="0" cellspacing="0"' - }); - $f->hidden( - -name => "fieldId", - -value => $fieldId, + ); + $f->addField( "hidden", + name => "fieldId", + value => $fieldId, ); - $f->hidden( - -name => "thingId", - -value => $field->{thingId}, + $f->addField( "hidden", + name => "thingId", + value => $field->{thingId}, ); - $f->hidden( - -name => "func", - -value => "editFieldSave" + $f->addField( "hidden", + name => "func", + value => "editFieldSave" ); - $f->text( - -name=>"label", - -label=>$i18n->get('field label label'), - -hoverHelp=>$i18n->get('field label description'), - -value=>$field->{label} + $f->addField( "text", + name=>"label", + label=>$i18n->get('field label label'), + hoverHelp=>$i18n->get('field label description'), + value=>$field->{label} ); - $f->selectBox( - -name=>"fieldType", - -label=>$i18n->get('field type label'), - -hoverHelp=>$i18n->get('field type description'), - -value=>$field->{fieldType} || "Text", - -options=>\%fieldTypes, - -id=>$dialogPrefix."_fieldType_formId", + $f->addField( "selectBox", + name=>"fieldType", + label=>$i18n->get('field type label'), + hoverHelp=>$i18n->get('field type description'), + value=>$field->{fieldType} || "Text", + options=>\@fieldTypes, + id=>$dialogPrefix."_fieldType_formId", + ); + + $f->addField( "yesNo", + name=>'isUnique', + label=>$i18n->get('unique label'), + hoverHelp=>$i18n->get('unique description'), + value=>$field->{isUnique}, + id=>$dialogPrefix."_isUnique_formId", + ); + + $f->addField( "ReadOnly", + name => "${dialogPrefix}_fieldInThing_module", + value => $self->getHtmlWithModuleWrapper($dialogPrefix."_fieldInThing_module") ); - $f->yesNo( - -name=>'isUnique', - -label=>$i18n->get('unique label'), - -hoverHelp=>$i18n->get('unique description'), - -value=>$field->{isUnique}, - -id=>$dialogPrefix."_isUnique_formId", + $f->addField( "ReadOnly", + name => "${dialogPrefix}_defaultFieldInThing_module", + value => $self->getHtmlWithModuleWrapper($dialogPrefix."_defaultFieldInThing_module"), ); - - - $f->raw($self->getHtmlWithModuleWrapper($dialogPrefix."_fieldInThing_module")); - - $f->raw($self->getHtmlWithModuleWrapper($dialogPrefix."_defaultFieldInThing_module")); unless ($field->{fieldType} =~ m/^otherThing/x){ $defaultValue = $field->{defaultValue}; } - my $defaultValueForm = WebGUI::Form::Textarea($self->session, { + my $defaultValueForm = WebGUI::Form::Textarea->new($self->session, { name=>"defaultValue", value=>$defaultValue, subtext=>'
      '.$i18n->get('default value subtext'), width=>200, height=>40, resizable=>0, - }); - $f->raw($self->getHtmlWithModuleWrapper($dialogPrefix."_defaultValue_module",$defaultValueForm, - $i18n->get('default value label'),$i18n->get('default value description'))); + })->toHtml; + $f->addField( "ReadOnly", + name => "${dialogPrefix}_defaultValue_module", + value => $self->getHtmlWithModuleWrapper( + $dialogPrefix."_defaultValue_module", + $defaultValueForm, + $i18n->get('default value label'), + $i18n->get('default value description') + ) + ); - $f->text( - -name=>"pretext", - -value=>$field->{pretext}, - -label=>$i18n->get('pretext label'), - -hoverHelp=>$i18n->get('pretext description'), + $f->addField( "text", + name=>"pretext", + value=>$field->{pretext}, + label=>$i18n->get('pretext label'), + hoverHelp=>$i18n->get('pretext description'), ); - $f->text( + $f->addField( "text", -name=>"subtext", -value=>$field->{subtext}, -label=>$i18n->get('subtext label'), -hoverHelp=>$i18n->get('subtext description'), ); - $f->selectBox( - -name=>"status", - -options=>\%fieldStatus, - -label=>$i18n->get('field status label'), - -hoverHelp=>$i18n->get('field status description'), - -value=> [ $field->{status} || "editable" ] , + $f->addField( "selectBox", + name=>"status", + options=>\@fieldStatus, + label=>$i18n->get('field status label'), + hoverHelp=>$i18n->get('field status description'), + value=> [ $field->{status} || "editable" ] , ); - my $widthForm = WebGUI::Form::Integer($self->session, { + my $widthForm = WebGUI::Form::Integer->new($self->session, { name=>"width", value=>($field->{width} || 250), size=>10, - }); - $f->raw($self->getHtmlWithModuleWrapper($dialogPrefix."_width_module",$widthForm,$i18n->get('width label'), - $i18n->get('width description'))); + })->toHtml; + $f->addField( "ReadOnly", + name => "${dialogPrefix}_width_module", + value => $self->getHtmlWithModuleWrapper( + $dialogPrefix."_width_module", + $widthForm, + $i18n->get('width label'), + $i18n->get('width description') + ) + ); - my $sizeForm = WebGUI::Form::Integer($self->session, { + my $sizeForm = WebGUI::Form::Integer->new($self->session, { name=>"size", value=>($field->{size} || 25), size=>10, - }); - $f->raw($self->getHtmlWithModuleWrapper($dialogPrefix."_size_module",$sizeForm,$i18n->get('size label'), - $i18n->get('size description'),)); + })->toHtml; + $f->addField( "ReadOnly", + name => "${dialogPrefix}_size_module", + value => $self->getHtmlWithModuleWrapper( + $dialogPrefix."_size_module", + $sizeForm, + $i18n->get('size label'), + $i18n->get('size description'), + ) + ); - my $heightForm = WebGUI::Form::Integer($self->session, { + my $heightForm = WebGUI::Form::Integer->new($self->session, { name=>"height", value=>$field->{height} || 40, label=>$i18n->get('height label'), size=>10, - }); - $f->raw($self->getHtmlWithModuleWrapper($dialogPrefix."_height_module",$heightForm,$i18n->get('height label'), - $i18n->get('height description'))); + })->toHtml; + $f->addField( "ReadOnly", + name => "${dialogPrefix}_height_module", + value => $self->getHtmlWithModuleWrapper( + $dialogPrefix."_height_module", + $heightForm, + $i18n->get('height label'), + $i18n->get('height description') + ) + ); - my $verticalForm = WebGUI::Form::YesNo($self->session, { + my $verticalForm = WebGUI::Form::YesNo->new($self->session, { name=>"vertical", value=>$field->{vertical}, label=>$i18n->get('vertical label'), - }); - $f->raw($self->getHtmlWithModuleWrapper($dialogPrefix."_vertical_module",$verticalForm,$i18n->get('vertical label'), - $i18n->get('vertical description'))); + })->toHtml; + $f->addField( "ReadOnly", + name => "${dialogPrefix}_vertical_module", + value => $self->getHtmlWithModuleWrapper( + $dialogPrefix."_vertical_module", + $verticalForm, + $i18n->get('vertical label'), + $i18n->get('vertical description') + ) + ); - my $valuesForm = WebGUI::Form::Textarea($self->session, { + my $valuesForm = WebGUI::Form::Textarea->new($self->session, { name=>"possibleValues", value=>$field->{possibleValues}, width=>200, height=>60, resizable=>0, - }); - $f->raw($self->getHtmlWithModuleWrapper($dialogPrefix."_values_module",$valuesForm,$i18n->get('possible values label'), - $i18n->get('possible values description'))); - $f->text( - -name=>"extras", - -value=>$field->{extras}, - -label=>$i18n->get('extras label'), - -hoverHelp=>$i18n->get('extras description'), - ); + })->toHtml; + $f->addField( "ReadOnly", + name => "${dialogPrefix}_values_module", + value => $self->getHtmlWithModuleWrapper( + $dialogPrefix."_values_module", + $valuesForm, + $i18n->get('possible values label'), + $i18n->get('possible values description') + ) + ); + $f->addField( "text", + name=>"extras", + value=>$field->{extras}, + label=>$i18n->get('extras label'), + hoverHelp=>$i18n->get('extras description'), + ); #unless ($dialogPrefix eq "addDialog") { # $f->raw(''); @@ -975,38 +1002,6 @@ sub getEditFieldForm { #------------------------------------------------------------------- -=head2 getEditForm ( ) - -Returns the tabform object that will be used in generating the edit page for Thingy's. -Adds the defaultThingId selectBox to the tabform object, because the options for this selectBox depends on already -existing Things. The rest of the form is auto-generated. - -=cut - -sub getEditForm { - - my $self = shift; - my $i18n = WebGUI::International->new($self->session, 'Asset_Thingy'); - - my $tabform = $self->SUPER::getEditForm(); - - my $things = $self->session->db->buildHashRef('select thingId, label from Thingy_things where assetId = ?',[$self->get("assetId")]); - - if (scalar(keys(%{$things}))) { - $tabform->getTab("display")->selectBox( - -name=>"defaultThingId", - -value=>$self->get("defaultThingId"), - -label=>$i18n->get("default thing label"), - -options=>$things, - ); - } - - - return $tabform; -} - -#------------------------------------------------------------------- - =head2 getFields ( $thingId ) Returns a result set with all the fields in a thing in this Thingy. @@ -1147,7 +1142,7 @@ sub getFormPlugin { } } - if ( WebGUI::Utility::isIn( $data->{fieldType}, qw(SelectList CheckList SelectBox Attachments) ) ) { + if ( $data->{fieldType} ~~ [qw(SelectList CheckList SelectBox Attachments) ] ) { my @values; if ( $useFormPostData && $session->form->param($name) ) { $param{ value } = [ $session->form->process( $name, $data->{fieldType} ) ]; @@ -1247,18 +1242,11 @@ sub getHtmlWithModuleWrapper { my $hoverHelp = shift; $hoverHelp &&= '
      ' . $hoverHelp . '
      '; - my $html = "\n\n"; - $html .= "\t
      \n"; + my $html = "\t
      \n"; $html .= "\t
      \n"; - $html .= "\t\n"; - $html .= "\t"; - $html .= ""; - $html .= "\t\n\n"; - $html .= "\t
      "; - $html .= $formDescription.$hoverHelp.""; - $html .= $formElement."
      "; + $html .= $formDescription.$hoverHelp; + $html .= $formElement; $html .= "\t\n
      \t\n
      \n"; - $html .= ""; return $html; @@ -1320,14 +1308,14 @@ sub getViewThingVars { return undef unless ($thingId && $thingDataId); - my %thingData = $db->quickHash("select * from ".$db->dbh->quote_identifier("Thingy_".$thingId) + my %thingData = $db->quickHash("select * from ".$db->quote_identifier("Thingy_".$thingId) ." where thingDataId = ?",[$thingDataId]); if (%thingData) { my $fields = $self->getFields($thingId); while (my %field = $fields->hash) { next unless ($field{display} eq '1'); - my $hidden = ($field{status} eq "hidden" && !$self->session->var->isAdminOn); + my $hidden = ($field{status} eq "hidden" && !$self->session->isAdminOn); my $originalValue = $thingData{"field_".$field{fieldId}}; my $value = $self->getFieldValue($originalValue,\%field); @@ -1407,7 +1395,7 @@ sub hasEnteredMaxPerUser { return 0 unless $maxEntriesPerUser; my $numberOfEntries = $session->db->quickScalar("select count(*) " - ."from ".$session->db->dbh->quote_identifier("Thingy_".$thingId)." where createdById=?",[$session->user->userId]); + ."from ".$session->db->quote_identifier("Thingy_".$thingId)." where createdById=?",[$session->user->userId]); if($numberOfEntries < $maxEntriesPerUser){ return 0; @@ -1516,10 +1504,14 @@ sub importAssetCollateralData { my $self = shift; my $session = $self->session; - my $error = $session->errorHandler; + my $log = $session->log; my $data = shift; + my $id = $data->{properties}{assetId}; + my $class = $data->{properties}{className}; + my $version = $data->{properties}{revisionDate}; + my $assetExists = WebGUI::Asset->newById($self->session, $id, $version); - $error->info("Importing Things for Thingy ".$data->{properties}{title}); + $log->info("Importing Things for Thingy ".$data->{properties}{title}); my @importThings; foreach my $thing (@{$data->{things}}) { push(@importThings,$thing->{thingId}); @@ -1527,7 +1519,7 @@ sub importAssetCollateralData { [$thing->{thingId}]); if ($thingIdExists){ # update existing thing - $error->info("Updating Thing, label: ".$thing->{label}.", id: ".$thing->{thingId}); + $log->info("Updating Thing, label: ".$thing->{label}.", id: ".$thing->{thingId}); $self->setCollateral("Thingy_things","thingId",$thing,0,0); } else{ @@ -1539,7 +1531,7 @@ sub importAssetCollateralData { # delete deleted things my $thingsInDatabase = $self->getThings; while (my $thingInDataBase = $thingsInDatabase->hashRef) { - if (!WebGUI::Utility::isIn($thingInDataBase->{thingId},@importThings)){ + if (!$thingInDataBase->{thingId} ~~ @importThings){ # delete thing $self->deleteThing($thingInDataBase->{thingId}); } @@ -1552,7 +1544,7 @@ sub importAssetCollateralData { my ($fieldIdExists) = $session->db->quickArray("select fieldId from Thingy_fields where fieldId = ? and thingId = ? ",[$field->{fieldId},$field->{thingId}]); if ($fieldIdExists){ # update existing field - $error->info("Updating Field, label: ".$field->{label}.", id: ".$field->{fieldId}.",seq :" + $log->info("Updating Field, label: ".$field->{label}.", id: ".$field->{fieldId}.",seq :" .$field->{sequenceNumber}); $self->_updateFieldType($field->{fieldType},$field->{fieldId},$field->{thingId},$field->{assetId},$dbDataType); $self->setCollateral("Thingy_fields","fieldId",$field,1,0,"","",1); @@ -1564,9 +1556,9 @@ sub importAssetCollateralData { } # delete deleted fields my $fieldsInDatabase = $session->db->read('select fieldId, thingId from Thingy_fields where assetId = ?', - [$self->get("assetId")]); + [$self->getId]); while (my $fieldInDataBase = $fieldsInDatabase->hashRef) { - if (!WebGUI::Utility::isIn($fieldInDataBase->{fieldId},@importFields)){ + if (!$fieldInDataBase->{fieldId} ~~ @importFields){ # delete field $self->deleteField($fieldInDataBase->{fieldId},$fieldInDataBase->{thingId},"1"); } @@ -1586,12 +1578,12 @@ been inserted into the AssetIndex. =cut -sub indexContent { +override indexContent => sub { my ($self) = @_; my $session = $self->session; - $self->SUPER::indexContent(); + super(); $self->reindexThings; -} +}; #------------------------------------------------------------------- @@ -1704,21 +1696,21 @@ See WebGUI::Asset::prepareView() for details. =cut -sub prepareView { +override prepareView => sub { my $self = shift; - $self->SUPER::prepareView(); - my $template = WebGUI::Asset::Template->new($self->session, $self->get("templateId")); + super(); + my $template = WebGUI::Asset::Template->newById($self->session, $self->templateId); if (!$template) { WebGUI::Error::ObjectNotFound::Template->throw( error => qq{Template not found}, - templateId => $self->get("templateId"), + templateId => $self->templateId, assetId => $self->getId, ); } $template->prepare($self->getMetaDataAsTemplateVariables); $self->{_viewTemplate} = $template; return undef; -} +}; #------------------------------------------------------------------- @@ -1730,19 +1722,19 @@ purges it's data. =cut -sub purge { +override purge => sub { my $self = shift; my $session = $self->session; my $db = $self->session->db; my @thingIds = $db->buildArray("select thingId from Thingy_things where assetId = ?", [$self->getId]); foreach my $thingId (@thingIds){ - $db->write("drop table if exists ".$db->dbh->quote_identifier("Thingy_".$thingId)); + $db->write("drop table if exists ".$db->quote_identifier("Thingy_".$thingId)); } $db->write("delete from Thingy_things where assetId = ?",[$self->getId]); $db->write("delete from Thingy_fields where assetId = ?",[$self->getId]); - return $self->SUPER::purge; -} + return super(); +}; #------------------------------------------------------------------- @@ -1830,7 +1822,7 @@ sub _updateFieldType { my $self = shift; my $session = $self->session; - my $error = $session->errorHandler; + my $log = $session->log; my $newFieldType = shift; my $fieldId = shift; @@ -1846,11 +1838,11 @@ sub _updateFieldType { if($newFieldType ne $fieldType){ my $thingyTableName = "Thingy_".$thingId; my $columnName = "field_".$fieldId; - $error->info("changing column: $columnName, table: $thingyTableName"); + $log->info("changing column: $columnName, table: $thingyTableName"); $self->session->db->write( - "ALTER TABLE ".$db->dbh->quote_identifier($thingyTableName). - " CHANGE ".$db->dbh->quote_identifier($columnName)." " - .$db->dbh->quote_identifier($columnName)." ".$dbDataType + "ALTER TABLE ".$db->quote_identifier($thingyTableName). + " CHANGE ".$db->quote_identifier($columnName)." " + .$db->quote_identifier($columnName)." ".$dbDataType ); } return undef; @@ -1879,7 +1871,7 @@ sub view { $var->{"manage_url"} = $session->url->append($url, 'func=manage'); #Get this Thingy's default thing - $defaultThingId = $self->get("defaultThingId"); + $defaultThingId = $self->defaultThingId; $self->appendThingsVars($var, $defaultThingId); if ($defaultThingId ne ""){ @@ -2018,10 +2010,10 @@ sub www_deleteThingDataViaAjax { my $thingId = $self->session->form->process("thingId"); my $thingDataId = $self->session->form->process('thingDataId'); - $session->http->setMimeType("application/json"); + $session->response->content_type("application/json"); unless ($thingId && $thingDataId) { - $session->http->setStatus("400", "Bad Request"); + $session->response->status(400); return JSON->new->encode({message => "Can't get thing data without a thingId and a thingDataId."}); } @@ -2032,11 +2024,11 @@ sub www_deleteThingDataViaAjax { $self->deleteThingData($thingId,$thingDataId); - $session->http->setMimeType("application/json"); + $session->response->content_type("application/json"); return JSON->new->encode({message => "Data with thingDataId $thingDataId was deleted."}); } else { - $session->http->setStatus("404", "Not Found"); + $session->response->status(404); return JSON->new->encode({message => "The thingId you specified can not be found."}); } } @@ -2068,7 +2060,7 @@ sub www_editThing { return $self->www_view unless ($thingId); if($thingId eq "new"){ - my $groupIdEdit = $self->get("groupIdEdit"); + my $groupIdEdit = $self->groupIdEdit; %properties = ( thingId=>$thingId, label=>$i18n->get('thing name label'), @@ -2109,22 +2101,17 @@ sub www_editThing { $tabForm->addTab('fields', $i18n->get('fields tab label')); - $self->session->style->setScript($self->session->url->extras('yui/build/utilities/utilities.js'), {type => - 'text/javascript'}); - $self->session->style->setScript($self->session->url->extras('yui/build/yahoo-dom-event/yahoo-dom-event.js'), {type=> - 'text/javascript'}); - $self->session->style->setScript($self->session->url->extras('yui/build/connection/connection-min.js'), {type => - 'text/javascript'}); - $self->session->style->setScript($self->session->url->extras('wobject/Thingy/thingy.js'), {type=> - 'text/javascript'}); - $self->session->style->setLink($self->session->url->extras('wobject/Thingy/thingy.css'), {type - =>'text/css', rel=>'stylesheet'}); + $self->session->style->setScript($self->session->url->extras('yui/build/utilities/utilities.js')); + $self->session->style->setScript($self->session->url->extras('yui/build/yahoo-dom-event/yahoo-dom-event.js')); + $self->session->style->setScript($self->session->url->extras('yui/build/connection/connection-min.js')); + $self->session->style->setScript($self->session->url->extras('wobject/Thingy/thingy.js')); + $self->session->style->setCss($self->session->url->extras('wobject/Thingy/thingy.css')); $tab = $tabForm->getTab('fields'); foreach my $fieldType ( keys %{ WebGUI::Form::FieldType->new($session)->getTypes }) { my $form = eval { WebGUI::Pluggable::instanciate("WebGUI::Form::".$fieldType, "new", [$session]) }; if ($@) { - $session->errorHandler->error($@); + $session->log->error($@); next; } my $definition = $form->definition($session); @@ -2489,7 +2476,7 @@ sub www_editThing { my %fieldProperties; $fieldProperties{thingId} = $thingId; my $dialogBody = $self->getEditFieldForm(\%fieldProperties); - $dialog .= $dialogBody->print; + $dialog .= $dialogBody->toHtml; $dialog .= "
      \n" ."
    "; @@ -2509,7 +2496,6 @@ database immediately. =cut sub www_editThingSave { - my $self = shift; return $self->session->privilege->insufficient() unless $self->canEdit; my $form = $self->session->form; @@ -2580,7 +2566,7 @@ sub www_editField { $fieldId = $session->form->process("fieldId"); $thingId = $session->form->process("thingId"); %properties = $session->db->quickHash("select * from Thingy_fields where thingId=? and fieldId=? and assetId=?", - [$thingId,$fieldId,$self->get("assetId")]); + [$thingId,$fieldId,$self->getId]); if($session->form->process("copy")){ $properties{oldFieldId} = $properties{fieldId}; $properties{fieldId} = 'new'; @@ -2591,7 +2577,7 @@ sub www_editField { # Make sure we send debug information along with the field edit screen. $session->log->preventDebugOutput; - $self->session->output->print($dialogBody->print); + $self->session->output->print($dialogBody->toHtml); return "chunked"; } #------------------------------------------------------------------- @@ -2656,7 +2642,7 @@ sub www_editFieldSave { $properties{dateUpdated} = time(); $properties{updatedBy} = $session->user->userId; # Check if column has to be altered for existing fields. - $self->_updateFieldType($fieldType,$fieldId,$thingId,$self->get('assetId'),$dbDataType); + $self->_updateFieldType($fieldType,$fieldId,$thingId,$self->getId,$dbDataType); $newFieldId = $self->setCollateral("Thingy_fields","fieldId",\%properties,1,1,"thingId",$thingId); } @@ -2738,7 +2724,7 @@ sub canEditThingData { else { if ($thingProperties->{groupIdEdit} eq 'owner'){ my $owner = $session->db->quickScalar("select createdById " - ."from ".$session->db->dbh->quote_identifier("Thingy_".$thingId) + ."from ".$session->db->quote_identifier("Thingy_".$thingId) ." where thingDataId = ?",[$thingDataId]); if ($session->user->userId eq $owner || $self->canEdit){ return 1; @@ -2784,7 +2770,7 @@ sub canViewThingData { if ($thingProperties->{groupIdView} eq 'owner'){ my $owner = $session->db->quickScalar("select createdById " - ."from ".$session->db->dbh->quote_identifier("Thingy_".$thingId) + ."from ".$session->db->quote_identifier("Thingy_".$thingId) ." where thingDataId = ?",[$thingDataId]); if ($session->user->userId eq $owner || $self->canEdit){ return 1; @@ -2865,7 +2851,7 @@ sub editThingData { if ($thingDataId ne "new"){ # Get Field Values - %thingData = $session->db->quickHash("select * from ".$session->db->dbh->quote_identifier("Thingy_".$thingId) + %thingData = $session->db->quickHash("select * from ".$session->db->quote_identifier("Thingy_".$thingId) ." where thingDataId = ?",[$thingDataId]); } @@ -2884,7 +2870,7 @@ sub editThingData { $field{value} = $fieldValue || $field{defaultValue}; my $formElement .= $self->getFormPlugin(\%field,($resetForm eq ""))->toHtml; - my $hidden = ($field{status} eq "hidden" && !$self->session->var->isAdminOn); + my $hidden = ($field{status} eq "hidden" && !$self->session->isAdminOn); my $value = $field{value}; $value = $self->getFieldValue($value,\%field); @@ -3012,7 +2998,7 @@ sub www_editThingDataSaveViaAjax { my $i18n = WebGUI::International->new($self->session, "Asset_Thingy"); unless ($thingId && $thingDataId) { - $session->http->setStatus("400", "Bad Request"); + $session->response->status(400); return JSON->new->encode({message => "Can't get thing data without a thingId and a thingDataId."}); } @@ -3022,26 +3008,26 @@ sub www_editThingDataSaveViaAjax { ,$thingProperties); if($thingDataId eq 'new' && $self->hasEnteredMaxPerUser($thingId)){ - $session->http->setStatus("400", "Bad Request"); + $session->response->status(400); return JSON->new->encode({message => $i18n->get("has entered max per user message")}); } if($thingDataId eq 'new' && $self->hasEnteredMaxEntries($thingId)){ - $session->http->setStatus("400", "Bad Request"); + $session->response->status("400"); return JSON->new->encode({message => $i18n->get("has entered max total message")}); } my ($newThingDataId,$errors) = $self->editThingDataSave($thingId,$thingDataId); if (@{ $errors }) { - $session->http->setStatus("400", "Bad Request"); + $session->response->status(400); return JSON->new->encode($errors); } - $session->http->setStatus("200"); + $session->response->status("200"); return '{}'; } else { $session->log->warn("thingId ".$thingProperties->{thingId}." not found in thingProperties"); - $session->http->setStatus("404", "Not Found"); + $session->response->status(404); return JSON->new->encode({message => "The thingId you requested can not be found."}); } } @@ -3135,10 +3121,10 @@ sub www_getThingViaAjax { my $self = shift; my $session = $self->session; my $thingId = shift || $session->form->process('thingId'); - $session->http->setMimeType("application/json"); + $session->response->content_type("application/json"); unless ($thingId) { - $session->http->setStatus("400", "Bad Request"); + $session->response->status(400); return JSON->new->encode({message => "Can't return thing properties without a thingId."}); } @@ -3155,11 +3141,11 @@ sub www_getThingViaAjax { } $thingProperties->{field_loop} = \@field_loop; - $session->http->setMimeType("application/json"); + $session->response->content_type("application/json"); return JSON->new->encode($thingProperties); } else { - $session->http->setStatus("404", "Not Found"); + $session->response->status(404); return JSON->new->encode({message => "The thingId you requested can not be found."}); } } @@ -3177,7 +3163,7 @@ sub www_getThingsViaAjax { my $self = shift; my $session = $self->session; - $session->http->setMimeType("application/json"); + $session->response->content_type("application/json"); my @visibleThings; my $things = $self->getThings; @@ -3193,7 +3179,7 @@ sub www_getThingsViaAjax { return JSON->new->encode(\@visibleThings); } else { - $session->http->setStatus("404", "Not Found"); + $session->response->status(404); return JSON->new->encode({message => "No visible Things were found in this Thingy."}); } } @@ -3222,14 +3208,17 @@ sub www_import { return $session->privilege->insufficient() unless $self->hasPrivileges($thingProperties->{groupIdImport}); $fields = $session->db->read('select label, fieldId, fieldType, fieldInOtherThingId from Thingy_fields ' - .' where assetId = '.$session->db->quote($self->get("assetId")) + .' where assetId = '.$session->db->quote($self->getId) .' and thingId = '.$session->db->quote($thingId) .' order by sequenceNumber'); while (my $field = $fields->hashRef) { push(@insertColumns, $field) if ($session->form->process("fileContains_".$field->{fieldId})); } + - my $error = $self->session->errorHandler; + my $log = $self->session->log; + use Data::Dumper; + $log->info( "Importing columns: " . Dumper( \@insertColumns ) ); my $storage = WebGUI::Storage->createTemp($self->session); $handleDuplicates = $session->form->process("handleDuplicates"); @@ -3237,7 +3226,7 @@ sub www_import { foreach my $file (sort(@{$storage->getFiles})) { next unless ($storage->getFileExtension($file) eq "csv"); - $error->info("Found import file $file"); + $log->info("Found import file $file"); open my $importFile,"<:raw:eol(NATIVE)",$storage->getPath($file); my $lineNumber = 0; my @data = (); @@ -3245,10 +3234,10 @@ sub www_import { while ( my $row = WebGUI::Text::readCSV($importFile) ) { if ($lineNumber == 0 && $session->form->process('ignoreFirstLine')){ $lineNumber++; - $error->info("Skipping first line"); + $log->info("Skipping first line"); next; } - $error->info("Reading line $lineNumber: @{ $row }"); + $log->info("Reading line $lineNumber: @{ $row }"); $lineNumber++; @data = @{ $row }; @@ -3274,7 +3263,7 @@ sub www_import { $query .= " limit 1"; ($foundDuplicateId) = $session->db->quickArray($query); if ($foundDuplicateId){ - $error->info("found duplicate record: ".$foundDuplicateId." for data: ". @{ $row }); + $log->info("found duplicate record: ".$foundDuplicateId." for data: ". @{ $row }); } } @@ -3304,14 +3293,14 @@ sub www_import { } if ($foundDuplicateId && $handleDuplicates eq "overwrite"){ $thingData{thingDataId} = $foundDuplicateId; - $error->info("Overwriting, thingDataId = ".$thingData{thingDataId}); + $log->info("Overwriting, thingDataId = ".$thingData{thingDataId}); } elsif ($foundDuplicateId eq ""){ $thingData{thingDataId} = "new"; - $error->info("Importing new line"); + $log->info("Importing new line"); } else{ - $error->info("Skipping line"); + $log->info("Skipping line"); next; } @@ -3326,7 +3315,7 @@ sub www_import { $thingData{updatedById} = $session->user->userId; } - $thingData{ipAddress} = $session->env->getIp; + $thingData{ipAddress} = $session->request->address; if($thingData{thingDataId} eq 'new' && $self->hasEnteredMaxPerUser($thingId)){ last; @@ -3365,32 +3354,32 @@ sub www_importForm { $i18n = WebGUI::International->new($self->session, "Asset_Thingy"); $output = "

    ".$i18n->get("import label")."

    "; - $form = WebGUI::HTMLForm->new($self->session,-action=>$self->getUrl); - $form->hidden( - -name => "thingId", - -value => $thingId + $form = WebGUI::FormBuilder->new($self->session,action=>$self->getUrl); + $form->addField( "hidden", + name => "thingId", + value => $thingId ); - $form->hidden( - -name => "func", - -value => "import" + $form->addField( "hidden", + name => "func", + value => "import" ); - $form->file( - -name => "importFile", - -label => $i18n->get("import file label"), + $form->addField( "file", + name => "importFile", + label => $i18n->get("import file label"), ); - $form->selectBox( - -name => "handleDuplicates", - -label=> $i18n->get("duplicates label"), - -options=> { + $form->addField( "selectBox", + name => "handleDuplicates", + label=> $i18n->get("duplicates label"), + options=> { "skip" => $i18n->get("skip label"), "overwrite" => $i18n->get("overwrite label"), }, ); - $form->yesNo( - -name=>"ignoreFirstLine", - -label=>$i18n->get("ignore first line label"), + $form->addField( "yesNo", + name=>"ignoreFirstLine", + label=>$i18n->get("ignore first line label"), ); $fieldOptions = "" @@ -3402,24 +3391,24 @@ sub www_importForm { $fields = $self->getFields($thingId); while (my $field = $fields->hashRef) { $fieldOptions .= ""; } $fieldOptions .= "
    ".$field->{label}.""; - $fieldOptions .= WebGUI::Form::checkbox($self->session, { + $fieldOptions .= WebGUI::Form::Checkbox->new($self->session, { checked => "", name => "fileContains_".$field->{fieldId}, value => 1, - }); + })->toHtml; $fieldOptions .= ""; - $fieldOptions .= WebGUI::Form::checkbox($self->session, { + $fieldOptions .= WebGUI::Form::Checkbox->new($self->session, { checked => "", name => "checkDuplicates_".$field->{fieldId}, value => 1, - }); + })->toHtml; $fieldOptions .= "
    "; - $form->raw($fieldOptions); - $form->submit; + $form->addField( "ReadOnly", name => 'fieldOptions', value => $fieldOptions ); + $form->addField( "submit", name => "send" ); - $output .= $form->print; + $output .= $form->toHtml; return $self->processStyle($output); } @@ -3472,7 +3461,7 @@ sub www_manage { $var->{"things_loop"} = \@things_loop; - return $self->processStyle($self->processTemplate($var, $self->get("templateId"))); + return $self->processStyle($self->processTemplate($var, $self->templateId)); } #------------------------------------------------------------------- @@ -3489,13 +3478,13 @@ sub www_moveFieldConfirm { my $session = $self->session; return $session->privilege->insufficient() unless $self->canEdit; - my $error = $self->session->errorHandler; + my $log = $self->session->log; my $direction = $session->form->process('direction'); - my $assetId = $self->get('assetId'); + my $assetId = $self->getId; my $fieldId = $session->form->process('fieldId'); my $targetFieldId = $session->form->process('targetFieldId'); - $error->info("moving $fieldId to target $targetFieldId, direction: $direction"); + $log->info("moving $fieldId to target $targetFieldId, direction: $direction"); my ($thingId,$originalRank) = $session->db->quickArray( "select thingId, sequenceNumber from Thingy_fields where fieldId = ".$session->db->quote($fieldId)." and assetId = ".$session->db->quote($assetId)); @@ -3567,7 +3556,7 @@ sub www_searchViaAjax { my $i18n = WebGUI::International->new($self->session,"Asset_Thingy"); unless ($thingId) { - $session->http->setStatus("400", "Bad Request"); + $session->response->status(400); return JSON->new->encode({message => "Can't perform search without a thingId."}); } @@ -3578,11 +3567,11 @@ sub www_searchViaAjax { my $var = $self->getSearchTemplateVars($thingId,$thingProperties); - $session->http->setMimeType("application/json"); + $session->response->content_type("application/json"); return JSON->new->encode($var); } else { - $session->http->setStatus("404", "Not Found"); + $session->response->status(404); return JSON->new->encode({message => "The thingId you requested can not be found."}); } } @@ -3674,7 +3663,6 @@ sub getSearchTemplateVars { next FORM unless defined $param; $currentUrl = $session->url->append($currentUrl, $form.'='.$param); } - $fields = $self->getFields($thingId); while (my $field = $fields->hashRef) { if ($field->{searchIn}){ @@ -3738,7 +3726,7 @@ sub getSearchTemplateVars { } } else{ - $self->session->errorHandler->warn("The default Thing has no fields selected to display in the search."); + $self->session->log->warn("The default Thing has no fields selected to display in the search."); $noFields = 1; } @@ -3779,15 +3767,15 @@ sub getSearchTemplateVars { if ($self->canEditThingData($thingId,$thingDataId,$thingProperties)){ $templateVars{canEditThingData} = 1; $templateVars{searchResult_delete_icon} = $session->icon->delete('func=deleteThingDataConfirm;thingId=' - .$thingId.';thingDataId='.$thingDataId,$self->get("url"),$i18n->get('delete thing data warning')); + .$thingId.';thingDataId='.$thingDataId,$self->url,$i18n->get('delete thing data warning')); $templateVars{searchResult_delete_url} = $session->url->append($url, 'func=deleteThingDataConfirm;thingId='.$thingId.';thingDataId='.$thingDataId); $templateVars{searchResult_edit_icon} = $session->icon->edit('func=editThingData;thingId=' - .$thingId.';thingDataId='.$thingDataId,$self->get("url")); + .$thingId.';thingDataId='.$thingDataId,$self->url); $templateVars{searchResult_edit_url} = $session->url->append($url, 'func=editThingData;thingId='.$thingId.';thingDataId='.$thingDataId); $templateVars{searchResult_copy_icon} = $session->icon->copy('func=copyThingData;thingId=' - .$thingId.';thingDataId='.$thingDataId,$self->get("url")); + .$thingId.';thingDataId='.$thingDataId,$self->url); $templateVars{searchResult_copy_url} = $session->url->append($url, 'func=copyThingData;thingId='.$thingId.';thingDataId='.$thingDataId,); } @@ -3887,7 +3875,7 @@ sub www_selectFieldInThing { my $fields = $session->db->buildHashRef('select fieldId, label from Thingy_fields' .' where assetId = ? and thingId = ? and fieldId != ? order by sequenceNumber', - [$self->get("assetId"),$thingId,$fieldId]); + [$self->getId,$thingId,$fieldId]); my ($value) = $session->db->quickArray('select fieldInOtherThingId from Thingy_fields where fieldId = ' .$session->db->quote($fieldId)); @@ -3975,8 +3963,10 @@ sub www_viewThingData { my $template; if( $templateId ) { - $template = WebGUI::Asset::Template->newByUrl( $session, $templateId ) || - WebGUI::Asset::Template->newByDynamicClass( $session, $templateId ); + $template = eval { WebGUI::Asset::Template->newByUrl( $session, $templateId ) }; + if ( $@ ) { + $template = eval { WebGUI::Asset::Template->newById( $session, $templateId ) }; + } } return $self->processStyle( @@ -4009,10 +3999,10 @@ sub www_viewThingDataViaAjax { my $thingId = shift || $session->form->process('thingId'); my $thingDataId = shift || $session->form->process('thingDataId'); - $session->http->setMimeType("application/json"); + $session->response->content_type("application/json"); unless ($thingId && $thingDataId) { - $session->http->setStatus("400", "Bad Request"); + $session->response->status(400); return JSON->new->encode({message => "Can't get thing data without a thingId and a thingDataId."}); } @@ -4027,14 +4017,15 @@ sub www_viewThingDataViaAjax { return JSON->new->encode($output); } else{ - $session->http->setStatus("404", "Not Found"); + $session->response->status(404); return JSON->new->encode({message => "The thingDataId you requested can not be found."}); } } else { - $session->http->setStatus("404", "Not Found"); + $session->response->status(404); return JSON->new->encode({message => "The thingId you requested can not be found."}); } } +__PACKAGE__->meta->make_immutable; 1; diff --git a/lib/WebGUI/Asset/Wobject/TimeTracking.pm b/lib/WebGUI/Asset/Wobject/TimeTracking.pm index 5ca3cfc0d..cfed85e42 100644 --- a/lib/WebGUI/Asset/Wobject/TimeTracking.pm +++ b/lib/WebGUI/Asset/Wobject/TimeTracking.pm @@ -4,7 +4,7 @@ use strict; our $VERSION = "1.0.0"; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -16,101 +16,78 @@ our $VERSION = "1.0.0"; use DateTime; use Tie::IxHash; use WebGUI::International; -use WebGUI::Utility; use POSIX qw(ceil floor); -use base 'WebGUI::Asset::Wobject'; +use Moose; +use WebGUI::Definition::Asset; +extends 'WebGUI::Asset::Wobject'; +define assetName => ['assetName', 'Asset_TimeTracking']; +define icon => 'timetrack.gif'; +define tableName => 'TT_wobject'; +property userViewTemplateId => ( + fieldType => "template", + default => 'TimeTrackingTMPL000001', + tab => "display", + namespace => "TimeTracking_user", + hoverHelp => ['userViewTemplate hoverhelp', 'Asset_TimeTracking'], + label => ['userViewTemplate label', 'Asset_TimeTracking'], + ); +property managerViewTemplateId => ( + fieldType => "template", + default => 'TimeTrackingTMPL000002', + tab => "display", + namespace => "TimeTracking_manager", + hoverHelp => ['managerViewTemplate hoverhelp', 'Asset_TimeTracking'], + label => ['managerViewTemplate label', 'Asset_TimeTracking'], + ); +property timeRowTemplateId => ( + fieldType => "template", + default => 'TimeTrackingTMPL000003', + tab => "display", + namespace => "TimeTracking_row", + hoverHelp => ['timeRowTemplateId hoverhelp', 'Asset_TimeTracking'], + label => ['timeRowTemplateId label', 'Asset_TimeTracking'], + ); +property groupToManage => ( + fieldType => "group", + default => 3, + tab => "security", + hoverHelp => ['groupToManage hoverhelp', 'Asset_TimeTracking'], + label => ['groupToManage label', 'Asset_TimeTracking'], + ); +property pmIntegration => ( + fieldType => "yesNo", + default => 0, + tab => "properties", + hoverHelp => ["Choose yes to pull projects and task information from the various project management assets on your site", 'Asset_TimeTracking'], + label => ["Project Management Integration", 'Asset_TimeTracking'], + ); + + + + use WebGUI::Asset::Wobject::ProjectManager; -#------------------------------------------------------------------- - -=head2 definition - -=cut - -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift; - my $i18n = WebGUI::International->new($session,'Asset_TimeTracking'); - my %properties; - tie %properties, 'Tie::IxHash'; - %properties = ( - userViewTemplateId =>{ - fieldType=>"template", - defaultValue=>'TimeTrackingTMPL000001', - tab=>"display", - namespace=>"TimeTracking_user", - hoverHelp=>$i18n->get('userViewTemplate hoverhelp'), - label=>$i18n->get('userViewTemplate label') - }, - managerViewTemplateId => { - fieldType=>"template", - defaultValue=>'TimeTrackingTMPL000002', - tab=>"display", - namespace=>"TimeTracking_manager", - hoverHelp=>$i18n->get('managerViewTemplate hoverhelp'), - label=>$i18n->get('managerViewTemplate label') - }, - timeRowTemplateId=> { - fieldType=>"template", - defaultValue=>'TimeTrackingTMPL000003', - tab=>"display", - namespace=>"TimeTracking_row", - hoverHelp=>$i18n->get('timeRowTemplateId hoverhelp'), - label=>$i18n->get('timeRowTemplateId label') - }, - groupToManage => { - fieldType=>"group", - defaultValue=>3, - tab=>"security", - hoverHelp=>$i18n->get('groupToManage hoverhelp'), - label=>$i18n->get('groupToManage label') - }, - pmIntegration => { - fieldType=>"yesNo", - defaultValue=>0, - tab=>"properties", - hoverHelp=>$i18n->get("Choose yes to pull projects and task information from the various project management assets on your site"), - label=>$i18n->get("Project Management Integration") - }, - ); - push(@{$definition}, { - assetName=>$i18n->get('assetName'), - icon=>'timetrack.gif', - autoGenerateForms=>1, - tableName=>'TT_wobject', - className=>'WebGUI::Asset::Wobject::TimeTracking', - properties=>\%properties - }); - return $class->SUPER::definition($session, $definition); -} - - #------------------------------------------------------------------- =head2 prepareView =cut -sub prepareView { +override prepareView => sub { my $self = shift; - $self->SUPER::prepareView(); + super(); my $template; - #if($user->isInGroup($self->get("groupToManage")) { - # $template = WebGUI::Asset::Template->new($self->session, $self->get("managerViewTemplateId")); - #} else { - $template = WebGUI::Asset::Template->new($self->session, $self->get("userViewTemplateId")); - #} + $template = WebGUI::Asset::Template->newById($self->session, $self->userViewTemplateId); if (!$template) { WebGUI::Error::ObjectNotFound::Template->throw( error => qq{Template not found}, - templateId => $self->get("userViewTemplateId"), + templateId => $self->userViewTemplateId, assetId => $self->getId, ); } $template->prepare($self->getMetaDataAsTemplateVariables); $self->{_viewTemplate} = $template; -} +}; #------------------------------------------------------------------- @@ -132,19 +109,6 @@ sub processErrors { } -#------------------------------------------------------------------- - -=head2 purge - -=cut - -sub purge { - my $self = shift; - #purge your wobject-specific data here. This does not include fields - # you create for your NewWobject asset/wobject table. - return $self->SUPER::purge; -} - #------------------------------------------------------------------- =head2 getDaysInWeek @@ -156,7 +120,7 @@ sub getDaysInWeek { my $week = $_[0]; return [] unless $week; - my ($session,$dt,$eh) = $self->getSessionVars("datetime","errorHandler"); + my ($session,$dt,$log) = $self->getSessionVars("datetime","log"); my $i18n = WebGUI::International->new($session,'Asset_TimeTracking'); #Week View Below @@ -205,11 +169,11 @@ sub view { my $self = shift; my $var = $self->get; - my ($session,$privilege,$form,$db,$dt,$user,$eh,$config) = $self->getSessionVars("privilege","form","db","datetime","user","errorHandler","config"); + my ($session,$privilege,$form,$db,$dt,$user,$log,$config) = $self->getSessionVars("privilege","form","db","datetime","user","log","config"); my $i18n = WebGUI::International->new($session,'Asset_TimeTracking'); - $var->{'extras'} = $config->get("extrasURL")."/wobject/TimeTracking"; + $var->{'extras'} = $session->url->make_urlmap_work($config->get("extrasURL"))."/wobject/TimeTracking"; - if($user->isInGroup($self->get("groupToManage"))) { + if($user->isInGroup($self->groupToManage)) { $var->{'project.manage.url'} = $self->getUrl("func=manageProjects"); $var->{'project.manage.label'} = $i18n->get("project manage label"); } @@ -246,7 +210,7 @@ sub view { sub www_editTimeEntrySave { my $self = shift; - my ($session,$privilege,$form,$db,$user,$eh,$dt) = $self->getSessionVars("privilege","form","db","user","errorHandler","datetime"); + my ($session,$privilege,$form,$db,$user,$log,$dt) = $self->getSessionVars("privilege","form","db","user","log","datetime"); return $privilege->insufficient unless ($self->canView); @@ -303,7 +267,7 @@ sub www_editTimeEntrySave { } # Update Project Management App if integrated - if ($self->getValue("pmIntegration")) { + if ($self->pmIntegration) { foreach my $projectId (keys %deltaHours) { foreach my $taskId (keys %{$deltaHours{$projectId}}) { my $deltaHours = $deltaHours{$projectId}{$taskId}; @@ -325,11 +289,11 @@ sub www_editTimeEntrySave { sub www_deleteProject { my $self = shift; - my ($session,$privilege,$form,$db,$user,$eh,$config) = $self->getSessionVars("privilege","form","db","user","errorHandler","config"); + my ($session,$privilege,$form,$db,$user,$log,$config) = $self->getSessionVars("privilege","form","db","user","log","config"); my $i18n = WebGUI::International->new($session,'Asset_TimeTracking'); #Check Privileges - return $privilege->insufficient unless ($user->isInGroup($self->get("groupToManage"))); + return $privilege->insufficient unless ($user->isInGroup($self->groupToManage)); my $projectId = $form->get("projectId"); my ($count) = $db->quickArray("select count(*) from TT_timeEntry where projectId=".$db->quote($projectId)); @@ -352,14 +316,14 @@ sub www_deleteProject { sub www_editProject { my $self = shift; - my ($session,$privilege,$form,$db,$user,$eh,$config) = $self->getSessionVars("privilege","form","db","user","errorHandler","config"); + my ($session,$privilege,$form,$db,$user,$log,$config) = $self->getSessionVars("privilege","form","db","user","log","config"); my $i18n = WebGUI::International->new($session,'Asset_TimeTracking'); #Check Privileges - return $privilege->insufficient unless ($user->isInGroup($self->get("groupToManage"))); + return $privilege->insufficient unless ($user->isInGroup($self->groupToManage)); my $projectId = $_[0] || $form->get("projectId") || "new"; my $taskError = qq|
    $_[1]| if($_[1]); - my $extras = $config->get("extrasURL")."/wobject/TimeTracking"; + my $extras = $session->url->make_urlmap_work($config->get("extrasURL"))."/wobject/TimeTracking"; my $project = $db->quickHashRef("select * from TT_projectList where projectId=".$db->quote($projectId)); #Build Form @@ -457,11 +421,11 @@ sub www_editProject { sub www_editProjectSave { my $self = shift; - my ($session,$privilege,$form,$db,$dt,$user,$eh) = $self->getSessionVars("privilege","form","db","datetime","user","errorHandler"); + my ($session,$privilege,$form,$db,$dt,$user,$log) = $self->getSessionVars("privilege","form","db","datetime","user","log"); my $i18n = WebGUI::International->new($session,'Asset_TimeTracking'); #Check Privileges - return $privilege->insufficient unless ($user->isInGroup($self->get("groupToManage"))); + return $privilege->insufficient unless ($user->isInGroup($self->groupToManage)); my $action = $form->get("action"); @@ -522,16 +486,16 @@ sub www_editProjectSave { sub www_manageProjects { my $self = shift; - my ($session,$privilege,$form,$db,$dt,$user,$eh,$config) = $self->getSessionVars("privilege","form","db","datetime","user","errorHandler","config"); + my ($session,$privilege,$form,$db,$dt,$user,$log,$config) = $self->getSessionVars("privilege","form","db","datetime","user","log","config"); my $i18n = WebGUI::International->new($session,'Asset_TimeTracking'); #Check Privileges - return $privilege->insufficient unless ($user->isInGroup($self->get("groupToManage"))); + return $privilege->insufficient unless ($user->isInGroup($self->groupToManage)); my $pnLabel = $i18n->get("manage project name label"); my $atLabel = $i18n->get("manage project available task label"); my $resLabel = $i18n->get("manage project resource label"); - my $extras = $config->get("extrasURL")."/wobject/TimeTracking"; + my $extras = $session->url->make_urlmap_work($config->get("extrasURL"))."/wobject/TimeTracking"; my $errorMessage = ""; $errorMessage = qq|$_[0]| if($_[0]); @@ -651,12 +615,12 @@ sub www_buildTimeTable { my $viewVar = $_[0]; my $var = {}; $var->{'extras'} = $viewVar->{'extras'}; - my ($session,$dt,$eh,$form,$db,$user,$privilege) = $self->getSessionVars("datetime","errorHandler","form","db","user","privilege"); + my ($session,$dt,$log,$form,$db,$user,$privilege) = $self->getSessionVars("datetime","log","form","db","user","privilege"); my $i18n = WebGUI::International->new($session,'Asset_TimeTracking'); return $privilege->insufficient unless ($self->canView); - my $pmIntegration = $self->getValue("pmIntegration"); + my $pmIntegration = $self->pmIntegration; my $week = $form->get("week") || $dt->time; @@ -702,9 +666,13 @@ sub www_buildTimeTable { #Build project list and task lists from project management app my ($pmAssetId) = $db->quickArray("select a.assetId from PM_wobject a, asset b where a.assetId=b.assetId and b.state not like 'trash%'"); if($pmAssetId) { - $pmAsset = WebGUI::Asset->newByDynamicClass($session,$pmAssetId); - my %pmProjectList = %{$pmAsset->getProjectList($user->userId)}; - %projectList = WebGUI::Utility::sortHash((%projectList,%pmProjectList)); + $pmAsset = WebGUI::Asset->newById($session,$pmAssetId); + my %pmProjectList = (%projectList, %{$pmAsset->getProjectList($user->userId)}); + %projectList = + map { @$_ } + sort { $a->[1] cmp $b->[1] } + map { [ $_, $pmProjectList{$_} ] } + keys %pmProjectList; } } @@ -743,11 +711,11 @@ sub www_buildTimeTable { %projectList = (""=>$chooseLabel,%projectList); my $resourceIdFromForm = $form->get("resourceId"); - my $resourceId = ($user->isInGroup($self->get("groupToManage")) && $resourceIdFromForm)?$resourceIdFromForm:$user->userId; + my $resourceId = ($user->isInGroup($self->groupToManage) && $resourceIdFromForm)?$resourceIdFromForm:$user->userId; #Build Report Info my $report = $db->quickHashRef("select * from TT_report where resourceId=? and assetId=? and startDate=? and endDate=?",[$resourceId,$self->getId,$weekStart,$weekEnd]); my $reportId = $report->{reportId}; - #$eh->warn($reportId); + #$log->warn($reportId); #Add Report Stuff to form header $viewVar->{'form.header'} .= WebGUI::Form::hidden($session, { -name=>"reportId", @@ -806,7 +774,7 @@ sub www_buildTimeTable { $var->{'time.entry.loop'} = \@timeEntries; $viewVar->{'time.report.rows.total'} = (scalar(@timeEntries)+1); - return $self->processTemplate($var,$self->getValue("timeRowTemplateId")); + return $self->processTemplate($var,$self->timeRowTemplateId); } #------------------------------------------------------------------- @@ -817,7 +785,7 @@ sub www_buildTimeTable { sub _buildRow { my $self = shift; - my ($session,$dt,$eh,$form,$db,$user) = $self->getSessionVars("datetime","errorHandler","form","db","user"); + my ($session,$dt,$log,$form,$db,$user) = $self->getSessionVars("datetime","log","form","db","user"); my $i18n = WebGUI::International->new($session,'Asset_TimeTracking'); my $entry = $_[0] || {}; @@ -857,7 +825,7 @@ sub _buildRow { else { %taskHash = %{$taskList->{$projectId}}; } - #$eh->warn($projectId); + #$log->warn($projectId); } my $chooseLabel = $i18n->get("Choose One"); %taskHash = (""=>$chooseLabel,%taskHash); @@ -918,4 +886,5 @@ sub _buildRow { } +__PACKAGE__->meta->make_immutable; 1; diff --git a/lib/WebGUI/Asset/Wobject/UserList.pm b/lib/WebGUI/Asset/Wobject/UserList.pm index 5a450d4a0..0f4bd9305 100644 --- a/lib/WebGUI/Asset/Wobject/UserList.pm +++ b/lib/WebGUI/Asset/Wobject/UserList.pm @@ -1,7 +1,7 @@ package WebGUI::Asset::Wobject::UserList; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 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,16 +12,134 @@ package WebGUI::Asset::Wobject::UserList; use strict; use HTML::Entities; -use Tie::CPHash; use Tie::IxHash; -use WebGUI::Utility; use WebGUI::Asset::Wobject; use WebGUI::Operation::Shared; use WebGUI::International; use WebGUI::Pluggable; use WebGUI::Form::Image; use WebGUI::Form::File; -use base 'WebGUI::Asset::Wobject'; +use Moose; +use WebGUI::Definition::Asset; +extends 'WebGUI::Asset::Wobject'; + +define assetName => ['assetName', 'Asset_UserList']; +define icon => 'userlist.gif'; +define tableName => 'UserList'; +property templateId => ( + fieldType => "template", + default => 'UserListTmpl0000000001', + namespace => 'UserList', + tab => "display", + hoverHelp => ["template description",'Asset_UserList'], + label => ["template label",'Asset_UserList'], + ); + +property showGroupId => ( + fieldType => "group", + default => "7", + label => ["Group to show label",'Asset_UserList'], + hoverHelp => ['Group to show description','Asset_UserList'], + tab => "display", + ); +property hideGroupId => ( + fieldType => "group", + default => "3", + label => ["Group to hide label",'Asset_UserList'], + hoverHelp => ['Group to hide description','Asset_UserList'], + tab => "display", + ); +property usersPerPage => ( + fieldType => "integer", + default => "25", + tab => "display", + hoverHelp => ['Users per page description','Asset_UserList'], + label => ["Users per page label",'Asset_UserList'], + ); +property alphabet => ( + fieldType => "text", + default => "a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z", + tab => "display", + label => ["alphabet label",'Asset_UserList'], + hoverHelp => ['alphabet description','Asset_UserList'], + ); +property alphabetSearchField => ( + fieldType => "selectBox", + default => "lastName", + tab => "display", + options => \&_alphabetSearchField_options, + label => ["alphabetSearchField label",'Asset_UserList'], + hoverHelp => ['alphabetSearchField description','Asset_UserList'], + ); +sub _alphabetSearchField_options { + my $self = shift; + my $session = $self->session; + my $i18n = WebGUI::International->new($session, 'Asset_UserList'); + my $profileFields = $self->_get_profile_fields(); + my %alphabetSearchFieldOptions; + tie %alphabetSearchFieldOptions, 'Tie::IxHash'; + %alphabetSearchFieldOptions = ('disableAlphabetSearch'=>'Disable Alphabet Search',%{ $profileFields } ); + return \%alphabetSearchFieldOptions; +} +sub _get_profile_fields { + my $self = shift; + my $session = $self->session; + my %profileFields; + tie %profileFields, 'Tie::IxHash'; + my $fields = $session->db->read("SELECT field.fieldName, field.label FROM userProfileField as field " + ."left join userProfileCategory as cat USING(profileCategoryId) ORDER BY cat.sequenceNumber, field.sequenceNumber"); + while (my $field = $fields->hashRef){ + my $label = WebGUI::Operation::Shared::secureEval($session,$field->{label}); + $profileFields{$field->{fieldName}} = $label; + } + return \%profileFields; +} +property showOnlyVisibleAsNamed => ( + fieldType => "yesNo", + default => "0", + tab => "display", + label => ["showOnlyVisibleAsNamed label",'Asset_UserList'], + hoverHelp => ['showOnlyVisibleAsNamed description','Asset_UserList'], + ); +property sortOrder => ( + fieldType => "selectBox", + default => 'asc', + tab => 'display', + options => \&_sortOrder_options, + label => ['sort order','Asset_UserList'], + hoverHelp => ['sort order description','Asset_UserList'], + ); +sub _sortOrder_options { + my $self = shift; + my $session = $self->session; + my $i18n = WebGUI::International->new($session, 'Asset_UserList'); + my %options = ( asc => $i18n->get('ascending'), + desc => $i18n->get('descending') ); + return \%options; + +} +property sortBy => ( + fieldType => "selectBox", + default => 'lastName', + tab => 'display', + options => \&_get_profile_fields, + label => ['sort by','Asset_UserList'], + hoverHelp => ['sort by description','Asset_UserList'], + ); +property overridePublicEmail => ( + fieldType => "yesNo", + default => "0", + tab => "display", + label => ["overridePublicEmail label",'Asset_UserList'], + hoverHelp => ['overridePublicEmail description','Asset_UserList'], + ); +property overridePublicProfile => ( + fieldType => "yesNo", + default => "0", + tab => "display", + label => ["overridePublicProfile label",'Asset_UserList'], + hoverHelp => ['overridePublicProfile description','Asset_UserList'], + ); =head1 NAME @@ -61,11 +179,11 @@ sub getAlphabetSearchLoop { my $htmlEncodedLetter = encode_entities($letter); my $searchURL = "?searchExact_".$fieldName."=".$letter."%25"; my $hasResults; - my $users = $self->session->db->read("select userId from userProfileData where `$fieldName` like '".$letter."%'"); + my $users = $self->session->db->read("select userId from users join userProfileData using (userId) where `$fieldName` like '".$letter."%'"); while (my $user = $users->hashRef){ - my $showGroupId = $self->get("showGroupId"); + my $showGroupId = $self->showGroupId; if ($showGroupId eq '0' || ($showGroupId && $self->isInGroup($showGroupId,$user->{userId}))){ - unless ($self->get("hideGroupId") ne '0' && $self->isInGroup($self->get("hideGroupId"),$user->{userId})){ + unless ($self->hideGroupId ne '0' && $self->isInGroup($self->hideGroupId,$user->{userId})){ $hasResults = 1; last; } @@ -108,7 +226,7 @@ sub getFormElement { $param{value} = ($data->{defaultValue} =~ /checked/xi) ? 1 : ""; } - if (WebGUI::Utility::isIn($data->{fieldType},qw(SelectList CheckList SelectBox Attachments SelectSlider))) { + if ($data->{fieldType} ~~ [qw(SelectList CheckList SelectBox Attachments SelectSlider)]) { my @defaultValues; if ($self->session->form->param($name)) { @defaultValues = $self->session->form->selectList($name); @@ -124,8 +242,8 @@ sub getFormElement { if ($data->{possibleValues}){ my $values = WebGUI::Operation::Shared::secureEval($self->session,$data->{possibleValues}); unless (ref $values eq 'HASH') { - if ($self->get('possibleValues') =~ /\S/) { - $self->session->errorHandler->warn("Could not get a hash out of possible values for profile field " + if ($self->possibleValues =~ /\S/) { + $self->session->log->warn("Could not get a hash out of possible values for profile field " .$self->getId); } $values = {}; @@ -149,135 +267,6 @@ sub getFormElement { #------------------------------------------------------------------- -=head2 definition ( properties ) - -Defines wobject properties for UserList instances. - -=head3 properties - -A hash reference containing the properties of this wobject. - -=cut - -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift; - my %properties; - my $i18n = WebGUI::International->new($session, 'Asset_UserList'); - - my %profileFields; - tie %profileFields, 'Tie::IxHash'; - my $fields = $session->db->read("SELECT field.fieldName, field.label FROM userProfileField as field " - ."left join userProfileCategory as cat USING(profileCategoryId) ORDER BY cat.sequenceNumber, field.sequenceNumber"); - while (my $field = $fields->hashRef){ - my $label = WebGUI::Operation::Shared::secureEval($session,$field->{label}); - $profileFields{$field->{fieldName}} = $label; - } - my %alphabetSearchFieldOptions; - tie %alphabetSearchFieldOptions, 'Tie::IxHash'; - %alphabetSearchFieldOptions = ('disableAlphabetSearch'=>'Disable Alphabet Search',%profileFields); - - tie %properties, 'Tie::IxHash'; - %properties = ( - templateId =>{ - fieldType=>"template", - defaultValue=>'UserListTmpl0000000001', - namespace=>'UserList', - tab=>"display", - hoverHelp=>$i18n->get("template description"), - label=>$i18n->get("template label"), - }, - - showGroupId=>{ - fieldType=>"group", - defaultValue=>"7", - label=>$i18n->get("Group to show label"), - hoverHelp=>$i18n->get('Group to show description'), - tab=>"display", - }, - hideGroupId=>{ - fieldType=>"group", - defaultValue=>"3", - label=>$i18n->get("Group to hide label"), - hoverHelp=>$i18n->get('Group to hide description'), - tab=>"display", - }, - usersPerPage=>{ - fieldType=>"integer", - defaultValue=>"25", - tab=>"display", - hoverHelp=>$i18n->get('Users per page description'), - label=>$i18n->get("Users per page label"), - }, - alphabet=>{ - fieldType=>"text", - defaultValue=>"a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z", - tab=>"display", - label=>$i18n->get("alphabet label"), - hoverHelp=>$i18n->get('alphabet description'), - }, - alphabetSearchField=>{ - fieldType=>"selectBox", - defaultValue=>"lastName", - tab=>"display", - options=>\%alphabetSearchFieldOptions, - label=>$i18n->get("alphabetSearchField label"), - hoverHelp=>$i18n->get('alphabetSearchField description'), - }, - showOnlyVisibleAsNamed=>{ - fieldType=>"yesNo", - defaultValue=>"0", - tab=>"display", - label=>$i18n->get("showOnlyVisibleAsNamed label"), - hoverHelp=>$i18n->get('showOnlyVisibleAsNamed description'), - }, - sortOrder =>{ - fieldType=>"selectBox", - defaultValue=>'asc', - tab=>'display', - options=>{ asc => $i18n->get('ascending'), - desc => $i18n->get('descending') }, - label=>$i18n->get('sort order'), - hoverHelp=>$i18n->get('sort order description'), - }, - sortBy =>{ - fieldType=>"selectBox", - defaultValue=>'lastName', - tab=>'display', - options=>\%profileFields, - label=>$i18n->get('sort by'), - hoverHelp=>$i18n->get('sort by description'), - }, - overridePublicEmail=>{ - fieldType=>"yesNo", - defaultValue=>"0", - tab=>"display", - label=>$i18n->get("overridePublicEmail label"), - hoverHelp=>$i18n->get('overridePublicEmail description'), - }, - overridePublicProfile=>{ - fieldType=>"yesNo", - defaultValue=>"0", - tab=>"display", - label=>$i18n->get("overridePublicProfile label"), - hoverHelp=>$i18n->get('overridePublicProfile description'), - }, - ); - - push(@{$definition}, { - assetName=>$i18n->get('assetName'), - icon=>'userlist.gif', - autoGenerateForms=>1, - tableName=>'UserList', - className=>'WebGUI::Asset::Wobject::UserList', - properties=>\%properties - }); - return $class->SUPER::definition($session, $definition); -} - -#------------------------------------------------------------------- - =head2 isInGroup ( [ groupId ] ) Returns a boolean (0|1) value signifying that the user has the required privileges. Always returns true for Admins. @@ -329,14 +318,14 @@ See WebGUI::Asset::prepareView() for details. =cut -sub prepareView { +override prepareView => sub { my $self = shift; - $self->SUPER::prepareView(); - my $templateId = $self->get("templateId"); + super(); + my $templateId = $self->templateId; if ($self->session->form->process("overrideTemplateId") ne "") { $templateId = $self->session->form->process("overrideTemplateId"); } - my $template = WebGUI::Asset::Template->new($self->session, $templateId); + my $template = WebGUI::Asset::Template->newById($self->session, $templateId); if (!$template) { WebGUI::Error::ObjectNotFound::Template->throw( error => qq{Template not found}, @@ -348,7 +337,7 @@ sub prepareView { $self->{_viewTemplate} = $template; return undef; -} +}; #------------------------------------------------------------------- @@ -368,7 +357,7 @@ sub view { my $currentUrlWithoutSort = $self->getUrl(); foreach ($form->param) { - unless (WebGUI::Utility::isIn($_,qw(sortBy sortOrder op func)) || $_ =~ /identifier/i || $_ =~ /password/i) { + unless ( $_ ~~ [qw(sortBy sortOrder op func), qr/identifier/i, qr/password/i]) { $currentUrlWithoutSort = $url->append($currentUrlWithoutSort, $url->escape($_) .'='.$url->escape($form->process($_))); } @@ -405,7 +394,7 @@ sub view { "profileField_sortByURL"=>$sortByURL, }); } - unless($self->get("showOnlyVisibleAsNamed") && $profileField->{visible} != 1){ + unless($self->showOnlyVisibleAsNamed && $profileField->{visible} != 1){ $var{'profileField_'.$fieldName.'_label'} = $label; $var{'profileField_'.$fieldName.'_sortByURL'} = $sortByURL; } @@ -417,7 +406,7 @@ sub view { $var{'search_'.$fieldName.'_form'} = $self->getFormElement(\%formElementProperties); $var{'search_'.$fieldName.'_text'} = WebGUI::Form::Text($self->session, { -name => 'search_'.$fieldName, - -value => $form->process('search_'.$fieldName), + -value => scalar $form->process('search_'.$fieldName), }); $formElementProperties{value} = $form->process('search_Exact'.$fieldName); @@ -425,7 +414,7 @@ sub view { $var{'searchExact_'.$fieldName.'_form'} = $self->getFormElement(\%formElementProperties); $var{'searchExact_'.$fieldName.'_text'} = WebGUI::Form::Text($self->session, { -name => 'searchExact_'.$fieldName, - -value => $form->process('searchExact_'.$fieldName), + -value => scalar $form->process('searchExact_'.$fieldName), }); $var{'includeInSearch_'.$fieldName.'_hidden'} = WebGUI::Form::Hidden($self->session, { @@ -436,15 +425,15 @@ sub view { $var{'includeInSearch_'.$fieldName.'_checkBox'} = WebGUI::Form::Checkbox($self->session, { -name => 'includeInSearch_'.$fieldName, -value => '1', - -checked=> $form->process('includeInSearch_'.$fieldName), + -checked=> scalar $form->process('includeInSearch_'.$fieldName), }); } # Query user profile data. Exclude the visitor account and users that have been deactivated. - $sql = "select distinct users.userId, users.userName, userProfileData.publicProfile "; + $sql = "select distinct users.userId, users.userName, users.publicProfile "; # Include remaining profile fields in the query foreach my $profileField (@profileFields){ - $sql .= ", userProfileData." . $dbh->quote_identifier($profileField->{fieldName}); + $sql .= ", " . $dbh->quote_identifier($profileField->{fieldName}); } $sql .= " from users"; $sql .= " left join userProfileData using(userId) where users.userId != '1' and users.status = 'active'"; @@ -458,14 +447,14 @@ sub view { # Normal search with one keyword in a limited number of fields foreach my $profileField (@profileFields){ if ($form->process('includeInSearch_'.$profileField->{fieldName})){ - push(@profileSearchFields, 'userProfileData.'.$dbh->quote_identifier($profileField->{fieldName}) + push(@profileSearchFields, $dbh->quote_identifier($profileField->{fieldName}) .' like '. $dbh->quote('%'.$form->process('search').'%')); } } } else{ # Normal search with one keyword in all fields - $constraint = "(".join(' or ', map {'userProfileData.'.$dbh->quote_identifier($_->{fieldName}) + $constraint = "(".join(' or ', map {$dbh->quote_identifier($_->{fieldName}) .' like '.$dbh->quote('%'.$form->process('search').'%')} @profileFields).")"; } } @@ -475,14 +464,14 @@ sub view { # Exact search with one keyword in a limited number of fields foreach my $profileField (@profileFields){ if ($form->process('includeInSearch_'.$profileField->{fieldName})){ - push(@profileSearchFields,'userProfileData.'.$dbh->quote_identifier($profileField->{fieldName}) + push(@profileSearchFields,$dbh->quote_identifier($profileField->{fieldName}) .' like '.$dbh->quote($form->process('search'))); } } } else{ # Exact search with one keyword in all fields - $constraint = "(".join(' or ', map {'userProfileData.'.$dbh->quote_identifier($_->{fieldName}) + $constraint = "(".join(' or ', map {$dbh->quote_identifier($_->{fieldName}) .' like ' . $dbh->quote($form->process('searchExact'))} @profileFields).")"; } } @@ -491,11 +480,11 @@ sub view { foreach my $profileField (@profileFields){ # Exact search has precedence over normal search if ($form->process('searchExact_'.$profileField->{fieldName})){ - push(@profileSearchFields,'userProfileData.'.$dbh->quote_identifier($profileField->{fieldName}) + push(@profileSearchFields,$dbh->quote_identifier($profileField->{fieldName}) .' like '. $dbh->quote($form->process('searchExact_'.$profileField->{fieldName}))); } elsif ($form->process('search_'.$profileField->{fieldName})){ - push(@profileSearchFields,'userProfileData.'.$dbh->quote_identifier($profileField->{fieldName}) + push(@profileSearchFields,$dbh->quote_identifier($profileField->{fieldName}) .' like '. $dbh->quote('%'.$form->process('search_'.$profileField->{fieldName}))); } } @@ -505,14 +494,14 @@ sub view { } $sql .= " and ".$constraint if ($constraint); - my $sortBy = $form->process('sortBy') || $self->get('sortBy') || 'users.username'; - my $sortOrder = $form->process('sortOrder') || $self->get('sortOrder'); + my $sortBy = $form->process('sortBy') || $self->sortBy || 'users.username'; + my $sortOrder = $form->process('sortOrder') || $self->sortOrder || 'asc'; if (lc $sortOrder ne 'desc') { $sortOrder = 'asc'; } - + my @sortByUserProperties = ('dateCreated', 'lastUpdated', 'karma', 'userId'); - if(isIn($sortBy,@sortByUserProperties)){ + if( $sortBy ~~ @sortByUserProperties ){ $sortBy = 'users.'.$sortBy; } $sortBy = join '.', map { $dbh->quote_identifier($_) } split /\./, $sortBy; @@ -527,14 +516,14 @@ sub view { } } - my $p = WebGUI::Paginator->new($self->session,$currentUrl,$self->getValue("usersPerPage"), undef, $paginatePage); + my $p = WebGUI::Paginator->new($self->session,$currentUrl,$self->usersPerPage, undef, $paginatePage); $sth = $self->session->db->read($sql); my @visibleUsers; while (my $user = $sth->hashRef){ - my $showGroupId = $self->get("showGroupId"); + my $showGroupId = $self->showGroupId; if ($showGroupId eq '0' || ($showGroupId && $self->isInGroup($showGroupId,$user->{userId}))){ - unless ($self->get("hideGroupId") ne '0' && $self->isInGroup($self->get("hideGroupId"),$user->{userId})){ + unless ($self->hideGroupId ne '0' && $self->isInGroup($self->hideGroupId,$user->{userId})){ push(@visibleUsers,$user); } } @@ -543,7 +532,7 @@ sub view { my $users = $p->getPageData($paginatePage); foreach my $user (@$users){ my $userObject = WebGUI::User->new($self->session,$user->{userId}); - if ($self->get('overridePublicProfile') || $userObject->profileIsViewable()) { + if ($self->overridePublicProfile || $userObject->profileIsViewable()) { my (@profileFieldValues); my %userProperties; foreach my $profileField (@profileFields){ @@ -560,7 +549,7 @@ sub view { # Handle special case of alias, which does not have a default value but is set to the username by default $value = $user->{userName} if ($profileFieldName eq 'alias' && $value eq ''); my %profileFieldValues; - if (WebGUI::Utility::isIn(ucfirst $profileField->{fieldType},qw(File Image)) && $value ne ''){ + if ((ucfirst $profileField->{fieldType}) ~~ [qw(File Image)] && $value ne ''){ my $file = WebGUI::Form::DynamicField->new($self->session, fieldType=>$profileField->{fieldType}, value=>$value @@ -572,7 +561,7 @@ sub view { if($profileField->{visible}){ push (@profileFieldValues, \%profileFieldValues); } - unless($self->get("showOnlyVisibleAsNamed") && $profileField->{visible} != 1){ + unless($self->showOnlyVisibleAsNamed && $profileField->{visible} != 1){ $userProperties{'user_profile_'.$profileFieldName.'_value'} = $value; } } @@ -601,7 +590,7 @@ sub view { $var{profileField_loop} = \@profileField_loop; $var{user_loop} = \@users; - $var{alphabetSearch_loop} = $self->getAlphabetSearchLoop($self->get("alphabetSearchField"),$self->get("alphabet")); + $var{alphabetSearch_loop} = $self->getAlphabetSearchLoop($self->alphabetSearchField,$self->alphabet); $var{searchFormHeader} = WebGUI::Form::formHeader($self->session,{action => $self->getUrl, method => 'GET', }); $var{searchFormSubmit} = WebGUI::Form::submit($self->session,{value => $i18n->get('submit search label')}); @@ -620,13 +609,14 @@ sub view { }); $var{searchFormQuery_form} = WebGUI::Form::text($self->session,{ name => 'search', - value => $form->process("search"), + value => scalar $form->process("search"), }); - my $out = $self->processTemplate(\%var,$self->get("templateId")); + my $out = $self->processTemplate(\%var,$self->templateId); return $out; } +__PACKAGE__->meta->make_immutable; 1; diff --git a/lib/WebGUI/Asset/Wobject/WeatherData.pm b/lib/WebGUI/Asset/Wobject/WeatherData.pm index a0d528154..4f2261409 100644 --- a/lib/WebGUI/Asset/Wobject/WeatherData.pm +++ b/lib/WebGUI/Asset/Wobject/WeatherData.pm @@ -3,7 +3,7 @@ package WebGUI::Asset::Wobject::WeatherData; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -17,74 +17,49 @@ package WebGUI::Asset::Wobject::WeatherData; use strict; use Weather::Com::Finder; use WebGUI::International; -use Class::C3; -use base qw/WebGUI::Asset::Wobject WebGUI::AssetAspect::Dashlet/; -use WebGUI::Utility; - -#------------------------------------------------------------------- - -=head2 definition ( ) - -defines wobject properties for WeatherData instances - -=cut - -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift; - my $i18n = WebGUI::International->new($session, "Asset_WeatherData"); - my $properties = { - partnerId => { - fieldType => "text", - tab => "properties", - defaultValue => undef, - hoverHelp => $i18n->get("partnerId help"), - label => $i18n->get("partnerId"), - subtext => ''.$i18n->get("you need a weather.com key").'', - }, - licenseKey => { - fieldType => "text", - tab => "properties", - defaultValue => undef, - hoverHelp => $i18n->get("licenseKey help"), - label => $i18n->get("licenseKey"), - }, - templateId =>{ - fieldType=>"template", - tab=>"display", - defaultValue=>'WeatherDataTmpl0000001', - namespace=>"WeatherData", - hoverHelp=>$i18n->get("Current Weather Conditions Template to use"), - label=>$i18n->get("Template") - }, - locations=>{ - fieldType=>"textarea", - defaultValue=>"Madison, WI\nToronto, Canada\n53536", - tab=>"properties", - hoverHelp=>$i18n->get("Your list of default weather locations"), - label=>$i18n->get("Default Locations"), - dashletOverridable => 1, - }, - cacheTimeout => { - tab => "display", - fieldType => "interval", - defaultValue => 3600, - uiLevel => 5, - label => $i18n->get("cache timeout", 'Asset_Snippet'), - hoverHelp => $i18n->get("cache timeout help"), - }, - }; - push(@{$definition}, { - tableName=>'WeatherData', - className=>'WebGUI::Asset::Wobject::WeatherData', - assetName=>$i18n->get("assetName"), - icon=>'weatherData.gif', - autoGenerateForms=>1, - properties=>$properties - }); - return $class->SUPER::definition($session, $definition); +use Moose; +use WebGUI::Definition::Asset; +extends 'WebGUI::Asset::Wobject'; +with 'WebGUI::Role::Asset::Dashlet'; +define tableName => 'WeatherData'; +define assetName => ["assetName", 'Asset_WeatherData']; +define icon => 'weatherData.gif'; +property partnerId => ( + fieldType => "text", + tab => "properties", + default => undef, + hoverHelp => ["partnerId help", 'Asset_WeatherData'], + label => ["partnerId", 'Asset_WeatherData'], + subtext => \&_partnerId_subtext, + ); +sub _partnerId_subtext { + my $session = shift->session; + my $i18n = WebGUI::International->new($session, 'Asset_WeatherData'); + return ''.$i18n->get("you need a weather.com key").''; } +property licenseKey => ( + fieldType => "text", + tab => "properties", + default => undef, + hoverHelp => ["licenseKey help", 'Asset_WeatherData'], + label => ["licenseKey", 'Asset_WeatherData'], + ); +property templateId => ( + fieldType => "template", + tab => "display", + default => 'WeatherDataTmpl0000001', + namespace => "WeatherData", + hoverHelp => ["Current Weather Conditions Template to use", 'Asset_WeatherData'], + label => ["Template", 'Asset_WeatherData'], + ); +property locations => ( + fieldType => "textarea", + default => "Madison, WI\nToronto, Canada\n53536", + tab => "properties", + hoverHelp => ["Your list of default weather locations", 'Asset_WeatherData'], + label => ["Default Locations", 'Asset_WeatherData'], + dashletOverridable => 1, + ); #------------------------------------------------------------------- @@ -94,20 +69,20 @@ See WebGUI::Asset::prepareView() for details. =cut -sub prepareView { +override prepareView => sub { my $self = shift; - $self->SUPER::prepareView(); - my $template = WebGUI::Asset::Template->new($self->session, $self->get("templateId")); + super(); + my $template = WebGUI::Asset::Template->newById($self->session, $self->templateId); if (!$template) { WebGUI::Error::ObjectNotFound::Template->throw( error => qq{Template not found}, - templateId => $self->get("templateId"), + templateId => $self->templateId, assetId => $self->getId, ); } $template->prepare($self->getMetaDataAsTemplateVariables); $self->{_viewTemplate} = $template; -} +}; #------------------------------------------------------------------- @@ -124,22 +99,21 @@ sub view { my %var; my $url = $self->session->url; - if ($self->get("partnerId") ne "" && $self->get("licenseKey") ne "") { + if ($self->partnerId ne "" && $self->licenseKey ne "") { my $overrides = $self->fetchUserOverrides($self->getParent->getId); - my $locations = $overrides->{locations} || $self->get('locations'); + my $locations = $overrides->{locations} || $self->locations; foreach my $location (split("\n", $locations)) { - my $cache = WebGUI::Cache->new($session, [$self->getId, $location]); my $loop_data; my $link_data = []; - my $cached_data = $cache->get(); + my $cached_data = $session->cache->get( join "", $self->getId, $location ); if ($cached_data) { $loop_data = $cached_data->{locations}; $link_data = $cached_data->{links} || []; } else { my $weather = Weather::Com::Finder->new({ - 'partner_id' => $self->get("partnerId"), - 'license' => $self->get("licenseKey"), + 'partner_id' => $self->partnerId, + 'license' => $self->licenseKey, 'cache' => '/tmp', }); next unless defined $weather; @@ -175,12 +149,11 @@ sub view { } } } - my $cache = WebGUI::Cache->new($session, [$self->getId, $location]); my $cached_data = { locations => $loop_data, links => $link_data, }; - $cache->set($cached_data, $self->get('cacheTimeout')); + $session->cache->set( join( "", $self->getId, $location ), $cached_data, $self->get('cacheTimeout')); } push @{$var{'ourLocations.loop'}}, @{ $loop_data }; if (!$var{links_loop}) { @@ -191,4 +164,5 @@ sub view { return $self->processTemplate(\%var, undef, $self->{_viewTemplate}); } +__PACKAGE__->meta->make_immutable; 1; diff --git a/lib/WebGUI/Asset/Wobject/WikiMaster.pm b/lib/WebGUI/Asset/Wobject/WikiMaster.pm index 910bc957c..049037de0 100644 --- a/lib/WebGUI/Asset/Wobject/WikiMaster.pm +++ b/lib/WebGUI/Asset/Wobject/WikiMaster.pm @@ -1,7 +1,7 @@ package WebGUI::Asset::Wobject::WikiMaster; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -10,16 +10,189 @@ package WebGUI::Asset::Wobject::WikiMaster; # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use Class::C3; -use base qw( - WebGUI::AssetAspect::Subscribable - WebGUI::AssetAspect::RssFeed - WebGUI::Asset::Wobject -); -use strict; -use Tie::IxHash; +use Moose; +use WebGUI::Definition::Asset; +extends 'WebGUI::Asset::Wobject'; +define assetName => ['assetName', 'Asset_WikiMaster']; +define icon => 'wikiMaster.gif'; +define tableName => 'WikiMaster'; + +property groupToEditPages => ( + fieldType => 'group', + default => '2', + tab => 'security', + hoverHelp => ['groupToEditPages hoverHelp', 'Asset_WikiMaster'], + label => ['groupToEditPages label', 'Asset_WikiMaster'], + ); + +property groupToAdminister => ( + fieldType => 'group', + default => '3', + tab => 'security', + hoverHelp => ['groupToAdminister hoverHelp', 'Asset_WikiMaster'], + label => ['groupToAdminister label', 'Asset_WikiMaster'], + ); + +property richEditor => ( + fieldType => 'selectRichEditor', + default => 'PBrichedit000000000001', + tab => 'display', + hoverHelp => ['richEditor hoverHelp', 'Asset_WikiMaster'], + label => ['richEditor label', 'Asset_WikiMaster'], + ); + +property frontPageTemplateId => ( + fieldType => 'template', + namespace => 'WikiMaster_front', + default => 'WikiFrontTmpl000000001', + tab => 'display', + hoverHelp => ['frontPageTemplateId hoverHelp', 'Asset_WikiMaster'], + label => ['frontPageTemplateId label', 'Asset_WikiMaster'], + ); + +property pageTemplateId => ( + fieldType => 'template', + namespace => 'WikiPage', + default => 'WikiPageTmpl0000000001', + tab => 'display', + hoverHelp => ['pageTemplateId hoverHelp', 'Asset_WikiMaster'], + label => ['pageTemplateId label', 'Asset_WikiMaster'], + ); + +property pageHistoryTemplateId => ( + fieldType => 'template', + namespace => 'WikiPage_pageHistory', + default => 'WikiPHTmpl000000000001', + tab => 'display', + hoverHelp => ['pageHistoryTemplateId hoverHelp', 'Asset_WikiMaster'], + label => ['pageHistoryTemplateId label', 'Asset_WikiMaster'], + ); + +property mostPopularTemplateId => ( + fieldType => 'template', + namespace => 'WikiMaster_mostPopular', + default => 'WikiMPTmpl000000000001', + tab => 'display', + hoverHelp => ['mostPopularTemplateId hoverHelp', 'Asset_WikiMaster'], + label => ['mostPopularTemplateId label', 'Asset_WikiMaster'], + ); +property recentChangesTemplateId => ( + fieldType => 'template', + namespace => 'WikiMaster_recentChanges', + default => 'WikiRCTmpl000000000001', + tab => 'display', + hoverHelp => ['recentChangesTemplateId hoverHelp', 'Asset_WikiMaster'], + label => ['recentChangesTemplateId label', 'Asset_WikiMaster'], + ); +property byKeywordTemplateId => ( + fieldType => 'template', + namespace => 'WikiMaster_byKeyword', + default => 'WikiKeyword00000000001', + tab => 'display', + hoverHelp => ['byKeywordTemplateId hoverHelp', 'Asset_WikiMaster'], + label => ['byKeywordTemplateId label', 'Asset_WikiMaster'], + ); +property searchTemplateId => ( + fieldType => 'template', + namespace => 'WikiMaster_search', + default => 'WikiSearchTmpl00000001', + tab => 'display', + hoverHelp => ['searchTemplateId hoverHelp', 'Asset_WikiMaster'], + label => ['searchTemplateId label', 'Asset_WikiMaster'], + ); + +property pageEditTemplateId => ( fieldType => 'template', + namespace => 'WikiPage_edit', + default => 'WikiPageEditTmpl000001', + tab => 'display', + hoverHelp => ['pageEditTemplateId hoverHelp', 'Asset_WikiMaster'], + label => ['pageEditTemplateId label', 'Asset_WikiMaster'], + ); + +property recentChangesCount => ( + fieldType => 'integer', + default => 50, + tab => 'display', + hoverHelp => ['recentChangesCount hoverHelp', 'Asset_WikiMaster'], + label => ['recentChangesCount label', 'Asset_WikiMaster'] + ); +property recentChangesCountFront => ( + fieldType => 'integer', + default => 10, + tab => 'display', + hoverHelp => ['recentChangesCountFront hoverHelp', 'Asset_WikiMaster'], + label => ['recentChangesCountFront label', 'Asset_WikiMaster'], + ); +property mostPopularCount => ( + fieldType => 'integer', + default => 50, + tab => 'display', + hoverHelp => ['mostPopularCount hoverHelp', 'Asset_WikiMaster'], + label => ['mostPopularCount label', 'Asset_WikiMaster'], + ); + +property mostPopularCountFront => ( + fieldType => 'integer', + default => 10, + tab => 'display', + hoverHelp => ['mostPopularCountFront hoverHelp', 'Asset_WikiMaster'], + label => ['mostPopularCountFront label', 'Asset_WikiMaster'], + ); +property approvalWorkflow => ( + fieldType => "workflow", + default => "pbworkflow000000000003", + type => 'WebGUI::VersionTag', + tab => 'security', + label => ['approval workflow', 'Asset_WikiMaster'], + hoverHelp => ['approval workflow description', 'Asset_WikiMaster'], + ); +property thumbnailSize => ( + fieldType => "integer", + default => 0, + tab => "display", + label => ["thumbnail size", 'Asset_WikiMaster'], + hoverHelp => ["thumbnail size help", 'Asset_WikiMaster'] + ); +property maxImageSize => ( + fieldType => "integer", + default => 0, + tab => "display", + label => ["max image size", 'Asset_WikiMaster'], + hoverHelp => ["max image size help", 'Asset_WikiMaster'] + ); +property allowAttachments => ( + fieldType => "integer", + default => 0, + tab => "security", + label => ["allow attachments", 'Asset_WikiMaster'], + hoverHelp => ["allow attachments help", 'Asset_WikiMaster'], + ); +property useContentFilter => ( + fieldType => "yesNo", + default => 1, + tab => 'display', + label => ['content filter', 'Asset_WikiMaster'], + hoverHelp => ['content filter description', 'Asset_WikiMaster'], + ); +property filterCode => ( + fieldType => "filterContent", + default => 'javascript', + tab => 'security', + label => ['filter code', 'Asset_WikiMaster'], + hoverHelp => ['filter code description', 'Asset_WikiMaster'], + ); +property topLevelKeywords => ( + fieldType => "keywords", + default => '', + tab => 'properties', + label => ['top level keywords', 'Asset_WikiMaster'], + hoverHelp => ['top level keywords description', 'Asset_WikiMaster'], + ); + +with 'WebGUI::Role::Asset::Subscribable'; +with 'WebGUI::Role::Asset::RssFeed'; + use WebGUI::International; -use WebGUI::Utility; use HTML::Parser; use URI::Escape; use WebGUI::Form; @@ -114,26 +287,26 @@ If passed in, this will override the mostChangesCount set in the object. sub appendRecentChanges { my $self = shift; my $var = shift; - my $limit = shift || $self->get("recentChangesCount") || 50; - my $revisions = $self->session->db->read("select asset.assetId, assetData.revisionDate, asset.className + my $limit = shift || $self->recentChangesCount || 50; + my $revisions = $self->session->db->read("select asset.assetId, assetData.revisionDate from asset left join assetData using (assetId) where asset.parentId=? and asset.className like ? and status='approved' order by assetData.revisionDate desc limit ?", [$self->getId, "WebGUI::Asset::WikiPage%", $limit]); - while (my ($id, $version, $class) = $revisions->array) { - my $asset = WebGUI::Asset->new($self->session, $id, $class, $version); + while (my ($id, $version) = $revisions->array) { + my $asset = WebGUI::Asset->newById($self->session, $id, $version); unless (defined $asset) { - $self->session->errorHandler->error("Asset $id $class $version could not be instanciated."); + $self->session->log->error("Asset $id $version could not be instanciated."); next; } - my $user = WebGUI::User->new($self->session, $asset->get("actionTakenBy")); + my $user = WebGUI::User->new($self->session, $asset->actionTakenBy); my $specialAction = ''; my $isAvailable = 1; # no need to i18n cuz the other actions aren't - if ($asset->get('state') =~ m/trash/) { + if ($asset->state =~ m/trash/) { $isAvailable = 0; $specialAction = 'Deleted'; } - elsif ($asset->get('state') =~ m/clipboard/) { + elsif ($asset->state =~ m/clipboard/) { $isAvailable = 0; $specialAction = 'Cut'; } @@ -141,9 +314,9 @@ sub appendRecentChanges { title=>$asset->getTitle, url=>$asset->getUrl, restoreUrl=>$asset->getUrl("func=restoreWikiPage"), - actionTaken=>$specialAction || $asset->get("actionTaken"), + actionTaken=>$specialAction || $asset->actionTaken, username=>$user->username, - date=>$self->session->datetime->epochToHuman($asset->get("revisionDate")), + date=>$self->session->datetime->epochToHuman($asset->revisionDate), isAvailable=>$isAvailable, assetId=>$id, }); @@ -171,11 +344,14 @@ sub appendSearchBoxVars { my $var = shift; my $queryText = shift; my $submitText = WebGUI::International->new($self->session, 'Asset_WikiMaster')->get('searchLabel'); + use WebGUI::Form::Hidden; + use WebGUI::Form::Text; + use WebGUI::Form::Submit; $var->{'searchFormHeader'} = join '', (WebGUI::Form::formHeader($self->session, { action => $self->getUrl, method => 'GET', }), - WebGUI::Form::hidden($self->session, { name => 'func', value => 'search' })); - $var->{'searchQuery'} = WebGUI::Form::text($self->session, { name => 'query', value => $queryText }); - $var->{'searchSubmit'} = WebGUI::Form::submit($self->session, { value => $submitText }); + WebGUI::Form::Hidden->new($self->session, { name => 'func', value => 'search' })->toHtml); + $var->{'searchQuery'} = WebGUI::Form::Text->new($self->session, { name => 'query', value => $queryText })->toHtml; + $var->{'searchSubmit'} = WebGUI::Form::Submit->new($self->session, { value => $submitText })->toHtml; $var->{'searchFormFooter'} = WebGUI::Form::formFooter($self->session); $var->{'canAddPages'} = $self->canEditPages(); return $self; @@ -217,8 +393,7 @@ sub autolinkHtml { my %mapping = $self->session->db->buildHash("SELECT LOWER(d.title), d.url FROM asset AS i INNER JOIN assetData AS d ON i.assetId = d.assetId WHERE i.parentId = ? and className='WebGUI::Asset::WikiPage' and i.state='published' and d.status='approved' order by d.revisionDate ASC", [$self->getId]); TITLE: foreach my $title (keys %mapping) { my $url = delete $mapping{$title}; - ##isIn short circuits and is faster than grep and/or first - next TITLE if isIn($title, @skipTitles); + next TITLE if $title ~~ @skipTitles; $mapping{$title} = $self->session->url->gateway($url); } @@ -261,7 +436,7 @@ this WikiMaster due to groupIdEdit or ownerUserId. sub canAdminister { my $self = shift; - return $self->session->user->isInGroup($self->get('groupToAdminister')) || $self->WebGUI::Asset::Wobject::canEdit; + return $self->session->user->isInGroup($self->groupToAdminister) || $self->WebGUI::Asset::Wobject::canEdit; } #------------------------------------------------------------------- @@ -272,17 +447,18 @@ Overriding canEdit method to check permissions correctly when someone is adding =cut -sub canEdit { +around canEdit => sub { + my $orig = shift; my $self = shift; my $form = $self->session->form; my $addNew = $form->process("func" ) eq "add"; my $editSave = $form->process("assetId" ) eq "new" - && $form->process("func" ) eq "editSave" - && $form->process("class","className" ) eq "WebGUI::Asset::WikiPage"; + && $form->process("func" ) eq "addSave" + && $form->process("className","className" ) eq "WebGUI::Asset::WikiPage"; my $canEdit = ( ($addNew || $editSave) && $self->canEditPages ) - || $self->next::method(); + || $self->$orig(@_); return $canEdit; -} +}; #------------------------------------------------------------------- @@ -295,180 +471,7 @@ they can administer the wiki (canAdminister). sub canEditPages { my $self = shift; - return $self->session->user->isInGroup($self->get("groupToEditPages")) || $self->canAdminister; -} - -#------------------------------------------------------------------- -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift; - my $i18n = WebGUI::International->new($session, 'Asset_WikiMaster'); - - my %properties; - tie %properties, 'Tie::IxHash'; - %properties = - ( - groupToEditPages => { fieldType => 'group', - defaultValue => ['2'], - tab => 'security', - hoverHelp => $i18n->get('groupToEditPages hoverHelp'), - label => $i18n->get('groupToEditPages label') }, - - groupToAdminister => { fieldType => 'group', - defaultValue => ['3'], - tab => 'security', - hoverHelp => $i18n->get('groupToAdminister hoverHelp'), - label => $i18n->get('groupToAdminister label') }, - - richEditor => { fieldType => 'selectRichEditor', - defaultValue => 'PBrichedit000000000001', - tab => 'display', - hoverHelp => $i18n->get('richEditor hoverHelp'), - label => $i18n->get('richEditor label') }, - - frontPageTemplateId => { fieldType => 'template', - namespace => 'WikiMaster_front', - defaultValue => 'WikiFrontTmpl000000001', - tab => 'display', - hoverHelp => $i18n->get('frontPageTemplateId hoverHelp'), - label => $i18n->get('frontPageTemplateId label') }, - - pageTemplateId => { fieldType => 'template', - namespace => 'WikiPage', - defaultValue => 'WikiPageTmpl0000000001', - tab => 'display', - hoverHelp => $i18n->get('pageTemplateId hoverHelp'), - label => $i18n->get('pageTemplateId label') }, - - pageHistoryTemplateId => { fieldType => 'template', - namespace => 'WikiPage_pageHistory', - defaultValue => 'WikiPHTmpl000000000001', - tab => 'display', - hoverHelp => $i18n->get('pageHistoryTemplateId hoverHelp'), - label => $i18n->get('pageHistoryTemplateId label') }, - - mostPopularTemplateId => { fieldType => 'template', - namespace => 'WikiMaster_mostPopular', - defaultValue => 'WikiMPTmpl000000000001', - tab => 'display', - hoverHelp => $i18n->get('mostPopularTemplateId hoverHelp'), - label => $i18n->get('mostPopularTemplateId label') }, - - recentChangesTemplateId => { fieldType => 'template', - namespace => 'WikiMaster_recentChanges', - defaultValue => 'WikiRCTmpl000000000001', - tab => 'display', - hoverHelp => $i18n->get('recentChangesTemplateId hoverHelp'), - label => $i18n->get('recentChangesTemplateId label') }, - - byKeywordTemplateId => { fieldType => 'template', - namespace => 'WikiMaster_byKeyword', - defaultValue => 'WikiKeyword00000000001', - tab => 'display', - hoverHelp => $i18n->get('byKeywordTemplateId hoverHelp'), - label => $i18n->get('byKeywordTemplateId label') }, - - searchTemplateId => { fieldType => 'template', - namespace => 'WikiMaster_search', - defaultValue => 'WikiSearchTmpl00000001', - tab => 'display', - hoverHelp => $i18n->get('searchTemplateId hoverHelp'), - label => $i18n->get('searchTemplateId label') }, - - pageEditTemplateId => { fieldType => 'template', - namespace => 'WikiPage_edit', - defaultValue => 'WikiPageEditTmpl000001', - tab => 'display', - hoverHelp => $i18n->get('pageEditTemplateId hoverHelp'), - label => $i18n->get('pageEditTemplateId label') }, - - recentChangesCount => { fieldType => 'integer', - defaultValue => 50, - tab => 'display', - hoverHelp => $i18n->get('recentChangesCount hoverHelp'), - label => $i18n->get('recentChangesCount label') }, - - recentChangesCountFront => { fieldType => 'integer', - defaultValue => 10, - tab => 'display', - hoverHelp => $i18n->get('recentChangesCountFront hoverHelp'), - label => $i18n->get('recentChangesCountFront label') }, - - mostPopularCount => { fieldType => 'integer', - defaultValue => 50, - tab => 'display', - hoverHelp => $i18n->get('mostPopularCount hoverHelp'), - label => $i18n->get('mostPopularCount label') }, - - mostPopularCountFront => { fieldType => 'integer', - defaultValue => 10, - tab => 'display', - hoverHelp => $i18n->get('mostPopularCountFront hoverHelp'), - label => $i18n->get('mostPopularCountFront label') }, - approvalWorkflow =>{ - fieldType=>"workflow", - defaultValue=>"pbworkflow000000000003", - type=>'WebGUI::VersionTag', - tab=>'security', - label=>$i18n->get('approval workflow'), - hoverHelp=>$i18n->get('approval workflow description'), - }, - thumbnailSize => { - fieldType => "integer", - defaultValue => 0, - tab => "display", - label => $i18n->get("thumbnail size"), - hoverHelp => $i18n->get("thumbnail size help") - }, - maxImageSize => { - fieldType => "integer", - defaultValue => 0, - tab => "display", - label => $i18n->get("max image size"), - hoverHelp => $i18n->get("max image size help") - }, - allowAttachments => { - fieldType => "integer", - defaultValue => 0, - tab => "security", - label => $i18n->get("allow attachments"), - hoverHelp => $i18n->get("allow attachments help"), - }, - useContentFilter =>{ - fieldType=>"yesNo", - defaultValue=>1, - tab=>'display', - label=>$i18n->get('content filter'), - hoverHelp=>$i18n->get('content filter description'), - }, - filterCode =>{ - fieldType=>"filterContent", - defaultValue=>'javascript', - tab=>'security', - label=>$i18n->get('filter code'), - hoverHelp=>$i18n->get('filter code description'), - }, - topLevelKeywords =>{ - fieldType => "keywords", - defaultValue => '', - tab => 'properties', - label => $i18n->get('top level keywords'), - hoverHelp => $i18n->get('top level keywords description'), - }, - ); - - push @$definition, - { - assetName => $i18n->get('assetName'), - icon => 'wikiMaster.gif', - autoGenerateForms => 1, - tableName => 'WikiMaster', - className => 'WebGUI::Asset::Wobject::WikiMaster', - properties => \%properties, - }; - - return $class->next::method($session, $definition); + return $self->session->user->isInGroup($self->groupToEditPages) || $self->canAdminister; } #------------------------------------------------------------------- @@ -645,13 +648,13 @@ author, and a guid field. sub getRssFeedItems { my $self = shift; my $vars = {}; - $self->appendRecentChanges( $vars, $self->get('itemsPerFeed') ); + $self->appendRecentChanges( $vars, $self->itemsPerFeed ); my $var = []; foreach my $item ( @{ $vars->{recentChanges} } ) { - my $asset = WebGUI::Asset->newByDynamicClass( $self->session, $item->{assetId} ); + my $asset = WebGUI::Asset->newById( $self->session, $item->{assetId} ); push @{ $var }, { 'link' => $asset->getUrl, - 'guid' => $item->{ 'assetId' } . $asset->get( 'revisionDate' ), + 'guid' => $item->{ 'assetId' } . $asset->revisionDate, 'title' => $asset->getTitle, 'description' => $item->{ 'actionTaken' }, 'date' => $item->{ 'date' }, @@ -679,7 +682,7 @@ sub getTemplateVars { mostPopularUrl => $self->getUrl("func=mostPopular"), mostPopularLabel => $i18n->get("mostPopularLabel"), addPageLabel => $i18n->get("addPageLabel"), - addPageUrl => $self->getUrl("func=add;class=WebGUI::Asset::WikiPage"), + addPageUrl => $self->getUrl("func=add;className=WebGUI::Asset::WikiPage"), recentChangesUrl => $self->getUrl("func=recentChanges"), recentChangesLabel => $i18n->get("recentChangesLabel"), restoreLabel => $i18n->get("restoreLabel"), @@ -717,11 +720,11 @@ sub prepareView { my $self = shift; $self->next::method; $self->{_frontPageTemplate} = - WebGUI::Asset::Template->new($self->session, $self->get('frontPageTemplateId')); + WebGUI::Asset::Template->newById($self->session, $self->frontPageTemplateId); if (!$self->{_frontPageTemplate}) { WebGUI::Error::ObjectNotFound::Template->throw( error => qq{Template not found}, - templateId => $self->get('frontPageTemplateId'), + templateId => $self->frontPageTemplateId, assetId => $self->getId, ); } @@ -730,35 +733,37 @@ sub prepareView { #------------------------------------------------------------------- -=head2 processPropertiesFromFormPost +=head2 processEditForm Extend the master method to propagate view and edit permissions down to the wiki pages. =cut -sub processPropertiesFromFormPost { +override processEditForm => sub { my $self = shift; my $groupsChanged = - (($self->session->form->process('groupIdView') ne $self->get('groupIdView')) - or ($self->session->form->process('groupIdEdit') ne $self->get('groupIdEdit'))); - my $ret = $self->next::method(@_); + (($self->session->form->process('groupIdView') ne $self->groupIdView) + or ($self->session->form->process('groupIdEdit') ne $self->groupIdEdit)); + my $ret = super(); if ($groupsChanged) { - # XXX Should this do descendants for WikiPage attachments? - my $childIter = $self->getLineageIterator(['children']); - while ( 1 ) { - my $child; - eval { $child = $childIter->() }; - if ( my $x = WebGUI::Error->caught('WebGUI::Error::ObjectNotFound') ) { - $self->session->log->error($x->full_message); - next; - } - last unless $child; - $child->update({ groupIdView => $self->get('groupIdView'), - groupIdEdit => $self->get('groupIdEdit') }); + # XXX Should this do descendants for WikiPage attachments? + my $childIter = $self->getLineageIterator(['children']); + while ( 1 ) { + my $child; + eval { $child = $childIter->() }; + if ( my $x = WebGUI::Error->caught('WebGUI::Error::ObjectNotFound') ) { + $self->session->log->error($x->full_message); + next; + } + last unless $child; + $child->update({ + groupIdView => $self->get('groupIdView'), + groupIdEdit => $self->get('groupIdEdit') + }); } } return $ret; -} +}; #------------------------------------------------------------------- @@ -768,11 +773,13 @@ Extend the master method to delete all keyword entries. =cut -sub purge { +##Using around due to the plugin +around purge => sub { + my $orig = shift; my $self = shift; $self->session->db->write('delete from WikiMasterKeywords where assetId=?',[$self->getId]); - return $self->SUPER::purge; -} + return $self->$orig(@_); +}; #------------------------------------------------------------------- @@ -837,15 +844,21 @@ sub view { # Get a random featured page my $featuredIds = $self->getFeaturedPageIds; - my $featuredId = $featuredIds->[ int( rand @$featuredIds ) - 1 ]; - my $featured = WebGUI::Asset->newByDynamicClass( $session, $featuredId ); - if ( $featured ) { - $self->appendFeaturedPageVars( $var, $featured ); + + if( @$featuredIds ) { + # it's possible for a WikiMaster not to have any WikiPage featured; it's also possible for any to not render + my $featuredId = $featuredIds->[ int( rand @$featuredIds ) - 1 ]; + if( $featuredId ) { + my $featured = eval { WebGUI::Asset->newById( $session, $featuredId ) }; + if ( ! Exception::Class->caught() ) { + $self->appendFeaturedPageVars( $var, $featured ); + } + } } $self->appendSearchBoxVars($var); - $self->appendRecentChanges($var, $self->get('recentChangesCountFront')); - $self->appendMostPopular($var, $self->get('mostPopularCountFront')); + $self->appendRecentChanges($var, $self->recentChangesCountFront); + $self->appendMostPopular($var, $self->mostPopularCountFront); $self->appendKeywordPageVars($var); return $self->processTemplate($var, undef, $template); } @@ -875,7 +888,7 @@ sub www_byKeyword { my @pages = (); foreach my $assetData (@{$p->getPageData}) { - my $asset = WebGUI::Asset->newByDynamicClass($session, $assetData->{assetId}); + my $asset = WebGUI::Asset->newById($self->session, $assetData->{assetId}); next unless defined $asset; push(@pages, { title => $asset->getTitle, @@ -935,7 +948,7 @@ sub www_mostPopular { wikiHomeUrl=>$self->getUrl, }; $self->appendMostPopular($var); - return $self->processStyle($self->processTemplate($var, $self->get('mostPopularTemplateId'))); + return $self->processStyle($self->processTemplate($var, $self->mostPopularTemplateId)); } #------------------------------------------------------------------- @@ -961,7 +974,7 @@ sub www_recentChanges { wikiHomeUrl=>$self->getUrl, }; $self->appendRecentChanges($var); - return $self->processStyle($self->processTemplate($var, $self->get('recentChangesTemplateId'))); + return $self->processStyle($self->processTemplate($var, $self->recentChangesTemplateId)); } #------------------------------------------------------------------- @@ -990,13 +1003,13 @@ sub www_search { mostPopularUrl=>$self->getUrl("func=mostPopular"), mostPopularLabel=>$i18n->get("mostPopularLabel"), wikiHomeUrl=>$self->getUrl, - addPageUrl=>$self->getUrl("func=add;class=WebGUI::Asset::WikiPage;title=".$self->session->url->escape($queryString)), + addPageUrl=>$self->getUrl("func=add;className=WebGUI::Asset::WikiPage;title=".$self->session->url->escape($queryString)), }; $self->appendSearchBoxVars($var, $queryString); if (length $queryString) { my $search = WebGUI::Search->new($self->session); $search->search({ keywords => $queryString, - lineage => [$self->get('lineage')], + lineage => [$self->lineage], classes => ['WebGUI::Asset::WikiPage'] }); my $rs = $search->getPaginatorResultSet($self->getUrl("func=search;query=".$queryString)); $rs->appendTemplateVars($var); @@ -1008,7 +1021,7 @@ sub www_search { $var->{'searchResults'} = \@results; $var->{'performSearch'} = 1; } - return $self->processStyle($self->processTemplate($var, $self->get('searchTemplateId'))); + return $self->processStyle($self->processTemplate($var, $self->searchTemplateId)); } #------------------------------------------------------------------- @@ -1031,4 +1044,5 @@ sub www_subKeywordSave { return $self->www_byKeyword; } +__PACKAGE__->meta->make_immutable; 1; diff --git a/lib/WebGUI/Asset/Wobject/_NewWobject.skeleton b/lib/WebGUI/Asset/Wobject/_NewWobject.skeleton index 223cf9a07..628e4bade 100644 --- a/lib/WebGUI/Asset/Wobject/_NewWobject.skeleton +++ b/lib/WebGUI/Asset/Wobject/_NewWobject.skeleton @@ -3,7 +3,7 @@ package WebGUI::Asset::Wobject::NewWobject; $VERSION = "1.0.0"; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -120,7 +120,7 @@ See WebGUI::Asset::prepareView() for details. sub prepareView { my $self = shift; $self->SUPER::prepareView(); - my $template = WebGUI::Asset::Template->new( $self->session, $self->get("templateId") ); + my $template = WebGUI::Asset::Template->newById( $self->session, $self->get("templateId") ); $template->prepare($self->getMetaDataAsTemplateVariables); $self->{_viewTemplate} = $template; } @@ -136,13 +136,13 @@ wobject instances, you will need to purge them here. =cut -sub purge { +override purge => sub { my $self = shift; #purge your wobject-specific data here. This does not include fields # you create for your NewWobject asset/wobject table. - return $self->SUPER::purge; -} + return super(); +}; #------------------------------------------------------------------- diff --git a/lib/WebGUI/Asset/Wobject/_NewWobject.skeleton.minimal b/lib/WebGUI/Asset/Wobject/_NewWobject.skeleton.minimal index ecd1a1e9f..801a5e273 100644 --- a/lib/WebGUI/Asset/Wobject/_NewWobject.skeleton.minimal +++ b/lib/WebGUI/Asset/Wobject/_NewWobject.skeleton.minimal @@ -65,7 +65,7 @@ See WebGUI::Asset::prepareView() for details. sub prepareView { my $self = shift; $self->SUPER::prepareView(); - my $template = WebGUI::Asset::Template->new( $self->session, $self->get("templateIdView") ); + my $template = WebGUI::Asset::Template->newById( $self->session, $self->get("templateIdView") ); $template->prepare($self->getMetaDataAsTemplateVariables); $self->{_viewTemplate} = $template; } diff --git a/lib/WebGUI/Asset/_NewAsset.skeleton b/lib/WebGUI/Asset/_NewAsset.skeleton index 118871d0e..f207f9b28 100644 --- a/lib/WebGUI/Asset/_NewAsset.skeleton +++ b/lib/WebGUI/Asset/_NewAsset.skeleton @@ -3,7 +3,7 @@ package WebGUI::Asset::NewAsset; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -143,11 +143,12 @@ Making private. See WebGUI::Asset::indexContent() for additonal details. =cut -sub indexContent { +around indexContent => sub { + my $orig = shift; my $self = shift; - my $indexer = $self->SUPER::indexContent; + my $indexer = $self->$orig(@_); $indexer->setIsPublic(0); -} +}; #------------------------------------------------------------------- @@ -160,14 +161,14 @@ See WebGUI::Asset::prepareView() for details. sub prepareView { my $self = shift; $self->SUPER::prepareView(); - my $template = WebGUI::Asset::Template->new( $self->session, $self->get("templateId") ); + my $template = WebGUI::Asset::Template->newById( $self->session, $self->get("templateId") ); $template->prepare($self->getMetaDataAsTemplateVariables); $self->{_viewTemplate} = $template; } #------------------------------------------------------------------- -=head2 processPropertiesFromFormPost ( ) +=head2 processEditForm ( ) Used to process properties from the form posted. Do custom things with noFormPost fields here, or do whatever you want. This method is called @@ -175,9 +176,9 @@ when /yourAssetUrl?func=editSave is requested/posted. =cut -sub processPropertiesFromFormPost { +sub processEditForm { my $self = shift; - $self->SUPER::processPropertiesFromFormPost; + $self->SUPER::processEditForm; } #------------------------------------------------------------------- @@ -192,10 +193,10 @@ asset instances, you will need to purge them here. =cut -sub purge { +override purge => sub { my $self = shift; - return $self->SUPER::purge; -} + return super(); +}; #------------------------------------------------------------------- @@ -205,10 +206,10 @@ This method is called when data is purged by the system. =cut -sub purgeRevision { +override purgeRevision => sub { my $self = shift; - return $self->SUPER::purgeRevision; -} + return super(); +}; #------------------------------------------------------------------- diff --git a/lib/WebGUI/Asset/_NewAsset.skeleton.minimal b/lib/WebGUI/Asset/_NewAsset.skeleton.minimal index 44ed6eaa7..cfc0d00b1 100644 --- a/lib/WebGUI/Asset/_NewAsset.skeleton.minimal +++ b/lib/WebGUI/Asset/_NewAsset.skeleton.minimal @@ -85,7 +85,7 @@ See WebGUI::Asset::prepareView() for details. sub prepareView { my $self = shift; $self->SUPER::prepareView(); - my $template = WebGUI::Asset::Template->new( $self->session, $self->get("templateIdView") ); + my $template = WebGUI::Asset::Template->newById( $self->session, $self->get("templateIdView") ); $template->prepare($self->getMetaDataAsTemplateVariables); $self->{_viewTemplate} = $template; } diff --git a/lib/WebGUI/AssetBranch.pm b/lib/WebGUI/AssetBranch.pm index 3de109fc5..70db4831a 100644 --- a/lib/WebGUI/AssetBranch.pm +++ b/lib/WebGUI/AssetBranch.pm @@ -3,7 +3,7 @@ package WebGUI::Asset; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -105,361 +105,4 @@ sub duplicateBranch { return $newAsset; } - -#------------------------------------------------------------------- - -=head2 www_editBranch ( ) - -Creates a tabform to edit the Asset Tree. If canEdit returns False, returns insufficient Privilege page. - -=cut - -sub www_editBranch { - my $self = shift; - my $ac = WebGUI::AdminConsole->new($self->session,"assets"); - my $i18n = WebGUI::International->new($self->session,"Asset"); - my $i18n2 = WebGUI::International->new($self->session,"Asset_Wobject"); - return $self->session->privilege->insufficient() unless ($self->canEdit); - my $tabform = WebGUI::TabForm->new($self->session); - $tabform->hidden({name=>"func",value=>"editBranchSave"}); - $tabform->addTab("properties",$i18n->get("properties"),9); - $tabform->getTab("properties")->readOnly( - -label=>$i18n->get(104), - -hoverHelp=>$i18n->get('edit branch url help'), - -uiLevel=>9, - -subtext=>'
    '.$i18n->get("change").' '.WebGUI::Form::yesNo($self->session,{name=>"change_url"}), - -value=>WebGUI::Form::selectBox($self->session, { - name=>"baseUrlBy", - extras=>'onchange="toggleSpecificBaseUrl()"', - id=>"baseUrlBy", - options=>{ - parentUrl=>$i18n->get("parent url"), - specifiedBase=>$i18n->get("specified base"), - none=>$i18n->get("none") - } - }).' / '.WebGUI::Form::selectBox($self->session, { - name=>"endOfUrl", - options=>{ - menuTitle=>$i18n->get(411), - title=>$i18n->get(99), - currentUrl=>$i18n->get("current url"), - } - })."" - ); - $tabform->addTab("display",$i18n->get(105),5); - $tabform->getTab("display")->yesNo( - -name=>"isHidden", - -value=>$self->get("isHidden"), - -label=>$i18n->get(886), - -uiLevel=>6, - -subtext=>'
    '.$i18n->get("change").' '.WebGUI::Form::yesNo($self->session,{name=>"change_isHidden"}), - -hoverHelp=>$i18n->get('886 description',"Asset"), - ); - $tabform->getTab("display")->yesNo( - -name=>"newWindow", - -value=>$self->get("newWindow"), - -label=>$i18n->get(940), - -hoverHelp=>$i18n->get('940 description'), - -uiLevel=>6, - -subtext=>'
    '.$i18n->get("change").' '.WebGUI::Form::yesNo($self->session,{name=>"change_newWindow"}) - ); - $tabform->getTab("display")->yesNo( - -name=>"displayTitle", - -label=>$i18n2->get(174), - -hoverHelp=>$i18n2->get('174 description'), - -value=>$self->getValue("displayTitle"), - -uiLevel=>5, - -subtext=>'
    '.$i18n->get("change").' '.WebGUI::Form::yesNo($self->session,{name=>"change_displayTitle"}) - ); - $tabform->getTab("display")->template( - -name=>"styleTemplateId", - -label=>$i18n2->get(1073), - -value=>$self->getValue("styleTemplateId"), - -hoverHelp=>$i18n2->get('1073 description'), - -namespace=>'style', - -subtext=>'
    '.$i18n->get("change").' '.WebGUI::Form::yesNo($self->session,{name=>"change_styleTemplateId"}) - ); - $tabform->getTab("display")->template( - -name=>"printableStyleTemplateId", - -label=>$i18n2->get(1079), - -hoverHelp=>$i18n2->get('1079 description'), - -value=>$self->getValue("printableStyleTemplateId"), - -namespace=>'style', - -subtext=>'
    '.$i18n->get("change").' '.WebGUI::Form::yesNo($self->session,{name=>"change_printableStyleTemplateId"}) - ); - if ( $self->session->setting->get('useMobileStyle') ) { - $tabform->getTab("display")->template( - name => 'mobileStyleTemplateId', - label => $i18n2->get('mobileStyleTemplateId label'), - hoverHelp => $i18n2->get('mobileStyleTemplateId description'), - value => $self->getValue('mobileStyleTemplateId'), - namespace => 'style', - subtext => '
    ' . $i18n->get('change') . q{ } - . WebGUI::Form::yesNo($self->session,{name=>"change_mobileStyleTemplateId"}), - ); - } - $tabform->addTab("security",$i18n->get(107),6); - if ($self->session->config->get("sslEnabled")) { - $tabform->getTab("security")->yesNo( - -name=>"encryptPage", - -value=>$self->get("encryptPage"), - -label=>$i18n->get('encrypt page'), - -hoverHelp=>$i18n->get('encrypt page description',"Asset"), - -uiLevel=>6, - -subtext=>'
    '.$i18n->get("change").' '.WebGUI::Form::yesNo($self->session,{name=>"change_encryptPage"}) - ); - } - $tabform->getTab("security")->user( - -name=>"ownerUserId", - -label=>$i18n->get(108), - -hoverHelp=>$i18n->get('108 description',"Asset"), - -value=>$self->get("ownerUserId"), - -uiLevel=>6, - -subtext=>'
    '.$i18n->get("change").' '.WebGUI::Form::yesNo($self->session,{name=>"change_ownerUserId"}) - ); - $tabform->getTab("security")->group( - -name=>"groupIdView", - -label=>$i18n->get(872), - -hoverHelp=>$i18n->get('872 description',"Asset"), - -value=>[$self->get("groupIdView")], - -uiLevel=>6, - -subtext=>'
    '.$i18n->get("change").' '.WebGUI::Form::yesNo($self->session,{name=>"change_groupIdView"}) - ); - $tabform->getTab("security")->group( - -name=>"groupIdEdit", - -label=>$i18n->get(871), - -hoverHelp=>$i18n->get('871 description',"Asset"), - -value=>[$self->get("groupIdEdit")], - -excludeGroups=>[1,7], - -uiLevel=>6, - -subtext=>'
    '.$i18n->get("change").' '.WebGUI::Form::yesNo($self->session,{name=>"change_groupIdEdit"}) - ); - $tabform->addTab("meta",$i18n->get("Metadata"),3); - $tabform->getTab("meta")->textarea( - -name=>"extraHeadTags", - -label=>$i18n->get("extra head tags"), - -hoverHelp=>$i18n->get('extra head tags description'), - -value=>$self->get("extraHeadTags"), - -uiLevel=>5, - -subtext=>'
    '.$i18n->get("change").' '.WebGUI::Form::yesNo($self->session,{name=>"change_extraHeadTags"}) - ); - - - $tabform->getTab("meta")->yesNo( - -name => 'usePackedHeadTags', - -label => $i18n->get('usePackedHeadTags label'), - -hoverHelp => $i18n->get('usePackedHeadTags description'), - -uiLevel => 7, - -fieldType => 'yesNo', - -defaultValue => 0, - -subtext => '
    ' - . $i18n->get("change") . ' ' - . WebGUI::Form::yesNo( $self->session, { name => "change_usePackedHeadTags" } ), - ); - $tabform->getTab("meta")->yesNo( - -name => 'isPackage', - -label => $i18n->get("make package"), - -hoverHelp => $i18n->get('make package description'), - -uiLevel => 7, - -fieldType => 'yesNo', - -defaultValue => 0, - -subtext => '
    ' - . $i18n->get("change") . ' ' - . WebGUI::Form::yesNo( $self->session, { name => "change_isPackage" } ), - ); - $tabform->getTab("meta")->yesNo( - -name => 'isPrototype', - -label => $i18n->get("make prototype"), - -hoverHelp => $i18n->get('make prototype description'), - -uiLevel => 9, - -fieldType => 'yesNo', - -defaultValue => 0, - -subtext => '
    ' - . $i18n->get("change") . ' ' - . WebGUI::Form::yesNo( $self->session, { name => "change_isPrototype" } ), - ); - $tabform->getTab("meta")->yesNo( - -name => 'isExportable', - -label => $i18n->get('make asset exportable'), - -hoverHelp => $i18n->get('make asset exportable description'), - -uiLevel => 9, - -fieldType => 'yesNo', - -defaultValue => 1, - -subtext => '
    ' - . $i18n->get("change") . ' ' - . WebGUI::Form::yesNo( $self->session, { name => "change_isExportable" } ), - ); - $tabform->getTab("meta")->yesNo( - -name => 'inheritUrlFromParent', - -label => $i18n->get('does asset inherit URL from parent'), - -hoverHelp => $i18n->get('does asset inherit URL from parent description'), - -uiLevel => 9, - -fieldType => 'yesNo', - -defaultValue => 0, - -subtext => '
    ' - . $i18n->get("change") . ' ' - . WebGUI::Form::yesNo( $self->session, { name => "change_inheritUrlFromParent" } ), - ); - - - if ($self->session->setting->get("metaDataEnabled")) { - my $meta = $self->getMetaDataFields(); - foreach my $field (keys %$meta) { - my $fieldType = $meta->{$field}{fieldType} || "text"; - my $options = $meta->{$field}{possibleValues}; - # Add a "Select..." option on top of a select list to prevent from - # saving the value on top of the list when no choice is made. - if("\l$fieldType" eq "selectBox") { - $options = "|" . $i18n->get("Select") . "\n" . $options; - } - $tabform->getTab("meta")->dynamicField( - fieldType => $fieldType, - name => "metadata_".$meta->{$field}{fieldId}, - label => $meta->{$field}{fieldName}, - uiLevel => 5, - value => $meta->{$field}{value}, - extras => qq/title="$meta->{$field}{description}"/, - options => $options, - defaultValue => $meta->{$field}{defaultValue}, - subtext => '
    '.$i18n->get("change").' '.WebGUI::Form::yesNo($self->session,{name=>"change_metadata_".$meta->{$field}{fieldId}}), - ); - } - } - return $ac->render($tabform->print, $i18n->get('edit branch','Asset')); -} - -#------------------------------------------------------------------- - -=head2 www_editBranchSaveStatus ( ) - -Verifies proper inputs in the Asset Tree and saves them. Returns ManageAssets method. If canEdit returns False, returns an insufficient privilege page. - -=cut - -sub www_editBranchSave { - my $self = shift; - my $session = $self->session; - return $session->privilege->insufficient() unless ($self->canEdit && $session->user->isInGroup('4')); - my $form = $session->form; - my %data; - my $pb = WebGUI::ProgressBar->new($session); - my $i18n = WebGUI::International->new($session, 'Asset'); - $pb->start($i18n->get('edit branch'), $session->url->extras('adminConsole/assets.gif')); - $pb->update($i18n->get('Processing form data')); - $data{isHidden} = $form->yesNo("isHidden") if ($form->yesNo("change_isHidden")); - $data{newWindow} = $form->yesNo("newWindow") if ($form->yesNo("change_newWindow")); - $data{encryptPage} = $form->yesNo("encryptPage") if ($form->yesNo("change_encryptPage")); - $data{ownerUserId} = $form->selectBox("ownerUserId") if ($form->yesNo("change_ownerUserId")); - $data{groupIdView} = $form->group("groupIdView") if ($form->yesNo("change_groupIdView")); - $data{groupIdEdit} = $form->group("groupIdEdit") if ($form->yesNo("change_groupIdEdit")); - $data{extraHeadTags} = $form->textarea("extraHeadTags") - if $form->yesNo("change_extraHeadTags"); - $data{usePackedHeadTags} = $form->yesNo("usePackedHeadTags") - if $form->yesNo("change_usePackedHeadTags"); - $data{isPackage} = $form->yesNo("isPackage") - if $form->yesNo("change_isPackage"); - $data{isPrototype} = $form->yesNo("isPrototype") - if $form->yesNo("change_isPrototype"); - $data{isExportable} = $form->yesNo("isExportable") - if $form->yesNo("change_isExportable"); - $data{inheritUrlFromParent} = $form->yesNo("inheritUrlFromParent") - if $form->yesNo("change_inheritUrlFromParent"); - - my %wobjectData = %data; - $wobjectData{displayTitle} = $form->yesNo("displayTitle") - if ($form->yesNo("change_displayTitle")); - $wobjectData{styleTemplateId} = $form->template("styleTemplateId") - if ($form->yesNo("change_styleTemplateId")); - $wobjectData{printableStyleTemplateId} = $form->template("printableStyleTemplateId") - if ($form->yesNo("change_printableStyleTemplateId")); - $wobjectData{mobileStyleTemplateId} = $form->template("mobileStyleTemplateId") - if ($form->yesNo("change_mobileStyleTemplateId")); - - my ($urlBaseBy, $urlBase, $endOfUrl); - my $changeUrl = $form->yesNo("change_url"); - if ($changeUrl) { - $urlBaseBy = $form->selectBox("baseUrlBy"); - $urlBase = $form->text("baseUrl"); - $endOfUrl = $form->selectBox("endOfUrl"); - } - my $descendantIter = $self->getLineageIterator(["self","descendants"]); - while ( 1 ) { - my $descendant; - eval { $descendant = $descendantIter->() }; - if ( my $x = WebGUI::Error->caught('WebGUI::Error::ObjectNotFound') ) { - $session->log->error($x->full_message); - next; - } - last unless $descendant; - if ( !$descendant->canEdit ) { - $pb->update(sprintf $i18n->get('skipping %s'), $descendant->getTitle); - next; - } - $pb->update(sprintf $i18n->get('editing %s'), $descendant->getTitle); - my $url; - if ($changeUrl) { - if ($urlBaseBy eq "parentUrl") { - delete $descendant->{_parent}; - $data{url} = $descendant->getParent->get("url")."/"; - } elsif ($urlBaseBy eq "specifiedBase") { - $data{url} = $urlBase."/"; - } else { - $data{url} = ""; - } - if ($endOfUrl eq "menuTitle") { - $data{url} .= $descendant->get("menuTitle"); - } elsif ($endOfUrl eq "title") { - $data{url} .= $descendant->get("title"); - } else { - $data{url} .= $descendant->get("url"); - } - $wobjectData{url} = $data{url}; - } - my $newData = $descendant->isa('WebGUI::Asset::Wobject') ? \%wobjectData : \%data; - my $revision; - if (scalar %$newData > 0) { - $revision = $descendant->addRevision( - $newData, - undef, - {skipAutoCommitWorkflows => 1, skipNotification => 1}, - ); - } - else { - $revision = $descendant; - } - foreach my $param ($form->param) { - if ($param =~ /^metadata_(.*)$/) { - my $fieldName = $1; - if ($form->yesNo("change_metadata_".$fieldName)) { - $revision->updateMetaData($fieldName,$form->process($form)); - } - } - } - } - $pb->update(sprintf $i18n->get('Attempting to commit changes')); - if (WebGUI::VersionTag->autoCommitWorkingIfEnabled($self->session, { - allowComments => 1, - returnUrl => $self->getUrl, - }) eq 'redirect') { - return undef; - }; - delete $self->{_parent}; - $self->session->asset($self->getParent); - ##Since this method originally returned the user to the AssetManager, we don't need - ##to use $pb->finish to redirect back there. - return $self->getParent->www_manageAssets; -} - - - 1; - diff --git a/lib/WebGUI/AssetClipboard.pm b/lib/WebGUI/AssetClipboard.pm index 717e2974f..1fe95c7b8 100644 --- a/lib/WebGUI/AssetClipboard.pm +++ b/lib/WebGUI/AssetClipboard.pm @@ -3,7 +3,7 @@ package WebGUI::Asset; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -15,6 +15,7 @@ package WebGUI::Asset; =cut use strict; +use Number::Format (); =head1 NAME @@ -45,63 +46,11 @@ paste a wiki page anywhere else but a wiki master. =cut sub canPaste { - my $self = shift; - return $self->validParent($self->session); ##Lazy call to a class method + my $self = shift; + my $class = ref $self; + return $class->validParent($self->session); } -#------------------------------------------------------------------- - -=head2 copyInFork ( $process, $args ) - -WebGUI::Fork method called by www_copy - -=cut - -sub copyInFork { - my ($process, $args) = @_; - my $session = $process->session; - my $asset = WebGUI::Asset->new($session, $args->{assetId}); - my @pedigree = ('self'); - my $childrenOnly = 0; - if ($args->{childrenOnly}) { - $childrenOnly = 1; - push @pedigree, 'children'; - } - else { - push @pedigree, 'descendants'; - } - my $ids = $asset->getLineage(\@pedigree); - my $tree = WebGUI::ProgressTree->new($session, $ids); - $process->update(sub { $tree->json }); - my $patch = Monkey::Patch::patch_class( - 'WebGUI::Asset', 'duplicate', sub { - my $duplicate = shift; - my $self = shift; - my $id = $self->getId; - $tree->focus($id); - my $asset = eval { $self->$duplicate(@_) }; - my $e = $@; - if ($e) { - $tree->note($id, $e); - $tree->failure($id, 'Died'); - } - else { - $tree->success($id); - } - $process->update(sub { $tree->json }); - die $e if $e; - return $asset; - } - ); - my $newAsset = $asset->duplicateBranch($childrenOnly, 'clipboard'); - $newAsset->update({ title => $newAsset->getTitle . ' (copy)'}); - if ($args->{commit}) { - my $tag = WebGUI::VersionTag->getWorking($session); - $tag->requestCommit(); - } -} - - #------------------------------------------------------------------- =head2 cut ( ) @@ -116,10 +65,10 @@ sub cut { my $session = $self->session; return undef if ($self->getId eq $session->setting->get("defaultPage") || $self->getId eq $session->setting->get("notFoundPage")); $session->db->beginTransaction; - $session->db->write("update asset set state='clipboard-limbo' where lineage like ? and state='published'",[$self->get("lineage").'%']); + $session->db->write("update asset set state='clipboard-limbo' where lineage like ? and state='published'",[$self->lineage.'%']); $session->db->write("update asset set state='clipboard', stateChangedBy=?, stateChanged=? where assetId=?", [$session->user->userId, time(), $self->getId]); $session->db->commit; - $self->{_properties}{state} = "clipboard"; + $self->state("clipboard"); my $assetIter = $self->getLineageIterator(['descendants']); while ( 1 ) { my $asset; @@ -162,6 +111,7 @@ A state for the duplicated asset (defaults to 'published') sub duplicate { my $self = shift; + my $session = $self->session; my $options = shift; my $parent = $self->getParent; ##Remove state and pass all other options along to addChild @@ -191,7 +141,7 @@ sub duplicate { } # Duplicate keywords - my $k = WebGUI::Keyword->new( $self->session ); + my $k = WebGUI::Keyword->new( $session ); my $keywords = $k->getKeywordsForAsset( { asset => $self, asArrayRef => 1, @@ -281,22 +231,21 @@ sub paste { my $assetId = shift; my $outputSub = shift; my $session = $self->session; - my $pastedAsset = WebGUI::Asset->newByDynamicClass($session,$assetId); - return 0 unless ($self->get("state") eq "published"); + my $pastedAsset = WebGUI::Asset->newById($session,$assetId); + return 0 unless ($self->state eq "published"); return 0 unless ($pastedAsset->canPaste()); ##Allow pasted assets to have a say about pasting. - # Don't allow a shortcut to create an endless loop ##Do not paste a shortcut immediately below the original asset - return 0 if $pastedAsset->isa('WebGUI::Asset::Shortcut') && $pastedAsset->get("shortcutToAssetId") eq $self->getId; + return 0 if ($pastedAsset->isa("WebGUI::Asset::Shortcut") && $pastedAsset->shortcutToAssetId eq $self->getId); my $i18n=WebGUI::International->new($session, 'Asset'); $outputSub->(sprintf $i18n->get('pasting %s'), $pastedAsset->getTitle) if defined $outputSub; - if ($self->getId eq $pastedAsset->get("parentId") || $pastedAsset->setParent($self)) { + if ($self->getId eq $pastedAsset->parentId || $pastedAsset->setParent($self)) { + $pastedAsset->publish(['clipboard','clipboard-limbo']); # Paste only clipboard items + $pastedAsset->updateHistory("pasted to parent ".$self->getId); + # Update lineage in search index. - my $assetIter = $pastedAsset->getLineageIterator( - ['self', 'descendants'], { - statesToInclude => ['clipboard','clipboard-limbo'] - } - ); + $self->purgeCache; + my $assetIter = $pastedAsset->getLineageIterator( ['self', 'descendants'] ); while ( 1 ) { my $asset; eval { $asset = $assetIter->() }; @@ -305,9 +254,7 @@ sub paste { next; } last unless $asset; - $outputSub->(sprintf $i18n->get('indexing %s'), $pastedAsset->getTitle) if defined $outputSub; - $asset->setState('published'); $asset->indexContent(); } $pastedAsset->updateHistory("pasted to parent ".$self->getId); @@ -328,10 +275,12 @@ WebGUI::Fork method called by www_pasteList sub pasteInFork { my ( $process, $args ) = @_; my $session = $process->session; - my $self = WebGUI::Asset->new( $session, $args->{assetId} ); - $session->asset( $self ); - my @roots = grep { $_ && $_->canEdit } - map { WebGUI::Asset->newPending( $session, $_ ) } @{ $args->{list} }; + $session->log->info( "Trying " . $args->{assetId} ); + my $self = WebGUI::Asset->newById( $session, $args->{assetId} ); + $session->asset($self); + + my @roots = grep { $_ && $_->canEdit } + map { $session->log->info( " Trying " . $_ ); WebGUI::Asset->newPending( $session, $_ ) } @{ $args->{list} }; my @ids = map { my $list @@ -366,237 +315,6 @@ sub pasteInFork { $self->paste( $_->getId ) for @roots; } ## end sub pasteInFork - -#------------------------------------------------------------------- - -=head2 www_copy ( ) - -Duplicates self, cuts duplicate, returns self->getContainer->www_view if -canEdit. Otherwise returns an AdminConsole rendered as insufficient privilege. -If with children/descendants is selected, a progress bar will be rendered. - -=cut - -sub www_copy { - my $self = shift; - my $session = $self->session; - my $http = $session->http; - my $redir = $self->getParent->getUrl; - return $session->privilege->insufficient unless $self->canEdit; - - my $with = $session->form->get('with'); - my %args; - if ($with eq 'children') { - $args{childrenOnly} = 1; - } - elsif ($with ne 'descendants') { - my $newAsset = $self->duplicate({ - skipAutoCommitWorkflows => 1, - state => 'clipboard' - } - ); - $newAsset->update({ title => $newAsset->getTitle . ' (copy)'}); - my $result = WebGUI::VersionTag->autoCommitWorkingIfEnabled( - $session, { - allowComments => 1, - returnUrl => $redir, - } - ); - $http->setRedirect($redir) unless $result eq 'redirect'; - return 'redirect'; - } - - my $tag = WebGUI::VersionTag->getWorking($session); - if ($tag->canAutoCommit) { - $args{commit} = 1; - unless ($session->setting->get('skipCommitComments')) { - $redir = $tag->autoCommitUrl($redir); - } - } - - $args{assetId} = $self->getId; - $self->forkWithStatusPage({ - plugin => 'ProgressTree', - title => 'Copy Assets', - redirect => $redir, - method => 'copyInFork', - args => \%args - } - ); -} - -#------------------------------------------------------------------- - -=head2 www_copyList ( ) - - -Checks to see if the current user canEdit the parent containting the assets that -are being copied. If that's not true, or if the CSRF token is missing, then -return insufficient privileges. - -Copies the list of assets in the C form variable, checking each one for edit privileges. - -Returns the user to either the screen set by the C form variable, or to -the Asset Manager. - -=cut - -sub www_copyList { - my $self = shift; - my $session = $self->session; - return $self->session->privilege->insufficient() unless $self->canEdit && $session->form->validToken; - foreach my $assetId ($session->form->param("assetId")) { - my $asset = WebGUI::Asset->newByDynamicClass($session,$assetId); - if ($asset->canEdit) { - my $newAsset = $asset->duplicate({skipAutoCommitWorkflows => 1, state => 'clipboard'}); - $newAsset->update({ title=>$newAsset->getTitle.' (copy)'}); - } - } - if ($self->session->form->process("proceed") ne "") { - my $method = "www_".$session->form->process("proceed"); - return $self->$method(); - } - return $self->www_manageAssets(); -} - -#------------------------------------------------------------------- - -=head2 www_createShortcut ( ) - -=cut - -sub www_createShortcut { - my $self = shift; - my $session = $self->session; - return $session->privilege->insufficient() if ! $self->canEdit; - my $isOnDashboard = $self->getParent->isa('WebGUI::Asset::Wobject::Dashboard'); - - my $shortcutParent = $isOnDashboard? $self->getParent : WebGUI::Asset->getImportNode($session); - my $child = $shortcutParent->addChild({ - className=>'WebGUI::Asset::Shortcut', - shortcutToAssetId=>$self->getId, - title=>$self->getTitle, - menuTitle=>$self->getMenuTitle, - isHidden=>$self->get("isHidden"), - newWindow=>$self->get("newWindow"), - ownerUserId=>$self->get("ownerUserId"), - groupIdEdit=>$self->get("groupIdEdit"), - groupIdView=>$self->get("groupIdView"), - url=>$self->get("title"), - templateId=>'PBtmpl0000000000000140' - }); - - if (! $isOnDashboard) { - $child->cut; - } - if (WebGUI::VersionTag->autoCommitWorkingIfEnabled($session, { - allowComments => 1, - returnUrl => $self->getUrl, - }) eq 'redirect') { - return 'redirect'; - }; - - if ($isOnDashboard) { - return $self->getParent->www_view; - } else { - $self->session->asset($self->getContainer); - return $self->session->asset->www_manageAssets if ($self->session->form->process("proceed") eq "manageAssets"); - return $self->session->asset->www_view; - } -} - -#------------------------------------------------------------------- - -=head2 www_cut ( ) - -If the current user canEdit, it puts $self into the clipboard and calls www_view on it's container. -Otherwise returns AdminConsole rendered insufficient privilege. - -=cut - -sub www_cut { - my $self = shift; - return $self->session->privilege->insufficient() unless $self->canEdit; - return $self->session->privilege->vitalComponent - if $self->get('isSystem'); - $self->cut; - my $asset = $self->getContainer; - if ($self->getId eq $asset->getId) { - $asset = $self->getParent; - } - $self->session->asset($asset); - return $asset->www_view; - - -} - -#------------------------------------------------------------------- - -=head2 www_cutList ( ) - -Checks to see if the current user canEdit the parent containting the assets that -are being cut. If that's not true, or if the CSRF token is missing, then -return insufficient privileges. - -Cuts the list of assets in the C form variable, checking each one for edit privileges -and to see if it's a system asset. - -Returns the user to either the screen set by the C form variable, or to -the Asset Manager. - -=cut - -sub www_cutList { - my $self = shift; - my $session = $self->session; - return $session->privilege->insufficient() unless $self->canEdit && $session->form->validToken; - foreach my $assetId ($session->form->param("assetId")) { - my $asset = WebGUI::Asset->newByDynamicClass($session,$assetId); - if ($asset->canEdit && !$asset->get('isSystem')) { - $asset->cut; - } - } - if ($session->form->process("proceed") ne "") { - my $method = "www_".$session->form->process("proceed"); - return $self->$method(); - } - return $self->www_manageAssets(); -} - -#------------------------------------------------------------------- - -=head2 www_duplicateList ( ) - -Checks to see if the current user canEdit the parent containting the assets that -are being duplicated. If that's not true, or if the CSRF token is missing, then -return insufficient privileges. - -Duplicates (copy and paste immediately) the list of assets in the C -form variable, checking each one for edit privileges. - -Returns the user to either the screen set by the C form variable, or to -the Asset Manager. - -=cut - -sub www_duplicateList { - my $self = shift; - my $session = $self->session; - return $session->privilege->insufficient() unless $self->canEdit && $session->form->validToken; - foreach my $assetId ($session->form->param("assetId")) { - my $asset = WebGUI::Asset->newByDynamicClass($session,$assetId); - if ($asset->canEdit) { - my $newAsset = $asset->duplicate({skipAutoCommitWorkflows => 1}); - $newAsset->update({ title=>$newAsset->getTitle.' (copy)'}); - } - } - if ($session->form->process("proceed") ne "") { - my $method = "www_".$session->form->process("proceed"); - return $self->$method(); - } - return $self->www_manageAssets(); -} - #------------------------------------------------------------------- =head2 www_emptyClipboard ( ) @@ -650,8 +368,8 @@ sub www_manageClipboard { $ac->addSubmenuItem($self->getUrl('func=emptyClipboard'), $i18n->get(950), 'onclick="return window.confirm(\''.$i18n->get(951,"WebGUI").'\')"',"Asset"); } - $self->session->style->setLink($self->session->url->extras('assetManager/assetManager.css'), {rel=>"stylesheet",type=>"text/css"}); - $self->session->style->setScript($self->session->url->extras('assetManager/assetManager.js'), {type=>"text/javascript"}); + $self->session->style->setCss($self->session->url->extras('assetManager/assetManager.css')); + $self->session->style->setScript($self->session->url->extras('assetManager/assetManager.js')); my $output = " ', $asset->getUrl; + return $output; +} + + +1; diff --git a/lib/WebGUI/AssetHelper/Copy.pm b/lib/WebGUI/AssetHelper/Copy.pm new file mode 100644 index 000000000..169ac15ba --- /dev/null +++ b/lib/WebGUI/AssetHelper/Copy.pm @@ -0,0 +1,85 @@ +package WebGUI::AssetHelper::Copy; + +use strict; +use base qw/WebGUI::AssetHelper/; +use Scalar::Util qw( blessed ); + +=head1 LEGAL + + ------------------------------------------------------------------- + WebGUI is Copyright 2001-2012 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 + ------------------------------------------------------------------- + +=head1 NAME + +Package WebGUI::AssetHelper::Copy + +=head1 DESCRIPTION + +Copy an Asset to the Clipboard, with no children. + +=head1 METHODS + +These methods are available from this class: + +=cut + +#------------------------------------------------------------------- + +=head2 process ( ) + +Fork the copy operation + +=cut + +sub process { + my ($self) = @_; + my $asset = $self->asset; + my $session = $self->session; + + # Should we autocommit? + my $commit = $session->setting->get('versionTagMode') eq 'autoCommit'; + + # Fork the copy. Forking makes sure it won't get interrupted + my $fork = WebGUI::Fork->start( + $session, blessed( $self ), 'copy', { assetId => $asset->getId, commit => $commit }, + ); + + return { + forkId => $fork->getId, + }; +} + +#------------------------------------------------------------------- + +=head2 copy ( $process, $args ) + +Perform the copy stuff in a forked process + +=cut + +sub copy { + my ($process, $args) = @_; + my $session = $process->session; + my $asset = WebGUI::Asset->newById($session, $args->{assetId}); + my $tree = WebGUI::ProgressTree->new($session, [ $asset->getId ] ); + $process->update(sub { $tree->json }); + my $newAsset = $asset->duplicate({ state => "clipboard" }); + $newAsset->update({ title => $newAsset->getTitle . ' (copy)'}); + + $tree->success($asset->getId); + $process->update(sub { $tree->json }); + + my $tag = WebGUI::VersionTag->getWorking($session); + if ($tag->canAutoCommit) { + $tag->commit; + } +} + +1; diff --git a/lib/WebGUI/AssetHelper/CopyBranch.pm b/lib/WebGUI/AssetHelper/CopyBranch.pm new file mode 100644 index 000000000..a3a37acaa --- /dev/null +++ b/lib/WebGUI/AssetHelper/CopyBranch.pm @@ -0,0 +1,137 @@ +package WebGUI::AssetHelper::CopyBranch; + +use strict; +use base qw/WebGUI::AssetHelper::Copy/; +use Scalar::Util qw{ blessed }; +use WebGUI::VersionTag; + +=head1 LEGAL + + ------------------------------------------------------------------- + WebGUI is Copyright 2001-2012 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 + ------------------------------------------------------------------- + +=head1 NAME + +Package WebGUI::AssetHelper::CopyBranch + +=head1 DESCRIPTION + +Copy an Asset to the Clipboard, with children or descendants + +=head1 METHODS + +These methods are available from this class: + +=cut + +#------------------------------------------------------------------- + +=head2 process () + +Open a progress dialog for the copy operation + +=cut + +sub process { + my ($self) = @_; + + return { + openDialog => $self->getUrl( 'getWith' ), + }; +} + +#---------------------------------------------------------------------------- + +=head2 www_getWith () + +Get the "with" configuration. "Descendants" or "Children". + +=cut + +sub www_getWith { + my ( $self ) = @_; + my $asset = $self->asset; + my $session = $self->session; + my $i18n = WebGUI::International->new($session, 'Asset'); + + my $f = $self->getForm( 'copy' ); + $f->addField( 'submit', name => 'with', value => 'Children' ); + $f->addField( 'submit', name => 'with', value => 'Descendants' ); + return $f->toHtml; +} + + +#---------------------------------------------------------------------------- + +=head2 www_copy () + +Perform the copy operation in a fork + +=cut + +sub www_copy { + my ($self) = @_; + my $asset = $self->asset; + my $session = $self->session; + + my $childrenOnly = 1 if lc $session->form->get('with') eq 'children'; + + # Should we autocommit? + my $commit = $session->setting->get('versionTagMode') eq 'autoCommit'; + + # Fork the copy. Forking makes sure it won't get interrupted + my $fork = WebGUI::Fork->start( + $session, blessed( $self ), 'copyBranch', { childrenOnly => $childrenOnly, assetId => $asset->getId, commit => $commit }, + ); + + return { + forkId => $fork->getId, + }; +} + +#------------------------------------------------------------------- + +=head2 copyBranch ( $process, $args ) + +Perform the copy stuff in a forked process + +=cut + +sub copyBranch { + my ($process, $args) = @_; + my $session = $process->session; + my $asset = WebGUI::Asset->newById($session, $args->{assetId}); + + # Get the assets we need to duplicate + my $assetIds = []; + if ( $args->{childrenOnly} ) { + $assetIds = $asset->getLineage(['children']); + } + else { + $assetIds = $asset->getLineage(['descendants']); + } + + my $tree = WebGUI::ProgressTree->new($session, $assetIds ); + $process->update(sub { $tree->json }); + my $newAsset = $asset->duplicateBranch( $args->{childrenOnly} ? 1 : 0, 'clipboard' ); + + $newAsset->update({ title => $newAsset->getTitle . ' (copy)'}); + + $tree->success($asset->getId); + $process->update(sub { $tree->json }); + + my $tag = WebGUI::VersionTag->getWorking($session); + if ($tag->canAutoCommit) { + $tag->commit; + } + +} + +1; diff --git a/lib/WebGUI/AssetHelper/CreateShortcut.pm b/lib/WebGUI/AssetHelper/CreateShortcut.pm new file mode 100644 index 000000000..69c97c7a6 --- /dev/null +++ b/lib/WebGUI/AssetHelper/CreateShortcut.pm @@ -0,0 +1,80 @@ +package WebGUI::AssetHelper::CreateShortcut; + +use strict; +use base qw/WebGUI::AssetHelper/; + +=head1 LEGAL + + ------------------------------------------------------------------- + WebGUI is Copyright 2001-2012 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 + ------------------------------------------------------------------- + +=head1 NAME + +Package WebGUI::AssetHelper::CreateShortcut + +=head1 DESCRIPTION + +Create a shortcut to the asset and put it on the clipboard + +=head1 METHODS + +These methods are available from this class: + +=cut + +#------------------------------------------------------------------- + +=head2 process ( ) + +Create a shortcut to the asset on the clipboard. + +=cut + +sub process { + my ($self) = @_; + my $session = $self->session; + my $asset = $self->asset; + my $i18n = WebGUI::International->new( $session, 'WebGUI' ); + + return { error => $i18n->get('39') } if !$asset->canView; + my $import = WebGUI::Asset->getImportNode( $session ); + my $tag = WebGUI::VersionTag->getWorking( $session ); + my $child = $import->addChild({ + className => 'WebGUI::Asset::Shortcut', + shortcutToAssetId => $asset->getId, + title => $asset->getTitle, + menuTitle => $asset->getMenuTitle, + isHidden => $asset->isHidden, + newWindow => $asset->newWindow, + ownerUserId => $asset->ownerUserId, + groupIdEdit => $asset->groupIdEdit, + groupIdView => $asset->groupIdView, + url => $asset->title, + templateId => 'PBtmpl0000000000000140', + }); + + $child->cut; + + if (WebGUI::VersionTag->autoCommitWorkingIfEnabled($session, { + allowComments => 1, + returnUrl => $asset->getUrl, + }) eq 'redirect') { + return { + message => $i18n->get('shortcut created'), + redirect => $session->request->location, + }; + }; + + return { + message => $i18n->get('shortcut created'), + }; +} + +1; diff --git a/lib/WebGUI/AssetHelper/Cut.pm b/lib/WebGUI/AssetHelper/Cut.pm new file mode 100644 index 000000000..dd8e79a96 --- /dev/null +++ b/lib/WebGUI/AssetHelper/Cut.pm @@ -0,0 +1,99 @@ +package WebGUI::AssetHelper::Cut; + +use strict; +use base qw/WebGUI::AssetHelper/; +use Scalar::Util qw( blessed ); +use Monkey::Patch; + +=head1 LEGAL + + ------------------------------------------------------------------- + WebGUI is Copyright 2001-2012 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 + ------------------------------------------------------------------- + +=head1 NAME + +Package WebGUI::AssetHelper::Cut + +=head1 DESCRIPTION + +Cuts an Asset to the Clipboard. + +=head1 METHODS + +These methods are available from this class: + +=cut + +#------------------------------------------------------------------- + +=head2 process () + +Cuts the asset to the clipboard. If the user cannot edit the asset, or the asset is a +system asset, it returns an error message. + +=cut + +sub process { + my ($self) = @_; + my $asset = $self->asset; + my $session = $self->session; + + my $i18n = WebGUI::International->new($session, 'WebGUI'); + if (! $asset->canEdit) { + return { error => $i18n->get('38'), }; + } + elsif ( $asset->get('isSystem') ) { + return { error => $i18n->get('41'), }; + } + + # Fork the cut. Forking makes sure it won't get interrupted + my $fork = WebGUI::Fork->start( + $session, blessed( $self ), 'cut', { assetId => $asset->getId }, + ); + + return { + forkId => $fork->getId, + }; +} + +#---------------------------------------------------------------------------- + +=head2 cut ( process, args ) + +Handle the actual cutting in the forked process. + +=cut + +sub cut { + my ( $process, $args ) = @_; + my $asset = WebGUI::Asset->newById( $process->session, $args->{assetId} ); + + # All the Assets we need to work on + my $assetIds = $asset->getLineage( ['self','descendants'] ); + + # Build a tree and update process status + my $tree = WebGUI::ProgressTree->new( $process->session, $assetIds ); + $process->update( sub { $tree->json } ); + + # Monkeypatch a sub to get a status update + my $patch = Monkey::Patch::patch_class( + 'WebGUI::Asset', 'updateHistory', sub { + my ( $orig, $self, @args ) = @_; + $tree->success( $self->assetId ); + $process->update( sub { $tree->json } ); + $self->$orig( @args ); + } + ); + + # Do the actual work + $asset->cut; +} + +1; diff --git a/lib/WebGUI/AssetHelper/Delete.pm b/lib/WebGUI/AssetHelper/Delete.pm new file mode 100644 index 000000000..b2580232d --- /dev/null +++ b/lib/WebGUI/AssetHelper/Delete.pm @@ -0,0 +1,107 @@ +package WebGUI::AssetHelper::Delete; + +use strict; +use base qw/WebGUI::AssetHelper/; +use Scalar::Util qw( blessed ); + +=head1 LEGAL + + ------------------------------------------------------------------- + WebGUI is Deleteright 2001-2009 Plain Black Corporation. + ------------------------------------------------------------------- + Please read the legal notices (docs/legal.txt) and the license + (docs/license.txt) that came with this distribution before using + this software. + ------------------------------------------------------------------- + http://www.plainblack.com info@plainblack.com + ------------------------------------------------------------------- + +=head1 NAME + +Package WebGUI::AssetHelper::Delete + +=head1 DESCRIPTION + +Delete an Asset, and all descendants + +=head1 METHODS + +These methods are available from this class: + +=cut + +#------------------------------------------------------------------- + +=head2 process () + +Fork the Delete operation + +=cut + +sub process { + my ($self) = @_; + my $asset = $self->asset; + my $session = $self->session; + + my $i18n = WebGUI::International->new($session, 'WebGUI'); + if (! $asset->canEdit) { + return { error => $i18n->get('38'), }; + } + elsif ( $asset->get('isSystem') ) { + return { error => $i18n->get('41'), }; + } + + # Fork the Delete. Forking makes sure it won't get interrupted + my $fork = WebGUI::Fork->start( + $session, blessed( $self ), 'delete', { assetId => $asset->getId, }, + ); + + return { + forkId => $fork->getId, + }; +} + +#------------------------------------------------------------------- + +=head2 delete ( $process, $args ) + +Perform the delete stuff in a forked process + +=cut + +sub delete { + my ($process, $args) = @_; + my $session = $process->session; + my $asset = WebGUI::Asset->newById($session, $args->{assetId}); + + # Prepare a tree with all the ids + my $ids = + $asset->getLineage( + [ 'self', 'descendants' ], { + statesToInclude => [qw(published clipboard clipboard-limbo trash trash-limbo)], + statusToInclude => [qw(approved archived pending)], + } + ); + my $tree = WebGUI::ProgressTree->new( $session, $ids ); + $process->update(sub { $tree->json }); + + # Patch a sub to get a status update + my $patch = Monkey::Patch::patch_class( + 'WebGUI::Asset', + 'setState', + sub { + my ( $setState, $self, $state ) = @_; + my $id = $self->getId; + $tree->focus($id); + my $ret = $self->$setState($state); + $tree->success($id); + $process->update(sub { $tree->json }); + return $ret; + } + ); + + # Do the dirty deed, cheap + $asset->trash; +} + +1; diff --git a/lib/WebGUI/AssetHelper/Duplicate.pm b/lib/WebGUI/AssetHelper/Duplicate.pm new file mode 100644 index 000000000..8bcb1bfd2 --- /dev/null +++ b/lib/WebGUI/AssetHelper/Duplicate.pm @@ -0,0 +1,81 @@ +package WebGUI::AssetHelper::Duplicate; + +use strict; +use base qw/WebGUI::AssetHelper/; +use Scalar::Util qw( blessed ); + +=head1 LEGAL + + ------------------------------------------------------------------- + WebGUI is Duplicateright 2001-2009 Plain Black Corporation. + ------------------------------------------------------------------- + Please read the legal notices (docs/legal.txt) and the license + (docs/license.txt) that came with this distribution before using + this software. + ------------------------------------------------------------------- + http://www.plainblack.com info@plainblack.com + ------------------------------------------------------------------- + +=head1 NAME + +Package WebGUI::AssetHelper::Duplicate + +=head1 DESCRIPTION + +Duplicate an Asset, with no children. + +=head1 METHODS + +These methods are available from this class: + +=cut + +#------------------------------------------------------------------- + +=head2 process () + +Fork the duplicate operation + +=cut + +sub process { + my ($self) = @_; + my $asset = $self->asset; + my $session = $self->session; + + # Should we autocommit? + my $commit = $session->setting->get('versionTagMode') eq 'autoCommit'; + + # Fork the Duplicate. Forking makes sure it won't get interrupted + my $fork = WebGUI::Fork->start( + $session, blessed( $self ), 'duplicate', { assetId => $asset->getId, commit => $commit }, + ); + + return { + forkId => $fork->getId, + }; +} + +#------------------------------------------------------------------- + +=head2 duplicate ( $process, $args ) + +Perform the duplicate stuff in a forked process + +=cut + +sub duplicate { + my ($process, $args) = @_; + my $session = $process->session; + my $asset = WebGUI::Asset->newById($session, $args->{assetId}); + my $tree = WebGUI::ProgressTree->new($session, [ $asset->getId ] ); + $process->update(sub { $tree->json }); + my $newAsset = $asset->duplicate; + + $newAsset->update({ title => $newAsset->getTitle . ' (Duplicate)'}); + + $tree->success($asset->getId); + $process->update(sub { $tree->json }); +} + +1; diff --git a/lib/WebGUI/AssetHelper/EditBranch.pm b/lib/WebGUI/AssetHelper/EditBranch.pm new file mode 100644 index 000000000..28d05b5f9 --- /dev/null +++ b/lib/WebGUI/AssetHelper/EditBranch.pm @@ -0,0 +1,438 @@ +package WebGUI::AssetHelper::EditBranch; + +use strict; +use base qw/WebGUI::AssetHelper/; +use WebGUI::User; +use WebGUI::HTML; + +=head1 LEGAL + + ------------------------------------------------------------------- + WebGUI is Copyright 2001-2012 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 + ------------------------------------------------------------------- + +=head1 NAME + +Package WebGUI::AssetHelper::EditBranch + +=head1 DESCRIPTION + +Make revisioned edits to the current asset and descendant assets. + +=head1 METHODS + +These methods are available from this class: + +=cut + +#------------------------------------------------------------------- + +=head2 process () + +Opens a new tab for displaying the form and the output for editing a branch. + +=cut + +sub process { + my ($self) = @_; + my $asset = $self->asset; + my $session = $self->session; + my $i18n = WebGUI::International->new($session, "Asset"); + if (! $asset->canEdit) { + return { + error => $i18n->get('38', 'WebGUI'), + } + } + + return { + openDialog => $self->getUrl( 'editBranch' ), + }; +} + +#------------------------------------------------------------------- + +=head2 www_editBranch ( ) + +Creates a tabform to edit the Asset Tree. If canEdit returns False, returns insufficient Privilege page. + +=cut + +sub www_editBranch { + my ($self) = @_; + my $asset = $self->asset; + my $session = $self->session; + my ( $style, $url ) = $session->quick( qw( style url ) ); + $style->setCss( $url->extras('hoverhelp.css')); + $style->setScript( $url->extras('yui/build/yahoo-dom-event/yahoo-dom-event.js') ); + $style->setScript( $url->extras('yui/build/container/container-min.js') ); + $style->setScript( $url->extras('hoverhelp.js') ); + $style->setRawHeadTags( <<'ENDHTML' ); + +ENDHTML + + my $ac = WebGUI::AdminConsole->new($session,"assets"); + my $i18n = WebGUI::International->new($session,"Asset"); + my $i18n2 = WebGUI::International->new($session,"Asset_Wobject"); + return $session->privilege->insufficient() unless ($asset->canEdit); + my $change = '
    '.$i18n->get("change") . ' '; + my $tabform = WebGUI::TabForm->new($session); + $tabform->hidden({name=>"op",value=>"assetHelper"}); + $tabform->hidden({name=>"helperId",value=>$self->id}); + $tabform->hidden({name=>"method",value=>"editBranchSave"}); + $tabform->hidden({name=>"assetId",value=>$asset->getId}); + $tabform->addTab("properties",$i18n->get("properties"),9); + $tabform->getTab("properties")->readOnly( + label => $i18n->get(104), + hoverHelp=> $i18n->get('edit branch url help'), + uiLevel => 9, + subtext => $change . WebGUI::Form::yesNo($session,{name=>"change_url"}), + value => WebGUI::Form::selectBox($session, { + name => "baseUrlBy", + extras => 'onchange="toggleSpecificBaseUrl()"', + id => "baseUrlBy", + options => { + parentUrl => $i18n->get("parent url"), + specifiedBase => $i18n->get("specified base"), + none => $i18n->get("none"), + }, + }) + . ' / ' + . WebGUI::Form::selectBox($session, { + name => "endOfUrl", + options => { + menuTitle => $i18n->get(411), + title => $i18n->get(99), + currentUrl => $i18n->get("current url"), + } + }) + . q!! + ); + $tabform->addTab("display",$i18n->get(105),5); + $tabform->getTab("display")->yesNo( + name => "isHidden", + value => $asset->get("isHidden"), + label => $i18n->get(886), + uiLevel => 6, + subtext => $change . WebGUI::Form::yesNo($session,{name=>"change_isHidden"}), + hoverHelp => $i18n->get('886 description',"Asset"), + ); + $tabform->getTab("display")->yesNo( + name => "newWindow", + value => $asset->get("newWindow"), + label => $i18n->get(940), + hoverHelp=> $i18n->get('940 description'), + uiLevel => 6, + subtext => $change . WebGUI::Form::yesNo($session,{name=>"change_newWindow"}), + ); + $tabform->getTab("display")->yesNo( + name => "displayTitle", + label => $i18n2->get(174), + hoverHelp=> $i18n2->get('174 description'), + value => $asset->displayTitle, + uiLevel => 5, + subtext => $change . WebGUI::Form::yesNo($session,{name=>"change_displayTitle"}) + ); + $tabform->getTab("display")->template( + name => "styleTemplateId", + label => $i18n2->get(1073), + value => $asset->styleTemplateId, + hoverHelp => $i18n2->get('1073 description'), + namespace => 'style', + subtext => $change . WebGUI::Form::yesNo($session,{name=>"change_styleTemplateId"}) + ); + $tabform->getTab("display")->template( + name => "printableStyleTemplateId", + label => $i18n2->get(1079), + hoverHelp => $i18n2->get('1079 description'), + value => $asset->printableStyleTemplateId, + namespace => 'style', + subtext => $change . WebGUI::Form::yesNo($session,{name=>"change_printableStyleTemplateId"}) + ); + if ( $session->setting->get('useMobileStyle') ) { + $tabform->getTab("display")->template( + name => 'mobileStyleTemplateId', + label => $i18n2->get('mobileStyleTemplateId label'), + hoverHelp => $i18n2->get('mobileStyleTemplateId description'), + value => $asset->mobileStyleTemplateId, + namespace => 'style', + subtext => $change . WebGUI::Form::yesNo($session,{name=>"change_mobileStyleTemplateId"}), + ); + } + $tabform->addTab("security",$i18n->get(107),6); + if ($session->config->get("sslEnabled")) { + $tabform->getTab("security")->yesNo( + name => "encryptPage", + value => $asset->get("encryptPage"), + label => $i18n->get('encrypt page'), + hoverHelp => $i18n->get('encrypt page description',"Asset"), + uiLevel => 6, + subtext => $change . WebGUI::Form::yesNo($session,{name=>"change_encryptPage"}) + ); + } + $tabform->getTab("security")->user( + name => "ownerUserId", + label => $i18n->get(108), + hoverHelp => $i18n->get('108 description',"Asset"), + value => $asset->get("ownerUserId"), + uiLevel => 6, + subtext => $change . WebGUI::Form::yesNo($session,{name=>"change_ownerUserId"}) + ); + $tabform->getTab("security")->group( + name => "groupIdView", + label => $i18n->get(872), + hoverHelp => $i18n->get('872 description',"Asset"), + value => [$asset->get("groupIdView")], + uiLevel => 6, + subtext => $change . WebGUI::Form::yesNo($session,{name=>"change_groupIdView"}) + ); + $tabform->getTab("security")->group( + name => "groupIdEdit", + label => $i18n->get(871), + hoverHelp => $i18n->get('871 description',"Asset"), + value => [$asset->get("groupIdEdit")], + excludeGroups => [1,7], + uiLevel => 6, + subtext => $change . WebGUI::Form::yesNo($session,{name=>"change_groupIdEdit"}) + ); + $tabform->addTab("meta",$i18n->get("Metadata"),3); + $tabform->getTab("meta")->textarea( + name => "extraHeadTags", + label => $i18n->get("extra head tags"), + hoverHelp => $i18n->get('extra head tags description'), + value => $asset->get("extraHeadTags"), + uiLevel => 5, + subtext => $change . WebGUI::Form::yesNo($session,{name=>"change_extraHeadTags"}) + ); + + + $tabform->getTab("meta")->yesNo( + name => 'usePackedHeadTags', + label => $i18n->get('usePackedHeadTags label'), + hoverHelp => $i18n->get('usePackedHeadTags description'), + uiLevel => 7, + fieldType => 'yesNo', + defaultValue => 0, + subtext => $change . WebGUI::Form::yesNo( $session, { name => "change_usePackedHeadTags" } ), + ); + $tabform->getTab("meta")->yesNo( + name => 'isPackage', + label => $i18n->get("make package"), + hoverHelp => $i18n->get('make package description'), + uiLevel => 7, + fieldType => 'yesNo', + defaultValue => 0, + subtext => $change . WebGUI::Form::yesNo( $session, { name => "change_isPackage" } ), + ); + $tabform->getTab("meta")->yesNo( + name => 'isPrototype', + label => $i18n->get("make prototype"), + hoverHelp => $i18n->get('make prototype description'), + uiLevel => 9, + fieldType => 'yesNo', + defaultValue => 0, + subtext => $change . WebGUI::Form::yesNo( $session, { name => "change_isPrototype" } ), + ); + $tabform->getTab("meta")->yesNo( + name => 'isExportable', + label => $i18n->get('make asset exportable'), + hoverHelp => $i18n->get('make asset exportable description'), + uiLevel => 9, + fieldType => 'yesNo', + defaultValue => 1, + subtext => $change . WebGUI::Form::yesNo( $session, { name => "change_isExportable" } ), + ); + $tabform->getTab("meta")->yesNo( + name => 'inheritUrlFromParent', + label => $i18n->get('does asset inherit URL from parent'), + hoverHelp => $i18n->get('does asset inherit URL from parent description'), + uiLevel => 9, + fieldType => 'yesNo', + defaultValue => 0, + subtext => $change . WebGUI::Form::yesNo( $session, { name => "change_inheritUrlFromParent" } ), + ); + + if ($session->setting->get("metaDataEnabled")) { + my $meta = $asset->getMetaDataFields(); + foreach my $field (keys %$meta) { + my $fieldType = $meta->{$field}{fieldType} || "text"; + my $options = $meta->{$field}{possibleValues}; + # Add a "Select..." option on top of a select list to prevent from + # saving the value on top of the list when no choice is made. + if("\l$fieldType" eq "selectBox") { + $options = "|" . $i18n->get("Select") . "\n" . $options; + } + $tabform->getTab("meta")->dynamicField( + fieldType => $fieldType, + name => "metadata_".$meta->{$field}{fieldId}, + label => $meta->{$field}{fieldName}, + uiLevel => 5, + value => $meta->{$field}{value}, + extras => qq/title="$meta->{$field}{description}"/, + options => $options, + defaultValue => $meta->{$field}{defaultValue}, + subtext => $change . WebGUI::Form::yesNo($session,{name=>"change_metadata_".$meta->{$field}{fieldId}}), + ); + } + } + + # Replace the cancel button with one that closes the dialog + $tabform->{_cancel} = WebGUI::Form::button( $session, { + value => $i18n->get('cancel','WebGUI'), + extras => sprintf(q|onclick="%s" class="backwardButton"|, 'parent.admin.closeModalDialog()'), + } ); + + return $session->style->process( + '
    ' . $tabform->print . '
    ', + "PBtmpl0000000000000137" + ); +} + +#------------------------------------------------------------------- + +=head2 www_editBranchSaveStatus ( ) + +Verifies proper inputs in the Asset Tree and saves them. Returns ManageAssets method. If canEdit returns False, returns an insufficient privilege page. + +=cut + +sub www_editBranchSave { + my ($self) = @_; + my $asset = $self->asset; + my $session = $self->session; + return $session->privilege->insufficient() unless ($asset->canEdit && $session->user->isInGroup('4')); + my $form = $session->form; + my %data; + my $pb = WebGUI::ProgressBar->new($session); + my $i18n = WebGUI::International->new($session, 'Asset'); + my $tag = WebGUI::VersionTag->getWorking( $session ); + $data{isHidden} = $form->yesNo("isHidden") if ($form->yesNo("change_isHidden")); + $data{newWindow} = $form->yesNo("newWindow") if ($form->yesNo("change_newWindow")); + $data{encryptPage} = $form->yesNo("encryptPage") if ($form->yesNo("change_encryptPage")); + $data{ownerUserId} = $form->selectBox("ownerUserId") if ($form->yesNo("change_ownerUserId")); + $data{groupIdView} = $form->group("groupIdView") if ($form->yesNo("change_groupIdView")); + $data{groupIdEdit} = $form->group("groupIdEdit") if ($form->yesNo("change_groupIdEdit")); + $data{extraHeadTags} = $form->textarea("extraHeadTags") if $form->yesNo("change_extraHeadTags"); + $data{usePackedHeadTags} = $form->yesNo("usePackedHeadTags") if $form->yesNo("change_usePackedHeadTags"); + $data{isPackage} = $form->yesNo("isPackage") if $form->yesNo("change_isPackage"); + $data{isPrototype} = $form->yesNo("isPrototype") if $form->yesNo("change_isPrototype"); + $data{isExportable} = $form->yesNo("isExportable") if $form->yesNo("change_isExportable"); + $data{inheritUrlFromParent} = $form->yesNo("inheritUrlFromParent") if $form->yesNo("change_inheritUrlFromParent"); + + my %wobjectData = %data; + $wobjectData{displayTitle} = $form->yesNo("displayTitle") if $form->yesNo("change_displayTitle"); + $wobjectData{styleTemplateId} = $form->template("styleTemplateId") if $form->yesNo("change_styleTemplateId"); + $wobjectData{printableStyleTemplateId} = $form->template("printableStyleTemplateId") if $form->yesNo("change_printableStyleTemplateId"); + $wobjectData{mobileStyleTemplateId} = $form->template("mobileStyleTemplateId") if $form->yesNo("change_mobileStyleTemplateId"); + + my ($urlBaseBy, $urlBase, $endOfUrl); + my $changeUrl = $form->yesNo("change_url"); + if ($changeUrl) { + $urlBaseBy = $form->selectBox("baseUrlBy"); + $urlBase = $form->text("baseUrl"); + $endOfUrl = $form->selectBox("endOfUrl"); + } + + return $session->response->stream( sub { + my ( $session ) = @_; + my $pb = WebGUI::ProgressBar->new($session); + my @stack; + + return $pb->run( + admin => 1, + title => $i18n->get('edit branch'), + icon => $session->url->extras('adminConsole/assets.gif'), + code => sub { + my ( $bar ) = @_; + $bar->update( 'Preparing... (i18n)' ); + $bar->total( $asset->getDescendantCount ); + my $iter = $asset->getLineageIterator(["self","descendants"]); + DESCENDANT: while (1) { + my $descendant = eval { $iter->() }; + if (my $e = Exception::Class->caught()) { + $session->log->error($@); + next DESCENDANT; + } + last DESCENDANT unless $descendant; + + # Actual work... + if ( !$descendant->canEdit ) { + $pb->update(sprintf $i18n->get('skipping %s'), $descendant->getTitle); + next DESCENDANT; + } + $pb->update(sprintf $i18n->get('editing %s'), $descendant->getTitle); + my $url; + if ($changeUrl) { + if ($urlBaseBy eq "parentUrl") { + delete $descendant->{_parent}; + $data{url} = $descendant->getParent->get("url")."/"; + } + elsif ($urlBaseBy eq "specifiedBase") { + $data{url} = $urlBase."/"; + } + else { + $data{url} = ""; + } + if ($endOfUrl eq "menuTitle") { + $data{url} .= $descendant->get("menuTitle"); + } + elsif ($endOfUrl eq "title") { + $data{url} .= $descendant->get("title"); + } + else { + $data{url} .= $descendant->get("url"); + } + $wobjectData{url} = $data{url}; + } + my $newData = $descendant->isa('WebGUI::Asset::Wobject') ? \%wobjectData : \%data; + my $revision; + if (scalar %$newData > 0) { + $revision = $descendant->addRevision( + { %$newData, }, + undef, + {skipAutoCommitWorkflows => 1, skipNotification => 1}, + ); + $revision->setVersionLock; + } + else { + $revision = $descendant; + } + foreach my $param ($form->param) { + if ($param =~ /^metadata_(.*)$/) { + my $fieldName = $1; + if ($form->yesNo("change_metadata_".$fieldName)) { + $revision->updateMetaData($fieldName,$form->process($form)); + } + } + } + } + if (WebGUI::VersionTag->autoCommitWorkingIfEnabled($session, { + allowComments => 1, + returnUrl => $asset->getUrl, + }) eq 'redirect') { + return $asset->getUrl; + }; + return { message => 'Assets saved! (i18n)' }; + }, + ), + } ); +} + + +1; diff --git a/lib/WebGUI/AssetHelper/ExportHtml.pm b/lib/WebGUI/AssetHelper/ExportHtml.pm new file mode 100644 index 000000000..c01fde891 --- /dev/null +++ b/lib/WebGUI/AssetHelper/ExportHtml.pm @@ -0,0 +1,183 @@ +package WebGUI::AssetHelper::ExportHtml; + +use strict; +use base qw/WebGUI::AssetHelper/; +use WebGUI::User; +use WebGUI::HTML; + +=head1 LEGAL + + ------------------------------------------------------------------- + WebGUI is Copyright 2001-2012 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 + ------------------------------------------------------------------- + +=head1 NAME + +Package WebGUI::AssetHelper::ExportHtml + +=head1 DESCRIPTION + +Export this assets, and all children as HTML. + +=head1 METHODS + +These methods are available from this class: + +=cut + +#------------------------------------------------------------------- + +=head2 process () + +Opens a new tab for displaying the form and the output for exporting a branch. + +=cut + +sub process { + my ($self) = @_; + my $asset = $self->asset; + my $session = $self->session; + my $i18n = WebGUI::International->new($session, "Asset"); + if (! $asset->canEdit) { + return { + error => $i18n->get('38', 'WebGUI'), + } + } + + return { + openDialog => $self->getUrl( 'export' ), + }; +} + +#------------------------------------------------------------------- + +=head2 www_export + +Displays the export page administrative interface + +=cut + +sub www_export { + my ($self) = @_; + my $asset = $self->asset; + my $session = $self->session; + return $session->privilege->insufficient() unless ($session->user->isInGroup(13)); + my ( $style, $url ) = $session->quick(qw{ style url }); + $style->setCss( $url->extras('hoverhelp.css')); + $style->setScript( $url->extras('yui/build/yahoo-dom-event/yahoo-dom-event.js') ); + $style->setScript( $url->extras('yui/build/container/container-min.js') ); + $style->setScript( $url->extras('hoverhelp.js') ); + $style->setRawHeadTags( <<'ENDHTML' ); + +ENDHTML + + my $i18n = WebGUI::International->new($session, "Asset"); + my $f = $self->getForm( 'exportStatus' ); + $f->addField( "integer", + label => $i18n->get('Depth'), + hoverHelp => $i18n->get('Depth description'), + name => "depth", + value => 99, + ); + $f->addField( "YesNo", + label => $i18n->get('Export Related Assets'), + hoverHelp => $i18n->get('Export Related Assets description'), + name => "exportRelated", + value => '', + ); + $f->addField( "selectBox", + label => $i18n->get('Export as user'), + hoverHelp => $i18n->get('Export as user description'), + name => "userId", + options => $session->db->buildHashRef("select userId, username from users"), + value => [1], + ); + $f->addField( "text", + label => $i18n->get("directory index"), + hoverHelp => $i18n->get("directory index description"), + name => "index", + value => "index.html" + ); + + $f->addField( "text", + label => $i18n->get("Export site root URL"), + name => 'exportUrl', + value => '', + hoverHelp => $i18n->get("Export site root URL description"), + ); + + # TODO: maybe add copy options to these boxes alongside symlink + $f->addField( "selectBox", + label => $i18n->get('extrasUploads form label'), + hoverHelp => $i18n->get('extrasUploads form hoverHelp'), + name => "extrasUploadsAction", + options => { + 'symlink' => $i18n->get('extrasUploads form option symlink'), + 'none' => $i18n->get('extrasUploads form option none') }, + value => ['none'], + ); + $f->addField( "selectBox", + label => $i18n->get('rootUrl form label'), + hoverHelp => $i18n->get('rootUrl form hoverHelp'), + name => "rootUrlAction", + options => { + 'symlink' => $i18n->get('rootUrl form option symlinkDefault'), + 'none' => $i18n->get('rootUrl form option none') }, + value => ['none'], + ); + $f->addField( "submit", name => "send" ); + my $message; + eval { $asset->exportCheckPath }; + if($@) { + $message = $@; + } + return $session->style->process( + $message . $f->toHtml, + "PBtmpl0000000000000137" + ); +} + + +#------------------------------------------------------------------- + +=head2 www_exportStatus + +Displays the export status page + +=cut + +sub www_exportStatus { + my ($self) = @_; + my $asset = $self->asset; + my $session = $self->session; + return $session->privilege->insufficient + unless $session->user->isInGroup(13); + my $form = $session->form; + my @vars = qw(index depth userId rootUrlAction exportUrl exportRelated); + $asset->forkWithStatusPage({ + plugin => 'ProgressTree', + title => 'Page Export Status', + method => 'exportInFork', + dialog => 1, + message => 'Your assets have been exported!', + groupId => 13, + args => { + # Note the difference in spelling... + # v---no s s-----v + extrasUploadAction => scalar $form->get('extrasUploadsAction'), + assetId => $asset->getId, + map { $_ => scalar $form->get($_) } @vars + } + } + ); +} + +1; diff --git a/lib/WebGUI/AssetHelper/Image/Crop.pm b/lib/WebGUI/AssetHelper/Image/Crop.pm new file mode 100644 index 000000000..a166bab47 --- /dev/null +++ b/lib/WebGUI/AssetHelper/Image/Crop.pm @@ -0,0 +1,188 @@ +package WebGUI::AssetHelper::Image::Crop; + +use strict; +use warnings; + +use Moose; +extends 'WebGUI::AssetHelper'; + +#------------------------------------------------------------------- + +=head2 process ( ) + +Open a dialog to crop the image + +=cut + +sub process { + my ($self) = @_; + my $asset = $self->asset; + my $session = $self->session; + + my $i18n = WebGUI::International->new( $session, 'WebGUI' ); + if ( !$asset->canEdit ) { + return { error => $i18n->get('38'), }; + } + elsif ( !$asset->canEditIfLocked ) { + return { error => $i18n->get('asset locked') }; + } + + return { openDialog => $self->getUrl('crop') }; +} + +#------------------------------------------------------------------- + +=head2 www_crop + +Displays a form for the user to crop this image. + +=cut + +sub www_crop { + my ($self) = @_; + my $asset = $self->asset; + my $session = $self->session; + return $session->privilege->insufficient() unless $asset->canEdit; + return $session->privilege->locked() unless $asset->canEditIfLocked; + + my $filename = $asset->filename; + + ##YUI specific datatable CSS + my ( $style, $url ) = $session->quick(qw(style url)); + + my $crop_js = qq( + + ); + + $style->setCss( $url->extras('yui/build/resize/assets/skins/sam/resize.css') ); + $style->setCss( $url->extras('yui/build/fonts/fonts-min.css') ); + $style->setCss( $url->extras('yui/build/imagecropper/assets/skins/sam/imagecropper.css') ); + $style->setScript( $url->extras('yui/build/yahoo-dom-event/yahoo-dom-event.js') ); + $style->setScript( $url->extras('yui/build/element/element-min.js') ); + $style->setScript( $url->extras('yui/build/dragdrop/dragdrop-min.js') ); + $style->setScript( $url->extras('yui/build/resize/resize-min.js') ); + $style->setScript( $url->extras('yui/build/imagecropper/imagecropper-min.js') ); + + my $i18n = WebGUI::International->new( $session, "Asset_Image" ); + my $f = $self->getForm( 'cropSave' ); + $f->addField( + "hidden", + -name => "degree", + -value => "0" + ); + $f->addField( + "hidden", + -name => "func", + -value => "crop" + ); + my ( $x, $y ) = $asset->getStorageLocation->getSizeInPixels($filename); + $f->addField( + "integer", + -label => $i18n->get('width'), + -hoverHelp => $i18n->get('new width description'), + -name => "Width", + -value => $x, + ); + $f->addField( + "integer", + -label => $i18n->get('height'), + -hoverHelp => $i18n->get('new height description'), + -name => "Height", + -value => $y, + ); + $f->addField( + "integer", + -label => $i18n->get('top'), + -hoverHelp => $i18n->get('new width description'), + -name => "Top", + -value => $x, + ); + $f->addField( + "integer", + -label => $i18n->get('left'), + -hoverHelp => $i18n->get('new height description'), + -name => "Left", + -value => $y, + ); + $f->addField( "submit", name => "send" ); + + my $image + = '
    '
+        . $filename
+        . '
    ' + . $crop_js; + + my $output = '

    ' . $i18n->get('crop image') . '

    ' . $f->toHtml . $image; + return $style->process( $output, "PBtmplBlankStyle000001" ); +} ## end sub www_crop + +#---------------------------------------------------------------------------- + +=head2 www_cropSave ( ) + +crop the image to the user's specifications and close the dialog + +=cut + +sub www_cropSave { + my ($self) = @_; + my $asset = $self->asset; + my $session = $self->session; + return $session->privilege->insufficient() unless $asset->canEdit; + return $session->privilege->locked() unless $asset->canEditIfLocked; + + my $tag = WebGUI::VersionTag->getWorking( $session ); + $asset = $asset->addRevision(); + delete $asset->{_storageLocation}; + $asset->getStorageLocation->crop( + $asset->filename, + $session->form->process("Width"), + $session->form->process("Height"), + $session->form->process("Top"), + $session->form->process("Left") + ); + $asset->generateThumbnail; + WebGUI::VersionTag->autoCommitWorkingIfEnabled($session, { allowComments => 0 }); + + # We're in admin mode, close the dialog + my $helper = { message => 'Image cropped', }; + my $text = ''; + + $self->session->output->print( $text, 1 ); # skipMacros +} ## end sub www_cropSave + +1; diff --git a/lib/WebGUI/AssetHelper/Image/Resize.pm b/lib/WebGUI/AssetHelper/Image/Resize.pm new file mode 100644 index 000000000..0b832fa10 --- /dev/null +++ b/lib/WebGUI/AssetHelper/Image/Resize.pm @@ -0,0 +1,178 @@ +package WebGUI::AssetHelper::Image::Resize; + +use strict; +use warnings; + +use Moose; +extends 'WebGUI::AssetHelper'; + +#------------------------------------------------------------------- + +=head2 process ( ) + +Open a dialog to resize the image + +=cut + +sub process { + my ( $self ) = @_; + my $asset = $self->asset; + my $session = $self->session; + + my $i18n = WebGUI::International->new($session, 'WebGUI'); + if (! $asset->canEdit) { + return { error => $i18n->get('38'), }; + } + elsif ( ! $asset->canEditIfLocked ) { + return { error => $i18n->get('asset locked') }; + } + + return { + openDialog => $self->getUrl( 'resize' ) + }; +} + +#------------------------------------------------------------------- + +=head2 www_resize + +Displays a form for the user to resize this image. + +=cut + +sub www_resize { + my ( $self ) = @_; + my $asset = $self->asset; + my $session = $self->session; + return $session->privilege->insufficient() unless $asset->canEdit; + return $session->privilege->locked() unless $asset->canEditIfLocked; + + my ( $x, $y ) = $asset->getStorageLocation->getSizeInPixels( $asset->filename ); + + ##YUI specific datatable CSS + my ( $style, $url ) = $session->quick(qw(style url)); + + $style->setCss( $url->extras('yui/build/fonts/fonts-min.css') ); + $style->setCss( $url->extras('yui/build/resize/assets/skins/sam/resize.css') ); + $style->setScript( $url->extras('yui/build/yahoo-dom-event/yahoo-dom-event.js') ); + $style->setScript( $url->extras('yui/build/element/element-min.js') ); + $style->setScript( $url->extras('yui/build/dragdrop/dragdrop-min.js') ); + $style->setScript( $url->extras('yui/build/resize/resize-min.js') ); + $style->setScript( $url->extras('yui/build/animation/animation-min.js') ); + + my $resize_js = qq( + + ); + + my $i18n = WebGUI::International->new( $session, "Asset_Image" ); + my $f = $self->getForm( 'resizeSave' ); + $f->addField( + "readOnly", + label => $i18n->get('image size'), + hoverHelp => $i18n->get('image size description'), + value => $x . ' x ' . $y, + ); + $f->addField( + "integer", + label => $i18n->get('new width'), + hoverHelp => $i18n->get('new width description'), + name => "newWidth", + value => $x, + ); + $f->addField( + "integer", + label => $i18n->get('new height'), + hoverHelp => $i18n->get('new height description'), + name => "newHeight", + value => $y, + ); + $f->addField( "submit", name => "send" ); + my $image + = '
    '
+        . $asset->filename
+        . '
    ' + . $resize_js; + my $output = '

    ' . $i18n->get('resize image') . '

    ' . $f->toHtml . $image; + return $style->process( $output, "PBtmplBlankStyle000001" ); +} ## end sub www_resize + +#---------------------------------------------------------------------------- + +=head2 www_resizeSave ( ) + +Resize the image to the user's specifications and close the dialog + +=cut + +sub www_resizeSave { + my ( $self ) = @_; + my $asset = $self->asset; + my $session = $self->session; + return $session->privilege->insufficient() unless $asset->canEdit; + return $session->privilege->locked() unless $asset->canEditIfLocked; + my $tag = WebGUI::VersionTag->getWorking($session); + $asset = $asset->addRevision(); + delete $asset->{_storageLocation}; + $asset->getStorageLocation->resize( + $asset->filename, + $session->form->process("newWidth"), + $session->form->process("newHeight") + ); + $asset->setSize( $asset->getStorageLocation->getFileSize( $asset->filename ) ); + $asset->generateThumbnail; + WebGUI::VersionTag->autoCommitWorkingIfEnabled( $session, { allowComments => 0 } ); + + # We're in admin mode, close the dialog + my $helper = { + message => 'Image Resized', + }; + my $text = ''; + + $self->session->output->print( $text, 1); # skipMacros +} + +1; diff --git a/lib/WebGUI/AssetHelper/Image/Rotate.pm b/lib/WebGUI/AssetHelper/Image/Rotate.pm new file mode 100644 index 000000000..e60bc0e57 --- /dev/null +++ b/lib/WebGUI/AssetHelper/Image/Rotate.pm @@ -0,0 +1,119 @@ +package WebGUI::AssetHelper::Image::Rotate; + +use strict; +use warnings; + +use Moose; +extends 'WebGUI::AssetHelper'; + +#------------------------------------------------------------------- + +=head2 process ( ) + +Open a dialog to rotate the image + +=cut + +sub process { + my ( $self ) = @_; + my $asset = $self->asset; + my $session = $self->session; + + my $i18n = WebGUI::International->new($session, 'WebGUI'); + if (! $asset->canEdit) { + return { error => $i18n->get('38'), }; + } + elsif ( ! $asset->canEditIfLocked ) { + return { error => $i18n->get('asset locked') }; + } + + return { + openDialog => $self->getUrl( 'rotate' ) + }; +} + +#------------------------------------------------------------------- + +=head2 www_rotate + +Displays a form for the user to rotate this image. + +=cut + +sub www_rotate { + my ( $self ) = @_; + my $asset = $self->asset; + my $session = $self->session; + return $session->privilege->insufficient() unless $asset->canEdit; + return $session->privilege->locked() unless $asset->canEditIfLocked; + + ##YUI specific datatable CSS + my ($style, $url) = $session->quick(qw(style url)); + + my $img_file = $asset->filename; + my $img_name = $asset->getStorageLocation->getUrl($img_file); + my $image = '
    '.$img_name.'
    '; + + my $i18n = WebGUI::International->new($session,"Asset_Image"); + my $f = $self->getForm( 'rotateSave' ); + $f->addField( "button", + value=>"Left", + extras=>qq{onclick="var deg = document.getElementById('Rotate_formId').value; deg = parseInt(deg) + 90; document.getElementById('Rotate_formId').value = deg;"}, + ); + $f->addField( "button", + value=>"Right", + extras=>qq{onclick="var deg = document.getElementById('Rotate_formId').value; deg = parseInt(deg) - 90; document.getElementById('Rotate_formId').value = deg;"}, + ); + $f->addField( "integer", + label=>$i18n->get('degree'), + name=>"Rotate", + value=>0, + ); + $f->addField( "submit", name => "send" ); + + my $output = '

    ' . $i18n->get("rotate image") . '

    ' . $f->toHtml . $image; + return $style->process( $output, "PBtmplBlankStyle000001" ); +} ## end sub www_rotate + +#---------------------------------------------------------------------------- + +=head2 www_rotateSave ( ) + +Rotate the image to the user's specifications and close the dialog + +=cut + +sub www_rotateSave { + my ( $self ) = @_; + my $asset = $self->asset; + my $session = $self->session; + return $session->privilege->insufficient() unless $asset->canEdit; + return $session->privilege->locked() unless $asset->canEditIfLocked; + + my $tag = WebGUI::VersionTag->getWorking( $session ); + $asset = $asset->addRevision(); + delete $asset->{_storageLocation}; + $asset->getStorageLocation->rotate($asset->filename,$session->form->process("Rotate")); + $asset->setSize($asset->getStorageLocation->getFileSize($asset->filename)); + $asset->generateThumbnail; + WebGUI::VersionTag->autoCommitWorkingIfEnabled($session, { allowComments => 0 }); + + # We're in admin mode, close the dialog + my $helper = { + message => 'Image Rotated', + }; + my $text = ''; + + $self->session->output->print( $text, 1); # skipMacros +} + +1; diff --git a/lib/WebGUI/AssetHelper/Lock.pm b/lib/WebGUI/AssetHelper/Lock.pm new file mode 100644 index 000000000..4bdbf76f2 --- /dev/null +++ b/lib/WebGUI/AssetHelper/Lock.pm @@ -0,0 +1,61 @@ +package WebGUI::AssetHelper::Lock; + +use strict; +use WebGUI::International; +use base qw/WebGUI::AssetHelper/; + +=head1 LEGAL + + ------------------------------------------------------------------- + WebGUI is Copyright 2001-2012 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 + ------------------------------------------------------------------- + +=head1 NAME + +Package WebGUI::AssetHelper::Lock + +=head1 DESCRIPTION + +Puts an edit lock on an Asset. + +=head1 METHODS + +These methods are available from this class: + +=cut + +#------------------------------------------------------------------- + +=head2 process () + +Locks the asset with a version tag. If the user cannot edit the asset, or the asset is +already locked, it returns an error message. + +=cut + +sub process { + my ($self) = @_; + my $asset = $self->asset; + my $session = $self->session; + + my $i18n = WebGUI::International->new($session, 'Asset'); + if (! $asset->canEdit) { + return { error => $i18n->get('38', 'WebGUI'), }; + } + elsif ( $asset->isLocked ) { + return { error => sprintf $i18n->get('already locked'), $asset->getTitle}; + } + + $asset->addRevision; + return { + message => sprintf($i18n->get('locked asset'), $asset->getTitle), + }; +} + +1; diff --git a/lib/WebGUI/AssetHelper/Product/ExportCSV.pm b/lib/WebGUI/AssetHelper/Product/ExportCSV.pm new file mode 100644 index 000000000..afc088dca --- /dev/null +++ b/lib/WebGUI/AssetHelper/Product/ExportCSV.pm @@ -0,0 +1,95 @@ +package WebGUI::AssetHelper::Product::ExportCSV; + +use Moose; +extends 'WebGUI::AssetHelper'; + +use JSON; +use WebGUI::Asset::Sku::Product; +use WebGUI::Fork; +use WebGUI::Text; +use WebGUI::Asset; +use WebGUI::Storage; + +#------------------------------------------------------------------- + +=head2 process ( ) + +Fork the copy operation + +=cut + +sub process { + my ($self) = @_; + my $asset = $self->asset; + my $session = $self->session; + + # Fork the export. Forking makes sure it won't get interrupted + my $fork = WebGUI::Fork->start( + $session, blessed( $self ), 'exportProducts', + ); + + return { + forkId => $fork->getId, + }; +} + +#------------------------------------------------------------------- + +=head2 exportProducts ( ) + +Export all products from the WebGUI system in a CSV file. For details +about the file format, see WebGUI::AssetHelper::Product::ImportCSV + +Returns a temporary WebGUI::Storage object containing the file. The +file will be named siteProductData.csv. + +=cut + +sub exportProducts { + my ($process, $args) = @_; + my $session = $process->session; + + # Get all the product IDs + # Not using getIsa so I can have the number to put into the progress bar + # This should be perhaps genericized and placed into WebGUI::Asset + my $tableName = $session->db->dbh->quote_identifier( WebGUI::Asset::Sku::Product->tableName ); + my $productIds = $session->db->buildArrayRef( + "SELECT assetId FROM asset JOIN assetData USING (assetId) JOIN $tableName USING (assetId, revisionDate) WHERE status=? OR status=? GROUP BY (assetId) HAVING MAX(revisionDate)", + ['approved','archived'], + ); + + # Preparing to dispense product + my $status = { + message => 'Dispensing product...', + total => scalar @{$productIds}, + finished => 0, + }; + $process->update( sub { JSON->new->encode( $status ) } ); + + # Dispensing product + my @columns = qw{varSku shortdescription price weight quantity}; + my $productData = WebGUI::Text::joinCSV(qw{mastersku title}, @columns) . "\n"; + @columns = map { $_ eq 'shortdescription' ? 'shortdesc' : $_ } @columns; + for my $productId ( @$productIds ) { + my $product = WebGUI::Asset->newById( $session, $productId ); + my $mastersku = $product->sku; + my $title = $product->getTitle; + my $collateri = $product->getAllCollateral('variantsJSON'); + foreach my $collateral (@{ $collateri }) { + my @productFields = @{ $collateral }{ @columns }; + $productData .= WebGUI::Text::joinCSV($mastersku, $title, @productFields); + $productData .= "\n"; + } + $status->{finished}++; + $process->update( sub { JSON->new->encode( $status ) } ); + } + my $storage = WebGUI::Storage->createTemp($session); + $storage->addFileFromScalar('siteProductData.csv', $productData); + + # Are you still there? + $status->{redirect} = $storage->getUrl( 'siteProductData.csv' ); + $process->update( sub { JSON->new->encode( $status ) } ); + $session->log->info( "Products exported to " . $status->{redirect} ); +} + +1; diff --git a/lib/WebGUI/AssetHelper/Product/ImportCSV.pm b/lib/WebGUI/AssetHelper/Product/ImportCSV.pm new file mode 100644 index 000000000..edfea3647 --- /dev/null +++ b/lib/WebGUI/AssetHelper/Product/ImportCSV.pm @@ -0,0 +1,272 @@ +package WebGUI::AssetHelper::Product::ImportCSV; + +use Moose; +extends 'WebGUI::AssetHelper'; + +use PerlIO::eol; +use JSON; +use WebGUI::Exception; +use WebGUI::Fork; +use WebGUI::Text; +use WebGUI::Storage; +use WebGUI::International; + +#------------------------------------------------------------------- + +=head2 process ( ) + +Display a dialog to import products + +=cut + +sub process { + my ($self) = @_; + my $asset = $self->asset; + my $session = $self->session; + + return { + openDialog => $self->getUrl( 'importProducts' ), + }; +} + +#------------------------------------------------------------------- + +=head2 importProducts ( ) + +Import products into the WebGUI system. If the master sku of a product +exists in the system, it will be updated. If master skus do not exist, +they will be added. + +The first line of the file should contain only the name of the columns, +in any order. It may not contain comments. + +These are the column names, each is required: + +=over 4 + +=item * + +mastersku + +=item * + +varsku + +=item * + +title + +=item * + +shortdescription + +=item * + +price + +=item * + +weight + +=item * + +quantity + +=back + +The following lines will contain product information. Blank +lines and anything following a '#' sign will be ignored from +the second line of the file, on to the end. + +Returns 1 if the import has taken place. This is to help you know +if old data has been deleted and new has been inserted. + +=cut + +sub importProducts { + my ( $process, $args ) = @_; + $args ||= {}; + my $session = $process->session; + my $parent = WebGUI::Asset->newById( $session, $args->{assetId} ); + my $filePath = $args->{filePath}; + WebGUI::Error::InvalidParam->throw(error => q{Must provide the path to a file}) + unless $filePath; + WebGUI::Error::InvalidFile->throw(error => qq{File could not be found}, brokenFile => $filePath) + unless -e $filePath; + WebGUI::Error::InvalidFile->throw(error => qq{File is not readable}, brokenFile => $filePath) + unless -r $filePath; + local $/ = "\x0A"; # Fork alters this!!! + open my $table, '<:raw:eol(CRLF)', $filePath or + WebGUI::Error->throw(error => qq{Unable to open $filePath for reading: $!\n}); + + # Read in the data + my $headers; + $headers = <$table>; + $session->log->info( "Headers: " . $headers ); + chomp $headers; + $headers =~ tr/\r//d; + $headers =~ s/\bsku\b/varSku/; + my @headers = WebGUI::Text::splitCSV($headers); + unless ( (join(q{-}, sort @headers) eq 'mastersku-price-quantity-shortdescription-title-varSku-weight') + and (scalar @headers == 7) ) { + $session->log->error( "Bad header found in CSV file ($filePath): $headers -- " . join ", ", sort @headers ); + WebGUI::Error::InvalidFile->throw(error => qq{Bad header found in the CSV file}, brokenFile => $filePath); + } + + my @productData = (); + my $line = 1; + while (my $productRow = <$table>) { + $session->log->info( "Product: " . $productRow ); + chomp $productRow; + $productRow =~ tr/\r//d; + $productRow =~ s/\s*#.+$//; + next unless $productRow; + local $_; + my @productRow = WebGUI::Text::splitCSV($productRow); + WebGUI::Error::InvalidFile->throw(error => qq{Error found in the CSV file}, brokenFile => $filePath, brokenLine => $line) + unless scalar @productRow == 7; + push @productData, [ @productRow ]; + } + + if ( @productData == 0 ) { + $session->log->warn("No products to import"); + $process->update( sub { JSON->new->encode( { message => 'No products' } ) } ); + $process->finish; + return; + } + + # Preparing to load product + my $status = { + message => 'Loading product...', + total => scalar @productData, + finished => 0, + }; + $process->update( sub { JSON->new->encode( $status ) } ); + + ##Okay, if we got this far, then the data looks fine. + my $fetchProductId = $session->db->prepare('select p.assetId from Product as p join sku as s on p.assetId=s.assetId and p.revisionDate=s.revisionDate where s.sku=? order by p.revisionDate DESC limit 1'); + @headers = map { $_ eq 'shortdescription' ? 'shortdesc' : $_ } @headers; + my @collateralFields = grep { $_ ne 'title' and $_ ne 'mastersku' } @headers; + PRODUCT: foreach my $productRow (@productData) { + my %productRow; + ##Order the data according to the headers, in whatever order they exist. + @productRow{ @headers } = @{ $productRow }; + $productRow{price} =~ tr/0-9.//cd; + ##Isolate just the collateral from the other product information + my %productCollateral; + @productCollateral{ @collateralFields } = @productRow{ @collateralFields }; + + $fetchProductId->execute([$productRow{mastersku}]); + my $asset = $fetchProductId->hashRef; + + ##If the assetId exists, we update data for it + if ($asset->{assetId}) { + $session->log->warn("Modifying an existing product: $productRow{sku} = $asset->{assetId}\n"); + my $assetId = $asset->{assetId}; + my $product = WebGUI::Asset->newPending($session, $assetId); + + ##Error handling for locked assets + if ($product->isLocked) { + $session->log->warn("Product is locked"); + next PRODUCT if $product->isLocked; + } + + if ($productRow{title} ne $product->getTitle) { + $product->update({ + title => $productRow{title}, + menuTitle => $productRow{title}, + }); + } + my $collaterals = $product->getAllCollateral('variantsJSON'); + my $collateralSet = 0; + ROW: foreach my $collateral (@{ $collaterals }) { + next ROW unless $collateral->{varSku} eq $productRow{varSku}; + @{ $collateral}{ @collateralFields } = @productCollateral{ @collateralFields }; ##preserve the variant Id field, assign all others + $product->setCollateral('variantsJSON', 'variantId', $collateral->{variantId}, $collateral); + $collateralSet=1; + } + if (!$collateralSet) { + ##It must be a new variant + $product->setCollateral('variantsJSON', 'variantId', 'new', \%productCollateral); + } + } + else { + ##Insert a new product; + $session->log->warn("Making a new product: $productRow{sku}\n"); + my $newProduct = $parent->addChild({className => 'WebGUI::Asset::Sku::Product'}); + $newProduct->update({ + title => $productRow{title}, + menuTitle => $productRow{title}, + url => $productRow{title}, + sku => $productRow{mastersku}, + }); + $newProduct->setCollateral('variantsJSON', 'variantId', 'new', \%productCollateral); + $newProduct->commit; + } + + # Update our status + $status->{finished}++; + $process->update( sub { JSON->new->encode( $status ) } ); + } + + $process->finish; +} + +#----------------------------------------------------------------------------- + +=head2 www_importProducts ( ) + +Show the form to upload the CSV file + +=cut + +sub www_importProducts { + my $self = shift; + my $session = $self->session; + return $session->privilege->insufficient unless $self->asset->canEdit; + my $i18n = WebGUI::International->new( $session, 'Asset_Shelf' ); + + my $f = $self->getForm( 'importProductsSave' ); + $f->addField( 'file', name => 'importFile' ); + $f->addField( 'submit', name => 'send', value => $i18n->get('import') ); + + return $session->style->process( + '

    ' . $i18n->get('import') . '

    ' . $f->toHtml, + "PBtmplBlankStyle000001" + ); +} + +#----------------------------------------------------------------------------- + +=head2 www_importProductsSave ( ) + +Import the products from the CSV file in a forked process + +=cut + +sub www_importProductsSave { + my ( $self ) = @_; + my $session = $self->session; + return $session->privilege->insufficient unless $self->asset->canEdit; + + my $storage = WebGUI::Storage->create($session); + my $productFile = $storage->addFileFromFormPost( 'importFile_file', 1 ); + + # Fork the import + my $fork = WebGUI::Fork->start( + $session, blessed( $self ), 'importProducts', + { assetId => $self->asset->getId, filePath => $storage->getPath( $productFile ), }, + ); + + my $output = '' + ; + return $session->style->process( + $output, + "PBtmplBlankStyle000001" + ); +} + +1; diff --git a/lib/WebGUI/AssetHelper/UploadFiles.pm b/lib/WebGUI/AssetHelper/UploadFiles.pm new file mode 100644 index 000000000..d98ac29e6 --- /dev/null +++ b/lib/WebGUI/AssetHelper/UploadFiles.pm @@ -0,0 +1,248 @@ +package WebGUI::AssetHelper::UploadFiles; + +use strict; +use base qw/WebGUI::AssetHelper/; +use WebGUI::Form::File; +use WebGUI::TabForm; + +=head1 LEGAL + + ------------------------------------------------------------------- + WebGUI is Copyright 2001-2012 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 + ------------------------------------------------------------------- + +=head1 NAME + +Package WebGUI::AssetHelper::UploadFiles + +=head1 DESCRIPTION + +Creates multiple file assets from form uploads beneath the current asset. + +=head1 METHODS + +These methods are available from this class: + +=cut + +#------------------------------------------------------------------- + +=head2 process () + +Opens a new tab for displaying the form and the output for editing a branch. + +=cut + +sub process { + my ($self) = @_; + my $asset = $self->asset; + my $session = $self->session; + my $i18n = WebGUI::International->new($session, "Asset"); + if (! $asset->canEdit) { + return { + error => $i18n->get('38', 'WebGUI'), + } + } + + return { + openDialog => $self->getUrl( 'uploadFiles' ), + }; +} + +#------------------------------------------------------------------- + +=head2 www_uploadFiles ( ) + +Creates a tabform to edit the Asset Tree. If canEdit returns False, returns insufficient Privilege page. + +=cut + +sub www_uploadFiles { + my ($self) = @_; + my $asset = $self->asset; + my $session = $self->session; + my $i18n = WebGUI::International->new($session, 'Asset'); + my ( $style, $url ) = $session->quick( qw( style url ) ); + $style->setCss( $url->extras('hoverhelp.css')); + $style->setScript( $url->extras('yui/build/yahoo-dom-event/yahoo-dom-event.js') ); + $style->setScript( $url->extras('yui/build/container/container-min.js') ); + $style->setScript( $url->extras('hoverhelp.js') ); + $style->setRawHeadTags( <<'ENDHTML' ); + +ENDHTML + my $tabform = WebGUI::TabForm->new($session); + $tabform->hidden({name=>"op",value=>"assetHelper"}); + $tabform->hidden({name=>"helperId",value=>$self->id}); + $tabform->hidden({name=>"method",value=>"uploadFilesSave"}); + if ($session->config->get("enableSaveAndCommit")) { + $tabform->submitAppend(WebGUI::Form::submit($session, { + name => "saveAndCommit", + value => WebGUI::International->new($session, 'Asset')->get("save and commit"), + })); + } + my $prop_tab = $tabform->addTab("properties",$i18n->get("properties","Asset")); + my $sec_tab = $tabform->addTab("security",$i18n->get(107,"Asset"),6); + $prop_tab->yesNo( + name => "isHidden", + value => 1, + label => $i18n->get(886, 'Asset'), + hoverHelp => $i18n->get('886 description', 'Asset'), + uiLevel => 6, + ); + $prop_tab->yesNo( + name => "newWindow", + value => 0, + label => $i18n->get(940, 'Asset'), + hoverHelp => $i18n->get('940 description', 'Asset'), + uiLevel => 6, + ); + $prop_tab->file( + name => 'upload_files', + label => $i18n->get("upload files"), + hoverHelp => $i18n->get("upload files description"), + maxAttachments => 100, + ); + my $subtext; + if ($session->user->isAdmin) { + $subtext = $session->icon->manage('op=listUsers'); + } + else { + $subtext = ""; + } + my $clause; + if ($session->user->isAdmin) { + my $group = WebGUI::Group->new($session,4); + my $contentManagers = $group->getAllUsers(); + push (@$contentManagers, $session->user->userId); + $clause = "userId in (".$session->db->quoteAndJoin($contentManagers).")"; + } + else { + $clause = "userId=".$session->db->quote($asset->get("ownerUserId")); + } + my $users = $session->db->buildHashRef("select userId,username from users where $clause order by username"); + $sec_tab->selectBox( + name => "ownerUserId", + options => $users, + label => $i18n->get(108, 'Asset'), + hoverHelp => $i18n->get('108 description', 'Asset'), + value => [$asset->get("ownerUserId")], + subtext => $subtext, + uiLevel => 6, + ); + $sec_tab->group( + name => "groupIdView", + label => $i18n->get(872, 'Asset'), + hoverHelp => $i18n->get('872 description', 'Asset'), + value => [$asset->get("groupIdView")], + uiLevel => 6, + ); + $sec_tab->group( + name => "groupIdEdit", + label => $i18n->get(871, 'Asset'), + hoverHelp => $i18n->get('871 description', 'Asset'), + value => [$asset->get("groupIdEdit")], + excludeGroups => [1,7], + uiLevel => 6, + ); + + return $session->style->process( + '
    ' . $tabform->print . '
    ', + "PBtmpl0000000000000137" + ); +} + +#------------------------------------------------------------------- + +=head2 www_uploadFilesSave ( ) + +Process form output and create child File/Image assets as approriate. + +=cut + +sub www_uploadFilesSave { + my ($self) = @_; + my $asset = $self->asset; + my $session = $self->session; + return $session->privilege->insufficient() unless ($asset->canEdit && $session->user->isInGroup('4')); + if ($session->config("maximumAssets")) { + my ($count) = $session->db->quickArray("select count(*) from asset"); + my $i18n = WebGUI::International->new($session, "Asset"); + return $session->style->userStyle($i18n->get("over max assets")) if ($session->config("maximumAssets") <= $count); + } + + my $overrides = $session->config->get( "assets/" . $asset->get("className") . "/fields" ); + my $form = $session->form; + + ##Process the form data that is the same for every uploaded file. + my %asset_defaults = (); + foreach my $property_name ( $asset->getProperties ) { + my $property = $asset->meta->find_attribute_by_name($property_name); + next if $property->noFormPost; + + my $fieldType = $property->fieldType; + my $fieldOverrides = $overrides->{$property_name} || {}; + my $fieldHash = { + tab => "properties", + %{ $asset->getFormProperties($property_name) }, + %{$overrides}, + name => $property_name, + value => $asset->$property_name, + }; + + + # process the form element + my $defaultValue = $overrides->{defaultValue} // $asset->$property; + $asset_defaults{$property_name} = $form->process( $property_name, $fieldType, $defaultValue, $fieldHash ); + } ## end foreach my $property ( $asset...) + + ##This is a hack. File uploads should go through the WebGUI::Form::File API + my $tempFileStorageId = WebGUI::Form::File->new($session,{name => 'upload_files'})->getValue; + my $tempStorage = WebGUI::Storage->get($session, $tempFileStorageId); + + foreach my $filename (@{$tempStorage->getFiles}) { + my $selfName = $tempStorage->isImage($filename) + ? "WebGUI::Asset::File::Image" + :'WebGUI::Asset::File'; + + my %data = %asset_defaults; + + $data{className} = $selfName; + $data{filename} = $data{title} = $data{menuTitle} = $filename; + $data{templateId} = 'PBtmpl0000000000000024'; + if ($selfName eq "WebGUI::Asset::File::Image") { + $data{templateId} = 'PBtmpl0000000000000088'; + } + $data{url} = $asset->get('url').'/'.$filename; + + #Create the new asset + my $newAsset = $asset->addChild(\%data); + + #Get the current storage location + my $storage = $newAsset->getStorageLocation(); + $storage->addFileFromFilesystem($tempStorage->getPath($filename)); + $newAsset->applyConstraints; + + #Now remove the reference to the storeage location to prevent problems with different revisions. + delete $newAsset->{_storageLocation}; + } + $tempStorage->delete; + + if (WebGUI::VersionTag->autoCommitWorkingIfEnabled($session, { + override => scalar $session->form->process("saveAndCommit"), + allowComments => 1, + returnUrl => $asset->getUrl, + }) eq 'redirect') { + return undef; + }; + +} + +1; diff --git a/lib/WebGUI/AssetLineage.pm b/lib/WebGUI/AssetLineage.pm index 04ef89291..fca4ca7ce 100644 --- a/lib/WebGUI/AssetLineage.pm +++ b/lib/WebGUI/AssetLineage.pm @@ -3,7 +3,7 @@ package WebGUI::Asset; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -17,6 +17,7 @@ package WebGUI::Asset; use strict; use Carp qw( croak ); use Scalar::Util qw( weaken ); +use List::Util qw(first); =head1 NAME @@ -64,30 +65,43 @@ Please see the POD for L for a list of options. sub addChild { my $self = shift; + my $session = $self->session; my $properties = shift; - my $id = shift || $self->session->id->generate(); + my $id = shift || $session->id->generate(); my $now = shift || time(); my $options = shift; + # Check for valid parentage using validParent on child's class + WebGUI::Asset->loadModule($properties->{className}); + if (! $properties->{className}->validParent($session, $self)) { + $session->log->error( + sprintf 'Cannot add %s to %s (URL: %s)(ID: %s)', + $properties->{className}, + $self->className, + $self->url, + $self->getId, + ); + return undef; + } # Check if it is possible to add a child to this asset. If not add it as a sibling of this asset. - if (length($self->get("lineage")) >= 252) { - $self->session->errorHandler->warn('Tried to add child to asset "'.$self->getId.'" which is already on the deepest level. Adding it as a sibling instead.'); + if (length($self->lineage) >= 252) { + $session->log->warn('Tried to add child to asset "'.$self->getId.'" which is already on the deepest level. Adding it as a sibling instead.'); return $self->getParent->addChild($properties, $id, $now, $options); } - my $lineage = $self->get("lineage").$self->getNextChildRank; + + my $lineage = $self->lineage.$self->getNextChildRank; $self->{_hasChildren} = 1; - $self->session->db->beginTransaction; - $self->session->db->write("insert into asset (assetId, parentId, lineage, creationDate, createdBy, className, state) values (?,?,?,?,?,?,'published')", - [$id,$self->getId,$lineage,$now,$self->session->user->userId,$properties->{className}]); - $self->session->db->commit; - $properties->{assetId} = $id; + $session->db->beginTransaction; + $session->db->write("insert into asset (assetId, parentId, lineage, creationDate, createdBy, className, state) values (?,?,?,?,?,?,'published')", + [$id, $self->getId, $lineage, $now, $session->user->userId, $properties->{className}]); + $session->db->commit; + $properties->{assetId} = $id; $properties->{parentId} = $self->getId; - my $temp = WebGUI::Asset->newByPropertyHashRef($self->session,$properties) || croak "Couldn't create a new $properties->{className} asset!"; - # Do not set the parent here, since it could be stale and poison the child - #$temp->{_parent} = $self; + $properties->{state} = 'published'; + my $temp = WebGUI::Asset->newByPropertyHashRef($session, $properties) || croak "Couldn't create a new $properties->{className} asset!"; my $newAsset = $temp->addRevision($properties, $now, $options); $self->updateHistory("added child ".$id); - $self->session->http->setStatus(201,"Asset Creation Successful"); + $session->response->status(201); return $newAsset; } @@ -146,14 +160,16 @@ sub cascadeLineage { "UPDATE asset SET lineage=CONCAT(?,SUBSTRING(lineage,?)) WHERE lineage LIKE ?", [$newLineage, length($oldLineage) + 1, $oldLineage . '%'] ); - my $cache = WebGUI::Cache->new($self->session); if ($records > 20) { - $cache->flush; + $self->session->cache->clear; } else { my $descendants = $self->session->db->read("SELECT assetId FROM asset WHERE lineage LIKE ?", [$newLineage . '%']); while (my ($assetId, $lineage) = $descendants->array) { - $cache->deleteChunk(["asset",$assetId]); + my $asset = WebGUI::Asset->newById($self->session, $assetId); + if (defined $asset) { + $asset->purgeCache; + } } $descendants->finish; } @@ -181,7 +197,7 @@ sub demote { where parentId=? and state='published' and lineage>?",[$self->get('parentId'), $self->get('lineage')]); if (defined $sisterLineage) { $self->swapRank($sisterLineage, undef, $outputSub); - $self->{_properties}{lineage} = $sisterLineage; + $self->lineage($sisterLineage); return 1; } return 0; @@ -327,22 +343,20 @@ Returns the highest rank, top of the highest rank Asset under current Asset. =cut sub getFirstChild { - my $self = shift; + my $self = shift; my $child = $self->cacheChild('first'); unless ($child) { my $assetLineage = $self->session->stow->get("assetLineage"); - my $lineage = $assetLineage->{firstChild}{$self->getId}; + my $lineage = $assetLineage->{firstChild}{$self->getId}; unless ($lineage) { - ($lineage) = $self->session->db->quickArray("select min(asset.lineage) from asset,assetData where asset.parentId=? and asset.assetId=assetData.assetId and asset.state='published'",[$self->getId]); - if ($lineage && !$self->session->config->get("disableCache")) { + ($lineage) = $self->session->db->quickArray("select min(asset.lineage) from asset where asset.parentId=? and asset.state='published'",[$self->getId]); + if ($lineage) { $assetLineage->{firstChild}{$self->getId} = $lineage; $self->session->stow->set("assetLineage", $assetLineage); } } - if ($lineage) { - $child = WebGUI::Asset->newByLineage($self->session,$lineage); - $self->cacheChild(first => $child); - } + $child = eval { WebGUI::Asset->newByLineage($self->session,$lineage); }; + $self->cacheChild(first => $child); } return $child; } @@ -367,7 +381,7 @@ sub getLastChild { $assetLineage->{lastChild}{$self->getId} = $lineage; $self->session->stow->set("assetLineage", $assetLineage); } - $child = WebGUI::Asset->newByLineage($self->session,$lineage); + $child = eval { WebGUI::Asset->newByLineage($self->session,$lineage); }; $self->cacheChild(last => $child); } return $child; @@ -453,43 +467,49 @@ The maximum amount of entries to return =cut sub getLineage { - my $self = shift; - my $relatives = shift; - my $rules = shift; - my $lineage = $self->get("lineage"); + my $self = shift; + my $session = $self->session; + my $relatives = shift; + my $rules = shift; + my $lineage = $self->lineage; - my $sql = $self->getLineageSql($relatives,$rules); + my $sql = $self->getLineageSql($relatives, $rules); - my @lineage; - my %relativeCache; - my $sth = $self->session->db->read($sql); - while (my ($id, $class, $parentId, $version) = $sth->array) { + unless ($sql) { + return []; + } + + my @lineage; + my %relativeCache; + my $sth = $session->db->read($sql); + ASSET: while (my ($id, $class, $parentId, $version) = $sth->array) { # create whatever type of object was requested my $asset; if ($rules->{returnObjects}) { if ($self->getId eq $id) { # possibly save ourselves a hit to the database $asset = $self; } else { - $asset = WebGUI::Asset->new($self->session,$id, $class, $version); + $asset = WebGUI::Asset->newById($session, $id, $version); if (!defined $asset) { # won't catch everything, but it will help some if an asset blows up - $self->session->errorHandler->error("AssetLineage::getLineage - failed to instanciate asset with assetId $id, className $class, and revision $version"); - next; + $session->log->error("AssetLineage::getLineage - failed to instanciate asset with assetId $id, className $class, and revision $version"); + next ASSET; } } - } else { - $asset = $id; } + else { + $asset = $id; + } # since we have the relatives info now, why not cache it - if ($rules->{returnObjects}) { - $relativeCache{$id} = $asset; - if (my $parent = $relativeCache{$parentId}) { - $asset->{_parent} = $parent; - unless ($parent->cacheChild('first')) { - $parent->cacheChild(first => $asset); - } - $parent->cacheChild(last => $asset); - } - } + if ($rules->{returnObjects}) { + $relativeCache{$id} = $asset; + if (my $parent = $relativeCache{$parentId}) { + $asset->{_parent} = $parent; + unless ($parent->cacheChild('first')) { + $parent->cacheChild(first => $asset); + } + $parent->cacheChild(last => $asset); + } + } push(@lineage,$asset); } $sth->finish; @@ -519,8 +539,8 @@ sub getLineageIterator { my $assetInfo = $sth->hashRef; return if !$assetInfo; - my $asset = WebGUI::Asset->new( - $self->session, $assetInfo->{assetId}, $assetInfo->{className}, $assetInfo->{revisionDate} + my $asset = WebGUI::Asset->newById( + $self->session, $assetInfo->{assetId}, $assetInfo->{revisionDate} ); if (!$asset) { WebGUI::Error::ObjectNotFound->throw(id => $assetInfo->{assetId}); @@ -541,7 +561,7 @@ Returns the number of Asset members in an Asset's lineage. sub getLineageLength { my $self = shift; - return length($self->get("lineage"))/6; + return length($self->lineage)/6; } #------------------------------------------------------------------- @@ -620,36 +640,37 @@ The maximum amount of entries to return =cut sub getLineageSql { - my $self = shift; - my $relatives = shift; - my $rules = shift; - my $lineage = $self->get("lineage"); - my @whereModifiers; - # let's get those siblings - if (isIn("siblings",@{$relatives})) { - push(@whereModifiers, " (asset.parentId=".$self->session->db->quote($self->get("parentId"))." and asset.assetId<>".$self->session->db->quote($self->getId).")"); - } - # ancestors too - my @specificFamilyMembers = (); - if (isIn("ancestors",@{$relatives})) { - my $i = 1; - my @familyTree = ($lineage =~ /(.{6})/g); - while (pop(@familyTree)) { - push(@specificFamilyMembers,join("",@familyTree)) if (scalar(@familyTree)); - last if ($i >= $rules->{ancestorLimit} && exists $rules->{ancestorLimit}); - $i++; - } + my $self = shift; + my $db = $self->session->db; + my $relatives = shift; + my $rules = shift; + my $lineage = $self->lineage; + my @whereModifiers; + # let's get those siblings + if ("siblings" ~~ $relatives) { + push(@whereModifiers, " (asset.parentId=".$db->quote($self->parentId)." and asset.assetId<>".$db->quote($self->getId).")"); + } + # ancestors too + my @specificFamilyMembers = (); + if ("ancestors" ~~ $relatives) { + my $i = 1; + my @familyTree = ($lineage =~ /(.{6})/g); + while (pop(@familyTree)) { + push(@specificFamilyMembers,join("",@familyTree)) if (scalar(@familyTree)); + last if ($i >= $rules->{ancestorLimit} && exists $rules->{ancestorLimit}); + $i++; + } } # let's add ourself to the list - if (isIn("self",@{$relatives})) { - push(@specificFamilyMembers,$self->get("lineage")); + if ("self" ~~ $relatives) { + push(@specificFamilyMembers, $self->lineage); } if (scalar(@specificFamilyMembers) > 0) { - push(@whereModifiers,"(asset.lineage in (".$self->session->db->quoteAndJoin(\@specificFamilyMembers)."))"); + push(@whereModifiers,"(asset.lineage in (".$db->quoteAndJoin(\@specificFamilyMembers)."))"); } # we need to include descendants - if (isIn("descendants",@{$relatives})) { - my $mod = "(asset.lineage like ".$self->session->db->quote($lineage.'%')." and asset.lineage<>".$self->session->db->quote($lineage); + if ("descendants" ~~ $relatives) { + my $mod = "(asset.lineage like ".$db->quote($lineage.'_%'); if (exists $rules->{endingLineageLength}) { $mod .= " and length(asset.lineage) <= ".($rules->{endingLineageLength}*6); } @@ -657,18 +678,18 @@ sub getLineageSql { push(@whereModifiers,$mod); } # we need to include children - if (isIn("children",@{$relatives})) { - push(@whereModifiers,"(asset.parentId=".$self->session->db->quote($self->getId).")"); + if ("children" ~~ $relatives) { + push(@whereModifiers,"(asset.parentId=".$db->quote($self->getId).")"); } # now lets add in all of the siblings in every level between ourself and the asset we wish to pedigree - if (isIn("pedigree",@{$relatives}) && exists $rules->{assetToPedigree}) { - my $pedigreeLineage = $rules->{assetToPedigree}->get("lineage"); + if ("pedigree" ~~ $relatives && exists $rules->{assetToPedigree}) { + my $pedigreeLineage = $rules->{assetToPedigree}->lineage; if (substr($pedigreeLineage,0,length($lineage)) eq $lineage) { my @mods; my $length = $rules->{assetToPedigree}->getLineageLength; for (my $i = $length; $i > 0; $i--) { my $line = substr($pedigreeLineage,0,$i*6); - push(@mods,"( asset.lineage like ".$self->session->db->quote($line.'%')." and length(asset.lineage)=".(($i+1)*6).")"); + push(@mods,"( asset.lineage like ".$db->quote($line.'%')." and length(asset.lineage)=".(($i+1)*6).")"); last if ($self->getLineageLength == $i); } push(@whereModifiers, "(".join(" or ",@mods).")") if (scalar(@mods)); @@ -680,12 +701,11 @@ sub getLineageSql { my $className = $rules->{joinClass}; (my $module = $className . '.pm') =~ s{::|'}{/}g; if ( ! eval { require $module; 1 }) { - $self->session->errorHandler->fatal("Couldn't compile asset package: ".$className.". Root cause: ".$@) if ($@); + $self->session->log->fatal("Couldn't compile asset package: ".$className.". Root cause: ".$@) if ($@); } - foreach my $definition (@{$className->definition($self->session)}) { - unless ($definition->{tableName} eq "asset" || $definition->{tableName} eq "assetData") { - my $tableName = $definition->{tableName}; - $tables .= " left join $tableName on assetData.assetId=".$tableName.".assetId and assetData.revisionDate=".$tableName.".revisionDate"; + foreach my $table ($className->meta->get_tables) { + unless ($table eq "asset" || $table eq "assetData") { + $tables .= " left join $table on assetData.assetId=".$table.".assetId and assetData.revisionDate=".$table.".revisionDate"; } } } @@ -693,38 +713,38 @@ sub getLineageSql { my $where; ## custom states if (exists $rules->{statesToInclude}) { - $where = "asset.state in (".$self->session->db->quoteAndJoin($rules->{statesToInclude}).")"; + $where = "asset.state in (".$db->quoteAndJoin($rules->{statesToInclude}).")"; } else { $where = "asset.state='published'"; } my $statusCodes = $rules->{statusToInclude} || []; if($rules->{includeArchived}) { - push(@{$statusCodes},'archived') if(!WebGUI::Utility::isIn('archived',@{$statusCodes})); - push(@{$statusCodes},'approved') if(!WebGUI::Utility::isIn('approved',@{$statusCodes})); + push(@{$statusCodes},'archived') if(!'archived' ~~ $statusCodes); + push(@{$statusCodes},'approved') if(!'approved' ~~ $statusCodes); } my $status = "assetData.status='approved'"; if(scalar(@{$statusCodes})) { - $status = "assetData.status in (".$self->session->db->quoteAndJoin($statusCodes).")"; + $status = "assetData.status in (".$db->quoteAndJoin($statusCodes).")"; } - $where .= " and ($status or assetData.tagId=".$self->session->db->quote($self->session->scratch->get("versionTag")).")"; + $where .= " and ($status or assetData.tagId=".$db->quote($self->session->scratch->get("versionTag")).")"; ## class exclusions if (exists $rules->{excludeClasses}) { my @set; foreach my $className (@{$rules->{excludeClasses}}) { - push(@set,"asset.className not like ".$self->session->db->quote($className.'%')); + push(@set,"asset.className not like ".$db->quote($className.'%')); } $where .= ' and ('.join(" and ",@set).')'; } ## class inclusions if (exists $rules->{includeOnlyClasses}) { - $where .= ' and (asset.className in ('.$self->session->db->quoteAndJoin($rules->{includeOnlyClasses}).'))'; + $where .= ' and (asset.className in ('.$db->quoteAndJoin($rules->{includeOnlyClasses}).'))'; } ## isa if (exists $rules->{isa}) { - $where .= ' and (asset.className like '.$self->session->db->quote($rules->{isa}.'%').')'; + $where .= ' and (asset.className like '.$db->quote($rules->{isa}.'%').')'; } ## finish up our where clause if (!scalar(@whereModifiers)) { @@ -737,7 +757,7 @@ sub getLineageSql { } # based upon all available criteria, let's get some assets my $columns = "asset.assetId, asset.className, asset.parentId, assetData.revisionDate"; - $where .= " and assetData.revisionDate=(SELECT max(revisionDate) from assetData where assetData.assetId=asset.assetId and ($status or assetData.tagId=".$self->session->db->quote($self->session->scratch->get("versionTag")).")) "; + $where .= " and assetData.revisionDate=(SELECT max(revisionDate) from assetData where assetData.assetId=asset.assetId and ($status or assetData.tagId=".$db->quote($self->session->scratch->get("versionTag")).")) "; my $sortOrder = ($rules->{invertTree}) ? "asset.lineage desc" : "asset.lineage asc"; if (exists $rules->{orderByClause}) { $sortOrder = $rules->{orderByClause}; @@ -775,7 +795,7 @@ sub getNextChildRank { $rank = $self->getRank($lineage); # Increase rank to next step then add offset $rank += ( $inc_step - $rank % $inc_step ) + $inc_offset; - $self->session->errorHandler->fatal("Asset ".$self->getId." has too many children.") if ($rank >= 999999); # Each lineage area is only 6 digits + $self->session->log->fatal("Asset ".$self->getId." has too many children.") if ($rank >= 999999); # Each lineage area is only 6 digits } else { $rank = 1; @@ -798,7 +818,7 @@ sub getParent { return $self if ($self->getId eq "PBasset000000000000001"); unless ( $self->{_parent} ) { - $self->{_parent} = WebGUI::Asset->newByDynamicClass($self->session,$self->get("parentId")); + $self->{_parent} = eval { WebGUI::Asset->newById($self->session, $self->parentId); }; } return $self->{_parent}; @@ -839,7 +859,7 @@ Optional specified lineage. sub getRank { my $self = shift; - my $lineage = shift || $self->get("lineage"); + my $lineage = shift || $self->lineage; $lineage =~ m/(.{6})$/; my $rank = $1 - 0; # gets rid of preceeding 0s. return $rank; @@ -886,24 +906,20 @@ Lineage string. =cut sub newByLineage { - my $class = shift; - my $session = shift; - my $lineage = shift; + my $class = shift; + my $session = shift; + my $lineage = shift; my $assetLineage = $session->stow->get("assetLineage"); - my $id = $assetLineage->{$lineage}{id}; - $class = $assetLineage->{$lineage}{class}; - unless ($id && $class) { - ($id,$class) = $session->db->quickArray("select assetId, className from asset where lineage=?",[$lineage]); - if (!$id || !$class) { - $session->errorHandler->error("Couldn't instantiate asset from lineage: ".$lineage. ": class name or assetId missing"); - return undef; + my $id = $assetLineage->{$lineage}{id}; + unless ($id) { + ($id) = $session->db->quickArray("select assetId from asset where lineage=?",[$lineage]); + if (!$id) { + WebGUI::Error::InvalidParam->throw(error => "Cannot find lineage date for assetId", param => $id); } - return undef if !$id || !$class; $assetLineage->{$lineage}{id} = $id; - $assetLineage->{$lineage}{class} = $class; $session->stow->set("assetLineage",$assetLineage); } - return WebGUI::Asset->new($session, $id, $class); + return WebGUI::Asset->newById($session, $id); } @@ -929,7 +945,7 @@ sub promote { where parentId=? and state='published' and lineageget("parentId"), $self->get("lineage")]); if (defined $sisterLineage) { $self->swapRank($sisterLineage, undef, $outputSub); - $self->{_properties}{lineage} = $sisterLineage; + $self->lineage($sisterLineage); return 1; } return 0; @@ -952,10 +968,10 @@ sub setParent { my $self = shift; my $newParent = shift; return 0 unless (defined $newParent); # can't move it if a parent object doesn't exist - return 0 if ($newParent->getId eq $self->get("parentId")); # don't move it to where it already is + return 0 if ($newParent->getId eq $self->parentId); # don't move it to where it already is return 0 if ($newParent->getId eq $self->getId); # don't move it to itself - my $oldLineage = $self->get("lineage"); - my $lineage = $newParent->get("lineage").$newParent->getNextChildRank; + my $oldLineage = $self->lineage; + my $lineage = $newParent->lineage.$newParent->getNextChildRank; return 0 if ($lineage =~ m/^$oldLineage/); # can't move it to its own child $self->session->db->beginTransaction; $self->session->db->write("update asset set parentId=? where assetId=?", @@ -963,8 +979,8 @@ sub setParent { $self->cascadeLineage($lineage); $self->session->db->commit; $self->updateHistory("moved to parent ".$newParent->getId); - $self->{_properties}{lineage} = $lineage; - $self->{_properties}{parentId} = $newParent->getId; + $self->lineage($lineage); + $self->parentId($newParent->getId); $self->purgeCache; $self->{_parent} = $newParent; return 1; @@ -998,7 +1014,7 @@ sub setRank { my $reverse = ($newRank < $currentRank) ? 1 : 0; my $temp = substr($self->session->id->generate(),0,6); - my $previous = $self->get("lineage"); + my $previous = $self->lineage; $self->session->db->beginTransaction; $outputSub->('moving %s aside', $self->getTitle); $self->cascadeLineage($temp); @@ -1011,15 +1027,17 @@ sub setRank { next; } last unless $sibling; - if (isBetween($sibling->getRank, $newRank, $currentRank)) { + my $rank = $sibling->getRank; + if ($rank >= $newRank && $rank <= $currentRank + || $rank >= $currentRank && $rank <= $newRank) { $outputSub->('moving %s', $sibling->getTitle); $sibling->cascadeLineage($previous); - $previous = $sibling->get("lineage"); + $previous = $sibling->lineage; } } $outputSub->('moving %s back', $self->getTitle); $self->cascadeLineage($previous,$temp); - $self->{_properties}{lineage} = $previous; + $self->lineage($previous); $self->session->db->commit; $self->purgeCache; $self->updateHistory("changed rank"); @@ -1042,7 +1060,7 @@ no in the objects. sub swapRank { my $self = shift; my $second = shift; - my $first = shift || $self->get("lineage"); + my $first = shift || $self->lineage; my $outputSub = shift || sub {}; my $temp = substr($self->session->id->generate(),0,6); # need a temp in order to do the swap $self->session->db->beginTransaction; @@ -1057,6 +1075,27 @@ sub swapRank { } +#------------------------------------------------------------------- + +=head2 validParent ([$session, $asset]) + +Find out whether assets of this class can be children of the given asset. + +This is a class method. + +=head3 $asset + +The potential parent. If not passed, uses $session->asset; + +=cut + +sub validParent { + my $class = shift; + my $session = shift; + my $asset = shift || $session->asset || return 0; + return first { $asset->isa($_) } @{ $class->valid_parent_classes }; +} + #------------------------------------------------------------------- =head2 www_demote ( ) @@ -1099,82 +1138,5 @@ sub www_promote { } -#------------------------------------------------------------------- - -=head2 www_setParent ( ) - -Returns a www_manageAssets() method. Sets a new parent via the results of a form. If canEdit is False, returns an insufficient privileges page. - -=cut - -sub www_setParent { - my $self = shift; - return $self->session->privilege->insufficient() unless $self->canEdit; - my $newParent = WebGUI::Asset->newByDynamicClass($self->session->form->process("assetId")); - if (defined $newParent) { - my $success = $self->setParent($newParent); - return $self->session->privilege->insufficient() unless $success; - } - return $self->www_manageAssets(); - -} - -#------------------------------------------------------------------- - -=head2 www_setRank ( ) - -Returns a www_manageAssets() method. Sets a new rank via the results of a form. If canEdit is False, returns an insufficient privileges page. - -=cut - -sub www_setRank { - my $self = shift; - return $self->session->privilege->insufficient() unless $self->canEdit; - my $newRank = $self->session->form->process("rank"); - $self->setRank($newRank) if (defined $newRank); - $self->session->asset($self->getParent); - return $self->getParent->www_manageAssets(); -} - -#------------------------------------------------------------------- - -=head2 www_setRanks ( ) - -Utility method for the AssetManager. Reorders 1 pagefull of assets via rank. -AssetIds are passed in via the C form variable. - -If the current user cannot edit the current asset, or if a valid CSRF token -is not submitted with the form, it returns the insufficient privileges page. - -Returns the user to the manage assets screen. - -=cut - -sub www_setRanks { - my $self = shift; - my $session = $self->session; - return $session->privilege->insufficient() unless $session->asset->canEdit && $session->form->validToken; - my $i18n = WebGUI::International->new($session, 'Asset'); - my $pb = WebGUI::ProgressBar->new($session); - my $form = $session->form; - - $pb->start($i18n->get('Set Rank'), $session->url->extras('adminConsole/assets.gif')); - my @assetIds = $form->get( 'assetId' ); - ASSET: for my $assetId ( @assetIds ) { - my $asset = WebGUI::Asset->newByDynamicClass( $session, $assetId ); - next ASSET unless $asset; - my $rank = $form->get( $assetId . '_rank' ); - next ASSET unless $rank; # There's no such thing as zero - - $asset->setRank( $rank, sub { $pb->update(sprintf $i18n->get(shift), shift); } ); - } - - $pb->finish($session->asset->getManagerUrl); - return "redirect"; - #return $www_manageAssets(); -} - - - 1; diff --git a/lib/WebGUI/AssetMetaData.pm b/lib/WebGUI/AssetMetaData.pm index e408c33f4..b90a406fd 100644 --- a/lib/WebGUI/AssetMetaData.pm +++ b/lib/WebGUI/AssetMetaData.pm @@ -3,7 +3,7 @@ package WebGUI::Asset; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -348,47 +348,52 @@ sub www_editMetaDataField { $fieldInfo = $self->getMetaDataFields($self->session->form->process("fid")); } my $fid = $self->session->form->process("fid") || "new"; - my $f = WebGUI::HTMLForm->new($self->session,-action=>$self->getUrl); - $f->hidden( - -name => "func", - -value => "editMetaDataFieldSave" + my $f = WebGUI::FormBuilder->new($self->session,action=>$self->getUrl); + $f->addField( "hidden", + name => "func", + value => "editMetaDataFieldSave" ); - $f->hidden( - -name => "fid", - -value => $fid + $f->addField( "hidden", + name => "fid", + value => $fid ); - $f->readOnly( - -value=>$fid, - -label=>$i18n->get('Field Id'), + $f->addField( "readOnly", + name => 'fid_display', + value=>$fid, + label=>$i18n->get('Field Id'), ); - $f->text( - -name=>"fieldName", - -label=>$i18n->get('Field name'), - -hoverHelp=>$i18n->get('Field Name description'), - -value=>$fieldInfo->{fieldName} + $f->addField( "text", + name=>"fieldName", + label=>$i18n->get('Field name'), + hoverHelp=>$i18n->get('Field Name description'), + value=>$fieldInfo->{fieldName} ); - $f->textarea( - -name=>"description", - -label=>$i18n->get(85), - -hoverHelp=>$i18n->get('Metadata Description description'), - -value=>$fieldInfo->{description} + $f->addField( "textarea", + name=>"description", + label=>$i18n->get(85), + hoverHelp=>$i18n->get('Metadata Description description'), + value=>$fieldInfo->{description} ); - $f->fieldType( - -name=>"fieldType", - -label=>$i18n->get(486), - -hoverHelp=>$i18n->get('Data Type description'), - -value=>$fieldInfo->{fieldType} || "text", - -types=> [ qw /text integer yesNo selectBox radioList checkList date/ ] + $f->addField( "fieldType", + name=>"fieldType", + label=>$i18n->get(486), + hoverHelp=>$i18n->get('Data Type description'), + value=>$fieldInfo->{fieldType} || "text", + types=> [ qw /text integer yesNo selectBox radioList checkList date/ ] ); - my $default = WebGUI::Asset->definition($self->session)->[0]->{assetName}; + my $default = ref WebGUI::Asset->assetName eq 'ARRAY' + ? WebGUI::International->new( $self->session )->get( @{WebGUI::Asset->assetName} ) + : WebGUI::Asset->assetName; my %classOptions; # usedNames maps a name to a class. If a name exists there, it has been # used. If it maps to a classname, that classname needs to be renamed. my %usedNames; for my $class (WebGUI::Pluggable::findAndLoad('WebGUI::Asset')) { next unless $class->isa('WebGUI::Asset'); - my $name = $class->definition($self->session)->[0]->{assetName}; + my $name = ref $class->assetName eq 'ARRAY' + ? WebGUI::International->new( $self->session )->get( @{$class->assetName} ) + : $class->assetName; next unless $name; # abstract classes (e.g. wobject) don't have names # We don't want things named "Asset". @@ -406,7 +411,7 @@ sub www_editMetaDataField { $classOptions{$class} = $name; } - $f->selectList( + $f->addField( "selectList", name => 'classes', label => $i18n->get('Allowed Classes'), hoverHelp => $i18n->get('Allowed Classes hoverHelp'), @@ -418,20 +423,20 @@ sub www_editMetaDataField { sortByValue => 1, ); - $f->textarea( - -name=>"possibleValues", - -label=>$i18n->get(487), - -hoverHelp=>$i18n->get('Possible Values description'), - -value=>$fieldInfo->{possibleValues} + $f->addField( "textarea", + name=>"possibleValues", + label=>$i18n->get(487), + hoverHelp=>$i18n->get('Possible Values description'), + value=>$fieldInfo->{possibleValues} ); - $f->textarea( - -name=>"defaultValue", - -label=>$i18n->get('default value'), - -hoverHelp=>$i18n->get('default value description'), - -value=>$fieldInfo->{defaultValue} + $f->addField( "textarea", + name=>"defaultValue", + label=>$i18n->get('default value'), + hoverHelp=>$i18n->get('default value description'), + value=>$fieldInfo->{defaultValue} ); - $f->submit(); - return $ac->render($f->print, $i18n->get('Edit Metadata')); + $f->addField( "submit", name => "send" ); + return '

    ' . $i18n->get('Edit Metadata') . '

    ' . $f->toHtml; } #------------------------------------------------------------------- diff --git a/lib/WebGUI/AssetPackage.pm b/lib/WebGUI/AssetPackage.pm index 713d61bae..956ad31e2 100644 --- a/lib/WebGUI/AssetPackage.pm +++ b/lib/WebGUI/AssetPackage.pm @@ -3,7 +3,7 @@ package WebGUI::Asset; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -48,6 +48,7 @@ Converts all the properties of this asset into a hash reference and then returns sub exportAssetData { my $self = shift; my %data = %{$self->get}; + delete $data{'session'}; my %hash = ( properties => \%data, storage=>[] ); return \%hash; } @@ -86,7 +87,7 @@ sub exportPackage { #------------------------------------------------------------------- -=head2 getPackageList ( ) +=head2 WebGUI::Asset::getPackageList ( session ) Returns an array of all assets that the user can view and edit that are packages. The array is sorted by the title of the assets. @@ -94,13 +95,15 @@ is sorted by the title of the assets. =cut sub getPackageList { - my $self = shift; - my $session = $self->session; + my $session = shift; + if ( $session->isa( 'WebGUI::Asset' ) ) { + $session = $session->session; + } my $db = $session->db; my @packageIds = $db->buildArray("select distinct assetId from assetData where isPackage=1"); my @assets; ID: foreach my $id (@packageIds) { - my $asset = WebGUI::Asset->newByDynamicClass($session, $id); + my $asset = WebGUI::Asset->newById($session, $id); next ID unless defined $asset; next ID unless $asset->get('isPackage'); next ID unless ($asset->get('status') eq 'approved' || $asset->get('tagId') eq $session->scratch->get("versionTag")); @@ -148,18 +151,17 @@ Set the isDefault flag on the incoming asset. Really only works on templates. sub importAssetData { my $self = shift; + my $session = $self->session; my $data = shift; my $options = shift || {}; - my $error = $self->session->errorHandler; + my $log = $session->log; my $id = $data->{properties}{assetId}; my $class = $data->{properties}{className}; my $version = $options->{overwriteLatest} ? time : $data->{properties}{revisionDate}; # Load the class - WebGUI::Asset->loadModule( $self->session, $class ); + WebGUI::Asset->loadModule( $class ); - my $asset; - my $revisionExists = WebGUI::Asset->assetExists($self->session, $id, $class, $version); my %properties = %{ $data->{properties} }; if ($options->{inheritPermissions}) { delete $properties{ownerUserId}; @@ -172,35 +174,43 @@ sub importAssetData { if ($options->{setDefaultTemplate}) { $properties{isDefault} = 1; } - if ($revisionExists) { # update an existing revision - $asset = WebGUI::Asset->new($self->session, $id, $class, $version); + if ($options->{clearPackageFlag}) { + $properties{isPackage} = 0; + } + if ($options->{setDefaultTemplate}) { + $properties{isDefault} = 1; + } + + my $asset = eval { $class->new($session, $id, $version); }; + + if (! Exception::Class->caught()) { # update an existing revision ##If the existing asset is not committed, do not allow the new package data to ##change the version control status. if ( $asset->get('status') eq 'pending' && $properties{'status'} ne 'pending' ) { delete $properties{status}; } - $error->info("Updating an existing revision of asset $id"); + $log->info("Updating an existing revision of asset $id"); $asset->update(\%properties); ##Pending assets are assigned a new version tag if ($properties{status} eq 'pending') { - $self->session->db->write( + $session->db->write( 'update assetData set tagId=? where assetId=? and revisionDate=?', - [WebGUI::VersionTag->getWorking($self->session)->getId, $properties{assetId}, $properties{revisionDate},] + [WebGUI::VersionTag->getWorking($session)->getId, $properties{assetId}, $properties{revisionDate},] ); } } else { eval { - $asset = WebGUI::Asset->newPending($self->session, $id, $class); + $asset = WebGUI::Asset->newPending($session, $id); }; - if (defined $asset) { # create a new revision of an existing asset - $error->info("Creating a new revision of asset $id"); + if (! Exception::Class->caught()) { # create a new revision of an existing asset + $log->info("Creating a new revision of asset $id"); $asset = $asset->addRevision(\%properties, $version, {skipAutoCommitWorkflows => 1}); } else { # add an entirely new asset - $error->info("Adding $id that didn't previously exist."); + $log->info("Adding $id that didn't previously exist."); $asset = $self->addChild(\%properties, $id, $version, {skipAutoCommitWorkflows => 1}); } } @@ -253,12 +263,12 @@ sub importPackage { return undef if $storage->getErrorCount; my $package = undef; # The asset package - my $error = $self->session->errorHandler; + my $log = $self->session->log; # The debug output for long requests would be too long, and we'd have to # keep it all in memory. - $error->preventDebugOutput(); - $error->info("Importing package."); + $log->preventDebugOutput(); + $log->info("Importing package."); # Your parent is on this stack somewhere because we're going through these # assets depth-first. This way we only have to keep one branch in-memory @@ -268,20 +278,25 @@ sub importPackage { foreach my $file (sort(@{$decompressed->getFiles})) { next unless ($decompressed->getFileExtension($file) eq "json"); - $error->info("Found data file $file"); + $log->info("Found data file $file"); my $data = eval { $json->decode($decompressed->getFileContentsAsScalar($file)) }; if ($@ || $data->{properties}{assetId} eq "" || $data->{properties}{className} eq "" || $data->{properties}{revisionDate} eq "") { - $error->error("package corruption: ".$@) if ($@); + $log->error("package corruption: ".$@) if ($@); return "corrupt"; } - $error->info("Data file $file is valid and represents asset ".$data->{properties}{assetId}); + $log->info("Data file $file is valid and represents asset ".$data->{properties}{assetId}); foreach my $storageId (@{$data->{storage}}) { my $assetStorage = WebGUI::Storage->get($self->session, $storageId); $decompressed->untar($storageId.".storage", $assetStorage); } + if ( $options->{tagId} ) { + $data->{properties}{tagId} = $options->{tagId}; + $data->{properties}{status} = "pending"; + } + my $parentId = $data->{properties}->{parentId}; my $asset; while ($asset = pop(@stack)) { @@ -315,15 +330,16 @@ current asset. =cut sub www_deployPackage { - my $self = shift; + my $self = shift; + my $session = $self->session; # Must have edit rights to the asset deploying the package. Also, must be a Content Manager. # This protects against non content managers deploying packages using a post or similar trickery. - return $self->session->privilege->insufficient() unless ($self->canEdit && $self->session->user->isInGroup(4)); - my $packageMasterAssetId = $self->session->form->param("assetId"); + return $session->privilege->insufficient() unless ($self->canEdit && $session->user->isInGroup(4)); + my $packageMasterAssetId = $session->form->param("assetId"); if (defined $packageMasterAssetId) { - my $packageMasterAsset = WebGUI::Asset->newByDynamicClass($self->session, $packageMasterAssetId); - unless ($packageMasterAsset->getValue('isPackage')) { #only deploy packages - $self->session->errorHandler->security('deploy an asset as a package which was not set as a package.'); + my $packageMasterAsset = WebGUI::Asset->newById($session, $packageMasterAssetId); + unless ($packageMasterAsset->get('isPackage')) { #only deploy packages + $session->log->security('deploy an asset as a package which was not set as a package.'); return undef; } my $masterLineage = $packageMasterAsset->get("lineage"); @@ -333,16 +349,16 @@ sub www_deployPackage { $deployedTreeMaster->update({isPackage=>0, styleTemplateId=>$self->get("styleTemplateId")}); } } - if (WebGUI::VersionTag->autoCommitWorkingIfEnabled($self->session, { + if (WebGUI::VersionTag->autoCommitWorkingIfEnabled($session, { allowComments => 1, returnUrl => $self->getUrl, }) eq 'redirect') { return undef; }; - if ($self->session->form->param("proceed") eq "manageAssets") { - $self->session->http->setRedirect($self->getManagerUrl); + if ($session->form->param("proceed") eq "manageAssets") { + $session->response->setRedirect($self->getManagerUrl); } else { - $self->session->http->setRedirect($self->getUrl()); + $session->response->setRedirect($self->getUrl()); } return undef; } @@ -360,7 +376,7 @@ sub www_exportPackage { return $self->session->privilege->insufficient() unless ($self->canEdit); my $storage = $self->exportPackage; my $filename = $storage->getFiles->[0]; - $self->session->http->setRedirect($storage->getUrl($storage->getFiles->[0])); + $self->session->response->setRedirect($storage->getUrl($storage->getFiles->[0])); return "redirect"; } diff --git a/lib/WebGUI/AssetTrash.pm b/lib/WebGUI/AssetTrash.pm index 23eaa7f34..0039ff9eb 100644 --- a/lib/WebGUI/AssetTrash.pm +++ b/lib/WebGUI/AssetTrash.pm @@ -3,7 +3,7 @@ package WebGUI::Asset; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -15,7 +15,7 @@ package WebGUI::Asset; =cut use strict; -use WebGUI::Asset::Shortcut; +use Number::Format (); use JSON; =head1 NAME @@ -117,7 +117,7 @@ sub purge { # can't delete if it's one of these things if ($self->getId eq $session->setting->get("defaultPage") || $self->getId eq $session->setting->get("notFoundPage") || $self->get("isSystem")) { $outputSub->(sprintf $i18n->get('Trying to delete system page %s. Aborting'), $self->getTitle); - $session->errorHandler->security("delete a system protected page (".$self->getId.")"); + $session->log->security("delete a system protected page (".$self->getId.")"); return 0; } @@ -135,7 +135,7 @@ sub purge { } last unless $child; unless ($child->purge) { - $session->errorHandler->security("delete one of (".$self->getId.")'s children which is a system protected page"); + $session->log->security("delete one of (".$self->getId.")'s children which is a system protected page"); $outputSub->(sprintf $i18n->get('Trying to delete system page %s. Aborting'), $self->getTitle); return 0; } @@ -144,6 +144,7 @@ sub purge { # Delete shortcuts to this asset # Also purge any shortcuts to this asset that are in the trash $outputSub->($i18n->get('Purging shortcuts')); + require WebGUI::Asset::Shortcut; my $shortcuts = WebGUI::Asset::Shortcut->getShortcutsForAssetId($self->session, $self->getId, { returnObjects => 1, @@ -172,15 +173,14 @@ sub purge { # clean up cache $outputSub->($i18n->get('Clearing cache')); - WebGUI::Cache->new($session)->deleteChunk(["asset",$self->getId]); $self->purgeCache; # delete stuff out of the asset tables $outputSub->($i18n->get('Clearing asset tables')); $session->db->beginTransaction; $session->db->write("delete from metaData_values where assetId = ?",[$self->getId]); - foreach my $definition (@{$self->definition($session)}) { - $session->db->write("delete from ".$definition->{tableName}." where assetId=?", [$self->getId]); + foreach my $table ($self->meta->get_tables) { + $session->db->write("delete from ".$table." where assetId=?", [$self->getId]); } $session->db->write("delete from asset where assetId=?", [$self->getId]); $session->db->commit; @@ -300,7 +300,7 @@ sub trash { if ($self->getId eq $session->setting->get("defaultPage") || $self->getId eq $session->setting->get("notFoundPage") || $self->get('isSystem')) { $outputSub->(sprintf $i18n->get('Trying to delete system page %s. Aborting'), $self->getTitle); - $session->errorHandler->security("delete a system protected page (".$self->getId.")"); + $session->log->security("delete a system protected page (".$self->getId.")"); return undef; } @@ -311,8 +311,6 @@ sub trash { } ); my $rootId = $self->getId; - my $db = $session->db; - $db->beginTransaction; while ( 1 ) { my $asset; eval { $asset = $assetIter->() }; @@ -334,15 +332,17 @@ sub trash { # setState will take care of _properties in $asset, but not in # $self (whooops!), so we need to manually update. my @keys = qw(state stateChangedBy stateChanged); - @{$self->{_properties}}{@keys} = @{$asset->{_properties}}{@keys}; + $self->state($asset->state); + $self->stateChangedBy($asset->stateChangedBy); + $self->stateChanged($asset->stateChanged); } else { $asset->setState('trash-limbo'); } } - $db->commit; # Trash any shortcuts to this asset + require WebGUI::Asset::Shortcut; my $shortcuts = WebGUI::Asset::Shortcut->getShortcutsForAssetId($session, $self->getId, { returnObjects => 1}); $outputSub->($i18n->get('Purging shortcuts')); @@ -350,54 +350,21 @@ sub trash { $shortcut->trash({ outputSub => $outputSub, }); } + # Raw database work is more efficient than $asset->update + my $db = $session->db; + $db->beginTransaction; + $outputSub->($i18n->get('Clearing asset tables')); + $db->write("update asset set state='trash-limbo' where lineage like ?",[$self->get("lineage").'%']); + $db->write("update asset set state='trash', stateChangedBy=?, stateChanged=? where assetId=?",[$session->user->userId, time(), $self->getId]); + $db->commit; + + # Update ourselves since we didn't use update() + $self->state("trash"); return 1; } #------------------------------------------------------------------- -=head2 trashInFork - -WebGUI::Fork method called by www_deleteList and www_delete to move assets -into the trash. - -=cut - -sub trashInFork { - my ( $process, $list ) = @_; - my $session = $process->session; - my @roots = grep { $_->canEdit && $_->canEditIfLocked } - map { - eval { WebGUI::Asset->newPending( $session, $_ ) } - } @$list; - - my @ids = map { - my $list = $_->getLineage( - [ 'self', 'descendants' ], { - statesToInclude => [qw(published clipboard clipboard-limbo trash trash-limbo)], - statusToInclude => [qw(approved archived pending)], - } - ); - @$list; - } @roots; - - my $tree = WebGUI::ProgressTree->new( $session, \@ids ); - $process->update(sub { $tree->json }); - my $patch = Monkey::Patch::patch_class( - 'WebGUI::Asset', - 'setState', - sub { - my ( $setState, $self, $state ) = @_; - my $id = $self->getId; - $tree->focus($id); - my $ret = $self->$setState($state); - $tree->success($id); - $process->update(sub { $tree->json }); - return $ret; - } - ); - $_->trash() for @roots; -} ## end sub trashInFork - require WebGUI::Workflow::Activity::DeleteExportedFiles; sub _invokeWorkflowOnExportedFiles { my $self = shift; @@ -425,63 +392,6 @@ sub _invokeWorkflowOnExportedFiles { #------------------------------------------------------------------- -=head2 www_delete - -Moves self to trash in fork, redirects to Container or Parent if canEdit. -Otherwise returns AdminConsole rendered insufficient privilege. - -=cut - -sub www_delete { - my $self = shift; - return $self->session->privilege->insufficient() unless ($self->canEdit && $self->canEditIfLocked); - return $self->session->privilege->vitalComponent() if $self->get('isSystem'); - return $self->session->privilege->vitalComponent() if (isIn($self->getId, $self->session->setting->get("defaultPage"), $self->session->setting->get("notFoundPage"))); - - my $asset = $self->getContainer; - if ($self->getId eq $asset->getId) { - $asset = $self->getParent; - } - $self->forkWithStatusPage({ - plugin => 'ProgressTree', - title => 'Delete Assets', - redirect => $asset->getUrl, - method => 'trashInFork', - args => [ $self->getId ], - } - ); -} - -#------------------------------------------------------------------- - -=head2 www_deleteList - -Checks to see if a valid CSRF token was received. If not, then it returns insufficient privilege. - -Moves list of assets to trash, checking each to see if the user canEdit, -and canEditIfLocked. Returns the user to manageTrash, or to the screen set -by the form variable C. - -=cut - -sub www_deleteList { - my $self = shift; - my $session = $self->session; - my $form = $session->form; - return $session->privilege->insufficient() unless $session->form->validToken; - my $method = $form->get('proceed') || 'manageTrash'; - $self->forkWithStatusPage({ - plugin => 'ProgressTree', - title => 'Delete Assets', - redirect => $self->getUrl("func=$method"), - method => 'trashInFork', - args => [ $form->get('assetId') ], - } - ); -} ## end sub www_deleteList - -#------------------------------------------------------------------- - =head2 www_manageTrash ( ) Returns an AdminConsole to deal with assets in the Trash. If user isn't in the Turn On Admin group, renders an insufficient privilege page. @@ -506,8 +416,8 @@ sub www_manageTrash { elsif ( $canAdmin ) { $ac->addSubmenuItem($self->getUrl('func=manageTrash;systemTrash=1'), $i18n->get(964)); } - $self->session->style->setLink($self->session->url->extras('assetManager/assetManager.css'), {rel=>"stylesheet",type=>"text/css"}); - $self->session->style->setScript($self->session->url->extras('assetManager/assetManager.js'), {type=>"text/javascript"}); + $self->session->style->setCss($self->session->url->extras('assetManager/assetManager.css')); + $self->session->style->setScript($self->session->url->extras('assetManager/assetManager.js')); my $output = " |; - $f->selectBox( - -name=>"authLDAP_ldapConnection", - -label=>$i18n->get("ldapConnection"), - -hoverHelp=>$i18n->get("ldapConnection description"), - -options=>WebGUI::LDAPLink->getList($self->session,), - -value=>[$ldapConnection], - -extras=>q|onchange="this.form.authLDAP_ldapUrl.value=ldapValue[this.options[this.selectedIndex].value];"| + $f->addField( "selectBox", + name=>"authLDAP_ldapConnection", + label=>$i18n->get("ldapConnection"), + hoverHelp=>$i18n->get("ldapConnection description"), + options=>WebGUI::LDAPLink->getList($self->session,), + value=>[$ldapConnection], + extras=>q|onchange="this.form.authLDAP_ldapUrl.value=ldapValue[this.options[this.selectedIndex].value];"| ); } - $f->url( - -name => "authLDAP_ldapUrl", - -label => $i18n->get(3), - -value => $ldapUrl, + $f->addField( "url", + name => "authLDAP_ldapUrl", + label => $i18n->get(3), + value => $ldapUrl, ); - $f->text( - -name => "authLDAP_connectDN", - -label => $i18n->get('LDAP User DN'), - -value => $connectDN, + $f->addField( "text", + name => "authLDAP_connectDN", + label => $i18n->get('LDAP User DN'), + value => $connectDN, ); $self->session->style->setRawHeadTags($jscript); - return $f->printRowsOnly; + return $f; } #------------------------------------------------------------------- @@ -528,21 +327,9 @@ sub editUserFormSave { sub editUserSettingsForm { my $self = shift; - my $f = WebGUI::HTMLForm->new($self->session); - my $ldapConnection = WebGUI::Form::selectBox($self->session, { - name=>"ldapConnection", - options=>WebGUI::LDAPLink->getList($self->session,), - value=>[$self->session->setting->get("ldapConnection")] - }); - my $i18n = WebGUI::International->new($self->session,'AuthLDAP'); - my $ldapConnectionLabel = $i18n->get("ldapConnection"); - my $buttons = ""; - if($self->session->setting->get("ldapConnection")) { - $buttons = $self->session->icon->edit("op=editLDAPLink;returnUrl=".$self->session->url->escape($self->session->url->page("op=editSettings")).";llid=".$self->session->setting->get("ldapConnection")); - } - $buttons .= $self->session->icon->manage("op=listLDAPLinks;returnUrl=".$self->session->url->escape($self->session->url->page("op=editSettings"))); - $f->raw(qq|$ldapConnectionLabel$ldapConnection $buttons|); - return $f->printRowsOnly; + my $f = WebGUI::FormBuilder->new($self->session); + $f->addField( "LdapLink", name => "ldapConnection" ); + return $f; } #------------------------------------------------------------------- @@ -676,83 +463,22 @@ sub getLoginTemplateId { #------------------------------------------------------------------- -=head2 login ( ) +=head2 new ( session, userId ) -Process the login form. Create a new account if auto registration is enabled. - -=cut - -sub login { - my $self = shift; - my $i18n = WebGUI::International->new($self->session); - my $username = $self->session->form->process("username"); - my $identifier = $self->session->form->process("identifier"); - my $autoRegistration = $self->session->setting->get("automaticLDAPRegistration"); - my $hasAuthenticated = 0; - - $hasAuthenticated = 1 if ( $self->authenticate($username,$identifier) ); - - my $connection = $self->getLDAPConnection; - if (! $connection) { - return $self->displayLogin("

    ".$i18n->get('no ldap logins')."

    ".$self->error); - } - - # Autoregistration is on and they didn't authenticate yet - if ($autoRegistration && !$hasAuthenticated) { - # See if they are in LDAP and if so that they can bind with the password given. - if($self->_isValidLDAPUser()) { - - # Create a WebGUI Account - if ($self->validUsername($username)) { - $self->SUPER::createAccountSave($username, { - connectDN => $self->getConnectDN, - ldapUrl => $connection->{ldapUrl}, - ldapConnection => $connection->{ldapLinkId}, - },$identifier); - $hasAuthenticated = 1; - - # Pull the users profile from LDAP to WebGUI - WebGUI::Workflow::Instance->create($self->session, { - workflowId=>'AuthLDAPworkflow000001', - methodName=>"new", - className=>"WebGUI::User", - parameters=>$self->session->user->userId, - priority=>3 - })->start; - } - } - } - return $self->SUPER::login() if $hasAuthenticated; #Standard login routine for login - - $self->session->log->security("login to account ".$self->session->form->process("username")." with invalid information."); - return $self->displayLogin("

    ".$i18n->get(70)."

    ".$self->error); -} - -#------------------------------------------------------------------- - -=head2 new ( session, authMethod, userId ) - -Create a new Auth instance. C is the name of this auth method ("ldap"). -C is the ID of the user to be authenticated. +Create a new Auth instance. C is the ID of the user to be authenticated. =cut sub new { my $class = shift; my $session = shift; - my $authMethod = $_[0]; - my $userId = $_[1]; - my @callable = ('createAccount','deactivateAccount','displayAccount','displayLogin','login','logout','createAccountSave','deactivateAccountConfirm'); - my $self = WebGUI::Auth->new($session,$authMethod,$userId,\@callable); - #my $connection = $session->scratch->get("ldapConnection") || $session->setting->get("ldapConnection"); - #my $ldaplink = WebGUI::LDAPLink->new($session,$connection); - #$self->{_connection} = $ldaplink->get if $ldaplink; - + my $userId = shift; + my $self = $class->SUPER::new($session,$userId); my $i18n = WebGUI::International->new($session, "AuthLDAP"); my %ldapStatusCode = map { $_ => $i18n->get("LDAPLink_".$_) } (0..21, 32,33,34,36, 48..54, 64..71, 80); $self->{_statusCode} = \%ldapStatusCode; - bless $self, $class; + return $self; } #------------------------------------------------------------------- @@ -781,5 +507,262 @@ sub setConnectDN { $self->{_connectDN} = $_[0]; } +#------------------------------------------------------------------- + +=head2 www_createAccount ( message, confirm ) + +Show the form to create a new LDAP account relationship + +=cut + +sub www_createAccount { + my $self = shift; + my $message = shift; + my $confirm = shift || $self->session->form->process("confirm"); + my $vars; + if ($self->session->user->isRegistered) { + return $self->www_displayAccount; + } + elsif (!$self->session->setting->get("anonymousRegistration") && !$self->session->setting->get('inboxInviteUserEnabled')) { + return $self->www_displayLogin; + } + + + my $connection = $self->getLDAPConnection; + if (! $connection) { + $self->session->log->error('Unable to create LDAP account as there is no LDAP connection defined'); + return $self->www_displayLogin; + } + $vars->{'create.message'} = $message if ($message); + my $i18n = WebGUI::International->new($self->session,"AuthLDAP"); + $vars->{'create.form.ldapConnection.label'} = $i18n->get("ldapConnection"); + + my $url = $self->session->url->page("op=auth;method=createAccount;connection="); + $vars->{'create.form.ldapConnection'} = WebGUI::Form::selectBox($self->session, { + name=>"ldapConnection", + options=>WebGUI::LDAPLink->getList($self->session,), + value=>[$connection->{ldapLinkId}], + extras=>qq|onchange="location.href='$url'+this.options[this.selectedIndex].value"| + }); + my $ldapId = $self->session->form->process("authLDAP_ldapId"); + $vars->{'create.form.ldapId'} = WebGUI::Form::text($self->session,{ + name =>"authLDAP_ldapId", + value =>$ldapId, + extras => $self->getExtrasStyle($ldapId) + }); + $vars->{'create.form.ldapId.label'} = $connection->{ldapIdentityName}; + + my $ldapPwd = $self->session->form->process("authLDAP_identifier"); + $vars->{'create.form.password'} = WebGUI::Form::password($self->session,{ + "name"=>"authLDAP_identifier", + "value"=> $ldapPwd, + extras => $self->getExtrasStyle($ldapPwd) + }); + $vars->{'create.form.password.label'} = $connection->{ldapPasswordName}; + + $vars->{'create.form.hidden'} = WebGUI::Form::hidden($self->session,{"name"=>"confirm","value"=>$confirm}); + return $self->SUPER::www_createAccount("createAccountSave",$vars); +} + +#------------------------------------------------------------------- + +=head2 www_createAccountSave ( ) + +Process the form to create a new LDAP account relationship + +=cut + +sub www_createAccountSave { + my $self = shift; + my $username = $self->session->form->process('authLDAP_ldapId'); + my $password = $self->session->form->process('authLDAP_identifier'); + my $error = ""; + my $i18n = WebGUI::International->new($self->session); + + #Validate user in LDAP + if(!$self->_isValidLDAPUser()){ + return $self->www_createAccount("

    ".$i18n->get(70)."

    ".$self->error); + } + + my $connection = $self->getLDAPConnection; + if (! $connection) { + return $self->www_createAccount("

    ".$i18n->get('no ldap link for auth')."

    ".$self->error); + } + #Get connectDN from settings + my $uri = URI->new($connection->{ldapUrl}); + my $ldap = Net::LDAP->new($uri->host, (port=>$uri->port,scheme=>$uri->scheme)); + my $auth; + if($connection->{connectDn}) { + $auth = $ldap->bind(dn=>$connection->{connectDn}, password=>$connection->{identifier}); + } + else{ + $auth = $ldap->bind; + } + #$ldap->bind; + my $search = $ldap->search (base => $uri->dn, filter=>$connection->{ldapIdentity}."=".$username); + my $connectDN = ""; + if (defined $search->entry(0)) { + if ($connection->{ldapUserRDN} eq 'dn') { + $connectDN = $search->entry(0)->dn; + } + else { + $connectDN = $search->entry(0)->get_value($connection->{ldapUserRDN}); + } + } + $ldap->unbind; + + + #Check that username is valid and not a duplicate in the system. + $error .= $self->error if(!$self->validUsername($username)); + #Validate profile data. + my ($profile, $temp, $warning) = WebGUI::Operation::Profile::validateProfileData($self->session); + $error .= $temp; + return $self->www_createAccount("
  • ".$error."") unless ($error eq ""); + #If Email address is not unique, a warning is displayed + if($warning ne "" && !$self->session->form->process("confirm")){ + return $self->www_createAccount('
  • '.$i18n->get(1078).'
  • ', 1); + } + + my $properties; + $properties->{connectDN} = $connectDN; + $properties->{ldapUrl} = $connection->{ldapUrl}; + $properties->{ldapConnection} = $connection->{ldapLinkId}; + + return $self->SUPER::www_createAccountSave($username,$properties,$password,$profile); +} + +#------------------------------------------------------------------- + +=head2 www_deactivateAccount ( ) + +Show the confirmation form to deactivate the user's account + +=cut + +sub www_deactivateAccount { + my $self = shift; + return $self->www_displayLogin if($self->userId eq '1'); + return $self->SUPER::www_deactivateAccount("deactivateAccountConfirm"); +} + +#------------------------------------------------------------------- + +=head2 www_deactivateAccountConfirm ( ) + +Confirm the user is deactivating their account. + +=cut + +sub www_deactivateAccountConfirm { + my $self = shift; + return $self->www_displayLogin unless ($self->session->setting->get("selfDeactivation")); + return $self->SUPER::www_deactivateAccountConfirm; +} + +#------------------------------------------------------------------- + +=head2 www_displayAccount ( message ) + +Display the account details. + +=cut + +sub www_displayAccount { + my $self = shift; + my $vars; + return $self->www_displayLogin($_[0]) if ($self->isVisitor); + my $i18n = WebGUI::International->new($self->session); + $vars->{displayTitle} = '

    '.$i18n->get(61).'

    '; + $vars->{'account.message'} = $i18n->get(856); + if($self->session->setting->get("useKarma")){ + $vars->{'account.form.karma'} = $self->session->user->get("karma"); + $vars->{'account.form.karma.label'} = $i18n->get(537); + } + + ########### ACCOUNT SHUNT + #The following is a shunt which allows the displayAccount page to be displayed in the + #Account system. This shunt will be replaced in WebGUI 8 when the API can be broken + my $output = WebGUI::Asset::Template->newById($self->session,$self->getAccountTemplateId)->process($vars); + #If the account system is calling this method, just return the template + my $op = $self->session->form->get("op"); + if($op eq "account") { + return $output; + } + #Otherwise wrap the template into the account layout + my $instance = WebGUI::Content::Account->createInstance($self->session,"user"); + return $instance->www_displayContent($output,1); +} + +#------------------------------------------------------------------- + +=head2 www_displayLogin ( message ) + +Web-facing method to display the login form. + +=cut + +sub www_displayLogin { + my $self = shift; + my $vars; + return $self->www_displayAccount($_[0]) if ($self->isRegistered); + $vars->{'login.message'} = $_[0] if ($_[0]); + return $self->SUPER::www_displayLogin("login",$vars); +} + + +#------------------------------------------------------------------- + +=head2 www_login ( ) + +Process the login form. Create a new account if auto registration is enabled. + +=cut + +sub www_login { + my $self = shift; + my $i18n = WebGUI::International->new($self->session); + my $username = $self->session->form->process("username"); + my $identifier = $self->session->form->process("identifier"); + my $autoRegistration = $self->session->setting->get("automaticLDAPRegistration"); + my $hasAuthenticated = 0; + + $hasAuthenticated = 1 if ( $self->authenticate($username,$identifier) ); + + my $connection = $self->getLDAPConnection; + if (! $connection) { + return $self->www_displayLogin("

    ".$i18n->get('no ldap logins')."

    ".$self->error); + } + + # Autoregistration is on and they didn't authenticate yet + if ($autoRegistration && !$hasAuthenticated) { + # See if they are in LDAP and if so that they can bind with the password given. + if($self->_isValidLDAPUser()) { + + # Create a WebGUI Account + if ($self->validUsername($username)) { + $self->SUPER::www_createAccountSave($username, { + connectDN => $self->getConnectDN, + ldapUrl => $connection->{ldapUrl}, + ldapConnection => $connection->{ldapLinkId}, + },$identifier); + $hasAuthenticated = 1; + + # Pull the users profile from LDAP to WebGUI + WebGUI::Workflow::Instance->create($self->session, { + workflowId=>'AuthLDAPworkflow000001', + methodName=>"new", + className=>"WebGUI::User", + parameters=>$self->session->user->userId, + priority=>3 + })->start; + } + } + } + return $self->SUPER::www_login() if $hasAuthenticated; #Standard login routine for login + + $self->session->log->security("login to account ".$self->session->form->process("username")." with invalid information."); + return $self->www_displayLogin("

    ".$i18n->get(70)."

    ".$self->error); +} + 1; diff --git a/lib/WebGUI/Auth/Twitter.pm b/lib/WebGUI/Auth/Twitter.pm index 041c5a4da..34cf699aa 100644 --- a/lib/WebGUI/Auth/Twitter.pm +++ b/lib/WebGUI/Auth/Twitter.pm @@ -3,7 +3,7 @@ package WebGUI::Auth::Twitter; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -34,19 +34,6 @@ These methods are available from this class: #---------------------------------------------------------------------------- -=head2 new ( ... ) - -Create a new object - -=cut - -sub new { - my $self = shift->SUPER::new(@_); - return bless $self, __PACKAGE__; # Auth requires rebless -} - -#---------------------------------------------------------------------------- - =head2 createTwitterUser ( twitterUserId, username ) my $user = $self->createTwitterUser( $twitterUserId, $username ); @@ -59,9 +46,10 @@ sub createTwitterUser { my ( $self, $twitterUserId, $username ) = @_; my $user = WebGUI::User->create( $self->session ); $user->username( $username ); - $self->saveParams( $user->userId, $self->authMethod, { + $self->user( $user ); + $self->update( "twitterUserId" => $twitterUserId, - } ); + ); return $user; } @@ -81,16 +69,16 @@ sub editUserSettingsForm { my $keyUrl = 'http://dev.twitter.com/apps/new'; - my $f = WebGUI::HTMLForm->new( $session ); + my $f = WebGUI::FormBuilder->new( $session ); - $f->yesNo( + $f->addField( "yesNo", name => 'twitterEnabled', value => $setting->get( 'twitterEnabled' ), label => $i18n->get('enabled'), hoverHelp => $i18n->get('enabled help'), ); - $f->text( + $f->addField( "text", name => 'twitterConsumerKey', value => $setting->get( 'twitterConsumerKey' ), label => $i18n->get('consumer key'), @@ -98,14 +86,14 @@ sub editUserSettingsForm { subtext => sprintf( $i18n->get('get key'), ($keyUrl) x 2 ), ); - $f->text( + $f->addField( "text", name => 'twitterConsumerSecret', value => $setting->get( 'twitterConsumerSecret' ), label => $i18n->get('consumer secret'), hoverHelp => $i18n->get('consumer secret help'), ); - $f->template( + $f->addField( "template", name => 'twitterTemplateIdChooseUsername', value => $setting->get( 'twitterTemplateIdChooseUsername' ), label => $i18n->get('choose username template'), @@ -113,7 +101,7 @@ sub editUserSettingsForm { namespace => 'Auth/Twitter/ChooseUsername', ); - return $f->printRowsOnly; + return $f; } #---------------------------------------------------------------------------- @@ -151,7 +139,7 @@ Get the template to choose a username sub getTemplateChooseUsername { my ( $self ) = @_; my $templateId = $self->session->setting->get('twitterTemplateIdChooseUsername'); - return WebGUI::Asset::Template->new( $self->session, $templateId ); + return WebGUI::Asset->newById( $self->session, $templateId ); } #---------------------------------------------------------------------------- @@ -199,7 +187,7 @@ sub www_login { $scratch->set( 'AuthTwitterToken', $nt->request_token ); $scratch->set( 'AuthTwitterTokenSecret', $nt->request_token_secret ); - $session->http->setRedirect($auth_url); + $session->response->setRedirect($auth_url); return "redirect"; } @@ -239,13 +227,13 @@ sub www_callback { if ( $userId ) { my $user = WebGUI::User->new( $session, $userId ); $self->user( $user ); - return $self->login; + return $self->SUPER::www_login; } # Otherwise see if their screen name exists and create a user elsif ( !WebGUI::User->newByUsername( $session, $twitterScreenName ) ) { my $user = $self->createTwitterUser( $twitterUserId, $twitterScreenName ); $self->user( $user ); - return $self->login; + return $self->SUPER::www_login; } # Otherwise ask them for a new username to use @@ -281,7 +269,6 @@ sub www_setUsername { if ( !WebGUI::User->newByUsername( $session, $username ) ) { my $twitterUserId = $scratch->get( "AuthTwitterUserId" ); my $user = $self->createTwitterUser( $twitterUserId, $username ); - $self->user( $user ); return $self->login; } diff --git a/lib/WebGUI/Auth/WebGUI.pm b/lib/WebGUI/Auth/WebGUI.pm index 2226bf199..e7be87c9a 100644 --- a/lib/WebGUI/Auth/WebGUI.pm +++ b/lib/WebGUI/Auth/WebGUI.pm @@ -1,7 +1,7 @@ package WebGUI::Auth::WebGUI; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -15,16 +15,17 @@ use strict; use URI; use WebGUI::Asset::Template; use WebGUI::Auth; -use WebGUI::HTMLForm; +use WebGUI::FormBuilder; use WebGUI::Macro; use WebGUI::Mail::Send; use WebGUI::Storage; use WebGUI::User; -use WebGUI::Utility; use WebGUI::Form::Captcha; use WebGUI::Macro; +use WebGUI::Deprecate; use Scope::Guard qw(guard); use Encode (); +use Tie::IxHash; our @ISA = qw(WebGUI::Auth); @@ -110,7 +111,7 @@ sub _isValidPassword { sub _logSecurityMessage { my $self = shift; - $self->session->errorHandler->security("change password. Password changed successfully"); + $self->session->log->security("change password. Password changed successfully"); } #------------------------------------------------------------------- @@ -122,7 +123,7 @@ sub authenticate { return 0 if !$auth; $identifier = $_[1]; - $userData = $self->getParams; + $userData = $self->get; if (($self->hashPassword($identifier) eq $$userData{identifier}) && ($identifier ne "")) { return 1; } @@ -131,211 +132,6 @@ sub authenticate { return 0; } -#------------------------------------------------------------------- -sub createAccount { - my $self = shift; - my $session = $self->session; - my $form = $session->form; - my $setting = $session->setting; - - my $message = shift; - my $confirm = shift || $form->process("confirm"); - my $vars = shift || {}; - my $i18n = WebGUI::International->new($session); - - if ($self->session->user->isRegistered) { - return $self->displayAccount; - } - elsif (!$setting->get("anonymousRegistration") && !$setting->get('inboxInviteUserEnabled')) { - return $self->displayLogin; - } - - $vars->{'create.message'} = '
      '.$message.'
    ' if ($message); - $vars->{'useCaptcha' } = $setting->get("webguiUseCaptcha"); - - if ($vars->{useCaptcha}) { - use WebGUI::Form::Captcha; - my $captcha = WebGUI::Form::Captcha->new($session,{ - name => "authWebGUI.captcha", - extras => $self->getExtrasStyle - }); - $vars->{'create.form.captcha'} - = $captcha->toHtml . '' . $captcha->get('subtext').''; - $vars->{'create.form.captcha.label'} = $i18n->get("captcha label","AuthWebGUI"); - } - - unless($setting->get('webguiUseEmailAsUsername')){ - my $username = $form->process("authWebGUI.username"); - $vars->{'create.form.username'} - = WebGUI::Form::username($self->session, { - name => "authWebGUI.username", - value => $username, - extras => $self->getExtrasStyle($username) - }); - $vars->{'create.form.username.label'} = $i18n->get(50); - } - - my $password = $form->process("authWebGUI.identifier"); - $vars->{'create.form.password'} - = WebGUI::Form::password($self->session, { - name => "authWebGUI.identifier", - value => $password, - extras => $self->getExtrasStyle($password) - }); - $vars->{'create.form.password.label'} = $i18n->get(51); - - my $passwordConfirm = $form->process("authWebGUI.identifierConfirm"); - $vars->{'create.form.passwordConfirm'} - = WebGUI::Form::password($self->session, { - name => "authWebGUI.identifierConfirm", - value => $passwordConfirm, - extras => $self->getExtrasStyle($passwordConfirm) - }); - $vars->{'create.form.passwordConfirm.label'} = $i18n->get(2,'AuthWebGUI'); - - $vars->{'create.form.hidden'} - = WebGUI::Form::hidden($self->session, { - "name" => "confirm", - "value" => $confirm - }); - $vars->{'recoverPassword.isAllowed' } = $self->getSetting("passwordRecovery"); - $vars->{'recoverPassword.url' } = $self->session->url->page('op=auth;method=recoverPassword'); - $vars->{'recoverPassword.label' } = $i18n->get(59); - return $self->SUPER::createAccount("createAccountSave",$vars); -} - -#------------------------------------------------------------------- -sub createAccountSave { - my $self = shift; - my $session = $self->session; - my $form = $self->session->form; - my $setting = $self->session->setting; - my $i18n = WebGUI::International->new($session); - - # Logged in users cannot see this page - return $self->displayAccount if ($session->user->isRegistered); - - # Make sure anonymous registration is enabled - if (!$setting->get("anonymousRegistration") && !$setting->get("inboxInviteUserEnabled")) { - $session->errorHandler->security($i18n->get("no registration hack", "AuthWebGUI")); - return $self->displayLogin; - } - my $username; - if($setting->get('webguiUseEmailAsUsername')){ - $username = $form->process('email'); - } - else{ - $username = $form->process('authWebGUI.username'); - } - my $password = $form->process('authWebGUI.identifier'); - my $passConfirm = $form->process('authWebGUI.identifierConfirm'); - - # Validate input - my $error; - $error = $self->error unless($self->validUsername($username)); - if ($setting->get("webguiUseCaptcha")) { - my $form = WebGUI::Form::Captcha->new($session, {name => 'authWebGUI.captcha'}); - if (! $form->getValue) { - $error .= '
  • ' . $form->getErrorMessage . '
  • '; - } - } - $error .= $self->error unless($self->_isValidPassword($password,$passConfirm)); - - my $fields = WebGUI::ProfileField->getRegistrationFields($session); - my $retHash = $self->user->validateProfileDataFromForm($fields); - my $profile = $retHash->{profile}; - my $temp = ""; - my $warning = ""; - - my $format = "
  • %s
  • "; - map { $warning .= sprintf($format,$_) } @{$retHash->{warnings}}; - map { $temp .= sprintf($format,$_) } @{$retHash->{errors}}; - - $error .= $temp; - - unless ($error eq "") { - $self->error($error); - return $self->createAccount($error); - } - - # If Email address is not unique, a warning is displayed - if ($warning ne "" && !$self->session->form->process("confirm")) { - return $self->createAccount('
  • '.$i18n->get(1078).'
  • ', 1); - } - - # Create the new account - my $properties; - $properties->{ changeUsername } = $setting->get("webguiChangeUsername"); - $properties->{ changePassword } = $setting->get("webguiChangePassword"); - $properties->{ identifier } = $self->hashPassword($password); - $properties->{ passwordLastUpdated } = time(); - $properties->{ passwordTimeout } = $setting->get("webguiPasswordTimeout"); - - my $afterCreateMessage = $self->SUPER::createAccountSave($username,$properties,$password,$profile); - my $sendEmail = $setting->get('webguiValidateEmail'); - - # We need to deactivate the user and log him out if there are additional - # things that need to be done before he should be logged in. - my $cleanupUser; - if ($sendEmail || !$setting->get('enableUsersAfterAnonymousRegistration')) { - $cleanupUser = guard { - $self->user->status('Deactivated'); - $session->var->end($session->var->get('sessionId')); - $session->var->start(1, $session->getId); - my $u = WebGUI::User->new($session, 1); - $self->{user} = $u; - $self->logout; - }; - } - - # Send validation e-mail if required - if ($sendEmail) { - my $key = $session->id->generate; - $self->saveParams($self->userId,"WebGUI",{emailValidationKey=>$key}); - my $mail = WebGUI::Mail::Send->create($self->session, { - to => $profile->{email}, - subject => $i18n->get('email address validation email subject','AuthWebGUI') - }); - my $var; - $var->{newUser_username} = $username; - $var->{activationUrl} = $session->url->page("op=auth;method=validateEmail;key=".$key, 'full'); - my $text = -WebGUI::Asset::Template->new($self->session,$self->getSetting('accountActivationTemplate'))->process($var); - WebGUI::Macro::process($self->session,\$text); - $mail->addText($text); - $mail->addFooter; - $mail->queue; - return $self->displayLogin($i18n->get('check email for validation','AuthWebGUI')); - } - return $afterCreateMessage; -} - -#------------------------------------------------------------------- -sub deactivateAccount { - my $self = shift; - return $self->displayLogin if($self->isVisitor); - return $self->SUPER::deactivateAccount("deactivateAccountConfirm"); -} - -#------------------------------------------------------------------- -sub deactivateAccountConfirm { - my $self = shift; - return $self->displayLogin unless ($self->session->setting->get("selfDeactivation")); - - # Keep the username for a nice message - my $username = $self->user->username; - - # Deactivate the account - my $response = $self->SUPER::deactivateAccountConfirm; - - # If there was a response, it's probably an error - return $response if $response; - - # Otherwise show the login form with a friendly message - my $i18n = WebGUI::International->new($self->session); - return $self->displayLogin(sprintf( $i18n->get("deactivateAccount success"), $username )); -} - #------------------------------------------------------------------- =head2 checkField ( ) @@ -348,51 +144,6 @@ or an empty string if the check was successful. =cut -#------------------------------------------------------------------- -sub displayAccount { - my $self = shift; - my $vars; - return $self->displayLogin($_[0]) if ($self->isVisitor); - my $i18n = WebGUI::International->new($self->session); - my $userData = $self->getParams; - $vars->{'account.message'} = $_[0] if ($_[0]); - $vars->{'account.noform'} = 1; - if($userData->{changeUsername} || (!defined $userData->{changeUsername} && $self->session->setting->get("webguiChangeUsername"))){ - $vars->{'account.form.username'} = WebGUI::Form::text($self->session,{"name"=>"authWebGUI.username","value"=>$self->username}); - $vars->{'account.form.username.label'} = $i18n->get(50); - $vars->{'account.noform'} = 0; - } - if($userData->{changePassword} || (!defined $userData->{changePassword} && $self->session->setting->get("webguiChangePassword"))){ - $vars->{'account.form.password'} = WebGUI::Form::password($self->session,{"name"=>"authWebGUI.identifier","value"=>"password"}); - $vars->{'account.form.password.label'} = $i18n->get(51); - $vars->{'account.form.passwordConfirm'} = WebGUI::Form::password($self->session,{"name"=>"authWebGUI.identifierConfirm","value"=>"password"}); - $vars->{'account.form.passwordConfirm.label'} = $i18n->get(2,'AuthWebGUI'); - $vars->{'account.noform'} = 0; - } - $vars->{'account.nofields'} = $i18n->get(22,'AuthWebGUI'); - return $self->SUPER::displayAccount("updateAccount",$vars); -} - -#------------------------------------------------------------------- - -=head2 displayLogin ( ) - -The initial login screen an unauthenticated user sees - -=cut - -sub displayLogin { - my $self = shift; - my $vars; - return $self->displayAccount($_[0]) if ($self->isRegistered); - my $i18n = WebGUI::International->new($self->session); - $vars->{'login.message'} = '
      '.$_[0].'
    ' if ($_[0]); - $vars->{'recoverPassword.isAllowed'} = $self->getSetting("passwordRecovery"); - $vars->{'recoverPassword.url'} = $self->session->url->page('op=auth;method=recoverPassword'); - $vars->{'recoverPassword.label'} = $i18n->get(59); - return $self->SUPER::displayLogin("login",$vars); -} - #------------------------------------------------------------------- =head2 editUserForm ( ) @@ -403,40 +154,40 @@ sub displayLogin { sub editUserForm { my $self = shift; - my $userData = $self->getParams; - my $f = WebGUI::HTMLForm->new($self->session); + my $userData = $self->get; + my $f = WebGUI::FormBuilder->new($self->session); my $i18n = WebGUI::International->new($self->session); - $f->password( + $f->addField( "password", name=>"authWebGUI.identifier", label=>$i18n->get(51), value=>"password", extras=>'autocomplete="off"', ); - $f->interval( - -name=>"authWebGUI.passwordTimeout", - -label=>$i18n->get(16,'AuthWebGUI'), - -value=>$userData->{passwordTimeout}, - -defaultValue=>$self->session->setting->get("webguiPasswordTimeout") + $f->addField( "interval", + name=>"authWebGUI.passwordTimeout", + label=>$i18n->get(16,'AuthWebGUI'), + value=>$userData->{passwordTimeout}, + defaultValue=>$self->session->setting->get("webguiPasswordTimeout") ); my $userChange = $self->session->setting->get("webguiChangeUsername"); if($userChange || $userChange eq "0"){ $userChange = $userData->{changeUsername}; } - $f->yesNo( - -name=>"authWebGUI.changeUsername", - -value=>$userChange, - -label=>$i18n->get(21,'AuthWebGUI') + $f->addField( "yesNo", + name=>"authWebGUI.changeUsername", + value=>$userChange, + label=>$i18n->get(21,'AuthWebGUI') ); my $passwordChange = $self->session->setting->get("webguiChangePassword"); if($passwordChange || $passwordChange eq "0"){ $passwordChange = $userData->{changePassword}; } - $f->yesNo( - -name=>"authWebGUI.changePassword", - -value=>$passwordChange, - -label=>$i18n->get(20,'AuthWebGUI') + $f->addField( "yesNo", + name=>"authWebGUI.changePassword", + value=>$passwordChange, + label=>$i18n->get(20,'AuthWebGUI') ); - return $f->printRowsOnly; + return $f; } #------------------------------------------------------------------- @@ -451,7 +202,7 @@ sub editUserFormSave { my $self = shift; my $userId = $self->session->form->get("uid"); my $properties; - my $userData = $self->getParams($userId); + my $userData = $self->get; my $identifier = $self->session->form->process('authWebGUI.identifier'); unless (!$identifier || $identifier eq "password") { $properties->{identifier} = $self->hashPassword($self->session->form->process('authWebGUI.identifier')); @@ -469,7 +220,7 @@ sub editUserFormSave { } } - $self->SUPER::editUserFormSave($properties); + $self->update( $properties ); } #------------------------------------------------------------------- @@ -483,165 +234,165 @@ sub editUserFormSave { sub editUserSettingsForm { my $self = shift; my $i18n = WebGUI::International->new($self->session,'AuthWebGUI'); - my $f = WebGUI::HTMLForm->new($self->session); + my $f = WebGUI::FormBuilder->new($self->session); - $f->integer( - -name => "webguiPasswordLength", - -value => $self->session->setting->get("webguiPasswordLength"), - -label => $i18n->get(15), - -hoverHelp => $i18n->get('15 help'), + $f->addField( "integer", + name => "webguiPasswordLength", + value => $self->session->setting->get("webguiPasswordLength"), + label => $i18n->get(15), + hoverHelp => $i18n->get('15 help'), ); - $f->integer( - -name => "webguiRequiredDigits", - -label => $i18n->get('setting webguiRequiredDigits'), - -value => $self->session->setting->get("webguiRequiredDigits"), - -hoverHelp => $i18n->get('setting webguiRequiredDigits help'), + $f->addField( "integer", + name => "webguiRequiredDigits", + label => $i18n->get('setting webguiRequiredDigits'), + value => $self->session->setting->get("webguiRequiredDigits"), + hoverHelp => $i18n->get('setting webguiRequiredDigits help'), ); - $f->integer( - -name => "webguiNonWordCharacters", - -label => $i18n->get('setting webguiNonWordCharacters'), - -value => $self->session->setting->get("webguiNonWordCharacters"), - -hoverHelp => $i18n->get('setting webguiNonWordCharacters help'), + $f->addField( "integer", + name => "webguiNonWordCharacters", + label => $i18n->get('setting webguiNonWordCharacters'), + value => $self->session->setting->get("webguiNonWordCharacters"), + hoverHelp => $i18n->get('setting webguiNonWordCharacters help'), ); - $f->integer( - -name => "webguiRequiredMixedCase", - -label => $i18n->get('setting webguiRequiredMixedCase'), - -value => $self->session->setting->get("webguiRequiredMixedCase"), - -hoverHelp => $i18n->get('setting webguiRequiredMixedCase help'), + $f->addField( "integer", + name => "webguiRequiredMixedCase", + label => $i18n->get('setting webguiRequiredMixedCase'), + value => $self->session->setting->get("webguiRequiredMixedCase"), + hoverHelp => $i18n->get('setting webguiRequiredMixedCase help'), ); - $f->interval( - -name => "webguiPasswordTimeout", - -label => $i18n->get(16), - -value => $self->session->setting->get("webguiPasswordTimeout"), - -hoverHelp => $i18n->get('16 help'), + $f->addField( "interval", + name => "webguiPasswordTimeout", + label => $i18n->get(16), + value => $self->session->setting->get("webguiPasswordTimeout"), + hoverHelp => $i18n->get('16 help'), ); - $f->yesNo( - -name => "webguiExpirePasswordOnCreation", - -value => $self->session->setting->get("webguiExpirePasswordOnCreation"), - -label => $i18n->get(9), - -hoverHelp => $i18n->get('9 help') + $f->addField( "yesNo", + name => "webguiExpirePasswordOnCreation", + value => $self->session->setting->get("webguiExpirePasswordOnCreation"), + label => $i18n->get(9), + hoverHelp => $i18n->get('9 help') ); - $f->yesNo( - -name => "webguiSendWelcomeMessage", - -value => $self->session->setting->get("webguiSendWelcomeMessage"), - -label => $i18n->get(868,'WebGUI'), - -hoverHelp => $i18n->get('868 help','WebGUI'), + $f->addField( "yesNo", + name => "webguiSendWelcomeMessage", + value => $self->session->setting->get("webguiSendWelcomeMessage"), + label => $i18n->get(868,'WebGUI'), + hoverHelp => $i18n->get('868 help','WebGUI'), ); - $f->HTMLArea( - -name => "webguiWelcomeMessage", - -value => $self->session->setting->get("webguiWelcomeMessage"), - -label => $i18n->get(869,'WebGUI'), - -hoverHelp => $i18n->get('869 help','WebGUI'), + $f->addField( "HTMLArea", + name => "webguiWelcomeMessage", + value => $self->session->setting->get("webguiWelcomeMessage"), + label => $i18n->get(869,'WebGUI'), + hoverHelp => $i18n->get('869 help','WebGUI'), ); - $f->yesNo( - -name => "webguiUseEmailAsUsername", - -value => $self->session->setting->get("webguiUseEmailAsUsername"), - -label => $i18n->get('use email as username label'), - -hoverHelp => $i18n->get('use email as username description'), + $f->addField( "yesNo", + name => "webguiUseEmailAsUsername", + value => $self->session->setting->get("webguiUseEmailAsUsername"), + label => $i18n->get('use email as username label'), + hoverHelp => $i18n->get('use email as username description'), ); - $f->yesNo( - -name => "webguiChangeUsername", - -value => $self->session->setting->get("webguiChangeUsername"), - -label => $i18n->get(19), - -hoverHelp => $i18n->get('19 help'), + $f->addField( "yesNo", + name => "webguiChangeUsername", + value => $self->session->setting->get("webguiChangeUsername"), + label => $i18n->get(19), + hoverHelp => $i18n->get('19 help'), ); - $f->yesNo( - -name => "webguiChangePassword", - -value => $self->session->setting->get("webguiChangePassword"), - -label => $i18n->get(18), - -hoverHelp => $i18n->get('18 help'), + $f->addField( "yesNo", + name => "webguiChangePassword", + value => $self->session->setting->get("webguiChangePassword"), + label => $i18n->get(18), + hoverHelp => $i18n->get('18 help'), ); - $f->selectList( - -name => "webguiPasswordRecovery", - -value => $self->session->setting->get("webguiPasswordRecovery"), - -label => $i18n->get(6), - -hoverHelp => $i18n->get('webguiPasswordRecovery hoverHelp'), - -options => $self->getPasswordRecoveryTypesAvailable, - -size => 1, - -multiple => 0, + $f->addField( "selectList", + name => "webguiPasswordRecovery", + value => $self->session->setting->get("webguiPasswordRecovery"), + label => $i18n->get(6), + hoverHelp => $i18n->get('webguiPasswordRecovery hoverHelp'), + options => $self->getPasswordRecoveryTypesAvailable, + size => 1, + multiple => 0, ); - $f->yesNo( - -name => "webguiPasswordRecoveryRequireUsername", - -value => $self->session->setting->get("webguiPasswordRecoveryRequireUsername"), - -label => $i18n->get('require username for password recovery'), - -hoverHelp => $i18n->get('webguiPasswordRecoveryRequireUsername hoverHelp'), + $f->addField( "yesNo", + name => "webguiPasswordRecoveryRequireUsername", + value => $self->session->setting->get("webguiPasswordRecoveryRequireUsername"), + label => $i18n->get('require username for password recovery'), + hoverHelp => $i18n->get('webguiPasswordRecoveryRequireUsername hoverHelp'), ); - $f->yesNo( - -name => "webguiValidateEmail", - -value => $self->session->setting->get("webguiValidateEmail"), - -label => $i18n->get('validate email'), - -hoverHelp => $i18n->get('validate email help'), + $f->addField( "yesNo", + name => "webguiValidateEmail", + value => $self->session->setting->get("webguiValidateEmail"), + label => $i18n->get('validate email'), + hoverHelp => $i18n->get('validate email help'), ); - $f->yesNo( - -name => "webguiUseCaptcha", - -value => $self->session->setting->get("webguiUseCaptcha"), - -label => $i18n->get('use captcha'), - -hoverHelp => $i18n->get('use captcha help'), + $f->addField( "yesNo", + name => "webguiUseCaptcha", + value => $self->session->setting->get("webguiUseCaptcha"), + label => $i18n->get('use captcha'), + hoverHelp => $i18n->get('use captcha help'), ); - $f->template( - -name => "webguiAccountTemplate", - -value => $self->session->setting->get("webguiAccountTemplate"), - -namespace => "Auth/WebGUI/Account", - -label => $i18n->get("account template"), - -hoverHelp => $i18n->get("account template help"), + $f->addField( "template", + name => "webguiAccountTemplate", + value => $self->session->setting->get("webguiAccountTemplate"), + namespace => "Auth/WebGUI/Account", + label => $i18n->get("account template"), + hoverHelp => $i18n->get("account template help"), ); - $f->template( - -name => "webguiCreateAccountTemplate", - -value => $self->session->setting->get("webguiCreateAccountTemplate"), - -namespace => "Auth/WebGUI/Create", - -label => $i18n->get("create account template"), - -hoverHelp => $i18n->get("create account template help"), + $f->addField( "template", + name => "webguiCreateAccountTemplate", + value => $self->session->setting->get("webguiCreateAccountTemplate"), + namespace => "Auth/WebGUI/Create", + label => $i18n->get("create account template"), + hoverHelp => $i18n->get("create account template help"), ); - $f->template( - -name => "webguiDeactivateAccountTemplate", - -value => $self->session->setting->get("webguiDeactivateAccountTemplate"), - -namespace => "Auth/WebGUI/Deactivate", - -label => $i18n->get("deactivate account template"), - -hoverHelp => $i18n->get("deactivate account template help"), + $f->addField( "template", + name => "webguiDeactivateAccountTemplate", + value => $self->session->setting->get("webguiDeactivateAccountTemplate"), + namespace => "Auth/WebGUI/Deactivate", + label => $i18n->get("deactivate account template"), + hoverHelp => $i18n->get("deactivate account template help"), ); - $f->template( - -name => "webguiExpiredPasswordTemplate", - -value => $self->session->setting->get("webguiExpiredPasswordTemplate"), - -namespace => "Auth/WebGUI/Expired", - -label => $i18n->get("expired password template"), - -hoverHelp => $i18n->get("expired password template"), + $f->addField( "template", + name => "webguiExpiredPasswordTemplate", + value => $self->session->setting->get("webguiExpiredPasswordTemplate"), + namespace => "Auth/WebGUI/Expired", + label => $i18n->get("expired password template"), + hoverHelp => $i18n->get("expired password template"), ); - $f->template( - -name => "webguiLoginTemplate", - -value => $self->session->setting->get("webguiLoginTemplate"), - -namespace => "Auth/WebGUI/Login", - -label => $i18n->get("login template"), - -hoverHelp => $i18n->get("login template help"), + $f->addField( "template", + name => "webguiLoginTemplate", + value => $self->session->setting->get("webguiLoginTemplate"), + namespace => "Auth/WebGUI/Login", + label => $i18n->get("login template"), + hoverHelp => $i18n->get("login template help"), ); - $f->template( - -name => "webguiPasswordRecoveryTemplate", - -value => $self->session->setting->get("webguiPasswordRecoveryTemplate"), - -namespace => "Auth/WebGUI/Recovery2", - -label => $i18n->get("password recovery template"), - -hoverHelp => $i18n->get("password recovery template help") + $f->addField( "template", + name => "webguiPasswordRecoveryTemplate", + value => $self->session->setting->get("webguiPasswordRecoveryTemplate"), + namespace => "Auth/WebGUI/Recovery2", + label => $i18n->get("password recovery template"), + hoverHelp => $i18n->get("password recovery template help") ); - $f->template( - -name => "webguiPasswordRecoveryEmailTemplate", - -value => $self->session->setting->get('webguiPasswordRecoveryEmailTemplate'), - -label => $i18n->get('Password Recovery Email Template'), - -hoverHelp => $i18n->get("password recovery email template help"), - -namespace => "Auth/WebGUI/RecoveryEmail", + $f->addField( "template", + name => "webguiPasswordRecoveryEmailTemplate", + value => $self->session->setting->get('webguiPasswordRecoveryEmailTemplate'), + label => $i18n->get('Password Recovery Email Template'), + hoverHelp => $i18n->get("password recovery email template help"), + namespace => "Auth/WebGUI/RecoveryEmail", ); - $f->template( - -name => "webguiWelcomeMessageTemplate", - -value => $self->session->setting->get("webguiWelcomeMessageTemplate"), - -namespace => "Auth/WebGUI/Welcome", - -label => $i18n->get("welcome message template"), - -hoverHelp => $i18n->get("welcome message template help") + $f->addField( "template", + name => "webguiWelcomeMessageTemplate", + value => $self->session->setting->get("webguiWelcomeMessageTemplate"), + namespace => "Auth/WebGUI/Welcome", + label => $i18n->get("welcome message template"), + hoverHelp => $i18n->get("welcome message template help") ); - $f->template( - -name => "webguiAccountActivationTemplate", - -value => $self->session->setting->get("webguiAccountActivationTemplate"), - -namespace => "Auth/WebGUI/Activation", - -label => $i18n->get("account activation template"), - -hoverHelp => $i18n->get("account activation template help") + $f->addField( "template", + name => "webguiAccountActivationTemplate", + value => $self->session->setting->get("webguiAccountActivationTemplate"), + namespace => "Auth/WebGUI/Activation", + label => $i18n->get("account activation template"), + hoverHelp => $i18n->get("account activation template help") ); - return $f->printRowsOnly; + return $f; } #------------------------------------------------------------------- @@ -790,44 +541,284 @@ sub hashPassword { return Digest::MD5::md5_base64(Encode::encode_utf8($password)); } +#------------------------------------------------------------------- +sub www_createAccount { + my $self = shift; + my $session = $self->session; + my $form = $session->form; + my $setting = $session->setting; + + my $message = shift; + my $confirm = shift || $form->process("confirm"); + my $vars = shift || {}; + my $i18n = WebGUI::International->new($session); + + if ($self->session->user->isRegistered) { + return $self->www_displayAccount; + } + elsif (!$setting->get("anonymousRegistration") && !$setting->get('inboxInviteUserEnabled')) { + return $self->www_displayLogin; + } + + $vars->{'create.message'} = '
      '.$message.'
    ' if ($message); + $vars->{'useCaptcha' } = $setting->get("webguiUseCaptcha"); + + if ($vars->{useCaptcha}) { + use WebGUI::Form::Captcha; + my $captcha = WebGUI::Form::Captcha->new($session,{ + name => "authWebGUI.captcha", + extras => $self->getExtrasStyle + }); + $vars->{'create.form.captcha'} + = $captcha->toHtml . '' . $captcha->get('subtext').''; + $vars->{'create.form.captcha.label'} = $i18n->get("captcha label","AuthWebGUI"); + } + + unless($setting->get('webguiUseEmailAsUsername')){ + my $username = $form->process("authWebGUI.username"); + $vars->{'create.form.username'} + = WebGUI::Form::username($self->session, { + name => "authWebGUI.username", + value => $username, + extras => $self->getExtrasStyle($username) + }); + $vars->{'create.form.username.label'} = $i18n->get(50); + } + + my $password = $form->process("authWebGUI.identifier"); + $vars->{'create.form.password'} + = WebGUI::Form::password($self->session, { + name => "authWebGUI.identifier", + value => $password, + extras => $self->getExtrasStyle($password) + }); + $vars->{'create.form.password.label'} = $i18n->get(51); + + my $passwordConfirm = $form->process("authWebGUI.identifierConfirm"); + $vars->{'create.form.passwordConfirm'} + = WebGUI::Form::password($self->session, { + name => "authWebGUI.identifierConfirm", + value => $passwordConfirm, + extras => $self->getExtrasStyle($passwordConfirm) + }); + $vars->{'create.form.passwordConfirm.label'} = $i18n->get(2,'AuthWebGUI'); + + $vars->{'create.form.hidden'} + = WebGUI::Form::hidden($self->session, { + "name" => "confirm", + "value" => $confirm + }); + $vars->{'recoverPassword.isAllowed' } = $self->getSetting("passwordRecovery"); + $vars->{'recoverPassword.url' } = $self->session->url->page('op=auth;method=recoverPassword'); + $vars->{'recoverPassword.label' } = $i18n->get(59); + return $self->SUPER::www_createAccount("createAccountSave",$vars); +} #------------------------------------------------------------------- -sub login { +sub www_createAccountSave { + my $self = shift; + my $session = $self->session; + my $form = $self->session->form; + my $setting = $self->session->setting; + my $i18n = WebGUI::International->new($session); + + # Logged in users cannot see this page + return $self->www_displayAccount if ($session->user->isRegistered); + + # Make sure anonymous registration is enabled + if (!$setting->get("anonymousRegistration") && !$setting->get("inboxInviteUserEnabled")) { + $session->log->security($i18n->get("no registration hack", "AuthWebGUI")); + return $self->www_displayLogin; + } + my $username; + if($setting->get('webguiUseEmailAsUsername')){ + $username = $form->process('email'); + } + else{ + $username = $form->process('authWebGUI.username'); + } + my $password = $form->process('authWebGUI.identifier'); + my $passConfirm = $form->process('authWebGUI.identifierConfirm'); + + # Validate input + my $error; + $error = $self->error unless($self->validUsername($username)); + if ($setting->get("webguiUseCaptcha")) { + my $form = WebGUI::Form::Captcha->new($session, {name => 'authWebGUI.captcha'}); + if (! $form->getValue) { + $error .= '
  • ' . $form->getErrorMessage . '
  • '; + } + } + $error .= $self->error unless($self->_isValidPassword($password,$passConfirm)); + + my $fields = WebGUI::ProfileField->getRegistrationFields($session); + my $retHash = $self->user->validateProfileDataFromForm($fields); + my $profile = $retHash->{profile}; + my $temp = ""; + my $warning = ""; + + my $format = "
  • %s
  • "; + map { $warning .= sprintf($format,$_) } @{$retHash->{warnings}}; + map { $temp .= sprintf($format,$_) } @{$retHash->{errors}}; + + $error .= $temp; + + unless ($error eq "") { + $self->error($error); + return $self->www_createAccount($error); + } + + # If Email address is not unique, a warning is displayed + if ($warning ne "" && !$self->session->form->process("confirm")) { + return $self->www_createAccount('
  • '.$i18n->get(1078).'
  • ', 1); + } + + # Create the new account + my $properties; + $properties->{ changeUsername } = $setting->get("webguiChangeUsername"); + $properties->{ changePassword } = $setting->get("webguiChangePassword"); + $properties->{ identifier } = $self->hashPassword($password); + $properties->{ passwordLastUpdated } = time(); + $properties->{ passwordTimeout } = $setting->get("webguiPasswordTimeout"); + + my $afterCreateMessage = $self->SUPER::createAccountSave($username,$properties,$password,$profile); + + my $sendEmail = $setting->get('webguiValidateEmail'); + + # We need to deactivate the user and log him out if there are additional + # things that need to be done before he should be logged in. + my $cleanupUser; + if ($sendEmail || !$setting->get('enableUsersAfterAnonymousRegistration')) { + $cleanupUser = guard { + $self->user->status('Deactivated'); + $session->var->end($session->var->get('sessionId')); + $session->var->start(1, $session->getId); + my $u = WebGUI::User->new($session, 1); + $self->{user} = $u; + $self->logout; + }; + } + + + # Send validation e-mail if required + if ($sendEmail) { + my $key = $session->id->generate; + $self->update(emailValidationKey=>$key); + my $mail = WebGUI::Mail::Send->create($self->session, { + to => $profile->{email}, + subject => $i18n->get('email address validation email subject','AuthWebGUI') + }); + my $var; + $var->{newUser_username} = $username; + $var->{activationUrl} = $session->url->page("op=auth;method=validateEmail;key=".$key, 'full'); + my $text = +WebGUI::Asset::Template->newById($self->session,$self->getSetting('accountActivationTemplate'))->process($var); + WebGUI::Macro::process($self->session,\$text); + $mail->addText($text); + $mail->addFooter; + $mail->queue; + return $self->www_displayLogin($i18n->get('check email for validation','AuthWebGUI')); + } + return $afterCreateMessage; +} + +#------------------------------------------------------------------- +sub www_deactivateAccount { + my $self = shift; + return $self->www_displayLogin if($self->isVisitor); + return $self->SUPER::www_deactivateAccount("deactivateAccountConfirm"); +} + +#------------------------------------------------------------------- +sub www_deactivateAccountConfirm { + my $self = shift; + return $self->www_displayLogin unless ($self->session->setting->get("selfDeactivation")); + + # Keep the username for a nice message + my $username = $self->user->username; + + # Deactivate the account + my $response = $self->SUPER::www_deactivateAccountConfirm; + + # If there was a response, it's probably an error + return $response if $response; + + # Otherwise show the login form with a friendly message + my $i18n = WebGUI::International->new($self->session); + return $self->www_displayLogin(sprintf( $i18n->get("deactivateAccount success"), $username )); +} + +#------------------------------------------------------------------- +sub www_displayAccount { + my $self = shift; + my $vars; + return $self->www_displayLogin($_[0]) if ($self->isVisitor); + my $i18n = WebGUI::International->new($self->session); + my $userData = $self->get; + $vars->{'account.message'} = $_[0] if ($_[0]); + $vars->{'account.noform'} = 1; + if($userData->{changeUsername} || (!defined $userData->{changeUsername} && $self->session->setting->get("webguiChangeUsername"))){ + $vars->{'account.form.username'} = WebGUI::Form::text($self->session,{"name"=>"authWebGUI.username","value"=>$self->username}); + $vars->{'account.form.username.label'} = $i18n->get(50); + $vars->{'account.noform'} = 0; + } + if($userData->{changePassword} || (!defined $userData->{changePassword} && $self->session->setting->get("webguiChangePassword"))){ + $vars->{'account.form.password'} = WebGUI::Form::password($self->session,{"name"=>"authWebGUI.identifier","value"=>"password"}); + $vars->{'account.form.password.label'} = $i18n->get(51); + $vars->{'account.form.passwordConfirm'} = WebGUI::Form::password($self->session,{"name"=>"authWebGUI.identifierConfirm","value"=>"password"}); + $vars->{'account.form.passwordConfirm.label'} = $i18n->get(2,'AuthWebGUI'); + $vars->{'account.noform'} = 0; + } + $vars->{'account.nofields'} = $i18n->get(22,'AuthWebGUI'); + return $self->SUPER::www_displayAccount("updateAccount",$vars); +} + +#------------------------------------------------------------------- + +=head2 www_displayLogin ( ) + +The initial login screen an unauthenticated user sees + +=cut + +sub www_displayLogin { + my $self = shift; + my $vars; + return $self->www_displayAccount($_[0]) if ($self->isRegistered); + my $i18n = WebGUI::International->new($self->session); + $vars->{'login.message'} = '
      '.$_[0].'
    ' if ($_[0]); + $vars->{'recoverPassword.isAllowed'} = $self->getSetting("passwordRecovery"); + $vars->{'recoverPassword.url'} = $self->session->url->page('op=auth;method=recoverPassword'); + $vars->{'recoverPassword.label'} = $i18n->get(59); + return $self->SUPER::www_displayLogin("login",$vars); +} + +#------------------------------------------------------------------- +sub www_login { my $self = shift; if(!$self->authenticate($self->session->form->process("username"),$self->session->form->process("identifier"))){ - $self->session->http->setStatus("401","Incorrect Credentials"); - $self->session->errorHandler->security("login to account ".$self->session->form->process("username")." with invalid information."); + $self->session->response->status(401); + $self->session->log->security("login to account ".$self->session->form->process("username")." with invalid information."); my $i18n = WebGUI::International->new($self->session); - return $self->displayLogin("

    ".$i18n->get(70)."

    ".$self->error); + return $self->www_displayLogin("

    ".$i18n->get(70)."

    ".$self->error); } - my $userData = $self->getParams; + my $userData = $self->get; if($self->getSetting("passwordTimeout") && $userData->{passwordTimeout}){ my $expireTime = $userData->{passwordLastUpdated} + $userData->{passwordTimeout}; if (time() >= $expireTime){ my $userId = $self->userId; $self->logout; - return $self->resetExpiredPassword($userId); + return $self->www_resetExpiredPassword($userId); } } - return $self->SUPER::login(); -} - -#------------------------------------------------------------------- -sub new { - my $class = shift; - my $session = shift; - my $authMethod = $_[0]; - my $userId = $_[1]; - my @callable = ('validateEmail','createAccount','deactivateAccount','displayAccount','displayLogin','login','logout','recoverPassword','resetExpiredPassword','recoverPasswordFinish','createAccountSave','deactivateAccountConfirm','resetExpiredPasswordSave','updateAccount', 'emailResetPassword', 'emailResetPasswordFinish'); - my $self = WebGUI::Auth->new($session,$authMethod,$userId,\@callable); - bless $self, $class; + return $self->SUPER::www_login(); } #------------------------------------------------------------------- -=head2 recoverPassword ( args ) +=head2 www_recoverPassword ( args ) Initiates the password recovery process. Checks for recovery type, and then runs the appropriate method. Arguments to this sub are @@ -835,24 +826,26 @@ passed directly to the approprate method. =cut -sub recoverPassword { +sub www_recoverPassword { my $self = shift; - return $self->displayLogin unless ($self->session->setting->get('webguiPasswordRecovery') ne '') and $self->isVisitor; + return $self->www_displayLogin unless ($self->session->setting->get('webguiPasswordRecovery') ne '') and $self->isVisitor; my $type = $self->getPasswordRecoveryType; if ($type eq 'profile') { - $self->profileRecoverPassword(@_); + $self->www_profileRecoverPassword(@_); } elsif ($type eq 'email') { - $self->emailRecoverPassword(@_); + $self->www_emailRecoverPassword(@_); } } - + +deprecate 'recoverPassword' => 'www_recoverPassword'; + #------------------------------------------------------------------- -=head2 emailRecoverPassword ( $error ) +=head2 www_emailRecoverPassword ( $error ) Templated email recovery form. @@ -862,7 +855,7 @@ $error is any error from the system which needs to be reported to the user. =cut -sub emailRecoverPassword { +sub www_emailRecoverPassword { my $self = shift; my $session = $self->session; my $i18n = WebGUI::International->new($session); @@ -904,16 +897,18 @@ sub emailRecoverPassword { $vars->{'recoverFormUsername'} = WebGUI::Form::text($session, {name => 'username'}); $vars->{'recoverFormUsernameLabel'} = $i18n->get(50); - return WebGUI::Asset::Template->new($self->session,$self->getPasswordRecoveryTemplateId)->process($vars); + return WebGUI::Asset::Template->newById($self->session,$self->getPasswordRecoveryTemplateId)->process($vars); } - + +deprecate 'emailRecoverPassword' => 'www_emailRecoverPassword'; + #------------------------------------------------------------------- -sub profileRecoverPassword { +sub www_profileRecoverPassword { my $self = shift; my @fields = @{WebGUI::ProfileField->getPasswordRecoveryFields($self->session)}; - return $self->displayLogin unless @fields; + return $self->www_displayLogin unless @fields; my $vars = {}; my $i18n = WebGUI::International->new($self->session); @@ -949,12 +944,14 @@ sub profileRecoverPassword { $vars->{'recoverFormUsernameLabel'} = $i18n->get(50); } - return WebGUI::Asset::Template->new($self->session,$self->getPasswordRecoveryTemplateId)->process($vars); + return WebGUI::Asset::Template->newById($self->session,$self->getPasswordRecoveryTemplateId)->process($vars); } - + +deprecate 'profileRecoverPassword' => 'www_profileRecoverPassword'; + #------------------------------------------------------------------- -=head2 recoverPasswordFinish ( args ) +=head2 www_recoverPasswordFinish ( args ) Handles data for recovery of password. Gets password recovery type, and then runs the appropriate method. Arguments are passed directly @@ -962,35 +959,37 @@ to the appropriate method. =cut -sub recoverPasswordFinish { +sub www_recoverPasswordFinish { my $self = shift; my $type = $self->getPasswordRecoveryType; if ($type eq 'profile') { - $self->profileRecoverPasswordFinish(@_); + $self->www_profileRecoverPasswordFinish(@_); } elsif ($type eq 'email') { - $self->emailRecoverPasswordFinish(@_); + $self->www_emailRecoverPasswordFinish(@_); } - } - +} + +deprecate 'recoverPasswordFinish' => 'www_recoverPasswordFinish'; + #------------------------------------------------------------------- -sub profileRecoverPasswordFinish { +sub www_profileRecoverPasswordFinish { my $self = shift; my $session = $self->session; my $i18n = WebGUI::International->new($self->session); my $i18n2 = WebGUI::International->new($self->session, 'AuthWebGUI'); - return $self->displayLogin unless ($self->session->setting->get('webguiPasswordRecovery') ne '') and $self->isVisitor; + return $self->www_displayLogin unless ($self->session->setting->get('webguiPasswordRecovery') ne '') and $self->isVisitor; my $username; if ($self->getSetting('passwordRecoveryRequireUsername')) { $username = $self->session->form->process('authWebGUI.username'); - return $self->recoverPassword($i18n->get('password recovery no username', 'AuthWebGUI')) unless defined $username; + return $self->www_recoverPassword($i18n->get('password recovery no username', 'AuthWebGUI')) unless defined $username; } my @fields = @{WebGUI::ProfileField->getPasswordRecoveryFields($self->session)}; - return $self->displayLogin unless @fields; + return $self->www_displayLogin unless @fields; my %fieldValues; my @failedRequiredFields; @@ -1004,21 +1003,21 @@ sub profileRecoverPasswordFinish { my $errorMessage = '
      ' . join("\n", map { '
    • ' . $_->getLabel . ' ' . $i18n->get(451) . '
    • ' } @failedRequiredFields) . '
    '; - return $self->recoverPassword($errorMessage); + return $self->www_recoverPassword($errorMessage); } my @fieldNames = keys %fieldValues; my @fieldValues = values %fieldValues; - my $wheres = join(' ', map{"AND upd.$fieldNames[$_] = ?"} (0..$#fieldNames)); + my $wheres = join(' ', map{"AND $fieldNames[$_] = ?"} (0..$#fieldNames)); $wheres .= ' AND u.username = ?' if defined $username; my $sql = "SELECT u.userId FROM users AS u JOIN userProfileData AS upd ON u.userId=upd.userId WHERE u.authMethod = ? $wheres"; my @userIds = $self->session->db->buildArray($sql, [$self->authMethod, @fieldValues, (defined($username)? ($username) : ())]); if (@userIds == 0) { - return $self->recoverPassword($i18n2->get('password recovery no results')); + return $self->www_recoverPassword($i18n2->get('password recovery no results')); } elsif (@userIds > 1) { - return $self->recoverPassword($i18n2->get('password recovery multiple results')); + return $self->www_recoverPassword($i18n2->get('password recovery multiple results')); } # Exactly one result. @@ -1027,7 +1026,7 @@ sub profileRecoverPasswordFinish { # Make sure the userId is not disabled my $user = WebGUI::User->new($self->session, $userId); if ( $user->status ne "Active" ) { - return $self->recoverPassword( $i18n2->get( 'password recovery disabled' ) ); + return $self->www_recoverPassword( $i18n2->get( 'password recovery disabled' ) ); } my ($password, $passwordConfirm) = ($self->session->form->process('authWebGUI.identifier'), $self->session->form->process('authWebGUI.identifierConfirm')); @@ -1075,26 +1074,28 @@ sub profileRecoverPasswordFinish { # Mrgh. z.z $vars->{'doingRecovery'} = 1; - return WebGUI::Asset::Template->new($self->session, $self->getPasswordRecoveryTemplateId)->process($vars); + return WebGUI::Asset::Template->newById($self->session, $self->getPasswordRecoveryTemplateId)->process($vars); } if ($self->_isValidPassword($password, $passwordConfirm)) { $self->user( $user ); - $self->saveParams($userId, $self->authMethod, - { identifier => $self->hashPassword($password), - passwordLastUpdated => time }); + $self->update( + identifier => $self->hashPassword($password), + passwordLastUpdated => time); $self->_logSecurityMessage; - return $self->SUPER::login; + return $self->SUPER::www_login; } else { - return $self->recoverPassword('
    • '.$self->error.'
    '); + return $self->www_recoverPassword('
    • '.$self->error.'
    '); } } +deprecate 'profileRecoverPasswordFinish' => 'www_profileRecoverPasswordFinish'; + #------------------------------------------------------------------- -sub emailRecoverPasswordFinish { +sub www_emailRecoverPasswordFinish { my $self = shift; - return $self->displayLogin unless ($self->session->setting->get('webguiPasswordRecovery') ne '') and $self->isVisitor; + return $self->www_displayLogin unless ($self->session->setting->get('webguiPasswordRecovery') ne '') and $self->isVisitor; my $i18n = WebGUI::International->new($self->session); my $session = $self->session; @@ -1112,33 +1113,33 @@ sub emailRecoverPasswordFinish { # return error unless we get a valid user.\ unless ($user) { - return $self->recoverPassword( $i18n->get('recover password not found', 'AuthWebGUI') ); + return $self->www_recoverPassword( $i18n->get('recover password not found', 'AuthWebGUI') ); } # Make sure the user is Active if ( $user->status ne "Active" ) { - return $self->recoverPassword( $i18n->get( 'password recovery disabled', 'AuthWebGUI' ) ); + return $self->www_recoverPassword( $i18n->get( 'password recovery disabled', 'AuthWebGUI' ) ); } # generate information necessry to proceed my $recoveryGuid = $session->id->generate(); my $userId = $user->userId; #get the user guid - $email = $user->profileField('email'); + $email = $user->get('email'); if ( ! $email ) { - return $self->recoverPassword( $i18n->get( 'no email address', 'AuthWebGUI' ) ); + return $self->www_recoverPassword( $i18n->get( 'no email address', 'AuthWebGUI' ) ); } - my $authsettings = $self->getParams($userId); + my $authsettings = $self->get; $authsettings->{emailRecoverPasswordVerificationNumber} = $recoveryGuid; - $self->saveParams($userId, 'WebGUI', $authsettings); + $self->update($authsettings); my $mail = WebGUI::Mail::Send->create($session, { to=>$email, subject=>$i18n->get('WebGUI password recovery')}); my $vars = { }; $vars->{recoverPasswordUrl} = $session->url->append($session->url->getSiteURL,'op=auth;method=emailResetPassword;token='.$recoveryGuid); my $templateId = $session->setting->get('webguiPasswordRecoveryEmailTemplate'); - my $template = WebGUI::Asset->newByDynamicClass($session, $templateId); + my $template = WebGUI::Asset->newById($session, $templateId); if (!$template) { $session->errorHandler->error("Can't instantiate template $templateId for template email recovery"); my $i18n = WebGUI::International->new($self->session, 'Asset'); @@ -1151,10 +1152,12 @@ sub emailRecoverPasswordFinish { return "

    ". $i18n->get('recover password banner', 'AuthWebGUI')."



    ". $i18n->get('email recover password finish message', 'AuthWebGUI') . "

    "; } +deprecate emailRecoverPasswordFinish => 'www_emailRecoverPasswordFinish'; + #------------------------------------------------------------------- # handler for the link generated and mailed by emailRecoverPasswordFinish -sub emailResetPassword { +sub www_emailResetPassword { my $self = shift; my $errormsg = shift; @@ -1222,9 +1225,11 @@ sub emailResetPassword { } +deprecate 'emailResetPassword' => 'www_emailResetPassword'; + #------------------------------------------------------------------- -sub emailResetPasswordFinish { +sub www_emailResetPasswordFinish { my $self = shift; my $session = $self->session; my ($form) = $session->quick(qw/form/); @@ -1241,22 +1246,24 @@ sub emailResetPasswordFinish { if ($self->_isValidPassword($password, $passwordConfirm)) { $self->user(WebGUI::User->new($self->session, $userId)); - $self->saveParams($userId, $self->authMethod, - { identifier => $self->hashPassword($password), - passwordLastUpdated => time }); + $self->update( + identifier => $self->hashPassword($password), + passwordLastUpdated => time); $self->_logSecurityMessage; # delete the emailRecoverPasswordVerificationNumber - $self->deleteSingleParam($userId, $self->authMethod, 'emailRecoverPasswordVerificationNumber'); - return $self->SUPER::login; + $self->delete('emailRecoverPasswordVerificationNumber'); + return $self->SUPER::www_login; } else { - return $self->emailResetPassword($self->error); + return $self->www_emailResetPassword($self->error); } } +deprecate emailResetPasswordFinish => 'www_emailResetPasswordFinish'; + #------------------------------------------------------------------- -sub resetExpiredPassword { +sub www_resetExpiredPassword { my $self = shift; my $uid = shift || $self->session->form->process("uid"); my $vars; @@ -1278,11 +1285,13 @@ sub resetExpiredPassword { $vars->{'expired.form.submit'} = WebGUI::Form::submit($self->session,{}); $vars->{'expired.form.footer'} = WebGUI::Form::formFooter($self->session,); - return WebGUI::Asset::Template->new($self->session,$self->getExpiredPasswordTemplateId)->process($vars); + return WebGUI::Asset::Template->newById($self->session,$self->getExpiredPasswordTemplateId)->process($vars); } +deprecate resetExpiredPassword => 'www_resetExpiredPassword'; + #------------------------------------------------------------------- -sub resetExpiredPasswordSave { +sub www_resetExpiredPasswordSave { my $self = shift; my ($error,$u,$properties,$msg); @@ -1294,18 +1303,20 @@ sub resetExpiredPasswordSave { $error .= '
  • '.$i18n->get(12,'AuthWebGUI').'
  • ' if ($self->session->form->process("oldPassword") eq $self->session->form->process("identifier")); $error .= $self->error if(!$self->_isValidPassword($self->session->form->process("identifier"),$self->session->form->process("identifierConfirm"))); - return $self->resetExpiredPassword($u->userId, "

    ".$i18n->get(70)."

      ".$error.'
    ') if ($error); + return $self->www_resetExpiredPassword($u->userId, "

    ".$i18n->get(70)."

      ".$error.'
    ') if ($error); $properties->{identifier} = $self->hashPassword($self->session->form->process("identifier")); $properties->{passwordLastUpdated} =time(); - $self->saveParams($u->userId,$self->authMethod,$properties); + $self->update($properties); $self->_logSecurityMessage(); - return $self->SUPER::login(); + return $self->SUPER::www_login(); } +deprecate resetExpiredPasswordSave => 'www_resetExpiredPasswordSave'; + #------------------------------------------------------------------- -sub validateEmail { +sub www_validateEmail { my $self = shift; my $session = $self->session; my ($userId) = $session->db->quickArray("select userId from authentication where fieldData=? and fieldName='emailValidationKey' and authMethod='WebGUI'", [$session->form->process("key")]); @@ -1317,19 +1328,20 @@ sub validateEmail { $self->session->db->write("DELETE FROM authentication WHERE userId = ? AND fieldName = 'emailValidationKey'", [$userId]); $message = $i18n->get('email validation confirmed','AuthWebGUI'); } - return $self->displayLogin($message); + return $self->www_displayLogin($message); } +deprecate validateEmail => 'www_validateEmail'; #------------------------------------------------------------------- -=head2 updateAccount ( ) +=head2 www_updateAccount ( ) Sets properties to update and passes them to the superclass =cut -sub updateAccount { +sub www_updateAccount { my $self = shift; my $i18n = WebGUI::International->new($self->session); @@ -1340,7 +1352,7 @@ sub updateAccount { my $error = ""; if($self->isVisitor){ - return $self->displayLogin; + return $self->www_displayLogin; } if($username){ @@ -1370,7 +1382,7 @@ sub updateAccount { $u->username($username); } if($password){ - my $userData = $self->getParams; + my $userData = $self->get; unless ($password eq "password") { $properties->{identifier} = $self->hashPassword($password); $self->_logSecurityMessage(); @@ -1380,11 +1392,13 @@ sub updateAccount { } } } - $self->saveParams($u->userId,$self->authMethod,$properties); + $self->update($properties); $self->session->user(undef,undef,$u); - return $self->displayAccount($display); + return $self->www_displayAccount($display); } +deprecate updateAccount => 'www_updateAccount'; + 1; diff --git a/lib/WebGUI/BestPractices.pm b/lib/WebGUI/BestPractices.pm new file mode 100644 index 000000000..910974e63 --- /dev/null +++ b/lib/WebGUI/BestPractices.pm @@ -0,0 +1,49 @@ +package WebGUI::BestPractices; + +=head1 LEGAL + + ------------------------------------------------------------------- + WebGUI is Copyright 2001-2012 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 + ------------------------------------------------------------------- + +=head1 NAME + +WebGUI::BestPractices - Enable WebGUI best practice pragmas + +=head1 SYNOPSIS + + use WebGUI::BestPractices; + +=head1 DESCRIPTION + +This module is the equivalent of adding the following to your module: + + use strict; + use warnings; + no warnings 'uninitialized'; + use feature; + use namespace::autoclean; + +=cut + +use strict; +use warnings; +use feature ':5.10'; +use namespace::autoclean (); + +sub import { + my $caller = caller; + strict->import; + warnings->import; + warnings->unimport('uninitialized'); + feature->import(':5.10'); + namespace::autoclean->import( -cleanee => $caller ); +} + +1; diff --git a/lib/WebGUI/Cache.pm b/lib/WebGUI/Cache.pm deleted file mode 100644 index e21984e03..000000000 --- a/lib/WebGUI/Cache.pm +++ /dev/null @@ -1,267 +0,0 @@ -package WebGUI::Cache; - -=head1 LEGAL - - ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. - ------------------------------------------------------------------- - Please read the legal notices (docs/legal.txt) and the license - (docs/license.txt) that came with this distribution before using - this software. - ------------------------------------------------------------------- - http://www.plainblack.com info@plainblack.com - ------------------------------------------------------------------- - -=cut - -use strict; -use File::Path (); -use HTTP::Headers; -use HTTP::Request; -use LWP::UserAgent; -use Digest::MD5; - -=head1 NAME - -Package WebGUI::Cache - -=head1 DESCRIPTION - -A base class for all Cache modules to extend. - -=head1 SYNOPSIS - - use WebGUI::Cache; - - my $cache = WebGUI::Cache->new($session, "my app cache"); - my $cache = WebGUI::Cache->new($session, [ "my app", $assetId, $version ]); - - $cache->set($value); - $cache->setByHTTP("http://www.google.com/"); - - my $value = $cache->get; - - $cache->delete; - $cache->deleteChunk("my app cache"); - $cache->deleteChunk([ "my app", $assetId ]); - -=head1 METHODS - -These methods are available from this class: - -=cut - - -#------------------------------------------------------------------- - -=head2 delete ( ) - -Delete a key from the cache. Must be overridden. - -=cut - -sub delete { - -} - -#------------------------------------------------------------------- - -=head2 deleteChunk ( key ) - -Deletes a bunch of keys from the cache based upon a partial composite key. Unless overridden by the cache subclass this will just flush the whole cache. - -=head3 key - -An array reference representing the portion of the key to delete. So if you have a key like ["asset","abc","def"] and you want to delete all items that match abc, you'd specify ["asset","abc"]. - -=cut - -sub deleteChunk { - my $self = shift; - $self->flush; -} - -#------------------------------------------------------------------- - -=head2 flush ( ) - -Flushes the caching system. Must be overridden. - -=cut - -sub flush { - my $self = shift; - File::Path::rmtree($self->session->config->get("uploadsPath")."/temp"); -} - -#------------------------------------------------------------------- - -=head2 get ( ) - -Retrieves a key value from the cache. Must be overridden. - -=cut - -sub get { - -} - - -#------------------------------------------------------------------- - -=head2 new ( session, key, [ namespace ] ) - -The new method will return a handler for the configured caching mechanism. Defaults to WebGUI::Cache::FileCache. You must override this method when building your own cache plug-in. - -=head3 session - -A reference to the current session. - -=head3 key - -A key to store the value under or retrieve it from. Can either be a scalar or an array reference of pieces (called -a composite key). Composite keys are useful for deleting a chunk (see deleteChunk()) of cache data all at once, and -for using multi-level identifiers like assetId/revisionDate. - -=head3 namespace - -A subdivider to store this cache under. When building your own cache plug-in default this to the WebGUI config file. - -=cut - -sub new { - my $class = shift; - my $session = shift; - my $type = $session->config->get('cacheType'); - eval{ WebGUI::Pluggable::load( $type ) }; - if ( !$@ && $type->isa( "WebGUI::Cache" ) ) { - return $type->new( $session, @_ ); - } - else { - require WebGUI::Cache::FileCache; - return WebGUI::Cache::FileCache->new( $session, @_ ); - } -} - -#------------------------------------------------------------------- - -=head2 parseKey ( key ) - -Returns a formatted string version of the key. A class method. - -=head3 key - -Can either be a text key, or a composite key. If it's a composite key, it will be an array reference of strings that can be joined together to create a key. You might want to use a composite key in order to be able to delete large portions of cache all at once. For instance, if you have a key of ["asset","abc","def"] you can delete all cache matching ["asset","abc"]. - -=cut - -sub parseKey { - my $class = shift; - # check for composite or simple key, make array from either - my @key; - if (! $_[0]) { - return; - } - elsif (ref $_[0] eq 'ARRAY') { - @key = @{ +shift }; - } - else { - @key = shift; - } - foreach my $part (@key) { - # convert to octets, then md5 them - utf8::encode($part); - $part = Digest::MD5::md5_base64($part); - $part =~ tr{/}{-}; - } - return join('/', @key); -} - -#------------------------------------------------------------------- - -=head2 session ( ) - -Returns a reference to the current session. - -=cut - -sub session { - $_[0]->{_session}; -} - -#------------------------------------------------------------------- - -=head2 set ( value [, ttl] ) - -Sets a key value to the cache. Must be overridden. - -=head3 value - -A scalar value to store. - -=head3 ttl - -A time in seconds for the cache to exist. When you override default it to 60 seconds. - -=cut - -sub set { - -} - - -#------------------------------------------------------------------- - -=head2 setByHTTP ( url [, ttl ] ) - -Retrieves a document via HTTP and stores it in the cache and returns the content as a string. No need to override. - -=head3 url - -The URL of the document to retrieve. It must begin with the standard "http://". - -=head3 ttl - -The time to live for this content. This is the amount of time (in seconds) that the content will remain in the cache. Defaults to "60". - -=cut - -sub setByHTTP { - my $self = shift; - my $url = shift; - my $ttl = shift; - my $userAgent = new LWP::UserAgent; - $userAgent->env_proxy; - $userAgent->agent("WebGUI/".$WebGUI::VERSION); - $userAgent->timeout(30); - my $header = new HTTP::Headers; - my $referer = "http://webgui.http.request/".$self->session->env->get("SERVER_NAME").$self->session->env->get("REQUEST_URI"); - chomp $referer; - $header->referer($referer); - my $request = HTTP::Request->new(GET => $url, $header); - my $response = $userAgent->request($request); - if ($response->is_error) { - $self->session->errorHandler->error($url." could not be retrieved."); - } - else { - $self->set($response->decoded_content,$ttl); - } - return $response->decoded_content; -} - -#------------------------------------------------------------------- - -=head2 stats ( ) - -Return a formatted text string describing cache usage. Must be overridden. - -=cut - -sub stats { - -} - - -1; - - diff --git a/lib/WebGUI/Cache/CHI.pm b/lib/WebGUI/Cache/CHI.pm deleted file mode 100644 index f976133c9..000000000 --- a/lib/WebGUI/Cache/CHI.pm +++ /dev/null @@ -1,158 +0,0 @@ -package WebGUI::Cache::CHI; - -use strict; -use base 'WebGUI::Cache'; -use File::Temp qw/tempdir/; -use CHI; - -=head1 NAME - -WebGUI::Cache::CHI - CHI cache driver - -=head1 DESCRIPTION - -This is a WebGUI Cache driver to the CHI cache interface. This allows WebGUI -sites to use any CHI::Driver like FastMmap and Memcached - -=head1 METHODS - -=cut - -#---------------------------------------------------------------------------- - -=head2 delete ( ) - -Delete the current key - -=cut - -sub delete { - my ( $self ) = @_; - return $self->{_chi}->remove( $self->{_key} ); -} - -#---------------------------------------------------------------------------- - -=head2 deleteChunk ( partialKey ) - -Delete multiple keys from the cache - -=cut - -sub deleteChunk { - my ( $self, $key ) = @_; - $key = $self->parseKey( $key ); - for my $checkKey ( $self->{_chi}->get_keys ) { - if ( $checkKey =~ /^\Q$key/ ) { - $self->{_chi}->remove( $checkKey ); - } - } -} - -#---------------------------------------------------------------------------- - -=head2 flush ( ) - -Delete the entire cache namespace - -=cut - -sub flush { - my ( $self ) = @_; - $self->{_chi}->clear; -} - -#---------------------------------------------------------------------------- - -=head2 get ( ) - -Get the data in the current key - -=cut - -sub get { - my ( $self ) = @_; - return $self->{_chi}->get( $self->{_key} ); -} - -#---------------------------------------------------------------------------- - -=head2 new ( session, key [, namespace] ) - -Create a new WebGUI::Cache object with the given key. The namespace defaults -to the current site's configuration file name - -=cut - -sub new { - my ( $class, $session, $key, $namespace ) = @_; - $namespace ||= $session->config->getFilename; - $key = $class->parseKey( $key ); - - # Create CHI object from config - my $chi; - unless ( $chi = $session->stow->get( "CHI" ) ) { - my $cacheConf = $session->config->get('cache'); - $cacheConf->{namespace} = $namespace; - $cacheConf->{is_size_aware} = 1; - - # Default values - my $resolveConf = sub { - my ($config) = @_; - if ( - $config->{driver} =~ /DBI/ or ( - $config->{args} and # "args" : [ "dbh" ] in the "cache": { } block? - ref $config->{args} eq 'ARRAY' and - grep($_ eq 'dbh', @{ $config->{args} }) - ) - ) { - $config->{ dbh } = $session->db->dbh; - } - if ( $config->{driver} =~ /File|FastMmap|BerkeleyDB/ ) { - $config->{ root_dir } ||= tempdir(); - } - }; - - $resolveConf->( $cacheConf ); - if ( $cacheConf->{l1_cache} ) { - $resolveConf->( $cacheConf->{l1_cache} ); - } - - $chi = CHI->new( %{$cacheConf} ); - $session->stow->set( "CHI", $chi ); - } - - return bless { _session => $session, _key => $key, _chi => $chi }, $class; -} - -#---------------------------------------------------------------------------- - -=head2 set ( content [, ttl ] ) - -Set the content to the current key. ttl is the number of seconds the cache -should live. - -=cut - -sub set { - my ( $self, $content, $ttl ) = @_; - $ttl ||= 60; - $self->{_chi}->set( $self->{_key}, $content, $ttl ); - return; -} - -#---------------------------------------------------------------------------- - -=head2 stats ( ) - -Get the size of the cache - -=cut - -sub stats { - my ( $self ) = @_; - return $self->{_chi}->get_size; -} - - -1; diff --git a/lib/WebGUI/Cache/Database.pm b/lib/WebGUI/Cache/Database.pm deleted file mode 100644 index b292ffb2b..000000000 --- a/lib/WebGUI/Cache/Database.pm +++ /dev/null @@ -1,205 +0,0 @@ -package WebGUI::Cache::Database; - -=head1 LEGAL - - ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. - ------------------------------------------------------------------- - Please read the legal notices (docs/legal.txt) and the license - (docs/license.txt) that came with this distribution before using - this software. - ------------------------------------------------------------------- - http://www.plainblack.com info@plainblack.com - ------------------------------------------------------------------- - -=cut - -use strict; -use base "WebGUI::Cache"; -use Storable (); - -=head1 NAME - -Package WebGUI::Cache::Database - -=head1 DESCRIPTION - -This package provides a means for WebGUI to cache data to the database. - -=head1 SYNOPSIS - - use WebGUI::Cache::Database; - -=head1 METHODS - -These methods are available from this class: - -=cut - - - - -#------------------------------------------------------------------- - -=head2 delete ( ) - -Remove content from the filesystem cache. - -=cut - -sub delete { - my $self = shift; - $self->session->db->write("delete from cache where namespace=? and cachekey=?",[$self->{_namespace}, $self->{_key}]); -} - -#------------------------------------------------------------------- - -=head2 deleteChunk ( key ) - -Remove a partial composite key from the cache. - -=head3 key - -A partial composite key to remove. - -=cut - -sub deleteChunk { - my $self = shift; - my $key = $self->parseKey(shift); - $self->session->db->write("delete from cache where namespace=? and cachekey like ?",[$self->{_namespace}, $key.'%']); -} - -#------------------------------------------------------------------- - -=head2 flush ( ) - -Remove all objects from the filecache system. - -=cut - -sub flush { - my $self = shift; - $self->SUPER::flush(); - $self->session->db->write("delete from cache where namespace=?",[$self->{_namespace}]); -} - -#------------------------------------------------------------------- - -=head2 get ( ) - -Retrieve content from the database cache. - -=cut - -sub get { - my $self = shift; - my $session = $self->session; - return undef if ($session->config->get("disableCache")); - my $sth = $session->db->dbh->prepare("select content from cache where namespace=? and cachekey=? and expires>?"); - $sth->execute($self->{_namespace},$self->{_key},time()); - my $data = $sth->fetchrow_arrayref; - $sth->finish; - my $content = $data->[0]; - return undef unless ($content); - # Storable doesn't like non-reference arguments, so we wrap it in a scalar ref. - eval { - $content = Storable::thaw($content); - }; - return undef unless $content && ref $content; - return $$content; -} - -#------------------------------------------------------------------- - -=head2 getNamespaceSize ( ) - -Returns the size (in bytes) of the current cache under this namespace. Consequently it also cleans up expired cache items. - -=cut - -sub getNamespaceSize { - my $self = shift; - my $expiresModifier = shift || 0; - $self->session->db->write("delete from cache where expires < ?",[time()+$expiresModifier]); - my ($size) = $self->session->db->quickArray("select sum(size) from cache where namespace=?",[$self->{_namespace}]); - return $size; -} - -#------------------------------------------------------------------- - -=head2 new ( session, key [, namespace ] ) - -Constructor. - -=head3 session - -A reference to the current session. - -=head3 key - -A key unique to this namespace. It is used to uniquely identify the cached content. - -=head3 namespace - -Defaults to the config filename for the current site. The only reason to override the default is if you want the cached content to be shared among all WebGUI instances on this machine. A common alternative namespace is "URL", which is typically used when caching content using the setByHTTP method. - -=cut - -sub new { - my $cache; - my $class = shift; - my $session = shift; - my $key = $class->parseKey(shift); - my $namespace = shift || $session->config->getFilename; - bless {_session=>$session, _key=>$key, _namespace=>$namespace}, $class; -} - - -#------------------------------------------------------------------- - -=head2 set ( content [, ttl ] ) - -Save content to the filesystem cache. - -=head3 content - -A scalar variable containing the content to be set. - -=head3 ttl - -The time to live for this content. This is the amount of time (in seconds) that the content will remain in the cache. Defaults to "60". - -=cut - -sub set { - my $self = shift; - # Storable doesn't like non-reference arguments, so we wrap it in a scalar ref. - my $content = Storable::nfreeze(\(scalar shift)); - my $ttl = shift || 60; - my $size = length($content); - # getting better performance using native dbi than webgui sql - my $dbh = $self->session->db->dbh; - my $sth = $dbh->prepare("replace into cache (namespace,cachekey,expires,size,content) values (?,?,?,?,?)"); - $sth->execute($self->{_namespace}, $self->{_key}, time()+$ttl, $size, $content); - $sth->finish; -} - - -#------------------------------------------------------------------- - -=head2 stats ( ) - -Returns statistic information about the caching system. - -=cut - -sub stats { - my $self = shift; - my ($size) = $self->session->db->quickArray("select sum(size) from cache where namespace=?",[$self->{_namespace}]); - return $size." bytes"; -} - -1; - - diff --git a/lib/WebGUI/Cache/FileCache.pm b/lib/WebGUI/Cache/FileCache.pm deleted file mode 100644 index 0ce7a2a35..000000000 --- a/lib/WebGUI/Cache/FileCache.pm +++ /dev/null @@ -1,284 +0,0 @@ -package WebGUI::Cache::FileCache; - -=head1 LEGAL - - ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. - ------------------------------------------------------------------- - Please read the legal notices (docs/legal.txt) and the license - (docs/license.txt) that came with this distribution before using - this software. - ------------------------------------------------------------------- - http://www.plainblack.com info@plainblack.com - ------------------------------------------------------------------- - -=cut - -use strict; -use Storable (); -use File::Path (); -use File::Find (); - -our @ISA = qw(WebGUI::Cache); - -=head1 NAME - -Package WebGUI::Cache::FileCache - -=head1 DESCRIPTION - -This package provides a means for WebGUI to cache data to the filesystem. - -=head1 SYNOPSIS - - use WebGUI::Cache::FileCache; - -=head1 METHODS - -These methods are available from this class: - -=cut - - - - -#------------------------------------------------------------------- - -=head2 delete ( ) - -Remove content from the filesystem cache. - -=cut - -sub delete { - my $self = shift; - my $folder = $self->getFolder; - if (-e $folder) { - File::Path::rmtree($folder); - } -} - -#------------------------------------------------------------------- - -=head2 deleteChunk ( key ) - -Remove a partial composite key from the cache. - -=head3 key - -A partial composite key to remove. - -=cut - -sub deleteChunk { - my $self = shift; - my $folder = $self->getNamespaceRoot."/".$self->parseKey(shift); - if (-e $folder) { - File::Path::rmtree($folder); - } -} - -#------------------------------------------------------------------- - -=head2 flush ( ) - -Remove all objects from the filecache system. - -=cut - -sub flush { - my $self = shift; - $self->SUPER::flush(); - my $folder = $self->getNamespaceRoot; - if (-e $folder) { - File::Path::rmtree($folder); - } -} - -#------------------------------------------------------------------- - -=head2 get ( ) - -Retrieve content from the filesystem cache. - -=cut - -sub get { - my $self = shift; - return undef if ($self->session->config->get("disableCache")); - my $folder = $self->getFolder; - if (-e $folder."/expires" && -e $folder."/cache" && open(my $FILE,"<",$folder."/expires")) { - my $expires = <$FILE>; - close($FILE); - return undef if ($expires < time); - my $value; - eval {$value = Storable::retrieve($folder."/cache")}; - if (ref $value eq "SCALAR") { - return $$value; - } else { - return $value; - } - } - return undef; -} - -#------------------------------------------------------------------- - -=head2 getFolder ( ) - -Returns the path to the cache folder for this key. - -=cut - -sub getFolder { - my $self = shift; - return $self->getNamespaceRoot()."/".$self->{_key}; -} - -#------------------------------------------------------------------- - -=head2 getNamespaceRoot ( ) - -Figures out what the cache root for this namespace should be. A class method. - -=cut - -sub getNamespaceRoot { - my $self = shift; - my $root = $self->session->config->get("fileCacheRoot"); - unless ($root) { - if ($self->session->os->get("windowsish")) { - $root = $self->session->env->get("TEMP") || $self->session->env->get("TMP") || "/temp"; - } else { - $root = "/tmp"; - } - $root .= "/WebGUICache"; - } - $root .= "/".$self->{_namespace}; - return $root; -} - -#------------------------------------------------------------------- - -=head2 getNamespaceSize ( ) - -Returns the size (in bytes) of the current cache under this namespace. Consequently it also cleans up expired cache items. - -=cut - -sub getNamespaceSize { - my $self = shift; - my $expiresModifier = shift || 0; - my $cacheSize = 0; - File::Find::find({ - no_chdir => 1, - wanted => sub { - return - unless $File::Find::name =~ m/expires$/; - if ( open my $FILE, "<", $File::Find::name ) { - my $expires = <$FILE>; - close $FILE; - if ($expires < time + $expiresModifier) { - File::Path::rmtree($File::Find::dir); - $File::Find::prune = 1; - return - } - else { - $cacheSize += -s $File::Find::dir.'/cache'; - } - } - }, - }, $self->getNamespaceRoot); - return $cacheSize; -} - -#------------------------------------------------------------------- - -=head2 new ( session, key [, namespace ] ) - -Constructor. - -=head3 session - -A reference to the current session. - -=head3 key - -A key unique to this namespace. It is used to uniquely identify the cached content. - -=head3 namespace - -Defaults to the config filename for the current site. The only reason to override the default is if you want the cached content to be shared among all WebGUI instances on this machine. A common alternative namespace is "URL", which is typically used when caching content using the setByHTTP method. - -=cut - -sub new { - my $cache; - my $class = shift; - my $session = shift; - my $key = $class->parseKey(shift); - my $namespace = shift || $session->config->getFilename; - bless {_session=>$session, _key=>$key, _namespace=>$namespace}, $class; -} - - -#------------------------------------------------------------------- - -=head2 set ( content [, ttl ] ) - -Save content to the filesystem cache. - -=head3 content - -A scalar variable containing the content to be set. - -=head3 ttl - -The time to live for this content. This is the amount of time (in seconds) that the content will remain in the cache. Defaults to "60". - -=cut - -sub set { - my $self = shift; - my $content = shift; - my $ttl = shift || 60; - my $oldumask = umask(); - umask(0000); - my $path = $self->getFolder(); - unless (-e $path) { - eval {File::Path::mkpath($path,0)}; - if ($@) { - $self->session->errorHandler->error("Couldn't create cache folder: ".$path." : ".$@); - return undef; - } - } - my $value; - unless (ref $content) { - $value = \$content; - } else { - $value = $content; - } - Storable::nstore($value, $path."/cache"); - open my $FILE, ">", $path."/expires"; - print $FILE time + $ttl; - close $FILE; - umask($oldumask); -} - - -#------------------------------------------------------------------- - -=head2 stats ( ) - -Returns statistic information about the caching system. - -=cut - -sub stats { - my $self = shift; - return $self->getNamespaceSize." bytes"; -} - -1; - - diff --git a/lib/WebGUI/Command.pm b/lib/WebGUI/Command.pm new file mode 100644 index 000000000..91a614f28 --- /dev/null +++ b/lib/WebGUI/Command.pm @@ -0,0 +1,26 @@ +package WebGUI::Command; +use strict; +use warnings; +use App::Cmd::Setup -app; + +=head1 NAME + +WebGUI::Command - Base class for WebGUI commands + +=head1 SYNOPSIS + + use WebGUI::Command; + + #subroutines that you'd like to call via command line scripts or UI methods + +=head1 DESCRIPTION + +This is a subclass of App::Cmd::Setup. + +=cut + + +use constant plugin_search_path => __PACKAGE__; + +1; + diff --git a/sbin/changeIobStatus.pl b/lib/WebGUI/Command/changeIobStatus.pm old mode 100755 new mode 100644 similarity index 64% rename from sbin/changeIobStatus.pl rename to lib/WebGUI/Command/changeIobStatus.pm index 3769e333a..107da47f7 --- a/sbin/changeIobStatus.pl +++ b/lib/WebGUI/Command/changeIobStatus.pm @@ -1,7 +1,7 @@ -#!/usr/bin/env perl +package WebGUI::Command::changeIobStatus; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -10,50 +10,53 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- +use WebGUI::Command -command; use strict; -use File::Basename (); -use File::Spec; +use warnings; -my $webguiRoot; -BEGIN { - $webguiRoot = File::Spec->rel2abs(File::Spec->catdir(File::Basename::dirname(__FILE__), File::Spec->updir)); - unshift @INC, File::Spec->catdir($webguiRoot, 'lib'); +=head2 opt_spec + +Return a set of options to WebGUI::Command so that it knows how to process command line options. + +=cut + +sub opt_spec { + return ( + [ 'configFile=s', 'The WebGUI config file to use. This parameter is required.'], + [ 'quiet', q{Disable all output unless there's an error.} ], + [ 'whatsHappening:s', q{The message attached to the InOut Board when changing status. If left unspecified it defaults to 'Automatically signed out.'}], + [ 'userMessage:s', q{Text of the message to be sent to the user after changing the status. If left unspecified it will default to 'You were logged out of the In/Out Board automatically.'}], + [ 'userMessageFile:s', q{Pathname to a file whose contents will be sent to the user after changing the status. Using this option overrides whatever messages is set with --userMessage (see above).}], + [ 'currentStatus:s', q{Check users in the IOB having status status. If left unspecified, it will default to In.}], + [ 'newStatus:s', q{Change users status in the IOB to status status. If left unspecified, it will default to Out.}], + ); } -use Getopt::Long; -use Pod::Usage; -use WebGUI::Session; -use WebGUI::User; -use WebGUI::Inbox; +=head2 validate_args -$|=1; +Check for mandatory command line options -my $configFile; -my $help; -my $quiet; -my $whatsHappening = "Automatically signed out."; -my $newStatus = "Out"; -my $currentStatus = "In"; -my $userMessage = "You were logged out of the In/Out Board automatically."; -my $userMessageFile; +=cut +sub validate_args { + my ($self, $opt, $args) = @_; + if (! $opt->{configfile}) { + $self->usage_error('You must specify the --configFile option.'); + } +} -GetOptions( - 'configfile=s'=>\$configFile, - 'help'=>\$help, - 'quiet'=>\$quiet, - 'whatsHappening:s'=>\$whatsHappening, - 'userMessage:s'=>\$userMessage, - 'userMessageFile:s'=>\$userMessageFile, - 'currentStatus:s'=>\$currentStatus, - 'newStatus:s'=>\$newStatus -); +sub run { + my ($self, $opt, $args) = @_; -pod2usage( verbose => 2 ) if $help; -pod2usage() unless $configFile; +my ($configFile, $quiet, $whatsHappening, $newStatus, $currentStatus, $userMessage, $userMessageFile) = + @{$opt}{qw(configfile quiet whatshappening newstatus currentstatus usermessage usermessagefile)}; +$whatsHappening ||= "Automatically signed out."; +$newStatus ||= "Out"; +$currentStatus ||= "In"; +$userMessage ||= "You were logged out of the In/Out Board automatically."; print "Starting up...\n" unless ($quiet); -my $session = WebGUI::Session->open($webguiRoot,$configFile); +my $session = WebGUI::Session->open($configFile); if ($userMessageFile) { print "Opening message file.." unless ($quiet); @@ -108,22 +111,26 @@ $session->var->end; $session->close; print "OK\n" unless ($quiet); +} + +1; + __END__ =head1 NAME -changeIobStatus - Automate WebGUI's InOut Board User status switching. +WebGUI::Command::changeIobStatus - Automate WebGUI's InOut Board User status switching. =head1 SYNOPSIS - changeIobStatus --configFile config.conf + webgui.pl changeiobstatus --configFile config.conf [--currentStatus status] [--newStatus status] [--userMessage text|--userMessageFile pathname] [--whatsHappening text] [--quiet] - changeIobStatus --help + webgui.pl changeiobstatus --help =head1 DESCRIPTION @@ -182,6 +189,7 @@ Shows this documentation, then exits. =head1 AUTHOR -Copyright 2001-2009 Plain Black Corporation. +Copyright 2001-2012 Plain Black Corporation. =cut + diff --git a/lib/WebGUI/Command/classLoadTest.pm b/lib/WebGUI/Command/classLoadTest.pm new file mode 100644 index 000000000..0f01e9023 --- /dev/null +++ b/lib/WebGUI/Command/classLoadTest.pm @@ -0,0 +1,118 @@ +package WebGUI::Command::classLoadTest; + +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 WebGUI::Command -command; +use strict; +use warnings; + +use File::Spec; +use Time::HiRes; + +sub opt_spec { + return ( + [ 'configFile=s', 'The WebGUI config file to use.' ], + [ 'class=s', 'The full class name of the asset to test.'], + ); +} + +sub run { + my ($self, $opt, $args) = @_; + + my ($configFile, $class) = @{$opt}{qw(configfile class)}; + + my $session = WebGUI::Session->open($configFile); + open my $null, ">:utf8", File::Spec->devnull; + $session->output->setHandle($null); + + printf "%22s\t\%18s\t%12s\t%s\n", 'Asset ID', 'Instanciate Time', 'Render Time','URL'; + +my $count = 0; +my $sth = $session->db->read("select assetId from asset where className=? and state='published'",[$class]); +while (my ($id) = $sth->array) { + $count++; + print $id; + + # check instanciation time + my $t = [Time::HiRes::gettimeofday]; + my $asset = eval { WebGUI::Asset->newById($session, $id)}; + if (!defined $asset || $@) { + my $url = $session->db->quickScalar("select url from assetData where assetId=? order by revisionDate desc",[$id]); + print "\tbad asset: $@ \t url: $url \n"; + next; + } + my $instanciation = Time::HiRes::tv_interval($t); + + # set the default asset for those things that need it + $session->asset($asset); + + # check render time + $t = [Time::HiRes::gettimeofday]; + eval {my $junk = $asset->www_view}; + my $rendering = Time::HiRes::tv_interval($t); + if ($@) { + $rendering = $@; + } + + # get the url + my $url = $asset->url; + + # output the results + printf "\t%18.4f\t%12.4f\t%s\n", $instanciation, $rendering ,$url; +} + + $session->var->end; + $session->close; + close $null; + + print "Total assets: $count\n"; +} + +1; + +__END__ + +=head1 NAME + +WebGUI::Command::classLoadTest - Test a single class performance + +=head1 SYNOPSIS + + webgui.pl classLoadTest --configFile config.conf --class=<> + +=head1 DESCRIPTION + +This script will test the time it takes to instanciate and view all the +assets of a particular class from the given site. + +=head1 OPTIONS + +=over 4 + +=item C<--configFile config.conf> + +The WebGUI config file to use. Only the file name needs to be specified, +since it will be looked up inside WebGUI's configuration directory. +This parameter is required. + +=item C<--class> + +The full class name of the asset to test. Something like WebGUI::Asset::Wobject::Layout +or WebGUI::Asset::Wobject::Navigation. + +=back + +=head1 AUTHOR + +Copyright 2001-2012 Plain Black Corporation. + +=cut + diff --git a/sbin/diskUsage.pl b/lib/WebGUI/Command/diskUsage.pm old mode 100755 new mode 100644 similarity index 59% rename from sbin/diskUsage.pl rename to lib/WebGUI/Command/diskUsage.pm index a8990359f..ac381f4ef --- a/sbin/diskUsage.pl +++ b/lib/WebGUI/Command/diskUsage.pm @@ -1,7 +1,7 @@ -#!/usr/bin/env perl +package WebGUI::Command::diskUsage; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -10,71 +10,46 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- +use WebGUI::Command -command; use strict; -use File::Basename (); -use File::Spec; +use warnings; -my $webguiRoot; -BEGIN { - $webguiRoot = File::Spec->rel2abs(File::Spec->catdir(File::Basename::dirname(__FILE__), File::Spec->updir)); - unshift @INC, File::Spec->catdir($webguiRoot, 'lib'); +sub opt_spec { + return ( + [ 'configFile=s', 'The WebGUI config file to use. This parameter is required.'], + [ 'assetId=s', 'AssetId to start with (optional) uses default page if not specified.' ], + [ 'assetUrl=s', 'AssetUrl to start with (optional) uses default page if not specified'], + [ 'quiet', 'No output except for numeric file size (default unit is bytes, will use blockSize if specified)'], + [ 'summary!', 'Displays total space used for asset and descendants (unless recurse flag is set to false in which case only the asset specified will be used)'], + [ 'blockSize=i', 'Change units in which space used is specified, defaults to bytes.'], + [ 'recurse!', 'Flag indicating whether the disk space usage should consider asset and all descendants (default) or just the asset specified.'], + ); } -use Getopt::Long; -use Pod::Usage; -use WebGUI::Session; -use WebGUI::Asset; - -my $configFile; -my $quiet; -my $assetId; -my $assetUrl; -my $summarize = 0; -my $blockSize = 1; -my $recurse = 1; -my $help; - -$| = 1; # No buffering - -GetOptions( - 'configFile=s'=>\$configFile, # WebGUI Config file - 'assetId=s' =>\$assetId, # AssetId to start with (optional) uses default page if not specified. - 'assetUrl=s' =>\$assetUrl, # AssetUrl to start with (optional) uses default page if not specified - 'quiet' =>\$quiet, # No output except for numeric file size (default unit is bytes, will use blockSize if specified) - 'summary!' =>\$summarize, # Displays total space used for asset and descendants (unless recurse flag is set to false in which case only the asset specified will be used) - 'blockSize=i' =>\$blockSize, # Change units in which space used is specified, defaults to bytes. - 'recurse!' =>\$recurse, # Flag indicating whether the disk space usage should consider asset and all descendants (default) or just the asset specified. - 'help!' =>\$help, -); - -pod2usage( verbose => 2 ) if $help; -pod2usage() unless $configFile; - -my $session = start(); -du(); -finish($session); - -#------------------------------------------------- -sub start { - my $session = WebGUI::Session->open($webguiRoot,$configFile); - $session->user({userId=>3}); - return $session; +sub validate_args { + my ($self, $opt, $args) = @_; + if (! $opt->{configfile}) { + $self->usage_error('You must specify the --configFile option.'); + } } -#------------------------------------------------- -sub finish { - my $session = shift; - $session->var->end(); - $session->close(); -} +sub run { + my ($self, $opt, $args) = @_; + + my ($configFile, $assetId, $assetUrl, $quiet, $summarize, $blockSize, $recurse) = + @{$opt}{qw(configfile assetid asseturl quiet summary blocksize recurse)}; + $summarize //= 0; + $blockSize //= 1; + $recurse //= 1; + + my $session = WebGUI::Session->open($configFile); + $session->user({userId=>3}); -#------------------------------------------------------- -sub du { my $asset; my $totalSize; # disk space used if ($assetId) { # They specified an assetId to start with - $asset = WebGUI::Asset->newByDynamicClass($session,$assetId); + $asset = WebGUI::Asset->newById($session,$assetId); die ("Unable to instanciate asset $assetId") unless defined $asset; print "\nStarting with asset $assetId...\n" unless $quiet; } @@ -128,27 +103,28 @@ sub du { else { # return script friendly output of the size only. print $totalSize; } + + $session->var->end; + $session->close; } +1; + __END__ =head1 NAME -diskUsage - Display amount of disk space used by a WebGUI asset - an its desecendants. +WebGUI::Command::diskUsage - Display amount of disk space used by a WebGUI asset and its desecendants. =head1 SYNOPSIS - - diskUsage --configFile config.conf - [--assetId id] - [--assetUrl url] - [--blockSize bytes] - [--norecurse] - [--quiet] - [--summary] - - diskUsage --help + webgui.pl diskusage --configFile config.conf + [--assetId id] + [--assetUrl url] + [--blockSize bytes] + [--norecurse] + [--quiet] + [--summary] =head1 DESCRIPTION @@ -158,54 +134,50 @@ utility. =over -=item B<--configFile config.conf> +=item C<--configFile config.conf> The WebGUI config file to use. Only the file name needs to be specified, since it will be looked up inside WebGUI's configuration directory. This parameter is required. -=item B<--assetId id> +=item C<--assetId id> Calculate disk usage starting from WebGUI's Asset identified by B. If this parameter is not supplied, calculations will start from WebGUI's default page as defined in the Site settings. -=item B<--assetUrl url> +=item C<--assetUrl url> Calculate disk usage starting from the particular URL given by B, -which must be relative to the server (e.g. B instead of +which must be relative to the server (e.g. C instead of B). If this parameter is not supplied, calculations will start from WebGUI's default page as defined in the Site settings. -=item B<--blockSize bytes> +=item C<--blockSize bytes> -Use B as scaling factor to change the units in which disk space +Use C as scaling factor to change the units in which disk space will be reported. If this parameter is not supplied, it defaults to B<1>, hence the results will be expressed in bytes. If you want to have kb, -use B<--blockSize 1024>. +use C<--blockSize 1024>. -=item B<--norecurse> +=item C<--norecurse> Prevent recursive calculation of disk space. This effectively computes the used disk space for the starting Asset only, without including its descendants. -=item B<--quiet> +=item C<--quiet> Just display the total amount of disk space as a raw value. -=item B<--summary> +=item C<--summary> Just display the total amount of disk space in a human readable format. -=item B<--help> - -Shows this documentation, then exits. - =back =head1 AUTHOR -Copyright 2001-2009 Plain Black Corporation. +Copyright 2001-2012 Plain Black Corporation. =cut diff --git a/lib/WebGUI/Command/test_content.pm b/lib/WebGUI/Command/test_content.pm new file mode 100644 index 000000000..928761142 --- /dev/null +++ b/lib/WebGUI/Command/test_content.pm @@ -0,0 +1,1211 @@ +package WebGUI::Command::test_content; + +use WebGUI::Command -command; +use strict; +use warnings; +use Try::Tiny; +use File::Spec::Functions qw(catfile); +use JSON; + +use WebGUI::Paths; +use WebGUI::Session; +use WebGUI::Macro; +use WebGUI::DateTime; + +our $LAYOUT_CLASS = 'WebGUI::Asset::Wobject::Layout'; +our $FOLDER_CLASS = 'WebGUI::Asset::Wobject::Folder'; +our %ASSETS; + +sub opt_spec { + return ( + [ 'F|config:s', 'The config file for the site' ], + [ 'style:s', 'The URL or ID of a style template to use' ], + [ 'root=s', 'The URL or ID of the asset to put this content.', { default => "/root" } ], + ); +} + +sub run { + my ( $self, $opt, $args ) = @_; + + if ( !$opt->{style} ) { + die "style is required\n"; + } + + my $session = WebGUI::Session->open( $opt->{f} ); + $self->{_session} = $session; + my $root = $self->getAsset( $opt->{root} ); + my $style = $self->getAsset( $opt->{style} ); + + # Create a single page to hold all the content pages + my $top = $root->addChild({ + className => $FOLDER_CLASS, + title => 'Test Content', + styleTemplateId => $style->getId, + }); + $top->indexContent; + + # Create category pages for all asset categories + my %categories = (); + for my $cat ( keys %{$session->config->get( 'assetCategories' )} ) { + my $title = $session->config->get( "assetCategories/$cat/title" ); + WebGUI::Macro::process( $session, \$title ); + $categories{ $cat } = $top->addChild({ + className => $FOLDER_CLASS, + title => $title, + styleTemplateId => $style->getId, + }); + $categories{ $cat }->indexContent; + } + + # Add individual asset pages to their category pages + for my $class ( keys %ASSETS ) { + my @sets = @{ $self->getPropertySets( $class ) }; + next unless @sets > 0; + + # Set the default style template + $sets[0]->{styleTemplateId} ||= $style->getId; + + # Put the first one on the given page + my $cat = $session->config->get( "assets/$class/category" ) || "utilities"; + my $page = $categories{ $cat }->addChild({ + className => $LAYOUT_CLASS, + styleTemplateId => $style->getId, + title => $sets[0]->{title}, + }); + $page->indexContent; + + my $asset = $self->buildAsset( $class, $page, $sets[0] ); + + # Make subpages for the other ones + for my $set ( @sets[1..$#sets] ) { + my $merged_set = { + %{ $sets[0] }, + %{ $set }, + }; + my $subpage = $page->addChild({ + url => $asset->url . '/' . $set->{title}, + className => $LAYOUT_CLASS, + title => $set->{title}, + styleTemplateId => $style->getId, + }); + $self->buildAsset( $class, $subpage, $merged_set ); + } + } + + print "Done!\nURL: " . $top->getUrl . "\n"; +} + +=head2 getAsset ( id ) + +Get an asset based on the given ID or URL. + +=cut + +sub getAsset { + my ( $self, $id ) = @_; + my $session = $self->{_session}; + my $asset; + try { + $asset = WebGUI::Asset->newByUrl( $session, $id ); + } + catch { + try { + $asset = WebGUI::Asset->newById( $session, $id ); + } + catch { + die "Could not find asset '$id'\n"; + }; + }; + return $asset; +} + +=head2 buildAsset( class, page, props ) + +Build one asset on the page, recursing into any _children. + +=cut + +sub buildAsset { + my ( $self, $class, $page, $rawprops ) = @_; + my $session = $self->{_session}; + + my $files = $rawprops->{_files} || []; + my $children = $rawprops->{_children} || []; + my $props = { map { $_ => $rawprops->{$_} } grep { !/^_/ } keys %$rawprops }; + $props->{ styleTemplateId } ||= $page->can( 'styleTemplateId' ) ? $page->styleTemplateId : ''; + + my $asset = $page->addChild({ + className => $class, + %$props, + }); + if ( !$asset ) { + print "Could not create " . $class . " inside of " . $page->className . ' (' . $page->getUrl . ")\n"; + return; + } + + # Add files to storage locations + my %storage = (); + for my $file ( @$files ) { + my $storage; + next unless -f $file->{file}; + if ( !($storage = $storage{ $file->{property} }) ) { + $storage = $storage{ $file->{property} } = WebGUI::Storage->create( $session ); + $asset->update({ $file->{property} => $storage->getId }); + } + my $filename = $storage->addFileFromFilesystem( $file->{file} ); + $storage->generateThumbnail( $filename ); + } + + # Add children + my $first_child = $children->[0]; + for my $child ( @$children ) { + my $merged_set = { + %$first_child, + %$child, + }; + $self->buildAsset( $merged_set->{className}, $asset, $merged_set ); + } + + # Index the content + $asset->indexContent; + + return $asset; +} + +=head2 getPropertySets( class ) + +Returns an array of hashref of property sets for the given asset class + +This is hardcoded for now, but should eventually become a config file of some kind + +=cut + +my $DT_NOW = DateTime->now; +my @numbers = ( 1..10 ); + +# The first set is the default properties, every other set will combine the +# default properties with the set properties +# A special property _children allows for child assets +# again, the first item will set defaults for the next items +# A special property _files allows for files +%ASSETS = ( + 'WebGUI::Asset::Wobject::Article' => [ + { + title => 'Article with Image', + templateId => 'PBtmpl0000000000000103', + description => lorem(), + isHidden => 1, + displayTitle=> 1, + linkURL => 'http://webgui.org', + linkTitle => 'WebGUI Content Management System', + _files => [ + { + property => 'storageId', + file => catfile( WebGUI::Paths->extras, 'wg.png' ), + }, + ], + }, + { + title => 'Article with Pagination', + templateId => 'XdlKhCDvArs40uqBhvzR3w', + description => lorem(0,1,2) . '

    ^-;

    ' . lorem(3,4,5), + }, + { + title => 'Item', + templateId => 'PBtmpl0000000000000123', + description => lorem(), + + }, + { + title => 'Linked Image with Caption', + templateId => 'PBtmpl0000000000000115', + description => lorem(), + _files => [ + { + property => 'storageId', + file => catfile( WebGUI::Paths->extras, 'wg.png' ), + }, + ], + }, + ], + 'WebGUI::Asset::Wobject::Calendar' => [ + { + title => 'Calendar', + description => lorem(0,1,2), + isHidden => 1, + displayTitle => 1, + _children => [ + { + className => 'WebGUI::Asset::Event', + title => 'Today', + startDate => $DT_NOW->ymd, + endDate => $DT_NOW->ymd, + }, + { + title => 'Tomorrow', + startDate => $DT_NOW->clone->add( days => 1 )->ymd, + endDate => $DT_NOW->clone->add( days => 1 )->ymd, + }, + { + title => 'Tomorrow Noon', + startDate => $DT_NOW->clone->add( days => 1 )->ymd, + endDate => $DT_NOW->clone->add( days => 1 )->ymd, + startTime => '12:00:00', + endTime => '12:00:00', + timeZone => 'CST', + }, + { + title => 'This weekend', + startDate => $DT_NOW->clone->add( days => 6 - $DT_NOW->dow )->ymd, + endDate => $DT_NOW->clone->add( days => 7 - $DT_NOW->dow )->ymd, + }, + ], + }, + ], + 'WebGUI::Asset::Wobject::DataForm' => [ + { + title => 'Data Form', + description => lorem(0,1,2), + isHidden => 1, + defaultView => 0, + useCaptcha => 1, + templateId => 'PBtmpl0000000000000141', # Default dataform + fieldConfiguration => JSON->new->encode( [ + { + name => "from", + label => 'From', + status => "required", + type => "email", + }, + { + name => 'subject', + label => 'Subject', + status => 'required', + type => 'text', + }, + { + name => 'date', + label => 'Date', + status => 'editable', + type => 'date', + }, + { + name => 'body', + label => 'Body', + status => 'editable', + type => 'textarea', + }, + ] ), + }, + { + title => 'Data Form (list)', + defaultView => 1, + }, + { + title => 'Data Form (tabbed)', + defaultView => 0, + templateId => 'PBtmpl0000000000000116', # Tab form + fieldConfiguration => JSON->new->encode( [ + { + name => "from", + label => 'From', + status => "required", + type => "email", + tabId => 0, + }, + { + name => 'subject', + label => 'Subject', + status => 'required', + type => 'text', + tabId => 'one', + }, + { + name => 'date', + label => 'Date', + status => 'editable', + type => 'date', + tabId => 'one', + }, + { + name => 'body', + label => 'Body', + status => 'editable', + type => 'textarea', + tabId => 'two', + }, + ] ), + tabConfiguration => JSON->new->encode( [ + { + tabId => 'one', + label => "One", + subtext => "The oneth page", + }, + { + tabId => 'two', + label => 'Two', + subtext => 'The twoth page', + }, + ] ), + }, + ], + 'WebGUI::Asset::Wobject::DataTable' => [ + { + title => 'DataTable (YUI)', + description => lorem(0,1,2), + isHidden => 1, + templateId => '3rjnBVJRO6ZSkxlFkYh_ug', + data => JSON->new->encode( { + columns => [ + { + key => 'ID', + formatter => 'text', + }, + { + key => 'Name', + formatter => 'text', + }, + { + key => 'URL', + formatter => 'link', + }, + ], + rows => [ + { + ID => '1', + Name => 'WebGUI', + URL => 'http://webgui.org', + }, + { + ID => '2', + Name => 'Plain Black Corp.', + URL => 'http://plainblack.com', + }, + ], + } ), + }, + { + title => 'DataTable (HTML)', + templateId => 'TuYPpHx7TUyk08639Pc8Bg', + }, + ], + 'WebGUI::Asset::Wobject::Map' => [ + { + title => 'Map', + description => lorem(0,1,2), + mapApiKey => 'ABQIAAAAxadBCYjK6rRsw7rJkBgiEBT7g5bZECU_gqoByQmzcFSTeCxKshSKEU-GQYssxXNgQ1qkA3XtjOGYog', + # Key only works for "localhost:5000" + startLatitude => '43.068888', + startLongitude => '-89.384251', + startZoom => '6', + _children => [ + { + className => 'WebGUI::Asset::MapPoint', + title => 'Lake Poygan', + latitude => '44.166445', + longitude => '-88.791504', + description => lorem(0), + }, + { + className => 'WebGUI::Asset::MapPoint', + title => 'Chicago', + latitude => '41.885921', + longitude => '-87.670898', + description => lorem(1), + }, + { + className => 'WebGUI::Asset::MapPoint', + title => 'Dubuque', + latitude => '42.569264', + longitude => '-90.725098', + description => lorem(2), + }, + ], + }, + ], + 'WebGUI::Asset::Wobject::Poll' => [ + { + title => 'Poll', + description => 'What is the air-speed velocity of an unladen swallow?', + a1 => 'Blue', + a2 => 'No wait, Yellow', + a3 => 'African or European', + a4 => 'Your father was a hamster', + }, + ], + 'WebGUI::Asset::Wobject::Search' => [ + { + title => 'Search', + isHidden => 1, + searchRoot => 'PBasset000000000000001', + description => lorem(0,1,2), + }, + ], + 'WebGUI::Asset::Snippet' => [ + { + title => 'Snippet', + isHidden => 1, + snippet => '
    Red room!
    ', + }, + ], + 'WebGUI::Asset::Wobject::Collaboration' => [ + { + title => 'Collaboration (Forum)', + isHidden => 1, + postFormTemplateId => 'PBtmpl0000000000000029', + threadTemplateId => 'PBtmpl0000000000000032', + collaborationTemplateId => 'PBtmpl0000000000000026', + _children => [ + { + className => 'WebGUI::Asset::Post::Thread', + title => 'Thread', + content => lorem(0,1,2), + synopsis => lorem(0), + _children => [ + { + className => 'WebGUI::Asset::Post', + title => "Post", + content => lorem(3,4,5), + _files => [ + { + property => 'storageId', + file => catfile( WebGUI::Paths->extras, 'plainblack.gif' ), + }, + ], + }, + ], + _files => [ + { + property => 'storageId', + file => catfile( WebGUI::Paths->extras, 'wg.png' ), + }, + ], + }, + ], + }, + { + title => 'Collaboration (FAQ)', + postFormTemplateId => 'PBtmpl0000000000000099', + threadTemplateId => 'PBtmpl0000000000000032', + collaborationTemplateId => 'PBtmpl0000000000000080', + _children => [ + { + className => 'WebGUI::Asset::Post::Thread', + title => "Question 1?", + content => '

    Answer!

    ' . lorem(0), + }, + { + className => 'WebGUI::Asset::Post::Thread', + title => "Question 2?", + content => '

    Answer!

    ' . lorem(1), + _files => [ + { + property => 'storageId', + file => catfile( WebGUI::Paths->extras, 'plainblack.gif' ), + }, + ], + }, + { + className => 'WebGUI::Asset::Post::Thread', + title => "Question 3?", + content => '

    Answer!

    ' . lorem(2), + }, + ], + }, + { + title => 'Collaboration (Job)', + postFormTemplateId => 'PBtmpl0000000000000122', + threadTemplateId => 'PBtmpl0000000000000098', + collaborationTemplateId => 'PBtmpl0000000000000077', + }, + { + title => 'Collaboration (Link List)', + postFormTemplateId => 'PBtmpl0000000000000114', + threadTemplateId => 'PBtmpl0000000000000113', + collaborationTemplateId => 'PBtmpl0000000000000083', + }, + { + title => 'Collaboration (Request Tracker)', + postFormTemplateId => 'PBtmpl0000000000000210', + threadTemplateId => 'PBtmpl0000000000000209', + collaborationTemplateId => 'PBtmpl0000000000000208', + }, + { + title => 'Collaboration (Blog)', + postFormTemplateId => 'PBtmpl0000000000000029', + threadTemplateId => 'PBtmpl0000000000000032', + collaborationTemplateId => 'PBtmpl0000000000000112', + }, + { + title => 'Collaboration (Classifieds)', + postFormTemplateId => 'PBtmpl0000000000000029', + threadTemplateId => 'PBtmpl0000000000000032', + collaborationTemplateId => 'PBtmpl0000000000000128', + }, + { + title => 'Collaboration (Guest Book)', + postFormTemplateId => 'PBtmpl0000000000000029', + threadTemplateId => 'PBtmpl0000000000000032', + collaborationTemplateId => 'PBtmpl0000000000000133', + }, + { + title => 'Collaboration (Ordered List)', + postFormTemplateId => 'PBtmpl0000000000000029', + threadTemplateId => 'PBtmpl0000000000000032', + collaborationTemplateId => 'PBtmpl0000000000000101', + }, + { + title => 'Collaboration (Photo Gallery)', + postFormTemplateId => 'PBtmpl0000000000000029', + threadTemplateId => 'PBtmpl0000000000000032', + collaborationTemplateId => 'PBtmpl0000000000000121', + }, + { + title => 'Collaboration (Topics)', + postFormTemplateId => 'PBtmpl0000000000000029', + threadTemplateId => 'PBtmpl0000000000000032', + collaborationTemplateId => 'PBtmpl0000000000000079', + }, + { + title => 'Collaboration (Traditional with Thumbnails)', + postFormTemplateId => 'PBtmpl0000000000000029', + threadTemplateId => 'PBtmpl0000000000000032', + collaborationTemplateId => 'PBtmpl0000000000000097', + }, + ], + 'WebGUI::Asset::Wobject::Gallery' => [ + { + title => 'Gallery', + isHidden => 1, + _children => [ + { + className => 'WebGUI::Asset::Wobject::GalleryAlbum', + title => 'Album 1', + _children => [ + { + className => 'WebGUI::Asset::File::GalleryFile::Photo', + title => 'WebGUI Logo', + filename => 'wg.png', + _files => [ + { + property => 'storageId', + file => catfile( WebGUI::Paths->extras, 'wg.png' ), + }, + ], + }, + { + className => 'WebGUI::Asset::File::GalleryFile::Photo', + title => 'Plainblack logo', + filename => 'plainblack.gif', + _files => [ + { + property => 'storageId', + file => catfile( WebGUI::Paths->extras, 'plainblack.gif' ), + }, + ], + }, + ], + }, + { + className => 'WebGUI::Asset::Wobject::GalleryAlbum', + title => 'Icons', + _children => [ + map { { + className => 'WebGUI::Asset::File::GalleryFile::Photo', + title => ucfirst $_, + filename => $_, + _files => [ + { + property => 'storageId', + file => catfile( WebGUI::Paths->extras, 'icon', $_ ), + }, + ], + } } qw( + application.png keyboard.png layers.png layout.png anchor.png lightbulb.png + lightning.png link.png maginifier.png map.png attach.png money.png basket.png + monitor.png mouse.png bell.png bin.png bomb.png book.png note.png new.png music.png + page.png brick.png briefcase.png bug.png building.png cake.png calculator.png + calendar.png car.png camera.png cart.png cd.png pencil.png phone.png chart_bar.png + photo.png picture.png clock.png printer.png rainbow.png report.png plugin.png + cog.png coins.png comment.png resultset_first.png resultset_next.png + contrast.png script.png controller.png server.png cross.png css.png shading.png + shield.png date.png database.png sound.png disk.png door.png star.png stop.png + dvd.png email.png table.png error.png feed.png television.png folder.png font.png + group.png user.png world.png xhtml.png image.png key.png zoom.png wrench.png + ) + ], + }, + ], + } + ], + 'WebGUI::Asset::Wobject::MessageBoard' => [ + { + title => 'Message Board', + isHidden => 1, + _children => [ + { + className => 'WebGUI::Asset::Wobject::Collaboration', + title => 'Logos', + isHidden => 1, + postFormTemplateId => 'PBtmpl0000000000000029', + threadTemplateId => 'PBtmpl0000000000000032', + collaborationTemplateId => 'PBtmpl0000000000000026', + _children => [ + { + className => 'WebGUI::Asset::Post::Thread', + title => 'Thread', + content => lorem(0,1,2), + synopsis => lorem(0), + _children => [ + { + className => 'WebGUI::Asset::Post', + title => "Post", + content => lorem(3,4,5), + _files => [ + { + property => 'storageId', + file => catfile( WebGUI::Paths->extras, 'plainblack.gif' ), + }, + ], + }, + ], + _files => [ + { + property => 'storageId', + file => catfile( WebGUI::Paths->extras, 'wg.png' ), + }, + ], + }, + ], + }, + { + title => 'Icons', + _children => [ + { + className => 'WebGUI::Asset::Post::Thread', + title => 'Clock', + content => lorem(0,1,2), + synopsis => lorem(0), + _children => [ + { + className => 'WebGUI::Asset::Post', + title => "Camera", + content => lorem(3,4,5), + _files => [ + { + property => 'storageId', + file => catfile( WebGUI::Paths->extras, 'icon', 'camera.png' ), + }, + ], + }, + ], + _files => [ + { + property => 'storageId', + file => catfile( WebGUI::Paths->extras, 'icon', 'clock.png' ), + }, + ], + }, + { + className => 'WebGUI::Asset::Post::Thread', + title => 'Brick', + content => lorem(0,1,2), + synopsis => lorem(0), + _files => [ + { + property => 'storageId', + file => catfile( WebGUI::Paths->extras, 'icon', 'brick.png' ), + }, + ], + }, + { + className => 'WebGUI::Asset::Post::Thread', + title => 'Cog', + content => lorem(0,1,2), + synopsis => lorem(0), + _files => [ + { + property => 'storageId', + file => catfile( WebGUI::Paths->extras, 'icon', 'cog.png' ), + }, + ], + }, + { + className => 'WebGUI::Asset::Post::Thread', + title => 'Bug', + content => lorem(0,1,2), + synopsis => lorem(0), + _files => [ + { + property => 'storageId', + file => catfile( WebGUI::Paths->extras, 'icon', 'bug.png' ), + }, + ], + }, + ], + }, + ], + }, + ], + 'WebGUI::Asset::Wobject::Collaboration::Newsletter' => [ + { + title => 'Newsletter', + isHidden => 1, + _children => [ + { + className => 'WebGUI::Asset::Post::Thread', + title => 'Thread', + content => lorem(0,1,2), + synopsis => lorem(0), + _children => [ + { + className => 'WebGUI::Asset::Post', + title => "Post", + content => lorem(3,4,5), + _files => [ + { + property => 'storageId', + file => catfile( WebGUI::Paths->extras, 'plainblack.gif' ), + }, + ], + }, + ], + _files => [ + { + property => 'storageId', + file => catfile( WebGUI::Paths->extras, 'wg.png' ), + }, + ], + }, + ], + }, + ], + 'WebGUI::Asset::Wobject::StoryArchive' => [ + { + title => 'Story Archive', + isHidden => 1, + _children => [ + { + className => 'WebGUI::Asset::Story', + title => 'Story 1', + byline => 'Gooey', + keywords => 'webgui', + highlights => lorem(0), + story => lorem(1,2,3,4), + }, + { + className => 'WebGUI::Asset::Story', + title => 'Story 2', + byline => 'TEH INTARWEBS', + keywords => 'webgui,lorem', + highlights => lorem(2), + story => lorem(1,0,3,4), + }, + { + className => 'WebGUI::Asset::Story', + title => 'Story 3', + byline => 'Lorem', + keywords => 'lorem', + highlights => lorem(1), + story => lorem(0,2,3,4), + }, + ], + }, + ], + 'WebGUI::Asset::Wobject::StoryTopic' => [ + { + title => 'StoryTopic (lorem)', + keywords => 'lorem', + }, + { + title => 'StoryTopic (webgui)', + keywords => 'webgui', + }, + ], + 'WebGUI::Asset::Wobject::Survey' => [ + { + title => 'Survey', + surveyJSON => JSON->new->encode( + { + "mold" => { + "question" => { + "commentCols" => "10", + "variable" => "", + "gotoExpression" => "", + "verticalDisplay" => "0", + "required" => "0", + "text" => "", + "commentRows" => "5", + "goto" => "", + "answers" => [], + "maxAnswers" => "1", + "value" => "1", + "randomWords" => "", + "randomizeAnswers" => "0", + "questionType" => "Multiple Choice", + "allowComment" => "0", + "textInButton" => "0", + "type" => "question", + }, + "answer" => { + "verbatim" => "0", + "value" => "1", + "min" => "1", + "gotoExpression" => "", + "textCols" => "10", + "max" => "10", + "step" => "1", + "terminal" => "0", + "textRows" => "5", + "text" => "", + "recordedAnswer" => "", + "type" => "answer", + "terminalUrl" => "", + "goto" => "", + "isCorrect" => "1" + }, + "section" => { + "variable"=>"", + "gotoExpression" => "", + "questionsPerPage" => "5", + "terminal" => "0", + "text" => "", + "goto" => "", + "terminalUrl" => "", + "everyPageText" => "1", + "logical" => "0", + "questions" => [], + "everyPageTitle" => "1", + "timeLimit" => "0", + "randomizeQuestions" => "0", + "questionsOnSectionPage" => "1", + "title" => "NEW SECTION", + "type" => "section" + } + }, + "sections" => [ + { + "text"=>"Who would cross the Bridge of Death must answer me these questions three, 'ere the other side he see.", + "title"=>"The Questions Three", + "questions" => [ + { + "text"=>"What is your name?", + "answers" => [ + { + "recordedAnswer"=>"Sir Launcelot", + "text"=>"Sir Launcelot" + }, + { + "text"=>"Sir Galahad", + "recordedAnswer"=>"Sir Galahad" + }, + { + "recordedAnswer"=>"Sir Robin", + "text"=>"Sir Robin" + }, + { + "text"=>"Arthur, King of the Britons", + "recordedAnswer"=>"Arthur, King of the Britons" + } + ] + }, + { + "text"=>"What is your Quest?", + "answers"=>[ + { + "text"=>"The Holy Grail", + "recordedAnswer" => "The Holy Grail" + }, + ], + }, + { + "text"=>"What is your favorite color?", + "answers"=>[ + { + "recordedAnswer"=>"Blue", + "text" => "Blue" + }, + { + "text"=>"Blue, no yel--!","recordedAnswer"=>"ARGGGGHHH" + }, + ], + }, + ], + }, + ], + }), + }, + ], + 'WebGUI::Asset::Wobject::WikiMaster' => [ + { + title => 'Wiki', + isHidden => 1, + _children => [ + { + className => 'WebGUI::Asset::WikiPage', + content => lorem(0,1,2), + keywords => 'lorem, ipsum', + }, + { + className => 'WebGUI::Asset::WikiPage', + content => lorem(3,4,5), + keywords => 'lorem', + }, + { + className => 'WebGUI::Asset::WikiPage', + content => lorem( 1, 3, 5 ), + keywords => 'lorem', + }, + ], + }, + ], + 'WebGUI::Asset::Wobject::Dashboard' => [ + { + title => 'Dashboard', + isHidden => 1, + _children => [ + { + className => 'WebGUI::Asset::Wobject::StockData', + title => 'Stock Data', + }, + { + className => 'WebGUI::Asset::Wobject::WeatherData', + title => 'Weather Data', + + }, + ], + }, + ], + 'WebGUI::Asset::Wobject::Thingy' => [ + { + title => 'Thingy', + isHidden => 1, + }, + ], + 'WebGUI::Asset::Wobject::UserList' => [ + { + title => 'UserList', + isHidden => 1, + }, + ], + 'WebGUI::Asset::Sku::Donation' => [ + { + title => 'Donation', + isHidden => 1, + defaultPrice => '20.00', + }, + ], + 'WebGUI::Asset::Sku::FlatDiscount' => [ + { + title => 'Flat Discount', + isHidden => 1, + priceDiscount => '5.00', + }, + ], + 'WebGUI::Asset::Sku::Product' => [ + { + title => 'Product', + isHidden => 1, + keywords => 'adminSubscription', + relatedJSON => JSON->new->encode([]), + specificationJSON => JSON->new->encode([]), + featureJSON => JSON->new->encode([]), + benefitJSON => JSON->new->encode([]), + accessoryJSON => JSON->new->encode([]), + variantsJSON => JSON->new->encode([]), + _files => [ + { + property => 'image1', + file => catfile( WebGUI::Paths->extras, 'wg.png' ), + }, + { + property => 'image2', + file => catfile( WebGUI::Paths->extras, 'plainblack.gif' ), + }, + ], + }, + ], + 'WebGUI::Asset::Wobject::Shelf' => [ + { + title => 'Shelf', + isHidden => 1, + keywords => 'adminSubscription', + _children => [ + { + className => 'WebGUI::Asset::Sku::Product', + title => 'Product', + price => '5.00', + _files => [ + { + property => 'image1', + file => catfile( WebGUI::Paths->extras, 'plainblack.gif' ), + }, + ], + }, + { + className => 'WebGUI::Asset::Sku::Product', + title => 'Product x10', + price => '50.00', + _files => [ + { + property => 'image1', + file => catfile( WebGUI::Paths->extras, 'wg.png' ), + }, + ], + }, + ], + }, + ], + 'WebGUI::Asset::Sku::Subscription' => [ + { + title => 'Subscription', + isHidden => 1, + subscriptionGroupId => '12', + price => '5.00', + keywords => 'adminSubscription', + }, + ], + 'WebGUI::Asset::Wobject::AssetReport' => [ + { + title => 'AssetReport', + isHidden => 1, + settings => JSON->new->encode({ + className => 'WebGUI::Asset::Wobject::Layout', + }), + }, + ], + 'WebGUI::Asset::Wobject::Carousel' => [ + { + title => 'Carousel', + isHidden => 1, + items => JSON->new->encode({ + items => [ + { + sequenceNumber => 1, + text => lorem(0), + itemId => 1, + }, + { + sequenceNumber => 2, + text => lorem(1), + itemId => 2, + }, + { + sequenceNumber => 3, + text => lorem(2), + itemId => 3, + }, + { + sequenceNumber => 4, + text => lorem(3), + itemId => 4, + }, + ], + }), + }, + ], + 'WebGUI::Asset::File' => [ + { + title => 'File', + isHidden => 1, + filename => 'wg.png', + _files => [ + { + property => 'storageId', + file => catfile( WebGUI::Paths->extras, 'wg.png' ), + }, + ], + }, + ], + 'WebGUI::Asset::File::Image' => [ + { + title => 'Image', + isHidden => 1, + filename => 'wg.png', + _files => [ + { + property => 'storageId', + file => catfile( WebGUI::Paths->extras, 'wg.png' ), + }, + ], + }, + ], + 'WebGUI::Asset::Wobject::Navigation' => [ + { + title => 'Navigation', + isHidden => 1, + }, + ], + 'WebGUI::Asset::Redirect' => [ + { + title => 'Redirect', + menuTitle => 'Redirect to WebGUI.org', + redirectUrl => 'http://webgui.org', + }, + ], + 'WebGUI::Asset::Wobject::SQLReport' => [ + { + title => 'SQLReport', + isHidden => 1, + dbQuery1 => 'SELECT userId, username FROM users', + }, + ], + 'WebGUI::Asset::Wobject::SyndicatedContent' => [ + { + title => 'Syndicated Content', + isHidden => 1, + rssUrl => 'http://www.webgui.org/download/advisories.rss', + }, + ], + 'WebGUI::Asset::Template' => [ + { + title => 'Template', + isHidden => 1, + namespace => 'style', + template => '[% head_tags %][% body_content %]', + }, + ], +); + +sub getPropertySets { + my ( $self, $class ) = @_; + return $ASSETS{ $class }; +} + +=head2 lorem ( indexes ) + +Return generated lorem ipsum text. C is an array of paragraph indexes +to pull from __DATA__ + +=cut + +our @LOREM; +sub lorem { + my ( @indexes ) = @_; + return join "", map { "

    $_

    " } split "\n\n", lorem_text( @indexes ); +} + +sub lorem_text { + my ( @indexes ) = @_; + if ( !@LOREM ) { + @LOREM = ; + } + if ( scalar @indexes == 0 ) { + @indexes = ( 0..3 ); + } + return join "\n\n", @LOREM[ @indexes ]; +} + +1; + +__DATA__ +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque a velit eget mauris imperdiet auctor. Sed libero massa, laoreet a dapibus sed, scelerisque malesuada eros. Mauris suscipit, nisl nec rhoncus lacinia, libero felis adipiscing neque, eu ultrices ipsum turpis id dui. In tincidunt ipsum eget eros molestie porta. Maecenas in dui augue. Suspendisse eu pretium mauris. Mauris dignissim facilisis ligula aliquet iaculis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Ut eget diam vitae quam sollicitudin luctus. Morbi a tortor orci, ut vulputate velit. Mauris malesuada lorem dui, non scelerisque lectus. Ut interdum ligula at neque vehicula aliquet. Mauris venenatis dapibus neque, vitae hendrerit ipsum consectetur sed. Fusce hendrerit, nisl et convallis cursus, ligula augue pharetra lorem, ornare fringilla elit mi id nisl. Nullam et sem ut tellus suscipit eleifend. +Maecenas quis est et sapien condimentum porttitor ut in arcu. Ut nec erat lacus. Cras a ante neque, ac lobortis libero. Maecenas aliquet ullamcorper tellus, et fermentum neque porttitor nec. Aenean mollis porttitor nibh et sollicitudin. Aliquam at congue ligula. Aenean vitae dui non urna scelerisque blandit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus at enim cursus leo venenatis faucibus eu sed dui. Nam id sem ac risus molestie iaculis sed quis sapien. Vivamus sed blandit erat. Nullam placerat imperdiet sem ac ornare. Duis sem erat, euismod eget blandit dapibus, hendrerit imperdiet massa. Mauris quis tincidunt risus. Aliquam luctus vulputate turpis, non facilisis sapien rhoncus sed. +Nulla facilisi. Nam a purus a odio porta hendrerit ut et tellus. Sed hendrerit gravida sapien, et dapibus turpis ornare id. Aliquam mattis, eros sed egestas dignissim, turpis leo sollicitudin ante, nec pulvinar odio lorem id mi. Pellentesque neque lacus, faucibus vitae egestas in, placerat eu neque. Nulla libero est, fringilla id tristique sit amet, aliquam tincidunt nulla. Morbi posuere bibendum ipsum, a cursus tellus tempus quis. Etiam eu nisl eget purus consectetur fringilla sed id neque. Maecenas lacinia dolor sed dui vestibulum non interdum urna placerat. Quisque porta condimentum velit, non lobortis sapien feugiat vel. Ut ut fringilla neque. +Vestibulum dignissim sollicitudin sem aliquet condimentum. Donec egestas felis tempus nunc commodo vel fermentum enim porttitor. Curabitur tristique justo et augue elementum mattis. Phasellus rhoncus convallis augue sed viverra. Nam faucibus adipiscing dolor sagittis convallis. Fusce consectetur pretium nunc, sed rhoncus lacus dignissim eu. Quisque non felis non erat auctor adipiscing et vitae neque. Phasellus adipiscing convallis nisi eget sodales. Donec tincidunt nisl eget tellus laoreet faucibus. Vivamus facilisis eros risus, quis tristique orci. In convallis lacus et nisl venenatis id elementum nunc cursus. Cras pellentesque, mi in iaculis venenatis, sem nisl laoreet quam, ac malesuada dui diam sed enim. Phasellus eleifend posuere sagittis. +Integer ipsum dui, facilisis et adipiscing vitae, lacinia vitae arcu. Cras ac sapien eget ipsum faucibus condimentum at et sapien. Sed id nisi ante, non pharetra velit. Sed faucibus tincidunt nisl sed malesuada. Duis pharetra tempor felis vitae tristique. Vestibulum eget lacus eget ipsum interdum feugiat. Sed quis libero sit amet nisi pharetra posuere. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Suspendisse pharetra pharetra erat, et lacinia lectus fringilla eget. Nunc sem mi, blandit ut aliquet ut, ultricies vitae arcu. Quisque quis diam nibh. Proin nec vehicula sapien. Proin varius turpis a ante venenatis accumsan. Vivamus ornare porttitor lacus eget lacinia. +Quisque aliquam malesuada dolor vehicula aliquet. In in mauris nunc, ac pellentesque tortor. Suspendisse tincidunt nunc vel mauris auctor posuere. Nullam ante nibh, lacinia vitae pulvinar elementum, blandit ut leo. Aliquam erat volutpat. Nam quis risus orci. Sed augue nisl, imperdiet non auctor vitae, blandit in turpis. Duis mauris enim, fermentum eget tempor id, tempor ac tortor. In in justo ut urna scelerisque ultrices nec molestie lectus. In dolor arcu, interdum vitae feugiat eget, sagittis quis tortor. Nunc et metus urna, et sollicitudin augue. +Vivamus vel justo ligula. Nulla feugiat, velit sollicitudin lacinia accumsan, tellus diam rutrum quam, venenatis porta mauris leo quis lorem. Ut quis enim et quam dapibus molestie at nec ipsum. Integer ut purus vitae nibh commodo mollis. Quisque laoreet tellus sit amet ipsum tincidunt posuere. Maecenas diam nisi, dictum et sollicitudin vel, consequat a diam. Phasellus eu lacus sit amet mauris interdum aliquet ac luctus nisl. Nam vel justo nec diam viverra suscipit. Quisque et purus et ipsum vehicula pulvinar eu quis leo. Donec et quam at ante ullamcorper hendrerit nec eu arcu. Quisque a lectus quis felis fermentum malesuada sit amet ut eros. Curabitur facilisis semper aliquet. Vivamus lectus quam, pulvinar sed pellentesque vitae, rhoncus nec ipsum. Sed porttitor, quam vitae bibendum auctor, tellus ipsum condimentum risus, ut dictum neque justo sed nunc. Nunc bibendum, sapien ac egestas malesuada, nulla mauris ultricies lectus, ut congue eros nisl ac lacus. Etiam hendrerit, nunc in vestibulum consectetur, felis libero dignissim lectus, luctus tempus ipsum lectus eu tellus. Mauris rhoncus nisi id tortor condimentum adipiscing. +Quisque vel dapibus odio. Fusce porta pellentesque ligula, vel porttitor diam pharetra imperdiet. Aliquam viverra lacus eleifend sapien imperdiet id varius eros pretium. In condimentum lacinia leo non ornare. Suspendisse mollis elementum volutpat. Duis gravida metus id ligula consequat dapibus. Vestibulum laoreet vehicula metus, at aliquam sapien porttitor ac. Nunc non eros sapien, sed semper odio. Fusce tincidunt, massa ultricies fermentum dignissim, nunc dui interdum felis, quis interdum nisl diam et nunc. Donec sed magna eros. Fusce dignissim dictum tristique. Aenean molestie, nulla placerat faucibus aliquet, mauris ipsum tristique lectus, quis mollis mauris urna et ipsum. Etiam condimentum sapien at nisi convallis in tincidunt augue pellentesque. Donec tincidunt viverra fermentum. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce at consectetur erat. Vestibulum massa orci, bibendum quis cursus nec, commodo sed mauris. Etiam nec condimentum tortor. Fusce eget congue justo. Proin posuere mauris a sem facilisis egestas. +Maecenas mattis porttitor fringilla. Fusce imperdiet mollis tristique. In non lectus vel risus laoreet ultricies. Mauris sit amet ipsum nunc. Mauris a risus nec ligula adipiscing ullamcorper non eget risus. Maecenas sapien nisi, pellentesque ut ornare in, cursus et metus. Praesent nec ligula purus. In hac habitasse platea dictumst. Praesent feugiat aliquet felis, vitae tempus neque imperdiet ut. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris eleifend, libero quis mollis consequat, orci nibh tempus tortor, ac cursus magna turpis tempus ligula. Suspendisse non blandit dui. Sed vel ultricies sem. Vivamus mauris tortor, feugiat non facilisis vel, egestas vitae massa. Vivamus volutpat, quam eu fringilla aliquam, magna est suscipit nulla, quis pulvinar ipsum odio quis lectus. Etiam est lectus, ultrices in tempor nec, scelerisque eu lacus. Quisque a felis mauris, a pellentesque ligula. Nunc pharetra luctus fermentum. Fusce et velit mauris, eget iaculis ante. +Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nullam fringilla lacus at augue pretium sed consectetur tellus vulputate. Sed gravida augue at nibh congue tristique. Praesent ac orci sit amet sem suscipit facilisis eget ut ligula. Fusce magna odio, scelerisque sed pharetra quis, sollicitudin ut massa. Sed nunc metus, lacinia sed ullamcorper at, congue non neque. Cras eu dui quis massa pretium posuere. Morbi purus augue, convallis tempus consectetur ut, ultricies non tortor. Quisque in leo lacus. Nulla sem turpis, tincidunt in congue pulvinar, placerat pharetra velit. Mauris at purus urna. Maecenas interdum velit vitae diam ultrices tempus. Curabitur molestie aliquet odio. Etiam tempus mauris ut dui tincidunt sodales auctor dolor vestibulum. Donec tincidunt, arcu quis ultrices accumsan, nisl dui aliquam arcu, a tempor elit nulla vitae velit. Quisque sed velit lectus, sit amet sodales risus. diff --git a/lib/WebGUI/Command/upgrade.pm b/lib/WebGUI/Command/upgrade.pm new file mode 100644 index 000000000..61707aa02 --- /dev/null +++ b/lib/WebGUI/Command/upgrade.pm @@ -0,0 +1,245 @@ +package WebGUI::Command::upgrade; + +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 WebGUI::Command -command; +use strict; +use warnings; + +use WebGUI::Paths; +use WebGUI::Upgrade; + +sub opt_spec { + return ( + [ 'history', 'Display upgrade history for a site' ], + [ 'override', 'Force upgrade to run even if not running as root' ], + [ 'quiet', 'Don\'t show progress reports' ], + [ 'doit', 'Run upgrade' ], + [ 'skipdelete', 'Don\'t clear cache' ], + [ 'skipmaintenance', 'Don\'t turn on maintenance mode for sites while upgrading' ], + [ 'skipbackup', 'Don\'t create database backups' ], + [ 'backupdir=s', 'Directory to store database backups' ], + [ 'mysql=s', 'mysql command line client to use' ], + [ 'mysqldump=s', 'mysqldump command line client to use' ], + [ 'configFile=s@', 'Config file to upgrade. Multiple config files can be specified. If not specified, all available config files are used.' ], + ); +} + +sub validate_args { + my $self = shift; + my $opt = shift; + my $args = shift; + if ($opt->{history}) { + return; + } + elsif (! $opt->{doit}) { + $self->usage_error(<<'END_MESSAGE'); + ++--------------------------------------------------------------------+ +| | +| W A R N I N G | +| | +| There are no guarantees of any kind provided with this software. | +| This utility has been tested rigorously, and has performed without | +| error or consequence in our labs, and on our production servers | +| for many years. However, there is no substitute for a good backup | +| of your software and data before performing any kind of upgrade. | +| | +| BEFORE YOU UPGRADE you should definitely read docs/gotcha.txt to | +| find out what things you should know about that will affect your | +| upgrade. | +| | ++--------------------------------------------------------------------+ +| | +| For more information about this utility type: | +| | +| perl upgrade.pl --help | +| | ++--------------------------------------------------------------------+ + +END_MESSAGE + } + elsif ( $^O ne 'MSWin32' && $> != 0 && !$opt->{override} ) { + $self->usage_error('You must be the super user to use this utility.'); + } +} + +sub run { + my ($self, $opt, $args) = @_; + if ($opt->{history}) { + $self->show_history($opt, $args); + } + else { + $self->run_upgrade($opt, $args); + } +} + +sub run_upgrade { + my ($self, $opt, $args) = @_; + my $upgrade = WebGUI::Upgrade->new( + quiet => $opt->{quiet}, + clearCache => ! $opt->{skipdelete}, + createBackups => ! $opt->{skipbackup}, + useMaintenanceMode => ! $opt->{skipmaintenance}, + $opt->{mysql} ? ( + mysql => $opt->{mysql}, + ) : (), + $opt->{mysqldump} ? ( + mysqldump => $opt->{mysqldump}, + ) : (), + $opt->{backupdir} ? ( + backupPath => $opt->{backupdir}, + ) : (), + ); + if ($opt->{configfile}) { + $upgrade->upgradeSites($opt->{configFile}); + } + else { + $upgrade->upgradeSites; + } + + print <siteConfigs) { + print "$config:\n"; + WebGUI::Upgrade->reportHistory($config); + print "\n"; + } +} + +1; + +__END__ + +=head1 NAME + +WebGUI::Command::upgrade - Upgrade WebGUI database to the latest revision. + +=head1 SYNOPSIS + + upgrade --doit + [--backupDir path] + [--mysql pathname] + [--mysqldump pathname] + [--override] + [--skipBackup] + [--skipDelete] + [--skipMaintenance] + [--quiet] + upgrade --history + + upgrade --help + +=head1 DESCRIPTION + +This WebGUI utility script is able to upgrade B WebGUI database +to the currently installed version. The WebGUI software distribution +includes a set of upgrade scripts that perform the necessary database +changes (schema and data) to bring the database up-to-date in order +to match the currently installed WebGUI libraries and programs. + +This utility is designed to be run as a superuser on Linux systems, +since it needs to be able to access several system directories +and change ownership of files. If you want to run this utility without +superuser privileges, use the C<--override> option described below. + +=head2 WARNING + +There are B guarantees of any kind provided with this software. +This utility has been tested rigorously, and has performed without +error or consequences in our labs, and on our production servers +for many years. However, there is no substitute for a good backup +of your software and data before performing any kind of upgrade. + +B you should definitely read docs/gotcha.txt to +find out what things you should know about that will affect your +upgrade. + +=head1 OPTIONS + +=over 4 + +=item C<--doit> + +You B include this flag in the command line or the script +will refuse to run. This is to force you to read this documentation +at least once and be sure that you B want to perform the +upgrade. + +=item C<--backupDir path> + +Specify a path where database backups should be created during the +upgrade procedure. If left unspecified, it defaults to C. + +=item C<--history> + +Displays the upgrade history for each of your sites. Running with this +flag will B perform the upgrade. + +=item C<--mysql pathname> + +The full pathname to your mysql client executable. If left unspecified, +it defaults to C. + +=item C<--mysqldump pathname> + +The full pathname to your mysqldump executable. If left unspecified, +it defaults to C. + +=item C<--override> + +This flag will allow you to run this utility without being the super user, +but note that it may not work as intended. + +=item C<--skipBackup> + +Use this if you B want database backups to be performed +during the upgrade procedure. + +=item C<--skipDelete> + +The upgrade procedure normally deletes WebGUI's cache and temporary files +created as part of the upgrade. This cleanup is very important during +large upgrades, but can make the procedure quite slow. This option +skips the deletion of these files. + +=item C<--skipMaintenance> + +The upgrade procedure normally puts up a simple maintenance page on all +the sites while running, but this option will skip that step. + +=item C<--quiet> + +Disable all output unless there's an error. + +=item C<--configFile www.example.com.conf> + +Upgrade a specific config file. Can be specified multiple times +to upgrade multiple sites. If not specified, all sites will be +upgraded. + +=back + +=head1 AUTHOR + +Copyright 2001-2012 Plain Black Corporation. + +=cut + diff --git a/lib/WebGUI/Config.pm b/lib/WebGUI/Config.pm index 03634a7f9..347931abf 100644 --- a/lib/WebGUI/Config.pm +++ b/lib/WebGUI/Config.pm @@ -3,7 +3,7 @@ package WebGUI::Config; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -14,13 +14,12 @@ package WebGUI::Config; =cut -use strict; -use Class::InsideOut qw(readonly id register); +use Moose; +extends 'Config::JSON'; + +use WebGUI::Paths; use Cwd (); use File::Spec; -use base 'Config::JSON'; - -my %config = (); =head1 NAME @@ -34,11 +33,7 @@ This package parses the WebGUI config file. use WebGUI::Config; - WebGUI::Config->loadAllConfigs($webguiRoot); - - my $configs = WebGUI::Config->readAllConfigs($webguiRoot); - - my $config = WebGUI::Config->new($webguiRoot, $configFileName); + my $config = WebGUI::Config->new($configFileName); my $value = $config->get($param); $config->set($param,$value); @@ -51,7 +46,6 @@ This package parses the WebGUI config file. $config->addToArray($name, $value); my $configFileName = $config->getFilename; - my $webguiRoot = $config->getWebguiRoot; =head1 ISA @@ -65,24 +59,6 @@ These subroutines are available from this package: #------------------------------------------------------------------- -=head2 clearCache ( ) - -Clear the cache of in-memory configuration files. This is required by the upgrade script, which -forks to run each upgrade. When the child is reaped, the original is untouched, so that the -next script in the line recieves an old, in-memory config, essentially undoing any config -changes in the first upgrade script. - -This is a class method. - -=cut - -sub clearCache { - my $class = shift; - %config = (); -} - -#------------------------------------------------------------------- - =head2 getCookieName ( ) Returns the cookie name defined in the config file. Returns "wgSession" if one isn't defined. @@ -112,117 +88,25 @@ sub getCookieTTL { #------------------------------------------------------------------- -=head2 getWebguiRoot ( ) +=head2 new ( configFile ) -Returns the path to the WebGUI installation. - -=cut - -readonly getWebguiRoot => my %webguiRoot; - - -#------------------------------------------------------------------- - -=head2 loadAllConfigs ( webguiRoot ) - -Reads all the config file data for all defined sites into an in-memory cache. This is a class method. - -=head3 webguiRoot - -The path to the WebGUI installation. - -=cut - -sub loadAllConfigs { - my $class = shift; - my $webguiPath = shift; - my $configs = $class->readAllConfigs($webguiPath); - foreach my $filename (keys %{$configs}) { - unless ($filename =~ /^demo\d/) { - print "\tLoading ".$filename."\n"; - $config{$filename} = $configs->{$filename}; - } - } -} - - -#------------------------------------------------------------------- - -=head2 new ( webguiRoot , configFile [ , noCache ] ) - -Returns a hash reference containing the configuration data. It tries to get the data out of the memory cache first, but reads the config file directly if necessary. - -=head3 webguiRoot - -The path to the WebGUI installation. +Returns a WebGUI::Config object for the given file. The file name +can be either an absolute file path, or a path relative to the +WebGUI configuration directory. =head3 configFile The filename of the config file to read. -=head3 noCache - -A boolean value that when set to true tells the config system not to store the config in an in memory cache, in case it's loaded again later. This is mostly used when loading utility configs, like spectre.conf. - =cut -sub new { - my $class = shift; - my $webguiPath = Cwd::realpath(shift); - my $filename = shift; - my $noCache = shift; - my $fullPath = File::Spec->file_name_is_absolute($filename) - ? $filename - : Cwd::realpath($webguiPath.'/etc/'.$filename); - if ($config{$fullPath}) { - return $config{$fullPath}; - } else { - my $self = Config::JSON->new($fullPath); - register($self, $class); - $webguiRoot{id $self} = $webguiPath; - $config{$filename} = $self unless $noCache; - return $self; - } -} - - -#------------------------------------------------------------------- - -=head2 readAllConfigs ( webguiRoot ) - -Reads all the config file data for all defined sites and returns a hash reference containing WebGUI::Config objects keyed by filename. This is a class method. - -Example: $configs->{$filename}; - -=head3 webguiRoot - -The path to the WebGUI installation. - -=cut - -sub readAllConfigs { - my $class = shift; - my $webguiPath = shift; - opendir my $dh, $webguiPath."/etc"; - my @files = readdir $dh; - closedir $dh; - my %configs; - foreach my $file (@files) { - next - if $file !~ /\.conf$/ - || $file =~ /^\./ - || $file eq 'log.conf' - || $file eq 'spectre.conf'; - eval { - $configs{$file} = WebGUI::Config->new($webguiPath,$file) - }; - if ($@) { - warn "Config file ".$file." looks to be corrupt or have a syntax error."; - } - } - return \%configs; -} - +around BUILDARGS => sub { + my $orig = shift; + my $class = shift; + my $filename = shift; + $filename = Cwd::realpath(File::Spec->rel2abs($filename, WebGUI::Paths->configBase)); + return $class->$orig($filename); +}; 1; diff --git a/lib/WebGUI/Content/Account.pm b/lib/WebGUI/Content/Account.pm index f8bf1a5ef..13ddbaac6 100644 --- a/lib/WebGUI/Content/Account.pm +++ b/lib/WebGUI/Content/Account.pm @@ -3,7 +3,7 @@ package WebGUI::Content::Account; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Content/Admin.pm b/lib/WebGUI/Content/Admin.pm new file mode 100644 index 000000000..92ed3f16b --- /dev/null +++ b/lib/WebGUI/Content/Admin.pm @@ -0,0 +1,108 @@ +package WebGUI::Content::Admin; + +=head1 LEGAL + + ------------------------------------------------------------------- + WebGUI is Copyright 2001-2012 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 + ------------------------------------------------------------------- + +=cut + +use strict; +use WebGUI::Admin; +use WebGUI::Pluggable; + + +=head1 NAME + +Package WebGUI::Content::Admin + +=head1 DESCRIPTION + +The WebGUI Admin Console + +=head1 SUBROUTINES + +These subroutines are available from this package: + +=cut + +#------------------------------------------------------------------- + +=head2 handler ( session ) + +Handle every op=admin request + + 1) Try to run the Admin Console plugin requested + 2) Show the Admin Console wrapper + +=cut + +sub handler { + my ($session) = @_; + + if ( $session->form->get("op") eq "admin" ) { + if ( $session->form->get("plugin") ) { + my $id = $session->form->get('id'); + my $props = $session->config->get('adminConsole')->{ $id }; + + if ( !$props ) { + return "ERROR"; # die here + } + + my $class = $props->{ className }; + WebGUI::Pluggable::load( $class ); + my $method = $session->form->get('method') || "view"; + + if ( $class->can( "www_" . $method ) ) { + return $class->can( "www_" . $method )->($session); + } + else { + return "ERROR"; # die here + } + + } + else { + my $admin = WebGUI::Admin->new( $session ); + my $method = $session->form->get('method') || "view"; + + if ( $admin->can( "www_" . $method ) ) { + return $admin->can( "www_" . $method )->($admin); + } + else { + return "ERROR"; # die here + } + } + } + + if ( $session->form->get("op") eq "assetHelper" ) { + # Load and run the requested asset helper www_ method + my $assetId = $session->form->get('assetId'); + my $asset = WebGUI::Asset->newById( $session, $assetId ); + + my $helperId = $session->form->get('helperId'); + my $class = $asset->getHelpers->{ $helperId }->{ className }; + WebGUI::Pluggable::load( $class ); + my $helper = $class->new( id => $helperId, session => $session, asset => $asset ); + + my $method = $session->form->get('method') || "view"; + if ( $helper->can( "www_" . $method ) ) { + return $helper->can( "www_" . $method )->( $helper ); + } + else { + $session->log->error( sprintf 'Invalid asset helper "%s" calling method "%s"', $helperId, $method ); + } + } + + return; +} + + +1; +#vim:ft=perl diff --git a/lib/WebGUI/Content/AjaxI18N.pm b/lib/WebGUI/Content/AjaxI18N.pm index 4d6018526..4bf8fe55c 100644 --- a/lib/WebGUI/Content/AjaxI18N.pm +++ b/lib/WebGUI/Content/AjaxI18N.pm @@ -3,7 +3,7 @@ package WebGUI::Content::AjaxI18N; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -64,7 +64,7 @@ sub handler { else { $session->log->warn("User ".$session->user->username." tried to execute ajaxGetI18n but could not decode JSON string: $json"); } - $session->http->setMimeType( "application/json" ); + $session->response->content_type( "application/json" ); return JSON->new->encode( $response ); } diff --git a/lib/WebGUI/Content/Asset.pm b/lib/WebGUI/Content/Asset.pm index 5e429267a..ac24580dc 100644 --- a/lib/WebGUI/Content/Asset.pm +++ b/lib/WebGUI/Content/Asset.pm @@ -3,7 +3,7 @@ package WebGUI::Content::Asset; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -20,11 +20,9 @@ use Time::HiRes; use WebGUI::Asset; use WebGUI::PassiveAnalytics::Logging; -use Apache2::Const -compile => qw(OK); - =head1 NAME -Package WebGUI::Content::MyHandler +Package WebGUI::Content::Asset =head1 DESCRIPTION @@ -71,10 +69,9 @@ sub dispatch { WebGUI::PassiveAnalytics::Logging::log($session, $asset); # display from cache if page hasn't been modified. if ($session->user->isVisitor - && !$session->http->ifModifiedSince($asset->getContentLastModified, $session->setting->get('maxCacheTimeout'))) { - $session->http->setStatus("304","Content Not Modified"); - $session->http->sendHeader; - $session->close; + && !$session->request->ifModifiedSince($asset->getContentLastModified, $session->setting->get('maxCacheTimeout'))) { + $session->response->status("304"); + $session->response->sendHeader; return "chunked"; } @@ -82,12 +79,21 @@ sub dispatch { $fragment =~ s/$url//; $session->asset($asset); my $output = eval { $asset->dispatch($fragment); }; + if( $@ ) { + my $e = WebGUI::Error->caught('WebGUI::Error'); + if( $session->request->env->{'webgui.debug'} ) { + $e->rethrow; + } else + { + $session->log->error( "Problem with dispatching $url: " . $e, $e ); + } + } return $output if defined $output; } } $session->clearAsset; - if ($session->var->isAdminOn) { - my $asset = WebGUI::Asset->newByUrl($session, $session->url->getRefererUrl) || WebGUI::Asset->getDefault($session); + if ($session->isAdminOn) { + my $asset = eval { WebGUI::Asset->newByUrl($session, $session->url->getRefererUrl) } || WebGUI::Asset->getDefault($session); return $asset->addMissing($assetUrl); } return undef; @@ -105,8 +111,8 @@ sub getAsset { my $session = shift; my $assetUrl = shift; my $asset = eval{WebGUI::Asset->newByUrl($session,$assetUrl,$session->form->process("revision"))}; - if ($@) { - $session->errorHandler->warn("Couldn't instantiate asset for url: ".$assetUrl." Root cause: ".$@); + if (Exception::Class->caught()) { + $session->log->warn("Couldn't instantiate asset for url: ".$assetUrl." Root cause: ".$@); } return $asset; } @@ -166,47 +172,16 @@ The content handler for this package. sub handler { my ($session) = @_; - my ($errorHandler, $http, $var, $asset, $request, $config) = $session->quick(qw(errorHandler http var asset request config)); + my ($log, $asset, $request, $config) = $session->quick(qw(errorHandler asset request config)); my $output = ""; - if ($errorHandler->canShowPerformanceIndicators) { #show performance indicators if required + if (my $perfLog = $log->performanceLogger) { #show performance indicators if required my $t = [Time::HiRes::gettimeofday()]; $output = dispatch($session, getRequestedAssetUrl($session)); - $t = Time::HiRes::tv_interval($t) ; - if ($output =~ /<\/title>/) { - $output =~ s/<\/title>/ : ${t} seconds<\/title>/i; - } - else { - # Kludge. - my $mimeType = $http->getMimeType(); - if ($mimeType eq 'text/css') { - $session->output->print("\n/* Page generated in $t seconds. */\n"); - } - elsif ($mimeType =~ m{text/html}) { - $session->output->print("\nPage generated in $t seconds.\n"); - } - else { - # Don't apply to content when we don't know how - # to modify it semi-safely. - } - } - } + $perfLog->({ time => Time::HiRes::tv_interval($t), type => 'Page' }); + } else { $output = dispatch($session, getRequestedAssetUrl($session)); } - - my $filename = $http->getStreamedFile(); - if ((defined $filename) && ($config->get("enableStreamingUploads") eq "1")) { - my $ct = guess_media_type($filename); - my $oldContentType = $request->content_type($ct); - if ($request->sendfile($filename) ) { - $session->close; - return Apache2::Const::OK; - } - else { - $request->content_type($oldContentType); - } - } - return $output; } diff --git a/lib/WebGUI/Content/AssetDiscovery.pm b/lib/WebGUI/Content/AssetDiscovery.pm index 4a2443253..f6c51dcd8 100644 --- a/lib/WebGUI/Content/AssetDiscovery.pm +++ b/lib/WebGUI/Content/AssetDiscovery.pm @@ -3,7 +3,7 @@ package WebGUI::Content::AssetDiscovery; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -17,7 +17,6 @@ package WebGUI::Content::AssetDiscovery; use strict; use JSON; use WebGUI::Asset; -use WebGUI::Utility; use XML::Simple; =head1 NAME @@ -112,18 +111,18 @@ sub handler { my $limit = ($pageNumber * 100 - 100).','.($pageNumber * 100 - 1); my $siteUrl = $session->url->getSiteURL; my $date = $session->datetime; - my $matchingAssets = $session->db->read("select assetId from asset where lineage like ? and className=? limit ".$limit, [$start->get('lineage').'%', $class]); + my $matchingAssets = $session->db->read("select assetId from asset where lineage like ? and className=? limit ".$limit, [$start->lineage.'%', $class]); while (my ($id) = $matchingAssets->array) { - my $asset = WebGUI::Asset->new($session, $id, $class); - if (defined $asset) { - if ($asset->canView && $asset->get('state') eq 'published' && isIn($asset->get('status'), 'approved', 'archived')) { + my $asset = eval { WebGUI::Asset->newById($session, $id); }; + if (! Exception::Class->caught() ) { + if ($asset->canView && $asset->state eq 'published' && $asset->status ~~ ['approved', 'archived']) { push @assets, { title => $asset->getTitle, - menuTitle => $asset->get('menuTitle'), - synopsis => $asset->get('synopsis'), + menuTitle => $asset->menuTitle, + synopsis => $asset->synopsis, url => $siteUrl.$asset->getUrl, - dateCreated => $date->epochToHuman($asset->get('creationDate'), '%y-%m-%d %j:%n:%s'), - lastUpdated => $date->epochToHuman($asset->get('revisionDate'), '%y-%m-%d %j:%n:%s'), + dateCreated => $date->epochToHuman($asset->creationDate, '%y-%m-%d %j:%n:%s'), + lastUpdated => $date->epochToHuman($asset->revisionDate, '%y-%m-%d %j:%n:%s'), }; } } @@ -135,10 +134,10 @@ sub handler { assets => \@assets }; if ($as eq "xml") { - $session->http->setMimeType('text/xml'); + $session->response->content_type('text/xml'); return XML::Simple::XMLout($document, NoAttr => 1); } - $session->http->setMimeType('application/json'); + $session->response->content_type('application/json'); return JSON->new->encode($document); } return undef; diff --git a/lib/WebGUI/Content/AssetHistory.pm b/lib/WebGUI/Content/AssetHistory.pm index 4780509eb..f46a25fd9 100644 --- a/lib/WebGUI/Content/AssetHistory.pm +++ b/lib/WebGUI/Content/AssetHistory.pm @@ -3,7 +3,7 @@ package WebGUI::Content::AssetHistory; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -107,7 +107,7 @@ EOSQL $results{'startIndex'} = $startIndex; $results{'sort'} = undef; $results{'dir'} = $sortDir; - $session->http->setMimeType('application/json'); + $session->response->content_type('application/json'); my $json = JSON::to_json(\%results); return $json; } @@ -125,22 +125,20 @@ sub www_view { return $session->privilege->insufficient unless $session->user->isInGroup(12); ##YUI specific datatable CSS - my $ac = WebGUI::AdminConsole->new( $session, "assetHistory", { - showAdminBar => 1 - } ); + my $ac = WebGUI::AdminConsole->new( $session, "assetHistory" ); my ($style, $url) = $session->quick(qw(style url)); - $style->setLink($url->extras('/yui/build/fonts/fonts-min.css'), {rel=>'stylesheet', type=>'text/css'}); - $style->setLink($url->extras('yui/build/datatable/assets/skins/sam/datatable.css'), {rel=>'stylesheet', type => 'text/CSS'}); - $style->setLink($url->extras('yui/build/paginator/assets/skins/sam/paginator.css'), {rel=>'stylesheet', type => 'text/CSS'}); - $style->setScript($url->extras('/yui/build/utilities/utilities.js'), {type=>'text/javascript'}); - $style->setScript($url->extras('yui/build/json/json-min.js'), {type => 'text/javascript'}); - $style->setScript($url->extras('yui/build/paginator/paginator-min.js'), {type => 'text/javascript'}); - $style->setScript($url->extras('yui/build/datasource/datasource-min.js'), {type => 'text/javascript'}); + $style->setCss($url->extras('/yui/build/fonts/fonts-min.css')); + $style->setCss($url->extras('yui/build/datatable/assets/skins/sam/datatable.css')); + $style->setCss($url->extras('yui/build/paginator/assets/skins/sam/paginator.css')); + $style->setScript($url->extras('/yui/build/utilities/utilities.js')); + $style->setScript($url->extras('yui/build/json/json-min.js')); + $style->setScript($url->extras('yui/build/paginator/paginator-min.js')); + $style->setScript($url->extras('yui/build/datasource/datasource-min.js')); ##YUI Datatable - $style->setScript($url->extras('yui/build/datatable/datatable-min.js'), {type => 'text/javascript'}); + $style->setScript($url->extras('yui/build/datatable/datatable-min.js')); ##WebGUI YUI AssetHistory - $style->setScript( $url->extras( 'yui-webgui/build/i18n/i18n.js' ), {type => 'text/javascript'} ); - $style->setScript( $url->extras('yui-webgui/build/assetHistory/assetHistory.js'), {type => 'text/javascript'}); + $style->setScript( $url->extras( 'yui-webgui/build/i18n/i18n.js' )); + $style->setScript( $url->extras('yui-webgui/build/assetHistory/assetHistory.js')); ##Default CSS $style->setRawHeadTags(''); my $i18n=WebGUI::International->new($session); diff --git a/lib/WebGUI/Content/AssetManager.pm b/lib/WebGUI/Content/AssetManager.pm deleted file mode 100644 index 1a1de24cd..000000000 --- a/lib/WebGUI/Content/AssetManager.pm +++ /dev/null @@ -1,747 +0,0 @@ -package WebGUI::Content::AssetManager; - -use strict; - -use JSON qw( from_json to_json ); -use URI; -use WebGUI::Form; -use WebGUI::Paginator; -use WebGUI::Utility; -use WebGUI::Macro::AdminBar; - -#---------------------------------------------------------------------------- - -=head2 getClassSelectBox ( session ) - -Gets a select box to choose a class name. - -=cut - -sub getClassSelectBox { - my $session = shift; - my $i18n = WebGUI::International->new($session, 'Asset'); - - tie my %classes, "Tie::IxHash", ( - "" => $i18n->get("Any Class"), - $session->db->buildHash("select distinct(className) from asset"), - ); - delete $classes{"WebGUI::Asset"}; # don't want to search for the root asset - - #my $className = $session->form->process("class","className") || $session->scratch->get('assetManagerSearchClassName'); - my $className = $session->form->get('action') ? $session->form->process('class', "className") - : $session->scratch->get('assetManagerSearchPageNumber') - ; - $session->scratch->set('assetManagerSearchClassName', $className); - return WebGUI::Form::selectBox( $session, { - name => "class", - value => $className, - defaultValue => "", - options => \%classes, - }); -} - -#---------------------------------------------------------------------------- - -=head2 getCurrentAsset ( session ) - -Returns the asset we would be looking at if we weren't looking at the Asset -Manager. - -=cut - -sub getCurrentAsset { - my $session = shift; - return WebGUI::Asset->newByUrl( $session ); -} - -#---------------------------------------------------------------------------- - -=head2 getHeader ( session ) - -Get a header to pick "Manage" or "Search". Add other things later maybe? - -=cut - -sub getHeader { - my $session = shift; - my $output = ''; - my $i18n = WebGUI::International->new( $session, "Asset" ); - - if ( $session->form->get( 'method' ) eq "search" ) { - $output .= '
    ' - . join( " | ", - q{} . $i18n->get( 'manage' ) . q{}, - q{} . $i18n->get( "search" ) . q{}, - ) - . q{
    } - ; - } - else { - $output .= '
    ' - . join( " | ", - q{} . $i18n->get( "manage" ) . q{}, - q{} . $i18n->get( "search" ) . q{}, - ) - . q{
    } - ; - } - - return $output; -} - -#---------------------------------------------------------------------------- - -=head2 getManagerPaginator ( session ) - -Get a page for the Asset Manager view. Returns a WebGUI::Paginator object -filled with asset IDs. - -=cut - -sub getManagerPaginator { - my $session = shift; - my $user = $session->user; - my $asset = getCurrentAsset( $session ); - my %update; - - my $orderByColumn = $session->form->get( 'orderByColumn' ); - if ($orderByColumn) { - $update{assetManagerSortColumn} = $orderByColumn; - } - else { - $orderByColumn = $user->get( 'assetManagerSortColumn' ) || 'lineage'; - } - my $orderByDirection = lc $session->form->get( 'orderByDirection' ); - if ($orderByDirection) { - $update{assetManagerSortDirection} = $orderByDirection; - } - else { - $orderByDirection = $user->get( 'assetManagerSortDirection' ); - } - $orderByDirection = $orderByDirection eq 'desc' ? 'DESC' : 'ASC'; - $user->update( \%update ) if ( keys %update ); - - my $recordOffset = $session->form->get( 'recordOffset' ) || 1; - my $rowsPerPage = $session->form->get( 'rowsPerPage' ) || 100; - my $currentPage = int ( $recordOffset / $rowsPerPage ) + 1; - - my $p = WebGUI::Paginator->new( $session, '', $rowsPerPage, 'pn', $currentPage ); - - my $orderBy = $session->db->dbh->quote_identifier( $orderByColumn ) . ' ' . $orderByDirection; - $p->setDataByArrayRef( $asset->getLineage( ['children'], { orderByClause => $orderBy } ) ); - - return { - paginator => $p, - sortColumn => $orderByColumn, - sortDirection => lc $orderByDirection, - }; -} - -#---------------------------------------------------------------------------- - -=head2 getSearchPaginator ( session, query ) - -Get a page for the Asset Search view. Returns a WebGUI::Paginator object -filled with asset IDs. - -=cut - -sub getSearchPaginator { - my $session = shift; - my $query = shift; - my %parms; - - my $s = WebGUI::Search->new( $session, 0 ); - $s->search( { - assetIds => $query->{ assetIds }, - keywords => $query->{ keywords }, - classes => $query->{ classes }, - } ); - - my $queryString = 'op=assetManager;method=search;keywords=' . $query->{ keywords }; - for my $class ( @{ $query->{ classes } } ) { - $queryString .= ';class=' . $class; - } - - ##If the form was submitted, we always use page #1. Otherwise, take the page # from the - ##form or from the scratch variable. - my $pageNumber = $session->form->get('action') ? 1 - : $session->form->get('pn') ? $session->form->get('pn') - : $session->scratch->get('assetManagerSearchPageNumber') - ; - my $p = $s->getPaginatorResultSet( $session->url->page( $queryString ), undef, $pageNumber ); - - $session->scratch->set('assetManagerSearchPageNumber', $pageNumber); - return $p; -} - -#---------------------------------------------------------------------------- - -=head2 getMoreMenu ( session, label ) - -Gets the "More" menu with the specified label. - -=cut - -sub getMoreMenu { - my $session = shift; - my $label = shift || "More"; - my $userUiLevel = $session->user->profileField("uiLevel"); - my $toolbarUiLevel = $session->config->get("assetToolbarUiLevel"); - my $i18n = WebGUI::International->new( $session, "Asset" ); - - ### The More menu - my @more_fields = (); - # FIXME: Add a show callback with the record as first argument. If it - # returns true, the URL will be shown. - # These links are shown based on UI level - if ( $userUiLevel >= $toolbarUiLevel->{ "changeUrl" } ) { - push @more_fields, { - url => 'func=changeUrl;proceed=manageAssets', - label => $i18n->get( 'change url' ), - }; - } - - if ( $userUiLevel >= $toolbarUiLevel->{ "editBranch" } ) { - push @more_fields, { - url => 'func=editBranch', - label => $i18n->get( 'edit branch' ), - }; - } - - if ( $userUiLevel >= $toolbarUiLevel->{ "shortcut" } ) { - push @more_fields, { - url => 'func=createShortcut;proceed=manageAssets', - label => $i18n->get( 'create shortcut' ), - }; - } - - if ( $userUiLevel >= $toolbarUiLevel->{ "revisions" } ) { - push @more_fields, { - url => 'func=manageRevisions', - label => $i18n->get( 'revisions' ), - }; - } - - if ( $userUiLevel >= $toolbarUiLevel->{ "view" } ) { - push @more_fields, { - url => '', - label => $i18n->get( 'view' ), - }; - } - - if ( $userUiLevel >= $toolbarUiLevel->{ "edit" } ) { - push @more_fields, { - url => 'func=edit;proceed=manageAssets', - label => $i18n->get( 'edit' ), - }; - } - - if ( $userUiLevel >= $toolbarUiLevel->{ "lock" } ) { - push @more_fields, { - url => 'func=lock;proceed=manageAssets', - label => $i18n->get( 'lock' ), - }; - } - - if ( $session->config->get("exportPath") && $userUiLevel >= $toolbarUiLevel->{"export"} ) { - push @more_fields, { - url => 'func=export', - label => $i18n->get( 'Export Page' ), - }; - } - - return to_json \@more_fields; -} - -#---------------------------------------------------------------------------- - -=head2 handler ( session ) - -Handle the session, if we can. Otherwise pass it on. - -Check permissions - -=cut - -sub handler { - my ( $session ) = @_; - - if ( $session->form->get( 'op' ) eq 'assetManager' && getCurrentAsset( $session ) ) { - $session->asset(getCurrentAsset($session)); - - return $session->privilege->noAccess unless getCurrentAsset( $session )->canEdit; - - my $method = $session->form->get( 'method' ) - ? 'www_' . $session->form->get( 'method' ) - : 'www_manage' - ; - - # Validate the method name - if ( !__PACKAGE__->can( $method ) ) { - return "Invalid method"; - } - else { - return __PACKAGE__->can( $method )->( $session ); - } - } - else { - return; - } -} - -#---------------------------------------------------------------------------- - -=head2 www_ajaxGetManagerPage ( session ) - -Get a page of Asset Manager data, ajax style. Returns a JSON array to be -formatted in a WebGUI.AssetManager data table. - -=cut - -sub www_ajaxGetManagerPage { - my $session = shift; - my $i18n = WebGUI::International->new( $session, "Asset" ); - my $assetInfo = { assets => [] }; - my $pageInfo = getManagerPaginator( $session ); - my $p = $pageInfo->{paginator}; - - for my $assetId ( @{ $p->getPageData } ) { - my $asset = WebGUI::Asset->newByDynamicClass( $session, $assetId ); - - # Populate the required fields to fill in - my %fields = ( - assetId => $asset->getId, - url => $asset->getUrl, - lineage => $asset->get( "lineage" ), - title => $asset->get( "menuTitle" ), - revisionDate => $asset->get( "revisionDate" ), - childCount => $asset->getChildCount, - assetSize => $asset->get( 'assetSize' ), - lockedBy => ($asset->get( 'isLockedBy' ) ? $asset->lockedBy->username : ''), - actions => $asset->canEdit && $asset->canEditIfLocked, - ); - - $fields{ className } = {}; - # The asset icon - my $icon = [ grep { $_->{ icon } } @{ $asset->definition( $session ) } ]->[ 0 ]->{ icon }; - $fields{ icon } = $session->url->extras( '/assets/small/' . $icon ); - - # The asset type (i18n name) - my $type = [ grep { $_->{ assetName } } @{ $asset->definition( $session ) } ]->[ 0 ]->{ assetName }; - $fields{ className } = $type; - - push @{ $assetInfo->{ assets } }, \%fields; - } - - $assetInfo->{ totalAssets } = $p->getRowCount; - $assetInfo->{ sort } = $pageInfo->{sortColumn}; - $assetInfo->{ dir } = $pageInfo->{sortDirection}; - - $session->http->setMimeType( 'application/json' ); - - return to_json( $assetInfo ); -} - -#---------------------------------------------------------------------------- - -=head2 www_manage ( session ) - -Show the main screen of the asset manager, paginated. Also load the -JavaScript that will take over if the browser has the cojones. - -=cut - -sub www_manage { - my ( $session ) = @_; - my $ac = WebGUI::AdminConsole->new( $session, "assets", { - showAdminBar => 1 - } ); - my $currentAsset = getCurrentAsset( $session ); - my $i18n = WebGUI::International->new( $session, "Asset" ); - - ### Do Action - my @assetIds = $session->form->get( 'assetId' ); - - # Handle autocommit workflows - if (WebGUI::VersionTag->autoCommitWorkingIfEnabled($session, { - allowComments => 1, - returnUrl => $currentAsset->getUrl, - }) eq 'redirect' ) { - return undef; - }; - - # Show the page - # i18n we'll need later - # TODO: Add all i18n to this hash so we can better format our JS code - my %i18n = ( - "select all" => $i18n->get( "select all" ), - ); - - # Add script and stylesheets - $session->style->setLink( $session->url->extras('yui/build/paginator/assets/skins/sam/paginator.css'), {rel=>'stylesheet', type=>'text/css'}); - $session->style->setLink( $session->url->extras('yui/build/datatable/assets/skins/sam/datatable.css'), {rel=>'stylesheet', type=>'text/css'}); - $session->style->setLink( $session->url->extras('yui/build/menu/assets/skins/sam/menu.css'), {rel=>'stylesheet', type=>'text/css'}); - $session->style->setLink( $session->url->extras('yui-webgui/build/assetManager/assetManager.css' ), { rel => "stylesheet", type => 'text/css' } ); - - $session->style->setScript( $session->url->extras( 'yui/build/utilities/utilities.js' ) ); - $session->style->setScript( $session->url->extras( 'yui/build/paginator/paginator-min.js ' ) ); - $session->style->setScript( $session->url->extras( 'yui/build/datasource/datasource-min.js ' ) ); - $session->style->setScript( $session->url->extras( 'yui/build/datatable/datatable-min.js ' ) ); - $session->style->setScript( $session->url->extras( 'yui/build/container/container-min.js' ) ); - $session->style->setScript( $session->url->extras( 'yui/build/menu/menu-min.js' ) ); - $session->style->setScript( $session->url->extras( 'yui/build/json/json-min.js' ) ); - $session->style->setScript( $session->url->extras( 'yui-webgui/build/i18n/i18n.js' ) ); - $session->style->setScript( $session->url->extras( 'yui-webgui/build/assetManager/assetManager.js' ) ); - $session->style->setScript( $session->url->extras( 'yui-webgui/build/form/form.js' ) ); - - $session->style->setRawHeadTags( < - YAHOO.util.Event.onDOMReady( WebGUI.AssetManager.initManager ); - -ENDHTML - my $output = '
    ' . getHeader( $session ); - - ### Crumbtrail - my $crumb_markup = '
  • %s >
  • '; - my $ancestorIter = $currentAsset->getLineageIterator( ['ancestors'] ); - - $output .= '
      '; - while ( 1 ) { - my $ancestor; - eval { $ancestor = $ancestorIter->() }; - if ( my $x = WebGUI::Error->caught('WebGUI::Error::ObjectNotFound') ) { - $session->log->error($x->full_message); - next; - } - last unless $ancestor; - $output .= sprintf $crumb_markup, - $ancestor->getUrl( 'op=assetManager;method=manage' ), - $ancestor->get( "menuTitle" ), - ; - } - - # And ourself - $output .= sprintf q{
    1. %s
    2. }, - $currentAsset->getUrl, - ($currentAsset->canEdit && $currentAsset->canEditIfLocked ? 1 : 0), - $currentAsset->get( "menuTitle" ), - ; - $output .= '
    '; - - ### The page of assets - $output .= sprintf <asset->getUrl, WebGUI::Form::CsrfToken->new($session)->toHtml, $i18n->get( 'with selected' ), $i18n->get( "update" ), $i18n->get( "delete" ), $i18n->get( '43' ), $i18n->get( 'cut' ), $i18n->get( "Copy" ), $i18n->get( "duplicate" ); -
    -
    -%s - - -
    -
    -

    %s - - - - - -

    -
    - -
    -EOHTML - - ### Clearing div - $output .= q{
     
    }; - - tie my %options, 'Tie::IxHash'; - my $hasClips = 0; - my $clipNum = 0; - foreach my $asset (@{$currentAsset->getAssetsInClipboard(1)}) { - $options{$asset->getId} = ''.$asset->getName.' '.$asset->getTitle; - $hasClips = 1; - $clipNum++; - } - if ($hasClips) { - $output .= '
    '.$i18n->get(1082).'' - .WebGUI::Form::formHeader($session, {action=>$currentAsset->getUrl}) - .WebGUI::Form::hidden($session,{name=>"func",value=>"pasteList"}) - .WebGUI::Form::hidden($session,{name=>"proceed",value=>"manageAssets"}) - .( $clipNum > 1 - ? WebGUI::Form::checkbox($session,{extras=>'onclick="toggleClipboardSelectAll(this.form);"'}).' '.$i18n->get("select all").'
    ' - : '' - ) - - .WebGUI::Form::checkList($session,{name=>"assetId",vertical=>1,options=>\%options}) - .'
    ' - .WebGUI::Form::submit($session,{value=>$i18n->get('Paste')}) - .WebGUI::Form::formFooter($session) - .'
    ' - .''; - } - - ## Packages - $output .= '
    '.$i18n->get("packages").''; - foreach my $asset (@{$currentAsset->getPackageList}) { - $output .= '

    '.$asset->getName.'

    - getId.";proceed=manageAssets").'">'.$asset->getTitle.' ' - .$session->icon->edit("func=edit;proceed=manageAssets",$asset->get("url")) - .$session->icon->export("func=exportPackage",$asset->get("url")) - .'
    '; - } - $output .= '
    ' - . WebGUI::Form::formHeader($session, {action=>$currentAsset->getUrl}) - . WebGUI::Form::hidden($session, {name=>"func", value=>"importPackage"}) - . '
    ' - . '
    ' - . WebGUI::Form::checkbox($session, { label => $i18n->get('clear package flag'), checked => 0, name => 'clearPackageFlag', value => 1 }) - . '
    ' - . WebGUI::Form::checkbox($session, { label => $i18n->get('inherit parent permissions'), checked => 1, name => 'inheritPermissions', value => 1 }) - . '   ' . WebGUI::Form::submit($session, { value=>$i18n->get("import"), 'extras' => ' ' }) - . '
    ' - . WebGUI::Form::formFooter($session) - ; - $output .= '
    '; - - ### Clearing div - $output .= q{
     
    }; - $output .= q{
    }; - - ### Write the JavaScript that will take over - $output .= ' -ENDJS - - return $ac->render( $output ); -} - -#---------------------------------------------------------------------------- - -=head2 www_search ( session ) - -Search assets underneath this asset. - -=cut - -sub www_search { - my $session = shift; - my $ac = WebGUI::AdminConsole->new( $session, "assets" ); - my $i18n = WebGUI::International->new( $session, "Asset" ); - my $currentAsset = getCurrentAsset($session); - my $output = '
    ' . getHeader( $session ); - - $session->style->setLink( $session->url->extras( 'yui-webgui/build/assetManager/assetManager.css' ), { rel => "stylesheet", type => 'text/css' } ); - $session->style->setScript( $session->url->extras( 'yui/build/yahoo-dom-event/yahoo-dom-event.js' ) ); - $session->style->setScript( $session->url->extras( 'yui-webgui/build/assetManager/assetManager.js' ) ); - $session->style->setScript( $session->url->extras( 'yui-webgui/build/form/form.js' ) ); - my $keywords = $session->form->get('keywords') || $session->scratch->get('assetManagerSearchKeywords'); - - ### Show the form - $output .= q{

    } - . q{} - . q{} - . q{} - . getClassSelectBox( $session ) - . q{} - . q{

    } - ; - - ### Run the search - if ( $keywords || $session->form->get( 'class' ) ) { - my @classes = $session->form->get( 'class' ); - my $keywordsScrubbed = $keywords; - - # Detect a helper word key - my @assetIds = ($keywords =~ /assetid:\s*([^\s]+)/gi); - - # purge helper word keys - if (@assetIds) { - $keywordsScrubbed =~ s/\bassetid:\s*[^\s]+//gi; - } - $keywordsScrubbed =~ s/^\s+//g; - $keywordsScrubbed =~ s/\s+$//g; - - my $p = getSearchPaginator( $session, { - assetIds => \@assetIds, - keywords => $keywordsScrubbed, - classes => \@classes, - orderByColumn => $session->form->get( 'orderByColumn' ), - orderByDirection => $session->form->get( 'orderByDirection' ), - } ); - - if ( $p->getRowCount == 0 ) { - $output .= q{

    } . $i18n->get( 'no results' ) . q{

    }; - } - else { - ### Display the search results - $output .= q{
    } - . q{} - . q{} - . WebGUI::Form::CsrfToken->new($session)->toHtml - . q{} - . q{} - ; - - # Add classes to the form - for my $class ( @classes ) { - $output .= q{}; - } - - $output .= q{} - . q{} - . q{} - . q{} # Checkbox column - . q{} # Edit - . q{} # Title - . q{} # Type - . q{} # Revision Date - . q{} # Size - . q{} # Lock - . q{} - . q{} - ; - - # The markup for a single asset - my $row_markup = q{} - . q{} - . q{} #Edit - . q{} #URL/Title as link - . q{} #Type - . q{} #Revision Date - . q{} #Lock - . q{} - . q{} - ; - - # The field keys to fill in the placeholders - my @row_fields = qw( - alt - assetId - editLink - url - title - iconUrl type - revisionDate - size - url lockIcon - ); - - my $count = 0; - for my $assetInfo ( @{ $p->getPageData } ) { - $count++; - my $asset = WebGUI::Asset->newByDynamicClass( $session, $assetInfo->{ assetId } ); - - # Populate the required fields to fill in - my %fields = ( - alt => ( $count % 2 == 0 ? 'class="alt"' : '' ), - assetId => $asset->getId, - url => $asset->getUrl, - title => $asset->get( "menuTitle" ), - revisionDate => $session->datetime->epochToHuman( $asset->get( "revisionDate" ) ), - hasChildren => ( $asset->hasChildren ? "+ " : "  " ), - rank => $asset->getRank, - size => formatBytes( $asset->get( 'assetSize' ) ), - ); - - # The asset icon - my $icon = [ grep { $_->{ icon } } @{ $asset->definition( $session ) } ]->[ 0 ]->{ icon }; - $fields{ iconUrl } = $session->url->extras( '/assets/small/' . $icon ); - - # The asset type (i18n name) - my $type = [ grep { $_->{ assetName } } @{ $asset->definition( $session ) } ]->[ 0 ]->{ assetName }; - $fields{ type } = $type; - - # The lock - if ( $asset->lockedBy ) { # lockedBy in case someone overrides isLocked (like the Collab System Thread ) - $fields{ lockIcon } - = sprintf 'locked by %s', - $session->url->extras( 'assetManager/locked.gif' ), - WebGUI::HTML::format( $asset->lockedBy->username, "text" ), - WebGUI::HTML::format( $asset->lockedBy->username, "text" ), - ; - } - else { - $fields{ lockIcon } - = sprintf 'unlocked', - $session->url->extras( 'assetManager/unlocked.gif' ), - ; - } - - # The edit link - if ( !$asset->lockedBy || $asset->canEditIfLocked ) { - $fields{ editLink } - = sprintf '' . $i18n->get( "edit" ) . '', - $asset->getUrl( 'func=edit;proceed=manageAssets' ) - ; - } - - $output .= sprintf $row_markup, @fields{ @row_fields }; - } - - $output .= q{} - . q{
     } . $i18n->get( '99' ) . q{} . $i18n->get( "type" ) . q{} . $i18n->get( "last updated" ) . q{} . $i18n->get( "size" ) . q{} . $i18n->get( "locked" ) . q{
    %s%s %s%s%s%s
    } - . q{

    } . $i18n->get( 'with selected' ) - . q{] - . q{} - . q{} - . q{

    } - . q{
    } - ; - - ### Page links - $output .= q{}; - - ### Page description - $output .= sprintf q{
    } . $i18n->get( 'page indicator' ) . q{
    }, - $p->getPageNumber, - $p->getNumberOfPages, - ; - - ### Clearing div - $output .= q{
     
    }; - } - } - - $output .= '
    '; - - $session->scratch->set('assetManagerSearchKeywords', $keywords); - return $ac->render( $output ); -} - - -1; diff --git a/lib/WebGUI/URL/_url.skeleton b/lib/WebGUI/Content/FacebookAuth.pm similarity index 55% rename from lib/WebGUI/URL/_url.skeleton rename to lib/WebGUI/Content/FacebookAuth.pm index 4faceab04..d388eb6c7 100644 --- a/lib/WebGUI/URL/_url.skeleton +++ b/lib/WebGUI/Content/FacebookAuth.pm @@ -1,9 +1,9 @@ -package WebGUI::URL::MyHandler; +package WebGUI::Content::FacebookAuth; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -15,21 +15,15 @@ package WebGUI::URL::MyHandler; =cut use strict; -use Apache2::Const -compile => qw(OK DECLINED NOT_FOUND); - +use WebGUI::Auth::Facebook; =head1 NAME -Package WebGUI::URL::MyHandler +Package WebGUI::Content::FacebookAuth; =head1 DESCRIPTION -A URL handler that does whatever I tell it to do. - -=head1 SYNOPSIS - - use WebGUI::URL::MyHandler; - my $status = WebGUI::URL::MyHandler::handler($r, $configFile); +Because is Facebook is dumb, and changed their API to no longer use query parameters, this module exists to handle the auth postback. =head1 SUBROUTINES @@ -39,16 +33,19 @@ These subroutines are available from this package: #------------------------------------------------------------------- -=head2 handler ( request, server, config ) +=head2 handler ( session ) -The Apache request handler for this package. +The content handler for this package. =cut sub handler { - my ($request, $server, $config) = @_; - # ... - return Apache2::Const::OK; + my ($session) = @_; + if ($session->scratch->get('waiting_for_facebook_auth_postback')) { + $session->scratch->delete('waiting_for_facebook_auth_postback'); + WebGUI::Auth::Facebook->new($session)->www_callback; + } + return undef; } 1; diff --git a/lib/WebGUI/Content/Maintenance.pm b/lib/WebGUI/Content/Maintenance.pm index e4379d2db..cb1db1e7e 100644 --- a/lib/WebGUI/Content/Maintenance.pm +++ b/lib/WebGUI/Content/Maintenance.pm @@ -3,7 +3,7 @@ package WebGUI::Content::Maintenance; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -47,13 +47,10 @@ The content handler for this package. sub handler { my $session = shift; if ($session->setting->get("specialState") eq "upgrading") { - $session->http->sendHeader; - my $output = ""; - open(my $FILE,"<",$session->config->getWebguiRoot."/docs/maintenance.html"); - while (<$FILE>) { - $output .= $_; - } - close($FILE); + $session->response->sendHeader; + open my $fh, '<', $session->config->get('maintenancePage'); + my $output = do { local $/; <$fh> }; + close $fh; return $output; } return undef; diff --git a/lib/WebGUI/Content/NotFound.pm b/lib/WebGUI/Content/NotFound.pm index b42c49fbf..d4fa5d510 100644 --- a/lib/WebGUI/Content/NotFound.pm +++ b/lib/WebGUI/Content/NotFound.pm @@ -3,7 +3,7 @@ package WebGUI::Content::NotFound; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -46,7 +46,7 @@ The content handler for this package. sub handler { my ($session) = @_; - $session->http->setStatus("404","Page Not Found"); + $session->response->status(404); my $output = ""; my $notFound = WebGUI::Asset->getNotFound($session); if (defined $notFound) { @@ -54,7 +54,7 @@ sub handler { $output = eval { $notFound->www_view }; } else { - $session->errorHandler->error("The notFound page could not be instanciated!"); + $session->log->error("The notFound page could not be instanciated!"); $output = "An error was encountered while processing your request."; } $output = "An error was encountered while processing your request." if $output eq ''; diff --git a/lib/WebGUI/Content/Operation.pm b/lib/WebGUI/Content/Operation.pm index 77a610c8c..eb3c686d8 100644 --- a/lib/WebGUI/Content/Operation.pm +++ b/lib/WebGUI/Content/Operation.pm @@ -3,7 +3,7 @@ package WebGUI::Content::Operation; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Content/PDFGenerator.pm b/lib/WebGUI/Content/PDFGenerator.pm index d0d783831..649abec9f 100644 --- a/lib/WebGUI/Content/PDFGenerator.pm +++ b/lib/WebGUI/Content/PDFGenerator.pm @@ -7,7 +7,6 @@ use List::Util qw(first); use Scope::Guard qw(guard); use WebGUI::Session; use WebGUI::Content::Asset; -use WebGUI::Cache; =head1 NAME @@ -63,14 +62,12 @@ Returns the cached PDF for an asset, if necessary sub cache { my $asset = shift; my $session = $asset->session; - my $key = [ - 'PDFGen', $session->url->getRequestedUrl, $asset->get('revisionDate'), - ]; - my $cache = WebGUI::Cache->new($session, $key); - my $content = $cache->get; + my $key = join '', 'PDFGen', $session->url->getRequestedUrl, $asset->get('revisionDate'); + my $cache = $session->cache(); + my $content = $cache->get($key); unless ($content) { $content = generate($asset); - $cache->set($content, $session->config->get('pdfGen/cacheTimeout')); + $cache->set($key, $content, $session->config->get('pdfGen/cacheTimeout')); } return $content; } @@ -141,7 +138,7 @@ sub handler { return undef unless $op && $op eq 'generatePdf'; my $asset = getRequestedAsset($session); return $session->privilege->noAccess unless $asset->canView; - $session->http->setMimeType('application/pdf'); + $session->response->content_type('application/pdf'); return cache($asset); } diff --git a/lib/WebGUI/Content/Prefetch.pm b/lib/WebGUI/Content/Prefetch.pm index 7350275f4..f16946f5c 100644 --- a/lib/WebGUI/Content/Prefetch.pm +++ b/lib/WebGUI/Content/Prefetch.pm @@ -3,7 +3,7 @@ package WebGUI::Content::Prefetch; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -46,8 +46,8 @@ The content handler for this package. sub handler { my ($session) = @_; - if ($session->env->get("HTTP_X_MOZ") eq "prefetch") { # browser prefetch is a bad thing - $session->http->setStatus("403","We don't allow prefetch, because it increases bandwidth, hurts stats, and can break web sites."); + if ($session->request->env->{"HTTP_X_MOZ"} eq "prefetch") { # browser prefetch is a bad thing + $session->response->status(403); } return undef; } diff --git a/lib/WebGUI/Content/Referral.pm b/lib/WebGUI/Content/Referral.pm index 37e3c153a..05b8acdbb 100644 --- a/lib/WebGUI/Content/Referral.pm +++ b/lib/WebGUI/Content/Referral.pm @@ -3,7 +3,7 @@ package WebGUI::Content::Referral; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Content/SetLanguage.pm b/lib/WebGUI/Content/SetLanguage.pm index 651ad10e0..a4f779124 100644 --- a/lib/WebGUI/Content/SetLanguage.pm +++ b/lib/WebGUI/Content/SetLanguage.pm @@ -3,7 +3,7 @@ package WebGUI::Content::SetLanguage; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Content/Setup.pm b/lib/WebGUI/Content/Setup.pm index c1a0cf0fc..7221f7ac2 100644 --- a/lib/WebGUI/Content/Setup.pm +++ b/lib/WebGUI/Content/Setup.pm @@ -3,7 +3,7 @@ package WebGUI::Content::Setup; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Content/Shop.pm b/lib/WebGUI/Content/Shop.pm index b3713223a..dc211f5c2 100644 --- a/lib/WebGUI/Content/Shop.pm +++ b/lib/WebGUI/Content/Shop.pm @@ -3,7 +3,7 @@ package WebGUI::Content::Shop; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -177,7 +177,7 @@ sub www_pay { my $session = shift; my $output = undef; my $method = "www_".$session->form->get("method"); - my $pay = WebGUI::Shop::Pay->new($session); + my $pay = WebGUI::Shop::Pay->new(session => $session); if ($method ne "www_" && $pay->can($method)) { $output = $pay->$method(); } @@ -199,7 +199,7 @@ sub www_ship { my $session = shift; my $output = undef; my $method = "www_".$session->form->get("method"); - my $ship = WebGUI::Shop::Ship->new($session); + my $ship = WebGUI::Shop::Ship->new(session => $session); if ($method ne "www_" && $ship->can($method)) { $output = $ship->$method($session); } diff --git a/lib/WebGUI/Content/SiteIndex.pm b/lib/WebGUI/Content/SiteIndex.pm index 7d1d23d4b..999e4de2c 100644 --- a/lib/WebGUI/Content/SiteIndex.pm +++ b/lib/WebGUI/Content/SiteIndex.pm @@ -3,7 +3,7 @@ package WebGUI::Content::SiteIndex; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -93,7 +93,7 @@ sub handler { .''; - $session->http->setMimeType('text/xml'); + $session->response->content_type('text/xml'); return $xml; } diff --git a/lib/WebGUI/Content/Wizard.pm b/lib/WebGUI/Content/Wizard.pm index 78a8bb29b..8a014193c 100644 --- a/lib/WebGUI/Content/Wizard.pm +++ b/lib/WebGUI/Content/Wizard.pm @@ -1,9 +1,11 @@ package WebGUI::Content::Wizard; +use strict; + =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -31,7 +33,7 @@ sub handler { if ( $session->form->get('op') eq 'wizard' && $session->form->get('wizard_class') ) { my $class = $session->form->get('wizard_class'); - WebGUI::Pluggable->load($class); + WebGUI::Pluggable::load($class); if ( $class->isa( 'WebGUI::Wizard' ) ) { my $wizard = $class->new( $session ); return $wizard->dispatch; diff --git a/lib/WebGUI/Content/_content.skeleton b/lib/WebGUI/Content/_content.skeleton index 61f1b66b9..cdcce66f8 100644 --- a/lib/WebGUI/Content/_content.skeleton +++ b/lib/WebGUI/Content/_content.skeleton @@ -3,7 +3,7 @@ package WebGUI::Content::MyHandler; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Crud.pm b/lib/WebGUI/Crud.pm index 305980f7a..c7b9288fb 100644 --- a/lib/WebGUI/Crud.pm +++ b/lib/WebGUI/Crud.pm @@ -4,7 +4,7 @@ package WebGUI::Crud; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -17,16 +17,123 @@ package WebGUI::Crud; use strict; -use Class::InsideOut qw(readonly private id register); +use Moose; +use WebGUI::Definition::Crud; use JSON; use Tie::IxHash; use Clone qw/clone/; use WebGUI::DateTime; use WebGUI::Exception; -use WebGUI::Utility; +use WebGUI::FormBuilder; +use Scalar::Util qw( blessed ); -private objectData => my %objectData; -readonly session => my %session; +has session => ( + is => 'ro', + required => 1, +); + +has lastUpdated => ( + is => 'rw', + lazy => 1, + builder => '_now', +); + +has dateCreated => ( + is => 'rw', + lazy => 1, + builder => '_now', +); + +has sequenceNumber => ( + is => 'rw', + default => 1, +); + +has _dirty => ( + is => 'rw', + default => 0, +); + +# True if the object was created by this instance +has _new => ( + is => 'ro', + default => 0, +); + +sub _now { + my $self = shift; + return WebGUI::DateTime->new($self->session)->toDatabase; +} + +has sequenceNumber => ( + is => 'rw', +); + +around BUILDARGS => sub { + my $orig = shift; + my $class = shift; + if(ref $_[0] eq 'HASH') { + ##Standard Moose invocation for creating a new object + return $class->$orig(@_); + } + + # dynamic recognition of object or session + my $session = shift; + unless ($session->isa('WebGUI::Session')) { + $session = $session->session; + } + + my $identifier = shift; + if(!defined($identifier) || ref $identifier eq 'HASH') { + ##Creating a new object + my $data = $identifier; + my $tableKey = $class->meta->tableKey(); + my $tableName = $class->meta->tableName(); + my $db = $session->db; + + # determine sequence + my $sequenceKey = $class->meta->sequenceKey(); + my $clause; + my @params; + if ($sequenceKey) { + $clause = "where ".$db->quote_identifier($sequenceKey)."=?"; + push @params, $data->{$sequenceKey}; + } + my $sequenceNumber = $db->quickScalar("select max(sequenceNumber) from ".$db->quote_identifier($tableName)." $clause", \@params); + $sequenceNumber++; + + my $now = WebGUI::DateTime->new($session, time())->toDatabase; + $data->{dateCreated} = $now; + $data->{lastUpdated} = $now; + $data->{session} = $session; + $data->{sequenceNumber} = $sequenceNumber; + $data->{$tableKey} = $data->{id} || $session->id->generate; + $data->{_dirty} = 1; + $data->{_new} = 1; + + return $class->$orig($data); + } + ##Grabbing an object from the database + my $tableKey = $class->meta->tableKey; + unless ($session->id->valid($identifier)) { + WebGUI::Error::InvalidParam->throw(error=>'need a '.$tableKey); + } + + # retrieve object data + my $data = $session->db->getRow($class->meta->tableName(), $tableKey, $identifier); + if ($data->{$tableKey} eq '') { + WebGUI::Error::ObjectNotFound->throw(error=>'no such '.$tableKey, id=>$identifier); + } + $data->{session} = $session; + return $class->$orig($data); +}; + +sub BUILD { + my $self = shift; + if ($self->_dirty) { + $self->write; + } +} =head1 NAME @@ -44,39 +151,43 @@ WebGUI::Crud can be used in one of two ways. You can create a subclass with a de =head2 Static Subclass -The normal way to use WebGUI::Crud is to create a subclass that defines a specific definition. In your subclass you'd override the crud_definition() method with your own like this: +The normal way to use WebGUI::Crud is to create a subclass that defines a specific definition. In your subclass you'd make your own like this: - sub crud_definition { - my ($class, $session) = @_; - my $definition = $class->SUPER::crud_definition($session); - $definition->{tableName} = 'ambassador'; - $definition->{tableKey} = 'ambassadorId'; - $definition->{properties}{name} = { - fieldType => 'text', - defaultValue => undef, - }; - $definition->{properties}{emailAddress} = { - fieldType => 'email', - defaultValue => undef, - }; - return $definition; - } + use Moose; + use WebGUI::Definition::Crud; + extends 'WebGUI::Crud'; + define tableName => 'ambassador'; + define tableKey => 'ambassadorId'; + has ambassadorId => ( + default =>undef, + ); + property name => ( + fieldType => 'text', + default => undef, + ); + property emailAddress => ( + fieldType => 'email', + default =>undef, + ); =head2 Dynamic Subclass A more advanced approach is to create a subclass that dynamically generates a definition from a database table or a config file. - sub crud_definition { - my ($class, $session) = @_; - my $definition = $class->SUPER::crud_definition($session); - my $config = Config::JSON->new('/path/to/file.cfg'); - $definition->{tableName} = $config->get('tableName'); - $definition->{tableKey} = $config->get('tableKey'); - my $fields = $config->get('fields'); - foreach my $fieldName (keys %{$fields}) { - $definition->{properties}{$fieldName} = $fields->{$fieldName}; - } - return $definition; + use Moose; + use WebGUI::Definition::Crud; + extends 'WebGUI::Crud'; + my $config = Config::JSON->new('/path/to/file.cfg'); + define tableName => $config->get('tableName'); + define tableKey => $config->get('tableKey'); + has $config->get('tableKey') => ( + default =>undef, + ); + my $fields = $config->get('fields'); + foreach my $fieldName (keys %{$fields}) { + property $fieldName => ( + @{ $fields->{$fieldName} }, + ); } =head2 Usage @@ -85,13 +196,11 @@ Once you have a crud class, you can use it's methods like this: use WebGUI::Crud::Subclass; - $sequenceKey = WebGUI::Crud::Subclass->crud_getSequenceKey($session); - $tableKey = WebGUI::Crud::Subclass->crud_getTableKey($session); - $tableName = WebGUI::Crud::Subclass->crud_getTableName($session); - $propertiesHashRef = WebGUI::Crud::Subclass->crud_getProperties($session); - $definitionHashRef = WebGUI::Crud::Subclass->crud_definition($session); + $sequenceKey = WebGUI::Crud::Subclass->meta->sequenceKey(); + $tableKey = WebGUI::Crud::Subclass->meta->tableKey(); + $tableName = WebGUI::Crud::Subclass->meta->tableName(); + $propertiesHashRef = WebGUI::Crud::Subclass->meta->get_all_property_list(); - $crud = WebGUI::Crud::Subclass->create($session, $properties); $crud = WebGUI::Crud::Subclass->new($session, $id); $sql = WebGUI::Crud::Subclass->getAllSql($session, $options); @@ -119,9 +228,24 @@ These methods are available from this package: #------------------------------------------------------------------- -=head2 create ( session, [ properties ], [ options ]) +=head2 new ( session, id ) -Constructor. Creates a new instance of this object. Returns a reference to the object. +Constructor. Looks up an object in the database. + +=head3 session + +A reference to a WebGUI::Session. + +=head3 id + +A guid, the unique identifier for this object. Looks in the database for this object's properties. If the object +cannot be found, throws an WebGUI::Error::ObjectNotFound exception. If the id isn't a valid GUID, then it will +throw an WebGUI::Error::InvalidParam exception. + +=head2 new ( session, [ properties ]) + +Constructor. Creates a new instance of this object. Returns a reference to the object, but does not serialize inital properties +to the database. You must call $object->write to do this. =head3 session @@ -129,70 +253,10 @@ A reference to a WebGUI::Session or an object that has a session method. If it's =head3 properties -The properties that you wish to create this object with. Note that if this object has a sequenceKey then that sequence key must be specified in these properties or it will throw an execption. See crud_definition() for a list of all the properties. - -=head3 options - -A hash reference of creation options. - -=head4 id - -A guid. Use this to force the row's table key to a specific ID. +The properties that you wish to create this object with. Note that if this object has a sequenceKey then that sequence key must be specified in these properties or it will throw an execption. =cut -sub create { - my ($class, $someObject, $data, $options) = @_; - - # dynamic recognition of object or session - my $session = $someObject; - unless ($session->isa('WebGUI::Session')) { - $session = $someObject->session; - } - - # validate - unless (defined $session && $session->isa('WebGUI::Session')) { - WebGUI::Error::InvalidObject->throw(expected=>'WebGUI::Session', got=>(ref $session), error=>'Need a session.'); - } - - # initialize - my $definition = $class->crud_definition($session); - my $tableKey = $class->crud_getTableKey($session); - my $tableName = $class->crud_getTableName($session); - my $db = $session->db; - my $dbh = $db->dbh; - - # get creation date - my $now = WebGUI::DateTime->new($session, time())->toDatabase; - $data->{lastUpdated} = $now; - - # add defaults - my $properties = $class->crud_getProperties($session); - foreach my $property (keys %{$properties}) { - # set a default value if it's empty or undef (as per L) - if ($data->{$property} eq "") { - $data->{$property} = $properties->{$property}{defaultValue}; - } - } - - # determine sequence - my $sequenceKey = $class->crud_getSequenceKey($session); - my $clause; - my @params; - if ($sequenceKey) { - $clause = "where ".$dbh->quote_identifier($sequenceKey)."=?"; - push @params, $data->{$sequenceKey}; - } - my $sequenceNumber = $db->quickScalar("select max(sequenceNumber) from ".$dbh->quote_identifier($tableName)." $clause", \@params); - $sequenceNumber++; - - # create object - my $id = $db->setRow($tableName, $tableKey, {$tableKey=>'new', dateCreated=>$now, sequenceNumber=>$sequenceNumber}, $options->{id}); - my $self = $class->new($someObject, $id); - $self->update($data); - return $self; -} - #------------------------------------------------------------------- =head2 crud_createOrUpdateTable ( session ) @@ -207,7 +271,7 @@ A reference to a WebGUI::Session. sub crud_createOrUpdateTable { my ( $class, $session ) = @_; - my $tableName = $class->crud_getTableName($session); + my $tableName = $class->meta->tableName(); my $tableExists = $session->db->dbh->do("show tables like '$tableName'"); return ( $tableExists ne '0E0' ? $class->crud_updateTable($session) : $class->crud_createTable($session) ); @@ -229,16 +293,16 @@ sub crud_createTable { my ($class, $session) = @_; my $db = $session->db; my $dbh = $db->dbh; - my $tableName = $class->crud_getTableName($session); + my $tableName = $class->meta->tableName(); $class->crud_dropTable($session); $db->write('create table '.$dbh->quote_identifier($tableName).' ( - '.$dbh->quote_identifier($class->crud_getTableKey($session)).' CHAR(22) binary not null primary key, + '.$dbh->quote_identifier($class->meta->tableKey()).' CHAR(22) binary not null primary key, sequenceNumber int not null default 1, dateCreated datetime, lastUpdated datetime )'); $class->crud_updateTable($session); - my $sequenceKey = $class->crud_getSequenceKey($session); + my $sequenceKey = $class->meta->sequenceKey(); if ($sequenceKey) { $db->write('alter table '.$dbh->quote_identifier($tableName).' add index '.$dbh->quote_identifier($sequenceKey).' ('.$dbh->quote_identifier($sequenceKey).')'); @@ -274,18 +338,18 @@ properties is a hash reference tied to IxHash so that it maintains its order. It { companyName => { fieldType => 'text', - defaultValue => 'Acme Widgets', + default => 'Acme Widgets', label => 'Company Name', serialize => 0, }, companyWebSite => { fieldType => 'url', - defaultValue => undef, + default => undef, serialize => 0, }, presidentUserId => { fieldType => 'guid', - defaultValue => undef, + default => undef, isQueryKey => 1, } } @@ -300,21 +364,6 @@ isQueryKey tells WebGUI::Crud that the field should be marked as 'non null' in t =cut -sub crud_definition { - my ($class, $session) = @_; - unless (defined $session && $session->isa('WebGUI::Session')) { - WebGUI::Error::InvalidObject->throw(expected=>'WebGUI::Session', got=>(ref $session), error=>'Need a session.'); - } - tie my %properties, 'Tie::IxHash'; - my %definition = ( - tableName => 'unnamed_crud_table', - tableKey => 'id', - sequenceKey => '', - properties => \%properties, - ); - return \%definition; -} - #------------------------------------------------------------------- =head2 crud_dropTable ( session ) @@ -334,89 +383,123 @@ sub crud_dropTable { } my $db = $session->db; my $dbh = $db->dbh; - $db->write("drop table if exists ".$dbh->quote_identifier($class->crud_getTableName($session))); + $db->write("drop table if exists ".$dbh->quote_identifier($class->meta->tableName())); return 1; } #------------------------------------------------------------------- -=head2 crud_getProperties ( session ) +=head2 crud_form ( $form, [$object] ) -A management class method that returns just the 'properties' from crud_definition(). +A class method to populate a WebGUI::FormBuilder object with all the fields for this Cruddy object. -=head3 session +=head3 $form -A reference to a WebGUI::Session. +A WebGUI::FormBuilder object, or any object that does +FormBuilder::Role::HasFields + +=head3 $object + +An object of this class, used to provide values to the form. It's optional. + +=cut + +sub crud_form { + my ($class, $form, $object) = @_; + my $properties = $class->crud_getProperties( $form->session ); + for my $propName ( keys %$properties ) { + my $prop = $properties->{ $propName }; + $form->addField( delete $prop->{fieldType}, + %$prop, + value => $object ? $object->get( $propName ) : undef, + ); + } +} + +#------------------------------------------------------------------- + +=head2 crud_getProperties ( ) + +A management class method that returns just the 'properties' from the Crud'd definition. +These properties have limited use, as you really need a full object to get access to a +session. =cut sub crud_getProperties { my ($class, $session) = @_; - unless (defined $session && $session->isa('WebGUI::Session')) { - WebGUI::Error::InvalidObject->throw(expected=>'WebGUI::Session', got=>(ref $session), error=>'Need a session.'); + # We must really have a class here + if ( blessed $class ) { + $class = blessed $class; + } + + my @property_names = $class->meta->get_all_property_list(); + my $properties = {}; + foreach my $property_name (@property_names) { + my $property = $class->meta->find_attribute_by_name($property_name); + next unless $property; + $properties->{$property_name} = { + %{ $class->getFormProperties( $session, $property_name ) }, + name => $property_name, + fieldType => $property->form->{fieldType}, + }; } - return $class->crud_definition($session)->{properties}; + return $properties; } #------------------------------------------------------------------- -=head2 crud_getSequenceKey ( session ) +=head2 crud_getSequenceKey -A management class method that returns just the 'sequenceKey' from crud_definition(). +A management class method that returns just the 'sequenceKey' from the meta class. This is left for +backwards compatility. You should call -=head3 session +WebGUI::Crud::Subclass->meta->sequenceKey -A reference to a WebGUI::Session. +instead. =cut sub crud_getSequenceKey { - my ($class, $session) = @_; - unless (defined $session && $session->isa('WebGUI::Session')) { - WebGUI::Error::InvalidObject->throw(expected=>'WebGUI::Session', got=>(ref $session), error=>'Need a session.'); - } - my $definition = $class->crud_definition($session); - return $definition->{sequenceKey}; + my ($class) = @_; + return $class->meta->sequenceKey; } #------------------------------------------------------------------- -=head2 crud_getTableName ( session ) +=head2 crud_getTableName -A management class method that returns just the 'tableName' from crud_definition(). +A management class method that returns just the 'tableName'. This is left for +backwards compatility. You should call -=head3 session +WebGUI::Crud::Subclass->meta->tableName -A reference to a WebGUI::Session. +instead. =cut sub crud_getTableName { - my ($class, $session) = @_; - unless (defined $session && $session->isa('WebGUI::Session')) { - WebGUI::Error::InvalidObject->throw(expected=>'WebGUI::Session', got=>(ref $session), error=>'Need a session.'); - } - return $class->crud_definition($session)->{tableName}; + my ($class) = @_; + return $class->meta->tableName; } #------------------------------------------------------------------- -=head2 crud_getTableKey ( session ) +=head2 crud_getTableKey -A management class method that returns just the 'tableKey' from crud_definition(). +A management class method that returns just the 'tableKey'. This is left for +backwards compatility. You should call -=head3 session +WebGUI::Crud::Subclass->meta->tableKey + +instead. -A reference to a WebGUI::Session. =cut sub crud_getTableKey { - my ($class, $session) = @_; - unless (defined $session && $session->isa('WebGUI::Session')) { - WebGUI::Error::InvalidObject->throw(expected=>'WebGUI::Session', got=>(ref $session), error=>'Need a session.'); - } - return $class->crud_definition($session)->{tableKey}; + my ($class) = @_; + return $class->meta->tableKey; } #------------------------------------------------------------------- @@ -438,14 +521,14 @@ sub crud_updateTable { } my $db = $session->db; my $dbh = $db->dbh; - my $tableName = $dbh->quote_identifier($class->crud_getTableName($session)); + my $tableName = $dbh->quote_identifier($class->meta->tableName()); # find out what fields already exist my %tableFields = (); my $sth = $db->read("DESCRIBE ".$tableName); - my $tableKey = $class->crud_getTableKey($session); + my $tableKey = $class->meta->tableKey(); while (my ($col, $type, $null, $key, $default) = $sth->array) { - next if (isIn($col, $tableKey, 'lastUpdated', 'dateCreated','sequenceNumber')); + next if ($col ~~ [$tableKey, 'lastUpdated', 'dateCreated','sequenceNumber']); $tableFields{$col} = { type => $type, null => $null, @@ -455,25 +538,20 @@ sub crud_updateTable { } # update existing and create new fields - my $properties = $class->crud_getProperties($session); - foreach my $property (keys %{$properties}) { - my $control = WebGUI::Form::DynamicField->new( $session, %{ $properties->{ $property } }); - my $fieldType = $control->getDatabaseFieldType; - my $isKey = $properties->{$property}{isQueryKey}; - my $defaultValue = $properties->{$property}{defaultValue}; - if ($properties->{$property}{serialize}) { - $defaultValue = JSON->new->canonical->encode($defaultValue); - } - my $notNullClause = ($isKey || $defaultValue ne "") ? "not null" : ""; - my $defaultClause = ''; - if ($fieldType !~ /(?:text|blob)$/i) { - $defaultClause = "default ".$dbh->quote($defaultValue) if ($defaultValue ne ""); - } - if (exists $tableFields{$property}) { + my @property_names = $class->meta->get_all_property_list($session); + foreach my $property_name (@property_names) { + my $property = $class->meta->find_attribute_by_name($property_name); + my $form_properties = $property->form; + my $control = WebGUI::Form::DynamicField->new( $session, fieldType => $form_properties->{fieldType},); + my $fieldType = $control->getDatabaseFieldType; + my $isKey = $property->isQueryKey; + my $default = $property->default; + my $notNullClause = ($isKey || $default ne "") ? "not null" : ""; + if (exists $tableFields{$property_name}) { my $changed = 0; # parse database table field type - $tableFields{$property}{type} =~ m/^(\w+)(\([\d\s,]+\))?$/; + $tableFields{$property_name}{type} =~ m/^(\w+)(\([\d\s,]+\))?$/; my ($tableFieldType, $tableFieldLength) = ($1, $2); # parse form field type @@ -483,21 +561,21 @@ sub crud_updateTable { # compare table parts to definition $changed = 1 if ($tableFieldType ne $formFieldType); $changed = 1 if ($tableFieldLength ne $formFieldLength); - $changed = 1 if ($tableFields{$property}{null} eq "YES" && $isKey); - $changed = 1 if ($tableFields{$property}{default} ne $defaultValue); + $changed = 1 if ($tableFields{$property_name}{null} eq "YES" && $isKey); + $changed = 1 if ($tableFields{$property_name}{default} ne $default); # modify if necessary if ($changed) { - $db->write("alter table $tableName change column ".$dbh->quote_identifier($property)." ".$dbh->quote_identifier($property)." $fieldType $notNullClause $defaultClause"); + $db->write("alter table $tableName change column ".$dbh->quote_identifier($property_name)." ".$dbh->quote_identifier($property_name)." $fieldType $notNullClause"); } } else { - $db->write("alter table $tableName add column ".$dbh->quote_identifier($property)." $fieldType $notNullClause $defaultClause"); + $db->write("alter table $tableName add column ".$dbh->quote_identifier($property_name)." $fieldType $notNullClause"); } if ($isKey && !$tableFields{$property}{key}) { - $db->write("alter table $tableName add index ".$dbh->quote_identifier($property)." (".$dbh->quote_identifier($property).")"); + $db->write("alter table $tableName add index ".$dbh->quote_identifier($property_name)." (".$dbh->quote_identifier($property_name).")"); } - delete $tableFields{$property}; + delete $tableFields{$property_name}; } # delete fields that are no longer in the definition @@ -520,7 +598,7 @@ Deletes this object from the database. Returns 1 on success. sub delete { my $self = shift; - $self->session->db->deleteRow($self->crud_getTableName($self->session), $self->crud_getTableKey($self->session), $self->getId); + $self->session->db->deleteRow($self->meta->tableName(), $self->meta->tableKey(), $self->getId); $self->reorder; return 1; } @@ -535,10 +613,10 @@ Moves this object one position closer to the end of its sequence. If the object sub demote { my $self = shift; - my $tableKey = $self->crud_getTableKey($self->session); - my $tableName = $self->crud_getTableName($self->session); - my $sequenceKey = $self->crud_getSequenceKey($self->session); - my @params = ($self->get('sequenceNumber') + 1); + my $tableKey = $self->meta->tableKey(); + my $tableName = $self->meta->tableName(); + my $sequenceKey = $self->meta->sequenceKey(); + my @params = ($self->sequenceNumber + 1); my $db = $self->session->db; my $dbh = $db->dbh; my $clause = ''; @@ -555,7 +633,7 @@ sub demote { if ($id ne "") { $db->write("update ".$dbh->quote_identifier($tableName)." set sequenceNumber=sequenceNumber+1 where ".$dbh->quote_identifier($tableKey)."=?",[$self->getId]); $db->write("update ".$dbh->quote_identifier($tableName)." set sequenceNumber=sequenceNumber-1 where ".$dbh->quote_identifier($tableKey)."=?",[$id]); - $objectData{id $self}{sequenceNumber}++; + $self->sequenceNumber($self->sequenceNumber+1); } $db->commit; return 1; @@ -563,30 +641,6 @@ sub demote { #------------------------------------------------------------------- -=head2 get ( [ property ] ) - -Returns a hash reference of all the properties of this object. - -=head3 property - -If specified, returns the value of the property associated with this this property name. Returns undef if the property doesn't exist. See crud_definition() in the subclass of this class for a complete list of properties. - -=cut - -sub get { - my ($self, $name) = @_; - - # return a specific property - if (defined $name) { - return clone $objectData{id $self}{$name}; - } - - # return a copy of all properties - return clone $objectData{id $self}; -} - -#------------------------------------------------------------------- - =head2 getAllIds ( ) A class method that returns a list of all the ids in this object type. Has the same signature of getAllSql(). @@ -635,7 +689,7 @@ sub getAllIterator { return if !$id; my $object = $class->new($someObject, $id); if (!$object) { - WebGUI::Error::ObjectNotFound->throw(error=>'no such '.$class->getTableKey, id => $id); + WebGUI::Error::ObjectNotFound->throw(error=>'no such '.$class->meta->tableKey, id => $id); } return $object; }; @@ -712,10 +766,10 @@ sub getAllSql { # setup my $dbh = $session->db->dbh; - my $tableName = $class->crud_getTableName($session); + my $tableName = $class->meta->tableName(); # the base query - my $sql = "select ".$dbh->quote_identifier($tableName, $class->crud_getTableKey($session))." from ".$dbh->quote_identifier($tableName); + my $sql = "select ".$dbh->quote_identifier($tableName, $class->meta->tableKey())." from ".$dbh->quote_identifier($tableName); # process joins my @joins; @@ -750,7 +804,7 @@ sub getAllSql { } # limit to our sequence - my $sequenceKey = $class->crud_getSequenceKey($session); + my $sequenceKey = $class->meta->sequenceKey(); if (exists $options->{sequenceKeyValue} && $sequenceKey) { push @params, $options->{sequenceKeyValue}; push @where, $dbh->quote_identifier($tableName, $sequenceKey)."=?"; @@ -793,57 +847,8 @@ Returns a guid, this object's unique identifier. sub getId { my $self = shift; - return $objectData{id $self}{$self->crud_getTableKey($self->session)}; -} - -#------------------------------------------------------------------- - -=head2 new ( session, id ) - -Constructor. - -=head3 session - -A reference to a WebGUI::Session. - -=head3 id - -A guid, the unique identifier for this object. - -=cut - -sub new { - my ($class, $session, $id) = @_; - my $tableKey = $class->crud_getTableKey($session); - - # validate - unless (defined $session && $session->isa('WebGUI::Session')) { - WebGUI::Error::InvalidObject->throw(expected=>'WebGUI::Session', got=>(ref $session), error=>'Need a session.'); - } - unless (defined $id && $id =~ m/^[A-Za-z0-9_-]{22}$/) { - WebGUI::Error::InvalidParam->throw(error=>'need a '.$tableKey); - } - - # retrieve object data - my $data = $session->db->getRow($class->crud_getTableName($session), $tableKey, $id); - if ($data->{$tableKey} eq '') { - WebGUI::Error::ObjectNotFound->throw(error=>'no such '.$tableKey, id=>$id); - } - - # deserialize data - my $properties = $class->crud_getProperties($session); - foreach my $name (keys %{$properties}) { - if ($properties->{$name}{serialize} && $data->{$name} ne "") { - $data->{$name} = JSON->new->canonical->decode($data->{$name}); - } - } - - # set up object - my $self = register($class); - my $refId = id $self; - $objectData{$refId} = $data; - $session{$refId} = $session; - return $self; + my $tableKey = $self->meta->tableKey; + return $self->$tableKey; } #------------------------------------------------------------------- @@ -856,11 +861,11 @@ Moves this object one position closer to the beginning of its sequence. If the o sub promote { my $self = shift; - my $tableKey = $self->crud_getTableKey($self->session); - my $tableName = $self->crud_getTableName($self->session); - my $sequenceKey = $self->crud_getSequenceKey($self->session); - my $sequenceKeyValue = $self->get($sequenceKey); - my @params = ($self->get('sequenceNumber')-1); + my $tableKey = $self->meta->tableKey(); + my $tableName = $self->meta->tableName(); + my $sequenceKey = $self->meta->sequenceKey(); + my $sequenceKeyValue = $sequenceKey ? $self->$sequenceKey : ''; + my @params = ($self->sequenceNumber-1); my $clause = ''; my $db = $self->session->db; my $dbh = $db->dbh; @@ -868,7 +873,7 @@ sub promote { # determine sequence type if ($sequenceKey) { $clause = $dbh->quote_identifier($sequenceKey)."=? and"; - unshift @params, $self->get($sequenceKey) + unshift @params, $self->$sequenceKey; } # make database changes @@ -877,7 +882,7 @@ sub promote { if ($id ne "") { $db->write("update ".$dbh->quote_identifier($tableName)." set sequenceNumber=sequenceNumber-1 where ".$dbh->quote_identifier($tableKey)."=?", [$self->getId]); $db->write("update ".$dbh->quote_identifier($tableName)." set sequenceNumber=sequenceNumber+1 where ".$dbh->quote_identifier($tableKey)."=?", [$id]); - $objectData{id $self}{sequenceNumber}--; + $self->sequenceNumber($self->sequenceNumber-1); } $db->commit; return 1; @@ -888,17 +893,18 @@ sub promote { =head2 reorder () Removes gaps in the sequence. Usually only called by delete(), but may be useful if you randomize a sequence. +This method will not update the current object. =cut sub reorder { my ($self) = @_; - my $tableKey = $self->crud_getTableKey($self->session); - my $tableName = $self->crud_getTableName($self->session); - my $sequenceKey = $self->crud_getSequenceKey($self->session); - my $sequenceKeyValue = $self->get($sequenceKey); - my $i = 1; - my $db = $self->session->db; + my $tableKey = $self->meta->tableKey; + my $tableName = $self->meta->tableName; + my $sequenceKey = $self->meta->sequenceKey; + my $sequenceKeyValue = $sequenceKey ? $self->$sequenceKey : ''; + my $i = 1; + my $db = $self->session->db; my $dbh = $db->dbh; # find all the items in this sequence @@ -918,9 +924,6 @@ sub reorder { # make the changes $db->beginTransaction; while (my ($id) = $current->array) { - if ($id eq $self->getId) { - $objectData{id $self} = $i; - } my @params = ($i, $id); if ($sequenceKey) { push @params, $sequenceKeyValue; @@ -936,56 +939,16 @@ sub reorder { =head2 update ( properties ) -Updates an object's properties. While doing so also validates default data and sets the lastUpdated date. - -=head3 properties - -A hash reference of properties to be set. See crud_definition() for a list of the properties available. - -B As part of it's validation mechanisms, update() will delete any elements from the properties list that are not specified in the crud_definition(). +Extend the base method to update the lastUpdated property. =cut -sub update { - my ($self, $data) = @_; - my $session = $self->session; - - # validate incoming data - my $properties = $self->crud_getProperties($session); - my $dbData = { $self->crud_getTableKey($session) => $self->getId }; - foreach my $property (keys %{$data}) { - - # don't save fields that aren't part of our definition - unless (exists $properties->{$property} || $property eq 'lastUpdated') { - delete $data->{$property}; - next; - } - - # set a default value if it's empty or undef - if ($data->{$property} eq "") { - $data->{$property} = $properties->{$property}{defaultValue}; - } - - # serialize if needed - if ($properties->{$property}{serialize} && $data->{$property} ne "") { - $dbData->{$property} = JSON->new->canonical->encode($data->{$property}); - } - else { - $dbData->{$property} = $data->{$property}; - } - } - - # set last updated - $data->{lastUpdated} ||= WebGUI::DateTime->new($session, time())->toDatabase; - - # update memory - my $refId = id $self; - %{$objectData{$refId}} = (%{$objectData{$refId}}, %{$data}); - - # update the database - $session->db->setRow($self->crud_getTableName($session), $self->crud_getTableKey($session), $dbData); - return 1; -} +around update => sub { + my ($orig, $self, $data) = @_; + delete $data->{lastUpdated}; + $self->lastUpdated($self->_now); + $self->$orig($data); +}; #------------------------------------------------------------------- @@ -1000,12 +963,49 @@ sub updateFromFormPost { my $session = $self->session; my $form = $session->form; my %data; - my $properties = $self->crud_getProperties($session); - foreach my $property ($form->param) { - $data{$property} = $form->get($property, $properties->{$property}{fieldType}, $properties->{$property}{defaultValue}); + my @properties = $self->meta->get_all_property_list($session); + foreach my $property_name ( @properties ) { + my $property = $self->meta->find_attribute_by_name($property_name); + next unless $property; + $data{$property_name} = $form->get($property_name, + $property->form->{fieldType}, $property->default); + $self->session->log->warn(" SETTING $property_name to $data{$property_name}"); } return $self->update(\%data); } +#------------------------------------------------------------------- + +=head2 write ( ) + +Serializes the object's data to the database. Automatically handles deserializing property values to javascript, +if necessary. + +=cut + + +sub write { + my $self = shift; + my $session = $self->session; + my $data = {}; + PROPERTY: foreach my $property_name ($self->meta->get_all_property_list) { + my $property = $self->meta->find_attribute_by_name($property_name); + my $value = $self->$property_name; + if ($property->does('WebGUI::Definition::Meta::Property::Serialize')) { + $value = eval { JSON::to_json($value); } || ''; + } + $data->{$property_name} = $value; + } + my $tableKey = $self->meta->tableKey; + $data->{$tableKey} = $self->$tableKey; + $data->{lastUpdated} = $self->lastUpdated; + $data->{dateCreated} = $self->dateCreated; + $data->{sequenceNumber} = $self->sequenceNumber; + if (my $sequenceKey = $self->meta->sequenceKey) { + $data->{$sequenceKey} = $self->$sequenceKey; + } + $session->db->setRow($self->tableName, $self->tableKey, $data); + $self->_dirty(0); +} 1; diff --git a/lib/WebGUI/DatabaseLink.pm b/lib/WebGUI/DatabaseLink.pm index 6ca6dfed3..31985a727 100644 --- a/lib/WebGUI/DatabaseLink.pm +++ b/lib/WebGUI/DatabaseLink.pm @@ -3,7 +3,7 @@ package WebGUI::DatabaseLink; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -16,10 +16,8 @@ package WebGUI::DatabaseLink; use strict; -use Tie::CPHash; use WebGUI::SQL; use WebGUI::International; -use WebGUI::Utility; use DBI; =head1 NAME @@ -97,7 +95,7 @@ sub checkPrivileges { # Check if we found any privileges at all if (! scalar @privileges) { - $self->session->errorHandler->warn( + $self->session->log->warn( sprintf( "DatabaseLink: Could not find SQL privileges or no privileges on database '%s' for user '%s' with database link ID '%s' using DSN '%s'", $self->databaseName, $self->get->{username}, $self->getId, $self->get->{DSN}, @@ -107,10 +105,10 @@ sub checkPrivileges { } # Check if all required privs are present. - return 1 if (isIn('ALL PRIVILEGES', @privileges)); + return 1 if ('ALL PRIVILEGES' ~~ @privileges); foreach (@{ $requestedPrivileges }) { - return 0 unless (isIn(uc($_), @privileges)); + return 0 unless (uc($_) ~~ @privileges); } return 1; @@ -213,7 +211,6 @@ sub disconnect { if (defined $self->{_dbh}) { $self->{_dbh}->disconnect() unless ($self->getId eq "0"); } - undef $self; } #------------------------------------------------------------------- @@ -243,15 +240,15 @@ sub db { else { my ($scheme, $driver, $attr_string, $attr_hash, $driver_dsn) = DBI->parse_dsn($dsn); if ($driver) { - my $dbh = WebGUI::SQL->connect($self->session,$dsn,$username,$identifier,$parameters); + my $dbh = WebGUI::SQL->connect($dsn,$username,$identifier,$parameters); unless (defined $dbh) { - $self->session->errorHandler->warn("Cannot connect to DatabaseLink [".$self->getId."]"); + $self->session->log->warn("Cannot connect to DatabaseLink [".$self->getId."]"); } $self->{_dbh} = $dbh; return $self->{_dbh}; } } - $self->session->errorHandler->warn("DatabaseLink [".$self->getId."] The DSN specified is of an improper format."); + $self->session->log->warn("DatabaseLink [".$self->getId."] The DSN specified is of an improper format."); return undef; } @@ -340,7 +337,7 @@ sub new { my $class = shift; my $session = shift; my $databaseLinkId = shift; - tie my %databaseLink, 'Tie::CPHash'; + my %databaseLink; unless ($databaseLinkId eq "") { if ($databaseLinkId eq "0") { %databaseLink = ( @@ -360,7 +357,7 @@ sub new { unless (defined($databaseLink{databaseLinkId})) { - $session->errorHandler->warn("Could not find database link '".$databaseLinkId."'"); + $session->log->warn("Could not find database link '".$databaseLinkId."'"); return undef; } @@ -388,7 +385,7 @@ sub queryIsAllowed { my ($firstWord) = $query =~ /(\w+)/; $firstWord = lc $firstWord; - return isIn($firstWord, split(/\s+/, lc $self->{_databaseLink}{allowedKeywords})) ? 1 : 0; + return $firstWord ~~ [split(/\s+/, lc $self->{_databaseLink}{allowedKeywords})] ? 1 : 0; } #------------------------------------------------------------------- diff --git a/lib/WebGUI/DateTime.pm b/lib/WebGUI/DateTime.pm index d5fd13a14..633650855 100644 --- a/lib/WebGUI/DateTime.pm +++ b/lib/WebGUI/DateTime.pm @@ -3,7 +3,7 @@ package WebGUI::DateTime; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -130,7 +130,7 @@ sub new if (ref $param0 eq "WebGUI::Session") { $session = shift; my $i18n = WebGUI::International->new($session); - my $language = $i18n->getLanguage($session->user->profileField('language')); + my $language = $i18n->getLanguage($session->user->get('language')); $locale = $language->{languageAbbreviation} || 'en'; $locale .= "_".$language->{locale} if ($language->{locale}); } @@ -208,7 +208,7 @@ current users's time zone. sub cloneToUserTimeZone { my $self = shift; my $copy = $self->clone; - my $timezone = $self->session->user->profileField("timeZone"); + my $timezone = $self->session->user->get("timeZone"); $copy->set_time_zone($timezone); return $copy; } @@ -504,11 +504,11 @@ sub webguiToStrftime { my $temp; #--- date format preference - $temp = $session->user->profileField('dateFormat') || '%y-%M-%D'; + $temp = $session->user->get('dateFormat') || '%y-%M-%D'; $format =~ s/\%z/$temp/g; #--- time format preference - $temp = $session->user->profileField('timeFormat') || '%H:%n %p'; + $temp = $session->user->get('timeFormat') || '%H:%n %p'; $format =~ s/\%Z/$temp/g; #--- convert WebGUI date formats to DateTime formats diff --git a/lib/WebGUI/Definition.pm b/lib/WebGUI/Definition.pm new file mode 100644 index 000000000..a0f00d8ba --- /dev/null +++ b/lib/WebGUI/Definition.pm @@ -0,0 +1,163 @@ +package WebGUI::Definition; + +=head1 LEGAL + + ------------------------------------------------------------------- + WebGUI is Copyright 2001-2012 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 + ------------------------------------------------------------------- + +=cut + +use 5.010; +use feature (); + +use Moose (); +use Moose::Exporter; +use Moose::Util; +use Moose::Util::MetaRole; + +use namespace::autoclean; +no warnings qw(uninitialized); + +our $VERSION = '0.0.1'; + +=head1 NAME + +Package WebGUI::Definition + +=head1 DESCRIPTION + +Moose-based meta class for all definitions in WebGUI. + +=head1 SYNOPSIS + +A definition contains all the information needed to build an object. +Information required to build forms are added as optional roles and +sub metaclasses. Database persistance is handled similarly. + +=head1 METHODS + +These methods are available from this class: + +=cut + +my ($import, $unimport, $init_meta) = Moose::Exporter->build_import_methods( + install => [ 'unimport' ], + with_meta => [ 'property', 'define' ], +); + +#------------------------------------------------------------------- + +=head2 import ( ) + +A custom import method is provided so that uninitialized properties do not +generate warnings. + +=cut + +sub import { + my $class = shift; + my $caller = caller; + $class->$import({ into_level => 1 }); + warnings->unimport('uninitialized'); + feature->import(':5.10'); + namespace::autoclean->import( -cleanee => $caller ); + return 1; +} + +sub init_meta { + my $class = shift; + my %args = @_; + + my $for_class = $args{for_class}; + if ($for_class->meta->isa('Moose::Meta::Class')) { + Moose::Util::MetaRole::apply_metaroles( + for => $for_class, + class_metaroles => { + class => ['WebGUI::Definition::Meta::Class'], + }, + ); + Moose::Util::apply_all_roles( + $for_class, + 'WebGUI::Definition::Role::Object', + ); + } + else { + Moose::Util::MetaRole::apply_metaroles( + for => $for_class, + role_metaroles => { + role => ['WebGUI::Definition::Meta::Class'], + }, + ); + } + return $for_class->meta; +} + +#------------------------------------------------------------------- + +=head2 define ( ) + +Defines a piece static data for the class which is never processed from a form +or persisted to the database. In an Asset-style definition, this would be +used for the table name, the asset's name, or the path to the asset's icon. + +=cut + +sub define { + my ($meta, $name, $value) = @_; + if ($meta->can($name)) { + $meta->$name($value); + $meta->add_method( $name, sub { $meta->$name } ); + } + else { + $meta->add_method( $name, sub { $value } ); + } + return 1; +} + +#------------------------------------------------------------------- + +=head2 property ( $name, %options ) + +A property is a special object attribute with it's type constraints set by +HTML form properties, such as base type (Text, Integer, Float, SelectList), +default value, value, etc. + +By default, the Moose option C 'rw'> is added to all properties to make +sure the accessors are generated. If you want to prevent that from happening, +pass an explicit C 'ro'> along with %options. + +=head3 $name + +The name of the property. + +=head3 %options + +An options hashref [need list of base options]. Any option which belongs to a form +is relegated to the form attribute of the property and removed from the list of +regular attributes. + +=head4 fieldType + +The type of field to be created by the form builder. This is required, and should be the name of +a WebGUI::Form plugin, with the initial letter lowercased. + +=head4 noFormPost, label + +Either or both of these must be passed in. + +=cut + +sub property { + my ($meta, $name, %options) = @_; + $meta->add_property($name, %options); + return 1; +} + +1; diff --git a/lib/WebGUI/Definition/Asset.pm b/lib/WebGUI/Definition/Asset.pm new file mode 100644 index 000000000..d1ab7a88a --- /dev/null +++ b/lib/WebGUI/Definition/Asset.pm @@ -0,0 +1,117 @@ +package WebGUI::Definition::Asset; + +=head1 LEGAL + + ------------------------------------------------------------------- + WebGUI is Copyright 2001-2012 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 + ------------------------------------------------------------------- + +=cut + +use 5.010; +use feature (); + +use Moose::Exporter; +use WebGUI::Definition (); +use WebGUI::Definition::Meta::Asset; +use Moose::Util; +use Moose::Util::MetaRole; + +use namespace::autoclean; + +no warnings qw(uninitialized); + +our $VERSION = '0.0.1'; + +=head1 NAME + +Package WebGUI::Definition::Asset + +=head1 DESCRIPTION + +Moose-based meta class for all Asset definitions in WebGUI. + +=head1 SYNOPSIS + +A definition contains all the information needed to build an object. +Information required to build forms are added as optional roles and +sub metaclasses. Database persistance is handled similarly. + +=head1 METHODS + +These methods are available from this class: + +=cut + +my ($import, $unimport, $init_meta) = Moose::Exporter->build_import_methods( + install => [ 'unimport' ], + also => 'WebGUI::Definition', +); + +#------------------------------------------------------------------- + +=head2 import ( ) + +A custom import method is provided so that uninitialized properties do not +generate warnings. + +=cut + +sub import { + my $class = shift; + my $caller = caller; + $class->$import({ into_level => 1 }); + warnings->unimport('uninitialized'); + feature->import(':5.10'); + namespace::autoclean->import( -cleanee => $caller ); + return 1; +} + +#------------------------------------------------------------------- + +=head2 init_meta ( ) + +A custom init_meta, so that if inported into a class, it applies the roles +to the class, and applies the meta-role to the meta-class. + +But, if it is applied to a Role, then only the meta-role is applied, since we want +the final application to be in the end user of the Role. + +This permits using this to compose Asset Roles with their own database tables. + +=cut + +sub init_meta { + my $class = shift; + my %args = @_; + my $for_class = $args{for_class}; + if ($for_class->meta->isa('Moose::Meta::Class')) { + Moose::Util::MetaRole::apply_metaroles( + for => $for_class, + class_metaroles => { + class => ['WebGUI::Definition::Meta::Asset'], + }, + ); + Moose::Util::apply_all_roles( + $for_class, + 'WebGUI::Definition::Role::Asset', + ); + } + else { + Moose::Util::MetaRole::apply_metaroles( + for => $for_class, + role_metaroles => { + role => ['WebGUI::Definition::Meta::Asset'], + }, + ); + } + return $for_class->meta; +} + +1; diff --git a/lib/WebGUI/Definition/Crud.pm b/lib/WebGUI/Definition/Crud.pm new file mode 100644 index 000000000..f58ef7128 --- /dev/null +++ b/lib/WebGUI/Definition/Crud.pm @@ -0,0 +1,123 @@ +package WebGUI::Definition::Crud; + +=head1 LEGAL + + ------------------------------------------------------------------- + WebGUI is Copyright 2001-2012 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 + ------------------------------------------------------------------- + +=cut + +use 5.010; +use feature (); + +use Moose::Exporter; +use WebGUI::Definition (); +use WebGUI::Definition::Meta::Crud; +use Moose::Util; +use Moose::Util::MetaRole; +use JSON; +use Tie::IxHash; +use Clone qw/clone/; +use WebGUI::DateTime; +use WebGUI::Exception; + +use namespace::autoclean; + +no warnings qw(uninitialized); + +our $VERSION = '0.0.1'; + +=head1 NAME + +Package WebGUI::Definition::Crud + +=head1 DESCRIPTION + +Moose-based meta class for all Shop definitions in WebGUI. Shop plugins have a name, pluginName, and +the table where their data is stored as JSON blobs, tableName. + +=head1 SYNOPSIS + +A definition contains all the information needed to build an object. +Information required to build forms are added as optional roles and +sub metaclasses. Database persistance is handled similarly. + +=head1 METHODS + +These methods are available from this class: + +=cut + +my ($import, $unimport, $init_meta) = Moose::Exporter->build_import_methods( + install => [ 'unimport' ], + also => 'WebGUI::Definition', +); + +#------------------------------------------------------------------- + +=head2 import ( ) + +A custom import method is provided so that uninitialized properties do not +generate warnings. + +=cut + +sub import { + my $class = shift; + my $caller = caller; + $class->$import({ into_level => 1 }); + warnings->unimport('uninitialized'); + feature->import(':5.10'); + namespace::autoclean->import( -cleanee => $caller ); + return 1; +} + +#------------------------------------------------------------------- + +=head2 init_meta ( ) + +A custom init_meta, so that if inported into a class, it applies the roles +to the class, and applies the meta-role to the meta-class. + +But, if it is applied to a Role, then only the meta-role is applied, since we want +the final application to be in the end user of the Role. + +This permits using this package to compose Roles with their own database tables. + +=cut + +sub init_meta { + my $class = shift; + my %args = @_; + my $for_class = $args{for_class}; + if ($for_class->meta->isa('Moose::Meta::Class')) { + Moose::Util::MetaRole::apply_metaroles( + for => $for_class, + class_metaroles => { + class => ['WebGUI::Definition::Meta::Crud'], + }, + ); + Moose::Util::apply_all_roles( + $for_class, + 'WebGUI::Definition::Role::Object', + ); + } + else { + Moose::Util::MetaRole::apply_metaroles( + for => $for_class, + role_metaroles => { + role => ['WebGUI::Definition::Meta::Crud'], + }, + ); + } + return $for_class->meta; +} + +1; diff --git a/lib/WebGUI/Definition/Meta/Asset.pm b/lib/WebGUI/Definition/Meta/Asset.pm new file mode 100644 index 000000000..8d736a5fc --- /dev/null +++ b/lib/WebGUI/Definition/Meta/Asset.pm @@ -0,0 +1,124 @@ +package WebGUI::Definition::Meta::Asset; + +=head1 LEGAL + + ------------------------------------------------------------------- + WebGUI is Copyright 2001-2012 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 + ------------------------------------------------------------------- + +=cut + +use 5.010; +use Moose::Role; +use namespace::autoclean; +use WebGUI::Definition::Meta::Property; +use WebGUI::Definition::Meta::Property::Asset; +no warnings qw(uninitialized); + +with 'WebGUI::Definition::Meta::Class'; + +our $VERSION = '0.0.1'; + +=head1 NAME + +Package WebGUI::Definition::Meta::Property::Asset + +=head1 DESCRIPTION + +Extends WebGUI::Definition::Meta::Class to provide + +=head1 SYNOPSIS + +Extends 'WebGUI::Definition::Meta::Class' to provide attributes specific to Assets. + +=head1 METHODS + +These methods are available from this class: + +=cut + +#------------------------------------------------------------------- + +=head2 property_meta ( ) + +Asset Definitions use WebGUI::Definition::Meta::Property::Asset as the base class +for properties. + +=cut + +has 'property_metaroles' => ( + is => 'ro', + default => sub { [ 'WebGUI::Definition::Meta::Property', 'WebGUI::Definition::Meta::Property::Asset'] }, +); + +has [ qw{tableName icon assetName} ] => ( + is => 'rw', +); + +around add_property => sub { + my ($orig, $self, $name, %options) = @_; + $options{tableName} //= $self->tableName; + return $self->$orig($name, %options); +}; + +#------------------------------------------------------------------- + +=head2 get_tables ( ) + +Returns an array of the names of all tables in every property used by this class. + +=cut + +sub get_tables { + my ($self) = @_; + if ($self->is_immutable) { + return @{ $self->{__immutable}{get_tables_methods} ||= [ $self->_get_tables ] }; + } + goto &_get_tables; +} + +sub _get_tables { + my $self = shift; + my %seen = (); + my @tables = + grep { ! $seen{$_}++ } + map { $_->tableName } + $self->get_all_properties + ; + return @tables; +} + +#------------------------------------------------------------------- + +=head2 tableName ( ) + +The table that this asset stores its properties in. + +=cut + +#------------------------------------------------------------------- + +=head2 icon ( ) + +The filename of the icon for this Asset. Icons are stored in +www/extras/assets and are 48 x 48 pixels in size. A smaller version of +the icon, 16x16, is found in www/extras/assets/small. + +=cut + +#------------------------------------------------------------------- + +=head2 assetName ( ) + +An array reference containing two items. The first is the i18n key for the asset's name. +The second is the i18n namespace to find the asset's name. + +=cut + +1; diff --git a/lib/WebGUI/Definition/Meta/Class.pm b/lib/WebGUI/Definition/Meta/Class.pm new file mode 100644 index 000000000..14a0c67d6 --- /dev/null +++ b/lib/WebGUI/Definition/Meta/Class.pm @@ -0,0 +1,232 @@ +package WebGUI::Definition::Meta::Class; + +=head1 LEGAL + + ------------------------------------------------------------------- + WebGUI is Copyright 2001-2012 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 + ------------------------------------------------------------------- + +=cut + +use 5.010; +use Moose::Role; +use namespace::autoclean; +use WebGUI::Definition::Meta::Property; +no warnings qw(uninitialized); + +our $VERSION = '0.0.1'; + +=head1 NAME + +Package WebGUI::Definition::Meta::Class + +=head1 DESCRIPTION + +Moose-based meta class for all definitions in WebGUI. + +=head1 SYNOPSIS + +A definition contains all the information needed to build an object. +Information required to build forms are added as optional roles and +sub metaclasses. Database persistance is handled similarly. + +=head1 METHODS + +These methods are available from this class: + +=cut + +#------------------------------------------------------------------- + +=head2 add_property () + +=cut + +sub add_property { + my ($self, $name, %options) = @_; + if (! (exists $options{noFormPost} || exists $options{label}) ) { + $options{label} = $name; + } + $options{traits} ||= []; + push @{ $options{traits} }, @{ $self->property_metaroles }; + my $prop_meta = Moose::Meta::Attribute->interpolate_class(\%options); + my %form_options = (); + for my $key ( keys %options ) { + if ( ! $prop_meta->meta->find_attribute_by_name($key) ) { + $form_options{$key} = delete $options{$key}; + } + } + $options{is} = 'rw'; + $options{form} = \%form_options; + $self->add_attribute( $name, %options ); +} + +#------------------------------------------------------------------- + +=head2 get_all_attributes_list ( ) + +Returns an array of all attribute names across all meta classes. + +=cut + +sub get_all_attributes_list { + my ($self) = @_; + if ($self->is_immutable) { + return @{ $self->{__immutable}{get_all_attributes_list} ||= [ $self->_get_all_attributes_list ] }; + } + goto &_get_all_attributes_list; +} + +sub _get_all_attributes_list { + my $self = shift; + my @attributes = (); + CLASS: foreach my $meta ($self->get_all_class_metas) { + push @attributes, $meta->get_attribute_list; + } + return @attributes; +} + +#------------------------------------------------------------------- + +=head2 get_all_class_metas ( ) + +Returns an array of all WebGUI::Definition::Meta::Class objects for the classes in this class, +in the order they were created in the Definition. + +=cut + +sub get_all_class_metas { + my $self = shift; + my @metas = (); + CLASS: foreach my $class_name (reverse $self->linearized_isa) { + my $meta = $class_name->meta; + next CLASS unless $meta->can('get_all_properties'); + push @metas, $meta; + } + return @metas; +} + +#------------------------------------------------------------------- + +=head2 get_all_properties ( ) + +Returns an array of all Properties, in all classes, in the order they were +created in the Definition. + +=cut + +sub get_all_properties { + my $self = shift; + return + map { $_->get_properties } $self->get_all_class_metas; +} + +#------------------------------------------------------------------- + +=head2 get_all_property_list ( ) + +Returns an array of the names of all Properties, in all classes, in the order they were +created in the Definition. + +=cut + +sub get_all_property_list { + my $self = shift; + my @names = (); + my %seen = (); + foreach my $meta ($self->get_all_class_metas) { + push @names, + grep { !$seen{$_}++ } + $meta->get_property_list; + } + return @names; +} + +#------------------------------------------------------------------- + +=head2 get_all_settable_list ( ) + +Returns an array of the names of all Properties, in all classes, in the order they were +created in the Definition, that have the WebGUI::Definition::Meta::Settable role applied. + +=cut + +sub get_all_settable_list { + my $self = shift; + my @names = (); + my %seen = (); + foreach my $meta ($self->get_all_class_metas) { + push @names, + grep { !$seen{$_}++ } + map { $_->name } + sort { $a->insertion_order <=> $b->insertion_order } + grep { $_->does('WebGUI::Definition::Meta::Settable') } + $meta->get_attributes; + } + return @names; +} + +#------------------------------------------------------------------- + +=head2 get_attributes ( ) + +Returns an array of all attributes, but only for this class. This is the +API-safe way of doing values %{ $self->_attribute_map }; + +=cut + +sub get_attributes { + my $self = shift; + return map { $self->find_attribute_by_name($_) } $self->get_attribute_list; +} + +#------------------------------------------------------------------- + +=head2 get_properties ( ) + +Returns an array of all properties, but only for this class. + +=cut + +sub get_properties { + my $self = shift; + return grep { $_->does('WebGUI::Definition::Meta::Property') } $self->get_attributes; +} + +#------------------------------------------------------------------- + +=head2 get_property_list ( ) + +Returns an array of the names of all Properties, in this class, sorted by the order they +were added to the Definition. This guarantees repeatable, reliable handling of properties. + +=cut + +sub get_property_list { + my $self = shift; + return map { $_->name } + sort { $a->insertion_order <=> $b->insertion_order } # In insertion order + $self->get_properties +} + +#------------------------------------------------------------------- + +=head2 property_metaroles ( ) + +Returns the name of the class for properties. + +=cut + +has property_metaroles => ( + is => 'ro', + default => sub { ['WebGUI::Definition::Meta::Property' ] }, +); + +1; + diff --git a/lib/WebGUI/Definition/Meta/Crud.pm b/lib/WebGUI/Definition/Meta/Crud.pm new file mode 100644 index 000000000..e1e3a1a55 --- /dev/null +++ b/lib/WebGUI/Definition/Meta/Crud.pm @@ -0,0 +1,87 @@ +package WebGUI::Definition::Meta::Crud; + +=head1 LEGAL + + ------------------------------------------------------------------- + WebGUI is Copyright 2001-2012 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 + ------------------------------------------------------------------- + +=cut + +use 5.010; +use Moose::Role; +use namespace::autoclean; +use WebGUI::Definition::Meta::Property; +use WebGUI::Definition::Meta::Property::Crud; +no warnings qw(uninitialized); + +with 'WebGUI::Definition::Meta::Class'; + +our $VERSION = '0.0.1'; + +=head1 NAME + +Package WebGUI::Definition::Meta::Crud + +=head1 DESCRIPTION + +Extends 'WebGUI::Definition::Meta::Class' to provide attributes specific to Cruds. + +=head1 METHODS + +These methods are available from this class: + +=cut + +#------------------------------------------------------------------- + +=head2 property_meta ( ) + +Asset Definitions use WebGUI::Definition::Meta::Property::Crud as the base class +for properties. + +=cut + +has 'property_metaroles' => ( + is => 'ro', + default => sub { [ 'WebGUI::Definition::Meta::Property', 'WebGUI::Definition::Meta::Property::Crud'] }, +); + +#------------------------------------------------------------------- + +has [ qw{tableName tableKey sequenceKey} ] => ( + is => 'rw', +); + +#------------------------------------------------------------------- + +=head2 tableName ( ) + +The table that this plugin stores its properties in. + +=cut + +#------------------------------------------------------------------- + +=head2 tableKey ( ) + +The column in the table that is the primary key. + +=cut + +#------------------------------------------------------------------- + +=head2 sequenceKey ( ) + +The column in the table that denotes the order of objects in the table. If undef, or empty, +then no ordering is possible. + +=cut + +1; diff --git a/lib/WebGUI/URL/Unauthorized.pm b/lib/WebGUI/Definition/Meta/Property.pm similarity index 51% rename from lib/WebGUI/URL/Unauthorized.pm rename to lib/WebGUI/Definition/Meta/Property.pm index 6665c1cfd..96ada3fae 100644 --- a/lib/WebGUI/URL/Unauthorized.pm +++ b/lib/WebGUI/Definition/Meta/Property.pm @@ -1,9 +1,9 @@ -package WebGUI::URL::Unauthorized; +package WebGUI::Definition::Meta::Property; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -14,41 +14,40 @@ package WebGUI::URL::Unauthorized; =cut -use strict; -use Apache2::Const -compile => qw(AUTH_REQUIRED); +use 5.010; +use Moose::Role; +use namespace::autoclean; +no warnings qw(uninitialized); +our $VERSION = '0.0.1'; + +with 'WebGUI::Definition::Meta::Settable'; =head1 NAME -Package WebGUI::URL::Unauthorized +Package WebGUI::Definition::Meta::Property =head1 DESCRIPTION -A URL handler that deals with requests where the user cannot access what they requested. +Moose-based meta class for all properties in WebGUI::Definition. =head1 SYNOPSIS - use WebGUI::URL::Unauthorized; - my $status = WebGUI::URL::Unauthorized::handler($r, $s, $config); - -=head1 SUBROUTINES - -These subroutines are available from this package: +WebGUI::Definition::Meta::Property extends Moose::Meta::Attribute to include +a read-only form method, that provides the form properties for the attribute. =cut +has 'form' => ( + is => 'ro', +); + #------------------------------------------------------------------- -=head2 handler ( request, server, config ) +=head2 form ( ) -The Apache request handler for this package. +Returns a hashref of propertes that are specific to WebGUI::Forms. =cut -sub handler { - my ($request, $server, $config) = @_; - return Apache2::Const::AUTH_REQUIRED; -} - 1; - diff --git a/lib/WebGUI/Definition/Meta/Property/Asset.pm b/lib/WebGUI/Definition/Meta/Property/Asset.pm new file mode 100644 index 000000000..110bd7154 --- /dev/null +++ b/lib/WebGUI/Definition/Meta/Property/Asset.pm @@ -0,0 +1,83 @@ +package WebGUI::Definition::Meta::Property::Asset; + +=head1 LEGAL + + ------------------------------------------------------------------- + WebGUI is Copyright 2001-2012 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 + ------------------------------------------------------------------- + +=cut + +use 5.010; +use Moose::Role; +use namespace::autoclean; +no warnings qw(uninitialized); + +our $VERSION = '0.0.1'; + +=head1 NAME + +Package WebGUI::Definition::Meta::Property::Asset + +=head1 DESCRIPTION + +Extends WebGUI::Definition::Meta::Property to provide Asset properties with +specific methods. The tableName and fieldType class properties must be defined. + +=head1 METHODS + +The following methods are added. + +=cut + +has 'tableName' => ( + is => 'ro', + required => 1, +); + +has 'fieldType' => ( + is => 'ro', + required => 1, +); + +has 'noFormPost' => ( + is => 'ro', +); + +#------------------------------------------------------------------- + +=head2 tableName ( ) + +Previously, properties were storied in arrays of definitions, with each definition +providing its own attributes like table. This Moose based implementation stores +the properties flat, so the tableName attribute is copied into the property so we +know where to store it. + +=cut + +#------------------------------------------------------------------- + +=head2 fieldType ( ) + +The type of HTML form field that this property should use to generate its UI +and validate its data. + +=cut + +#------------------------------------------------------------------- + +=head2 noFormPost ( ) + +This is boolean which indicates that no data from HTML forms should be validated +and stored for this property. + +=cut + +1; + diff --git a/lib/WebGUI/Definition/Meta/Property/Crud.pm b/lib/WebGUI/Definition/Meta/Property/Crud.pm new file mode 100644 index 000000000..d5d488446 --- /dev/null +++ b/lib/WebGUI/Definition/Meta/Property/Crud.pm @@ -0,0 +1,73 @@ +package WebGUI::Definition::Meta::Property::Crud; + +=head1 LEGAL + + ------------------------------------------------------------------- + WebGUI is Copyright 2001-2012 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 + ------------------------------------------------------------------- + +=cut + +use 5.010; +use Moose::Role; +use namespace::autoclean; +no warnings qw(uninitialized); + +our $VERSION = '0.0.1'; + +=head1 NAME + +Package WebGUI::Definition::Meta::Property::Asset + +=head1 DESCRIPTION + +Extends WebGUI::Definition::Meta::Property to provide Asset properties with +specific methods. The tableName and fieldType class properties must be defined. + +=head1 METHODS + +The following methods are added. + +=cut + +has 'serialize' => ( + is => 'ro', +); + +has 'isQueryKey' => ( + is => 'ro', +); + +#------------------------------------------------------------------- + +=head2 serialize ( ) + +serialize tells WebGUI::Crud to automatically serialize this field in a JSON wrapper before storing it to the database, and to convert it back to it's native structure upon retrieving it from the database. This is useful if you wish to persist hash references or array references. + +=cut + +#------------------------------------------------------------------- + +=head2 isQueryKey ( ) + +isQueryKey tells WebGUI::Crud that the field should be marked as 'non null' in the table and then adds an index of the same name to the table to make searching on the field faster. B Don't use this if the field is already a sequenceKey. If it's a sequence key then it will automatically be indexed. + +=cut + +#------------------------------------------------------------------- + +=head2 noFormPost ( ) + +This is boolean which indicates that no data from HTML forms should be validated +and stored for this property. + +=cut + +1; + diff --git a/lib/WebGUI/Definition/Meta/Property/Serialize.pm b/lib/WebGUI/Definition/Meta/Property/Serialize.pm new file mode 100644 index 000000000..d44b62c7c --- /dev/null +++ b/lib/WebGUI/Definition/Meta/Property/Serialize.pm @@ -0,0 +1,40 @@ +package WebGUI::Definition::Meta::Property::Serialize; + +=head1 LEGAL + + ------------------------------------------------------------------- + WebGUI is Copyright 2001-2012 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 + ------------------------------------------------------------------- + +=cut + +use 5.010; +use Moose::Role; +use namespace::autoclean; +no warnings qw(uninitialized); + +our $VERSION = '0.0.1'; + +=head1 NAME + +Package WebGUI::Definition::Meta::Property::Serialize + +=head1 DESCRIPTION + +Extends WebGUI::Definition::Meta::Property to provide serialization for attribute +values. Currently just a marker, but eventually should provide per-attribute +serialization via handles. + +=head1 METHODS + +The following methods are added. + +=cut + +1; diff --git a/lib/WebGUI/Definition/Meta/Settable.pm b/lib/WebGUI/Definition/Meta/Settable.pm new file mode 100644 index 000000000..c11f9d6bb --- /dev/null +++ b/lib/WebGUI/Definition/Meta/Settable.pm @@ -0,0 +1,39 @@ +package WebGUI::Definition::Meta::Settable; + +=head1 LEGAL + + ------------------------------------------------------------------- + WebGUI is Copyright 2001-2012 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 + ------------------------------------------------------------------- + +=cut + +use 5.010; +use Moose::Role; +use namespace::autoclean; +no warnings qw(uninitialized); + +our $VERSION = '0.0.1'; + +=head1 NAME + +Package WebGUI::Definition::Meta::Settable + +=head1 DESCRIPTION + +Role to tag properties as being settable, or not. + +=head1 SYNOPSIS + +WebGUI::Definition::Meta::Settable. +a read-only form method, that provides the form properties for the attribute. + +=cut + +1; diff --git a/lib/WebGUI/Definition/Meta/Shop.pm b/lib/WebGUI/Definition/Meta/Shop.pm new file mode 100644 index 000000000..45abb74ef --- /dev/null +++ b/lib/WebGUI/Definition/Meta/Shop.pm @@ -0,0 +1,65 @@ +package WebGUI::Definition::Meta::Shop; + +=head1 LEGAL + + ------------------------------------------------------------------- + WebGUI is Copyright 2001-2012 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 + ------------------------------------------------------------------- + +=cut + +use 5.010; +use Moose::Role; +use namespace::autoclean; +use WebGUI::Definition::Meta::Property; +use WebGUI::Definition::Meta::Property::Asset; +no warnings qw(uninitialized); + +with 'WebGUI::Definition::Meta::Class'; + +our $VERSION = '0.0.1'; + +=head1 NAME + +Package WebGUI::Definition::Meta::Shop + +=head1 DESCRIPTION + +Extends 'WebGUI::Definition::Meta::Class' to provide attributes specific to Assets. + +=head1 METHODS + +These methods are available from this class: + +=cut + +#------------------------------------------------------------------- + +has [ qw{tableName pluginName} ] => ( + is => 'rw', +); + +#------------------------------------------------------------------- + +=head2 tableName ( ) + +The table that this plugin stores its properties in. + +=cut + +#------------------------------------------------------------------- + +=head2 pluginName ( ) + +An array reference containing two items. The first is the i18n key for the plugin's name. +The second is the i18n namespace to find the plugin's name. + +=cut + +1; diff --git a/lib/WebGUI/Definition/Role/Asset.pm b/lib/WebGUI/Definition/Role/Asset.pm new file mode 100644 index 000000000..19bf63772 --- /dev/null +++ b/lib/WebGUI/Definition/Role/Asset.pm @@ -0,0 +1,27 @@ +package WebGUI::Definition::Role::Asset; + +=head1 LEGAL + + ------------------------------------------------------------------- + WebGUI is Copyright 2001-2012 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 + ------------------------------------------------------------------- + +=cut + +use 5.010; +use Moose::Role; +use namespace::autoclean; +no warnings qw(uninitialized); + +with 'WebGUI::Definition::Role::Object'; + +our $VERSION = '0.0.1'; + +1; + diff --git a/lib/WebGUI/Definition/Role/Object.pm b/lib/WebGUI/Definition/Role/Object.pm new file mode 100644 index 000000000..9e1a8e815 --- /dev/null +++ b/lib/WebGUI/Definition/Role/Object.pm @@ -0,0 +1,194 @@ +package WebGUI::Definition::Role::Object; + +=head1 LEGAL + + ------------------------------------------------------------------- + WebGUI is Copyright 2001-2012 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 + ------------------------------------------------------------------- + +=cut + +use 5.010; +use Moose::Role; +use namespace::autoclean; +use WebGUI::International; +no warnings qw(uninitialized); + +our $VERSION = '0.0.1'; + +=head1 NAME + +Package WebGUI::Role::Object + +=head1 DESCRIPTION + +Moose-based role for providing classic WebGUI get/set style methods for objects. +This role is automatically included in all Definition objects. + +=head1 SYNOPSIS + +$obj->get('someProperty'); +$obj->set({ someProperty => 'someValue' }); + +=head1 METHODS + +These methods are available from this class: + +=cut + +#------------------------------------------------------------------- + +=head2 get ( [ $name ] ) + +Generic accessor for this object's properties. + +=head3 $name + +If $name is defined, and is an attribute of the object, it returns the +value of the attribute. If $name is not an attribute, then it returns +undef. + +If $name is not defined, it returns a hashref of all attributes. + +=cut + +sub get { + my $self = shift; + if (@_) { + my $property = shift; + if ($self->can($property)) { + return $self->$property; + } + return undef; + } + my %properties = map { $_ => scalar $self->$_ } $self->meta->get_all_attributes_list; + delete $properties{session}; + return \%properties; +} + +#------------------------------------------------------------------- + +=head2 set ( dataSpec ) + +Generic setter for this object's properties. + +=head3 dataSpec + +Accepts either a hash, or a hash reference, of data to set in the object. If the key +is not an attribute of the object, then it is silently ignored. + +=cut + +sub set { + my $self = shift; + my $properties = @_ % 2 ? shift : { @_ }; + my @orderedProperties = $self->meta->get_all_settable_list; + KEY: for my $property ( @orderedProperties ) { + next KEY unless exists $properties->{$property}; + $self->$property($properties->{$property}); + } + return 1; +} + +#------------------------------------------------------------------- + +=head2 update ( dataSpec ) + +Combines the actions of setting data in the object and writing the data. + +=head3 dataSpec + +See L. + +=cut + + +sub update { + my $self = shift; + $self->set(@_); + if ($self->can('write')) { + $self->write; + } + return 1; +} + +#------------------------------------------------------------------- + +=head2 getFormProperties ( $name ) + +Returns the form properties for the requested property. Handles resolving i18n and +calling subroutines for values. + +Each subroutine is invoked as a method of the object, and is passed the entire set of +form properties and the name of the property. + +i18n is allowed in the label, subtext and hoverHelp options, and is specified by passing +an array reference. + + label => [ 'key', 'namespace' ], + +If the array reference has more than two elements, getFormProperties will pass the retrieved +i18n key to sprintf, with the extra elements as arguments. + + label => [ 'key', 'namespace', 'extra' ], + +becomes + + label => sprintf($i18n->get('label', 'namespace'), 'extra'), + +=head3 $name + +The name of the property to return. + +=cut + +sub getFormProperties { + my $self = shift; + + # If called as a class method, get a session + # If called as an object method, session is set when first needed below + my $session; + if ( !ref $self ) { + $session = shift; + } + + my $property = $self->meta->find_attribute_by_name(@_); + my $form = $property->form; + PROPERTY: while (my ($property_name, $property_value) = each %{ $form }) { + next PROPERTY unless ref $property_value; + if (($property_name eq 'label' || $property_name eq 'hoverHelp' || $property_name eq 'subtext') and ref $property_value eq 'ARRAY') { + my ($label, $namespace, @arguments) = @{ $property_value }; + my $text = WebGUI::International->new($session ||= $self->session)->get($label, $namespace); + if (@arguments) { + $text = sprintf $text, @arguments; + } + $form->{$property_name} = $text; + } + elsif (ref $property_value eq 'CODE') { + $form->{$property_name} = $self->$property_value($property, $property_name); + } + } + return $form; +} + +#------------------------------------------------------------------- + +=head2 getProperties ( ) + +Returns a list of the names of all properties of the object, as set by the Definition. + +=cut + +sub getProperties { + my $self = shift; + return $self->meta->get_all_property_list; +} + +1; + diff --git a/lib/WebGUI/Definition/Shop.pm b/lib/WebGUI/Definition/Shop.pm new file mode 100644 index 000000000..adb384475 --- /dev/null +++ b/lib/WebGUI/Definition/Shop.pm @@ -0,0 +1,118 @@ +package WebGUI::Definition::Shop; + +=head1 LEGAL + + ------------------------------------------------------------------- + WebGUI is Copyright 2001-2012 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 + ------------------------------------------------------------------- + +=cut + +use 5.010; +use feature (); + +use Moose::Exporter; +use WebGUI::Definition (); +use WebGUI::Definition::Meta::Shop; +use Moose::Util; +use Moose::Util::MetaRole; + +use namespace::autoclean; + +no warnings qw(uninitialized); + +our $VERSION = '0.0.1'; + +=head1 NAME + +Package WebGUI::Definition::Shop + +=head1 DESCRIPTION + +Moose-based meta class for all Shop definitions in WebGUI. Shop plugins have a name, pluginName, and +the table where their data is stored as JSON blobs, tableName. + +=head1 SYNOPSIS + +A definition contains all the information needed to build an object. +Information required to build forms are added as optional roles and +sub metaclasses. Database persistance is handled similarly. + +=head1 METHODS + +These methods are available from this class: + +=cut + +my ($import, $unimport, $init_meta) = Moose::Exporter->build_import_methods( + install => [ 'unimport' ], + also => 'WebGUI::Definition', +); + +#------------------------------------------------------------------- + +=head2 import ( ) + +A custom import method is provided so that uninitialized properties do not +generate warnings. + +=cut + +sub import { + my $class = shift; + my $caller = caller; + $class->$import({ into_level => 1 }); + warnings->unimport('uninitialized'); + feature->import(':5.10'); + namespace::autoclean->import( -cleanee => $caller ); + return 1; +} + +#------------------------------------------------------------------- + +=head2 init_meta ( ) + +A custom init_meta, so that if inported into a class, it applies the roles +to the class, and applies the meta-role to the meta-class. + +But, if it is applied to a Role, then only the meta-role is applied, since we want +the final application to be in the end user of the Role. + +This permits using this to compose Roles with their own database tables. + +=cut + +sub init_meta { + my $class = shift; + my %args = @_; + my $for_class = $args{for_class}; + if ($for_class->meta->isa('Moose::Meta::Class')) { + Moose::Util::MetaRole::apply_metaroles( + for => $for_class, + class_metaroles => { + class => ['WebGUI::Definition::Meta::Shop'], + }, + ); + Moose::Util::apply_all_roles( + $for_class, + 'WebGUI::Definition::Role::Object', + ); + } + else { + Moose::Util::MetaRole::apply_metaroles( + for => $for_class, + role_metaroles => { + role => ['WebGUI::Definition::Meta'], + }, + ); + } + return $for_class->meta; +} + +1; diff --git a/lib/WebGUI/Deprecate.pm b/lib/WebGUI/Deprecate.pm new file mode 100644 index 000000000..b0208a311 --- /dev/null +++ b/lib/WebGUI/Deprecate.pm @@ -0,0 +1,96 @@ +package WebGUI::Deprecate; + +=head1 NAME + +WebGUI::Deprecate - Warn about subroutine deprecations + +=head1 SYNOPSIS + + use WebGUI::Deprecate; + + deprecate oldMethod => 'newMethod'; + sub newMethod { # will get called either way } + +=head1 DESCRIPTION + +Deprecate a subroutine, spitting out a warning whenever it is used. + +=head2 derp ($message) + +derp is short for DEprecation caRP. Similar to carp, derp will emit the message +on STDERR. If the message does not end with a newline, it will append a strack trace +to the message. Each message is only printed once. + +=head3 $message + +The message to print. + +=head2 deprecate ($old_method, $new_method) + +This subroutine allows you to replace an old method with a new method and to emit a warning +to the user (developer) that they should be using something else. + +=head3 $old_method + +The old, deprecated method. + +=head3 $new_method + +The new, shiny method that should be called in its place. + +=cut + +use strict; +use warnings; +use Package::Stash; + +use Sub::Exporter -setup => { + exports => [ 'deprecate', 'derp' ], + groups => { + default => [ 'deprecate', 'derp' ], + } +}; + +my %derped; +sub derp ($) { # DEprecation caRP + my ( $message ) = @_; + + # Add stack info to message + unless ( $message =~ /\n$/ ) { + $message .= " at " . join( " line ", (caller(1))[0,2] ); + } + + return if ( $derped{ $message }++ ); # HERP + warn $message . "\n"; # DERP +} + +sub deprecate ($$) { + my ($old_method, $new_method) = @_; + my $package = caller; + my $stash = Package::Stash->new($package); + + my %deep; + # keep a copy since it will be replaced + my $new_sub = $stash->get_package_symbol('&'.$new_method); + # call new method instead. if + $stash->add_package_symbol('&'.$old_method, sub { + my $self = shift; + derp "$package\::$old_method is deprecated and should be replaced with $new_method"; + local $deep{1} = 1; + $self->$new_method(@_); + }); + $stash->add_package_symbol('&'.$new_method, sub { + my $self = $_[0]; + if (!$deep{1}) { + my $old_sub = $self->can($old_method); + if ($old_sub ne \&{"$package\::$old_method"}) { + derp "Subclass of $package uses deprecated method $old_method, which should be replaced with $new_method"; + goto $old_sub; + } + } + goto $new_sub; + }); +} + +1; + diff --git a/lib/WebGUI/Event.pm b/lib/WebGUI/Event.pm index 8a2f27ed4..68a402fc2 100644 --- a/lib/WebGUI/Event.pm +++ b/lib/WebGUI/Event.pm @@ -3,7 +3,7 @@ package WebGUI::Event; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Exception.pm b/lib/WebGUI/Exception.pm index e3e65f4df..f836c9004 100644 --- a/lib/WebGUI/Exception.pm +++ b/lib/WebGUI/Exception.pm @@ -3,7 +3,7 @@ package WebGUI::Exception; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -15,55 +15,6 @@ package WebGUI::Exception; =cut use strict; -use Exception::Class ( - - 'WebGUI::Error' => { - description => "A general error occured.", - }, - 'WebGUI::Error::OverrideMe' => { - isa => 'WebGUI::Error', - description => 'This method should be overridden by subclasses.', - }, - 'WebGUI::Error::MethodNotFound' => { - isa => 'WebGUI::Error', - description => q|Called a method that doesn't exist.|, - fields => 'method' - }, - 'WebGUI::Error::InvalidObject' => { - isa => 'WebGUI::Error::InvalidParam', - description => "Expected to get a reference to an object type that wasn't gotten.", - fields => ["expected","got"], - }, - 'WebGUI::Error::InvalidParam' => { - isa => 'WebGUI::Error', - description => "Expected to get a param we didn't get.", - fields => ["param"], - }, - 'WebGUI::Error::ObjectNotFound' => { - isa => 'WebGUI::Error', - description => "The object you were trying to retrieve does not exist.", - fields => ["id"], - }, - 'WebGUI::Error::ObjectNotFound::Template' => { - isa => 'WebGUI::Error', - description => "The template an asset was trying to retrieve does not exist.", - fields => [qw/templateId assetId/], - }, - 'WebGUI::Error::InvalidFile' => { - isa => 'WebGUI::Error', - description => "The file you have provided has errors.", - fields => [qw{ brokenFile brokenLine }], - }, - 'WebGUI::Error::Template' => { - isa => 'WebGUI::Error', - description => "A template has errors that prevent it from being processed.", - }, - 'WebGUI::Error::NotInConfig' => { - isa => 'WebGUI::Error', - description => 'A module was requested that does not exist in the configuration file.', - fields => [qw{ module configKey }], - }, -); sub WebGUI::Error::full_message { my $self = shift; @@ -104,10 +55,33 @@ A base class for all exception handling. It creates a few base exception objects B: Though the package name is WebGUI::Exception, the handler objects that are created are WebGUI::Error. +=head1 DESCRIPTION + +To the new policies for API methods are: if there's an error message to the user, there's one to the log. +Only trap exceptions in C methods and always report them. + +API methods now have a policy of throwing errors from this class to be caught by C +or C in the calling code. +Code using the API (such as in C methods, upgrade scripts, and so forth) should +use C to identify it, then either handle it gracefully or else +propogate it. + + eval { + my $expected_result = WebGUI::Somewhere->something(@args); + }; + if( my $e = Exception::Class->caught('WebGUI::Error::InvalidParam') ) { + # clean up or retry but otherwise don't do anything and the error will just vanish + } elsif( my $e = Exception::Class->caught() { + $e->rethrow; # rethrow all unexpected errors + } + =head1 EXCEPTION TYPES These exception classes are defined in this class: +=cut + +#------------------------------------------------------------------- =head2 WebGUI::Error @@ -137,6 +111,30 @@ A read only exception method that returns the line number where the exception wa A read only exception method that returns the package name where the exception was thrown. +=cut + +#------------------------------------------------------------------- + +=head2 WebGUI::Error::OverrideMe + +An interface was not overriden as expected. + +=cut + +#------------------------------------------------------------------- + +=head2 WebGUI::Error::MethodNotFound + +Tried calling a method that doesn't exist. + +=head3 method + +The method called. + +=cut + +#------------------------------------------------------------------- + =head2 WebGUI::Error::InvalidObject Used when looking to make sure objects are passed in that you expect. ISA WebGUI::Error::InvalidParam. @@ -149,6 +147,10 @@ The type of object expected ("HASH", "ARRAY", "WebGUI::User", etc). The object type we got. +=cut + +#------------------------------------------------------------------- + =head2 WebGUI::Error::InvalidParam Used when an invalid parameter is passed into a subroutine. @@ -157,6 +159,10 @@ Used when an invalid parameter is passed into a subroutine. Used to return the bad parameter, if present. +=cut + +#------------------------------------------------------------------- + =head2 WebGUI::Error::ObjectNotFound Used when an object is trying to be retrieved, but does not exist. ISA WebGUI::Error. @@ -165,20 +171,164 @@ Used when an object is trying to be retrieved, but does not exist. ISA WebGUI::E The id of the object to be retrieved. -=head2 WebGUI::Error::MethodNotFound +=cut -Tried calling a method that doesn't exist. +#------------------------------------------------------------------- -=head3 method +=head2 WebGUI::Error::ObjectNotFound::Template -The method called. +Used when a template is trying to be retrieved, but does not exist. ISA WebGUI::Error::ObjectNotFound. -=head2 WebGUI::Error::OverrideMe +=head3 templateId | id | assetId -An interface was not overriden as expected. +The id of the object to be retrieved. =cut +#------------------------------------------------------------------- + +=head2 WebGUI::Error::InvalidFile + +Used when accessing a file and there are formatting or data problems found in the file. ISA WebGUI::Error. + +=head3 brokenFile + +The filename. + +=head3 brokenLine + +The line the error was found on. + +=cut + +#------------------------------------------------------------------- + +=head2 WebGUI::Error::Template + +Used when a template has parsing errors. ISA WebGUI::Error. + +=cut + +#------------------------------------------------------------------- + +=head2 WebGUI::Error::Connection + +Used when connecting to an external resource and it fails for some reason. ISA WebGUI::Error. + +=head3 resource + +The name or configuration or URL of the resource trying to be accessed. + +=cut + +use Exception::Class ( + + 'WebGUI::Error' => { + description => "A general error occured.", + }, + + + 'WebGUI::Error::OverrideMe' => { + isa => 'WebGUI::Error', + description => 'This method should be overridden by subclasses.', + }, + + + 'WebGUI::Error::MethodNotFound' => { + isa => 'WebGUI::Error', + description => q|Called a method that doesn't exist.|, + fields => 'method' + }, + + + 'WebGUI::Error::InvalidObject' => { + isa => 'WebGUI::Error::InvalidParam', + description => "Expected to get a reference to an object type that wasn't gotten.", + fields => ["expected","got"], + }, + + + 'WebGUI::Error::InvalidParam' => { + isa => 'WebGUI::Error', + description => "Expected to get a param we didn't get.", + fields => ["param"], + }, + + + 'WebGUI::Error::Compile' => { + isa => 'WebGUI::Error', + description => "Unable to compile the requested class", + fields => ["class", "cause"], + }, + + + 'WebGUI::Error::ObjectNotFound' => { + isa => 'WebGUI::Error', + description => "The object you were trying to retrieve does not exist.", + fields => ["id"], + }, + + + 'WebGUI::Error::ObjectNotFound::Template' => { + isa => 'WebGUI::Error', + description => "The template an asset was trying to retrieve does not exist.", + fields => [qw/templateId assetId/], + }, + + + 'WebGUI::Error::InvalidFile' => { + isa => 'WebGUI::Error', + description => "The file you have provided has errors.", + fields => [qw{ brokenFile brokenLine }], + }, + + + 'WebGUI::Error::Template' => { + isa => 'WebGUI::Error', + description => "A template has errors that prevent it from being processed.", + }, + + + 'WebGUI::Error::Connection' => { + isa => 'WebGUI::Error', + description => "Couldn't establish a connection.", + fields => [qw{ resource }], + }, + + 'WebGUI::Error::Fatal' => { + isa => 'WebGUI::Error', + description => "Fatal error that should be shown to all site visitors.", + }, + + 'WebGUI::Error::Database' => { + isa => 'WebGUI::Error', + description => 'A database error', + }, + + 'WebGUI::Error::NotInConfig' => { + isa => 'WebGUI::Error', + description => 'A module was requested that does not exist in the configuration file.', + fields => [qw{ module configKey }], + }, + + 'WebGUI::Error::RunTime' => { + isa => 'WebGUI::Error', + description => 'Perl runtime error.', + }, +); + +{ + package WebGUI::Error; + use overload '~~' => sub { + return $_[0]->isa($_[1]); + }, + 'eq' => sub { + return $_[0]->error eq $_[1]; + }, + 'ne' => sub { + return $_[0]->error ne $_[1]; + }; +} 1; diff --git a/lib/WebGUI/Exception/Shop.pm b/lib/WebGUI/Exception/Shop.pm index 464fffcf5..2b8f1d736 100644 --- a/lib/WebGUI/Exception/Shop.pm +++ b/lib/WebGUI/Exception/Shop.pm @@ -3,7 +3,7 @@ package WebGUI::Exception::Shop; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/FilePump/Admin.pm b/lib/WebGUI/FilePump/Admin.pm index eeed3c6ba..2755c9a0a 100644 --- a/lib/WebGUI/FilePump/Admin.pm +++ b/lib/WebGUI/FilePump/Admin.pm @@ -1,12 +1,10 @@ package WebGUI::FilePump::Admin; use strict; -use Tie::IxHash; use WebGUI::AdminConsole; use WebGUI::HTMLForm; use WebGUI::International; use WebGUI::Pluggable; -use WebGUI::Utility; use WebGUI::FilePump::Bundle; =head1 NAME @@ -88,7 +86,7 @@ sub www_addBundleSave { return $session->privilege->insufficient() unless canView($session); my $form = $session->form; my $bundleName = $form->get('bundleName'); - my $bundle = WebGUI::FilePump::Bundle->create($session, { + my $bundle = WebGUI::FilePump::Bundle->new($session, { bundleName => $bundleName, lastModified => time(), }); @@ -275,7 +273,7 @@ EOTABLE ; my $rows = ''; - my $files = $bundle->get($fileType); + my $files = $bundle->$fileType; foreach my $file (@{ $files }) { my $urlFrag = 'bundleId='.$bundleId.';fileType='.$type.';fileId='.$file->{fileId}; $rows .= sprintf '%s%s%s', @@ -344,20 +342,20 @@ sub www_manage { my $getABundle = WebGUI::FilePump::Bundle->getAllIterator($session,{ orderBy => 'bundleName' } ); my $notYet = $i18n->get('not yet'); while (my $bundle = $getABundle->()) { - my $lastModified = $bundle->get('lastModified'); - my $lastBuild = $bundle->get('lastBuild'); + my $lastModified = $bundle->lastModified; + my $lastBuild = $bundle->lastBuild; my $build = ''; if ($lastModified > $lastBuild) { $build = sprintf q| (%s)|, - $url->gateway($url->getRequestedUrl,'op=filePump;func=buildBundle;bundleId='.$bundle->getId), + $url->gateway($url->getRequestedUrl,'op=filePump;func=buildBundle;bundleId='.$bundle->bundleId), $i18n->get('build'); } $rows .= sprintf '%s%s%s%s', - $session->icon->delete('op=filePump;func=deleteBundle;bundleId='.$bundle->getId), - $url->gateway($url->getRequestedUrl,'op=filePump;func=editBundle;bundleId='.$bundle->getId), - $bundle->get('bundleName'), - $bundle->get('lastModified') ? $dt->epochToHuman($lastModified) : $notYet, - $bundle->get('lastBuild') ? $dt->epochToHuman($lastBuild).$build : $notYet, + $session->icon->delete('op=filePump;func=deleteBundle;bundleId='.$bundle->bundleId), + $url->gateway($url->getRequestedUrl,'op=filePump;func=editBundle;bundleId='.$bundle->bundleId), + $bundle->bundleName, + $bundle->lastModified ? $dt->epochToHuman($lastModified) : $notYet, + $bundle->lastBuild ? $dt->epochToHuman($lastBuild).$build : $notYet, ; } my $output = sprintf <get('bundle name'), $i18n->get('last modified'), $i18n->get('last build'), $rows; diff --git a/lib/WebGUI/FilePump/Bundle.pm b/lib/WebGUI/FilePump/Bundle.pm index 8df18aff9..760874775 100644 --- a/lib/WebGUI/FilePump/Bundle.pm +++ b/lib/WebGUI/FilePump/Bundle.pm @@ -1,9 +1,66 @@ package WebGUI::FilePump::Bundle; -use base qw/WebGUI::Crud WebGUI::JSONCollateral/; +use Moose; +use WebGUI::Definition::Crud; +extends 'WebGUI::Crud'; +define tableName => 'filePumpBundle'; +define tableKey => 'bundleId'; +has bundleId => ( + required => 1, + is => 'ro', +); +property bundleName => ( + label => 'bundleName', + fieldType => 'text', + builder => '_default_bundleName', + lazy => 1, +); +sub _default_bundleName { + my $session = shift->session; + my $i18n = WebGUI::International->new($session, 'FilePump'); + return $i18n->get('new bundle'); +} +property lastModified => ( + label => 'lastModified', + fieldType => 'integer', + default => 0, +); +property lastBuild => ( + label => 'lastBuild', + fieldType => 'integer', + default => 0, +); +property jsFiles => ( + label => 'jsFiles', + fieldType => 'textarea', + default => sub { [] }, + traits => ['Array', 'WebGUI::Definition::Meta::Property::Serialize',], + isa => 'WebGUI::Type::JSONArray', + coerce => 1, +); +property cssFiles => ( + label => 'cssFiles', + fieldType => 'textarea', + default => sub { [] }, + traits => ['Array', 'WebGUI::Definition::Meta::Property::Serialize',], + isa => 'WebGUI::Type::JSONArray', + coerce => 1, +); +property otherFiles => ( + label => 'otherFiles', + fieldType => 'textarea', + default => sub { [] }, + traits => ['Array', 'WebGUI::Definition::Meta::Property::Serialize',], + isa => 'WebGUI::Type::JSONArray', + coerce => 1, +); +with 'WebGUI::Role::Asset::JSONCollateral'; + use strict; +use WebGUI::Asset; use WebGUI::International; -use WebGUI::Utility; +use WebGUI::Exception; +use WebGUI::Macro; use URI; use Path::Class; use File::Basename; @@ -15,6 +72,45 @@ use Data::Dumper; #------------------------------------------------------------------- +=head2 properties + +=head3 tableName + +filePumpBundle + +=head3 tableKey + +bundleId + +=head3 sequenceKey + +None. Bundles have no sequence amongst themselves. + +=head3 properties + +=head4 bundleName + +The name of a bundle + +=head4 lastBuild + +The date the bundle was last built. This is used to generate the name of the bundled files +for this bundle. + +=head4 lastModified + +The date the bundle was last modified. With this, and the lastBuild date, you can determine +which bundles need to be rebuilt. + +=head4 jsFiles, cssFiles, otherFiles + +JSON blobs with files attached to the bundle. js = javascript, css = Cascading Style Sheets, other +means anything else. + +=cut + +#------------------------------------------------------------------- + =head2 addFile ( $type, $uri ) Adds a file of the requested type to the bundle. Returns 1 if the add was successful. @@ -35,12 +131,12 @@ it will return 0 and an error message. sub addFile { my ($self, $type, $uri) = @_; - return 0, 'Illegal type' unless WebGUI::Utility::isIn($type, 'JS', 'CSS', 'OTHER'); + return 0, 'Illegal type' unless $type ~~ ['JS', 'CSS', 'OTHER']; return 0, 'No URI' unless $uri; my $collateralType = $type eq 'JS' ? 'jsFiles' : $type eq 'CSS' ? 'cssFiles' : 'otherFiles'; - my $files = $self->get($collateralType); + my $files = $self->$collateralType; my $uriExists = $self->getJSONCollateralDataIndex($files, 'uri', $uri) != -1 ? 1 : 0; return 0, 'Duplicate URI' if $uriExists; @@ -89,13 +185,13 @@ the method returns 0, along with an error message. sub build { my ($self) = @_; my $newBuild = time(); - my $originalBuild = $self->get('lastBuild'); + my $originalBuild = $self->lastBuild; ##Whole lot of building my $error = undef; ##JavaScript first - my $jsFiles = $self->get('jsFiles'); + my $jsFiles = $self->jsFiles; my $concatenatedJS = ''; JSFILE: foreach my $jsFile (@{ $jsFiles }) { my $uri = $jsFile->{uri}; @@ -110,7 +206,7 @@ sub build { return (0, $error) if ($error); ##CSS next - my $cssFiles = $self->get('cssFiles'); + my $cssFiles = $self->cssFiles; my $concatenatedCSS = ''; CSSFILE: foreach my $cssFile (@{ $cssFiles }) { my $uri = $cssFile->{uri}; @@ -136,7 +232,7 @@ sub build { } ##Copy files over - my $otherFiles = $self->get('otherFiles'); + my $otherFiles = $self->otherFiles; OTHERFILE: foreach my $file (@{ $otherFiles }) { my $uri = $file->{uri}; my $results = $self->fetch($uri); @@ -285,84 +381,6 @@ sub _buildFile { return 0; } -#------------------------------------------------------------------- - -=head2 crud_definition - -WebGUI::Crud definition for this class. - -=head3 tableName - -filePumpBundle - -=head3 tableKey - -bundleId - -=head3 sequenceKey - -None. Bundles have no sequence amongst themselves. - -=head3 properties - -=head4 bundleName - -The name of a bundle - -=head4 lastBuild - -The date the bundle was last built. This is used to generate the name of the bundled files -for this bundle. - -=head4 lastModified - -The date the bundle was last modified. With this, and the lastBuild date, you can determine -which bundles need to be rebuilt. - -=head4 jsFiles, cssFiles, otherFiles - -JSON blobs with files attached to the bundle. js = javascript, css = Cascading Style Sheets, other -means anything else. - -=cut - -sub crud_definition { - my ($class, $session) = @_; - my $definition = $class->SUPER::crud_definition($session); - my $i18n = WebGUI::International->new($session, 'FilePump'); - $definition->{tableName} = 'filePumpBundle'; - $definition->{tableKey} = 'bundleId'; - $definition->{sequenceKey} = ''; - my $properties = $definition->{properties}; - $properties->{bundleName} = { - fieldType => 'text', - defaultValue => $i18n->get('new bundle'), - }; - $properties->{lastModified} = { - fieldType => 'integer', - defaultValue => 0, - }; - $properties->{lastBuild} = { - fieldType => 'integer', - defaultValue => 0, - }; - $properties->{jsFiles} = { - fieldType => 'textarea', - defaultValue => [], - serialize => 1, - }; - $properties->{cssFiles} = { - fieldType => 'textarea', - defaultValue => [], - serialize => 1, - }; - $properties->{otherFiles} = { - fieldType => 'textarea', - defaultValue => [], - serialize => 1, - }; - return $definition; -} #------------------------------------------------------------------- @@ -409,7 +427,7 @@ types of files. sub deleteFiles { my ($self, $type) = @_; - return 0, 'Illegal type' unless WebGUI::Utility::isIn($type, 'JS', 'CSS', 'OTHER'); + return 0, 'Illegal type' unless $type ~~ ['JS', 'CSS', 'OTHER']; my $collateralType = $type eq 'JS' ? 'jsFiles' : $type eq 'CSS' ? 'cssFiles' : 'otherFiles'; @@ -437,7 +455,7 @@ The unique collateral GUID to delete from the bundle. sub deleteFile { my ($self, $type, $fileId) = @_; - return 0, 'Illegal type' unless WebGUI::Utility::isIn($type, 'JS', 'CSS', 'OTHER'); + return 0, 'Illegal type' unless $type ~~ ['JS', 'CSS', 'OTHER']; return 0, 'No fileId' unless $fileId; my $collateralType = $type eq 'JS' ? 'jsFiles' : $type eq 'CSS' ? 'cssFiles' @@ -508,18 +526,19 @@ sub fetchAsset { my $url = $uri->opaque; $url =~ s{^/+}{}; - my $asset = WebGUI::Asset->newByUrl($self->session, $url); - return {} unless $asset; + my $asset = eval {WebGUI::Asset->newByUrl($self->session, $url);}; + return {} if Exception::Class->caught(); ##Check for a snippet, or snippet subclass? my $guts = { - lastModified => $asset->get('lastModified'), + lastModified => $asset->lastModified, content => '', }; if ($asset->isa('WebGUI::Asset::Snippet')) { - $guts->{content} = $asset->view(1); + $guts->{content} = $asset->snippet; + WebGUI::Macro::process($self->session, \( $guts->{content} ) ); } elsif ($asset->isa('WebGUI::Asset::File')) { - $guts->{content} = $asset->getStorageLocation->getFileContentsAsScalar($asset->get('filename')); + $guts->{content} = $asset->getStorageLocation->getFileContentsAsScalar($asset->filename); } return $guts; } @@ -637,7 +656,7 @@ Returns a urlized version of the bundle name, safe for URLs and filenames. sub bundleUrl { my ($self) = @_; - return $self->session->url->urlize($self->get('bundleName')); + return $self->session->url->urlize($self->bundleName); } #------------------------------------------------------------------- @@ -655,7 +674,7 @@ Another time stamp to use instead of the lastModified timestamp. sub getPathClassDir { my ($self, $lastBuild) = @_; - $lastBuild ||= $self->get('lastBuild'); + $lastBuild ||= $self->lastBuild; return Path::Class::Dir->new( $self->session->config->get('uploadsPath'), 'filepump', @@ -710,7 +729,7 @@ The unique collateral GUID to move in the bundle. sub moveFileDown { my ($self, $type, $fileId) = @_; - return 0, 'Illegal type' unless WebGUI::Utility::isIn($type, 'JS', 'CSS', 'OTHER'); + return 0, 'Illegal type' unless $type ~~ ['JS', 'CSS', 'OTHER']; return 0, 'No fileId' unless $fileId; my $collateralType = $type eq 'JS' ? 'jsFiles' : $type eq 'CSS' ? 'cssFiles' @@ -744,7 +763,7 @@ The unique collateral GUID to move in the bundle. sub moveFileUp { my ($self, $type, $fileId) = @_; - return 0, 'Illegal type' unless WebGUI::Utility::isIn($type, 'JS', 'CSS', 'OTHER'); + return 0, 'Illegal type' unless $type ~~ ['JS', 'CSS', 'OTHER']; return 0, 'No fileId' unless $fileId; my $collateralType = $type eq 'JS' ? 'jsFiles' : $type eq 'CSS' ? 'cssFiles' diff --git a/lib/WebGUI/Fork.pm b/lib/WebGUI/Fork.pm index 0f670c51b..286ad60cd 100644 --- a/lib/WebGUI/Fork.pm +++ b/lib/WebGUI/Fork.pm @@ -27,6 +27,7 @@ status of. sub doWork { my ($process, $data) = @_; + # Update our status $process->update("Starting..."); ... $process->update("About half way done..."); @@ -42,10 +43,11 @@ status of. ); # See WebGUI::Operation::Fork my $pairs = $process->contentPairs('DoWork'); - $session->http->setRedirect($self->getUrl($pairs)); + $session->response->setRedirect($self->getUrl($pairs)); return 'redirect'; } + # Display a page with the status of the fork package WebGUI::Operation::Fork::DoWork; sub handler { @@ -56,11 +58,24 @@ status of. # or better yet, an ajaxy page that polls. } + # For ways of displaying status from a fork, see + # WebGUI::Fork::ProgressTree + # WebGUI::Fork::ProgressBar + +=head1 SEE ALSO + +=over 4 + +=item L + +=item L + +=back =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -278,6 +293,7 @@ sub finish { $props{latch} = 0; } $props{endTime} = time(); + $props{redirect} = $self->{redirect}; $self->set( \%props ); } @@ -514,6 +530,20 @@ sub setGroup { #----------------------------------------------------------------- +=head2 setRedirect($url) + +Allows a redirect to be set for the process after the initial fork. This happens +in the case when a file is to be downloaded after the fork finishes. + +=cut + +sub setRedirect { + my ( $self, $url ) = @_; + $self->{redirect} = $url; +} + +#----------------------------------------------------------------- + =head2 request ($module, $subname, $data) Internal method. Generates a hashref suitable for passing to runRequest. @@ -525,8 +555,7 @@ sub request { my $session = $self->session; my $config = $session->config; return { - webguiRoot => $config->getWebguiRoot, - configFile => $config->getFilename, + configFile => $config->pathToFile, sessionId => $session->getId, module => $module, subname => $subname, @@ -559,8 +588,8 @@ Internal class method. Expects a hash of arguments describing what to run. sub runRequest { my ( $class, $args ) = @_; - my ( $root, $config, $sid ) = @{$args}{qw(webguiRoot configFile sessionId)}; - my $session = WebGUI::Session->open( $root, $config, undef, undef, $sid ); + my ( $config, $sid ) = @{$args}{qw(configFile sessionId)}; + my $session = WebGUI::Session->open( $config, undef, $sid ); my $id = $args->{id}; my $self = $class->new( $session, $id ); $self->set( { startTime => time } ); @@ -592,7 +621,7 @@ sub sendRequestToMaster { }; return 1 unless $@; undef $pipe; - $self->session->log->error('Problems talking to master daemon process. Please restart the web server.'); + $self->session->log->error("Problems talking to master daemon process: $@. Please restart the web server."); return 0; } diff --git a/lib/WebGUI/Fork/ProgressBar.pm b/lib/WebGUI/Fork/ProgressBar.pm index 844315cd3..0d9c0d2ba 100644 --- a/lib/WebGUI/Fork/ProgressBar.pm +++ b/lib/WebGUI/Fork/ProgressBar.pm @@ -3,7 +3,7 @@ package WebGUI::Fork::ProgressBar; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -26,6 +26,32 @@ WebGUI::Fork::ProgressBar Renders an admin console page that polls ::Status to draw a simple progress bar along with some kind of message. +=head1 SYNOPSIS + + # Make our fork routine update our status + sub doInFork { + my ( $process, $args ) = @_; + my $status = { + message => 'Starting up...', # A message to the user + total => scalar @{$args->{stuffToDo}}, # How many tasks we have to do + finished => 0, # How many tasks we've done + }; + $process->update( sub { JSON->new->encode( $status ) } ); + # Using a subref causes Fork to compute JSON only when needed + + for my $thing ( @{$args->{stuffToDo}} ) { + # Do The work + # ... + + # Update status + $status->{finished}++; + $process->update( sub { JSON->new->encode( $status ) } ); + } + + # All done! + $process->finish; + } + =head1 SUBROUTINES These subroutines are available from this package: @@ -35,6 +61,23 @@ These subroutines are available from this package: use Template; use HTML::Entities; use JSON; +use URI; + +my $blank = <<'TEMPLATE'; + + + [% title %] + [% FOREACH sheet IN stylesheets %] + + [% END %] + [% FOREACH script IN scripts %] + + [% END %] + + + [% content %] + +TEMPLATE my $template = <<'TEMPLATE';
    [% i18n('WebGUI', 'Loading...') %]
    @@ -55,7 +98,7 @@ my $template = <<'TEMPLATE'; url : params.statusUrl, draw : function (data) { var status = YAHOO.lang.JSON.parse(data.status); - bar.update(status.finished, status.total); + bar.update(status.current, status.total); document.getElementById('message').innerHTML = status.message; document.getElementById('elapsed').innerHTML = data.elapsed; }, @@ -63,8 +106,8 @@ my $template = <<'TEMPLATE'; document.getElementById('loading').style.display = 'none'; document.getElementById('ui').style.display = 'block'; }, - finish : function() { - YAHOO.WebGUI.Fork.redirect(params.redirect); + finish : function(data) { + YAHOO.WebGUI.Fork.redirect(data.redirect || params.redirect); }, error : function (msg) { alert(msg); @@ -87,39 +130,51 @@ sub handler { renderBar( shift, $template ) } #------------------------------------------------------------------- -=head2 renderBar ( process, template ) +=head2 renderBar ( process, template, extras ) Renders $template, passing a "params" variable to it that is JSON of a statusUrl to poll and a page to redirect to and an i18n function. Includes WebGUI.Fork.redirect, poll, and ProgressBar js and CSS (as well as all their YUI dependancies), and puts the whole template inside an adminConsole rendered -based off some form parameters. +based off some form parameters. Extras is a hashref, optionally containing two +keys (css and js) which will be added to the page. =cut sub renderBar { - my ( $process, $template ) = @_; + my ( $process, $template, $extras ) = @_; my $session = $process->session; my $url = $session->url; - my $form = $session->form; my $style = $session->style; + my $f = $session->form->paramsHashRef; my $tt = Template->new; - my %vars = ( + my $dialog = delete $f->{dialog}; + + my %params = ( + statusUrl => $url->page( $process->contentPairs('Status') ), + ); + if ($dialog) { + $params{message} = $f->{message}; + } + else { + $params{redirect} = $f->{proceed}; + } + + my %vars = ( i18n => sub { my ($namespace, $key) = @_; return WebGUI::International->new($session, $namespace)->get($key); }, - params => JSON::encode_json( { - statusUrl => $url->page( $process->contentPairs('Status') ), - redirect => scalar $form->get('proceed'), - } - ), + params => JSON::encode_json(\%params), ); $tt->process( \$template, \%vars, \my $content ) or die $tt->error; - $style->setLink( $url->extras("Fork/ProgressBar.css"), { rel => 'stylesheet' } ); - $style->setScript( $url->extras("$_.js") ) - for ( ( + my @sheets = ( + $url->extras("Fork/ProgressBar.css"), + @{ $extras->{css} || []} + ); + my @scripts = ( ( + map { $url->extras("$_.js") } ( map {"yui/build/$_"} qw( yahoo/yahoo-min @@ -132,13 +187,44 @@ sub renderBar { 'Fork/ProgressBar', 'Fork/poll', 'Fork/redirect' + ), + @{ $extras->{js} || []} + ); + my $link = URI->new($url->page); + my $title = encode_entities( $f->{title} ); + my $label = + WebGUI::International->new( $session, 'Fork_ProgressBar' ) + ->get('link to this page'); + + if ($dialog) { + $link->query_form($f); + my %vars = ( + content => $content, + scripts => \@scripts, + stylesheets => \@sheets, + title => $title, + bookmark => { + url => $link, + label => $label, + } ); - ##If the user does not have admin mode turned on, then render the content in the user function style. - ##Otherwise, use the AdminConsole. - if ($session->var->isAdminOn) { - return WebGUI::AdminConsole->new($session, $form->get('icon'))->render($content, encode_entities( $form->get('title') )); + $tt->process( \$blank, \%vars, \my $styled ) or die $tt->error; + return $styled; + } + else { + $style->setLink($_, { rel => 'stylesheet' }) for @sheets; + $style->setScript($_) for @scripts; + if ( $session->var->isAdminOn ) { + my $console = WebGUI::AdminConsole->new( $session, $f->{icon} ); + my $style = $session->style; + $link->query_form($f); + $console->addSubmenuItem( $link->as_string, $label ); + return $console->render( $content, $title ); + } + else { + return $session->style->userStyle( $content ); + } } - return $session->style->userStyle($content); } ## end sub renderBar 1; diff --git a/lib/WebGUI/Fork/ProgressTree.pm b/lib/WebGUI/Fork/ProgressTree.pm index 99349c73a..1cb638191 100644 --- a/lib/WebGUI/Fork/ProgressTree.pm +++ b/lib/WebGUI/Fork/ProgressTree.pm @@ -3,7 +3,7 @@ package WebGUI::Fork::ProgressTree; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -26,6 +26,65 @@ WebGUI::Fork::ProgressTree Renders an admin console page that polls ::Status to draw a friendly graphical representation of how progress on a tree of assets is coming along. +=head1 SYNOPSIS + + package MyClass; + + # User has requested we do some work + sub www_doWork { + my ( $self ) = @_; + + # Get the assets that need work + my @assetIds = (); + + # Start the fork with our "doWork" sub + my $process = WebGUI::Fork->start( + $self->session, 'MyClass', 'doWork', + { assetIds => \@assetIds }, + ); + + # Get the URL for a status page + my $statusUrl = $process->contentPairs( 'ProgressTree', { + title => 'Doing Work', + icon => 'assets', + proceed => '/home?message=Work%20Done', + } ); + + # Go to the status page + $self->session->response->location( $statusUrl ); + return 'redirect'; + } + + # Do the work of our WebGUI::Fork + sub doWork { + my ( $process, $args ) = @_; + # All the Assets we need to work on + my $assetIds = $args->{ assetIds }; + + # Build a tree and update process status + my $tree = WebGUI::ProgressTree->new( $process->session, $assetIds ); + $process->update( sub { $tree->json } ); + + # Do the actual work + for my $id ( @$assetIds ) { + # ... Do something + + # Update our tree and process again + $tree->update( $id, "Done!" ); + $process->update( sub { $tree->json } ); + } + } + +=head1 SEE ALSO + +=over 4 + +=item WebGUI::ProgressTree + +Stores the data for the asset tree we are working on + +=back + =head1 SUBROUTINES These subroutines are available from this package: @@ -114,7 +173,7 @@ my $template = <<'TEMPLATE'; document.getElementById('ui').style.display = 'block'; }, finish : function () { - YAHOO.WebGUI.Fork.redirect(params.redirect); + YAHOO.WebGUI.Fork.redirect(params); }, error : function (msg) { alert(msg) @@ -125,15 +184,6 @@ my $template = <<'TEMPLATE'; TEMPLATE -my $stylesheet = <<'STYLESHEET'; - -STYLESHEET - #------------------------------------------------------------------- =head2 handler ( process ) @@ -145,11 +195,12 @@ See WebGUI::Operation::Fork. sub handler { my $process = shift; my $session = $process->session; - my $style = $session->style; my $url = $session->url; - $style->setRawHeadTags($stylesheet); - $style->setScript($url->extras('underscore/underscore-min.js')); - WebGUI::Fork::ProgressBar::renderBar($process, $template); + WebGUI::Fork::ProgressBar::renderBar($process, $template, { + css => [ $url->extras('Fork/ProgressTree.css') ], + js => [ $url->extras('underscore/underscore-min.js') ], + } + ); } 1; diff --git a/lib/WebGUI/Fork/Status.pm b/lib/WebGUI/Fork/Status.pm index 06c2ebd3b..943bf4233 100644 --- a/lib/WebGUI/Fork/Status.pm +++ b/lib/WebGUI/Fork/Status.pm @@ -5,7 +5,7 @@ use JSON; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -67,7 +67,7 @@ See the synopsis for what kind of response this generates. sub handler { my $process = shift; my $status = $process->getStatus; - my ( $finished, $startTime, $endTime, $error ) = $process->get( 'finished', 'startTime', 'endTime', 'error' ); + my ( $finished, $startTime, $endTime, $error, $redirect ) = $process->get( qw/finished startTime endTime error redirect/ ); $endTime = time() unless $finished; @@ -76,8 +76,9 @@ sub handler { elapsed => ( $endTime - $startTime ), finished => ( $finished ? \1 : \0 ), ); - $status{error} = $error if $finished; - $process->session->http->setMimeType('text/plain'); + $status{error} = $error if $finished; + $status{redirect} = $redirect if $finished; + $process->session->response->content_type('text/plain'); JSON::encode_json( \%status ); } ## end sub handler diff --git a/lib/WebGUI/Form.pm b/lib/WebGUI/Form.pm index c6c336ec1..792e8a184 100644 --- a/lib/WebGUI/Form.pm +++ b/lib/WebGUI/Form.pm @@ -3,7 +3,7 @@ package WebGUI::Form; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -17,13 +17,9 @@ package WebGUI::Form; use strict; use Carp qw( croak ); use Scalar::Util qw( blessed ); -use Tie::IxHash; -use WebGUI::Asset; -use WebGUI::Asset::RichEdit; -use WebGUI::Asset::Template; use WebGUI::International; use WebGUI::Pluggable; -use WebGUI::Utility; +use WebGUI::Deprecate; =head1 NAME @@ -31,6 +27,10 @@ Package WebGUI::Form =head1 DESCRIPTION +NOTE: This module is deprecated. You should use WebGUI::FormBuilder to create +and process forms built with WebGUI::Form::Control objects (all of the +WebGUI::Form::* modules). + This is a convenience package which provides a simple interface to use all of the form controls without having to load each one seperately, create objects, and call methods. =head1 SYNOPSIS @@ -63,14 +63,16 @@ Dynamically creates functions on the fly for all the different form control type sub AUTOLOAD { our $AUTOLOAD; return if $AUTOLOAD =~ m/::DESTROY$/; - my $name = ucfirst((split /::/, $AUTOLOAD)[-1]); + my $method = (split /::/, $AUTOLOAD)[-1]; + my $name = ucfirst($method); my $session = shift; my @params = @_; my $control = eval { WebGUI::Pluggable::instanciate("WebGUI::Form::".$name, "new", [ $session, @params ]) }; if ($@) { - $session->errorHandler->error($@); + $session->log->error($@); return undef; } + derp "Using WebGUI::Form::$method is deprecated. Use WebGUI::Form::$name->new() and toHtml() instead."; return $control->toHtml; } @@ -142,13 +144,15 @@ sub formHeader { my $enctype = (exists $params->{enctype} && $params->{enctype} ne "") ? $params->{enctype} : "multipart/form-data"; # Fix a query string in the action URL - my $hidden = csrfToken($session); + use WebGUI::Form::CsrfToken; + my $hidden = WebGUI::Form::CsrfToken->new($session)->toHtml; + use WebGUI::Form::Hidden; if ($action =~ /\?/) { ($action, my $query) = split /\?/, $action, 2; my @params = split /[&;]/, $query; foreach my $param ( @params ) { my ($name, $value) = split /=/, $param; - $hidden .= hidden( $session, { name => $name, value => $value } ); + $hidden .= WebGUI::Form::Hidden->new( $session, { name => $name, value => $value } )->toHtml; } } diff --git a/lib/WebGUI/Form/AdSpace.pm b/lib/WebGUI/Form/AdSpace.pm index 472e0ae91..c9022c401 100644 --- a/lib/WebGUI/Form/AdSpace.pm +++ b/lib/WebGUI/Form/AdSpace.pm @@ -3,7 +3,7 @@ package WebGUI::Form::AdSpace; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Form/Asset.pm b/lib/WebGUI/Form/Asset.pm index 4784e8a65..2fd021cf7 100644 --- a/lib/WebGUI/Form/Asset.pm +++ b/lib/WebGUI/Form/Asset.pm @@ -3,7 +3,7 @@ package WebGUI::Form::Asset; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -118,8 +118,8 @@ Formats as a link. sub getValueAsHtml { my $self = shift; -# my $asset = WebGUI::Asset->newByDynamicClass($self->session,$self->getDefaultValue); - my $asset = WebGUI::Asset->newByDynamicClass($self->session,$self->getOriginalValue); +# my $asset = WebGUI::Asset->newById($self->session,$self->getDefaultValue); + my $asset = WebGUI::Asset->newById($self->session,$self->getOriginalValue); if (defined $asset) { return ''.$asset->getTitle.''; } @@ -149,7 +149,7 @@ Renders an asset selector. sub toHtml { my $self = shift; - my $asset = WebGUI::Asset->newByDynamicClass($self->session, $self->getOriginalValue) || WebGUI::Asset->getRoot($self->session); + my $asset = $self->getOriginalValue ? WebGUI::Asset->newById($self->session, $self->getOriginalValue) : WebGUI::Asset->getRoot($self->session); my $url = $asset->getUrl("op=formHelper;sub=assetTree;class=Asset;formId=".$self->get('id')); $url .= ";classLimiter=".$self->get("class") if ($self->get("class")); return WebGUI::Form::Hidden->new($self->session, @@ -181,7 +181,7 @@ form variable C. A crumb trail is provided for navigation. sub www_assetTree { my $session = shift; - $session->http->setCacheControl("none"); + $session->response->setCacheControl("none"); my $base = WebGUI::Asset->newByUrl($session) || WebGUI::Asset->getRoot($session); my @crumb; my $ancestorIter = $base->getLineageIterator(["self","ancestors"]); diff --git a/lib/WebGUI/Form/AssetReportQuery.pm b/lib/WebGUI/Form/AssetReportQuery.pm index fe2703efc..0c36e6d60 100644 --- a/lib/WebGUI/Form/AssetReportQuery.pm +++ b/lib/WebGUI/Form/AssetReportQuery.pm @@ -4,7 +4,6 @@ use strict; use base 'WebGUI::Form::Control'; use JSON; use WebGUI::International; -use WebGUI::Utility; =head1 NAME @@ -178,7 +177,7 @@ Sets the JS for this form plugin sub headTags { my $self = shift; my $session = $self->session; - $session->style->setScript($session->url->extras("yui-webgui/build/form/assetReportQuery.js"),{ type=>"text/javascript" }); + $session->style->setScript($session->url->extras("yui-webgui/build/form/assetReportQuery.js")); } #------------------------------------------------------------------- @@ -247,11 +246,16 @@ sub toHtml { foreach my $property (keys %{$properties}) { my $key = $tableName.".".$property; $fields{$key} = qq{$property ($tableName)}; - } + } } %fields = (%asset,%fields); - %fields = WebGUI::Utility::sortHash(%fields); + %fields = + map { @$_ } + sort { $a->[1] cmp $b->[1] } + map { [ $_, $fields{$_} ] } + keys %fields; + $json->{$class} = \%fields; } @@ -261,6 +265,7 @@ sub toHtml { $style->setRawHeadTags(qq||); my $jsonData = $self->get("value") || q|{ "isNew" : "true" }|; $style->setRawHeadTags(qq||); + $self->headTags(); #Decode JSON data for filling in some of the fields my $jsonDataHash = JSON->new->decode($jsonData); diff --git a/lib/WebGUI/Form/Attachments.pm b/lib/WebGUI/Form/Attachments.pm index 6cb31d0b1..a7af68f3e 100644 --- a/lib/WebGUI/Form/Attachments.pm +++ b/lib/WebGUI/Form/Attachments.pm @@ -3,7 +3,7 @@ package WebGUI::Form::Attachments; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -174,7 +174,7 @@ sub www_delete { my $assetId = $session->form->param("assetId"); my @assetIds = $session->form->param("attachments"); if ($assetId ne "") { - my $asset = WebGUI::Asset->newByDynamicClass($session, $assetId); + my $asset = WebGUI::Asset->newById($session, $assetId); if (defined $asset) { if ($asset->canEdit) { my $version = WebGUI::VersionTag->new($session, $asset->get("tagId")); @@ -213,11 +213,9 @@ sub www_show { else { @assetIds = $session->form->param("attachments"); } - $session->http->setCacheControl("none"); - $style->setScript($url->extras("/AttachmentsControl/AttachmentsControl.js"), - {type=>"text/javascript"}); - $style->setLink($url->extras("/AttachmentsControl/AttachmentsControl.css"), - {type=>"text/css", rel=>"stylesheet"}); + $session->response->setCacheControl("none"); + $style->setScript($url->extras("/AttachmentsControl/AttachmentsControl.js")); + $style->setCss($url->extras("/AttachmentsControl/AttachmentsControl.css")); my $uploadControl = ''; my $i18n = WebGUI::International->new($session); my $maxFiles = $form->param('maxAttachments') - scalar(@assetIds) ; @@ -246,7 +244,7 @@ sub www_show { my $attachments = ''; my $attachmentsList = "attachments=".join(";attachments=", @assetIds) if (scalar(@assetIds)); foreach my $assetId (@assetIds) { - my $asset = WebGUI::Asset->newByDynamicClass($session, $assetId); + my $asset = WebGUI::Asset->newById($session, $assetId); if (defined $asset) { $attachments .= '
    param("maxAttachments") diff --git a/lib/WebGUI/Form/Button.pm b/lib/WebGUI/Form/Button.pm index 9d9b66597..b22519a9c 100644 --- a/lib/WebGUI/Form/Button.pm +++ b/lib/WebGUI/Form/Button.pm @@ -3,7 +3,7 @@ package WebGUI::Form::Button; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -61,6 +61,9 @@ sub definition { defaultValue=>{ defaultValue=>$i18n->get(62) }, + type => { + defaultValue => 'button', + }, }); return $class->SUPER::definition($session, $definition); } @@ -89,10 +92,16 @@ Renders a button. sub toHtml { my $self = shift; my $value = $self->fixQuotes($self->getOriginalValue); - my $html = 'get('type') . '" '; $html .= 'name="'.$self->get("name").'" ' if ($self->get("name")); $html .= 'id="'.$self->get('id').'" ' unless ($self->get('id') eq "_formId"); $html .= 'value="'.$value.'" '.$self->get("extras").' />'; + my ( $style, $url ) = $self->session->quick(qw( style url )); + $style->setCss($url->extras('yui/build/button/assets/skins/sam/button.css')); + $style->setScript($url->extras('yui/build/yahoo-dom-event/yahoo-dom-event.js')); + $style->setScript($url->extras('yui/build/element/element-min.js')); + $style->setScript($url->extras('yui/build/button/button-min.js')); + $html .= ''; return $html; } diff --git a/lib/WebGUI/Form/ButtonGroup.pm b/lib/WebGUI/Form/ButtonGroup.pm new file mode 100644 index 000000000..f0d2d55d2 --- /dev/null +++ b/lib/WebGUI/Form/ButtonGroup.pm @@ -0,0 +1,106 @@ +package WebGUI::Form::ButtonGroup; + +=head1 LEGAL + + ------------------------------------------------------------------- + WebGUI is Copyright 2001-2012 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 + ------------------------------------------------------------------- + +=cut + +use strict; +use base 'WebGUI::Form::Control'; +use WebGUI::International; +use WebGUI::Pluggable; + +=head1 NAME + +Package WebGUI::Form::ButtonGroup + +=head1 DESCRIPTION + +Creates a series of buttons + +=head1 SEE ALSO + +This is a subclass of WebGUI::Form::Control. + +=head1 METHODS + +The following methods are specifically available from this class. Check the superclass for additional methods. + +=cut + +#------------------------------------------------------------------- + +=head2 definition ( [ additionalTerms ] ) + +See the super class for additional details. + +=head3 additionalTerms + +The following additional parameters have been added via this sub class. + +=head4 buttons + +The buttons in this button group + +=cut + +sub definition { + my $class = shift; + my $session = shift; + my $definition = shift || []; + push @{$definition}, { + buttons => { + defaultValue=>[], + }, + }; + return $class->SUPER::definition($session, $definition); +} + +#------------------------------------------------------------------- + +=head2 addButton ( type, params ) + +Add a new button to the button group. + +=cut + +sub addButton { + my ( $self, $type, $params ) = @_; + my $buttons = $self->get('buttons'); + + my $button = WebGUI::Pluggable::instanciate("WebGUI::Form::".ucfirst($type), "new", [$self->session, $params]); + + push @{$buttons}, $button; + $self->set('buttons', $buttons); + return $button; +} + +#------------------------------------------------------------------- + +=head2 toHtml ( ) + +Renders a button group + +=cut + +sub toHtml { + my $self = shift; + my $html = ''; + + for my $button ( @{ $self->get('buttons') } ) { + $html .= $button->toHtml; # Inline as toHtml + } + return $html; +} + +1; +#vim:ft=perl diff --git a/lib/WebGUI/Form/Captcha.pm b/lib/WebGUI/Form/Captcha.pm index a2a972640..2008a9ada 100644 --- a/lib/WebGUI/Form/Captcha.pm +++ b/lib/WebGUI/Form/Captcha.pm @@ -3,7 +3,7 @@ package WebGUI::Form::Captcha; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -111,7 +111,7 @@ sub getValue { my $ua = LWP::UserAgent->new; my $res = $ua->post('http://www.google.com/recaptcha/api/verify', { privatekey => $privKey, - remoteip => $self->session->env->getIp, + remoteip => $self->session->request->env->{REMOTE_ADDR}, challenge => $challenge, response => $response, }); @@ -127,7 +127,7 @@ sub getValue { my $challenge = $self->session->scratch->get("captcha_".$self->get("name")); $self->session->scratch->delete("captcha_".$self->get("name")); my $passed = lc $value eq lc $challenge; - $self->session->errorHandler->info( + $self->session->log->info( "Checking CAPTCHA '" . $self->get("name") . "': " . ( $passed ? "PASSED!" : "FAILED!" ) . " Got: '" . $value . "', Wanted: '" . $challenge . "'" ); @@ -158,10 +158,9 @@ sub toHtml { my $self = shift; if ($self->session->setting->get('useRecaptcha')) { - my $env = $self->session->env; my $pubKey = $self->session->setting->get('recaptchaPublicKey'); my $server = "http://www.google.com/recaptcha/api"; - if ($env->sslRequest) { + if ($self->session->request->secure) { $server = "https://www.google.com/recaptcha/api"; } return diff --git a/lib/WebGUI/Form/CheckList.pm b/lib/WebGUI/Form/CheckList.pm index 83fe6ee08..2c1403766 100644 --- a/lib/WebGUI/Form/CheckList.pm +++ b/lib/WebGUI/Form/CheckList.pm @@ -3,7 +3,7 @@ package WebGUI::Form::CheckList; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -162,7 +162,7 @@ sub toHtml { $self->headTags; my $session = $self->session; my $output = '
    '; - $output .= WebGUI::Form::Hidden($session, { name => $self->privateName('isIn'), value => 1, }); + $output .= WebGUI::Form::Hidden->new($session, { name => $self->privateName('isIn'), value => 1, })->toHtml; my $alignment = $self->alignmentSeparator; # Add the select all button diff --git a/lib/WebGUI/Form/Checkbox.pm b/lib/WebGUI/Form/Checkbox.pm index f35a76a4a..27eafccb0 100644 --- a/lib/WebGUI/Form/Checkbox.pm +++ b/lib/WebGUI/Form/Checkbox.pm @@ -3,7 +3,7 @@ package WebGUI::Form::Checkbox; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Form/ClassName.pm b/lib/WebGUI/Form/ClassName.pm index c8cb6792e..17963e34f 100644 --- a/lib/WebGUI/Form/ClassName.pm +++ b/lib/WebGUI/Form/ClassName.pm @@ -3,7 +3,7 @@ package WebGUI::Form::ClassName; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Form/Codearea.pm b/lib/WebGUI/Form/Codearea.pm index c191363f8..c24719b0f 100644 --- a/lib/WebGUI/Form/Codearea.pm +++ b/lib/WebGUI/Form/Codearea.pm @@ -3,7 +3,7 @@ package WebGUI::Form::Codearea; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -72,10 +72,10 @@ sub definition { my $definition = shift || []; push(@{$definition}, { height=>{ - defaultValue=> 450 + defaultValue=> '200px' }, width=>{ - defaultValue=> 550 + defaultValue=> '100%' }, style=>{ defaultValue => undef, diff --git a/lib/WebGUI/Form/Color.pm b/lib/WebGUI/Form/Color.pm index 84df9fc3d..366952295 100644 --- a/lib/WebGUI/Form/Color.pm +++ b/lib/WebGUI/Form/Color.pm @@ -3,7 +3,7 @@ package WebGUI::Form::Color; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -92,18 +92,18 @@ sub headTags { my $self = shift; my $url = $self->session->url; my $style = $self->session->style; - $style->setLink($url->extras('/yui/build/container/assets/skins/sam/container.css'),{ type=>'text/css', rel=>"stylesheet" }); - $style->setLink($url->extras('/yui/build/colorpicker/assets/skins/sam/colorpicker.css'),{ type=>'text/css', rel=>"stylesheet" }); - $style->setScript($url->extras('/yui/build/yahoo/yahoo-min.js'),{ type=>'text/javascript' }); - $style->setScript($url->extras('/yui/build/event/event-min.js'),{ type=>'text/javascript' }); - $style->setScript($url->extras('/yui/build/dom/dom-min.js'),{ type=>'text/javascript' }); - $style->setScript($url->extras('/yui/build/dragdrop/dragdrop-min.js'),{ type=>'text/javascript' }); - $style->setScript($url->extras('/yui/build/utilities/utilities.js'),{ type=>'text/javascript' }); - $style->setScript($url->extras('/yui/build/container/container-min.js'),{ type=>'text/javascript' }); - $style->setScript($url->extras('/yui/build/slider/slider-min.js'),{ type=>'text/javascript' }); - $style->setScript($url->extras('/yui/build/colorpicker/colorpicker-min.js'),{ type=>'text/javascript' }); - $style->setLink($url->extras('/colorpicker/colorpicker.css'),{ type=>'text/css', rel=>"stylesheet" }); - $style->setScript($url->extras('/colorpicker/colorpicker.js'),{ type=>'text/javascript' }); + $style->setCss($url->extras('/yui/build/container/assets/skins/sam/container.css')); + $style->setCss($url->extras('/yui/build/colorpicker/assets/skins/sam/colorpicker.css')); + $style->setScript($url->extras('/yui/build/yahoo/yahoo-min.js')); + $style->setScript($url->extras('/yui/build/event/event-min.js')); + $style->setScript($url->extras('/yui/build/dom/dom-min.js')); + $style->setScript($url->extras('/yui/build/dragdrop/dragdrop-min.js')); + $style->setScript($url->extras('/yui/build/utilities/utilities.js')); + $style->setScript($url->extras('/yui/build/container/container-min.js')); + $style->setScript($url->extras('/yui/build/slider/slider-min.js')); + $style->setScript($url->extras('/yui/build/colorpicker/colorpicker-min.js')); + $style->setCss($url->extras('/colorpicker/colorpicker.css')); + $style->setScript($url->extras('/colorpicker/colorpicker.js')); } #------------------------------------------------------------------- diff --git a/lib/WebGUI/Form/Combo.pm b/lib/WebGUI/Form/Combo.pm index 2ed81b598..04210680b 100644 --- a/lib/WebGUI/Form/Combo.pm +++ b/lib/WebGUI/Form/Combo.pm @@ -3,7 +3,7 @@ package WebGUI::Form::Combo; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Form/CommentRating.pm b/lib/WebGUI/Form/CommentRating.pm index 2a4f130e0..2120b0d55 100644 --- a/lib/WebGUI/Form/CommentRating.pm +++ b/lib/WebGUI/Form/CommentRating.pm @@ -3,7 +3,7 @@ package WebGUI::Form::CommentRating; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -16,6 +16,7 @@ package WebGUI::Form::CommentRating; use strict; use base 'WebGUI::Form::RadioList'; +use Tie::IxHash; =head1 NAME diff --git a/lib/WebGUI/Form/ContentType.pm b/lib/WebGUI/Form/ContentType.pm index 677ac61c0..2cd625712 100644 --- a/lib/WebGUI/Form/ContentType.pm +++ b/lib/WebGUI/Form/ContentType.pm @@ -3,7 +3,7 @@ package WebGUI::Form::ContentType; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Form/Control.pm b/lib/WebGUI/Form/Control.pm index 11e7ab0fd..09d9bbe07 100644 --- a/lib/WebGUI/Form/Control.pm +++ b/lib/WebGUI/Form/Control.pm @@ -3,7 +3,7 @@ package WebGUI::Form::Control; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -16,6 +16,7 @@ package WebGUI::Form::Control; use strict; use WebGUI::International; +use Scalar::Util qw( blessed ); =head1 NAME @@ -133,7 +134,7 @@ A text string that will be appended after the field when toHtmlWithWrapper() is =head4 labelClass -A stylesheet class assigned to the label with toHtmlWithWrapper() is called. Defaults to "formDescription". +A stylesheet class assigned to the label with toHtmlWithWrapper() is called. =head4 fieldClass @@ -155,7 +156,7 @@ sub definition { my $definition = shift || []; push(@{$definition}, { name=>{ - defaultValue=>undef + defaultValue=>'' }, value=>{ defaultValue=>undef @@ -176,7 +177,7 @@ sub definition { defaultValue=>1 }, labelClass=>{ - defaultValue=>"formDescription" + defaultValue=>"" }, fieldClass=>{ defaultValue=>"tableData" @@ -205,45 +206,6 @@ sub definition { #------------------------------------------------------------------- -=head2 displayForm ( ) - -Depricated, see toHtml(). - -=cut - -sub displayForm { - my $self = shift; - return $self->toHtml(@_); -} - -#------------------------------------------------------------------- - -=head2 displayFormWithWrapper ( ) - -Depricated, see toHtmlWithWrapper(). - -=cut - -sub displayFormWithWrapper { - my $self = shift; - return $self->toHtmlWithWrapper(@_); -} - -#------------------------------------------------------------------- - -=head2 displayValue ( ) - -Depricated, see getValueAsHtml(). - -=cut - -sub displayValue { - my ($self) = @_; - return $self->getValueAsHtml; -} - -#------------------------------------------------------------------- - =head2 fixMacros ( string ) Returns the string having converted all macros in the string to HTML entities so that they won't be processed by the macro engine, but instead will be displayed. @@ -341,9 +303,10 @@ sub generateIdParameter { #------------------------------------------------------------------- -=head2 get ( var ) +=head2 get ( [var] ) -Returns a property of this form object. +Returns a property of this form object. If no property is specified, returns a hashref of all +properties. =head3 var @@ -354,7 +317,11 @@ The variable name of the value to return. sub get { my $self = shift; my $var = shift; - return $self->{_params}{$var}; + if ( $var ) { + return $self->{_params}{$var}; + } + + return $self->{_params}; } #------------------------------------------------------------------- @@ -369,6 +336,28 @@ sub getDatabaseFieldType { return "CHAR(255)"; } +#------------------------------------------------------------------- + +=head2 getLabel ( ) + +Gets the label for this form control, including any configured hover help. + +=cut + +sub getLabel { + my ( $self ) = @_; + + return '' if !$self->get('label'); + + my $labelClass = " " . $self->get("labelClass"); + $labelClass = qq| class="formDescription${labelClass}"|; + + my $hoverHelp = $self->get("hoverHelp") || ''; + $hoverHelp =~ s/^\s+//; + $hoverHelp &&= '
    ' . $hoverHelp . '
    '; + + return ''.$self->get("label").'' . $hoverHelp; +} #------------------------------------------------------------------- @@ -403,6 +392,20 @@ sub getValue { return $self->getValueFromPost; } +#------------------------------------------------------------------- + +=head2 getValueAsScalar + +Returns the value as a scalar, which means for complex types it's returned as a serialized string of some sort. + +=cut + +sub getValueAsScalar { + my $self = shift; + return $self->getValue; +} + + #------------------------------------------------------------------- =head2 getOriginalValue ( ) @@ -431,6 +434,22 @@ sub getDefaultValue { return $self->get("defaultValue"); } +#---------------------------------------------------------------------------- + +=head2 getPackageClassName ( ) + +Get the class name for this package. Defaults to 'wg-form-typeCamelCase' (so, a +WebGUI::Form::Button would have a class of 'wg-form-button' and a +WebGUI::Form::SelectBox would have a class of 'wg-form-selectBox') + +=cut + +sub getPackageClassName { + my ( $self ) = @_; + my $package = blessed $self; + $package =~ s/WebGUI::Form:://; + return 'wg-form-' . lcfirst $package; +} #------------------------------------------------------------------- @@ -505,21 +524,6 @@ sub isInRequest { return $self->session->form->hasParam($self->get('name')); } -#------------------------------------------------------------------- - -=head2 isProfileEnabled ( session ) - -Depricated. See isDynamicCompatible(). - -=cut - - -sub isProfileEnabled { - my $class = shift; - return $class->isDynamicCompatible(); -} - - #------------------------------------------------------------------- =head2 new ( session, parameters ) @@ -599,7 +603,7 @@ Renders the form field to HTML as a table row complete with labels, subtext, hov sub passUiLevelCheck { my $self = shift; my $user = $self->session->user; - return $self->get("uiLevel") <= $user->profileField("uiLevel") || $user->isAdmin; + return $self->get("uiLevel") <= $user->get("uiLevel") || $user->isAdmin; } @@ -613,17 +617,13 @@ Common code for preparing wrappers for *WithWrapper sub prepareWrapper { my $self = shift; - my $rowClass = $self->get("rowClass"); - $rowClass = qq| class="$rowClass" | if($self->get("rowClass")); - my $labelClass = $self->get("labelClass"); - $labelClass = qq| class="$labelClass" | if($self->get("labelClass")); + my $rowClass = join " ", $self->get("rowClass"), $self->getPackageClassName; + $rowClass = qq| class="$rowClass" |; my $fieldClass = $self->get("fieldClass"); $fieldClass = qq| class="$fieldClass" | if($self->get("fieldClass")); - my $hoverHelp = $self->get("hoverHelp") || ''; - $hoverHelp =~ s/^\s+//; my $subtext = $self->get("subtext"); $subtext = qq| $subtext| if ($subtext); - return ($fieldClass, $rowClass, $labelClass, $hoverHelp, $subtext); + return ($fieldClass, $rowClass, $subtext); } @@ -713,21 +713,38 @@ Renders the form field to HTML as a table row complete with labels, subtext, hov =cut sub toHtmlWithWrapper { - my $self = shift; - if ($self->passUiLevelCheck) { - my $rawField = $self->toHtml(); # has to be called before prepareWrapper for some controls, namely captcha. - my ($fieldClass, $rowClass, $labelClass, $hoverHelp, $subtext) = $self->prepareWrapper; - $hoverHelp &&= '
    ' . $hoverHelp . '
    '; - return ' - ' . $hoverHelp . ' - '.$rawField . $subtext . " - \n"; - } else { - return $self->toHtmlAsHidden; - } + my $self = shift; + if ($self->passUiLevelCheck) { + my $rawField = $self->toHtml(); # has to be called before prepareWrapper for some controls, namely captcha. + my ($fieldClass, $rowClass, $subtext) = $self->prepareWrapper; + return '' + . $self->getLabel + . $rawField + . $subtext + . "
    \n"; + } else { + return $self->toHtmlAsHidden; + } } +#---------------------------------------------------------------------------- +=head2 toTemplateVars ( ) + +Returns a hashref of template variables of the properties of this control, used +to re-create it in a template. + +=cut + +sub toTemplateVars { + my ( $self ) = @_; + my %var = ( + %{$self->get}, + label => $self->getLabel, + label_nohover => $self->get('label'), + ); + return \%var; +} 1; diff --git a/lib/WebGUI/Form/Country.pm b/lib/WebGUI/Form/Country.pm index 679b0222c..2c1bcfbfe 100644 --- a/lib/WebGUI/Form/Country.pm +++ b/lib/WebGUI/Form/Country.pm @@ -3,7 +3,7 @@ package WebGUI::Form::Country; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Form/CsrfToken.pm b/lib/WebGUI/Form/CsrfToken.pm index 51b0621e2..380e38a85 100644 --- a/lib/WebGUI/Form/CsrfToken.pm +++ b/lib/WebGUI/Form/CsrfToken.pm @@ -3,7 +3,7 @@ package WebGUI::Form::CsrfToken; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Form/DataTable.pm b/lib/WebGUI/Form/DataTable.pm index 8705c9a42..10cc688ad 100644 --- a/lib/WebGUI/Form/DataTable.pm +++ b/lib/WebGUI/Form/DataTable.pm @@ -3,7 +3,7 @@ package WebGUI::Form::DataTable; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -371,8 +371,7 @@ sub prepare { # Source in the scripts my $style = $self->session->style; my $url = $self->session->url; - $style->setLink( $url->extras('yui/build/datatable/assets/skins/sam/datatable.css'), - { rel => "stylesheet", type => "text/css" } ); + $style->setCss( $url->extras('yui/build/datatable/assets/skins/sam/datatable.css')); $style->setScript( $url->extras('yui/build/yahoo-dom-event/yahoo-dom-event.js') ); $style->setScript( $url->extras('yui/build/element/element-min.js') ); $style->setScript( $url->extras('yui/build/dragdrop/dragdrop-min.js') ); @@ -381,19 +380,10 @@ sub prepare { # Prepare the editors if ( $self->get('showEdit') ) { - $style->setLink( - $url->extras( 'yui/build/button/assets/skins/sam/button.css', { rel => "stylesheet", type => "text/css" } ) - ); - $style->setLink( - $url->extras( - 'yui/build/calendar/assets/skins/sam/calendar.css', - { rel => "stylesheet", type => "text/css" } - ) - ); - $style->setLink( $url->extras('yui/build/container/assets/skins/sam/container.css'), - { rel => "stylesheet", type => "text/css" } ); - $style->setLink( $url->extras( 'yui-webgui/build/form/datatable.css'), - { rel => "stylesheet", type => "text/css" } ); + $style->setCss( $url->extras( 'yui/build/button/assets/skins/sam/button.css')); + $style->setCss( $url->extras( 'yui/build/calendar/assets/skins/sam/calendar.css')); + $style->setCss( $url->extras('yui/build/container/assets/skins/sam/container.css')); + $style->setCss( $url->extras('yui-webgui/build/form/datatable.css')); $style->setScript( $url->extras('yui/build/container/container-min.js') ); $style->setScript( $url->extras('yui/build/button/button-min.js') ); $style->setScript( $url->extras('yui/build/calendar/calendar-min.js') ); diff --git a/lib/WebGUI/Form/DatabaseLink.pm b/lib/WebGUI/Form/DatabaseLink.pm index 57fb79550..2b1b0592c 100644 --- a/lib/WebGUI/Form/DatabaseLink.pm +++ b/lib/WebGUI/Form/DatabaseLink.pm @@ -3,7 +3,7 @@ package WebGUI::Form::DatabaseLink; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Form/Date.pm b/lib/WebGUI/Form/Date.pm index 143df9fc8..a5004644d 100644 --- a/lib/WebGUI/Form/Date.pm +++ b/lib/WebGUI/Form/Date.pm @@ -3,7 +3,7 @@ package WebGUI::Form::Date; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -154,7 +154,7 @@ sub getValue { # NOTE: Cannot fix time zone since we don't have a complete date/time if($value =~ $isaEpoch){ - return $self->session->datetime->epochToSet($value,$self->session->user->profileField( 'timeZone' )); + return $self->session->datetime->epochToSet($value,$self->session->user->get( 'timeZone' )); } # Verify format @@ -201,15 +201,15 @@ sub headTags { my $session = $self->session; my $style = $session->style; my $url = $session->url; - $style->setLink($url->extras('yui/build/calendar/assets/skins/sam/calendar.css'), { rel=>"stylesheet", type=>"text/css", media=>"all" }); - $style->setScript($url->extras('yui/build/utilities/utilities.js'), { type => 'text/javascript' }); - $style->setScript($url->extras('yui/build/json/json-min.js'), { type => 'text/javascript' }); - $style->setScript($url->extras('yui/build/yahoo/yahoo-min.js'), { type => 'text/javascript' }); - $style->setScript($url->extras('yui/build/dom/dom-min.js'), { type => 'text/javascript' }); - $style->setScript($url->extras('yui/build/event/event-min.js'), { type => 'text/javascript' }); - $style->setScript($url->extras('yui/build/calendar/calendar-min.js'), { type => 'text/javascript' }); - $style->setScript($url->extras('yui-webgui/build/i18n/i18n.js' ), { type => 'text/javascript' }); - $style->setScript($url->extras('yui-webgui/build/datepicker/datepicker.js'),{ type => 'text/javascript' }); + $style->setCss($url->extras('yui/build/calendar/assets/skins/sam/calendar.css')); + $style->setScript($url->extras('yui/build/utilities/utilities.js')); + $style->setScript($url->extras('yui/build/json/json-min.js')); + $style->setScript($url->extras('yui/build/yahoo/yahoo-min.js')); + $style->setScript($url->extras('yui/build/dom/dom-min.js')); + $style->setScript($url->extras('yui/build/event/event-min.js')); + $style->setScript($url->extras('yui/build/calendar/calendar-min.js')); + $style->setScript($url->extras('yui-webgui/build/i18n/i18n.js' )); + $style->setScript($url->extras('yui-webgui/build/datepicker/datepicker.js')); } #------------------------------------------------------------------- @@ -252,7 +252,6 @@ sub toHtml { $value = $dt->toMysqlDate; } - my $field = WebGUI::Form::Text->new($self->session, name => $self->get("name"), value => $value, diff --git a/lib/WebGUI/Form/DateTime.pm b/lib/WebGUI/Form/DateTime.pm index 226f5f96e..6d438361c 100644 --- a/lib/WebGUI/Form/DateTime.pm +++ b/lib/WebGUI/Form/DateTime.pm @@ -3,7 +3,7 @@ package WebGUI::Form::DateTime; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -93,7 +93,7 @@ sub definition { defaultValue=> 19 }, timeZone=>{ - defaultValue=> $session->user->profileField("timeZone") + defaultValue=> $session->user->get("timeZone") }, }); return $class->SUPER::definition($session, $definition); @@ -153,7 +153,7 @@ sub getValue { # YY(YY)?-MM-DD HH:MM:SS if($value =~ $isaEpoch){ - return $self->session->datetime->epochToSet($value,$self->session->user->profileField( 'timeZone' )); + return $self->session->datetime->epochToSet($value,$self->session->user->get( 'timeZone' )); } # Verify format @@ -162,7 +162,7 @@ sub getValue { # Fix time zone - $value = WebGUI::DateTime->new($self->session,mysql => $value, time_zone=>$self->session->user->profileField( 'timeZone' )) + $value = WebGUI::DateTime->new($self->session,mysql => $value, time_zone=>$self->session->user->get( 'timeZone' )) ->set_time_zone("UTC")->toMysql; return $value; @@ -211,15 +211,15 @@ sub headTags { my $style = $session->style; my $url = $session->url; - $style->setLink($url->extras('yui/build/calendar/assets/skins/sam/calendar.css'), { rel=>"stylesheet", type=>"text/css", media=>"all" }); - $style->setScript($url->extras('/yui/build/utilities/utilities.js'), { type => 'text/javascript' }); - $style->setScript($url->extras('yui/build/json/json-min.js'), { type => 'text/javascript' }); - $style->setScript($url->extras('yui/build/yahoo/yahoo-min.js'), { type => 'text/javascript' }); - $style->setScript($url->extras('yui/build/dom/dom-min.js'), { type => 'text/javascript' }); - $style->setScript($url->extras('yui/build/event/event-min.js'), { type => 'text/javascript' }); - $style->setScript($url->extras('yui/build/calendar/calendar-min.js'), { type => 'text/javascript' }); - $style->setScript($url->extras('yui-webgui/build/i18n/i18n.js' ), { type => 'text/javascript' }); - $style->setScript($url->extras('yui-webgui/build/datepicker/datepicker.js'),{ type => 'text/javascript' }); + $style->setCss($url->extras('yui/build/calendar/assets/skins/sam/calendar.css')); + $style->setScript($url->extras('/yui/build/utilities/utilities.js')); + $style->setScript($url->extras('yui/build/json/json-min.js')); + $style->setScript($url->extras('yui/build/yahoo/yahoo-min.js')); + $style->setScript($url->extras('yui/build/dom/dom-min.js')); + $style->setScript($url->extras('yui/build/event/event-min.js')); + $style->setScript($url->extras('yui/build/calendar/calendar-min.js')); + $style->setScript($url->extras('yui-webgui/build/i18n/i18n.js' )); + $style->setScript($url->extras('yui-webgui/build/datepicker/datepicker.js')); } #------------------------------------------------------------------- diff --git a/lib/WebGUI/Form/Div.pm b/lib/WebGUI/Form/Div.pm index f30d0746e..17b96f2c7 100644 --- a/lib/WebGUI/Form/Div.pm +++ b/lib/WebGUI/Form/Div.pm @@ -3,7 +3,7 @@ package WebGUI::Form::Div; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Form/DynamicField.pm b/lib/WebGUI/Form/DynamicField.pm index 25a5e3254..38c2b74b5 100644 --- a/lib/WebGUI/Form/DynamicField.pm +++ b/lib/WebGUI/Form/DynamicField.pm @@ -3,7 +3,7 @@ package WebGUI::Form::DynamicField; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -18,7 +18,6 @@ use strict; use base 'WebGUI::Form::Control'; use WebGUI::International; use WebGUI::Pluggable; -use WebGUI::Utility; =head1 NAME @@ -113,12 +112,12 @@ sub new { delete $raw{fieldType}; # Return the appropriate field object. if ($fieldType eq "") { - $session->errorHandler->warn("Something is trying to create a dynamic field called ".$raw{name}.", but didn't pass in a field type."); + $session->log->warn("Something is trying to create a dynamic field called ".$raw{name}.", but didn't pass in a field type."); $fieldType = "Text"; } ##No infinite loops, please elsif ($fieldType eq 'DynamicField') { - $session->errorHandler->warn("Something is trying to create a DynamicField via DynamicField."); + $session->log->warn("Something is trying to create a DynamicField via DynamicField."); $fieldType = "Text"; } return WebGUI::Pluggable::instanciate("WebGUI::Form::".$fieldType, "new", [$session, \%raw]); diff --git a/lib/WebGUI/Form/Email.pm b/lib/WebGUI/Form/Email.pm index 907796d2f..70c285056 100644 --- a/lib/WebGUI/Form/Email.pm +++ b/lib/WebGUI/Form/Email.pm @@ -3,7 +3,7 @@ package WebGUI::Form::Email; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -17,7 +17,7 @@ package WebGUI::Form::Email; use strict; use base 'WebGUI::Form::Text'; use WebGUI::International; -use WebGUI::Utility; +use Email::Valid; =head1 NAME @@ -66,7 +66,7 @@ An optional value to process instead of POST input. sub getValue { my $self = shift; my $value = @_ ? shift : $self->session->form->param($self->get("name")); - if ($value =~ WebGUI::Utility::emailRegex) { + if (Email::Valid->address($value)) { return $value; } return undef; diff --git a/lib/WebGUI/Form/FieldType.pm b/lib/WebGUI/Form/FieldType.pm index d0bff2b5a..b04a19ea6 100644 --- a/lib/WebGUI/Form/FieldType.pm +++ b/lib/WebGUI/Form/FieldType.pm @@ -3,7 +3,7 @@ package WebGUI::Form::FieldType; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -19,7 +19,6 @@ use base 'WebGUI::Form::SelectBox'; use Tie::IxHash; use WebGUI::International; use WebGUI::Pluggable; -use WebGUI::Utility; use Module::Find qw(findallmod); =head1 NAME diff --git a/lib/WebGUI/Form/File.pm b/lib/WebGUI/Form/File.pm index 3a33c30ef..552d0958f 100644 --- a/lib/WebGUI/Form/File.pm +++ b/lib/WebGUI/Form/File.pm @@ -3,7 +3,7 @@ package WebGUI::Form::File; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -245,8 +245,8 @@ Set the head tags for this form plugin sub headTags { my $self = shift; - $self->session->style->setScript($self->session->url->extras('FileUploadControl.js'),{type=>"text/javascript"}); - $self->session->style->setScript($self->session->url->extras('fileIcons.js'),{type=>"text/javascript"}); + $self->session->style->setScript($self->session->url->extras('FileUploadControl.js')); + $self->session->style->setScript($self->session->url->extras('fileIcons.js')); } #------------------------------------------------------------------- @@ -293,7 +293,10 @@ sub toHtml { my @files = @{ $storage->getFiles } if (defined $storage); my $maxFiles = $self->get('maxAttachments') - scalar(@files); if ($maxFiles > 0) { - $uploadControl = '' diff --git a/lib/WebGUI/Form/FilterContent.pm b/lib/WebGUI/Form/FilterContent.pm index 7c80bb78f..c6725471a 100644 --- a/lib/WebGUI/Form/FilterContent.pm +++ b/lib/WebGUI/Form/FilterContent.pm @@ -3,7 +3,7 @@ package WebGUI::Form::FilterContent; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Form/Float.pm b/lib/WebGUI/Form/Float.pm index c2f201e16..d62f4ca4c 100644 --- a/lib/WebGUI/Form/Float.pm +++ b/lib/WebGUI/Form/Float.pm @@ -3,7 +3,7 @@ package WebGUI::Form::Float; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -134,7 +134,7 @@ Set the head tags for this form plugin sub headTags { my $self = shift; - $self->session->style->setScript($self->session->url->extras('inputCheck.js'),{ type=>'text/javascript' }); + $self->session->style->setScript($self->session->url->extras('inputCheck.js')); } #------------------------------------------------------------------- diff --git a/lib/WebGUI/Form/Group.pm b/lib/WebGUI/Form/Group.pm index e4eb48a55..a372cb54d 100644 --- a/lib/WebGUI/Form/Group.pm +++ b/lib/WebGUI/Form/Group.pm @@ -3,7 +3,7 @@ package WebGUI::Form::Group; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Form/Guid.pm b/lib/WebGUI/Form/Guid.pm index 4f45334f5..b220649f9 100644 --- a/lib/WebGUI/Form/Guid.pm +++ b/lib/WebGUI/Form/Guid.pm @@ -3,7 +3,7 @@ package WebGUI::Form::Guid; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -76,6 +76,7 @@ sub getValue { if ($value =~ m/[A-Za-z0-9\-_]{1,22}/) { return $value; } + $self->session->log->warn("Invalid GUID '$value' passed into form"); return undef; } diff --git a/lib/WebGUI/Form/HTMLArea.pm b/lib/WebGUI/Form/HTMLArea.pm index 7d8da86f4..fa8e3497f 100644 --- a/lib/WebGUI/Form/HTMLArea.pm +++ b/lib/WebGUI/Form/HTMLArea.pm @@ -3,7 +3,7 @@ package WebGUI::Form::HTMLArea; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -156,9 +156,12 @@ Set the head tags for this form plugin sub headTags { my $self = shift; - $self->session->style->setScript($self->session->url->extras('textFix.js'),{ type=>'text/javascript' }); - $self->{_richEdit} ||= WebGUI::Asset::RichEdit->new($self->session,$self->get("richEditId")); - $self->{_richEdit}->richedit_headTags if $self->{_richEdit}; + if (! $self->{_richEdit}) { + $self->{_richEdit} = eval { WebGUI::Asset->newById($self->session,$self->get("richEditId")) }; + return if Exception::Class->caught(); + } + $self->session->style->setScript($self->session->url->extras('textFix.js')); + $self->{_richEdit}->richedit_headTags; } #------------------------------------------------------------------- @@ -184,21 +187,20 @@ Renders an HTML area field. sub toHtml { my $self = shift; ##Do not display a rich editor on any mobile browser. - if ($self->session->style->mobileBrowser) { + if ($self->session->request->browser->mobile) { return $self->SUPER::toHtml; } - my $i18n = WebGUI::International->new($self->session); - my $richEdit = $self->{_richEdit}; - $richEdit ||= WebGUI::Asset::RichEdit->new($self->session,$self->get("richEditId")); - if (defined $richEdit) { - $self->set("extras", $self->get('extras') . q{ onblur="fixChars(this.form['}.$self->get("name").q{'])" mce_editable="true" }); - $self->set("resizable", 0); - return $self->SUPER::toHtml.$richEdit->getRichEditor($self->get('id')); - } else { - $self->session->errorHandler->warn($i18n->get('rich editor load error','Form_HTMLArea')); - return $self->SUPER::toHtml; - } - + my $i18n = WebGUI::International->new($self->session); + if (! $self->{_richEdit}) { + my $richEdit = eval { WebGUI::Asset::RichEdit->newById($self->session, $self->get("richEditId")); }; + if (Exception::Class->caught() ) { + $self->session->log->warn($i18n->get('rich editor load error','Form_HTMLArea')); + return $self->SUPER::toHtml; + } + } + $self->set("extras", $self->get('extras') . q{ onblur="fixChars(this.form['}.$self->get("name").q{'])" mce_editable="true" }); + $self->set("resizable", 0); + return $self->SUPER::toHtml.$self->{_richEdit}->getRichEditor($self->get('id')); } #------------------------------------------------------------------- @@ -211,8 +213,8 @@ Asset picker for the rich editor. sub www_pageTree { my $session = shift; - $session->http->setCacheControl("none"); - $session->style->setLink($session->url->extras('/tinymce-webgui/plugins/wgpagetree/css/pagetree.css'),{ type=>'text/css', rel=>"stylesheet" }); + $session->response->setCacheControl("none"); + $session->style->setCss($session->url->extras('/tinymce-webgui/plugins/wgpagetree/css/pagetree.css')); $session->style->setRawHeadTags(<<"JS"); } + ; + + return $html; +} + +#---------------------------------------------------------------------------- + +=head2 toTemplateVars ( ) + +Return a hashref of template vars to re-create this tabset + +=cut + +sub toTemplateVars { + my ( $self ) = @_; + my $var = {}; + + $var->{ name } = $self->name; + $var->{ tabs } = []; + for my $tab ( @{ $self->tabs } ) { + my $name = $tab->name; + my $props = $tab->toTemplateVars; + $var->{ "tabs_${name}" } = $tab->toHtml; + push @{$var->{tabs}}, $props; + for my $key ( keys %{$props} ) { + $var->{ "tabs_${name}_${key}" } = $props->{$key}; + } + } + + return $var; +} + +1; diff --git a/lib/WebGUI/FormValidator.pm b/lib/WebGUI/FormValidator.pm index ae681e784..d10c09f12 100644 --- a/lib/WebGUI/FormValidator.pm +++ b/lib/WebGUI/FormValidator.pm @@ -3,7 +3,7 @@ package WebGUI::FormValidator; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -17,7 +17,7 @@ package WebGUI::FormValidator; use strict qw(vars subs); use WebGUI::HTML; use WebGUI::Pluggable; -use Scalar::Util qw( weaken ); +use Scalar::Util qw(weaken); =head1 NAME @@ -75,26 +75,14 @@ sub AUTOLOAD { $params = {name=>$params} if ref ($params) ne "HASH"; my $control = eval { WebGUI::Pluggable::instanciate("WebGUI::Form::".$name, "new", [ $self->session, $params ]) }; if ($@) { - $self->session->errorHandler->error($@); + $self->session->log->error($@); return undef; } return $control->getValue(@args); } -#------------------------------------------------------------------- - -=head2 DESTROY ( ) - -Deconstructor. - -=cut - -sub DESTROY { - my $self = shift; - undef $self; -} - - +# so it doesn't get autoloaded +sub DESTROY {} #------------------------------------------------------------------- @@ -122,11 +110,11 @@ A reference to the current session. =cut sub new { - my $class = shift; - my $session = shift; - my $self = bless {_session=>$session}, $class; - weaken( $self->{_session} ); - return $self; + my $class = shift; + my $session = shift; + my $self = bless {_session=>$session}, $class; + weaken $self->{_session}; + return $self; } diff --git a/lib/WebGUI/Friends.pm b/lib/WebGUI/Friends.pm index a8fbdea9f..632793ec6 100644 --- a/lib/WebGUI/Friends.pm +++ b/lib/WebGUI/Friends.pm @@ -3,7 +3,7 @@ package WebGUI::Friends; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -15,16 +15,25 @@ package WebGUI::Friends; =cut use strict; -use Class::InsideOut qw(id register public readonly); + +use Moose; + +has 'session' => ( + is => 'ro', + required => 1, + weak_ref => 1, +); + +has 'user' => ( + is => 'ro', + required => 1, +); + use WebGUI::DateTime; use WebGUI::HTML; use WebGUI::Inbox; use WebGUI::International; use WebGUI::User; -use WebGUI::Utility; - -readonly session => my %session; -readonly user => my %user; =head1 NAME @@ -45,6 +54,20 @@ A user relationship management system. =cut +around BUILDARGS => sub { + my $orig = shift; + my $className = shift; + + ##Original arguments start here. + my $protoSession = $_[0]; + if (blessed $protoSession && $protoSession->isa('WebGUI::Session')) { + my $protoUser = defined $_[1] ? $_[1] : $protoSession->user; + return $className->$orig(session => $protoSession, user => $protoUser,); + } + return $className->$orig(@_); +}; + + #------------------------------------------------------------------- @@ -225,7 +248,7 @@ The userId to check against this user. sub isFriend { my $self = shift; my $userId = shift; - return isIn($userId, @{$self->user->friends->getUsers}); + return $userId ~~ $self->user->friends->getUsers; } #------------------------------------------------------------------- @@ -276,16 +299,6 @@ attached to the session. =cut -sub new { - my $class = shift; - my $session = shift; - my $user = shift || $session->user; - my $self = register($class); - $session{id $self} = $session; - $user{id $self} = $user; - return $self; -} - #------------------------------------------------------------------- =head2 rejectAddRequest ( inviteId[,sendNotification] ) diff --git a/lib/WebGUI/GUID.pm b/lib/WebGUI/GUID.pm new file mode 100644 index 000000000..77204baf5 --- /dev/null +++ b/lib/WebGUI/GUID.pm @@ -0,0 +1,134 @@ +package WebGUI::GUID; + + +=head1 LEGAL + + ------------------------------------------------------------------- + WebGUI is Copyright 2001-2012 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 + ------------------------------------------------------------------- + +=cut + +use strict; +use WebGUI::BestPractices; +use MIME::Base64; +use UUID::Tiny; + +my $idValidator = qr/^[A-Za-z0-9_-]{22}$/; + +=head1 NAME + +Package WebGUI::GUID; + +=head1 DESCRIPTION + +This package generates global unique ids, sometimes called GUIDs. A global unique ID is guaranteed to be unique everywhere and at everytime. + +B There is no such thing as perfectly unique ID's, but the chances of a duplicate ID are so minute that they are effectively unique. + +=head1 SYNOPSIS + + my $id = WebGUI::GUID->generate; + +=head1 METHODS + +These methods are available from this class: + +=cut + +#------------------------------------------------------------------- + +=head2 fromHex ( hexId ) + +Returns the guid corresponding to hexId. Converse of toHex. + +=head3 hexId + +Hex value to convert to guid. + +=cut + +sub fromHex { + shift; + my $hexId = shift; + my $binId = pack( 'H2' x 16, unpack( 'A2' x 16, $hexId ) ); + my $id = substr( encode_base64($binId), 0, 22 ); + $id =~ tr{+/}{_-}; + return $id; +} + +#------------------------------------------------------------------- + +=head2 getValidator + +Get the regular expression used to validate generated GUIDs. This is just to prevent +regular expressions from being duplicated all over the place. + +=cut + +sub getValidator { + return $idValidator; +} + +#------------------------------------------------------------------- + +=head2 generate + +This function generates a global unique id. + +=cut + +sub generate { + shift; + my $id = substr( encode_base64( create_UUID( UUID_V4 ) ), 0, 22 ); + $id =~ tr{+/}{_-}; + return $id; +} + +#------------------------------------------------------------------- + +=head2 toHex ( guid ) + +Returns the hex value of a guid. For all GUIDs generated by the generate method, the return value will be 32 characters long. For some manually created invalid GUIDs, it may be 33 characters long. + +=head3 guid + +guid to convert to hex value. + +=cut + +sub toHex { + shift; + my $id = shift; + $id =~ tr{_-}{+/}; + $id .= 'AA'; + my $bin_id = decode_base64($id); + my $hex_id = unpack("H*", $bin_id); + $hex_id =~ s/0{3,4}$//; + return $hex_id; +} + + +#------------------------------------------------------------------- + +=head2 valid ( $idString ) + +Returns true if $idString is a valid WebGUI guid. + +=cut + +sub valid { + shift; + my $idString = shift; + return $idString =~ m/$idValidator/; +} + + +1; + diff --git a/lib/WebGUI/Group.pm b/lib/WebGUI/Group.pm index 0be656a5b..ca53da2e3 100644 --- a/lib/WebGUI/Group.pm +++ b/lib/WebGUI/Group.pm @@ -3,7 +3,7 @@ package WebGUI::Group; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -15,14 +15,14 @@ package WebGUI::Group; =cut use strict; -use Tie::CPHash; use WebGUI::LDAPLink; use WebGUI::Macro; -use WebGUI::Utility; use WebGUI::Pluggable; +require WebGUI::Asset; use WebGUI::International; +use WebGUI::DatabaseLink; use Scalar::Util qw( weaken ); - +use Net::CIDR::Lite; =head1 NAME @@ -71,6 +71,49 @@ This package provides an object-oriented way of managing WebGUI groups and group $boolean = $group->userIsAdmin($userId,$groupId); $epoch = $group->userGroupExpireDate($userId,$date); +=head1 MAGIC NUMBERS + +These magic group IDs are used throughout WebGUI: + +=over 4 + +=item 1 + +The visitors group. Only visitors are in this group, not registered users. + +=item 2 + +The registered users group. Any user that is not a visitor is in this group. + +=item 3 + +The admins group. This is the highest level of authority that can be given in +the site. Admins can do everything regardless of permissions. + +=item 4 + +Content Managers. This group is allowed to manage the content on the site. They +must still have permissions to edit the individual asset however. + +=item 7 + +Everyone. All Visitors and Registered Users are in this group. + +=item 11 + +Secondary Admins. By default, this group has limited privileges to edit some +users and groups. + +=item 12 + +Turn Admin On group. This group is allowed to use the Admin interface. + +=item 13 + +Export Managers. This group is allowed to use the HTML export functions. + +=back + =head1 METHODS These methods are available from this class: @@ -128,14 +171,14 @@ not be added to any group. Groups may not be added to themselves. sub addGroups { my $self = shift; my $groups = shift; - WebGUI::Cache->new($self->session, $self->getId)->delete; + $self->session->cache->remove("group_" . $self->getId); GROUP: foreach my $gid (@{$groups}) { next if ($gid eq '1'); next if ($gid eq $self->getId); my ($isIn) = $self->session->db->quickArray("select count(*) from groupGroupings where groupId=? and inGroup=?", [$gid, $self->getId]); next GROUP if $isIn; my $group = WebGUI::Group->new($self->session, $gid); - my $recursive = isIn($self->getId, @{$group->getGroupsIn(1)}); + my $recursive = $self->getId ~~ $group->getGroupsIn(1); next GROUP if $recursive; $self->session->db->write("REPLACE into groupGroupings (groupId,inGroup) values (?,?)",[$gid, $self->getId]); } @@ -245,11 +288,10 @@ sub cacheGroupings { my $userId = $user->userId; my $sessionId = $session->getId; - ### Undocumented - cache and groupMembers can be passed in if it they are already built. + ### Undocumented - groupMembers can be passed in if it they are already built. #These exist specifically for WebGUI::User::isInGroup to use and should not be used elsewhere #unless you know what you are doing - my $cache = shift || WebGUI::Cache->new($session,["groupMembers",$groupId]) || {}; - my $groupMembers = shift || $cache->get; + my $groupMembers = shift || $session->cache->get("groupMembers".$groupId) || {}; #Build cache in a special way for visitors if($userId eq '1') { @@ -259,9 +301,7 @@ sub cacheGroupings { $groupMembers->{$userId} = { isMember => $isInGroup }; } - if ($self->groupCacheTimeout()) { - $cache->set($groupMembers, $self->groupCacheTimeout); - } + $session->cache->set("groupMembers". $groupId, $groupMembers, $self->groupCacheTimeout); } #------------------------------------------------------------------- @@ -277,14 +317,16 @@ sub clearCaches { my $session = $self->session; ##Clear my cache and the cache of all groups above me. my $groups = $self->getAllGroupsFor(); - foreach my $groupId ( $self->getId, @{ $groups } ) { - WebGUI::Cache->new($session, $groupId)->delete; - WebGUI::Cache->new($session, ["groupMembers", $groupId])->delete; + my $cache = $self->session->cache; + foreach my $group ( $self->getId, @{ $groups } ) { + $cache->remove("group_".$group); + $cache->remove("groupMembers".$group); } - $session->stow->delete("groupObj"); - $session->stow->delete("isInGroup"); - $session->stow->delete("gotGroupsInGroup"); - $session->stow->delete("gotGroupsForUser"); + my $stow = $self->session->stow; + $stow->delete("groupObj"); + $stow->delete("isInGroup"); + $stow->delete("gotGroupsInGroup"); + $stow->delete("gotGroupsForUser"); } #------------------------------------------------------------------- @@ -316,7 +358,6 @@ sub delete { $self->session->db->write("delete from groups where groupId=?", [$self->getId]); $self->session->db->write("delete from groupings where groupId=?", [$self->getId]); $self->session->db->write("delete from groupGroupings where inGroup=? or groupId=?", [$self->getId, $self->getId]); - undef $self; } #------------------------------------------------------------------- @@ -409,21 +450,6 @@ sub description { return $self->get("description"); } - -#------------------------------------------------------------------- - -=head2 DESTROY - -Desconstructor - -=cut - -sub DESTROY { - my $self = shift; - undef $self; -} - - #------------------------------------------------------------------- =head2 expireNotify ( [ value ] ) @@ -607,8 +633,8 @@ sub getAllUsers { my $withoutExpired = shift; my $loopCount = shift; my $expireTime = 0; - my $cache = WebGUI::Cache->new($self->session, $self->getId); - my $value = $cache->get; + my $cache = $self->session->cache; + my $value = $cache->get("group_".$self->getId); return $value if defined $value; my @users = (); push @users, @@ -621,7 +647,7 @@ sub getAllUsers { ; ++$loopCount; if ($loopCount > 99) { - $self->session->errorHandler->fatal("Endless recursive loop detected while determining groups in group.\nRequested groupId: ".$self->getId); + $self->session->log->fatal("Endless recursive loop detected while determining groups in group.\nRequested groupId: ".$self->getId); } my $groups = $self->getGroupsIn(); foreach my $groupId (@{ $groups }) { @@ -632,9 +658,7 @@ sub getAllUsers { } my %users = map { $_ => 1 } @users; @users = keys %users; - if ($self->groupCacheTimeout()) { - $cache->set(\@users, $self->groupCacheTimeout); - } + $cache->set("group_".$self->getId, \@users, $self->groupCacheTimeout); return \@users; } @@ -663,7 +687,7 @@ sub getDatabaseUsers { my $sth = $dbh->unconditionalRead($query); if (defined $sth) { unless ($sth->errorCode < 1) { - $self->session->errorHandler->warn("There was a problem with the database query for group ID $gid."); + $self->session->log->warn("There was a problem with the database query for group ID $gid."); } else { while(my ($userId)=$sth->array) { push @dbUsers, $userId; @@ -671,12 +695,12 @@ sub getDatabaseUsers { } $sth->finish; } else { - $self->session->errorHandler->error("Couldn't process unconditional read for database group with group id $gid."); + $self->session->log->error("Couldn't process unconditional read for database group with group id $gid."); } $dbLink->disconnect; } } else { - $self->session->errorHandler->warn("The database link ".$self->get("databaseLinkId")." no longer exists even though group ".$gid." references it."); + $self->session->log->warn("The database link ".$self->get("databaseLinkId")." no longer exists even though group ".$gid." references it."); } } return \@dbUsers; @@ -731,7 +755,7 @@ sub getGroupsIn { if ($isRecursive) { $loopCount++; if ($loopCount > 99) { - $self->session->errorHandler->fatal("Endless recursive loop detected while determining groups in group.\nRequested groupId: ".$self->getId."\nGroups in that group: ".join(",",@$groups)); + $self->session->log->fatal("Endless recursive loop detected while determining groups in group.\nRequested groupId: ".$self->getId."\nGroups in that group: ".join(",",@$groups)); } my @groupsOfGroups = @$groups; foreach my $group (@$groups) { @@ -792,7 +816,7 @@ sub getIpUsers { my @ipUsers = (); while (my ($userId, $lastIP) = $sth->array() ) { if (!exists $localCache{$lastIP}) { - $localCache{$lastIP} = isInSubnet($lastIP, \@filters); + $localCache{$lastIP} = Net::CIDR::Lite->new(@filters)->find($lastIP); } push @ipUsers, $userId if $localCache{$lastIP}; } @@ -840,7 +864,7 @@ sub getLDAPUsers { my $ldapLink = WebGUI::LDAPLink->new($self->session,$ldapLinkId); unless ($ldapLink && $ldapLink->bind) { - $self->session->errorHandler->warn("There was a problem connecting to LDAP link $ldapLinkId for group ID $gid."); + $self->session->log->warn("There was a problem connecting to LDAP link $ldapLinkId for group ID $gid."); return []; } @@ -862,7 +886,7 @@ sub getLDAPUsers { if($userId) { push(@ldapUsers,$userId); } else { - $self->session->errorHandler->warn("Could not find matching userId for dn/uid $person in WebGUI for group $gid"); + $self->session->log->warn("Could not find matching userId for dn/uid $person in WebGUI for group $gid"); } } @@ -1117,7 +1141,7 @@ sub hasIpUser { ); foreach my $ip (@ips) { - return 1 if (isInSubnet($ip,\@filters)); + return 1 if Net::CIDR::Lite->new(@filters)->find($ip); } return 0; @@ -1189,7 +1213,7 @@ sub hasLDAPUser { my $ldapLink = WebGUI::LDAPLink->new($session,$ldapLinkId); unless ($ldapLink && $ldapLink->bind) { - $self->session->errorHandler->warn("There was a problem connecting to LDAP link $ldapLinkId for group ID $gid."); + $self->session->log->warn("There was a problem connecting to LDAP link $ldapLinkId for group ID $gid."); return 0; } @@ -1571,7 +1595,7 @@ sub new { $self->{_groupId}, ]); unless ($groupExists) { - $session->errorHandler->warn('WebGUI::Group->new called with a non-existant groupId:' + $session->log->warn('WebGUI::Group->new called with a non-existant groupId:' .'['.$self->{_groupId}.']'); return undef; } @@ -1626,13 +1650,15 @@ sub resetGroupFields { ##instanciate every version of the asset that used the group. This should be much quicker ASSET: foreach my $assetClass ($db->buildArray('SELECT DISTINCT className FROM asset')) { next ASSET unless $db->quickScalar( "SELECT COUNT(*) FROM asset WHERE className=?", [$assetClass] ); - my $definition = WebGUI::Pluggable::instanciate($assetClass, 'definition', [$session]); - SUBDEF: foreach my $subdef (@{ $definition }) { - next SUBDEF if exists $tableCache->{$subdef->{tableName}}; - PROP: while (my ($fieldName, $properties) = each %{ $subdef->{properties} }) { - next PROP unless $properties->{fieldType} eq 'group'; - push @{ $tableCache->{$subdef->{tableName}} }, $fieldName; - } + my $className = eval { WebGUI::Asset->loadModule($assetClass); }; + if (my $e = Exception::Class->caught) { + warn $e->cause; + next ASSET; + } + PROPERTY: foreach my $property_name ($className->meta->get_all_property_list) { + my $property = $className->meta->find_attribute_by_name($property_name); + next PROPERTY unless $property->fieldType eq 'group'; + push @{ $tableCache->{$property->tableName} }, $property->name; } } ##VersionTags @@ -1640,8 +1666,8 @@ sub resetGroupFields { foreach my $tableName (keys %{ $tableCache }) { foreach my $fieldName (@{ $tableCache->{$tableName} }) { my $sql = sprintf 'UPDATE %s SET %s=3 where %s=?', - $db->dbh->quote_identifier($tableName), - (($db->dbh->quote_identifier($fieldName)) x 2); + $db->quote_identifier($tableName), + (($db->quote_identifier($fieldName)) x 2); $db->write($sql, [ $gid ]); } } @@ -2026,7 +2052,7 @@ sub vitalGroup { if (! $groupId && ref $class ) { $groupId = $class->getId; } - return isIn ( $groupId, (1..13), 15,16,17, qw/pbgroup000000000000015 pbgroup000000000000016 pbgroup000000000000017 / ); + return $groupId ~~ [ map { "$_" } (1..13), 15, 16, 17, qw/pbgroup000000000000015 pbgroup000000000000016 pbgroup000000000000017 /]; } 1; diff --git a/lib/WebGUI/HTML.pm b/lib/WebGUI/HTML.pm index 75eb10c6d..3141a6fe6 100644 --- a/lib/WebGUI/HTML.pm +++ b/lib/WebGUI/HTML.pm @@ -3,7 +3,7 @@ package WebGUI::HTML; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -39,6 +39,7 @@ A package for manipulating and massaging HTML. $html = WebGUI::HTML::makeAbsolute($session, $html); $html = WebGUI::HTML::processReplacements($session, $html); $html = WebGUI::HTML::splitTag([$tag,]$html[,$count]); # defaults to ( 'p', $html, 1 ) + $html = WebGUI::HTML::arrayToRow(@columnData); =head1 METHODS @@ -47,6 +48,27 @@ These methods are available from this package: =cut +#------------------------------------------------------------------- + +=head2 arrayToRow ( @columnData ) + +Wraps each element of @columnData in a table cell tag, concatenates them all together, +and then wraps that in table row tags. + +=head3 @columnData + +An array of strings to wrap. + +=cut + +sub arrayToRow { + my @columnData = @_; + my $output = ''; + $output .= join '', @columnData; + $output .= ''; + return $output; +} + #------------------------------------------------------------------- =head2 cleanSegment ( html , preserveStyleScript ) @@ -188,7 +210,7 @@ The text content to be formatted. =head3 contentType The content type to use as formatting. Valid types are 'text', 'code', and 'mixed'. The default contentType is 'mixed'. -See also the contentType method in WebGUI::Form, WebGUI::HTMLForm, and WebGUI::FormProcessor. +See also the WebGUI::Form::ContentType control =cut diff --git a/lib/WebGUI/HTMLForm.pm b/lib/WebGUI/HTMLForm.pm index 8de01edf4..8113b3bd4 100644 --- a/lib/WebGUI/HTMLForm.pm +++ b/lib/WebGUI/HTMLForm.pm @@ -3,7 +3,7 @@ package WebGUI::HTMLForm; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -14,12 +14,11 @@ package WebGUI::HTMLForm; =cut +use strict; use CGI::Util qw(rearrange); -use strict qw(vars refs); use WebGUI::Form; use WebGUI::International; use WebGUI::Pluggable; -use WebGUI::Utility; =head1 NAME @@ -62,7 +61,7 @@ These methods are available from this class: #------------------------------------------------------------------- sub _uiLevelChecksOut { my $self = shift; - if ($_[0] <= $self->session->user->profileField("uiLevel")) { + if ($_[0] <= $self->session->user->get("uiLevel")) { return 1; } else { @@ -87,26 +86,12 @@ sub AUTOLOAD { $params{rowClass} ||= $self->{_class}; my $control = eval { WebGUI::Pluggable::instanciate("WebGUI::Form::".$name, "new", [ $self->session, %params ]) }; if ($@) { - $self->session->errorHandler->error($@); + $self->session->log->error($@); return undef; } $self->{_data} .= $control->toHtmlWithWrapper; } -#------------------------------------------------------------------- - -=head2 DESTROY ( ) - -Disposes of the form object. - -=cut - -sub DESTROY { - my $self = shift; - $self = undef; -} - - #------------------------------------------------------------------- =head2 dynamicForm ( $formDefinition, $listName, $who ) @@ -166,7 +151,7 @@ sub dynamicForm { $params{$key} = $formDefinition->[0]{name}; } } - $params{value} = $parent->get($fieldname); + $params{value} = $parent->get($fieldname) if $parent; $params{name} = $fieldname; $self->dynamicField(%params); } @@ -284,13 +269,13 @@ sub print { my $self = shift; my $style = $self->session->style; my $url = $self->session->url; - $style->setLink($url->extras('/yui/build/container/assets/container.css'),{ type=>'text/css', rel=>"stylesheet" }); - $style->setLink($url->extras('/hoverhelp.css'),{ type=>'text/css', rel=>"stylesheet" }); - $style->setScript($url->extras('/yui/build/yahoo/yahoo-min.js'),{ type=>'text/javascript' }); - $style->setScript($url->extras('/yui/build/dom/dom-min.js'),{ type=>'text/javascript' }); - $style->setScript($url->extras('/yui/build/event/event-min.js'),{ type=>'text/javascript' }); - $style->setScript($url->extras('/yui/build/container/container-min.js'),{ type=>'text/javascript' }); - $style->setScript($url->extras('/hoverhelp.js'),{ type=>'text/javascript' }); + $style->setCss($url->extras('/yui/build/container/assets/container.css')); + $style->setCss($url->extras('/hoverhelp.css')); + $style->setScript($url->extras('/yui/build/yahoo/yahoo-min.js')); + $style->setScript($url->extras('/yui/build/dom/dom-min.js')); + $style->setScript($url->extras('/yui/build/event/event-min.js')); + $style->setScript($url->extras('/yui/build/container/container-min.js')); + $style->setScript($url->extras('/hoverhelp.js')); return $self->{_header}.$self->{_data}.$self->{_footer}; } diff --git a/lib/WebGUI/Help/Asset_Calendar.pm b/lib/WebGUI/Help/Asset_Calendar.pm index 8282e36fc..f9c59faa8 100644 --- a/lib/WebGUI/Help/Asset_Calendar.pm +++ b/lib/WebGUI/Help/Asset_Calendar.pm @@ -241,15 +241,15 @@ our $HELP = { ], variables => [ { - name => 'newYear', + name => 'new_year', description => 'helpvar newYear', }, { - name => 'newMonth', + name => 'new_month', description => 'helpvar newMonth', }, { - name => 'newDay', + name => 'new_day', description => 'helpvar newDay', }, { diff --git a/lib/WebGUI/ICal.pm b/lib/WebGUI/ICal.pm index 76d5e93d8..c0a534e4d 100644 --- a/lib/WebGUI/ICal.pm +++ b/lib/WebGUI/ICal.pm @@ -3,7 +3,7 @@ package WebGUI::ICal; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Image.pm b/lib/WebGUI/Image.pm index 3f3a6fb10..773d6d246 100644 --- a/lib/WebGUI/Image.pm +++ b/lib/WebGUI/Image.pm @@ -52,7 +52,7 @@ sub getFilename { if (exists $self->{_properties}->{filename}) { return $self->{_properties}->{filename}; } - $self->session->errorHandler->fatal('Attempted to retrieve filename before one was set'); + $self->session->log->fatal('Attempted to retrieve filename before one was set'); return ''; } @@ -250,6 +250,7 @@ The height of the image in pixels. sub setImageHeight { my $self = shift; my $height = shift; + die "Must have a height" unless $height; $self->image->Extent(height => $height); $self->image->Colorize(fill => $self->getBackgroundColor); $self->{_properties}->{height} = $height; @@ -270,6 +271,7 @@ Teh width of the image in pixels. sub setImageWidth { my $self = shift; my $width = shift; + die "Must have a width" unless $width; $self->image->Extent(width => $width); $self->image->Colorize(fill => $self->getBackgroundColor); $self->{_properties}->{width} = $width; diff --git a/lib/WebGUI/Image/Color.pm b/lib/WebGUI/Image/Color.pm index f8d5e1596..7783632c6 100644 --- a/lib/WebGUI/Image/Color.pm +++ b/lib/WebGUI/Image/Color.pm @@ -356,7 +356,7 @@ sub setFillColor { $self->setFillTriplet($1); $self->setFillAlpha($2 || '00'); } else { - $self->session->errorHandler->fatal("Invalid fill color: ($color)"); + $self->session->log->fatal("Invalid fill color: ($color)"); } } @@ -380,7 +380,7 @@ sub setFillTriplet { $self->{_properties}->{fillTriplet} = $triplet; $self->update; } else { - $self->session->errorHandler->fatal("Invalid fill triplet: ($triplet)"); + $self->session->log->fatal("Invalid fill triplet: ($triplet)"); } } @@ -404,7 +404,7 @@ sub setFillAlpha { $self->{_properties}->{fillAlpha} = $alpha; $self->update; } else { - $self->session->errorHandler->fatal("Invalid fill alpha: ($alpha)"); + $self->session->log->fatal("Invalid fill alpha: ($alpha)"); } } @@ -448,7 +448,7 @@ sub setStrokeColor { $self->setStrokeTriplet($1); $self->setStrokeAlpha($2 || '00'); } else { - $self->session->errorHandler->fatal("Invalid stroke color: ($color)"); + $self->session->log->fatal("Invalid stroke color: ($color)"); } } @@ -472,7 +472,7 @@ sub setStrokeTriplet { $self->{_properties}->{strokeTriplet} = $triplet; $self->update; } else { - $self->session->errorHandler->fatal("Invalid stroke triplet: ($triplet)"); + $self->session->log->fatal("Invalid stroke triplet: ($triplet)"); } } @@ -496,7 +496,7 @@ sub setStrokeAlpha { $self->{_properties}->{strokeAlpha} = $alpha; $self->update; } else { - $self->session->errorHandler->fatal("Invalid stroke alpha: ($alpha)"); + $self->session->log->fatal("Invalid stroke alpha: ($alpha)"); } } diff --git a/lib/WebGUI/Image/Font.pm b/lib/WebGUI/Image/Font.pm index fc5d81178..a14f5ef92 100644 --- a/lib/WebGUI/Image/Font.pm +++ b/lib/WebGUI/Image/Font.pm @@ -2,6 +2,7 @@ package WebGUI::Image::Font; use strict; use WebGUI::Storage; +use WebGUI::Paths; #------------------------------------------------------------------- @@ -72,7 +73,7 @@ sub getFile { if ($self->getStorageId) { return WebGUI::Storage->get($self->session, $self->getStorageId)->getPath($self->getFilename); } else { - return $self->session->config->getWebguiRoot."/lib/default.ttf" + return WebGUI::Paths->share . '/default.ttf'; } } diff --git a/lib/WebGUI/Image/Graph.pm b/lib/WebGUI/Image/Graph.pm index 3b6931051..9c6194838 100644 --- a/lib/WebGUI/Image/Graph.pm +++ b/lib/WebGUI/Image/Graph.pm @@ -5,7 +5,6 @@ use WebGUI::Image; use WebGUI::Image::Palette; use WebGUI::Image::Font; use List::Util; -use WebGUI::Utility; use WebGUI::Pluggable; our @ISA = qw(WebGUI::Image); @@ -56,79 +55,75 @@ sub addDataset { #------------------------------------------------------------------- -=head2 configurationForm ( ) +=head2 configurationForm ( $tab ) -Returns a hashref containing the form where the properties of your graph type -can be set. Your pluging should extend this method by append the form to the -hashref returned by the super method and returning the reference. - -The key for this entry must be unique, so use the namespace of your plugin -without the WebGUI::Image part; the :: converted to and underscore and -everything in lowercase. +Adds form fields for this type of graph plugin to a WebGUI::FormBuilder::Tab object. +Your plugin should extend this method by first calling SUPER. Check some of the plugins that come with WebGUI for examples. +=head3 $tab + +A WebGUI::FormBuilder::Tab object to append the form fields to. + =cut sub configurationForm { my $self = shift; + my $tab = shift; my $i18n = WebGUI::International->new($self->session, 'Image_Graph'); - my $f = WebGUI::HTMLForm->new($self->session); - $f->trClass('Graph'); - $f->integer( - -name => 'graph_imageWidth', - -value => $self->getImageWidth, - -label => $i18n->get('image width'), - -hoverHelp => $i18n->get('image width description'), + $tab->addField('integer', + name => 'graph_imageWidth', + value => $self->getImageWidth, + label => $i18n->get('image width'), + hoverHelp => $i18n->get('image width description'), ); - $f->integer( - -name => 'graph_imageHeight', - -value => $self->getImageHeight, - -label => $i18n->get('image height'), - -hoverHelp => $i18n->get('image height description'), + $tab->addField('integer', + name => 'graph_imageHeight', + value => $self->getImageHeight, + label => $i18n->get('image height'), + hoverHelp => $i18n->get('image height description'), ); - $f->color( - -name => 'graph_backgroundColor', - -value => $self->getBackgroundColor, - -label => $i18n->get('background color'), - -hoverHelp => $i18n->get('background color description'), + $tab->addField('color', + name => 'graph_backgroundColor', + value => $self->getBackgroundColor, + label => $i18n->get('background color'), + hoverHelp => $i18n->get('background color description'), ); - $f->selectBox( - -name => 'graph_paletteId', - -label => $i18n->get('palette'), - -hoverHelp => $i18n->get('palette description'), - -value => [ $self->getPalette->getId ], - -options=> $self->getPalette->getPaletteList, + $tab->addField('selectBox', + name => 'graph_paletteId', + label => $i18n->get('palette'), + hoverHelp => $i18n->get('palette description'), + value => [ $self->getPalette->getId ], + options=> $self->getPalette->getPaletteList, ); - $f->float( - -name => 'graph_labelOffset', - -value => $self->getLabelOffset, - -label => $i18n->get('label offset'), - -hoverHelp => $i18n->get('label offset description'), + $tab->addField('float', + name => 'graph_labelOffset', + value => $self->getLabelOffset, + label => $i18n->get('label offset'), + hoverHelp => $i18n->get('label offset description'), ); - $f->selectBox( - -name => 'graph_labelFontId', - -value => [ $self->getLabelFont->getId ], - -label => $i18n->get('label font'), - -hoverHelp => $i18n->get('label font description'), - -options=> WebGUI::Image::Font->getFontList($self->session), + $tab->addField('selectBox', + name => 'graph_labelFontId', + value => [ $self->getLabelFont->getId ], + label => $i18n->get('label font'), + hoverHelp => $i18n->get('label font description'), + options=> WebGUI::Image::Font->getFontList($self->session), ); - $f->color( - -name => 'graph_labelColor', - -value => $self->getLabelColor, - -label => $i18n->get('label color'), - -hoverHelp => $i18n->get('label color description'), + $tab->addField('color', + name => 'graph_labelColor', + value => $self->getLabelColor, + label => $i18n->get('label color'), + hoverHelp => $i18n->get('label color description'), ); - $f->integer( - -name => 'graph_labelFontSize', - -value => $self->getLabelFontSize, - -label => $i18n->get('label fontsize'), - -hoverHelp => $i18n->get('label fontsize description'), + $tab->addField('integer', + name => 'graph_labelFontSize', + value => $self->getLabelFontSize, + label => $i18n->get('label fontsize'), + hoverHelp => $i18n->get('label fontsize description'), ); - - return {'graph' => $f->printRowsOnly}; } #------------------------------------------------------------------- @@ -212,15 +207,16 @@ sub getConfiguration { #------------------------------------------------------------------- -=head2 getGraphingTab ( session, [ config ] ) +=head2 getGraphingTab ( tab, [ config ] ) Returns the contents of the graphing tab you can add to your asset. -This is a class method, and therefore you must pass the WebGUI session object. +This is a class method. -=head3 session +=head3 tab -An instanciated WebGUI session object. +An instanciated WebGUI::FormBuilder::Tab object. The session is taken +from this. =head3 config @@ -229,27 +225,21 @@ Optionally you can pass a configuration hash to populate the form =cut sub getGraphingTab { - my (%configForms, $output); - my $class = shift; - my $session = shift; - my $config = shift; + my $class = shift; + my $tab = shift; + my $config = shift; + my $session = $tab->session; my (@graphingPlugins, %graphingPlugins, @failedGraphingPlugins); my $i18n = WebGUI::International->new($session, 'Image_Graph'); - my $f = WebGUI::HTMLForm->new($session); - unless ($session->config->get("graphingPlugins")) { - $f->readOnly( - -value => $i18n->get('no graphing plugins in config'), - ); - - return $f->printRowsOnly; + $tab->addField('readOnly', { value => $i18n->get('no graphing plugins in config'), }); } foreach (@{$session->config->get("graphingPlugins")}) { -my $plugin = WebGUI::Image::Graph->load($session, $_); + my $plugin = WebGUI::Image::Graph->load($session, $_); if ($plugin) { push(@graphingPlugins, $plugin); $plugin->setConfiguration($config); @@ -260,82 +250,76 @@ my $plugin = WebGUI::Image::Graph->load($session, $_); } my $ns = $config->{graph_formNamespace}; - # payment plugin - if (%graphingPlugins) { - $session->style->setRawHeadTags(< - function inNamespace (clas, namespace) { - var namespaceParts = namespace.split('_'); - var s = ''; - - for (var i = 0; i < namespaceParts.length; i++) { - if (i > 0) { - s = s + '_'; - } - s = s + namespaceParts[i]; - - if (s == clas) { - return true; - } - } + if (%graphingPlugins) { + $session->style->setRawHeadTags(< + function inNamespace (clas, namespace) { + var namespaceParts = namespace.split('_'); + var s = ''; - return false; - } - - function getContainerTag (elem, tagname) { - var parent = elem.parentNode; - - while (parent.tagName != tagname) { - parent = parent.parentNode; - } + for (var i = 0; i < namespaceParts.length; i++) { + if (i > 0) { + s = s + '_'; + } + s = s + namespaceParts[i]; - return parent; - } + if (s == clas) { + return true; + } + } - function switchGraphingFormElements (elem, namespace) { - var rowElements = getContainerTag(elem, 'TABLE').getElementsByTagName('TR'); + return false; + } - for (var ix = 0; ix < rowElements.length; ix++) { - if (inNamespace(rowElements[ix].className, namespace)) { - rowElements[ix].style.display = ''; - } else { - if (rowElements[ix].className.match(/^Graph_/)) { - rowElements[ix].style.display = 'none'; - } - } - } - } - + function getContainerTag (elem, tagname) { + var parent = elem.parentNode; + + while (parent.tagName != tagname) { + parent = parent.parentNode; + } + + return parent; + } + + function switchGraphingFormElements (elem, namespace) { + var rowElements = getContainerTag(elem, 'TABLE').getElementsByTagName('TR'); + + for (var ix = 0; ix < rowElements.length; ix++) { + if (inNamespace(rowElements[ix].className, namespace)) { + rowElements[ix].style.display = ''; + } else { + if (rowElements[ix].className.match(/^Graph_/)) { + rowElements[ix].style.display = 'none'; + } + } + } + } + EOS -); - - $f->selectBox( - -name => 'graphingPlugin', - -options => \%graphingPlugins, - -label => $i18n->get('graph type'), - -hoverHelp => $i18n->get('graph type description'), - -id => 'graphTypeSelector', - -value => [ $config->{graph_formNamespace} ], - -extras => 'onchange="switchGraphingFormElements(this, this.value)"' - ); + ); - foreach my $currentPlugin (@graphingPlugins) { - %configForms = (%configForms, %{$currentPlugin->configurationForm}); - } - } else { - $f->raw(''.$i18n->get('no graphing plugins').''); - } - - foreach (sort keys %configForms) { - $f->raw($configForms{$_}); - } + $tab->addField('selectBox', + name => 'graphingPlugin', + options => \%graphingPlugins, + label => $i18n->get('graph type'), + hoverHelp => $i18n->get('graph type description'), + id => 'graphTypeSelector', + value => [ $config->{graph_formNamespace} ], + extras => 'onchange="switchGraphingFormElements(this, this.value)"', + ); - $f->raw('' - ); - - return $f->printRowsOnly; + foreach my $currentPlugin (@graphingPlugins) { + $currentPlugin->configurationForm($tab); + } + } else { + $tab->addField('readOnly', value => $i18n->get('no graphing plugins'), ); + } + + $tab->addField('readOnly', value => < + switchGraphingFormElements(document.getElementById('graphTypeSelector'), '$ns') + +EOJS } #------------------------------------------------------------------- @@ -576,7 +560,7 @@ sub loadByConfiguration { my $namespace = "WebGUI::Image::".$config->{graph_formNamespace}; $namespace =~ s/_/::/g; - $session->errorHandler->fatal("wrong namespace: [$namespace]") unless ($config->{graph_formNamespace} =~ /^[\w\d_]+$/); + $session->log->fatal("wrong namespace: [$namespace]") unless ($config->{graph_formNamespace} =~ /^[\w\d_]+$/); my $plugin = $self->load($session, $namespace); $plugin->setConfiguration($config); @@ -601,14 +585,18 @@ sub processConfigurationForm { my $class = shift; my $session = shift; - return undef unless ($class->getPluginList($session)); + if (! $class->getPluginList($session)) { + WebGUI::Error->throw(error => "No graphing plugins listed in config") + } my $namespace = "WebGUI::Image::".$session->form->process('graphingPlugin'); $namespace =~ s/_/::/g; - return undef unless (isIn($namespace, @{$class->getPluginList($session)})); + if (! $namespace ~~ $class->getPluginList($session)) { + WebGUI::Error->throw(error => "Graphing plugin not available") + } -my $graph = $class->load($session, $namespace); + my $graph = $class->load($session, $namespace); $graph->setConfiguration($session->form->paramsHashRef); @@ -633,6 +621,9 @@ sub setConfiguration { my $self = shift; my $config = shift; + $config->{graph_imageWidth} ||= 300; + $config->{graph_imageHeight} ||= 300; + $self->setPalette(WebGUI::Image::Palette->new($self->session, $config->{graph_paletteId})); $self->setLabelOffset($config->{graph_labelOffset}); $self->setLabelFontSize($config->{graph_labelFontSize}); diff --git a/lib/WebGUI/Image/Graph/Pie.pm b/lib/WebGUI/Image/Graph/Pie.pm index b2bd66259..a0a4d092f 100644 --- a/lib/WebGUI/Image/Graph/Pie.pm +++ b/lib/WebGUI/Image/Graph/Pie.pm @@ -331,85 +331,80 @@ documentation. sub configurationForm { my $self = shift; - + my $tab = shift; + + $self->SUPER::configurationForm($tab); my $i18n = WebGUI::International->new($self->session, 'Image_Graph_Pie'); - - my $f = WebGUI::HTMLForm->new($self->session); - $f->trClass('Graph_Pie'); - $f->float( - -name => 'pie_radius', - -value => $self->getRadius, - -label => $i18n->get('radius'), - -hoverHelp => $i18n->get('radius description'), + + $tab->addField('float', + name => 'pie_radius', + value => $self->getRadius, + label => $i18n->get('radius'), + hoverHelp => $i18n->get('radius description'), ); - $f->float( - -name => 'pie_topHeight', - -value => $self->getTopHeight, - -label => $i18n->get('pie height'), - -hoverHelp => $i18n->get('pie height description'), + $tab->addField('float', + name => 'pie_topHeight', + value => $self->getTopHeight, + label => $i18n->get('pie height'), + hoverHelp => $i18n->get('pie height description'), ); - $f->float( - -name => 'pie_tiltAngle', - -value => $self->getTiltAngle, - -label => $i18n->get('tilt angle'), - -hoverHelp => $i18n->get('tilt angle description'), + $tab->addField('float', + name => 'pie_tiltAngle', + value => $self->getTiltAngle, + label => $i18n->get('tilt angle'), + hoverHelp => $i18n->get('tilt angle description'), ); - $f->float( - -name => 'pie_startAngle', - -value => $self->getStartAngle, - -label => $i18n->get('start angle'), - -hoverHelp => $i18n->get('start angle description'), + $tab->addField('float', + name => 'pie_startAngle', + value => $self->getStartAngle, + label => $i18n->get('start angle'), + hoverHelp => $i18n->get('start angle description'), ); - $f->selectBox( - -name => 'pie_pieMode', - -value => [ $self->getPieMode ], - -label => $i18n->get('pie mode'), - -hoverHelp => $i18n->get('pie mode description'), - -options => { + $tab->addField('selectBox', + name => 'pie_pieMode', + value => [ $self->getPieMode ], + label => $i18n->get('pie mode'), + hoverHelp => $i18n->get('pie mode description'), + options => { normal => $i18n->get('normal'), stepped => $i18n->get('stepped'), }, ); - $f->yesNo( - -name => 'pie_shadedSides', - -value => $self->hasShadedSides, - -label => $i18n->get('shade sides'), - -hoverHelp => $i18n->get('shade sides description'), + $tab->addField('yesNo', + name => 'pie_shadedSides', + value => $self->hasShadedSides, + label => $i18n->get('shade sides'), + hoverHelp => $i18n->get('shade sides description'), ); - $f->float( - -name => 'pie_stickLength', - -value => $self->getStickLength, - -label => $i18n->get('stick length'), - -hoverHelp => $i18n->get('stick length description'), + $tab->addField('float', + name => 'pie_stickLength', + value => $self->getStickLength, + label => $i18n->get('stick length'), + hoverHelp => $i18n->get('stick length description'), ); - $f->float( - -name => 'pie_stickOffset', - -value => $self->getStickOffset, - -label => $i18n->get('stick offset'), - -hoverHelp => $i18n->get('stick offset description'), + $tab->addField('float', + name => 'pie_stickOffset', + value => $self->getStickOffset, + label => $i18n->get('stick offset'), + hoverHelp => $i18n->get('stick offset description'), ); - $f->color( - -name => 'pie_stickColor', - -value => $self->getStickColor, - -label => $i18n->get('stick color'), - -hoverHelp => $i18n->get('stick color description'), + $tab->addField('color', + name => 'pie_stickColor', + value => $self->getStickColor, + label => $i18n->get('stick color'), + hoverHelp => $i18n->get('stick color description'), ); - $f->selectBox( - -name => 'pie_labelPosition', - -value => [ $self->getLabelPosition ], - -label => $i18n->get('label position'), - -hoverHelp => $i18n->get('label position description'), - -options=> { + $tab->addField('selectBox', + name => 'pie_labelPosition', + value => [ $self->getLabelPosition ], + label => $i18n->get('label position'), + hoverHelp => $i18n->get('label position description'), + options=> { center => $i18n->get('center'), top => $i18n->get('top'), bottom => $i18n->get('bottom'), }, ); - -my $configForms = $self->SUPER::configurationForm; - $configForms->{'graph_pie'} = $f->printRowsOnly; - - return $configForms; } #------------------------------------------------------------------- diff --git a/lib/WebGUI/Image/Graph/XYGraph.pm b/lib/WebGUI/Image/Graph/XYGraph.pm index 9bb0c7f29..42fad637c 100644 --- a/lib/WebGUI/Image/Graph/XYGraph.pm +++ b/lib/WebGUI/Image/Graph/XYGraph.pm @@ -41,58 +41,56 @@ documentation. =cut sub configurationForm { - my ($configForms, $f); my $self = shift; + my $tab = shift; my $i18n = WebGUI::International->new($self->session, 'Image_Graph_XYGraph'); - $configForms = $self->SUPER::configurationForm; + $self->SUPER::configurationForm($tab); - $f = WebGUI::HTMLForm->new($self->session); - $f->trClass('Graph_XYGraph'); - $f->integer( + $tab->addField('integer', name => 'xyGraph_chartWidth', value => $self->getChartWidth, label => $i18n->get('chart width'), hoverHelp => $i18n->get('chart width description'), ); - $f->integer( + $tab->addField('integer', name => 'xyGraph_chartHeight', value => $self->getChartHeight, label => $i18n->get('chart height'), hoverHelp => $i18n->get('chart height description'), ); - $f->yesNo( + $tab->addField('yesNo', name => 'xyGraph_drawLabels', value => $self->showLabels, label => $i18n->get('draw labels'), hoverHelp => $i18n->get('draw labels description'), ); - $f->yesNo( + $tab->addField('yesNo', name => 'xyGraph_drawAxis', value => $self->showAxis, label => $i18n->get('draw axis'), hoverHelp => $i18n->get('draw axis description'), ); - $f->color( + $tab->addField('color', name => 'xyGraph_axisColor', value => $self->getAxisColor, label => $i18n->get('axis color'), hoverHelp => $i18n->get('axis color description'), ); - $f->yesNo( + $tab->addField('yesNo', name => 'xyGraph_drawRulers', value => $self->showRulers, label => $i18n->get('draw rulers'), hoverHelp => $i18n->get('draw rulers description'), ); - $f->color( + $tab->addField('color', name => 'xyGraph_rulerColor', value => $self->getRulerColor, label => $i18n->get('ruler color'), hoverHelp => $i18n->get('ruler color description'), ); - $f->selectBox( + $tab->addField('selectBox', name => 'xyGraph_drawMode', value => [ $self->getDrawMode ], label => $i18n->get('draw mode'), @@ -103,15 +101,12 @@ sub configurationForm { stacked => 'Stacked (cumulative', }, ); - $f->float( + $tab->addField('float', name => 'xyGraph_yGranularity', value => $self->getYGranularity, label => $i18n->get('y granularity'), hoverHelp => $i18n->get('y granularity description'), ); - - $configForms->{'graph_xygraph'} = $f->printRowsOnly; - return $configForms; } #------------------------------------------------------------------- diff --git a/lib/WebGUI/Image/Graph/XYGraph/Bar.pm b/lib/WebGUI/Image/Graph/XYGraph/Bar.pm index 32f77e965..c6685d992 100644 --- a/lib/WebGUI/Image/Graph/XYGraph/Bar.pm +++ b/lib/WebGUI/Image/Graph/XYGraph/Bar.pm @@ -4,7 +4,6 @@ use strict; use WebGUI::Image::Graph::XYGraph; use List::Util; use POSIX; -use WebGUI::Utility; our @ISA = qw(WebGUI::Image::Graph::XYGraph); @@ -48,28 +47,23 @@ more information. sub configurationForm { my $self = shift; + my $tab = shift; my $i18n = WebGUI::International->new($self->session, 'Image_Graph_XYGraph_Bar'); - my $configForms = $self->SUPER::configurationForm; -my $f = WebGUI::HTMLForm->new($self->session); - $f->trClass('Graph_XYGraph_Bar'); - $f->float( + $self->SUPER::configurationForm($tab); + $tab->addField('float', name => 'xyGraph_bar_barSpacing', value => $self->getBarSpacing, label => $i18n->get('bar spacing'), hoverHelp => $i18n->get('bar spacing description'), ); - $f->float( + $tab->addField('float', name => 'xyGraph_bar_groupSpacing', value => $self->getGroupSpacing, label => $i18n->get('group spacing'), hoverHelp => $i18n->get('group spacing description'), ); - - $configForms->{'graph_xygraph_bar'} = $f->printRowsOnly; - - return $configForms; } #------------------------------------------------------------------- @@ -251,7 +245,7 @@ sub getAnchorSpacing { my $numberOfGroups = List::Util::max(map {scalar @$_} @{$self->getDataset}); - my $spacing = round(($self->getChartWidth - ($numberOfGroups-1) * $self->getGroupSpacing) / $numberOfGroups + $self->getGroupSpacing); + my $spacing = sprintf('%.0f', ($self->getChartWidth - ($numberOfGroups-1) * $self->getGroupSpacing) / $numberOfGroups + $self->getGroupSpacing); return { x => $spacing, @@ -320,7 +314,7 @@ sub getFirstAnchorLocation { my $self = shift; return { - x => round($self->getChartOffset->{x} + ($self->getAnchorSpacing->{x} - $self->getGroupSpacing) / 2), + x => sprintf('%.0f', $self->getChartOffset->{x} + ($self->getAnchorSpacing->{x} - $self->getGroupSpacing) / 2), y => $self->getChartOffset->{y} + $self->getChartHeight } } diff --git a/lib/WebGUI/Inbox.pm b/lib/WebGUI/Inbox.pm index 00a2edf44..820c7856b 100644 --- a/lib/WebGUI/Inbox.pm +++ b/lib/WebGUI/Inbox.pm @@ -3,7 +3,7 @@ package WebGUI::Inbox; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -119,19 +119,6 @@ sub canRead { #------------------------------------------------------------------- -=head2 DESTROY ( ) - -Deconstructor. - -=cut - -sub DESTROY { - my $self = shift; - undef $self; -} - -#------------------------------------------------------------------- - =head2 deleteMessagesForUser ( $user ) Deletes all messages for a user. @@ -388,7 +375,7 @@ sub getMessagesPaginator { my $whereClause = $properties->{whereClause} || ''; #Make sure a valid sortBy is passed in - if($sortBy && !WebGUI::Utility::isIn($sortBy,qw( subject sentBy dateStamp status ))) { + if($sortBy && !$sortBy ~~ [qw( subject sentBy dateStamp status )]) { $sortBy = q{dateStamp} } #Sort by fullname if user wants to sort by who sent the message @@ -495,7 +482,7 @@ sub getMessageSql { $select =<session->errorHandler->warn("Failed to retrieve language properties because ".$@) if ($@); + $self->session->log->warn("Failed to retrieve language properties because ".$@) if ($@); if ($property) { return $langInfo->{$property}; } @@ -280,7 +279,7 @@ Specify a default language. Defaults to user preference or "English". sub new { my ($class, $session, $namespace, $language) = @_; $namespace ||= 'WebGUI'; - $language ||= $session->scratch->getLanguageOverride() || $session->user->profileField('language'); + $language ||= $session->scratch->getLanguageOverride() || $session->user->get('language'); my $self = bless { _session => $session, diff --git a/lib/WebGUI/JSONCollateral.pm b/lib/WebGUI/JSONCollateral.pm index e252777d2..8064bdce8 100644 --- a/lib/WebGUI/JSONCollateral.pm +++ b/lib/WebGUI/JSONCollateral.pm @@ -3,7 +3,7 @@ package WebGUI::JSONCollateral; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Keyword.pm b/lib/WebGUI/Keyword.pm index 924ff7eef..e9c089aaf 100644 --- a/lib/WebGUI/Keyword.pm +++ b/lib/WebGUI/Keyword.pm @@ -3,7 +3,7 @@ package WebGUI::Keyword; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -15,7 +15,13 @@ package WebGUI::Keyword; =cut use strict; -use Class::InsideOut qw(public register id); +use Moose; + +has session => ( + is => 'ro', + required => 1, +); + use HTML::TagCloud; use WebGUI::Paginator; @@ -40,6 +46,17 @@ These methods are available from this class: =cut +around BUILDARGS => sub { + my $orig = shift; + my $className = shift; + + ##Original arguments start here. + my $protoSession = $_[0]; + if (blessed $protoSession && $protoSession->isa('WebGUI::Session')) { + return $className->$orig(session => $protoSession); + } + return $className->$orig(@_); +}; #------------------------------------------------------------------- @@ -49,9 +66,6 @@ Returns a reference to the current session. =cut -public session => my %session; - - #------------------------------------------------------------------- =head2 deleteKeywordsForAsset ( $asset ) @@ -128,7 +142,10 @@ sub findKeywords { $parentAsset = $options->{asset}; } if ($options->{assetId}) { - $parentAsset = WebGUI::Asset->new($self->session, $options->{assetId}); + $parentAsset = eval { WebGUI::Asset->newById($self->session, $options->{assetId}); }; + if (Exception::Class->caught()) { + $self->session->log->error("Keywords: error instanciating parentAsset by assetId ". $options->{assetId}.": $@"); + } } if ($parentAsset) { $sql .= ' INNER JOIN asset USING (assetId)'; @@ -493,15 +510,6 @@ A reference to the current session. =cut -sub new { - my $class = shift; - my $session = shift; - my $self = bless \do {my $s}, $class; - register($self); - $session{id $self} = $session; - return $self; -} - #------------------------------------------------------------------- =head2 replaceKeyword ( { currentKeyword => $keyword1, newKeyword => $keyword2 } ) diff --git a/lib/WebGUI/LDAPLink.pm b/lib/WebGUI/LDAPLink.pm index ab9434759..b40ef01c1 100644 --- a/lib/WebGUI/LDAPLink.pm +++ b/lib/WebGUI/LDAPLink.pm @@ -3,7 +3,7 @@ package WebGUI::LDAPLink; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -16,7 +16,7 @@ package WebGUI::LDAPLink; use strict; -use Tie::CPHash; +use Tie::IxHash; use WebGUI::International; use Net::LDAP; @@ -35,8 +35,8 @@ This package contains utility methods for WebGUI's ldap link system. %ldapLink = WebGUI::LDAPLink->new($self->session,$ldapLinkId)->get; $ldapLink = WebGUI::LDAPLink->new($self->session,$ldapLinkId); - $connection = $ldapLink->authenticate(); - $ldapLink->disconnect; + $connection = $ldapLink->connectToLDAP(); + $ldapLink->unbind; =head1 METHODS @@ -121,10 +121,10 @@ sub connectToLDAP { } #------------------------------------------------------------------- + sub DESTROY { my $self = shift; $self->unbind; - undef $self; } #------------------------------------------------------------------- diff --git a/lib/WebGUI/Macro.pm b/lib/WebGUI/Macro.pm index 22f65b676..9e014ca89 100644 --- a/lib/WebGUI/Macro.pm +++ b/lib/WebGUI/Macro.pm @@ -3,7 +3,7 @@ package WebGUI::Macro; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -15,6 +15,7 @@ package WebGUI::Macro; =cut use strict; +use 5.010; use WebGUI::Pluggable; =head1 NAME @@ -42,52 +43,53 @@ These functions are available from this package: =cut #------------------------------------------------------------------- -my $macro_re; -BEGIN { - if ( eval { require 5.010 } ) { - $macro_re = eval <<'END_REGEX'; - qr{ - ( # capture #1 - entire macro call - \^ # start with carat - ([-a-zA-Z0-9_@#/*]{1,64}) # capture #2 - macro name - ( # capture #3 - parenthesis - \( # start with open parenthesis - (?: # followed by - (?> [^()] ) # non-parenthesis - | # or - (?>\\[()]) # Escaped parenthesis - | # or - (?3) # a balanced parenthesis block (recursive) - )* # zero or more times - \) # ending with closing parenthesis - )? - ; # End with a semicolon. - ) - }msx; -END_REGEX - } - else { - my $parenthesis; - $parenthesis = qr{ - \( # Start with '(', - (?: # Followed by - (?>\\[()]) # Escaped parenthesis - | # or - (?>[^()]) # Non-parenthesis - | # or - (??{ $parenthesis }) # a balanced parenthesis block - )* # zero or more times - \) # Ending with ')' - }x; +my $macro_re = qr{ + ( # capture #1 - entire macro call + \^ # start with carat + ([-a-zA-Z0-9_@#/*]{1,64}) # capture #2 - macro name + ( # capture #3 - parenthesis + \( # start with open parenthesis + (?: # followed by + (?> [^()] ) # non-parenthesis + | # or + (?>\\[()]) # Escaped parenthesis + | # or + (?3) # a balanced parenthesis block (recursive) + )* # zero or more times + \) # ending with closing parenthesis + )? + ; # End with a semicolon. + ) +}msx; + +my $quote_re = qr{ + (? 16 ) { - $session->errorHandler->error($2 . " : Too many levels of macro recursion. Stopping."); + $session->log->error($2 . " : Too many levels of macro recursion. Stopping."); "Too many levels of macro recursion. Stopping."; } else { @@ -168,13 +170,13 @@ sub process { sub _processMacro { my $session = shift; my $macroname = shift; - my $parameters = shift; + my $parameterString = shift; if ($macroname =~ /^[-0-9]$/) { # ^0; ^1; ^2; and ^-; have special uses, don't replace return; } my $macrofile = $session->config->get("macros")->{$macroname}; if (!$macrofile) { - $session->errorHandler->error("No macro with name $macroname defined."); + $session->log->error("No macro with name $macroname defined."); return; } my $macropackage = "WebGUI::Macro::$macrofile"; @@ -187,48 +189,16 @@ sub _processMacro { $session->log->error("Macro has no process sub: $macropackage."); return; } - $parameters =~ s/^\(//; - $parameters =~ s/\)$//; - my @params; - while ($parameters =~ m{ - (?($session, @params); 1 } ) { # call process sub with parameters + unless ( eval { $output = $process->($session, @$params); 1 } ) { # call process sub with parameters $session->log->error("Unable to process macro '$macroname': $@"); return; } @@ -238,5 +208,118 @@ sub _processMacro { return $output; } +sub _processParameters { + my $parameters = shift; + + $parameters =~ s/^\(//; + $parameters =~ s/\)$//; + + my @params; + while ($parameters =~ m{$quote_re}msxg) { + # three matches, only one will exist per run + my $param = $+; + $param =~ s/\\(.)/$1/xmsg; # deal with backslash escapes + push @params, $param; + } + + return \@params; +} + +=head2 transform ( $session, \$content, $sub ) + +Transforms the macro calls in $content accoring to $sub. For each macro call found, $sub will be called with a hash of information about the call. The return value of the sub should be either undef to leave the macro call untouched, or a string to replace the macro call with. Macros are not processed recursively. If recursive processing is needed, trannsform can be called again inside $sub. + +=head3 $session + +The WebGUI session to use. + +=head3 \$content + +A reference to a string to transform macros in. The string will be modified in place. + +=head3 $sub + +A sub reference to call for each macro call. + +The hash passed to $sub will contain: + +=over 4 + +=item session + +The session passed in. + +=item macro + +The name of the macro called. + +=item macroPackage + +The module name for the macro from the config file. + +=item originalString + +The full original text of the macro call. + +=item parameters + +An array reference to the parameters passed to the macro. + +=item parameterString + +The full original text of the parameters. + +=back + +=cut + +sub transform { + my $session = shift; + my $content = shift; + my $sub = shift; + + ${ $content } =~ s{$macro_re}{ + my $initialText = $1; + my $replaceText = _transformMacro($session, $sub, $initialText, $2, $3); + # _processMacro returns undef on failure, use original text + defined $replaceText ? $replaceText : $initialText; + }ge; +} + +sub _transformMacro { + my $session = shift; + my $sub = shift; + my $original = shift; + my $macro = shift; + my $paramString = shift; + + my $macroPackage = "WebGUI::Macro::" . $session->config->get("macros")->{$macro}; + my $params = _processParameters($paramString); + return $sub->({ + session => $session, + macro => $macro, + macroPackage => $macroPackage, + originalString => $original, + parameters => $params, + parameterString => $paramString, + }); +} + +=head2 quote ($text) + +Escape backslashes and single quotes, and then return the text wrapped in single quotes. + +=head3 $text + +Text to quote. + +=cut + +sub quote { + my $text = shift; + $text =~ s/([\\'])/\\$1/g; + return "'$text'"; +} + 1; diff --git a/lib/WebGUI/Macro/AOIHits.pm b/lib/WebGUI/Macro/AOIHits.pm index 51bc0ae64..8169886b5 100644 --- a/lib/WebGUI/Macro/AOIHits.pm +++ b/lib/WebGUI/Macro/AOIHits.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::AOIHits; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Macro/AOIRank.pm b/lib/WebGUI/Macro/AOIRank.pm index 8b2d1bfe5..3d99c9fc5 100644 --- a/lib/WebGUI/Macro/AOIRank.pm +++ b/lib/WebGUI/Macro/AOIRank.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::AOIRank; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Macro/AdSpace.pm b/lib/WebGUI/Macro/AdSpace.pm index 7cdefabdf..2826735f5 100644 --- a/lib/WebGUI/Macro/AdSpace.pm +++ b/lib/WebGUI/Macro/AdSpace.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::AdSpace; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Macro/AdminBar.pm b/lib/WebGUI/Macro/AdminBar.pm deleted file mode 100644 index a19d80017..000000000 --- a/lib/WebGUI/Macro/AdminBar.pm +++ /dev/null @@ -1,204 +0,0 @@ -package WebGUI::Macro::AdminBar; - -#------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. -#------------------------------------------------------------------- -# Please read the legal notices (docs/legal.txt) and the license -# (docs/license.txt) that came with this distribution before using -# this software. -#------------------------------------------------------------------- -# http://www.plainblack.com info@plainblack.com -#------------------------------------------------------------------- - -use strict qw(refs vars); -use WebGUI::AdminConsole; -use WebGUI::Asset; -use WebGUI::International; -use WebGUI::Macro; -use WebGUI::Utility; -use WebGUI::VersionTag; - -=head1 NAME - -Package WebGUI::Macro::AdminBar - -=head1 DESCRIPTION - -Macro for displaying administrative functions to a user with Admin turned on. - -=head2 process ( ) - -process takes one optional parameters for customizing the layout of the Admin bar. - -=cut - - -sub process { - my $session = shift; - return undef unless $session->var->isAdminOn; - my $i18n = WebGUI::International->new($session,'Macro_AdminBar'); - my ($url, $style, $asset, $user, $config) = $session->quick(qw(url style asset user config)); - $style->setScript($url->extras('yui/build/utilities/utilities.js'), {type=>'text/javascript'}); - $style->setScript($url->extras('accordion/accordion.js'), {type=>'text/javascript'}); - $style->setLink($url->extras('macro/AdminBar/slidePanel.css'), {type=>'text/css', rel=>'stylesheet'}); - - my $out = q{
    }; - - # admin console - my $ac = WebGUI::AdminConsole->new($session); - $out .= q{
    }.$i18n->get("admin console","AdminConsole").q{
    \n}; - - # version tags - my $versionTags = WebGUI::VersionTag->getOpenTags($session); - if (scalar(@$versionTags)) { - $out .= q{
    }.$i18n->get("version tags","VersionTag").q{
    }; - my $working = WebGUI::VersionTag->getWorking($session, 1); - my $workingId = ""; - if ($working) { - $workingId = $working->getId; - my $commitUrl = ""; - if ($session->setting->get("skipCommitComments")) { - $commitUrl = $url->page("op=commitVersionTagConfirm;tagId=".$workingId); - } - else { - $commitUrl = $url->page("op=commitVersionTag;tagId=".$workingId); - } - $out .= WebGUI::Form::formHeader($session, { action => $commitUrl, }) - . q{} - . WebGUI::Form::formFooter($session); - } - foreach my $tag (@{$versionTags}) { - next unless $user->isInGroup($tag->get("groupToUse")); - my $switchUrl = $url->page("op=" . ($tag->getId eq $workingId ? "editVersionTag" : "setWorkingVersionTag") . ";backToSite=1;tagId=".$tag->getId); - my $title = ($tag->getId eq $workingId) ? '* '.$tag->get("name").'' : $tag->get("name"); - $out .= q{}.$title.q{}; - } - $out .= qq{
    \n}; - } - - - # stuff to do if we're on a page with an asset - if ($asset) { - - my $proceed = $session->form->get('op') eq 'assetManager' ? ';proceed=manageAssets' : ''; - # clipboard - my $clipboardItems = $session->asset->getAssetsInClipboard(1); - if (scalar (@$clipboardItems)) { - my $formProceed = $session->form->get('op') eq 'assetManager' ? 'manageAssets' : ''; - $out .= q{
    }.$i18n->get("1082").q{
    } - . WebGUI::Form::formHeader($session, - { action => $session->url->page('func=pasteList;assetId=0;proceed='.$formProceed), extras => "id='adminBarClip'", } - ); - foreach my $item (@{$clipboardItems}) { - my $title = $asset->getTitle; - $out .= q{getId.$proceed).q{" onclick="var thisForm = document.getElementById('adminBarClip'); thisForm.assetId.value='}.$item->getId.q{'; thisForm.submit(); return false;">} - .q{icon } - .$item->getTitle.q{}; - } - $out .= WebGUI::Form::formFooter($session) - . qq{
    \n}; - } - - ### new content menu - - # determine new content categories - my %rawCategories = %{$config->get('assetCategories')}; - my %categories; - my %categoryTitles; - my $userUiLevel = $user->profileField('uiLevel'); - foreach my $category (keys %rawCategories) { - next if $rawCategories{$category}{uiLevel} > $userUiLevel; - next if (exists $rawCategories{$category}{group} && !$user->isInGroup($rawCategories{$category}{group})); - my $title = $rawCategories{$category}{title}; - WebGUI::Macro::process($session, \$title); - $categories{$category}{title} = $title; - $categoryTitles{$title} = $category; - } - - # assets - my %assetList = %{$config->get('assets')}; - foreach my $assetClass (keys %assetList) { - my $dummy = WebGUI::Asset->newByPropertyHashRef($session,{dummy=>1, className=>$assetClass}); - next unless defined $dummy; - my $assetConfig = $assetList{$assetClass}; - next if $dummy->getUiLevel( $assetConfig->{uiLevel} ) > $userUiLevel; - next unless ($dummy->canAdd($session)); - my $assetInfo = { - icon => $dummy->getIcon(1), - url => $asset->getUrl("func=add;class=" . $dummy->get('className')), - title => $dummy->getTitle, - }; - my @assetCategories = ref $assetConfig->{category} ? @{$assetConfig->{category}} : $assetConfig->{category}; - for my $category (@assetCategories) { - next unless exists $categories{$category}; - $categories{$category}{items} ||= []; - push @{ $categories{$category}{items} }, $assetInfo; - } - } - - # packages - foreach my $package (@{$session->asset->getPackageList}) { - next unless ($package->canView && $package->canAdd($session) && $package->getUiLevel <= $userUiLevel); - $categories{packages}{items} ||= []; - push @{$categories{packages}{items}}, { - title => $package->getTitle, - url => $asset->getUrl("func=deployPackage;assetId=".$package->getId.$proceed), - icon => $package->getIcon(1), - }; - } - if ($categories{packages}{items} && @{$categories{packages}{items}}) { - $categories{packages}{title} = $i18n->get('packages'); - $categoryTitles{$i18n->get('packages')} = "packages"; - } - - # prototypes - foreach my $prototype (@{ $session->asset->getPrototypeList }) { - my $class = $prototype->get('className'); - next unless ($prototype->canView && $class->canAdd($session) && $prototype->getUiLevel <= $userUiLevel); - $categories{prototypes}{items} ||= []; - push @{$categories{prototypes}{items}}, { - title => $prototype->getTitle, - url => $asset->getUrl( - "func=add;class=$class;prototype=".$prototype->getId.$proceed - ), - icon => $prototype->getIcon(1), - }; - } - if ($categories{prototypes}{items} && @{$categories{prototypes}{items}}) { - $categories{prototypes}{title} = $i18n->get('prototypes'); - $categoryTitles{$i18n->get('prototypes')} = "prototypes"; - } - - # render new content menu - $out .= q{
    }.$i18n->get("1083").q{
    }; - foreach my $categoryTitle (sort keys %categoryTitles) { - $out .= '
    '.$categoryTitle.'
    '; - my $items = $categories{$categoryTitles{$categoryTitle}}{items}; - next unless (ref $items eq 'ARRAY'); # in case the category is empty - foreach my $item (sort { $a->{title} cmp $b->{title} } @{$items}) { - $out .= q{} - .q{icon } - .$item->{title}.q{}; - } - $out .= '
    '; - } - $out .= qq{
    \n}; - } - - $out .= q{
    - }; - return $out; -} - -1; - diff --git a/lib/WebGUI/Macro/AdminText.pm b/lib/WebGUI/Macro/AdminText.pm index 83343ffbb..c5c70364d 100644 --- a/lib/WebGUI/Macro/AdminText.pm +++ b/lib/WebGUI/Macro/AdminText.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::AdminText; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -33,7 +33,7 @@ string is returned. sub process { my $session = shift; my @param = @_; - return "" unless ($session->var->isAdminOn); + return "" unless ($session->isAdminOn); return $param[0]; } diff --git a/lib/WebGUI/Macro/AdminToggle.pm b/lib/WebGUI/Macro/AdminToggle.pm index 5524f0dd1..233d71b41 100644 --- a/lib/WebGUI/Macro/AdminToggle.pm +++ b/lib/WebGUI/Macro/AdminToggle.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::AdminToggle; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -22,7 +22,7 @@ Package WebGUI::Macro::AdminToggle Macro for displaying a url to the user for turning Admin mode on and off. -=head2 process ( [turnOn,turnOff,template ] ) +=head2 process ( [turnOn,template ] ) process takes three optional parameters for customizing the content and layout of the account link. @@ -32,11 +32,6 @@ of the account link. The text displayed to the user if Admin mode is turned off and they are in the Turn On Admin group. If this is blank an internationalized default is used. -=head3 turnOff - -The text displayed to the user if Admin mode is turned on and they are in the -Turn On Admin group. If this is blank an internationalized default is used. - =head3 template The URL of a template from the Macro/AdminToggle namespace to use for formatting the link. @@ -48,19 +43,13 @@ sub process { my $session = shift; return "" unless $session->user->canUseAdminMode; - my ($turnOn, $turnOff, $templateName) = @_; + my ($turnOn, $templateName) = @_; my $i18n = WebGUI::International->new($session,'Macro_AdminToggle'); my %var; - if ($session->var->isAdminOn) { - $var{'toggle.url'} = $session->url->page('op=switchOffAdmin'); - $var{'toggle.text'} = $turnOff || $i18n->get(517); - } - else { - $var{'toggle.url'} = $session->url->page('op=switchOnAdmin'); - $var{'toggle.text'} = $turnOn || $i18n->get(516); - } + $var{'toggle_text'} = $turnOn || $i18n->get(516); + $var{'toggle_url'} = $session->url->page('op=admin'); my $template = $templateName ? WebGUI::Asset::Template->newByUrl($session, $templateName) - : WebGUI::Asset::Template->new($session, "PBtmpl0000000000000036"); + : WebGUI::Asset::Template->newById($session, "PBtmpl0000000000000036"); return $template->process(\%var); } diff --git a/lib/WebGUI/Macro/AssetProperty.pm b/lib/WebGUI/Macro/AssetProperty.pm index 75c14a73b..15d86c7ad 100644 --- a/lib/WebGUI/Macro/AssetProperty.pm +++ b/lib/WebGUI/Macro/AssetProperty.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::AssetProperty; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Macro/AssetProxy.pm b/lib/WebGUI/Macro/AssetProxy.pm index b39d85456..bebdfd270 100644 --- a/lib/WebGUI/Macro/AssetProxy.pm +++ b/lib/WebGUI/Macro/AssetProxy.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::AssetProxy; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -14,6 +14,7 @@ use strict; use Time::HiRes; use WebGUI::Asset; use WebGUI::International; +use WebGUI::Exception; =head1 NAME @@ -45,32 +46,33 @@ sub process { if (!$identifier) { $session->errorHandler->warn('AssetProxy macro called without an asset to proxy. ' . 'The macro was called through this url: '.$session->url->page); - if ($session->var->isAdminOn) { + if ($session->isAdminOn) { my $i18n = WebGUI::International->new($session, 'Macro_AssetProxy'); return $i18n->get('invalid url'); } return; } - my $t = ($session->errorHandler->canShowPerformanceIndicators()) ? [Time::HiRes::gettimeofday()] : undef; + my $perfLog = $session->log->performanceLogger; + my $t = $perfLog ? [Time::HiRes::gettimeofday()] : undef; my $asset; if ($type eq 'assetId') { - $asset = WebGUI::Asset->newByDynamicClass($session, $identifier); + $asset = eval { WebGUI::Asset->newById($session, $identifier); }; } else { - $asset = WebGUI::Asset->newByUrl($session,$identifier); + $asset = eval { WebGUI::Asset->newByUrl($session,$identifier); }; } if (!defined $asset) { $session->errorHandler->warn('AssetProxy macro called invalid asset: '.$identifier .'. The macro was called through this url: '.$session->url->page); - if ($session->var->isAdminOn) { + if ($session->isAdminOn) { my $i18n = WebGUI::International->new($session, 'Macro_AssetProxy'); return $i18n->get('invalid url'); } } elsif ($asset->get('state') =~ /^trash/) { - $session->errorHandler->warn('AssetProxy macro called on asset in trash: '.$identifier + $session->log->warn('AssetProxy macro called on asset in trash: '.$identifier .'. The macro was called through this url: '.$session->url->page); - if ($session->var->isAdminOn) { + if ($session->isAdminOn) { my $i18n = WebGUI::International->new($session, 'Macro_AssetProxy'); return $i18n->get('asset in trash'); } @@ -78,17 +80,16 @@ sub process { elsif ($asset->get('state') =~ /^clipboard/) { $session->errorHandler->warn('AssetProxy macro called on asset in clipboard: '.$identifier .'. The macro was called through this url: '.$session->url->page); - if ($session->var->isAdminOn) { + if ($session->isAdminOn) { my $i18n = WebGUI::International->new($session, 'Macro_AssetProxy'); return $i18n->get('asset in clipboard'); } } elsif ($asset->canView) { - $asset->toggleToolbar; $asset->prepareView; my $output = $asset->view; - $output .= "AssetProxy:" . Time::HiRes::tv_interval($t) - if $t; + $perfLog->({ asset => $asset, time => Time::HiRes::tv_interval($t), type => 'Proxy'}) + if $perfLog; return $output; } return ''; diff --git a/lib/WebGUI/Macro/At_username.pm b/lib/WebGUI/Macro/At_username.pm index f18f833f2..e9dc45a53 100644 --- a/lib/WebGUI/Macro/At_username.pm +++ b/lib/WebGUI/Macro/At_username.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::At_username; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Macro/BackToSite.pm b/lib/WebGUI/Macro/BackToSite.pm index 59b49bbcd..d3cd4127f 100644 --- a/lib/WebGUI/Macro/BackToSite.pm +++ b/lib/WebGUI/Macro/BackToSite.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::BackToSite; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Macro/CanEditText.pm b/lib/WebGUI/Macro/CanEditText.pm index a1e116e16..18f4372f1 100644 --- a/lib/WebGUI/Macro/CanEditText.pm +++ b/lib/WebGUI/Macro/CanEditText.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::CanEditText; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Macro/CartItemCount.pm b/lib/WebGUI/Macro/CartItemCount.pm index 46edcc58f..3c4830e9e 100644 --- a/lib/WebGUI/Macro/CartItemCount.pm +++ b/lib/WebGUI/Macro/CartItemCount.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::CartItemCount; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Macro/ConvertUTCToTZ.pm b/lib/WebGUI/Macro/ConvertUTCToTZ.pm index afaa30ec7..8dfbb32b9 100644 --- a/lib/WebGUI/Macro/ConvertUTCToTZ.pm +++ b/lib/WebGUI/Macro/ConvertUTCToTZ.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::ConvertUTCToTZ; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -60,8 +60,8 @@ time - time component formatted as HH:MM:SS sub process { my ( $session, $toTZ, $format, $date, $time ) = @_; - my $uTZ = $session->user->profileField("timeZone"); - my $uFormat = $session->user->profileField("dateFormat"); + my $uTZ = $session->user->get("timeZone"); + my $uFormat = $session->user->get("dateFormat"); $toTZ ||= $uTZ; $format ||= $uFormat; diff --git a/lib/WebGUI/Macro/D_date.pm b/lib/WebGUI/Macro/D_date.pm index 87b9c9b0b..941dfef63 100644 --- a/lib/WebGUI/Macro/D_date.pm +++ b/lib/WebGUI/Macro/D_date.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::D_date; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Macro/DeactivateAccount.pm b/lib/WebGUI/Macro/DeactivateAccount.pm index 4f57b463f..e192b6578 100644 --- a/lib/WebGUI/Macro/DeactivateAccount.pm +++ b/lib/WebGUI/Macro/DeactivateAccount.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::DeactivateAccount; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Macro/EditableToggle.pm b/lib/WebGUI/Macro/EditableToggle.pm deleted file mode 100644 index 2a7f6c9b0..000000000 --- a/lib/WebGUI/Macro/EditableToggle.pm +++ /dev/null @@ -1,76 +0,0 @@ -package WebGUI::Macro::EditableToggle; - -#------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. -#------------------------------------------------------------------- -# Please read the legal notices (docs/legal.txt) and the license -# (docs/license.txt) that came with this distribution before using -# this software. -#------------------------------------------------------------------- -# http://www.plainblack.com info@plainblack.com -#------------------------------------------------------------------- - -use strict; -use WebGUI::International; -use WebGUI::Asset::Template; - -=head1 NAME - -Package WebGUI::Macro::EditableToggle - -=head1 DESCRIPTION - -Macro for displaying a url to the user for turning Admin mode on and off if they -have editing rights to the current Asset. - -=head2 process ( [turnOn,turnOff,template ] ) - -process takes three optional parameters for customizing the content and layout -of the account link. - -=head3 turnOn - -The text displayed to the user if Admin mode is turned off, they are in the -Turn On Admin group and they have editing rights to this Asset. -If this is blank an internationalized default is used. - -=head3 turnOff - -The text displayed to the user if Admin mode is turned on, they are in -the Turn On Admin group and they have editing rights to this Asset.. -If this is blank an internationalized default is used. - -=head3 template - -The URL of a template from the Macro/EditableToggle namespace to use for formatting the link. - -=cut - -#------------------------------------------------------------------- -sub process { - my $session = shift; - if ($session->asset && $session->asset->canEdit && $session->user->isInGroup(12)) { - my %var; - my @param = @_; - my $i18n = WebGUI::International->new($session,'Macro_EditableToggle'); - my $turnOn = $param[0] || $i18n->get(516); - my $turnOff = $param[1] || $i18n->get(517); - if ($session->var->isAdminOn) { - $var{'toggle.url'} = $session->url->page('op=switchOffAdmin'); - $var{'toggle.text'} = $turnOff; - } else { - $var{'toggle.url'} = $session->url->page('op=switchOnAdmin'); - $var{'toggle.text'} = $turnOn; - } - if ($param[2]) { - return WebGUI::Asset::Template->newByUrl($session,$param[2])->process(\%var); - } else { - return WebGUI::Asset::Template->new($session,"PBtmpl0000000000000038")->process(\%var); - } - } - return ""; -} - -1; - - diff --git a/lib/WebGUI/Macro/Env.pm b/lib/WebGUI/Macro/Env.pm index a12c1b779..cd94c8fdb 100644 --- a/lib/WebGUI/Macro/Env.pm +++ b/lib/WebGUI/Macro/Env.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::Env; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -32,7 +32,8 @@ then undef will be returned. #------------------------------------------------------------------- sub process { my $session = shift; - return $session->env->get(shift); + my $key = shift; + return $session->request->env->{$key}; } 1; diff --git a/lib/WebGUI/Macro/Execute.pm b/lib/WebGUI/Macro/Execute.pm index 4b5d675ba..f6673b56a 100644 --- a/lib/WebGUI/Macro/Execute.pm +++ b/lib/WebGUI/Macro/Execute.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::Execute; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Macro/Extras.pm b/lib/WebGUI/Macro/Extras.pm index fcae44f77..206bc83df 100644 --- a/lib/WebGUI/Macro/Extras.pm +++ b/lib/WebGUI/Macro/Extras.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::Extras; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Macro/FacebookLogin.pm b/lib/WebGUI/Macro/FacebookLogin.pm new file mode 100644 index 000000000..801f37b0b --- /dev/null +++ b/lib/WebGUI/Macro/FacebookLogin.pm @@ -0,0 +1,44 @@ +package WebGUI::Macro::FacebookLogin; + +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 strict; + +=head1 NAME + +Package WebGUI::Macro::FacebookLogin + +=head1 DESCRIPTION + +Works with the Facebook Auth plugin to allow users to log in using facebook. + +=cut + + +#------------------------------------------------------------------- + +=head2 process + +Return an image with a link to login into Facebook. + +=cut + +sub process { + my $session = shift; + my $url = $session->url; + return sprintf 'login with Facebook', + $url->page('op=auth;authType=Facebook;method=login'), + $url->extras('macro/FacebookLogin/login-button.png'); +} + +1; + +#vim:ft=perl diff --git a/lib/WebGUI/Macro/FetchMimeType.pm b/lib/WebGUI/Macro/FetchMimeType.pm index d087ea77b..f59833a4c 100644 --- a/lib/WebGUI/Macro/FetchMimeType.pm +++ b/lib/WebGUI/Macro/FetchMimeType.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::FetchMimeType; # edit this line to match your own macro name #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Macro/FilePump.pm b/lib/WebGUI/Macro/FilePump.pm index 2cb0eed86..a15f25ac6 100644 --- a/lib/WebGUI/Macro/FilePump.pm +++ b/lib/WebGUI/Macro/FilePump.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::FilePump; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -92,11 +92,11 @@ sub process { my $uploadsDir = Path::Class::Dir->new($session->config->get('uploadsPath')); my $extrasDir = Path::Class::Dir->new($session->config->get('extrasPath')); - my $uploadsUrl = Path::Class::Dir->new($session->config->get('uploadsURL')); - my $extrasUrl = Path::Class::Dir->new($session->config->get('extrasURL')); + my $uploadsUrl = Path::Class::Dir->new($session->url->make_urlmap_work($session->config->get('uploadsURL'))); + my $extrasUrl = Path::Class::Dir->new($session->url->make_urlmap_work($session->config->get('extrasURL'))); ##Normal mode - if (! $session->var->isAdminOn) { + if (! $session->isAdminOn) { # Built files live at /path/to/uploads/filepump/bundle.timestamp/ which is # a sub-dir of uploadsDir, so resolve the dir relative to uploads my $dir = $bundle->getPathClassDir->relative($uploadsDir); diff --git a/lib/WebGUI/Macro/FileUrl.pm b/lib/WebGUI/Macro/FileUrl.pm index ae770e2e4..69f32594b 100644 --- a/lib/WebGUI/Macro/FileUrl.pm +++ b/lib/WebGUI/Macro/FileUrl.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::FileUrl; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -14,6 +14,7 @@ use strict; use WebGUI::Asset; use WebGUI::Storage; use WebGUI::International; +use WebGUI::Exception; =head1 NAME @@ -40,26 +41,26 @@ The URL to the Asset. =cut sub process { - my $session = shift; - my $url = shift; - my $asset = WebGUI::Asset->newByUrl($session,$url); - my $i18n = WebGUI::International->new($session, 'Macro_FileUrl'); - if (not defined $asset) { + my $session = shift; + my $url = shift; + my $asset = eval { WebGUI::Asset->newByUrl($session,$url); }; + my $i18n = WebGUI::International->new($session, 'Macro_FileUrl'); + if (Exception::Class->caught()) { $session->log->warn("Invalid Asset URL for url: " . $url); - return $i18n->get('invalid url'); - } - my $storageId = $asset->get('storageId'); - if (not defined $storageId) { + return $i18n->get('invalid url'); + } + my $storageId = $asset->can('storageId') ? $asset->storageId : undef; + if (not defined $storageId) { $session->log->warn("No Storage Location for assetId: " . $asset->getId . " url: $url"); - return $i18n->get('no storage'); - } - my $filename = $asset->get('filename'); - if (not defined $filename) { + return $i18n->get('no storage'); + } + my $filename = $asset->can('filename') ? $asset->filename : undef; + if (not defined $filename) { $session->log->warn("No Filename for assetId: " . $asset->getId . " url: $url"); - return $i18n->get('no filename'); - } - my $storage = WebGUI::Storage->get($session,$storageId); - return $storage->getUrl($filename); + return $i18n->get('no filename'); + } + my $storage = WebGUI::Storage->get($session,$storageId); + return $storage->getUrl($filename); } diff --git a/lib/WebGUI/Macro/FormField.pm b/lib/WebGUI/Macro/FormField.pm index 1410ba29b..36e0c2c39 100644 --- a/lib/WebGUI/Macro/FormField.pm +++ b/lib/WebGUI/Macro/FormField.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::FormField; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2008 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Macro/FormParam.pm b/lib/WebGUI/Macro/FormParam.pm index 0f09d1a6a..57d09b48c 100644 --- a/lib/WebGUI/Macro/FormParam.pm +++ b/lib/WebGUI/Macro/FormParam.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::FormParam; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Macro/GroupAdd.pm b/lib/WebGUI/Macro/GroupAdd.pm index 24fb1f9b8..fac9633b3 100644 --- a/lib/WebGUI/Macro/GroupAdd.pm +++ b/lib/WebGUI/Macro/GroupAdd.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::GroupAdd; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -57,7 +57,7 @@ sub process { if ($template) { return WebGUI::Asset::Template->newByUrl($session,$template)->process(\%var); } else { - return WebGUI::Asset::Template->new($session,"PBtmpl0000000000000040")->process(\%var); + return WebGUI::Asset::Template->newById($session,"PBtmpl0000000000000040")->process(\%var); } } diff --git a/lib/WebGUI/Macro/GroupDelete.pm b/lib/WebGUI/Macro/GroupDelete.pm index ab0ea28d8..a92a50371 100644 --- a/lib/WebGUI/Macro/GroupDelete.pm +++ b/lib/WebGUI/Macro/GroupDelete.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::GroupDelete; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -57,7 +57,7 @@ sub process { if ($template) { return WebGUI::Asset::Template->newByUrl($session,$template)->process(\%var); } else { - return WebGUI::Asset::Template->new($session,"PBtmpl0000000000000041")->process(\%var); + return WebGUI::Asset::Template->newById($session,"PBtmpl0000000000000041")->process(\%var); } } diff --git a/lib/WebGUI/Macro/GroupText.pm b/lib/WebGUI/Macro/GroupText.pm index 4570ce84a..6efbfee61 100644 --- a/lib/WebGUI/Macro/GroupText.pm +++ b/lib/WebGUI/Macro/GroupText.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::GroupText; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Macro/H_homeLink.pm b/lib/WebGUI/Macro/H_homeLink.pm index b58e3898e..86964669c 100644 --- a/lib/WebGUI/Macro/H_homeLink.pm +++ b/lib/WebGUI/Macro/H_homeLink.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::H_homeLink; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -57,7 +57,7 @@ sub process { if ($templateUrl) { return WebGUI::Asset::Template->newByUrl($session,$templateUrl)->process(\%var); } else { - return WebGUI::Asset::Template->new($session,"PBtmpl0000000000000042")->process(\%var); + return WebGUI::Asset::Template->newById($session,"PBtmpl0000000000000042")->process(\%var); } } return $home->getUrl; diff --git a/lib/WebGUI/Macro/Hash_userId.pm b/lib/WebGUI/Macro/Hash_userId.pm index 67191ec47..db8fc31b6 100644 --- a/lib/WebGUI/Macro/Hash_userId.pm +++ b/lib/WebGUI/Macro/Hash_userId.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::Hash_userId; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Macro/If.pm b/lib/WebGUI/Macro/If.pm index 318c9c3cb..41d0b84c9 100644 --- a/lib/WebGUI/Macro/If.pm +++ b/lib/WebGUI/Macro/If.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::If; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Macro/Include.pm b/lib/WebGUI/Macro/Include.pm index 75750165e..b9a0d14d9 100644 --- a/lib/WebGUI/Macro/Include.pm +++ b/lib/WebGUI/Macro/Include.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::Include; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Macro/International.pm b/lib/WebGUI/Macro/International.pm index 4ca7800a5..4f99443a8 100644 --- a/lib/WebGUI/Macro/International.pm +++ b/lib/WebGUI/Macro/International.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::International; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Macro/L_loginBox.pm b/lib/WebGUI/Macro/L_loginBox.pm index a747b1cae..9bc91170d 100644 --- a/lib/WebGUI/Macro/L_loginBox.pm +++ b/lib/WebGUI/Macro/L_loginBox.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::L_loginBox; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -14,6 +14,7 @@ use strict; use WebGUI::Form; use WebGUI::International; use WebGUI::Asset::Template; +use URI; =head1 NAME @@ -68,7 +69,7 @@ sub process { my $templateId = $param[2] || "PBtmpl0000000000000044"; my %var; my $i18n = WebGUI::International->new($session,'Macro_L_loginBox'); - $var{'user.isVisitor'} = ($session->var->get("userId") eq "1"); + $var{'user.isVisitor'} = ($session->user->isVisitor); $var{'customText'} = $param[1]; $var{'customText'} =~ s/%(.*?)%/_createURL($session,$1)/ge; $var{'hello.label'} = $i18n->get(48); @@ -77,57 +78,63 @@ sub process { $var{'logout.label'} = $i18n->get(49); # A hidden field with the current URL + use WebGUI::Form::Hidden; my $returnUrl = $session->url->page; if ( !$session->form->get("op") eq "auth" ) { - $returnUrl .= '?' . $session->env->get( "QUERY_STRING" ); + $returnUrl .= '?' . $session->request->env->{ "QUERY_STRING" }; } $var{'form.returnUrl'} - = WebGUI::Form::hidden( $session, { + = WebGUI::Form::Hidden->new( $session, { name => 'returnUrl', - value => $session->url->page($session->env->get("QUERY_STRING")), - }); + value => $session->url->page($session->request->env->{"QUERY_STRING"}), + })->toHtml; # Fix box size my $boxSize = $param[0]; $boxSize = 12 unless ($boxSize); - if (index(lc($session->env->get("HTTP_USER_AGENT")),"msie") < 0) { + if ($session->request->browser->ie) { $boxSize = int($boxSize=$boxSize*2/3); } my $action; if ($session->setting->get("encryptLogin")) { - $action = $session->url->page(undef,1); - $action =~ s/http:/https:/; + my $uri = URI->new($session->url->page(undef,1)); + $uri->scheme('https'); + $uri->host_port($uri->host); + $action = $uri->canonical->as_string; } + use WebGUI::Form::Text; + use WebGUI::Form::Password; + use WebGUI::Form::Submit; $var{'form.header'} = WebGUI::Form::formHeader($session,{action=>$action}) - .WebGUI::Form::hidden($session,{ + .WebGUI::Form::Hidden->new($session,{ name=>"op", value=>"auth" - }) - .WebGUI::Form::hidden($session,{ + })->toHtml + .WebGUI::Form::Hidden->new($session,{ name=>"method", value=>"login" - }); + })->toHtml; $var{'username.label'} = $i18n->get(50, 'WebGUI'); - $var{'username.form'} = WebGUI::Form::text($session,{ + $var{'username.form'} = WebGUI::Form::Text->new($session,{ name=>"username", size=>$boxSize, extras=>'class="loginBoxField"' - }); + })->toHtml; $var{'password.label'} = $i18n->get(51, 'WebGUI'); - $var{'password.form'} = WebGUI::Form::password($session,{ + $var{'password.form'} = WebGUI::Form::Password->new($session,{ name=>"identifier", size=>$boxSize, extras=>'class="loginBoxField"' - }); - $var{'form.login'} = WebGUI::Form::submit($session,{ + })->toHtml; + $var{'form.login'} = WebGUI::Form::Submit->new($session,{ value=>$i18n->get(52, 'WebGUI'), extras=>'class="loginBoxButton"' - }); + })->toHtml; $var{'account.create.url'} = $session->url->page('op=auth;method=createAccount'); $var{'account.create.label'} = $i18n->get(407, 'WebGUI'); $var{'form.footer'} = WebGUI::Form::formFooter($session,); - return WebGUI::Asset::Template->new($session,$templateId)->process(\%var); + return WebGUI::Asset::Template->newById($session,$templateId)->process(\%var); } 1; diff --git a/lib/WebGUI/Macro/LastModified.pm b/lib/WebGUI/Macro/LastModified.pm index 1825f389b..8a6f172ee 100644 --- a/lib/WebGUI/Macro/LastModified.pm +++ b/lib/WebGUI/Macro/LastModified.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::LastModified; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Macro/LastUpdatedBy.pm b/lib/WebGUI/Macro/LastUpdatedBy.pm index cd1b50547..1981a02e2 100644 --- a/lib/WebGUI/Macro/LastUpdatedBy.pm +++ b/lib/WebGUI/Macro/LastUpdatedBy.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::LastUpdatedBy; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Macro/LoginToggle.pm b/lib/WebGUI/Macro/LoginToggle.pm index 074931a29..b067915f9 100644 --- a/lib/WebGUI/Macro/LoginToggle.pm +++ b/lib/WebGUI/Macro/LoginToggle.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::LoginToggle; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -63,7 +63,7 @@ sub process { if ($param[2]) { return WebGUI::Asset::Template->newByUrl($session,$param[2])->process(\%var); } else { - return WebGUI::Asset::Template->new($session,"PBtmpl0000000000000043")->process(\%var); + return WebGUI::Asset::Template->newById($session,"PBtmpl0000000000000043")->process(\%var); } } diff --git a/lib/WebGUI/Macro/MiniCart.pm b/lib/WebGUI/Macro/MiniCart.pm index 96ee68fd4..c2034cabd 100644 --- a/lib/WebGUI/Macro/MiniCart.pm +++ b/lib/WebGUI/Macro/MiniCart.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::MiniCart; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -59,7 +59,7 @@ sub process { totalPrice => sprintf("%.2f",$totalPrice), totalItems => $totalItems, ); - my $template = WebGUI::Asset::Template->new($session, $templateId || 'EBlxJpZQ9o-8VBOaGQbChA'); + my $template = WebGUI::Asset::Template->newById($session, $templateId || 'EBlxJpZQ9o-8VBOaGQbChA'); return $template->process(\%var); } diff --git a/lib/WebGUI/Macro/NewMail.pm b/lib/WebGUI/Macro/NewMail.pm index aff804468..46b505e99 100644 --- a/lib/WebGUI/Macro/NewMail.pm +++ b/lib/WebGUI/Macro/NewMail.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::NewMail; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Macro/Page.pm b/lib/WebGUI/Macro/Page.pm index 8da8ef025..64ce28f3f 100644 --- a/lib/WebGUI/Macro/Page.pm +++ b/lib/WebGUI/Macro/Page.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::Page; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Macro/PageTitle.pm b/lib/WebGUI/Macro/PageTitle.pm index c4a597c9e..c2fb50873 100644 --- a/lib/WebGUI/Macro/PageTitle.pm +++ b/lib/WebGUI/Macro/PageTitle.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::PageTitle; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Macro/PageUrl.pm b/lib/WebGUI/Macro/PageUrl.pm index 6116e8592..a8fa7687c 100644 --- a/lib/WebGUI/Macro/PageUrl.pm +++ b/lib/WebGUI/Macro/PageUrl.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::PageUrl; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Macro/PickLanguage.pm b/lib/WebGUI/Macro/PickLanguage.pm index 8e69dbd57..5b5b3a781 100644 --- a/lib/WebGUI/Macro/PickLanguage.pm +++ b/lib/WebGUI/Macro/PickLanguage.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::PickLanguage; # edit this line to match your own macro name #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -44,13 +44,15 @@ This macro takes a templateId to show the links sub process { my $session = shift; my $templateId = shift || "_aE16Rr1-bXBf8SIaLZjCg"; - my $template = WebGUI::Asset::Template->new($session, $templateId); - return "Could not instanciate template with id [$templateId]" unless $template; - my $i18n = WebGUI::International->new($session); + my $template = eval { WebGUI::Asset->newById($session, $templateId); }; + if (Exception::Class->caught()) { + return "Could not instanciate template with id [$templateId]" unless $template; + } + my $i18n = WebGUI::International->new($session); my $languages = $i18n->getLanguages(); my $currentLanguage = $session->scratch->get('language') ? $session->scratch->get('language') - : $session->user->profileField('language'); + : $session->user->get('language'); my @lang_loop = (); foreach my $language ( keys %$languages ) { my $isCurrentLanguage = $currentLanguage eq $language ? 1 : 0; diff --git a/lib/WebGUI/Macro/Quote.pm b/lib/WebGUI/Macro/Quote.pm index 695565b63..6b3257603 100644 --- a/lib/WebGUI/Macro/Quote.pm +++ b/lib/WebGUI/Macro/Quote.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::Quote; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Software. +# WebGUI is Copyright 2001-2012 Plain Black Software. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Macro/RandomAssetProxy.pm b/lib/WebGUI/Macro/RandomAssetProxy.pm index 8d333de15..3bc1c77aa 100644 --- a/lib/WebGUI/Macro/RandomAssetProxy.pm +++ b/lib/WebGUI/Macro/RandomAssetProxy.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::RandomAssetProxy; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,6 +13,7 @@ package WebGUI::Macro::RandomAssetProxy; use strict; use WebGUI::Asset; use WebGUI::International; +use WebGUI::Exception; =head1 NAME @@ -34,28 +35,28 @@ if no asset exists at that url, or if the asset has no children. #------------------------------------------------------------------- sub process { - my $session = shift; - my $url = shift; - my $i18n = WebGUI::International->new($session,'Macro_RandomAssetProxy'); - my $asset = WebGUI::Asset->newByUrl($session, $url); - if (defined $asset) { - my $children = $asset->getLineage(["children"]); - #randomize; - my $randomAssetId = $children->[int(rand(scalar(@{$children})))]; - my $randomAsset = WebGUI::Asset->newByDynamicClass($session,$randomAssetId); - if (defined $randomAsset) { - if ($randomAsset->canView) { - $randomAsset->toggleToolbar; - $randomAsset->prepareView; - return $randomAsset->view; - } - return undef; - } else { - return $i18n->get('childless'); - } - } else { - return $i18n->get('invalid url'); - } + my $session = shift; + my $url = shift; + my $i18n = WebGUI::International->new($session,'Macro_RandomAssetProxy'); + my $asset = eval { WebGUI::Asset->newByUrl($session, $url); }; + if (Exception::Class->caught()) { + return $i18n->get('invalid url'); + } + + my $children = $asset->getLineage(["children"]); + #randomize; + my $randomAssetId = $children->[int(rand(scalar(@{$children})))]; + my $randomAsset = eval { WebGUI::Asset->newById($session,$randomAssetId); }; + if (Exception::Class->caught()) { + return $i18n->get('childless'); + } + elsif ($randomAsset->canView) { + $randomAsset->prepareView; + return $randomAsset->view; + } + else { + return undef; + } } diff --git a/lib/WebGUI/Macro/RandomThread.pm b/lib/WebGUI/Macro/RandomThread.pm index 9f4338693..bb54a8eee 100644 --- a/lib/WebGUI/Macro/RandomThread.pm +++ b/lib/WebGUI/Macro/RandomThread.pm @@ -3,7 +3,7 @@ package WebGUI::Macro::RandomThread; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -16,8 +16,8 @@ package WebGUI::Macro::RandomThread; use strict; use WebGUI::Asset; +use WebGUI::Asset::Wobject::Collaboration; use WebGUI::Asset::Template; -use WebGUI::Utility; =head1 NAME @@ -67,28 +67,28 @@ sub process { my $numberOfTries = 2; # try this many times in case we select a thread the user cannot view # Sanity check of parameters: - my $startAsset = WebGUI::Asset->newByUrl($session, $startURL); - unless ($startAsset) { - $session->errorHandler->warn('Error: invalid startURL. Check parameters of macro on page '.$session->asset->get('url')); + my $startAsset = eval { WebGUI::Asset->newByUrl($session, $startURL); }; + if (Exception::Class->caught()) { + $session->log->warn('Error: invalid startURL. Check parameters of macro on page '.$session->asset->url); return ''; } $relatives = lc($relatives); - unless ( isIn($relatives, ('siblings','children','ancestors','self','descendants','pedigree')) ) { - $session->errorHandler->warn('Error: invalid relatives specified. Must be one of siblings, children, ancestors, self, descendants, pedigree. Check parameters of macro on page '.$session->asset->get('url')); + unless ( $relatives ~~ ['siblings','children','ancestors','self','descendants','pedigree'] ) { + $session->log->warn('Error: invalid relatives specified. Must be one of siblings, children, ancestors, self, descendants, pedigree. Check parameters of macro on page '.$session->asset->url); return ''; } - my $template = $templateURL ? WebGUI::Asset::Template->newByUrl($session,$templateURL) : WebGUI::Asset::Template->new($session,'WVtmpl0000000000000001'); - unless ($template) { - $session->errorHandler->warn('Error: invalid template URL. Check parameters of macro on page '.$session->asset->get('url')); + my $template = eval { $templateURL ? WebGUI::Asset::Template->newByUrl($session,$templateURL) : WebGUI::Asset::Template->newById($session,'WVtmpl0000000000000001'); }; + if (Exception::Class->caught()) { + $session->log->warn('Error: invalid template URL. Check parameters of macro on page '.$session->asset->url); return ''; } # Get all CS's that we'll use to pick a thread from: my $lineage = $startAsset->getLineage([$relatives],{includeOnlyClasses => ['WebGUI::Asset::Wobject::Collaboration']}); unless ( scalar(@{$lineage}) ) { - $session->errorHandler->warn('Error: no Collaboration Systems found with current parameters. Check parameters of macro on page '.$session->asset->get('url')); + $session->log->warn('Error: no Collaboration Systems found with current parameters. Check parameters of macro on page '.$session->asset->url); return ''; } @@ -97,14 +97,14 @@ sub process { foreach my $csid (@{$lineage}) { my $cs = undef; # Get random thread in that CS: - $cs = WebGUI::Asset->new($session,$csid,'WebGUI::Asset::Wobject::Collaboration'); + $cs = WebGUI::Asset::Wobject::Collaboration->newById($session,$csid); my $threads = $cs->getLineage(['children'],{includeOnlyClasses => ['WebGUI::Asset::Post::Thread']}); push(@llist,$csid) if (scalar(@{$threads}) > 0); } $lineage = \@llist; unless ( scalar(@{$lineage}) ) { - $session->errorHandler->warn('Error: no Collaboration Systems found have any threads to display.'.$session->asset->get('url')); + $session->log->warn('Error: no Collaboration Systems found have any threads to display.'.$session->asset->url); return ''; } @@ -124,7 +124,7 @@ sub process { } } # If we reach this point, we had no success in finding an asset the user can view: - $session->errorHandler->warn("Could not find a random thread that was viewable by the user ".$session->user->username." after $numberOfTries tries. Check parameters of macro on page ".$session->asset->get('url')); + $session->log->warn("Could not find a random thread that was viewable by the user ".$session->user->username." after $numberOfTries tries. Check parameters of macro on page ".$session->asset->url); return ''; } @@ -151,13 +151,13 @@ sub _getRandomThread { # Get random CS: my $randomIndex = int(rand(scalar(@{$lineage}))); my $randomCSId = $lineage->[$randomIndex]; - my $randomCS = WebGUI::Asset->new($session,$randomCSId,'WebGUI::Asset::Wobject::Collaboration'); + my $randomCS = WebGUI::Asset::Wobject::Collaboration->newById($session, $randomCSId); # Get random thread in that CS: - $lineage = $randomCS->getLineage(['children'],{includeOnlyClasses => ['WebGUI::Asset::Post::Thread']}); + $lineage = $randomCS->getLineage(['children'], {includeOnlyClasses => ['WebGUI::Asset::Post::Thread']}); $randomIndex = int(rand(scalar(@{$lineage}))); my $randomThreadId = $lineage->[$randomIndex]; - return WebGUI::Asset->new($session,$randomThreadId,'WebGUI::Asset::Post::Thread'); + return WebGUI::Asset::Post::Thread->newById($session, $randomThreadId); } 1; diff --git a/lib/WebGUI/Macro/RenderThingData.pm b/lib/WebGUI/Macro/RenderThingData.pm index 4768c3715..8e52d29fa 100644 --- a/lib/WebGUI/Macro/RenderThingData.pm +++ b/lib/WebGUI/Macro/RenderThingData.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::RenderThingData; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2011 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Macro/RootTitle.pm b/lib/WebGUI/Macro/RootTitle.pm index 4fe5cba7d..4322ab255 100644 --- a/lib/WebGUI/Macro/RootTitle.pm +++ b/lib/WebGUI/Macro/RootTitle.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::RootTitle; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 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,6 +12,7 @@ package WebGUI::Macro::RootTitle; use strict; use WebGUI::Asset; +use WebGUI::Exception; =head1 NAME @@ -40,9 +41,13 @@ sub process { ##Get my root. $lineage = substr($lineage,0,12); - my $root = WebGUI::Asset->newByLineage($session,$lineage); + my $root = eval { WebGUI::Asset->newByLineage($session,$lineage); }; + + if (Exception::Class->caught()) { + $session->log->error('RootTitle macro: '.$@); + return ""; + } - return "" unless defined $root; return $root->get("title"); } diff --git a/lib/WebGUI/Macro/SQL.pm b/lib/WebGUI/Macro/SQL.pm index 85093c96c..dbbf7da25 100644 --- a/lib/WebGUI/Macro/SQL.pm +++ b/lib/WebGUI/Macro/SQL.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::SQL; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Software. +# WebGUI is Copyright 2001-2012 Plain Black Software. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Macro/SessionId.pm b/lib/WebGUI/Macro/SessionId.pm index b7e5fdf56..5bdddc3ee 100644 --- a/lib/WebGUI/Macro/SessionId.pm +++ b/lib/WebGUI/Macro/SessionId.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::SessionId; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Macro/Slash_gatewayUrl.pm b/lib/WebGUI/Macro/Slash_gatewayUrl.pm index 381a7eec2..fa8379f97 100644 --- a/lib/WebGUI/Macro/Slash_gatewayUrl.pm +++ b/lib/WebGUI/Macro/Slash_gatewayUrl.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::Slash_gatewayUrl; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Macro/Spacer.pm b/lib/WebGUI/Macro/Spacer.pm index 3aecb7610..2c8e69a7e 100644 --- a/lib/WebGUI/Macro/Spacer.pm +++ b/lib/WebGUI/Macro/Spacer.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::Spacer; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Macro/SpectreCheck.pm b/lib/WebGUI/Macro/SpectreCheck.pm index a0e6217ce..f8bf2bb37 100644 --- a/lib/WebGUI/Macro/SpectreCheck.pm +++ b/lib/WebGUI/Macro/SpectreCheck.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::SpectreCheck; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Macro/Splat_random.pm b/lib/WebGUI/Macro/Splat_random.pm index cf04dcf2e..f49979129 100644 --- a/lib/WebGUI/Macro/Splat_random.pm +++ b/lib/WebGUI/Macro/Splat_random.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::Splat_random; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -11,7 +11,6 @@ package WebGUI::Macro::Splat_random; #------------------------------------------------------------------- use strict; -use WebGUI::Utility; =head1 NAME diff --git a/lib/WebGUI/Macro/StorageUrl.pm b/lib/WebGUI/Macro/StorageUrl.pm index 7a126cccd..0f2b1de5b 100644 --- a/lib/WebGUI/Macro/StorageUrl.pm +++ b/lib/WebGUI/Macro/StorageUrl.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::StorageUrl; # edit this line to match your own macro name #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Macro/Thumbnail.pm b/lib/WebGUI/Macro/Thumbnail.pm index 3c67d7ba0..80ee9b34b 100644 --- a/lib/WebGUI/Macro/Thumbnail.pm +++ b/lib/WebGUI/Macro/Thumbnail.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::Thumbnail; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -32,13 +32,15 @@ Image Asset can be found with that URL, then undef will be returned. #------------------------------------------------------------------- sub process { - my $session = shift; - my $url = shift; - if (my $image = WebGUI::Asset::File::Image->newByUrl($session,$url)) { - return $image->getThumbnailUrl; - } else { - return undef; - } + my $session = shift; + my $url = shift; + my $image = eval { WebGUI::Asset::File::Image->newByUrl($session,$url) }; + if (Exception::Class->caught()) { + return undef; + } + else { + return $image->getThumbnailUrl; + } } diff --git a/lib/WebGUI/Macro/TwitterLogin.pm b/lib/WebGUI/Macro/TwitterLogin.pm index 7d38535ea..efa258a9a 100644 --- a/lib/WebGUI/Macro/TwitterLogin.pm +++ b/lib/WebGUI/Macro/TwitterLogin.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::TwitterLogin; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Macro/URLEncode.pm b/lib/WebGUI/Macro/URLEncode.pm index eba4b413d..b98e252bb 100644 --- a/lib/WebGUI/Macro/URLEncode.pm +++ b/lib/WebGUI/Macro/URLEncode.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::URLEncode; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Macro/User.pm b/lib/WebGUI/Macro/User.pm index f91d8c5c6..b9e09c38d 100644 --- a/lib/WebGUI/Macro/User.pm +++ b/lib/WebGUI/Macro/User.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::User; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -50,7 +50,7 @@ sub process { : $session->user ; - return $user->profileField($field); + return $user->get($field); } 1; diff --git a/lib/WebGUI/Macro/UsersOnline.pm b/lib/WebGUI/Macro/UsersOnline.pm index b6c6088b1..7b49e875b 100644 --- a/lib/WebGUI/Macro/UsersOnline.pm +++ b/lib/WebGUI/Macro/UsersOnline.pm @@ -3,7 +3,7 @@ package WebGUI::Macro::UsersOnline; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black LLC. + WebGUI is Copyright 2001-2012 Plain Black LLC. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -19,9 +19,8 @@ package WebGUI::Macro::UsersOnline; =cut use strict; -use Apache2::ServerRec; use Net::DNS; -use WebGUI::Asset::Template; +use WebGUI::Asset; use WebGUI::International; use WebGUI::Session::DateTime; use WebGUI::SQL; @@ -86,7 +85,7 @@ sub process { # Obtain internationalization instance my $i18n = WebGUI::International->new($session, "Macro_UsersOnline"); # Get preferred time format of current user - my $time_format = $session->user->profileField("timeFormat"); + my $time_format = $session->user->get("timeFormat"); # Calculate epoch time for comparison to last activity my $dt = $session->datetime; @@ -118,7 +117,15 @@ sub process { $var{'lastActivity_label'} = $i18n->get("Last Activity"); # Process Template - return WebGUI::Asset::Template->new($session,$templateId)->process(\%var); + my $template = eval { WebGUI::Asset->newById($session,$templateId); }; + if (Exception::Class->caught) { + #Rethrow with the correct error + WebGUI::Error::ObjectNotFound::Template->throw( + error => qq{Template not found}, + templateId => $templateId, + ); + } + return $template->process(\%var); } #------------------------------------------------------------------- @@ -158,15 +165,12 @@ sub _visitors { my $db = $session->db(); my $dt = $session->datetime; # Get preferred time format of current user - my $time_format = $session->user->profileField("timeFormat"); + my $time_format = $session->user->get("timeFormat"); # SQL conditional clause for filtering server IP my $ip_clause; - # Check whether instance of Apache2::ServerRec is available - if($session->server) { - # Query hostname of server - my $hostname = $session->server->server_hostname(); + if(my $hostname = $session->request->uri->host) { # Look up server IP addresses my $res = Net::DNS::Resolver->new(); @@ -244,7 +248,7 @@ sub _members { my $db = $session->db(); my $dt = $session->datetime; # Get preferred time format of current user - my $time_format = $session->user->profileField("timeFormat"); + my $time_format = $session->user->get("timeFormat"); # Determine the number of registered users that are online. The Admin # account is excluded from the list. @@ -264,10 +268,10 @@ sub _members { my $user = WebGUI::User->new($session, $row{'userId'}); # Only show users with the "showOnline" flag set to true - if ($user->profileField("showOnline")) { + if ($user->get("showOnline")) { # Find URL of avatar if available my $avatar_url; - my $avatar = $user->profileField("avatar"); + my $avatar = $user->get("avatar"); if ($avatar) { my $storage = WebGUI::Storage->get($session, $avatar); my @files = @{ $storage->getFiles() }; @@ -279,10 +283,10 @@ sub _members { # Add item to member template loop push(@{$var->{'member_loop'}}, { username => $user->username(), - firstName => $user->profileField("firstName"), - middleName => $user->profileField("middleName"), - lastName => $user->profileField("lastName"), - alias => $user->profileField("alias"), + firstName => $user->get("firstName"), + middleName => $user->get("middleName"), + lastName => $user->get("lastName"), + alias => $user->get("alias"), avatar => $avatar_url, uid => $row{'userId'}, sessionId => $row{'sessionId'}, diff --git a/lib/WebGUI/Macro/ViewCart.pm b/lib/WebGUI/Macro/ViewCart.pm index a5bde569b..f6e0dd4d2 100644 --- a/lib/WebGUI/Macro/ViewCart.pm +++ b/lib/WebGUI/Macro/ViewCart.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::ViewCart; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Macro/Widget.pm b/lib/WebGUI/Macro/Widget.pm index b744136c3..9efb30575 100644 --- a/lib/WebGUI/Macro/Widget.pm +++ b/lib/WebGUI/Macro/Widget.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::Widget; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -11,6 +11,9 @@ package WebGUI::Macro::Widget; #------------------------------------------------------------------- use strict; +use WebGUI::Exception; +use WebGUI::Asset; +use WebGUI::Storage; #------------------------------------------------------------------- @@ -30,33 +33,20 @@ sub process { # Get location for CSS and JS files my $conf = $session->config; - my $extras = $conf->get("extrasURL"); + my $extras = $session->url->make_urlmap_work($conf->get("extrasURL")); # add CSS and JS to the page my $style = $session->style; - $style->setLink($extras."/yui/build/container/assets/container.css",{ - rel=>"stylesheet", - type=>"text/css", - } - ); + $style->setCss($extras."/yui/build/container/assets/container.css"); # and the JS - $style->setScript($extras."/wgwidget.js",{ - type=>"text/javascript" - } - ); - $style->setScript($extras."/yui/build/yahoo-dom-event/yahoo-dom-event.js",{ - type=>"text/javascript" - } - ); - $style->setScript($extras."/yui/build/container/container-min.js",{ - type=>"text/javascript" - } - ); + $style->setScript($extras."/wgwidget.js"); + $style->setScript($extras."/yui/build/yahoo-dom-event/yahoo-dom-event.js"); + $style->setScript($extras."/yui/build/container/container-min.js"); # construct the absolute URL and get the asset ID - my $asset = WebGUI::Asset->newByUrl($session, $url); - if ( !$asset ) { + my $asset = eval { WebGUI::Asset->newByUrl($session, $url); }; + if ( Exception::Class->caught() ) { return "Widget: Could not find asset with URL '$url'"; } my $assetId = $asset->getId; diff --git a/lib/WebGUI/Macro/_macro.skeleton b/lib/WebGUI/Macro/_macro.skeleton index 3cbbaf09c..42236f36a 100644 --- a/lib/WebGUI/Macro/_macro.skeleton +++ b/lib/WebGUI/Macro/_macro.skeleton @@ -1,7 +1,7 @@ package WebGUI::Macro::MacroSkeleton; # edit this line to match your own macro name #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Macro/a_account.pm b/lib/WebGUI/Macro/a_account.pm index fa7cb54ee..c5af63e36 100644 --- a/lib/WebGUI/Macro/a_account.pm +++ b/lib/WebGUI/Macro/a_account.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::a_account; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -44,12 +44,12 @@ sub process { my @param = @_; return $session->url->page("op=auth;method=init") if ($param[0] eq "linkonly"); my $i18n = WebGUI::International->new($session,'Macro_a_account'); - $var{'account.url'} = $session->url->page('op=auth;method=init'); - $var{'account.text'} = $param[0] || $i18n->get(46); + $var{'account_url'} = $session->url->page('op=auth;method=init'); + $var{'account_text'} = $param[0] || $i18n->get(46); if ($param[1]) { - return WebGUI::Asset::Template->newByUrl($session,$param[1])->process(\%var); + return WebGUI::Asset::Template->newByUrl($session, $param[1])->process(\%var); } else { - return WebGUI::Asset::Template->new($session,"PBtmpl0000000000000037")->process(\%var); + return WebGUI::Asset::Template->newById($session, "PBtmpl0000000000000037")->process(\%var); } } diff --git a/lib/WebGUI/Macro/c_companyName.pm b/lib/WebGUI/Macro/c_companyName.pm index fa1f4b2de..3a384a7e1 100644 --- a/lib/WebGUI/Macro/c_companyName.pm +++ b/lib/WebGUI/Macro/c_companyName.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::c_companyName; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Macro/e_companyEmail.pm b/lib/WebGUI/Macro/e_companyEmail.pm index 5fef749b5..d445b6c9a 100644 --- a/lib/WebGUI/Macro/e_companyEmail.pm +++ b/lib/WebGUI/Macro/e_companyEmail.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::e_companyEmail; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Macro/r_printable.pm b/lib/WebGUI/Macro/r_printable.pm index ce2c3dfd5..19f688579 100644 --- a/lib/WebGUI/Macro/r_printable.pm +++ b/lib/WebGUI/Macro/r_printable.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::r_printable; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,7 +13,6 @@ package WebGUI::Macro::r_printable; use strict; use WebGUI::International; use WebGUI::Asset::Template; -use WebGUI::Utility; =head1 NAME @@ -55,7 +54,7 @@ sub process { my $append = 'op=makePrintable'; $temp = $session->url->page($append); $temp =~ s/\/\//\//; - $temp = $session->url->append($temp,$session->env->get("QUERY_STRING")); + $temp = $session->url->append($temp,$session->request->env->{"QUERY_STRING"}); if ($param[1] ne "") { $temp = $session->url->append($temp,'styleId='.$param[1]); } @@ -71,7 +70,7 @@ sub process { if ($param[2]) { $temp = WebGUI::Asset::Template->newByUrl($session,$param[2])->process(\%var); } else { - $temp = WebGUI::Asset::Template->new($session,"PBtmpl0000000000000045")->process(\%var); + $temp = WebGUI::Asset::Template->newById($session,"PBtmpl0000000000000045")->process(\%var); } } return $temp; diff --git a/lib/WebGUI/Macro/u_companyUrl.pm b/lib/WebGUI/Macro/u_companyUrl.pm index 66a8ce538..ad9d81509 100644 --- a/lib/WebGUI/Macro/u_companyUrl.pm +++ b/lib/WebGUI/Macro/u_companyUrl.pm @@ -1,7 +1,7 @@ package WebGUI::Macro::u_companyUrl; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Mail/Get.pm b/lib/WebGUI/Mail/Get.pm index 219c54e05..f817249f5 100644 --- a/lib/WebGUI/Mail/Get.pm +++ b/lib/WebGUI/Mail/Get.pm @@ -3,7 +3,7 @@ package WebGUI::Mail::Get; =head1 LEGAL ------------------------------------------------------------------- -WebGUI is Copyright 2001-2009 Plain Black Corporation. +WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -77,11 +77,11 @@ sub connect { my $params = shift; my $pop = Net::POP3->new($params->{server}, Timeout => 60); unless (defined $pop) { - $session->errorHandler->error("Couldn't connect to POP3 server ". $params->{server}); + $session->log->error("Couldn't connect to POP3 server ". $params->{server}); return undef; } unless ($pop->login($params->{account}, $params->{password})) { - $session->errorHandler->error("Couldn't log in to POP3 server ".$params->{server}." as ".$params->{account}); + $session->log->error("Couldn't log in to POP3 server ".$params->{server}." as ".$params->{account}); return undef; } my $messageNumbers = $pop->list; @@ -160,7 +160,7 @@ sub getNextMessage { $self->{_pop}->delete($id); } else { - $self->session->errorHandler->error("Could not parse POP3 message $id"); + $self->session->log->error("Could not parse POP3 message $id"); return undef; } my $head = $parsedMessage->head; @@ -191,7 +191,7 @@ sub getNextMessage { my $messageId = decode('MIME-Header', $head->get("Message-Id")) || undef; chomp $messageId; if ($skipAuto) { # drop autogenerated messages - $self->session->errorHandler->info("POP3: Dropped auto generated message ".$messageId." from ".$from." to ".$to); + $self->session->log->info("POP3: Dropped auto generated message ".$messageId." from ".$from." to ".$to); return $self->getNextMessage; } my $cc = decode('MIME-Header', $head->get("Cc")) || undef; @@ -213,7 +213,7 @@ sub getNextMessage { ); $data{parts} = $self->parseParts($parsedMessage); unless (scalar(@{$data{parts}}) > 0) { # drop empty messages - $self->session->errorHandler->info( + $self->session->log->info( "POP3: Dropped empty message ".$data{messageId}." from ".$data{from}." to ".$data{to} ); return $self->getNextMessage; diff --git a/lib/WebGUI/Mail/Send.pm b/lib/WebGUI/Mail/Send.pm index b12386df0..3b412cd4d 100644 --- a/lib/WebGUI/Mail/Send.pm +++ b/lib/WebGUI/Mail/Send.pm @@ -3,7 +3,7 @@ package WebGUI::Mail::Send; =head1 LEGAL ------------------------------------------------------------------- -WebGUI is Copyright 2001-2009 Plain Black Corporation. +WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -332,7 +332,7 @@ sub create { $email = $user->getInboxNotificationAddresses; } else { - $email = $user->profileField("email"); + $email = $user->get("email"); } if ($email) { if ($headers->{to}) { @@ -568,7 +568,7 @@ sub send { $emailAddress = $user->getInboxNotificationAddresses; } else { - $emailAddress = $user->profileField('email'); + $emailAddress = $user->get('email'); } next USER unless $emailAddress; $mail->head->replace('To', $emailAddress); diff --git a/lib/WebGUI/Middleware/Debug/Environment.pm b/lib/WebGUI/Middleware/Debug/Environment.pm new file mode 100644 index 000000000..4849b0d20 --- /dev/null +++ b/lib/WebGUI/Middleware/Debug/Environment.pm @@ -0,0 +1,20 @@ +package WebGUI::Middleware::Debug::Environment; +use 5.008; +use strict; +use warnings; +use parent qw(Plack::Middleware::Debug::Environment); +our $VERSION = '0.01'; + +sub run { + my ($self, $env, $panel) = @_; + + my $filtered_env = { %$env }; + + delete $filtered_env->{'plack.debug.panels'}; + $filtered_env->{'webgui.session'} &&= 'bless({ ... }, "WebGUI::Session")'; + + $self->SUPER::run($filtered_env, $panel); +} + +1; + diff --git a/lib/WebGUI/Middleware/Debug/Performance.pm b/lib/WebGUI/Middleware/Debug/Performance.pm new file mode 100644 index 000000000..c77ade721 --- /dev/null +++ b/lib/WebGUI/Middleware/Debug/Performance.pm @@ -0,0 +1,77 @@ +package WebGUI::Middleware::Debug::Performance; +use 5.008; +use strict; +use warnings; +use parent qw(Plack::Middleware::Debug::Base); +our $VERSION = '0.07'; + +sub panel_name { 'Asset Performance' } + +sub run { + my ($self, $env, $panel) = @_; + + my $perf_log = []; + $env->{'webgui.perf.logger'} = sub { + my $args = shift; + my $asset = $args->{asset}; + my $log_data = { + 'time' => $args->{time}, + 'type' => $args->{type}, + 'message' => $args->{message}, + $asset ? ( + 'viewUrl' => $asset->getUrl, + 'editUrl' => $asset->getUrl('func=edit'), + 'assetTitle' => $asset->title, + ) : (), + }; + push @$perf_log, $log_data; + }; + + return sub { + my $res = shift; + + $panel->nav_subtitle(scalar @$perf_log . ' events'); + if (@$perf_log) { + $panel->content($self->render_log($perf_log)); + } + }; +} + +my $log_template = __PACKAGE__->build_template(<<'EOTMPL'); + + + + + + + + + +% my $i; +% for my $event ( @{ $_[0]->{list} } ) { + + + + + +% } + +
    TimeTypeItem
    <%= $event->{time} %><%= $event->{type} %> +% if ($event->{message}) { + <%= $event->{message} %> +% } +% if ($event->{assetTitle}) { + View + Edit + <%= $event->{assetTitle} %> +% } +
    +EOTMPL + +sub render_log { + my ($self, $events) = @_; + $self->render($log_template, { list => $events }); +} + +1; + diff --git a/lib/WebGUI/Middleware/HTTPExceptions.pm b/lib/WebGUI/Middleware/HTTPExceptions.pm new file mode 100644 index 000000000..c6b8192c5 --- /dev/null +++ b/lib/WebGUI/Middleware/HTTPExceptions.pm @@ -0,0 +1,47 @@ +package WebGUI::Middleware::HTTPExceptions; +use strict; +use parent qw(Plack::Middleware::HTTPExceptions); + +=head1 NAME + +WebGUI::Middleware::HTTPExceptions - Converts Exceptions into HTTP Errors + +=head1 DESCRIPTION + +This is PSGI middleware for WebGUI that detects exceptions and turns +them into HTTP Errors. This class is a subclass of L + +=cut + +use Carp (); +use Try::Tiny; +use Scalar::Util 'blessed'; +use HTTP::Status (); + +=head2 transform_error ($env) + +Transforms exceptions of the class WebGUI::Error::Fatal into HTTP 500 error messages, displaying +the contents of the exception to the user. + +=head3 $env + +A Plack environment hash + +=cut + +sub transform_error { + my $self = shift; + my ($e, $env) = @_; + + # Handle WebGUI::Error::Fatal errors specially, since unlike most 500 + # errors we actually want the user to see the error message (generated by + # $session->log->fatal) + if (blessed $e && $e->isa('WebGUI::Error::Fatal')) { + my $message = $e->message; + return [ 500, [ 'Content-Type' => 'text/html', 'Content-Length' => length($message) ], [ $message ] ]; + } else { + $self->SUPER::transform_error(@_); + } +} + +1; diff --git a/lib/WebGUI/Middleware/Maintenance.pm b/lib/WebGUI/Middleware/Maintenance.pm new file mode 100644 index 000000000..4badac76a --- /dev/null +++ b/lib/WebGUI/Middleware/Maintenance.pm @@ -0,0 +1,70 @@ +package WebGUI::Middleware::Maintenance; + +=head1 LEGAL + + ------------------------------------------------------------------- + WebGUI is Copyright 2001-2012 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 + ------------------------------------------------------------------- + +=cut + +use strict; +use parent qw(Plack::Middleware); + + +=head1 NAME + +Package WebGUI::Content::Maintenance; + +=head1 DESCRIPTION + +A content handler that displays a maintenance page while upgrading. + +=head1 SYNOPSIS + + enable '+WebGUI::Middleware::Maintenance'; + +=head1 SUBROUTINES + +These subroutines are available from this package: + +=cut + +#------------------------------------------------------------------- + +=head2 call ( $env ) + +Interface method for this middleware. It checks the settings for the special entry, upgradeState. +If this is set, then it returns an HTTP 503. It will also clear the maintenance state when the +upgrade is complete. + +=head3 $env + +A Plack environment hash. This is used to access the WebGUI Session object. + +=cut + +sub call { + my $self = shift; + my $env = shift; + my $session = $env->{'webgui.session'}; + my $upgradeState = $session->setting->get('upgradeState'); + if ($upgradeState) { + if ($upgradeState eq WebGUI->VERSION) { + $session->setting->remove('upgradeState'); + } + else { + return [ 503, ['Content-Type' => 'text/plain'], [ 'Service Unavailable' ] ]; + } + } + return $self->app->($env); +} + +1; + diff --git a/lib/WebGUI/Middleware/Session.pm b/lib/WebGUI/Middleware/Session.pm new file mode 100644 index 000000000..4858da36b --- /dev/null +++ b/lib/WebGUI/Middleware/Session.pm @@ -0,0 +1,112 @@ +package WebGUI::Middleware::Session; +use strict; +use parent qw(Plack::Middleware); +use WebGUI::Config; +use WebGUI::Session; +use Try::Tiny; +use WebGUI::Middleware::HTTPExceptions; +use Plack::Util::Accessor qw( config ); + +=head1 NAME + +WebGUI::Middleware::Session - Opens and closes the per-request WebGUI::Session + +=head1 DESCRIPTION + +This is PSGI middleware for WebGUI that instantiates, opens and closes the +L object. It does this as early and as late as possible, so +that all intermediate middleware (and the WebGUI app itself) can grab +the session out of the PSGI env hash: + + $env->{'webgui.session'}; + +and not worry about closing it. + +It also sets C as appropriate. + +=head2 call ($env) + +Interface method for this Middleware class. + +=head3 $env + +A plack environment hash + +=cut + +sub call { + my ( $self, $env ) = @_; + + my $app = $self->app; + + my $config = $self->config or die 'Mandatory config parameter missing'; + + # Logger fallback + if (!$env->{'psgix.logger'}) { + require Plack::Middleware::SimpleLogger; + $app = Plack::Middleware::SimpleLogger->wrap( $app ); + } + + my $session = $env->{'webgui.session'} = WebGUI::Session->open( $config, $env ) or + die "Unable to instantiate WebGUI::Session - $_"; + + if ( !$session ) { + + # We don't have access to a db connection to find out if the user is allowed to see + # a verbose error message or not, so resort to a generic Internal Server Error + return [ 500, [ 'Content-Type' => 'text/plain' ], [ 'Internal Server Error' ] ]; + } + + my $debug = $env->{'webgui.debug'} = $self->canShowDebug($env); + + # Run the app + my $res = $app->($env); + + # Use callback style response + return $self->response_cb( + $res, + sub { + my $res = shift; + + # Close the Session if we aren't streaming + if ( $env->{'webgui.session'} and $env->{'webgui.session'}->response and ! $env->{'webgui.session'}->response->streaming ) { + $env->{'webgui.session'}->close(); + delete $env->{'webgui.session'}; + } + + # If we are streaming, the session will be closed inside of + # WebGUI.pm + } + ); +} + +=head2 canShowDebug ($env) + +Checks to see whether or not the owner of this session can see debug output. It checks +WebGUI settings showDebug and ipDebug for this. + +=head3 $env + +A Plack environment hash. + +=cut + +sub canShowDebug { + my $self = shift; + my $env = shift; + my $session = $env->{'webgui.session'}; + + my $canShow = $session->setting->get("showDebug"); + return + unless $canShow; + + my $ips = $session->setting->get('ipDebug'); + return 1 + if $ips eq ''; + $ips =~ s/\s+//g; + my @ips = split /,/, $ips; + my $ok = Net::CIDR::Lite->new(@ips)->find($env->{REMOTE_ADDR}); + return $ok; +} + +1; diff --git a/lib/WebGUI/Middleware/Snoop.pm b/lib/WebGUI/Middleware/Snoop.pm new file mode 100644 index 000000000..4ad6e2b82 --- /dev/null +++ b/lib/WebGUI/Middleware/Snoop.pm @@ -0,0 +1,42 @@ +package WebGUI::Middleware::Snoop; +use strict; +use parent qw(Plack::Middleware); + +=head1 NAME + +WebGUI::Middleware::Snoop - sample middleware port of WebGUI::URL::Snoop + +=head1 DESCRIPTION + +This is PSGI middleware for WebGUI. + +It was ported from L, back when we still had URL handlers. + +L described itself as "A URL handler that should never be called." + +You might find this middleware useful as a template for creating other simple classes. + +=head2 call ($env) + +Interface method for Plack to call, for this class. + +=head3 $env + +A Plack environment hash + +=cut + +sub call { + my $self = shift; + my $env = shift; + + my $path = $env->{PATH_INFO}; + if ($path =~ qr{^/abcdefghijklmnopqrstuvwxyz$}) { + my $snoop = q|Snoopy
    Why would you type in this URL? Really. What were you expecting to see here? You really need to get a life. Are you still here? Seriously, you need to go do something else. I think your boss is calling.
    |; + return [ 200, [ 'Content-Type' => 'text/html' ], [ $snoop ] ]; + } else { + return $self->app->($env); + } +} + +1; diff --git a/lib/WebGUI/Middleware/StackTrace.pm b/lib/WebGUI/Middleware/StackTrace.pm new file mode 100644 index 000000000..6378f7214 --- /dev/null +++ b/lib/WebGUI/Middleware/StackTrace.pm @@ -0,0 +1,427 @@ +package WebGUI::Middleware::StackTrace; + +use strict; +use warnings; +use parent qw/Plack::Middleware/; +use Devel::StackTrace; +use Devel::StackTrace::AsHTML; +use Try::Tiny; +use Plack::Util::Accessor qw( force no_print_errors ); +use Scalar::Util 'blessed'; +use Data::Dumper; +use Plack::Middleware::StackTrace; +use WebGUI::Session::Log; + +BEGIN { + + no warnings 'redefine'; + + if (eval { require Devel::StackTrace::WithLexicals; 1 }) { + # Optional since it needs PadWalker + + my $old_new = Devel::StackTrace->can('new'); + *Devel::StackTrace::new = sub { + my $self = $old_new ? $old_new->(@_) : { }; + bless $self, 'Devel::StackTrace::WithLexicals'; # rebless + }; + } + +} + +sub call { + my($self, $env) = @_; + + # this won't be Middleware called by the .psgi in the default config unless $env->{'webgui.debug'} is true + + local $SIG{__DIE__} = sub { + WebGUI::Error::RunTime->throw(error => $@); + }; + + my $res = try { $self->app->($env) }; # XXX this try is useless; plack doesn't let errors cross middlewares + + if( my $e = delete $env->{'webgui.error'} ) { + + my $trace = $e->trace; + my $message = $e->error; + + my $text = trace_as_string($trace); + + my @previous_html = $res && $res->[2] ? (map ref $_ ? @{ $_ } : $_, $res->[2]) : (); + + $env->{'psgi.errors'}->print($text) unless $self->no_print_errors; + my $html = eval { trace_as_html($trace, $env->{'webgui.session'}, $message) }; + $res = [500, ['Content-Type' => 'text/html; charset=utf-8'], [ utf8_safe($html), @previous_html ] ]; + } + + return $res; +} + +sub trace_as_string { + my $trace = shift; + my $message = shift; + + my $st = "$message:\n"; + my $first = 1; + $trace->reset_pointer; + while( my $f = $trace->next_frame ) { + $st .= "\t" unless $first; + $st .= $f->as_string($first) . "\n"; + $first = 0; + } + + return $st; +} + +do { + no strict 'subs'; + no strict 'refs'; + *encode_html = *Devel::StackTrace::AsHTML::encode_html{CODE}; + *_build_context = *Devel::StackTrace::AsHTML::_build_context{CODE}; + # *_build_arguments = *Devel::StackTrace::AsHTML::_build_arguments{CODE}; + # *_build_lexicals = *Devel::StackTrace::AsHTML::_build_lexicals{CODE}; +}; + +sub trace_as_html { + + my $trace = shift; + my $session = shift or die; + my $message = shift; + my %opt = @_; + + # copied and modified render() from Devel::StackTrace::WithLexicals + # "$trace->as_html" just does "__PACKAGE__->render" in D::ST::WL + + my $extras = sub { $session->url->extras(@_) }; + + my $msg = encode_html($trace->frame(1)->args); + my $out = qq{Error: ${msg}}; + + $opt{style} ||= \<${$opt{style}}); + } else { + $out .= qq(); + } + + $out .= < +function toggleThing(ref, type, hideMsg, showMsg) { + var css = document.getElementById(type+'-'+ref).style; + css.display = css.display == 'block' ? 'none' : 'block'; + + var hyperlink = document.getElementById('toggle-'+ref); + hyperlink.textContent = css.display == 'block' ? hideMsg : showMsg; +} + +function toggleArguments(ref) { + toggleThing(ref, 'arguments', 'Hide function arguments', 'Show function arguments'); +} + +function toggleLexicals(ref) { + toggleThing(ref, 'lexicals', 'Hide lexical variables', 'Show lexical variables'); +} + + + + + + + + + + + + +

    Error trace

    $message
    $msg
      +HEAD + + my $accumulated_asset_info = []; # record the stack frames from when we find an asset on the call stack + + $trace->reset_pointer; + $trace->next_frame; # for 1..2; + my $i = 0; + while (my $frame = $trace->next_frame) { + + $i++; + $out .= join( + '', + '
    1. ', + $frame->subroutine ? encode_html("in " . $frame->subroutine) : '', + ' at ', + $frame->filename ? encode_html($frame->filename) : '', + ' line ', + $frame->line, + _build_asset_info($i, ($frame->args)[0], $accumulated_asset_info, $frame), # adds data to $accumulated_asset_info; this line added relative the stock Devel::StackTrace::AsHTML + q(
      ),
      +            _build_context($frame) || '', 
      +            q(
      ), + _build_arguments($i, [$frame->args]), + $frame->can('lexicals') ? _build_lexicals($i, $frame->lexicals) : '', + q(
    2. ), + ); + } + $out .= qq{
    }; + + # # dump the asset tree + # + # my $assets = WebGUI::Asset->getRoot($session)->getLineage(['descendants'], {returnObjects=>1}); + # + # my $tree = { type => 'text', label => 'root', children => [], }; + # + # for my $asset (@$assets) { + # # create a tree structure of assets matching their lineage + # # the format (arrays, hashes, fields) matches what YAHOO.treeview expects + # # when we find an asset mentioned in one of the stack trace frames above, we add the saved file/line/etc info to the label + # my $lineage = $asset->get('lineage'); + # my @parts = $lineage =~ m/(.{6})/g; + # # warn "asset: $asset lineage: $lineage parts: @parts"; + # my $node = $tree; + # while(@parts) { + # my $part = shift @parts; + # if((my $child_node) = grep $_->{lineage_chunk} eq $part, @{$node->{children}}) { + # $node = $child_node; + # } else { + # my $label = $asset->get('title') . ': Id: ' . $asset->getId . ' Class: ' . ref($asset); + # for my $message ( map $_->{message}, grep $_->{asset_id} eq $asset->getId, @$accumulated_asset_info ) { + # $label .= " <----- $message"; + # } + # my $child_node = { + # type => 'text', + # label => $label, + # lineage_chunk => $part, + # children => [ ], + # }; + # push @{$node->{children}}, $child_node; + # $node = $child_node; + # } + # } + # } + # + # use JSON::PP; # JSON::XS creates something that's mangled + # my $json_tree = JSON::PP->new->ascii->pretty->encode( [ $tree ] ); + # + # warn "json_tree: $json_tree"; + # do { open my $fh, '>', 'json.debug2.js' or die $!; $fh->print($json_tree); }; + # + # $out .= qq{ + #
    1. + #
      + #
    + # + # }; + + $out .= ""; + + return $out; +} + +sub _build_asset_info { + my($id, $asset, $accumulated_asset_info, $frame) = @_; + + return '' unless $asset and Scalar::Util::blessed($asset) and $asset->isa('WebGUI::Asset'); + + my $asset_title = $asset->get('title'); + my $asset_id = $asset->getId; + my $asset_class = ref $asset; + + my $message = "Stack frame number: $id AssetID: $asset_id Class: $asset_class Title: ``$asset_title''"; + + push @$accumulated_asset_info, { asset_id => $asset_id, message => $message, }; + + return $message; +} + +my $dumper = sub { + my $value = shift; + $value = $$value if ref $value eq 'SCALAR' or ref $value eq 'REF'; + my $d = Data::Dumper->new([ $value ]); + # $d->Indent(1)->Terse(1)->Deparse(1); + $d->Indent(1)->Terse(1)->Maxdepth(1); + chomp(my $dump = $d->Dump); + $dump; +}; + +# copied this in so that we could use a differently configured Data::Dumper + +sub _build_arguments { + my($id, $args) = @_; + my $ref = "arg-$id"; + + return '' unless @$args; + + my $html = qq(

    Show function arguments

    ); + + # Don't use while each since Dumper confuses that + for my $idx (0 .. @$args - 1) { + my $value = $args->[$idx]; + my $dump = $dumper->($value); + $html .= qq{}; + $html .= qq{}; + $html .= qq{}; + $html .= qq{}; + } + $html .= qq(
    \$_[$idx]} . encode_html($dump) . qq{
    ); + + return $html; +} + +# copied this in so that we could use a differently configured Data::Dumper + +sub _build_lexicals { + my($id, $lexicals) = @_; + my $ref = "lex-$id"; + + return '' unless keys %$lexicals; + + my $html = qq(

    Show lexical variables

    ); + + # Don't use while each since Dumper confuses that + for my $var (sort keys %$lexicals) { + my $value = $lexicals->{$var}; + my $dump = $dumper->($value); + $dump =~ s/^\{(.*)\}$/($1)/s if $var =~ /^\%/; + $dump =~ s/^\[(.*)\]$/($1)/s if $var =~ /^\@/; + $html .= qq{}; + $html .= qq{}; + $html .= qq{}; + $html .= qq{}; + } + $html .= qq(
    } . encode_html($var) . qq{} . encode_html($dump) . qq{
    ); + + return $html; +} + +sub utf8_safe { + my $str = shift; + + # NOTE: I know messing with utf8:: in the code is WRONG, but + # because we're running someone else's code that we can't + # guarnatee which encoding an exception is encoded, there's no + # better way than doing this. The latest Devel::StackTrace::AsHTML + # (0.08 or later) encodes high-bit chars as HTML entities, so this + # path won't be executed. + if (utf8::is_utf8($str)) { + utf8::encode($str); + } + + $str; +} + +1; + +__END__ + +=head1 NAME + +Plack^HWebGUI::Middleware::StackTrace - Displays stack trace when your app dies + +=head1 SYNOPSIS + + enable "+WebGUI::Middleware::StackTrace"; + +=head1 DESCRIPTION + +This middleware is a copy and modification of L, a +middleware which catches exceptions (run-time errors) happening in your +application and displays nice stack trace screen. + +This copy has been extended to display additional WebGUI specific information. +The stack trace is annotated with titles and object types of assets for +stack frames running inside of method calls to assets. + +This fork of C also hooks into L. +Stack traces are generated on call to C<< $session->log->error >> +or C<< $session->log->fatal >>. +L will (almost) never display a +stack trace for WebGUI as errors are caught and turned into HTTP +C<200> replies. + +You're recommended to use this middleware during the development and +use L in the deployment mode as a +replacement, so that all the exceptions thrown from your application +still get caught and rendered as a 500 error response, rather than +crashing the web server. + +Catching errors in streaming response is not supported. + +=head1 CONFIGURATION + +=over 4 + +=item force + + enable "+WebGUI::Middleware::StackTrace", force => 1; + +Force display the stack trace when an error occurs within your +application and the response code from your application is +500. Defaults to off. + +The use case of this option is that when your framework catches all +the exceptions in the main handler and returns all failures in your +code as a normal 500 PSGI error response. In such cases, this +middleware would never have a chance to display errors because it +can't tell if it's an application error or just random C in your +code. This option enforces the middleware to display stack trace even +if it's not the direct error thrown by the application. + +=item no_print_errors + + enable "+WebGUI::Middleware::StackTrace", no_print_errors => 1; + +Skips printing the text stacktrace to console +(C). Defaults to 0, which means the text version of the +stack trace error is printed to the errors handle, which usually is a +standard error. + +=back + +=head1 AUTHOR + +Scott Walters + +With code taken from: + +Tatsuhiko Miyagawa Emiyagawa@bulknews.netE + +Tokuhiro Matsuno + +Shawn M Moore + +HTML generation code is ripped off from L written by Tokuhiro Matsuno and Kazuho Oku. + +=head1 SEE ALSO + +L + +L L L L + +=cut + diff --git a/lib/WebGUI/Middleware/WGAccess.pm b/lib/WebGUI/Middleware/WGAccess.pm new file mode 100644 index 000000000..a51fed001 --- /dev/null +++ b/lib/WebGUI/Middleware/WGAccess.pm @@ -0,0 +1,81 @@ +package WebGUI::Middleware::WGAccess; +use strict; +use parent qw(Plack::Middleware); +use Path::Class::File; +use Scalar::Util; +use JSON (); + +=head1 NAME + +WebGUI::Middleware::WGAccess - control access to .wgaccess protected uploads + +=head1 DESCRIPTION + +This is PSGI middleware for WebGUI that delivers static files (uploads) with .wgaccess +awareness. + +This middleware should really only be used in development, for production you want +to be serving static files with something a lot faster. + +=head2 call ($env) + +Interface subroutine to implement the privilege checks inside the WGaccess files. + +=head3 $env + +A Plack environment hash + +=cut + +sub call { + my $self = shift; + my $env = shift; + my $session = $env->{'webgui.session'}; + if (! $session) { + my $logger = $env->{'psgix.logger'}; + $logger && $logger->({ level => 'error', message => 'WebGUI session missing!'}); + return [500, ['Content-Type' => 'text/plain'], 'Internal Server Error']; + } + + my $r = $self->app->($env); + $self->response_cb($r, sub { + my ($status, $headers, $body) = @$r; + return + unless Scalar::Util::blessed($body) && $body->can('path'); + + my $file = Path::Class::File->new($body->path); + my $wgaccess = $file->dir->file('.wgaccess'); + return + unless -e $wgaccess; + my $contents = $wgaccess->slurp; + my $privs; + if ($contents =~ /\A(\d+|[A-Za-z0-9_-]{22})\n(\d+|[A-Za-z0-9_-]{22})\n(\d+|[A-Za-z0-9_-]{22})/) { + $privs = { + users => [ $1 ], + groups => [ $2, $3 ], + assets => [], + }; + } + else { + $privs = JSON->new->utf8->decode($contents); + } + + return @$r = (403, [ 'Content-Type' => 'text/plain' ], [ 'Forbidden' ]) + if $privs->{state} eq 'trash'; + + require WebGUI::Asset; + my $userId = $session->get('userId'); + + return + if grep { $_ eq '1' || $_ eq $userId } @{ $privs->{users} } + or grep { $_ eq '1' || $_ eq '7' } @{ $privs->{groups} } + or grep { $session->user->isInGroup($_) } @{ $privs->{groups} } + or grep { WebGUI::Asset->newById($session, $_)->canView } @{ $privs->{assets} } + ; + + # failed auto, change response into auth failure + @$r = (401, [ 'Content-Type' => 'text/plain' ], [ 'Authorization Required' ]); + }); +} + +1; diff --git a/lib/WebGUI/Operation.pm b/lib/WebGUI/Operation.pm index 2e9273dfa..c4f2db169 100644 --- a/lib/WebGUI/Operation.pm +++ b/lib/WebGUI/Operation.pm @@ -1,7 +1,7 @@ package WebGUI::Operation; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -57,11 +57,11 @@ sub execute { $output = eval { WebGUI::Pluggable::run("WebGUI::Operation::".$operation->{$op}, 'www_'.$op, [ $session ] ) }; if ( $@ ) { die $@ if ($@ =~ "^fatal:"); - $session->errorHandler->error($@); + $session->log->error($@); return undef; } } else { - $session->errorHandler->security("execute an invalid operation: ".$op); + $session->log->security("execute an invalid operation: ".$op); } return $output; } @@ -256,10 +256,6 @@ sub getOperations { 'moveColorDown' => 'Graphics', 'moveColorUp' => 'Graphics', 'removeColorFromPalette' => 'Graphics', - - 'spellCheck' => 'SpellCheck', - 'suggestWords' => 'SpellCheck', - 'addWordToDictionary' => 'SpellCheck', }; } diff --git a/lib/WebGUI/Operation/ActiveSessions.pm b/lib/WebGUI/Operation/ActiveSessions.pm index 9ebe7b677..75959fc2b 100644 --- a/lib/WebGUI/Operation/ActiveSessions.pm +++ b/lib/WebGUI/Operation/ActiveSessions.pm @@ -1,7 +1,7 @@ package WebGUI::Operation::ActiveSessions; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -53,7 +53,7 @@ $session->form->process("sid"). Afterwards, it calls www_viewActiveSessions. sub www_killSession { my $session = shift; - return www_viewActiveSessions($session) if $session->form->process("sid") eq $session->var->get("sessionId"); + return www_viewActiveSessions($session) if $session->form->process("sid") eq $session->getId; return $session->privilege->adminOnly unless canView($session); $session->db->write("delete from userSession where sessionId=?",[$session->form->process("sid")]); $session->db->write("delete from userSessionScratch where sessionId=?", [$session->form->process("sid")]); diff --git a/lib/WebGUI/Operation/AdSpace.pm b/lib/WebGUI/Operation/AdSpace.pm index 8b4a97b2c..c7a05760a 100644 --- a/lib/WebGUI/Operation/AdSpace.pm +++ b/lib/WebGUI/Operation/AdSpace.pm @@ -1,7 +1,7 @@ package WebGUI::Operation::AdSpace; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -56,7 +56,7 @@ sub www_clickAd { my $id = $session->form->param("id"); return undef unless $id; my $url = WebGUI::AdSpace->countClick($session, $id); - $session->http->setRedirect($url); + $session->response->setRedirect($url); return undef; } diff --git a/lib/WebGUI/Operation/Admin.pm b/lib/WebGUI/Operation/Admin.pm index a42b1fb8b..56240921e 100644 --- a/lib/WebGUI/Operation/Admin.pm +++ b/lib/WebGUI/Operation/Admin.pm @@ -1,7 +1,7 @@ package WebGUI::Operation::Admin; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -43,7 +43,7 @@ sub www_adminConsole { =head2 www_switchOffAdmin ( ) If the current user is in the Turn On Admin Group, then allow them to turn off Admin mode -via WebGUI::Session::Var::switchAdminOff() +via WebGUI::Session::switchAdminOff() =cut @@ -51,8 +51,8 @@ via WebGUI::Session::Var::switchAdminOff() sub www_switchOffAdmin { my $session = shift; return "" unless ($session->user->canUseAdminMode); - $session->http->setCacheControl("none"); - $session->var->switchAdminOff(); + $session->response->setCacheControl("none"); + $session->switchAdminOff(); return ""; } @@ -67,8 +67,8 @@ If the current user is in the Turn On Admin Group, then allow them to turn on Ad sub www_switchOnAdmin { my $session = shift; return "" unless ($session->user->canUseAdminMode); - $session->http->setCacheControl("none"); - $session->var->switchAdminOn(); + $session->response->setCacheControl("none"); + $session->switchAdminOn(); return ""; } diff --git a/lib/WebGUI/Operation/Auth.pm b/lib/WebGUI/Operation/Auth.pm index d47107055..3ff9c8010 100644 --- a/lib/WebGUI/Operation/Auth.pm +++ b/lib/WebGUI/Operation/Auth.pm @@ -1,7 +1,7 @@ package WebGUI::Operation::Auth; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -20,7 +20,6 @@ use WebGUI::Operation::Shared; use WebGUI::Pluggable; use WebGUI::SQL; use WebGUI::User; -use WebGUI::Utility; #------------------------------------------------------------------- @@ -46,9 +45,9 @@ sub getInstance { my $userId = $_[1]; #Create Auth Object - my $auth = eval { WebGUI::Pluggable::instanciate("WebGUI::Auth::".$authMethod, "new", [ $session, $authMethod, $userId ] ) }; + my $auth = eval { WebGUI::Pluggable::instanciate("WebGUI::Auth::".$authMethod, "new", [ $session, $userId ] ) }; if ($@) { - $session->errorHandler->fatal($@); + $session->log->fatal($@); } else { return $auth; @@ -70,13 +69,13 @@ is returned. sub www_auth { my $session = shift; - $session->http->setCacheControl("none"); + $session->response->setCacheControl("none"); my $auth; ($auth) = $session->db->quickArray("select authMethod from users where username=".$session->db->quote($session->form->process("username"))) if($session->form->process("username")); my $authMethod = getInstance($session,$auth); - my $methodCall = shift || $session->form->process("method") || "init"; + my $methodCall = shift || $session->form->process("method") || "view"; if(!$authMethod->isCallable($methodCall)){ - $session->errorHandler->security("access uncallable auth method: $methodCall"); + $session->log->security("access uncallable auth method: $methodCall"); my $i18n = WebGUI::International->new($session); return $i18n->get(1077); } @@ -85,7 +84,7 @@ sub www_auth { my $method = $authMethod->can( 'www_' . $methodCall ) || $authMethod->can( $methodCall ); my $out = $method->( $authMethod ); - if (substr($session->http->getMimeType(),0,9) eq "text/html") { + if (substr($session->response->content_type(),0,9) eq "text/html") { return $session->style->userStyle($out); } else { diff --git a/lib/WebGUI/Operation/Cache.pm b/lib/WebGUI/Operation/Cache.pm index 042a83993..b33d75d75 100644 --- a/lib/WebGUI/Operation/Cache.pm +++ b/lib/WebGUI/Operation/Cache.pm @@ -1,7 +1,7 @@ package WebGUI::Operation::Cache; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 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,7 +12,6 @@ package WebGUI::Operation::Cache; use strict; use WebGUI::AdminConsole; -use WebGUI::Cache; use WebGUI::International; use WebGUI::Form; @@ -93,7 +92,7 @@ sub www_flushCache { return $session->privilege->adminOnly unless canView($session); # Flush the cache - WebGUI::Cache->new($session)->flush; + $session->cache->clear; return www_manageCache($session); } @@ -110,20 +109,15 @@ provides an option to clear the cache. sub www_manageCache { my $session = shift; return $session->privilege->adminOnly unless canView($session); - my $cache = WebGUI::Cache->new($session); my $flushURL = $session->url->page('op=flushCache'); my $i18n = WebGUI::International->new($session); - my $output - = '' - . '' - . '' - . '' - . '
    '.$i18n->get('cache type').':'.ref($cache).'
    '.$i18n->get('cache statistics').':
    '.$cache->stats.'
     ' - . WebGUI::Form::button($session, { + my $output = + WebGUI::Form::formHeader($session) + .WebGUI::Form::button($session, { value => $i18n->get("clear cache"), extras => qq{onclick="document.location.href='$flushURL';"}, }) - . '
    ' + .WebGUI::Form::formFooter($session) ; return _submenu($session,$output); diff --git a/lib/WebGUI/Operation/Cron.pm b/lib/WebGUI/Operation/Cron.pm index 08a36a363..c23e3aa86 100644 --- a/lib/WebGUI/Operation/Cron.pm +++ b/lib/WebGUI/Operation/Cron.pm @@ -1,7 +1,7 @@ package WebGUI::Operation::Cron; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -17,7 +17,7 @@ use WebGUI::HTMLForm; use WebGUI::International; use WebGUI::Workflow::Cron; use WebGUI::Workflow::Instance; -use WebGUI::Utility; +use Net::CIDR::Lite; =head1 NAME @@ -269,10 +269,10 @@ Checks to ensure the requestor is who we think it is, and then executes a cron j sub www_runCronJob { my $session = shift; - $session->http->setMimeType("text/plain"); - $session->http->setCacheControl("none"); - unless (isInSubnet($session->env->getIp, $session->config->get("spectreSubnets")) || canView($session)) { - $session->errorHandler->security("make a Spectre cron job runner request, but we're only allowed to accept requests from ".join(",",@{$session->config->get("spectreSubnets")})."."); + $session->response->content_type("text/plain"); + $session->response->setCacheControl("none"); + unless (Net::CIDR::Lite->new(@{ $session->config->get('spectreSubnets') })->find($session->request->address) || canView($session)) { + $session->log->security("make a Spectre cron job runner request, but we're only allowed to accept requests from ".join(",",@{$session->config->get("spectreSubnets")})."."); return "error"; } my $taskId = $session->form->param("taskId"); @@ -292,13 +292,13 @@ sub www_runCronJob { }); if ( !$instance ) { if ($session->stow->get('singletonWorkflowClash')) { - $session->errorHandler->warn( + $session->log->warn( "Could not create workflow instance for workflowId '" . $task->get( "workflowId" ) . "' from taskId '".$taskId."': It is a singleton workflow and is still running from the last invocation." ); return "done"; } - $session->errorHandler->error( + $session->log->error( "Could not create workflow instance for workflowId '" . $task->get( "workflowId" ) . "' from taskId '".$taskId."': The result was undefined" ); @@ -316,7 +316,7 @@ sub www_runCronJob { $task->delete( 1 ) if ( $task->get("runOnce") ); return "done"; } - $session->errorHandler->warn("No task ID passed to cron job runner."); + $session->log->warn("No task ID passed to cron job runner."); return "error"; } diff --git a/lib/WebGUI/Operation/DatabaseLink.pm b/lib/WebGUI/Operation/DatabaseLink.pm index fd90cfb73..2f02874c5 100644 --- a/lib/WebGUI/Operation/DatabaseLink.pm +++ b/lib/WebGUI/Operation/DatabaseLink.pm @@ -1,7 +1,7 @@ package WebGUI::Operation::DatabaseLink; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -11,7 +11,6 @@ package WebGUI::Operation::DatabaseLink; #------------------------------------------------------------------- use strict; -use Tie::CPHash; use WebGUI::AdminConsole; use WebGUI::DatabaseLink; use WebGUI::Exception; @@ -157,7 +156,6 @@ sub www_editDatabaseLink { my $session = shift; return $session->privilege->insufficient unless canView($session); my ($output, %db, $f); - tie %db, 'Tie::CPHash'; if ($session->form->process("dlid") eq "new") { # Default values are SELECT, DESCRIBE and SHOW $db{allowedKeywords} = "select\ndescribe\nshow"; diff --git a/lib/WebGUI/Operation/Fork.pm b/lib/WebGUI/Operation/Fork.pm index ceeadda54..e238ceb07 100644 --- a/lib/WebGUI/Operation/Fork.pm +++ b/lib/WebGUI/Operation/Fork.pm @@ -3,7 +3,7 @@ package WebGUI::Operation::Fork; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Operation/FormHelpers.pm b/lib/WebGUI/Operation/FormHelpers.pm index ee039ce67..de48ccd66 100644 --- a/lib/WebGUI/Operation/FormHelpers.pm +++ b/lib/WebGUI/Operation/FormHelpers.pm @@ -1,7 +1,7 @@ package WebGUI::Operation::FormHelpers; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -11,14 +11,12 @@ package WebGUI::Operation::FormHelpers; #------------------------------------------------------------------- use strict; -use Tie::IxHash; use WebGUI::Asset; use WebGUI::Asset::Wobject::Folder; use WebGUI::Form::Group; use WebGUI::HTMLForm; use WebGUI::Pluggable; use WebGUI::Storage; -use WebGUI::Utility; =head1 NAME @@ -50,7 +48,7 @@ sub www_formHelper { return "ERROR" unless (defined $sub && defined $class); my $output = eval { WebGUI::Pluggable::run($class, "www_".$sub, [$session]) }; if ($@) { - $session->errorHandler->error($@); + $session->log->error($@); return "ERROR"; } return $output; diff --git a/lib/WebGUI/Operation/Friends.pm b/lib/WebGUI/Operation/Friends.pm index 2d2642b2f..c25087eef 100644 --- a/lib/WebGUI/Operation/Friends.pm +++ b/lib/WebGUI/Operation/Friends.pm @@ -1,7 +1,7 @@ package WebGUI::Operation::Friends; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Operation/Group.pm b/lib/WebGUI/Operation/Group.pm index 2b6f6089a..43e148063 100644 --- a/lib/WebGUI/Operation/Group.pm +++ b/lib/WebGUI/Operation/Group.pm @@ -1,7 +1,7 @@ package WebGUI::Operation::Group; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -11,7 +11,6 @@ package WebGUI::Operation::Group; #------------------------------------------------------------------- use strict; -use Tie::CPHash; use WebGUI::AdminConsole; use WebGUI::Group; use WebGUI::Form; @@ -21,7 +20,7 @@ use WebGUI::Mail::Send; use WebGUI::Operation::User; use WebGUI::Paginator; use WebGUI::SQL; -use WebGUI::Utility; +use Tie::IxHash; #---------------------------------------------------------------------------- sub _submenu { diff --git a/lib/WebGUI/Operation/Help.pm b/lib/WebGUI/Operation/Help.pm index a7fbf93f1..8442fd8dc 100644 --- a/lib/WebGUI/Operation/Help.pm +++ b/lib/WebGUI/Operation/Help.pm @@ -1,7 +1,7 @@ package WebGUI::Operation::Help; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -11,13 +11,11 @@ package WebGUI::Operation::Help; #------------------------------------------------------------------- use strict qw(vars subs); -use Tie::IxHash; use WebGUI::AdminConsole; use WebGUI::International; use WebGUI::Asset::Template; use WebGUI::Macro; -use WebGUI::Utility; -use WebGUI::TabForm; +use WebGUI::Pluggable; =head1 NAME @@ -43,7 +41,7 @@ sub _loadHelp { my $helpPackage = shift; eval { WebGUI::Pluggable::load( $helpPackage ); }; if ($@) { - $session->errorHandler->error("Help failed to compile: $helpPackage. ".$@); + $session->log->error("Help failed to compile: $helpPackage. ".$@); return {}; } if (defined *{"$helpPackage\::HELP"}) { ##Symbol table lookup @@ -154,7 +152,7 @@ sub _get { return $help->{$id}; } else { - $session->errorHandler->warn("Unable to load help for $namespace -> $id"); + $session->log->warn("Unable to load help for $namespace -> $id"); return undef; } } @@ -189,29 +187,6 @@ sub _linkTOC { #------------------------------------------------------------------- -=head2 _getHelpFilesList ( $session ) - -Utility routine for returning a list of all Help files in the lib/WebGUI/Help folder. - -=cut - -sub _getHelpFilesList { - my $session = shift; - my $dir = join '/', $session->config->getWebguiRoot,"lib","WebGUI","Help"; - opendir (DIR,$dir) or $session->errorHandler->fatal("Can't open Help directory!"); - my @files; - foreach my $file (readdir DIR) { - next unless $file =~ /.pm$/; - my $modName; - ($modName = $file) =~ s/\.pm$//; - push @files, [ $file, $modName ]; - } - closedir(DIR); - return @files; -} - -#------------------------------------------------------------------- - =head2 _related ( $session, $related ) Utility routine for returning a list of topics related the the current help @@ -253,7 +228,7 @@ A scalar ref to the array of data that will be broken into columns. sub _columnar { my ($columns, $list) = @_; my @entries = @{ $list }; - my $fraction = round(@entries/$columns + 0.50); + my $fraction = sprintf('%.0f', @entries/$columns + 0.50); my $output = ''; @entries = sort { $a->{name} cmp $b->{name} } @entries; my $i = 0; @@ -297,7 +272,7 @@ sub www_viewHelp { my $session = shift; return $session->privilege->insufficient() unless canView($session); my $ac = WebGUI::AdminConsole->new($session,"help"); - $session->style->setLink($session->url->extras("/help.css"), {rel=>"stylesheet", type=>"text/css"}); + $session->style->setCss($session->url->extras("/help.css")); my $namespace = $session->form->process("namespace","className") || "WebGUI"; my $i18n = WebGUI::International->new($session, $namespace); my $help = _get($session,$session->form->process("hid"),$namespace); @@ -315,7 +290,7 @@ sub www_viewHelp { else { $vars{body} = $i18n->get($help->{body}) if $help->{body}; ##Body entry is optional } - my $userUiLevel = $session->user->profileField("uiLevel"); + my $userUiLevel = $session->user->get("uiLevel"); my $uiOverride = $session->form->process("uiOverride"); foreach my $row (@{ $help->{fields} }) { push @{ $vars{fields} }, @@ -325,7 +300,7 @@ sub www_viewHelp { } if ($uiOverride || ($userUiLevel >= ($row->{uiLevel} || 1))); } $vars{variable_loop1} = _getTemplateVars($session, 1, $help->{variables}, $i18n); - my $body = WebGUI::Asset::Template->new($session,"PBtmplHelp000000000001")->process(\%vars); + my $body = WebGUI::Asset::Template->newById($session, "PBtmplHelp000000000001")->process(\%vars); my $uiOverrideText = $uiOverride ? $i18n->get('show my fields','WebGUI') : $i18n->get('show all fields','WebGUI'); $ac->addSubmenuItem(_link($session, $session->form->process("hid"), $namespace).";uiOverride=".!$uiOverride, $uiOverrideText) if $userUiLevel < 9; @@ -379,20 +354,20 @@ sub www_viewHelpIndex { my $session = shift; return $session->privilege->insufficient() unless canView($session); my $i18n = WebGUI::International->new($session); - my @helpIndex; - my @files = _getHelpFilesList($session,); - foreach my $fileSet (@files) { - my $namespace = $fileSet->[1]; - my $help = _load($session,$namespace); - foreach my $key (keys %{$help}) { + my @helpIndex; + my @modules = WebGUI::Pluggable::findAndLoad('WebGUI::Help'); + for my $namespace (@modules) { + $namespace =~ s/^WebGUI::Help:://; + my $help = _load($session,$namespace); + foreach my $key (keys %{$help}) { next if $help->{$key}{private}; my $title = $i18n->get($help->{$key}{title},$namespace); next unless $title; - push @helpIndex, [$namespace, $key, $title]; - } + push @helpIndex, [$namespace, $key, $title]; } + } my $output = ''; diff --git a/lib/WebGUI/Operation/LoginHistory.pm b/lib/WebGUI/Operation/LoginHistory.pm index 2d101cbfe..0826b8bb0 100644 --- a/lib/WebGUI/Operation/LoginHistory.pm +++ b/lib/WebGUI/Operation/LoginHistory.pm @@ -1,7 +1,7 @@ package WebGUI::Operation::LoginHistory; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -53,7 +53,6 @@ sub www_viewLoginHistory { return $session->privilege->adminOnly() unless canView($session); my ($output, $p, @row, $i, $sth, %data); my $i18n = WebGUI::International->new($session); - tie %data, 'Tie::CPHash'; $sth = $session->db->read("select * from users,userLoginLog where users.userId=userLoginLog.userId order by userLoginLog.timeStamp desc"); while (%data = $sth->hash) { $data{username} = $i18n->get('unknown user') if ($data{userId} eq "0"); diff --git a/lib/WebGUI/Operation/Profile.pm b/lib/WebGUI/Operation/Profile.pm index 5b1d808b4..9ca7bd60c 100644 --- a/lib/WebGUI/Operation/Profile.pm +++ b/lib/WebGUI/Operation/Profile.pm @@ -1,7 +1,7 @@ package WebGUI::Operation::Profile; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -15,7 +15,6 @@ use WebGUI::Content::Account; use WebGUI::International; use WebGUI::ProfileField; use WebGUI::User; -use WebGUI::Utility; =head1 NAME diff --git a/lib/WebGUI/Operation/ProfileSettings.pm b/lib/WebGUI/Operation/ProfileSettings.pm index ece17821f..4623a1175 100644 --- a/lib/WebGUI/Operation/ProfileSettings.pm +++ b/lib/WebGUI/Operation/ProfileSettings.pm @@ -1,7 +1,7 @@ package WebGUI::Operation::ProfileSettings; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -11,7 +11,6 @@ package WebGUI::Operation::ProfileSettings; #------------------------------------------------------------------- use strict; -use Tie::CPHash; use WebGUI::AdminConsole; use WebGUI::HTMLForm; use WebGUI::International; diff --git a/lib/WebGUI/Operation/Replacements.pm b/lib/WebGUI/Operation/Replacements.pm index 4c8b17dfd..39a118b8d 100644 --- a/lib/WebGUI/Operation/Replacements.pm +++ b/lib/WebGUI/Operation/Replacements.pm @@ -1,7 +1,7 @@ package WebGUI::Operation::Replacements; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Operation/SSO.pm b/lib/WebGUI/Operation/SSO.pm index 564e15e14..6439970a6 100644 --- a/lib/WebGUI/Operation/SSO.pm +++ b/lib/WebGUI/Operation/SSO.pm @@ -1,7 +1,7 @@ package WebGUI::Operation::SSO; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -43,8 +43,8 @@ sub www_ssoViaSessionId { else { my ($userId) = $session->db->quickArray("select userId from userSession where sessionId=?",[$sessionId]); if (defined $userId && $userId ne "") { - $session->var->end; - $session->var->start($userId); + $session->end; + $session->start($userId, $sessionId); } } } diff --git a/lib/WebGUI/Operation/Scratch.pm b/lib/WebGUI/Operation/Scratch.pm index b1e260c8c..db9e69719 100644 --- a/lib/WebGUI/Operation/Scratch.pm +++ b/lib/WebGUI/Operation/Scratch.pm @@ -1,7 +1,7 @@ package WebGUI::Operation::Scratch; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Operation/Settings.pm b/lib/WebGUI/Operation/Settings.pm index bc687eaf8..856dc5c0d 100644 --- a/lib/WebGUI/Operation/Settings.pm +++ b/lib/WebGUI/Operation/Settings.pm @@ -1,7 +1,7 @@ package WebGUI::Operation::Settings; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,9 @@ package WebGUI::Operation::Settings; use strict qw(vars subs); use Tie::IxHash; use WebGUI::AdminConsole; -use WebGUI::TabForm; use WebGUI::International; use WebGUI::SQL; +require WebGUI::Asset::RichEdit; =head1 NAME @@ -248,6 +248,24 @@ sub definition { namespace=>"AdminConsole", defaultValue=>$setting->get("AdminConsoleTemplate") }); + push @fields, { + tab => 'ui', + fieldType => 'template', + name => 'templateIdAssetEdit', + label => $i18n->get('templateIdAssetEdit label'), + hoverHelp => $i18n->get('templateIdAssetEdit description'), + namespace => 'Asset/Edit', + defaultValue => $setting->get('templateIdAssetEdit') || "yKl2HX76TSuv42vmprFbXQ", + }; + push @fields, { + tab => 'ui', + fieldType => 'template', + name => 'templateIdAdmin', + label => $i18n->get('templateIdAdmin label'), + hoverHelp => $i18n->get('templateIdAdmin description'), + namespace => 'Admin', + defaultValue => $setting->get('templateIdAdmin') || "p8g7xlQaTeKSRRDo-_ejSQ", + }; push(@fields, { tab => "ui", fieldType => "yesNo", @@ -352,14 +370,6 @@ sub definition { hoverHelp=>$i18n->get('707 description'), defaultValue=>$setting->get("showDebug") }); - push(@fields, { - tab=>"misc", - fieldType=>"yesNo", - name=>"showPerformanceIndicators", - label=>$i18n->get('show performance indicators'), - hoverHelp=>$i18n->get('show performance indicators description'), - defaultValue=>$setting->get("showPerformanceIndicators") - }); push(@fields, { tab=>"misc", fieldType=>"selectBox", @@ -614,6 +624,14 @@ sub www_editSettings { $output .= ''; } + # Start the form + my $tabform = WebGUI::FormBuilder->new($session, action => '?op=saveSettings' ); + $tabform->addField( 'csrfToken', name => 'csrfToken' ); + $tabform->addField( "hidden", + name => "op", + value => "saveSettings" + ); + # Available tabs # TODO: Build this from the definition instead. tie my %tabs, 'Tie::IxHash', ( @@ -627,25 +645,19 @@ sub www_editSettings { auth => { label => $i18n->get("authentication") }, perms => { label => $i18n->get("permissions") }, ); - - # Start the form - my $tabform = WebGUI::TabForm->new($session,\%tabs); - $tabform->hidden({ - name => "op", - value => "saveSettings" - }); + for my $tabName ( keys %tabs ) { + $tabform->addTab( name => $tabName, %{$tabs{$tabName}} ); + } my $definitions = definition($session, $i18n); foreach my $definition (@{$definitions}) { - $tabform->getTab($definition->{tab})->dynamicField(%{$definition}); + $tabform->getTab($definition->{tab})->addField( $definition->{fieldType}, %$definition ); } # Get fieldsets for avaiable auth methods - foreach (@{$session->config->get("authMethods")}) { - $tabform->getTab("auth")->fieldSetStart($_); + foreach my $authName (@{$session->config->get("authMethods")}) { my $authInstance = WebGUI::Operation::Auth::getInstance($session,$_,1); - $tabform->getTab("auth")->raw($authInstance->editUserSettingsForm); - $tabform->getTab("auth")->fieldSetEnd; + $tabform->getTab( "auth" )->addFieldset( $authInstance->editUserSettingsForm, name => $authName, label => $authName ); } # Get fieldsets for avaiable account methods @@ -668,20 +680,18 @@ sub www_editSettings { } #If editUserSettingsForm is empty, skip it - next if $settingsForm eq ""; + next unless $settingsForm; #Set the title of the fieldset my $title = $account->{title}; WebGUI::Macro::process($title); #Print the settings form for this account pluggin - $tabform->getTab("account")->fieldSetStart($title); - $tabform->getTab("account")->raw($settingsForm); - $tabform->getTab("account")->fieldSetEnd; + $tabform->getTab("account")->addFieldset( $settingsForm, name => $account->{identifier}, label => $title ); } - $tabform->submit(); - $output .= $tabform->print; + $tabform->addField( "submit", name => "send" ); + $output .= $tabform->toHtml; my $ac = WebGUI::AdminConsole->new($session,"settings"); return $ac->render($output); @@ -715,6 +725,7 @@ sub www_saveSettings { my $authErrors = $authInstance->editUserSettingsFormSave; if ($authErrors) { + $session->log->warn( "Problem saving settings: " . $authErrors ); push @errors, @{ $authErrors }; } } @@ -743,10 +754,9 @@ sub www_saveSettings { # Reset login message seen numbers if ( $session->form->get( 'showMessageOnLoginReset' ) ) { $session->db->write( - "UPDATE userProfileData SET showMessageOnLoginSeen=0" + "UPDATE users SET showMessageOnLoginSeen=0" ); - # Delete the user cache - WebGUI::Cache->new( $session, [ "user" ] )->deleteChunk( [ "user" ] ); + $session->cache->clear; } return www_editSettings($session, { errors => \@errors, message => $i18n->get("editSettings done") }); diff --git a/lib/WebGUI/Operation/Shared.pm b/lib/WebGUI/Operation/Shared.pm index ae1024503..be303576f 100644 --- a/lib/WebGUI/Operation/Shared.pm +++ b/lib/WebGUI/Operation/Shared.pm @@ -2,7 +2,7 @@ package WebGUI::Operation::Shared; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Operation/Spectre.pm b/lib/WebGUI/Operation/Spectre.pm index fe6253eb2..142bcb0ff 100644 --- a/lib/WebGUI/Operation/Spectre.pm +++ b/lib/WebGUI/Operation/Spectre.pm @@ -1,7 +1,7 @@ package WebGUI::Operation::Spectre; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,9 @@ package WebGUI::Operation::Spectre; use strict; use JSON; use POE::Component::IKC::ClientLite; -use WebGUI::Utility; use WebGUI::Workflow::Cron; use WebGUI::Workflow::Instance; +use Net::CIDR::Lite; =head1 NAME @@ -52,20 +52,20 @@ Checks to ensure the requestor is who we think it is, and then returns a JSON st sub www_spectreGetSiteData { my $session = shift; - $session->http->setMimeType("application/json"); - $session->http->setCacheControl("none"); + $session->response->content_type("application/json"); + $session->response->setCacheControl("none"); my %siteData = (); my $subnets = $session->config->get("spectreSubnets"); if (!defined $subnets) { $subnets = []; } - if (!isInSubnet($session->env->getIp, $subnets)) { - $session->errorHandler->security("Tried to make a Spectre workflow data load request, but we're only allowed to accept requests from " + if (!Net::CIDR::Lite->new(@$subnets)->find($session->request->address)) { + $session->log->security("Tried to make a Spectre workflow data load request, but we're only allowed to accept requests from " .join(",",@{$subnets})."."); } else { my $sitename = $session->config->get("sitename")->[0]; - my $gateway = $session->config->get("gateway"); + my $gateway = $session->request->base->path; my $cookieName = $session->config->getCookieName; my @instances = (); foreach my $instance (@{WebGUI::Workflow::Instance->getAllInstances($session)}) { @@ -117,7 +117,7 @@ sub www_spectreStatus { my $ac = WebGUI::AdminConsole->new($session, 'spectre'); my $i18n = WebGUI::International->new($session, 'Spectre'); - $session->http->setCacheControl("none"); + $session->response->setCacheControl("none"); my $remote = create_ikc_client( port=>$session->config->get("spectrePort"), @@ -173,17 +173,17 @@ spectreSubnet, instead of checking the IP address of the spectre process. sub www_spectreTest { my $session = shift; - $session->http->setMimeType("text/plain"); - $session->http->setCacheControl("none"); + $session->response->content_type("text/plain"); + $session->response->setCacheControl("none"); my $subnets = $session->config->get("spectreSubnets"); if (!defined $subnets) { $subnets = []; } - my $sessionIp = $session->env->getIp; - unless (isInSubnet($sessionIp, $subnets)) { - $session->errorHandler->security( + my $sessionIp = $session->request->address; + unless (Net::CIDR::Lite->new(@$subnets)->find($sessionIp)) { + $session->log->security( sprintf "Tried to make a Spectre workflow runner request from %s, but we're only allowed to accept requests from %s", $sessionIp, join(",",@{$subnets}) ); diff --git a/lib/WebGUI/Operation/SpellCheck.pm b/lib/WebGUI/Operation/SpellCheck.pm index 5ed94ac35..811e9e107 100644 --- a/lib/WebGUI/Operation/SpellCheck.pm +++ b/lib/WebGUI/Operation/SpellCheck.pm @@ -1,7 +1,7 @@ package WebGUI::Operation::SpellCheck; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -11,7 +11,6 @@ package WebGUI::Operation::SpellCheck; #------------------------------------------------------------------- use strict; -use WebGUI::Utility; use File::Path qw(mkpath); # Optional, but if unavailable, spell checking will have no effect. my $spellerAvailable; @@ -57,7 +56,7 @@ sub _getSpeller { # Get language my $speller = Text::Aspell->new; die "Language not available in server side spellcheck" - unless (isIn($lang, map {m/^.*?:([^:]*):.*?$/} $speller->list_dictionaries)); + unless ($lang ~~ [map {m/^.*?:([^:]*):.*?$/} $speller->list_dictionaries]); # User homedir my $homeDir = $session->config->get('uploadsPath').'/dictionaries/'; @@ -223,7 +222,7 @@ sub www_spellCheck { } # add request id and send to client as JSON blob $result->{id} = $params->{id}; - $session->http->setMimeType("text/plain; charset=utf-8"); + $session->response->content_type("text/plain; charset=utf-8"); return JSON->new->encode($result); } diff --git a/lib/WebGUI/Operation/Statistics.pm b/lib/WebGUI/Operation/Statistics.pm deleted file mode 100644 index 0a9fbef38..000000000 --- a/lib/WebGUI/Operation/Statistics.pm +++ /dev/null @@ -1,230 +0,0 @@ -package WebGUI::Operation::Statistics; - -#------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. -#------------------------------------------------------------------- -# Please read the legal notices (docs/legal.txt) and the license -# (docs/license.txt) that came with this distribution before using -# this software. -#------------------------------------------------------------------- -# http://www.plainblack.com info@plainblack.com -#------------------------------------------------------------------- - -use strict; -use WebGUI::AdminConsole; -use WebGUI::Cache; -use WebGUI::International; -use WebGUI::Workflow::Cron; -use WebGUI::DateTime; - -=head1 NAME - -Package WebGUI::Operation::Statistics - -=head1 DESCRIPTION - -Handles displaying statistics about WebGUI. This isn't page count, but rather information -about the number of assets, users, groups, etc. - -#------------------------------------------------------------------- - -=head2 _submenu ( $session, $workarea, $title, $help ) - -Utility routine for creating the AdminConsole for Statistics functions. - -=head3 $session - -The current WebGUI session object. - -=head3 $workarea - -The content to display to the user. - -=head3 $title - -The title of the Admin Console. This should be an entry in the i18n -table in the WebGUI namespace. - -=head3 $help - -An entry in the Help system in the WebGUI namespace. This will be shown -as a link to the user. - -=cut - -sub _submenu { - my $session = shift; - my $workarea = shift; - my $title = shift; - my $i18n = WebGUI::International->new($session); - $title = $i18n->get($title) if ($title); - my $ac = WebGUI::AdminConsole->new($session,"statistics"); - if ($session->setting->get("trackPageStatistics")) { - $ac->addSubmenuItem( $session->url->page('op=viewStatistics'), $i18n->get(144)); - } - return $ac->render($workarea, $title); -} - -#---------------------------------------------------------------------------- - -=head2 canView ( session [, user] ) - -Returns true if the user can administrate this operation. user defaults to -the current user. - -=cut - -sub canView { - my $session = shift; - my $user = shift || $session->user; - return $user->isInGroup( $session->setting->get("groupIdAdminStatistics") ); -} - - -#------------------------------------------------------------------- - -=head2 www_disableSendWebguiStats () - -Deletes the workflow schedule that sends WebGUI statistics to webgui.org. - -=cut - -sub www_disableSendWebguiStats { - my $session = shift; - return $session->privilege->adminOnly() unless canView($session); - my $task = WebGUI::Workflow::Cron->new($session, 'send_webgui_statistics'); - $task->delete; - my $workflow = WebGUI::Workflow->new($session, 'send_webgui_statistics'); - $workflow->set({enabled => 0}); - return www_viewStatistics($session); -} - - -#------------------------------------------------------------------- - -=head2 www_enableSendWebguiStats () - -Creates the workflow schedule that sends WebGUI statistics to webgui.org. - -=cut - -sub www_enableSendWebguiStats { - my $session = shift; - return $session->privilege->adminOnly() unless canView($session); - # we set the current hour, minute, and day of week to send in the stats so we don't DOS webgui.org - # by having everybody sending it at the same time - my $dt = WebGUI::DateTime->new($session, time()); - WebGUI::Workflow::Cron->create($session, { - enabled => 1, - workflowId => 'send_webgui_statistics', - minuteOfHour => $dt->minute, - hourOfDay => $dt->hour, - dayOfWeek => ($dt->dow % 7), - dayOfMonth => '*', - monthOfYear => '*', - priority => 3, - title => 'Send WebGUI Statistics', - }, 'send_webgui_statistics'); - my $workflow = WebGUI::Workflow->new($session, 'send_webgui_statistics'); - $workflow->set({enabled => 1}); - return www_viewStatistics($session); -} - - -#------------------------------------------------------------------- - -=head2 www_viewStatistics ( $session, $sent ) - -Displays information to the user about WebGUI statistics if they are -in group Admin (3). - -=head3 Displayed information - -=over 4 - -=item * - -Newest WebGUI version. - -=item * - -Current WebGUI version, if different from newest. - -=item * - -Number of published assets. - -=item * - -Number of assets set to be packages. - -=item * - -Number of templates - -=item * - -Number of sessions - -=item * - -Number of users. - -=item * - -Number of groups. - -=back - -=cut - -sub www_viewStatistics { - my $session = shift; - return $session->privilege->adminOnly() unless canView($session); - my ($output, $data); - my $i18n = WebGUI::International->new($session); - my $url = "http://update.webgui.org/latest-version.txt"; - my $cache = WebGUI::Cache->new($session,$url,"URL"); - my $version = $cache->get; - if (not defined $version) { - $version = $cache->setByHTTP($url,43200); - } - chomp $version; - $output .= '
    '; - my $halfway = round(@helpIndex / 2); + my $halfway = sprintf('%.0f', @helpIndex / 2); my $i = 0; @helpIndex = sort { $a->[2] cmp $b->[2] } @helpIndex; foreach my $helpEntry (@helpIndex) { diff --git a/lib/WebGUI/Operation/Inbox.pm b/lib/WebGUI/Operation/Inbox.pm index e7de5e870..19c9ef0b6 100644 --- a/lib/WebGUI/Operation/Inbox.pm +++ b/lib/WebGUI/Operation/Inbox.pm @@ -1,7 +1,7 @@ package WebGUI::Operation::Inbox; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -15,7 +15,6 @@ use WebGUI::Content::Account; use WebGUI::Inbox::Message; use WebGUI::International; use WebGUI::User; -use WebGUI::Utility; =head1 NAME diff --git a/lib/WebGUI/Operation/Invite.pm b/lib/WebGUI/Operation/Invite.pm index a58ea2763..eb40f76d8 100644 --- a/lib/WebGUI/Operation/Invite.pm +++ b/lib/WebGUI/Operation/Invite.pm @@ -1,7 +1,7 @@ package WebGUI::Operation::Invite; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Operation/LDAPLink.pm b/lib/WebGUI/Operation/LDAPLink.pm index 178ccaa00..f1e391204 100644 --- a/lib/WebGUI/Operation/LDAPLink.pm +++ b/lib/WebGUI/Operation/LDAPLink.pm @@ -1,7 +1,7 @@ package WebGUI::Operation::LDAPLink; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -11,7 +11,6 @@ package WebGUI::Operation::LDAPLink; #------------------------------------------------------------------- use strict; -use Tie::CPHash; use Tie::IxHash; use WebGUI::AdminConsole; use WebGUI::LDAPLink; @@ -139,7 +138,6 @@ sub www_copyLDAPLink { my $session = shift; return $session->privilege->insufficient unless canView($session); my (%db); - tie %db, 'Tie::CPHash'; %db = $session->db->quickHash("select * from ldapLink where ldapLinkId=".$session->db->quote($session->form->process("llid"))); $db{ldapLinkId} = "new"; $db{ldapLinkName} = "Copy of ".$db{ldapLinkName}; @@ -186,7 +184,6 @@ sub www_editLDAPLink { my ($output, %db, $f); - tie %db, 'Tie::CPHash'; %db = $session->db->quickHash("select * from ldapLink where ldapLinkId=".$session->db->quote($session->form->process("llid"))); my $i18n = WebGUI::International->new($session,"AuthLDAP"); @@ -351,7 +348,7 @@ sub www_editLDAPLinkSave { $properties->{ldapLoginTemplate} = $session->form->template("ldapLoginTemplate"); $session->db->setRow("ldapLink","ldapLinkId",$properties); if($session->form->process("returnUrl")) { - $session->http->setRedirect($session->form->process("returnUrl")); + $session->response->setRedirect($session->form->process("returnUrl")); return undef; } return www_listLDAPLinks($session); @@ -393,7 +390,7 @@ sub www_listLDAPLinks { $ldapLink->unbind; } else { - $session->errorHandler->warn($ldapLink->getErrorMessage()); + $session->log->warn($ldapLink->getErrorMessage()); $status .= ": ".$ldapLink->getErrorMessage(); } $row[$i] .= ''.$status.'
    '; - $output .= ''; - if ($version ne $WebGUI::VERSION) { - my @rev = split(/\./,$version); - - $version = ''.$version.''; - } - $output .= ''; - ($data) = $session->db->quickArray("select count(*) from asset where state='published'"); - $output .= ''; - ($data) = $session->db->quickArray("select count(distinct assetId) from assetData where isPackage=1"); - $output .= ''; - ($data) = $session->db->quickArray("select count(distinct(assetId)) from template"); - $output .= ''; - ($data) = $session->db->quickArray("select count(*) from userSession"); - $output .= ''; - ($data) = $session->db->quickArray("select count(*) from users"); - $output .= ''; - ($data) = $session->db->quickArray("select count(*) from groups"); - $output .= ''; - $output .= '
    '.$i18n->get(145).':'.$WebGUI::VERSION.'-'.$WebGUI::STATUS.'
    '.$i18n->get(349).':'.$version.'
    '.$i18n->get(147).':'.$data.'
    '.$i18n->get(794).':'.$data.'
    '.$i18n->get(792).':'.$data.'
    '.$i18n->get(146).':'.$data.'
    '.$i18n->get(149).':'.$data.'
    '.$i18n->get(89).':'.$data.'
    '; - - $output .= q|

    |.$i18n->get('why to send','Activity_SendWebguiStats').q|

    |; - - my $task = WebGUI::Workflow::Cron->new($session, 'send_webgui_statistics'); - if (defined $task) { - $output .= q|

    |.$i18n->get('disable','Activity_SendWebguiStats').q|

    |; - } - else { - $output .= q|

    |.$i18n->get('enable','Activity_SendWebguiStats').q|

    |; - } - $output .= q|

    http://www.webgui.org/stats

    |; - return _submenu($session,$output); -} - - -1; - diff --git a/lib/WebGUI/Operation/Style.pm b/lib/WebGUI/Operation/Style.pm index 922291f90..f7c6a4f6d 100644 --- a/lib/WebGUI/Operation/Style.pm +++ b/lib/WebGUI/Operation/Style.pm @@ -1,7 +1,7 @@ package WebGUI::Operation::Style; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Operation/User.pm b/lib/WebGUI/Operation/User.pm index 88e3e6a42..9915b755f 100644 --- a/lib/WebGUI/Operation/User.pm +++ b/lib/WebGUI/Operation/User.pm @@ -1,7 +1,7 @@ package WebGUI::Operation::User; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -11,7 +11,6 @@ package WebGUI::Operation::User; #------------------------------------------------------------------- use strict qw(vars subs); -use Tie::CPHash; use Tie::IxHash; use WebGUI::AdminConsole; use WebGUI::Group; @@ -22,11 +21,10 @@ use WebGUI::International; use WebGUI::Operation::Auth; use WebGUI::Paginator; use WebGUI::SQL; -use WebGUI::TabForm; use WebGUI::User; -use WebGUI::Utility; use JSON; use XML::Simple; +use Net::CIDR::Lite; =head1 NAME @@ -142,7 +140,7 @@ sub canUseService { my ( $session ) = @_; my $subnets = $session->config->get('serviceSubnets'); return 1 if !$subnets || !@{$subnets}; - return 1 if WebGUI::Utility::isInSubnet( $session->env->getIp, $subnets ); + return 1 if Net::CIDR::Lite->new(@$subnets)->find($session->request->address); return 0; # Don't go away mad, just go away } @@ -213,11 +211,9 @@ sub doUserSearch { my $returnPaginator = shift; my $userFilter = shift; push(@{$userFilter},0); - my $selectedStatus; + my $selectedStatus = ''; if ($session->scratch->get("userSearchStatus")) { - $selectedStatus = "status='".$session->scratch->get("userSearchStatus")."'"; - } else { - $selectedStatus = "status like '%'"; + $selectedStatus = "status='".$session->scratch->get("userSearchStatus")."' and "; } my $keyword = $session->scratch->get("userSearchKeyword"); if ($session->scratch->get("userSearchModifier") eq "startsWith") { @@ -228,17 +224,16 @@ sub doUserSearch { $keyword = "%".$keyword; } my $sql = "select users.userId, users.username, users.status, users.dateCreated, users.lastUpdated, - userProfileData.email from users - left join userProfileData on users.userId=userProfileData.userId - where $selectedStatus and (users.username like ? or alias like ? or email like ? - or firstName like ? or lastName like ?) + users.email from users + where $selectedStatus (users.username like ? or alias like ? or email like ? + or firstName like ? or lastName like ? or CONCAT(firstName, ' ', lastName) LIKE ? ) and users.userId not in (".$session->db->quoteAndJoin($userFilter).") order by users.username"; if ($returnPaginator) { my $p = WebGUI::Paginator->new($session,$session->url->page("op=".$op)); - $p->setDataByQuery($sql, undef, undef, [$keyword, $keyword, $keyword, $keyword, $keyword]); + $p->setDataByQuery($sql, undef, undef, [$keyword, $keyword, $keyword, $keyword, $keyword, $keyword]); return $p; } else { - my $sth = $session->dbSlave->read($sql, [$keyword, $keyword, $keyword, $keyword, $keyword]); + my $sth = $session->dbSlave->read($sql, [$keyword, $keyword, $keyword, $keyword, $keyword, $keyword]); return $sth; } } @@ -350,12 +345,12 @@ sub www_ajaxCreateUser { $mimeType = "application/xml"; } - $session->http->setMimeType( $mimeType ); + $session->response->content_type( $mimeType ); # Verify access if ( !canAdd($session) || !canUseService($session) ) { # We need an automatic way to send a request for an http basic auth - $session->http->setStatus(401,'Unauthorized'); + $session->response->status(401); return createServiceResponse( $outputFormat, { error => "WebGUI::Error::Unauthorized", message => "", @@ -469,12 +464,12 @@ sub www_ajaxDeleteUser { $mimeType = "application/xml"; } - $session->http->setMimeType( $mimeType ); + $session->response->content_type( $mimeType ); # Verify access if ( !canEdit($session) || !canUseService($session) ) { # We need an automatic way to send a request for an http basic auth - $session->http->setStatus(401,'Unauthorized'); + $session->response->status(401); return createServiceResponse( $outputFormat, { error => "WebGUI::Error::Unauthorized", message => "", @@ -491,7 +486,7 @@ sub www_ajaxDeleteUser { } ); } elsif ( $userId eq "1" || $userId eq "3" ) { - $session->http->setStatus(403,"Forbidden"); + $session->response->status(403); return createServiceResponse( $outputFormat, { error => 'WebGUI::Error::InvalidParam', param => 'userId', @@ -536,12 +531,12 @@ sub www_ajaxUpdateUser { $mimeType = "application/xml"; } - $session->http->setMimeType( $mimeType ); + $session->response->content_type( $mimeType ); # Verify access if ( !canEdit($session) || !canUseService($session) ) { # We need an automatic way to send a request for an http basic auth - $session->http->setStatus(401,'Unauthorized'); + $session->response->status(401); return createServiceResponse( $outputFormat, { error => "WebGUI::Error::Unauthorized", message => "", @@ -614,7 +609,7 @@ sub www_becomeUser { my $session = shift; return $session->privilege->adminOnly() unless canEdit($session) && $session->form->validToken; return undef unless WebGUI::User->validUserId($session, $session->form->process("uid")); - $session->var->end($session->var->get("sessionId")); + $session->end(); $session->user({userId=>$session->form->process("uid")}); return ""; } @@ -655,100 +650,122 @@ sub www_editUser { return $session->privilege->adminOnly() unless canAdd($session); my $error = shift; my $uid = shift || $session->form->process("uid"); - my $i18n = WebGUI::International->new($session, "WebGUI"); - my %tabs; - tie %tabs, 'Tie::IxHash'; - %tabs = ( - "account"=> { label=>$i18n->get("account")}, - "profile"=> { label=>$i18n->get("profile")}, - "groups"=> { label=>$i18n->get('89')}, - ); - my $tabform = WebGUI::TabForm->new($session,\%tabs); - $tabform->formHeader({extras=>'autocomplete="off"'}); my $u = WebGUI::User->new($session,($uid eq 'new') ? '' : $uid); #Setting uid to '' when uid is 'new' so visitor defaults prefill field for new user my $username = ($u->isVisitor && $uid ne "1") ? '' : $u->username; - $tabform->hidden({name=>"op",value=>"editUserSave"}); - $tabform->hidden({name=>"uid",value=>$uid}); - $tabform->getTab("account")->raw('  '); - $tabform->getTab("account")->readOnly(value=>$uid,label=>$i18n->get(378)); - $tabform->getTab("account")->readOnly(value=>$u->karma,label=>$i18n->get(537)) if ($session->setting->get("useKarma")); - $tabform->getTab("account")->readOnly(value=>$session->datetime->epochToHuman($u->dateCreated,"%z"),label=>$i18n->get(453)); - $tabform->getTab("account")->readOnly(value=>$session->datetime->epochToHuman($u->lastUpdated,"%z"),label=>$i18n->get(454)); - $tabform->getTab("account")->text( - -name=>"username", - -label=>$i18n->get(50), - -value=>$username, - -extras=>'autocomplete="off"', + my $i18n = WebGUI::International->new($session, "WebGUI"); + my $f = WebGUI::FormBuilder->new( $session, + action => $session->url->page, + extras => 'autocomplete="off"', ); - my %status; - tie %status, 'Tie::IxHash'; - %status = ( - Active =>$i18n->get(817), - Deactivated =>$i18n->get(818), - Selfdestructed =>$i18n->get(819) - ); + $f->addField( 'csrfToken', name => 'csrfToken' ); + $f->addField( "hidden", + name => 'op', + value => 'editUserSave', + ); + $f->addField( "hidden", + name => "uid", + value => $uid, + ); + my $account = $f->addTab( name => "account", label => $i18n->get('account') ); + my $profile = $f->addTab( name => "profile", label => $i18n->get('profile') ); + my $groups = $f->addTab( name => "groups", label => $i18n->get('89') ); + + # Normal user fields + $account->addField( "readOnly", + name => "uid", + value => $uid, + label => $i18n->get(378), + ); + $account->addField( "readOnly", + name => "karma", + value => $u->karma, + label => $i18n->get(537) + ) if ($session->setting->get("useKarma")); + $account->addField( "readOnly", + name => "dateCreated", + value=>$session->datetime->epochToHuman($u->dateCreated,"%z"), + label=>$i18n->get(453) + ); + $account->addField( "readOnly", + name => "lastUpdated", + value=>$session->datetime->epochToHuman($u->lastUpdated,"%z"), + label=>$i18n->get(454) + ); + $account->addField( "text", + name=>"username", + label=>$i18n->get(50), + value=>$username, + extras=>'autocomplete="off"', + ); + if ($u->userId eq $session->user->userId) { - $tabform->getTab("account")->hidden( - -name => "status", - -value => $u->status + $account->addField( "hidden", + name => "status", + value => $u->status ); } else { - $tabform->getTab("account")->selectBox( - -name => "status", - -options => \%status, - -label => $i18n->get(816), - -value => $u->status + tie my %status, 'Tie::IxHash', ( + Active =>$i18n->get(817), + Deactivated =>$i18n->get(818), + Selfdestructed =>$i18n->get(819) + ); + $account->addField( "selectBox", + name => "status", + options => \%status, + label => $i18n->get(816), + value => $u->status ); } + + # Auth configurations my $options; foreach (@{$session->config->get("authMethods")}) { $options->{$_} = $_; } - $tabform->getTab("account")->selectBox( - -name=>"authMethod", - -options=>$options, - -label=>$i18n->get(164), - -value=>$u->authMethod, + $account->addField( "selectBox", + name=>"authMethod", + options=>$options, + label=>$i18n->get(164), + value=>$u->authMethod, ); - foreach (@{$session->config->get("authMethods")}) { - my $authInstance = WebGUI::Operation::Auth::getInstance($session,$_,$u->userId); + foreach my $auth (@{$session->config->get("authMethods")}) { + my $authInstance = WebGUI::Operation::Auth::getInstance($session,$auth,$u->userId); my $editUserForm = $authInstance->editUserForm; next unless $editUserForm; - $tabform->getTab("account")->fieldSetStart($_); - $tabform->getTab("account")->raw($editUserForm); - $tabform->getTab("account")->fieldSetEnd; + $account->addFieldset( $editUserForm, name => $auth, label => $auth ); } + + # Profile fields foreach my $category (@{WebGUI::ProfileCategory->getCategories($session)}) { - $tabform->getTab("profile")->fieldSetStart($category->getLabel); + my $fieldset = $profile->addFieldset( name => $category->getLabel, label => $category->getLabel ); foreach my $field (@{$category->getFields}) { next if $field->getId =~ /contentPositions/; my $label = $field->getLabel . ($field->isRequired ? "*" : ''); if ($u->isVisitor) { - $tabform->getTab("profile")->raw($field->formField({label=>$label},1,undef,undef,undef,undef,'useFormDefault')); + $fieldset->addField($field->formField({label=>$label},1,undef,undef,undef,1,'useFormDefault')); } else { - $tabform->getTab("profile")->raw($field->formField({label=>$label},1,$u)); + $fieldset->addField($field->formField({label=>$label},1,$u,undef,undef,1)); } } - $tabform->getTab("profile")->fieldSetEnd($category->getLabel); } + + # Groups my @groupsToAdd = $session->form->group("groupsToAdd"); my @exclude = $session->db->buildArray("select groupId from groupings where userId=?",[$u->userId]); - @exclude = (@exclude,"1","2","7"); + push @exclude,"1","2","7"; # Special groups cannot be left/joined my $secondaryAdmin = $session->user->isInGroup('11'); - my @extraExclude = (); if ($secondaryAdmin && !$session->user->isAdmin) { - @extraExclude = $session->db->buildArray('select groupId from groups where groupId not in (select groupId from groupings where userId=?)',[$session->user->userId]); + push @exclude, $session->db->buildArray('select groupId from groups where groupId not in (select groupId from groupings where userId=?)',[$session->user->userId]); } - push @extraExclude, @exclude; - $tabform->getTab("groups")->group( - -name=>"groupsToAdd", - -label=>$i18n->get("groups to add"), - -excludeGroups=>\@extraExclude, - -size=>15, - -multiple=>1, - -value=>\@groupsToAdd + $groups->addField( "group", + name=>"groupsToAdd", + label=>$i18n->get("groups to add"), + excludeGroups=>\@exclude, + size=>15, + multiple=>1, + value=>\@groupsToAdd ); my @include; foreach my $group (@exclude) { @@ -762,22 +779,16 @@ sub www_editUser { } push (@include, "0"); my @groupsToDelete = $session->form->group("groupsToDelete"); - $tabform->getTab("groups")->selectList( - -name=>"groupsToDelete", - -options=>$session->db->buildHashRef("select groupId, groupName from groups + $groups->addField( "selectList", + name=>"groupsToDelete", + options=>$session->db->buildHashRef("select groupId, groupName from groups where groupId in (".$session->db->quoteAndJoin(\@include).") and showInForms=1 order by groupName"), - -label=>$i18n->get("groups to delete"), - -multiple=>1, - -size=>15, - -value=>\@groupsToDelete + label=>$i18n->get("groups to delete"), + multiple=>1, + size=>15, + value=>\@groupsToDelete ); - my $submenu = _submenu( - $session, - { workarea => $error.$tabform->print, - title => 168, - userId => $uid, } - ); - return $submenu;; + return '

    ' . $i18n->get(168) . '

    ' . $error . $f->toHtml; } #------------------------------------------------------------------- @@ -843,7 +854,7 @@ sub www_editUserSave { foreach my $field (@{WebGUI::ProfileField->getFields($session)}) { next if $field->getId =~ /contentPositions/; my $field_value = $field->formProcess($u); - $u->profileField($field->getId,$field_value); + $u->update({ $field->getId => $field_value} ); #set the shop address fields my $address_key = $address_mappings->{$field->getId}; @@ -855,16 +866,14 @@ sub www_editUserSave { $address->{'isProfile' } = 1; #Get the address book for the user (one is created if it does not exist) - my $addressBook = WebGUI::Shop::AddressBook->newByUserId($session,$actualUserId); + my $addressBook = WebGUI::Shop::AddressBook->newByUserId($session, $actualUserId,); my $profileAddress = eval { $addressBook->getProfileAddress() }; my $e; if($e = WebGUI::Error->caught('WebGUI::Error::ObjectNotFound')) { #Get home address only mappings to avoid creating addresses with just firstName, lastName, email my %home_address_map = %{$address_mappings}; - foreach my $exclude ( qw{ firstName lastName email } ) { - delete $home_address_map{$exclude}; - } + delete $home_address_map{qw/firstName lastName email/}; #Add the profile address for the user if there are homeAddress fields if( grep { $address->{$_} } values %home_address_map ) { $address->{label} = "Profile Address"; @@ -876,6 +885,9 @@ sub www_editUserSave { defaultAddressId => $new_address->getId } ); } + else { + $session->log->warn("The default address exists, and it should not."); + } } } elsif ($e = WebGUI::Error->caught) { @@ -1010,7 +1022,7 @@ A reference to the current session. sub www_formUsers { my $session = shift; - $session->http->setCacheControl("none"); + $session->response->setCacheControl("none"); return $session->privilege->insufficient() unless $session->user->isInGroup(12); $session->style->useEmptyStyle("1"); my $output = getUserSearchForm($session,"formUsers",{formId=>$session->form->process("formId")},1); @@ -1050,7 +1062,6 @@ sub www_listUsers { } } - my %status; my $i18n = WebGUI::International->new($session); my $output = getUserSearchForm($session,"listUsers"); my ($userCount) = $session->db->quickArray("select count(*) from users"); @@ -1059,8 +1070,7 @@ sub www_listUsers { } return _submenu($session,{workarea => $output}) unless ($session->form->process("doit") || $userCount<250 || $session->form->process("pn") > 1); - tie %status, 'Tie::IxHash'; - %status = ( + my %status = ( Active => $i18n->get(817), Deactivated => $i18n->get(818), Selfdestructed => $i18n->get(819) @@ -1078,6 +1088,29 @@ sub www_listUsers { '.$i18n->get( "time recorded" ).' '; my $p = doUserSearch($session,"listUsers",1); + my $user_loginlog = $session->db->prepare( + q{ + select status, timeStamp, lastPageViewed, sessionId + from userLoginLog + where userId = ? + order by timeStamp desc + limit 1 + }, + ); + my $last_page_view = $session->db->prepare( + q{ + select lastPageView + from userSession + where sessionId = ? + }, + ); + my $total_time = $session->db->prepare( + q{ + select sum(lastPageViewed - timeStamp) + from userLoginLog + where userId = ? + }, + ); foreach my $data (@{$p->getPageData}) { $output .= ''; $output .= ''.$status{$data->{status}}.''; @@ -1087,26 +1120,11 @@ sub www_listUsers { $output .= ''.$session->datetime->epochToHuman($data->{dateCreated},"%z").''; $output .= ''.$session->datetime->epochToHuman($data->{lastUpdated},"%z").''; - my ( $status, $lastLogin, $lastView, $lastSession ) - = $session->db->quickArray( - q{ - select status, timeStamp, lastPageViewed, sessionId - from userLoginLog - where userId = ? - order by timeStamp desc - limit 1 - }, - [ $data->{userId} ] - ); + $user_loginlog->execute([$data->{userId}]); + my ( $status, $lastLogin, $lastView, $lastSession ) = $user_loginlog->fetchrow_array; - my $trueLastView = $session->db->quickScalar( - q{ - select lastPageView - from userSession - where sessionId = ? - }, - [ $lastSession ] - ); + $last_page_view->execute([$lastSession]); + my ($trueLastView) = $last_page_view->fetchrow_array(); # format last page view, preferring session recorded view time $lastView = $trueLastView || $lastView; @@ -1114,14 +1132,8 @@ sub www_listUsers { $lastLogin &&= $session->datetime->epochToHuman($lastLogin); - my $totalTime = $session->db->quickScalar( - q{ - select sum(lastPageViewed - timeStamp) - from userLoginLog - where userId = ? - }, - [$data->{userId}] - ); + $total_time->execute([$data->{userId}]); + my ($totalTime) = $total_time->fetchrow_array(); if ($totalTime) { my ($interval, $units) @@ -1139,6 +1151,9 @@ sub www_listUsers { $output .= ''; $p->setAlphabeticalKey('username'); $output .= $p->getBarTraditional; + $user_loginlog->finish; + $last_page_view->finish; + $total_time->finish; my $submenu = _submenu( $session, { workarea => $output, } diff --git a/lib/WebGUI/Operation/VersionTag.pm b/lib/WebGUI/Operation/VersionTag.pm index a45d37a20..c33fb9235 100644 --- a/lib/WebGUI/Operation/VersionTag.pm +++ b/lib/WebGUI/Operation/VersionTag.pm @@ -3,7 +3,7 @@ package WebGUI::Operation::VersionTag; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -21,6 +21,7 @@ use WebGUI::International; use WebGUI::VersionTag; use WebGUI::HTMLForm; use WebGUI::Paginator; +use Tie::IxHash; use WebGUI::Fork; use Monkey::Patch; use JSON; @@ -153,7 +154,7 @@ sub rollbackInFork { my $session = $process->session; my $tag = WebGUI::VersionTag->new( $session, $tagId ); my %status = ( - finished => 0, + current => 0, total => $process->session->db->quickScalar( 'SELECT count(*) FROM assetData WHERE tagId = ?', [$tagId] ), message => '', ); @@ -167,7 +168,7 @@ sub rollbackInFork { my $purgeRevision = shift; my $self = shift; $self->$purgeRevision(@_); - $status{finished}++; + $status{current}++; $update->(); } ); @@ -421,7 +422,7 @@ sub www_commitVersionTag { $session->url->page("op=commitVersionTag;tagId=".$tag->getId), ); $p->setDataByQuery(q{ - SELECT assetData.revisionDate, assetData.revisedBy, asset.assetId, asset.className + SELECT assetData.revisionDate, assetData.revisedBy, asset.assetId FROM assetData LEFT JOIN asset ON assetData.assetId = asset.assetId WHERE assetData.tagId=? }, @@ -431,8 +432,8 @@ sub www_commitVersionTag { ); foreach my $row ( @{$p->getPageData} ) { - my ( $date, $byUserId, $id, $class) = @{ $row }{ qw( revisionDate revisedBy assetId className ) }; - my $asset = WebGUI::Asset->new($session, $id, $class, $date); + my ( $date, $byUserId, $id, $class) = @{ $row }{ qw( revisionDate revisedBy assetId ) }; + my $asset = WebGUI::Asset->newById($session, $id, $date); my $byUser = WebGUI::User->new( $session, $byUserId ); $output .= '' @@ -712,7 +713,7 @@ sub www_manageRevisionsInTag { my @assetInfo = $session->form->get('assetInfo'); for my $assetInfo ( @assetInfo ) { ( my $assetId, my $revisionDate ) = split ":", $assetInfo; - my $asset = WebGUI::Asset->new( $session, $assetId, undef, $revisionDate ); + my $asset = WebGUI::Asset->newById( $session, $assetId, $revisionDate ); $asset->purgeRevision; } @@ -740,7 +741,7 @@ sub www_manageRevisionsInTag { my @assetInfo = $session->form->get('assetInfo'); for my $assetInfo ( @assetInfo ) { ( my $assetId, my $revisionDate ) = split ":", $assetInfo; - my $asset = WebGUI::Asset->new( $session, $assetId, undef, $revisionDate ); + my $asset = WebGUI::Asset->newById( $session, $assetId, $revisionDate ); $asset->setVersionTag( $moveToTag->getId ); } @@ -860,13 +861,13 @@ sub www_manageRevisionsInTag { . ' ' ; my $p = WebGUI::Paginator->new($session,$session->url->page("op=manageRevisionsInTag;tagId=".$tag->getId)); - $p->setDataByQuery("select assetData.revisionDate, assetData.revisedBy, asset.assetId, asset.className from assetData + $p->setDataByQuery("select assetData.revisionDate, assetData.revisedBy, asset.assetId from assetData left join asset on assetData.assetId=asset.assetId where assetData.tagId=?",undef, undef, [$tag->getId]); foreach my $row (@{$p->getPageData}) { - my ($date,$byUserId,$id, $class) = ($row->{revisionDate}, $row->{revisedBy}, $row->{assetId}, $row->{className}); + my ($date,$byUserId,$id) = ($row->{revisionDate}, $row->{revisedBy}, $row->{assetId}); my $byUser = WebGUI::User->new( $session, $byUserId ); - my $asset = WebGUI::Asset->new($session,$id,$class,$date); + my $asset = WebGUI::Asset->newById($session, $id, $date); # A checkbox for delete and move actions my $checkbox = WebGUI::Form::checkbox( $session, { name => 'assetInfo', @@ -913,7 +914,7 @@ sub www_rollbackVersionTag { my $method = $session->form->process("proceed"); $method = $method eq "manageCommittedVersions" ? $method : 'manageVersions'; my $redir = WebGUI::Asset->getDefault($session)->getUrl("op=$method"); - $session->http->setRedirect( + $session->response->setRedirect( $session->url->page( $process->contentPairs( 'ProgressBar', { diff --git a/lib/WebGUI/Operation/WebGUI.pm b/lib/WebGUI/Operation/WebGUI.pm index 0ad42af05..4829ab477 100644 --- a/lib/WebGUI/Operation/WebGUI.pm +++ b/lib/WebGUI/Operation/WebGUI.pm @@ -1,7 +1,7 @@ package WebGUI::Operation::WebGUI; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -40,7 +40,7 @@ sub www_genesis { #------------------------------------------------------------------- -=head2 theWg ( ) +=head2 www_theWg ( ) The core WebGUI function. All WebGUI Assets, Operations and functions require this to work, even superseding the session variable. diff --git a/lib/WebGUI/Operation/Workflow.pm b/lib/WebGUI/Operation/Workflow.pm index fd3d77c75..100af6279 100644 --- a/lib/WebGUI/Operation/Workflow.pm +++ b/lib/WebGUI/Operation/Workflow.pm @@ -1,7 +1,7 @@ package WebGUI::Operation::Workflow; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -11,7 +11,6 @@ package WebGUI::Operation::Workflow; #------------------------------------------------------------------- use strict; -use Tie::IxHash; use WebGUI::AdminConsole; use WebGUI::HTMLForm; use WebGUI::International; @@ -19,9 +18,9 @@ use WebGUI::Pluggable; use WebGUI::Workflow; use WebGUI::Workflow::Activity; use WebGUI::Workflow::Instance; -use WebGUI::Utility; use POE::Component::IKC::ClientLite; use JSON qw/ decode_json /; +use Net::CIDR::Lite; =head1 NAME @@ -83,7 +82,7 @@ sub www_activityHelper { my $output = eval {WebGUI::Pluggable::instanciate($class, "www_".$sub, [$session])}; if ($@) { - $session->errorHandler->error($@); + $session->log->error($@); return "ERROR"; } return $output; @@ -386,14 +385,15 @@ sub www_editWorkflowActivity { $activity = WebGUI::Workflow::Activity->new($session, $session->form->get("activityId")); } my $form = $activity->getEditForm; - $form->hidden( name=>"op", value=>"editWorkflowActivitySave"); - $form->hidden( name=>"workflowId", value=>$session->form->get("workflowId")); - $form->submit; + $form->action( $session->url->page ); + $form->addField( "hidden", name=>"op", value=>"editWorkflowActivitySave"); + $form->addField( "hidden", name=>"workflowId", value=> scalar $session->form->get("workflowId")); + $form->addField( "submit", name => "send" ); my $i18n = WebGUI::International->new($session, "Workflow"); my $ac = WebGUI::AdminConsole->new($session,"workflow"); $ac->addSubmenuItem($session->url->page("op=addWorkflow"), $i18n->get("add a new workflow")); $ac->addSubmenuItem($session->url->page("op=manageWorkflows"), $i18n->get("manage workflows")); - return $ac->render($form->print,$activity->getName); + return $ac->render($form->toHtml,$activity->getName); } #------------------------------------------------------------------- @@ -481,10 +481,10 @@ Checks to ensure the requestor is who we think it is, and then executes a workfl sub www_runWorkflow { my $session = shift; - $session->http->setMimeType("text/plain"); - $session->http->setCacheControl("none"); - unless (isInSubnet($session->env->getIp, $session->config->get("spectreSubnets")) || canRunWorkflow($session)) { - $session->errorHandler->security("make a Spectre workflow runner request, but we're only allowed to accept requests from ".join(",",@{$session->config->get("spectreSubnets")})."."); + $session->response->content_type("text/plain"); + $session->response->setCacheControl("none"); + unless (Net::CIDR::Lite->new(@{ $session->config->get('spectreSubnets')} )->find($session->request->address) || canRunWorkflow($session)) { + $session->log->security("make a Spectre workflow runner request, but we're only allowed to accept requests from ".join(",",@{$session->config->get("spectreSubnets")})."."); return "error"; } my $instanceId = $session->form->param("instanceId"); @@ -497,7 +497,7 @@ sub www_runWorkflow { } return "complete"; } - $session->errorHandler->warn("No instance ID passed to workflow runner."); + $session->log->warn("No instance ID passed to workflow runner."); return "error"; } diff --git a/lib/WebGUI/Paginator.pm b/lib/WebGUI/Paginator.pm index fd0d9d9fb..e5ed95f4a 100644 --- a/lib/WebGUI/Paginator.pm +++ b/lib/WebGUI/Paginator.pm @@ -3,7 +3,7 @@ package WebGUI::Paginator; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -16,7 +16,6 @@ package WebGUI::Paginator; use strict; use WebGUI::International; -use WebGUI::Utility; use List::Util qw/min/; =head1 NAME @@ -502,7 +501,7 @@ sub getPageLinks { if ($limit) { my $output; my $i = 1; - my $minPage = $self->getPageNumber - round($limit/2); + my $minPage = $self->getPageNumber - sprintf('%.0f', $limit/2); my $start = ($minPage > 0) ? $minPage : 1; my $maxPage = $start + $limit - 1; my $end = ($maxPage < $self->getPageNumber) ? $self->getPageNumber : $maxPage; @@ -758,7 +757,7 @@ sub setDataByQuery { $sql =~ s/;?\s*$/ LIMIT $start,$rowsPerPage/; } - #$self->session->errorHandler->warn($sql); + #$self->session->log->warn($sql); #Get only the data necessary from the database my $sth; if ($unconditional) { diff --git a/lib/WebGUI/PassiveAnalytics/Flow.pm b/lib/WebGUI/PassiveAnalytics/Flow.pm index 65c2de234..00579b681 100644 --- a/lib/WebGUI/PassiveAnalytics/Flow.pm +++ b/lib/WebGUI/PassiveAnalytics/Flow.pm @@ -1,18 +1,17 @@ package WebGUI::PassiveAnalytics::Flow; use strict; -use Tie::IxHash; use WebGUI::AdminConsole; use WebGUI::HTMLForm; use WebGUI::International; use WebGUI::Pluggable; use WebGUI::PassiveAnalytics::Rule; -use WebGUI::Utility; use WebGUI::HTMLForm; use WebGUI::Workflow; use WebGUI::Workflow::Instance; use WebGUI::User; use WebGUI::Text; +use WebGUI::Fork; =head1 NAME @@ -59,7 +58,7 @@ sub canView { #---------------------------------------------------------------------------- -=head2 exportSomething ( session, sth, filename ) +=head2 exportSomething ( $process, $data ) Generates CSV data from the supplied statement handle and generates a temporary WebGUI::Storage object containing that data in the requested @@ -68,31 +67,53 @@ filename. This subroutine also does a setRedirect to the URL of the file in the storage object. -=head3 session +=head3 $process -Session variable, to set the http redirect correctly. +A WebGUI::Fork object, to let the user know what's going on. -=head3 sth +=head3 $data -Statement handle for reading data and getting column names +Hash ref of data. + +=head3 tableName + +The name of the table where data will be pulled and translated into CSV. =head3 filename -The name of the file to create inside the storage object. +The name of the file to generate =cut sub exportSomething { - my ($session, $sth, $filename) = @_; + my ($process, $data) = @_; + my $session = $process->session; + my $i18n = WebGUI::International->new($session, 'Asset_Thingy'); my $storage = WebGUI::Storage->createTemp($session); + open my $CSV, '>', $storage->getPath($data->{filename}); + my $sth = $session->db->read('select SQL_CALC_FOUND_ROWS * from '.$data->{tableName}); + my %status = ( + current => 0, + message => '', + total => $session->db->quickScalar('select found_rows()') + 0, + ); + my $update = sub { + $process->update( sub { JSON::to_json(\%status) } ); + }; + $update->(); my @columns = $sth->getColumnNames; - my $csvData = WebGUI::Text::joinCSV( @columns ). "\n"; + print $CSV WebGUI::Text::joinCSV( @columns ). "\n"; + my $rowCounter = 0; + $status{message} = $i18n->get('Writing data'); + $update->(); while (my $row = $sth->hashRef()) { my @row = @{ $row }{@columns}; - $csvData .= WebGUI::Text::joinCSV(@row) . "\n"; + print $CSV WebGUI::Text::joinCSV(@row) . "\n"; + ++$status{current }; + $update->(); } - $storage->addFileFromScalar($filename, $csvData); - $session->http->setRedirect($storage->getUrl($filename)); + close $CSV; + $sth->finish; } #------------------------------------------------------------------- @@ -271,7 +292,7 @@ sub www_editRule { else { ##We need a temporary rule so that we can call dynamicForm, below $ruleId = 'new'; - $rule = WebGUI::PassiveAnalytics::Rule->create($session, {}); + $rule = WebGUI::PassiveAnalytics::Rule->new($session, {}); } ##Build the form @@ -279,7 +300,7 @@ sub www_editRule { $form->hidden( name=>"op", value=>"passiveAnalytics"); $form->hidden( name=>"func", value=>"editRuleSave"); $form->hidden( name=>"ruleId", value=>$ruleId); - $form->dynamicForm([WebGUI::PassiveAnalytics::Rule->crud_definition($session)], 'properties', $rule); + $rule->crud_form($form, $rule); $form->submit; my $i18n = WebGUI::International->new($session, 'PassiveAnalytics'); @@ -317,7 +338,7 @@ sub www_editRuleSave { my $ruleId = $form->get('ruleId'); my $rule; if ($ruleId eq 'new') { - $rule = WebGUI::PassiveAnalytics::Rule->create($session, {}); + $rule = WebGUI::PassiveAnalytics::Rule->new($session, {}); } else { $rule = WebGUI::PassiveAnalytics::Rule->new($session, $ruleId); @@ -336,8 +357,24 @@ Dump the contents of the bucket log. sub www_exportBucketData { my ($session) = @_; - my $bucket = $session->db->read('select * from bucketLog order by userId, Bucket, timeStamp'); - exportSomething($session, $bucket, 'bucketData.csv'); + + my $process = WebGUI::Fork->start( + $session, + __PACKAGE__, 'exportSomething', + { tableName => 'bucketLog', filename => 'bucketData.csv', }, + ); + my $i18n = WebGUI::International->new($session, 'PassiveAnalytics'); + $session->http->setRedirect( + $session->url->page( + $process->contentPairs( + 'ProgressBar', { + icon => 'passiveAnalytics', + title => $i18n->get('Export bucket data'), + proceed => $session->url->page('op=passiveAnalytics;func=editRuleflow'), + }, + ), + ), + ); return "redirect"; } @@ -351,8 +388,23 @@ Dump the contents of the delta log. sub www_exportDeltaData { my ($session) = @_; - my $delta = $session->db->read('select * from deltaLog order by userId, timeStamp'); - exportSomething($session, $delta, 'deltaData.csv'); + my $process = WebGUI::Fork->start( + $session, + __PACKAGE__, 'exportSomething', + { tableName => 'deltaLog', filename => 'deltaData.csv', }, + ); + my $i18n = WebGUI::International->new($session, 'PassiveAnalytics'); + $session->http->setRedirect( + $session->url->page( + $process->contentPairs( + 'ProgressBar', { + icon => 'passiveAnalytics', + title => $i18n->get('Export delta data'), + proceed => $session->url->page('op=passiveAnalytics;func=editRuleflow'), + }, + ), + ), + ); return "redirect"; } @@ -366,8 +418,23 @@ Dump the contents of the raw log. sub www_exportLogs { my ($session) = @_; - my $raw = $session->db->read('select * from passiveLog order by userId, timeStamp'); - exportSomething($session, $raw, 'passiveData.csv'); + my $process = WebGUI::Fork->start( + $session, + __PACKAGE__, 'exportSomething', + { tableName => 'passiveLog', filename => 'passiveData.csv', }, + ); + my $i18n = WebGUI::International->new($session, 'PassiveAnalytics'); + $session->http->setRedirect( + $session->url->page( + $process->contentPairs( + 'ProgressBar', { + icon => 'passiveAnalytics', + title => $i18n->get('Export raw logs'), + proceed => $session->url->page('op=passiveAnalytics;func=editRuleflow'), + }, + ), + ), + ); return "redirect"; } diff --git a/lib/WebGUI/PassiveAnalytics/Rule.pm b/lib/WebGUI/PassiveAnalytics/Rule.pm index d359b34ba..3145ff873 100644 --- a/lib/WebGUI/PassiveAnalytics/Rule.pm +++ b/lib/WebGUI/PassiveAnalytics/Rule.pm @@ -1,6 +1,26 @@ package WebGUI::PassiveAnalytics::Rule; -use base qw/WebGUI::Crud/; +use Moose; +use WebGUI::Definition::Crud; +extends qw/WebGUI::Crud/; +define tableName => 'analyticRule'; +define tableKey => 'ruleId'; +has ruleId => ( + required => 1, + is => 'ro', +); +property bucketName => ( + fieldType => 'text', + label => ['Bucket Name','PassiveAnalytics'], + hoverHelp => ['Bucket Name help','PassiveAnalytics'], + default => '', +); +property regexp => ( + fieldType => 'text', + label => ['regexp','PassiveAnalytics'], + hoverHelp => ['regexp help','PassiveAnalytics'], + default => '.+', +); use WebGUI::International; =head1 NAME @@ -19,59 +39,6 @@ These methods are available from this class: #------------------------------------------------------------------- -=head2 crud_definition ( ) - -WebGUI::Crud definition for this class. - -=head3 tableName - -analyticRule. - -=head3 tableKey - -ruleId - -=head3 sequenceKey - -None. There is only 1 sequence of rules for a site. - -=head3 properties - -=head4 bucketName - -The name of a bucket to hold results for this rule. - -=head4 regular expression. - -A regular expression to match against log entries. - -=cut - -sub crud_definition { - my ($class, $session) = @_; - my $definition = $class->SUPER::crud_definition($session); - $definition->{tableName} = 'analyticRule'; - $definition->{tableKey} = 'ruleId'; - $definition->{sequenceKey} = ''; - my $properties = $definition->{properties}; - my $i18n = WebGUI::International->new($session); - $properties->{bucketName} = { - fieldType => 'text', - label => $i18n->get('Bucket Name','PassiveAnalytics'), - hoverHelp => $i18n->get('Bucket Name help','PassiveAnalytics'), - defaultValue => '', - }; - $properties->{regexp} = { - fieldType => 'text', - label => $i18n->get('regexp','PassiveAnalytics'), - hoverHelp => $i18n->get('regexp help','PassiveAnalytics'), - defaultValue => '.+', - }; - return $definition; -} - -#------------------------------------------------------------------- - =head2 matchesBucket ( $logLine ) Executes the rule to determine if a log file entry matches the rule. @@ -84,7 +51,7 @@ A hashref of information from 1 line of the logs. sub matchesBucket { my ($self, $logLine) = @_; - my $regexp = $self->get('regexp'); + my $regexp = $self->regexp; return $logLine->{url} =~ m/$regexp/; } diff --git a/lib/WebGUI/PassiveProfiling.pm b/lib/WebGUI/PassiveProfiling.pm index b58644dff..69be823bd 100644 --- a/lib/WebGUI/PassiveProfiling.pm +++ b/lib/WebGUI/PassiveProfiling.pm @@ -3,7 +3,7 @@ package WebGUI::PassiveProfiling; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -16,7 +16,6 @@ package WebGUI::PassiveProfiling; use strict; -use Tie::IxHash; =head1 NAME @@ -59,8 +58,8 @@ sub add { my $assetId = shift; $session->db->write("insert into passiveProfileLog (passiveProfileLogId, userId, sessionId, assetId, dateOfEntry) values (?,?,?,?,?)", [ - $session->id->generate(), $session->user->userId, - $session->var->get("sessionId"), $assetId, + $session->id->generate(), $session->user->userId, + $session->getId, $assetId, time(), ]); return undef; diff --git a/lib/WebGUI/Paths.pm b/lib/WebGUI/Paths.pm new file mode 100644 index 000000000..4f80f9437 --- /dev/null +++ b/lib/WebGUI/Paths.pm @@ -0,0 +1,245 @@ +package WebGUI::Paths; + +=head1 LEGAL + + ------------------------------------------------------------------- + WebGUI is Copyright 2001-2012 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 + ------------------------------------------------------------------- + +=cut + +our $VERSION = '0.0.1'; +use 5.010; +use strict; +use warnings; +use Carp qw(croak); +use Cwd qw(realpath); +use File::Spec::Functions qw(catdir splitpath catpath splitpath updir catfile); +use Try::Tiny; +use namespace::autoclean -also => qr/^_/; + +=head1 NAME + +Package WebGUI::Paths + +=head1 DESCRIPTION + +Locations for WebGUI files + +=head1 IMPORT OPTIONS + +=head2 -inc + + use WebGUI::Paths -inc; + +Loads all of the entries from the preload.custom file into @INC + +=head2 -preload + +Loads all of the entries from the preload.custom file into @INC, +and loads all modules in the WebGUI namespace. + +=head1 METHODS + +These methods are available from this class: + +=head2 configBase + +Returns the base directory for WebGUI site config files. + +=head2 logConfig + +Returns the file path of the log configuration file. + +=head2 spectreConfig + +Returns the file path of the Spectre configuration file. + +=head2 preloadCustom + +Returns the file path of the preload.custom file to use. + +=head2 preloadExclusions + +Returns the file path of the preload.exclude file to use. + +=head2 upgrades + +Returns the base directory that contains the upgrade scripts. + +=head2 extras + +Returns the base directory of the WebGUI extra web files. + +=head2 defaultUploads + +Returns the base directory of the default site uploads content. + +=head2 defaultCreateSQL + +Returns the file path of the default site create.sql script. + +=head2 share + +Returns the base directory for WebGUI auxiliary files. + +=cut + +BEGIN { + use Class::MOP; + my $root = realpath(catdir( + catpath((splitpath(__FILE__))[0,1], ''), (updir) x 2 + )); + my %paths = ( + configBase => catdir($root, 'etc'), + logConfig => catfile($root, 'etc', 'log.conf'), + spectreConfig => catfile($root, 'etc', 'spectre.conf'), + preloadCustom => catfile($root, 'etc', 'preload.custom'), + preloadExclusions => catfile($root, 'etc', 'preload.exclude'), + upgrades => catdir($root, 'share', 'upgrades'), + extras => catdir($root, 'www', 'extras'), + defaultUploads => catdir($root, 'www', 'uploads'), + defaultCreateSQL => catdir($root, 'share', 'create.sql'), + share => catdir($root, 'share'), + defaultPSGI => catdir($root, 'share', 'site.psgi'), + ); + my $meta = Class::MOP::Class->initialize(__PACKAGE__); + for my $sub (keys %paths) { + my $path = $paths{$sub}; + $meta->add_method( $sub, sub { $path } ); + } +} + +sub import { + my $class = shift; + my @invalid; + for my $param (@_) { + if ($param eq '-inc') { + $class->includePreloads; + } + elsif ($param eq '-preload') { + $class->preloadAll; + } + else { + push @invalid, $param; + } + } + if (@invalid) { + croak 'Invalid options ' . join(', ', @invalid); + } +} + + +=head2 siteConfigs + +Returns the absolute paths of all of the config files inside L as an array. + +=cut + +sub siteConfigs { + my $class = shift; + opendir my $dh, $class->configBase; + my @configs; + while ( my $file = readdir $dh ) { + my $fullPath = realpath( catfile( $class->configBase, $file ) ); + if ( -d $fullPath + || $file !~ /\.conf$/ + || $fullPath eq realpath($class->logConfig) + || $fullPath eq realpath($class->spectreConfig) ) + { + next; + } + push @configs, $fullPath; + } + return @configs; +} ## end sub siteConfigs + +=head2 preloadPaths + +Returns the list of paths in the preload.custom file as an array. + +=cut + +sub preloadPaths { + my $class = shift; + my @paths; + try { + for my $path ( _readTextLines($class->preloadCustom) ) { + if (-d $path) { + push @paths, $path; + } + else { + warn "WARNING: Not adding lib directory '$path' from " + . $class->preloadCustom . ": Directory does not exist.\n"; + } + } + }; + return @paths; +} + +=head2 includePreloads + +Adds the paths from preload.custom to @INC. + +=cut + +sub includePreloads { + my $class = shift; + unshift @INC, $class->preloadPaths; +} + +=head2 preloadExclude + +Returns the list of modules to exclude from preloading as an array. + +=cut + +sub preloadExclude { + my $class = shift; + my @excludes = _readTextLines($class->preloadExclusions); + push @excludes, 'WebGUI::Upgrade', 'WebGUI::Upgrade::*'; + push @excludes, 'WebGUI::Test', 'WebGUI::Test::*'; + return @excludes; +} + +=head2 preloadAll + +Preloads all of the modules in the WebGUI namespace into memory. + +=cut + +sub preloadAll { + my $class = shift; + $class->includePreloads; + + require WebGUI::Pluggable; + + my @exclusions = $class->preloadExclude; + WebGUI::Pluggable::findAndLoad( 'WebGUI', { + exclude => \@exclusions, + onLoadFail => sub { warn sprintf "Error loading %s: %s\n", @_ }, + }); +} + +sub _readTextLines { + my $file = shift; + my @lines; + open my $fh, '<', $file or return; + while (my $line = <$fh>) { + $line =~ s/#.*//; + $line =~ s/^\s+//; + $line =~ s/\s+$//; + next + if !$line; + push @lines, $line; + } + return @lines; +} + +1; diff --git a/lib/WebGUI/PerformanceProfiler.pm b/lib/WebGUI/PerformanceProfiler.pm deleted file mode 100644 index 7cc2271e5..000000000 --- a/lib/WebGUI/PerformanceProfiler.pm +++ /dev/null @@ -1,542 +0,0 @@ -package WebGUI::PerformanceProfiler; - -=head1 LEGAL - , - ,o - :o - _....._ `:o - .' ``-. \o - / _ _ \ \o - : /*\ /*\ ) ;o - | \_/ \_/ / ;o - ( U / ;o - \ (\_____/) / /o - \ \_m_/ ( /o - \ ( ,o: - ) \, .o;o' ,o'o'o. - ./ /\o;o,,,,,;o;o;'' _,-o,-'''-o:o. - . ./o./) \ 'o'o'o'' _,-'o,o' o - o ./o./ / .o \. __,-o o,o' - \o. ,/o / /o/) | o o'-..____,,-o'o o_o-' - `o:o...-o,o-' ,o,/ | \ 'o.o_o_o_o,o--'' - ., ``o-o' ,.oo/ 'o /\.o`. - `o`o-....o'o,-' /o / \o \. ,o.. o - ``o-o.o-- /o / \o.o--.. ,,,o-o'o.--o:o:o,,..:o - (oo( `--o.o`o---o'o'o,o,-''' o'o'o - \ o\ ``-o-o'''' - ,-o;o \o \ - /o/ )o ) WebGUI::PerformanceProfiler - (o( /o / By Len Kranendonk - \o\. ...-o'o / ilance.nl - \o`o`-o'o o,o,--' - ```o--''' - -=cut - -=head1 USAGE - -This module provides functionality to profile your -WebGUI code, and find slow routines. - -Using this module is simple, just add: - -PerlModule WebGUI::PerformanceProfiler -PerlChildInitHandler WebGUI::PerformanceProfiler -PerlOutputFilterHandler WebGUI::PerformanceProfiler - -To the apache configuration. Make sure these directives -are not inside your WebGUI vhost block, but instead above it. - -By default all preloaded WebGUI code will get profiled. -You can limit the profiling to specific modules like this: - -PerlSetVar whatToProfile WebGUI::Asset::Wobject - -=cut - -use strict; -use Time::HiRes qw(time); -use Apache2::Const -compile => qw(OK DECLINED NOT_FOUND); -use Apache2::Connection; -use Apache2::ServerUtil; -use Apache2::Filter; -use Apache2::FilterRec; -use Apache2::RequestIO; -use Apache2::RequestRec; -use ModPerl::Util; -use Net::CIDR::Lite; - -my @subTimes = (); -my $depth = 0; -my %pointer; - -=head2 handler - -In Init, adds profiles code to subroutines. - -For all other calls, adds profiler output to the file. - -=cut - -sub handler { - ##This method does double duty as a ChildInitHandler and as an Output filter. - ##therefore we don't know what kind of object we get. - my $object = shift; - my $callback = ModPerl::Util::current_callback(); - if($callback eq 'PerlChildInitHandler') { - return addProfilerCode(); - } else { - return output($object); - } -} - -=head2 addProfilerCode - -Based on the Apache config setting WhatToProfile, generate a list of all subs to -profile and adds profiling code to them. Certain subroutines are excluded, such as this sub, -AUTOLOADS and CONSTANTS. - -=cut - -sub addProfilerCode { - my $r = shift; - my $s = Apache2::ServerUtil->server; - my $whatToProfile = $s->dir_config('WhatToProfile') || 'WebGUI'; - - my %subs = findSubs($whatToProfile); - my $myself = __PACKAGE__; - while(my($name, $ref) = each(%subs)) { - unless($name =~ /$myself/i # Dont instrument ourself. - || $name =~ /AUTOLOAD/i # Dont instrument AUTOLOAD - || is_constant($name,$ref) # Dont instrument CONSTANTS - ){ - instrumentSub($name, $ref); - } - } - return Apache2::Const::DECLINED; -} - - -=head2 output - -Handler that adds the results to the body of the outgoing page. - -=cut - -sub output { - my $f = shift; - return Apache2::Const::DECLINED unless($f->r->content_type =~ 'text/html'); - my $server = Apache2::ServerUtil->server; - my $sn = $server->dir_config('ProfileSubnet'); - if ($sn) { - my $conn = $f->c; - my $ipAddress = $conn->remote_ip; - my $net = Net::CIDR::Lite->new($sn); - if (!$net->find($ipAddress)) { - return Apache2::Const::DECLINED; - } - } - while($f->read(my $buffer, 1024)) { - my $content .= $buffer; - if ($content =~ /(<\/body)/i) { - my $results = results(); - $content =~ s/<\/body(.*)/${results}<\/body$1/i; - } - $f->print($content); - } - return Apache2::Const::OK; -} - -=head2 findSubs - -Walk the symbol tree and return a list of all subroutines with a given module -hierachy. Returns a hash of full subroutine names along with a code ref -to that sub. - -=head3 pkg - -A string indicating which parts of the module namespace should be searched -for subroutines. - -=cut - -sub findSubs { - my $pkg = shift; - my %_subs; - my @symbols; - eval('@symbols = keys(%'.$pkg.'::);'); - foreach my $sym (@symbols) { - next if ($sym eq $pkg.'::'); # Self refering routine - next if ($sym =~ /^__/); - if($sym =~ /\:\:$/) { - $sym =~ s/\:\:$//; - %_subs = (%_subs, findSubs($pkg . '::' . $sym)); - next; - } - next if ($sym =~ /\W/); - my $code_ref; - eval('$code_ref = *'.$pkg.'::'.$sym.'{CODE};'); - next unless($code_ref); - $_subs{$pkg."::".$sym} = $code_ref; - } - return %_subs; -} - -=head2 instrumentSub - -Wrap profiling code around a subroutine by manipulating the symbol table. - -=cut - -sub instrumentSub { - my $name = shift; - my $coderef = shift; - my $prototype; - if(defined(prototype($name))) { - $prototype = '('.prototype($name).')'; - } - my $instrumented_body = q( - { - profileSubStart( $name ); - my $ret_val_scalar; - my @ret_val_array; - - if(wantarray) { - eval { @ret_val_array = &$coderef; }; - } else { - eval { $ret_val_scalar = &$coderef; }; - } - die ($@) if ($@); - profileSubEnd( $name ); - if(wantarray) { - return @ret_val_array; - } else { - return $ret_val_scalar; - } - }; - ); - eval "no warnings 'redefine'; *$name = sub $prototype $instrumented_body" ; -} - -=head2 profileSubStart - -Record the name of the subroutine, the time it was called and increment the depth. - -=cut - -sub profileSubStart { - my $routine = shift; - push(@subTimes, { - routine => $routine, - 'start' => time(), - depth => ++$depth - }); - $pointer{$routine} = $#subTimes; -} - -=head2 profileSubEnd - -Record when a subroutine was exited and decrement the depth. - -=cut - -sub profileSubEnd { - my $routine = shift; - my $call = $subTimes[$pointer{$routine}]; - $call->{end} = time(); - $depth--; -} - - -=head2 results - -Produce the output of the profiler. The expandable, -collapsible tree of subroutine calls. Will soon -include line number of the caller (parent) subroutine, -and optionally a dump of all the parameters (!). Will -also soon include a tabular display akin to Devel::DProf's -formatted tabular output: percent total time spent in sub, -aggregate exclusive time spent in sub, aggregate inclusive -time spent in sub, number of calls to the sub, mean -exclusive time per sub call, mean inclusive time per sub -call, subroutine name, sorted by aggregate exclusive time -per sub, descending. - -=cut - -sub results { - my @parents = (); - my $exclTimes = {}; - my $inclTimes = {}; - my $output = qq| -|; - $output .= '

    Stack Profiler

    '; - my $total = sprintf("%.4f",($subTimes[-1]->{'end'} - $subTimes[0]->{'start'})); - $output .= 'Function calls: '.scalar(@subTimes).' took: '.$total.'s

    '; - for(my $entry=0;$entry <= $#subTimes;$entry++) { - my $call = $subTimes[$entry]; - $call->{entry} = $entry; - $call->{duration} = $call->{end} - $call->{start}; - $call->{excl} = $call->{duration}; - if (defined $parents[0]) { - $subTimes[$parents[-1]]->{excl} -= $call->{duration}; - } - if($subTimes[$entry + 1] && ($subTimes[$entry + 1]->{depth} > $call->{depth})) { - # Do stuff to the next line if it's at a deeper depth. - push(@parents,$entry); - } - my $nextDepth; - if(ref($subTimes[$entry +1])) { - $nextDepth = $subTimes[$entry + 1]->{depth}; - } else { - $nextDepth = 1; - } - if($nextDepth < $call->{depth}) { - $nextDepth++; - for(1 .. ($call->{depth} - $nextDepth + 1)) { - pop @parents; - } - } - } - - for(my $entry=0;$entry <= $#subTimes;$entry++) { - my $call = $subTimes[$entry]; - $output .= "\n".'  '; - $output .= '  | ' for(2..($call->{depth})); - $exclTimes->{$call->{routine}} = [] unless exists $exclTimes->{$call->{routine}}; - push(@{$exclTimes->{$call->{routine}}},$call->{excl}); - $inclTimes->{$call->{routine}} = [] unless exists $inclTimes->{$call->{routine}}; - push(@{$inclTimes->{$call->{routine}}},$call->{duration}); - if($subTimes[$entry + 1] && ($subTimes[$entry + 1]->{depth} > $call->{depth})) { - # Do stuff to the next line if it's at a deeper depth. - $output .= qq| + |; - } else { - $output .= '— '; - } - $output .= "" if($total < ($call->{duration} * 40)); - $output .= $call->{routine} . " ( ".sprintf("%.4f",$call->{duration})."s )"; - $output .= "  ". sprintf("%.2f",(($call->{duration} / $total)*100)).'%' if($total < ($call->{duration} * 40)); - $output .= " Exclusive: ".sprintf("%.4f",$call->{excl})."s " if ($call->{excl} ne $call->{duration}); - $output .= "
    \n"; - my $nextDepth; - if(ref($subTimes[$entry +1])) { - $output .= qq|\n"; - } - } - } - $output .= "
    \n
    \n"; - $output .= '

    Subroutine Calls Aggregate Data

    '; - $output .= '"Exclusive" measures the time spent in the subroutine call, excluding the time spent in its called subroutines. Inclusive measures...'."
    \n
    \n"; - $output .= qq| - - - - - - - - - - - - - - - -|; -my $rawtotal = ($subTimes[-1]->{'end'} - $subTimes[0]->{'start'}); -foreach my $rout (keys %{$inclTimes}) { - my $totExcl = sum($exclTimes->{$rout}); - my $totIncl = sum($inclTimes->{$rout}); - next if ((($totExcl+0) > 1000000) || (($totExcl+0) < -1000000)); # skip problem subs. - $output .= sprintf("", - (100 * $totIncl / $rawtotal ), # Inclusive % - $totIncl, # Inclusive Total - ($totIncl / (scalar(@{$inclTimes->{$rout}}))), # Inclusive Mean - (scalar(@{$inclTimes->{$rout}})), # Calls Total - (100 * $totExcl / $rawtotal), # Exclusive % - $totExcl, # Exclusive Total - ($totExcl / (scalar(@{$exclTimes->{$rout}}))), # Exclusive Mean - $rout # Sub Name - ); -} -$output .= q@ - -
    Inclusive %Inclusive TotalInclusive MeanCalls TotalExclusive %Exclusive TotalExclusive MeanSub Name
    %.2f%%%.5f%.5f%u%.2f%%%.5f%.5f%s
    - -@; - - $output .= "
    \n
    \n
    \n
    \n"; - undef(@subTimes); - return $output; -} - -=head2 is_constant - -Determine if a given subroutine is used to generate constants, such as subroutines created -by C 2>. - -=cut - -sub is_constant { - no strict 'refs'; - my ($name, $code) = @_; - my $proto = prototype($code); - return 0 if defined $proto and length $proto; - my $is_const; - { - local $SIG{__WARN__} = sub { $is_const = 1 if $_[0] =~ /^Constant/ }; - eval { *{$name} = sub { "TEST" } }; - eval { *{$name} = $code; }; - } - return $is_const; -} - - -=head2 sum ($arrRef) - -Calculates and returns the sum of the elements in the array reference. - -=head3 $arrRef - -An array reference. - -=cut - -sub sum { - my $sum = 0; - my $arrRef = shift; - foreach my $elem (@{$arrRef}) { $sum += $elem; } - return($sum); -} - -1; diff --git a/lib/WebGUI/Pluggable.pm b/lib/WebGUI/Pluggable.pm index 552c1175f..b28132124 100644 --- a/lib/WebGUI/Pluggable.pm +++ b/lib/WebGUI/Pluggable.pm @@ -3,7 +3,7 @@ package WebGUI::Pluggable; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -193,6 +193,9 @@ object. sub instanciate { my ($module, $sub, $params) = @_; if ( ! eval { load($module); 1 } ) { + if ( ref $@ ) { + die $@; + } croak "Could not instanciate object using $sub on $module: $@"; } # Module loaded properly @@ -229,7 +232,7 @@ my %moduleError; sub load { my $module = shift; if ($moduleError{$module}) { - croak "Could not load $module because $moduleError{$module}"; + croak $moduleError{$module}; } # Sanitize @@ -240,12 +243,22 @@ sub load { # Try to load the module my $modulePath = $module . ".pm"; $modulePath =~ s{::|'}{/}g; + + if ( $INC{$modulePath} ) { + return 1; + } + if (eval { require $modulePath; 1 }) { return 1; } else { - $moduleError{$module} = $@; - croak "Could not load $module because $@"; + if ( ref $@ ) { + $moduleError{$module} = $@; + } + else { + $moduleError{$module} = "Could not load $module because $@"; + } + croak $moduleError{$module}; } } @@ -272,6 +285,8 @@ An array reference of parameters to pass in to the sub routine. sub run { my ($module, $sub, $params) = @_; if (! eval { load($module); 1 }) { + die $@ + if ref $@; croak "Unable to run $sub on $module: $@"; } elsif (my $sub = $module->can($sub)) { diff --git a/lib/WebGUI/ProfileCategory.pm b/lib/WebGUI/ProfileCategory.pm index d78a437b0..24ed328d3 100644 --- a/lib/WebGUI/ProfileCategory.pm +++ b/lib/WebGUI/ProfileCategory.pm @@ -3,7 +3,7 @@ package WebGUI::ProfileCategory; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -151,7 +151,7 @@ sub getCategories { my $bindvars = []; foreach my $key (keys %{$options}) { - next unless WebGUI::Utility::isIn($key,qw(editable visible)); + next unless $key ~~ [qw(editable visible)]; $whereClause .= " and" unless ($whereClause eq ""); $whereClause .= " $key=?"; push(@{$bindvars},$options->{$key}); @@ -214,7 +214,7 @@ sub getFields { foreach my $key (keys %{$options}) { #Skip bad stuff that will crash the query - next unless WebGUI::Utility::isIn($key,qw(editable visible required)); + next unless $key ~~ [qw(editable visible required)]; $whereClause .= " and $key=?"; push(@{$bindvars},$options->{$key}); } diff --git a/lib/WebGUI/ProfileField.pm b/lib/WebGUI/ProfileField.pm index d156a0b4f..88259f91e 100644 --- a/lib/WebGUI/ProfileField.pm +++ b/lib/WebGUI/ProfileField.pm @@ -4,7 +4,7 @@ package WebGUI::ProfileField; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -21,8 +21,8 @@ use WebGUI::Form::DynamicField; use WebGUI::Operation::Shared; use WebGUI::HTML; use WebGUI::User; -use WebGUI::Utility; use WebGUI::Pluggable; +use Tie::IxHash; =head1 NAME @@ -66,7 +66,7 @@ Return true iff fieldName is reserved and therefore not usable as a profile fiel sub isReservedFieldName { my $class = shift; my $fieldName = shift; - return isIn($fieldName, qw/userId shop specialState func op wg_privacySettings username authMethod dateCreated lastUpdated karma status referringAffiliate friendsGroup/); + return $fieldName ~~ [qw/userId shop specialState func op wg_privacySettings username authMethod dateCreated lastUpdated karma status referringAffiliate friendsGroup/]; } #------------------------------------------------------------------- @@ -170,7 +170,7 @@ sub create { # Add the column to the userProfileData table $db->write( - "ALTER TABLE userProfileData ADD " . $db->dbh->quote_identifier($id) + "ALTER TABLE userProfileData ADD " . $db->quote_identifier($id) . $dbDataType ); @@ -193,7 +193,7 @@ sub delete { my $db = $self->session->db; # Remove the column from the userProfileData table - $db->write("ALTER TABLE userProfileData DROP " . $db->dbh->quote_identifier($self->getId)); + $db->write("ALTER TABLE userProfileData DROP " . $db->quote_identifier($self->getId)); # Remove the record $db->deleteRow("userProfileField","fieldName",$self->getId); @@ -242,7 +242,7 @@ sub formProperties { = WebGUI::Operation::Shared::secureEval($self->session,$self->get("possibleValues")); unless (ref $values eq 'HASH') { if ($self->get('possibleValues') =~ /\S/) { - $self->session->errorHandler->warn("Could not get a hash out of possible values for profile field ".$self->getId); + $self->session->log->warn("Could not get a hash out of possible values for profile field ".$self->getId); } $values = {}; } @@ -327,7 +327,7 @@ sub formField { } else { # start with specified (or current) user's data. previous data needed by some form types as well (file). - $properties->{value} = $u->profileField($self->getId); + $properties->{value} = $u->get($self->getId); #If the fieldId is actually found in the request, try to process the form if ($session->form->param($self->getId)) { $properties->{value} = $self->formProcess($u); @@ -371,7 +371,7 @@ sub formProcess { my $u = shift || $self->session->user; my $userId = $u->userId; - my $properties = $self->formProperties({value => $u->profileField($self->getId)}); + my $properties = $self->formProperties({value => $u->get($self->getId)}); my $result = $self->session->form->process( $self->getId, $self->get("fieldType"), @@ -613,7 +613,7 @@ sub isDuplicate { my $value = shift; my $userId = shift || $session->user->userId; - my $sql = qq{select count(*) from userProfileData where $fieldId = ? and userId <> ?}; + my $sql = qq{select count(*) from users join userProfileData using( userId ) where $fieldId = ? and userId <> ?}; my $duplicate = $session->db->quickScalar($sql,[$value, $userId]); return ($duplicate > 0); } @@ -813,8 +813,8 @@ sub rename { $self->session->db->write( "ALTER TABLE userProfileData " - . "CHANGE " . $db->dbh->quote_identifier($self->getId) - . $db->dbh->quote_identifier($newName) . " " . $dbDataType + . "CHANGE " . $db->quote_identifier($self->getId) + . $db->quote_identifier($newName) . " " . $dbDataType ); # Update the record @@ -924,7 +924,7 @@ sub set { } # If the fieldType has changed, modify the userProfileData column - if ($properties->{fieldType} ne $originalFieldType) { + if ($properties->{fieldType} ne $originalFieldType && !$self->isProtected) { # Create a copy of the new properties so we don't mess them up my $fieldClass = $self->getFormControlClass; eval { WebGUI::Pluggable::load($fieldClass) }; @@ -933,7 +933,7 @@ sub set { my $sql = "ALTER TABLE userProfileData MODIFY COLUMN " - . $db->dbh->quote_identifier($self->getId) . q{ } + . $db->quote_identifier($self->getId) . q{ } . $dbDataType ; diff --git a/lib/WebGUI/ProgressBar.pm b/lib/WebGUI/ProgressBar.pm index d098d9deb..aaed5e4e9 100644 --- a/lib/WebGUI/ProgressBar.pm +++ b/lib/WebGUI/ProgressBar.pm @@ -3,7 +3,7 @@ package WebGUI::ProgressBar; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -64,7 +64,7 @@ sub new { #------------------------------------------------------------------- -=head2 finish ( $url ) +=head2 finish ( $url|$helper ) Redirects the user out of the status page. @@ -72,19 +72,51 @@ Redirects the user out of the status page. The URL to send the user to. +=head3 $helper + +A hashref response for an Asset Helper to be processed by the Admin Console + =cut sub finish { - my $self = shift; - my $url = shift; - my $text = sprintf(< -parent.location.href='%s'; +window.location.href='%s'; EOJS - local $| = 1; - $self->session->output->print($text . $self->{_foot}, 1); # skipMacros - return 'chunked'; + $self->session->output->print($text . $self->{_foot}, 1); # skipMacros + return 'chunked'; + } + else { + # We're in admin mode, close the dialog + my $text = ''; + + $self->session->output->print( $text, 1); # skipMacros + return 'chunked'; + } } #------------------------------------------------------------------- @@ -118,16 +150,16 @@ The url to the icon you want to display. sub start { my ($self, $title, $icon) = @_; - $self->session->http->setCacheControl("none"); + $self->session->response->setCacheControl("none"); my %var = ( title => $title, icon => $icon ); - my $template = WebGUI::Asset::Template->new($self->session, 'YP9WaMPJHvCJl-YwrLVcPw'); + my $template = WebGUI::Asset::Template->newById($self->session, 'YP9WaMPJHvCJl-YwrLVcPw'); my $output = $self->session->style->process($template->process(\%var).'~~~', "PBtmpl0000000000000137"); my ($head, $foot) = split '~~~', $output; local $| = 1; # Tell modperl not to buffer the output - $self->session->http->sendHeader; + $self->session->response->sendHeader; $self->session->output->print($head, 1); #skipMacros $self->{_foot} = $foot; return ''; @@ -152,7 +184,7 @@ A message to be displayed in the status bar. my $prefix = ' '; @@ -162,15 +194,18 @@ sub update { my $message = shift; $message =~ s/'/\\'/g; ##Encode single quotes for JSON; $self->session->log->preventDebugOutput; - my $counter = $self->{_counter} += 1; - - my $text = $prefix . sprintf($format, $counter, $message) . $suffix; + + if ( $self->{_total} ) { + $self->{_counter} += 1; + } + + # Calculate percent progress. If we don't know our total yet, we haven't progressed any! + my $progress = $self->{_total} ? int( $self->{_counter} / $self->{_total} * 100 ) : 0; + + my $text = $prefix . sprintf($format, $progress, $message) . $suffix; local $| = 1; # Tell modperl not to buffer the output $self->session->output->print($text, 1); #skipMacros - if ($self->{_counter} > 600) { - $self->{_counter} = 1; - } return ''; } @@ -178,6 +213,25 @@ sub update { #------------------------------------------------------------------- +=head2 total ( newTotal ) + +Set the total number of tasks that need to be run. You should set this +before running any actual tasks. If this is not set, the progress bar +will not progress (though any update messages will still display to +the user). + +=cut + +sub total { + my ( $self, $newTotal ) = @_; + if ( $newTotal ) { + return $self->{_total} = $newTotal; + } + return $self->{_total}; +} + +#------------------------------------------------------------------- + =head2 run ( options ) starts and finishes a progress bar, running some code in the middle. It @@ -187,6 +241,15 @@ should return 'chunked' yourself. The following keyword arguments are accepted (either as a bare hash or a hashref). +=head3 total + +Set the total number of tasks that need to be run. Every call to update() is +another task completed. The progressbar works with percentages, so this +must be set before any tasks are started. + +If you need to calculate the number of tasks, be sure to set total() inside +the C subref before doing any actual work. + =head3 code A coderef to run in between starting and stopping the progress bar. It is @@ -205,6 +268,10 @@ See start(). See start(). +=head3 admin + +If true, will send the correct JS to close the dialog box. + =head3 wrap A hashref of subroutine names to code references. While code is being called, @@ -232,6 +299,7 @@ sub run { my $wrap = $args->{wrap}; $self->start($args->{title}, $args->{icon}); + $self->{_total} = $args->{total}; my $url = eval { for my $name (keys %$wrap) { @@ -259,7 +327,7 @@ sub run { die $e if $e; - return $self->finish($url || $self->session->url->page); + return $self->finish( $url || ( !$args->{admin} && $self->session->url->page ) ); } 1; diff --git a/lib/WebGUI/ProgressTree.pm b/lib/WebGUI/ProgressTree.pm index c5e528a13..b83497bfa 100644 --- a/lib/WebGUI/ProgressTree.pm +++ b/lib/WebGUI/ProgressTree.pm @@ -23,7 +23,7 @@ status page that renders this. =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using diff --git a/lib/WebGUI/Role/Asset/AlwaysHidden.pm b/lib/WebGUI/Role/Asset/AlwaysHidden.pm new file mode 100644 index 000000000..ce2ac7a4d --- /dev/null +++ b/lib/WebGUI/Role/Asset/AlwaysHidden.pm @@ -0,0 +1,43 @@ +package WebGUI::Role::Asset::AlwaysHidden; + +=head1 LEGAL + + ------------------------------------------------------------------- + WebGUI is Copyright 2001-2012 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 + ------------------------------------------------------------------- + +=cut + +=head1 NAME + +Package WebGUI::Role::Asset::AlwaysHidden + +=head1 DESCRIPTION + +Asset Role that guarantees that the isHidden property is always 1. + +=head1 SYNOPSIS + +with WebGUI::Role::Asset::AlwaysHidden; + +=cut + +use Moose::Role; + +around isHidden => sub { + my $orig = shift; + my $self = shift; + if (@_ > 0) { + shift @_; + unshift @_, 1; + } + $self->$orig(@_); +}; + +1; diff --git a/lib/WebGUI/AssetAspect/AutoSynopsis.pm b/lib/WebGUI/Role/Asset/AutoSynopsis.pm similarity index 86% rename from lib/WebGUI/AssetAspect/AutoSynopsis.pm rename to lib/WebGUI/Role/Asset/AutoSynopsis.pm index 50ec947b1..b8777717f 100644 --- a/lib/WebGUI/AssetAspect/AutoSynopsis.pm +++ b/lib/WebGUI/Role/Asset/AutoSynopsis.pm @@ -1,9 +1,9 @@ -package WebGUI::AssetAspect::AutoSynopsis; +package WebGUI::Role::Asset::AutoSynopsis; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -15,7 +15,7 @@ package WebGUI::AssetAspect::AutoSynopsis; =cut use strict; -use Class::C3; +use Moose::Role; use WebGUI::HTML; =head1 NAME @@ -24,12 +24,11 @@ Package WebGUI::AssetAspect::AutoSynopsis =head1 DESCRIPTION -This is an aspect which provides a method for an asset to create a synopsis based on user submitted content. +This is a role which provides a method for an asset to create a synopsis based on user submitted content. =head1 SYNOPSIS - use Class::C3; - use base qw(WebGUI::AssetAspect::AutoSynopsis WebGUI::Asset); + with 'WebGUI::Role::Asset::AutoSynopsis'; =head1 METHODS diff --git a/lib/WebGUI/AssetAspect/Comments.pm b/lib/WebGUI/Role/Asset/Comments.pm similarity index 70% rename from lib/WebGUI/AssetAspect/Comments.pm rename to lib/WebGUI/Role/Asset/Comments.pm index 59d0d2b58..efa8194c8 100644 --- a/lib/WebGUI/AssetAspect/Comments.pm +++ b/lib/WebGUI/Role/Asset/Comments.pm @@ -1,9 +1,9 @@ -package WebGUI::AssetAspect::Comments; +package WebGUI::Role::Asset::Comments; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -14,18 +14,31 @@ package WebGUI::AssetAspect::Comments; =cut -use strict; -use Class::C3; -use JSON; -use Tie::IxHash; +use Moose::Role; +use WebGUI::Definition::Asset; +use WebGUI::Types; +define tableName => 'assetAspectComments'; +property comments => ( + noFormPost => 1, + fieldType => "textarea", + default => sub { [] }, + traits => ['Array', 'WebGUI::Definition::Meta::Property::Serialize',], + isa => 'WebGUI::Type::JSONArray', + coerce => 1, + ); +property averageCommentRating => ( + noFormPost => 1, + fieldType => "hidden", + default => 0, + ); + use WebGUI::Exception; use WebGUI::Form; use WebGUI::HTML; -use WebGUI::Utility; =head1 NAME -Package WebGUI::AssetAspect::Comments +Package WebGUI::Role::Asset::Comments =head1 DESCRIPTION @@ -33,10 +46,7 @@ This is an aspect which makes adding comments to existing assets trivial. =head1 SYNOPSIS - use Class::C3; - use base qw(WebGUI::AssetAspect::Comments WebGUI::Asset); - -And then where-ever you would call $self->SUPER::someMethodName call $self->next::method instead. + with 'WebGUI::Role::Asset::Comments'; =head1 METHODS @@ -74,12 +84,12 @@ sub addComment { my $comments = $self->get('comments'); push @$comments, { id => $session->id->generate, - alias => $user->profileField('alias'), + alias => $user->get('alias'), userId => $user->userId, comment => $comment, rating => $rating, date => time(), - ip => $session->var->get('lastIP'), + ip => $session->get('lastIP'), }; # calculate average @@ -120,41 +130,6 @@ sub canComment { } -#------------------------------------------------------------------- - -=head2 definition - -Extends the definition to add the comments and averageCommentRating fields. - -=cut - -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift; - my %properties; - tie %properties, 'Tie::IxHash'; - %properties = ( - comments => { - noFormPost => 1, - fieldType => "hidden", - defaultValue => [], - }, - averageCommentRating => { - noFormPost => 1, - fieldType => "hidden", - defaultValue => 0, - }, - ); - push(@{$definition}, { - autoGenerateForms => 1, - tableName => 'assetAspectComments', - className => 'WebGUI::Asset::Sku::BazaarItem', - properties => \%properties - }); - return $class->next::method($session, $definition); -} - #------------------------------------------------------------------- =head2 deleteComment ( id ) @@ -206,22 +181,6 @@ sub deleteComment { } } -#------------------------------------------------------------------- - -=head2 get () - -See SUPER::get(). Extends the get() method to automatically decode the comments field into a Perl hash structure. - -=cut - -sub get { - my $self = shift; - my $param = shift; - if ($param eq 'comments') { - return JSON->new->decode($self->next::method('comments')||'[]'); - } - return $self->next::method($param, @_); -} #------------------------------------------------------------------- @@ -233,7 +192,7 @@ Returns the HTML needed to render the average rating icon. sub getAverageCommentRatingIcon { my $self = shift; - return q{}.$self->get('averageCommentRating').q{}; + return q{}.$self->get('averageCommentRating').q{}; } @@ -260,12 +219,16 @@ sub getFormattedComments { $out .= q{}.$comment->{alias}.q{: "}.WebGUI::HTML::format($comment->{comment},'text').q{"
    }; } if ($self->canComment) { + use WebGUI::Form::Hidden; + use WebGUI::Form::Textarea; + use WebGUI::Form::CommentRating; + use WebGUI::Form::Submit; $out .= '
    '; $out .= WebGUI::Form::formHeader($session, {action=>$self->getUrl}); - $out .= WebGUI::Form::hidden($session, {name=>"func",value=>"addComment"}); - $out .= WebGUI::Form::textarea($session, {name=>"comment"}); - $out .= WebGUI::Form::commentRating($session, {name=>"rating"}); - $out .= WebGUI::Form::submit($session); + $out .= WebGUI::Form::Hidden->new($session, {name=>"func",value=>"addComment"})->toHtml; + $out .= WebGUI::Form::Textarea->new($session, {name=>"comment"})->toHtml; + $out .= WebGUI::Form::CommentRating->new($session, {name=>"rating"})->toHtml; + $out .= WebGUI::Form::Submit->new($session)->toHtml; $out .= WebGUI::Form::formFooter($session); $out .= '
    '; } @@ -298,30 +261,6 @@ sub getKarmaAmountPerComment { } -#------------------------------------------------------------------- - -=head2 update () - -See SUPER::update(). Extends the update() method to encode the comments field into something storable in the database. - -=cut - -sub update { - my $self = shift; - my $properties = shift; - if (exists $properties->{comments}) { - my $comments = $properties->{comments}; - if (ref $comments ne 'ARRAY') { - $comments = eval{JSON->new->decode($comments)}; - if (WebGUI::Error->caught || ref $comments ne 'ARRAY') { - $comments = []; - } - } - $properties->{comments} = JSON->new->encode($comments); - } - $self->next::method($properties, @_); -} - #------------------------------------------------------------------- =head2 www_addComment () diff --git a/lib/WebGUI/Role/Asset/Dashlet.pm b/lib/WebGUI/Role/Asset/Dashlet.pm new file mode 100644 index 000000000..cf50278c3 --- /dev/null +++ b/lib/WebGUI/Role/Asset/Dashlet.pm @@ -0,0 +1,125 @@ +package WebGUI::Role::Asset::Dashlet; + +use Moose::Role; +use JSON; + +=head1 NAME + +WebGUI::AssetAspect::Dashlet - Implement features to turn Assets into Dashlets + +=head1 SYNOPSIS + +This Aspect provides methods that allow a Dashboard to determine, store and retrieve +customization options for Assets. + +=head1 DESCRIPTION + + +=head1 METHODS + +#---------------------------------------------------------------------------- + +=head2 fetchUserOverrides ($dashboardAssetId, [$userId]) + +Retrieve user preferences for a particular dashboard and user for this Asset from the database. + +=head3 $dashboardId + +The assetId of the dashboard to reference. + +=head3 $userId + +The userId to whose preferences should be returned. Uses the current session user if omitted. + +=cut + +sub fetchUserOverrides { + my $self = shift; + my $dashboardAssetId = shift; + my $userId = shift || $self->session->user->userId; + my $properties_json = $self->session->db->quickScalar('select properties from Dashboard_userPrefs where dashboardAssetId=? and userId=? and dashletAssetId=?',[$dashboardAssetId, $userId, $self->getId,]); + $properties_json ||= '{}'; + my $properties = JSON->new->decode($properties_json); + return $properties; +} + +#---------------------------------------------------------------------------- + +=head2 getOverrideFormDefinition + +Return an array ref of form properties. The form properties are those that the +Asset has marked as being able to be overridden by a Dashboard asset by giving +the property the dashletOverridable flag. + +Assets that want to allow additional properties outside of their definition should +override and extend this method. + +=cut + +sub getOverrideFormDefinition { + my $self = shift; + my $session = $self->session; + my @properties; + foreach my $property ( $self->getProperties ) { + my $fieldHash = $self->getFieldData( $property ); + next unless $fieldHash->{dashletOverridable}; + $fieldHash->{name} = $property; + push @properties, $fieldHash; + } + return @properties; +} + +#---------------------------------------------------------------------------- + +=head2 getUserOverrides + +Store user preferences for this Asset. This is direct reference from inside the object, so +if you plan to modify the data, Clone it first. + +=cut + +sub getUserOverrides { + return shift->{_userOverrides}; +} + +#---------------------------------------------------------------------------- + +=head2 setUserOverrides + +Store user preferences for this Asset. + +=cut + +sub setUserOverrides { + shift->{_userOverrides} = shift; +} + +#---------------------------------------------------------------------------- + +=head2 storeUserOverrides ($dashboardAssetId, $properties, [$userId]) + +Store user preferences for a particular dashboard and user for this Asset to the database. + +=head3 $dashboardId + +The assetId of the dashboard to reference. + +=head3 $userId + +The userId to whose preferences should be returned. Uses the current session user if omitted. + +=cut + +sub storeUserOverrides { + my $self = shift; + my $session = $self->session; + my $dashboardAssetId = shift; + my $properties = shift; + my $userId = shift || $session->user->userId; + my $properties_json = JSON->new->encode($properties); + $session->db->write('DELETE FROM Dashboard_userPrefs where dashboardAssetId=? and userId=? and dashletAssetId=?',[$dashboardAssetId, $userId, $self->getId]); + $session->db->write('INSERT INTO Dashboard_userPrefs (dashboardAssetId, userId, dashletAssetId, properties) VALUES (?,?,?,?)', [$dashboardAssetId, $userId, $self->getId, $properties_json]); +} + + +1; # You can't handle the truth diff --git a/lib/WebGUI/AssetAspect/Installable.pm b/lib/WebGUI/Role/Asset/Installable.pm similarity index 95% rename from lib/WebGUI/AssetAspect/Installable.pm rename to lib/WebGUI/Role/Asset/Installable.pm index e51b08f77..b0d780af1 100644 --- a/lib/WebGUI/AssetAspect/Installable.pm +++ b/lib/WebGUI/Role/Asset/Installable.pm @@ -1,19 +1,18 @@ -package WebGUI::AssetAspect::Installable; +package WebGUI::Role::Asset::Installable; use strict; -use Class::C3; +use Moose::Role; use WebGUI::Asset; use WebGUI::Form::DynamicField; =head1 NAME -WebGUI::AssetAspect::Installable -- Make your asset installable +WebGUI::Role::Asset::Installable -- Make your asset installable =head1 SYNOPSIS - package WebGUI::Asset::MyAsset; - use base ( 'WebGUI::AssetAspect::Installable', 'WebGUI::Asset' ); + with 'WebGUI::Role::Asset::Installable'; # Override the install method to install collateral tables sub install { @@ -120,7 +119,7 @@ sub uninstall { ### Remove all assets contained in the table my $sth = $session->db->read("SELECT assetId FROM `$installDef->{tableName}`"); while ( my ($assetId) = $sth->array ) { - my $asset = WebGUI::Asset->newByDynamicClass( $session, $assetId ); + my $asset = WebGUI::Asset->newById( $session, $assetId ); $asset->purge; } diff --git a/lib/WebGUI/Role/Asset/JSONCollateral.pm b/lib/WebGUI/Role/Asset/JSONCollateral.pm new file mode 100644 index 000000000..022962095 --- /dev/null +++ b/lib/WebGUI/Role/Asset/JSONCollateral.pm @@ -0,0 +1,294 @@ +package WebGUI::Role::Asset::JSONCollateral; + +=head1 LEGAL + + ------------------------------------------------------------------- + WebGUI is Copyright 2001-2012 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 + ------------------------------------------------------------------- + +=cut + +use strict; +use Moose::Role; + +=head1 NAME + +Package WebGUI::Role::Asset::JSONCollateral + +=head1 DESCRIPTION + +This is an aspect which allows you to use JSON in the database transparently. + +=head1 SYNOPSIS + + with 'WebGUI::Role::Asset::JSONCollateral'; + + $self->setJSONCollateral(); + $self->getJSONCollateral(); + $self->moveJSONCollateralUp(); + $self->moveJSONCollateralDown(); + +Classes that use this Aspect must have an update method that transparently serializes and deserializes data +to and from JSON into perl data structures. See WebGUI::Crud->update, and Asset->update for examples. + +=head1 METHODS + +These methods are available from this class: + +=cut + +#------------------------------------------------------------------- + +=head2 deleteJSONCollateral ( fieldName, keyName, keyValue ) + +Deletes a row of collateral data. Returns false if the requested collateral +was not deleted. + +=head3 fieldName + +The name of the field you wish to delete the data from. + +=head3 keyName + +The name of a key in the collateral hash. Typically a unique identifier for a given +"row" of collateral data. + +=head3 keyValue + +Along with keyName, determines which "row" of collateral data to delete. + +=cut + +sub deleteJSONCollateral { + my $self = shift; + my $fieldName = shift; + my $keyName = shift; + my $keyValue = shift; + my $field = $self->get($fieldName); + my $index = $self->getJSONCollateralDataIndex($field, $keyName, $keyValue); + return if $index == -1; + splice @{ $field }, $index, 1; + $self->update({ $fieldName => $field }); + return 1; +} + +#------------------------------------------------------------------- + +=head2 getJSONCollateral ( fieldName, keyName, keyValue ) + +Returns a hash reference containing one row of collateral data from a particular +field. + +=head3 fieldName + +The name of the field you wish to retrieve the data from. + +=head3 keyName + +The name of a key in the collateral hash. Typically a unique identifier for a given +"row" of collateral data. + +=head3 keyValue + +Along with keyName, determines which "row" of collateral data to get. +If this is equal to "new", then an empty hashRef will be returned to avoid +strict errors in the caller. If the requested data does not exist in the +collateral array, it also returns an empty hashRef. + +=cut + +sub getJSONCollateral { + my $self = shift; + my $fieldName = shift; + my $keyName = shift; + my $keyValue = shift; + if ($keyValue eq "new" || $keyValue eq "") { + return {} + } + my $field = $self->get($fieldName); + my $index = $self->getJSONCollateralDataIndex($field, $keyName, $keyValue); + return {} if $index == -1; + my %copy = %{ $field->[$index] }; + return \%copy; +} + + +#------------------------------------------------------------------- + +=head2 getJSONCollateralDataIndex ( field, keyName, keyValue ) + +Returns the index in a set of collateral where an element of the +data (keyName) has a certain value (keyValue). If the criteria +are not found, returns -1. + +=head3 field + +The collateral data to search + +=head3 keyName + +The name of a key in the collateral hash. + +=head3 keyValue + +The value that keyName should have to meet the criteria. + +=cut + +sub getJSONCollateralDataIndex { + my $self = shift; + my $field = shift; + my $keyName = shift; + my $keyValue = shift; + for (my $index=0; $index <= $#{ $field }; $index++) { + return $index + if (exists($field->[$index]->{$keyName}) && ($field->[$index]->{$keyName} eq $keyValue )); + } + return -1; +} + +#------------------------------------------------------------------- + +=head2 moveJSONCollateralDown ( fieldName, keyName, keyValue ) + +Moves a collateral data item down one position, toward the end of the array where the +indices are the highest, swapping the referenced piece of collateral (index) with the collateral +just above it (index+1). For the list of collateral 1,2,3, if called on 2 the resultig +list will be 1,3,2. If called on the last element of the collateral array then it does nothing. + +Returns 1 if the move is successful. Returns undef or the empty array otherwise. + +=head3 fieldName + +A string indicating the field that contains the collateral data. + +=head3 keyName + +The name of a key in the collateral hash. Typically a unique identifier for a given +"row" of collateral data. + +=head3 keyValue + +Along with keyName, determines which "row" of collateral data to move. + +=cut + +sub moveJSONCollateralDown { + my $self = shift; + my $fieldName = shift; + my $keyName = shift; + my $keyValue = shift; + + my $field = $self->get($fieldName); + my $index = $self->getJSONCollateralDataIndex($field, $keyName, $keyValue); + return if $index == -1; + return unless (abs($index) < $#{$field}); + @{ $field }[$index,$index+1] = @{ $field }[$index+1,$index]; + $self->update({ $fieldName => $field }); + return 1; +} + +#------------------------------------------------------------------- + +=head2 moveJSONCollateralUp ( fieldName, keyName, keyValue ) + +Moves a collateral data item "up" one position, toward the end of the array where the +indices are the lowest, swapping the referenced piece of collateral (index) with the collateral +just below it (index-1). For the list of collateral 1,2,3, if called on 2 the resultig +list will be 2,1,3. If called on the first element of the collateral array then it does nothing. + +Returns 1 if the move is successful. Returns undef or the empty array otherwise. + +=head3 fieldName + +A string indicating the field that contains the collateral data. + +=head3 keyName + +The name of a key in the collateral hash. Typically a unique identifier for a given +"row" of collateral data. + +=head3 keyValue + +Along with keyName, determines which "row" of collateral data to move. + +=cut + +sub moveJSONCollateralUp { + my $self = shift; + my $fieldName = shift; + my $keyName = shift; + my $keyValue = shift; + + my $field = $self->get($fieldName); + my $index = $self->getJSONCollateralDataIndex($field, $keyName, $keyValue); + return unless $index > 0; #-1 means that it could not be found, and we cannot move index 0 + @{ $field }[$index-1,$index] = @{ $field }[$index,$index-1]; + $self->update({ $fieldName => $field }); + return 1; +} + +#----------------------------------------------------------------- + +=head2 setJSONCollateral ( fieldName, keyName, keyValue, properties ) + +Performs and insert/update of collateral data for any wobject's collateral data. +Returns the id of the data that was set, even if a new row was added to the +data. + +=head3 fieldName + +The name of the field to insert the data. + +=head3 keyName + +The name of a key in the collateral hash. Typically a unique identifier for a given +"row" of collateral data. + +=head3 keyValue + +Along with keyName, determines which "row" of collateral data to set. +The index of the collateral data to set. If the keyValue = "new", then a +new entry will be appended to the end of the collateral array. Otherwise, +the appropriate entry will be overwritten with the new data. + +=head3 properties + +A hash reference containing the name/value pairs to be inserted into the collateral, using +the criteria mentioned above. + +=cut + +sub setJSONCollateral { + my $self = shift; + my $fieldName = shift; + my $keyName = shift; + my $keyValue = shift; + my $properties = shift; + ##Note, since this returns a reference, it is actually updating + ##the object cache directly. + my $field = $self->get($fieldName); + if ($keyValue eq 'new' || $keyValue eq '') { + if ( ! exists $properties->{$keyName} + or ! $self->session->id->valid($properties->{$keyName})) { + $properties->{$keyName} = $self->session->id->generate; + } + push @{ $field }, $properties; + $self->update({$fieldName => $field}); + return $properties->{$keyName}; + } + my $index = $self->getJSONCollateralDataIndex($field, $keyName, $keyValue); + return if $index == -1; + $field->[$index] = $properties; + $self->update({ $fieldName => $field }); + return $keyValue; +} + + +1; diff --git a/lib/WebGUI/AssetAspect/RssFeed.pm b/lib/WebGUI/Role/Asset/RssFeed.pm similarity index 70% rename from lib/WebGUI/AssetAspect/RssFeed.pm rename to lib/WebGUI/Role/Asset/RssFeed.pm index 1b39921a9..deb9ece04 100644 --- a/lib/WebGUI/AssetAspect/RssFeed.pm +++ b/lib/WebGUI/Role/Asset/RssFeed.pm @@ -1,9 +1,9 @@ -package WebGUI::AssetAspect::RssFeed; +package WebGUI::Role::Asset::RssFeed; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -14,8 +14,90 @@ package WebGUI::AssetAspect::RssFeed; =cut -use strict; -use Class::C3; +use Moose::Role; +use WebGUI::Definition::Asset; +use Tie::IxHash; + +define tableName => 'assetAspectRssFeed'; +property itemsPerFeed => ( + noFormPost => 0, + fieldType => "integer", + default => 25, + tab => "rss", + label => [ 'itemsPerFeed', 'Role_RssFeed' ], + hoverHelp => [ 'itemsPerFeed hoverHelp', 'Role_RssFeed' ] +); +property feedCopyright => ( + noFormPost => 0, + fieldType => "text", + default => "", + tab => "rss", + label => [ 'feedCopyright', 'Role_RssFeed' ], + hoverHelp => [ 'feedCopyright hoverHelp', 'Role_RssFeed' ] +); +property feedTitle => ( + noFormPost => 0, + fieldType => "text", + default => "", + tab => "rss", + label => [ 'feedTitle', 'Role_RssFeed' ], + hoverHelp => [ 'feedTitle hoverHelp', 'Role_RssFeed' ] +); +property feedDescription => ( + noFormPost => 0, + fieldType => "textarea", + default => "", + tab => "rss", + label => [ 'feedDescription', 'Role_RssFeed' ], + hoverHelp => [ 'feedDescription hoverHelp', 'Role_RssFeed' ] +); +property feedImage => ( + noFormPost => 0, + fieldType => "image", + tab => "rss", + label => [ 'feedImage', 'Role_RssFeed' ], + hoverHelp => [ 'feedImage hoverHelp', 'Role_RssFeed' ] +); +property feedImageLink => ( + noFormPost => 0, + fieldType => "url", + default => "", + tab => "rss", + label => [ 'feedImageLink', 'Role_RssFeed' ], + hoverHelp => [ 'feedImageLink hoverHelp', 'Role_RssFeed' ] +); +property feedImageDescription => ( + noFormPost => 0, + fieldType => "text", + default => "", + tab => "rss", + label => [ 'feedImageDescription', 'Role_RssFeed' ], + hoverHelp => [ 'feedImageDescription hoverHelp', 'Role_RssFeed' ] +); +property feedHeaderLinks => ( + fieldType => "checkList", + value => "rss\natom", + default => undef, + tab => "rss", + options => \&_feedHeaderLinks_options, + label => [ 'feedHeaderLinks', 'Role_RssFeed' ], + hoverHelp => [ 'feedHeaderLinks hoverHelp', 'Role_RssFeed' ] +); +sub _feedHeaderLinks_options { + my $session = shift->session; + my $i18n = WebGUI::International->new($session,'Role_RssFeed'); + my %headerLinksOptions; + tie %headerLinksOptions, 'Tie::IxHash'; + %headerLinksOptions = ( + rss => $i18n->get('rssLinkOption'), + atom => $i18n->get('atomLinkOption'), + rdf => $i18n->get('rdfLinkOption'), + ); + return \%headerLinksOptions; +} + +requires 'getRssFeedItems'; + use WebGUI::Exception; use WebGUI::Storage; use XML::FeedPP; @@ -23,7 +105,7 @@ use Path::Class::File; =head1 NAME -Package WebGUI::AssetAspect::RssFeed +Package WebGUI::Role::Asset::RssFeed =head1 DESCRIPTION @@ -31,10 +113,7 @@ This is an aspect which exposes an asset's items as an RSS or Atom feed. =head1 SYNOPSIS - use Class::C3; - use base qw(WebGUI::AssetAspect::RssFeed WebGUI::Asset); - -And then wherever you would call $self->SUPER::someMethodName call $self->next::method instead. + with 'WebGUI::Role::Asset::RssFeed'; =head1 METHODS @@ -42,106 +121,23 @@ These methods are available from this class: =cut -#------------------------------------------------------------------- +#---------------------------------------------------------------------------- -=head2 definition +=head2 addEditSaveTabs ( form ) -Extends the definition to add the RSS fields. +Add the tab for the RSS feed configuration data. =cut -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift; - my $i18n = WebGUI::International->new($session,'AssetAspect_RssFeed'); - my %properties; - tie %properties, 'Tie::IxHash'; - %properties = ( - itemsPerFeed => { - noFormPost => 0, - fieldType => "integer", - defaultValue => 25, - tab => "rss", - label => $i18n->get('itemsPerFeed'), - hoverHelp => $i18n->get('itemsPerFeed hoverHelp') - }, - feedCopyright => { - noFormPost => 0, - fieldType => "text", - defaultValue => "", - tab => "rss", - label => $i18n->get('feedCopyright'), - hoverHelp => $i18n->get('feedCopyright hoverHelp') - }, - feedTitle => { - noFormPost => 0, - fieldType => "text", - defaultValue => "", - tab => "rss", - label => $i18n->get('feedTitle'), - hoverHelp => $i18n->get('feedTitle hoverHelp') - }, - feedDescription => { - noFormPost => 0, - fieldType => "textarea", - defaultValue => "", - tab => "rss", - label => $i18n->get('feedDescription'), - hoverHelp => $i18n->get('feedDescription hoverHelp') - }, - feedImage => { - noFormPost => 0, - fieldType => "image", - tab => "rss", - label => $i18n->get('feedImage'), - hoverHelp => $i18n->get('feedImage hoverHelp') - }, - feedImageLink => { - noFormPost => 0, - fieldType => "url", - defaultValue => "", - tab => "rss", - label => $i18n->get('feedImageLink'), - hoverHelp => $i18n->get('feedImageLink hoverHelp') - }, - feedImageDescription => { - noFormPost => 0, - fieldType => "text", - defaultValue => "", - tab => "rss", - label => $i18n->get('feedImageDescription'), - hoverHelp => $i18n->get('feedImageDescription hoverHelp') - }, - feedHeaderLinks => { - fieldType => "checkList", - allowEmpty => 1, - defaultValue => "rss\natom", - tab => "rss", - options => do { - my %headerLinksOptions; - tie %headerLinksOptions, 'Tie::IxHash'; - %headerLinksOptions = ( - rss => $i18n->get('rssLinkOption'), - atom => $i18n->get('atomLinkOption'), - rdf => $i18n->get('rdfLinkOption'), - ); - \%headerLinksOptions; - }, - label => $i18n->get('feedHeaderLinks'), - hoverHelp => $i18n->get('feedHeaderLinks hoverHelp') - }, - ); - push(@{$definition}, { - autoGenerateForms => 1, - tableName => 'assetAspectRssFeed', - className => 'WebGUI::AssetAspect::RssFeed', - properties => \%properties - }); - return $class->next::method($session, $definition); -} +override addEditSaveTabs => sub { + my ( $self, $form ) = @_; + $form = super(); + my $i18n = WebGUI::International->new($self->session, 'Role_RssFeed'); + $form->addTab( name => "rss", label => $i18n->get("RSS tab") ); + return $form; +}; -#------------------------------------------------------------------- + #------------------------------------------------------------------- =head2 dispatch ( ) @@ -149,8 +145,8 @@ Extent the base method in Asset.pm to handle RSS feeds. =cut -sub dispatch { - my ( $self, $fragment ) = @_; +around dispatch => sub { + my ( $orig, $self, $fragment ) = @_; if ($fragment eq '.rss') { return $self->www_viewRss; } @@ -160,8 +156,8 @@ sub dispatch { elsif ($fragment eq '.rdf') { return $self->www_viewRdf; } - return $self->next::method($fragment); -} + return $self->$orig($fragment); +}; #------------------------------------------------------------------- @@ -176,8 +172,8 @@ sub _httpBasicLogin { $self->session->request->headers_out->set( 'WWW-Authenticate' => 'Basic realm="'.$self->session->setting->get('companyName').'"' ); - $self->session->http->setStatus(401,'Unauthorized'); - $self->session->http->sendHeader; + $self->session->response->status(401); + $self->session->response->sendHeader; return ''; } @@ -207,9 +203,10 @@ The session doing the full export. Can be used to report status messages. =cut -sub exportAssetCollateral { +around exportAssetCollateral => sub { # Lots of copy/paste here from AssetExportHtml.pm, since none of the methods there were # directly useful without ginormous refactoring. + my $orig = shift; my $self = shift; my $basepath = shift; my $args = shift; @@ -251,16 +248,10 @@ sub exportAssetCollateral { $reportSession->output->print( '      ' . $message . '
    '); } - my $exportSession = WebGUI::Session->open( - $self->session->config->getWebguiRoot, - $self->session->config->getFilename, - undef, - undef, - $self->session->getId, - ); + my $exportSession = $self->session->duplicate; # open another session as the user doing the exporting... - my $selfdupe = WebGUI::Asset->newByDynamicClass( $exportSession, $self->getId ); + my $selfdupe = WebGUI::Asset->newById( $exportSession, $self->assetId, $self->revisionDate ); # next, get the contents, open the file, and write the contents to the file. my $fh = eval { $dest->open('>:utf8') }; @@ -290,14 +281,14 @@ sub exportAssetCollateral { $reportSession->output->print($reporti18n->get('done')); } } - return $self->next::method($basepath, $args, $reportSession); -} + return $self->$orig($basepath, $args, $reportSession); +}; #------------------------------------------------------------------- =head2 getRssFeedItems () -This method needs to be overridden by any class that is using it. To ensure +This method needs to be implemented by any class that is using it. To ensure this, it will throw an exception. It returns an array reference of hash references. The list below shows @@ -329,10 +320,6 @@ This is optional. A unique descriptor for this item. =cut -sub getRssFeedItems { - WebGUI::Error::OverrideMe->throw(); -} - #------------------------------------------------------------------- =head2 _getFeedUrl ($extension) @@ -372,9 +359,9 @@ The kind of feed that is requested. Valid extensions are "rss", "atom" or "rdf" sub _getStaticFeedUrl { my $self = shift; my $extension = shift; - my $url = $self->get("url") . '.' . $extension; + my $url = $self->url . '.' . $extension; $url = $self->session->url->gateway($url); - if ($self->get("encryptPage")) { + if ($self->encryptPage) { $url = $self->session->url->getSiteURL . $url; $url =~ s/^http:/https:/; } @@ -502,21 +489,21 @@ sub getFeed { } $new_item->guid( $new_item->guid, isPermaLink => 0 ) if $set_permalink_false; } - $feed->title( $self->get('feedTitle') || $self->get('title') ); - $feed->description( $self->get('feedDescription') || $self->get('synopsis') ); + $feed->title( $self->feedTitle || $self->title ); + $feed->description( $self->feedDescription || $self->synopsis ); $feed->pubDate( $self->getContentLastModified ); - $feed->copyright( $self->get('feedCopyright') ); + $feed->copyright( $self->feedCopyright ); $feed->link( $self->session->url->getSiteURL . $self->getUrl ); # $feed->language( $lang ); - if ($self->get('feedImage')) { - my $storage = WebGUI::Storage->get($self->session, $self->get('feedImage')); + if ($self->feedImage) { + my $storage = WebGUI::Storage->get($self->session, $self->feedImage); my @files = @{ $storage->getFiles }; if (scalar @files) { $feed->image( $storage->getUrl( $files[0] ), - $self->get('feedImageDescription') || $self->getTitle, - $self->get('feedImageUrl') || $self->getUrl, - $self->get('feedImageDescription') || $self->getTitle, + $self->feedImageDescription || $self->getTitle, + $self->feedImageUrl || $self->getUrl, + $self->feedImageDescription || $self->getTitle, ( $storage->getSizeInPixels( $files[0] ) ) # expands to width and height ); } @@ -532,11 +519,12 @@ Extend the master class to insert head links via addHeaderLinks. =cut -sub prepareView { +around prepareView => sub { + my $orig = shift; my $self = shift; $self->addHeaderLinks; - return $self->next::method(@_); -} + return $self->$orig; +}; #------------------------------------------------------------------- @@ -550,8 +538,8 @@ on how the Asset has configured feedHeaderLinks. sub addHeaderLinks { my $self = shift; my $style = $self->session->style; - my $title = $self->get('feedTitle') || $self->get("title"); - my %feeds = map { $_ => 1 } split /\n/, $self->get('feedHeaderLinks'); + my $title = $self->feedTitle || $self->title; + my %feeds = map { $_ => 1 } split /\n/, $self->feedHeaderLinks; my $addType = keys %feeds > 1; if ($feeds{rss}) { $style->setLink($self->getRssFeedUrl, { @@ -587,7 +575,7 @@ Return Atom view of the syndicated items. sub www_viewAtom { my $self = shift; return $self->_httpBasicLogin unless $self->canView; - $self->session->http->setMimeType('application/atom+xml'); + $self->session->response->content_type('application/atom+xml'); return $self->getFeed( XML::FeedPP::Atom->new )->to_string; } @@ -602,7 +590,7 @@ Return Rdf view of the syndicated items. sub www_viewRdf { my $self = shift; return $self->_httpBasicLogin unless $self->canView; - $self->session->http->setMimeType('application/rdf+xml'); + $self->session->response->content_type('application/rdf+xml'); return $self->getFeed( XML::FeedPP::RDF->new )->to_string; } @@ -617,23 +605,8 @@ Return RSS view of the syndicated items. sub www_viewRss { my $self = shift; return $self->_httpBasicLogin unless $self->canView; - $self->session->http->setMimeType('application/rss+xml'); + $self->session->response->content_type('application/rss+xml'); return $self->getFeed( XML::FeedPP::RSS->new )->to_string; } -#------------------------------------------------------------------- - -=head2 getEditTabs () - -Adds an RSS tab to the Edit Tabs. - -=cut - -sub getEditTabs { - my $self = shift; - my $i18n = WebGUI::International->new($self->session,'AssetAspect_RssFeed'); - return ($self->next::method, ['rss', $i18n->get('RSS tab'), 1]); -} - 1; - diff --git a/lib/WebGUI/Role/Asset/SetStoragePermissions.pm b/lib/WebGUI/Role/Asset/SetStoragePermissions.pm new file mode 100644 index 000000000..63a666e57 --- /dev/null +++ b/lib/WebGUI/Role/Asset/SetStoragePermissions.pm @@ -0,0 +1,63 @@ +package WebGUI::Role::Asset::SetStoragePermissions; + +=head1 LEGAL + + ------------------------------------------------------------------- + WebGUI is Copyright 2001-2012 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 + ------------------------------------------------------------------- + +=cut + +=head1 NAME + +Package WebGUI::Role::Asset::SetStoragePermissions + +=head1 DESCRIPTION + +Provide methods for the triggers on ownerUserId, groupIdEdit and groupIdView that update +the file permissions on storage locations for an Asset. Consumers of SetStoragePermissions +must have a getStorageLocation method, so that it can find the storage location. + +=head1 SYNOPSIS + +with WebGUI::Role::Asset::SetStoragePermissions; + +=cut + +use Moose::Role; + +requires qw/getStorageLocation/; + +sub _set_ownerUserId { + my ($self, $new, $old) = @_; + return unless $old; + if ($new ne $old) { + $self->getStorageLocation->setPrivileges($self->ownerUserId, $self->groupIdView, $self->groupIdEdit); + } +} + +sub _set_groupIdView { + my ($self, $new, $old) = @_; + return unless $old; + if ($new ne $old) { + $self->getStorageLocation->setPrivileges($self->ownerUserId, $self->groupIdView, $self->groupIdEdit); + } +} + +sub _set_groupIdEdit { + my ($self, $new, $old) = @_; + return unless $old; + if ($new ne $old) { + $self->getStorageLocation->setPrivileges($self->ownerUserId, $self->groupIdView, $self->groupIdEdit); + } +} + + + +1; diff --git a/lib/WebGUI/AssetAspect/Subscribable.pm b/lib/WebGUI/Role/Asset/Subscribable.pm similarity index 85% rename from lib/WebGUI/AssetAspect/Subscribable.pm rename to lib/WebGUI/Role/Asset/Subscribable.pm index 909f5940d..bb542d461 100644 --- a/lib/WebGUI/AssetAspect/Subscribable.pm +++ b/lib/WebGUI/Role/Asset/Subscribable.pm @@ -1,13 +1,51 @@ -package WebGUI::AssetAspect::Subscribable; +package WebGUI::Role::Asset::Subscribable; + +=head1 LEGAL + + ------------------------------------------------------------------- + WebGUI is Copyright 2001-2012 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 + ------------------------------------------------------------------- + +=cut use strict; -use Class::C3; -use WebGUI::Mail::Send; + +use Moose::Role; +use WebGUI::Definition::Asset; +define tableName => "assetAspect_Subscribable"; +property subscriptionGroupId => ( + tab => "security", + fieldType => "subscriptionGroup", + label => ["Subscription Group", 'Role_Subscribable'], + hoverHelp => ["Subscription Group help", 'Role_Subscribable'], + default => undef, + noFormPost => 1, + ); +property subscriptionTemplateId => ( + tab => "display", + fieldType => "template", + namespace => \&_subscriptionTemplateId_namespace, + label => ["Email Template", 'Role_Subscribable'], + hoverHelp => ["Email Template help", 'Role_Subscribable'], + default => 'limMkk80fMB3fqNZVf162w', + ); +sub _subscriptionTemplateId_namespace { + my $self = shift; + return $self->getSubscriptionTemplateNamespace($self->session); +} + use WebGUI::International; +use WebGUI::Mail::Send; =head1 NAME -WebGUI::AssetAspect::Subscribable - Let users subscribe to your asset +WebGUI::Role::Asset::Subscribable - Let users subscribe to your asset =head1 SYNOPSIS @@ -19,60 +57,20 @@ WebGUI::AssetAspect::Subscribable - Let users subscribe to your asset #---------------------------------------------------------------------------- -=head2 definition ( session [, definition ] ) - -=cut - -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift; - my $i18n = WebGUI::International->new($session, 'AssetAspect_Subscribable'); - - tie my %properties, 'Tie::IxHash', ( - subscriptionGroupId => { - tab => "security", - fieldType => "subscriptionGroup", - label => $i18n->get("Subscription Group"), - hoverHelp => $i18n->get("Subscription Group help"), - defaultValue => undef, - noFormPost => 1, - }, - subscriptionTemplateId => { - tab => "display", - fieldType => "template", - namespace => $class->getSubscriptionTemplateNamespace, - label => $i18n->get("Email Template"), - hoverHelp => $i18n->get("Email Template help"), - defaultValue => 'limMkk80fMB3fqNZVf162w', - }, - ); - - push @{ $definition }, { - autoGenerateForms => 1, - tableName => "assetAspect_Subscribable", - properties => \%properties, - }; - - return $class->maybe::next::method( $session, $definition ); -} - -#---------------------------------------------------------------------------- - =head2 duplicate ( [ options ] ) Subclass the method to create a new group for subscribers for the new asset. =cut -sub duplicate { +override duplicate => sub { my $self = shift; my $properties = shift; - my $newSelf = $self->next::method( $properties ); + my $newSelf = super(); $newSelf->update({ subscriptionGroupId => '' }); $newSelf->createSubscriptionGroup; return $newSelf; -} +}; #---------------------------------------------------------------------------- @@ -83,14 +81,15 @@ not a notification was sent for the previous revision. =cut -sub addRevision { +around addRevision => sub { + my $orig = shift; my $self = shift; my $properties = shift || {}; $properties->{ skipNotification } = 0; - return $self->maybe::next::method( $properties, @_ ); -} + return $self->$orig( $properties, @_ ); +}; #---------------------------------------------------------------------------- @@ -122,14 +121,14 @@ want to be able to subscribe to children) =cut -sub commit { +override commit => sub { my ( $self, @args ) = @_; - $self->maybe::next::method( @args ); + super(); if ( !$self->shouldSkipNotification ) { $self->notifySubscribers; } return; -} +}; #---------------------------------------------------------------------------- @@ -142,7 +141,7 @@ Create a group to hold subscribers to this asset, if there is not one already. sub createSubscriptionGroup { my $self = shift; - if ( my $groupId = $self->get('subscriptionGroupId') ) { + if ( my $groupId = $self->subscriptionGroupId ) { return WebGUI::Group->new( $self->session, $groupId ); } else { @@ -216,7 +215,7 @@ Gets the WebGUI::Group for the subscribers group. sub getSubscriptionGroup { my $self = shift; - my $groupId = $self->get( "subscriptionGroupId" ); + my $groupId = $self->subscriptionGroupId; my $group = $groupId ? WebGUI::Group->new( $self->session, $groupId ) : $self->createSubscriptionGroup; return $group; } @@ -231,8 +230,8 @@ Get a WebGUI::Asset::Template object for the subscription template. sub getSubscriptionTemplate { my $self = shift; - my $templateId = $self->get( "subscriptionTemplateId" ); - my $template = WebGUI::Asset::Template->new( $self->session, $templateId ); # This should throw if we don't + my $templateId = $self->subscriptionTemplateId; + my $template = WebGUI::Asset::Template->newById( $self->session, $templateId ); # This should throw if we don't return $template; } @@ -347,8 +346,8 @@ sub notifySubscribers { WebGUI::Macro::process( $self->session, \$opt->{content} ); if ( !$opt->{ from } ) { - my $owner = WebGUI::User->new( $self->session, $self->get( "ownerUserId" ) ); - $opt->{ from } = $owner->profileField( "email" ) || $opt->{ listAddress } || $companyEmail; + my $owner = WebGUI::User->new( $self->session, $self->ownerUserId ); + $opt->{ from } = $owner->get( "email" ) || $opt->{ listAddress } || $companyEmail; } if ( !$opt->{ replyTo } ) { @@ -426,16 +425,15 @@ Subclass the method to remove the subscription group. =cut -sub purge { +around purge => sub { + my $orig = shift; my $self = shift; my $options = shift; my $group = $self->getSubscriptionGroup(); $group->delete if $group; - my $success = $self->next::method($options); - - return $success; -} + return $self->$orig($options, @_); +}; #---------------------------------------------------------------------------- @@ -445,10 +443,10 @@ Returns true if the asset should skip notifications. =cut -sub shouldSkipNotification { +override shouldSkipNotification => sub { my $self = shift; - return $self->get( "skipNotification" ) ? 1 : 0; -} + return $self->skipNotification ? 1 : 0; +}; #---------------------------------------------------------------------------- diff --git a/lib/WebGUI/SQL.pm b/lib/WebGUI/SQL.pm index b5379aad4..5809de4f2 100644 --- a/lib/WebGUI/SQL.pm +++ b/lib/WebGUI/SQL.pm @@ -3,7 +3,7 @@ package WebGUI::SQL; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -15,12 +15,14 @@ package WebGUI::SQL; =cut use strict; -use Scalar::Util qw( weaken ); -use DBI; -use Tie::IxHash; -use WebGUI::SQL::ResultSet; -use WebGUI::Utility; -use Text::CSV_XS; +use DBI (); +use Tie::IxHash (); +use Text::CSV_XS (); +use WebGUI::SQL::ResultSet (); +use WebGUI::Exception; +use WebGUI::GUID; +use Try::Tiny; +use namespace::clean; =head1 NAME @@ -34,7 +36,7 @@ Package for interfacing with SQL databases. This package implements Perl DBI fun use WebGUI::SQL; - $db = WebGUI::SQL->connect($session,$dsn, $user, $pass); + $db = WebGUI::SQL->connect($dsn, $user, $pass); $db->disconnect; $sth = $db->prepare($sql); @@ -68,6 +70,82 @@ These methods are available from this package: =cut +our @ISA = qw(DBI); + +#------------------------------------------------------------------- + +=head2 connect ( dsn, user, pass ) + +Constructor. Connects to the database using DBI. + +=head2 dsn + +The Database Service Name of the database you wish to connect to. It looks like 'DBI:mysql:dbname;host=localhost'. + +=head2 user + +The username to use to connect to the database defined by dsn. + +=head2 pass + +The password to use to connect to the database defined by dsn. + +=cut + +sub connect { + my $class = shift; + my $dsn; + my $user; + my $pass; + if (ref $_[0] && $_[0]->isa('WebGUI::Config')) { + my $config = shift; + $dsn = $config->get('dsn'); + $user = $config->get('dbuser'); + $pass = $config->get('dbpass'); + } + else { + $dsn = shift; + $user = shift; + $pass = shift; + } + my $params = shift; + + if (! $params) { + $params = {}; + } + if (ref $params) { + $params = { %$params }; + } + else { + my @params = map { split /=/, $_, 2 } split /\n/, $params; + for (@params) { + s/\s+$//; + s/^\s+//; + } + $params = { @params }; + } + $params->{RaiseError} = 0; + $params->{PrintError} = 0; + $params->{AutoCommit} = 1; + $params->{ShowErrorStatement} = 1; + $params->{HandleError} = sub { + WebGUI::Error::Database->throw(shift); + }; + if ( ($class->parse_dsn($dsn))[1] eq 'mysql' ) { + $params->{mysql_enable_utf8} = 1; + } + + my $dbh = $class->SUPER::connect($dsn, $user, $pass, $params); + unless (defined $dbh) { + die "Couldn't connect to database: $dsn : $DBI::errstr"; + } + return $dbh; +} + + +package WebGUI::SQL::db; +use Try::Tiny; +our @ISA = qw(DBI::db); #------------------------------------------------------------------- @@ -78,8 +156,8 @@ Starts a transaction sequence. To be used with commit and rollback. Any writes a =cut sub beginTransaction { - my $self = shift; - $self->dbh->begin_work; + my $self = shift; + $self->begin_work; } @@ -105,7 +183,6 @@ sub buildArray { return @{ $arrayRef }; } - #------------------------------------------------------------------- =head2 buildArrayRef ( sql, params ) @@ -123,16 +200,15 @@ An array reference containing values for any placeholder params used in the SQL =cut sub buildArrayRef { - my $self = shift; - my $sql = shift; - my $params = shift; - my $sth = $self->prepare($sql); - $sth->execute($params); - my @array; - while (my $data = $sth->arrayRef) { - push @array, $data->[0]; + my $self = shift; + my $sql = shift; + my $params = shift; + my $array = $self->selectall_arrayref($sql, { Slice => [0] }, @$params); + for (@$array) { + $_ = $_->[0]; } - return \@array; + + return $array; } @@ -163,7 +239,7 @@ straight hash that is faster but does not maintain order. =cut sub buildHash { - my $self = shift; + my $self = shift; my $hashRef = $self->buildHashRef(@_); return %{ $hashRef }; } @@ -196,25 +272,20 @@ straight hash that is faster but does not maintain order. =cut sub buildHashRef { - my $self = shift; - my $sql = shift; - my $params = shift; + my $self = shift; + my $sql = shift; + my $params = shift; my $options = shift || {}; my %hash; unless ($options->{noOrder}) { - tie %hash, "Tie::IxHash"; - } - $self->session->log->query($sql, $params); - my $dbh = $self->dbh; - my $results = $dbh->selectall_arrayref($sql, {}, @$params); - if ($dbh->err) { - $self->session->log->fatal("Couldn't execute prepared statement: $sql : With place holders: ".join(", ", @{$params}).". Root cause: ". $dbh->errstr); + tie %hash, 'Tie::IxHash'; } + my $results = $self->selectall_arrayref($sql, {}, @$params); my $width = @{$results} && @{$results->[0]}; %hash - = $width == 2 ? map { @{ $_ } } @{ $results } + = $width == 2 ? map { @$_ } @{ $results } # for single column, use it for both key and value - : $width == 1 ? map { $_->[0], $_->[0] } @{ $results } + : $width == 1 ? map { ($_->[0]) x 2 } @{ $results } : $width == 0 ? () : map { # for more than 2 columns, use all but last joined with colons for key @@ -248,13 +319,8 @@ sub buildArrayRefOfHashRefs { my $self = shift; my $sql = shift; my $params = shift; - my @array; - my $sth = $self->read($sql, $params); - while (my $data = $sth->hashRef) { - push @array, $data; - } - $sth->finish; - return \@array; + my $array = $self->selectall_arrayref($sql, { Slice => {} }, @$params); + return $array; } @@ -284,18 +350,21 @@ sub buildDataTableStructure { my $self = shift; my $sql = shift; my $params = shift; - my %hash; - my @array; + ##Note, I need a valid statement handle for doing the rows method on. - my $sth = $self->read($sql,$params); - while (my $data = $sth->hashRef) { - push(@array,$data); - } - $hash{records} = \@array; - $hash{totalRecords} = $self->quickScalar('select found_rows()') + 0; ##Convert to numeric - $hash{recordsReturned} = $sth->rows()+0; - $sth->finish; - return %hash; + my $sth = $self->prepare($sql); + $sth->execute(@$params); + my $array = $sth->fetchall_arrayref( {} ); + + my %hash = ( + records => $array, + totalRecords => $self->selectrow_array('SELECT found_rows()') + 0, ##Convert to numeric + recordsReturned => $sth->rows + 0, + ); + + $sth->finish; + + return %hash; } #------------------------------------------------------------------- @@ -321,21 +390,21 @@ Which column of the result set to use as the key when creating the hashref. =cut sub buildHashRefOfHashRefs { - my $self = shift; - my $sql = shift; - my $params = shift; - my $key = shift; - my $sth = $self->read($sql, $params); - my %hash; - tie %hash, "Tie::IxHash"; - while (my $data = $sth->hashRef) { - $hash{$data->{$key}} = $data; - } - $sth->finish; - return \%hash; + my $self = shift; + my $sql = shift; + my $params = shift; + my $key = shift; + + my $sth = $self->prepare($sql); + $sth->execute(@$params); + tie my %hash, 'Tie::IxHash'; + while (my $data = $sth->fetchrow_hashref) { + $hash{$data->{$key}} = $data; + } + $sth->finish; + return \%hash; } - #------------------------------------------------------------------- =head2 buildSearchQuery ( $sql, $placeholders, $keywords, $columns ) @@ -366,7 +435,7 @@ An arrayref of column names that should be searched for $keywords. sub buildSearchQuery { my ($self, $sql, $placeHolders, $keywords, $columns) = @_; - if ($$sql =~ m/where/) { + if ($$sql =~ m/where/i) { $$sql .= ' and ('; } else { @@ -385,74 +454,6 @@ sub buildSearchQuery { #------------------------------------------------------------------- -=head2 commit ( ) - -Ends a transaction sequence. To be used with beginTransaction. Applies all of the writes since beginTransaction to the database. - -=cut - -sub commit { - my $self = shift; - $self->dbh->commit; -} - - -#------------------------------------------------------------------- - -=head2 connect ( session, dsn, user, pass ) - -Constructor. Connects to the database using DBI. - -=head2 session - -A reference to the active WebGUI::Session object. - -=head2 dsn - -The Database Service Name of the database you wish to connect to. It looks like 'DBI:mysql:dbname;host=localhost'. - -=head2 user - -The username to use to connect to the database defined by dsn. - -=head2 pass - -The password to use to connect to the database defined by dsn. - -=cut - -sub connect { - my $class = shift; - my $session = shift; - my $dsn = shift; - my $user = shift; - my $pass = shift; - my $params = shift; - - my (undef, $driver) = DBI->parse_dsn($dsn); - my $dbh = DBI->connect($dsn,$user,$pass,{RaiseError => 0, AutoCommit => 1, - $driver eq 'mysql' ? (mysql_enable_utf8 => 1) : (), - }); - - unless (defined $dbh) { - $session->errorHandler->error("Couldn't connect to database: $dsn : $DBI::errstr"); - return undef; - } - - ##Set specific attributes for this database. - my @params = split /\s*\n\s*/, $params; - foreach my $param ( @params ) { - my ($paramName, $paramValue) = split /\s*=\s*/, $param; - $dbh->{$paramName} = $paramValue; - } - - my $self = bless {_dbh=>$dbh, _session=>$session}, $class; - weaken( $self->{_session} ); - return $self; -} - -#------------------------------------------------------------------- - =head2 dbh ( ) Returns a reference to the working DBI database handler for this WebGUI::SQL object. @@ -460,8 +461,8 @@ Returns a reference to the working DBI database handler for this WebGUI::SQL obj =cut sub dbh { - my $self = shift; - return $self->{_dbh}; + my $self = shift; + return $self; } @@ -486,43 +487,12 @@ The value to search for in the key column. =cut sub deleteRow { - my ($self, $table, $key, $keyValue) = @_; - my $sth = $self->write("delete from ".$self->dbh->quote_identifier($table)." where ".$key."=?", [$keyValue]); + my ($self, $table, $key, $keyValue) = @_; + $table = $self->quote_identifier($table); + $key = $self->quote_identifier($key); + return $self->do("DELETE FROM $table WHERE $key = ?", {}, $keyValue); } - -#------------------------------------------------------------------- - -=head2 DESTROY ( ) - -Deconstructor. - -=cut - -sub DESTROY { - my $self = shift; - $self->disconnect; - undef $self; -} - - -#------------------------------------------------------------------- - -=head2 disconnect ( ) - -Disconnects from the database. And destroys the object. - -=cut - -sub disconnect { - my $self = shift; - my $dbh = delete $self->{_dbh}; - if ($dbh) { - $dbh->disconnect; - } -} - - #------------------------------------------------------------------- =head2 errorCode ( ) @@ -532,8 +502,8 @@ Returns an error code for the current handler. =cut sub errorCode { - my $self = shift; - return $self->dbh->err; + my $self = shift; + return $self->err; } @@ -546,8 +516,8 @@ Returns a text error message for the current handler. =cut sub errorMessage { - my $self = shift; - return $self->dbh->errstr; + my $self = shift; + return $self->errstr; } @@ -555,7 +525,7 @@ sub errorMessage { =head2 getNextId ( idName ) -Increments an incrementer of the specified type and returns the value. +Increments an incrementer of the specified type and returns the value. =head3 idName @@ -564,14 +534,13 @@ Specify the name of one of the incrementers in the incrementer table. =cut sub getNextId { - my $self = shift; - my $name = shift; - my ($id); - $self->beginTransaction; - ($id) = $self->quickArray("select nextValue from incrementer where incrementerId=?", [$name]); - $self->write("update incrementer set nextValue=nextValue+1 where incrementerId=?",[$name]); - $self->commit; - return $id; + my $self = shift; + my $name = shift; + $self->begin_work; + my $id = $self->selectrow_array('SELECT nextValue FROM incrementer WHERE incrementerId = ?', {}, $name); + $self->do('UPDATE incrementer SET nextValue=nextValue+1 WHERE incrementerId=?', {}, $name); + $self->commit; + return $id; } #------------------------------------------------------------------- @@ -584,7 +553,7 @@ Returns the DBI driver used by this database link sub getDriver { my $self = shift; - return $self->{_dbh}->{Driver}->{Name}; + return $self->{Driver}->{Name}; } #------------------------------------------------------------------- @@ -608,30 +577,18 @@ The value to search for in the key column. =cut sub getRow { - my ($self, $table, $key, $keyValue) = @_; - my $row = $self->quickHashRef("select * from ".$self->dbh->quote_identifier($table)." where ".$key."=?",[$keyValue]); - return $row; + my ($self, $table, $key, $keyValue) = @_; + my $row = $self->selectrow_hashref( + sprintf('SELECT * FROM %s WHERE %s = ?', + $self->quote_identifier($table), + $self->quote_identifier($key) + ), + {}, + $keyValue, + ); + return $row; } -#------------------------------------------------------------------- - -=head2 prepare ( sql ) - -This is a wrapper for WebGUI::SQL::ResultSet->prepare() - -=head3 sql - -An SQL statement. - -=cut - -sub prepare { - my $self = shift; - my $sql = shift; - return WebGUI::SQL::ResultSet->prepare($sql, $self); -} - - #------------------------------------------------------------------- =head2 quickArray ( sql, params ) @@ -649,11 +606,11 @@ An array reference containing values for any placeholder params used in the SQL =cut sub quickArray { - my $self = shift; - my $sql = shift; - my $params = shift || []; - my $data = $self->dbh->selectrow_arrayref($sql, {}, @{ $params }) || []; - return @{ $data }; + my $self = shift; + my $sql = shift; + my $params = shift || []; + my @result = $self->selectrow_array($sql, {}, @{ $params }); + return @result; } @@ -674,29 +631,27 @@ An array reference containing values for any placeholder params used in the SQL =cut sub quickCSV { - my $self = shift; - my $sql = shift; - my $params = shift; - my ($sth, $output, @data); + my $self = shift; + my $sql = shift; + my $params = shift; my $csv = Text::CSV_XS->new({ eol => "\n", binary => 1 }); - $sth = $self->prepare($sql); - $sth->execute($params); + my $sth = $self->prepare($sql); + $sth->execute(@$params); - return undef unless $csv->combine($sth->getColumnNames); - $output = $csv->string(); + return undef unless $csv->combine($sth->getColumnNames); + my $output = $csv->string; - while (@data = $sth->array) { - if ( ! $csv->combine(@data) ) { - $self->session->log->error( "Problem creating CSV row: " . $csv->error_diag ); - return undef; - } - $output .= $csv->string(); - } + while (my @data = $sth->array) { + if ( ! $csv->combine(@data) ) { + WebGUI::Error->throw( "Problem creating CSV row: " . $csv->error_diag ); + } + $output .= $csv->string(); + } - $sth->finish; - return $output; + $sth->finish; + return $output; } @@ -717,19 +672,11 @@ An array reference containing values for any placeholder params used in the SQL =cut sub quickHash { - my $self = shift; - my $sql = shift; - my $params = shift; - my ($sth, $data); - $sth = $self->prepare($sql); - $sth->execute($params); - $data = $sth->hashRef; - $sth->finish; - if (defined $data) { - return %{$data}; - } else { - return (); - } + my $self = shift; + my $sql = shift; + my $params = shift; + my $row = $self->selectrow_hashref($sql, {}, @$params); + return $row ? %{$row} : (); } #------------------------------------------------------------------- @@ -749,18 +696,10 @@ An array reference containing values for any placeholder params used in the SQL =cut sub quickHashRef { - my $self = shift; - my $sql = shift; - my $params = shift; - my $sth = $self->prepare($sql); - $sth->execute($params); - my $data = $sth->hashRef; - $sth->finish; - if (defined $data) { - return $data; - } else { - return {}; - } + my $self = shift; + my $sql = shift; + my $params = shift; + return $self->selectrow_hashref($sql, {}, @$params) || {}; } #------------------------------------------------------------------- @@ -780,15 +719,11 @@ An array reference containing values for any placeholder params used in the SQL =cut sub quickScalar { - my $self = shift; - my $sql = shift; - my $params = shift; - my ($sth, @data); - $sth = $self->prepare($sql); - $sth->execute($params); - @data = $sth->array; - $sth->finish; - return $data[0]; + my $self = shift; + my $sql = shift; + my $params = shift; + my ($data) = $self->selectrow_array($sql, {}, @$params); + return $data; } @@ -809,39 +744,30 @@ An array reference containing values for any placeholder params used in the SQL =cut sub quickTab { - my $self = shift; - my $sql = shift; - my $params = shift; - my ($sth, $output, @data); - $sth = $self->prepare($sql); - $sth->execute($params); - $output = join("\t",$sth->getColumnNames)."\n"; - while (@data = $sth->array) { - makeArrayTabSafe(\@data); - $output .= join("\t",@data)."\n"; - } - $sth->finish; - return $output; -} + my $self = shift; + my $sql = shift; + my $params = shift; -#------------------------------------------------------------------- + my $sth = $self->prepare($sql); + $sth->execute(@{$params}); -=head2 quote ( string ) + my $csv = Text::CSV_XS->new({ + eol => "\n", + quote_char => undef, + escape_char => undef, + sep_char => "\t", + }); -Returns a string quoted and ready for insert into the database. + return undef + unless $csv->combine($sth->getColumnNames); -B You should use this sparingly. It is much faster and safer to use prepare/execute style queries and passing in place holder parameters. Even the convenience methods like quickArray() support the use of place holder parameters. - -=head3 string - -Any scalar variable that needs to be escaped to be inserted into the database. - -=cut - -sub quote { - my $self = shift; - my $value = shift; - return $self->dbh->quote($value); + my $output = $csv->string; + while (my @data = $sth->fetchrow_array) { + return undef unless $csv->combine(@data); + $output .= $csv->string; + } + $sth->finish; + return $output; } #------------------------------------------------------------------- @@ -857,16 +783,29 @@ An array reference containing strings to be quoted. =cut sub quoteAndJoin { - my $self = shift; - my $arrayRef = shift; - my @newArray; - foreach my $value (@$arrayRef) { - push(@newArray,$self->quote($value)); - } - return join(",",@newArray); + my $self = shift; + my $arrayRef = shift; + return join ',', map { $self->quote($_) } @$arrayRef; } +#------------------------------------------------------------------- + +=head2 quoteIdentifier ( string ) + +Returns a string quoted as an identifier to be used as a table name, column name, etc. + +=head3 string + +Any scalar variable that needs to be escaped to be inserted into the database. + +=cut + +sub quoteIdentifier { + my $self = shift; + return $self->quote_identifier(@_); +} + #------------------------------------------------------------------- =head2 read ( sql [ , placeholders ] ) @@ -885,45 +824,14 @@ An array reference containing a list of values to be used in the placeholders de =cut sub read { - my $self = shift; - my $sql = shift; - my $placeholders = shift; - return WebGUI::SQL::ResultSet->read($sql, $self, $placeholders); + my $self = shift; + my $sql = shift; + my $placeholders = shift; + my $sth = $self->prepare($sql); + $sth->execute(@$placeholders); + return $sth; } - -#------------------------------------------------------------------- - -=head2 rollback ( ) - -Ends a transaction sequence. To be used with beginTransaction. Cancels all of the writes since beginTransaction. - -=head3 dbh - -A database handler. Defaults to the WebGUI default database handler. - -=cut - -sub rollback { - my $self = shift; - $self->dbh->rollback; -} - - -#------------------------------------------------------------------- - -=head2 session ( ) - -Returns a reference to the current session. - -=cut - -sub session { - my $self = shift; - return $self->{_session}; -} - - #------------------------------------------------------------------- =head2 setRow ( table, key, data [ ,id ] ) @@ -949,28 +857,35 @@ Use this ID to create a new row. Same as setting the key value to "new" except t =cut sub setRow { - my ($self, $table, $keyColumn, $data, $id) = @_; - if ($data->{$keyColumn} eq "new" || $id) { - $data->{$keyColumn} = $id || $self->session->id->generate(); - $self->write("replace into ".$self->dbh->quote_identifier($table) - ." (" . $self->dbh->quote_identifier($keyColumn) . ") values (?)",[$data->{$keyColumn}]); - } - my @fields = (); - my @data = (); - foreach my $key (keys %{$data}) { - unless ($key eq $keyColumn) { - push(@fields, $self->dbh->quote_identifier($key).'=?'); - push(@data,$data->{$key}); - } - } - if ($fields[0] ne "") { - push(@data,$data->{$keyColumn}); - $self->write("update ".$self->dbh->quote_identifier($table)." set " . join(", ", @fields) - . " where " . $self->dbh->quote_identifier($keyColumn) . "=?", \@data); - } - return $data->{$keyColumn}; -} + my ($self, $table, $keyColumn, $data, $id) = @_; + $table = $self->quote_identifier($table); + my $key = $self->quote_identifier($keyColumn); + if ($data->{$keyColumn} eq 'new' || $id) { + $id ||= WebGUI::GUID->generate; + $data->{$keyColumn} = $id; + } + else { + $id = $data->{$keyColumn}; + } + + try { + my $fields = join ', ', map { $self->quote_identifier($_) } keys %$data; + my $values = join ', ', ('?') x values %$data; + $self->do("INSERT INTO $table ($fields) VALUES ($values)", {}, values %$data); + } + catch { + my %data = %$data; + delete $data{$keyColumn}; + + if ( keys %data ) { + my $fields = join ', ', map { $self->quote_identifier($_). '=?' } keys %data; + $self->do("UPDATE $table SET $fields WHERE $key = ?", {}, values %data, $id); + } + }; + + return $id; +} #------------------------------------------------------------------- @@ -989,10 +904,11 @@ An array reference containing a list of values to be used in the placeholders de =cut sub unconditionalRead { - my $self = shift; - my $sql = shift; - my $placeholders = shift; - return WebGUI::SQL::ResultSet->unconditionalRead($sql, $self, $placeholders); + my $self = shift; + local $self->{RaiseError} = 0; + local $self->{HandleError} = undef; + my $sth = $self->read(@_); + return $sth; } @@ -1014,11 +930,10 @@ An array reference containing values for any placeholder params used in the SQL =cut sub write { - my $self = shift; - my $sql = shift; - my $params = shift; - my $sth = $self->prepare($sql); - $sth->execute($params); + my $self = shift; + my $sql = shift; + my $params = shift; + return $self->do($sql, {}, @$params); } diff --git a/lib/WebGUI/SQL/ResultSet.pm b/lib/WebGUI/SQL/ResultSet.pm index ad0d25c46..0b1669edb 100644 --- a/lib/WebGUI/SQL/ResultSet.pm +++ b/lib/WebGUI/SQL/ResultSet.pm @@ -3,7 +3,7 @@ package WebGUI::SQL::ResultSet; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -26,8 +26,6 @@ This class provides methods for working with SQL result sets. If you're used to =head1 SYNOPSIS - use WebGUI::SQL::ResultSet; - my $result = WebGUI::SQL::ResultSet->prepare($query, $db); $result->execute([ @values ]); @@ -45,161 +43,6 @@ These methods are available from this package: =cut - -#------------------------------------------------------------------- - -=head2 array ( ) - -Returns the next row of data as an array. - -=cut - -sub array { - my $self = shift; - return $self->sth->fetchrow_array() or $self->db->session->errorHandler->fatal("Couldn't fetch array. ".$self->errorMessage); -} - -#------------------------------------------------------------------- - -=head2 arrayRef ( ) - -Returns the next row of data as an array reference. Note that this is 12% faster than array(). - -=cut - -sub arrayRef { - my $self = shift; - return $self->sth->fetchrow_arrayref() or $self->db->session->errorHandler->fatal("Couldn't fetch array. ".$self->errorMessage); -} - - -#------------------------------------------------------------------- - -=head2 db ( ) - -A reference to the current WebGUI::SQL object. - -=cut - -sub db { - my $self = shift; - return $self->{_db}; -} - -#------------------------------------------------------------------- - -=head2 errorCode { - -Returns an error code for the current handler. - -=cut - -sub errorCode { - my $self = shift; - return $self->sth->err; -} - - -#------------------------------------------------------------------- - -=head2 errorMessage { - -Returns a text error message for the current handler. - -=cut - -sub errorMessage { - my $self = shift; - return $self->sth->errstr; -} - - -#------------------------------------------------------------------- - -=head2 execute ( [ placeholders ] ) - -Executes a prepared SQL statement. For SELECT queries, returns a true value on success. For -other queries, returns the number of rows effected. Return value will always evaluate as true -even if zero rows were effected. - -=head3 placeholders - -An array reference containing a list of values to be used in the placeholders defined in the SQL statement. - -=cut - -sub execute { - my $self = shift; - my $placeholders = shift || []; - my $sql = $self->{_sql}; - my $errorHandler = $self->db->session->errorHandler; - $errorHandler->query($sql,$placeholders); - $self->sth->execute(@{ $placeholders }) or $errorHandler->fatal("Couldn't execute prepared statement: $sql : With place holders: ".join(", ", @{$placeholders}).". Root cause: ". $self->errorMessage); -} - - -#------------------------------------------------------------------- - -=head2 finish ( ) - -Releases the result set. Should be called to complete any statement handler. - -=cut - -sub finish { - my $self = shift; - return $self->sth->finish; -} - - -#------------------------------------------------------------------- - -=head2 getColumnNames - -Returns an array of column names. Use with a "read" method. - -=cut - -sub getColumnNames { - my $self = shift; - return @{$self->sth->{NAME}} if (ref $self->sth->{NAME} eq 'ARRAY'); -} - - -#------------------------------------------------------------------- - -=head2 hash ( ) - -Returns the next row of data in the form of a hash. - -=cut - -sub hash { - my $self = shift; - my ($hashRef); - $hashRef = $self->sth->fetchrow_hashref(); - if (defined $hashRef) { - return %{$hashRef}; - } else { - return (); - } -} - - -#------------------------------------------------------------------- - -=head2 hashRef ( ) - -Returns the next row of data in the form of a hash reference. - -=cut - -sub hashRef { - my $self = shift; - return $self->sth->fetchrow_hashref(); -} - - #------------------------------------------------------------------- =head2 prepare ( sql, db ) @@ -217,14 +60,12 @@ A WebGUI::SQL database handler. =cut sub prepare { - my $class = shift; - my $sql = shift; - my $db = shift; - my $sth = $db->dbh->prepare($sql) or $db->session->errorHandler->fatal("Couldn't prepare statement: ".$sql." : ". $db->dbh->errstr); - bless {_sth => $sth, _sql => $sql, _db=>$db}, $class; + my $class = shift; + my $sql = shift; + my $db = shift; + return $db->prepare($sql); } - #------------------------------------------------------------------- =head2 read ( sql, db, placeholders ) @@ -247,43 +88,13 @@ An array reference containing a list of values to be used in the placeholders de =cut sub read { - my $class = shift; - my $sql = shift; - my $db = shift; - my $placeholders = shift; - my $self = $db->prepare($sql, $db); - $self->execute($placeholders); - return $self; + my $class = shift; + my $sql = shift; + my $db = shift; + my $placeholders = shift; + return $db->read($sql, $placeholders); } -#------------------------------------------------------------------- - -=head2 rows ( ) - -Returns the number of rows in the result set. - -=cut - -sub rows { - my $self = shift; - return $self->sth->rows; -} - -#------------------------------------------------------------------- - -=head2 sth ( ) - -Returns the working DBI statement handler for this result set. - -=cut - -sub sth { - my $self = shift; - return $self->{_sth}; -} - - - #------------------------------------------------------------------- =head2 unconditionalRead ( sql, db, placeholders ) @@ -305,19 +116,161 @@ An array reference containing a list of values to be used in the placeholders de =cut sub unconditionalRead { - my $class = shift; - my $sql = shift; - my $db = shift; - my $placeholders = shift; - my $errorHandler = $db->session->errorHandler; - $errorHandler->query($sql,$placeholders); - my $sth = $db->dbh->prepare($sql) or $errorHandler->warn("Unconditional read failed: ".$sql." : ".$db->dbh->errstr); - if ($sth) { - $sth->execute(@$placeholders) or $errorHandler->warn("Unconditional read failed: ".$sql." : ".$sth->errstr); - bless {_sql=>$sql, _db=>$db, _sth=>$sth}, $class; - } else { - return undef; - } + my $class = shift; + my $sql = shift; + my $db = shift; + my $placeholders = shift; + return $db->unconditionalRead($sql, $placeholders); +} + +package WebGUI::SQL::st; + +our @ISA = qw(DBI::st); + +#------------------------------------------------------------------- + +=head2 array ( ) + +Returns the next row of data as an array. + +=cut + +sub array { + my $self = shift; + return $self->fetchrow_array; +} + +#------------------------------------------------------------------- + +=head2 arrayRef ( ) + +Returns the next row of data as an array reference. Note that this is 12% faster than array(). + +=cut + +sub arrayRef { + my $self = shift; + return $self->fetchrow_arrayref; +} + + +#------------------------------------------------------------------- + +=head2 db ( ) + +A reference to the current WebGUI::SQL object. + +=cut + +sub db { + my $self = shift; + return $self->{Database}; +} + +#------------------------------------------------------------------- + +=head2 errorCode { + +Returns an error code for the current handler. + +=cut + +sub errorCode { + my $self = shift; + return $self->err; +} + + +#------------------------------------------------------------------- + +=head2 errorMessage { + +Returns a text error message for the current handler. + +=cut + +sub errorMessage { + my $self = shift; + return $self->errstr; +} + +#------------------------------------------------------------------- + +=head2 execute ( [ placeholders ] ) + +Executes a prepared SQL statement. For SELECT queries, returns a true value on success. For +other queries, returns the number of rows effected. Return value will always evaluate as true +even if zero rows were effected. + +=head3 placeholders + +An array reference containing a list of values to be used in the placeholders defined in the SQL statement. + +=cut + +sub execute { + my $self = shift; + my $placeholders = + ( @_ == 1 && ref $_[0] eq 'ARRAY' ) ? $_[0] + : \@_; + return $self->SUPER::execute(@$placeholders); +} + +#------------------------------------------------------------------- + +=head2 getColumnNames + +Returns an array of column names. Use with a "read" method. + +=cut + +sub getColumnNames { + my $self = shift; + return @{ $self->{NAME} } + if (ref $self->{NAME} eq 'ARRAY'); + return; +} + + +#------------------------------------------------------------------- + +=head2 hash ( ) + +Returns the next row of data in the form of a hash. + +=cut + +sub hash { + my $self = shift; + my $hashRef = $self->fetchrow_hashref || {}; + return %$hashRef; +} + + +#------------------------------------------------------------------- + +=head2 hashRef ( ) + +Returns the next row of data in the form of a hash reference. + +=cut + +sub hashRef { + my $self = shift; + return $self->fetchrow_hashref; +} + +#------------------------------------------------------------------- + +=head2 sth ( ) + +Returns the working DBI statement handler for this result set. + +=cut + +sub sth { + my $self = shift; + return $self; } 1; diff --git a/lib/WebGUI/Search.pm b/lib/WebGUI/Search.pm index 96b2c7b2e..658431546 100644 --- a/lib/WebGUI/Search.pm +++ b/lib/WebGUI/Search.pm @@ -3,7 +3,7 @@ package WebGUI::Search; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -117,14 +117,14 @@ Returns an array reference containing asset objects for those that matched. sub getAssets { my $self = shift; - my $query = $self->_getQuery([qw(assetIndex.assetId assetIndex.className assetIndex.revisionDate)]); + my $query = $self->_getQuery([qw(assetIndex.assetId assetIndex.revisionDate)]); my $rs = $self->session->db->prepare($query); $rs->execute($self->{_params}); my @assets = (); while (my ($id, $class, $version) = $rs->array) { - my $asset = WebGUI::Asset->new($self->session, $id, $class, $version); - unless (defined $asset) { - $self->session->errorHandler->warn("Search index contains assetId $id even though it no longer exists."); + my $asset = eval { WebGUI::Asset->newById($self->session, $id, $version); }; + if (Exception::Class->caught()) { + $self->session->log->warn("Search index contains assetId $id even though it no longer exists."); next; } push(@assets, $asset); @@ -450,15 +450,12 @@ sub search { my $join = [ "left join assetData on assetIndex.assetId=assetData.assetId" ]; for my $className ( @{ $rules->{ joinClass } } ) { if ( ! eval { WebGUI::Pluggable::load($className) } ) { - $self->session->errorHandler->fatal($@); + $self->session->log->fatal($@); } - foreach my $definition (@{$className->definition($self->session)}) { - unless ($definition->{tableName} eq "asset") { - my $tableName = $definition->{tableName}; - push @$join, - "left join $tableName on assetData.assetId=".$tableName.".assetId and assetData.revisionDate=".$tableName.".revisionDate"; - } - last; + TABLE: foreach my $tableName ($className->meta->get_tables) { + next TABLE if $tableName eq 'assetData'; + push @{ $join }, + "left join $tableName on assetData.assetId=".$tableName.".assetId and assetData.revisionDate=".$tableName.".revisionDate"; } } # Get only the latest revision diff --git a/lib/WebGUI/Search/Index.pm b/lib/WebGUI/Search/Index.pm index a43f4d993..1f31ffe17 100644 --- a/lib/WebGUI/Search/Index.pm +++ b/lib/WebGUI/Search/Index.pm @@ -3,7 +3,7 @@ package WebGUI::Search::Index; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -102,6 +102,7 @@ sub addRecord { my %defaults = $self->session->db->quickHash('select * from assetIndex where assetId=? and url=?', [$asset->get('assetId'), $asset->get('url')]); $fields{keywords} = $self->_filterKeywords($fields{keywords}); %fields = (%defaults, %fields); + $fields{assetId} = $asset->getId; $fields{lineage} = $defaults{lineage}; my $add = $self->session->db->prepare("replace into assetIndex (assetId, url, title, creationDate, revisionDate, ownerUserId, groupIdView, groupIdEdit, lineage, className, synopsis, keywords, subId) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )"); @@ -171,19 +172,6 @@ sub delete { #------------------------------------------------------------------- -=head2 DESTROY ( ) - -Deconstructor. - -=cut - -sub DESTROY { - my $self = shift; - undef $self; -} - -#------------------------------------------------------------------- - =head2 _filterKeywords ( $keywords ) Perform filtering and cleaning up of the keywords before submitting them. Ideographic characters are padded diff --git a/lib/WebGUI/Session.pm b/lib/WebGUI/Session.pm index 7a4303a04..ce3f1d6c5 100644 --- a/lib/WebGUI/Session.pm +++ b/lib/WebGUI/Session.pm @@ -3,7 +3,7 @@ package WebGUI::Session; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -15,26 +15,29 @@ package WebGUI::Session; =cut use strict; -use Scalar::Util qw( weaken ); +use 5.010; + +use CHI; +use File::Temp qw( tempdir ); +use HTTP::Message::PSGI; +use HTTP::Request::Common; use WebGUI::Config; use WebGUI::SQL; use WebGUI::User; use WebGUI::Session::DateTime; -use WebGUI::Session::Env; -use WebGUI::Session::ErrorHandler; +use WebGUI::Session::Log; use WebGUI::Session::Form; use WebGUI::Session::Http; use WebGUI::Session::Icon; use WebGUI::Session::Id; -use WebGUI::Session::Os; use WebGUI::Session::Output; use WebGUI::Session::Privilege; +use WebGUI::Session::Request; use WebGUI::Session::Scratch; use WebGUI::Session::Setting; use WebGUI::Session::Stow; use WebGUI::Session::Style; use WebGUI::Session::Url; -use WebGUI::Session::Var; =head1 NAME @@ -50,7 +53,7 @@ B It is important to distinguish the difference between a WebGUI session use WebGUI::Session; - $session = WebGUI::Session->open($webguiRoot, $configFile); + $session = WebGUI::Session->open($configFile); $sessionId = $session->getId; ($form, $db, $user) = $session->quick("form", "db", "user"); $session->close; @@ -60,25 +63,22 @@ B It is important to distinguish the difference between a WebGUI session $session->datetime $session->db $session->dbSlave - $session->env $session->log $session->form $session->http $session->icon $session->id $session->output - $session->os $session->privilege $session->request + $session->response $session->scratch - $session->server $session->setting $session->stow $session->style $session->url $session->user - $session->var - + =head1 METHODS @@ -110,6 +110,50 @@ sub asset { #------------------------------------------------------------------- +=head2 cache ( ) + +Returns a CHI object, configured according to the settings in the config file. + +=cut + +sub cache { + my $self = shift; + unless (exists $self->{_cache}) { + my $cacheConf = $self->config->get('cache') || { driver => "Memory", global => 1 }; + + # Default values + my $resolveConf = sub { + my ($config) = @_; + given ( $config->{driver} ) { + when ( /DBI/ ) { + $config->{ dbh } = $self->db->dbh; + continue; + } + when ( /File|FastMmap|BerkeleyDB/ ) { + $config->{ root_dir } ||= tempdir(); + continue; + } + when ( /FastMmap/ ) { + #$config->{ cache_size } = '64m'; + continue; + } + } + $config->{namespace} ||= $self->config->get('sitename')->[0]; + }; + + $resolveConf->( $cacheConf ); + if ( $cacheConf->{l1_cache} ) { + $resolveConf->( $cacheConf->{l1_cache} ); + } + + my $cache = CHI->new( %{$cacheConf} ); + $self->{_cache} = $cache; + } + return $self->{_cache}; +} + +#------------------------------------------------------------------- + =head2 clearAsset ( ) Clears out the session asset. @@ -135,10 +179,23 @@ sub close { # Kill circular references. The literal list is so that the order # can be explicitly shuffled as necessary. - # XXX Is this necessary when we have weakened session refs? - foreach my $key (qw/_asset _datetime _icon _slave _db _env _form _http _id _output _os _privilege _scratch _setting _stow _style _url _user _var _errorHandler /) { + foreach my $key (qw/_asset _datetime _icon _slave _db _form _http _id _output _privilege _scratch _setting _stow _style _url _user _cache _log _response _request/) { delete $self->{$key}; } + $self->{closed} = 1; +} + +#------------------------------------------------------------------- + +=head2 closed + +Returns true if this session has been closed. + +=cut + +sub closed { + my $self = shift; + return $self->{closed}; } #------------------------------------------------------------------- @@ -187,11 +244,11 @@ sub db { my $self = shift; my $skipFatal = shift; unless (exists $self->{_db}) { - my $db = WebGUI::SQL->connect($self,$self->config->get("dsn"), $self->config->get("dbuser"), $self->config->get("dbpass")); + my $db = WebGUI::SQL->connect($self->config->get("dsn"), $self->config->get("dbuser"), $self->config->get("dbpass")); if (!defined $db && defined $self->config->get("failoverdb")) { - $self->errorHandler->warn("Main DB down, resorting to using failover."); + $self->log->warn("Main DB down, resorting to using failover."); my $failover = $self->config->get("failoverdb"); - $db = WebGUI::SQL->connect($self,$failover->{dsn}, $failover->{user}, $failover->{password}); + $db = WebGUI::SQL->connect($failover->{dsn}, $failover->{user}, $failover->{password}); } if (defined $db) { $self->{_db} = $db; @@ -201,7 +258,7 @@ sub db { return undef; } else { - $self->errorHandler->fatal("Couldn't connect to WebGUI database, and can't continue without it."); + $self->log->fatal("Couldn't connect to WebGUI database, and can't continue without it."); } } } @@ -218,7 +275,7 @@ Returns a random slave database handler, if one is defined, otherwise it returns sub dbSlave { my $self = shift; - return $self->db if $self->var->isAdminOn; + return $self->db if $self->isAdminOn; unless (exists $self->{_slave}) { my @slaves = (); foreach (1..3) { @@ -229,7 +286,7 @@ sub dbSlave { } if (scalar @slaves > 0) { my $slave = $slaves[rand @slaves]; - $self->{_slave} = WebGUI::SQL->connect($self, $slave->{dsn},$slave->{user},$slave->{pass}); + $self->{_slave} = WebGUI::SQL->connect($slave->{dsn},$slave->{user},$slave->{pass}); } } if (!exists $self->{_slave}) { @@ -265,9 +322,7 @@ Creates a new session using the same WebGUI root, config file, and user. sub duplicate { my $self = shift; my $newSession = WebGUI::Session->open( - $self->config->getWebguiRoot, - $self->config->getFilename, - undef, + $self->config, undef, $self->getId, ); @@ -277,21 +332,21 @@ sub duplicate { #------------------------------------------------------------------- -=head2 env ( ) +=head2 end ( ) -Returns a WebGUI::Session::Env object. +Removes the specified session from memory and database. =cut -sub env { - my $self = shift; - unless (exists $self->{_env}) { - $self->{_env} = WebGUI::Session::Env->new; - } - return $self->{_env}; +sub end { + my $self = shift; + my $id = $self->getId; + $self->cache->remove($id); + $self->scratch->deleteAll; + $self->db->write("delete from userSession where sessionId=?",[$id]); + delete $self->{_user}; } - #------------------------------------------------------------------- =head2 errorHandler ( ) @@ -323,6 +378,51 @@ sub form { #------------------------------------------------------------------- +=head2 get ( varName ) + +Retrieves the current value of a session variable. + +=head3 varName + +The name of the variable. + +=head4 lastIP + +The last IP address the user came from. + +=head4 lastPageView + +The epoch date of the last interaction with the session. + +=head4 userId + +The unique id of the user this session currently bound to. + +=head4 adminOn + +A boolean indicating whether this session has admin mode enabled or not. + +=head4 sessionId + +The sessionId associated with this session. + +=head4 expires + +The epoch date when this user session will expire if it's not accessed again by then. + +=cut + +sub get { + my $self = shift; + my $varName = shift; + if ($varName) { + return $self->{_var}{$varName}; + } + return $self->{_var}; +} + +#------------------------------------------------------------------- + =head2 getId ( ) Returns the current session Id. @@ -392,75 +492,129 @@ Returns a reference to the WebGUI::Session::Id object. sub id { my $self = shift; unless ($self->{_id}) { - $self->{_id} = WebGUI::Session::Id->new($self); + $self->{_id} = WebGUI::Session::Id->new($self->config->getFilename); } return $self->{_id}; } +#------------------------------------------------------------------- + +=head2 isAdminOn ( ) + +Returns a boolean indicating whether admin mode is on or not. + +=cut + +sub isAdminOn { + my $self = shift; + return $self->get("adminOn"); +} + #------------------------------------------------------------------- =head2 log ( ) -Returns a WebGUI::Session::ErrorHandler object, which is used for logging. +Returns a WebGUI::Session::Log object, which is used for logging. =cut sub log { my $self = shift; - unless (exists $self->{_errorHandler}) { - $self->{_errorHandler} = WebGUI::Session::ErrorHandler->new($self); + unless (exists $self->{_log}) { + $self->{_log} = WebGUI::Session::Log->new($self); } - return $self->{_errorHandler}; + return $self->{_log}; } #------------------------------------------------------------------- -=head2 open ( webguiRoot, configFile [, requestObject, serverObject, sessionId, noFuss ] ) +=head2 open ( configFile [, env, sessionId, noFuss ] ) Constructor. Opens a closed ( or new ) WebGUI session. -=head3 webguiRoot - -The path to the WebGUI files. - =head3 configFile -The filename of the config file that WebGUI should operate from. +The filename of the config file that WebGUI should operate from, or a WebGUI::Config object -=head3 requestObject +=head3 env -The Apache request object (aka $r). If this session is being instanciated from the web, this is required. - -=head3 serverObject - -The Apache server object (Apache2::ServerUtil). If this session is being instanciated from the web, this is required. +The L env hash. If this session is being instanciated from the web, this is required. =head3 sessionId Optionally retrieve a specific session id. Normally this is set by a cookie in the user's browser. +If you have a L env hash, you might find the sessionId at: $env->{'psgix.session'}->id =head3 noFuss -Uses simple session vars. See WebGUI::Session::Var::new() for more details. +Uses simple session vars. See WebGUI::Session->open() for more details. =cut sub open { - my $class = shift; - my $webguiRoot = shift; - my $configFile = shift; - my $request = shift; - my $server = shift; - my $config = WebGUI::Config->new($webguiRoot,$configFile); - my $self = {_config=>$config, _server=>$server}; - bless $self , $class; - $self->{_request} = $request if (defined $request); - my $sessionId = shift || $self->http->getCookies->{$config->getCookieName} || $self->id->generate; - $sessionId = $self->id->generate unless $self->id->valid($sessionId); - my $noFuss = shift; - $self->{_var} = WebGUI::Session::Var->new($self,$sessionId, $noFuss); - $self->errorHandler->warn("You've disabled cache in your config file and that can cause many problems on a production site.") if ($config->get("disableCache")); + my ($class, $c, $env, $sessionId, $noFuss) = @_; + my $config = ref $c ? $c : WebGUI::Config->new($c); + my $self = { _config => $config }; + bless $self, $class; + + ##No env was passed, so construct one + if (! $env) { + my $url = 'http://' . $config->get('sitename')->[0]; + my $request = HTTP::Request::Common::GET($url); + $request->headers->user_agent('WebGUI'); + $env = $request->to_psgi; + } + + my $request = WebGUI::Session::Request->new($env); + $self->{_request} = $request; + ##Set defaults + $self->{_response} = $request->new_response( 200 ); + $self->{_response}->content_type('text/html; charset=UTF-8'); + $self->{_response}->session( $self ); + + # Use the WebGUI::Session::Request object to look up the sessionId from cookies, if it + # wasn't given explicitly + $sessionId ||= $request->cookies->{$config->getCookieName}; + + # If the sessionId is still unset or is invalid, generate a new one + if (!$sessionId || !$self->id->valid($sessionId)) { + $sessionId = $self->id->generate; + } + $self->{_var} = $self->cache->get($sessionId); + unless ($self->{_var}{sessionId} eq $sessionId) { + $self->{_var} = $self->db->quickHashRef("select * from userSession where sessionId=?", [$sessionId]); + } + ##We have to make sure that the session variable has a sessionId, otherwise downstream users of + ##the object will break + if ($noFuss && $self->{_var}{sessionId}) { + $self->{_sessionId} = $self->{_var}{sessionId}; + return $self; + } + if ($self->{_var}{expires} && $self->{_var}{expires} < time()) { ##Session expired, start a new one with the same Id, as visitor + $self->end; + $self->start(1, $sessionId); + } + elsif ($self->{_var}{sessionId} ne "") { ##Fetched an existing session. Update variables with recent data. + my $time = time(); + my $timeout = $self->setting->get("sessionTimeout"); + $self->{_sessionId} = $self->{_var}{sessionId}; + $self->{_var}{lastPageView} = $time; + $self->{_var}{lastIP} = $self->request->address; + $self->{_var}{expires} = $time + $timeout; + if ($self->{_var}{nextCacheFlush} > 0 && $self->{_var}{nextCacheFlush} < $time) { + delete $self->{_var}{nextCacheFlush}; + $self->db->setRow("userSession","sessionId",$self->{_var}); + } + else { + $self->{_var}{nextCacheFlush} = $time + $self->config->get("hotSessionFlushToDb"); + $self->cache->set($sessionId, $self->{_var}, $timeout); + } + } + else { ##Start a new default session with the requested, non-existant id. + $self->start(1,$sessionId); + } + return $self; } @@ -481,23 +635,6 @@ sub output { } -#------------------------------------------------------------------- - -=head2 os ( ) - -Returns a WebGUI::Session::Os object. - -=cut - -sub os { - my $self = shift; - unless (exists $self->{_os}) { - $self->{_os} = WebGUI::Session::Os->new(); - } - return $self->{_os}; -} - - #------------------------------------------------------------------- =head2 privilege ( ) @@ -540,7 +677,7 @@ sub quick { =head2 request ( ) -Returns the Apache request (aka $r) object, or undef if it doesn't exist. +Returns the L object, or undef if it doesn't exist. =cut @@ -551,6 +688,19 @@ sub request { #------------------------------------------------------------------- +=head2 response ( ) + +Returns the L object, or undef if it doesn't exist. + +=cut + +sub response { + my $self = shift; + return $self->{_response}; +} + +#------------------------------------------------------------------- + =head2 scratch ( ) Returns a WebGUI::Session::Scratch object. @@ -569,13 +719,13 @@ sub scratch { =head2 server ( ) -Returns the Apache server object (Apache2::ServerUtil), or undef if it doesn't exist. +DEPRECATED (used to return the Apache2::ServerUtil object) =cut sub server { my $self = shift; - return $self->{_server}; + $self->log->fatal('WebGUI::Session::server is deprecated'); } #------------------------------------------------------------------- @@ -595,6 +745,48 @@ sub setting { } +#------------------------------------------------------------------- + +=head2 start ( [ userId, sessionId ] ) + +Start a new user session. Returns the user session id. The session variable's sessionId +is set to the var object's session id. Also sets the user's CSRF token. + +=head3 userId + +The user id of the user to create a session for. Defaults to 1 (Visitor). + +=head3 sessionId + +Session id will be generated if not specified. In almost every case you should let the system generate the session id. + +=cut + +sub start { + my $self = shift; + my $userId = shift; + $userId = 1 if ($userId eq ""); + my $sessionId = shift; + $sessionId = $self->id->generate if ($sessionId eq ""); + my $timeout = $self->setting->get('sessionTimeout'); + my $time = time(); + $self->{_var} = { + expires => $time + $timeout, + lastPageView => $time, + lastIP => $self->request->address, + adminOn => 0, + userId => $userId + }; + $self->{_sessionId} = $sessionId; + $self->cache->set($sessionId, $self->{_var}, $timeout); + delete $self->{_var}{nextCacheFlush}; + if ( $self->user->isInGroup( 12 ) ) { # Turn Admin On!! + $self->{_var}{adminOn} = 1; + } + $self->db->setRow("userSession","sessionId",$self->{_var}, $sessionId); + $self->scratch->set('webguiCsrfToken', $self->id->generate); # create cross site request forgery token +} + #------------------------------------------------------------------- =head2 stow ( ) @@ -627,7 +819,6 @@ sub style { return $self->{_style} } - #------------------------------------------------------------------- =head2 url ( ) @@ -669,16 +860,17 @@ sub user { my $option = shift; if (defined $option) { my $userId = $option->{userId} || $option->{user}->userId; - $self->var->start($userId,$self->getId); if ($self->setting->get("passiveProfilingEnabled")) { $self->db->write("update passiveProfileLog set userId = ? where sessionId = ?",[$userId,$self->getId]); } delete $self->{_stow}; $self->{_user} = $option->{user} || WebGUI::User->new($self, $userId); - $self->request->user($self->{_user}->username) if $self->request; - } elsif (!exists $self->{_user}) { - $self->{_user} = WebGUI::User->new($self, $self->var->get('userId')); - $self->request->user($self->{_user}->username) if $self->request; + $self->request->env->{REMOTE_USER} = $self->{_user}->username if $self->request; + $self->start($userId,$self->getId); + } + elsif (!exists $self->{_user}) { + $self->{_user} = WebGUI::User->new($self, $self->get('userId')); + $self->request->env->{REMOTE_USER} = $self->{_user}->username if $self->request; } return $self->{_user}; } @@ -688,16 +880,14 @@ sub user { =head2 var ( ) +DEPRECATED. Session::Var was absorbed into Session in WebGUI 8.0. + Returns a reference to the WebGUI::Session::Var object. =cut sub var { - my $self = shift; - unless ($self->{_var}) { - $self->{_var} = WebGUI::Session::Var->new($self); - } - return $self->{_var}; + return $_[0]; } 1; diff --git a/lib/WebGUI/Session/DateTime.pm b/lib/WebGUI/Session/DateTime.pm index 04c69e3bc..042bf3d91 100644 --- a/lib/WebGUI/Session/DateTime.pm +++ b/lib/WebGUI/Session/DateTime.pm @@ -3,7 +3,7 @@ package WebGUI::Session::DateTime; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -22,7 +22,7 @@ use DateTime::TimeZone; use Scalar::Util qw( weaken ); use Tie::IxHash; use WebGUI::International; -use WebGUI::Utility; +use Scalar::Util qw(weaken); =head1 NAME @@ -227,19 +227,6 @@ sub dayStartEnd { #------------------------------------------------------------------- -=head2 DESTROY ( ) - -Deconstructor. - -=cut - -sub DESTROY { - my $self = shift; - undef $self; -} - -#------------------------------------------------------------------- - =head2 epochToHttp ( [ epoch ] ) Converts and epoch date into an HTTP formatted date. @@ -305,7 +292,7 @@ sub epochToHuman { $epoch = time(); } my $i18n = WebGUI::International->new($self->session); - my $language = $i18n->getLanguage($self->session->user->profileField('language')); + my $language = $i18n->getLanguage($self->session->user->get('language')); my $locale = $language->{languageAbbreviation} || 'en'; $locale .= "_".$language->{locale} if ($language->{locale}); my $time_zone = $self->getTimeZone(); @@ -313,10 +300,10 @@ sub epochToHuman { my $output = shift || "%z %Z"; my $temp; #---date format preference - $temp = $self->session->user->profileField('dateFormat') || '%M/%D/%y'; + $temp = $self->session->user->get('dateFormat') || '%M/%D/%y'; $output =~ s/\%z/$temp/g; #---time format preference - $temp = $self->session->user->profileField('timeFormat') || '%H:%n %p'; + $temp = $self->session->user->get('timeFormat') || '%H:%n %p'; $output =~ s/\%Z/$temp/g; #--- convert WebGUI date formats to DateTime formats my %conversion = ( @@ -388,7 +375,7 @@ sub epochToMail { =head2 epochToSet ( [ epoch, withTime ] ) -Returns a set date (used by WebGUI::HTMLForm->date) in the format of YYYY-MM-DD. +Returns a set date (used by WebGUI::Form::Date) in the format of YYYY-MM-DD. =head3 epoch @@ -622,10 +609,10 @@ sub getTimeZone { return 'America/Chicago' unless defined $self->session->db(1); return $self->session->user->{_timeZone} if $self->session->user->{_timeZone}; my @zones = @{DateTime::TimeZone::all_names()}; - my $zone = $self->session->user->profileField('timeZone'); + my $zone = $self->session->user->get('timeZone'); $zone =~ s/ /\_/g; if ($zone) { - if (isIn($zone, @zones)) { + if ( $zone ~~ @zones ) { $self->session->user->{_timeZone} = $zone; return $zone; } @@ -738,7 +725,7 @@ sub mailToEpoch { my $parser = DateTime::Format::Mail->new->loose; my $dt = eval {$parser->parse_datetime($date)}; if ($@) { - $self->session->errorHandler->warn($date." is not a valid date for email, and is so poorly formatted, we can't even guess what it is."); + $self->session->log->warn($date." is not a valid date for email, and is so poorly formatted, we can't even guess what it is."); return undef; } return $dt->epoch; @@ -813,9 +800,9 @@ A reference to the current session. sub new { my $class = shift; my $session = shift; - my $self = bless {_session=>$session}, $class; - weaken( $self->{_session} ); - return $self; + my $self = bless { _session => $session }, $class; + weaken $self->{_session}; + return $self; } #------------------------------------------------------------------- @@ -831,40 +818,25 @@ The number of seconds in the interval. =cut +my %intervals = ( + 31536000 => "703", # years + 2592000 => "702", # months + 604800 => "701", # weeks + 86400 => "700", # days + 3600 => "706", # hours + 60 => "705", # minutes +); + sub secondsToInterval { - my $self = shift; - my $seconds = shift; + my $self = shift; + my $seconds = shift; my $i18n = WebGUI::International->new($self->session, 'WebGUI'); - my ($interval, $units); - if ($seconds >= 31536000) { - $interval = round($seconds/31536000); - $units = $i18n->get("703"); - } - elsif ($seconds >= 2592000) { - $interval = round($seconds/2592000); - $units = $i18n->get("702"); - } - elsif ($seconds >= 604800) { - $interval = round($seconds/604800); - $units = $i18n->get("701"); - } - elsif ($seconds >= 86400) { - $interval = round($seconds/86400); - $units = $i18n->get("700"); + for my $unit (sort { $b <=> $a } keys %intervals) { + if ($seconds >= $unit) { + return (sprintf('%.0f', $seconds / $unit), $i18n->get($intervals{$unit})); + } } - elsif ($seconds >= 3600) { - $interval = round($seconds/3600); - $units = $i18n->get("706"); - } - elsif ($seconds >= 60) { - $interval = round($seconds/60); - $units = $i18n->get("705"); - } - else { - $interval = $seconds; - $units = $i18n->get("704"); - } - return ($interval, $units); + return ($seconds, $i18n->get("704")); # seconds } #------------------------------------------------------------------- @@ -883,17 +855,9 @@ sub secondsToExactInterval { my $self = shift; my $seconds = shift; my $i18n = WebGUI::International->new($self->session, 'WebGUI'); - my %units = ( - 31536000 => "703", # years - 2592000 => "702", # months - 604800 => "701", # weeks - 86400 => "700", # days - 3600 => "706", # hours - 60 => "705", # minutes - ); - for my $unit (sort { $b <=> $a } keys %units) { + for my $unit (sort { $b <=> $a } keys %intervals) { if ($seconds % $unit == 0) { - return ($seconds / $unit, $i18n->get($units{$unit})); + return ($seconds / $unit, $i18n->get($intervals{$unit})); } } return ($seconds, $i18n->get("704")); # seconds @@ -959,7 +923,7 @@ sub setToEpoch { $dt = $parser->parse_datetime($set); } unless ($dt) { - $self->session->errorHandler->warn("Could not format date $set for epoch. Returning current time"); + $self->session->log->warn("Could not format date $set for epoch. Returning current time"); return time(); } return $dt->epoch; diff --git a/lib/WebGUI/Session/Env.pm b/lib/WebGUI/Session/Env.pm deleted file mode 100644 index b338c2167..000000000 --- a/lib/WebGUI/Session/Env.pm +++ /dev/null @@ -1,208 +0,0 @@ -package WebGUI::Session::Env; - -=head1 LEGAL - - ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. - ------------------------------------------------------------------- - Please read the legal notices (docs/legal.txt) and the license - (docs/license.txt) that came with this distribution before using - this software. - ------------------------------------------------------------------- - http://www.plainblack.com info@plainblack.com - ------------------------------------------------------------------- - -=cut - -use strict; - -=head1 NAME - -Package WebGUI::Session::Env - -=head1 DESCRIPTION - -This package allows you to reference environment variables. - -=head1 SYNOPSIS - -$env = WebGUI::Session::Env->new; - -$value = $env->get('REMOTE_ADDR'); - -return 'not gonna see it' if $env->requestNotViewed() ; - -=head1 METHODS - -These methods are available from this package: - -=cut - - -#------------------------------------------------------------------- - -=head2 callerIsSearchSite ( ) - -Returns true if the remote address matches a site which is a known indexer or spider. - -=cut - -sub callerIsSearchSite { - - my $self = shift; - my $remoteAddress = $self->getIp; - - return 1 if $remoteAddress =~ /203\.87\.123\.1../ # Blaiz Enterprise Rawgrunt search - || $remoteAddress =~ /123\.113\.184\.2../ # Unknown Yahoo Robot - || $remoteAddress == ''; - - return 0; - -} - - -#------------------------------------------------------------------- - -=head2 clientIsSpider ( ) - -Returns true is the client/agent is a spider/indexer or some other non-human interface, determined -by checking the user agent against a list of known spiders. - -=cut - - -sub clientIsSpider { - - my $self = shift; - my $userAgent = $self->get('HTTP_USER_AGENT'); - - return 1 if $userAgent eq '' - || $userAgent =~ m<(^wre\/| # the WRE wget's http://localhost/ every 2-3 minutes 24 hours a day... - ^morpheus| - libwww| - s[pb]ider| - bot| - robo| - sco[ou]t| - crawl| - miner| - reaper| - finder| - search| - engine| - download| - fetch| - scan| - slurp)>ix; - - return 0; - -} - - -#------------------------------------------------------------------- - -=head2 DESTROY ( ) - -Deconstructor. - -=cut - -sub DESTROY { - my $self = shift; - undef $self; -} - - -#------------------------------------------------------------------- - -=head2 get( varName ) - -Retrieves the current value of an environment variable. - -=head3 varName - -The name of the variable. - -=cut - -sub get { - my $self = shift; - my $var = shift; - return $self->{_env}{$var}; -} - - -#------------------------------------------------------------------- - -=head2 getIp ( ) - -Returns the user's real IP address. Normally this is REMOTE_ADDR, but if they go through a proxy server it might be in HTTP_X_FORWARDED_FOR. This method attempts to figure out what the most likely IP is for the user. Note that it's possible to spoof this and therefore shouldn't be used as your only security mechanism for validating a user. - -=cut - -sub getIp { - my $self = shift; - if ($self->get("HTTP_X_FORWARDED_FOR") =~ m/(\d+\.\d+\.\d+\.\d+)/) { - return $1; - } - return $self->get("REMOTE_ADDR"); -} - - -#------------------------------------------------------------------- - -=head2 new ( ) - -Constructor. Returns an env object. - -=cut - -sub new { - my $class = shift; - bless {_env=>\%ENV}, $class; -} - -#------------------------------------------------------------------- - -=head2 requestNotViewed ( ) - -Returns true is the client/agent is a spider/indexer or some other non-human interface - -=cut - -sub requestNotViewed { - - my $self = shift; - return $self->clientIsSpider(); - # || $self->callerIsSearchSite(); # this part is currently left out because - # it has minimal effect and does not manage - # IPv6 addresses. it may be useful in the - # future though - -} - -#------------------------------------------------------------------- - -=head2 sslRequest ( ) - -Returns true if a https request was made. - -HTTP_SSLPROXY is set by mod_proxy in the WRE so that WebGUI knows that the original request -was made via SSL. - -=cut - -sub sslRequest { - my $self = shift; - return ( - $self->get('HTTPS') eq 'on' - || $self->get('SSLPROXY') - || $self->get('HTTP_SSLPROXY') - || $self->get('HTTP_X_FORWARDED_PROTO') eq 'https' - ); -} - - -1; - diff --git a/lib/WebGUI/Session/ErrorHandler.pm b/lib/WebGUI/Session/ErrorHandler.pm deleted file mode 100644 index 9384e08af..000000000 --- a/lib/WebGUI/Session/ErrorHandler.pm +++ /dev/null @@ -1,489 +0,0 @@ -package WebGUI::Session::ErrorHandler; - -=head1 LEGAL - - ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. - ------------------------------------------------------------------- - Please read the legal notices (docs/legal.txt) and the license - (docs/license.txt) that came with this distribution before using - this software. - ------------------------------------------------------------------- - http://www.plainblack.com info@plainblack.com - ------------------------------------------------------------------- - -=cut - - -use strict; -use Log::Log4perl; -use Scalar::Util qw( weaken ); -#use Apache2::RequestUtil; -use JSON; -use HTML::Entities qw(encode_entities); - -=head1 NAME - -Package WebGUI::Session::ErrorHandler - -=head1 DESCRIPTION - -This package provides simple but effective error handling, debugging, and logging for WebGUI. - -=head1 SYNOPSIS - - use WebGUI::Session::ErrorHandler; - - my $errorHandler = WebGUI::Session::ErrorHandler->new($session); - - $errorHandler->audit($message); - $errorHandler->debug($message); - $errorHandler->error($message); - $errorHandler->fatal($message); - $errorHandler->info($message); - $errorHandler->security($message); - $errorHandler->warn($message); - - $logger = $errorHandler->getLogger; - - $text = $errorHandler->getStackTrace; - $html = $errorHandler->showDebug; - -=head1 METHODS - -These methods are available from this class: - -=cut - - - -#------------------------------------------------------------------- - -=head2 audit ( message ) - -A convenience function that wraps info() and includes the current username and user ID in addition to the message being logged. - -=head3 message - -Whatever message you wish to insert into the log. - -=cut - -sub audit { - my $self = shift; - my $message = shift; - $self->info($self->session->user->username." (".$self->session->user->userId.") ".$message); -} - - -#------------------------------------------------------------------- - -=head2 canShowBasedOnIP ( $ipSetting ) - -Returns true if the the user's IP address matches the requested IP setting. - -=head3 ipSetting - -The setting to pull from the database. It should containt a CSV list of IP -addresses in CIDR format. - -=cut - -sub canShowBasedOnIP { - my $self = shift; - my $ipSetting = shift; - return 0 unless $ipSetting; - return 1 if ($self->session->setting->get($ipSetting) eq ""); - my $ips = $self->session->setting->get($ipSetting); - $ips =~ s/\s+//g; - my @ips = split(",", $ips); - my $ok = WebGUI::Utility::isInSubnet($self->session->env->getIp, [ @ips] ); - return $ok; -} - -#------------------------------------------------------------------- - -=head2 canShowDebug ( ) - -Returns true if the user meets the condition to see debugging information and debug mode is enabled. -This method caches its value, so long processes may need to manually clear the cached in $self->{_canShowDebug}. - -=cut - -sub canShowDebug { - my $self = shift; - - # if we have a cached false value, we can use it - # true values need additional checks - if (exists $self->{_canShowDebug} && !$self->{_canShowDebug}) { - return 0; - } - - ##This check prevents in infinite loop during startup. - return 0 unless ($self->session->hasSettings); - - # Allow programmers to stop debugging output for certain requests - return 0 if $self->{_preventDebugOutput}; - - my $canShow = $self->session->setting->get("showDebug") - && $self->canShowBasedOnIP('debugIp'); - $self->{_canShowDebug} = $canShow; - - return $canShow - && substr($self->session->http->getMimeType(),0,9) eq "text/html"; -} - -#------------------------------------------------------------------- - -=head2 canShowPerformanceIndicators ( ) - -Returns true if the user meets the conditions to see performance indicators and performance indicators are enabled. - -=cut - -sub canShowPerformanceIndicators { - my $self = shift; - return 0 unless $self->session->setting->get("showPerformanceIndicators"); - return $self->canShowBasedOnIP('debugIp'); -} - - -#------------------------------------------------------------------- - -=head2 debug ( message ) - -Adds a DEBUG type message to the log. These events should be things that are only used for diagnostic purposes. - -=head3 message - -The message you wish to add to the log. - -=cut - -sub debug { - my $self = shift; - return unless $self->canShowDebug || $self->getLogger->is_debug; - my $message = shift; - local $Log::Log4perl::caller_depth = $Log::Log4perl::caller_depth + 1; - $self->getLogger->debug($message); - $self->{_debug_debug} .= $message."\n"; -} - - -#------------------------------------------------------------------- - -=head2 DESTROY ( ) - -Deconstructor. - -=cut - -sub DESTROY { - my $self = shift; - undef $self; -} - - - -#------------------------------------------------------------------- - -=head2 error ( message ) - -Adds a ERROR type message to the log. These events should be things that are errors that are not fatal. For instance, a non-compiling plug-in or erroneous user input. - -=head3 message - -The message you wish to add to the log. - -=cut - -sub error { - my $self = shift; - return unless $self->canShowDebug || $self->getLogger->is_error; - my $message = shift; - local $Log::Log4perl::caller_depth = $Log::Log4perl::caller_depth + 1; - $self->getLogger->error($message); - $self->getLogger->debug("Stack trace for ERROR ".$message."\n".$self->getStackTrace()); - $self->{_debug_error} .= $message."\n"; -} - - -#------------------------------------------------------------------- - -=head2 fatal ( message [, flags] ) - -Adds a FATAL type message to the log, outputs an error message to the user, and forces a close on the session. This should only be called if the system cannot recover from an error, or it would be unsafe to recover from an error like database connectivity problems. - -=head3 message - -The message to use. - -=cut - -sub fatal { - my $self = shift; - my $message = shift; - - local $Log::Log4perl::caller_depth = $Log::Log4perl::caller_depth + 1; - $self->session->http->setStatus("500","Server Error"); - #Apache2::RequestUtil->request->content_type('text/html') if ($self->session->request); - $self->session->request->content_type('text/html') if ($self->session->request); - $self->getLogger->fatal($message); - $self->getLogger->debug("Stack trace for FATAL ".$message."\n".$self->getStackTrace()); - $self->session->http->sendHeader if ($self->session->request); - - if (! defined $self->session->db(1)) { - # We can't even _determine_ whether we can show the debug text. Punt. - $self->session->output->print("

    Fatal Internal Error

    "); - $self->session->output->print("

    ".$message."

    "); - } - elsif ($self->canShowDebug()) { - $self->session->output->print("

    WebGUI Fatal Error

    Something unexpected happened that caused this system to fault.

    \n",1); - $self->session->output->print("

    ".$message."

    \n",1); - $self->session->output->print("
    " . encode_entities($self->getStackTrace) . "
    ", 1); - $self->session->output->print($self->showDebug(),1); - } - else { - # NOTE: You can't internationalize this because with some types of errors that would cause an infinite loop. - $self->session->output->print("

    Problem With Request

    - We have encountered a problem with your request. Please use your back button and try again. - If this problem persists, please contact us with what you were trying to do and the time and date of the problem.
    ",1); - $self->session->output->print('
    '.$self->session->setting->get("companyName"),1); - $self->session->output->print('
    '.$self->session->setting->get("companyEmail"),1); - $self->session->output->print('
    '.$self->session->setting->get("companyURL"),1); - } - $self->session->close(); - last WEBGUI_FATAL; -} - - -#------------------------------------------------------------------- - -=head2 getLogger ( ) - -Returns a reference to the logger. - -=cut - -sub getLogger { - my $self = shift; - return $self->{_logger}; -} - - -#------------------------------------------------------------------- - -=head2 getStackTrace ( ) - -Returns a text formatted message containing the current stack trace. - -=cut - -sub getStackTrace { - my $self = shift; - my $i = 2; - my $output; - while (my @data = caller($i)) { - $output .= "\t".join(",",@data)."\n"; - $i++; - } - return $output; -} - - - -#------------------------------------------------------------------- - -=head2 info ( message ) - -Adds an INFO type message to the log. This should be used for informational or status types of messages, such as audit information and FYIs. - -=head3 message - -The message you wish to add to the log. - -=cut - -sub info { - my $self = shift; - return unless $self->canShowDebug || $self->getLogger->is_info; - my $message = shift; - local $Log::Log4perl::caller_depth = $Log::Log4perl::caller_depth + 1; - $self->getLogger->info($message); - $self->{_debug_info} .= $message."\n"; -} - -#------------------------------------------------------------------- - -=head2 new ( session ) - -Constructor. Instanciates a new error handler instance. - -=head3 session - -An active WebGUI::Session object. - -=cut - -sub new { - my $class = shift; - my $session = shift; - Log::Log4perl->init_once( $session->config->getWebguiRoot."/etc/log.conf" ); - my $logger = Log::Log4perl->get_logger($session->config->getFilename); - my $self = bless {_queryCount=>0, _logger=>$logger, _session=>$session}, $class; - weaken( $self->{_session} ); - return $self; -} - -#---------------------------------------------------------------------------- - -=head2 preventDebugOutput ( ) - -Prevent this session from sending debugging output even if we're supposed to. - -Some times we need to use 'text/html' to send non-html content (these may be -browser limitations, but we need to work with them). - -=cut - -sub preventDebugOutput { - my ( $self ) = @_; - $self->{_preventDebugOutput} = 1; -} - -#------------------------------------------------------------------- - -=head2 query ( sql ) - -Logs a sql statement for the debugger output. Keeps track of the #. - -=head3 sql - -A sql statement string. - -=cut - -sub query { - my $self = shift; - return unless $self->canShowDebug || $self->getLogger->is_debug; - my $query = shift; - my $placeholders = shift; - $self->{_queryCount}++; - my $plac; - if (defined $placeholders and ref $placeholders eq "ARRAY" && scalar(@$placeholders)) { - my @placeholders = map {ref $_ ? "$_" : $_} @$placeholders; # stringify objects - $plac = "\n with placeholders: " . JSON->new->encode(\@placeholders); - } - else { - $plac = ''; - } - my $depth = 0; - while (my ($caller) = caller(++$depth)) { - last - unless $caller eq __PACKAGE__ || $caller =~ /^WebGUI::SQL:?/; - } - - $query =~ s/^/ /gms; - $self->{_debug_debug} .= sprintf "query %d - %s(%s) :\n%s%s\n", - $self->{_queryCount}, (caller($depth + 1))[3,2], $query, $plac; - local $Log::Log4perl::caller_depth = $Log::Log4perl::caller_depth + $depth + 1; - $self->getLogger->debug("query $self->{_queryCount}:\n$query$plac"); -} - - - -#------------------------------------------------------------------- - -=head2 security ( message ) - -A convenience function that wraps warn() and includes the current username, user ID, and IP address in addition to the message being logged. - -=head3 message - -The message you wish to add to the log. - -=cut - -sub security { - my $self = shift; - my $message = shift; - $self->warn($self->session->user->username." (".$self->session->user->userId.") connecting from " - .$self->session->env->getIp." attempted to ".$message); -} - - -#------------------------------------------------------------------- - -=head2 session ( ) - -Returns a reference to the current session. - -=cut - -sub session { - my $self = shift; - return $self->{_session}; -} - -#------------------------------------------------------------------- - -=head2 showDebug ( ) - -Creates an HTML formatted string of all internally stored debug information, warns, -errors, sql queries and form data. - -=cut - -sub showDebug { - my $self = shift; - my $output = '
    '; - my $text = $self->{_debug_error}; - $text = encode_entities($text); - $output .= '
    '.$text."
    "; - $text = $self->{_debug_warn}; - $text = encode_entities($text); - $output .= '
    '.$text."
    "; - $text = $self->{_debug_info}; - $text = encode_entities($text); - $output .= '
    '.$text."
    "; - my %form = %{ $self->session->form->paramsHashRef }; - $form{password} = "*******" - if exists $form{password}; - $form{identifier} = "*******" - if exists $form{identifier}; - $text = JSON->new->pretty->encode(\%form); - $text = encode_entities($text); - $output .= '
    '.$text."
    "; - $text = $self->{_debug_debug}; - $text = encode_entities($text); - $output .= '
    '.$text."
    "; - $output .= '
    '; - return $output; -} - - - -#------------------------------------------------------------------- - -=head2 warn ( message ) - -Adds a WARN type message to the log. These events should be things that are potentially severe, but not errors, such as security attempts or ineffiency problems. - -=head3 message - -The message you wish to add to the log. - -=cut - -sub warn { - my $self = shift; - return unless $self->canShowDebug || $self->getLogger->is_warn; - my $message = shift; - local $Log::Log4perl::caller_depth = $Log::Log4perl::caller_depth + 1; - $self->getLogger->warn($message); - $self->{_debug_warn} .= $message."\n"; -} - - -1; - diff --git a/lib/WebGUI/Session/Form.pm b/lib/WebGUI/Session/Form.pm index e96db196c..b1d3d27a4 100644 --- a/lib/WebGUI/Session/Form.pm +++ b/lib/WebGUI/Session/Form.pm @@ -3,7 +3,7 @@ package WebGUI::Session::Form; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -15,8 +15,8 @@ package WebGUI::Session::Form; =cut use strict qw(vars subs); -use WebGUI::HTML; use Encode (); +use Tie::IxHash; use base 'WebGUI::FormValidator'; =head1 NAME @@ -63,6 +63,7 @@ sub AUTOLOAD { my @args = @_; our $AUTOLOAD; my $method = "SUPER::".(split /::/, $AUTOLOAD)[-1]; + return if $method eq 'SUPER::DESTROY'; return $self->$method(@args); } @@ -77,10 +78,7 @@ Returns true if the param is part of the submitted form data, or a URL param. sub hasParam { my $self = shift; my $param = shift; - return undef unless $param; - return undef unless $self->session->request; - my $hashRef = $self->session->request->param(); - return exists $hashRef->{$param}; + return $param && $self->session->request && exists $self->session->request->parameters->{$param}; } @@ -124,15 +122,14 @@ sub param { return undef unless $self->session->request; my $field = shift; if ($field) { - my @data = $self->session->request->param($field); + my @data = $self->session->request->parameters->get_all($field); foreach my $value (@data) { $value = Encode::decode_utf8($value); } return wantarray ? @data : $data[0]; } else { - my $paramRef = $self->session->request->param; - return keys %{ $paramRef }; + return $self->session->request->parameters->keys; } } diff --git a/lib/WebGUI/Session/Http.pm b/lib/WebGUI/Session/Http.pm index c82e707ff..d37a36ec7 100644 --- a/lib/WebGUI/Session/Http.pm +++ b/lib/WebGUI/Session/Http.pm @@ -3,7 +3,7 @@ package WebGUI::Session::Http; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -16,8 +16,14 @@ package WebGUI::Session::Http; use strict; -use WebGUI::Utility; use Scalar::Util qw( weaken blessed ); +use HTTP::Date (); + +sub _deprecated { + my $alt = shift; + my $method = (caller(1))[3]; + Carp::carp("$method is deprecated. Use 'WebGUI::$alt' instead."); +} =head1 NAME @@ -27,6 +33,9 @@ Package WebGUI::Session::Http This package allows the manipulation of HTTP protocol information. +*** This module is deprecated in favor of L and +L. + =head1 SYNOPSIS use WebGUI::Session::Http; @@ -35,16 +44,9 @@ This package allows the manipulation of HTTP protocol information. $http->sendHeader(); - $cookies = $http->getCookies(); - $mimetype = $http->getMimeType(); - $code = $http->getStatus(); - ($code, $description) = $http->getStatus(); - $description = $http->getStatusDescription(); $boolean = $http->isRedirect(); $http->setCookie($name,$value); - $http->setFilename($filename,$mimetype); - $http->setMimeType($mimetype); $http->setNoHeader($bool); $http->setRedirect($url); @@ -54,208 +56,6 @@ These methods are available from this package: =cut -#------------------------------------------------------------------- - -=head2 DESTROY ( ) - -Deconstructor. - -=cut - -sub DESTROY { - my $self = shift; - undef $self; -} - - - -#------------------------------------------------------------------- - -=head2 getCacheControl ( ) - -Returns the cache control setting from this object. - -=cut - -sub getCacheControl { - my $self = shift; - return $self->{_http}{cacheControl} || 1; -} - -#------------------------------------------------------------------- - -=head2 getCookies ( ) - -Retrieves the cookies from the HTTP header and returns a hash reference containing them. - -=cut - -sub getCookies { - my $self = shift; - if ($self->session->request) { - # Have to require this instead of using it otherwise it causes problems for command-line scripts on some platforms (namely Windows) - require APR::Request::Apache2; - my $jarHashRef = eval { APR::Request::Apache2->handle($self->session->request)->jar(); }; - return $jarHashRef if $jarHashRef; - if (blessed $@ and $@->isa('APR::Request::Error')) { - return $@->jar; - } - return {}; - } - else { - return {}; - } -} - - -#------------------------------------------------------------------- - -=head2 getLastModified ( ) - -Returns the stored epoch date when the page as last modified. - -=cut - -sub getLastModified { - my $self = shift; - return $self->{_http}{lastModified}; -} - -#------------------------------------------------------------------- - -=head2 getMimeType ( ) - -Returns the current mime type of the document to be returned. - -=cut - -sub getMimeType { - my $self = shift; - return $self->{_http}{mimetype} || "text/html; charset=UTF-8"; -} - -#------------------------------------------------------------------- - -=head2 getNoHeader ( ) - -Returns whether or not a HTTP header will be printed. - -=cut - -sub getNoHeader { - my $self = shift; - return $self->{_http}{noHeader}; -} - -#------------------------------------------------------------------- - -=head2 getRedirectLocation ( ) - -Return the location that was set via setRedirect - -=cut - -sub getRedirectLocation { - my $self = shift; - return $self->{_http}{location}; -} - - -#------------------------------------------------------------------- - -=head2 getStatus ( ) { - -Returns the current HTTP status code. If no code has been set, -the code returned will be 200. - -=cut - -sub getStatus { - my $self = shift; - $self->{_http}{statusDescription} = $self->{_http}{statusDescription} || "OK"; - my $status = $self->{_http}{status} || "200"; - return $status; -} - - -#------------------------------------------------------------------- - -=head2 getStatusDescription ( ) { - -Returns the current HTTP status description. If no description has -been set, "OK" will be returned. - -=cut - -sub getStatusDescription { - my $self = shift; - return $self->{_http}{statusDescription} || "OK"; -} - - -#------------------------------------------------------------------- - -=head2 getStreamedFile ( ) { - -Returns the location of a file to be streamed thru mod_perl, if one has been set. - -=cut - -sub getStreamedFile { - my $self = shift; - return $self->{_http}{streamlocation} || undef; -} - - -#------------------------------------------------------------------- - -=head2 ifModifiedSince ( epoch [, maxCacheTimeout] ) - -Returns 1 if the epoch is greater than the modified date check. - -=head3 epoch - -The date that the requested content was last modified in epoch format. - -=head3 maxCacheTimeout - -A modifier to the epoch, that allows us to set a maximum timeout where content will appear to -have changed and a new page request will be allowed to be processed. - -=cut - -sub ifModifiedSince { - my $self = shift; - my $epoch = shift; - my $maxCacheTimeout = shift; - require APR::Date; - my $modified = $self->session->request->headers_in->{'If-Modified-Since'}; - return 1 if ($modified eq ""); - $modified = APR::Date::parse_http($modified); - ##Implement a step function that increments the epoch time in integer multiples of - ##the maximum cache time. Used to handle the case where layouts containing macros - ##(like assetproxied Navigations) can be periodically updated. - if ($maxCacheTimeout) { - my $delta = time() - $epoch; - $epoch += $delta - ($delta % $maxCacheTimeout); - } - return ($epoch > $modified); -} - -#------------------------------------------------------------------- - -=head2 isRedirect ( ) - -Returns a boolean value indicating whether the current page will redirect to some other location. - -=cut - -sub isRedirect { - my $self = shift; - return isIn($self->getStatus(), qw(302 301)); -} - - #------------------------------------------------------------------- =head2 new ( session ) @@ -271,84 +71,11 @@ A reference to the current session. sub new { my $class = shift; my $session = shift; - my $self = bless {_session=>$session}, $class; - weaken( $self->{_session} ); - return $self; + my $self = bless { _session => $session }, $class; + weaken $self->{_session}; + return $self; } - -#------------------------------------------------------------------- - -=head2 sendHeader ( ) - -Generates and sends HTTP headers for a response. - -=cut - -sub sendHeader { - my $self = shift; - return undef if ($self->{_http}{noHeader}); - return $self->_sendMinimalHeader unless defined $self->session->db(1); - - my ($request, $datetime, $config, $var) = $self->session->quick(qw(request datetime config var)); - return undef unless $request; - my $userId = $var->get("userId"); - - # send webgui session cookie - my $cookieName = $config->getCookieName; - $self->setCookie($cookieName,$var->getId, $config->getCookieTTL, $config->get("cookieDomain")) unless $var->getId eq $self->getCookies->{$cookieName}; - - $self->setNoHeader(1); - my %params; - if ($self->isRedirect()) { - $request->headers_out->set(Location => $self->getRedirectLocation); - $request->status($self->getStatus); - } else { - $request->content_type($self->getMimeType); - my $cacheControl = $self->getCacheControl; - my $date = ($userId eq "1") ? $datetime->epochToHttp($self->getLastModified) : $datetime->epochToHttp; - # under these circumstances, don't allow caching - if ($userId ne "1" || $cacheControl eq "none" || $self->session->setting->get("preventProxyCache")) { - $request->headers_out->set("Cache-Control" => "private, max-age=1"); - $request->no_cache(1); - } - # in all other cases, set cache, but tell it to ask us every time so we don't mess with recently logged in users - else { - if ( $cacheControl eq "none" ) { - $request->headers_out->set("Cache-Control" => "private, max-age=1"); - $request->no_cache(1); - } - else { - $request->headers_out->set('Last-Modified' => $date); - $request->headers_out->set('Cache-Control' => "must-revalidate, max-age=" . $cacheControl); - } - # do an extra incantation if the HTTP protocol is really old - if ($request->protocol =~ /(\d\.\d)/ && $1 < 1.1) { - my $date = $datetime->epochToHttp(time() + $cacheControl); - $request->headers_out->set('Expires' => $date); - } - } - if ($self->getFilename) { - $request->headers_out->set('Content-Disposition' => qq{attachment; filename="}.$self->getFilename().'"'); - } - $request->status($self->getStatus()); - $request->status_line($self->getStatus().' '.$self->getStatusDescription()); - } - return undef; -} - -sub _sendMinimalHeader { - my $self = shift; - my $request = $self->session->request; - $request->content_type('text/html; charset=UTF-8'); - $request->headers_out->set('Cache-Control' => 'private'); - $request->no_cache(1); - $request->status($self->getStatus()); - $request->status_line($self->getStatus().' '.$self->getStatusDescription()); - return undef; -} - - #------------------------------------------------------------------- =head2 session ( ) @@ -362,6 +89,106 @@ sub session { return $self->{_session}; } + +#------------------------------------------------------------------- + +=head2 getCacheControl ( ) + +Returns the cache control setting from this object. + +=cut + +sub getCacheControl { + my $self = shift; + return $self->session->response->getCacheControl; +} + +#------------------------------------------------------------------- + +=head2 getCookies ( ) + +Retrieves the cookies from the HTTP header and returns a hash reference containing them. + +=cut + +sub getCookies { + my $self = shift; + _deprecated('Session::Request::cookies'); + return $self->session->request->cookies; +} + + +#------------------------------------------------------------------- + +=head2 getLastModified ( ) + +Returns the stored epoch date when the page as last modified. + +=cut + +sub getLastModified { + my $self = shift; + return $self->session->response->getLastModified; +} + +#------------------------------------------------------------------- + +=head2 getNoHeader ( ) + +Returns whether or not a HTTP header will be printed. + +=cut + +sub getNoHeader { + my $self = shift; + return $self->session->response->getNoHeader; +} + +#------------------------------------------------------------------- + +=head2 getStreamedFile ( ) { + +Returns the location of a file to be streamed thru mod_perl, if one has been set. + +=cut + +sub getStreamedFile { + my $self = shift; + _deprecated('Session::Response::getStreamedFile'); + return $self->session->response->getStreamedFile; +} + + +#------------------------------------------------------------------- + +=head2 isRedirect ( ) + +Returns a boolean value indicating whether the current page will redirect to some other location. + +=cut + +sub isRedirect { + my $self = shift; + _deprecated('Session::Response::isRedirect'); + return $self->session->response->isRedirect; +} + + +#------------------------------------------------------------------- + +=head3 sendHeader + +Moved to L. + +=cut + +sub sendHeader { + my $self = shift; + _deprecated('Session::Response::sendHeader'); + $self->session->response->sendHeader(@_); +} + + #------------------------------------------------------------------- =head2 setCacheControl ( timeout ) @@ -376,98 +203,23 @@ Either the number of seconds until the cache expires, or the word "none" to disa sub setCacheControl { my $self = shift; - my $timeout = shift; - $self->{_http}{cacheControl} = $timeout; + _deprecated('Session::Response::setCacheControl'); + $self->session->response->setCacheControl(@_); } #------------------------------------------------------------------- =head2 setCookie ( name, value [ , timeToLive, domain ] ) -Sends a cookie to the browser. - -=head3 name - -The name of the cookie to set. Must be unique from all other cookies from this domain or it will overwrite that cookie. - -=head3 value - -The value to set. - -=head3 timeToLive - -The time that the cookie should remain in the browser. Defaults to "+10y" (10 years from now). -This may be "session" to indicate that the cookie is for the current browser session only. - -=head3 domain - -Explicitly set the domain for this cookie. - -=cut +Moved to L. sub setCookie { my $self = shift; - my $name = shift; - my $value = shift; - my $ttl = shift; - my $domain = shift; - $ttl = (defined $ttl ? $ttl : '+10y'); - - if ($self->session->request) { - require Apache2::Cookie; - my $cookie = Apache2::Cookie->new($self->session->request, - -name=>$name, - -value=>$value, - -path=>'/' - ); - - $cookie->expires($ttl) if $ttl ne 'session'; - $cookie->domain($domain) if ($domain); - $cookie->bake($self->session->request); - } + _deprecated('Session::Request'); + $self->session->response->setCookie(@_); } -#------------------------------------------------------------------- - -=head2 setFilename ( filename [, mimetype] ) - -Override the default filename for the document, which is usually the page url. Usually used with setMimeType(). - -=head3 filename - -The filename to set. - -=head3 mimetype - -The mimetype for this file. Defaults to "application/octet-stream". - -=cut - -sub setFilename { - my $self = shift; - $self->{_http}{filename} = shift; - my $mimetype = shift || "application/octet-stream"; - $self->setMimeType($mimetype); -} - - - -#------------------------------------------------------------------- - -=head2 getFilename ( ) - -Returns the default filename for the document. - -=cut - -sub getFilename { - my $self = shift; - return $self->{_http}{filename}; -} - - - #------------------------------------------------------------------- =head2 setLastModified ( epoch ) @@ -480,27 +232,8 @@ The epoch date when the page was last modified. sub setLastModified { my $self = shift; - my $epoch = shift; - $self->{_http}{lastModified} = $epoch; -} - -#------------------------------------------------------------------- - -=head2 setMimeType ( mimetype ) - -Override mime type for the document, which is defaultly "text/html; charset=UTF-8". Also see setFilename(). - -B By setting the mime type to something other than "text/html" WebGUI will automatically not process the normal page contents. Instead it will return only the content of your Wobject function or Operation. - -=head3 mimetype - -The mime type for the document. - -=cut - -sub setMimeType { - my $self = shift; - $self->{_http}{mimetype} = shift; + _deprecated('Session::Response::setLastModified'); + $self->session->response->setLastModified(@_); } #------------------------------------------------------------------- @@ -518,74 +251,25 @@ Any value other than 0 will disable header printing. sub setNoHeader { my $self = shift; - $self->{_http}{noHeader} = shift; + _deprecated('Session::Response::setNoHeader'); + $self->session->response->setNoHeader(@_); } #------------------------------------------------------------------- =head2 setRedirect ( url, [ type ] ) -Sets the necessary information in the HTTP header to redirect to another URL. - -=head3 url - -The URL to redirect to. To prevent infinite loops, no redirect will be set if -url is the same as the current page, as found through $session->url->page. - -=head3 type - -Defaults to 302 (temporary redirect), but you can optionally set 301 (permanent redirect). +Moved to L. =cut sub setRedirect { my $self = shift; - my $url = shift; - my $type = shift || 302; - my @params = $self->session->form->param; - return undef if ($url eq $self->session->url->page() && scalar(@params) < 1); # prevent redirecting to self - $self->session->errorHandler->info("Redirecting to $url"); - $self->setRedirectLocation($url); - $self->setStatus($type, "Redirect"); - $self->session->style->setMeta({"http-equiv"=>"refresh",content=>"0; URL=".$url}); + _deprecated('Session::Response'); + $self->session->response->setRedirect(@_); } -#------------------------------------------------------------------- - -=head2 setRedirectLocation ( url ) - -Sets the HTTP redirect URL. - -=cut - -sub setRedirectLocation { - my $self = shift; - $self->{_http}{location} = shift; -} - -#------------------------------------------------------------------- - -=head2 setStatus ( code, description ) - -Sets the HTTP status code. - -=head3 code - -An HTTP status code. It is a 3 digit status number. - -=head3 description - -An HTTP status code description. It is a little one line of text that describes the status code. - -=cut - -sub setStatus { - my $self = shift; - $self->{_http}{status} = shift; - $self->{_http}{statusDescription} = shift; -} - #------------------------------------------------------------------- =head2 setStreamedFile ( ) { @@ -596,7 +280,8 @@ Set a file to be streamed thru mod_perl. sub setStreamedFile { my $self = shift; - $self->{_http}{streamlocation} = shift; + _deprecated('Session::Response'); + $self->session->response->setStreamedFile(@_); } diff --git a/lib/WebGUI/Session/Icon.pm b/lib/WebGUI/Session/Icon.pm index 17197d002..922ea34e1 100644 --- a/lib/WebGUI/Session/Icon.pm +++ b/lib/WebGUI/Session/Icon.pm @@ -3,7 +3,7 @@ package WebGUI::Session::Icon; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -16,8 +16,8 @@ package WebGUI::Session::Icon; use strict; use WebGUI::International; -use Scalar::Util qw( weaken ); - +use Tie::IxHash; +use Scalar::Util qw(weaken); =head1 NAME @@ -64,17 +64,107 @@ Returns the base URL for this user's toolbar icon set. sub getBaseURL { my $self = shift; my $url = $self->session->url->extras('toolbar/'); - my $toolbar = $self->session->user->profileField("toolbar"); + my $toolbar = $self->session->user->get("toolbar"); if ($toolbar ne "useLanguageDefault") { $url .= $toolbar; } else { - $url .= WebGUI::International->new($self->session,'Icon')->getLanguage($self->session->user->profileField("language"),"toolbar"); + $url .= WebGUI::International->new($self->session,'Icon')->getLanguage($self->session->user->get("language"),"toolbar"); } $url .= '/'; return $url; } +#------------------------------------------------------------------- + +=head2 _basic ( ) + +Returns a basic icon with i18n title and alt text. + +=head3 $i18n_tag + +The name of an i18n tag to show for the TITLE and ALT properties in the image tag. + +=head3 $icon_name + +The name of an icon, such as delete, edit, manage, moveLeft, etc. See /data/WebGUI/www/extras/toolbar/bullet for a full list. + +=head3 $url_params + +Parameters to append to the URL. + +=head3 $pageURL + +The URL of a page to call. If empty, defaults to the current page which is fine for most operations. + +=cut + +sub _basic { + my $self = shift; + my $i18n_tag = shift; + my $icon_name = shift; + my $url_params = shift; + my $pageURL = shift || $self->session->url->getRequestedUrl; + my $i18n = WebGUI::International->new($self->session,'Icon'); + my $tag = $i18n->get($i18n_tag); + my $output = ''; + $output .= ''.$tag.''; + return $output; +} + +#------------------------------------------------------------------- + +=head2 _form_with_confirmation ( ) + +Generates a form containing an icon. When the icon is clicked, it pops up a confirmation window, and submits +the form if the confirmation is accepted. + +=head3 $i18n_tag + +The name of an i18n tag to show for the TITLE and ALT properties in the image tag. + +=head3 $icon_name + +The name of an icon, such as delete, edit, manage, moveLeft, etc. See /data/WebGUI/www/extras/toolbar/bullet for a full list. + +=head3 $url_params + +Parameters to append to the URL. + +=head3 $pageURL + +The URL of a page to call. If empty, defaults to the current page which is fine for most operations. + +=head3 $confirm + +Text to show to the user in the pop-up confirmation for the action. + +=cut + +sub _form_with_confirmation { + my $self = shift; + my $session = $self->session; + my $i18n_tag = shift; + my $icon_name = shift; + my $url_params = shift; + my $pageURL = shift || $session->url->getRequestedUrl; + my $confirm = shift; + + my $i18n = WebGUI::International->new($session,'Icon'); + my $tag = $i18n->get($i18n_tag); + ##Escape JS characters + $confirm =~ s/([\\\'])/\\$1/g; + use WebGUI::Form; + my $output = WebGUI::Form::formHeader($session, { action => $session->url->append($pageURL,$url_params), }); + $output .= q||; + $output .= ''.$tag.''; + $output .= WebGUI::Form::formFooter(); + return $output; +} + + #------------------------------------------------------------------- =head2 copy ( urlParameters [, pageURL ] ) @@ -93,13 +183,8 @@ file will be prepended to it. =cut sub copy { - my $self = shift; - my $urlParams = shift; - my $pageURL = shift || $self->session->url->getRequestedUrl; - my $i18n = WebGUI::International->new($self->session,'Icon'); - my $output = ''; - $output .= ''.$i18n->get('Copy').''; - return $output; + my $self = shift; + return $self->_basic('Copy', 'copy.gif', @_); } #------------------------------------------------------------------- @@ -120,29 +205,10 @@ file will be prepended to it. =cut sub cut { - my $self = shift; - my $urlParams = shift; - my $pageURL = shift || $self->session->url->getRequestedUrl; - my $i18n = WebGUI::International->new($self->session,'Icon'); - my $output = ''; - $output .= ''.$i18n->get('Cut').''; - return $output; + my $self = shift; + return $self->_basic('Cut', 'cut.gif', @_); } -#------------------------------------------------------------------- - -=head2 DESTROY ( ) - -Deconstructor. - -=cut - -sub DESTROY { - my $self = shift; - undef $self; -} - - #------------------------------------------------------------------- =head2 delete ( urlParameters [, pageURL, confirmText ] ) @@ -181,6 +247,32 @@ sub delete { #------------------------------------------------------------------- +=head2 delete_with_form ( urlParameters [, pageURL, confirmText ] ) + +Generates a button that represents a delete operation inside of a form for CSRF purposes. + +=head3 urlParameters + +Any URL parameters that need to be tacked on to the current URL to accomplish whatever function this button represents. + +=head3 pageURL + +The URL to any page. Defaults to the current page. If a URL is passed, the gateway URL from the site's config +file will be prepended to it. + +=head3 confirmText + +If defined, a confirm box will popup to ask the user if they want to delete. + +=cut + +sub delete_with_form { + my $self = shift; + return $self->_form_with_confirmation('Delete', 'delete.gif', @_); +} + +#------------------------------------------------------------------- + =head2 drag ( extras ) Generates an icon that can be used to drag content. @@ -216,13 +308,8 @@ file will be prepended to it. =cut sub edit { - my $self = shift; - my $urlParams = shift; - my $pageURL = shift || $self->session->url->getRequestedUrl; - my $i18n = WebGUI::International->new($self->session,'Icon'); - my $output = ''; - $output .= ''.$i18n->get('Edit').''; - return $output; + my $self = shift; + return $self->_basic('Edit', 'edit.gif', @_); } #------------------------------------------------------------------- @@ -244,13 +331,8 @@ file will be prepended to it. =cut sub export { - my $self = shift; - my $urlParams = shift; - my $pageURL = shift || $self->session->url->getRequestedUrl; - my $i18n = WebGUI::International->new($self->session,'Icon'); - my $output = ''; - $output .= ''.$i18n->get('Export').''; - return $output; + my $self = shift; + return $self->_basic('Export', 'export.gif', @_); } #------------------------------------------------------------------- @@ -267,7 +349,7 @@ sub getToolbarOptions { my $self = shift; $options{useLanguageDefault} = WebGUI::International->new($self->session,'WebGUI')->get(1084); my $dir = $self->session->config->get("extrasPath")."/toolbar"; - opendir (DIR,$dir) or $self->session->errorHandler->warn("Can't open toolbar directory!: $!"); + opendir (DIR,$dir) or $self->session->log->warn("Can't open toolbar directory!: $!"); my @files = readdir(DIR); foreach my $file (@files) { if (substr($file,0,1) ne ".") { @@ -297,13 +379,8 @@ file will be prepended to it. =cut sub locked { - my $self = shift; - my $urlParams = shift; - my $pageURL = shift || $self->session->url->getRequestedUrl; - my $i18n = WebGUI::International->new($self->session,'Icon'); - my $output = ''; - $output .= ''.$i18n->get('locked').''; - return $output; + my $self = shift; + return $self->_basic('locked', 'locked.gif', @_); } #------------------------------------------------------------------- @@ -325,13 +402,8 @@ file will be prepended to it. =cut sub manage { - my $self = shift; - my $urlParams = shift; - my $pageURL = shift || $self->session->url->getRequestedUrl; - my $i18n = WebGUI::International->new($self->session,'Icon'); - my $output = ''; - $output .= ''.$i18n->get('Manage').''; - return $output; + my $self = shift; + return $self->_basic('Manage', 'manage.gif', @_); } #------------------------------------------------------------------- @@ -353,13 +425,8 @@ file will be prepended to it. =cut sub moveBottom { - my $self = shift; - my $urlParams = shift; - my $pageURL = shift || $self->session->url->getRequestedUrl; - my $i18n = WebGUI::International->new($self->session,'Icon'); - my $output = ''; - $output .= ''.$i18n->get('Move To Bottom').''; - return $output; + my $self = shift; + return $self->_basic('Move To Bottom', 'moveBotom.gif', @_); } #------------------------------------------------------------------- @@ -417,13 +484,8 @@ file will be prepended to it. =cut sub moveLeft { - my $self = shift; - my $urlParams = shift; - my $pageURL = shift || $self->session->url->getRequestedUrl; - my $i18n = WebGUI::International->new($self->session,'Icon'); - my $output = ''; - $output .= ''.$i18n->get('Move Left').''; - return $output; + my $self = shift; + return $self->_basic('Move Left', 'moveLeft.gif', @_); } #------------------------------------------------------------------- @@ -445,13 +507,8 @@ file will be prepended to it. =cut sub moveRight { - my $self = shift; - my $urlParams = shift; - my $pageURL = shift || $self->session->url->getRequestedUrl; - my $i18n = WebGUI::International->new($self->session,'Icon'); - my $output = ''; - $output .= ''.$i18n->get('Move Right').''; - return $output; + my $self = shift; + return $self->_basic('Move Right', 'moveRight.gif', @_); } #------------------------------------------------------------------- @@ -473,13 +530,8 @@ file will be prepended to it. =cut sub moveTop { - my $self = shift; - my $urlParams = shift; - my $pageURL = shift || $self->session->url->getRequestedUrl; - my $i18n = WebGUI::International->new($self->session,'Icon'); - my $output = ''; - $output .= ''.$i18n->get('Move To Top').''; - return $output; + my $self = shift; + return $self->_basic('Move To Top', 'moveTop.gif', @_); } #------------------------------------------------------------------- @@ -534,9 +586,9 @@ A reference to the current session. sub new { my $class = shift; my $session = shift; - my $self = bless {_session=>$session}, $class; - weaken( $self->{_session} ); - return $self; + my $self = bless { _session => $session }, $class; + weaken $self->{_session}; + return $self; } @@ -573,13 +625,8 @@ file will be prepended to it. =cut sub shortcut { - my $self = shift; - my $urlParams = shift; - my $pageURL = shift || $self->session->url->getRequestedUrl; - my $i18n = WebGUI::International->new($self->session,'Icon'); - my $output = ''; - $output .= ''.$i18n->get('Create Shortcut').''; - return $output; + my $self = shift; + return $self->_basic('Create Shortcut', 'shortcut.gif', @_); } #------------------------------------------------------------------- @@ -601,13 +648,8 @@ file will be prepended to it. =cut sub view { - my $self = shift; - my $urlParams = shift; - my $pageURL = shift || $self->session->url->getRequestedUrl; - my $i18n = WebGUI::International->new($self->session,'Icon'); - my $output = ''; - $output .= ''.$i18n->get('View').''; - return $output; + my $self = shift; + return $self->_basic('View', 'view.gif', @_); } diff --git a/lib/WebGUI/Session/Id.pm b/lib/WebGUI/Session/Id.pm index 2bb3bfe0c..18196424a 100644 --- a/lib/WebGUI/Session/Id.pm +++ b/lib/WebGUI/Session/Id.pm @@ -4,7 +4,7 @@ package WebGUI::Session::Id; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -16,12 +16,7 @@ package WebGUI::Session::Id; =cut use strict; -use Digest::MD5; -use Scalar::Util qw( weaken ); -use Time::HiRes qw( gettimeofday usleep ); -use MIME::Base64; - -my $idValidator = qr/^[A-Za-z0-9_-]{22}$/; +use WebGUI::GUID; =head1 NAME @@ -29,6 +24,8 @@ Package WebGUI::Session::Id; =head1 DESCRIPTION +This module is deprecated, and will be removed during the WebGUI 8.x series. + This package generates global unique ids, sometimes called GUIDs. A global unique ID is guaranteed to be unique everywhere and at everytime. B There is no such thing as perfectly unique ID's, but the chances of a duplicate ID are so minute that they are effectively unique. @@ -43,142 +40,23 @@ These methods are available from this class: =cut -#------------------------------------------------------------------- +=head2 new -=head2 DESTROY ( ) - -Deconstructor. - -=cut - -sub DESTROY { - my $self = shift; - undef $self; -} - -#------------------------------------------------------------------- - -=head2 fromHex ( hexId ) - -Returns the guid corresponding to hexId. Converse of toHex. - -=head3 hexId - -Hex value to convert to guid. - -=cut - -sub fromHex { - my $self = shift; - my $hexId = shift; - my $binId = pack( 'H2' x 16, unpack( 'A2' x 16, $hexId ) ); - my $id = substr( encode_base64($binId), 0, 22 ); - $id =~ tr{+/}{_-}; - return $id; -} - -#------------------------------------------------------------------- - -=head2 getValidator - -Get the regular expression used to validate generated GUIDs. This is just to prevent -regular expressions from being duplicated all over the place. - -=cut - -sub getValidator { - return $idValidator; -} - -#------------------------------------------------------------------- - -=head2 generate - -This function generates a global unique id. - -=cut - -sub generate { - my $self = shift; - my($s,$us)=gettimeofday(); - my($v)=sprintf("%09d%06d%10d%06d%255s",rand(999999999),$us,$s,$$,$self->session->config->getFilename); - my $id = Digest::MD5::md5_base64($v); - $id =~ tr{+/}{_-}; - return $id; -} - -#------------------------------------------------------------------- - -=head2 new ( session ) - -Constructor. - -=head3 session - -A reference to the current session. +Object contructor =cut sub new { - my $class = shift; - my $session = shift; - my $self = bless {_session=>$session}, $class; - weaken( $self->{_session} ); - return $self; + my $class = shift; + return bless {}, $class; } -#------------------------------------------------------------------- - -=head2 session ( ) - -Returns a reference to the current session. - -=cut - -sub session { - my $self = shift; - return $self->{_session}; +for my $sub (qw(fromHex getValidator generate toHex valid)) { + no strict 'refs'; + *{$sub} = sub { + goto &{"WebGUI::GUID::$sub"}; + }; } - -#------------------------------------------------------------------- - -=head2 toHex ( guid ) - -Returns the hex value of a guid. For all GUIDs generated by the generate method, the return value will be 32 characters long. For some manually created invalid GUIDs, it may be 33 characters long. - -=head3 guid - -guid to convert to hex value. - -=cut - -sub toHex { - my $self = shift; - my $id = shift; - $id =~ tr{_-}{+/}; - $id .= 'AA'; - my $bin_id = decode_base64($id); - my $hex_id = unpack("H*", $bin_id); - $hex_id =~ s/0{3,4}$//; - return $hex_id -} - - -#------------------------------------------------------------------- - -=head2 valid ( $idString ) - -Returns true if $idString is a valid WebGUI guid. - -=cut - -sub valid { - my ($self, $idString) = @_; - return $idString =~ m/$idValidator/; -} - - 1; - diff --git a/lib/WebGUI/Session/Log.pm b/lib/WebGUI/Session/Log.pm new file mode 100644 index 000000000..1e7eb4dda --- /dev/null +++ b/lib/WebGUI/Session/Log.pm @@ -0,0 +1,301 @@ +package WebGUI::Session::Log; + +=head1 LEGAL + + ------------------------------------------------------------------- + WebGUI is Copyright 2001-2012 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 + ------------------------------------------------------------------- + +=cut + + +use strict; +use WebGUI::Paths; +use WebGUI::Exception; +use Scalar::Util qw(weaken blessed); + +=head1 NAME + +Package WebGUI::Session::Log + +=head1 DESCRIPTION + +This package provides simple but effective error handling, debugging, and logging for WebGUI. + +=head1 SYNOPSIS + + use WebGUI::Session::Log; + + my $log = WebGUI::Session::Log->new($session); + + $log->audit($message); + $log->debug($message); + $log->error($message); + $log->fatal($message); + $log->info($message); + $log->security($message); + $log->warn($message); + + $logger = $log->getLogger; + + $text = $log->getStackTrace; + $html = $log->showDebug; + +=head1 METHODS + +These methods are available from this class: + +=cut + + + +#------------------------------------------------------------------- + +=head2 audit ( message ) + +A convenience function that wraps info() and includes the current username and user ID in addition to the message being logged. + +=head3 message + +Whatever message you wish to insert into the log. + +=cut + +sub audit { + my $self = shift; + my $message = shift; + @_ = ($self, $self->session->user->username." (".$self->session->user->userId.") ".$message); + goto $self->can('info'); +} + +#------------------------------------------------------------------- + +=head2 performanceLogger ( ) + +Returns true if the user meets the conditions to see performance indicators and performance indicators are enabled. + +=cut + +sub performanceLogger { + my $self = shift; + my $request = $self->session->request; + return + unless $request; + my $logger = $request->env->{'webgui.perf.logger'}; + return $logger; +} + + +#------------------------------------------------------------------- + +=head2 debug ( message ) + +Adds a DEBUG type message to the log. These events should be things that are only used for diagnostic purposes. + +=head3 message + +The message you wish to add to the log. + +=cut + +sub debug { + my $self = shift; + my $message = shift; + @_ = ({ level => 'debug', message => $message }); + goto $self->getLogger; +} + +#------------------------------------------------------------------- + +=head2 error ( message ) + +Adds a ERROR type message to the log. These events should be things that are errors that are not fatal. For instance, a non-compiling plug-in or erroneous user input. + +=head3 message + +The message you wish to add to the log. + +=cut + +sub error { + my $self = shift; + my $message = shift; + @_ = ({ level => 'error', message => $message}); + goto $self->getLogger; +} + + +#------------------------------------------------------------------- + +=head2 fatal ( message [, flags] ) + +Adds a FATAL type message to the log, outputs an error message to the user, and forces a close on the session. This should only be called if the system cannot recover from an error, or it would be unsafe to recover from an error like database connectivity problems. + +=head3 message + +The message to use. + +=cut + +sub fatal { + my $self = shift; + my $message = shift; + my $error_obj = shift; + local $Log::Log4perl::caller_depth = $Log::Log4perl::caller_depth + 1; + $self->getLogger->( { level => 'fatal', message => $message} ); + if( blessed $error_obj and $error_obj->can('rethrow') ) { + # Exception::Class objects have valuable stack traces built in to them; rethrow the existing error to preserve that if possible + $error_obj->rethrow; + } else + { + WebGUI::Error::Fatal->throw( error => $message ); + } +} + + +#------------------------------------------------------------------- + +=head2 getLogger ( ) + +Returns a reference to the logger. + +=cut + +sub getLogger { + $_[0]->{_logger}; +} + +#------------------------------------------------------------------- + +=head2 info ( message ) + +Adds an INFO type message to the log. This should be used for informational or status types of messages, such as audit information and FYIs. + +=head3 message + +The message you wish to add to the log. + +=cut + +sub info { + my $self = shift; + my $message = shift; + @_ = ({ level => 'info', message => $message}); + goto $self->getLogger; +} + +#------------------------------------------------------------------- + +=head2 new ( session ) + +Constructor. Instanciates a new error handler instance. + +=head3 session + +An active WebGUI::Session object. + +=cut + +sub new { + my $class = shift; + my $session = shift; + + my $self = bless { _session => $session }, $class; + weaken $self->{_session}; + my $logger = $session->request && $session->request->logger; + if ( !$logger ) { + + # Thanks to Plack, wG has been decoupled from Log4Perl + # However when called outside a web context, we currently still fall back to Log4perl + # (pending a better idea) + require Log::Log4perl; + Log::Log4perl->init_once( WebGUI::Paths->logConfig ); + my $log4perl = Log::Log4perl->get_logger( $session->config->getFilename ); + $logger = sub { + my $args = shift; + my $level = $args->{level}; + local $Log::Log4perl::caller_depth = $Log::Log4perl::caller_depth + 1; + $log4perl->$level( $args->{message} ); + }; + } + $self->{_logger} = $logger; + return $self; +} + +#---------------------------------------------------------------------------- + +=head2 preventDebugOutput ( ) + +Prevent this session from sending debugging output even if we're supposed to. + +Some times we need to use 'text/html' to send non-html content (these may be +browser limitations, but we need to work with them). + +=cut + +sub preventDebugOutput { + my ( $self ) = @_; + $self->{_preventDebugOutput} = 1; +} + +#------------------------------------------------------------------- + +=head2 security ( message ) + +A convenience function that wraps warn() and includes the current username, user ID, and IP address in addition to the message being logged. + +=head3 message + +The message you wish to add to the log. + +=cut + +sub security { + my $self = shift; + my $message = shift; + @_ = ($self, $self->session->user->username." (".$self->session->user->userId.") connecting from " + .$self->session->request->address." attempted to ".$message); + goto $self->can('warn'); +} + + +#------------------------------------------------------------------- + +=head2 session ( ) + +Returns a reference to the current session. + +=cut + +sub session { + my $self = shift; + return $self->{_session}; +} + + +#------------------------------------------------------------------- + +=head2 warn ( message ) + +Adds a WARN type message to the log. These events should be things that are potentially severe, but not errors, such as security attempts or ineffiency problems. + +=head3 message + +The message you wish to add to the log. + +=cut + +sub warn { + my $self = shift; + my $message = shift; + @_ = ({ level => 'warn', message => $message}); + goto $self->getLogger; +} + +1; diff --git a/lib/WebGUI/Session/Os.pm b/lib/WebGUI/Session/Os.pm deleted file mode 100644 index 0ef85f30a..000000000 --- a/lib/WebGUI/Session/Os.pm +++ /dev/null @@ -1,104 +0,0 @@ -package WebGUI::Session::Os; - -=head1 LEGAL - - ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. - ------------------------------------------------------------------- - Please read the legal notices (docs/legal.txt) and the license - (docs/license.txt) that came with this distribution before using - this software. - ------------------------------------------------------------------- - http://www.plainblack.com info@plainblack.com - ------------------------------------------------------------------- - -=cut - -use strict; - -=head1 NAME - -Package WebGUI::Session::Os - -=head1 DESCRIPTION - -This package allows you to reference environment variables. - -=head1 SYNOPSIS - -$os = WebGUI::Session::Os->new; - -$value = $os->get('name'); - -=head1 METHODS - -These methods are available from this package: - -=cut - - -#------------------------------------------------------------------- - -=head2 DESTROY ( ) - -Deconstructor. - -=cut - -sub DESTROY { - my $self = shift; - undef $self; -} - - - -#------------------------------------------------------------------- - -=head2 get( varName ) - -Retrieves the current value of an operating system variable. - -=head3 varName - -The name of the variable. - -=head4 name - -The name of the operating system as reported by perl. - -=head4 type - -Will either be "Windowsish" or "Linuxish", which is often more useful than name because the differences between various flavors of Unix, Linux, and BSD are usually not that significant. - -=cut - -sub get { - my $self = shift; - my $var = shift; - return $self->{_os}{$var}; -} - - -#------------------------------------------------------------------- - -=head2 new ( ) - -Constructor. Returns an OS object. - -=cut - -sub new { - my $class = shift; - my $self = {}; - $self->{_os}{name} = $^O; - if ($self->{_os}{name} =~ /MSWin32/i || $self->{_os}{name} =~ /^Win/i) { - $self->{_os}{type} = "Windowsish"; - } else { - $self->{_os}{type} = "Linuxish"; - } - bless $self, $class; -} - - - -1; diff --git a/lib/WebGUI/Session/Output.pm b/lib/WebGUI/Session/Output.pm index 82f2abeeb..694f0ede8 100644 --- a/lib/WebGUI/Session/Output.pm +++ b/lib/WebGUI/Session/Output.pm @@ -3,7 +3,7 @@ package WebGUI::Session::Output; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -16,7 +16,7 @@ package WebGUI::Session::Output; use strict; use WebGUI::Macro; -use Scalar::Util qw( weaken ); +use Scalar::Util qw(weaken); =head1 NAME @@ -37,20 +37,6 @@ These methods are available from this package: =cut -#------------------------------------------------------------------- - -=head2 DESTROY ( ) - -Deconstructor. - -=cut - -sub DESTROY { - my $self = shift; - undef $self; -} - - #------------------------------------------------------------------- =head2 new ( session ) @@ -66,9 +52,9 @@ A reference to the current session. sub new { my $class = shift; my $session = shift; - my $self = bless {_session=>$session}, $class; - weaken( $self->{_session} ); - return $self; + my $self = bless { _session => $session }, $class; + weaken $self->{_session}; + return $self; } #------------------------------------------------------------------- @@ -91,14 +77,22 @@ has been set to a non-text type, macros will automatically be skipped. sub print { my $self = shift; my $content = shift; - my $skipMacros = shift || !($self->session->http->getMimeType =~ /^text/); + my $skipMacros = shift || !($self->session->response->content_type =~ /^text/); WebGUI::Macro::process($self->session, \$content) unless $skipMacros; my $handle = $self->{_handle}; if (defined $handle) { print $handle $content; } - elsif ($self->session->request) { - $self->session->request->print($content); + elsif ($self->session->response) { + my $response = $self->session->response; + if ($response->streaming) { + $response->stream_write($content); + } else { + # Not streaming, so buffer the response instead + # warn "buffering output"; + $response->body([]) unless $response->body && ref $response->body eq 'ARRAY'; + push @{$response->body}, $content; + } } else { print $content; diff --git a/lib/WebGUI/Session/Privilege.pm b/lib/WebGUI/Session/Privilege.pm index 07c6a9c18..1a2b223a5 100644 --- a/lib/WebGUI/Session/Privilege.pm +++ b/lib/WebGUI/Session/Privilege.pm @@ -3,7 +3,7 @@ package WebGUI::Session::Privilege; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -18,6 +18,7 @@ use strict; use Scalar::Util qw( weaken ); use WebGUI::International; use WebGUI::Operation::Auth; +use Scalar::Util qw(weaken); =head1 NAME @@ -59,27 +60,12 @@ Returns a message stating that this functionality can only be used by administra sub adminOnly { my $self = shift; my $i18n = WebGUI::International->new($self->session); - $self->session->http->setStatus("401", "Admin Only"); + $self->session->response->status(401); my $output = '

    '.$i18n->get(35).'

    '; $output .= $i18n->get(36); return $self->session->style->userStyle($output); } - -#------------------------------------------------------------------- - -=head2 DESTROY ( ) - -Deconstructor. - -=cut - -sub DESTROY { - my $self = shift; - undef $self; -} - - #------------------------------------------------------------------- =head2 insufficient ( ) @@ -92,7 +78,7 @@ sub insufficient { my $self = shift; my $noStyle = shift; my $i18n = WebGUI::International->new($self->session); - $self->session->http->setStatus("401", "Insufficient Privileges"); + $self->session->response->status(401); my $output = '

    '.$i18n->get(37).'

    '; if ($noStyle) { $self->session->style->useEmptyStyle(1); @@ -117,7 +103,7 @@ sub locked { my $self = shift; my $noStyle = shift; my $i18n = WebGUI::International->new($self->session); - $self->session->http->setStatus("401", "Insufficient Privileges"); + $self->session->response->status(401); my $output = '

    '.$i18n->get(37).'

    '; if ($noStyle) { $self->session->style->useEmptyStyle(1); @@ -146,9 +132,9 @@ A reference to the current session. sub new { my $class = shift; my $session = shift; - my $self = bless {_session=>$session}, $class; - weaken( $self->{_session} ); - return $self; + my $self = bless { _session => $session }, $class; + weaken $self->{_session}; + return $self; } @@ -162,7 +148,7 @@ Returns a message stating that the user does not have the privileges necessary t sub noAccess { my $self = shift; - $self->session->http->setStatus("401", "No Access"); + $self->session->response->status(401); if ($self->session->user->isVisitor) { return WebGUI::Operation::Auth::www_auth($self->session, "init"); } else { @@ -185,7 +171,7 @@ Returns a message stating that the user they requested information about is no l sub notMember { my $self = shift; my $i18n = WebGUI::International->new($self->session); - $self->session->http->setStatus("400", "Not A Member"); + $self->session->response->status(400); my ($output); $output = '

    '.$i18n->get(345).'

    '; $output .= $i18n->get(346); @@ -217,7 +203,7 @@ Returns a message stating that the user made a request to delete something that sub vitalComponent { my $self = shift; my $i18n = WebGUI::International->new($self->session); - $self->session->http->setStatus("403", "Vital Component"); + $self->session->response->status(403); my ($output); $output = '

    '.$i18n->get(40).'

    '; $output .= $i18n->get(41); diff --git a/lib/WebGUI/Session/Request.pm b/lib/WebGUI/Session/Request.pm new file mode 100644 index 000000000..2f8defb70 --- /dev/null +++ b/lib/WebGUI/Session/Request.pm @@ -0,0 +1,153 @@ +package WebGUI::Session::Request; +use strict; +use parent qw(Plack::Request); +use WebGUI::Session::Response; +use HTTP::BrowserDetect; + +=head1 SYNOPSIS + + my $session = WebGUI::Session->open(...); + my $request = $session->request; + +=head1 DESCRIPTION + +WebGUI's PSGI request utility class. Sub-classes L. + +An instance of this object is created automatically when the L +is created. + +=head1 METHODS + +=cut + +#------------------------------------------------------------------- + +=head2 browser + +Returns a HTTP::BrowserDetect object for the request. + +=cut + +sub browser { + my $self = shift; + return $self->env->{'webgui.browser'} ||= HTTP::BrowserDetect->new($self->user_agent); +} + +#------------------------------------------------------------------- + +=head2 clientIsSpider ( ) + +Returns true is the client/agent is a spider/indexer or some other non-human interface, determined +by checking the user agent against a list of known spiders. + +=cut + +sub clientIsSpider { + my $self = shift; + + return 1 + if $self->user_agent eq '' + || $self->user_agent =~ /^wre/ + || $self->browser->robot; + return 0; + +} + +#------------------------------------------------------------------- + +=head2 callerIsSearchSite ( ) + +Returns true if the remote address matches a site which is a known indexer or spider. + +=cut + +sub callerIsSearchSite { + + my $self = shift; + my $remoteAddress = $self->address; + + return 1 if $remoteAddress =~ /203\.87\.123\.1../ # Blaiz Enterprise Rawgrunt search + || $remoteAddress =~ /123\.113\.184\.2../ # Unknown Yahoo Robot + || $remoteAddress == ''; + + return 0; + +} + +#------------------------------------------------------------------- + +=head2 ifModifiedSince ( epoch [, maxCacheTimeout] ) + +Returns 1 if the epoch is greater than the modified date check. + +=head3 epoch + +The date that the requested content was last modified in epoch format. + +=head3 maxCacheTimeout + +A modifier to the epoch, that allows us to set a maximum timeout where content will appear to +have changed and a new page request will be allowed to be processed. + +=cut + +sub ifModifiedSince { + my $self = shift; + my $epoch = shift; + my $maxCacheTimeout = shift; + my $modified = $self->header('If-Modified-Since'); + return 1 if ($modified eq ""); + $modified = HTTP::Date::str2time($modified); + ##Implement a step function that increments the epoch time in integer multiples of + ##the maximum cache time. Used to handle the case where layouts containing macros + ##(like assetproxied Navigations) can be periodically updated. + if ($maxCacheTimeout) { + my $delta = time() - $epoch; + $epoch += $delta - ($delta % $maxCacheTimeout); + } + return ($epoch > $modified); +} + +#------------------------------------------------------------------- + +=head2 new_response () + +Creates a new L object. + +N.B. A L object is automatically created when L +is instantiated, so in most cases you will not need to call this method. +See L + +=cut + +sub new_response { + my $self = shift; + return WebGUI::Session::Response->new(@_); +} + +#------------------------------------------------------------------- + +=head2 requestNotViewed ( ) + +Returns true is the client/agent is a spider/indexer or some other non-human interface + +=cut + +sub requestNotViewed { + + my $self = shift; + return $self->clientIsSpider(); + # || $self->callerIsSearchSite(); # this part is currently left out because + # it has minimal effect and does not manage + # IPv6 addresses. it may be useful in the + # future though + +} + + +# This is only temporary +sub TRACE { + shift->env->{'psgi.errors'}->print(join '', @_, "\n"); +} + +1; diff --git a/lib/WebGUI/Session/Response.pm b/lib/WebGUI/Session/Response.pm new file mode 100644 index 000000000..31ba18744 --- /dev/null +++ b/lib/WebGUI/Session/Response.pm @@ -0,0 +1,376 @@ +package WebGUI::Session::Response; + +use strict; +use warnings; + +use parent qw(Plack::Response); + +use IO::File::WithPath; +use Class::C3; +use LWP::MediaTypes; + +use Plack::Util::Accessor qw(session streaming writer streamer); + +=head1 SYNOPSIS + + my $session = WebGUI::Session->open(...); + my $response = $session->response; + +=head1 DESCRIPTION + +WebGUI's PSGI response utility class. Sub-classes L. + +An instance of this object is created automatically when the L +is created. + +=cut + +=head2 stream + +=cut + +sub stream { + my $self = shift; + $self->streamer(shift); + $self->streaming(1); +} + +=head2 stream_write + +=cut + +sub stream_write { + my $self = shift; + if (!$self->streaming) { + Carp::carp("stream_write can only be called inside streaming response"); + return; + } + $self->writer->write(@_); +} + +=head2 sendHeader ( ) + +Generates and sends HTTP headers for a response. + +=cut + +sub sendHeader { + my $self = shift; + return undef if $self->{_http}{noHeader}; + return $self->_sendMinimalHeader unless defined $self->session->db(1); + + no warnings 'uninitialized'; + + my $session = $self->session; + my ($request, $config) = $session->quick(qw(request config )); + return undef unless $request; + my $userId = $session->get("userId"); + + # send webgui session cookie + my $cookieName = $config->getCookieName; + $self->setCookie($cookieName, $session->getId, $config->getCookieTTL, $config->get("cookieDomain")) unless $session->getId eq $request->cookies->{$cookieName}; + + $self->setNoHeader(1); + my %params; + if (!$self->isRedirect()) { + my $cacheControl = $self->getCacheControl; + my $date = ($userId eq "1") ? HTTP::Date::time2str($self->getLastModified) : HTTP::Date::time2str(); + # under these circumstances, don't allow caching + if ($userId ne "1" || $cacheControl eq "none" || $self->session->setting->get("preventProxyCache")) { + $self->header( + "Cache-Control" => "private, max-age=1", + "Pragma" => "no-cache", + "Cache-Control" => "no-cache", + ); + } + # in all other cases, set cache, but tell it to ask us every time so we don't mess with recently logged in users + else { + if ( $cacheControl eq "none" ) { + $self->header("Cache-Control" => "private, max-age=1"); + } + else { + $self->header( + 'Last-Modified' => $date, + 'Cache-Control' => "must-revalidate, max-age=" . $cacheControl, + ); + } + # do an extra incantation if the HTTP protocol is really old + if ($request->protocol =~ /(\d\.\d)/ && $1 < 1.1) { + my $date = HTTP::Date::time2str(time() + $cacheControl); + $self->header( 'Expires' => $date ); + } + } + } + return undef; +} + +sub _sendMinimalHeader { + my $self = shift; + $self->content_type('text/html; charset=UTF-8'); + $self->header( + 'Cache-Control' => 'private', + "Pragma" => "no-cache", + "Cache-Control" => "no-cache", + ); + return undef; +} + +=head2 setCookie ( name, value [ , timeToLive, domain ] ) + +Sends a cookie to the browser. + +=head3 name + +The name of the cookie to set. Must be unique from all other cookies from this domain or it will overwrite that cookie. + +=head3 value + +The value to set. + +=head3 timeToLive + +The time that the cookie should remain in the browser. Defaults to "+10y" (10 years from now). +This may be "session" to indicate that the cookie is for the current browser session only. + +=head3 domain + +Explicitly set the domain for this cookie. + +=cut + +sub setCookie { + my $self = shift; + my $name = shift; + my $value = shift; + my $ttl = shift; + my $domain = shift; + $ttl = (defined $ttl ? $ttl : '+10y'); + + $self->cookies->{$name} = { + value => $value, + path => '/', + expires => $ttl ne 'session' ? $ttl : undef, + domain => $domain, + }; +} + +=head2 setRedirect ( url, [ type ] ) + +Sets the necessary information in the HTTP header to redirect to another URL. + +=head3 url + +The URL to redirect to. To prevent infinite loops, no redirect will be set if +url is the same as the current page, as found through $session->url->page. + +=head3 type + +Defaults to 302 (temporary redirect), but you can optionally set 301 (permanent redirect). + +=cut + +sub setRedirect { + my $self = shift; + my $url = shift || ''; + my $type = shift || 302; + my @params = $self->session->form->param; + return undef if ($url eq $self->session->url->page() && scalar(@params) < 1); # prevent redirecting to self + $self->session->log->info("Redirecting to $url"); + $self->location($url); + $self->status($type); + $self->session->style->setMeta({"http-equiv"=>"refresh",content=>"0; URL=".$url}); +} + +=head2 getLastModified ( ) + +Returns the stored epoch date when the page as last modified. + +=cut + +sub getLastModified { + my $self = shift; + return $self->{_http}{lastModified}; +} + +=head2 setLastModified ( epoch ) + +=head3 epoch + +The epoch date when the page was last modified. + +=cut + +sub setLastModified { + my $self = shift; + my $epoch = shift; + $self->{_http}{lastModified} = $epoch; +} + +=head2 getNoHeader ( ) + +Returns whether or not a HTTP header will be printed. + +=cut + +sub getNoHeader { + my $self = shift; + return $self->{_http}{noHeader}; +} + +=head2 setNoHeader ( boolean ) + +Disables the printing of a HTTP header. Useful in situations when content is not +returned to a browser (export to disk for example). + +=head3 boolean + +Any value other than 0 will disable header printing. + +=cut + +sub setNoHeader { + my $self = shift; + $self->{_http}{noHeader} = shift; +} + +=head2 isRedirect ( ) + +Returns a boolean value indicating whether the current page will redirect to some other location. + +=cut + +sub isRedirect { + my $self = shift; + my $status = $self->status; + return $status == 302 || $status == 301; +} + +=head2 getStreamedFile ( ) { + +Returns the location of a file to be streamed thru mod_perl, if one has been set. + +=cut + +sub getStreamedFile { + my $self = shift; + return $self->{_http}{streamlocation} || undef; +} + +=head2 setStreamedFile ( ) { + +Set a file to be streamed. + +Requires that C be set in the config file and then +some middleware or reverse-proxy in front of L to catch the X-Sendfile +headers and replace that with the file to be sent. + +=cut + +sub setStreamedFile { + my $self = shift; + my $fn = shift; + + if( ! defined $fn or ! length $fn ) { + # t/Session/Http.t tests that it can call this with '' as an arg + # really, it looks like it is testing implementation rather than behavior but I don't know what behavior it's getting at so, voodoo + $self->body(undef); + $self->{_http}{streamlocation} = undef; + return; + } + + $self->{_http}{streamlocation} = $fn; + + # return undef unless $self->session->config->get('enableStreamingUploads'); # throw an error? handle gracefully? XX + + my $fh = eval { IO::File::WithPath->new( $fn ) } or WebGUI::Error::InvalidFile->throw( + error => "Couldn't create an IO::File::WithPath object: $@ $!", + brokenFile => $fn, + ); + + $self->body( $fh ); + + 1; + +} + +=head2 sendFile ( ) { + +Either redirect (C) or trigger a stream (C) depending on how L is configured. +If C is set in the config file, C is used. + +=cut + +# $session->response->sendFile($self->getStorageLocation, $self->filename); + + +sub sendFile { + my $self = shift; + my $storage = shift; + my $filename = shift; + if( $self->session->config->get('enableStreamingUploads') ) { + $self->setStreamedFile( $storage->getPath($filename) ); + } + else { + $self->setRedirect( $storage->getUrl($filename) ); + } + 1; +} + +=head2 setCacheControl ( timeout ) + +Sets the cache control headers. + +=head3 timeout + +Either the number of seconds until the cache expires, or the word "none" to disable cache completely for this request. + +=cut + +sub setCacheControl { + my $self = shift; + my $timeout = shift; + $self->{_http}{cacheControl} = $timeout; +} + +=head2 getCacheControl ( ) + +Returns the cache control setting from this object. + +=cut + +sub getCacheControl { + my $self = shift; + return $self->{_http}{cacheControl} || 1; +} + +=head2 finalize ( ) + +Subclasses Plack::Response C, doing L specific finalization chores. + +=cut + +sub finalize { + + my $self = shift; + + my $filename = $self->getStreamedFile(); + if (defined $filename and $self->session->config->get("enableStreamingUploads") ) { + # at this point, $request->body contains an IO::File::WithPath object, and that's all Plack needs + my $ct = LWP::MediaTypes::guess_media_type($filename); + $self->content_type($ct); + } + + # in the future, sendHeader's logic should be moved into here and sendHeader should vanish. + # the rest of WebGUI should essentially never need to call sendHeader explicitly but should + # just call methods in here to configure the response and then return back up to the top where + # WebGUI.pm calls finalize and returns the response object back to Plack. + # for now, I've added this extra (harmless) call to sendHeader to get started on removing the + # others. + + $self->sendHeader(); # doesn't send the header, only fixes the response up based on options set + + $self->next::method(@_); + +} + +1; diff --git a/lib/WebGUI/Session/Scratch.pm b/lib/WebGUI/Session/Scratch.pm index 6469b5673..4af11db5d 100644 --- a/lib/WebGUI/Session/Scratch.pm +++ b/lib/WebGUI/Session/Scratch.pm @@ -3,7 +3,7 @@ package WebGUI::Session::Scratch; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -16,7 +16,7 @@ package WebGUI::Session::Scratch; use strict; use WebGUI::International; -use Scalar::Util qw( weaken ); +use Scalar::Util qw(weaken); =head1 NAME @@ -64,7 +64,10 @@ sub delete { my $name = shift; return undef unless ($name); my $value = delete $self->{_data}{$name}; - $self->session->db->write("delete from userSessionScratch where name=? and sessionId=?", [$name, $self->session->getId]); + my $session = $self->session; + my $id = $session->getId; + $session->cache->set("sessionscratch_".$id, $self->{_data}, $session->setting->get('sessionTimeout')); + $session->db->write("delete from userSessionScratch where name=? and sessionId=?", [$name, $id]); return $value; } @@ -80,7 +83,10 @@ Deletes all scratch variables for this session. sub deleteAll { my $self = shift; delete $self->{_data}; - $self->session->db->write("delete from userSessionScratch where sessionId=?", [$self->session->getId]); + my $session = $self->session; + my $id = $session->getId; + $session->cache->remove("sessionscratch_".$id); + $session->db->write("delete from userSessionScratch where sessionId=?", [$id]); } @@ -101,7 +107,9 @@ sub deleteName { my $name = shift; return undef unless ($name); delete $self->{_data}{$name}; - $self->session->db->write("delete from userSessionScratch where name=?", [$name]); + my $session = $self->session; + $session->cache->clear; + $session->db->write("delete from userSessionScratch where name=?", [$name]); } #------------------------------------------------------------------- @@ -126,24 +134,11 @@ sub deleteNameByValue { my $value = shift; return undef unless ($name and defined $value); delete $self->{_data}{$name} if ($self->{_data}{$name} eq $value); - $self->session->db->write("delete from userSessionScratch where name=? and value=?", [$name,$value]); + my $session = $self->session; + $session->cache->clear; + $session->db->write("delete from userSessionScratch where name=? and value=?", [$name,$value]); } - -#------------------------------------------------------------------- - -=head2 DESTROY ( ) - -Deconstructor. - -=cut - -sub DESTROY { - my $self = shift; - undef $self; -} - - #------------------------------------------------------------------- =head2 get( varName ) @@ -157,8 +152,7 @@ The name of the variable. =cut sub get { - my $self = shift; - my $var = shift; + my ($self, $var) = @_; return $self->{_data}{$var}; } @@ -189,12 +183,15 @@ The current session. =cut sub new { - my $class = shift; - my $session = shift; - my $data = $session->db->buildHashRef("select name,value from userSessionScratch where sessionId=?",[$session->getId], {noOrder => 1}); - my $self = bless {_session=>$session, _data=>$data}, $class; - weaken( $self->{_session} ); - return $self; + my ($class, $session) = @_; + my $self = bless { _session => $session }, $class; + weaken $self->{_session}; + my $scratch = $session->cache->get("sessionscratch_".$session->getId); + unless (ref $scratch eq "HASH") { + $scratch = $session->db->buildHashRef("select name,value from userSessionScratch where sessionId=?",[$session->getId], {noOrder => 1}); + } + $self->{_data} = $scratch; + return $self; } #------------------------------------------------------------------- @@ -240,12 +237,13 @@ The value of the scratch variable. Must be a string no longer than 16000 charac =cut sub set { - my $self = shift; - my $name = shift; - my $value = shift; + my ($self, $name, $value) = @_; return undef unless ($name); $self->{_data}{$name} = $value; - $self->session->db->write("insert into userSessionScratch (sessionId, name, value) values (?,?,?) on duplicate key update value=VALUES(value)", [$self->session->getId, $name, $value]); + my $session = $self->session; + my $id = $session->getId; + $session->cache->set("sessionscratch_".$id, $self->{_data}, $session->setting->get('sessionTimeout')); + $session->db->write("replace into userSessionScratch (sessionId, name, value) values (?,?,?)", [$id, $name, $value]); } #---------------------------------------------------------------------- diff --git a/lib/WebGUI/Session/Setting.pm b/lib/WebGUI/Session/Setting.pm index f5915a518..8264648a6 100644 --- a/lib/WebGUI/Session/Setting.pm +++ b/lib/WebGUI/Session/Setting.pm @@ -3,7 +3,7 @@ package WebGUI::Session::Setting; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -15,7 +15,7 @@ package WebGUI::Session::Setting; =cut use strict; -use Scalar::Util qw( weaken ); +use Scalar::Util qw(weaken); =head1 NAME @@ -68,21 +68,6 @@ sub add { $self->set(@_); } -#------------------------------------------------------------------- - -=head2 DESTROY ( ) - -Deconstructor. - -=cut - -sub DESTROY { - my $self = shift; - undef $self; -} - - - #------------------------------------------------------------------- =head2 get ( $param ) @@ -146,10 +131,10 @@ A reference to the current WebGUI::Session. sub new { my $class = shift; my $session = shift; - my $settings = $session->db->buildHashRef("select * from settings", [], {noOrder => 1}); - my $self = bless {_settings=>$settings, _session=>$session}, $class; - weaken( $self->{_session} ); - return $self; + my $self = bless { _session => $session }, $class; + weaken $self->{_session}; + $self->{_settings} = $session->db->buildHashRef("select * from settings", [], {noOrder => 1}); + return $self; } diff --git a/lib/WebGUI/Session/Stow.pm b/lib/WebGUI/Session/Stow.pm index af81419e7..4055f0c42 100644 --- a/lib/WebGUI/Session/Stow.pm +++ b/lib/WebGUI/Session/Stow.pm @@ -3,7 +3,7 @@ package WebGUI::Session::Stow; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -15,7 +15,7 @@ package WebGUI::Session::Stow; =cut use strict; -use Scalar::Util qw( weaken ); +use Scalar::Util qw(weaken); =head1 NAME @@ -78,20 +78,6 @@ sub deleteAll { } -#------------------------------------------------------------------- - -=head2 DESTROY ( ) - -Deconstructor. - -=cut - -sub DESTROY { - my $self = shift; - undef $self; -} - - #------------------------------------------------------------------- =head2 get( varName ) @@ -119,7 +105,6 @@ sub get { my $self = shift; my $var = shift; my $opt = shift || {}; - return undef if $self->session->config->get("disableCache"); my $value = $self->{_data}{$var}; return undef unless defined $value; my $ref = ref $value; @@ -157,9 +142,9 @@ A reference to the session. sub new { my $class = shift; my $session = shift; - my $self = bless {_session=>$session}, $class; - weaken( $self->{_session} ); - return $self; + my $self = bless { _session => $session }, $class; + weaken $self->{_session}; + return $self; } @@ -193,8 +178,6 @@ The value of the stow variable. Any scalar or reference. sub set { my $self = shift; - $self->session->errorHandler->debug('Stow->set() is being called but cache has been disabled') - if $self->session->config->get("disableCache"); my $name = shift; my $value = shift; return undef unless ($name); diff --git a/lib/WebGUI/Session/Style.pm b/lib/WebGUI/Session/Style.pm index 3d351670e..5595544d0 100644 --- a/lib/WebGUI/Session/Style.pm +++ b/lib/WebGUI/Session/Style.pm @@ -3,7 +3,7 @@ package WebGUI::Session::Style; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -16,13 +16,13 @@ package WebGUI::Session::Style; use strict; -use Tie::CPHash; use Scalar::Util qw( weaken ); use WebGUI::International; use WebGUI::Macro; -use WebGUI::Asset::Template; -eval { require WebGUI; import WebGUI; }; +require WebGUI::Asset; +BEGIN { eval { require WebGUI; WebGUI->import } } use HTML::Entities (); +use Scalar::Util qw(weaken); =head1 NAME @@ -57,19 +57,6 @@ These methods are available from this class: #------------------------------------------------------------------- -=head2 DESTROY ( ) - -Deconstructor. - -=cut - -sub DESTROY { - my $self = shift; - undef $self; -} - -#------------------------------------------------------------------- - sub _generateAdditionalTags { my $var = shift; return sub { @@ -123,25 +110,6 @@ sub makePrintable { #------------------------------------------------------------------- -=head2 mobileBrowser ( ) - -Returns true if the user's browser matches any of the mobile browsers set in the config file. - -=cut - -sub mobileBrowser { - my $self = shift; - my $session = $self->session; - my $ua = $session->env->get('HTTP_USER_AGENT'); - for my $mobileUA (@{ $session->config->get('mobileUserAgents') }) { - if ($ua =~ m/$mobileUA/) { - return 1; - } - } -} - -#------------------------------------------------------------------- - =head2 useMobileStyle Returns a true value if we are on a mobile display. @@ -162,7 +130,7 @@ sub useMobileStyle { if (! $session->setting->get('useMobileStyle')) { return $self->{_useMobileStyle} = 0; } - if ($self->mobileBrowser) { + if ($session->request->browser->mobile) { return $self->{_useMobileStyle} = 1; } return $self->{_useMobileStyle} = 0; @@ -198,9 +166,9 @@ A reference to the current session. sub new { my $class = shift; my $session = shift; - my $self = bless {_session=>$session}, $class; - weaken( $self->{_session} ); - return $self; + my $self = bless { _session => $session}, $class; + weaken $self->{_session}; + return $self; } #------------------------------------------------------------------- @@ -274,23 +242,34 @@ if ($self->session->user->isRegistered || $self->session->setting->get("preventP '; - $self->session->http->setCacheControl("none"); + $self->session->response->setCacheControl("none"); } else { $var{'head.tags'} .= '' } + + # Give the API jocks something to use + if ( $session->asset ) { + $var{'head.tags'} .= sprintf <<'ADMINJS', $session->asset->getId + +ADMINJS + } + # Removing the newlines will probably annoy people. # Perhaps turn it off under debug mode? - $var{'head.tags'} =~ s/\n//g; + #$var{'head.tags'} =~ s/\n//g; # head.tags = head_attachments . body_attachments # keeping head.tags for backwards compatibility $var{'head_attachments'} = $var{'head.tags'}; $var{'head.tags'} .= ($var{'body_attachments'} = ''); - my $style = WebGUI::Asset::Template->new($self->session,$templateId); + my $style = eval { WebGUI::Asset->newById($self->session, $templateId); }; my $output; - if (defined $style) { + if (! Exception::Class->caught()) { my $meta = {}; if ($self->session->setting->get("metaDataEnabled")) { $meta = $style->getMetaDataFields(); @@ -349,6 +328,27 @@ sub sent { #------------------------------------------------------------------- +=head2 setCss ( url ) + +Sets a tag into the of this rendered page for this page +view. This is a shortcut for setLink with the parameters set for the +standard CSS defaults + +=head3 url + +The URL to the stylesheet you are linking. Only one link can be set per url. If a link to this URL exists, +the old link will remain and this method will return undef. + +=cut + +sub setCss { + my $self = shift; + my $url = shift; + return $self->setLink($url, { type=>'text/css', rel=>"stylesheet" }); +} + +#------------------------------------------------------------------- + =head2 setLink ( url, params ) Sets a tag into the of this rendered page for this page @@ -493,6 +493,7 @@ The URL to your script. =head3 params A hash reference containing the additional parameters to include in the script tag, such as "type" and "language". +Defaults to { type => 'text/javascript' } if omitted. =head3 inBody @@ -504,7 +505,10 @@ body_attachments variable instead of to head_attachments. sub setScript { my $self = shift; my $url = shift; - my $params = shift; + my $params = shift || { type => 'text/javascript', }; + if (! exists $params->{type}) { + $params->{type} = 'text/javascript'; + } my $inBody = shift; return undef if ($self->{_javascript}{$url}); my $tag = '\r\n\r\n\r\n',0,1,0,1285124165,'',0),('Ik9HHky10DIyFTKehUD1dw',1222803478,'3','pbversion0000000000001','approved','Prompt','Prompt','root/import/prompt','3','7','12',NULL,0,0,0,0,0,317,NULL,0,1,0,1242380149,NULL,0),('BmLaN4rmAANkCglXUViEbg',1222803871,'3','pbversion0000000000001','approved','Resource','Resource','root/import/projectmanager/resource','3','12','12',NULL,0,0,0,0,0,346,NULL,0,1,0,1242380147,NULL,0),('X7DrzUcj8pOKFa_6k9D5iw',1222804045,'3','pbversion0000000000001','approved','Newsletter','Newsletter','root/import/newsletter','3','12','3',NULL,0,0,0,0,0,329,NULL,0,1,0,1242380165,NULL,0),('7-0-style0000000000059',1213386091,'3','pbversion0000000000001','approved','main_top.jpg','main_top.jpg','style3/main_top.jpg','3','7','12',NULL,0,0,0,0,0,3594,NULL,0,1,0,1242380144,NULL,0),('CalendarPrintEvent0001',1215396964,'3','pbversion0000000000001','approved','Default Calendar Print Event','Default Calendar Print Event','root/import/calendar-templates/default-calendar-print-event','3','7','12',NULL,0,0,0,0,0,4202,' \r\n',0,1,0,1285124160,'',0),('o_pq_e4vRyhMOKFzs61eag',1215714957,'3','pbversion0000000000001','approved','book-covers.jpg','book-covers.jpg','documentation/book-covers.jpg','3','7','3',NULL,0,1,0,0,0,106078,NULL,0,0,0,1301974028,NULL,0),('jnYdqDkUR8x7Pv2eGR1qTA',1216250666,'3','pbversion0000000000001','approved','Thingy Templates','Thingy Templates','root/import/thingy-templates','3','7','12',NULL,0,1,0,0,0,347,NULL,0,1,0,1242380149,NULL,0),('5m5I7__l40C4hhv4ydqAHQ',1216227786,'3','pbversion0000000000001','approved','thingy-ie.css','thingy-ie.css','root/import/thingy-templates/thingy-ie.css','3','7','12',NULL,0,1,0,0,0,1329,NULL,0,1,0,1285124168,NULL,0),('pV7GnZdpjR3XpZaSINIoeg',1222803347,'3','pbversion0000000000001','approved','gantt','gantt','root/import/projectmanager/gantt','3','7','12',NULL,0,0,0,0,0,336,NULL,0,1,0,1242380162,NULL,0),('9A-mg2gwWmaYi9o_1C7ArQ',1222803338,'3','pbversion0000000000001','approved','dashboard','dashboard','root/import/projectmanager/dashboard','3','7','12',NULL,0,0,0,0,0,348,NULL,0,1,0,1242380146,NULL,0),('yD1SMHelczihzjEmx6eXBA',1222803342,'3','pbversion0000000000001','approved','editTask','editTask','root/import/projectmanager/edittask','3','7','12',NULL,0,0,0,0,0,345,NULL,0,1,0,1242380165,NULL,0),('BFfNj5wA9bDw8H3cnr8pTw',1247046273,'3','pbversion0000000000001','approved','Navigation','Navigation','root/import/navigation','3','7','12',NULL,0,0,0,0,0,329,NULL,0,1,0,1247779656,NULL,0),('PBtmpl0000000000000094',1220655703,'3','pbversion0000000000001','approved','News','News','plainblacknews','3','7','12',NULL,0,1,0,0,0,6236,'\r\n\r\n\r\n',0,1,0,1285124163,'',0),('1XOJDcg_ITRYwVM-QnIcPw',1219175575,'3','pbversion0000000000001','approved','shelf.css','shelf.css','root/import/shelf2/shelf.css','3','7','12',NULL,0,1,0,0,0,2431,NULL,0,1,0,1285124168,NULL,0),('aNNC62qLAS6TB-0_MCYjsw',1246969327,'3','pbversion0000000000001','approved','Layout','Layout','root/import/layout','3','7','12',NULL,0,0,0,0,0,317,NULL,0,1,0,1247779656,NULL,0),('huASapWvFDzqwOSbcN-JFQ',1222803313,'3','pbversion0000000000001','approved','user','user','root/import/timetracking/user','3','7','12',NULL,0,0,0,0,0,331,NULL,0,1,0,1242380149,NULL,0),('lo1ac3BsoJx3ijGQ3gR-bQ',1222803309,'3','pbversion0000000000001','approved','row','row','root/import/timetracking/row','3','7','12',NULL,0,0,0,0,0,328,NULL,0,1,0,1242380150,NULL,0),('zyWi26q9na-iiZqL4yedog',1222803114,'3','pbversion0000000000001','approved','Macro','Macro','root/import/macro','3','7','12',NULL,0,1,0,0,0,314,NULL,0,1,0,1242380165,NULL,0),('tBL7BWiQRZFed2Y-Zjo9tQ',1222803200,'3','pbversion0000000000001','approved','AdminToggle','AdminToggle','root/import/macro/admintoggle','3','7','12',NULL,0,0,0,0,0,345,NULL,0,1,0,1242380163,NULL,0),('GdkQpvjRtJqtzOUbwIIQRA',1222803205,'3','pbversion0000000000001','approved','a_account','a_account','root/import/macro/a_account','3','7','12',NULL,0,0,0,0,0,339,NULL,0,1,0,1242380149,NULL,0),('tnc5iYyynX2hfdEs9D3P8w',1222803213,'3','pbversion0000000000001','approved','EditableToggle','EditableToggle','root/import/macro/editabletoggle','3','7','12',NULL,0,0,0,0,0,354,NULL,0,1,0,1242380164,NULL,0),('vgXdBcFTqU7h4wBG1ewdBw',1222803217,'3','pbversion0000000000001','approved','File','File','root/import/macro/file','3','7','12',NULL,0,0,0,0,0,324,NULL,0,1,0,1242380164,NULL,0),('hcFlqnXlsmC1ujN6Id0F0A',1222803234,'3','pbversion0000000000001','approved','GroupAdd','GroupAdd','root/import/macro/groupadd','3','7','12',NULL,0,0,0,0,0,336,NULL,0,1,0,1242380149,NULL,0),('eRJR52fvlaxfetv3DQkQYw',1222803238,'3','pbversion0000000000001','approved','GroupDelete','GroupDelete','root/import/macro/groupdelete','3','7','12',NULL,0,0,0,0,0,345,NULL,0,1,0,1242380148,NULL,0),('5HIDHq5lAWHV5gpYGS0zLg',1222803244,'3','pbversion0000000000001','approved','H_homeLink','H_homeLink','root/import/macro/h_homelink','3','7','12',NULL,0,0,0,0,0,342,NULL,0,1,0,1242380142,NULL,0),('rYEFwXXo0tkGhQTcbDibvg',1222803249,'3','pbversion0000000000001','approved','LoginToggle','LoginToggle','root/import/macro/logintoggle','3','7','12',NULL,0,0,0,0,0,345,NULL,0,1,0,1242380162,NULL,0),('-WM2dt0ZGpDasuL2wWocxg',1222803056,'3','pbversion0000000000001','approved','ProjectManager','ProjectManager','root/import/projectmanager','3','7','12',NULL,0,1,0,0,0,341,NULL,0,1,0,1242380141,NULL,0),('2OcUWHVsu_L1sDFzIMWYqw',1222803070,'3','pbversion0000000000001','approved','TimeTracking','TimeTracking','root/import/timetracking','3','7','12',NULL,0,1,0,0,0,335,NULL,0,1,0,1242380141,NULL,0),('vTymIDYL2YqEh6PV50F7ew',1222803302,'3','pbversion0000000000001','approved','manager','manager','root/import/timetracking/manager','3','7','12',NULL,0,0,0,0,0,340,NULL,0,1,0,1242380164,NULL,0),('nqNbSUAhk9Vd1zda2SCz9A',1222803258,'3','pbversion0000000000001','approved','RandomThread','RandomThread','root/import/macro/randomthread','3','7','12',NULL,0,0,0,0,0,348,NULL,0,1,0,1242380151,NULL,0),('y8XkRdxIperLKkJ3bL5sSQ',1222803264,'3','pbversion0000000000001','approved','r_printable','r_printable','root/import/macro/r_printable','3','7','12',NULL,0,0,0,0,0,345,NULL,0,1,0,1242380165,NULL,0),('V3l5S5TtI7wMm1WpIMhvOA',1222803253,'3','pbversion0000000000001','approved','L_loginBox','L_loginBox','root/import/macro/l_loginbox','3','7','12',NULL,0,0,0,0,0,342,NULL,0,1,0,1242380164,NULL,0),('newslettersubscrip0001',1221692339,'3','pbversion0000000000001','approved','My Subscriptions (default)',' My Subscriptions','newslettermysubscriptionstemplate','3','7','3',NULL,0,0,0,0,0,1184,NULL,0,1,0,1285124167,NULL,0),('UL-ItI4L1Z6-WSuhuXVvsQ',1225139673,'3','pbversion0000000000001','approved','DataTable','DataTable','root/import/datatable','3','7','3',NULL,0,0,0,0,0,325,NULL,0,1,0,1242380164,NULL,0),('7-0-style0000000000049',1224117144,'3','pbversion0000000000001','approved','WebGUI 7 Style 3','WebGUI 7 Style 3','root/import/webgui-7-style-3','3','7','12',NULL,0,0,0,0,0,347,NULL,0,1,0,1242380144,NULL,0),('stevecoolmenu000000001',1224116942,'3','pbversion0000000000001','approved','Site Nav','Site Nav','webgui7/style3/hierarchical-top-nav','3','7','12',NULL,0,0,0,0,0,3754,'\r\n\r\n\r\n\r\n',0,1,0,1285124167,'',0),('7-0-style0000000000051',1224117026,'3','pbversion0000000000001','approved','css03.css','css03.css','style3/css03.css','3','7','12',NULL,0,0,0,0,0,5975,NULL,0,1,0,1285124168,NULL,0),('jVKLVakT_iA2010_oEuAwg',1224116526,'3','pbversion0000000000001','approved','Style3 Coolmenu','Style3 Coolmenu','department_nav','3','7','12',NULL,0,0,0,0,0,386,NULL,0,1,0,1242380150,NULL,0),('ThingyTmpl000000000003',1224518002,'3','pbversion0000000000001','approved','Default Thingy Edit Thing','Default Thingy Edit Thing','templates/thingy-default-edit-thing','3','7','12',NULL,0,0,0,0,0,6324,'\r\n\r\n\r\n',0,1,0,1285124164,'',0),('QpmlAiYZz6VsKBM-_0wXaw',1224616691,'3','pbversion0000000000001','approved','UsersOnline Macro','UsersOnline Macro','users-online-macro-templates','3','7','3',NULL,0,0,0,0,0,368,NULL,0,1,0,1242380162,NULL,0),('h_T2xtOxGRQ9QJOR6ebLpQ',1224616545,'3','pbversion0000000000001','approved','UsersOnline Default View','UsersOnline Default View','users-online-macro-templates/usersonline-default-view','3','7','3',NULL,0,1,0,0,0,2495,'\r\n\r\n',0,1,0,1285124166,'',0),('4Ekp0kJoJllRRRo_J1Rj6w',1224616672,'3','pbversion0000000000001','approved','UsersOnline Detailed View','UsersOnline Detailed View','users-online-macro-templates/usersonline-detailed-view','3','7','3',NULL,0,1,0,0,0,4318,'\r\n\r\n',0,1,0,1285124159,'',0),('HPDOcsj4gBme8D4svHodBw',1225404573,'3','pbversion0000000000001','approved','Profile','Profile','root/import/account/profile','3','7','12',NULL,0,1,0,0,0,334,NULL,0,1,0,1250190873,NULL,0),('IZkrow_zwvbf4FCH-taVTQ',1226011853,'3','pbversion0000000000001','approved','Inbox','Inbox','root/import/account/inbox','3','7','12',NULL,0,1,0,0,0,328,NULL,0,1,0,1250190873,NULL,0),('K0YjxqOqr7RupSo6sIdcAg',1227074310,'3','pbversion0000000000001','approved','Friends','Friends','root/import/account/friends','3','7','12',NULL,0,1,0,0,0,334,NULL,0,1,0,1250190873,NULL,0),('_ilRXNR3s8F2vGJ_k9ePcg',1226643205,'3','pbversion0000000000001','approved','User','User','root/import/account/user','3','7','12',NULL,0,1,0,0,0,325,NULL,0,1,0,1250190873,NULL,0),('qaVcU0FFzzraMX_bzELqzw',1227074362,'3','pbversion0000000000001','approved','Contributions','Contributions','root/import/account/contributions','3','7','12',NULL,0,1,0,0,0,352,NULL,0,1,0,1250190873,NULL,0),('UserListTmpl0000000001',1228125743,'3','pbversion0000000000001','approved','Default UserList','Default UserList','root/import/userlist/default-userlist','3','7','12',NULL,0,1,0,0,0,5202,NULL,0,1,0,1285124165,NULL,0),('UserListTmpl0000000003',1228125758,'3','pbversion0000000000001','approved','UserList with multiple search keywords','UserList with multiple search keywords','root/import/userlist/userlist-with-multiple-search-keywords','3','7','12',NULL,0,1,0,0,0,5489,NULL,0,1,0,1285124165,NULL,0),('UserListTmpl0000000002',1228125752,'3','pbversion0000000000001','approved','UserList with search field selection','UserList with search field selection','root/import/userlist/userlist-with-search-field-selection','3','7','12',NULL,0,1,0,0,0,5116,NULL,0,1,0,1285124165,NULL,0),('TimeTrackingTMPL000003',1229311434,'3','pbversion0000000000001','approved','Default Time Tracking Row Template','Default Time Tracking Row Template','default-tt-template-row','3','7','12',NULL,0,0,0,0,0,5721,NULL,0,1,0,1285124164,NULL,0),('uRL9qtk7Rb0YRJ41LmHOJw',1229311072,'3','pbversion0000000000001','approved','Default Calendar Print List View','Default Calendar Print List View','root/import/calendar-templates/default-calendar-print-list-view','3','7','3',NULL,0,1,0,0,0,1737,NULL,0,1,0,1285124167,NULL,0),('j_1qEqM6iLfQLiR6VKy0aA',1299872071,'1','pbversion0000000000001','approved','Free Documentation','Free Documentation','documentation/free-documentation','3','7','3',NULL,0,1,0,0,0,2117,NULL,0,1,0,1301974027,NULL,0),('ProjectManagerTMPL0005',1229579830,'3','pbversion0000000000001','approved','Default Resource Popup','Default Resource Popup','default-pm-resource-popup','3','7','12',NULL,0,0,0,0,0,3582,NULL,0,1,0,1285124164,NULL,0),('ProjectManagerTMPL0001',1229579830,'3','pbversion0000000000001','approved','Default Project Management System Dashboard','Default Project Management System Dashboard','default-pm-template-dashboard','3','7','12',NULL,0,0,0,0,0,6862,'',0,1,0,1285124164,'',0),('PBtmpl0000000000000033',1230159454,'3','pbversion0000000000001','approved','Default HTTP Proxy','Default HTTP Proxy','default_http_proxy','3','7','12',NULL,0,1,0,0,0,2214,NULL,0,1,0,1285124162,NULL,0),('PBtmpl0000000000000059',1229907401,'3','pbversion0000000000001','approved','Default SQL Report','Default SQL Report','default_sql_report','3','7','12',NULL,0,1,0,0,0,7737,NULL,0,1,0,1285124162,NULL,0),('MultiSearchTmpl0000001',1230269962,'3','pbversion0000000000001','approved','MultiSearch Default Display','MultiSearch Default Display','multisearchtmpl0000001','3','7','12',NULL,0,1,0,0,0,3538,'',0,1,0,1285124161,'',0),('CalendarDay00000000001',1230358389,'3','pbversion0000000000001','approved','Default Calendar Day','Default Calendar Day','root/import/calendar-templates/default-calendar-day','3','7','12',NULL,0,0,0,0,0,13749,' ',0,1,0,1285124160,'',0),('CalendarSearch00000001',1230358389,'3','pbversion0000000000001','approved','Default Calendar Search','Default Calendar Search','root/import/calendar-templates/default-calendar-search','3','7','12',NULL,0,0,0,0,0,14791,' ',0,1,0,1285124160,'',0),('CalendarWeek0000000001',1230358389,'3','pbversion0000000000001','approved','Default Calendar Week','Default Calendar Week','root/import/calendar-templates/default-calendar-week','3','7','12',NULL,0,0,0,0,0,12761,'',0,1,0,1285124160,'',0),('StockDataTMPL000000002',1229494994,'3','pbversion0000000000001','approved','StockData Default Display','StockData Default Display','stockdatatmpl000000002','3','7','12',NULL,0,1,0,0,0,20602,NULL,0,1,0,1285124164,NULL,0),('QHn6T9rU7KsnS3Y70KCNTg',1233173545,'3','pbversion0000000000001','approved','Account','Account','root/import/account','3','7','12',NULL,0,1,0,0,0,320,NULL,0,1,0,1250190873,NULL,0),('HW-sPoDDZR8wBZ0YgFgPtg',1227634350,'3','pbversion0000000000001','approved','images','images','root/import/account/images','3','7','12',NULL,0,1,0,0,0,331,NULL,0,1,0,1250190873,NULL,0),('hBpisL-_URyZnh9clR5ohA',1227634417,'3','pbversion0000000000001','approved','no_photo.gif','no_photo.gif','root/import/account/images/no_photo.gif','3','7','12',NULL,0,1,0,0,0,2564,NULL,0,1,0,1250190873,NULL,0),('FOBV6KkifreXa4GmEAUU4A',1227634447,'3','pbversion0000000000001','approved','no_photo_sm.gif','no_photo_sm.gif','root/import/account/images/no_photo_sm.gif','3','7','12',NULL,0,1,0,0,0,1580,NULL,0,1,0,1250190873,NULL,0),('TuYPpHx7TUyk08639Pc8Bg',1233861621,'3','pbversion0000000000001','approved','Default DataTable Template (HTML)','Default DataTable Template (HTML)','root/import/datatable/default-datatable-template-html','3','7','3',NULL,0,1,0,0,0,1429,NULL,0,1,0,1285124164,NULL,0),('3rjnBVJRO6ZSkxlFkYh_ug',1233861835,'3','pbversion0000000000001','approved','Default DataTable Template (YUI)','Default DataTable Template (YUI)','root/import/datatable/default-datatable-template-yui','3','7','3',NULL,0,1,0,0,0,1089,NULL,0,1,0,1285124159,NULL,0),('AOjPG2NHgfL9Cq6dDJ7mew',1236960881,'3','pbversion0000000000001','approved','Shop','Shop','root/import/account/shop','3','7','12',NULL,0,1,0,0,0,325,NULL,0,1,0,1250190873,NULL,0),('NBVSVNLp9X_bV7WrCprtCA',1237842096,'3','pbversion0000000000001','approved','Annotate Image','Annotate Image','image3','3','7','12',NULL,0,1,0,0,0,675,NULL,0,1,0,1285124161,NULL,0),('jmlI9IK-lV8n2WMYmmPhAA',1238106173,'3','pbversion0000000000001','approved','Ad Sku','Ad Sku','root/import/ad-sku','3','7','12',NULL,0,1,0,0,0,317,NULL,0,1,0,1242380149,NULL,0),('ThingyTmpl000000000001',1237914005,'3','pbversion0000000000001','approved','Default Thingy','Default Thingy','templates/thingy-default','3','7','12',NULL,0,0,0,0,0,2554,'',0,1,0,1285124164,'',0),('6uvSLY-ak_w4p_wS8q33cA',1239213092,'3','pbversion0000000000001','approved','Carousel','Carousel','root/import/carousel','3','7','12',NULL,0,1,0,0,0,323,NULL,0,1,0,1242380142,NULL,0),('CarouselTmpl0000000002',1239475937,'3','pbversion0000000000001','approved','Carousel hidden textareas','Carousel hidden textareas','root/import/carousel/carousel-hidden-textareas','3','7','12',NULL,0,0,0,0,0,1059,NULL,0,1,0,1285124160,NULL,0),('GaBAW-2iVhLMJaZQzVLE5A',1240103565,'3','pbversion0000000000001','approved','ThingyRecord Templates','ThingyRecord Templates','root/import/thingyrecord-templates','3','7','3',NULL,0,0,0,0,0,364,NULL,0,1,0,1242380149,NULL,0),('b1316COmd9xRv4fCI3LLGA',1236956475,'3','pbversion0000000000001','approved','Inbox Notification','Inbox Notification','inbox_notification','3','7','4',NULL,0,0,0,0,0,414,NULL,0,1,0,1285124165,NULL,0),('lo1rpxn3t8YPyKGers5eQg',1238625621,'3','pbversion0000000000001','approved','Friend Manager','Friend Manager','root/import/account/friendmanager','3','7','12',NULL,0,1,0,0,0,388,NULL,0,1,0,1242380168,NULL,0),('YP9WaMPJHvCJl-YwrLVcPw',1245376837,'3','pbversion0000000000001','approved','Progress Bar','Progress Bar','admin_progress_bar','3','7','12',NULL,0,1,0,0,0,2600,'\n',0,1,0,1285124165,'',0),('FEDP3dk8J3Chw_gyr7_XEQ',1246278679,'3','pbversion0000000000001','approved','navigation.css','navigation.css','navigation.css','3','7','12',NULL,0,1,0,0,0,2437,NULL,0,1,0,1285124168,NULL,0),('f_tn9FfoSfKWX43F83v_3w',1247053009,'3','pbversion0000000000001','approved','Search','Search','root/import/search','3','7','12',NULL,0,0,0,0,0,317,NULL,0,1,0,1247779657,NULL,0),('oGfxez5sksyB_PcaAsEm_Q',1247053097,'3','pbversion0000000000001','approved','SyndicatedContent','SyndicatedContent','root/import/syndicatedcontent','3','7','12',NULL,0,0,0,0,0,350,NULL,0,1,0,1247779657,NULL,0),('tPagC0AQErZXjLFZQ6OI1g',1246966459,'3','pbversion0000000000001','approved','ImageAsset','ImageAsset','root/import/imageasset','3','7','12',NULL,0,0,0,0,0,329,NULL,0,1,0,1247779656,NULL,0),('pbtmpl0000000000000220',1247488979,'3','pbversion0000000000001','approved','Flash Style 3 Template','Flash Style 3 Template','flash-style-3-template','3','7','12',NULL,0,0,0,0,0,1386,'\r\n\r\n',0,1,0,1285124167,'',0),('PBtmpl0000000000000001',1247535846,'3','pbversion0000000000001','approved','Admin Console','Admin Console','admin_console2','3','7','12',NULL,0,1,0,0,0,5963,'\n',0,1,0,1285124161,'',0),('GYaFxnMu9UsEG8oanwB6TA',1246965871,'3','pbversion0000000000001','approved','Folder','Folder','root/import/folder','3','7','12',NULL,0,0,0,0,0,317,NULL,0,1,0,1247779656,NULL,0),('pbtmpl0000000000000221',1247487940,'3','pbversion0000000000001','approved','Flash Tutorial Template','Flash Tutorial Template','flash-tutorial-template','3','7','12',NULL,0,0,0,0,0,2092,'\r\n\r\n',0,1,0,1285124167,'',0),('VZK3CRgiMb8r4dBjUmCTgQ',1247046242,'3','pbversion0000000000001','approved','Poll','Poll','root/import/poll','3','7','12',NULL,0,0,0,0,0,311,NULL,0,1,0,1247779656,NULL,0),('NK8bqlwVRILJknqeCDPBHg',1285796040,'1','pbversion0000000000001','approved','Getting Started (part 2)','Getting Started (part 2)','getting_started/getting-started-part2','3','7','4',NULL,0,1,0,0,0,1510,NULL,0,1,0,1301974027,NULL,0),('i5kt5aodVs_oepNEkE7Okw',1242312883,'3','pbversion0000000000001','approved','poll.css','poll.css','poll.css','3','7','12',NULL,0,1,0,0,0,458,NULL,0,1,0,1285124169,NULL,0),('tXwf1zaOXTvsqPn6yu-GSw',1246965607,'3','pbversion0000000000001','approved','FileAsset','FileAsset','root/import/fileasset','3','7','12',NULL,0,0,0,0,0,326,NULL,0,1,0,1247779656,NULL,0),('nFen0xjkZn8WkpM93C9ceQ',1247864696,'3','pbversion0000000000001','approved','Shelf (Default)','Shelf (Default)','root/import/shelf-default','3','7','12',NULL,0,1,0,0,0,4612,'\n',0,1,0,1285124167,'',0),('2CS-BErrjMmESOtGT90qOg',1248549087,'3','pbversion0000000000001','approved','Default View Profile Template','Default View Profile Template','root/import/account/profile/default-view-profile-template','3','7','12',NULL,0,1,0,0,0,7605,NULL,0,1,0,1285124168,NULL,1),('MBmWlA_YEA2I6D29OMGtRg',1248549086,'3','pbversion0000000000001','approved','Default Profile Error Template','Default Profile Error Template','root/import/account/profile/default-profile-error-template','3','7','12',NULL,0,1,0,0,0,1223,NULL,0,1,0,1285124161,NULL,0),('gfZOwaTWYjbSoVaQtHBBEw',1249407461,'3','pbversion0000000000001','approved','Inbox Account Layout','Inbox Account Layout','root/import/account/inbox-account-layout','3','7','12',NULL,0,1,0,0,0,3260,'',0,1,0,1285124166,'',0),('0n4HtbXaWa_XJHkFjetnLQ',1248549086,'3','pbversion0000000000001','approved','Default Inbox View Message Template','Default Inbox View Message Template','root/import/account/inbox/default-inbox-view-message-template','3','7','12',NULL,0,1,0,0,0,5000,NULL,0,1,0,1285124159,NULL,0),('ErEzulFiEKDkaCDVmxUavw',1248549086,'3','pbversion0000000000001','approved','Default Inbox Error Template','Default Inbox Error Template','root/import/account/inbox/default-inbox-error-template','3','7','12',NULL,0,1,0,0,0,732,NULL,0,1,0,1285124160,NULL,0),('DUoxlTBXhVS-Zl3CFDpt9g',1248549086,'3','pbversion0000000000001','approved','Default Message Confirm Template','Default Message Confirm Template','root/import/account/inbox/default-message-confirm-template','3','7','12',NULL,0,1,0,0,0,785,NULL,0,1,0,1285124160,NULL,0),('1Q4Je3hKCJzeo0ZBB5YB8g',1248549086,'3','pbversion0000000000001','approved','Default Manage Invitations Template','Default Manage Invitations Template','root/import/account/inbox/default-manage-invitations-template','3','7','12',NULL,0,1,0,0,0,9795,'\n\n',0,1,0,1285124159,'',0),('5A8Hd9zXvByTDy4x-H28qw',1248549086,'3','pbversion0000000000001','approved','Default Invitation Confirmation Template','Default Invitation Confirmation Template','root/import/account/inbox/default-invitation-confirmation-template','3','7','12',NULL,0,1,0,0,0,1549,NULL,0,1,0,1285124159,NULL,0),('VBkY05f-E3WJS50WpdKd1Q',1248549087,'3','pbversion0000000000001','approved','Default View Invitation Template','Default View Invitation Template','root/import/account/inbox/default-view-invitation-template','3','7','12',NULL,0,1,0,0,0,3836,NULL,0,1,0,1285124165,NULL,0),('XgcsoDrbC0duVla7N7JAdw',1248549086,'3','pbversion0000000000001','approved','Default Invite User Email Template','Default Invite User Email Template','root/import/account/inbox/default-invite-user-email-template','3','7','12',NULL,0,1,0,0,0,490,NULL,0,1,0,1285124165,NULL,0),('cR0UFm7I1qUI2Wbpj--08Q',1248549086,'3','pbversion0000000000001','approved','Default Invite User Form Template','Default Invite User Form Template','root/import/account/inbox/default-invite-user-form-template','3','7','12',NULL,0,1,0,0,0,3967,NULL,0,1,0,1285124165,NULL,0),('SVIhz68689hwUGgcDM-gWw',1248549086,'3','pbversion0000000000001','approved','Default Invite User Confirm Template','Default Invite User Confirm Template','root/import/account/inbox/default-invite-user-confirm-template','3','7','12',NULL,0,1,0,0,0,819,NULL,0,1,0,1285124164,NULL,0),('zrNpGbT3odfIkg6nFSUy8Q',1249407461,'3','pbversion0000000000001','approved','Friends Layout Template','Friends Layout Template','root/import/account/friends/friends-layout-template','3','7','12',NULL,0,1,0,0,0,2662,'\n',0,1,0,1285124168,'',0),('1Yn_zE_dSiNuaBGNLPbxtw',1248549086,'3','pbversion0000000000001','approved','Default Friends View Template','Default Friends View Template','root/import/account/friends/default-friends-view-template','3','7','12',NULL,0,1,0,0,0,8064,NULL,0,1,0,1285124159,NULL,0),('AZFU33p0jpPJ-E6qLSWZng',1248549086,'3','pbversion0000000000001','approved','Default Friends Edit Template','Default Friends Edit Template','root/import/account/friends/default-friends-edit-template','3','7','12',NULL,0,1,0,0,0,9831,NULL,0,1,0,1285124159,NULL,0),('AGJBGviWGAwjnwziiPjvDg',1248549087,'3','pbversion0000000000001','approved','Default Send Request Template','Default Send Request Template','root/import/account/friends/default-send-request-template','3','7','12',NULL,0,1,0,0,0,2781,NULL,0,1,0,1285124159,NULL,0),('7Ijdd8SW32lVgg2H8R-Aqw',1248549086,'3','pbversion0000000000001','approved','Default Friends Error Template','Default Friends Error Template','root/import/account/friends/default-friends-error-template','3','7','12',NULL,0,1,0,0,0,776,NULL,0,1,0,1285124159,NULL,0),('K8F0j_cq_jgo8dvWY_26Ag',1248549086,'3','pbversion0000000000001','approved','Default Friends Confirmation Template','Default Friends Confirmation Template','root/import/account/friends/default-friends-confirmation-template','3','7','12',NULL,0,1,0,0,0,942,NULL,0,1,0,1285124160,NULL,0),('G5V6neXIDiFXN05oL-U3AQ',1248549087,'3','pbversion0000000000001','approved','Default Remove Friends Confirmation Template','Default Remove Friends Confirmation Template','root/import/account/friends/default-remove-friends-confirmation-template','3','7','12',NULL,0,1,0,0,0,1166,NULL,0,1,0,1285124160,NULL,0),('9ThW278DWLV0-Svf68ljFQ',1249407460,'3','pbversion0000000000001','approved','Account Layout','Account Layout','root/import/account/user/account-layout','3','7','12',NULL,0,1,0,0,0,1728,'\n',0,1,0,1285124159,'',0),('-zxyB-O50W8YnL39Ouoc4Q',1248563425,'3','pbversion0000000000001','approved','Default My Sales Template','Default My Sales Template','root/import/default-my-sales-template','3','7','12',NULL,0,1,0,0,0,3993,NULL,0,1,0,1285124158,NULL,0),('b4n3VyUIsAHyIvT-W-jziA',1249407461,'3','pbversion0000000000001','approved','Contributions Layout','Contributions Layout','root/import/account/contributions/contributions-layout','3','7','12',NULL,0,1,0,0,0,1753,'\n',0,1,0,1285124165,'',0),('PBtmpl0000000000000056',1248729559,'3','pbversion0000000000001','approved','Default Product','Default Product','default_product','3','7','12',NULL,0,1,0,0,0,13325,'\n\n',0,1,0,1285124162,'',0),('i9-G00ALhJOr0gMh-vHbKA',1250408924,'3','pbversion0000000000001','approved','Inbox SMS Notification','Inbox SMS Notification','root/import/inbox-sms-notification','3','7','4',NULL,0,0,0,0,0,446,NULL,0,1,0,1285124166,NULL,0),('ohjyzab5i-yW6GOWTeDUHg',1251425384,'3','pbversion0000000000001','approved','Default Manage Ad Sku Template','Default Manage Ad Sku Template','root/import/ad-sku/default-manage-ad-sku-template','3','7','12',NULL,0,0,0,0,0,2567,NULL,0,1,0,1285124167,NULL,0),('AldPGu0u-jm_5xK13atCSQ',1251419124,'3','pbversion0000000000001','approved','Default Purchase Ad Sku Template','Default Purchase Ad Sku Template','root/import/ad-sku/default-purchase-ad-sku-template','3','7','12',NULL,0,0,0,0,0,4230,NULL,0,1,0,1285124160,NULL,0),('5bnNzteN7w3NnK9mF4XiCg',1250243000,'3','pbversion0000000000001','approved','Survey','Survey','root/import/survey','3','7','12',NULL,0,0,0,0,0,317,NULL,0,1,0,1253052788,NULL,0),('PBtmpl0000000000000063',1250243000,'3','pbversion0000000000001','approved','Default Overview Report','Default Overview Report','root/import/survey/default-overview-report','3','7','12',NULL,0,1,0,0,0,5835,NULL,0,1,0,1285124162,NULL,0),('PBtmpl0000000000000062',1250243000,'3','pbversion0000000000001','approved','Default Gradebook Report','Default Gradebook Report','root/import/survey/default-gradebook-report','3','7','12',NULL,0,1,0,0,0,4863,NULL,0,1,0,1285124162,NULL,0),('PBtmpl0000000000000061',1250243000,'3','pbversion0000000000001','approved','Default Survey','Default Survey','root/import/survey/default-survey','3','7','12',NULL,0,1,0,0,0,2968,NULL,0,1,0,1285124162,NULL,0),('CxMpE_UPauZA3p8jdrOABw',1250243000,'3','pbversion0000000000001','approved','Default Questions','Default Questions','root/import/survey/default-questions','3','7','12',NULL,0,1,0,0,0,17836,NULL,0,1,0,1285124160,NULL,0),('1oBRscNIcFOI-pETrCOspA',1250243000,'3','pbversion0000000000001','approved','Default Section Edit','Default Section Edit','root/import/survey/default-section-edit','3','7','12',NULL,0,1,0,0,0,14088,NULL,0,1,0,1285124159,NULL,0),('wAc4azJViVTpo-2NYOXWvg',1250243000,'3','pbversion0000000000001','approved','Default Question Edit','Default Question Edit','root/import/survey/default-question-edit','3','7','12',NULL,0,1,0,0,0,12766,NULL,0,1,0,1285124167,NULL,0),('AjhlNO3wZvN5k4i4qioWcg',1250243000,'3','pbversion0000000000001','approved','Default Answer Edit','Default Answer Edit','root/import/survey/default-answer-edit','3','7','12',NULL,0,1,0,0,0,9595,NULL,0,1,0,1285124159,NULL,0),('RSAMkc6WQmfRE3TOr1_3Mw',1250243000,'3','pbversion0000000000001','approved','ExpireIncompleteSurveyResponses','ExpireIncompleteSurveyResponses','root/import/expireincompletesurveyresponses','3','7','12',NULL,0,1,0,0,0,399,NULL,0,1,0,1253052788,NULL,0),('ExpireIncResptmpl00001',1250243000,'3','pbversion0000000000001','approved','ExpireIncompleteSurveyResponses','ExpireIncompleteSurveyResponses','root/import/expireincompletesurveyresponses/expireincompletesurveyresponses','3','7','12',NULL,0,1,0,0,0,810,NULL,0,1,0,1285124160,NULL,0),('7F-BuEHi7t9bPi008H8xZQ',1250243000,'3','pbversion0000000000001','approved','Default Survey Summary','Default Survey Summary','root/import/survey/default-survey-summary','3','7','12',NULL,0,1,0,0,0,2300,NULL,0,1,0,1285124159,NULL,0),('S3zpVitAmhy58CAioH359Q',1250243000,'3','pbversion0000000000001','approved','Default Test Results','Default Test Results','root/import/survey/default-test-results','3','7','12',NULL,0,1,0,0,0,8673,'',0,1,0,1285124164,'',0),('nWNVoMLrMo059mDRmfOp9g',1250243000,'3','pbversion0000000000001','approved','Default Feedback','Default Feedback','root/import/survey/default-feedback','3','7','12',NULL,0,1,0,0,0,1235,NULL,0,1,0,1285124167,NULL,0),('newslettercs0000000001',1252682678,'3','pbversion0000000000001','approved','Newsletter Manager (default)',' Newsletter Manager','newslettercstemplate','3','7','3',NULL,0,0,0,0,0,2824,'\n',0,1,0,1285124167,'',0),('1IzRpX0tgW7iuCfaU2Kk0A',1250243000,'3','pbversion0000000000001','approved','Default Contributions View','Default Contributions View','root/import/account/contributions/default-contributions-view','3','7','12',NULL,0,1,0,0,0,7799,'\n',0,1,0,1285124159,'',0),('0EAJ9EYb9ap2XwfrcXfdLQ',1250243000,'3','pbversion0000000000001','approved','Story Archive Asset List','Story Archive Asset List','root/import/storymanager/keywordlist','3','7','4',NULL,0,0,0,0,0,579,NULL,0,1,0,1285124158,NULL,0),('TKmhv8boP3TD2xwSwUBq0g',1250243000,'3','pbversion0000000000001','approved','Default ThingyRecord View','Default ThingyRecord View','home/thinyrecord-templates/default-thingyrecord-view','3','7','3',NULL,0,1,0,0,0,1789,NULL,0,1,0,1285124164,NULL,0),('75CmQgpcCSkdsL-oawdn3Q',1253555614,'3','pbversion0000000000001','approved','Default Edit Profile Template','Default Edit Profile Template','root/import/account/profile/default-edit-profile-template','3','7','12',NULL,0,1,0,0,0,3294,'\n\n\n\n',0,1,0,1285124159,'',0),('d8jMMMRddSQ7twP4l1ZSIw',1253555614,'3','pbversion0000000000001','approved','Default Survey Take','Default Survey Take','root/import/survey/default-survey-take','3','7','12',NULL,0,1,0,0,0,3994,'\n\n\n\n',0,1,0,1285124165,'',0),('fowHfgOkJtAxdst7rugTog',1252595993,'3','pbversion0000000000001','approved','Story Manager','Story Manager','root/import/storymanager','3','7','12',NULL,0,1,0,0,0,339,'\r\n',0,1,0,1253676393,NULL,0),('3QpYtHrq_jmAk1FNutQM5A',1253636379,'3','pbversion0000000000001','approved','Story Template','Story Template','root/import/storymanager/storytemplate','3','7','4',NULL,0,0,0,0,0,6662,'\n\n\n',0,1,0,1285124159,'',0),('yxD5ka7XHebPLD-LXBwJqw',1253635396,'3','pbversion0000000000001','approved','StoryArchive','StoryArchive','root/import/storymanager/storyarchive','3','7','4',NULL,0,0,0,0,0,3375,'',0,1,0,1285124167,'',0),('TbDcVLbbznPi0I0rxQf2CQ',1253636379,'3','pbversion0000000000001','approved','Story Template Topic','Story Template Topic','root/import/storymanager/storytemplatetopic','3','7','4',NULL,0,0,0,0,0,7134,'\n\n\n\n\n',0,1,0,1285124164,'',0),('iCM9pRY5yYyjufROgaCDlg',1253305659,'3','pbversion0000000000001','approved','storyManager.css','storyManager.css','storymanager.css','3','7','12',NULL,0,1,0,0,0,4360,NULL,0,1,0,1285124169,NULL,0),('VyCINX2KixKYr2pzQGX9Mg',1254881103,'3','pbversion0000000000001','approved','layout.css','layout.css','layout.css','3','7','12',NULL,0,1,0,0,0,1439,'\r\n',0,1,0,1285124168,NULL,0),('TvOZs8U1kRXLtwtmyW75pg',1256092368,'3','pbversion0000000000001','approved','Article','Article','root/import/article','3','7','12',NULL,0,0,0,0,0,322,'\r\n',0,1,0,1256092370,NULL,0),('zb_OPKNqcTuIjdvvbEkRjw',1256092368,'3','pbversion0000000000001','approved','article.css','article.css','article.css','3','7','12',NULL,0,1,0,0,0,723,'\r\n',0,1,0,1285124169,NULL,0),('PBrichedit000000000001',1256092369,'3','pbversion0000000000001','approved','Content Manager\'s Rich Edit','Content Manager\'s Rich Edit','content_managers_rich_edit','3','7','12',NULL,0,0,0,0,0,572,'\r\n',0,1,0,1256092370,NULL,0),('FJbUTvZ2nUTn65LpW6gjsA',1256092369,'3','pbversion0000000000001','approved','Profile Account Layout','Profile Account Layout','root/import/account/profile/profile-account-layout','3','7','12',NULL,0,1,0,0,0,4224,'',0,1,0,1285124160,'',0),('pbrobot000000000000001',1256092369,'3','pbversion0000000000001','approved','robots.txt','robots.txt','robots.txt','3','7','12',NULL,0,0,0,0,0,562,NULL,0,1,0,1285124169,NULL,0),('4qh0kIsFUdd4Ox-Iu1JZgg',1257311886,'3','pbversion0000000000001','approved','EMS','EMS','root/import/ems','3','7','12',NULL,0,1,0,0,0,310,'\r\n',0,1,0,1257311889,NULL,0),('OOyMH33plAy6oCj_QWrxtg',1257311886,'3','pbversion0000000000001','approved','Lookup Registrant (Default)','Lookup Registrant (Default)','root/import/ems/lookup-registrant-default','3','7','12',NULL,0,1,0,0,0,7007,'\n\n\n\n\n\n\n\n\n\n\n\n',0,1,0,1285124161,'',0),('PsFn7dJt4wMwBa8hiE3hOA',1257311886,'3','pbversion0000000000001','approved','Print Badge (Default)','Print Badge (Default)','root/import/ems/print-badge-default','3','7','12',NULL,0,1,0,0,0,2323,NULL,0,1,0,1285124164,NULL,0),('yBwydfooiLvhEFawJb0VTQ',1257311887,'3','pbversion0000000000001','approved','Print Ticket (Default)','Print Ticket (Default)','root/import/ems/print-ticket-default','3','7','12',NULL,0,1,0,0,0,2386,NULL,0,1,0,1285124167,NULL,0),('S2_LsvVa95OSqc66ITAoig',1257311887,'3','pbversion0000000000001','approved','EMS Schedule Listing (default)','EMS Schedule Listing (default)','root/import/ems/ems-schedule-listing-default2','3','7','12',NULL,0,1,0,0,0,14216,'\n\n\n\n\n\n\n\n\n\n\n\n \n',0,1,0,1285124164,'',0),('hreA_bgxiTX-EzWCSZCZJw',1257311887,'3','pbversion0000000000001','approved','Print Remaining Tickets Template (default)','Print Remaining Tickets Template (default)','root/import/ems/default-print-remaining-tickets-template','3','7','12',NULL,0,1,0,0,0,2345,'\r\n',0,1,0,1285124166,NULL,0),('-K8Hj45mbelljN9-0CXZxg',1257311887,'3','pbversion0000000000001','approved','DataForm','DataForm','root/import/dataform','3','7','12',NULL,0,0,0,0,0,336,NULL,0,1,0,1257311888,NULL,0),('PBtmpl0000000000000020',1257311887,'3','pbversion0000000000001','approved','Mail Form','Mail Form','mail_form','3','7','12',NULL,0,1,0,0,0,4606,'\n',0,1,0,1285124161,'',0),('PBtmpl0000000000000104',1257311888,'3','pbversion0000000000001','approved','Default Acknowledgement','Default Acknowledgement','default_acknowledgement','3','7','12',NULL,0,1,0,0,0,1750,'',0,1,0,1285124163,'',0),('_iHetEvMQUOoxS-T2CM0sQ',1273172789,'1','pbversion0000000000001','approved','Getting Started','Getting Started','getting_started','3','7','3',NULL,0,0,0,0,0,392,NULL,0,1,0,1301974027,NULL,0),('bX5rYxb6tZ9docY6sUhBlw',1278013772,'1','pbversion0000000000001','approved','Getting Started','Getting Started','getting_started/getting-started','3','7','4',NULL,0,1,0,0,0,1253,NULL,0,1,0,1301974027,NULL,0),('8Bb8gu-me2mhL3ljFyiWLg',1271359194,'1','pbversion0000000000001','approved','Talk to the Experts','Your Next Step','your_next_step','3','7','3',NULL,0,0,0,0,0,869,NULL,0,1,0,1301974027,NULL,0),('ix1p0AbwKAz8QWB-T-HHfg',1271359087,'1','pbversion0000000000001','approved','Get Support','Get Support','yns/support','3','7','4',NULL,0,1,0,0,0,739,NULL,0,1,0,1301974027,NULL,0),('iCYOjohB9SKvAPr6bXElKA',1271445525,'1','pbversion0000000000001','approved','Get Hosting','Get Hosting','yns/hosting','3','7','4',NULL,0,1,0,0,0,749,NULL,0,1,0,1301974027,NULL,0),('PBtmpl0000000000000116',1257311888,'3','pbversion0000000000001','approved','Tab Form','Tab Form','tab_form','3','7','12',NULL,0,1,0,0,0,5745,'\n',0,1,0,1285124163,'',0),('PBtmpl0000000000000141',1257311888,'3','pbversion0000000000001','approved','Default DataForm','Default DataForm','pbtmpl0000000000000141','3','7','12',NULL,0,1,0,0,0,6035,'\n',0,1,0,1285124164,'',0),('_aE16Rr1-bXBf8SIaLZjCg',1257311888,'3','pbversion0000000000001','approved','picklanguage','picklanguage','media/picklanguage','3','7','12',NULL,0,1,0,0,0,617,'\r\n',0,1,0,1285124165,NULL,0),('P_4uog81vSUK4KxuW_4GUA',1258524916,'3','pbversion0000000000001','approved','css','css','css','3','7','12',NULL,0,1,0,0,0,298,'\r\n',0,1,0,1258524918,NULL,0),('PBtmpl0000000000000060',1258524916,'3','pbversion0000000000001','approved','Fail Safe','Fail Safe','fail_safe','3','7','12',NULL,0,1,0,0,0,2413,NULL,0,1,0,1285124162,NULL,0),('PBtmpl0000000000000137',1258524916,'3','pbversion0000000000001','approved','Admin Console Style','Admin Console','admin_console','3','7','12',NULL,0,1,0,0,0,1283,NULL,0,1,0,1285124163,NULL,0),('PBtmpl0000000000000132',1258524916,'3','pbversion0000000000001','approved','Empty','Empty','empty','3','7','12',NULL,0,1,0,0,0,296,NULL,0,1,0,1285124163,NULL,0),('PBtmplBlankStyle000001',1258524916,'3','pbversion0000000000001','approved','WebGUI 6 Blank Style','WebGUI 6 Blank Style','pbtmplblankstyle000001','3','7','12',NULL,0,1,0,0,0,1970,NULL,0,1,0,1285124164,NULL,0),('uCn31PzislTZlgt_79j7cQ',1258524916,'3','pbversion0000000000001','approved','style.css','style.css','css/style.css','3','7','12',NULL,0,1,0,0,0,1019,'\r\n',0,1,0,1285124169,NULL,0),('H_-8zjtWsO1FUpQqNtkxNQ',1258524916,'3','pbversion0000000000001','approved','wg-base.css','wg-base.css','css/wg-base.css','3','7','12',NULL,0,1,0,0,0,1138,'\r\n',0,1,0,1285124168,NULL,0),('PBtmpl0000000000000117',1259133274,'3','pbversion0000000000001','approved','DropMenu','DropMenu','dropmenu','3','7','12',NULL,0,1,0,0,0,2660,'',0,1,0,1285124163,'',0),('PBtmpl0000000000000136',1259133274,'3','pbversion0000000000001','approved','Synopsis','Synopsis','synopsis2','3','7','12',NULL,0,1,0,0,0,1734,NULL,0,1,0,1285124163,NULL,0),('PBtmpl0000000000000093',1259133274,'3','pbversion0000000000001','approved','crumbTrail','crumbTrail','crumbtrail2','3','7','12',NULL,0,1,0,0,0,1494,NULL,0,1,0,1285124163,NULL,0),('GNvjCFQWjY2AF2uf0aCM8Q',1259133274,'3','pbversion0000000000001','approved','Syndicated Articles','Syndicated Articles','syndicated_articles','3','7','12',NULL,0,1,0,0,0,2472,NULL,0,1,0,1285124160,NULL,0),('-PkdI8l1idu-8gDX3iOdcw',1259133274,'3','pbversion0000000000001','approved','One Over Two','One Over Two','one_over_two','3','7','12',NULL,0,1,0,0,0,6326,'',0,1,0,1285124158,'',0),('PBtmpl0000000000000103',1259133275,'3','pbversion0000000000001','approved','Article With Image','Article With Image','article-with-image','3','7','12',NULL,0,1,0,0,0,2130,'',0,1,0,1285124163,'',0),('PBtmpl0000000000000024',1259133275,'3','pbversion0000000000001','approved','File','File','file','3','7','12',NULL,0,1,0,0,0,940,NULL,0,1,0,1285124161,NULL,0),('XdlKhCDvArs40uqBhvzR3w',1259133275,'3','pbversion0000000000001','approved','Article With Pagination','Article With Pagination','article-with-pagination','3','7','12',NULL,0,1,0,0,0,3274,'\n',0,1,0,1285124165,NULL,0),('PBnav00000000indentnav',1259133275,'3','pbversion0000000000001','approved','Indent Nav','Indent Nav','indent_nav','3','7','12',NULL,0,0,0,0,0,1978,'',0,1,0,1285124161,'',0),('PBtmpl0000000000000124',1259133275,'3','pbversion0000000000001','approved','Tabs','Tabs','tabs','3','7','12',NULL,0,1,0,0,0,1766,'',0,1,0,1285124163,'',0),('PBtmpl0000000000000131',1259133275,'3','pbversion0000000000001','approved','Right Column','Right Column','right_column','3','7','12',NULL,0,1,0,0,0,4905,'',0,1,0,1285124163,'',0),('PBtmpl0000000000000134',1259133275,'3','pbversion0000000000001','approved','Hierarchical Top Nav','Hierarchical Top Nav','import/hierarchical-top-nav','3','7','12',NULL,0,1,0,0,0,4021,'\n\n\n\n\n\n',0,1,0,1285124163,'',0),('PBtmpl0000000000000078',1259133275,'3','pbversion0000000000001','approved','File Folder','File Folder','file_folder','3','7','12',NULL,0,1,0,0,0,3834,NULL,0,1,0,1285124162,NULL,0),('PBtmpl0000000000000055',1259133275,'3','pbversion0000000000001','approved','Default Poll','Default Poll','default_poll','3','7','12',NULL,0,1,0,0,0,3032,'',0,1,0,1285124162,'',0),('PBtmpl0000000000000065',1259133275,'3','pbversion0000000000001','approved','Default Syndicated Content','Default Syndicated Content','default_syndicated_content','3','7','12',NULL,0,1,0,0,0,2387,NULL,0,1,0,1285124162,NULL,0),('PBtmpl0000000000000054',1259133276,'3','pbversion0000000000001','approved','Default Page','Default Page','default_page','3','7','12',NULL,0,1,0,0,0,3083,'',0,1,0,1285124162,'',0),('PBtmpl0000000000000108',1259133276,'3','pbversion0000000000001','approved','horizontalMenu','horizontalMenu','horizontalmenu','3','7','12',NULL,0,1,0,0,0,1982,'',0,1,0,1285124163,'',0),('PBtmpl0000000000000115',1259133276,'3','pbversion0000000000001','approved','Linked Image with Caption','Linked Image with Caption','linked_image_with_caption','3','7','12',NULL,0,1,0,0,0,2393,'',0,1,0,1285124163,'',0),('PBtmpl0000000000000109',1259133276,'3','pbversion0000000000001','approved','One Over Three','One Over Three','one_over_three','3','7','12',NULL,0,1,0,0,0,7968,'',0,1,0,1285124163,'',0),('VCFhB9WOsDsH2Apj3c6DpQ',1259133276,'3','pbversion0000000000001','approved','Three Columns','Three Columns','three-columns','3','7','12',NULL,0,1,0,0,0,5947,'',0,1,0,1285124165,'',0),('PBtmpl0000000000000002',1259133276,'3','pbversion0000000000001','approved','Default Article','Default Article','default_article','3','7','12',NULL,0,1,0,0,0,2241,NULL,0,1,0,1285124161,NULL,0),('PBtmpl0000000000000123',1259133276,'3','pbversion0000000000001','approved','Item','Item','item','3','7','12',NULL,0,1,0,0,0,2232,NULL,0,1,0,1285124163,NULL,0),('PBtmpl0000000000000135',1259133276,'3','pbversion0000000000001','approved','Side By Side','Side By Side','side_by_side','3','7','12',NULL,0,1,0,0,0,4489,'\n',0,1,0,1285124163,'',0),('PBnav00000000000bullet',1259133276,'3','pbversion0000000000001','approved','Bulleted List','Bulleted List','bulleted_list','3','7','12',NULL,0,0,0,0,0,2744,'\n\n',0,1,0,1285124161,'',0),('MK4fCNoyrx5SE8eyDfOpxg',1259133276,'3','pbversion0000000000001','approved','Flash File','Flash File','flash-file','3','7','12',NULL,0,1,0,0,0,1861,NULL,0,1,0,1285124161,NULL,0),('PBtmpl0000000000000130',1259133276,'3','pbversion0000000000001','approved','Tree Navigation','Tree Navigation','root/import/navigation/tree-navigation','3','7','12',NULL,0,1,0,0,0,3529,'\n\n\n',0,1,0,1285124163,'',0),('f2EktltCvwQpl_3-B1yR7g',1288748251,'3','pbversion0000000000001','approved','Asset Templates','Asset Templates','root/import/asset_templates','3','7','12',NULL,0,1,0,0,0,344,NULL,0,1,0,1288748251,NULL,0),('BMybD3cEnmXVk2wQ_qEsRQ',1263962529,'3','pbversion0000000000001','approved','Badge Builder (Default)','Badge Builder (Default)','root/import/ems/badge-builder-default','3','7','12',NULL,0,1,0,0,0,36631,'\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',0,1,0,1285124160,'',0),('mRtqRuVikSe82BQsYBlD0A',1263962529,'3','pbversion0000000000001','approved','Bare Image','Bare Image','bare_image','3','7','12',NULL,0,1,0,0,0,558,NULL,0,1,0,1285124166,NULL,0),('aUDsJ-vB9RgP-AYvPOy8FQ',1263962529,'3','pbversion0000000000001','approved','Shop Account Layout','Shop Account Layout','root/import/account/shop/shop-account-layout','3','7','12',NULL,0,1,0,0,0,3337,'\n',0,1,0,1285124165,'',0),('CalendarEventEdit00001',1269401468,'3','pbversion0000000000001','approved','Default Calendar Event Edit','Default Calendar Event Edit','root/import/calendar-templates/default-calendar-event-edit','3','7','12',NULL,0,0,0,0,0,18084,'\r\n\r\n\r\n\r\n\r\n\r\n\r\n \r\n\r\n',0,1,0,1285124160,'',0),('GRUNFctldUgop-qRLuo_DA',1269401469,'3','pbversion0000000000001','approved','Default Survey Edit','Default Survey Edit','root/import/survey/default-survey-edit','3','7','12',NULL,0,1,0,0,0,7101,NULL,0,1,0,1285124160,NULL,0),('t87D1138NhPHhA23-hozBA',1273032716,'3','pbversion0000000000001','approved','CrystalX','CrystalX','crystalx','3','7','3',NULL,0,1,0,0,0,310,NULL,0,1,0,1273032724,NULL,0),('QtBumey5ffc-xffRp1-7Aw',1273032716,'3','pbversion0000000000001','approved','img','img','crystalx/img','3','7','3',NULL,0,1,0,0,0,310,NULL,0,1,0,1273032724,NULL,0),('-0sK2rX1cwQt1ipUSqsiQQ',1273032716,'3','pbversion0000000000001','approved','bg.gif','bg.gif','crystalx/img/bg.gif','3','7','3',NULL,0,1,0,0,0,1440,NULL,0,1,0,1273032724,NULL,0),('hS_eOaVz9Qb5ixndK9EXAw',1273032716,'3','pbversion0000000000001','approved','header.jpg','header.jpg','crystalx/img/header.jpg','3','7','3',NULL,0,1,0,0,0,8038,NULL,0,1,0,1273032724,NULL,0),('k2p-Be8C98pf2cRq7E-JHg',1273032716,'3','pbversion0000000000001','approved','tab_link.gif','tab_link.gif','crystalx/img/tab_link.gif','3','7','3',NULL,0,1,0,0,0,507,NULL,0,1,0,1273032724,NULL,0),('aYG4fjbMPbC4LCuuMp4gGA',1273032716,'3','pbversion0000000000001','approved','tab_hover.gif','tab_hover.gif','crystalx/img/tab_hover.gif','3','7','3',NULL,0,1,0,0,0,538,NULL,0,1,0,1273032724,NULL,0),('F122Ey0NtVAw6Lfv1M6G_Q',1273032716,'3','pbversion0000000000001','approved','ico_archive.gif','ico_archive.gif','crystalx/img/ico_archive.gif','3','7','3',NULL,0,1,0,0,0,427,NULL,0,1,0,1273032724,NULL,0),('qmXHKrQ6EDLSOGkrEKRUDA',1273032716,'3','pbversion0000000000001','approved','bg_page_in.jpg','bg_page_in.jpg','crystalx/img/bg_page_in.jpg','3','7','3',NULL,0,1,0,0,0,3242,NULL,0,1,0,1273032724,NULL,0),('4qZgXjPPO4fwV879yu5XUg',1273032716,'3','pbversion0000000000001','approved','bg_page.JPG','bg_page.JPG','crystalx/img/bg_page.jpg','3','7','3',NULL,0,1,0,0,0,1229,NULL,0,1,0,1273032724,NULL,0),('mb-xeAugm5GJdvu-Wh0MtQ',1273032717,'3','pbversion0000000000001','approved','search_submit.gif','search_submit.gif','crystalx/img/search_submit.gif','3','7','3',NULL,0,1,0,0,0,2108,NULL,0,1,0,1273032724,NULL,0),('84Y9CwgzP6eNU7wZnk019Q',1273032717,'3','pbversion0000000000001','approved','ico_date.gif','ico_date.gif','crystalx/img/ico_date.gif','3','7','3',NULL,0,1,0,0,0,416,NULL,0,1,0,1273032724,NULL,0),('ikXTtJKZfHVxqw-47E4AQA',1273032717,'3','pbversion0000000000001','approved','ico_user.gif','ico_user.gif','crystalx/img/ico_user.gif','3','7','3',NULL,0,1,0,0,0,407,NULL,0,1,0,1273032724,NULL,0),('DhRWPTgzhvju_-TbMN3CwA',1273032717,'3','pbversion0000000000001','approved','ico_comments.gif','ico_comments.gif','crystalx/img/ico_comments.gif','3','7','3',NULL,0,1,0,0,0,427,NULL,0,1,0,1273032724,NULL,0),('6njI-pZz2bwsjWh-Q1_11g',1273032717,'3','pbversion0000000000001','approved','ico_list.gif','ico_list.gif','crystalx/img/ico_list2.gif','3','7','3',NULL,0,1,0,0,0,412,NULL,0,1,0,1273032724,NULL,0),('_Hz1Gnd3yEnJzVS7l7nJMQ',1273032717,'3','pbversion0000000000001','approved','content_all_bg.PNG','content_all_bg.PNG','crystalx/img/content_all_bg.png','3','7','3',NULL,0,1,0,0,0,8683,NULL,0,1,0,1273032724,NULL,0),('VOOrXK5dFnkGih7aTkuDWA',1273032717,'3','pbversion0000000000001','approved','search.PNG','search.PNG','crystalx/img/search.png','3','7','3',NULL,0,1,0,0,0,2190,NULL,0,1,0,1273032724,NULL,0),('ruf-QejOkUHDRtfgakHlbA',1273032717,'3','pbversion0000000000001','approved','col_title_bg_long.GIF','col_title_bg_long.GIF','crystalx/img/col_title_bg_long.gif','3','7','3',NULL,0,1,0,0,0,1265,NULL,0,1,0,1273032724,NULL,0),('FSHy5KjQjkt599PHS41seA',1273032717,'3','pbversion0000000000001','approved','footer.jpg','footer.jpg','crystalx/img/footer.jpg','3','7','3',NULL,0,1,0,0,0,4571,NULL,0,1,0,1273032724,NULL,0),('nuYYXAz4KNNxgfumfnpo_g',1273032718,'3','pbversion0000000000001','approved','ico_top.gif','ico_top.gif','crystalx/img/ico_top.gif','3','7','3',NULL,0,1,0,0,0,834,NULL,0,1,0,1273032724,NULL,0),('Mr7ljjoy6n4fZojpQWajKQ',1273032718,'3','pbversion0000000000001','approved','ico_links.gif','ico_links.gif','crystalx/img/ico_links.gif','3','7','3',NULL,0,1,0,0,0,419,NULL,0,1,0,1273032724,NULL,0),('ApkqpDOrJDxK3QrWBGSRIg',1273032718,'3','pbversion0000000000001','approved','ico_archive2.gif','ico_archive2.gif','crystalx/img/ico_archive2.gif','3','7','3',NULL,0,1,0,0,0,432,NULL,0,1,0,1273032724,NULL,0),('AzzTY0Lay1f_YGeQJFnQCA',1273032718,'3','pbversion0000000000001','approved','ico_list.gif','ico_list.gif','crystalx/img/ico_list.gif','3','7','3',NULL,0,1,0,0,0,411,NULL,0,1,0,1273032724,NULL,0),('OiJNwP1gAlcva8_yOtL4gA',1273032718,'3','pbversion0000000000001','approved','CrystalX_style','CrystalX_style','crystalx_style','3','7','3','by Ning from Pluton -- http://pluton.nl\n\nCrystalX gives your site a crystal-ish look and a strictly formal style. Feel free to download and apply it to your own site.\n\nOriginally designed by \"Nuvio Webdesign\" and collected by Open Source Web Design, converted to WebGUI theme by Ning.',0,1,0,0,0,3470,NULL,0,1,0,1285124161,NULL,0),('JOuCU4x5BJfVHfkfMkVQdQ',1273032718,'3','pbversion0000000000001','approved','crystalx.css','crystalx.css','crystalx/crystalx.css','3','7','3',NULL,0,1,0,0,0,14430,NULL,0,1,0,1285124168,NULL,0),('gaIOm5cr2TkT9Fk6QmZWug',1273032718,'3','pbversion0000000000001','approved','crystalX_navi','crystalX_navi','crystalx/crystalx_navi','3','7','3',NULL,0,1,0,0,0,7486,'\n\n\n\n',0,1,0,1285124166,'',0),('w0QifHLhsrzeOpFKl-DX-Q',1273032718,'3','pbversion0000000000001','approved','crystalx_navi.css','crystalx_navi.css','crystalx/crystalx_navi.css','3','7','3',NULL,0,1,0,0,0,10481,NULL,0,1,0,1285124169,NULL,0),('x_hiUi1XZloBvV47Obnu8Q',1273032718,'3','pbversion0000000000001','approved','crystalX_NavigationTrail','crystalX_NavigationTrail','crystalx/crystalx_navigationtrail','3','7','12',NULL,0,1,0,0,0,422,NULL,0,1,0,1273032724,NULL,0),('hpCk0B3vQzgc-QJhSol41w',1273032718,'3','pbversion0000000000001','approved','crystalX_navitrail','crystalX_navitrail','crystalx/crystalx_navitrail','3','7','12',NULL,0,1,0,0,0,1104,NULL,0,1,0,1285124166,NULL,0),('UUwEL6hLEPdrnkZnKRzFYQ',1273032718,'3','pbversion0000000000001','approved','Site Search','Site Search','crystalx/site-search','3','7','3',NULL,0,1,0,0,0,892,NULL,0,1,0,1273032724,NULL,0),('OfKbvK7CrfMnfc8WDoF4Rg',1273032718,'3','pbversion0000000000001','approved','crystalx_search','crystalx_search','crystalx/crystalx_search','3','7','3',NULL,0,1,0,0,0,2756,NULL,0,1,0,1315877143,NULL,0),('stevestyle000000000002',1273032718,'3','pbversion0000000000001','approved','Style 02','Style 02','style_02','3','7','12','by Steve from Plain Black http://plainblack.com\r\n\r\nThe second of the WebGUI 7 styles',0,0,0,0,0,5770,NULL,0,1,0,1285124167,NULL,0),('Q4uX_C557arTp6D_jwB1jQ',1273032720,'3','pbversion0000000000001','approved','Wiki','Wiki','root/import/wiki','3','12','12',NULL,0,0,0,0,0,312,NULL,0,1,0,1273032723,NULL,0),('WikiRCTmpl000000000001',1273032720,'3','pbversion0000000000001','approved','Default Recent Changes','Default Recent Changes','default-wiki-recent-changes','3','7','12',NULL,0,0,0,0,0,1657,NULL,0,1,0,1285124165,NULL,0),('WikiFrontTmpl000000001',1273032720,'3','pbversion0000000000001','approved','Default Wiki Front Page','Default Wiki Front Page','default-wiki-front-page','3','7','12',NULL,0,0,0,0,0,4434,NULL,0,1,0,1285124165,NULL,0),('WikiSearchTmpl00000001',1273032720,'3','pbversion0000000000001','approved','Default Wiki Search','Default Wiki Search','default-wiki-search','3','7','12',NULL,0,0,0,0,0,2450,'\n\n',0,1,0,1285124165,NULL,0),('WikiPHTmpl000000000001',1273032720,'3','pbversion0000000000001','approved','Default Page History','Default Page History','default-wiki-page-history','3','7','12',NULL,0,0,0,0,0,657,NULL,0,1,0,1285124165,NULL,0),('WikiPageTmpl0000000001',1273032720,'3','pbversion0000000000001','approved','Default Wiki Page','Default Wiki Page','default-wiki-page','3','7','12',NULL,0,0,0,0,0,6422,'\n\n\n\n\n\n\n\n',0,1,0,1285124165,'',0),('WikiPageEditTmpl000001',1273032720,'3','pbversion0000000000001','approved','Default Wiki Page Edit','Default Wiki Page Edit','default-wiki-page-edit','3','7','12',NULL,0,0,0,0,0,2572,NULL,0,1,0,1285124165,NULL,0),('WikiMPTmpl000000000001',1273032720,'3','pbversion0000000000001','approved','Default Most Popular','Default Most Popular','default-wiki-most-popular','3','7','12',NULL,0,0,0,0,0,1033,NULL,0,1,0,1285124165,NULL,0),('stevestyle000000000003',1273032720,'3','pbversion0000000000001','approved','Style 03','Style 03','style_03','3','7','12','by Steve from Plain Black http://plainblack.com\r\n\r\nThe last of the WebGUI 7 style templates.',0,0,0,0,0,3907,NULL,0,1,0,1285124167,NULL,0),('stevestyle000000000001',1273032722,'3','pbversion0000000000001','approved','Style 01','Style 01','style_01','3','7','12','by Steve from Plain Black http://plainblack.com\r\n\r\nThe first of the WebGUI 7 styles',0,0,0,0,0,3790,NULL,0,1,0,1285124167,NULL,0),('c8xrwVuu5QE0XtF9DiVzLw',1273032723,'3','pbversion0000000000001','approved','Default Inbox View Template','Default Inbox View Template','root/import/account/inbox/default-inbox-view-template','3','7','12',NULL,0,1,0,0,0,11070,'\n\n',0,1,0,1285124165,'',0),('WikiKeyword00000000001',1274238756,'3','pbversion0000000000001','approved',' Wiki Pages By Keyword (default)',' Wiki Pages By Keyword','wiki-master-by-keyword-template.tmpl','3','7','3',NULL,0,0,0,0,0,2818,NULL,0,1,0,1285124165,NULL,0),('ThingyTmpl000000000004',1277868920,'3','pbversion0000000000001','approved','Default Thingy Search Thing','Default Thingy Search Thing','templates/thingy-default-search-thing','3','7','12',NULL,0,0,0,0,0,9564,'\n\n\n\n\n',0,1,0,1285124164,'',0),('GNOAsX98vCsl0JRwfwL-gg',1277868921,'3','pbversion0000000000001','approved','Collaboration','Collaboration','root/import/collaboration','3','7','12',NULL,0,0,0,0,0,338,NULL,0,1,0,1277868927,NULL,0),('PBtmpl0000000000000066',1277868921,'3','pbversion0000000000001','approved','Default USS','Default USS','default_uss','3','7','12',NULL,0,1,0,0,0,4993,'\n\n\n',0,1,0,1285124162,'',0),('PBtmpl0000000000000080',1277868921,'3','pbversion0000000000001','approved','FAQ','FAQ','faqtemplate','3','7','12',NULL,0,1,0,0,0,3968,NULL,0,1,0,1285124162,NULL,0),('PBtmpl0000000000000097',1277868921,'3','pbversion0000000000001','approved','Traditional with Thumbnails','Traditional with Thumbnails','traditional_with_thumbnails','3','7','12',NULL,0,1,0,0,0,6674,'\n',0,1,0,1285124163,'',0),('PBtmpl0000000000000112',1277868921,'3','pbversion0000000000001','approved','Weblog','Weblog','weblog','3','7','12',NULL,0,1,0,0,0,5202,'',0,1,0,1285124163,'',0),('PBtmpl0000000000000121',1277868921,'3','pbversion0000000000001','approved','Photo Gallery','Photo Gallery','photo_gallery','3','7','12',NULL,0,1,0,0,0,3185,'\n\n',0,1,0,1285124163,'',0),('PBtmpl0000000000000067',1277868921,'3','pbversion0000000000001','approved','Default Submission','Default Submission','default_submission','3','7','12',NULL,0,1,0,0,0,22672,'\n',0,1,0,1285124162,'',0),('PBtmpl0000000000000026',1277868921,'3','pbversion0000000000001','approved','Default Forum','Default Forum','default_forum','3','7','12',NULL,0,1,0,0,0,7927,'\n\n\n',0,1,0,1285124161,'',0),('PBtmpl0000000000000128',1277868921,'3','pbversion0000000000001','approved','Classifieds','Classifieds','classifieds','3','7','12',NULL,0,1,0,0,0,3272,'\n\n',0,1,0,1285124163,'',0),('PBtmpl0000000000000079',1277868921,'3','pbversion0000000000001','approved','Topics','Topics','topics','3','7','12',NULL,0,1,0,0,0,4948,'\n',0,1,0,1285124162,'',0),('PBtmpl0000000000000083',1277868921,'3','pbversion0000000000001','approved','Link List','Link List','link_list','3','7','12',NULL,0,1,0,0,0,3716,NULL,0,1,0,1285124163,NULL,0),('PBtmpl0000000000000082',1277868921,'3','pbversion0000000000001','approved','Unordered List','Unordered List','unordered_list','3','7','12',NULL,0,1,0,0,0,4633,'\n',0,1,0,1285124162,'',0),('PBtmpl0000000000000133',1277868921,'3','pbversion0000000000001','approved','Guest Book','Guest Book','guest_book','3','7','12',NULL,0,1,0,0,0,3270,NULL,0,1,0,1285124163,NULL,0),('PBtmpl0000000000000029',1277868921,'3','pbversion0000000000001','approved','Default Post Form','Default Post Form','default_post_form','3','7','12',NULL,0,1,0,0,0,4119,'\n',0,1,0,1285124162,'',0),('PBtmpl0000000000000032',1277868921,'3','pbversion0000000000001','approved','Default Thread','Default Thread','default_thread','3','7','12',NULL,0,1,0,0,0,11649,'\n',0,1,0,1285124162,'',0),('PBtmpl0000000000000031',1277868921,'3','pbversion0000000000001','approved','Default Forum Search','Default Forum Search','default_forum_search','3','7','12',NULL,0,1,0,0,0,3848,'',0,1,0,1285124162,'',0),('PBtmpl0000000000000068',1277868921,'3','pbversion0000000000001','approved','Default Submission Form','Default Submission Form','default_submission_form','3','7','12',NULL,0,1,0,0,0,5051,'\n',0,1,0,1285124162,'',0),('PBtmpl0000000000000099',1277868921,'3','pbversion0000000000001','approved','FAQ Submission Form','FAQ Submission Form','faq_submission_form','3','7','12',NULL,0,1,0,0,0,4330,'\n',0,1,0,1285124163,'',0),('PBtmpl0000000000000114',1277868922,'3','pbversion0000000000001','approved','Link List Submission Form','Link List Submission Form','link_list_submission_form','3','7','12',NULL,0,1,0,0,0,5502,'\n',0,1,0,1285124163,'',0),('PBtmpl0000000000000098',1277868922,'3','pbversion0000000000001','approved','Job','Job','job','3','7','12',NULL,0,1,0,0,0,20225,'',0,1,0,1285124163,'',0),('PBtmpl0000000000000122',1277868922,'3','pbversion0000000000001','approved','Job Submission Form','Job Submission Form','job_submission_form','3','7','12',NULL,0,1,0,0,0,6134,'\n',0,1,0,1285124163,'',0),('PBtmpl0000000000000081',1277868922,'3','pbversion0000000000001','approved','Q and A','Q and A','q_and_a','3','7','12',NULL,0,1,0,0,0,4546,'\n',0,1,0,1285124162,'',0),('PBtmpl0000000000000101',1277868922,'3','pbversion0000000000001','approved','Ordered List','Ordered List','ordered_list','3','7','12',NULL,0,1,0,0,0,3771,NULL,0,1,0,1285124163,NULL,0),('PBtmpl0000000000000113',1277868922,'3','pbversion0000000000001','approved','Link','Link','link','3','7','12',NULL,0,1,0,0,0,19099,'',0,1,0,1285124163,'',0),('PBtmpl0000000000000208',1277868922,'3','pbversion0000000000001','approved','Request Tracker','Request Tracker','request-tracker-template','3','7','12',NULL,0,0,0,0,0,6800,'\n\n\n\n\n',0,1,0,1285124164,'',0),('PBtmpl0000000000000209',1277868922,'3','pbversion0000000000001','approved','Request Tracker Thread','Request Tracker Thread','request-tracker-post-template','3','7','12',NULL,0,0,0,0,0,22451,'\n',0,1,0,1285124164,'',0),('PBtmpl0000000000000210',1277868922,'3','pbversion0000000000001','approved','Request Tracker Post Form','Request Tracker Post Form','request-tracker-template2','3','7','12',NULL,0,0,0,0,0,5928,'\n\n\n',0,1,0,1285124164,'',0),('default_post_received1',1277868922,'3','pbversion0000000000001','approved','Default Post Received','Default Post Received','default_post_received','3','7','4',NULL,0,0,0,0,0,541,NULL,0,1,0,1285124166,NULL,0),('default_CS_unsubscribe',1277868922,'3','pbversion0000000000001','approved','Default Collaboration System Unsubscribe','Default Collaboration System Unsubscribe','collaboration_unsubscribe','3','7','4',NULL,0,0,0,0,0,1092,NULL,0,1,0,1285124166,NULL,0),('mfHGkp6t9gdclmzN33OEnw',1277868927,'3','pbversion0000000000001','approved','Default Twitter Choose Username','Default Twitter Choose Username','root/import/auth/twitter/chooseusername/default-twitter-choose-username','3','7','12',NULL,0,1,0,0,0,1074,NULL,0,1,0,1285124167,NULL,0),('CalendarMonth000000001',1279073449,'3','pbversion0000000000001','approved','Default Calendar Month','Default Calendar Month','root/import/calendar-templates/default-calendar-month','3','7','12',NULL,0,0,0,0,0,16187,'\n\n\n\n\n',0,1,0,1285124160,'',0),('8tqyQx-LwYUHIWOlKPjJrA',1279073449,'3','pbversion0000000000001','approved','EMS Event Submission Template','EMS Event Submission Template','root/import/ems/ems-event-submission','3','7','12',NULL,0,1,0,0,0,5296,'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n',0,1,0,1285124159,'',0),('DoVNijm6lMDE0cYrtvEbDQ',1279073449,'3','pbversion0000000000001','approved','EMS Event Submission Main Template','EMS Event Submission Main Template','root/import/ems/ems-event-submission-main','3','7','12',NULL,0,1,0,0,0,8281,'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n',0,1,0,1285124160,'',0),('6uQEULvXFgCYlRWnYzZsuA',1279073450,'3','pbversion0000000000001','approved','Default Inbox Send Message Template','Default Inbox Send Message Template','root/import/account/inbox/default-inbox-send-message-template','3','7','12',NULL,0,1,0,0,0,9065,'\n\n\n\n\n',0,1,0,1285124159,'',0),('ktSvKU8riGimhcsxXwqvPQ',1279073450,'3','pbversion0000000000001','approved','EMS Event Submission Queue','EMS Event Submission Queue','root/import/ems/ems-event-submission-queue','3','7','12',NULL,0,1,0,0,0,7457,'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n',0,1,0,1285124166,'',0),('4Yfz9hqBqM8OYMGuQK8oLw',1271352537,'1','pbversion0000000000001','approved','Get Features','Get Features','yns/features','3','7','4',NULL,0,1,0,0,0,772,NULL,0,1,0,1301974027,NULL,0),('Wl8WZ43g2rK5AYr9o4zY7w',1271445539,'1','pbversion0000000000001','approved','Get Style','Get Style','yns/style','3','7','4',NULL,0,1,0,0,0,700,NULL,0,1,0,1301974027,NULL,0),('LBuiKzg2mWwmOPS9AgV3bg',1271348789,'1','pbversion0000000000001','approved','Get Translated','Get Translated','yns/translated','3','7','4',NULL,0,1,0,0,0,728,NULL,0,1,0,1301974027,NULL,0),('jTNggl7AoVSUc_ZzrvuCmw',1271348789,'1','pbversion0000000000001','approved','Get Promoted','Get Promoted','yns/promotion','3','7','4',NULL,0,1,0,0,0,721,NULL,0,1,0,1301974027,NULL,0),('mTOiwwk3q4k9g5-XykXhPA',1271349647,'1','pbversion0000000000001','approved','Documentation','Documentation','documentation','3','7','3',NULL,0,0,0,0,0,561,NULL,0,1,0,1301974027,NULL,0),('2TqQc4OISddWCZmRY1_m8A',1271357565,'1','pbversion0000000000001','approved','Join Us','Join Us','join_us','3','7','3',NULL,0,0,0,0,0,577,NULL,0,1,0,1301974028,NULL,0),('k2Qj03FrAOXYra8kDJYYXw',1271357513,'1','pbversion0000000000001','approved','IRC (Internet Relay Chat)','IRC','join_us/irc','3','7','3',NULL,0,1,0,0,0,1197,NULL,0,1,0,1301974028,NULL,0),('ksSfkZdsr0uC62NwIk6hFQ',1271356973,'1','pbversion0000000000001','approved','WebGUI Users Conference','WUC','join_us/wuc','3','7','3',NULL,0,1,0,0,0,861,NULL,0,1,0,1301974028,NULL,0),('nWxS5jnA3o3DgPEwBeR7yQ',1271357239,'1','pbversion0000000000001','approved','The Forums','forums','join_us/forums','3','7','3',NULL,0,1,0,0,0,1531,NULL,0,1,0,1301974028,NULL,0),('x3OFY6OJh_qsXkZfPwug4A',1271348790,'1','pbversion0000000000001','approved','Site Map','Site Map','site_map','3','7','3',NULL,0,0,0,0,0,349,NULL,0,1,0,1301974028,NULL,0),('pJd5TLAjfWMVXD6sCRLwUg',1271348790,'1','pbversion0000000000001','approved','Site Map','Site Map','site_map/site_map','3','7','3',NULL,0,1,0,0,0,364,NULL,0,1,0,1301974028,NULL,0),('OhdaFLE7sXOzo_SIP2ZUgA',1271445348,'1','pbversion0000000000001','approved','Welcome','Welcome','home/welcome','3','7','4',NULL,0,1,0,0,0,2190,NULL,0,1,0,1301974028,NULL,0),('IWFxZDyGhQ3-SLZhELa3qw',1277737686,'1','pbversion0000000000001','approved','Benefits','Benefits','home/key-benefits','3','7','4',NULL,0,1,0,0,0,1835,NULL,0,1,0,1301974028,NULL,0),('LdiozcIUciWuvt3Z-na5Ww',1281501162,'3','pbversion0000000000001','approved','Matrix','Matrix','root/import/matrix','3','7','12',NULL,0,0,0,0,0,317,NULL,0,1,0,1281501164,NULL,0),('matrixtmpl000000000002',1281501162,'3','pbversion0000000000001','approved','Matrix Default Compare','Matrix Default Compare','matrix-default-compare-template','3','7','12',NULL,0,0,0,0,0,20669,'\n\n\n\n\n\n\n\n\n\n\n',0,1,0,1285124167,'',0),('matrixtmpl000000000001',1281501162,'3','pbversion0000000000001','approved','Matrix Default View','Matrix Default View','matrix-default-view-template','3','7','12',NULL,0,0,0,0,0,22048,'\n\n\n\n\n\n\n',0,1,0,1285124166,'',0),('matrixtmpl000000000003',1281501163,'3','pbversion0000000000001','approved','Matrix Default Detailed Listing','Matrix Default Detailed Listing','matrix-default-detailed-listing','3','7','12',NULL,0,0,0,0,0,15360,'\n\n\n\n\n\n\n\n\n\n\n',0,1,0,1285124167,'',0),('matrixtmpl000000000004',1281501163,'3','pbversion0000000000001','approved','Matrix Default Edit Listing','Matrix Default Edit Listing','default-matrix-edit-listing-template','3','7','12',NULL,0,0,0,0,0,525,NULL,0,1,0,1285124167,NULL,0),('matrixtmpl000000000005',1281501163,'3','pbversion0000000000001','approved','Matrix Default Search','Matrix Default Search','matrix-search-template','3','7','12',NULL,0,0,0,0,0,10307,'\n\n\n\n\n\n\n\n\n\n',0,1,0,1285124167,'',0),('hkj6WeChxFyqfP85UlRP8w',1281501163,'3','pbversion0000000000001','approved','matrix.css','matrix.css','new-matrix/matrix.css','3','7','12',NULL,0,1,0,0,0,16408,NULL,0,1,0,1285124169,NULL,0),('kJf77eCr9GAMiEzWrzsBTA',1281501163,'3','pbversion0000000000001','approved','matrix-ie.css','matrix-ie.css','new-matrix/matrix-ie.css','3','7','12',NULL,0,1,0,0,0,764,NULL,0,1,0,1285124169,NULL,0),('4LQT4-bGW4FkiEQLSY5gvQ',1281501163,'3','pbversion0000000000001','approved','show-hide.js','show-hide.js','new-matrix/show-hide.js','3','7','12',NULL,0,1,0,0,0,933,NULL,0,1,0,1285124168,NULL,0),('alraubvBu-YJJ614jAHD5w',1281501163,'3','pbversion0000000000001','approved','matrix-nav-tmpl','matrix-nav-tmpl','new-matrix/matrix-nav-tmpl','3','7','12',NULL,0,1,0,0,0,711,NULL,0,1,0,1285124165,NULL,0),('Vch1Ww7G_JpBhOhXX07RDg',1281501163,'3','pbversion0000000000001','approved','matrx-nav','matrix-nav','new-matrix/matrix-nav','3','7','12',NULL,0,1,0,0,0,375,NULL,0,1,0,1281501164,NULL,0),('wrq7hMxb1ewQqZ46xmd8Gg',1281501163,'3','pbversion0000000000001','approved','equal-cols.js','equal-cols.js','matrix/equal-cols.js','3','7','12',NULL,0,1,0,0,0,796,NULL,0,1,0,1285124169,NULL,0),('matrixtmpl000000000007',1281501163,'3','pbversion0000000000001','approved','Matrix Default Screenshots Config','Matrix Default Screenshots Config','matrix-default-screenshots-config','3','7','12',NULL,0,0,0,0,0,4099,NULL,0,1,0,1285124167,NULL,0),('matrixtmpl000000000006',1281501163,'3','pbversion0000000000001','approved','Matrix Default Screenshots','Matrix Default Screenshots','matrix-default-screenshots','3','7','12',NULL,0,0,0,0,0,2952,NULL,0,1,0,1285124167,NULL,0),('N716tpSna0iIQTKxS4gTWA',1281501163,'3','pbversion0000000000001','approved','Default Account Layout','Default Account Layout','root/import/account/default-account-layout2','3','7','12',NULL,0,1,0,0,0,1923,'\r\n',0,1,0,1285124161,'',0),('AssetReportFolder00001',1281501163,'3','pbversion0000000000001','approved','Asset Report','Asset Report','asset_report','3','3','4',NULL,0,0,0,0,0,322,NULL,0,1,0,1281501164,NULL,0),('N7uMnnicbyTEulcuRi1sSg',1283900195,'3','pbversion0000000000001','approved','PDFs','PDFs','media/pdfs','3','7','4',NULL,0,1,0,0,0,304,NULL,0,1,0,1283921709,NULL,0),('bCGr7FRtZt-XYlBVUEJBjw',1278013724,'3','pbversion0000000000001','approved','Getting_Started_doc.pdf','Getting_Started_doc.pdf','media/pdfs/getting_started_doc.pdf','3','7','4',NULL,0,1,0,0,0,1188407,NULL,0,1,0,1283921709,NULL,0),('_XfvgNH__bY1ykMiKYSobQ',1281501163,'3','pbversion0000000000001','approved','account.css','account.css','root/import/account/account.css','3','7','12',NULL,0,1,0,0,0,45634,NULL,0,1,0,1285124169,NULL,0),('limMkk80fMB3fqNZVf162w',1281501163,'3','pbversion0000000000001','approved','Default Asset Subscription','Default Asset Subscription','root/import/default-asset-subscription','3','7','3',NULL,0,1,0,0,0,550,NULL,0,1,0,1285124166,NULL,0),('l0guT3vTR3B8cL6vtP-g3A',1285124369,'1','pbversion0000000000001','approved','Contribute','contribute','contribute','3','7','3',NULL,0,1,0,0,0,3239,NULL,1,1,0,1285124369,NULL,0),('sJtcUCfn0CVbKdb4QM61Yw',1283921584,'3','pbversion0000000000001','approved','Asset Report Default Template','Asset Report Default Template','asset-report/asset-report-default-template','3','3','4',NULL,0,1,0,0,0,2218,NULL,0,1,0,1285124167,NULL,0),('A16v-YjWAShXWvSACsraeg',1285124154,'3','pbversion0000000000001','approved','StoryTopic','StoryTopic','root/import/storymanager/storytopic','3','7','4',NULL,0,0,0,0,0,2870,'',0,1,0,1285124171,'',0),('gI_TxK-5S4DNuv42wpImmw',1285124155,'3','pbversion0000000000001','approved','Gallery Templates','Gallery Templates','root/import/gallery-templates','3','7','3',NULL,0,0,0,0,0,362,NULL,0,1,0,1285124169,NULL,0),('jME5BEDYVDlBZ8jIQA9-jQ',1285124155,'3','pbversion0000000000001','approved','Default Gallery Search','Default Gallery Search','root/import/gallery-templates/default-gallery-search','3','7','3',NULL,0,1,0,0,0,11460,'\r\n \r\n',0,1,0,1285124169,'',0),('azCqD0IjdQSlM3ar29k5Sg',1285124155,'3','pbversion0000000000001','approved','Default Gallery List Albums View','Default Gallery List Albums View','root/import/gallery-templates/default-gallery-list-albums-view','3','7','3',NULL,0,1,0,0,0,5927,' \r\n \r\n ',0,1,0,1285124169,'',0),('05FpjceLYhq4csF1Kww1KQ',1285124155,'3','pbversion0000000000001','approved','Default Gallery View Album','Default Gallery View Album','root/import/gallery-templates/default-gallery-view-album','3','7','3',NULL,0,1,0,0,0,7861,' \n \n ',0,1,0,1285124169,'',0),('q5O62aH4pjUXsrQR3Pq4lw',1285124155,'3','pbversion0000000000001','approved','Default Gallery View Album Thumbnails','Default Gallery View Album Thumbnails','root/import/gallery-templates/default-gallery-view-album-thumbnails','3','7','3',NULL,0,1,0,0,0,7651,'\r\n\r\n\r\n\r\n\r\n',0,1,0,1285124169,'',0),('KAMdiUdJykjN02CPHpyZOw',1285124155,'3','pbversion0000000000001','approved','Default Gallery View Album Slideshow','Default Gallery View Album Slideshow','root/import/gallery-templates/default-gallery-view-album-slideshow','3','7','3',NULL,0,1,0,0,0,7941,'\r\n \r\n\r\n\r\n \r\n \r\n \r\n\r\n\r\n',0,1,0,1285124169,'',0),('OkphOEdaSGTXnFGhK4GT5A',1285124155,'3','pbversion0000000000001','approved','Default Gallery List Files For User','Default Gallery List Files For User','root/import/gallery-templates/default-gallery-list-files-for-user','3','7','3',NULL,0,1,0,0,0,7790,'\n \n',0,1,0,1285124169,'',0),('TEId5V-jEvUULsZA0wuRuA',1285124155,'3','pbversion0000000000001','approved','Default Gallery View Photo','Default Gallery View Photo','root/import/gallery-templates/default-gallery-view-photo','3','7','3',NULL,0,1,0,0,0,15566,'\n\n\n\n',0,1,0,1285124169,'',0),('6X-7Twabn5KKO_AbgK3PEw',1285124155,'3','pbversion0000000000001','approved','Default Gallery Edit Album','Default Gallery Edit Album','root/import/gallery-templates/default-gallery-edit-album','3','7','3',NULL,0,1,0,0,0,8244,'\n\n\n\n\n\n\n\n\n',0,1,0,1285124169,'',0),('7JCTAiu1U_bT9ldr655Blw',1285124155,'3','pbversion0000000000001','approved','Default Gallery Edit Photo','Default Gallery Edit Photo','root/import/gallery-templates/default-gallery-edit-photo','3','7','3',NULL,0,1,0,0,0,7438,'\n\n\n\n',0,1,0,1285124169,'',0),('0X4Q3tBWUb_thsVbsYz9xQ',1285124155,'3','pbversion0000000000001','approved','Default Gallery Add Archive','Default Gallery Add Archive','root/import/gallery-templates/default-gallery-add-archive','3','7','3',NULL,0,1,0,0,0,3773,' \r\n\r\n ',0,1,0,1285124169,'',0),('m3IbBavqzuKDd2PGGhKPlA',1285124155,'3','pbversion0000000000001','approved','Default Gallery Make Shortcut','Default Gallery Make Shortcut','root/import/gallery-templates/default-gallery-make-shortcut','3','7','3',NULL,0,1,0,0,0,5111,'\n\n\n\n',0,1,0,1285124169,'',0),('UTNFeV7B_aSCRmmaFCq4Vw',1285124155,'3','pbversion0000000000001','approved','Default Gallery Delete Album','Default Gallery Delete Album','root/import/gallery-templates/default-gallery-delete-album','3','7','3',NULL,0,1,0,0,0,4712,'\n \n\n\n',0,1,0,1285124169,'',0),('zcX-wIUct0S_np14xxOA-A',1285124155,'3','pbversion0000000000001','approved','Default Gallery Delete File','Default Gallery Delete File','root/import/gallery-templates/default-gallery-delete-file','3','7','3',NULL,0,1,0,0,0,4728,'\n \n\n\n',0,1,0,1285124169,'',0),('MBZK_LPVzqhb4TV4mMRTJg',1285124155,'3','pbversion0000000000001','approved','admin_ie7.css','admin_ie7.css','root/import/gallery-templates/admin_ie7.css','3','7','3',NULL,0,1,0,0,0,380,NULL,0,1,0,1285124169,NULL,0),('_hELmIJfgbAyXFNqPyApxQ',1285124155,'3','pbversion0000000000001','approved','admin.css','admin.css','root/import/gallery-templates/admin.css','3','7','3',NULL,0,1,0,0,0,3957,NULL,0,1,0,1285124169,NULL,0),('kaPRSaf8UKiskiGEgJgLAw',1285124155,'3','pbversion0000000000001','approved','images','images','root/import/gallery-templates/images','3','7','3',NULL,0,0,0,0,0,340,NULL,0,1,0,1285124169,NULL,0),('bANo8aiAPA7aY_oQZKxIWw',1285124155,'3','pbversion0000000000001','approved','rss.gif','rss.gif','root/import/gallery-templates/images/rss.gif','3','7','3',NULL,0,1,0,0,0,1389,NULL,0,1,0,1285124169,NULL,0),('2ci_v2d4x4uvyjTRlC49OA',1285124156,'3','pbversion0000000000001','approved','moveDown.gif','moveDown.gif','root/import/gallery-templates/images/movedown.gif','3','7','3',NULL,0,1,0,0,0,784,NULL,0,1,0,1285124169,NULL,0),('O-EsSzKgAk1KolFT-x_KsA',1285124156,'3','pbversion0000000000001','approved','moveUp.gif','moveUp.gif','root/import/gallery-templates/images/moveup.gif','3','7','3',NULL,0,1,0,0,0,772,NULL,0,1,0,1285124170,NULL,0),('fdd8tGExyVwHyrB8RBbKXg',1285124156,'3','pbversion0000000000001','approved','next.gif','next.gif','root/import/gallery-templates/images/next.gif','3','7','3',NULL,0,1,0,0,0,1676,NULL,0,1,0,1285124170,NULL,0),('BpisgHl4ZDcSECJp6oib1w',1285124156,'3','pbversion0000000000001','approved','play.gif','play.gif','root/import/gallery-templates/images/play.gif','3','7','3',NULL,0,1,0,0,0,2113,NULL,0,1,0,1285124170,NULL,0),('zshreRgPAXtnF0DtVbQ1Yg',1285124156,'3','pbversion0000000000001','approved','previous.gif','previous.gif','root/import/gallery-templates/images/previous.gif','3','7','3',NULL,0,1,0,0,0,1682,NULL,0,1,0,1285124170,NULL,0),('POVcY79vIqAHR8OfGt36aw',1285124156,'3','pbversion0000000000001','approved','pagination_button.jpg','pagination_button.jpg','root/import/gallery-templates/images/pagination_button.jpg','3','7','12',NULL,0,1,0,0,0,1050,NULL,0,0,0,1285124170,NULL,0),('hIB-z34r8Xl-vYVYCkKr-w',1285124156,'3','pbversion0000000000001','approved','bar-btn-r.jpg','bar-btn-r.jpg','root/import/gallery-templates/images/bar-btn-r.jpg','3','7','12',NULL,0,1,0,0,0,830,NULL,0,0,0,1285124170,NULL,0),('-mPUoFlYcjqjPUPRLAlxNQ',1285124156,'3','pbversion0000000000001','approved','search-field-r.jpg','search-field-r.jpg','root/import/gallery-templates/images/search-field-r.jpg','3','7','12',NULL,0,1,0,0,0,848,NULL,0,0,0,1285124170,NULL,0),('MDpUOR-N8KMyt1J7Hh_h4w',1285124156,'3','pbversion0000000000001','approved','bar-btn.jpg','bar-btn.jpg','root/import/gallery-templates/images/bar-btn.jpg','3','7','12',NULL,0,1,0,0,0,708,NULL,0,0,0,1285124170,NULL,0),('YfXKByTwDZVituMc4h13Dg',1285124156,'3','pbversion0000000000001','approved','pagination_bg.jpg','pagination_bg.jpg','root/import/gallery-templates/images/pagination_bg.jpg','3','7','12',NULL,0,1,0,0,0,1131,NULL,0,0,0,1285124170,NULL,0),('esko_HSU0Gh-uJZ1h3xRmQ',1285124156,'3','pbversion0000000000001','approved','search-field-l.jpg','search-field-l.jpg','root/import/gallery-templates/images/search-field-l.jpg','3','7','12',NULL,0,1,0,0,0,874,NULL,0,0,0,1285124170,NULL,0),('oSqpGswzpBG_ErdfYwIO8A',1285124156,'3','pbversion0000000000001','approved','top_bg.jpg','top_bg.jpg','root/import/gallery-templates/images/top_bg.jpg','3','7','12',NULL,0,1,0,0,0,692,NULL,0,0,0,1285124170,NULL,0),('MXJklShZvLLB_DSnZQmXrQ',1285124156,'3','pbversion0000000000001','approved','title_bg.jpg','title_bg.jpg','root/import/gallery-templates/images/title_bg.jpg','3','7','12',NULL,0,1,0,0,0,1658,NULL,0,0,0,1285124170,NULL,0),('BthxD5oJ0idmsyI3ioA2FA',1285124156,'3','pbversion0000000000001','approved','bar-btn-l.jpg','bar-btn-l.jpg','root/import/gallery-templates/images/bar-btn-l.jpg','3','7','12',NULL,0,1,0,0,0,845,NULL,0,0,0,1285124170,NULL,0),('aZ-1HYQamkRHYXvzAra8WQ',1285124156,'3','pbversion0000000000001','approved','search-field.jpg','search-field.jpg','root/import/gallery-templates/images/search-field.jpg','3','7','12',NULL,0,1,0,0,0,750,NULL,0,0,0,1285124170,NULL,0),('eRkb94OYcS5AdcrrerOP5Q',1285124157,'3','pbversion0000000000001','approved','rss.gif','rss.gif','root/import/gallery-templates/images/rss2.gif','3','7','12',NULL,0,1,0,0,0,1391,NULL,0,0,0,1285124170,NULL,0),('TbnkjAJQEASORXIpYqDkcA',1285124157,'3','pbversion0000000000001','approved','blank-image.jpg','blank-image.jpg','root/import/gallery-templates/images/blank-image.jpg','3','7','12',NULL,0,1,0,0,0,3084,NULL,0,0,0,1285124170,NULL,0),('er-3faBjY-hhlDcc5aKqdQ',1285124157,'3','pbversion0000000000001','approved','top_bg.jpg','top_bg.jpg','root/import/gallery-templates/images/top_bg2.jpg','3','7','12',NULL,0,1,0,0,0,693,NULL,0,0,0,1285124170,NULL,0),('8bFsu2FJUqHRUiHcozcVFw',1285124157,'3','pbversion0000000000001','approved','sub-btn-l.jpg','sub-btn-l.jpg','root/import/gallery-templates/images/sub-btn-l.jpg','3','7','12',NULL,0,1,0,0,0,844,NULL,0,0,0,1285124170,NULL,0),('34Aayx5eA320D8VfhdfDBw',1285124157,'3','pbversion0000000000001','approved','sub-btn-r.jpg','sub-btn-r.jpg','root/import/gallery-templates/images/sub-btn-r.jpg','3','7','12',NULL,0,1,0,0,0,824,NULL,0,0,0,1285124170,NULL,0),('TlhKOVmWblZOsAdqmhEpeg',1285124157,'3','pbversion0000000000001','approved','sub-btn.jpg','sub-btn.jpg','root/import/gallery-templates/images/sub-btn.jpg','3','7','12',NULL,0,1,0,0,0,702,NULL,0,0,0,1285124170,NULL,0),('Nx0ypjO3cN6QdZUBUEE0lA',1285124157,'3','pbversion0000000000001','approved','pic-title-bg.jpg','pic-title-bg.jpg','root/import/gallery-templates/images/pic-title-bg.jpg','3','7','12',NULL,0,1,0,0,0,865,NULL,0,0,0,1285124170,NULL,0),('CmFZLN7iPS7XXvUEsxKPKA',1285124157,'3','pbversion0000000000001','approved','row-2.jpg','row-2.jpg','root/import/gallery-templates/images/row-2.jpg','3','7','12',NULL,0,1,0,0,0,806,NULL,0,0,0,1285124170,NULL,0),('v_XBgwwZqgW1D5s4y05qfg',1285124157,'3','pbversion0000000000001','approved','addtl-info.gif','addtl-info.gif','root/import/gallery-templates/images/addtl-info.gif','3','7','12',NULL,0,1,0,0,0,914,NULL,0,0,0,1285124170,NULL,0),('4TdAkKoQbSCvI7QWcW889A',1285124157,'3','pbversion0000000000001','approved','row-1.jpg','row-1.jpg','root/import/gallery-templates/images/row-1.jpg','3','7','12',NULL,0,1,0,0,0,791,NULL,0,0,0,1285124170,NULL,0),('SAgK6eDPCG1cgkJ59WapHQ',1285124157,'3','pbversion0000000000001','approved','prev-btn.gif','prev-btn.gif','root/import/gallery-templates/images/prev-btn.gif','3','7','12',NULL,0,1,0,0,0,2015,NULL,0,0,0,1285124170,NULL,0),('XJYLuvGy9ubF7JNKyINtpA',1285124157,'3','pbversion0000000000001','approved','play-btn.gif','play-btn.gif','root/import/gallery-templates/images/play-btn.gif','3','7','12',NULL,0,1,0,0,0,2543,NULL,0,0,0,1285124170,NULL,0),('RWj7hyv2SpZuXxwj1Wocug',1285124157,'3','pbversion0000000000001','approved','next-btn.gif','next-btn.gif','root/import/gallery-templates/images/next-btn.gif','3','7','12',NULL,0,1,0,0,0,2045,NULL,0,0,0,1285124170,NULL,0),('aq8QElnlm3YufAoxRz9Pcg',1285124158,'3','pbversion0000000000001','approved','data-bg.jpg','data-bg.jpg','root/import/gallery-templates/images/data-bg.jpg','3','7','12',NULL,0,1,0,0,0,821,NULL,0,0,0,1285124170,NULL,0),('i6-BofrJJYozovlzFBByXg',1285124158,'3','pbversion0000000000001','approved','first-photo-button.png','first-photo-button.png','root/import/gallery-templates/images/first-photo-button.png','3','7','3',NULL,0,1,0,0,0,1069,NULL,0,1,0,1285124170,NULL,0),('fU_OZCmtdFNJ8a6bMve8ng',1285124158,'3','pbversion0000000000001','approved','previous-photo-button.png','previous-photo-button.png','root/import/gallery-templates/images/previous-photo-button.png','3','7','3',NULL,0,1,0,0,0,943,NULL,0,1,0,1285124170,NULL,0),('YXCtusAxb4vzZ5sTnUA5DA',1285124158,'3','pbversion0000000000001','approved','next-photo-button.png','next-photo-button.png','root/import/gallery-templates/images/next-photo-button.png','3','7','3',NULL,0,1,0,0,0,955,NULL,0,1,0,1285124170,NULL,0),('k_xuE82wwp8gFVl9aaaG8g',1285124158,'3','pbversion0000000000001','approved','last-photo-button.png','last-photo-button.png','root/import/gallery-templates/images/last-photo-button.png','3','7','3',NULL,0,1,0,0,0,1072,NULL,0,1,0,1285124170,NULL,0),('NPM_WItpM5IzLWBhWjYfCA',1285124158,'3','pbversion0000000000001','approved','photo-navigation-spacer.png','photo-navigation-spacer.png','root/import/gallery-templates/images/photo-navigation-spacer.png','3','7','3',NULL,0,1,0,0,0,569,NULL,0,1,0,1285124170,NULL,0),('mM3bjP_iG9sv5nQb4S17tQ',1285124158,'3','pbversion0000000000001','approved','Default Gallery View Album RSS','Default Gallery View Album RSS','root/import/gallery-templates/default-gallery-album-rss','3','7','3',NULL,0,1,0,0,0,1259,NULL,0,1,0,1285124170,NULL,0),('ilu5BrM-VGaOsec9Lm7M6Q',1285124158,'3','pbversion0000000000001','approved','Default Gallery List Albums RSS','Default Gallery List Albums RSS','root/import/gallery-templates/default-gallery-list-albums-rss','3','7','3',NULL,0,1,0,0,0,1268,NULL,0,1,0,1285124170,NULL,0),('-ANLpoTEP-n4POAdRxCzRw',1285124158,'3','pbversion0000000000001','approved','Default Gallery List Files For User RSS','Default Gallery List Files For User RSS','root/import/gallery-templates/default-gallery-list-files-for-user-rss','3','7','3',NULL,0,1,0,0,0,1300,NULL,0,1,0,1285124170,NULL,0),('OxJWQgnGsgyGohP2L3zJPQ',1285124158,'3','pbversion0000000000001','approved','Default Gallery Edit Comment','Default Gallery Edit Comment','root/import/gallery-templates/default-gallery-edit-comment','3','7','3',NULL,0,1,0,0,0,5493,'',0,1,0,1285124170,'',0),('7fE8md51vTCcuJFOvxNaGA',1285124158,'3','pbversion0000000000001','approved','thumbnails.js','thumbnails.js','root/import/gallery-templates/thumbnails.js','3','7','3',NULL,0,1,0,0,0,5848,NULL,0,1,0,1285124170,NULL,0),('1oGhfj00KkCzP1ez01AfKA',1285124158,'3','pbversion0000000000001','approved','slideshow.js','slideshow.js','root/import/gallery-templates/slideshow.js','3','7','3',NULL,0,1,0,0,0,11975,NULL,0,1,0,1285124170,NULL,0),('3qiVYhNTXMVC5hfsumVHgg',1285124158,'3','pbversion0000000000001','approved','browserdetect.js','browserdetect.js','root/import/gallery-templates/browserdetect.js','3','7','3',NULL,0,1,0,0,0,4375,NULL,0,1,0,1285124170,NULL,0),('THQhn1C-ooj-TLlEP7aIJQ',1285124158,'3','pbversion0000000000001','approved','gallery-ie.css','gallery-ie.css','root/import/gallery-templates/gallery-ie.css','3','7','3',NULL,0,1,0,0,0,626,NULL,0,1,0,1285124170,NULL,0),('qxd0WpRGqDPWP8WBicYvEA',1285124158,'3','pbversion0000000000001','approved','dragdropsorting.js','dragdropsorting.js','root/import/gallery-templates/dragdropsorting.js','3','7','12',NULL,0,1,0,0,0,9518,NULL,0,1,0,1285124171,NULL,0),('RrV4aAPnn4dM0ZcU3OXnlw',1286336607,'3','pbversion0000000000001','approved','style','style','root/import/style','3','7','12',NULL,0,0,0,0,0,314,NULL,0,1,0,1286336607,NULL,0),('PBtmpl0000000000000111',1286336607,'3','pbversion0000000000001','approved','Make Page Printable','Make Page Printable','make_page_printable','3','7','12',NULL,0,1,0,0,0,1791,NULL,0,1,0,1286336607,NULL,0),('A3T7jpTBKLYws1h5mJ0t8A',1286336607,'3','pbversion0000000000001','approved','makepageprintable.css','makepageprintable.css','makepageprintable.css','3','7','12',NULL,0,1,0,0,0,6259,NULL,0,1,0,1286336607,NULL,0),('diZvW4bSgZWwyyGP3qXi1g',1285610019,'1','pbversion0000000000001','approved','Commercial Documentation','Commercial Documentation','documentation/commercial-documentation','3','7','3',NULL,0,1,0,0,0,1751,NULL,0,1,0,1301974028,NULL,0),('68sKwDgf9cGH58-NZcU4lg',1286336676,'3','pbversion0000000000001','approved','Welcome','Home','home','3','7','3',NULL,0,0,0,0,0,357,NULL,0,1,0,1286336676,NULL,0),('Am1J-meNBmhqFfEIWy6Gag',1287545014,'3','pbversion0000000000001','approved','crystalX_Navigation','crystalX_Navigation','crystalx/crystalx_navigation','3','7','3',NULL,0,1,0,0,0,406,NULL,0,1,0,1287545016,NULL,0),('1z9J1O08n_7gVVlBwSRBJQ',1287545014,'3','pbversion0000000000001','approved','Auth','Auth','root/import/auth','3','7','12',NULL,0,1,0,0,0,311,NULL,0,1,0,1287545015,NULL,0),('xSmREZO3GNzK3M5PaueOOQ',1287545014,'3','pbversion0000000000001','approved','LDAP/Account','LDAP/Account','root/import/auth/ldap/account','3','7','12',NULL,0,0,0,0,0,347,NULL,0,1,0,1287545015,NULL,0),('PBtmpl0000000000000004',1287545014,'3','pbversion0000000000001','approved','Default LDAP Account Display Template','Default LDAP Account Display Template','default_ldap_account_display_template','3','7','12',NULL,0,1,0,0,0,1372,NULL,0,1,0,1287545015,NULL,0),('0bx-xoL8TSXXubFuqKAoVQ',1287545014,'3','pbversion0000000000001','approved','LDAP/Create','LDAP/Create','root/import/auth/ldap/create','3','7','12',NULL,0,0,0,0,0,344,NULL,0,1,0,1287545015,NULL,0),('PBtmpl0000000000000005',1287545014,'3','pbversion0000000000001','approved','Default LDAP Anonymous Registration Template','Default LDAP Anonymous Registration Template','default_ldap_anonymous_registration_template','3','7','12',NULL,0,1,0,0,0,5903,'\n\n',0,1,0,1287545015,'',0),('taX2UYkFF21ALpFZY2rhMw',1287545014,'3','pbversion0000000000001','approved','LDAP/Login','LDAP/Login','root/import/auth/ldap/login','3','7','12',NULL,0,0,0,0,0,341,NULL,0,1,0,1287545015,NULL,0),('PBtmpl0000000000000006',1287545014,'3','pbversion0000000000001','approved','Default LDAP Login Template','Default LDAP Login Template','default_ldap_login_template','3','7','12',NULL,0,1,0,0,0,1974,NULL,0,1,0,1287545015,NULL,0),('K0q_N885Httqev1VCqUWxg',1287545014,'3','pbversion0000000000001','approved','WebGUI/Account','WebGUI/Account','root/import/auth/webgui/account','3','7','12',NULL,0,0,0,0,0,353,NULL,0,1,0,1287545015,NULL,0),('PBtmpl0000000000000010',1287545014,'3','pbversion0000000000001','approved','Default WebGUI Account Display Template','Default WebGUI Account Display Template','default_webgui_account_display_template','3','7','12',NULL,0,1,0,0,0,2780,NULL,0,1,0,1287545015,NULL,0),('fq1ZkYhH24R5tb96kuT10Q',1287545014,'3','pbversion0000000000001','approved','WebGUI/Create','WebGUI/Create','root/import/auth/webgui/create','3','7','12',NULL,0,0,0,0,0,350,NULL,0,1,0,1287545015,NULL,0),('PBtmpl0000000000000011',1287545014,'3','pbversion0000000000001','approved','Default WebGUI Anonymous Registration Template','Default WebGUI Anonymous Registration Template','default_webgui_anonymous_registration_template','3','7','12',NULL,0,1,0,0,0,6676,'\n\n',0,1,0,1287545015,'',0),('PBtmpl0000000000000015',1287545014,'3','pbversion0000000000001','approved','Default WebGUI Welcome Message Template','Default WebGUI Welcome Message Template','root/import/auth/webgui/create/default-webgui-welcome-message-template','3','7','12',NULL,0,1,0,0,0,698,NULL,0,1,0,1287545015,NULL,0),('PBtmpl0000000000000016',1287545014,'3','pbversion0000000000001','approved','Default WebGUI Account Activation Template','Default WebGUI Account Activation Template','root/import/auth/webgui/create/default-webgui-account-activation-template','3','7','3',NULL,0,1,0,0,0,602,NULL,0,1,0,1287545015,NULL,0),('oHk7fAFhEEkB7dHzi0QOQA',1287545014,'3','pbversion0000000000001','approved','WebGUI/Expired','WebGUI/Expired','root/import/auth/webgui/expired','3','7','12',NULL,0,0,0,0,0,353,NULL,0,1,0,1287545016,NULL,0),('PBtmpl0000000000000012',1287545014,'3','pbversion0000000000001','approved','Default WebGUI Password Reset Template','Default WebGUI Password Reset Template','default_webgui_password_reset_template','3','7','12',NULL,0,1,0,0,0,2095,NULL,0,1,0,1287545016,NULL,0),('9M-lrlPQWeeNWfvnDnK_Xg',1287545014,'3','pbversion0000000000001','approved','WebGUI/Login','WebGUI/Login','root/import/auth/webgui/login','3','7','12',NULL,0,0,0,0,0,347,NULL,0,1,0,1287545016,NULL,0),('PBtmpl0000000000000013',1287545014,'3','pbversion0000000000001','approved','Default WebGUI Login Template','Default WebGUI Login Template','default_webgui_login_template','3','7','12',NULL,0,1,0,0,0,2262,NULL,0,1,0,1287545016,NULL,0),('_gBYAdTcbkiyamnqi2Xskg',1287545014,'3','pbversion0000000000001','approved','WebGUI/Recovery','WebGUI/Recovery','root/import/auth/webgui/recovery','3','7','12',NULL,0,0,0,0,0,356,NULL,0,1,0,1287545016,NULL,0),('PBtmpl0000000000000014',1287545015,'3','pbversion0000000000001','approved','Default WebGUI Password Recovery Template','Default WebGUI Password Recovery Template','default_webgui_password_recovery_template','3','7','12',NULL,0,1,0,0,0,3073,NULL,0,1,0,1287545016,NULL,0),('0iMMbGN3BevuCBHjjLiQNA',1287545015,'3','pbversion0000000000001','approved','WebGUI/Deactivate','WebGUI/Deactivate','root/import/auth/webgui/deactivate','3','7','12',NULL,0,1,0,0,0,361,NULL,0,1,0,1287545016,NULL,0),('zaHUYsE_PgKk8hnVd8ffEQ',1287545015,'3','pbversion0000000000001','approved','WebGUI Deactivate Account Template','WebGUI Deactivate Account Template','default_webgui_deactivate_account_template','3','7','12',NULL,0,1,0,0,0,859,NULL,0,1,0,1287545016,NULL,0),('6A4yIjWwJfIE0Ep-I0jutg',1287545015,'3','pbversion0000000000001','approved','LDAP/Deactivate','LDAP/Deactivate','root/import/auth/ldap/deactivate','3','7','12',NULL,0,1,0,0,0,355,NULL,0,1,0,1287545016,NULL,0),('_P4PMiraGsLTfOjK4fYQPQ',1287545015,'3','pbversion0000000000001','approved','LDAP Deactivate Account Template','LDAP Deactivate Account Template','default_ldap_deactivate_account_template','3','7','12',NULL,0,1,0,0,0,851,NULL,0,1,0,1287545016,NULL,0),('sK_0zVw4kwdJ1sqREIsSzA',1287545015,'3','pbversion0000000000001','approved','WebGUI Auth Password Recovery Email Template','Password Recovery Email','root/import/auth/webgui/recoveryemail','3','7','4',NULL,0,0,0,0,0,769,NULL,0,1,0,1287545016,NULL,0),('qsG6B24a0SC5KrhQjmdZBw',1287545015,'3','pbversion0000000000001','approved','survey.css','survey.css','survey.css','3','7','12',NULL,0,1,0,0,0,5092,NULL,0,1,0,1287545016,NULL,0),('kwTL1SWCk0GlpiJ5zAAEPQ',1287545015,'3','pbversion0000000000001','approved','surveyedit.css','surveyedit.css','root/import/survey/surveyedit.css','3','7','12',NULL,0,1,0,0,0,4986,NULL,0,1,0,1287545016,NULL,0),('_cD6DLM_Fs5IlrLeWUjrjg',1287545015,'3','pbversion0000000000001','approved','Workflow Activity Templates','Workflow Activity Templates','root/import/workflow-activity-templates','3','7','12',NULL,0,1,0,0,0,434,NULL,0,1,0,1287545016,NULL,0),('lYhMheuuLROK_iNjaQuPKg',1287545015,'3','pbversion0000000000001','approved','Notify About Version Tag','Notify About Version Tag','root/import/workflow-activity-templates/notify-about-version-tag','3','7','12',NULL,0,1,0,0,0,502,NULL,0,1,0,1287545016,NULL,0),('PBtmpl0000000000000085',1288747840,'3','pbversion0000000000001','approved','Default Email','Default Email','default_email','3','7','12',NULL,0,1,0,0,0,2031,NULL,0,1,0,1288747841,NULL,0),('2rC4ErZ3c77OJzJm7O5s3w',1288747841,'3','pbversion0000000000001','approved','EMS Badge Listing (default)','EMS Badge Listing (default)','root/import/ems/ems-badge-listing-default','3','7','12',NULL,0,1,0,0,0,11613,'\n\n\n\n\n\n\n\n\n\n\n\n\n \n',0,1,0,1288747841,'',0),('lG2exkH9FeYvn4pA63idNg',1289967962,'3','pbversion0000000000001','approved','Friend Manager Edit Friends','Friend Manager Edit Friends','root/import/account/friendmanager/edit','3','7','4',NULL,0,0,0,0,0,2587,'',0,1,0,1289967964,'',0),('PBtmpl0000000000000021',1294721945,'3','pbversion0000000000001','approved','Data List','Data List','data_list','3','7','12',NULL,0,1,0,0,0,4917,'',0,1,0,1294721945,'',0),('CalendarEvent000000001',1295931508,'3','pbversion0000000000001','approved','Default Calendar Event','Default Calendar Event','root/import/calendar-templates/default-calendar-event','3','7','12',NULL,0,0,0,0,0,11625,' ',0,1,0,1295931508,'',0),('64tqS80D53Z0JoAs2cX2VQ',1295931508,'3','pbversion0000000000001','approved','FriendManager View Template','FriendManager View Template','root/import/account/friendmanager/view','3','7','4',NULL,0,0,0,0,0,4485,'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n',0,1,0,1295931508,'',0),('kj3b-X3i6zRKnhLb4ZiCLw',1295931508,'3','pbversion0000000000001','approved','Default Calendar List View','Default Calendar List View','root/import/calendar-templates/default-calendar-list-view','3','7','3',NULL,0,1,0,0,0,6560,'\n',0,1,0,1295931508,'',0),('PBtmpl0000000000000077',1298351263,'3','pbversion0000000000001','approved','Job Listing','Job Listing','job_listing','3','7','12',NULL,0,1,0,0,0,4876,'\n\n\n',0,1,0,1298351263,'',0),('ThingyTmpl000000000002',1299559129,'3','pbversion0000000000001','approved','Default Thingy View Thing','Default Thingy View Thing','templates/thingy-default-view-thing','3','7','12',NULL,0,0,0,0,0,4833,'\n',0,1,0,1299559129,'',0),('PBtmpl0000000000000088',1300763663,'3','pbversion0000000000001','approved','Image','Image','image','3','7','12',NULL,0,1,0,0,0,850,NULL,0,1,0,1300763664,NULL,0),('S1A9iAwKcQQ6P20uTqw-Ew',1300763664,'3','pbversion0000000000001','approved','Dashboard','Dashboard','root/import/dashboard','3','7','12',NULL,0,0,0,0,0,326,NULL,0,1,0,1300763664,NULL,0),('DashboardViewTmpl00001',1300763664,'3','pbversion0000000000001','approved','Dashboard Default View','Dashboard Default View','dashboard-default-view-template','3','7','12',NULL,0,0,0,0,0,20462,'\n\n\n\n\n\n',0,1,0,1300763664,'',0),('CQp-RFA2pMh5lFSggPPPYg',1301973995,'3','pbversion0000000000001','approved','[Style] Underground','[Style] Underground','style-underground','3','7','3',NULL,0,0,0,0,0,452,NULL,0,1,0,1301974000,NULL,0),('_Mi_NTd3x8UB96LWezWHnw',1301973995,'3','pbversion0000000000001','approved','Images','Images','style-underground/images','3','7','3',NULL,0,0,0,0,0,328,NULL,0,1,0,1301974000,NULL,0),('A_5LVQQWR73QZR8FFbny_w',1301973995,'3','pbversion0000000000001','approved','bg.gif','bg.gif','style-underground/images/bg.gif','3','7','3',NULL,0,1,0,0,0,612,NULL,0,0,0,1301974000,NULL,0),('wywIfa_VuTsq0c5Ed-W-MA',1301973995,'3','pbversion0000000000001','approved','bullet.gif','bullet.gif','style-underground/images/bullet.gif','3','7','3',NULL,0,1,0,0,0,686,NULL,0,0,0,1301974000,NULL,0),('xmykMFjri1O2NrYHbeToVQ',1301973995,'3','pbversion0000000000001','approved','footerbg.gif','footerbg.gif','style-underground/images/footerbg.gif','3','7','3',NULL,0,1,0,0,0,460,NULL,0,0,0,1301974000,NULL,0),('0IIGNBs_-INzqBC5VLeJgw',1301973996,'3','pbversion0000000000001','approved','headerbg.gif','headerbg.gif','style-underground/images/headerbg.gif','3','7','3',NULL,0,1,0,0,0,530,NULL,0,0,0,1301974000,NULL,0),('FXmePdyS0YKuZ1VCGGpK9w',1301973996,'3','pbversion0000000000001','approved','quote.gif','quote.gif','style-underground/images/quote.gif','3','7','3',NULL,0,1,0,0,0,685,NULL,0,0,0,1301974000,NULL,0),('66qCywiE_fiL9u5YIaJhgw',1301973996,'3','pbversion0000000000001','approved','tableft.gif','tableft.gif','style-underground/images/tableft.gif','3','7','3',NULL,0,1,0,0,0,720,NULL,0,0,0,1301974000,NULL,0),('n5VpG4lFsOG1elaWDQbilw',1301973996,'3','pbversion0000000000001','approved','tabright.gif','tabright.gif','style-underground/images/tabright.gif','3','7','3',NULL,0,1,0,0,0,2135,NULL,0,0,0,1301974000,NULL,0),('g3JH1PRq6m6Bj_PnGpcrSQ',1301973996,'3','pbversion0000000000001','approved','CSS','CSS','style-underground/css','3','7','3',NULL,0,0,0,0,0,319,NULL,0,1,0,1301974000,NULL,0),('egpnaaFqWmJwYTZ5CvFH9g',1301973996,'3','pbversion0000000000001','approved','Underground.css','Underground.css','style-underground/css/underground.css','3','7','3',NULL,0,1,0,0,0,11746,NULL,0,1,0,1301974000,NULL,0),('BBpxqoSseIor5C9ei9JEFQ',1301973996,'3','pbversion0000000000001','approved','Underground WebGUI.css','Underground WebGUI.css','style-underground/css/underground-webgui.css','3','7','3',NULL,0,1,0,0,0,528,NULL,0,1,0,1301974000,NULL,0),('G0hl4VilbFKipToyxKqFrg',1301973997,'3','pbversion0000000000001','approved','Prototypes','Prototypes','style-underground/prototypes','3','7','3',NULL,0,0,0,0,0,429,NULL,0,1,0,1301974000,NULL,0),('GWU2qZqe6yEuAKG-5HtBdg',1301973997,'3','pbversion0000000000001','approved','Templates','Templates','style-underground/templates','3','7','3',NULL,0,0,0,0,0,337,NULL,0,1,0,1301974000,NULL,0),('Qk24uXao2yowR6zxbVJ0xA',1301973997,'3','pbversion0000000000001','approved','[style] Underground','[style] Underground','style-underground/style-underground','3','7','3','by Doug from Plain Black http://plainblack.com\r\n\r\nThis is the Underground style from http://www.styleshout.com/ made into a WebGUI package. A simple, functional style.',0,1,0,0,0,4727,NULL,0,1,0,1301974000,NULL,0),('39KNX53B4nYJAyIE1lu8ZQ',1301973997,'3','pbversion0000000000001','approved','[nav] Underground Top Navigation','[nav] Underground Top Navigation','style-underground/nav-underground-top-navigation','3','7','3',NULL,0,1,0,0,0,1139,NULL,0,1,0,1301974000,NULL,0),('ztfi__vHJLsQDsMenrEn-w',1301973997,'3','pbversion0000000000001','approved','[nav] Underground Side Navigation','[nav] Underground Side Navigation','style-underground/nav-underground-side-navigation','3','7','3',NULL,0,1,0,0,0,1148,NULL,0,1,0,1301974000,NULL,0),('8qyrDCNeggB4dzKiOoRuiQ',1301973997,'3','pbversion0000000000001','approved','[admintoggle] Underground Admin Toggle','[admintoggle] Underground Admin Toggle','style-underground/templates/admintoggle-underground-admin-toggle','3','7','3',NULL,0,1,0,0,0,520,NULL,0,1,0,1301974000,NULL,0),('M1NyNeS5jpdIsiIWFiJprw',1301973997,'3','pbversion0000000000001','approved','View My Account','View My Account','style-underground/templates/view-my-account','3','7','3',NULL,0,1,0,0,0,461,NULL,0,1,0,1301974000,NULL,0),('n-Vr_wgxOkwiHGt1nJto9w',1309236774,'3','pbversion0000000000001','approved','Top Navigation','Top Navigation','style-underground/top-navigation','3','7','3',NULL,0,1,0,0,0,393,NULL,0,1,0,1309236774,NULL,0),('AsfpsOpsGzZCb9m7MyxPuw',1301973997,'3','pbversion0000000000001','approved','Navigation','Navigation','style-underground/navigation','3','7','3',NULL,0,0,0,0,0,340,NULL,0,1,0,1301974001,NULL,0),('jmqLxnoWb6p92Cr12lf1hw',1301973997,'3','pbversion0000000000001','approved','Side Navigation','Side Navigation','style-underground/side-navigation','3','7','3',NULL,0,1,0,0,0,402,NULL,0,1,0,1301974001,NULL,0),('8E2UOnj_XPEghTj7nfVM0g',1301973997,'3','pbversion0000000000001','approved','Search','Search','style-underground/search','3','7','3',NULL,0,1,0,0,0,345,NULL,0,1,0,1301974001,NULL,0),('CarouselTmpl0000000001',1301973997,'3','pbversion0000000000001','approved','Default Carousel','Default Carousel','root/import/carousel/carousel-default','3','7','12',NULL,0,0,0,0,0,3709,'\r\n\r\n\r\n',0,1,0,1301974000,'',0),('1qFjOEiILIwr1xB5_ebppQ',1301973998,'3','pbversion0000000000001','approved','Greenportal','Greenportal','greenportal','3','7','3',NULL,0,1,0,0,0,319,NULL,0,1,0,1301974001,NULL,0),('xD76UfQ_JnSgTLBNvytcpQ',1301973998,'3','pbversion0000000000001','approved','greenportal_image','greenportal_image','greenportal_image','3','7','12',NULL,0,1,0,0,0,344,NULL,0,1,0,1301974001,NULL,0),('pAXR7Kby4O-dSxOwLp1GaA',1301973998,'3','pbversion0000000000001','approved','menu_top.png','menu_top.png','greenportal_image/menu_top.png','3','7','12',NULL,0,1,0,0,0,7649,NULL,0,1,0,1301974001,NULL,0),('TthzMLO4n3qxy59QZ5YBHg',1301973998,'3','pbversion0000000000001','approved','menu_dark.png','menu_dark.png','greenportal_image/menu_dark.png','3','7','12',NULL,0,1,0,0,0,2641,NULL,0,1,0,1301974001,NULL,0),('3n31SQjYa150TBrRBgMPhA',1301973998,'3','pbversion0000000000001','approved','menu_light.png','menu_light.png','greenportal_image/menu_light.png','3','7','12',NULL,0,1,0,0,0,2195,NULL,0,1,0,1301974001,NULL,0),('R4RxDufGbbIzEmpcoEcLrw',1301973998,'3','pbversion0000000000001','approved','logo.jpg','logo.jpg','greenportal_image/logo.jpg','3','7','12',NULL,0,1,0,0,0,41449,NULL,0,1,0,1301974001,NULL,0),('xyyn5mz3xGyvrcI1rY8C-w',1301973998,'3','pbversion0000000000001','approved','greenportal.css','greenportal.css','greenportal.css','3','7','12',NULL,0,1,0,0,0,6696,NULL,0,1,0,1301974001,NULL,0),('KKt0VB_eoQxw9xEsHsAhag',1301973998,'3','pbversion0000000000001','approved','Greenportal_style','Greenportal_style','greenportal_style','3','7','12','by Ning from PlutonIT http://pluton.nl\n\nA Joomla! Open Source design released under the GNU/GPL License. Enhanced and converted into WebGUI theme by Ning. The original PHP and CSS file can be downloaded following the author\'s link: http://www.studentsdesign.de/',0,1,0,0,0,2280,NULL,0,1,0,1301974001,NULL,0),('h0bOzz7WvdaVZXsjpwtkww',1301973998,'3','pbversion0000000000001','approved','greenportal_Navigation','greenportal_Navigation','greenportal_navigation','3','7','3',NULL,0,1,0,0,0,394,NULL,0,1,0,1301974001,NULL,0),('_z3ukLCqvoaUygfsbbkBzw',1301973999,'3','pbversion0000000000001','approved','Greenportal_menu','Greenportal_menu','greenportal_menu','3','7','3',NULL,0,1,0,0,0,2014,NULL,0,1,0,1301974001,NULL,0),('qFOfW1sKyOTnGNcP6BXbwg',1301973999,'3','pbversion0000000000001','approved','greenportal_NavigationTop','greenportal_NavigationTop','greenportal_navigationtop','3','7','12',NULL,0,1,0,0,0,416,NULL,0,1,0,1301974001,NULL,0),('Pt38T5_MWSue2e1N36MLdw',1301973999,'3','pbversion0000000000001','approved','Greenportal_menuTop','Greenportal_menuTop','greenportal_menutop','3','7','12',NULL,0,1,0,0,0,950,NULL,0,1,0,1301974001,NULL,0),('LDcM1Iop17nF2MoSa7zo_Q',1301973999,'3','pbversion0000000000001','approved','Greenportal_dataform','Greenportal_dataform','greenportal_dataform','3','7','3',NULL,0,1,0,0,0,5320,'\r\n\r\n',0,1,0,1301974001,'',0),('hVF1taXj4bfd7DuL4XDMYg',1301973999,'3','pbversion0000000000001','approved','Greenportal_datalist','Greenportal_datalist','greenportal_datalist','3','7','3',NULL,0,1,0,0,0,4142,'\n\n',0,1,0,1301974001,'',0),('x4-2QYRSrIB_BJfnSKKj4w',1301973999,'3','pbversion0000000000001','approved','Greenportal_acknowledgement','Greenportal_acknowledgement','greenportal_acknowledgement','3','7','3',NULL,0,1,0,0,0,1755,'',0,1,0,1301974001,'',0),('423R4Y6XIt3wUzlnLo-chg',1301973999,'3','pbversion0000000000001','approved','Greenportal_forum','Greenportal_forum','greenportal_forum','3','7','3',NULL,0,1,0,0,0,7997,'\r\n\r\n\r\n',0,1,0,1301974001,'',0),('oZ1Mk-zExYUyD-JsjTvaHg',1301973999,'3','pbversion0000000000001','approved','Greenportal_thread','Greenportal_thread','greenportal_thread','3','7','3',NULL,0,1,0,0,0,11119,'\r\n',0,1,0,1301974001,'',0),('mYwS8CZaOLMt0raaKXGZcQ',1301973999,'3','pbversion0000000000001','approved','Greenportal_postform','Greenportal_postform','greenportal_postform','3','7','3',NULL,0,1,0,0,0,4047,'\r\n',0,1,0,1301974001,'',0),('kSGR4OHsKmhLQTuLkisOww',1301973999,'3','pbversion0000000000001','approved','Greenportal_search','Greenportal_search','greenportal_search','3','7','3',NULL,0,1,0,0,0,3685,'',0,1,0,1301974001,'',0),('G5DgNizuG3jXkjPp6UaGrA',1301973999,'3','pbversion0000000000001','approved','Greenportal_Calendar','Greenportal_Calendar','greenportal_calendar','3','7','3',NULL,0,1,0,0,0,352,NULL,0,1,0,1301974001,NULL,0),('U78V5IJHVljvRTb6ydsTHg',1301973999,'3','pbversion0000000000001','approved','Greenportal_calendarMonth','Greenportal_calendarMonth','greenportal_calendar/greenportal_calendarmonth','3','7','3',NULL,0,1,0,0,0,15294,'\n\n\n\n\n\n\n',0,1,0,1301974001,'',0),('Xqc3qPUXoFE8dt9qocdWig',1301973999,'3','pbversion0000000000001','approved','Greenportal_calendarWeek','Greenportal_calendarWeek','greenportal_calendar/greenportal_calendarweek','3','7','3',NULL,0,1,0,0,0,10509,'\r\n',0,1,0,1301974001,'',0),('IBTb7wllSt7RxFmmvm9pkQ',1301973999,'3','pbversion0000000000001','approved','Greenportal_calendarDay','Greenportal_calendarDay','greenportal_calendar/greenportal_calendarday','3','7','3',NULL,0,1,0,0,0,10155,' \r\n\r\n',0,1,0,1301974001,'',0),('Z1EM7JMI_4SkyfaZffSElw',1301973999,'3','pbversion0000000000001','approved','Greenportal_calendarEvent','Greenportal_calendarEvent','greenportal_calendar/greenportal_calendarevent','3','7','3',NULL,0,1,0,0,0,8357,' \r\n\r\n',0,1,0,1301974001,'',0),('fJg7SKpGZwzSNx3_ebki1A',1301973999,'3','pbversion0000000000001','approved','Greenportal_calendarEventEdit','Greenportal_calendarEventEdit','greenportal_calendar/greenportal_calendareventedit','3','7','3',NULL,0,1,0,0,0,9181,'\n\n\n \n\n',0,1,0,1301974001,'',0),('ihf4Rx6p72xn_nVKaIeOaw',1301973999,'3','pbversion0000000000001','approved','Greenportal_calendarSearch','Greenportal_calendarSearch','greenportal_calendar/greenportal_calendarsearch','3','7','3',NULL,0,1,0,0,0,9141,' \r\n\r\n',0,1,0,1301974001,'',0),('jrWJ6nHXkqgFbml7BZ9chw',1301974000,'3','pbversion0000000000001','approved','Greenportal_submission','Greenportal_submission','greenportal_submission','3','7','3',NULL,0,1,0,0,0,21039,'\r\n',0,1,0,1301974001,'',0),('Ys6f3vpe0y1uRcaCJ2TlFw',1301974000,'3','pbversion0000000000001','approved','Greenportal_messageboard','Greenportal_messageboard','greenportal_messageboard','3','7','3',NULL,0,1,0,0,0,5587,'',0,1,0,1301974001,'',0),('PBtmpl0000000000000200',1301974000,'3','pbversion0000000000001','approved','Default Search','Default Search','default_search2','3','7','12',NULL,0,0,0,0,0,3966,NULL,0,1,0,1315877144,NULL,0),('E3tzZjzhmYoNlAyP2VW33Q',1303183716,'3','pbversion0000000000001','approved','Edit Story','Edit Story','root/import/storymanager/editstory','3','7','4',NULL,0,0,0,0,0,6440,'',0,1,0,1303183716,'',0),('brxm_faNdZX5tRo3p50g3g',1304392055,'3','pbversion0000000000001','approved','Map Templates','Map Templates','home/map/map-templates','3','7','3',NULL,0,0,0,0,0,334,NULL,0,1,0,1304392055,NULL,0),('9j0_Z1j3Jd0QBbY2akb6qw',1304392055,'3','pbversion0000000000001','approved','Default Map View','Default Map View','home/map/map-templates/default-map-view','3','7','3',NULL,0,1,0,0,0,1292,'',0,1,0,1304392055,'',0),('oHh0UqAJeY7u2n--WD-BAA',1304392055,'3','pbversion0000000000001','approved','Default Edit Map Point','Default Edit Map Point','home/map/map-templates/default-edit-map-point','3','7','3',NULL,0,1,0,0,0,3176,NULL,0,1,0,1304392055,NULL,0),('u9vfx33XDk5la1-QC5FK7g',1304392055,'3','pbversion0000000000001','approved','Default Map Point View','Default Map Point View','home/map/map-templates/default-map-point-view','3','7','3',NULL,0,1,0,0,0,2418,'',0,1,0,1304392055,'',0),('_9_eiaPgxzF_x_upt6-PNQ',1304392055,'3','pbversion0000000000001','approved','gallery.css','gallery.css','root/import/gallery-templates/gallery.css','3','7','3',NULL,0,1,0,0,0,18788,NULL,0,1,0,1304392055,NULL,0),('PBtmpl0000000000000027',1311652541,'3','pbversion0000000000001','approved','Default Forum Notification','Default Forum Notification','default_forum_notification','3','7','12',NULL,0,1,0,0,0,2815,NULL,0,1,0,1311652541,NULL,0),('3n3H85BsdeRQ0I08WmvlOg',1313542960,'3','pbversion0000000000001','approved','thingy.css','thingy.css','root/import/thingy-templates/thingy.css','3','7','12',NULL,0,1,0,0,0,4774,NULL,0,1,0,1313542962,NULL,0),('aNmgn0cd6tldmC1FpW4KbA',1313542960,'3','pbversion0000000000001','approved','Shop','Shop','shopping-cart-collateral-items','3','7','3',NULL,0,1,0,0,0,324,NULL,0,0,0,1313542962,NULL,0),('2q5fxatSFLgIhXaUX-oSvg',1313542960,'3','pbversion0000000000001','approved','bottom-left.jpg','bottom-left.jpg','shopping-cart-collateral-items/bottom-left.jpg','3','7','3',NULL,0,1,0,0,0,32254,NULL,0,0,0,1313542962,NULL,0),('_d5WTkKjnwct-_Dk7gZHvQ',1313542960,'3','pbversion0000000000001','approved','bottom-right.jpg','bottom-right.jpg','shopping-cart-collateral-items/bottom-right.jpg','3','7','3',NULL,0,1,0,0,0,32258,NULL,0,0,0,1313542962,NULL,0),('Iz2mUR3jCPKyemwAea4b2g',1313542960,'3','pbversion0000000000001','approved','input_bg.jpg','input_bg.jpg','shopping-cart-collateral-items/input_bg.jpg','3','7','3',NULL,0,1,0,0,0,30076,NULL,0,0,0,1313542962,NULL,0),('JU9bjsLRoWj7GVHs__prig',1313542960,'3','pbversion0000000000001','approved','top-left.jpg','top-left.jpg','shopping-cart-collateral-items/top-left.jpg','3','7','3',NULL,0,1,0,0,0,32207,NULL,0,0,0,1313542962,NULL,0),('noOlnjQGexHg8c4bGVUo9g',1313542960,'3','pbversion0000000000001','approved','top-right.jpg','top-right.jpg','shopping-cart-collateral-items/top-right.jpg','3','7','3',NULL,0,1,0,0,0,32245,NULL,0,0,0,1313542962,NULL,0),('aIpCmr9Hi__vgdZnDTz1jw',1313542961,'3','pbversion0000000000001','approved','Cart (Default)','Cart (Default)','default-shopping-cart-template','3','7','3',NULL,0,1,0,0,0,26304,' ',0,1,0,1313542962,'',0),('XNd7a_g_cTvJVYrVHcx2Mw',1313542961,'3','pbversion0000000000001','approved','Address (Default)','Address (Default)','shopping-cart-collateral-items/address-default','3','7','3',NULL,0,1,0,0,0,5883,'\r\n',0,1,0,1313542962,'',0),('bPz1yk6Y9uwMDMBcmMsSCg',1313542961,'3','pbversion0000000000001','approved','Email Receipt (Default)','Email Receipt (Default)','shopping-cart-collateral-items/email-receipt-default','3','7','3',NULL,0,1,0,0,0,4751,NULL,0,1,0,1313542962,NULL,0),('vrKXEtluIhbmAS9xmPukDA',1313542961,'3','pbversion0000000000001','approved','Donation (Default)','Donation (Default)','root/import/default-donation-template','3','7','12',NULL,0,1,0,0,0,2504,'\r\n',0,0,0,1313542962,'',0),('63ix2-hU0FchXGIWkG3tow',1313542961,'3','pbversion0000000000001','approved','Flat Discount (Default)','Flat Discount (Default)','root/import/flat-discount-default','3','7','12',NULL,0,1,0,0,0,1278,NULL,0,1,0,1313542962,NULL,0),('eqb9sWjFEVq0yHunGV8IGw',1313542961,'3','pbversion0000000000001','approved','Subscription (Default)','Subscription (Default)','root/import/subscription-default','3','7','12',NULL,0,1,0,0,0,2872,'\n',0,1,0,1313542962,'',0),('3womoo7Teyy2YKFa25-MZg',1313542961,'3','pbversion0000000000001','approved','Address Book (Default)','Address Book (Default)','shopping-cart-collateral-items/address-book-default','3','7','3',NULL,0,1,0,0,0,3132,'\n',0,1,0,1313542962,'',0),('EBlxJpZQ9o-8VBOaGQbChA',1313542961,'3','pbversion0000000000001','approved','MiniCart','MiniCart','shopping-cart-collateral-items/minicart','3','7','3',NULL,0,1,0,0,0,2622,'',0,1,0,1313542962,'',0),('g8W53Pd71uHB9pxaXhWf_A',1313542961,'3','pbversion0000000000001','approved','My Purchases Detail (Default)','My Purchases Detail (Default)','shopping-cart-collateral-items/my-purchases-detail-default','3','7','3',NULL,0,1,0,0,0,8422,'\n',0,1,0,1313542962,'',0),('jEz8iTGNWEt2I05IhVV19Q',1313542961,'3','pbversion0000000000001','approved','Operation/RedeemSubscription','Operation/RedeemSubscription','root/import/operation/redeemsubscription','3','7','12',NULL,0,0,0,0,0,390,NULL,0,1,0,1313542962,NULL,0),('PBtmpl0000000000000053',1313542961,'3','pbversion0000000000001','approved','Subscription code redemption','Subscription code redemption','subscription_code_redemption','3','7','12',NULL,0,1,0,0,0,579,NULL,0,1,0,1313542962,NULL,0),('itransact_credentials1',1313542961,'3','pbversion0000000000001','approved','ITransact Credentials (Default)','ITransact Credentials (Default)','shopping-cart-collateral-items/itransact-credentials','3','7','4',NULL,0,0,0,0,0,11072,' \n\n\n',0,1,0,1313542962,'',0),('D6cJpRcey35aSkh9Q_FPUQ',1313542961,'3','pbversion0000000000001','approved','Default EU User Screen','Default EU User Screen','root/import/default-eu-user-screen','3','7','12',NULL,0,1,0,0,0,1830,NULL,0,1,0,1313542962,NULL,0),('30h5rHxzE_Q0CyI3Gg7EJw',1313542961,'3','pbversion0000000000001','approved','Cash Summary Screen (Default)','Cash Summary Screen (Default)','shopping-cart-collateral-items/cash-summary','3','7','4',NULL,0,0,0,0,0,8671,' \n',0,1,0,1313542962,'',0),('jysVZeUR0Bx2NfrKs5sulg',1313542961,'3','pbversion0000000000001','approved','Ogone Summary Screen (Default)','Ogone Summary Screen (Default)','shopping-cart-collateral-items/ogone-summary','3','7','4',NULL,0,0,0,0,0,8672,' \n',0,1,0,1313542962,'',0),('300AozDaeveAjB_KN0ljlQ',1313542962,'3','pbversion0000000000001','approved','PayPal Standard Summary Screen (Default)','PayPal Standard Summary Screen (Default)','shopping-cart-collateral-items/paypal-std-summary','3','7','4',NULL,0,0,0,0,0,8697,' \n',0,1,0,1313542962,'',0),('GqnZPB0gLoZmqQzYFaq7bg',1313542962,'3','pbversion0000000000001','approved','PayPal Express Checkout Summary Screen (Default)','PayPal Express Checkout Summary Screen (Default)','shopping-cart-collateral-items/paypal-express-summary','3','7','4',NULL,0,0,0,0,0,8716,' \n',0,1,0,1313542962,'',0),('2GxjjkRuRkdUg_PccRPjpA',1313542962,'3','pbversion0000000000001','approved','Select Gateway (Default)','Select Gateway (Default)','shopping-cart-collateral-items/select-gateway-default','3','7','3',NULL,0,1,0,0,0,626,'\r\n',0,1,0,1313542962,NULL,0),('Rqwgh50A3gGcOKIrdi_kxw',1313542962,'3','pbversion0000000000001','approved','Authorize.net Credentials (Default)','Authorize.net Credentials (Default)','shopping-cart-collateral-items/authorizenet-credentials','3','7','4',NULL,0,0,0,0,0,11400,' \n\n\n',0,1,0,1313542962,'',0),('PBEmsBadgeTemplate0000',1313542962,'3','pbversion0000000000001','approved','Default EMS Badge Template','Default EMS Badge Template','default_emsbadge','3','7','4',NULL,0,0,0,0,0,5853,'',0,1,0,1313542962,'',0),('StockDataTMPL000000001',1315877144,'3','pbversion0000000000001','approved','StockData Default View','StockData Default View','stockdatatmpl000000001','3','7','12',NULL,0,1,0,0,0,9004,'\n',0,1,0,1315877144,'',0),('2gtFt7c0qAFNU3BG_uvNvg',1315877144,'3','pbversion0000000000001','approved','My Purchases (Default)','My Purchases (Default)','shopping-cart-collateral-items/my-purchases-default','3','7','3',NULL,0,1,0,0,0,3236,'\n',0,1,0,1315877144,'',0); +INSERT INTO `assetData` VALUES ('PBasset000000000000001',1124395696,'3','pbversion0000000000001','approved','Root','Root','root','3','7','3',NULL,0,1,0,0,0,158,NULL,0,1,0,1242380151,NULL,0),('PBasset000000000000002',1124395696,'3','pbversion0000000000001','approved','Import Node','Import','root/import','3','7','12',NULL,0,1,0,0,0,309,NULL,0,1,0,1242380151,NULL,0),('Vzv1pWpg_w6R_o-b0rM2qQ',1147642515,'3','pbversion0000000000001','approved','Ad','Ad','home/ad2','3','7','4',NULL,0,1,0,0,0,2155188,NULL,0,1,0,1301974027,NULL,0),('fK-HMSboA3uu0c1KYkYspA',1124395696,'3','pbversion0000000000001','approved','The Latest News','The Latest News','the_latest_news/the_latest_news','3','7','3',NULL,0,1,0,0,0,524,NULL,0,1,0,1285124313,NULL,0),('7-0-style0000000000003',1147642492,'3','pbversion0000000000001','approved','css01.css','css01.css','style1/css01.css','3','7','12',NULL,0,0,0,0,0,9086,NULL,0,1,0,1285124168,NULL,0),('PBnav00000000000000001',1124395696,'3','pbversion0000000000001','approved','crumbTrail','crumbTrail','crumbtrail','3','7','12',NULL,0,1,0,0,0,371,NULL,0,1,0,1247779653,NULL,0),('PBnav00000000000000014',1124395696,'3','pbversion0000000000001','approved','FlexMenu','FlexMenu','flexmenu','3','7','12',NULL,0,1,0,0,0,353,NULL,0,1,0,1247779653,NULL,0),('PBnav00000000000000015',1124395696,'3','pbversion0000000000001','approved','currentMenuVertical','currentMenuVertical','currentmenuvertical','3','7','12',NULL,0,1,0,0,0,394,NULL,0,1,0,1247779653,NULL,0),('PBnav00000000000000016',1124395696,'3','pbversion0000000000001','approved','currentMenuHorizontal','currentMenuHorizontal','currentmenuhorizontal','3','7','12',NULL,0,1,0,0,0,400,NULL,0,1,0,1247779653,NULL,0),('PBnav00000000000000017',1124395696,'3','pbversion0000000000001','approved','PreviousDropMenu','PreviousDropMenu','previousdropmenu','3','7','12',NULL,0,1,0,0,0,388,NULL,0,1,0,1247779653,NULL,0),('PBnav00000000000000018',1124395696,'3','pbversion0000000000001','approved','previousMenuVertical','previousMenuVertical','previousmenuvertical','3','7','12',NULL,0,1,0,0,0,398,NULL,0,1,0,1247779653,NULL,0),('PBnav00000000000000019',1124395696,'3','pbversion0000000000001','approved','previousMenuHorizontal','previousMenuHorizontal','previousmenuhorizontal','3','7','12',NULL,0,1,0,0,0,404,NULL,0,1,0,1247779653,NULL,0),('PBnav00000000000000020',1124395696,'3','pbversion0000000000001','approved','rootmenu','rootmenu','rootmenu','3','7','12',NULL,0,1,0,0,0,355,NULL,0,1,0,1247779653,NULL,0),('PBnav00000000000000021',1124395696,'3','pbversion0000000000001','approved','SpecificDropMenu','SpecificDropMenu','specificdropmenu','3','7','12',NULL,0,1,0,0,0,379,NULL,0,1,0,1247779653,NULL,0),('PBnav00000000000000002',1124395696,'3','pbversion0000000000001','approved','SpecificSubMenuVertical','SpecificSubMenuVertical','specificsubmenuvertical','3','7','12',NULL,0,1,0,0,0,400,NULL,0,1,0,1247779653,NULL,0),('PBnav00000000000000006',1124395696,'3','pbversion0000000000001','approved','SpecificSubMenuHorizontal','SpecificSubMenuHorizontal','specificsubmenuhorizontal','3','7','12',NULL,0,1,0,0,0,406,NULL,0,1,0,1247779653,NULL,0),('PBnav00000000000000007',1124395696,'3','pbversion0000000000001','approved','TopLevelMenuVertical','TopLevelMenuVertical','toplevelmenuvertical','3','7','12',NULL,0,1,0,0,0,391,NULL,0,1,0,1247779653,NULL,0),('PBnav00000000000000008',1124395696,'3','pbversion0000000000001','approved','TopLevelMenuHorizontal','TopLevelMenuHorizontal','toplevelmenuhorizontal','3','7','12',NULL,0,1,0,0,0,397,NULL,0,1,0,1247779653,NULL,0),('PBnav00000000000000009',1124395696,'3','pbversion0000000000001','approved','RootTab','RootTab','roottab','3','7','12',NULL,0,1,0,0,0,352,NULL,0,1,0,1247779653,NULL,0),('PBnav00000000000000010',1124395696,'3','pbversion0000000000001','approved','TopDropMenu','TopDropMenu','topdropmenu','3','7','12',NULL,0,1,0,0,0,364,NULL,0,1,0,1247779653,NULL,0),('PBnav00000000000000011',1124395696,'3','pbversion0000000000001','approved','dtree','dtree','dtree','3','7','12',NULL,0,1,0,0,0,352,NULL,0,1,0,1247779653,NULL,0),('PBnav00000000000000012',1124395696,'3','pbversion0000000000001','approved','coolmenu','coolmenu','coolmenu','3','7','12',NULL,0,1,0,0,0,356,NULL,0,1,0,1247779653,NULL,0),('PBnav00000000000000013',1124395696,'3','pbversion0000000000001','approved','Synopsis','Synopsis','synopsis','3','7','12',NULL,0,1,0,0,0,367,NULL,0,1,0,1247779653,NULL,0),('7-0-style0000000000006',1147642493,'3','pbversion0000000000001','approved','main_bg.gif','main_bg.gif','style1/main_bg.gif','3','7','12',NULL,0,0,0,0,0,1149,NULL,0,1,0,1242380143,NULL,0),('PBrichedit000000000002',1124395696,'3','pbversion0000000000001','approved','Forum Rich Edit','Forum Rich Edit','forum_rich_edit','3','7','12',NULL,0,0,0,0,0,873,NULL,0,1,0,1242380152,NULL,0),('7-0-style0000000000068',1147642510,'3','pbversion0000000000001','approved','spacer.gif','spacer.gif','style3/spacer.gif','3','7','12',NULL,0,0,0,0,0,358,NULL,0,1,0,1242380145,NULL,0),('7-0-style0000000000066',1147642509,'3','pbversion0000000000001','approved','nav_bg_on.jpg','nav_bg_on.jpg','style3/nav_bg_on.jpg','3','7','12',NULL,0,0,0,0,0,658,NULL,0,1,0,1242380145,NULL,0),('7-0-style0000000000067',1147642509,'3','pbversion0000000000001','approved','pb.jpg','pb.jpg','style3/pb.jpg','3','7','12',NULL,0,0,0,0,0,24981,NULL,0,1,0,1242380145,NULL,0),('7-0-style0000000000062',1147642508,'3','pbversion0000000000001','approved','nav_bg1.jpg','nav_bg1.jpg','style3/nav_bg1.jpg','3','7','12',NULL,0,0,0,0,0,672,NULL,0,1,0,1242380145,NULL,0),('7-0-style0000000000063',1147642508,'3','pbversion0000000000001','approved','nav_bg1_on.jpg','nav_bg1_on.jpg','style3/nav_bg1_on.jpg','3','7','12',NULL,0,0,0,0,0,683,NULL,0,1,0,1242380145,NULL,0),('7-0-style0000000000064',1147642509,'3','pbversion0000000000001','approved','nav_bg2.jpg','nav_bg2.jpg','style3/nav_bg2.jpg','3','7','12',NULL,0,0,0,0,0,675,NULL,0,1,0,1242380145,NULL,0),('7-0-style0000000000065',1147642509,'3','pbversion0000000000001','approved','nav_bg2_on.jpg','nav_bg2_on.jpg','style3/nav_bg2_on.jpg','3','7','12',NULL,0,0,0,0,0,688,NULL,0,1,0,1242380145,NULL,0),('7-0-style0000000000061',1147642508,'3','pbversion0000000000001','approved','nav_bg.jpg','nav_bg.jpg','style3/nav_bg.jpg','3','7','12',NULL,0,0,0,0,0,669,NULL,0,1,0,1242380145,NULL,0),('7-0-style0000000000057',1147642507,'3','pbversion0000000000001','approved','main_bg.jpg','main_bg.jpg','style3/main_bg.jpg','3','7','12',NULL,0,0,0,0,0,639,NULL,0,1,0,1242380144,NULL,0),('7-0-style0000000000058',1147642507,'3','pbversion0000000000001','approved','main_bottom.jpg','main_bottom.jpg','style3/main_bottom.jpg','3','7','12',NULL,0,0,0,0,0,2630,NULL,0,1,0,1242380144,NULL,0),('7-0-style0000000000060',1147642508,'3','pbversion0000000000001','approved','main_top_bg.jpg','main_top_bg.jpg','style3/main_top_bg.jpg','3','7','12',NULL,0,0,0,0,0,687,NULL,0,1,0,1242380144,NULL,0),('7-0-style0000000000054',1147642506,'3','pbversion0000000000001','approved','header_bg.jpg','header_bg.jpg','style3/header_bg.jpg','3','7','12',NULL,0,0,0,0,0,715,NULL,0,1,0,1242380144,NULL,0),('7-0-style0000000000055',1147642506,'3','pbversion0000000000001','approved','header_left.jpg','header_left.jpg','style3/header_left.jpg','3','7','12',NULL,0,0,0,0,0,23983,NULL,0,1,0,1242380144,NULL,0),('7-0-style0000000000056',1147642506,'3','pbversion0000000000001','approved','header_right.jpg','header_right.jpg','style3/header_right.jpg','3','7','12',NULL,0,0,0,0,0,24757,NULL,0,1,0,1242380144,NULL,0),('7-0-style0000000000053',1147642505,'3','pbversion0000000000001','approved','footer_right.jpg','footer_right.jpg','style3/footer_right.jpg','3','7','12',NULL,0,0,0,0,0,2886,NULL,0,1,0,1242380144,NULL,0),('7-0-style0000000000052',1147642505,'3','pbversion0000000000001','approved','footer_bg.jpg','footer_bg.jpg','style3/footer_bg.jpg','3','7','12',NULL,0,0,0,0,0,680,NULL,0,1,0,1242380144,NULL,0),('7-0-style0000000000048',1147642504,'3','pbversion0000000000001','approved','wg.jpg','wg.jpg','style2/wg.jpg','3','7','12',NULL,0,0,0,0,0,20795,NULL,0,1,0,1242380144,NULL,0),('7-0-style0000000000046',1147642504,'3','pbversion0000000000001','approved','rightCol_bg.jpg','rightCol_bg.jpg','style2/rightcol_bg.jpg','3','7','12',NULL,0,0,0,0,0,720,NULL,0,1,0,1242380144,NULL,0),('7-0-style0000000000043',1147642503,'3','pbversion0000000000001','approved','pb.jpg','pb.jpg','style2/pb.jpg','3','7','12',NULL,0,0,0,0,0,22948,NULL,0,1,0,1242380144,NULL,0),('7-0-style0000000000044',1147642503,'3','pbversion0000000000001','approved','pb_wg.jpg','pb_wg.jpg','style2/pb_wg.jpg','3','7','12',NULL,0,0,0,0,0,2720,NULL,0,1,0,1242380144,NULL,0),('7-0-style0000000000040',1147642502,'3','pbversion0000000000001','approved','navbar_right.jpg','navbar_right.jpg','style2/navbar_right.jpg','3','7','12',NULL,0,0,0,0,0,960,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000041',1147642502,'3','pbversion0000000000001','approved','page_title.jpg','page_title.jpg','style2/page_title.jpg','3','7','12',NULL,0,0,0,0,0,24856,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000042',1147642502,'3','pbversion0000000000001','approved','page_title_bg.jpg','page_title_bg.jpg','style2/page_title_bg.jpg','3','7','12',NULL,0,0,0,0,0,720,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000038',1147642501,'3','pbversion0000000000001','approved','navbar_bg.jpg','navbar_bg.jpg','style2/navbar_bg.jpg','3','7','12',NULL,0,0,0,0,0,625,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000039',1147642502,'3','pbversion0000000000001','approved','navbar_left.jpg','navbar_left.jpg','style2/navbar_left.jpg','3','7','12',NULL,0,0,0,0,0,663,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000036',1147642501,'3','pbversion0000000000001','approved','main_bg.jpg','main_bg.jpg','style2/main_bg.jpg','3','7','12',NULL,0,0,0,0,0,764,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000037',1147642501,'3','pbversion0000000000001','approved','nav_bg.jpg','nav_bg.jpg','style2/nav_bg.jpg','3','7','12',NULL,0,0,0,0,0,602,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000033',1147642500,'3','pbversion0000000000001','approved','css02.css','css02.css','style2/css02.css','3','7','12',NULL,0,0,0,0,0,5530,NULL,0,1,0,1285124168,NULL,0),('7-0-style0000000000034',1147642500,'3','pbversion0000000000001','approved','leftCol_header.jpg','leftCol_header.jpg','style2/leftcol_header.jpg','3','7','12',NULL,0,0,0,0,0,10987,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000035',1147642501,'3','pbversion0000000000001','approved','leftCol_header02.jpg','leftCol_header02.jpg','style2/leftcol_header02.jpg','3','7','12',NULL,0,0,0,0,0,4606,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000030',1147642499,'3','pbversion0000000000001','approved','webgui_btn.jpg','webgui_btn.jpg','style1/webgui_btn.jpg','3','7','12',NULL,0,0,0,0,0,5180,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000031',1147642500,'3','pbversion0000000000001','approved','WebGUI 7 Style 2','WebGUI 7 Style 2','root/import/webgui-7-style-2','3','7','12',NULL,0,0,0,0,0,325,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000032',1147642500,'3','pbversion0000000000001','approved','context_bg.jpg','context_bg.jpg','style2/context_bg.jpg','3','7','12',NULL,0,0,0,0,0,661,NULL,0,1,0,1242380143,NULL,0),('PBnav000000style01lvl2',1147642499,'3','pbversion0000000000001','approved','Style 01 Nav lvl2','untitled','style1_nav_lvl2','3','7','12',NULL,0,0,0,0,0,1713,NULL,0,1,0,1285124161,NULL,0),('7-0-style0000000000026',1147642499,'3','pbversion0000000000001','approved','RootTab Level 1','RootTab Level 1','roottab_level1','3','7','12',NULL,0,0,0,0,0,353,NULL,0,1,0,1242380143,NULL,0),('stevenav00000000000001',1147642499,'3','pbversion0000000000001','approved','Style 01 Nav','Style 01 Nav','style1_nav','3','7','12',NULL,0,0,0,0,0,1682,NULL,0,1,0,1285124167,NULL,0),('7-0-style0000000000025',1147642498,'3','pbversion0000000000001','approved','RootTab Level 0','RootTab Level 0','roottab_level0','3','7','12',NULL,0,0,0,0,0,353,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000022',1147642497,'3','pbversion0000000000001','approved','nav_bg.jpg','nav_bg.jpg','style1/nav_bg.jpg','3','7','12',NULL,0,0,0,0,0,1109,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000023',1147642498,'3','pbversion0000000000001','approved','nav_on.jpg','nav_on.jpg','style1/nav_on.jpg','3','7','12',NULL,0,0,0,0,0,919,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000024',1147642498,'3','pbversion0000000000001','approved','orange_left01.jpg','orange_left01.jpg','style1/orange_left01.jpg','3','7','12',NULL,0,0,0,0,0,2747,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000018',1147642496,'3','pbversion0000000000001','approved','nav2_off_left.jpg','nav2_off_left.jpg','style1/nav2_off_left.jpg','3','7','12',NULL,0,0,0,0,0,752,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000019',1147642497,'3','pbversion0000000000001','approved','nav2_off_right.jpg','nav2_off_right.jpg','style1/nav2_off_right.jpg','3','7','12',NULL,0,0,0,0,0,748,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000017',1147642496,'3','pbversion0000000000001','approved','nav2_off_center.jpg','nav2_off_center.jpg','style1/nav2_off_center.jpg','3','7','12',NULL,0,0,0,0,0,837,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000015',1147642496,'3','pbversion0000000000001','approved','nav1_on_right.jpg','nav1_on_right.jpg','style1/nav1_on_right.jpg','3','7','12',NULL,0,0,0,0,0,1134,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000014',1147642495,'3','pbversion0000000000001','approved','nav1_on_left.jpg','nav1_on_left.jpg','style1/nav1_on_left.jpg','3','7','12',NULL,0,0,0,0,0,1195,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000013',1147642495,'3','pbversion0000000000001','approved','nav1_on.jpg','nav1_on.jpg','style1/nav1_on.jpg','3','7','12',NULL,0,0,0,0,0,2426,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000011',1147642495,'3','pbversion0000000000001','approved','nav1_off_left.jpg','nav1_off_left.jpg','style1/nav1_off_left.jpg','3','7','12',NULL,0,0,0,0,0,1230,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000012',1147642495,'3','pbversion0000000000001','approved','nav1_off_right.jpg','nav1_off_right.jpg','style1/nav1_off_right.jpg','3','7','12',NULL,0,0,0,0,0,1178,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000010',1147642494,'3','pbversion0000000000001','approved','nav1_off_center.jpg','nav1_off_center.jpg','style1/nav1_off_center.jpg','3','7','12',NULL,0,0,0,0,0,1468,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000009',1147642494,'3','pbversion0000000000001','approved','nav1_off.jpg','nav1_off.jpg','style1/nav1_off.jpg','3','7','12',NULL,0,0,0,0,0,2591,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000007',1147642493,'3','pbversion0000000000001','approved','main_bg.jpg','main_bg.jpg','style1/main_bg.jpg','3','7','12',NULL,0,0,0,0,0,1149,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000001',1147642492,'3','pbversion0000000000001','approved','WebGUI 7 Style 1','WebGUI 7 Style 1','root/import/webgui-7-style-1','3','7','12',NULL,0,0,0,0,0,325,NULL,0,1,0,1242380142,NULL,0),('SynConXSLT000000000001',1124395707,'3','pbversion0000000000001','approved','RSS 0.9 XSLT Stylesheet','RSS 0.9 XSLT','xslt/rss0.9.xsl','3','7','12',NULL,0,0,0,0,0,5040,NULL,0,1,0,1285124168,NULL,0),('SynConXSLT000000000002',1124395707,'3','pbversion0000000000001','approved','RSS 0.91 XSLT Stylesheet','RSS 0.91 XSLT','xslt/rss0.91.xsl','3','7','12',NULL,0,0,0,0,0,4717,NULL,0,1,0,1285124168,NULL,0),('SynConXSLT000000000003',1124395707,'3','pbversion0000000000001','approved','RSS 1.0 XSLT Stylesheet','RSS 1.0 XSLT','xslt/rss1.0.xsl','3','7','12',NULL,0,0,0,0,0,5186,NULL,0,1,0,1285124168,NULL,0),('SynConXSLT000000000004',1124395707,'3','pbversion0000000000001','approved','RSS 2.0 XSLT Stylesheet','RSS 2.0 XSLT','xslt/rss2.0.xsl','3','7','12',NULL,0,0,0,0,0,4852,NULL,0,1,0,1285124168,NULL,0),('PBtmpl0000000000000036',1129049186,'3','pbversion0000000000001','approved','Default Admin Toggle Macro','Default Admin Toggle Macro','default_admin_toggle_macro','3','7','12',NULL,0,1,0,0,0,448,NULL,0,1,0,1285124162,NULL,0),('PBtmpl0000000000000037',1129049186,'3','pbversion0000000000001','approved','Default Account Macro','Default Account Macro','default_account_macro','3','7','12',NULL,0,1,0,0,0,479,NULL,0,1,0,1285124162,NULL,0),('PBtmpl0000000000000038',1129049186,'3','pbversion0000000000001','approved','Default Editable Toggle Macro','Default Editable Toggle Macro','default_editable_toggle_macro','3','7','12',NULL,0,1,0,0,0,460,NULL,0,1,0,1285124162,NULL,0),('PBtmpl0000000000000040',1129049186,'3','pbversion0000000000001','approved','Default Group Add Macro','Default Group Add Macro','default_group_add_macro','3','7','12',NULL,0,1,0,0,0,432,NULL,0,1,0,1285124162,NULL,0),('PBtmpl0000000000000041',1129049186,'3','pbversion0000000000001','approved','Default Group Delete Macro','Default Group Delete Macro','default_group_delete_macro','3','7','12',NULL,0,1,0,0,0,444,NULL,0,1,0,1285124162,NULL,0),('PBtmpl0000000000000042',1129049186,'3','pbversion0000000000001','approved','Default Homelink','Default Homelink','default_homelink','3','7','12',NULL,0,1,0,0,0,459,NULL,0,1,0,1285124162,NULL,0),('PBtmpl0000000000000043',1129049186,'3','pbversion0000000000001','approved','Default LoginToggle','Default LoginToggle','default_logintoggle','3','7','12',NULL,0,1,0,0,0,475,NULL,0,1,0,1285124162,NULL,0),('PBtmpl0000000000000045',1129049186,'3','pbversion0000000000001','approved','Default Make Printable','Default Make Printable','default_make_printable','3','7','12',NULL,0,1,0,0,0,500,NULL,0,1,0,1285124162,NULL,0),('PBtmpl0000000000000091',1129049189,'3','pbversion0000000000001','approved','File no icon','File no icon','file_no_icon','3','7','12',NULL,0,1,0,0,0,391,NULL,0,1,0,1285124163,NULL,0),('PBtmpl0000000000000140',1129573244,'3','pbversion0000000000001','approved','Default Shortcut','Default Shortcut','pbtmpl0000000000000140','3','7','12',NULL,0,1,0,0,0,1732,NULL,0,1,0,1285124163,NULL,0),('PBtmplHelp000000000001',1147642410,'3','pbversion0000000000001','approved','Help','Help','root/import/adminconsole/help','3','7','12',NULL,0,0,0,0,0,2221,'\n\n',0,1,0,1288747840,'',0),('ProjectManagerTMPL0004',1222574693,'3','pbversion0000000000001','approved','Default Project Manager Edit Task','Default Project Manager Edit Task','default-pm-template-edit-task','3','7','12',NULL,0,0,0,0,0,8779,'\r\n',0,1,0,1285124164,'',0),('7-0-style0000000000071',1147642511,'3','pbversion0000000000001','approved','wg.jpg','wg.jpg','style3/wg.jpg','3','7','12',NULL,0,0,0,0,0,27499,NULL,0,1,0,1242380145,NULL,0),('7-0-style0000000000070',1147642510,'3','pbversion0000000000001','approved','Style3 Coolmenu','Style3 Coolmenu','style3_coolmenu','3','7','12',NULL,0,0,0,0,0,377,NULL,0,1,0,1242380145,NULL,0),('7-0-style0000000000004',1147642493,'3','pbversion0000000000001','approved','gui_bottom.jpg','gui_bottom.jpg','style1/gui_bottom.jpg','3','7','12',NULL,0,0,0,0,0,11011,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000002',1147642492,'3','pbversion0000000000001','approved','body_bg.jpg','body_bg.jpg','style1/body_bg.jpg','3','7','12',NULL,0,0,0,0,0,598,NULL,0,1,0,1242380142,NULL,0),('PBtmpl0000000000000047',1147642414,'3','pbversion0000000000001','approved','Default Message Board','Default Message Board','default_message_board','3','7','12',NULL,0,1,0,0,0,5637,'',0,1,0,1285124162,'',0),('TimeTrackingTMPL000002',1147642417,'3','pbversion0000000000001','approved','Default Time Tracking Manager View','Default Time Tracking Manager View','default-tt-template-manager','3','7','12',NULL,0,0,0,0,0,408,' ',0,1,0,1285124164,NULL,0),('PBtmpl0000000000000057',1147642418,'3','pbversion0000000000001','approved','Default WebGUI Yes/No Prompt','Default WebGUI Yes/No Prompt','default_webgui_yes/no_prompt','3','7','12',NULL,0,1,0,0,0,797,NULL,0,1,0,1285124162,NULL,0),('PBtmpl0000000000000107',1147642420,'3','pbversion0000000000001','approved','File with size','File with size','file_with_size','3','7','12',NULL,0,1,0,0,0,661,NULL,0,1,0,1285124163,NULL,0),('WVtmpl0000000000000001',1147642426,'3','pbversion0000000000001','approved','Random Thread Macro Default Template','Random Thread Macro Default Template','randomthread-template','3','7','12',NULL,0,0,0,0,0,9218,NULL,0,1,0,1285124165,NULL,0),('7-0-style0000000000005',1147642493,'3','pbversion0000000000001','approved','header.jpg','header.jpg','style1/header.jpg','3','7','12',NULL,0,0,0,0,0,45014,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000008',1147642494,'3','pbversion0000000000001','approved','nav1_center_on.jpg','nav1_center_on.jpg','style1/nav1_center_on.jpg','3','7','12',NULL,0,0,0,0,0,1382,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000045',1147642503,'3','pbversion0000000000001','approved','pb_wg_bg.jpg','pb_wg_bg.jpg','style2/pb_wg_bg.jpg','3','7','12',NULL,0,0,0,0,0,21720,NULL,0,1,0,1242380144,NULL,0),('7-0-style0000000000021',1147642497,'3','pbversion0000000000001','approved','nav2_on_right.jpg','nav2_on_right.jpg','style1/nav2_on_right.jpg','3','7','12',NULL,0,0,0,0,0,720,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000020',1147642497,'3','pbversion0000000000001','approved','nav2_on_left.jpg','nav2_on_left.jpg','style1/nav2_on_left.jpg','3','7','12',NULL,0,0,0,0,0,732,NULL,0,1,0,1242380143,NULL,0),('7-0-style0000000000016',1147642496,'3','pbversion0000000000001','approved','nav2_center_on.jpg','nav2_center_on.jpg','style1/nav2_center_on.jpg','3','7','12',NULL,0,0,0,0,0,807,NULL,0,1,0,1242380143,NULL,0),('PBasset000000000000003',1147642437,'3','pbversion0000000000001','approved','Media','Media','media','3','7','12',NULL,0,0,0,0,0,296,NULL,0,1,0,1242380151,NULL,0),('nbSrhXZQuxIjhWFaFPSuVA',1147642465,'3','pbversion0000000000001','approved','AdminConsole','AdminConsole','root/import/adminconsole','3','7','12',NULL,0,0,0,0,0,313,NULL,0,1,0,1242380150,NULL,0),('71e17KeduiXgODLMlUxiow',1222803352,'3','pbversion0000000000001','approved','project','project','root/import/projectmanager/project','3','7','12',NULL,0,0,0,0,0,342,NULL,0,1,0,1242380145,NULL,0),('N13SD1Fpqk00UgBt1Z8ivQ',1147642470,'3','pbversion0000000000001','approved','HttpProxy','HttpProxy','root/import/httpproxy','3','7','12',NULL,0,0,0,0,0,304,NULL,0,1,0,1242380150,NULL,0),('3uuBf8cYuj1sew2OJXl9tg',1147642470,'3','pbversion0000000000001','approved','InOutBoard','InOutBoard','root/import/inoutboard','3','7','12',NULL,0,0,0,0,0,307,NULL,0,1,0,1242380142,NULL,0),('ProjectManagerTMPL0002',1222574693,'3','pbversion0000000000001','approved','Default Project Display','Default Project Display','default-pm-template-project-display','3','7','12',NULL,0,0,0,0,0,13074,'\r\n\r\n\r\n',0,1,0,1285124164,'',0),('cj2y4papTVGZRFdwTI-_fw',1147642475,'3','pbversion0000000000001','approved','MessageBoard','MessageBoard','root/import/messageboard','3','7','12',NULL,0,0,0,0,0,313,NULL,0,1,0,1242380147,NULL,0),('bBzO4CWjqU_ile3gf5Iypw',1147642475,'3','pbversion0000000000001','approved','MultiSearch','MultiSearch','root/import/multisearch','3','7','12',NULL,0,0,0,0,0,310,NULL,0,1,0,1242380147,NULL,0),('Da6KWn805L4B5e4HFgQRQA',1147642479,'3','pbversion0000000000001','approved','Shortcut','Shortcut','root/import/shortcut','3','7','12',NULL,0,0,0,0,0,301,NULL,0,1,0,1242380148,NULL,0),('bbiA9Zq5Gy2oCFBlILO3QA',1147642480,'3','pbversion0000000000001','approved','SQLReport','SQLReport','root/import/sqlreport','3','7','12',NULL,0,0,0,0,0,304,NULL,0,1,0,1242380147,NULL,0),('Efe2W0UgrSRDltNJ87jlfg',1147642480,'3','pbversion0000000000001','approved','StockData','StockData','root/import/stockdata','3','7','12',NULL,0,0,0,0,0,304,NULL,0,1,0,1242380148,NULL,0),('9wKWdum0_8z-OhhquWLtSQ',1147642483,'3','pbversion0000000000001','approved','WeatherData','WeatherData','root/import/weatherdata','3','7','12',NULL,0,0,0,0,0,310,NULL,0,1,0,1242380146,NULL,0),('CSN-ZON7Uwv8kxf3F1fh5Q',1147642484,'3','pbversion0000000000001','approved','ZipArchiveAsset','ZipArchiveAsset','root/import/ziparchiveasset','3','7','12',NULL,0,0,0,0,0,322,NULL,0,1,0,1242380147,NULL,0),('TCtybxdqmdwdvRn555zpCQ',1147642484,'3','pbversion0000000000001','approved','RichEdit','RichEdit','root/import/richedit','3','7','12',NULL,0,0,0,0,0,301,NULL,0,1,0,1242380163,NULL,0),('PBtmpl0000000000000044',1148579524,'3','pbversion0000000000001','approved','Default Login Box','Default Login Box','default_login_box','3','7','12',NULL,0,1,0,0,0,1884,NULL,0,1,0,1285124162,NULL,0),('PBtmpl0000000000000092',1148579524,'3','pbversion0000000000001','approved','Horizontal Login Box','Horizontal Login Box','horizontal_login_box','3','7','12',NULL,0,1,0,0,0,2082,NULL,0,1,0,1285124163,NULL,0),('PBtmpl0000000000000039',1154535073,'3','pbversion0000000000001','approved','Default File Macro','Default File Macro','default_file_macro','3','7','12',NULL,0,1,0,0,0,630,NULL,0,1,0,1285124162,NULL,0),('ProjectManagerTMPL0006',1157679165,'3','pbversion0000000000001','approved','Default Resource List','Default Resource List','default-pm-resource-list','3','7','12',NULL,0,0,0,0,0,1802,NULL,0,1,0,1285124164,NULL,0),('ProjectManagerTMPL0003',1159989349,'3','pbversion0000000000001','approved','Default Project Manager Gantt Chart','Default Project Manager Gantt Chart','default-pm-template-gantt-chart','3','7','12',NULL,0,0,0,0,0,3787,NULL,0,1,0,1285124164,NULL,0),('pbproto000000000000002',1163019036,'3','pbversion0000000000001','approved','Request Tracker','Request Tracker','request-tracker-prototype','3','7','12',NULL,0,0,0,1,0,595,NULL,0,1,0,1263962528,NULL,0),('IOB0000000000000000002',1166019641,'3','pbversion0000000000001','approved','Default InOutBoard Report Template','Default InOutBoard Report Template','iob-report-template','3','7','12',NULL,0,0,0,0,0,2746,'',0,1,0,1285124160,'',0),('ZipArchiveTMPL00000001',1169738426,'3','pbversion0000000000001','approved','Default Zip Archive Template','Default Zip Archive Template','zip-archive-template','3','7','12',NULL,0,0,0,0,0,1056,NULL,0,1,0,1285124165,NULL,0),('IOB0000000000000000001',1169795123,'3','pbversion0000000000001','approved','Default InOutBoard Template','Default InOutBoard Template','iob-template','3','7','12',NULL,0,0,0,0,0,3850,'',0,1,0,1285124160,'',0),('SQLReportDownload00001',1171466654,'3','pbversion0000000000001','approved','SQLReport Download Default Template','untitled','SQLReportDownload0001','3','7','12',NULL,0,0,0,0,0,6386,NULL,0,1,0,1285124164,NULL,0),('newsletter000000000001',1185754569,'3','pbversion0000000000001','approved',' Summary Newsletter (default)',' Summary Newsletter','newsletterdefaulttemplate','3','7','3',NULL,0,0,0,0,0,674,NULL,0,1,0,1285124167,NULL,0),('tempspace0000000000000',1185754574,'3','pbversion0000000000001','approved','Tempspace','Tempspace','tempspace','3','7','3',NULL,0,0,0,0,0,307,NULL,0,1,0,1242380163,NULL,0),('TimeTrackingTMPL000001',1201205738,'3','pbversion0000000000001','approved','Default Time Tracking User View','Default Time Tracking User View','default-tt-template-user','3','7','12',NULL,0,0,0,0,0,18644,'\n \n',0,1,0,1285124164,'',0),('CalendarPrintMonth0001',1204890714,'3','pbversion0000000000001','approved','Default Calendar Print Month','Default Calendar Print Month','root/import/calendar-templates/default-calendar-print-month','3','7','12',NULL,0,0,0,0,0,2454,' \r\n',0,1,0,1285124160,'',0),('CalendarPrintWeek00001',1204890714,'3','pbversion0000000000001','approved','Default Calendar Print Week','Default Calendar Print Week','root/import/calendar-templates/default-calendar-print-week','3','7','12',NULL,0,0,0,0,0,2654,' \r\n',0,1,0,1285124160,'',0),('CalendarPrintDay000001',1204890714,'3','pbversion0000000000001','approved','Default Calendar Print Day','Default Calendar Print Day','root/import/calendar-templates/default-calendar-print-day','3','7','12',NULL,0,0,0,0,0,2394,' \r\n',0,1,0,1285124160,'',0),('F7MAQ-cpuvQ1KuC7J4P5zQ',1222803673,'3','pbversion0000000000001','approved','View','View','root/import/profile/view','3','7','12',NULL,0,0,0,0,0,326,NULL,0,1,0,1242380148,NULL,0),('Tsg7xmPYv782j6IVz7yHFg',1213244777,'3','pbversion0000000000001','approved','Calendar Templates','Calendar Templates','root/import/calendar-templates','3','7','12',NULL,0,1,0,0,0,353,NULL,0,1,0,1242380164,NULL,0),('NywJYmGWe1f6EBXJnWg9Xg',1222803638,'3','pbversion0000000000001','approved','Profile','Profile','root/import/profile','3','7','12',NULL,0,1,0,0,0,320,NULL,0,1,0,1242380151,NULL,0),('AgyFhx3eXlfZXNp2MkrsiQ',1222803665,'3','pbversion0000000000001','approved','Edit','Edit','root/import/profile/edit','3','7','12',NULL,0,0,0,0,0,326,NULL,0,1,0,1242380146,NULL,0),('TYo2Bwl7aafzTtdHlS-arQ',1211664878,'3','pbversion0000000000001','approved','Product','Product','root/import/product','3','7','12',NULL,0,0,0,0,0,320,NULL,0,1,0,1242380164,NULL,0),('gbnRhcWNk1iQe32LFEB5eQ',1212086102,'3','pbversion0000000000001','approved','Shelf','Shelf','root/import/shelf2','3','7','12',NULL,0,1,0,0,0,315,NULL,0,1,0,1242380149,NULL,0),('6tK47xsaIH-ELw0IBo0uRQ',1210777115,'3','pbversion0000000000001','approved','images','images','root/import/shelf2/images','3','7','12',NULL,0,1,0,0,0,330,NULL,0,1,0,1242380142,NULL,0),('_bZJ9LA_KNekZiFPaP2SeQ',1210777868,'3','pbversion0000000000001','approved','shelf-titles.jpg','shelf-titles.jpg','root/import/shelf2/images/shelf-titles.jpg','3','7','12',NULL,0,1,0,0,0,1038,NULL,0,0,0,1242380165,NULL,0),('4e-_rNs6mSWedZhQ_V5kJA',1210779672,'3','pbversion0000000000001','approved','shelf-ie.css','shelf-ie.css','root/import/shelf2/shelf-ie.css','3','7','12',NULL,0,1,0,0,0,1092,NULL,0,1,0,1285124168,NULL,0),('6D4Z-oruXPS6OlH_Kx8pBg',1209509389,'3','pbversion0000000000001','approved','images','images','root/import/thingy-templates/images','3','7','12',NULL,0,1,0,0,0,340,NULL,0,1,0,1242380142,NULL,0),('hQ7z33_jOYkQ8WNX5xy9Sw',1209509455,'3','pbversion0000000000001','approved','style-button.gif','style-button.gif','root/import/thingy-templates/images/style-button.gif','3','7','12',NULL,0,1,0,0,0,923,NULL,0,0,0,1242380149,NULL,0),('vWW_DcHiYSrKZOkkIfEfcQ',1209509433,'3','pbversion0000000000001','approved','row-2.jpg','row-2.jpg','root/import/thingy-templates/images/row-2.jpg','3','7','12',NULL,0,1,0,0,0,805,NULL,0,0,0,1242380164,NULL,0),('_bPYzRA87NTAUIKlfrJMHg',1209509433,'3','pbversion0000000000001','approved','row-1.jpg','row-1.jpg','root/import/thingy-templates/images/row-1.jpg','3','7','12',NULL,0,1,0,0,0,790,NULL,0,0,0,1242380165,NULL,0),('nJjZHRwdDs5MAZYsAyioHw',1209509433,'3','pbversion0000000000001','approved','title-bg.jpg','title-bg.jpg','root/import/thingy-templates/images/title-bg.jpg','3','7','12',NULL,0,1,0,0,0,1105,NULL,0,0,0,1242380151,NULL,0),('8hxfkrJPeFVRWF5piCNJ1A',1209509433,'3','pbversion0000000000001','approved','field-bg.jpg','field-bg.jpg','root/import/thingy-templates/images/field-bg.jpg','3','7','12',NULL,0,1,0,0,0,721,NULL,0,0,0,1242380146,NULL,0),('Osx7WN52iIKHZFT4vqUBHQ',1209509433,'3','pbversion0000000000001','approved','search-btn.gif','search-btn.gif','root/import/thingy-templates/images/search-btn.gif','3','7','12',NULL,0,1,0,0,0,1263,NULL,0,0,0,1242380151,NULL,0),('oWff8fGzRdHPyq5VNREe9Q',1209509433,'3','pbversion0000000000001','approved','top-bg.jpg','top-bg.jpg','root/import/thingy-templates/images/top-bg.jpg','3','7','12',NULL,0,1,0,0,0,691,NULL,0,0,0,1242380151,NULL,0),('uqbkvb1b9443VvfkyRz95w',1209509433,'3','pbversion0000000000001','approved','save-button.gif','save-button.gif','root/import/thingy-templates/images/save-button.gif','3','7','12',NULL,0,1,0,0,0,1271,NULL,0,0,0,1242380164,NULL,0),('8YiMkcz32xalkAn3WBLpag',1210181860,'3','pbversion0000000000001','approved','go-btn.gif','go-btn.gif','root/import/thingy-templates/images/go-btn.gif','3','7','12',NULL,0,1,0,0,0,430,NULL,0,0,0,1242380146,NULL,0),('C5fPz-Wg85vkYRvCdl-Xqw',1212160830,'3','pbversion0000000000001','approved','UserList','UserList','root/import/userlist','3','7','12',NULL,0,1,0,0,0,323,NULL,0,1,0,1242380147,NULL,0),('usuxw9V3jN4d4pujRiEYxg',1209494150,'3','pbversion0000000000001','approved','css03-ie.css','css03-ie.css','style3/css03-ie.css','3','7','12',NULL,0,0,0,0,0,347,NULL,0,1,0,1285124169,NULL,0),('WeatherDataTmpl0000001',1210711353,'3','pbversion0000000000001','approved','WeatherData Default View','WeatherData Default View','weatherdatatmpl0000001','3','7','12',NULL,0,1,0,0,0,5540,'\r\n\r\n\r\n',0,1,0,1285124165,'',0),('Ik9HHky10DIyFTKehUD1dw',1222803478,'3','pbversion0000000000001','approved','Prompt','Prompt','root/import/prompt','3','7','12',NULL,0,0,0,0,0,317,NULL,0,1,0,1242380149,NULL,0),('BmLaN4rmAANkCglXUViEbg',1222803871,'3','pbversion0000000000001','approved','Resource','Resource','root/import/projectmanager/resource','3','12','12',NULL,0,0,0,0,0,346,NULL,0,1,0,1242380147,NULL,0),('X7DrzUcj8pOKFa_6k9D5iw',1222804045,'3','pbversion0000000000001','approved','Newsletter','Newsletter','root/import/newsletter','3','12','3',NULL,0,0,0,0,0,329,NULL,0,1,0,1242380165,NULL,0),('7-0-style0000000000059',1213386091,'3','pbversion0000000000001','approved','main_top.jpg','main_top.jpg','style3/main_top.jpg','3','7','12',NULL,0,0,0,0,0,3594,NULL,0,1,0,1242380144,NULL,0),('CalendarPrintEvent0001',1215396964,'3','pbversion0000000000001','approved','Default Calendar Print Event','Default Calendar Print Event','root/import/calendar-templates/default-calendar-print-event','3','7','12',NULL,0,0,0,0,0,4202,' \r\n',0,1,0,1285124160,'',0),('o_pq_e4vRyhMOKFzs61eag',1215714957,'3','pbversion0000000000001','approved','book-covers.jpg','book-covers.jpg','documentation/book-covers.jpg','3','7','3',NULL,0,1,0,0,0,106078,NULL,0,0,0,1301974028,NULL,0),('jnYdqDkUR8x7Pv2eGR1qTA',1216250666,'3','pbversion0000000000001','approved','Thingy Templates','Thingy Templates','root/import/thingy-templates','3','7','12',NULL,0,1,0,0,0,347,NULL,0,1,0,1242380149,NULL,0),('5m5I7__l40C4hhv4ydqAHQ',1216227786,'3','pbversion0000000000001','approved','thingy-ie.css','thingy-ie.css','root/import/thingy-templates/thingy-ie.css','3','7','12',NULL,0,1,0,0,0,1329,NULL,0,1,0,1285124168,NULL,0),('pV7GnZdpjR3XpZaSINIoeg',1222803347,'3','pbversion0000000000001','approved','gantt','gantt','root/import/projectmanager/gantt','3','7','12',NULL,0,0,0,0,0,336,NULL,0,1,0,1242380162,NULL,0),('9A-mg2gwWmaYi9o_1C7ArQ',1222803338,'3','pbversion0000000000001','approved','dashboard','dashboard','root/import/projectmanager/dashboard','3','7','12',NULL,0,0,0,0,0,348,NULL,0,1,0,1242380146,NULL,0),('yD1SMHelczihzjEmx6eXBA',1222803342,'3','pbversion0000000000001','approved','editTask','editTask','root/import/projectmanager/edittask','3','7','12',NULL,0,0,0,0,0,345,NULL,0,1,0,1242380165,NULL,0),('BFfNj5wA9bDw8H3cnr8pTw',1247046273,'3','pbversion0000000000001','approved','Navigation','Navigation','root/import/navigation','3','7','12',NULL,0,0,0,0,0,329,NULL,0,1,0,1247779656,NULL,0),('PBtmpl0000000000000094',1220655703,'3','pbversion0000000000001','approved','News','News','plainblacknews','3','7','12',NULL,0,1,0,0,0,6236,'\r\n\r\n\r\n',0,1,0,1285124163,'',0),('1XOJDcg_ITRYwVM-QnIcPw',1219175575,'3','pbversion0000000000001','approved','shelf.css','shelf.css','root/import/shelf2/shelf.css','3','7','12',NULL,0,1,0,0,0,2431,NULL,0,1,0,1285124168,NULL,0),('aNNC62qLAS6TB-0_MCYjsw',1246969327,'3','pbversion0000000000001','approved','Layout','Layout','root/import/layout','3','7','12',NULL,0,0,0,0,0,317,NULL,0,1,0,1247779656,NULL,0),('huASapWvFDzqwOSbcN-JFQ',1222803313,'3','pbversion0000000000001','approved','user','user','root/import/timetracking/user','3','7','12',NULL,0,0,0,0,0,331,NULL,0,1,0,1242380149,NULL,0),('lo1ac3BsoJx3ijGQ3gR-bQ',1222803309,'3','pbversion0000000000001','approved','row','row','root/import/timetracking/row','3','7','12',NULL,0,0,0,0,0,328,NULL,0,1,0,1242380150,NULL,0),('zyWi26q9na-iiZqL4yedog',1222803114,'3','pbversion0000000000001','approved','Macro','Macro','root/import/macro','3','7','12',NULL,0,1,0,0,0,314,NULL,0,1,0,1242380165,NULL,0),('tBL7BWiQRZFed2Y-Zjo9tQ',1222803200,'3','pbversion0000000000001','approved','AdminToggle','AdminToggle','root/import/macro/admintoggle','3','7','12',NULL,0,0,0,0,0,345,NULL,0,1,0,1242380163,NULL,0),('GdkQpvjRtJqtzOUbwIIQRA',1222803205,'3','pbversion0000000000001','approved','a_account','a_account','root/import/macro/a_account','3','7','12',NULL,0,0,0,0,0,339,NULL,0,1,0,1242380149,NULL,0),('tnc5iYyynX2hfdEs9D3P8w',1222803213,'3','pbversion0000000000001','approved','EditableToggle','EditableToggle','root/import/macro/editabletoggle','3','7','12',NULL,0,0,0,0,0,354,NULL,0,1,0,1242380164,NULL,0),('vgXdBcFTqU7h4wBG1ewdBw',1222803217,'3','pbversion0000000000001','approved','File','File','root/import/macro/file','3','7','12',NULL,0,0,0,0,0,324,NULL,0,1,0,1242380164,NULL,0),('hcFlqnXlsmC1ujN6Id0F0A',1222803234,'3','pbversion0000000000001','approved','GroupAdd','GroupAdd','root/import/macro/groupadd','3','7','12',NULL,0,0,0,0,0,336,NULL,0,1,0,1242380149,NULL,0),('eRJR52fvlaxfetv3DQkQYw',1222803238,'3','pbversion0000000000001','approved','GroupDelete','GroupDelete','root/import/macro/groupdelete','3','7','12',NULL,0,0,0,0,0,345,NULL,0,1,0,1242380148,NULL,0),('5HIDHq5lAWHV5gpYGS0zLg',1222803244,'3','pbversion0000000000001','approved','H_homeLink','H_homeLink','root/import/macro/h_homelink','3','7','12',NULL,0,0,0,0,0,342,NULL,0,1,0,1242380142,NULL,0),('rYEFwXXo0tkGhQTcbDibvg',1222803249,'3','pbversion0000000000001','approved','LoginToggle','LoginToggle','root/import/macro/logintoggle','3','7','12',NULL,0,0,0,0,0,345,NULL,0,1,0,1242380162,NULL,0),('-WM2dt0ZGpDasuL2wWocxg',1222803056,'3','pbversion0000000000001','approved','ProjectManager','ProjectManager','root/import/projectmanager','3','7','12',NULL,0,1,0,0,0,341,NULL,0,1,0,1242380141,NULL,0),('2OcUWHVsu_L1sDFzIMWYqw',1222803070,'3','pbversion0000000000001','approved','TimeTracking','TimeTracking','root/import/timetracking','3','7','12',NULL,0,1,0,0,0,335,NULL,0,1,0,1242380141,NULL,0),('vTymIDYL2YqEh6PV50F7ew',1222803302,'3','pbversion0000000000001','approved','manager','manager','root/import/timetracking/manager','3','7','12',NULL,0,0,0,0,0,340,NULL,0,1,0,1242380164,NULL,0),('nqNbSUAhk9Vd1zda2SCz9A',1222803258,'3','pbversion0000000000001','approved','RandomThread','RandomThread','root/import/macro/randomthread','3','7','12',NULL,0,0,0,0,0,348,NULL,0,1,0,1242380151,NULL,0),('y8XkRdxIperLKkJ3bL5sSQ',1222803264,'3','pbversion0000000000001','approved','r_printable','r_printable','root/import/macro/r_printable','3','7','12',NULL,0,0,0,0,0,345,NULL,0,1,0,1242380165,NULL,0),('V3l5S5TtI7wMm1WpIMhvOA',1222803253,'3','pbversion0000000000001','approved','L_loginBox','L_loginBox','root/import/macro/l_loginbox','3','7','12',NULL,0,0,0,0,0,342,NULL,0,1,0,1242380164,NULL,0),('newslettersubscrip0001',1221692339,'3','pbversion0000000000001','approved','My Subscriptions (default)',' My Subscriptions','newslettermysubscriptionstemplate','3','7','3',NULL,0,0,0,0,0,1184,NULL,0,1,0,1285124167,NULL,0),('UL-ItI4L1Z6-WSuhuXVvsQ',1225139673,'3','pbversion0000000000001','approved','DataTable','DataTable','root/import/datatable','3','7','3',NULL,0,0,0,0,0,325,NULL,0,1,0,1242380164,NULL,0),('7-0-style0000000000049',1224117144,'3','pbversion0000000000001','approved','WebGUI 7 Style 3','WebGUI 7 Style 3','root/import/webgui-7-style-3','3','7','12',NULL,0,0,0,0,0,347,NULL,0,1,0,1242380144,NULL,0),('stevecoolmenu000000001',1224116942,'3','pbversion0000000000001','approved','Site Nav','Site Nav','webgui7/style3/hierarchical-top-nav','3','7','12',NULL,0,0,0,0,0,3754,'\r\n\r\n\r\n\r\n',0,1,0,1285124167,'',0),('7-0-style0000000000051',1224117026,'3','pbversion0000000000001','approved','css03.css','css03.css','style3/css03.css','3','7','12',NULL,0,0,0,0,0,5975,NULL,0,1,0,1285124168,NULL,0),('jVKLVakT_iA2010_oEuAwg',1224116526,'3','pbversion0000000000001','approved','Style3 Coolmenu','Style3 Coolmenu','department_nav','3','7','12',NULL,0,0,0,0,0,386,NULL,0,1,0,1242380150,NULL,0),('ThingyTmpl000000000003',1224518002,'3','pbversion0000000000001','approved','Default Thingy Edit Thing','Default Thingy Edit Thing','templates/thingy-default-edit-thing','3','7','12',NULL,0,0,0,0,0,6324,'\r\n\r\n\r\n',0,1,0,1285124164,'',0),('QpmlAiYZz6VsKBM-_0wXaw',1224616691,'3','pbversion0000000000001','approved','UsersOnline Macro','UsersOnline Macro','users-online-macro-templates','3','7','3',NULL,0,0,0,0,0,368,NULL,0,1,0,1242380162,NULL,0),('h_T2xtOxGRQ9QJOR6ebLpQ',1224616545,'3','pbversion0000000000001','approved','UsersOnline Default View','UsersOnline Default View','users-online-macro-templates/usersonline-default-view','3','7','3',NULL,0,1,0,0,0,2495,'\r\n\r\n',0,1,0,1285124166,'',0),('4Ekp0kJoJllRRRo_J1Rj6w',1224616672,'3','pbversion0000000000001','approved','UsersOnline Detailed View','UsersOnline Detailed View','users-online-macro-templates/usersonline-detailed-view','3','7','3',NULL,0,1,0,0,0,4318,'\r\n\r\n',0,1,0,1285124159,'',0),('HPDOcsj4gBme8D4svHodBw',1225404573,'3','pbversion0000000000001','approved','Profile','Profile','root/import/account/profile','3','7','12',NULL,0,1,0,0,0,334,NULL,0,1,0,1250190873,NULL,0),('IZkrow_zwvbf4FCH-taVTQ',1226011853,'3','pbversion0000000000001','approved','Inbox','Inbox','root/import/account/inbox','3','7','12',NULL,0,1,0,0,0,328,NULL,0,1,0,1250190873,NULL,0),('K0YjxqOqr7RupSo6sIdcAg',1227074310,'3','pbversion0000000000001','approved','Friends','Friends','root/import/account/friends','3','7','12',NULL,0,1,0,0,0,334,NULL,0,1,0,1250190873,NULL,0),('_ilRXNR3s8F2vGJ_k9ePcg',1226643205,'3','pbversion0000000000001','approved','User','User','root/import/account/user','3','7','12',NULL,0,1,0,0,0,325,NULL,0,1,0,1250190873,NULL,0),('qaVcU0FFzzraMX_bzELqzw',1227074362,'3','pbversion0000000000001','approved','Contributions','Contributions','root/import/account/contributions','3','7','12',NULL,0,1,0,0,0,352,NULL,0,1,0,1250190873,NULL,0),('UserListTmpl0000000001',1228125743,'3','pbversion0000000000001','approved','Default UserList','Default UserList','root/import/userlist/default-userlist','3','7','12',NULL,0,1,0,0,0,5202,NULL,0,1,0,1285124165,NULL,0),('UserListTmpl0000000003',1228125758,'3','pbversion0000000000001','approved','UserList with multiple search keywords','UserList with multiple search keywords','root/import/userlist/userlist-with-multiple-search-keywords','3','7','12',NULL,0,1,0,0,0,5489,NULL,0,1,0,1285124165,NULL,0),('UserListTmpl0000000002',1228125752,'3','pbversion0000000000001','approved','UserList with search field selection','UserList with search field selection','root/import/userlist/userlist-with-search-field-selection','3','7','12',NULL,0,1,0,0,0,5116,NULL,0,1,0,1285124165,NULL,0),('TimeTrackingTMPL000003',1229311434,'3','pbversion0000000000001','approved','Default Time Tracking Row Template','Default Time Tracking Row Template','default-tt-template-row','3','7','12',NULL,0,0,0,0,0,5721,NULL,0,1,0,1285124164,NULL,0),('uRL9qtk7Rb0YRJ41LmHOJw',1229311072,'3','pbversion0000000000001','approved','Default Calendar Print List View','Default Calendar Print List View','root/import/calendar-templates/default-calendar-print-list-view','3','7','3',NULL,0,1,0,0,0,1737,NULL,0,1,0,1285124167,NULL,0),('j_1qEqM6iLfQLiR6VKy0aA',1299872071,'1','pbversion0000000000001','approved','Free Documentation','Free Documentation','documentation/free-documentation','3','7','3',NULL,0,1,0,0,0,2117,NULL,0,1,0,1301974027,NULL,0),('ProjectManagerTMPL0005',1229579830,'3','pbversion0000000000001','approved','Default Resource Popup','Default Resource Popup','default-pm-resource-popup','3','7','12',NULL,0,0,0,0,0,3582,NULL,0,1,0,1285124164,NULL,0),('ProjectManagerTMPL0001',1229579830,'3','pbversion0000000000001','approved','Default Project Management System Dashboard','Default Project Management System Dashboard','default-pm-template-dashboard','3','7','12',NULL,0,0,0,0,0,6862,'',0,1,0,1285124164,'',0),('PBtmpl0000000000000033',1230159454,'3','pbversion0000000000001','approved','Default HTTP Proxy','Default HTTP Proxy','default_http_proxy','3','7','12',NULL,0,1,0,0,0,2214,NULL,0,1,0,1285124162,NULL,0),('PBtmpl0000000000000059',1229907401,'3','pbversion0000000000001','approved','Default SQL Report','Default SQL Report','default_sql_report','3','7','12',NULL,0,1,0,0,0,7737,NULL,0,1,0,1285124162,NULL,0),('MultiSearchTmpl0000001',1230269962,'3','pbversion0000000000001','approved','MultiSearch Default Display','MultiSearch Default Display','multisearchtmpl0000001','3','7','12',NULL,0,1,0,0,0,3538,'',0,1,0,1285124161,'',0),('CalendarDay00000000001',1230358389,'3','pbversion0000000000001','approved','Default Calendar Day','Default Calendar Day','root/import/calendar-templates/default-calendar-day','3','7','12',NULL,0,0,0,0,0,13749,' ',0,1,0,1285124160,'',0),('CalendarWeek0000000001',1230358389,'3','pbversion0000000000001','approved','Default Calendar Week','Default Calendar Week','root/import/calendar-templates/default-calendar-week','3','7','12',NULL,0,0,0,0,0,12761,'',0,1,0,1285124160,'',0),('StockDataTMPL000000002',1229494994,'3','pbversion0000000000001','approved','StockData Default Display','StockData Default Display','stockdatatmpl000000002','3','7','12',NULL,0,1,0,0,0,20602,NULL,0,1,0,1285124164,NULL,0),('QHn6T9rU7KsnS3Y70KCNTg',1233173545,'3','pbversion0000000000001','approved','Account','Account','root/import/account','3','7','12',NULL,0,1,0,0,0,320,NULL,0,1,0,1250190873,NULL,0),('HW-sPoDDZR8wBZ0YgFgPtg',1227634350,'3','pbversion0000000000001','approved','images','images','root/import/account/images','3','7','12',NULL,0,1,0,0,0,331,NULL,0,1,0,1250190873,NULL,0),('hBpisL-_URyZnh9clR5ohA',1227634417,'3','pbversion0000000000001','approved','no_photo.gif','no_photo.gif','root/import/account/images/no_photo.gif','3','7','12',NULL,0,1,0,0,0,2564,NULL,0,1,0,1250190873,NULL,0),('FOBV6KkifreXa4GmEAUU4A',1227634447,'3','pbversion0000000000001','approved','no_photo_sm.gif','no_photo_sm.gif','root/import/account/images/no_photo_sm.gif','3','7','12',NULL,0,1,0,0,0,1580,NULL,0,1,0,1250190873,NULL,0),('TuYPpHx7TUyk08639Pc8Bg',1233861621,'3','pbversion0000000000001','approved','Default DataTable Template (HTML)','Default DataTable Template (HTML)','root/import/datatable/default-datatable-template-html','3','7','3',NULL,0,1,0,0,0,1429,NULL,0,1,0,1285124164,NULL,0),('3rjnBVJRO6ZSkxlFkYh_ug',1233861835,'3','pbversion0000000000001','approved','Default DataTable Template (YUI)','Default DataTable Template (YUI)','root/import/datatable/default-datatable-template-yui','3','7','3',NULL,0,1,0,0,0,1089,NULL,0,1,0,1285124159,NULL,0),('AOjPG2NHgfL9Cq6dDJ7mew',1236960881,'3','pbversion0000000000001','approved','Shop','Shop','root/import/account/shop','3','7','12',NULL,0,1,0,0,0,325,NULL,0,1,0,1250190873,NULL,0),('NBVSVNLp9X_bV7WrCprtCA',1237842096,'3','pbversion0000000000001','approved','Annotate Image','Annotate Image','image3','3','7','12',NULL,0,1,0,0,0,675,NULL,0,1,0,1285124161,NULL,0),('jmlI9IK-lV8n2WMYmmPhAA',1238106173,'3','pbversion0000000000001','approved','Ad Sku','Ad Sku','root/import/ad-sku','3','7','12',NULL,0,1,0,0,0,317,NULL,0,1,0,1242380149,NULL,0),('ThingyTmpl000000000001',1237914005,'3','pbversion0000000000001','approved','Default Thingy','Default Thingy','templates/thingy-default','3','7','12',NULL,0,0,0,0,0,2554,'',0,1,0,1285124164,'',0),('6uvSLY-ak_w4p_wS8q33cA',1239213092,'3','pbversion0000000000001','approved','Carousel','Carousel','root/import/carousel','3','7','12',NULL,0,1,0,0,0,323,NULL,0,1,0,1242380142,NULL,0),('CarouselTmpl0000000002',1239475937,'3','pbversion0000000000001','approved','Carousel hidden textareas','Carousel hidden textareas','root/import/carousel/carousel-hidden-textareas','3','7','12',NULL,0,0,0,0,0,1059,NULL,0,1,0,1285124160,NULL,0),('GaBAW-2iVhLMJaZQzVLE5A',1240103565,'3','pbversion0000000000001','approved','ThingyRecord Templates','ThingyRecord Templates','root/import/thingyrecord-templates','3','7','3',NULL,0,0,0,0,0,364,NULL,0,1,0,1242380149,NULL,0),('b1316COmd9xRv4fCI3LLGA',1236956475,'3','pbversion0000000000001','approved','Inbox Notification','Inbox Notification','inbox_notification','3','7','4',NULL,0,0,0,0,0,414,NULL,0,1,0,1285124165,NULL,0),('lo1rpxn3t8YPyKGers5eQg',1238625621,'3','pbversion0000000000001','approved','Friend Manager','Friend Manager','root/import/account/friendmanager','3','7','12',NULL,0,1,0,0,0,388,NULL,0,1,0,1242380168,NULL,0),('YP9WaMPJHvCJl-YwrLVcPw',1245376837,'3','pbversion0000000000001','approved','Progress Bar','Progress Bar','admin_progress_bar','3','7','12',NULL,0,1,0,0,0,2600,'\n',0,1,0,1285124165,'',0),('FEDP3dk8J3Chw_gyr7_XEQ',1246278679,'3','pbversion0000000000001','approved','navigation.css','navigation.css','navigation.css','3','7','12',NULL,0,1,0,0,0,2437,NULL,0,1,0,1285124168,NULL,0),('f_tn9FfoSfKWX43F83v_3w',1247053009,'3','pbversion0000000000001','approved','Search','Search','root/import/search','3','7','12',NULL,0,0,0,0,0,317,NULL,0,1,0,1247779657,NULL,0),('oGfxez5sksyB_PcaAsEm_Q',1247053097,'3','pbversion0000000000001','approved','SyndicatedContent','SyndicatedContent','root/import/syndicatedcontent','3','7','12',NULL,0,0,0,0,0,350,NULL,0,1,0,1247779657,NULL,0),('tPagC0AQErZXjLFZQ6OI1g',1246966459,'3','pbversion0000000000001','approved','ImageAsset','ImageAsset','root/import/imageasset','3','7','12',NULL,0,0,0,0,0,329,NULL,0,1,0,1247779656,NULL,0),('pbtmpl0000000000000220',1247488979,'3','pbversion0000000000001','approved','Flash Style 3 Template','Flash Style 3 Template','flash-style-3-template','3','7','12',NULL,0,0,0,0,0,1386,'\r\n\r\n',0,1,0,1285124167,'',0),('PBtmpl0000000000000001',1247535846,'3','pbversion0000000000001','approved','Admin Console','Admin Console','admin_console2','3','7','12',NULL,0,1,0,0,0,5963,'\n',0,1,0,1285124161,'',0),('GYaFxnMu9UsEG8oanwB6TA',1246965871,'3','pbversion0000000000001','approved','Folder','Folder','root/import/folder','3','7','12',NULL,0,0,0,0,0,317,NULL,0,1,0,1247779656,NULL,0),('pbtmpl0000000000000221',1247487940,'3','pbversion0000000000001','approved','Flash Tutorial Template','Flash Tutorial Template','flash-tutorial-template','3','7','12',NULL,0,0,0,0,0,2092,'\r\n\r\n',0,1,0,1285124167,'',0),('VZK3CRgiMb8r4dBjUmCTgQ',1247046242,'3','pbversion0000000000001','approved','Poll','Poll','root/import/poll','3','7','12',NULL,0,0,0,0,0,311,NULL,0,1,0,1247779656,NULL,0),('NK8bqlwVRILJknqeCDPBHg',1285796040,'1','pbversion0000000000001','approved','Getting Started (part 2)','Getting Started (part 2)','getting_started/getting-started-part2','3','7','4',NULL,0,1,0,0,0,1510,NULL,0,1,0,1301974027,NULL,0),('i5kt5aodVs_oepNEkE7Okw',1242312883,'3','pbversion0000000000001','approved','poll.css','poll.css','poll.css','3','7','12',NULL,0,1,0,0,0,458,NULL,0,1,0,1285124169,NULL,0),('tXwf1zaOXTvsqPn6yu-GSw',1246965607,'3','pbversion0000000000001','approved','FileAsset','FileAsset','root/import/fileasset','3','7','12',NULL,0,0,0,0,0,326,NULL,0,1,0,1247779656,NULL,0),('nFen0xjkZn8WkpM93C9ceQ',1247864696,'3','pbversion0000000000001','approved','Shelf (Default)','Shelf (Default)','root/import/shelf-default','3','7','12',NULL,0,1,0,0,0,4612,'\n',0,1,0,1285124167,'',0),('2CS-BErrjMmESOtGT90qOg',1248549087,'3','pbversion0000000000001','approved','Default View Profile Template','Default View Profile Template','root/import/account/profile/default-view-profile-template','3','7','12',NULL,0,1,0,0,0,7605,NULL,0,1,0,1285124168,NULL,1),('MBmWlA_YEA2I6D29OMGtRg',1248549086,'3','pbversion0000000000001','approved','Default Profile Error Template','Default Profile Error Template','root/import/account/profile/default-profile-error-template','3','7','12',NULL,0,1,0,0,0,1223,NULL,0,1,0,1285124161,NULL,0),('gfZOwaTWYjbSoVaQtHBBEw',1249407461,'3','pbversion0000000000001','approved','Inbox Account Layout','Inbox Account Layout','root/import/account/inbox-account-layout','3','7','12',NULL,0,1,0,0,0,3260,'',0,1,0,1285124166,'',0),('0n4HtbXaWa_XJHkFjetnLQ',1248549086,'3','pbversion0000000000001','approved','Default Inbox View Message Template','Default Inbox View Message Template','root/import/account/inbox/default-inbox-view-message-template','3','7','12',NULL,0,1,0,0,0,5000,NULL,0,1,0,1285124159,NULL,0),('ErEzulFiEKDkaCDVmxUavw',1248549086,'3','pbversion0000000000001','approved','Default Inbox Error Template','Default Inbox Error Template','root/import/account/inbox/default-inbox-error-template','3','7','12',NULL,0,1,0,0,0,732,NULL,0,1,0,1285124160,NULL,0),('DUoxlTBXhVS-Zl3CFDpt9g',1248549086,'3','pbversion0000000000001','approved','Default Message Confirm Template','Default Message Confirm Template','root/import/account/inbox/default-message-confirm-template','3','7','12',NULL,0,1,0,0,0,785,NULL,0,1,0,1285124160,NULL,0),('1Q4Je3hKCJzeo0ZBB5YB8g',1248549086,'3','pbversion0000000000001','approved','Default Manage Invitations Template','Default Manage Invitations Template','root/import/account/inbox/default-manage-invitations-template','3','7','12',NULL,0,1,0,0,0,9795,'\n\n',0,1,0,1285124159,'',0),('5A8Hd9zXvByTDy4x-H28qw',1248549086,'3','pbversion0000000000001','approved','Default Invitation Confirmation Template','Default Invitation Confirmation Template','root/import/account/inbox/default-invitation-confirmation-template','3','7','12',NULL,0,1,0,0,0,1549,NULL,0,1,0,1285124159,NULL,0),('VBkY05f-E3WJS50WpdKd1Q',1248549087,'3','pbversion0000000000001','approved','Default View Invitation Template','Default View Invitation Template','root/import/account/inbox/default-view-invitation-template','3','7','12',NULL,0,1,0,0,0,3836,NULL,0,1,0,1285124165,NULL,0),('XgcsoDrbC0duVla7N7JAdw',1248549086,'3','pbversion0000000000001','approved','Default Invite User Email Template','Default Invite User Email Template','root/import/account/inbox/default-invite-user-email-template','3','7','12',NULL,0,1,0,0,0,490,NULL,0,1,0,1285124165,NULL,0),('cR0UFm7I1qUI2Wbpj--08Q',1248549086,'3','pbversion0000000000001','approved','Default Invite User Form Template','Default Invite User Form Template','root/import/account/inbox/default-invite-user-form-template','3','7','12',NULL,0,1,0,0,0,3967,NULL,0,1,0,1285124165,NULL,0),('SVIhz68689hwUGgcDM-gWw',1248549086,'3','pbversion0000000000001','approved','Default Invite User Confirm Template','Default Invite User Confirm Template','root/import/account/inbox/default-invite-user-confirm-template','3','7','12',NULL,0,1,0,0,0,819,NULL,0,1,0,1285124164,NULL,0),('zrNpGbT3odfIkg6nFSUy8Q',1249407461,'3','pbversion0000000000001','approved','Friends Layout Template','Friends Layout Template','root/import/account/friends/friends-layout-template','3','7','12',NULL,0,1,0,0,0,2662,'\n',0,1,0,1285124168,'',0),('1Yn_zE_dSiNuaBGNLPbxtw',1248549086,'3','pbversion0000000000001','approved','Default Friends View Template','Default Friends View Template','root/import/account/friends/default-friends-view-template','3','7','12',NULL,0,1,0,0,0,8064,NULL,0,1,0,1285124159,NULL,0),('AZFU33p0jpPJ-E6qLSWZng',1248549086,'3','pbversion0000000000001','approved','Default Friends Edit Template','Default Friends Edit Template','root/import/account/friends/default-friends-edit-template','3','7','12',NULL,0,1,0,0,0,9831,NULL,0,1,0,1285124159,NULL,0),('AGJBGviWGAwjnwziiPjvDg',1248549087,'3','pbversion0000000000001','approved','Default Send Request Template','Default Send Request Template','root/import/account/friends/default-send-request-template','3','7','12',NULL,0,1,0,0,0,2781,NULL,0,1,0,1285124159,NULL,0),('7Ijdd8SW32lVgg2H8R-Aqw',1248549086,'3','pbversion0000000000001','approved','Default Friends Error Template','Default Friends Error Template','root/import/account/friends/default-friends-error-template','3','7','12',NULL,0,1,0,0,0,776,NULL,0,1,0,1285124159,NULL,0),('K8F0j_cq_jgo8dvWY_26Ag',1248549086,'3','pbversion0000000000001','approved','Default Friends Confirmation Template','Default Friends Confirmation Template','root/import/account/friends/default-friends-confirmation-template','3','7','12',NULL,0,1,0,0,0,942,NULL,0,1,0,1285124160,NULL,0),('G5V6neXIDiFXN05oL-U3AQ',1248549087,'3','pbversion0000000000001','approved','Default Remove Friends Confirmation Template','Default Remove Friends Confirmation Template','root/import/account/friends/default-remove-friends-confirmation-template','3','7','12',NULL,0,1,0,0,0,1166,NULL,0,1,0,1285124160,NULL,0),('9ThW278DWLV0-Svf68ljFQ',1249407460,'3','pbversion0000000000001','approved','Account Layout','Account Layout','root/import/account/user/account-layout','3','7','12',NULL,0,1,0,0,0,1728,'\n',0,1,0,1285124159,'',0),('-zxyB-O50W8YnL39Ouoc4Q',1248563425,'3','pbversion0000000000001','approved','Default My Sales Template','Default My Sales Template','root/import/default-my-sales-template','3','7','12',NULL,0,1,0,0,0,3993,NULL,0,1,0,1285124158,NULL,0),('b4n3VyUIsAHyIvT-W-jziA',1249407461,'3','pbversion0000000000001','approved','Contributions Layout','Contributions Layout','root/import/account/contributions/contributions-layout','3','7','12',NULL,0,1,0,0,0,1753,'\n',0,1,0,1285124165,'',0),('PBtmpl0000000000000056',1248729559,'3','pbversion0000000000001','approved','Default Product','Default Product','default_product','3','7','12',NULL,0,1,0,0,0,13325,'\n\n',0,1,0,1285124162,'',0),('i9-G00ALhJOr0gMh-vHbKA',1250408924,'3','pbversion0000000000001','approved','Inbox SMS Notification','Inbox SMS Notification','root/import/inbox-sms-notification','3','7','4',NULL,0,0,0,0,0,446,NULL,0,1,0,1285124166,NULL,0),('ohjyzab5i-yW6GOWTeDUHg',1251425384,'3','pbversion0000000000001','approved','Default Manage Ad Sku Template','Default Manage Ad Sku Template','root/import/ad-sku/default-manage-ad-sku-template','3','7','12',NULL,0,0,0,0,0,2567,NULL,0,1,0,1285124167,NULL,0),('AldPGu0u-jm_5xK13atCSQ',1251419124,'3','pbversion0000000000001','approved','Default Purchase Ad Sku Template','Default Purchase Ad Sku Template','root/import/ad-sku/default-purchase-ad-sku-template','3','7','12',NULL,0,0,0,0,0,4230,NULL,0,1,0,1285124160,NULL,0),('5bnNzteN7w3NnK9mF4XiCg',1250243000,'3','pbversion0000000000001','approved','Survey','Survey','root/import/survey','3','7','12',NULL,0,0,0,0,0,317,NULL,0,1,0,1253052788,NULL,0),('PBtmpl0000000000000063',1250243000,'3','pbversion0000000000001','approved','Default Overview Report','Default Overview Report','root/import/survey/default-overview-report','3','7','12',NULL,0,1,0,0,0,5835,NULL,0,1,0,1285124162,NULL,0),('PBtmpl0000000000000062',1250243000,'3','pbversion0000000000001','approved','Default Gradebook Report','Default Gradebook Report','root/import/survey/default-gradebook-report','3','7','12',NULL,0,1,0,0,0,4863,NULL,0,1,0,1285124162,NULL,0),('PBtmpl0000000000000061',1250243000,'3','pbversion0000000000001','approved','Default Survey','Default Survey','root/import/survey/default-survey','3','7','12',NULL,0,1,0,0,0,2968,NULL,0,1,0,1285124162,NULL,0),('CxMpE_UPauZA3p8jdrOABw',1250243000,'3','pbversion0000000000001','approved','Default Questions','Default Questions','root/import/survey/default-questions','3','7','12',NULL,0,1,0,0,0,17836,NULL,0,1,0,1285124160,NULL,0),('1oBRscNIcFOI-pETrCOspA',1250243000,'3','pbversion0000000000001','approved','Default Section Edit','Default Section Edit','root/import/survey/default-section-edit','3','7','12',NULL,0,1,0,0,0,14088,NULL,0,1,0,1285124159,NULL,0),('wAc4azJViVTpo-2NYOXWvg',1250243000,'3','pbversion0000000000001','approved','Default Question Edit','Default Question Edit','root/import/survey/default-question-edit','3','7','12',NULL,0,1,0,0,0,12766,NULL,0,1,0,1285124167,NULL,0),('AjhlNO3wZvN5k4i4qioWcg',1250243000,'3','pbversion0000000000001','approved','Default Answer Edit','Default Answer Edit','root/import/survey/default-answer-edit','3','7','12',NULL,0,1,0,0,0,9595,NULL,0,1,0,1285124159,NULL,0),('RSAMkc6WQmfRE3TOr1_3Mw',1250243000,'3','pbversion0000000000001','approved','ExpireIncompleteSurveyResponses','ExpireIncompleteSurveyResponses','root/import/expireincompletesurveyresponses','3','7','12',NULL,0,1,0,0,0,399,NULL,0,1,0,1253052788,NULL,0),('ExpireIncResptmpl00001',1250243000,'3','pbversion0000000000001','approved','ExpireIncompleteSurveyResponses','ExpireIncompleteSurveyResponses','root/import/expireincompletesurveyresponses/expireincompletesurveyresponses','3','7','12',NULL,0,1,0,0,0,810,NULL,0,1,0,1285124160,NULL,0),('7F-BuEHi7t9bPi008H8xZQ',1250243000,'3','pbversion0000000000001','approved','Default Survey Summary','Default Survey Summary','root/import/survey/default-survey-summary','3','7','12',NULL,0,1,0,0,0,2300,NULL,0,1,0,1285124159,NULL,0),('S3zpVitAmhy58CAioH359Q',1250243000,'3','pbversion0000000000001','approved','Default Test Results','Default Test Results','root/import/survey/default-test-results','3','7','12',NULL,0,1,0,0,0,8673,'',0,1,0,1285124164,'',0),('nWNVoMLrMo059mDRmfOp9g',1250243000,'3','pbversion0000000000001','approved','Default Feedback','Default Feedback','root/import/survey/default-feedback','3','7','12',NULL,0,1,0,0,0,1235,NULL,0,1,0,1285124167,NULL,0),('newslettercs0000000001',1252682678,'3','pbversion0000000000001','approved','Newsletter Manager (default)',' Newsletter Manager','newslettercstemplate','3','7','3',NULL,0,0,0,0,0,2824,'\n',0,1,0,1285124167,'',0),('1IzRpX0tgW7iuCfaU2Kk0A',1250243000,'3','pbversion0000000000001','approved','Default Contributions View','Default Contributions View','root/import/account/contributions/default-contributions-view','3','7','12',NULL,0,1,0,0,0,7799,'\n',0,1,0,1285124159,'',0),('0EAJ9EYb9ap2XwfrcXfdLQ',1250243000,'3','pbversion0000000000001','approved','Story Archive Asset List','Story Archive Asset List','root/import/storymanager/keywordlist','3','7','4',NULL,0,0,0,0,0,579,NULL,0,1,0,1285124158,NULL,0),('TKmhv8boP3TD2xwSwUBq0g',1250243000,'3','pbversion0000000000001','approved','Default ThingyRecord View','Default ThingyRecord View','home/thinyrecord-templates/default-thingyrecord-view','3','7','3',NULL,0,1,0,0,0,1789,NULL,0,1,0,1285124164,NULL,0),('75CmQgpcCSkdsL-oawdn3Q',1253555614,'3','pbversion0000000000001','approved','Default Edit Profile Template','Default Edit Profile Template','root/import/account/profile/default-edit-profile-template','3','7','12',NULL,0,1,0,0,0,3294,'\n\n\n\n',0,1,0,1285124159,'',0),('d8jMMMRddSQ7twP4l1ZSIw',1253555614,'3','pbversion0000000000001','approved','Default Survey Take','Default Survey Take','root/import/survey/default-survey-take','3','7','12',NULL,0,1,0,0,0,3994,'\n\n\n\n',0,1,0,1285124165,'',0),('fowHfgOkJtAxdst7rugTog',1252595993,'3','pbversion0000000000001','approved','Story Manager','Story Manager','root/import/storymanager','3','7','12',NULL,0,1,0,0,0,339,'\r\n',0,1,0,1253676393,NULL,0),('3QpYtHrq_jmAk1FNutQM5A',1253636379,'3','pbversion0000000000001','approved','Story Template','Story Template','root/import/storymanager/storytemplate','3','7','4',NULL,0,0,0,0,0,6662,'\n\n\n',0,1,0,1285124159,'',0),('yxD5ka7XHebPLD-LXBwJqw',1253635396,'3','pbversion0000000000001','approved','StoryArchive','StoryArchive','root/import/storymanager/storyarchive','3','7','4',NULL,0,0,0,0,0,3375,'',0,1,0,1285124167,'',0),('TbDcVLbbznPi0I0rxQf2CQ',1253636379,'3','pbversion0000000000001','approved','Story Template Topic','Story Template Topic','root/import/storymanager/storytemplatetopic','3','7','4',NULL,0,0,0,0,0,7134,'\n\n\n\n\n',0,1,0,1285124164,'',0),('iCM9pRY5yYyjufROgaCDlg',1253305659,'3','pbversion0000000000001','approved','storyManager.css','storyManager.css','storymanager.css','3','7','12',NULL,0,1,0,0,0,4360,NULL,0,1,0,1285124169,NULL,0),('VyCINX2KixKYr2pzQGX9Mg',1254881103,'3','pbversion0000000000001','approved','layout.css','layout.css','layout.css','3','7','12',NULL,0,1,0,0,0,1439,'\r\n',0,1,0,1285124168,NULL,0),('TvOZs8U1kRXLtwtmyW75pg',1256092368,'3','pbversion0000000000001','approved','Article','Article','root/import/article','3','7','12',NULL,0,0,0,0,0,322,'\r\n',0,1,0,1256092370,NULL,0),('zb_OPKNqcTuIjdvvbEkRjw',1256092368,'3','pbversion0000000000001','approved','article.css','article.css','article.css','3','7','12',NULL,0,1,0,0,0,723,'\r\n',0,1,0,1285124169,NULL,0),('PBrichedit000000000001',1256092369,'3','pbversion0000000000001','approved','Content Manager\'s Rich Edit','Content Manager\'s Rich Edit','content_managers_rich_edit','3','7','12',NULL,0,0,0,0,0,572,'\r\n',0,1,0,1256092370,NULL,0),('FJbUTvZ2nUTn65LpW6gjsA',1256092369,'3','pbversion0000000000001','approved','Profile Account Layout','Profile Account Layout','root/import/account/profile/profile-account-layout','3','7','12',NULL,0,1,0,0,0,4224,'',0,1,0,1285124160,'',0),('pbrobot000000000000001',1256092369,'3','pbversion0000000000001','approved','robots.txt','robots.txt','robots.txt','3','7','12',NULL,0,0,0,0,0,562,NULL,0,1,0,1285124169,NULL,0),('4qh0kIsFUdd4Ox-Iu1JZgg',1257311886,'3','pbversion0000000000001','approved','EMS','EMS','root/import/ems','3','7','12',NULL,0,1,0,0,0,310,'\r\n',0,1,0,1257311889,NULL,0),('OOyMH33plAy6oCj_QWrxtg',1257311886,'3','pbversion0000000000001','approved','Lookup Registrant (Default)','Lookup Registrant (Default)','root/import/ems/lookup-registrant-default','3','7','12',NULL,0,1,0,0,0,7007,'\n\n\n\n\n\n\n\n\n\n\n\n',0,1,0,1285124161,'',0),('PsFn7dJt4wMwBa8hiE3hOA',1257311886,'3','pbversion0000000000001','approved','Print Badge (Default)','Print Badge (Default)','root/import/ems/print-badge-default','3','7','12',NULL,0,1,0,0,0,2323,NULL,0,1,0,1285124164,NULL,0),('yBwydfooiLvhEFawJb0VTQ',1257311887,'3','pbversion0000000000001','approved','Print Ticket (Default)','Print Ticket (Default)','root/import/ems/print-ticket-default','3','7','12',NULL,0,1,0,0,0,2386,NULL,0,1,0,1285124167,NULL,0),('S2_LsvVa95OSqc66ITAoig',1257311887,'3','pbversion0000000000001','approved','EMS Schedule Listing (default)','EMS Schedule Listing (default)','root/import/ems/ems-schedule-listing-default2','3','7','12',NULL,0,1,0,0,0,14216,'\n\n\n\n\n\n\n\n\n\n\n\n \n',0,1,0,1285124164,'',0),('hreA_bgxiTX-EzWCSZCZJw',1257311887,'3','pbversion0000000000001','approved','Print Remaining Tickets Template (default)','Print Remaining Tickets Template (default)','root/import/ems/default-print-remaining-tickets-template','3','7','12',NULL,0,1,0,0,0,2345,'\r\n',0,1,0,1285124166,NULL,0),('-K8Hj45mbelljN9-0CXZxg',1257311887,'3','pbversion0000000000001','approved','DataForm','DataForm','root/import/dataform','3','7','12',NULL,0,0,0,0,0,336,NULL,0,1,0,1257311888,NULL,0),('PBtmpl0000000000000020',1257311887,'3','pbversion0000000000001','approved','Mail Form','Mail Form','mail_form','3','7','12',NULL,0,1,0,0,0,4606,'\n',0,1,0,1285124161,'',0),('PBtmpl0000000000000104',1257311888,'3','pbversion0000000000001','approved','Default Acknowledgement','Default Acknowledgement','default_acknowledgement','3','7','12',NULL,0,1,0,0,0,1750,'',0,1,0,1285124163,'',0),('_iHetEvMQUOoxS-T2CM0sQ',1273172789,'1','pbversion0000000000001','approved','Getting Started','Getting Started','getting_started','3','7','3',NULL,0,0,0,0,0,392,NULL,0,1,0,1301974027,NULL,0),('bX5rYxb6tZ9docY6sUhBlw',1278013772,'1','pbversion0000000000001','approved','Getting Started','Getting Started','getting_started/getting-started','3','7','4',NULL,0,1,0,0,0,1253,NULL,0,1,0,1301974027,NULL,0),('8Bb8gu-me2mhL3ljFyiWLg',1271359194,'1','pbversion0000000000001','approved','Talk to the Experts','Your Next Step','your_next_step','3','7','3',NULL,0,0,0,0,0,869,NULL,0,1,0,1301974027,NULL,0),('ix1p0AbwKAz8QWB-T-HHfg',1271359087,'1','pbversion0000000000001','approved','Get Support','Get Support','yns/support','3','7','4',NULL,0,1,0,0,0,739,NULL,0,1,0,1301974027,NULL,0),('iCYOjohB9SKvAPr6bXElKA',1271445525,'1','pbversion0000000000001','approved','Get Hosting','Get Hosting','yns/hosting','3','7','4',NULL,0,1,0,0,0,749,NULL,0,1,0,1301974027,NULL,0),('PBtmpl0000000000000116',1257311888,'3','pbversion0000000000001','approved','Tab Form','Tab Form','tab_form','3','7','12',NULL,0,1,0,0,0,5745,'\n',0,1,0,1285124163,'',0),('PBtmpl0000000000000141',1257311888,'3','pbversion0000000000001','approved','Default DataForm','Default DataForm','pbtmpl0000000000000141','3','7','12',NULL,0,1,0,0,0,6035,'\n',0,1,0,1285124164,'',0),('_aE16Rr1-bXBf8SIaLZjCg',1257311888,'3','pbversion0000000000001','approved','picklanguage','picklanguage','media/picklanguage','3','7','12',NULL,0,1,0,0,0,617,'\r\n',0,1,0,1285124165,NULL,0),('P_4uog81vSUK4KxuW_4GUA',1258524916,'3','pbversion0000000000001','approved','css','css','css','3','7','12',NULL,0,1,0,0,0,298,'\r\n',0,1,0,1258524918,NULL,0),('PBtmpl0000000000000060',1258524916,'3','pbversion0000000000001','approved','Fail Safe','Fail Safe','fail_safe','3','7','12',NULL,0,1,0,0,0,2413,NULL,0,1,0,1285124162,NULL,0),('PBtmpl0000000000000137',1258524916,'3','pbversion0000000000001','approved','Admin Console Style','Admin Console','admin_console','3','7','12',NULL,0,1,0,0,0,1283,NULL,0,1,0,1285124163,NULL,0),('PBtmpl0000000000000132',1258524916,'3','pbversion0000000000001','approved','Empty','Empty','empty','3','7','12',NULL,0,1,0,0,0,296,NULL,0,1,0,1285124163,NULL,0),('PBtmplBlankStyle000001',1258524916,'3','pbversion0000000000001','approved','WebGUI 6 Blank Style','WebGUI 6 Blank Style','pbtmplblankstyle000001','3','7','12',NULL,0,1,0,0,0,1970,NULL,0,1,0,1285124164,NULL,0),('uCn31PzislTZlgt_79j7cQ',1258524916,'3','pbversion0000000000001','approved','style.css','style.css','css/style.css','3','7','12',NULL,0,1,0,0,0,1019,'\r\n',0,1,0,1285124169,NULL,0),('H_-8zjtWsO1FUpQqNtkxNQ',1258524916,'3','pbversion0000000000001','approved','wg-base.css','wg-base.css','css/wg-base.css','3','7','12',NULL,0,1,0,0,0,1138,'\r\n',0,1,0,1285124168,NULL,0),('PBtmpl0000000000000117',1259133274,'3','pbversion0000000000001','approved','DropMenu','DropMenu','dropmenu','3','7','12',NULL,0,1,0,0,0,2660,'',0,1,0,1285124163,'',0),('PBtmpl0000000000000136',1259133274,'3','pbversion0000000000001','approved','Synopsis','Synopsis','synopsis2','3','7','12',NULL,0,1,0,0,0,1734,NULL,0,1,0,1285124163,NULL,0),('PBtmpl0000000000000093',1259133274,'3','pbversion0000000000001','approved','crumbTrail','crumbTrail','crumbtrail2','3','7','12',NULL,0,1,0,0,0,1494,NULL,0,1,0,1285124163,NULL,0),('GNvjCFQWjY2AF2uf0aCM8Q',1259133274,'3','pbversion0000000000001','approved','Syndicated Articles','Syndicated Articles','syndicated_articles','3','7','12',NULL,0,1,0,0,0,2472,NULL,0,1,0,1285124160,NULL,0),('-PkdI8l1idu-8gDX3iOdcw',1259133274,'3','pbversion0000000000001','approved','One Over Two','One Over Two','one_over_two','3','7','12',NULL,0,1,0,0,0,6326,'',0,1,0,1285124158,'',0),('PBtmpl0000000000000103',1259133275,'3','pbversion0000000000001','approved','Article With Image','Article With Image','article-with-image','3','7','12',NULL,0,1,0,0,0,2130,'',0,1,0,1285124163,'',0),('PBtmpl0000000000000024',1259133275,'3','pbversion0000000000001','approved','File','File','file','3','7','12',NULL,0,1,0,0,0,940,NULL,0,1,0,1285124161,NULL,0),('XdlKhCDvArs40uqBhvzR3w',1259133275,'3','pbversion0000000000001','approved','Article With Pagination','Article With Pagination','article-with-pagination','3','7','12',NULL,0,1,0,0,0,3274,'\n',0,1,0,1285124165,NULL,0),('PBnav00000000indentnav',1259133275,'3','pbversion0000000000001','approved','Indent Nav','Indent Nav','indent_nav','3','7','12',NULL,0,0,0,0,0,1978,'',0,1,0,1285124161,'',0),('PBtmpl0000000000000124',1259133275,'3','pbversion0000000000001','approved','Tabs','Tabs','tabs','3','7','12',NULL,0,1,0,0,0,1766,'',0,1,0,1285124163,'',0),('PBtmpl0000000000000131',1259133275,'3','pbversion0000000000001','approved','Right Column','Right Column','right_column','3','7','12',NULL,0,1,0,0,0,4905,'',0,1,0,1285124163,'',0),('PBtmpl0000000000000134',1259133275,'3','pbversion0000000000001','approved','Hierarchical Top Nav','Hierarchical Top Nav','import/hierarchical-top-nav','3','7','12',NULL,0,1,0,0,0,4021,'\n\n\n\n\n\n',0,1,0,1285124163,'',0),('PBtmpl0000000000000078',1259133275,'3','pbversion0000000000001','approved','File Folder','File Folder','file_folder','3','7','12',NULL,0,1,0,0,0,3834,NULL,0,1,0,1285124162,NULL,0),('PBtmpl0000000000000055',1259133275,'3','pbversion0000000000001','approved','Default Poll','Default Poll','default_poll','3','7','12',NULL,0,1,0,0,0,3032,'',0,1,0,1285124162,'',0),('PBtmpl0000000000000065',1259133275,'3','pbversion0000000000001','approved','Default Syndicated Content','Default Syndicated Content','default_syndicated_content','3','7','12',NULL,0,1,0,0,0,2387,NULL,0,1,0,1285124162,NULL,0),('PBtmpl0000000000000054',1259133276,'3','pbversion0000000000001','approved','Default Page','Default Page','default_page','3','7','12',NULL,0,1,0,0,0,3083,'',0,1,0,1285124162,'',0),('PBtmpl0000000000000108',1259133276,'3','pbversion0000000000001','approved','horizontalMenu','horizontalMenu','horizontalmenu','3','7','12',NULL,0,1,0,0,0,1982,'',0,1,0,1285124163,'',0),('PBtmpl0000000000000115',1259133276,'3','pbversion0000000000001','approved','Linked Image with Caption','Linked Image with Caption','linked_image_with_caption','3','7','12',NULL,0,1,0,0,0,2393,'',0,1,0,1285124163,'',0),('PBtmpl0000000000000109',1259133276,'3','pbversion0000000000001','approved','One Over Three','One Over Three','one_over_three','3','7','12',NULL,0,1,0,0,0,7968,'',0,1,0,1285124163,'',0),('VCFhB9WOsDsH2Apj3c6DpQ',1259133276,'3','pbversion0000000000001','approved','Three Columns','Three Columns','three-columns','3','7','12',NULL,0,1,0,0,0,5947,'',0,1,0,1285124165,'',0),('PBtmpl0000000000000002',1259133276,'3','pbversion0000000000001','approved','Default Article','Default Article','default_article','3','7','12',NULL,0,1,0,0,0,2241,NULL,0,1,0,1285124161,NULL,0),('PBtmpl0000000000000123',1259133276,'3','pbversion0000000000001','approved','Item','Item','item','3','7','12',NULL,0,1,0,0,0,2232,NULL,0,1,0,1285124163,NULL,0),('PBtmpl0000000000000135',1259133276,'3','pbversion0000000000001','approved','Side By Side','Side By Side','side_by_side','3','7','12',NULL,0,1,0,0,0,4489,'\n',0,1,0,1285124163,'',0),('PBnav00000000000bullet',1259133276,'3','pbversion0000000000001','approved','Bulleted List','Bulleted List','bulleted_list','3','7','12',NULL,0,0,0,0,0,2744,'\n\n',0,1,0,1285124161,'',0),('MK4fCNoyrx5SE8eyDfOpxg',1259133276,'3','pbversion0000000000001','approved','Flash File','Flash File','flash-file','3','7','12',NULL,0,1,0,0,0,1861,NULL,0,1,0,1285124161,NULL,0),('PBtmpl0000000000000130',1259133276,'3','pbversion0000000000001','approved','Tree Navigation','Tree Navigation','root/import/navigation/tree-navigation','3','7','12',NULL,0,1,0,0,0,3529,'\n\n\n',0,1,0,1285124163,'',0),('f2EktltCvwQpl_3-B1yR7g',1288748251,'3','pbversion0000000000001','approved','Asset Templates','Asset Templates','root/import/asset_templates','3','7','12',NULL,0,1,0,0,0,344,NULL,0,1,0,1288748251,NULL,0),('BMybD3cEnmXVk2wQ_qEsRQ',1263962529,'3','pbversion0000000000001','approved','Badge Builder (Default)','Badge Builder (Default)','root/import/ems/badge-builder-default','3','7','12',NULL,0,1,0,0,0,36631,'\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',0,1,0,1285124160,'',0),('mRtqRuVikSe82BQsYBlD0A',1263962529,'3','pbversion0000000000001','approved','Bare Image','Bare Image','bare_image','3','7','12',NULL,0,1,0,0,0,558,NULL,0,1,0,1285124166,NULL,0),('aUDsJ-vB9RgP-AYvPOy8FQ',1263962529,'3','pbversion0000000000001','approved','Shop Account Layout','Shop Account Layout','root/import/account/shop/shop-account-layout','3','7','12',NULL,0,1,0,0,0,3337,'\n',0,1,0,1285124165,'',0),('CalendarEventEdit00001',1269401468,'3','pbversion0000000000001','approved','Default Calendar Event Edit','Default Calendar Event Edit','root/import/calendar-templates/default-calendar-event-edit','3','7','12',NULL,0,0,0,0,0,18084,'\r\n\r\n\r\n\r\n\r\n\r\n\r\n \r\n\r\n',0,1,0,1285124160,'',0),('GRUNFctldUgop-qRLuo_DA',1269401469,'3','pbversion0000000000001','approved','Default Survey Edit','Default Survey Edit','root/import/survey/default-survey-edit','3','7','12',NULL,0,1,0,0,0,7101,NULL,0,1,0,1285124160,NULL,0),('t87D1138NhPHhA23-hozBA',1273032716,'3','pbversion0000000000001','approved','CrystalX','CrystalX','crystalx','3','7','3',NULL,0,1,0,0,0,310,NULL,0,1,0,1273032724,NULL,0),('QtBumey5ffc-xffRp1-7Aw',1273032716,'3','pbversion0000000000001','approved','img','img','crystalx/img','3','7','3',NULL,0,1,0,0,0,310,NULL,0,1,0,1273032724,NULL,0),('-0sK2rX1cwQt1ipUSqsiQQ',1273032716,'3','pbversion0000000000001','approved','bg.gif','bg.gif','crystalx/img/bg.gif','3','7','3',NULL,0,1,0,0,0,1440,NULL,0,1,0,1273032724,NULL,0),('hS_eOaVz9Qb5ixndK9EXAw',1273032716,'3','pbversion0000000000001','approved','header.jpg','header.jpg','crystalx/img/header.jpg','3','7','3',NULL,0,1,0,0,0,8038,NULL,0,1,0,1273032724,NULL,0),('k2p-Be8C98pf2cRq7E-JHg',1273032716,'3','pbversion0000000000001','approved','tab_link.gif','tab_link.gif','crystalx/img/tab_link.gif','3','7','3',NULL,0,1,0,0,0,507,NULL,0,1,0,1273032724,NULL,0),('aYG4fjbMPbC4LCuuMp4gGA',1273032716,'3','pbversion0000000000001','approved','tab_hover.gif','tab_hover.gif','crystalx/img/tab_hover.gif','3','7','3',NULL,0,1,0,0,0,538,NULL,0,1,0,1273032724,NULL,0),('F122Ey0NtVAw6Lfv1M6G_Q',1273032716,'3','pbversion0000000000001','approved','ico_archive.gif','ico_archive.gif','crystalx/img/ico_archive.gif','3','7','3',NULL,0,1,0,0,0,427,NULL,0,1,0,1273032724,NULL,0),('qmXHKrQ6EDLSOGkrEKRUDA',1273032716,'3','pbversion0000000000001','approved','bg_page_in.jpg','bg_page_in.jpg','crystalx/img/bg_page_in.jpg','3','7','3',NULL,0,1,0,0,0,3242,NULL,0,1,0,1273032724,NULL,0),('4qZgXjPPO4fwV879yu5XUg',1273032716,'3','pbversion0000000000001','approved','bg_page.JPG','bg_page.JPG','crystalx/img/bg_page.jpg','3','7','3',NULL,0,1,0,0,0,1229,NULL,0,1,0,1273032724,NULL,0),('mb-xeAugm5GJdvu-Wh0MtQ',1273032717,'3','pbversion0000000000001','approved','search_submit.gif','search_submit.gif','crystalx/img/search_submit.gif','3','7','3',NULL,0,1,0,0,0,2108,NULL,0,1,0,1273032724,NULL,0),('84Y9CwgzP6eNU7wZnk019Q',1273032717,'3','pbversion0000000000001','approved','ico_date.gif','ico_date.gif','crystalx/img/ico_date.gif','3','7','3',NULL,0,1,0,0,0,416,NULL,0,1,0,1273032724,NULL,0),('ikXTtJKZfHVxqw-47E4AQA',1273032717,'3','pbversion0000000000001','approved','ico_user.gif','ico_user.gif','crystalx/img/ico_user.gif','3','7','3',NULL,0,1,0,0,0,407,NULL,0,1,0,1273032724,NULL,0),('DhRWPTgzhvju_-TbMN3CwA',1273032717,'3','pbversion0000000000001','approved','ico_comments.gif','ico_comments.gif','crystalx/img/ico_comments.gif','3','7','3',NULL,0,1,0,0,0,427,NULL,0,1,0,1273032724,NULL,0),('6njI-pZz2bwsjWh-Q1_11g',1273032717,'3','pbversion0000000000001','approved','ico_list.gif','ico_list.gif','crystalx/img/ico_list2.gif','3','7','3',NULL,0,1,0,0,0,412,NULL,0,1,0,1273032724,NULL,0),('_Hz1Gnd3yEnJzVS7l7nJMQ',1273032717,'3','pbversion0000000000001','approved','content_all_bg.PNG','content_all_bg.PNG','crystalx/img/content_all_bg.png','3','7','3',NULL,0,1,0,0,0,8683,NULL,0,1,0,1273032724,NULL,0),('VOOrXK5dFnkGih7aTkuDWA',1273032717,'3','pbversion0000000000001','approved','search.PNG','search.PNG','crystalx/img/search.png','3','7','3',NULL,0,1,0,0,0,2190,NULL,0,1,0,1273032724,NULL,0),('ruf-QejOkUHDRtfgakHlbA',1273032717,'3','pbversion0000000000001','approved','col_title_bg_long.GIF','col_title_bg_long.GIF','crystalx/img/col_title_bg_long.gif','3','7','3',NULL,0,1,0,0,0,1265,NULL,0,1,0,1273032724,NULL,0),('FSHy5KjQjkt599PHS41seA',1273032717,'3','pbversion0000000000001','approved','footer.jpg','footer.jpg','crystalx/img/footer.jpg','3','7','3',NULL,0,1,0,0,0,4571,NULL,0,1,0,1273032724,NULL,0),('nuYYXAz4KNNxgfumfnpo_g',1273032718,'3','pbversion0000000000001','approved','ico_top.gif','ico_top.gif','crystalx/img/ico_top.gif','3','7','3',NULL,0,1,0,0,0,834,NULL,0,1,0,1273032724,NULL,0),('Mr7ljjoy6n4fZojpQWajKQ',1273032718,'3','pbversion0000000000001','approved','ico_links.gif','ico_links.gif','crystalx/img/ico_links.gif','3','7','3',NULL,0,1,0,0,0,419,NULL,0,1,0,1273032724,NULL,0),('ApkqpDOrJDxK3QrWBGSRIg',1273032718,'3','pbversion0000000000001','approved','ico_archive2.gif','ico_archive2.gif','crystalx/img/ico_archive2.gif','3','7','3',NULL,0,1,0,0,0,432,NULL,0,1,0,1273032724,NULL,0),('AzzTY0Lay1f_YGeQJFnQCA',1273032718,'3','pbversion0000000000001','approved','ico_list.gif','ico_list.gif','crystalx/img/ico_list.gif','3','7','3',NULL,0,1,0,0,0,411,NULL,0,1,0,1273032724,NULL,0),('OiJNwP1gAlcva8_yOtL4gA',1273032718,'3','pbversion0000000000001','approved','CrystalX_style','CrystalX_style','crystalx_style','3','7','3','by Ning from Pluton -- http://pluton.nl\n\nCrystalX gives your site a crystal-ish look and a strictly formal style. Feel free to download and apply it to your own site.\n\nOriginally designed by \"Nuvio Webdesign\" and collected by Open Source Web Design, converted to WebGUI theme by Ning.',0,1,0,0,0,3470,NULL,0,1,0,1285124161,NULL,0),('JOuCU4x5BJfVHfkfMkVQdQ',1273032718,'3','pbversion0000000000001','approved','crystalx.css','crystalx.css','crystalx/crystalx.css','3','7','3',NULL,0,1,0,0,0,14430,NULL,0,1,0,1285124168,NULL,0),('gaIOm5cr2TkT9Fk6QmZWug',1273032718,'3','pbversion0000000000001','approved','crystalX_navi','crystalX_navi','crystalx/crystalx_navi','3','7','3',NULL,0,1,0,0,0,7486,'\n\n\n\n',0,1,0,1285124166,'',0),('w0QifHLhsrzeOpFKl-DX-Q',1273032718,'3','pbversion0000000000001','approved','crystalx_navi.css','crystalx_navi.css','crystalx/crystalx_navi.css','3','7','3',NULL,0,1,0,0,0,10481,NULL,0,1,0,1285124169,NULL,0),('x_hiUi1XZloBvV47Obnu8Q',1273032718,'3','pbversion0000000000001','approved','crystalX_NavigationTrail','crystalX_NavigationTrail','crystalx/crystalx_navigationtrail','3','7','12',NULL,0,1,0,0,0,422,NULL,0,1,0,1273032724,NULL,0),('hpCk0B3vQzgc-QJhSol41w',1273032718,'3','pbversion0000000000001','approved','crystalX_navitrail','crystalX_navitrail','crystalx/crystalx_navitrail','3','7','12',NULL,0,1,0,0,0,1104,NULL,0,1,0,1285124166,NULL,0),('UUwEL6hLEPdrnkZnKRzFYQ',1273032718,'3','pbversion0000000000001','approved','Site Search','Site Search','crystalx/site-search','3','7','3',NULL,0,1,0,0,0,892,NULL,0,1,0,1273032724,NULL,0),('OfKbvK7CrfMnfc8WDoF4Rg',1273032718,'3','pbversion0000000000001','approved','crystalx_search','crystalx_search','crystalx/crystalx_search','3','7','3',NULL,0,1,0,0,0,2756,NULL,0,1,0,1315877143,NULL,0),('stevestyle000000000002',1273032718,'3','pbversion0000000000001','approved','Style 02','Style 02','style_02','3','7','12','by Steve from Plain Black http://plainblack.com\r\n\r\nThe second of the WebGUI 7 styles',0,0,0,0,0,5770,NULL,0,1,0,1285124167,NULL,0),('Q4uX_C557arTp6D_jwB1jQ',1273032720,'3','pbversion0000000000001','approved','Wiki','Wiki','root/import/wiki','3','12','12',NULL,0,0,0,0,0,312,NULL,0,1,0,1273032723,NULL,0),('WikiRCTmpl000000000001',1273032720,'3','pbversion0000000000001','approved','Default Recent Changes','Default Recent Changes','default-wiki-recent-changes','3','7','12',NULL,0,0,0,0,0,1657,NULL,0,1,0,1285124165,NULL,0),('WikiFrontTmpl000000001',1273032720,'3','pbversion0000000000001','approved','Default Wiki Front Page','Default Wiki Front Page','default-wiki-front-page','3','7','12',NULL,0,0,0,0,0,4434,NULL,0,1,0,1285124165,NULL,0),('WikiSearchTmpl00000001',1273032720,'3','pbversion0000000000001','approved','Default Wiki Search','Default Wiki Search','default-wiki-search','3','7','12',NULL,0,0,0,0,0,2450,'\n\n',0,1,0,1285124165,NULL,0),('WikiPHTmpl000000000001',1273032720,'3','pbversion0000000000001','approved','Default Page History','Default Page History','default-wiki-page-history','3','7','12',NULL,0,0,0,0,0,657,NULL,0,1,0,1285124165,NULL,0),('WikiPageTmpl0000000001',1273032720,'3','pbversion0000000000001','approved','Default Wiki Page','Default Wiki Page','default-wiki-page','3','7','12',NULL,0,0,0,0,0,6422,'\n\n\n\n\n\n\n\n',0,1,0,1285124165,'',0),('WikiPageEditTmpl000001',1273032720,'3','pbversion0000000000001','approved','Default Wiki Page Edit','Default Wiki Page Edit','default-wiki-page-edit','3','7','12',NULL,0,0,0,0,0,2572,NULL,0,1,0,1285124165,NULL,0),('WikiMPTmpl000000000001',1273032720,'3','pbversion0000000000001','approved','Default Most Popular','Default Most Popular','default-wiki-most-popular','3','7','12',NULL,0,0,0,0,0,1033,NULL,0,1,0,1285124165,NULL,0),('stevestyle000000000003',1273032720,'3','pbversion0000000000001','approved','Style 03','Style 03','style_03','3','7','12','by Steve from Plain Black http://plainblack.com\r\n\r\nThe last of the WebGUI 7 style templates.',0,0,0,0,0,3907,NULL,0,1,0,1285124167,NULL,0),('stevestyle000000000001',1273032722,'3','pbversion0000000000001','approved','Style 01','Style 01','style_01','3','7','12','by Steve from Plain Black http://plainblack.com\r\n\r\nThe first of the WebGUI 7 styles',0,0,0,0,0,3790,NULL,0,1,0,1285124167,NULL,0),('c8xrwVuu5QE0XtF9DiVzLw',1273032723,'3','pbversion0000000000001','approved','Default Inbox View Template','Default Inbox View Template','root/import/account/inbox/default-inbox-view-template','3','7','12',NULL,0,1,0,0,0,11070,'\n\n',0,1,0,1285124165,'',0),('WikiKeyword00000000001',1274238756,'3','pbversion0000000000001','approved',' Wiki Pages By Keyword (default)',' Wiki Pages By Keyword','wiki-master-by-keyword-template.tmpl','3','7','3',NULL,0,0,0,0,0,2818,NULL,0,1,0,1285124165,NULL,0),('ThingyTmpl000000000004',1277868920,'3','pbversion0000000000001','approved','Default Thingy Search Thing','Default Thingy Search Thing','templates/thingy-default-search-thing','3','7','12',NULL,0,0,0,0,0,9564,'\n\n\n\n\n',0,1,0,1285124164,'',0),('GNOAsX98vCsl0JRwfwL-gg',1277868921,'3','pbversion0000000000001','approved','Collaboration','Collaboration','root/import/collaboration','3','7','12',NULL,0,0,0,0,0,338,NULL,0,1,0,1277868927,NULL,0),('PBtmpl0000000000000066',1277868921,'3','pbversion0000000000001','approved','Default USS','Default USS','default_uss','3','7','12',NULL,0,1,0,0,0,4993,'\n\n\n',0,1,0,1285124162,'',0),('PBtmpl0000000000000080',1277868921,'3','pbversion0000000000001','approved','FAQ','FAQ','faqtemplate','3','7','12',NULL,0,1,0,0,0,3968,NULL,0,1,0,1285124162,NULL,0),('PBtmpl0000000000000097',1277868921,'3','pbversion0000000000001','approved','Traditional with Thumbnails','Traditional with Thumbnails','traditional_with_thumbnails','3','7','12',NULL,0,1,0,0,0,6674,'\n',0,1,0,1285124163,'',0),('PBtmpl0000000000000112',1277868921,'3','pbversion0000000000001','approved','Weblog','Weblog','weblog','3','7','12',NULL,0,1,0,0,0,5202,'',0,1,0,1285124163,'',0),('PBtmpl0000000000000121',1277868921,'3','pbversion0000000000001','approved','Photo Gallery','Photo Gallery','photo_gallery','3','7','12',NULL,0,1,0,0,0,3185,'\n\n',0,1,0,1285124163,'',0),('PBtmpl0000000000000067',1277868921,'3','pbversion0000000000001','approved','Default Submission','Default Submission','default_submission','3','7','12',NULL,0,1,0,0,0,22672,'\n',0,1,0,1285124162,'',0),('PBtmpl0000000000000026',1277868921,'3','pbversion0000000000001','approved','Default Forum','Default Forum','default_forum','3','7','12',NULL,0,1,0,0,0,7927,'\n\n\n',0,1,0,1285124161,'',0),('PBtmpl0000000000000128',1277868921,'3','pbversion0000000000001','approved','Classifieds','Classifieds','classifieds','3','7','12',NULL,0,1,0,0,0,3272,'\n\n',0,1,0,1285124163,'',0),('PBtmpl0000000000000079',1277868921,'3','pbversion0000000000001','approved','Topics','Topics','topics','3','7','12',NULL,0,1,0,0,0,4948,'\n',0,1,0,1285124162,'',0),('PBtmpl0000000000000083',1277868921,'3','pbversion0000000000001','approved','Link List','Link List','link_list','3','7','12',NULL,0,1,0,0,0,3716,NULL,0,1,0,1285124163,NULL,0),('PBtmpl0000000000000082',1277868921,'3','pbversion0000000000001','approved','Unordered List','Unordered List','unordered_list','3','7','12',NULL,0,1,0,0,0,4633,'\n',0,1,0,1285124162,'',0),('PBtmpl0000000000000133',1277868921,'3','pbversion0000000000001','approved','Guest Book','Guest Book','guest_book','3','7','12',NULL,0,1,0,0,0,3270,NULL,0,1,0,1285124163,NULL,0),('PBtmpl0000000000000029',1277868921,'3','pbversion0000000000001','approved','Default Post Form','Default Post Form','default_post_form','3','7','12',NULL,0,1,0,0,0,4119,'\n',0,1,0,1285124162,'',0),('PBtmpl0000000000000032',1277868921,'3','pbversion0000000000001','approved','Default Thread','Default Thread','default_thread','3','7','12',NULL,0,1,0,0,0,11649,'\n',0,1,0,1285124162,'',0),('PBtmpl0000000000000031',1277868921,'3','pbversion0000000000001','approved','Default Forum Search','Default Forum Search','default_forum_search','3','7','12',NULL,0,1,0,0,0,3848,'',0,1,0,1285124162,'',0),('PBtmpl0000000000000068',1277868921,'3','pbversion0000000000001','approved','Default Submission Form','Default Submission Form','default_submission_form','3','7','12',NULL,0,1,0,0,0,5051,'\n',0,1,0,1285124162,'',0),('PBtmpl0000000000000099',1277868921,'3','pbversion0000000000001','approved','FAQ Submission Form','FAQ Submission Form','faq_submission_form','3','7','12',NULL,0,1,0,0,0,4330,'\n',0,1,0,1285124163,'',0),('PBtmpl0000000000000114',1277868922,'3','pbversion0000000000001','approved','Link List Submission Form','Link List Submission Form','link_list_submission_form','3','7','12',NULL,0,1,0,0,0,5502,'\n',0,1,0,1285124163,'',0),('PBtmpl0000000000000098',1277868922,'3','pbversion0000000000001','approved','Job','Job','job','3','7','12',NULL,0,1,0,0,0,20225,'',0,1,0,1285124163,'',0),('PBtmpl0000000000000122',1277868922,'3','pbversion0000000000001','approved','Job Submission Form','Job Submission Form','job_submission_form','3','7','12',NULL,0,1,0,0,0,6134,'\n',0,1,0,1285124163,'',0),('PBtmpl0000000000000081',1277868922,'3','pbversion0000000000001','approved','Q and A','Q and A','q_and_a','3','7','12',NULL,0,1,0,0,0,4546,'\n',0,1,0,1285124162,'',0),('PBtmpl0000000000000101',1277868922,'3','pbversion0000000000001','approved','Ordered List','Ordered List','ordered_list','3','7','12',NULL,0,1,0,0,0,3771,NULL,0,1,0,1285124163,NULL,0),('PBtmpl0000000000000113',1277868922,'3','pbversion0000000000001','approved','Link','Link','link','3','7','12',NULL,0,1,0,0,0,19099,'',0,1,0,1285124163,'',0),('PBtmpl0000000000000208',1277868922,'3','pbversion0000000000001','approved','Request Tracker','Request Tracker','request-tracker-template','3','7','12',NULL,0,0,0,0,0,6800,'\n\n\n\n\n',0,1,0,1285124164,'',0),('PBtmpl0000000000000209',1277868922,'3','pbversion0000000000001','approved','Request Tracker Thread','Request Tracker Thread','request-tracker-post-template','3','7','12',NULL,0,0,0,0,0,22451,'\n',0,1,0,1285124164,'',0),('PBtmpl0000000000000210',1277868922,'3','pbversion0000000000001','approved','Request Tracker Post Form','Request Tracker Post Form','request-tracker-template2','3','7','12',NULL,0,0,0,0,0,5928,'\n\n\n',0,1,0,1285124164,'',0),('default_post_received1',1277868922,'3','pbversion0000000000001','approved','Default Post Received','Default Post Received','default_post_received','3','7','4',NULL,0,0,0,0,0,541,NULL,0,1,0,1285124166,NULL,0),('default_CS_unsubscribe',1277868922,'3','pbversion0000000000001','approved','Default Collaboration System Unsubscribe','Default Collaboration System Unsubscribe','collaboration_unsubscribe','3','7','4',NULL,0,0,0,0,0,1092,NULL,0,1,0,1285124166,NULL,0),('mfHGkp6t9gdclmzN33OEnw',1277868927,'3','pbversion0000000000001','approved','Default Twitter Choose Username','Default Twitter Choose Username','root/import/auth/twitter/chooseusername/default-twitter-choose-username','3','7','12',NULL,0,1,0,0,0,1074,NULL,0,1,0,1285124167,NULL,0),('CalendarMonth000000001',1279073449,'3','pbversion0000000000001','approved','Default Calendar Month','Default Calendar Month','root/import/calendar-templates/default-calendar-month','3','7','12',NULL,0,0,0,0,0,16187,'\n\n\n\n\n',0,1,0,1285124160,'',0),('8tqyQx-LwYUHIWOlKPjJrA',1279073449,'3','pbversion0000000000001','approved','EMS Event Submission Template','EMS Event Submission Template','root/import/ems/ems-event-submission','3','7','12',NULL,0,1,0,0,0,5296,'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n',0,1,0,1285124159,'',0),('DoVNijm6lMDE0cYrtvEbDQ',1279073449,'3','pbversion0000000000001','approved','EMS Event Submission Main Template','EMS Event Submission Main Template','root/import/ems/ems-event-submission-main','3','7','12',NULL,0,1,0,0,0,8281,'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n',0,1,0,1285124160,'',0),('6uQEULvXFgCYlRWnYzZsuA',1279073450,'3','pbversion0000000000001','approved','Default Inbox Send Message Template','Default Inbox Send Message Template','root/import/account/inbox/default-inbox-send-message-template','3','7','12',NULL,0,1,0,0,0,9065,'\n\n\n\n\n',0,1,0,1285124159,'',0),('ktSvKU8riGimhcsxXwqvPQ',1279073450,'3','pbversion0000000000001','approved','EMS Event Submission Queue','EMS Event Submission Queue','root/import/ems/ems-event-submission-queue','3','7','12',NULL,0,1,0,0,0,7457,'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n',0,1,0,1285124166,'',0),('4Yfz9hqBqM8OYMGuQK8oLw',1271352537,'1','pbversion0000000000001','approved','Get Features','Get Features','yns/features','3','7','4',NULL,0,1,0,0,0,772,NULL,0,1,0,1301974027,NULL,0),('Wl8WZ43g2rK5AYr9o4zY7w',1271445539,'1','pbversion0000000000001','approved','Get Style','Get Style','yns/style','3','7','4',NULL,0,1,0,0,0,700,NULL,0,1,0,1301974027,NULL,0),('LBuiKzg2mWwmOPS9AgV3bg',1271348789,'1','pbversion0000000000001','approved','Get Translated','Get Translated','yns/translated','3','7','4',NULL,0,1,0,0,0,728,NULL,0,1,0,1301974027,NULL,0),('jTNggl7AoVSUc_ZzrvuCmw',1271348789,'1','pbversion0000000000001','approved','Get Promoted','Get Promoted','yns/promotion','3','7','4',NULL,0,1,0,0,0,721,NULL,0,1,0,1301974027,NULL,0),('mTOiwwk3q4k9g5-XykXhPA',1271349647,'1','pbversion0000000000001','approved','Documentation','Documentation','documentation','3','7','3',NULL,0,0,0,0,0,561,NULL,0,1,0,1301974027,NULL,0),('2TqQc4OISddWCZmRY1_m8A',1271357565,'1','pbversion0000000000001','approved','Join Us','Join Us','join_us','3','7','3',NULL,0,0,0,0,0,577,NULL,0,1,0,1301974028,NULL,0),('k2Qj03FrAOXYra8kDJYYXw',1271357513,'1','pbversion0000000000001','approved','IRC (Internet Relay Chat)','IRC','join_us/irc','3','7','3',NULL,0,1,0,0,0,1197,NULL,0,1,0,1301974028,NULL,0),('ksSfkZdsr0uC62NwIk6hFQ',1271356973,'1','pbversion0000000000001','approved','WebGUI Users Conference','WUC','join_us/wuc','3','7','3',NULL,0,1,0,0,0,861,NULL,0,1,0,1301974028,NULL,0),('nWxS5jnA3o3DgPEwBeR7yQ',1271357239,'1','pbversion0000000000001','approved','The Forums','forums','join_us/forums','3','7','3',NULL,0,1,0,0,0,1531,NULL,0,1,0,1301974028,NULL,0),('x3OFY6OJh_qsXkZfPwug4A',1271348790,'1','pbversion0000000000001','approved','Site Map','Site Map','site_map','3','7','3',NULL,0,0,0,0,0,349,NULL,0,1,0,1301974028,NULL,0),('pJd5TLAjfWMVXD6sCRLwUg',1271348790,'1','pbversion0000000000001','approved','Site Map','Site Map','site_map/site_map','3','7','3',NULL,0,1,0,0,0,364,NULL,0,1,0,1301974028,NULL,0),('OhdaFLE7sXOzo_SIP2ZUgA',1271445348,'1','pbversion0000000000001','approved','Welcome','Welcome','home/welcome','3','7','4',NULL,0,1,0,0,0,2190,NULL,0,1,0,1301974028,NULL,0),('IWFxZDyGhQ3-SLZhELa3qw',1277737686,'1','pbversion0000000000001','approved','Benefits','Benefits','home/key-benefits','3','7','4',NULL,0,1,0,0,0,1835,NULL,0,1,0,1301974028,NULL,0),('LdiozcIUciWuvt3Z-na5Ww',1281501162,'3','pbversion0000000000001','approved','Matrix','Matrix','root/import/matrix','3','7','12',NULL,0,0,0,0,0,317,NULL,0,1,0,1281501164,NULL,0),('matrixtmpl000000000002',1281501162,'3','pbversion0000000000001','approved','Matrix Default Compare','Matrix Default Compare','matrix-default-compare-template','3','7','12',NULL,0,0,0,0,0,20669,'\n\n\n\n\n\n\n\n\n\n\n',0,1,0,1285124167,'',0),('matrixtmpl000000000001',1281501162,'3','pbversion0000000000001','approved','Matrix Default View','Matrix Default View','matrix-default-view-template','3','7','12',NULL,0,0,0,0,0,22048,'\n\n\n\n\n\n\n',0,1,0,1285124166,'',0),('matrixtmpl000000000003',1281501163,'3','pbversion0000000000001','approved','Matrix Default Detailed Listing','Matrix Default Detailed Listing','matrix-default-detailed-listing','3','7','12',NULL,0,0,0,0,0,15360,'\n\n\n\n\n\n\n\n\n\n\n',0,1,0,1285124167,'',0),('matrixtmpl000000000004',1281501163,'3','pbversion0000000000001','approved','Matrix Default Edit Listing','Matrix Default Edit Listing','default-matrix-edit-listing-template','3','7','12',NULL,0,0,0,0,0,525,NULL,0,1,0,1285124167,NULL,0),('matrixtmpl000000000005',1281501163,'3','pbversion0000000000001','approved','Matrix Default Search','Matrix Default Search','matrix-search-template','3','7','12',NULL,0,0,0,0,0,10307,'\n\n\n\n\n\n\n\n\n\n',0,1,0,1285124167,'',0),('hkj6WeChxFyqfP85UlRP8w',1281501163,'3','pbversion0000000000001','approved','matrix.css','matrix.css','new-matrix/matrix.css','3','7','12',NULL,0,1,0,0,0,16408,NULL,0,1,0,1285124169,NULL,0),('kJf77eCr9GAMiEzWrzsBTA',1281501163,'3','pbversion0000000000001','approved','matrix-ie.css','matrix-ie.css','new-matrix/matrix-ie.css','3','7','12',NULL,0,1,0,0,0,764,NULL,0,1,0,1285124169,NULL,0),('4LQT4-bGW4FkiEQLSY5gvQ',1281501163,'3','pbversion0000000000001','approved','show-hide.js','show-hide.js','new-matrix/show-hide.js','3','7','12',NULL,0,1,0,0,0,933,NULL,0,1,0,1285124168,NULL,0),('alraubvBu-YJJ614jAHD5w',1281501163,'3','pbversion0000000000001','approved','matrix-nav-tmpl','matrix-nav-tmpl','new-matrix/matrix-nav-tmpl','3','7','12',NULL,0,1,0,0,0,711,NULL,0,1,0,1285124165,NULL,0),('Vch1Ww7G_JpBhOhXX07RDg',1281501163,'3','pbversion0000000000001','approved','matrx-nav','matrix-nav','new-matrix/matrix-nav','3','7','12',NULL,0,1,0,0,0,375,NULL,0,1,0,1281501164,NULL,0),('wrq7hMxb1ewQqZ46xmd8Gg',1281501163,'3','pbversion0000000000001','approved','equal-cols.js','equal-cols.js','matrix/equal-cols.js','3','7','12',NULL,0,1,0,0,0,796,NULL,0,1,0,1285124169,NULL,0),('matrixtmpl000000000007',1281501163,'3','pbversion0000000000001','approved','Matrix Default Screenshots Config','Matrix Default Screenshots Config','matrix-default-screenshots-config','3','7','12',NULL,0,0,0,0,0,4099,NULL,0,1,0,1285124167,NULL,0),('matrixtmpl000000000006',1281501163,'3','pbversion0000000000001','approved','Matrix Default Screenshots','Matrix Default Screenshots','matrix-default-screenshots','3','7','12',NULL,0,0,0,0,0,2952,NULL,0,1,0,1285124167,NULL,0),('N716tpSna0iIQTKxS4gTWA',1281501163,'3','pbversion0000000000001','approved','Default Account Layout','Default Account Layout','root/import/account/default-account-layout2','3','7','12',NULL,0,1,0,0,0,1923,'\r\n',0,1,0,1285124161,'',0),('AssetReportFolder00001',1281501163,'3','pbversion0000000000001','approved','Asset Report','Asset Report','asset_report','3','3','4',NULL,0,0,0,0,0,322,NULL,0,1,0,1281501164,NULL,0),('N7uMnnicbyTEulcuRi1sSg',1283900195,'3','pbversion0000000000001','approved','PDFs','PDFs','media/pdfs','3','7','4',NULL,0,1,0,0,0,304,NULL,0,1,0,1283921709,NULL,0),('bCGr7FRtZt-XYlBVUEJBjw',1278013724,'3','pbversion0000000000001','approved','Getting_Started_doc.pdf','Getting_Started_doc.pdf','media/pdfs/getting_started_doc.pdf','3','7','4',NULL,0,1,0,0,0,1188407,NULL,0,1,0,1283921709,NULL,0),('_XfvgNH__bY1ykMiKYSobQ',1281501163,'3','pbversion0000000000001','approved','account.css','account.css','root/import/account/account.css','3','7','12',NULL,0,1,0,0,0,45634,NULL,0,1,0,1285124169,NULL,0),('limMkk80fMB3fqNZVf162w',1281501163,'3','pbversion0000000000001','approved','Default Asset Subscription','Default Asset Subscription','root/import/default-asset-subscription','3','7','3',NULL,0,1,0,0,0,550,NULL,0,1,0,1285124166,NULL,0),('l0guT3vTR3B8cL6vtP-g3A',1285124369,'1','pbversion0000000000001','approved','Contribute','contribute','contribute','3','7','3',NULL,0,1,0,0,0,3239,NULL,1,1,0,1285124369,NULL,0),('sJtcUCfn0CVbKdb4QM61Yw',1283921584,'3','pbversion0000000000001','approved','Asset Report Default Template','Asset Report Default Template','asset-report/asset-report-default-template','3','3','4',NULL,0,1,0,0,0,2218,NULL,0,1,0,1285124167,NULL,0),('A16v-YjWAShXWvSACsraeg',1285124154,'3','pbversion0000000000001','approved','StoryTopic','StoryTopic','root/import/storymanager/storytopic','3','7','4',NULL,0,0,0,0,0,2870,'',0,1,0,1285124171,'',0),('gI_TxK-5S4DNuv42wpImmw',1285124155,'3','pbversion0000000000001','approved','Gallery Templates','Gallery Templates','root/import/gallery-templates','3','7','3',NULL,0,0,0,0,0,362,NULL,0,1,0,1285124169,NULL,0),('jME5BEDYVDlBZ8jIQA9-jQ',1285124155,'3','pbversion0000000000001','approved','Default Gallery Search','Default Gallery Search','root/import/gallery-templates/default-gallery-search','3','7','3',NULL,0,1,0,0,0,11460,'\r\n \r\n',0,1,0,1285124169,'',0),('azCqD0IjdQSlM3ar29k5Sg',1285124155,'3','pbversion0000000000001','approved','Default Gallery List Albums View','Default Gallery List Albums View','root/import/gallery-templates/default-gallery-list-albums-view','3','7','3',NULL,0,1,0,0,0,5927,' \r\n \r\n ',0,1,0,1285124169,'',0),('05FpjceLYhq4csF1Kww1KQ',1285124155,'3','pbversion0000000000001','approved','Default Gallery View Album','Default Gallery View Album','root/import/gallery-templates/default-gallery-view-album','3','7','3',NULL,0,1,0,0,0,7861,' \n \n ',0,1,0,1285124169,'',0),('q5O62aH4pjUXsrQR3Pq4lw',1285124155,'3','pbversion0000000000001','approved','Default Gallery View Album Thumbnails','Default Gallery View Album Thumbnails','root/import/gallery-templates/default-gallery-view-album-thumbnails','3','7','3',NULL,0,1,0,0,0,7651,'\r\n\r\n\r\n\r\n\r\n',0,1,0,1285124169,'',0),('KAMdiUdJykjN02CPHpyZOw',1285124155,'3','pbversion0000000000001','approved','Default Gallery View Album Slideshow','Default Gallery View Album Slideshow','root/import/gallery-templates/default-gallery-view-album-slideshow','3','7','3',NULL,0,1,0,0,0,7941,'\r\n \r\n\r\n\r\n \r\n \r\n \r\n\r\n\r\n',0,1,0,1285124169,'',0),('OkphOEdaSGTXnFGhK4GT5A',1285124155,'3','pbversion0000000000001','approved','Default Gallery List Files For User','Default Gallery List Files For User','root/import/gallery-templates/default-gallery-list-files-for-user','3','7','3',NULL,0,1,0,0,0,7790,'\n \n',0,1,0,1285124169,'',0),('TEId5V-jEvUULsZA0wuRuA',1285124155,'3','pbversion0000000000001','approved','Default Gallery View Photo','Default Gallery View Photo','root/import/gallery-templates/default-gallery-view-photo','3','7','3',NULL,0,1,0,0,0,15566,'\n\n\n\n',0,1,0,1285124169,'',0),('6X-7Twabn5KKO_AbgK3PEw',1285124155,'3','pbversion0000000000001','approved','Default Gallery Edit Album','Default Gallery Edit Album','root/import/gallery-templates/default-gallery-edit-album','3','7','3',NULL,0,1,0,0,0,8244,'\n\n\n\n\n\n\n\n\n',0,1,0,1285124169,'',0),('7JCTAiu1U_bT9ldr655Blw',1285124155,'3','pbversion0000000000001','approved','Default Gallery Edit Photo','Default Gallery Edit Photo','root/import/gallery-templates/default-gallery-edit-photo','3','7','3',NULL,0,1,0,0,0,7438,'\n\n\n\n',0,1,0,1285124169,'',0),('0X4Q3tBWUb_thsVbsYz9xQ',1285124155,'3','pbversion0000000000001','approved','Default Gallery Add Archive','Default Gallery Add Archive','root/import/gallery-templates/default-gallery-add-archive','3','7','3',NULL,0,1,0,0,0,3773,' \r\n\r\n ',0,1,0,1285124169,'',0),('m3IbBavqzuKDd2PGGhKPlA',1285124155,'3','pbversion0000000000001','approved','Default Gallery Make Shortcut','Default Gallery Make Shortcut','root/import/gallery-templates/default-gallery-make-shortcut','3','7','3',NULL,0,1,0,0,0,5111,'\n\n\n\n',0,1,0,1285124169,'',0),('UTNFeV7B_aSCRmmaFCq4Vw',1285124155,'3','pbversion0000000000001','approved','Default Gallery Delete Album','Default Gallery Delete Album','root/import/gallery-templates/default-gallery-delete-album','3','7','3',NULL,0,1,0,0,0,4712,'\n \n\n\n',0,1,0,1285124169,'',0),('zcX-wIUct0S_np14xxOA-A',1285124155,'3','pbversion0000000000001','approved','Default Gallery Delete File','Default Gallery Delete File','root/import/gallery-templates/default-gallery-delete-file','3','7','3',NULL,0,1,0,0,0,4728,'\n \n\n\n',0,1,0,1285124169,'',0),('MBZK_LPVzqhb4TV4mMRTJg',1285124155,'3','pbversion0000000000001','approved','admin_ie7.css','admin_ie7.css','root/import/gallery-templates/admin_ie7.css','3','7','3',NULL,0,1,0,0,0,380,NULL,0,1,0,1285124169,NULL,0),('_hELmIJfgbAyXFNqPyApxQ',1285124155,'3','pbversion0000000000001','approved','admin.css','admin.css','root/import/gallery-templates/admin.css','3','7','3',NULL,0,1,0,0,0,3957,NULL,0,1,0,1285124169,NULL,0),('kaPRSaf8UKiskiGEgJgLAw',1285124155,'3','pbversion0000000000001','approved','images','images','root/import/gallery-templates/images','3','7','3',NULL,0,0,0,0,0,340,NULL,0,1,0,1285124169,NULL,0),('bANo8aiAPA7aY_oQZKxIWw',1285124155,'3','pbversion0000000000001','approved','rss.gif','rss.gif','root/import/gallery-templates/images/rss.gif','3','7','3',NULL,0,1,0,0,0,1389,NULL,0,1,0,1285124169,NULL,0),('2ci_v2d4x4uvyjTRlC49OA',1285124156,'3','pbversion0000000000001','approved','moveDown.gif','moveDown.gif','root/import/gallery-templates/images/movedown.gif','3','7','3',NULL,0,1,0,0,0,784,NULL,0,1,0,1285124169,NULL,0),('O-EsSzKgAk1KolFT-x_KsA',1285124156,'3','pbversion0000000000001','approved','moveUp.gif','moveUp.gif','root/import/gallery-templates/images/moveup.gif','3','7','3',NULL,0,1,0,0,0,772,NULL,0,1,0,1285124170,NULL,0),('fdd8tGExyVwHyrB8RBbKXg',1285124156,'3','pbversion0000000000001','approved','next.gif','next.gif','root/import/gallery-templates/images/next.gif','3','7','3',NULL,0,1,0,0,0,1676,NULL,0,1,0,1285124170,NULL,0),('BpisgHl4ZDcSECJp6oib1w',1285124156,'3','pbversion0000000000001','approved','play.gif','play.gif','root/import/gallery-templates/images/play.gif','3','7','3',NULL,0,1,0,0,0,2113,NULL,0,1,0,1285124170,NULL,0),('zshreRgPAXtnF0DtVbQ1Yg',1285124156,'3','pbversion0000000000001','approved','previous.gif','previous.gif','root/import/gallery-templates/images/previous.gif','3','7','3',NULL,0,1,0,0,0,1682,NULL,0,1,0,1285124170,NULL,0),('POVcY79vIqAHR8OfGt36aw',1285124156,'3','pbversion0000000000001','approved','pagination_button.jpg','pagination_button.jpg','root/import/gallery-templates/images/pagination_button.jpg','3','7','12',NULL,0,1,0,0,0,1050,NULL,0,0,0,1285124170,NULL,0),('hIB-z34r8Xl-vYVYCkKr-w',1285124156,'3','pbversion0000000000001','approved','bar-btn-r.jpg','bar-btn-r.jpg','root/import/gallery-templates/images/bar-btn-r.jpg','3','7','12',NULL,0,1,0,0,0,830,NULL,0,0,0,1285124170,NULL,0),('-mPUoFlYcjqjPUPRLAlxNQ',1285124156,'3','pbversion0000000000001','approved','search-field-r.jpg','search-field-r.jpg','root/import/gallery-templates/images/search-field-r.jpg','3','7','12',NULL,0,1,0,0,0,848,NULL,0,0,0,1285124170,NULL,0),('MDpUOR-N8KMyt1J7Hh_h4w',1285124156,'3','pbversion0000000000001','approved','bar-btn.jpg','bar-btn.jpg','root/import/gallery-templates/images/bar-btn.jpg','3','7','12',NULL,0,1,0,0,0,708,NULL,0,0,0,1285124170,NULL,0),('YfXKByTwDZVituMc4h13Dg',1285124156,'3','pbversion0000000000001','approved','pagination_bg.jpg','pagination_bg.jpg','root/import/gallery-templates/images/pagination_bg.jpg','3','7','12',NULL,0,1,0,0,0,1131,NULL,0,0,0,1285124170,NULL,0),('esko_HSU0Gh-uJZ1h3xRmQ',1285124156,'3','pbversion0000000000001','approved','search-field-l.jpg','search-field-l.jpg','root/import/gallery-templates/images/search-field-l.jpg','3','7','12',NULL,0,1,0,0,0,874,NULL,0,0,0,1285124170,NULL,0),('oSqpGswzpBG_ErdfYwIO8A',1285124156,'3','pbversion0000000000001','approved','top_bg.jpg','top_bg.jpg','root/import/gallery-templates/images/top_bg.jpg','3','7','12',NULL,0,1,0,0,0,692,NULL,0,0,0,1285124170,NULL,0),('MXJklShZvLLB_DSnZQmXrQ',1285124156,'3','pbversion0000000000001','approved','title_bg.jpg','title_bg.jpg','root/import/gallery-templates/images/title_bg.jpg','3','7','12',NULL,0,1,0,0,0,1658,NULL,0,0,0,1285124170,NULL,0),('BthxD5oJ0idmsyI3ioA2FA',1285124156,'3','pbversion0000000000001','approved','bar-btn-l.jpg','bar-btn-l.jpg','root/import/gallery-templates/images/bar-btn-l.jpg','3','7','12',NULL,0,1,0,0,0,845,NULL,0,0,0,1285124170,NULL,0),('aZ-1HYQamkRHYXvzAra8WQ',1285124156,'3','pbversion0000000000001','approved','search-field.jpg','search-field.jpg','root/import/gallery-templates/images/search-field.jpg','3','7','12',NULL,0,1,0,0,0,750,NULL,0,0,0,1285124170,NULL,0),('eRkb94OYcS5AdcrrerOP5Q',1285124157,'3','pbversion0000000000001','approved','rss.gif','rss.gif','root/import/gallery-templates/images/rss2.gif','3','7','12',NULL,0,1,0,0,0,1391,NULL,0,0,0,1285124170,NULL,0),('TbnkjAJQEASORXIpYqDkcA',1285124157,'3','pbversion0000000000001','approved','blank-image.jpg','blank-image.jpg','root/import/gallery-templates/images/blank-image.jpg','3','7','12',NULL,0,1,0,0,0,3084,NULL,0,0,0,1285124170,NULL,0),('er-3faBjY-hhlDcc5aKqdQ',1285124157,'3','pbversion0000000000001','approved','top_bg.jpg','top_bg.jpg','root/import/gallery-templates/images/top_bg2.jpg','3','7','12',NULL,0,1,0,0,0,693,NULL,0,0,0,1285124170,NULL,0),('8bFsu2FJUqHRUiHcozcVFw',1285124157,'3','pbversion0000000000001','approved','sub-btn-l.jpg','sub-btn-l.jpg','root/import/gallery-templates/images/sub-btn-l.jpg','3','7','12',NULL,0,1,0,0,0,844,NULL,0,0,0,1285124170,NULL,0),('34Aayx5eA320D8VfhdfDBw',1285124157,'3','pbversion0000000000001','approved','sub-btn-r.jpg','sub-btn-r.jpg','root/import/gallery-templates/images/sub-btn-r.jpg','3','7','12',NULL,0,1,0,0,0,824,NULL,0,0,0,1285124170,NULL,0),('TlhKOVmWblZOsAdqmhEpeg',1285124157,'3','pbversion0000000000001','approved','sub-btn.jpg','sub-btn.jpg','root/import/gallery-templates/images/sub-btn.jpg','3','7','12',NULL,0,1,0,0,0,702,NULL,0,0,0,1285124170,NULL,0),('Nx0ypjO3cN6QdZUBUEE0lA',1285124157,'3','pbversion0000000000001','approved','pic-title-bg.jpg','pic-title-bg.jpg','root/import/gallery-templates/images/pic-title-bg.jpg','3','7','12',NULL,0,1,0,0,0,865,NULL,0,0,0,1285124170,NULL,0),('CmFZLN7iPS7XXvUEsxKPKA',1285124157,'3','pbversion0000000000001','approved','row-2.jpg','row-2.jpg','root/import/gallery-templates/images/row-2.jpg','3','7','12',NULL,0,1,0,0,0,806,NULL,0,0,0,1285124170,NULL,0),('v_XBgwwZqgW1D5s4y05qfg',1285124157,'3','pbversion0000000000001','approved','addtl-info.gif','addtl-info.gif','root/import/gallery-templates/images/addtl-info.gif','3','7','12',NULL,0,1,0,0,0,914,NULL,0,0,0,1285124170,NULL,0),('4TdAkKoQbSCvI7QWcW889A',1285124157,'3','pbversion0000000000001','approved','row-1.jpg','row-1.jpg','root/import/gallery-templates/images/row-1.jpg','3','7','12',NULL,0,1,0,0,0,791,NULL,0,0,0,1285124170,NULL,0),('SAgK6eDPCG1cgkJ59WapHQ',1285124157,'3','pbversion0000000000001','approved','prev-btn.gif','prev-btn.gif','root/import/gallery-templates/images/prev-btn.gif','3','7','12',NULL,0,1,0,0,0,2015,NULL,0,0,0,1285124170,NULL,0),('XJYLuvGy9ubF7JNKyINtpA',1285124157,'3','pbversion0000000000001','approved','play-btn.gif','play-btn.gif','root/import/gallery-templates/images/play-btn.gif','3','7','12',NULL,0,1,0,0,0,2543,NULL,0,0,0,1285124170,NULL,0),('RWj7hyv2SpZuXxwj1Wocug',1285124157,'3','pbversion0000000000001','approved','next-btn.gif','next-btn.gif','root/import/gallery-templates/images/next-btn.gif','3','7','12',NULL,0,1,0,0,0,2045,NULL,0,0,0,1285124170,NULL,0),('aq8QElnlm3YufAoxRz9Pcg',1285124158,'3','pbversion0000000000001','approved','data-bg.jpg','data-bg.jpg','root/import/gallery-templates/images/data-bg.jpg','3','7','12',NULL,0,1,0,0,0,821,NULL,0,0,0,1285124170,NULL,0),('i6-BofrJJYozovlzFBByXg',1285124158,'3','pbversion0000000000001','approved','first-photo-button.png','first-photo-button.png','root/import/gallery-templates/images/first-photo-button.png','3','7','3',NULL,0,1,0,0,0,1069,NULL,0,1,0,1285124170,NULL,0),('fU_OZCmtdFNJ8a6bMve8ng',1285124158,'3','pbversion0000000000001','approved','previous-photo-button.png','previous-photo-button.png','root/import/gallery-templates/images/previous-photo-button.png','3','7','3',NULL,0,1,0,0,0,943,NULL,0,1,0,1285124170,NULL,0),('YXCtusAxb4vzZ5sTnUA5DA',1285124158,'3','pbversion0000000000001','approved','next-photo-button.png','next-photo-button.png','root/import/gallery-templates/images/next-photo-button.png','3','7','3',NULL,0,1,0,0,0,955,NULL,0,1,0,1285124170,NULL,0),('k_xuE82wwp8gFVl9aaaG8g',1285124158,'3','pbversion0000000000001','approved','last-photo-button.png','last-photo-button.png','root/import/gallery-templates/images/last-photo-button.png','3','7','3',NULL,0,1,0,0,0,1072,NULL,0,1,0,1285124170,NULL,0),('NPM_WItpM5IzLWBhWjYfCA',1285124158,'3','pbversion0000000000001','approved','photo-navigation-spacer.png','photo-navigation-spacer.png','root/import/gallery-templates/images/photo-navigation-spacer.png','3','7','3',NULL,0,1,0,0,0,569,NULL,0,1,0,1285124170,NULL,0),('mM3bjP_iG9sv5nQb4S17tQ',1285124158,'3','pbversion0000000000001','approved','Default Gallery View Album RSS','Default Gallery View Album RSS','root/import/gallery-templates/default-gallery-album-rss','3','7','3',NULL,0,1,0,0,0,1259,NULL,0,1,0,1285124170,NULL,0),('ilu5BrM-VGaOsec9Lm7M6Q',1285124158,'3','pbversion0000000000001','approved','Default Gallery List Albums RSS','Default Gallery List Albums RSS','root/import/gallery-templates/default-gallery-list-albums-rss','3','7','3',NULL,0,1,0,0,0,1268,NULL,0,1,0,1285124170,NULL,0),('-ANLpoTEP-n4POAdRxCzRw',1285124158,'3','pbversion0000000000001','approved','Default Gallery List Files For User RSS','Default Gallery List Files For User RSS','root/import/gallery-templates/default-gallery-list-files-for-user-rss','3','7','3',NULL,0,1,0,0,0,1300,NULL,0,1,0,1285124170,NULL,0),('OxJWQgnGsgyGohP2L3zJPQ',1285124158,'3','pbversion0000000000001','approved','Default Gallery Edit Comment','Default Gallery Edit Comment','root/import/gallery-templates/default-gallery-edit-comment','3','7','3',NULL,0,1,0,0,0,5493,'',0,1,0,1285124170,'',0),('7fE8md51vTCcuJFOvxNaGA',1285124158,'3','pbversion0000000000001','approved','thumbnails.js','thumbnails.js','root/import/gallery-templates/thumbnails.js','3','7','3',NULL,0,1,0,0,0,5848,NULL,0,1,0,1285124170,NULL,0),('1oGhfj00KkCzP1ez01AfKA',1285124158,'3','pbversion0000000000001','approved','slideshow.js','slideshow.js','root/import/gallery-templates/slideshow.js','3','7','3',NULL,0,1,0,0,0,11975,NULL,0,1,0,1285124170,NULL,0),('3qiVYhNTXMVC5hfsumVHgg',1285124158,'3','pbversion0000000000001','approved','browserdetect.js','browserdetect.js','root/import/gallery-templates/browserdetect.js','3','7','3',NULL,0,1,0,0,0,4375,NULL,0,1,0,1285124170,NULL,0),('THQhn1C-ooj-TLlEP7aIJQ',1285124158,'3','pbversion0000000000001','approved','gallery-ie.css','gallery-ie.css','root/import/gallery-templates/gallery-ie.css','3','7','3',NULL,0,1,0,0,0,626,NULL,0,1,0,1285124170,NULL,0),('qxd0WpRGqDPWP8WBicYvEA',1285124158,'3','pbversion0000000000001','approved','dragdropsorting.js','dragdropsorting.js','root/import/gallery-templates/dragdropsorting.js','3','7','12',NULL,0,1,0,0,0,9518,NULL,0,1,0,1285124171,NULL,0),('RrV4aAPnn4dM0ZcU3OXnlw',1286336607,'3','pbversion0000000000001','approved','style','style','root/import/style','3','7','12',NULL,0,0,0,0,0,314,NULL,0,1,0,1286336607,NULL,0),('PBtmpl0000000000000111',1286336607,'3','pbversion0000000000001','approved','Make Page Printable','Make Page Printable','make_page_printable','3','7','12',NULL,0,1,0,0,0,1791,NULL,0,1,0,1286336607,NULL,0),('A3T7jpTBKLYws1h5mJ0t8A',1286336607,'3','pbversion0000000000001','approved','makepageprintable.css','makepageprintable.css','makepageprintable.css','3','7','12',NULL,0,1,0,0,0,6259,NULL,0,1,0,1286336607,NULL,0),('diZvW4bSgZWwyyGP3qXi1g',1285610019,'1','pbversion0000000000001','approved','Commercial Documentation','Commercial Documentation','documentation/commercial-documentation','3','7','3',NULL,0,1,0,0,0,1751,NULL,0,1,0,1301974028,NULL,0),('68sKwDgf9cGH58-NZcU4lg',1286336676,'3','pbversion0000000000001','approved','Welcome','Home','home','3','7','3',NULL,0,0,0,0,0,357,NULL,0,1,0,1286336676,NULL,0),('Am1J-meNBmhqFfEIWy6Gag',1287545014,'3','pbversion0000000000001','approved','crystalX_Navigation','crystalX_Navigation','crystalx/crystalx_navigation','3','7','3',NULL,0,1,0,0,0,406,NULL,0,1,0,1287545016,NULL,0),('1z9J1O08n_7gVVlBwSRBJQ',1287545014,'3','pbversion0000000000001','approved','Auth','Auth','root/import/auth','3','7','12',NULL,0,1,0,0,0,311,NULL,0,1,0,1287545015,NULL,0),('xSmREZO3GNzK3M5PaueOOQ',1287545014,'3','pbversion0000000000001','approved','LDAP/Account','LDAP/Account','root/import/auth/ldap/account','3','7','12',NULL,0,0,0,0,0,347,NULL,0,1,0,1287545015,NULL,0),('PBtmpl0000000000000004',1287545014,'3','pbversion0000000000001','approved','Default LDAP Account Display Template','Default LDAP Account Display Template','default_ldap_account_display_template','3','7','12',NULL,0,1,0,0,0,1372,NULL,0,1,0,1287545015,NULL,0),('0bx-xoL8TSXXubFuqKAoVQ',1287545014,'3','pbversion0000000000001','approved','LDAP/Create','LDAP/Create','root/import/auth/ldap/create','3','7','12',NULL,0,0,0,0,0,344,NULL,0,1,0,1287545015,NULL,0),('PBtmpl0000000000000005',1287545014,'3','pbversion0000000000001','approved','Default LDAP Anonymous Registration Template','Default LDAP Anonymous Registration Template','default_ldap_anonymous_registration_template','3','7','12',NULL,0,1,0,0,0,5903,'\n\n',0,1,0,1287545015,'',0),('taX2UYkFF21ALpFZY2rhMw',1287545014,'3','pbversion0000000000001','approved','LDAP/Login','LDAP/Login','root/import/auth/ldap/login','3','7','12',NULL,0,0,0,0,0,341,NULL,0,1,0,1287545015,NULL,0),('PBtmpl0000000000000006',1287545014,'3','pbversion0000000000001','approved','Default LDAP Login Template','Default LDAP Login Template','default_ldap_login_template','3','7','12',NULL,0,1,0,0,0,1974,NULL,0,1,0,1287545015,NULL,0),('K0q_N885Httqev1VCqUWxg',1287545014,'3','pbversion0000000000001','approved','WebGUI/Account','WebGUI/Account','root/import/auth/webgui/account','3','7','12',NULL,0,0,0,0,0,353,NULL,0,1,0,1287545015,NULL,0),('PBtmpl0000000000000010',1287545014,'3','pbversion0000000000001','approved','Default WebGUI Account Display Template','Default WebGUI Account Display Template','default_webgui_account_display_template','3','7','12',NULL,0,1,0,0,0,2780,NULL,0,1,0,1287545015,NULL,0),('fq1ZkYhH24R5tb96kuT10Q',1287545014,'3','pbversion0000000000001','approved','WebGUI/Create','WebGUI/Create','root/import/auth/webgui/create','3','7','12',NULL,0,0,0,0,0,350,NULL,0,1,0,1287545015,NULL,0),('PBtmpl0000000000000011',1287545014,'3','pbversion0000000000001','approved','Default WebGUI Anonymous Registration Template','Default WebGUI Anonymous Registration Template','default_webgui_anonymous_registration_template','3','7','12',NULL,0,1,0,0,0,6676,'\n\n',0,1,0,1287545015,'',0),('PBtmpl0000000000000015',1287545014,'3','pbversion0000000000001','approved','Default WebGUI Welcome Message Template','Default WebGUI Welcome Message Template','root/import/auth/webgui/create/default-webgui-welcome-message-template','3','7','12',NULL,0,1,0,0,0,698,NULL,0,1,0,1287545015,NULL,0),('PBtmpl0000000000000016',1287545014,'3','pbversion0000000000001','approved','Default WebGUI Account Activation Template','Default WebGUI Account Activation Template','root/import/auth/webgui/create/default-webgui-account-activation-template','3','7','3',NULL,0,1,0,0,0,602,NULL,0,1,0,1287545015,NULL,0),('oHk7fAFhEEkB7dHzi0QOQA',1287545014,'3','pbversion0000000000001','approved','WebGUI/Expired','WebGUI/Expired','root/import/auth/webgui/expired','3','7','12',NULL,0,0,0,0,0,353,NULL,0,1,0,1287545016,NULL,0),('PBtmpl0000000000000012',1287545014,'3','pbversion0000000000001','approved','Default WebGUI Password Reset Template','Default WebGUI Password Reset Template','default_webgui_password_reset_template','3','7','12',NULL,0,1,0,0,0,2095,NULL,0,1,0,1287545016,NULL,0),('9M-lrlPQWeeNWfvnDnK_Xg',1287545014,'3','pbversion0000000000001','approved','WebGUI/Login','WebGUI/Login','root/import/auth/webgui/login','3','7','12',NULL,0,0,0,0,0,347,NULL,0,1,0,1287545016,NULL,0),('PBtmpl0000000000000013',1287545014,'3','pbversion0000000000001','approved','Default WebGUI Login Template','Default WebGUI Login Template','default_webgui_login_template','3','7','12',NULL,0,1,0,0,0,2262,NULL,0,1,0,1287545016,NULL,0),('_gBYAdTcbkiyamnqi2Xskg',1287545014,'3','pbversion0000000000001','approved','WebGUI/Recovery','WebGUI/Recovery','root/import/auth/webgui/recovery','3','7','12',NULL,0,0,0,0,0,356,NULL,0,1,0,1287545016,NULL,0),('PBtmpl0000000000000014',1287545015,'3','pbversion0000000000001','approved','Default WebGUI Password Recovery Template','Default WebGUI Password Recovery Template','default_webgui_password_recovery_template','3','7','12',NULL,0,1,0,0,0,3073,NULL,0,1,0,1287545016,NULL,0),('0iMMbGN3BevuCBHjjLiQNA',1287545015,'3','pbversion0000000000001','approved','WebGUI/Deactivate','WebGUI/Deactivate','root/import/auth/webgui/deactivate','3','7','12',NULL,0,1,0,0,0,361,NULL,0,1,0,1287545016,NULL,0),('zaHUYsE_PgKk8hnVd8ffEQ',1287545015,'3','pbversion0000000000001','approved','WebGUI Deactivate Account Template','WebGUI Deactivate Account Template','default_webgui_deactivate_account_template','3','7','12',NULL,0,1,0,0,0,859,NULL,0,1,0,1287545016,NULL,0),('6A4yIjWwJfIE0Ep-I0jutg',1287545015,'3','pbversion0000000000001','approved','LDAP/Deactivate','LDAP/Deactivate','root/import/auth/ldap/deactivate','3','7','12',NULL,0,1,0,0,0,355,NULL,0,1,0,1287545016,NULL,0),('_P4PMiraGsLTfOjK4fYQPQ',1287545015,'3','pbversion0000000000001','approved','LDAP Deactivate Account Template','LDAP Deactivate Account Template','default_ldap_deactivate_account_template','3','7','12',NULL,0,1,0,0,0,851,NULL,0,1,0,1287545016,NULL,0),('sK_0zVw4kwdJ1sqREIsSzA',1287545015,'3','pbversion0000000000001','approved','WebGUI Auth Password Recovery Email Template','Password Recovery Email','root/import/auth/webgui/recoveryemail','3','7','4',NULL,0,0,0,0,0,769,NULL,0,1,0,1287545016,NULL,0),('qsG6B24a0SC5KrhQjmdZBw',1287545015,'3','pbversion0000000000001','approved','survey.css','survey.css','survey.css','3','7','12',NULL,0,1,0,0,0,5092,NULL,0,1,0,1287545016,NULL,0),('kwTL1SWCk0GlpiJ5zAAEPQ',1287545015,'3','pbversion0000000000001','approved','surveyedit.css','surveyedit.css','root/import/survey/surveyedit.css','3','7','12',NULL,0,1,0,0,0,4986,NULL,0,1,0,1287545016,NULL,0),('_cD6DLM_Fs5IlrLeWUjrjg',1287545015,'3','pbversion0000000000001','approved','Workflow Activity Templates','Workflow Activity Templates','root/import/workflow-activity-templates','3','7','12',NULL,0,1,0,0,0,434,NULL,0,1,0,1287545016,NULL,0),('lYhMheuuLROK_iNjaQuPKg',1287545015,'3','pbversion0000000000001','approved','Notify About Version Tag','Notify About Version Tag','root/import/workflow-activity-templates/notify-about-version-tag','3','7','12',NULL,0,1,0,0,0,502,NULL,0,1,0,1287545016,NULL,0),('PBtmpl0000000000000085',1288747840,'3','pbversion0000000000001','approved','Default Email','Default Email','default_email','3','7','12',NULL,0,1,0,0,0,2031,NULL,0,1,0,1288747841,NULL,0),('2rC4ErZ3c77OJzJm7O5s3w',1288747841,'3','pbversion0000000000001','approved','EMS Badge Listing (default)','EMS Badge Listing (default)','root/import/ems/ems-badge-listing-default','3','7','12',NULL,0,1,0,0,0,11613,'\n\n\n\n\n\n\n\n\n\n\n\n\n \n',0,1,0,1288747841,'',0),('lG2exkH9FeYvn4pA63idNg',1289967962,'3','pbversion0000000000001','approved','Friend Manager Edit Friends','Friend Manager Edit Friends','root/import/account/friendmanager/edit','3','7','4',NULL,0,0,0,0,0,2587,'',0,1,0,1289967964,'',0),('PBtmpl0000000000000021',1294721945,'3','pbversion0000000000001','approved','Data List','Data List','data_list','3','7','12',NULL,0,1,0,0,0,4917,'',0,1,0,1294721945,'',0),('CalendarEvent000000001',1295931508,'3','pbversion0000000000001','approved','Default Calendar Event','Default Calendar Event','root/import/calendar-templates/default-calendar-event','3','7','12',NULL,0,0,0,0,0,11625,' ',0,1,0,1295931508,'',0),('64tqS80D53Z0JoAs2cX2VQ',1295931508,'3','pbversion0000000000001','approved','FriendManager View Template','FriendManager View Template','root/import/account/friendmanager/view','3','7','4',NULL,0,0,0,0,0,4485,'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n',0,1,0,1295931508,'',0),('kj3b-X3i6zRKnhLb4ZiCLw',1295931508,'3','pbversion0000000000001','approved','Default Calendar List View','Default Calendar List View','root/import/calendar-templates/default-calendar-list-view','3','7','3',NULL,0,1,0,0,0,6560,'\n',0,1,0,1295931508,'',0),('PBtmpl0000000000000077',1298351263,'3','pbversion0000000000001','approved','Job Listing','Job Listing','job_listing','3','7','12',NULL,0,1,0,0,0,4876,'\n\n\n',0,1,0,1298351263,'',0),('ThingyTmpl000000000002',1299559129,'3','pbversion0000000000001','approved','Default Thingy View Thing','Default Thingy View Thing','templates/thingy-default-view-thing','3','7','12',NULL,0,0,0,0,0,4833,'\n',0,1,0,1299559129,'',0),('PBtmpl0000000000000088',1300763663,'3','pbversion0000000000001','approved','Image','Image','image','3','7','12',NULL,0,1,0,0,0,850,NULL,0,1,0,1300763664,NULL,0),('S1A9iAwKcQQ6P20uTqw-Ew',1300763664,'3','pbversion0000000000001','approved','Dashboard','Dashboard','root/import/dashboard','3','7','12',NULL,0,0,0,0,0,326,NULL,0,1,0,1300763664,NULL,0),('DashboardViewTmpl00001',1300763664,'3','pbversion0000000000001','approved','Dashboard Default View','Dashboard Default View','dashboard-default-view-template','3','7','12',NULL,0,0,0,0,0,20462,'\n\n\n\n\n\n',0,1,0,1300763664,'',0),('CQp-RFA2pMh5lFSggPPPYg',1301973995,'3','pbversion0000000000001','approved','[Style] Underground','[Style] Underground','style-underground','3','7','3',NULL,0,0,0,0,0,452,NULL,0,1,0,1301974000,NULL,0),('_Mi_NTd3x8UB96LWezWHnw',1301973995,'3','pbversion0000000000001','approved','Images','Images','style-underground/images','3','7','3',NULL,0,0,0,0,0,328,NULL,0,1,0,1301974000,NULL,0),('A_5LVQQWR73QZR8FFbny_w',1301973995,'3','pbversion0000000000001','approved','bg.gif','bg.gif','style-underground/images/bg.gif','3','7','3',NULL,0,1,0,0,0,612,NULL,0,0,0,1301974000,NULL,0),('wywIfa_VuTsq0c5Ed-W-MA',1301973995,'3','pbversion0000000000001','approved','bullet.gif','bullet.gif','style-underground/images/bullet.gif','3','7','3',NULL,0,1,0,0,0,686,NULL,0,0,0,1301974000,NULL,0),('xmykMFjri1O2NrYHbeToVQ',1301973995,'3','pbversion0000000000001','approved','footerbg.gif','footerbg.gif','style-underground/images/footerbg.gif','3','7','3',NULL,0,1,0,0,0,460,NULL,0,0,0,1301974000,NULL,0),('0IIGNBs_-INzqBC5VLeJgw',1301973996,'3','pbversion0000000000001','approved','headerbg.gif','headerbg.gif','style-underground/images/headerbg.gif','3','7','3',NULL,0,1,0,0,0,530,NULL,0,0,0,1301974000,NULL,0),('FXmePdyS0YKuZ1VCGGpK9w',1301973996,'3','pbversion0000000000001','approved','quote.gif','quote.gif','style-underground/images/quote.gif','3','7','3',NULL,0,1,0,0,0,685,NULL,0,0,0,1301974000,NULL,0),('66qCywiE_fiL9u5YIaJhgw',1301973996,'3','pbversion0000000000001','approved','tableft.gif','tableft.gif','style-underground/images/tableft.gif','3','7','3',NULL,0,1,0,0,0,720,NULL,0,0,0,1301974000,NULL,0),('n5VpG4lFsOG1elaWDQbilw',1301973996,'3','pbversion0000000000001','approved','tabright.gif','tabright.gif','style-underground/images/tabright.gif','3','7','3',NULL,0,1,0,0,0,2135,NULL,0,0,0,1301974000,NULL,0),('g3JH1PRq6m6Bj_PnGpcrSQ',1301973996,'3','pbversion0000000000001','approved','CSS','CSS','style-underground/css','3','7','3',NULL,0,0,0,0,0,319,NULL,0,1,0,1301974000,NULL,0),('egpnaaFqWmJwYTZ5CvFH9g',1301973996,'3','pbversion0000000000001','approved','Underground.css','Underground.css','style-underground/css/underground.css','3','7','3',NULL,0,1,0,0,0,11746,NULL,0,1,0,1301974000,NULL,0),('BBpxqoSseIor5C9ei9JEFQ',1301973996,'3','pbversion0000000000001','approved','Underground WebGUI.css','Underground WebGUI.css','style-underground/css/underground-webgui.css','3','7','3',NULL,0,1,0,0,0,528,NULL,0,1,0,1301974000,NULL,0),('G0hl4VilbFKipToyxKqFrg',1301973997,'3','pbversion0000000000001','approved','Prototypes','Prototypes','style-underground/prototypes','3','7','3',NULL,0,0,0,0,0,429,NULL,0,1,0,1301974000,NULL,0),('GWU2qZqe6yEuAKG-5HtBdg',1301973997,'3','pbversion0000000000001','approved','Templates','Templates','style-underground/templates','3','7','3',NULL,0,0,0,0,0,337,NULL,0,1,0,1301974000,NULL,0),('Qk24uXao2yowR6zxbVJ0xA',1301973997,'3','pbversion0000000000001','approved','[style] Underground','[style] Underground','style-underground/style-underground','3','7','3','by Doug from Plain Black http://plainblack.com\r\n\r\nThis is the Underground style from http://www.styleshout.com/ made into a WebGUI package. A simple, functional style.',0,1,0,0,0,4727,NULL,0,1,0,1301974000,NULL,0),('39KNX53B4nYJAyIE1lu8ZQ',1301973997,'3','pbversion0000000000001','approved','[nav] Underground Top Navigation','[nav] Underground Top Navigation','style-underground/nav-underground-top-navigation','3','7','3',NULL,0,1,0,0,0,1139,NULL,0,1,0,1301974000,NULL,0),('ztfi__vHJLsQDsMenrEn-w',1301973997,'3','pbversion0000000000001','approved','[nav] Underground Side Navigation','[nav] Underground Side Navigation','style-underground/nav-underground-side-navigation','3','7','3',NULL,0,1,0,0,0,1148,NULL,0,1,0,1301974000,NULL,0),('8qyrDCNeggB4dzKiOoRuiQ',1301973997,'3','pbversion0000000000001','approved','[admintoggle] Underground Admin Toggle','[admintoggle] Underground Admin Toggle','style-underground/templates/admintoggle-underground-admin-toggle','3','7','3',NULL,0,1,0,0,0,520,NULL,0,1,0,1301974000,NULL,0),('M1NyNeS5jpdIsiIWFiJprw',1301973997,'3','pbversion0000000000001','approved','View My Account','View My Account','style-underground/templates/view-my-account','3','7','3',NULL,0,1,0,0,0,461,NULL,0,1,0,1301974000,NULL,0),('n-Vr_wgxOkwiHGt1nJto9w',1309236774,'3','pbversion0000000000001','approved','Top Navigation','Top Navigation','style-underground/top-navigation','3','7','3',NULL,0,1,0,0,0,393,NULL,0,1,0,1309236774,NULL,0),('AsfpsOpsGzZCb9m7MyxPuw',1301973997,'3','pbversion0000000000001','approved','Navigation','Navigation','style-underground/navigation','3','7','3',NULL,0,0,0,0,0,340,NULL,0,1,0,1301974001,NULL,0),('jmqLxnoWb6p92Cr12lf1hw',1301973997,'3','pbversion0000000000001','approved','Side Navigation','Side Navigation','style-underground/side-navigation','3','7','3',NULL,0,1,0,0,0,402,NULL,0,1,0,1301974001,NULL,0),('8E2UOnj_XPEghTj7nfVM0g',1301973997,'3','pbversion0000000000001','approved','Search','Search','style-underground/search','3','7','3',NULL,0,1,0,0,0,345,NULL,0,1,0,1301974001,NULL,0),('CarouselTmpl0000000001',1301973997,'3','pbversion0000000000001','approved','Default Carousel','Default Carousel','root/import/carousel/carousel-default','3','7','12',NULL,0,0,0,0,0,3709,'\r\n\r\n\r\n',0,1,0,1301974000,'',0),('1qFjOEiILIwr1xB5_ebppQ',1301973998,'3','pbversion0000000000001','approved','Greenportal','Greenportal','greenportal','3','7','3',NULL,0,1,0,0,0,319,NULL,0,1,0,1301974001,NULL,0),('xD76UfQ_JnSgTLBNvytcpQ',1301973998,'3','pbversion0000000000001','approved','greenportal_image','greenportal_image','greenportal_image','3','7','12',NULL,0,1,0,0,0,344,NULL,0,1,0,1301974001,NULL,0),('pAXR7Kby4O-dSxOwLp1GaA',1301973998,'3','pbversion0000000000001','approved','menu_top.png','menu_top.png','greenportal_image/menu_top.png','3','7','12',NULL,0,1,0,0,0,7649,NULL,0,1,0,1301974001,NULL,0),('TthzMLO4n3qxy59QZ5YBHg',1301973998,'3','pbversion0000000000001','approved','menu_dark.png','menu_dark.png','greenportal_image/menu_dark.png','3','7','12',NULL,0,1,0,0,0,2641,NULL,0,1,0,1301974001,NULL,0),('3n31SQjYa150TBrRBgMPhA',1301973998,'3','pbversion0000000000001','approved','menu_light.png','menu_light.png','greenportal_image/menu_light.png','3','7','12',NULL,0,1,0,0,0,2195,NULL,0,1,0,1301974001,NULL,0),('R4RxDufGbbIzEmpcoEcLrw',1301973998,'3','pbversion0000000000001','approved','logo.jpg','logo.jpg','greenportal_image/logo.jpg','3','7','12',NULL,0,1,0,0,0,41449,NULL,0,1,0,1301974001,NULL,0),('xyyn5mz3xGyvrcI1rY8C-w',1301973998,'3','pbversion0000000000001','approved','greenportal.css','greenportal.css','greenportal.css','3','7','12',NULL,0,1,0,0,0,6696,NULL,0,1,0,1301974001,NULL,0),('KKt0VB_eoQxw9xEsHsAhag',1301973998,'3','pbversion0000000000001','approved','Greenportal_style','Greenportal_style','greenportal_style','3','7','12','by Ning from PlutonIT http://pluton.nl\n\nA Joomla! Open Source design released under the GNU/GPL License. Enhanced and converted into WebGUI theme by Ning. The original PHP and CSS file can be downloaded following the author\'s link: http://www.studentsdesign.de/',0,1,0,0,0,2280,NULL,0,1,0,1301974001,NULL,0),('h0bOzz7WvdaVZXsjpwtkww',1301973998,'3','pbversion0000000000001','approved','greenportal_Navigation','greenportal_Navigation','greenportal_navigation','3','7','3',NULL,0,1,0,0,0,394,NULL,0,1,0,1301974001,NULL,0),('_z3ukLCqvoaUygfsbbkBzw',1301973999,'3','pbversion0000000000001','approved','Greenportal_menu','Greenportal_menu','greenportal_menu','3','7','3',NULL,0,1,0,0,0,2014,NULL,0,1,0,1301974001,NULL,0),('qFOfW1sKyOTnGNcP6BXbwg',1301973999,'3','pbversion0000000000001','approved','greenportal_NavigationTop','greenportal_NavigationTop','greenportal_navigationtop','3','7','12',NULL,0,1,0,0,0,416,NULL,0,1,0,1301974001,NULL,0),('Pt38T5_MWSue2e1N36MLdw',1301973999,'3','pbversion0000000000001','approved','Greenportal_menuTop','Greenportal_menuTop','greenportal_menutop','3','7','12',NULL,0,1,0,0,0,950,NULL,0,1,0,1301974001,NULL,0),('LDcM1Iop17nF2MoSa7zo_Q',1301973999,'3','pbversion0000000000001','approved','Greenportal_dataform','Greenportal_dataform','greenportal_dataform','3','7','3',NULL,0,1,0,0,0,5320,'\r\n\r\n',0,1,0,1301974001,'',0),('hVF1taXj4bfd7DuL4XDMYg',1301973999,'3','pbversion0000000000001','approved','Greenportal_datalist','Greenportal_datalist','greenportal_datalist','3','7','3',NULL,0,1,0,0,0,4142,'\n\n',0,1,0,1301974001,'',0),('x4-2QYRSrIB_BJfnSKKj4w',1301973999,'3','pbversion0000000000001','approved','Greenportal_acknowledgement','Greenportal_acknowledgement','greenportal_acknowledgement','3','7','3',NULL,0,1,0,0,0,1755,'',0,1,0,1301974001,'',0),('423R4Y6XIt3wUzlnLo-chg',1301973999,'3','pbversion0000000000001','approved','Greenportal_forum','Greenportal_forum','greenportal_forum','3','7','3',NULL,0,1,0,0,0,7997,'\r\n\r\n\r\n',0,1,0,1301974001,'',0),('oZ1Mk-zExYUyD-JsjTvaHg',1301973999,'3','pbversion0000000000001','approved','Greenportal_thread','Greenportal_thread','greenportal_thread','3','7','3',NULL,0,1,0,0,0,11119,'\r\n',0,1,0,1301974001,'',0),('mYwS8CZaOLMt0raaKXGZcQ',1301973999,'3','pbversion0000000000001','approved','Greenportal_postform','Greenportal_postform','greenportal_postform','3','7','3',NULL,0,1,0,0,0,4047,'\r\n',0,1,0,1301974001,'',0),('kSGR4OHsKmhLQTuLkisOww',1301973999,'3','pbversion0000000000001','approved','Greenportal_search','Greenportal_search','greenportal_search','3','7','3',NULL,0,1,0,0,0,3685,'',0,1,0,1301974001,'',0),('G5DgNizuG3jXkjPp6UaGrA',1301973999,'3','pbversion0000000000001','approved','Greenportal_Calendar','Greenportal_Calendar','greenportal_calendar','3','7','3',NULL,0,1,0,0,0,352,NULL,0,1,0,1301974001,NULL,0),('U78V5IJHVljvRTb6ydsTHg',1301973999,'3','pbversion0000000000001','approved','Greenportal_calendarMonth','Greenportal_calendarMonth','greenportal_calendar/greenportal_calendarmonth','3','7','3',NULL,0,1,0,0,0,15294,'\n\n\n\n\n\n\n',0,1,0,1301974001,'',0),('Xqc3qPUXoFE8dt9qocdWig',1301973999,'3','pbversion0000000000001','approved','Greenportal_calendarWeek','Greenportal_calendarWeek','greenportal_calendar/greenportal_calendarweek','3','7','3',NULL,0,1,0,0,0,10509,'\r\n',0,1,0,1301974001,'',0),('IBTb7wllSt7RxFmmvm9pkQ',1301973999,'3','pbversion0000000000001','approved','Greenportal_calendarDay','Greenportal_calendarDay','greenportal_calendar/greenportal_calendarday','3','7','3',NULL,0,1,0,0,0,10155,' \r\n\r\n',0,1,0,1301974001,'',0),('Z1EM7JMI_4SkyfaZffSElw',1301973999,'3','pbversion0000000000001','approved','Greenportal_calendarEvent','Greenportal_calendarEvent','greenportal_calendar/greenportal_calendarevent','3','7','3',NULL,0,1,0,0,0,8357,' \r\n\r\n',0,1,0,1301974001,'',0),('fJg7SKpGZwzSNx3_ebki1A',1301973999,'3','pbversion0000000000001','approved','Greenportal_calendarEventEdit','Greenportal_calendarEventEdit','greenportal_calendar/greenportal_calendareventedit','3','7','3',NULL,0,1,0,0,0,9181,'\n\n\n \n\n',0,1,0,1301974001,'',0),('ihf4Rx6p72xn_nVKaIeOaw',1301973999,'3','pbversion0000000000001','approved','Greenportal_calendarSearch','Greenportal_calendarSearch','greenportal_calendar/greenportal_calendarsearch','3','7','3',NULL,0,1,0,0,0,9141,' \r\n\r\n',0,1,0,1301974001,'',0),('jrWJ6nHXkqgFbml7BZ9chw',1301974000,'3','pbversion0000000000001','approved','Greenportal_submission','Greenportal_submission','greenportal_submission','3','7','3',NULL,0,1,0,0,0,21039,'\r\n',0,1,0,1301974001,'',0),('Ys6f3vpe0y1uRcaCJ2TlFw',1301974000,'3','pbversion0000000000001','approved','Greenportal_messageboard','Greenportal_messageboard','greenportal_messageboard','3','7','3',NULL,0,1,0,0,0,5587,'',0,1,0,1301974001,'',0),('PBtmpl0000000000000200',1301974000,'3','pbversion0000000000001','approved','Default Search','Default Search','default_search2','3','7','12',NULL,0,0,0,0,0,3966,NULL,0,1,0,1315877144,NULL,0),('E3tzZjzhmYoNlAyP2VW33Q',1303183716,'3','pbversion0000000000001','approved','Edit Story','Edit Story','root/import/storymanager/editstory','3','7','4',NULL,0,0,0,0,0,6440,'',0,1,0,1303183716,'',0),('brxm_faNdZX5tRo3p50g3g',1304392055,'3','pbversion0000000000001','approved','Map Templates','Map Templates','home/map/map-templates','3','7','3',NULL,0,0,0,0,0,334,NULL,0,1,0,1304392055,NULL,0),('9j0_Z1j3Jd0QBbY2akb6qw',1304392055,'3','pbversion0000000000001','approved','Default Map View','Default Map View','home/map/map-templates/default-map-view','3','7','3',NULL,0,1,0,0,0,1292,'',0,1,0,1304392055,'',0),('oHh0UqAJeY7u2n--WD-BAA',1304392055,'3','pbversion0000000000001','approved','Default Edit Map Point','Default Edit Map Point','home/map/map-templates/default-edit-map-point','3','7','3',NULL,0,1,0,0,0,3176,NULL,0,1,0,1304392055,NULL,0),('u9vfx33XDk5la1-QC5FK7g',1304392055,'3','pbversion0000000000001','approved','Default Map Point View','Default Map Point View','home/map/map-templates/default-map-point-view','3','7','3',NULL,0,1,0,0,0,2418,'',0,1,0,1304392055,'',0),('_9_eiaPgxzF_x_upt6-PNQ',1304392055,'3','pbversion0000000000001','approved','gallery.css','gallery.css','root/import/gallery-templates/gallery.css','3','7','3',NULL,0,1,0,0,0,18788,NULL,0,1,0,1304392055,NULL,0),('PBtmpl0000000000000027',1311652541,'3','pbversion0000000000001','approved','Default Forum Notification','Default Forum Notification','default_forum_notification','3','7','12',NULL,0,1,0,0,0,2815,NULL,0,1,0,1311652541,NULL,0),('3n3H85BsdeRQ0I08WmvlOg',1313542960,'3','pbversion0000000000001','approved','thingy.css','thingy.css','root/import/thingy-templates/thingy.css','3','7','12',NULL,0,1,0,0,0,4774,NULL,0,1,0,1313542962,NULL,0),('PBEmsBadgeTemplate0000',1313542962,'3','pbversion0000000000001','approved','Default EMS Badge Template','Default EMS Badge Template','default_emsbadge','3','7','4',NULL,0,0,0,0,0,5853,'',0,1,0,1313542962,'',0),('StockDataTMPL000000001',1315877144,'3','pbversion0000000000001','approved','StockData Default View','StockData Default View','stockdatatmpl000000001','3','7','12',NULL,0,1,0,0,0,9004,'\n',0,1,0,1315877144,'',0),('aNmgn0cd6tldmC1FpW4KbA',1326776036,'3','pbversion0000000000001','approved','Shop','Shop','shopping-cart-collateral-items','3','7','3',NULL,0,1,0,0,0,324,NULL,0,0,0,1326776038,NULL,0),('2q5fxatSFLgIhXaUX-oSvg',1326776036,'3','pbversion0000000000001','approved','bottom-left.jpg','bottom-left.jpg','shopping-cart-collateral-items/bottom-left.jpg','3','7','3',NULL,0,1,0,0,0,32254,NULL,0,0,0,1326776038,NULL,0),('_d5WTkKjnwct-_Dk7gZHvQ',1326776036,'3','pbversion0000000000001','approved','bottom-right.jpg','bottom-right.jpg','shopping-cart-collateral-items/bottom-right.jpg','3','7','3',NULL,0,1,0,0,0,32258,NULL,0,0,0,1326776038,NULL,0),('Iz2mUR3jCPKyemwAea4b2g',1326776036,'3','pbversion0000000000001','approved','input_bg.jpg','input_bg.jpg','shopping-cart-collateral-items/input_bg.jpg','3','7','3',NULL,0,1,0,0,0,30076,NULL,0,0,0,1326776038,NULL,0),('JU9bjsLRoWj7GVHs__prig',1326776036,'3','pbversion0000000000001','approved','top-left.jpg','top-left.jpg','shopping-cart-collateral-items/top-left.jpg','3','7','3',NULL,0,1,0,0,0,32207,NULL,0,0,0,1326776038,NULL,0),('noOlnjQGexHg8c4bGVUo9g',1326776036,'3','pbversion0000000000001','approved','top-right.jpg','top-right.jpg','shopping-cart-collateral-items/top-right.jpg','3','7','3',NULL,0,1,0,0,0,32245,NULL,0,0,0,1326776038,NULL,0),('aIpCmr9Hi__vgdZnDTz1jw',1326776036,'3','pbversion0000000000001','approved','Cart (Default)','Cart (Default)','default-shopping-cart-template','3','7','3',NULL,0,1,0,0,0,25953,' ',0,1,0,1326776038,'',0),('XNd7a_g_cTvJVYrVHcx2Mw',1326776037,'3','pbversion0000000000001','approved','Address (Default)','Address (Default)','shopping-cart-collateral-items/address-default','3','7','3',NULL,0,1,0,0,0,5883,'\r\n',0,1,0,1326776038,'',0),('2gtFt7c0qAFNU3BG_uvNvg',1326776037,'3','pbversion0000000000001','approved','My Purchases (Default)','My Purchases (Default)','shopping-cart-collateral-items/my-purchases-default','3','7','3',NULL,0,1,0,0,0,3259,'\n',0,1,0,1326776038,'',0),('bPz1yk6Y9uwMDMBcmMsSCg',1326776037,'3','pbversion0000000000001','approved','Email Receipt (Default)','Email Receipt (Default)','shopping-cart-collateral-items/email-receipt-default','3','7','3',NULL,0,1,0,0,0,4751,NULL,0,1,0,1326776038,NULL,0),('vrKXEtluIhbmAS9xmPukDA',1326776037,'3','pbversion0000000000001','approved','Donation (Default)','Donation (Default)','root/import/default-donation-template','3','7','12',NULL,0,1,0,0,0,2504,'\r\n',0,0,0,1326776038,'',0),('63ix2-hU0FchXGIWkG3tow',1326776037,'3','pbversion0000000000001','approved','Flat Discount (Default)','Flat Discount (Default)','root/import/flat-discount-default','3','7','12',NULL,0,1,0,0,0,1278,NULL,0,1,0,1326776038,NULL,0),('eqb9sWjFEVq0yHunGV8IGw',1326776037,'3','pbversion0000000000001','approved','Subscription (Default)','Subscription (Default)','root/import/subscription-default','3','7','12',NULL,0,1,0,0,0,2872,'\n',0,1,0,1326776038,'',0),('3womoo7Teyy2YKFa25-MZg',1326776037,'3','pbversion0000000000001','approved','Address Book (Default)','Address Book (Default)','shopping-cart-collateral-items/address-book-default','3','7','3',NULL,0,1,0,0,0,3132,'\n',0,1,0,1326776038,'',0),('EBlxJpZQ9o-8VBOaGQbChA',1326776037,'3','pbversion0000000000001','approved','MiniCart','MiniCart','shopping-cart-collateral-items/minicart','3','7','3',NULL,0,1,0,0,0,2622,'',0,1,0,1326776038,'',0),('g8W53Pd71uHB9pxaXhWf_A',1326776037,'3','pbversion0000000000001','approved','My Purchases Detail (Default)','My Purchases Detail (Default)','shopping-cart-collateral-items/my-purchases-detail-default','3','7','3',NULL,0,1,0,0,0,8422,'\n',0,1,0,1326776038,'',0),('jEz8iTGNWEt2I05IhVV19Q',1326776037,'3','pbversion0000000000001','approved','Operation/RedeemSubscription','Operation/RedeemSubscription','root/import/operation/redeemsubscription','3','7','12',NULL,0,0,0,0,0,390,NULL,0,1,0,1326776038,NULL,0),('PBtmpl0000000000000053',1326776037,'3','pbversion0000000000001','approved','Subscription code redemption','Subscription code redemption','subscription_code_redemption','3','7','12',NULL,0,1,0,0,0,579,NULL,0,1,0,1326776038,NULL,0),('itransact_credentials1',1326776037,'3','pbversion0000000000001','approved','ITransact Credentials (Default)','ITransact Credentials (Default)','shopping-cart-collateral-items/itransact-credentials','3','7','4',NULL,0,0,0,0,0,11072,' \n\n\n',0,1,0,1326776038,'',0),('D6cJpRcey35aSkh9Q_FPUQ',1326776037,'3','pbversion0000000000001','approved','Default EU User Screen','Default EU User Screen','root/import/default-eu-user-screen','3','7','12',NULL,0,1,0,0,0,1830,NULL,0,1,0,1326776038,NULL,0),('30h5rHxzE_Q0CyI3Gg7EJw',1326776037,'3','pbversion0000000000001','approved','Cash Summary Screen (Default)','Cash Summary Screen (Default)','shopping-cart-collateral-items/cash-summary','3','7','4',NULL,0,0,0,0,0,8671,' \n',0,1,0,1326776038,'',0),('jysVZeUR0Bx2NfrKs5sulg',1326776037,'3','pbversion0000000000001','approved','Ogone Summary Screen (Default)','Ogone Summary Screen (Default)','shopping-cart-collateral-items/ogone-summary','3','7','4',NULL,0,0,0,0,0,8672,' \n',0,1,0,1326776038,'',0),('300AozDaeveAjB_KN0ljlQ',1326776037,'3','pbversion0000000000001','approved','PayPal Standard Summary Screen (Default)','PayPal Standard Summary Screen (Default)','shopping-cart-collateral-items/paypal-std-summary','3','7','4',NULL,0,0,0,0,0,8697,' \n',0,1,0,1326776038,'',0),('GqnZPB0gLoZmqQzYFaq7bg',1326776037,'3','pbversion0000000000001','approved','PayPal Express Checkout Summary Screen (Default)','PayPal Express Checkout Summary Screen (Default)','shopping-cart-collateral-items/paypal-express-summary','3','7','4',NULL,0,0,0,0,0,8716,' \n',0,1,0,1326776038,'',0),('2GxjjkRuRkdUg_PccRPjpA',1326776038,'3','pbversion0000000000001','approved','Select Gateway (Default)','Select Gateway (Default)','shopping-cart-collateral-items/select-gateway-default','3','7','3',NULL,0,1,0,0,0,626,'\r\n',0,1,0,1326776038,NULL,0),('Rqwgh50A3gGcOKIrdi_kxw',1326776038,'3','pbversion0000000000001','approved','Authorize.net Credentials (Default)','Authorize.net Credentials (Default)','shopping-cart-collateral-items/authorizenet-credentials','3','7','4',NULL,0,0,0,0,0,11400,' \n\n\n',0,1,0,1326776038,'',0),('CalendarSearch00000001',1326776038,'3','pbversion0000000000001','approved','Default Calendar Search','Default Calendar Search','root/import/calendar-templates/default-calendar-search','3','7','12',NULL,0,0,0,0,0,14402,' ',0,1,0,1326776038,'',0); ALTER TABLE `assetData` ENABLE KEYS; ALTER TABLE `assetIndex` DISABLE KEYS; -INSERT INTO `assetIndex` VALUES ('PBasset000000000000003','Media','','media',1147642437,1147642437,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Media Media media','000001000003',NULL),('PBtmpl0000000000000112','Weblog','','weblog',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'Weblog Weblog weblog Collaboration','000001000001000008000004',NULL),('PBtmplBlankStyle000001','WebGUI 6 Blank Style','','pbtmplblankstyle000001',1133743239,1258524916,'3','7','12','WebGUI::Asset::Template',0,'WebGUI 6 Blank Style WebGUI 6 Blank Style pbtmplblankstyle000001 style','000001000001000041000005',NULL),('PBtmpl0000000000000079','Topics','','topics',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'Topics Topics topics Collaboration','000001000001000008000009',NULL),('PBtmpl0000000000000097','Traditional with Thumbnails','','traditional_with_thumbnails',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'Traditional with Thumbnails Traditional with Thumbnails traditional with thumbnails Collaboration','000001000001000008000003',NULL),('PBtmpl0000000000000082','Unordered List','','unordered_list',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'Unordered List Unordered List unordered list Collaboration','000001000001000008000011',NULL),('PBtmpl0000000000000124','Tabs','','tabs',1124395696,1259133275,'3','7','12','WebGUI::Asset::Template',0,'Tabs Tabs tabs Navigation','000001000001000025000004',NULL),('GNvjCFQWjY2AF2uf0aCM8Q','Syndicated Articles','','syndicated_articles',1124395696,1259133274,'3','7','12','WebGUI::Asset::Template',0,'Syndicated Articles Syndicated Articles syndicated articles SyndicatedContent','000001000001000043000002',NULL),('PBtmpl0000000000000136','Synopsis','','synopsis2',1124395696,1259133274,'3','7','12','WebGUI::Asset::Template',0,'Synopsis Synopsis synopsis2 Navigation','000001000001000025000007',NULL),('PBtmpl0000000000000116','Tab Form','','tab_form',1124395696,1257311888,'3','7','12','WebGUI::Asset::Template',0,'Tab Form Tab Form tab form DataForm','000001000001000010000005',NULL),('GRUNFctldUgop-qRLuo_DA','Default Survey Edit','','root/import/survey/default-survey-edit',1227254010,1269401469,'3','7','12','WebGUI::Asset::Template',0,'Default Survey Edit Default Survey Edit root import survey default survey edit Survey/Edit','000001000001000042000004',NULL),('ProjectManagerTMPL0004','Default Project Manager Edit Task','','default-pm-template-edit-task',1147642415,1222574693,'3','7','12','WebGUI::Asset::Template',0,'Default Project Manager Edit Task Default Project Manager Edit Task default pm template edit task ProjectManager_editTask','000001000001000030000002000001',NULL),('ProjectManagerTMPL0002','Default Project Display','','default-pm-template-project-display',1147642415,1222574693,'3','7','12','WebGUI::Asset::Template',0,'Default Project Display Default Project Display default pm template project display ProjectManager_project','000001000001000030000004000001',NULL),('PBtmpl0000000000000137','Admin Console Style','','admin_console',1124395696,1258524916,'3','7','12','WebGUI::Asset::Template',0,'Admin Console Style Admin Console admin console style','000001000001000041000003',NULL),('StockDataTMPL000000001','StockData Default View','','stockdatatmpl000000001',1133743239,1315877144,'3','7','12','WebGUI::Asset::Template',0,'StockData Default View StockData Default View stockdatatmpl000000001 StockData','000001000001000039000002',NULL),('PBtmpl0000000000000135','Side By Side','','side_by_side',1124395696,1259133276,'3','7','12','WebGUI::Asset::Template',0,'Side By Side Side By Side side by side Layout','000001000001000019000001',NULL),('PBtmpl0000000000000200','Default Search','','default_search2',1147642427,1301974000,'3','7','12','WebGUI::Asset::Template',0,'Default Search Default Search default search2 Search','000001000001000034000001',NULL),('PBtmpl0000000000000101','Ordered List','','ordered_list',1124395696,1277868922,'3','7','12','WebGUI::Asset::Template',0,'Ordered List Ordered List ordered list Collaboration','000001000001000008000024',NULL),('PBtmpl0000000000000121','Photo Gallery','','photo_gallery',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'Photo Gallery Photo Gallery photo gallery Collaboration','000001000001000008000005',NULL),('PBtmpl0000000000000081','Q and A','','q_and_a',1124395696,1277868922,'3','7','12','WebGUI::Asset::Template',0,'Q and A Q and A q and a Collaboration','000001000001000008000023',NULL),('WVtmpl0000000000000001','Random Thread Macro Default Template','','randomthread-template',1133743240,1147642426,'3','7','12','WebGUI::Asset::Template',0,'Random Thread Macro Default Template Random Thread Macro Default Template randomthread template Macro/RandomThread','000001000001000021000010000001',NULL),('PBtmpl0000000000000131','Right Column','','right_column',1124395696,1259133275,'3','7','12','WebGUI::Asset::Template',0,'Right Column Right Column right column Layout','000001000001000019000002',NULL),('PBtmpl0000000000000094','News','','plainblacknews',1124395696,1220655703,'3','7','12','WebGUI::Asset::Template',0,'News News plainblacknews Layout','000001000001000019000005',NULL),('matrixtmpl000000000005','Matrix Default Search','','matrix-search-template',1133743239,1281501163,'3','7','12','WebGUI::Asset::Template',0,'Matrix Default Search Matrix Default Search matrix search template Matrix/Search','000001000001000022000005',NULL),('MultiSearchTmpl0000001','MultiSearch Default Display','','multisearchtmpl0000001',1133743239,1230269962,'3','7','12','WebGUI::Asset::Template',0,'MultiSearch Default Display MultiSearch Default Display multisearchtmpl0000001 MultiSearch','000001000001000024000001',NULL),('matrixtmpl000000000002','Matrix Default Compare','','matrix-default-compare-template',1133743238,1281501162,'3','7','12','WebGUI::Asset::Template',0,'Matrix Default Compare Matrix Default Compare matrix default compare template Matrix/Compare','000001000001000022000001',NULL),('PBtmpl0000000000000111','Make Page Printable','','make_page_printable',1124395696,1286336607,'3','7','12','WebGUI::Asset::Template',0,'Make Page Printable Make Page Printable make page printable style','000001000001000041000002',NULL),('PBtmpl0000000000000020','Mail Form','','mail_form',1124395696,1257311887,'3','7','12','WebGUI::Asset::Template',0,'Mail Form Mail Form mail form DataForm','000001000001000010000001',NULL),('PBtmpl0000000000000113','Link','','link',1124395696,1277868922,'3','7','12','WebGUI::Asset::Template',0,'Link Link link Collaboration/Thread','000001000001000008000025',NULL),('PBtmpl0000000000000083','Link List','','link_list',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'Link List Link List link list Collaboration','000001000001000008000010',NULL),('PBtmpl0000000000000114','Link List Submission Form','','link_list_submission_form',1124395696,1277868922,'3','7','12','WebGUI::Asset::Template',0,'Link List Submission Form Link List Submission Form link list submission form Collaboration/PostForm','000001000001000008000019',NULL),('PBtmpl0000000000000115','Linked Image with Caption','','linked_image_with_caption',1124395696,1259133276,'3','7','12','WebGUI::Asset::Template',0,'Linked Image with Caption Linked Image with Caption linked image with caption Article','000001000001000004000003',NULL),('PBtmpl0000000000000098','Job','','job',1124395696,1277868922,'3','7','12','WebGUI::Asset::Template',0,'Job Job job Collaboration/Thread','000001000001000008000021',NULL),('PBtmpl0000000000000077','Job Listing','','job_listing',1124395696,1298351263,'3','7','12','WebGUI::Asset::Template',0,'Job Listing Job Listing job listing Collaboration','000001000001000008000020',NULL),('PBtmpl0000000000000122','Job Submission Form','','job_submission_form',1124395696,1277868922,'3','7','12','WebGUI::Asset::Template',0,'Job Submission Form Job Submission Form job submission form Collaboration/PostForm','000001000001000008000022',NULL),('PBtmpl0000000000000103','Article With Image','','article-with-image',1124395696,1259133275,'3','7','12','WebGUI::Asset::Template',0,'Article With Image Article With Image article with image Article','000001000001000004000001',NULL),('PBtmpl0000000000000092','Horizontal Login Box','','horizontal_login_box',1124395696,1148579524,'3','7','12','WebGUI::Asset::Template',0,'Horizontal Login Box Horizontal Login Box horizontal login box Macro/L_loginBox','000001000001000021000009000001',NULL),('PBtmpl0000000000000108','horizontalMenu','','horizontalmenu',1124395696,1259133276,'3','7','12','WebGUI::Asset::Template',0,'horizontalMenu horizontalMenu horizontalmenu Navigation','000001000001000025000002',NULL),('PBtmpl0000000000000088','Image','','image',1124395696,1300763663,'3','7','12','WebGUI::Asset::Template',0,'Image Image image ImageAsset','000001000001000017000001',NULL),('IOB0000000000000000002','Default InOutBoard Report Template','','iob-report-template',1133743239,1166019641,'3','7','12','WebGUI::Asset::Template',0,'Default InOutBoard Report Template Default InOutBoard Report Template iob report template InOutBoard/Report','000001000001000018000001',NULL),('IOB0000000000000000001','Default InOutBoard Template','','iob-template',1133743239,1169795123,'3','7','12','WebGUI::Asset::Template',0,'Default InOutBoard Template Default InOutBoard Template iob template InOutBoard','000001000001000018000002',NULL),('PBtmpl0000000000000123','Item','','item',1124395696,1259133276,'3','7','12','WebGUI::Asset::Template',0,'Item Item item Article','000001000001000004000004',NULL),('PBtmpl0000000000000024','File','','file',1124395696,1259133275,'3','7','12','WebGUI::Asset::Template',0,'File File file FileAsset','000001000001000013000001',NULL),('PBtmpl0000000000000078','File Folder','','file_folder',1124395696,1259133275,'3','7','12','WebGUI::Asset::Template',0,'File Folder File Folder file folder Folder','000001000001000014000001',NULL),('PBtmpl0000000000000107','File with size','','file_with_size',1124395696,1147642420,'3','7','12','WebGUI::Asset::Template',0,'File with size File with size file with size Macro/File','000001000001000021000004000003',NULL),('PBtmpl0000000000000133','Guest Book','','guest_book',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'Guest Book Guest Book guest book Collaboration','000001000001000008000012',NULL),('PBtmpl0000000000000117','DropMenu','','dropmenu',1124395696,1259133274,'3','7','12','WebGUI::Asset::Template',0,'DropMenu DropMenu dropmenu Navigation','000001000001000025000003',NULL),('PBtmpl0000000000000130','Tree Navigation','','root/import/navigation/tree-navigation',1124395696,1259133276,'3','7','12','WebGUI::Asset::Template',0,'Tree Navigation Tree Navigation root import navigation tree navigation Navigation','000001000001000025000005',NULL),('PBtmpl0000000000000060','Fail Safe','','fail_safe',1124395696,1258524916,'3','7','12','WebGUI::Asset::Template',0,'Fail Safe Fail Safe fail safe style','000001000001000041000001',NULL),('PBtmpl0000000000000080','FAQ','','faqtemplate',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'FAQ FAQ faqtemplate Collaboration','000001000001000008000002',NULL),('PBtmpl0000000000000099','FAQ Submission Form','','faq_submission_form',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'FAQ Submission Form FAQ Submission Form faq submission form Collaboration/PostForm','000001000001000008000018',NULL),('PBtmpl0000000000000010','Default WebGUI Account Display Template','','default_webgui_account_display_template',1124395696,1287545014,'3','7','12','WebGUI::Asset::Template',0,'Default WebGUI Account Display Template Default WebGUI Account Display Template default webgui account display template Auth/WebGUI/Account','000001000001000005000004000001',NULL),('PBtmpl0000000000000013','Default WebGUI Login Template','','default_webgui_login_template',1124395696,1287545014,'3','7','12','WebGUI::Asset::Template',0,'Default WebGUI Login Template Default WebGUI Login Template default webgui login template Auth/WebGUI/Login','000001000001000005000007000001',NULL),('PBtmpl0000000000000012','Default WebGUI Password Reset Template','','default_webgui_password_reset_template',1124395696,1287545014,'3','7','12','WebGUI::Asset::Template',0,'Default WebGUI Password Reset Template Default WebGUI Password Reset Template default webgui password reset template Auth/WebGUI/Expired','000001000001000005000006000001',NULL),('PBtmpl0000000000000057','Default WebGUI Yes/No Prompt','','default_webgui_yes/no_prompt',1124395696,1147642418,'3','7','12','WebGUI::Asset::Template',0,'Default WebGUI Yes/No Prompt Default WebGUI Yes/No Prompt default webgui yes no prompt prompt','000001000001000031000001',NULL),('PBtmpl0000000000000066','Default USS','','default_uss',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'Default USS Default USS default uss Collaboration','000001000001000008000001',NULL),('TimeTrackingTMPL000001','Default Time Tracking User View','','default-tt-template-user',1147642417,1201205738,'3','7','12','WebGUI::Asset::Template',0,'Default Time Tracking User View Default Time Tracking User View default tt template user TimeTracking_user','000001000001000046000003000001',NULL),('TimeTrackingTMPL000003','Default Time Tracking Row Template','','default-tt-template-row',1147642417,1229311434,'3','7','12','WebGUI::Asset::Template',0,'Default Time Tracking Row Template Default Time Tracking Row Template default tt template row TimeTracking_row','000001000001000046000002000001',NULL),('TimeTrackingTMPL000002','Default Time Tracking Manager View','','default-tt-template-manager',1147642417,1147642417,'3','7','12','WebGUI::Asset::Template',0,'Default Time Tracking Manager View Default Time Tracking Manager View default tt template manager TimeTracking_manager','000001000001000046000001000001',NULL),('X7DrzUcj8pOKFa_6k9D5iw','Newsletter','','root/import/newsletter',1185754569,1222804045,'3','12','3','WebGUI::Asset::Wobject::Folder',1,'Newsletter Newsletter root import newsletter','000001000001000026',NULL),('PBtmpl0000000000000065','Default Syndicated Content','','default_syndicated_content',1124395696,1259133275,'3','7','12','WebGUI::Asset::Template',0,'Default Syndicated Content Default Syndicated Content default syndicated content SyndicatedContent','000001000001000043000001',NULL),('CxMpE_UPauZA3p8jdrOABw','Default Questions','','root/import/survey/default-questions',1227556536,1250243000,'3','7','12','WebGUI::Asset::Template',0,'Default Questions Default Questions root import survey default questions Survey/Take','000001000001000042000006',NULL),('PBtmpl0000000000000059','Default SQL Report','','default_sql_report',1124395696,1229907401,'3','7','12','WebGUI::Asset::Template',0,'Default SQL Report Default SQL Report default sql report SQLReport','000001000001000038000001',NULL),('PBtmpl0000000000000067','Default Submission','','default_submission',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'Default Submission Default Submission default submission Collaboration/Thread','000001000001000008000006',NULL),('PBtmpl0000000000000068','Default Submission Form','','default_submission_form',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'Default Submission Form Default Submission Form default submission form Collaboration/PostForm','000001000001000008000017',NULL),('ProjectManagerTMPL0003','Default Project Manager Gantt Chart','','default-pm-template-gantt-chart',1147642415,1159989349,'3','7','12','WebGUI::Asset::Template',0,'Default Project Manager Gantt Chart Default Project Manager Gantt Chart default pm template gantt chart ProjectManager_gantt','000001000001000030000003000001',NULL),('ProjectManagerTMPL0001','Default Project Management System Dashboard','','default-pm-template-dashboard',1147642415,1229579830,'3','7','12','WebGUI::Asset::Template',0,'Default Project Management System Dashboard Default Project Management System Dashboard default pm template dashboard ProjectManager_dashboard','000001000001000030000001000001',NULL),('PBtmpl0000000000000055','Default Poll','','default_poll',1124395696,1259133275,'3','7','12','WebGUI::Asset::Template',0,'Default Poll Default Poll default poll Poll','000001000001000027000001',NULL),('PBtmpl0000000000000029','Default Post Form','','default_post_form',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'Default Post Form Default Post Form default post form Collaboration/PostForm','000001000001000008000013',NULL),('PBtmpl0000000000000056','Default Product','','default_product',1124395696,1248729559,'3','7','12','WebGUI::Asset::Template',0,'Default Product Default Product default product Product','000001000001000028000001',NULL),('PBtmpl0000000000000033','Default HTTP Proxy','','default_http_proxy',1124395696,1230159454,'3','7','12','WebGUI::Asset::Template',0,'Default HTTP Proxy Default HTTP Proxy default http proxy HttpProxy','000001000001000016000001',NULL),('PBtmpl0000000000000004','Default LDAP Account Display Template','','default_ldap_account_display_template',1124395696,1287545014,'3','7','12','WebGUI::Asset::Template',0,'Default LDAP Account Display Template Default LDAP Account Display Template default ldap account display template Auth/LDAP/Account','000001000001000005000001000001',NULL),('PBtmpl0000000000000006','Default LDAP Login Template','','default_ldap_login_template',1124395696,1287545014,'3','7','12','WebGUI::Asset::Template',0,'Default LDAP Login Template Default LDAP Login Template default ldap login template Auth/LDAP/Login','000001000001000005000003000001',NULL),('PBtmpl0000000000000044','Default Login Box','','default_login_box',1124395696,1148579524,'3','7','12','WebGUI::Asset::Template',0,'Default Login Box Default Login Box default login box Macro/L_loginBox','000001000001000021000009000002',NULL),('PBtmpl0000000000000047','Default Message Board','','default_message_board',1124395696,1147642414,'3','7','12','WebGUI::Asset::Template',0,'Default Message Board Default Message Board default message board MessageBoard','000001000001000023000001',NULL),('PBtmpl0000000000000054','Default Page','','default_page',1124395696,1259133276,'3','7','12','WebGUI::Asset::Template',0,'Default Page Default Page default page Layout','000001000001000019000003',NULL),('Q4uX_C557arTp6D_jwB1jQ','Wiki','','root/import/wiki',1165460175,1273032720,'3','12','12','WebGUI::Asset::Wobject::Folder',1,'Wiki Wiki root import wiki','000001000001000052',NULL),('BmLaN4rmAANkCglXUViEbg','Resource','','root/import/projectmanager/resource',1157679165,1222803871,'3','12','12','WebGUI::Asset::Wobject::Folder',1,'Resource Resource root import projectmanager resource','000001000001000030000005',NULL),('PBtmpl0000000000000039','Default File Macro','','default_file_macro',1124395696,1154535073,'3','7','12','WebGUI::Asset::Template',0,'Default File Macro Default File Macro default file macro Macro/File','000001000001000021000004000001',NULL),('PBtmpl0000000000000026','Default Forum','','default_forum',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'Default Forum Default Forum default forum Collaboration','000001000001000008000007',NULL),('PBtmpl0000000000000031','Default Forum Search','','default_forum_search',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'Default Forum Search Default Forum Search default forum search Collaboration/Search','000001000001000008000016',NULL),('PBtmpl0000000000000093','crumbTrail','','crumbtrail2',1124395696,1259133274,'3','7','12','WebGUI::Asset::Template',0,'crumbTrail crumbTrail crumbtrail2 Navigation','000001000001000025000001',NULL),('DashboardViewTmpl00001','Dashboard Default View','','dashboard-default-view-template',1133743239,1300763664,'3','7','12','WebGUI::Asset::Template',0,'Dashboard Default View Dashboard Default View dashboard default view template Dashboard','000001000001000009000001',NULL),('PBtmpl0000000000000021','Data List','','data_list',1124395696,1294721945,'3','7','12','WebGUI::Asset::Template',0,'Data List Data List data list DataForm/List','000001000001000010000004',NULL),('PBtmpl0000000000000104','Default Acknowledgement','','default_acknowledgement',1124395696,1257311888,'3','7','12','WebGUI::Asset::Template',0,'Default Acknowledgement Default Acknowledgement default acknowledgement DataForm','000001000001000010000003',NULL),('PBtmpl0000000000000002','Default Article','','default_article',1124395696,1259133276,'3','7','12','WebGUI::Asset::Template',0,'Default Article Default Article default article Article','000001000001000004000002',NULL),('PBtmpl0000000000000141','Default DataForm','','pbtmpl0000000000000141',1124395696,1257311888,'3','7','12','WebGUI::Asset::Template',0,'Default DataForm Default DataForm pbtmpl0000000000000141 DataForm','000001000001000010000006',NULL),('WikiRCTmpl000000000001','Default Recent Changes','','default-wiki-recent-changes',1165460175,1273032720,'3','7','12','WebGUI::Asset::Template',0,'Default Recent Changes Default Recent Changes default wiki recent changes WikiMaster_recentChanges','000001000001000052000001',NULL),('PBtmpl0000000000000128','Classifieds','','classifieds',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'Classifieds Classifieds classifieds Collaboration','000001000001000008000008',NULL),('PBtmpl0000000000000134','Hierarchical Top Nav','','import/hierarchical-top-nav',1124395696,1259133275,'3','7','12','WebGUI::Asset::Template',0,'Hierarchical Top Nav Hierarchical Top Nav import hierarchical top nav Navigation','000001000001000025000006',NULL),('PBtmpl0000000000000208','Request Tracker','','request-tracker-template',1147642410,1277868922,'3','7','12','WebGUI::Asset::Template',0,'Request Tracker Request Tracker request tracker template Collaboration','000001000001000008000026',NULL),('wAc4azJViVTpo-2NYOXWvg','Default Question Edit','','root/import/survey/default-question-edit',1226009650,1250243000,'3','7','12','WebGUI::Asset::Template',0,'Default Question Edit Default Question Edit root import survey default question edit Survey/Edit','000001000001000042000008',NULL),('1z9J1O08n_7gVVlBwSRBJQ','Auth','','root/import/auth',1222803099,1287545014,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Auth Auth root import auth','000001000001000005',NULL),('zyWi26q9na-iiZqL4yedog','Macro','','root/import/macro',1222803114,1222803114,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Macro Macro root import macro','000001000001000021',NULL),('PBtmpl0000000000000209','Request Tracker Thread','','request-tracker-post-template',1147642410,1277868922,'3','7','12','WebGUI::Asset::Template',0,'Request Tracker Thread Request Tracker Thread request tracker post template Collaboration/Thread','000001000001000008000027',NULL),('PBtmpl0000000000000109','One Over Three','','one_over_three',1124395696,1259133276,'3','7','12','WebGUI::Asset::Template',0,'One Over Three One Over Three one over three Layout','000001000001000019000004',NULL),('PBtmpl0000000000000001','Admin Console','','admin_console2',1124395696,1247535846,'3','7','12','WebGUI::Asset::Template',0,'Admin Console Admin Console admin console2 AdminConsole','000001000001000003000001',NULL),('LBuiKzg2mWwmOPS9AgV3bg','Get Translated','Let our team of professional translators bring your site to new customers by translating your content into additional languages. Our translation services are never machine automated. They\'re always done by professional translators that have years of exper','yns/translated',1147642517,1271348789,'3','7','4','WebGUI::Asset::Wobject::Article',1,'Get Translated Get Translated yns translated Let our team of professional translators bring your site to new customers by translating your content into additional languages Our translation services are never machine automated They\'re always done by professional translators that have years of experience reading writing and speaking many languages ','000001000002000002000005',NULL),('jTNggl7AoVSUc_ZzrvuCmw','Get Promoted','Now that you have a brilliant WebGUI site, you need to get people to visit it. We can help there too. Our marketing specialists can work with you to develop and execute the right combination of search engine placement, advertising buys, and affilliate pro','yns/promotion',1147642517,1271348789,'3','7','4','WebGUI::Asset::Wobject::Article',1,'Get Promoted Get Promoted yns promotion Now that you have a brilliant WebGUI site you need to get people to visit it We can help there too Our marketing specialists can work with you to develop and execute the right combination of search engine placement advertising buys and affilliate programs to ensure your site gets the traffic it needs ','000001000002000002000006',NULL),('Vzv1pWpg_w6R_o-b0rM2qQ','Ad','','home/ad2',1147642515,1147642515,'3','7','4','WebGUI::Asset::File',1,'Ad Ad home ad2','000001000002000001000002',NULL),('NK8bqlwVRILJknqeCDPBHg','Getting Started (part 2)','\nTo begin managing content, you should log in and click the Turn Admin On! link. The default username is \"admin\" and the default password is \"123qwe\", but you probably customized both of those when you visited this site for the very first time.\n \n\nNow tha','getting_started/getting-started-part2',1147642515,1285796040,'3','7','4','WebGUI::Asset::Wobject::Article',1,'Getting Started part 2 Getting Started part 2 getting started getting started part2 To begin managing content you should log in and click the Turn Admin On link The default username is admin and the default password is 123qwe but you probably customized both of those when you visited this site for the very first time Now that you\'re logged in we recommend that you add a new user for yourself with admin privileges just in case you forget the login information for your primary admin account Don\'t worry if you lock yourself out you can always contact Plain Black® support to get instructions to get back in NOTE If you appear to get logged out while moving between pages this is most likely your browser displaying a cached version of the page Click on your browser\'s refresh button to correct the problem For more information about services related to WebGUI click here Enjoy your new WebGUI site ','000001000002000001000003',NULL),('IWFxZDyGhQ3-SLZhELa3qw','Benefits','\n\n\n\nRich User Interface\n \n\nPowerful API\n \n\n\n\nWebGUI has a rich user experience that allows users to place their \ncontent\nthrough a drag-n-drop interface; helps users pick dates, colors, and\nmore; and has a highly customizable rich editor to allow users to','home/key-benefits',1147642514,1277737686,'3','7','4','WebGUI::Asset::Wobject::Article',1,'Benefits Benefits home key benefits Rich User Interface Powerful API WebGUI has a rich user experience that allows users to place their content through a drag-n-drop interface helps users pick dates colors and more and has a highly customizable rich editor to allow users to quickly and easily format content WebGUI allows developers to quickly plug-in new functionality to get the most from a site In addition WebGUI\'s standardized plug-in points maintain the upgrade path even with customizations Short Friendly URLs Internationalization Never worry about ugly numeric ID\'s or other things in URL\'s that make it hard for search engines and people to use a site Users can work in an interface in their native language and content can be published in as many languages as necessary Personalization Easy To Install Users see their own view of the site through dynamically generated navigation and content In addition content can be displayed based upon users viewing habits With the use of the WebGUI Runtime Environment Unix Mac OS X Linux BSD and VMWare Appliance Windows setup takes minutes rather than hours ','000001000002000007',NULL),('OhdaFLE7sXOzo_SIP2ZUgA','Welcome','The WebGUI Content Engine® is a powerful, easy to use web application framework and content management system. WebGUI contains dozens of built-in features, and allows for full customization through its rich API. It\'s easy enough for the average busine','home/welcome',1147642513,1271445348,'3','7','4','WebGUI::Asset::Wobject::Article',1,'Welcome Welcome home welcome The WebGUI Content Engine® is a powerful easy to use web application framework and content management system WebGUI contains dozens of built-in features and allows for full customization through its rich API It\'s easy enough for the average business user to use but powerful enough for any large enterprise WebGUI serves thousands of small and large businesses schools universities governments associations churches projects and communities throughout the world For examples of who is using WebGUI visit the WebGUI Sightings page Shouldn\'t your site be on this list If you\'re new to WebGUI visit the Getting Started section Once you feel comfortable explore some of the professional services available for your new WebGUI site No matter what level you\'re at tell your friends about WebGUI ','000001000002000006',NULL),('7-0-style0000000000071','wg.jpg','','style3/wg.jpg',1147642511,1147642511,'3','7','12','WebGUI::Asset::File::Image',1,'wg.jpg wg.jpg style3 wg.jpg','000001000001000051000022',NULL),('7-0-style0000000000068','spacer.gif','','style3/spacer.gif',1147642510,1147642510,'3','7','12','WebGUI::Asset::File::Image',1,'spacer.gif spacer.gif style3 spacer.gif','000001000001000051000019',NULL),('7-0-style0000000000070','Style3 Coolmenu','','style3_coolmenu',1147642510,1147642510,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'Style3 Coolmenu Style3 Coolmenu style3 coolmenu','000001000001000051000021',NULL),('7-0-style0000000000066','nav_bg_on.jpg','','style3/nav_bg_on.jpg',1147642509,1147642509,'3','7','12','WebGUI::Asset::File::Image',1,'nav_bg_on.jpg nav_bg_on.jpg style3 nav bg on.jpg','000001000001000051000017',NULL),('7-0-style0000000000064','nav_bg2.jpg','','style3/nav_bg2.jpg',1147642509,1147642509,'3','7','12','WebGUI::Asset::File::Image',1,'nav_bg2.jpg nav_bg2.jpg style3 nav bg2.jpg','000001000001000051000015',NULL),('7-0-style0000000000065','nav_bg2_on.jpg','','style3/nav_bg2_on.jpg',1147642509,1147642509,'3','7','12','WebGUI::Asset::File::Image',1,'nav_bg2_on.jpg nav_bg2_on.jpg style3 nav bg2 on.jpg','000001000001000051000016',NULL),('7-0-style0000000000067','pb.jpg','','style3/pb.jpg',1147642509,1147642509,'3','7','12','WebGUI::Asset::File::Image',1,'pb.jpg pb.jpg style3 pb.jpg','000001000001000051000018',NULL),('7-0-style0000000000063','nav_bg1_on.jpg','','style3/nav_bg1_on.jpg',1147642508,1147642508,'3','7','12','WebGUI::Asset::File::Image',1,'nav_bg1_on.jpg nav_bg1_on.jpg style3 nav bg1 on.jpg','000001000001000051000014',NULL),('7-0-style0000000000060','main_top_bg.jpg','','style3/main_top_bg.jpg',1147642508,1147642508,'3','7','12','WebGUI::Asset::File::Image',1,'main_top_bg.jpg main_top_bg.jpg style3 main top bg.jpg','000001000001000051000011',NULL),('7-0-style0000000000062','nav_bg1.jpg','','style3/nav_bg1.jpg',1147642508,1147642508,'3','7','12','WebGUI::Asset::File::Image',1,'nav_bg1.jpg nav_bg1.jpg style3 nav bg1.jpg','000001000001000051000013',NULL),('7-0-style0000000000061','nav_bg.jpg','','style3/nav_bg.jpg',1147642508,1147642508,'3','7','12','WebGUI::Asset::File::Image',1,'nav_bg.jpg nav_bg.jpg style3 nav bg.jpg','000001000001000051000012',NULL),('7-0-style0000000000059','main_top.jpg','','style3/main_top.jpg',1147642507,1213386091,'3','7','12','WebGUI::Asset::File::Image',1,'main_top.jpg main_top.jpg style3 main top.jpg','000001000001000051000010',NULL),('7-0-style0000000000057','main_bg.jpg','','style3/main_bg.jpg',1147642507,1147642507,'3','7','12','WebGUI::Asset::File::Image',1,'main_bg.jpg main_bg.jpg style3 main bg.jpg','000001000001000051000008',NULL),('7-0-style0000000000058','main_bottom.jpg','','style3/main_bottom.jpg',1147642507,1147642507,'3','7','12','WebGUI::Asset::File::Image',1,'main_bottom.jpg main_bottom.jpg style3 main bottom.jpg','000001000001000051000009',NULL),('7-0-style0000000000055','header_left.jpg','','style3/header_left.jpg',1147642506,1147642506,'3','7','12','WebGUI::Asset::File::Image',1,'header_left.jpg header_left.jpg style3 header left.jpg','000001000001000051000006',NULL),('7-0-style0000000000056','header_right.jpg','','style3/header_right.jpg',1147642506,1147642506,'3','7','12','WebGUI::Asset::File::Image',1,'header_right.jpg header_right.jpg style3 header right.jpg','000001000001000051000007',NULL),('7-0-style0000000000054','header_bg.jpg','','style3/header_bg.jpg',1147642506,1147642506,'3','7','12','WebGUI::Asset::File::Image',1,'header_bg.jpg header_bg.jpg style3 header bg.jpg','000001000001000051000005',NULL),('7-0-style0000000000052','footer_bg.jpg','','style3/footer_bg.jpg',1147642505,1147642505,'3','7','12','WebGUI::Asset::File::Image',1,'footer_bg.jpg footer_bg.jpg style3 footer bg.jpg','000001000001000051000003',NULL),('7-0-style0000000000053','footer_right.jpg','','style3/footer_right.jpg',1147642505,1147642505,'3','7','12','WebGUI::Asset::File::Image',1,'footer_right.jpg footer_right.jpg style3 footer right.jpg','000001000001000051000004',NULL),('7-0-style0000000000046','rightCol_bg.jpg','','style2/rightcol_bg.jpg',1147642504,1147642504,'3','7','12','WebGUI::Asset::File::Image',1,'rightCol_bg.jpg rightCol_bg.jpg style2 rightcol bg.jpg','000001000001000050000015',NULL),('7-0-style0000000000049','WebGUI 7 Style 3','','root/import/webgui-7-style-3',1147642504,1224117144,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'WebGUI 7 Style 3 WebGUI 7 Style 3 root import webgui 7 style 3','000001000001000051',NULL),('7-0-style0000000000048','wg.jpg','','style2/wg.jpg',1147642504,1147642504,'3','7','12','WebGUI::Asset::File::Image',1,'wg.jpg wg.jpg style2 wg.jpg','000001000001000050000017',NULL),('7-0-style0000000000045','pb_wg_bg.jpg','','style2/pb_wg_bg.jpg',1147642503,1147642503,'3','7','12','WebGUI::Asset::File::Image',1,'pb_wg_bg.jpg pb_wg_bg.jpg style2 pb wg bg.jpg','000001000001000050000014',NULL),('7-0-style0000000000044','pb_wg.jpg','','style2/pb_wg.jpg',1147642503,1147642503,'3','7','12','WebGUI::Asset::File::Image',1,'pb_wg.jpg pb_wg.jpg style2 pb wg.jpg','000001000001000050000013',NULL),('7-0-style0000000000043','pb.jpg','','style2/pb.jpg',1147642503,1147642503,'3','7','12','WebGUI::Asset::File::Image',1,'pb.jpg pb.jpg style2 pb.jpg','000001000001000050000012',NULL),('7-0-style0000000000042','page_title_bg.jpg','','style2/page_title_bg.jpg',1147642502,1147642502,'3','7','12','WebGUI::Asset::File::Image',1,'page_title_bg.jpg page_title_bg.jpg style2 page title bg.jpg','000001000001000050000011',NULL),('7-0-style0000000000041','page_title.jpg','','style2/page_title.jpg',1147642502,1147642502,'3','7','12','WebGUI::Asset::File::Image',1,'page_title.jpg page_title.jpg style2 page title.jpg','000001000001000050000010',NULL),('7-0-style0000000000040','navbar_right.jpg','','style2/navbar_right.jpg',1147642502,1147642502,'3','7','12','WebGUI::Asset::File::Image',1,'navbar_right.jpg navbar_right.jpg style2 navbar right.jpg','000001000001000050000009',NULL),('7-0-style0000000000039','navbar_left.jpg','','style2/navbar_left.jpg',1147642502,1147642502,'3','7','12','WebGUI::Asset::File::Image',1,'navbar_left.jpg navbar_left.jpg style2 navbar left.jpg','000001000001000050000008',NULL),('7-0-style0000000000036','main_bg.jpg','','style2/main_bg.jpg',1147642501,1147642501,'3','7','12','WebGUI::Asset::File::Image',1,'main_bg.jpg main_bg.jpg style2 main bg.jpg','000001000001000050000005',NULL),('7-0-style0000000000038','navbar_bg.jpg','','style2/navbar_bg.jpg',1147642501,1147642501,'3','7','12','WebGUI::Asset::File::Image',1,'navbar_bg.jpg navbar_bg.jpg style2 navbar bg.jpg','000001000001000050000007',NULL),('7-0-style0000000000035','leftCol_header02.jpg','','style2/leftcol_header02.jpg',1147642501,1147642501,'3','7','12','WebGUI::Asset::File::Image',1,'leftCol_header02.jpg leftCol_header02.jpg style2 leftcol header02.jpg','000001000001000050000004',NULL),('7-0-style0000000000037','nav_bg.jpg','','style2/nav_bg.jpg',1147642501,1147642501,'3','7','12','WebGUI::Asset::File::Image',1,'nav_bg.jpg nav_bg.jpg style2 nav bg.jpg','000001000001000050000006',NULL),('7-0-style0000000000032','context_bg.jpg','','style2/context_bg.jpg',1147642500,1147642500,'3','7','12','WebGUI::Asset::File::Image',1,'context_bg.jpg context_bg.jpg style2 context bg.jpg','000001000001000050000001',NULL),('7-0-style0000000000031','WebGUI 7 Style 2','','root/import/webgui-7-style-2',1147642500,1147642500,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'WebGUI 7 Style 2 WebGUI 7 Style 2 root import webgui 7 style 2','000001000001000050',NULL),('7-0-style0000000000033','css02.css','','style2/css02.css',1147642500,1147642500,'3','7','12','WebGUI::Asset::Snippet',0,'css02.css css02.css style2 css02.css body html height:100 body background:#7c9ab0 url(\'^FileUrl(style2/main_bg.jpg repeat-y right margin:0px rightColumn width:20 height:100 background eeeeee url(\'^FileUrl(style2/rightCol_bg.jpg repeat-y right text-align:center rightColumn pb_wg_bg background url(\'^FileUrl(style2/pb_wg_bg.jpg repeat-x width:100 text-align:left rightColumn pb_wg background url(\'^FileUrl(style2/pb_wg.jpg left no-repeat height:53px leftColumn width:80 background white url(\'^FileUrl(style2/context_bg.jpg repeat-y right leftColumn header width:100 background:#7c9ab0 url(\'^FileUrl(style2/leftCol_header.jpg right no-repeat height:86px position:relative leftColumn header title leftColumn header title_bg color:white font-size:36pt font-weight:bold font-family:arial font-variant:small-caps letter-spacing:12px top:15px left:5px position:absolute z-index:10 leftColumn header title a color:white text-decoration:none leftColumn header title_bg color:black z-index:5 top:17px left:7px leftColumn context background fff url(\'^FileUrl(style2/context_bg.jpg repeat-y right width:95 font-family:verdana font-size:9pt color:#242424 moz-box-sizing:border-box position:relative padding-left:1 padding-right:1 padding-bottom:15px leftColumn context a color:#7C9AB0 font-weight:bold leftColumn context a:hover text-decoration:none leftColumn pageTitleBG background url(\'^FileUrl(style2/page_title_bg.jpg repeat-x width:100 leftColumn pageTitleBG pageTitle background url(\'^FileUrl(style2/page_title.jpg right no-repeat width:100 height:50px leftColumn pageTitleBG pageTitle h2 font-size:14pt color:#696969 font-family:arial font-weight:normal margin:0px padding-top:2px padding-left:25px letter-spacing:3px rightColumn nav width:85 background b5b5b5 url(\'^FileUrl(style2/nav_bg.jpg repeat-x top border-right:solid 848484 1px margin-left:auto margin-right:auto text-align:left padding-left:3px padding-top:7px padding-bottom:7px rightColumn nav a color:white font-size:8pt font-weight:bold text-decoration:none font-family:arial line-height:8pt rightColumn nav selectedMenuItem color:yellow loginStyles font-size:8pt font-family:arial padding-bottom:25px loginStyles a color:#89ACCF font-weight:bold border-bottom:solid transparent 2px text-decoration:none loginStyles a:hover border-bottom:dotted B2C9D9 2px copyright border-top:solid silver 3px background-color:gray font-family:arial font-size:9pt color:silver text-align:center ','000001000001000050000002',NULL),('7-0-style0000000000034','leftCol_header.jpg','','style2/leftcol_header.jpg',1147642500,1147642500,'3','7','12','WebGUI::Asset::File::Image',1,'leftCol_header.jpg leftCol_header.jpg style2 leftcol header.jpg','000001000001000050000003',NULL),('stevenav00000000000001','Style 01 Nav','','style1_nav',1147642499,1147642499,'3','7','12','WebGUI::Asset::Template',0,'Style 01 Nav Style 01 Nav style1 nav Navigation','000001000001000049000027',NULL),('PBnav000000style01lvl2','Style 01 Nav lvl2','','style1_nav_lvl2',1147642499,1147642499,'3','7','12','WebGUI::Asset::Template',0,'Style 01 Nav lvl2 untitled style1 nav lvl2 Navigation','000001000001000049000028',NULL),('7-0-style0000000000030','webgui_btn.jpg','','style1/webgui_btn.jpg',1147642499,1147642499,'3','7','12','WebGUI::Asset::File::Image',1,'webgui_btn.jpg webgui_btn.jpg style1 webgui btn.jpg','000001000001000049000029',NULL),('7-0-style0000000000026','RootTab Level 1','','roottab_level1',1147642499,1147642499,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'RootTab Level 1 RootTab Level 1 roottab level1','000001000001000049000025',NULL),('7-0-style0000000000024','orange_left01.jpg','','style1/orange_left01.jpg',1147642498,1147642498,'3','7','12','WebGUI::Asset::File::Image',1,'orange_left01.jpg orange_left01.jpg style1 orange left01.jpg','000001000001000049000023',NULL),('7-0-style0000000000023','nav_on.jpg','','style1/nav_on.jpg',1147642498,1147642498,'3','7','12','WebGUI::Asset::File::Image',1,'nav_on.jpg nav_on.jpg style1 nav on.jpg','000001000001000049000022',NULL),('7-0-style0000000000025','RootTab Level 0','','roottab_level0',1147642498,1147642498,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'RootTab Level 0 RootTab Level 0 roottab level0','000001000001000049000024',NULL),('7-0-style0000000000019','nav2_off_right.jpg','','style1/nav2_off_right.jpg',1147642497,1147642497,'3','7','12','WebGUI::Asset::File::Image',1,'nav2_off_right.jpg nav2_off_right.jpg style1 nav2 off right.jpg','000001000001000049000018',NULL),('7-0-style0000000000020','nav2_on_left.jpg','','style1/nav2_on_left.jpg',1147642497,1147642497,'3','7','12','WebGUI::Asset::File::Image',1,'nav2_on_left.jpg nav2_on_left.jpg style1 nav2 on left.jpg','000001000001000049000019',NULL),('7-0-style0000000000022','nav_bg.jpg','','style1/nav_bg.jpg',1147642497,1147642497,'3','7','12','WebGUI::Asset::File::Image',1,'nav_bg.jpg nav_bg.jpg style1 nav bg.jpg','000001000001000049000021',NULL),('7-0-style0000000000021','nav2_on_right.jpg','','style1/nav2_on_right.jpg',1147642497,1147642497,'3','7','12','WebGUI::Asset::File::Image',1,'nav2_on_right.jpg nav2_on_right.jpg style1 nav2 on right.jpg','000001000001000049000020',NULL),('7-0-style0000000000017','nav2_off_center.jpg','','style1/nav2_off_center.jpg',1147642496,1147642496,'3','7','12','WebGUI::Asset::File::Image',1,'nav2_off_center.jpg nav2_off_center.jpg style1 nav2 off center.jpg','000001000001000049000016',NULL),('7-0-style0000000000016','nav2_center_on.jpg','','style1/nav2_center_on.jpg',1147642496,1147642496,'3','7','12','WebGUI::Asset::File::Image',1,'nav2_center_on.jpg nav2_center_on.jpg style1 nav2 center on.jpg','000001000001000049000015',NULL),('7-0-style0000000000018','nav2_off_left.jpg','','style1/nav2_off_left.jpg',1147642496,1147642496,'3','7','12','WebGUI::Asset::File::Image',1,'nav2_off_left.jpg nav2_off_left.jpg style1 nav2 off left.jpg','000001000001000049000017',NULL),('7-0-style0000000000015','nav1_on_right.jpg','','style1/nav1_on_right.jpg',1147642496,1147642496,'3','7','12','WebGUI::Asset::File::Image',1,'nav1_on_right.jpg nav1_on_right.jpg style1 nav1 on right.jpg','000001000001000049000014',NULL),('7-0-style0000000000014','nav1_on_left.jpg','','style1/nav1_on_left.jpg',1147642495,1147642495,'3','7','12','WebGUI::Asset::File::Image',1,'nav1_on_left.jpg nav1_on_left.jpg style1 nav1 on left.jpg','000001000001000049000013',NULL),('7-0-style0000000000013','nav1_on.jpg','','style1/nav1_on.jpg',1147642495,1147642495,'3','7','12','WebGUI::Asset::File::Image',1,'nav1_on.jpg nav1_on.jpg style1 nav1 on.jpg','000001000001000049000012',NULL),('7-0-style0000000000011','nav1_off_left.jpg','','style1/nav1_off_left.jpg',1147642495,1147642495,'3','7','12','WebGUI::Asset::File::Image',1,'nav1_off_left.jpg nav1_off_left.jpg style1 nav1 off left.jpg','000001000001000049000010',NULL),('7-0-style0000000000012','nav1_off_right.jpg','','style1/nav1_off_right.jpg',1147642495,1147642495,'3','7','12','WebGUI::Asset::File::Image',1,'nav1_off_right.jpg nav1_off_right.jpg style1 nav1 off right.jpg','000001000001000049000011',NULL),('7-0-style0000000000009','nav1_off.jpg','','style1/nav1_off.jpg',1147642494,1147642494,'3','7','12','WebGUI::Asset::File::Image',1,'nav1_off.jpg nav1_off.jpg style1 nav1 off.jpg','000001000001000049000008',NULL),('7-0-style0000000000010','nav1_off_center.jpg','','style1/nav1_off_center.jpg',1147642494,1147642494,'3','7','12','WebGUI::Asset::File::Image',1,'nav1_off_center.jpg nav1_off_center.jpg style1 nav1 off center.jpg','000001000001000049000009',NULL),('7-0-style0000000000008','nav1_center_on.jpg','','style1/nav1_center_on.jpg',1147642494,1147642494,'3','7','12','WebGUI::Asset::File::Image',1,'nav1_center_on.jpg nav1_center_on.jpg style1 nav1 center on.jpg','000001000001000049000007',NULL),('7-0-style0000000000006','main_bg.gif','','style1/main_bg.gif',1147642493,1147642493,'3','7','12','WebGUI::Asset::File::Image',1,'main_bg.gif main_bg.gif style1 main bg.gif','000001000001000049000005',NULL),('7-0-style0000000000007','main_bg.jpg','','style1/main_bg.jpg',1147642493,1147642493,'3','7','12','WebGUI::Asset::File::Image',1,'main_bg.jpg main_bg.jpg style1 main bg.jpg','000001000001000049000006',NULL),('7-0-style0000000000004','gui_bottom.jpg','','style1/gui_bottom.jpg',1147642493,1147642493,'3','7','12','WebGUI::Asset::File::Image',1,'gui_bottom.jpg gui_bottom.jpg style1 gui bottom.jpg','000001000001000049000003',NULL),('7-0-style0000000000005','header.jpg','','style1/header.jpg',1147642493,1147642493,'3','7','12','WebGUI::Asset::File::Image',1,'header.jpg header.jpg style1 header.jpg','000001000001000049000004',NULL),('7-0-style0000000000001','WebGUI 7 Style 1','','root/import/webgui-7-style-1',1147642492,1147642492,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'WebGUI 7 Style 1 WebGUI 7 Style 1 root import webgui 7 style 1','000001000001000049',NULL),('7-0-style0000000000002','body_bg.jpg','','style1/body_bg.jpg',1147642492,1147642492,'3','7','12','WebGUI::Asset::File::Image',1,'body_bg.jpg body_bg.jpg style1 body bg.jpg','000001000001000049000001',NULL),('7-0-style0000000000003','css01.css','','style1/css01.css',1147642492,1147642492,'3','7','12','WebGUI::Asset::Snippet',0,'css01.css css01.css style1 css01.css body html text-align:center margin:0px height:100 background-color:#494949 main width:800px background url(\'^FileUrl(style1/main_bg.jpg repeat-y height:100 margin-left:auto margin-right:auto margin-top:0px margin-bottom:0px position:relative body > main height:auto min-height:100 main mainHeader width:800px height:133px background url(\'^FileUrl(style1/header.jpg top left no-repeat margin-bottom:0px position:relative main mainHeader title position:absolute top:23px left:145px font-size:32pt font-family:arial color:white font-weight:bold main mainHeader title a color:white text-decoration:none main mainContent background url(\'^FileUrl(style1/orange_left01.jpg left top no-repeat width:100 height:100 margin-top:0px text-align:left border:solid red 0px main > mainContent margin-top:0px min-height:500px main > mainContent > p margin-top:0px main mainContent mainText a:link color:#FF7F23 main mainContent mainText a:visited color:#D25900 LEVEL 1 AND 2 NAVIGATION main mainNav_1 main mainNav_2 border-bottom:dashed DADADA 1px width:621px height:25px text-align:left position:relative margin-left:137px clear:both main mainNav_1 a:link main mainNav_1 a:visited main mainNav_2 a:link main mainNav_2 a:visited color:white text-decoration:none top:5px position:relative moz-box-sizing:border-box main mainNav_1 a:hover,#main mainNav_2 a:hover color:black main mainNav_1 div left main mainNav_2 div left width:12px height:25px display:block float:left background url(\'^FileUrl(style1/nav1_off_left.jpg no-repeat top left main mainNav_2 div left background url(\'^FileUrl(style1/nav2_off_left.jpg no-repeat top left main mainNav_1 div center main mainNav_2 div center height:25px display:block float:left background url(\'^FileUrl(style1/nav1_off_center.jpg repeat-x top left color:white font-family:arial verdana font-size:8pt main mainNav_2 div center background url(\'^FileUrl(style1/nav2_off_center.jpg repeat-x top left main mainNav_1 div right main mainNav_2 div right width:10px height:25px display:block float:left background url(\'^FileUrl(style1/nav1_off_right.jpg no-repeat top left main mainNav_2 div right background url(\'^FileUrl(style1/nav2_off_right.jpg no-repeat top left main mainNav_1 div.navOn left background url(\'^FileUrl(style1/nav1_on_left.jpg no-repeat top left main mainNav_1 div.navOn center background url(\'^FileUrl(style1/nav1_center_on.jpg repeat-x top left main mainNav_1 div.navOn right background url(\'^FileUrl(style1/nav1_on_right.jpg no-repeat top left main mainNav_2 div.navOn left background url(\'^FileUrl(style1/nav2_on_left.jpg no-repeat top left main mainNav_2 div.navOn center background url(\'^FileUrl(style1/nav2_center_on.jpg repeat-x top left main mainNav_2 div.navOn right background url(\'^FileUrl(style1/nav2_on_right.jpg no-repeat top left main mainNav_1 div.navOn a:link main mainNav_1 div.navOn a:visited main mainNav_2 div.navOn a:link main mainNav_2 div.navOn a:visited color:black ENDOF LEVEL 1 AND 2 NAVIGATION main crumbTrail margin-left:177px margin-bottom:0px color:gray font-size:8pt font-weight:bold main crumbTrail a.crumbTrail:visited main crumbTrail a.crumbTrail:link color:silver font-size:8pt font-family:arial text-decoration:none font-weight:normal main crumbTrail a.crumbTrail:hover color:gray main mainText padding-left:150px font-family:verdana font-size:9pt width:600px margin-top:0px main gui bottom:0px left:0px position:absolute width:135px font-size:8pt color:black font-family:arial text-align:right main gui loginBox padding-right:12px moz-box-sizing:border-box width:100px float:right margin-bottom:10px main gui loginBox loginBoxField width:75px main gui loginBox loginBoxButton background-color:#D65501 color:white border:solid white 2px margin-top:4px font-variant:small-caps main gui a color:white copyright color:#fff position:absolute top:110px right:40px font-family:verdana font-size:8pt font-weight:bold background-color:#2D2D2D opacity:0.4 moz-opacity:0.4 khtml-opacity:0.4 padding:2px html copyright background transparent ','000001000001000049000002',NULL),('7F-BuEHi7t9bPi008H8xZQ','Default Survey Summary','','root/import/survey/default-survey-summary',1239248021,1250243000,'3','7','12','WebGUI::Asset::Template',0,'Default Survey Summary Default Survey Summary root import survey default survey summary Survey/Summary','000001000001000042000012',NULL),('CSN-ZON7Uwv8kxf3F1fh5Q','ZipArchiveAsset','','root/import/ziparchiveasset',1147642484,1147642484,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'ZipArchiveAsset ZipArchiveAsset root import ziparchiveasset','000001000001000053',NULL),('TCtybxdqmdwdvRn555zpCQ','RichEdit','','root/import/richedit',1147642484,1147642484,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'RichEdit RichEdit root import richedit','000001000001000032',NULL),('NywJYmGWe1f6EBXJnWg9Xg','Profile','','root/import/profile',1222803606,1222803638,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Profile Profile root import profile','000001000001000029',NULL),('9wKWdum0_8z-OhhquWLtSQ','WeatherData','','root/import/weatherdata',1147642483,1147642483,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'WeatherData WeatherData root import weatherdata','000001000001000048',NULL),('AgyFhx3eXlfZXNp2MkrsiQ','Edit','','root/import/profile/edit',1147642477,1222803665,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Edit Edit root import profile edit','000001000001000029000001',NULL),('F7MAQ-cpuvQ1KuC7J4P5zQ','View','','root/import/profile/view',1147642477,1222803673,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'View View root import profile view','000001000001000029000002',NULL),('oGfxez5sksyB_PcaAsEm_Q','SyndicatedContent','','root/import/syndicatedcontent',1147642482,1247053097,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'SyndicatedContent SyndicatedContent root import syndicatedcontent','000001000001000043',NULL),('5bnNzteN7w3NnK9mF4XiCg','Survey','','root/import/survey',1147642481,1250243000,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Survey Survey root import survey','000001000001000042',NULL),('Efe2W0UgrSRDltNJ87jlfg','StockData','','root/import/stockdata',1147642480,1147642480,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'StockData StockData root import stockdata','000001000001000039',NULL),('bbiA9Zq5Gy2oCFBlILO3QA','SQLReport','','root/import/sqlreport',1147642480,1147642480,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'SQLReport SQLReport root import sqlreport','000001000001000038',NULL),('RrV4aAPnn4dM0ZcU3OXnlw','style','','root/import/style',1147642480,1286336607,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'style style root import style','000001000001000041',NULL),('Ik9HHky10DIyFTKehUD1dw','Prompt','','root/import/prompt',1147642479,1222803478,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Prompt Prompt root import prompt','000001000001000031',NULL),('f_tn9FfoSfKWX43F83v_3w','Search','','root/import/search',1147642479,1247053009,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Search Search root import search','000001000001000034',NULL),('Da6KWn805L4B5e4HFgQRQA','Shortcut','','root/import/shortcut',1147642479,1147642479,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Shortcut Shortcut root import shortcut','000001000001000037',NULL),('TYo2Bwl7aafzTtdHlS-arQ','Product','','root/import/product',1147642478,1211664878,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Product Product root import product','000001000001000028',NULL),('VZK3CRgiMb8r4dBjUmCTgQ','Poll','','root/import/poll',1147642477,1247046242,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Poll Poll root import poll','000001000001000027',NULL),('jEz8iTGNWEt2I05IhVV19Q','Operation/RedeemSubscription','','root/import/operation/redeemsubscription',1147642477,1313542961,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Operation/RedeemSubscription Operation/RedeemSubscription root import operation redeemsubscription','000001000001000036000016',NULL),('BFfNj5wA9bDw8H3cnr8pTw','Navigation','','root/import/navigation',1147642475,1247046273,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Navigation Navigation root import navigation','000001000001000025',NULL),('bBzO4CWjqU_ile3gf5Iypw','MultiSearch','','root/import/multisearch',1147642475,1147642475,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'MultiSearch MultiSearch root import multisearch','000001000001000024',NULL),('cj2y4papTVGZRFdwTI-_fw','MessageBoard','','root/import/messageboard',1147642475,1147642475,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'MessageBoard MessageBoard root import messageboard','000001000001000023',NULL),('3womoo7Teyy2YKFa25-MZg','Address Book (Default)','','shopping-cart-collateral-items/address-book-default',1212098997,1313542961,'3','7','3','WebGUI::Asset::Template',0,'Address Book Default Address Book Default shopping cart collateral items address book default Shop/AddressBook','000001000001000036000013',NULL),('g8W53Pd71uHB9pxaXhWf_A','My Purchases Detail (Default)','','shopping-cart-collateral-items/my-purchases-detail-default',1213184121,1313542961,'3','7','3','WebGUI::Asset::Template',0,'My Purchases Detail Default My Purchases Detail Default shopping cart collateral items my purchases detail default Shop/MyPurchasesDetail','000001000001000036000015',NULL),('-WM2dt0ZGpDasuL2wWocxg','ProjectManager','','root/import/projectmanager',1222803056,1222803056,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'ProjectManager ProjectManager root import projectmanager','000001000001000030',NULL),('LdiozcIUciWuvt3Z-na5Ww','Matrix','','root/import/matrix',1147642474,1281501162,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Matrix Matrix root import matrix','000001000001000022',NULL),('default_post_received1','Default Post Received','','default_post_received',1222708029,1277868922,'3','7','4','WebGUI::Asset::Template',0,'Default Post Received Default Post Received default post received Collaboration/PostReceived','000001000001000008000029',NULL),('aNNC62qLAS6TB-0_MCYjsw','Layout','','root/import/layout',1147642471,1246969327,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Layout Layout root import layout','000001000001000019',NULL),('GYaFxnMu9UsEG8oanwB6TA','Folder','','root/import/folder',1147642470,1246965871,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Folder Folder root import folder','000001000001000014',NULL),('N13SD1Fpqk00UgBt1Z8ivQ','HttpProxy','','root/import/httpproxy',1147642470,1147642470,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'HttpProxy HttpProxy root import httpproxy','000001000001000016',NULL),('tPagC0AQErZXjLFZQ6OI1g','ImageAsset','','root/import/imageasset',1147642470,1246966459,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'ImageAsset ImageAsset root import imageasset','000001000001000017',NULL),('3uuBf8cYuj1sew2OJXl9tg','InOutBoard','','root/import/inoutboard',1147642470,1147642470,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'InOutBoard InOutBoard root import inoutboard','000001000001000018',NULL),('PBtmpl0000000000000005','Default LDAP Anonymous Registration Template','','default_ldap_anonymous_registration_template',1124395696,1287545014,'3','7','12','WebGUI::Asset::Template',0,'Default LDAP Anonymous Registration Template Default LDAP Anonymous Registration Template default ldap anonymous registration template Auth/LDAP/Create','000001000001000005000002000001',NULL),('PBtmpl0000000000000011','Default WebGUI Anonymous Registration Template','','default_webgui_anonymous_registration_template',1124395696,1287545014,'3','7','12','WebGUI::Asset::Template',0,'Default WebGUI Anonymous Registration Template Default WebGUI Anonymous Registration Template default webgui anonymous registration template Auth/WebGUI/Create','000001000001000005000005000001',NULL),('tXwf1zaOXTvsqPn6yu-GSw','FileAsset','','root/import/fileasset',1147642469,1246965607,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'FileAsset FileAsset root import fileasset','000001000001000013',NULL),('S1A9iAwKcQQ6P20uTqw-Ew','Dashboard','','root/import/dashboard',1147642468,1300763664,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Dashboard Dashboard root import dashboard','000001000001000009',NULL),('-K8Hj45mbelljN9-0CXZxg','DataForm',' ','root/import/dataform',1147642468,1257311887,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'DataForm DataForm root import dataform','000001000001000010',NULL),('GNOAsX98vCsl0JRwfwL-gg','Collaboration','','root/import/collaboration',1147642466,1277868921,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Collaboration Collaboration root import collaboration','000001000001000008',NULL),('pbtmpl0000000000000220','Flash Style 3 Template','','flash-style-3-template',1147642465,1247488979,'3','7','12','WebGUI::Asset::Template',0,'Flash Style 3 Template Flash Style 3 Template flash style 3 template FileAsset','000001000001000013000002',NULL),('pbtmpl0000000000000221','Flash Tutorial Template','','flash-tutorial-template',1147642465,1247487940,'3','7','12','WebGUI::Asset::Template',0,'Flash Tutorial Template Flash Tutorial Template flash tutorial template FileAsset','000001000001000013000003',NULL),('nbSrhXZQuxIjhWFaFPSuVA','AdminConsole','','root/import/adminconsole',1147642465,1147642465,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'AdminConsole AdminConsole root import adminconsole','000001000001000003',NULL),('TvOZs8U1kRXLtwtmyW75pg','Article','','root/import/article',1147642465,1256092368,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Article Article root import article','000001000001000004',NULL),('PBtmpl0000000000000027','Default Forum Notification','','default_forum_notification',1124395696,1311652541,'3','7','12','WebGUI::Asset::Template',0,'Default Forum Notification Default Forum Notification default forum notification Collaboration/Notification','000001000001000008000015',NULL),('-PkdI8l1idu-8gDX3iOdcw','One Over Two','','one_over_two',1247482172,1259133274,'3','7','12','WebGUI::Asset::Template',0,'One Over Two One Over Two one over two Layout','000001000001000019000007',NULL),('FEDP3dk8J3Chw_gyr7_XEQ','navigation.css','','navigation.css',1246278679,1246278679,'3','7','12','WebGUI::Asset::Snippet',0,'navigation.css navigation.css navigation.css Horizontal Menu styles horizontalMenu ul.menu padding 0 margin 0 0 1em list-style none width 100 clear floated li elements overflow auto clear floated li elements horizontalMenu ul.menu li float left horizontalMenu ul.menu li a float left padding 4px 8px margin-right 1px background ddd color 000 text-decoration none horizontalMenu ul.menu li.current a background:#eee horizontalMenu ul.menu li a:hover background:#fff Tabs tabbed navigation styles tabsMenu ul.menu margin 0 0 1em tabsMenu ul.menu li display inline tabsMenu ul.menu li a border 1px solid 999 border-bottom 0 padding 5px 10px 2px color 777 text-decoration:none tabsMenu ul.menu li.current a tabsMenu ul.menu li a:hover border 1px solid 000 border-bottom 0 color 000 Indent Nav styles indentMenu a.level0 margin-left:0px display:block indentMenu a.level1 margin-left:15px display:block indentMenu a.level2 margin-left:30px display:block indentMenu a.level3 margin-left:45px display:block indentMenu a.level4 margin-left:60px display:block ','000001000001000025000028',NULL),('PBnav00000000indentnav','Indent Nav','','indent_nav',1148579525,1259133275,'3','7','12','WebGUI::Asset::Template',0,'Indent Nav Indent Nav indent nav Navigation','000001000001000025000027',NULL),('PBtmpl0000000000000085','Default Email','','default_email',1124395696,1288747840,'3','7','12','WebGUI::Asset::Template',0,'Default Email Default Email default email DataForm','000001000001000010000002',NULL),('PBnav00000000000bullet','Bulleted List','','bulleted_list',1148579524,1259133276,'3','7','12','WebGUI::Asset::Template',0,'Bulleted List Bulleted List bulleted list Navigation','000001000001000025000026',NULL),('StockDataTMPL000000002','StockData Default Display','','stockdatatmpl000000002',1133743239,1229494994,'3','7','12','WebGUI::Asset::Template',0,'StockData Default Display StockData Default Display stockdatatmpl000000002 StockData/Display','000001000001000039000001',NULL),('2OcUWHVsu_L1sDFzIMWYqw','TimeTracking','','root/import/timetracking',1222803070,1222803070,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'TimeTracking TimeTracking root import timetracking','000001000001000046',NULL),('PBtmpl0000000000000014','Default WebGUI Password Recovery Template','','default_webgui_password_recovery_template',1124395696,1287545015,'3','7','12','WebGUI::Asset::Template',0,'Default WebGUI Password Recovery Template Default WebGUI Password Recovery Template default webgui password recovery template Auth/WebGUI/Recovery2','000001000001000005000008000001',NULL),('ProjectManagerTMPL0006','Default Resource List','','default-pm-resource-list',1157679165,1157679165,'3','7','12','WebGUI::Asset::Template',0,'Default Resource List Default Resource List default pm resource list ProjectManager_resourceList','000001000001000030000005000001',NULL),('ProjectManagerTMPL0005','Default Resource Popup','','default-pm-resource-popup',1157679165,1229579830,'3','7','12','WebGUI::Asset::Template',0,'Default Resource Popup Default Resource Popup default pm resource popup ProjectManager_resourcePopup','000001000001000030000005000002',NULL),('PBtmpl0000000000000032','Default Thread','','default_thread',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'Default Thread Default Thread default thread Collaboration/Thread','000001000001000008000014',NULL),('WeatherDataTmpl0000001','WeatherData Default View','','weatherdatatmpl0000001',1133743239,1210711353,'3','7','12','WebGUI::Asset::Template',0,'WeatherData Default View WeatherData Default View weatherdatatmpl0000001 WeatherData','000001000001000048000001',NULL),('PBasset000000000000001','Root','','root',1124395696,1124395696,'3','7','3','WebGUI::Asset',0,'Root Root root','000001',NULL),('PBrichedit000000000001','Content Manager\'s Rich Edit','','content_managers_rich_edit',1124395696,1256092369,'3','7','12','WebGUI::Asset::RichEdit',0,'Content Manager\'s Rich Edit Content Manager\'s Rich Edit content managers rich edit','000001000001000032000001',NULL),('PBrichedit000000000002','Forum Rich Edit','','forum_rich_edit',1124395696,1124395696,'3','7','12','WebGUI::Asset::RichEdit',0,'Forum Rich Edit Forum Rich Edit forum rich edit','000001000001000032000002',NULL),('SynConXSLT000000000001','RSS 0.9 XSLT Stylesheet','','xslt/rss0.9.xsl',1124395707,1124395707,'3','7','12','WebGUI::Asset::Snippet',0,'RSS 0.9 XSLT Stylesheet RSS 0.9 XSLT xslt rss0.9.xsl You\'re viewing an RSS version 0.9 feed Please use an RSS feed reader to view this content as intended','000001000001000043000003',NULL),('SynConXSLT000000000002','RSS 0.91 XSLT Stylesheet','','xslt/rss0.91.xsl',1124395707,1124395707,'3','7','12','WebGUI::Asset::Snippet',0,'RSS 0.91 XSLT Stylesheet RSS 0.91 XSLT xslt rss0.91.xsl You\'re viewing an RSS version 0.91 feed Please use an RSS feed reader to view this content as intended','000001000001000043000004',NULL),('SynConXSLT000000000003','RSS 1.0 XSLT Stylesheet','','xslt/rss1.0.xsl',1124395707,1124395707,'3','7','12','WebGUI::Asset::Snippet',0,'RSS 1.0 XSLT Stylesheet RSS 1.0 XSLT xslt rss1.0.xsl You\'re viewing an RSS version 1.0 feed Please use an RSS feed reader to view this content as intended ','000001000001000043000005',NULL),('SynConXSLT000000000004','RSS 2.0 XSLT Stylesheet','','xslt/rss2.0.xsl',1124395707,1124395707,'3','7','12','WebGUI::Asset::Snippet',0,'RSS 2.0 XSLT Stylesheet RSS 2.0 XSLT xslt rss2.0.xsl You\'re viewing an RSS version 2.0 feed Please use an RSS feed reader to view this content as intended ','000001000001000043000006',NULL),('vrKXEtluIhbmAS9xmPukDA','Donation (Default)','','root/import/default-donation-template',1212092352,1313542961,'3','7','12','WebGUI::Asset::Template',0,'Donation Default Donation Default root import default donation template Donation','000001000001000036000010',NULL),('eqb9sWjFEVq0yHunGV8IGw','Subscription (Default)','','root/import/subscription-default',1213182595,1313542961,'3','7','12','WebGUI::Asset::Template',0,'Subscription Default Subscription Default root import subscription default Subscription','000001000001000036000012',NULL),('PBtmpl0000000000000036','Default Admin Toggle Macro','','default_admin_toggle_macro',1124395696,1129049186,'3','7','12','WebGUI::Asset::Template',0,'Default Admin Toggle Macro Default Admin Toggle Macro default admin toggle macro Macro/AdminToggle','000001000001000021000001000001',NULL),('PBtmpl0000000000000037','Default Account Macro','','default_account_macro',1124395696,1129049186,'3','7','12','WebGUI::Asset::Template',0,'Default Account Macro Default Account Macro default account macro Macro/a_account','000001000001000021000002000001',NULL),('PBtmpl0000000000000038','Default Editable Toggle Macro','','default_editable_toggle_macro',1124395696,1129049186,'3','7','12','WebGUI::Asset::Template',0,'Default Editable Toggle Macro Default Editable Toggle Macro default editable toggle macro Macro/EditableToggle','000001000001000021000003000001',NULL),('PBtmpl0000000000000040','Default Group Add Macro','','default_group_add_macro',1124395696,1129049186,'3','7','12','WebGUI::Asset::Template',0,'Default Group Add Macro Default Group Add Macro default group add macro Macro/GroupAdd','000001000001000021000005000001',NULL),('PBtmpl0000000000000041','Default Group Delete Macro','','default_group_delete_macro',1124395696,1129049186,'3','7','12','WebGUI::Asset::Template',0,'Default Group Delete Macro Default Group Delete Macro default group delete macro Macro/GroupDelete','000001000001000021000006000001',NULL),('PBtmpl0000000000000042','Default Homelink','','default_homelink',1124395696,1129049186,'3','7','12','WebGUI::Asset::Template',0,'Default Homelink Default Homelink default homelink Macro/H_homeLink','000001000001000021000007000001',NULL),('PBtmpl0000000000000043','Default LoginToggle','','default_logintoggle',1124395696,1129049186,'3','7','12','WebGUI::Asset::Template',0,'Default LoginToggle Default LoginToggle default logintoggle Macro/LoginToggle','000001000001000021000008000001',NULL),('PBtmpl0000000000000045','Default Make Printable','','default_make_printable',1124395696,1129049186,'3','7','12','WebGUI::Asset::Template',0,'Default Make Printable Default Make Printable default make printable Macro/r_printable','000001000001000021000011000001',NULL),('PBtmpl0000000000000091','File no icon','','file_no_icon',1124395696,1129049189,'3','7','12','WebGUI::Asset::Template',0,'File no icon File no icon file no icon Macro/File','000001000001000021000004000002',NULL),('MK4fCNoyrx5SE8eyDfOpxg','Flash File','','flash-file',1247489252,1259133276,'3','7','12','WebGUI::Asset::Template',0,'Flash File Flash File flash file FileAsset','000001000001000013000004',NULL),('PBtmpl0000000000000132','Empty','','empty',1124395696,1258524916,'3','7','12','WebGUI::Asset::Template',0,'Empty Empty empty style','000001000001000041000004',NULL),('PBtmpl0000000000000140','Default Shortcut','','pbtmpl0000000000000140',1124395696,1129573244,'3','7','12','WebGUI::Asset::Template',0,'Default Shortcut Default Shortcut pbtmpl0000000000000140 Shortcut','000001000001000037000001',NULL),('hkj6WeChxFyqfP85UlRP8w','matrix.css','','new-matrix/matrix.css',1232664229,1281501163,'3','7','12','WebGUI::Asset::Snippet',0,'matrix.css matrix.css new matrix matrix.css wg-clear display inline clear both font-size:0px line-height:0px COLUMN STYLES matrixLeft float:left width:65 padding:1 min-height:1 background-color:#d2d2d2 moz-border-radius:4px webkit-border-radius 4px matrixRight float:left width:25 padding:0px min-height:1 moz-border-radius:4px webkit-border-radius 4px border solid silver 1px background-color:white margin-left:5px DROPSHADOW BUTTONS matrixLeft buttons span background-color:#888 position:relative padding:5px 0px 0px 0px moz-border-radius:4px webkit-border-radius 4px matrixLeft buttons button matrixLeft buttons a#return border:solid 2f495e 2px position:relative background-color:#e1e1e1 padding:auto 3px margin:0px font-size:11px line-height:13px position:relative top:-6px left:-2px height:22px cursor:pointer moz-border-radius:4px webkit-border-radius 4px font-weight:bold text-decoration:none color:#333 matrixLeft buttons a#return font-size:10px padding:3px 10px 2px 10px matrixLeft buttons button:hover matrixLeft buttons a#return:hover border-color:black color:white background-color:#444 WHITE AREA FOR THE LISTING OF OBJECTS TO COMPARE matrixLeft matrixListing background-color:white height:300px min-height:300px moz-border-radius:4px webkit-border-radius 4px margin:10px 2px 20px 2px padding:auto 10px matrixLeft matrixListing table border-collapse:collapse margin:0px padding:0px display:block matrixLeft matrixListing table a:link font-size:12px color:#111 matrixLeft matrixListing table a:visited color:#333 font-size:12px text-decoration:none matrixLeft matrixListing table a:hover text-decoration:none GRAY BAR THAT HOLDS THE SORT BUTTONS matrixLeft matrixListing sortButtons background-color:#f1f1f1 border:solid silver 1px moz-border-radius-topLeft:4px moz-border-radius-topRight:4px webkit-border-radius-topLeft 4px webkit-border-radius-topRight 4px border-bottom:solid D2D2D2 2px display:block STYLES TO OVERRIDE THE SORT BUTTON CSS BUILT INTO THE PERL CODE sortByViews-button sortByCompares-button sortByUpdated-button sortByClicks-button sortByName-button background none white-space:nowrap border-style:none cursor:pointer padding-bottom:4px border-style:none background-color:transparent border-right:solid silver 1px color:#555 sortByViews-button:hover sortByCompares-button:hover sortByUpdated-button:hover sortByClicks-button:hover sortByName-button:hover color:black MATRIX STATISTICS matrixRight mainTitle font-size:20px padding:5px 10px border-bottom solid gray 1px background-color:#d2d2d2 matrixRight textBox border-top:solid silver 1px padding:10px 5px matrixStatistics padding:10px matrixStatistics title font-weight:bold background-color:#f1f1f1 padding:2px 5px font-size:11px moz-border-radius:4px border:solid d2d2d2 1px matrixStatistics statistics margin-bottom:15px matrixStatistics label text-align:right width:100px font-size:10px matrixStatistics data font-size:10px matrixStatistics data a color:#111 matrixStatistics data a:hover text-decoration:none LINKS TO CONTROL ADMIN FUNCTIONS adminLinks background-color:#f1f1f1 adminLinks a:link adminLinks a:visited display:block text-align:center text-decoration:none color:#555 font-weight:normal font-size:10px padding:2px 5px border-top:solid silver 1px adminLinks a:hover color:black adminLinks a.newLink:link adminLinks a.newLink:visited background-color:#3498d1 color:white display:block adminLinks a.newLink:hover background-color:#39a6e5 STYLE FOR THE DETAILED LISTING matrixDetail min-width:1000px matrixDetail editBtns font-size:9px line-height:11px vertical-align:middle font-weight:normal margin-left:10px matrixDetail editBtns a color:black text-decoration:underline matrixDetail editBtns a:hover text-decoration:none matrixDetail stats screenshot float:left margin-right:20px matrixDetail commentsMail strong.title margin-bottom:0px margin-top:20px display:block background-color:#d2d2d2 padding:2px 10px border:solid 1px gray border-bottom-color:silver moz-border-radius-topLeft:4px moz-border-radius-topRight:4px matrixDetail assetAspectComments margin:0px 0px 20px 0px border:solid gray 1px background-color:#f1f1f1 moz-border-radius-bottomLeft:4px moz-border-radius-bottomRight:4px matrixDetail assetAspectComments assetAspectComment border-top:solid silver 1px border-bottom:solid gray 1px padding:3px background-color:#f5f5f5 matrixDetail assetAspectComments assetAspectCommentForm border-top:solid d2d2d2 5px padding:20px matrixDetail stats ul matrixDetail stats ul li list-style-type:none margin:0px padding:0px matrixDetail stats ul li display:block line-height:20px margin:4px 0px matrixDetail stats ul li strong display:block float:left width:130px text-align:right background-color:#f1f1f1 padding-right:5px margin-right:5px moz-border-radius:4px webkit-border-radius:3px font-size:11px border:solid d2d2d2 1px showLink background-color:#e1e1e1 border:2px solid 2F495E moz-border-radius:4px webkit-border-radius:4px padding:3px 10px text-decoration:none color:black showLink:hover hideLink:hover background-color:#555 color:white hideLink background-color:#f1f1f1 border:2px solid 2F495E border-bottom-style:none moz-border-radius-topLeft:4px moz-border-radius-topRight:4px webkit-border-radius-topLeft:4px webkit-border-radius-topRight:4px padding:3px 10px text-decoration:none color:black matrixMail background-color:#f1f1f1 padding:15px border:2px solid 2F495E moz-border-radius:4px moz-border-radius-topLeft:0px webkit-border-radius:4px webkit-border-radius-topLeft:0px margin-top:1px matrixMail tableData padding:5px margin:0px matrixMail input padding:0px margin:0px matrixMail formDescription text-align:right vertical-align:middle padding-right:10px font-weight:bold matrixMail form img margin-top:-18px matrixMail verify_formId height:45px line-height:45px font-size:35px padding:0px margin:0px margin-right:20px matrixRatings width:264px position:relative left:-2px top:12px matrixRatings table margin-left:0px matrixRatings td overflow:hidden matrixRatings formDescription text-align:right background-color:#97BCD1 border:solid 4D606B 1px padding:2px 5px font-weight:bold font-size:10x moz-border-radius:4px webkit-border-radius:4px color:#333 matrixRatings formDescription a:before text-decoration:none matrixRatings formDescription a display:block color:red text-decoration:none matrixRatings formDescription a:hover text-decoration:underline matrixAttributes float:left width:40 min-width:20 max-width:45 margin-right:20px rightDetails float:left width:20 min-width:20 max-width:45 attributes border:solid d2d2d2 1px background-color:#f1f1f1 margin-top:10px moz-border-radius:4px webkit-border-radius:4px padding:10px attributes table border-collapse:collapse padding:0px margin:0px attributes table td padding:2px margin:0px yui-dt0-col-value font-weight:bold font-size:14px padding:3px white-space:no-wrap COMPARISON STYLES compareList table border-collapse:collapse border:solid silver 1px margin-top:5px compareList table th a color:black padding:1px 5px compareList table td background-color:#f1f1f1 border-top:solid gray 1px border-bottom:solid silver 1px compareList yui-dt-liner color:#39A6E5 compareList yui-dt-col-name yui-dt-liner font-style:italic font-size:10px color:#555 compareList yui-dt-col-name yui-dt-liner b font-size:15px font-style:normal padding-right:25px color:black ','000001000001000022000006',NULL),('ZipArchiveTMPL00000001','Default Zip Archive Template','','zip-archive-template',1133743240,1169738426,'3','7','12','WebGUI::Asset::Template',0,'Default Zip Archive Template Default Zip Archive Template zip archive template ZipArchiveAsset','000001000001000053000001',NULL),('PBasset000000000000002','Import Node','','root/import',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Import Node Import root import','000001000001',NULL),('_iHetEvMQUOoxS-T2CM0sQ','Getting Started','','getting_started',1124395696,1273172789,'3','7','3','WebGUI::Asset::Wobject::Layout',1,'Getting Started Getting Started getting started','000001000002000001',NULL),('x3OFY6OJh_qsXkZfPwug4A','Site Map','','site_map',1124395696,1271348790,'3','7','3','WebGUI::Asset::Wobject::Layout',1,'Site Map Site Map site map','000001000002000005',NULL),('PBnav00000000000000001','crumbTrail','','crumbtrail',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'crumbTrail crumbTrail crumbtrail','000001000001000025000008',NULL),('PBnav00000000000000002','SpecificSubMenuVertical','','specificsubmenuvertical',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'SpecificSubMenuVertical SpecificSubMenuVertical specificsubmenuvertical','000001000001000025000017',NULL),('PBnav00000000000000006','SpecificSubMenuHorizontal','','specificsubmenuhorizontal',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'SpecificSubMenuHorizontal SpecificSubMenuHorizontal specificsubmenuhorizontal','000001000001000025000018',NULL),('PBnav00000000000000007','TopLevelMenuVertical','','toplevelmenuvertical',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'TopLevelMenuVertical TopLevelMenuVertical toplevelmenuvertical','000001000001000025000019',NULL),('PBnav00000000000000008','TopLevelMenuHorizontal','','toplevelmenuhorizontal',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'TopLevelMenuHorizontal TopLevelMenuHorizontal toplevelmenuhorizontal','000001000001000025000020',NULL),('PBnav00000000000000009','RootTab','','roottab',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'RootTab RootTab roottab','000001000001000025000021',NULL),('PBnav00000000000000010','TopDropMenu','','topdropmenu',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'TopDropMenu TopDropMenu topdropmenu','000001000001000025000022',NULL),('PBnav00000000000000011','dtree','','dtree',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'dtree dtree dtree','000001000001000025000023',NULL),('PBnav00000000000000012','coolmenu','','coolmenu',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'coolmenu coolmenu coolmenu','000001000001000025000024',NULL),('PBnav00000000000000013','Synopsis','','synopsis',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'Synopsis Synopsis synopsis','000001000001000025000025',NULL),('PBnav00000000000000014','FlexMenu','','flexmenu',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'FlexMenu FlexMenu flexmenu','000001000001000025000009',NULL),('PBnav00000000000000015','currentMenuVertical','','currentmenuvertical',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'currentMenuVertical currentMenuVertical currentmenuvertical','000001000001000025000010',NULL),('PBnav00000000000000016','currentMenuHorizontal','','currentmenuhorizontal',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'currentMenuHorizontal currentMenuHorizontal currentmenuhorizontal','000001000001000025000011',NULL),('PBnav00000000000000017','PreviousDropMenu','','previousdropmenu',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'PreviousDropMenu PreviousDropMenu previousdropmenu','000001000001000025000012',NULL),('PBnav00000000000000018','previousMenuVertical','','previousmenuvertical',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'previousMenuVertical previousMenuVertical previousmenuvertical','000001000001000025000013',NULL),('PBnav00000000000000019','previousMenuHorizontal','','previousmenuhorizontal',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'previousMenuHorizontal previousMenuHorizontal previousmenuhorizontal','000001000001000025000014',NULL),('PBnav00000000000000020','rootmenu','','rootmenu',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'rootmenu rootmenu rootmenu','000001000001000025000015',NULL),('PBnav00000000000000021','SpecificDropMenu','','specificdropmenu',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'SpecificDropMenu SpecificDropMenu specificdropmenu','000001000001000025000016',NULL),('pJd5TLAjfWMVXD6sCRLwUg','Site Map','','site_map/site_map',1124395696,1271348790,'3','7','3','WebGUI::Asset::Wobject::Navigation',1,'Site Map Site Map site map site map','000001000002000005000001',NULL),('fK-HMSboA3uu0c1KYkYspA','The Latest News','This is the latest news from Plain Black and WebGUI pulled directly from the site every hour.','the_latest_news/the_latest_news',1124395696,1124395696,'3','7','3','WebGUI::Asset::Wobject::SyndicatedContent',1,'The Latest News The Latest News the latest news the latest news This is the latest news from Plain Black and WebGUI pulled directly from the site every hour','000001000002000004000001',NULL),('WikiFrontTmpl000000001','Default Wiki Front Page','','default-wiki-front-page',1165460175,1273032720,'3','7','12','WebGUI::Asset::Template',0,'Default Wiki Front Page Default Wiki Front Page default wiki front page WikiMaster_front','000001000001000052000002',NULL),('WikiSearchTmpl00000001','Default Wiki Search','','default-wiki-search',1165460175,1273032720,'3','7','12','WebGUI::Asset::Template',0,'Default Wiki Search Default Wiki Search default wiki search WikiMaster_search','000001000001000052000003',NULL),('WikiPHTmpl000000000001','Default Page History','','default-wiki-page-history',1165460175,1273032720,'3','7','12','WebGUI::Asset::Template',0,'Default Page History Default Page History default wiki page history WikiPage_pageHistory','000001000001000052000004',NULL),('WikiPageTmpl0000000001','Default Wiki Page','','default-wiki-page',1165460175,1273032720,'3','7','12','WebGUI::Asset::Template',0,'Default Wiki Page Default Wiki Page default wiki page WikiPage','000001000001000052000005',NULL),('WikiPageEditTmpl000001','Default Wiki Page Edit','','default-wiki-page-edit',1165460175,1273032720,'3','7','12','WebGUI::Asset::Template',0,'Default Wiki Page Edit Default Wiki Page Edit default wiki page edit WikiPage_edit','000001000001000052000006',NULL),('WikiMPTmpl000000000001','Default Most Popular','','default-wiki-most-popular',1165460175,1273032720,'3','7','12','WebGUI::Asset::Template',0,'Default Most Popular Default Most Popular default wiki most popular WikiMaster_mostPopular','000001000001000052000007',NULL),('SQLReportDownload00001','SQLReport Download Default Template','','SQLReportDownload0001',1171466654,1171466654,'3','7','12','WebGUI::Asset::Template',0,'SQLReport Download Default Template untitled SQLReportDownload0001 SQLReport/Download','000001000001000038000002',NULL),('newsletter000000000001',' Summary Newsletter (default)','','newsletterdefaulttemplate',1185754569,1185754569,'3','7','3','WebGUI::Asset::Template',0,'Summary Newsletter default Summary Newsletter newsletterdefaulttemplate newsletter','000001000001000026000001',NULL),('newslettersubscrip0001','My Subscriptions (default)','','newslettermysubscriptionstemplate',1185754569,1221692339,'3','7','3','WebGUI::Asset::Template',0,'My Subscriptions default My Subscriptions newslettermysubscriptionstemplate newsletter/mysubscriptions','000001000001000026000003',NULL),('AjhlNO3wZvN5k4i4qioWcg','Default Answer Edit','','root/import/survey/default-answer-edit',1226009658,1250243000,'3','7','12','WebGUI::Asset::Template',0,'Default Answer Edit Default Answer Edit root import survey default answer edit Survey/Edit','000001000001000042000009',NULL),('QHn6T9rU7KsnS3Y70KCNTg','Account','','root/import/account',1227080251,1233173545,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Account Account root import account','000001000001000002',NULL),('HPDOcsj4gBme8D4svHodBw','Profile','','root/import/account/profile',1225404573,1225404573,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Profile Profile root import account profile','000001000001000002000001',NULL),('WikiKeyword00000000001',' Wiki Pages By Keyword (default)','','wiki-master-by-keyword-template.tmpl',1185754571,1274238756,'3','7','3','WebGUI::Asset::Template',0,'Wiki Pages By Keyword default Wiki Pages By Keyword wiki master by keyword template.tmpl WikiMaster_byKeyword','000001000001000052000008',NULL),('tempspace0000000000000','Tempspace','','tempspace',1185754574,1185754574,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'Tempspace Tempspace tempspace','000001000004',NULL),('QpmlAiYZz6VsKBM-_0wXaw','UsersOnline Macro',' ','users-online-macro-templates',1224616691,1224616691,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'UsersOnline Macro UsersOnline Macro users online macro templates','000001000001000021000012',NULL),('h_T2xtOxGRQ9QJOR6ebLpQ','UsersOnline Default View','','users-online-macro-templates/usersonline-default-view',1224616545,1224616545,'3','7','3','WebGUI::Asset::Template',0,'UsersOnline Default View UsersOnline Default View users online macro templates usersonline default view Macro/UsersOnline','000001000001000021000012000001',NULL),('4Ekp0kJoJllRRRo_J1Rj6w','UsersOnline Detailed View','','users-online-macro-templates/usersonline-detailed-view',1224616672,1224616672,'3','7','3','WebGUI::Asset::Template',0,'UsersOnline Detailed View UsersOnline Detailed View users online macro templates usersonline detailed view Macro/UsersOnline','000001000001000021000012000002',NULL),('THQhn1C-ooj-TLlEP7aIJQ','gallery-ie.css','','root/import/gallery-templates/gallery-ie.css',1225313951,1285124158,'3','7','3','WebGUI::Asset::Snippet',0,'gallery-ie.css gallery-ie.css root import gallery templates gallery ie.css wgPicture float:left wgAlbum float:left wgGallery pagination li wgGallery pagination a float:left wgGallery container display:inline-block ','000001000001000015000025',NULL),('itransact_credentials1','ITransact Credentials (Default)','','shopping-cart-collateral-items/itransact-credentials',1228953856,1313542961,'3','7','4','WebGUI::Asset::Template',0,'ITransact Credentials Default ITransact Credentials Default shopping cart collateral items itransact credentials Shop/Credentials','000001000001000036000018',NULL),('1oBRscNIcFOI-pETrCOspA','Default Section Edit','','root/import/survey/default-section-edit',1226009642,1250243000,'3','7','12','WebGUI::Asset::Template',0,'Default Section Edit Default Section Edit root import survey default section edit Survey/Edit','000001000001000042000007',NULL),('gI_TxK-5S4DNuv42wpImmw','Gallery Templates',' ','root/import/gallery-templates',1197330678,1285124155,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'Gallery Templates Gallery Templates root import gallery templates','000001000001000015',NULL),('jME5BEDYVDlBZ8jIQA9-jQ','Default Gallery Search','','root/import/gallery-templates/default-gallery-search',1197927169,1285124155,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery Search Default Gallery Search root import gallery templates default gallery search Gallery/Search','000001000001000015000001',NULL),('azCqD0IjdQSlM3ar29k5Sg','Default Gallery List Albums View','','root/import/gallery-templates/default-gallery-list-albums-view',1197881748,1285124155,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery List Albums View Default Gallery List Albums View root import gallery templates default gallery list albums view Gallery/ListAlbums','000001000001000015000002',NULL),('05FpjceLYhq4csF1Kww1KQ','Default Gallery View Album','','root/import/gallery-templates/default-gallery-view-album',1197879361,1285124155,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery View Album Default Gallery View Album root import gallery templates default gallery view album GalleryAlbum/View','000001000001000015000003',NULL),('KAMdiUdJykjN02CPHpyZOw','Default Gallery View Album Slideshow','','root/import/gallery-templates/default-gallery-view-album-slideshow',1197825787,1285124155,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery View Album Slideshow Default Gallery View Album Slideshow root import gallery templates default gallery view album slideshow GalleryAlbum/ViewSlideshow','000001000001000015000005',NULL),('OkphOEdaSGTXnFGhK4GT5A','Default Gallery List Files For User','','root/import/gallery-templates/default-gallery-list-files-for-user',1197825794,1285124155,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery List Files For User Default Gallery List Files For User root import gallery templates default gallery list files for user Gallery/ListFilesForUser','000001000001000015000006',NULL),('TEId5V-jEvUULsZA0wuRuA','Default Gallery View Photo','','root/import/gallery-templates/default-gallery-view-photo',1197989443,1285124155,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery View Photo Default Gallery View Photo root import gallery templates default gallery view photo GalleryFile/View','000001000001000015000007',NULL),('6X-7Twabn5KKO_AbgK3PEw','Default Gallery Edit Album','','root/import/gallery-templates/default-gallery-edit-album',1197987780,1285124155,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery Edit Album Default Gallery Edit Album root import gallery templates default gallery edit album GalleryAlbum/Edit','000001000001000015000008',NULL),('7JCTAiu1U_bT9ldr655Blw','Default Gallery Edit Photo','','root/import/gallery-templates/default-gallery-edit-photo',1197825824,1285124155,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery Edit Photo Default Gallery Edit Photo root import gallery templates default gallery edit photo GalleryFile/Edit','000001000001000015000009',NULL),('0X4Q3tBWUb_thsVbsYz9xQ','Default Gallery Add Archive','','root/import/gallery-templates/default-gallery-add-archive',1197987372,1285124155,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery Add Archive Default Gallery Add Archive root import gallery templates default gallery add archive GalleryAlbum/AddArchive','000001000001000015000010',NULL),('m3IbBavqzuKDd2PGGhKPlA','Default Gallery Make Shortcut','','root/import/gallery-templates/default-gallery-make-shortcut',1197825845,1285124155,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery Make Shortcut Default Gallery Make Shortcut root import gallery templates default gallery make shortcut GalleryFile/MakeShortcut','000001000001000015000011',NULL),('UTNFeV7B_aSCRmmaFCq4Vw','Default Gallery Delete Album','','root/import/gallery-templates/default-gallery-delete-album',1197825856,1285124155,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery Delete Album Default Gallery Delete Album root import gallery templates default gallery delete album GalleryAlbum/Delete','000001000001000015000012',NULL),('zcX-wIUct0S_np14xxOA-A','Default Gallery Delete File','','root/import/gallery-templates/default-gallery-delete-file',1197825866,1285124155,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery Delete File Default Gallery Delete File root import gallery templates default gallery delete file GalleryFile/Delete','000001000001000015000013',NULL),('MBZK_LPVzqhb4TV4mMRTJg','admin_ie7.css','','root/import/gallery-templates/admin_ie7.css',1197330678,1285124155,'3','7','3','WebGUI::Asset::Snippet',0,'admin_ie7.css admin_ie7.css root import gallery templates admin ie7.css input.captionEnter margin-left 5px width 92px ','000001000001000015000014',NULL),('bANo8aiAPA7aY_oQZKxIWw','rss.gif','','root/import/gallery-templates/images/rss.gif',1197330678,1285124155,'3','7','3','WebGUI::Asset::File::Image',1,'rss.gif rss.gif root import gallery templates images rss.gif','000001000001000015000017000001',NULL),('2ci_v2d4x4uvyjTRlC49OA','moveDown.gif','','root/import/gallery-templates/images/movedown.gif',1197330678,1285124156,'3','7','3','WebGUI::Asset::File::Image',1,'moveDown.gif moveDown.gif root import gallery templates images movedown.gif','000001000001000015000017000002',NULL),('O-EsSzKgAk1KolFT-x_KsA','moveUp.gif','','root/import/gallery-templates/images/moveup.gif',1197330678,1285124156,'3','7','3','WebGUI::Asset::File::Image',1,'moveUp.gif moveUp.gif root import gallery templates images moveup.gif','000001000001000015000017000003',NULL),('fdd8tGExyVwHyrB8RBbKXg','next.gif','','root/import/gallery-templates/images/next.gif',1197330839,1285124156,'3','7','3','WebGUI::Asset::File::Image',1,'next.gif next.gif root import gallery templates images next.gif','000001000001000015000017000004',NULL),('BpisgHl4ZDcSECJp6oib1w','play.gif','','root/import/gallery-templates/images/play.gif',1197330840,1285124156,'3','7','3','WebGUI::Asset::File::Image',1,'play.gif play.gif root import gallery templates images play.gif','000001000001000015000017000005',NULL),('zshreRgPAXtnF0DtVbQ1Yg','previous.gif','','root/import/gallery-templates/images/previous.gif',1197330840,1285124156,'3','7','3','WebGUI::Asset::File::Image',1,'previous.gif previous.gif root import gallery templates images previous.gif','000001000001000015000017000006',NULL),('mM3bjP_iG9sv5nQb4S17tQ','Default Gallery View Album RSS','','root/import/gallery-templates/default-gallery-album-rss',1197879662,1285124158,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery View Album RSS Default Gallery View Album RSS root import gallery templates default gallery album rss GalleryAlbum/ViewRss','000001000001000015000018',NULL),('ilu5BrM-VGaOsec9Lm7M6Q','Default Gallery List Albums RSS','','root/import/gallery-templates/default-gallery-list-albums-rss',1197878780,1285124158,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery List Albums RSS Default Gallery List Albums RSS root import gallery templates default gallery list albums rss Gallery/ListAlbumsRss','000001000001000015000019',NULL),('-ANLpoTEP-n4POAdRxCzRw','Default Gallery List Files For User RSS','','root/import/gallery-templates/default-gallery-list-files-for-user-rss',1197880641,1285124158,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery List Files For User RSS Default Gallery List Files For User RSS root import gallery templates default gallery list files for user rss Gallery/ListFilesForUserRss','000001000001000015000020',NULL),('OxJWQgnGsgyGohP2L3zJPQ','Default Gallery Edit Comment','','root/import/gallery-templates/default-gallery-edit-comment',1204663962,1285124158,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery Edit Comment Default Gallery Edit Comment root import gallery templates default gallery edit comment GalleryFile/EditComment','000001000001000015000021',NULL),('Tsg7xmPYv782j6IVz7yHFg','Calendar Templates','','root/import/calendar-templates',1204890713,1213244777,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Calendar Templates Calendar Templates root import calendar templates','000001000001000006',NULL),('kj3b-X3i6zRKnhLb4ZiCLw','Default Calendar List View','','root/import/calendar-templates/default-calendar-list-view',1204890713,1295931508,'3','7','3','WebGUI::Asset::Template',0,'Default Calendar List View Default Calendar List View root import calendar templates default calendar list view Calendar/List','000001000001000006000001',NULL),('uRL9qtk7Rb0YRJ41LmHOJw','Default Calendar Print List View','','root/import/calendar-templates/default-calendar-print-list-view',1204890713,1229311072,'3','7','3','WebGUI::Asset::Template',0,'Default Calendar Print List View Default Calendar Print List View root import calendar templates default calendar print list view Calendar/Print/List','000001000001000006000002',NULL),('CalendarWeek0000000001','Default Calendar Week','','root/import/calendar-templates/default-calendar-week',1204890713,1230358389,'3','7','12','WebGUI::Asset::Template',0,'Default Calendar Week Default Calendar Week root import calendar templates default calendar week Calendar/Week','000001000001000006000003',NULL),('CalendarDay00000000001','Default Calendar Day','','root/import/calendar-templates/default-calendar-day',1204890713,1230358389,'3','7','12','WebGUI::Asset::Template',0,'Default Calendar Day Default Calendar Day root import calendar templates default calendar day Calendar/Day','000001000001000006000004',NULL),('CalendarEvent000000001','Default Calendar Event','','root/import/calendar-templates/default-calendar-event',1204890713,1295931508,'3','7','12','WebGUI::Asset::Template',0,'Default Calendar Event Default Calendar Event root import calendar templates default calendar event Calendar/Event','000001000001000006000005',NULL),('CalendarEventEdit00001','Default Calendar Event Edit','','root/import/calendar-templates/default-calendar-event-edit',1205160982,1269401468,'3','7','12','WebGUI::Asset::Template',0,'Default Calendar Event Edit Default Calendar Event Edit root import calendar templates default calendar event edit Calendar/EventEdit','000001000001000006000006',NULL),('CalendarSearch00000001','Default Calendar Search','','root/import/calendar-templates/default-calendar-search',1204890713,1230358389,'3','7','12','WebGUI::Asset::Template',0,'Default Calendar Search Default Calendar Search root import calendar templates default calendar search Calendar/Search','000001000001000006000008',NULL),('CalendarPrintEvent0001','Default Calendar Print Event','','root/import/calendar-templates/default-calendar-print-event',1204890714,1215396964,'3','7','12','WebGUI::Asset::Template',0,'Default Calendar Print Event Default Calendar Print Event root import calendar templates default calendar print event Calendar/Print/Event','000001000001000006000009',NULL),('CalendarPrintMonth0001','Default Calendar Print Month','','root/import/calendar-templates/default-calendar-print-month',1204890714,1204890714,'3','7','12','WebGUI::Asset::Template',0,'Default Calendar Print Month Default Calendar Print Month root import calendar templates default calendar print month Calendar/Print/Month','000001000001000006000010',NULL),('CalendarPrintWeek00001','Default Calendar Print Week','','root/import/calendar-templates/default-calendar-print-week',1204890714,1204890714,'3','7','12','WebGUI::Asset::Template',0,'Default Calendar Print Week Default Calendar Print Week root import calendar templates default calendar print week Calendar/Print/Week','000001000001000006000011',NULL),('CalendarPrintDay000001','Default Calendar Print Day','','root/import/calendar-templates/default-calendar-print-day',1204890714,1204890714,'3','7','12','WebGUI::Asset::Template',0,'Default Calendar Print Day Default Calendar Print Day root import calendar templates default calendar print day Calendar/Print/Day','000001000001000006000012',NULL),('jnYdqDkUR8x7Pv2eGR1qTA','Thingy Templates','','root/import/thingy-templates',1205431513,1216250666,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Thingy Templates Thingy Templates root import thingy templates','000001000001000044',NULL),('ThingyTmpl000000000001','Default Thingy','','templates/thingy-default',1205003608,1237914005,'3','7','12','WebGUI::Asset::Template',0,'Default Thingy Default Thingy templates thingy default Thingy','000001000001000044000001',NULL),('ThingyTmpl000000000002','Default Thingy View Thing','','templates/thingy-default-view-thing',1205003676,1299559129,'3','7','12','WebGUI::Asset::Template',0,'Default Thingy View Thing Default Thingy View Thing templates thingy default view thing Thingy/ViewThing','000001000001000044000002',NULL),('ThingyTmpl000000000003','Default Thingy Edit Thing','','templates/thingy-default-edit-thing',1205003711,1224518002,'3','7','12','WebGUI::Asset::Template',0,'Default Thingy Edit Thing Default Thingy Edit Thing templates thingy default edit thing Thingy/EditThing','000001000001000044000003',NULL),('ThingyTmpl000000000004','Default Thingy Search Thing','','templates/thingy-default-search-thing',1205158717,1277868920,'3','7','12','WebGUI::Asset::Template',0,'Default Thingy Search Thing Default Thingy Search Thing templates thingy default search thing Thingy/SearchThing','000001000001000044000004',NULL),('7fE8md51vTCcuJFOvxNaGA','thumbnails.js','','root/import/gallery-templates/thumbnails.js',1205443600,1285124158,'3','7','3','WebGUI::Asset::Snippet',0,'thumbnails.js thumbnails.js root import gallery templates thumbnails.js Depends on BrowserDetect.js Make the thumbnails a little bigger while the mouse is over them function scaleThumbUp e anchor IE6 doesn\'t like to do the right thing with the CSS stuff below exclude it if BrowserDetect if BrowserDetect.browser == Explorer BrowserDetect.version < 7 return Make a new image with the same image src as the anchor var oldImage = anchor.getElementsByTagName(\"img\")[0 var newContainer = document.createElement(\"div newContainer.className = thumb-popup newContainer.style.position = absolute newContainer.style.zIndex = 1 var newWidth = oldImage.offsetWidth 3 var newHeight = oldImage.offsetHeight 3 var newLeft = anchor.offsetLeft + anchor.offsetWidth 2 newWidth 2 var newTop = anchor.offsetTop + anchor.offsetHeight 2 newHeight 2 newContainer.style.left = newLeft + px newContainer.style.top = newTop + px newContainer.style.width = newWidth + px newContainer.style.height = newHeight + px var newImage = document.createElement(\"img newImage.src = oldImage.src newImage.style.width = 100 newImage.style.height = 100 newContainer.appendChild newImage Make some text for the caption var caption = document.createElement(\"div caption.appendChild document.createTextNode anchor.title caption.className = caption newContainer.appendChild caption var newBox = document.createElement(\"a newBox.href = anchor.href newBox.style.display = block newBox.style.position = absolute newBox.style.zIndex = 10 newBox.style.left = anchor.offsetLeft + px newBox.style.top = anchor.offsetTop + px newBox.style.height = anchor.offsetHeight + px newBox.style.width = anchor.offsetWidth + px newBox.style.border = 1px solid transparent anchor.parentNode.appendChild newContainer anchor.parentNode.appendChild newBox YAHOO.util.Event.addListener newBox click function window.location.href = anchor.href YAHOO.util.Event.addListener newContainer mouseout scaleThumbDown newBox newContainer caption YAHOO.util.Event.addListener newBox mouseout scaleThumbDown newBox newContainer caption function scaleThumbDown e elements for var i = 0 i < elements.length i++ elements[i].parentNode.removeChild elements[i var anchorTimeout function enterAnchor e anchor if typeof anchorTimeout = undefined clearTimeout anchorTimeout anchorTimeout = setTimeout function scaleThumbUp e anchor 150 function leaveAnchor e anchor if typeof anchorTimeout = undefined clearTimeout anchorTimeout function initThumb var anchors = YAHOO.util.Dom.getElementsByClassName thumb for var i = 0 i < anchors.length i++ YAHOO.util.Event.addListener anchors[i mouseover enterAnchor anchors[i YAHOO.util.Event.addListener anchors[i mouseout leaveAnchor anchors[i YAHOO.util.Event.onDOMReady initThumb ','000001000001000015000022',NULL),('1oGhfj00KkCzP1ez01AfKA','slideshow.js','','root/import/gallery-templates/slideshow.js',1205635970,1285124158,'3','7','3','WebGUI::Asset::Snippet',0,'slideshow.js slideshow.js root import gallery templates slideshow.js if typeof WebGUI == undefined WebGUI = WebGUI.Slideshow config Configure and return a new Slideshow object config is an object with the following properties containerId The ID of the element that contains the Slideshow items Defaults to slideshow-container currentIndex The index of the first item in the Slideshow Defaults to 0 isPlaying If true the slideshow will begin immediately itemClassName The class name of the slideshow items Defaults to slideshow-item nextButtonId The id of the button to go to the next item pauseImageSrc The URL to the pause button image playDelay The delay in milliseconds between slides Defaults to 5000 playImageSrc The URL to the play button image playPauseButtonId The id of the button to toggle between play and pause previousButtonId The id of the button to go to the previous item wrap If true the slideshow will wrap around Control the slideshow To control the slideshow you can use the following methods next Pause the slideshow and go to the next slide previous Pause the slideshow and go to the previous slide play Play the slideshow pause Pause the slideshow togglePlay If it\'s playing pause it If it\'s paused play it WebGUI.Slideshow = function config this.containerId = config config.containerId config.containerId slideshow-container this.currentIndex = config config.currentIndex config.currentIndex 0 this.isPlaying = config config.isPlaying config.isPlaying false this.itemClassName = config config.itemClassName config.itemClassName slideshow-item this.nextButtonId = config config.nextButtonId undefined this.pauseImageSrc = config config.pauseImageSrc undefined this.playDelay = config config.playDelay config.playDelay 5000 this.playImageSrc = config config.playImageSrc undefined this.playPauseButtonId = config config.playPauseButtonId undefined this.previousButtonId = config config.previousButtonId undefined this.wrap = config config.wrap config.wrap false YAHOO.util.Event.onDOMReady this.init this true clearPlayTimeout Clears the timeout to move to the next slide WebGUI.Slideshow.prototype.clearPlayTimeout = function clearTimeout this.playTimeout this.playTimeout = undefined doPlayTick self Performs the action to move to the next slide and start a new timeout self is a new reference to the object to get around the scoping issues with setTimeout WebGUI.Slideshow.prototype.doPlayTick = function self self.showNext self.setPlayTimeout getSlideshowContainer Returns the HTMLElement for the Slideshow container WebGUI.Slideshow.prototype.getSlideshowContainer = function return document.getElementById this.containerId getSlideshowItems Returns an array of HTMLElements for the Slideshow\'s items WebGUI.Slideshow.prototype.getSlideshowItems = function var items = YAHOO.util.Dom.getElementsByClassName this.itemClassName undefined this.getSlideshowContainer return items init Initialize the slideshow Performed after the DOM is ready WebGUI.Slideshow.prototype.init = function Add handlers to buttons if this.playPauseButtonId YAHOO.util.Event.addListener this.playPauseButtonId click this.togglePlay this true if this.nextButtonId YAHOO.util.Event.addListener this.nextButtonId click this.next this true if this.previousButtonId YAHOO.util.Event.addListener this.previousButtonId click this.previous this true Hide all but the currentIndex var items = this.getSlideshowItems for var i = 0 i < items.length i++ if i = this.currentIndex items i style.display = none else items i style.display = block Start it off if necessary if this.isPlaying this.setPlayTimeout this.updatePlayPauseButton next Pause the slideshow and go to the next slide WebGUI.Slideshow.prototype.next = function this.pause this.showNext play Start the slideshow WebGUI.Slideshow.prototype.play = function if this.isPlaying this.isPlaying = true this.setPlayTimeout this.updatePlayPauseButton previous Pause the slideshow and show the previous slide WebGUI.Slideshow.prototype.previous = function this.pause this.showPrevious pause Pause the slideshow WebGUI.Slideshow.prototype.pause = function if this.isPlaying this.isPlaying = false this.clearPlayTimeout this.updatePlayPauseButton setPlayTimeout Sets the timeout to move to the next slide WebGUI.Slideshow.prototype.setPlayTimeout = function var self = this this.playTimeout = setTimeout function self.doPlayTick(self this.playDelay showNext Show the next slide WebGUI.Slideshow.prototype.showNext = function var items = this.getSlideshowItems var hideIndex = this.currentIndex var showIndex = this.currentIndex + 1 Wrap around if this.wrap showIndex >= items.length showIndex = 0 Don\'t allow going past the last item else if showIndex >= items.length return Do the switch if items hideIndex items hideIndex style.display = none if items showIndex items showIndex style.display = block this.currentIndex = showIndex showPrevious Show the previous slide WebGUI.Slideshow.prototype.showPrevious = function var items = this.getSlideshowItems var hideIndex = this.currentIndex var showIndex = this.currentIndex 1 Wrap around if this.wrap showIndex < 0 showIndex = items.length 1 Don\'t allow going past the last item else if showIndex < 0 return Do the switch items hideIndex style.display = none items showIndex style.display = block this.currentIndex = showIndex togglePlay If it\'s paused play it If it\'s playing pause it Return true if the slideshow is now playing WebGUI.Slideshow.prototype.togglePlay = function if this.isPlaying == false this.play return true else this.pause updatePlayPauseButton Update the Play/Pause button to have the correct image WebGUI.Slideshow.prototype.updatePlayPauseButton = function if this.playPauseButtonId if this.isPlaying this.playImageSrc document.getElementById this.playPauseButtonId src = this.pauseImageSrc else if this.pauseImageSrc document.getElementById this.playPauseButtonId src = this.playImageSrc ','000001000001000015000023',NULL),('3qiVYhNTXMVC5hfsumVHgg','browserdetect.js','','root/import/gallery-templates/browserdetect.js',1206743306,1285124158,'3','7','3','WebGUI::Asset::Snippet',0,'browserdetect.js browserdetect.js root import gallery templates browserdetect.js var BrowserDetect = init function this.browser = this.searchString(this.dataBrowser || An unknown browser this.version = this.searchVersion(navigator.userAgent || this.searchVersion(navigator.appVersion || an unknown version this.OS = this.searchString(this.dataOS || an unknown OS searchString function data for var i=0;i','000001000001000015000024',NULL),('usuxw9V3jN4d4pujRiEYxg','css03-ie.css','','style3/css03-ie.css',1209494150,1209494150,'3','7','12','WebGUI::Asset::Snippet',0,'css03-ie.css css03-ie.css style3 css03 ie.css contentArea height:500px padding-bottom:300px ','000001000001000051000023',NULL),('POVcY79vIqAHR8OfGt36aw','pagination_button.jpg','','root/import/gallery-templates/images/pagination_button.jpg',1209499189,1285124156,'3','7','12','WebGUI::Asset::File::Image',1,'pagination_button.jpg pagination_button.jpg root import gallery templates images pagination button.jpg','000001000001000015000017000007',NULL),('hIB-z34r8Xl-vYVYCkKr-w','bar-btn-r.jpg','','root/import/gallery-templates/images/bar-btn-r.jpg',1209499189,1285124156,'3','7','12','WebGUI::Asset::File::Image',1,'bar-btn-r.jpg bar-btn-r.jpg root import gallery templates images bar btn r.jpg','000001000001000015000017000008',NULL),('-mPUoFlYcjqjPUPRLAlxNQ','search-field-r.jpg','','root/import/gallery-templates/images/search-field-r.jpg',1209499189,1285124156,'3','7','12','WebGUI::Asset::File::Image',1,'search-field-r.jpg search-field-r.jpg root import gallery templates images search field r.jpg','000001000001000015000017000009',NULL),('MDpUOR-N8KMyt1J7Hh_h4w','bar-btn.jpg','','root/import/gallery-templates/images/bar-btn.jpg',1209499189,1285124156,'3','7','12','WebGUI::Asset::File::Image',1,'bar-btn.jpg bar-btn.jpg root import gallery templates images bar btn.jpg','000001000001000015000017000010',NULL),('YfXKByTwDZVituMc4h13Dg','pagination_bg.jpg','','root/import/gallery-templates/images/pagination_bg.jpg',1209499189,1285124156,'3','7','12','WebGUI::Asset::File::Image',1,'pagination_bg.jpg pagination_bg.jpg root import gallery templates images pagination bg.jpg','000001000001000015000017000011',NULL),('esko_HSU0Gh-uJZ1h3xRmQ','search-field-l.jpg','','root/import/gallery-templates/images/search-field-l.jpg',1209499189,1285124156,'3','7','12','WebGUI::Asset::File::Image',1,'search-field-l.jpg search-field-l.jpg root import gallery templates images search field l.jpg','000001000001000015000017000012',NULL),('oSqpGswzpBG_ErdfYwIO8A','top_bg.jpg','','root/import/gallery-templates/images/top_bg.jpg',1209499189,1285124156,'3','7','12','WebGUI::Asset::File::Image',1,'top_bg.jpg top_bg.jpg root import gallery templates images top bg.jpg','000001000001000015000017000013',NULL),('MXJklShZvLLB_DSnZQmXrQ','title_bg.jpg','','root/import/gallery-templates/images/title_bg.jpg',1209499189,1285124156,'3','7','12','WebGUI::Asset::File::Image',1,'title_bg.jpg title_bg.jpg root import gallery templates images title bg.jpg','000001000001000015000017000014',NULL),('BthxD5oJ0idmsyI3ioA2FA','bar-btn-l.jpg','','root/import/gallery-templates/images/bar-btn-l.jpg',1209499189,1285124156,'3','7','12','WebGUI::Asset::File::Image',1,'bar-btn-l.jpg bar-btn-l.jpg root import gallery templates images bar btn l.jpg','000001000001000015000017000015',NULL),('aZ-1HYQamkRHYXvzAra8WQ','search-field.jpg','','root/import/gallery-templates/images/search-field.jpg',1209499189,1285124156,'3','7','12','WebGUI::Asset::File::Image',1,'search-field.jpg search-field.jpg root import gallery templates images search field.jpg','000001000001000015000017000016',NULL),('eRkb94OYcS5AdcrrerOP5Q','rss.gif','','root/import/gallery-templates/images/rss2.gif',1209499189,1285124157,'3','7','12','WebGUI::Asset::File::Image',1,'rss.gif rss.gif root import gallery templates images rss2.gif','000001000001000015000017000017',NULL),('TbnkjAJQEASORXIpYqDkcA','blank-image.jpg','','root/import/gallery-templates/images/blank-image.jpg',1209499189,1285124157,'3','7','12','WebGUI::Asset::File::Image',1,'blank-image.jpg blank-image.jpg root import gallery templates images blank image.jpg','000001000001000015000017000018',NULL),('er-3faBjY-hhlDcc5aKqdQ','top_bg.jpg','','root/import/gallery-templates/images/top_bg2.jpg',1209499189,1285124157,'3','7','12','WebGUI::Asset::File::Image',1,'top_bg.jpg top_bg.jpg root import gallery templates images top bg2.jpg','000001000001000015000017000019',NULL),('8bFsu2FJUqHRUiHcozcVFw','sub-btn-l.jpg','','root/import/gallery-templates/images/sub-btn-l.jpg',1209499189,1285124157,'3','7','12','WebGUI::Asset::File::Image',1,'sub-btn-l.jpg sub-btn-l.jpg root import gallery templates images sub btn l.jpg','000001000001000015000017000020',NULL),('34Aayx5eA320D8VfhdfDBw','sub-btn-r.jpg','','root/import/gallery-templates/images/sub-btn-r.jpg',1209499189,1285124157,'3','7','12','WebGUI::Asset::File::Image',1,'sub-btn-r.jpg sub-btn-r.jpg root import gallery templates images sub btn r.jpg','000001000001000015000017000021',NULL),('TlhKOVmWblZOsAdqmhEpeg','sub-btn.jpg','','root/import/gallery-templates/images/sub-btn.jpg',1209499189,1285124157,'3','7','12','WebGUI::Asset::File::Image',1,'sub-btn.jpg sub-btn.jpg root import gallery templates images sub btn.jpg','000001000001000015000017000022',NULL),('Nx0ypjO3cN6QdZUBUEE0lA','pic-title-bg.jpg','','root/import/gallery-templates/images/pic-title-bg.jpg',1209499189,1285124157,'3','7','12','WebGUI::Asset::File::Image',1,'pic-title-bg.jpg pic-title-bg.jpg root import gallery templates images pic title bg.jpg','000001000001000015000017000023',NULL),('CmFZLN7iPS7XXvUEsxKPKA','row-2.jpg','','root/import/gallery-templates/images/row-2.jpg',1209499190,1285124157,'3','7','12','WebGUI::Asset::File::Image',1,'row-2.jpg row-2.jpg root import gallery templates images row 2.jpg','000001000001000015000017000024',NULL),('v_XBgwwZqgW1D5s4y05qfg','addtl-info.gif','','root/import/gallery-templates/images/addtl-info.gif',1209499190,1285124157,'3','7','12','WebGUI::Asset::File::Image',1,'addtl-info.gif addtl-info.gif root import gallery templates images addtl info.gif','000001000001000015000017000025',NULL),('4TdAkKoQbSCvI7QWcW889A','row-1.jpg','','root/import/gallery-templates/images/row-1.jpg',1209499190,1285124157,'3','7','12','WebGUI::Asset::File::Image',1,'row-1.jpg row-1.jpg root import gallery templates images row 1.jpg','000001000001000015000017000026',NULL),('SAgK6eDPCG1cgkJ59WapHQ','prev-btn.gif','','root/import/gallery-templates/images/prev-btn.gif',1209499190,1285124157,'3','7','12','WebGUI::Asset::File::Image',1,'prev-btn.gif prev-btn.gif root import gallery templates images prev btn.gif','000001000001000015000017000027',NULL),('XJYLuvGy9ubF7JNKyINtpA','play-btn.gif','','root/import/gallery-templates/images/play-btn.gif',1209499190,1285124157,'3','7','12','WebGUI::Asset::File::Image',1,'play-btn.gif play-btn.gif root import gallery templates images play btn.gif','000001000001000015000017000028',NULL),('RWj7hyv2SpZuXxwj1Wocug','next-btn.gif','','root/import/gallery-templates/images/next-btn.gif',1209499190,1285124157,'3','7','12','WebGUI::Asset::File::Image',1,'next-btn.gif next-btn.gif root import gallery templates images next btn.gif','000001000001000015000017000029',NULL),('aq8QElnlm3YufAoxRz9Pcg','data-bg.jpg','','root/import/gallery-templates/images/data-bg.jpg',1209499190,1285124158,'3','7','12','WebGUI::Asset::File::Image',1,'data-bg.jpg data-bg.jpg root import gallery templates images data bg.jpg','000001000001000015000017000030',NULL),('6D4Z-oruXPS6OlH_Kx8pBg','images','','root/import/thingy-templates/images',1209509389,1209509389,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'images images root import thingy templates images','000001000001000044000005',NULL),('hQ7z33_jOYkQ8WNX5xy9Sw','style-button.gif','','root/import/thingy-templates/images/style-button.gif',1209509455,1209509455,'3','7','12','WebGUI::Asset::File::Image',1,'style-button.gif style-button.gif root import thingy templates images style button.gif','000001000001000044000005000001',NULL),('vWW_DcHiYSrKZOkkIfEfcQ','row-2.jpg','','root/import/thingy-templates/images/row-2.jpg',1209509433,1209509433,'3','7','12','WebGUI::Asset::File::Image',1,'row-2.jpg row-2.jpg root import thingy templates images row 2.jpg','000001000001000044000005000002',NULL),('_bPYzRA87NTAUIKlfrJMHg','row-1.jpg','','root/import/thingy-templates/images/row-1.jpg',1209509433,1209509433,'3','7','12','WebGUI::Asset::File::Image',1,'row-1.jpg row-1.jpg root import thingy templates images row 1.jpg','000001000001000044000005000003',NULL),('nJjZHRwdDs5MAZYsAyioHw','title-bg.jpg','','root/import/thingy-templates/images/title-bg.jpg',1209509433,1209509433,'3','7','12','WebGUI::Asset::File::Image',1,'title-bg.jpg title-bg.jpg root import thingy templates images title bg.jpg','000001000001000044000005000004',NULL),('8hxfkrJPeFVRWF5piCNJ1A','field-bg.jpg','','root/import/thingy-templates/images/field-bg.jpg',1209509433,1209509433,'3','7','12','WebGUI::Asset::File::Image',1,'field-bg.jpg field-bg.jpg root import thingy templates images field bg.jpg','000001000001000044000005000005',NULL),('Osx7WN52iIKHZFT4vqUBHQ','search-btn.gif','','root/import/thingy-templates/images/search-btn.gif',1209509433,1209509433,'3','7','12','WebGUI::Asset::File::Image',1,'search-btn.gif search-btn.gif root import thingy templates images search btn.gif','000001000001000044000005000006',NULL),('oWff8fGzRdHPyq5VNREe9Q','top-bg.jpg','','root/import/thingy-templates/images/top-bg.jpg',1209509433,1209509433,'3','7','12','WebGUI::Asset::File::Image',1,'top-bg.jpg top-bg.jpg root import thingy templates images top bg.jpg','000001000001000044000005000007',NULL),('uqbkvb1b9443VvfkyRz95w','save-button.gif','','root/import/thingy-templates/images/save-button.gif',1209509433,1209509433,'3','7','12','WebGUI::Asset::File::Image',1,'save-button.gif save-button.gif root import thingy templates images save button.gif','000001000001000044000005000008',NULL),('8YiMkcz32xalkAn3WBLpag','go-btn.gif','','root/import/thingy-templates/images/go-btn.gif',1210181860,1210181860,'3','7','12','WebGUI::Asset::File::Image',1,'go-btn.gif go-btn.gif root import thingy templates images go btn.gif','000001000001000044000005000009',NULL),('5m5I7__l40C4hhv4ydqAHQ','thingy-ie.css','','root/import/thingy-templates/thingy-ie.css',1210181698,1216227786,'3','7','12','WebGUI::Asset::Snippet',0,'thingy-ie.css thingy-ie.css root import thingy templates thingy ie.css thingyList things padding:0px margin:0px width:200px z-index:5000 position:absolute top:27px left:20px border:solid a2a2a2 1px border-top-style:none thingyList things a:link thingyList things a:visited display:block background-color:#f1f1f1 border-top:solid a2a2a2 1px border-bottom:solid 727272 1px line-height:12px font-size:10px height:12px padding:2px 5px text-decoration:none font-weight:bold color:#a2a2a2 width:190px thingyList things a:hover background-color:white ','000001000001000044000007',NULL),('2rC4ErZ3c77OJzJm7O5s3w','EMS Badge Listing (default)','','root/import/ems/ems-badge-listing-default',1208721232,1288747841,'3','7','12','WebGUI::Asset::Template',0,'EMS Badge Listing default EMS Badge Listing default root import ems ems badge listing default EMS','000001000001000012000003',NULL),('PsFn7dJt4wMwBa8hiE3hOA','Print Badge (Default)','','root/import/ems/print-badge-default',1208558071,1257311886,'3','7','12','WebGUI::Asset::Template',0,'Print Badge Default Print Badge Default root import ems print badge default EMS/PrintBadge','000001000001000012000004',NULL),('yBwydfooiLvhEFawJb0VTQ','Print Ticket (Default)','','root/import/ems/print-ticket-default',1208629936,1257311887,'3','7','12','WebGUI::Asset::Template',0,'Print Ticket Default Print Ticket Default root import ems print ticket default EMS/PrintTicket','000001000001000012000005',NULL),('63ix2-hU0FchXGIWkG3tow','Flat Discount (Default)','','root/import/flat-discount-default',1209588387,1313542961,'3','7','12','WebGUI::Asset::Template',0,'Flat Discount Default Flat Discount Default root import flat discount default FlatDiscount','000001000001000036000011',NULL),('gbnRhcWNk1iQe32LFEB5eQ','Shelf','','root/import/shelf2',1210779723,1212086102,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Shelf Shelf root import shelf2','000001000001000035',NULL),('1XOJDcg_ITRYwVM-QnIcPw','shelf.css','','root/import/shelf2/shelf.css',1210779441,1219175575,'3','7','12','WebGUI::Asset::Snippet',0,'shelf.css shelf.css root import shelf2 shelf.css wgShelf font-size:12px font-family:arial verdana margin:15px 0px wgShelf h2 background black padding:5px padding-left:15px line-height:32px color:white margin:0px height:32px wgShelf wgShelves background F1F1F1 height:29px padding:3px line-height:29px padding-left:30px wgShelf product margin:15px margin-left:0px text-align:left background-color:#f1f1f1 border:solid e1e1e1 1px width 200px display moz-inline-box Moz display inline-block Op Saf IE vertical-align top IE Mac non capisce e a volte crea extra v space wgShelf product thumbnail display:block text-align:left margin:3px float:left wgShelf product link background e1e1e1 height:30px padding:3px line-height:24px margin-bottom:5px text-align:left display:block wgShelf product link a:link wgShelf product link a:visited color:#000 display:block wgShelf product link a:hover text-decoration:underline wgShelf product price display:block text-align:right font-size:18px font-weight:bold ','000001000001000035000003',NULL),('C5fPz-Wg85vkYRvCdl-Xqw','UserList','','root/import/userlist',1212160830,1212160830,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'UserList UserList root import userlist','000001000001000047',NULL),('aNmgn0cd6tldmC1FpW4KbA','Shop','','shopping-cart-collateral-items',1213122695,1313542960,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'Shop Shop shopping cart collateral items','000001000001000036',NULL),('2q5fxatSFLgIhXaUX-oSvg','bottom-left.jpg','','shopping-cart-collateral-items/bottom-left.jpg',1204149033,1313542960,'3','7','3','WebGUI::Asset::File::Image',1,'bottom-left.jpg bottom-left.jpg shopping cart collateral items bottom left.jpg','000001000001000036000001',NULL),('_d5WTkKjnwct-_Dk7gZHvQ','bottom-right.jpg','','shopping-cart-collateral-items/bottom-right.jpg',1204149033,1313542960,'3','7','3','WebGUI::Asset::File::Image',1,'bottom-right.jpg bottom-right.jpg shopping cart collateral items bottom right.jpg','000001000001000036000002',NULL),('Iz2mUR3jCPKyemwAea4b2g','input_bg.jpg','','shopping-cart-collateral-items/input_bg.jpg',1204149033,1313542960,'3','7','3','WebGUI::Asset::File::Image',1,'input_bg.jpg input_bg.jpg shopping cart collateral items input bg.jpg','000001000001000036000003',NULL),('JU9bjsLRoWj7GVHs__prig','top-left.jpg','','shopping-cart-collateral-items/top-left.jpg',1204149033,1313542960,'3','7','3','WebGUI::Asset::File::Image',1,'top-left.jpg top-left.jpg shopping cart collateral items top left.jpg','000001000001000036000004',NULL),('noOlnjQGexHg8c4bGVUo9g','top-right.jpg','','shopping-cart-collateral-items/top-right.jpg',1204149033,1313542960,'3','7','3','WebGUI::Asset::File::Image',1,'top-right.jpg top-right.jpg shopping cart collateral items top right.jpg','000001000001000036000005',NULL),('aIpCmr9Hi__vgdZnDTz1jw','Cart (Default)','','default-shopping-cart-template',1209921197,1313542961,'3','7','3','WebGUI::Asset::Template',0,'Cart Default Cart Default default shopping cart template Shop/Cart','000001000001000036000006',NULL),('4e-_rNs6mSWedZhQ_V5kJA','shelf-ie.css','','root/import/shelf2/shelf-ie.css',1210779672,1210779672,'3','7','12','WebGUI::Asset::Snippet',0,'shelf-ie.css shelf-ie.css root import shelf2 shelf ie.css wgShelf product margin:15px margin-left:0px float:left text-align:left background-color:#f1f1f1 border:solid e1e1e1 1px min-height:100px min-width:200px width:200px height:100px wgShelf product link background url(^FileUrl(root/import/shelf2/images/shelf-titles.jpg no-repeat top right height:30px padding:3px line-height:24px margin-bottom:5px text-align:left display:block ','000001000001000035000004',NULL),('2gtFt7c0qAFNU3BG_uvNvg','My Purchases (Default)','','shopping-cart-collateral-items/my-purchases-default',1211824430,1315877144,'3','7','3','WebGUI::Asset::Template',0,'My Purchases Default My Purchases Default shopping cart collateral items my purchases default Shop/MyPurchases','000001000001000036000008',NULL),('bPz1yk6Y9uwMDMBcmMsSCg','Email Receipt (Default)','','shopping-cart-collateral-items/email-receipt-default',1211829604,1313542961,'3','7','3','WebGUI::Asset::Template',0,'Email Receipt Default Email Receipt Default shopping cart collateral items email receipt default Shop/EmailReceipt','000001000001000036000009',NULL),('EBlxJpZQ9o-8VBOaGQbChA','MiniCart','','shopping-cart-collateral-items/minicart',1212093746,1313542961,'3','7','3','WebGUI::Asset::Template',0,'MiniCart MiniCart shopping cart collateral items minicart Shop/MiniCart','000001000001000036000014',NULL),('PBtmpl0000000000000053','Subscription code redemption','','subscription_code_redemption',1124395696,1313542961,'3','7','12','WebGUI::Asset::Template',0,'Subscription code redemption Subscription code redemption subscription code redemption Operation/RedeemSubscription','000001000001000036000017',NULL),('6tK47xsaIH-ELw0IBo0uRQ','images','','root/import/shelf2/images',1210777115,1210777115,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'images images root import shelf2 images','000001000001000035000001',NULL),('XNd7a_g_cTvJVYrVHcx2Mw','Address (Default)','','shopping-cart-collateral-items/address-default',1212099009,1313542961,'3','7','3','WebGUI::Asset::Template',0,'Address Default Address Default shopping cart collateral items address default Shop/Address','000001000001000036000007',NULL),('_bZJ9LA_KNekZiFPaP2SeQ','shelf-titles.jpg','','root/import/shelf2/images/shelf-titles.jpg',1210777868,1210777868,'3','7','12','WebGUI::Asset::File::Image',1,'shelf-titles.jpg shelf-titles.jpg root import shelf2 images shelf titles.jpg','000001000001000035000001000001',NULL),('nFen0xjkZn8WkpM93C9ceQ','Shelf (Default)','','root/import/shelf-default',1210779326,1247864696,'3','7','12','WebGUI::Asset::Template',0,'Shelf Default Shelf Default root import shelf default Shelf','000001000001000035000002',NULL),('mTOiwwk3q4k9g5-XykXhPA','Documentation','With any large system, having the right documentation to get you started is mandatory. The good news is that WebGUI has abundant documentation. ','documentation',1215717999,1271349647,'3','7','3','WebGUI::Asset::Wobject::Layout',1,'Documentation Documentation documentation With any large system having the right documentation to get you started is mandatory The good news is that WebGUI has abundant documentation','000001000002000003',NULL),('o_pq_e4vRyhMOKFzs61eag','book-covers.jpg','','documentation/book-covers.jpg',1215714957,1215714957,'3','7','3','WebGUI::Asset::File::Image',1,'book-covers.jpg book-covers.jpg documentation book covers.jpg','000001000002000003000002',NULL),('PBEmsBadgeTemplate0000','Default EMS Badge Template','','default_emsbadge',1221077977,1313542962,'3','7','4','WebGUI::Asset::Template',0,'Default EMS Badge Template Default EMS Badge Template default emsbadge EMSBadge','000001000001000012000006',NULL),('9A-mg2gwWmaYi9o_1C7ArQ','dashboard','','root/import/projectmanager/dashboard',1147642478,1222803338,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'dashboard dashboard root import projectmanager dashboard','000001000001000030000001',NULL),('yD1SMHelczihzjEmx6eXBA','editTask','','root/import/projectmanager/edittask',1147642478,1222803342,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'editTask editTask root import projectmanager edittask','000001000001000030000002',NULL),('pV7GnZdpjR3XpZaSINIoeg','gantt','','root/import/projectmanager/gantt',1147642478,1222803347,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'gantt gantt root import projectmanager gantt','000001000001000030000003',NULL),('71e17KeduiXgODLMlUxiow','project','','root/import/projectmanager/project',1147642479,1222803352,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'project project root import projectmanager project','000001000001000030000004',NULL),('vTymIDYL2YqEh6PV50F7ew','manager','','root/import/timetracking/manager',1147642482,1222803302,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'manager manager root import timetracking manager','000001000001000046000001',NULL),('lo1ac3BsoJx3ijGQ3gR-bQ','row','','root/import/timetracking/row',1147642482,1222803309,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'row row root import timetracking row','000001000001000046000002',NULL),('huASapWvFDzqwOSbcN-JFQ','user','','root/import/timetracking/user',1147642483,1222803313,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'user user root import timetracking user','000001000001000046000003',NULL),('xSmREZO3GNzK3M5PaueOOQ','LDAP/Account','','root/import/auth/ldap/account',1147642466,1287545014,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'LDAP/Account LDAP/Account root import auth ldap account','000001000001000005000001',NULL),('0bx-xoL8TSXXubFuqKAoVQ','LDAP/Create','','root/import/auth/ldap/create',1147642466,1287545014,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'LDAP/Create LDAP/Create root import auth ldap create','000001000001000005000002',NULL),('taX2UYkFF21ALpFZY2rhMw','LDAP/Login','','root/import/auth/ldap/login',1147642466,1287545014,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'LDAP/Login LDAP/Login root import auth ldap login','000001000001000005000003',NULL),('K0q_N885Httqev1VCqUWxg','WebGUI/Account','','root/import/auth/webgui/account',1147642466,1287545014,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'WebGUI/Account WebGUI/Account root import auth webgui account','000001000001000005000004',NULL),('fq1ZkYhH24R5tb96kuT10Q','WebGUI/Create','','root/import/auth/webgui/create',1147642466,1287545014,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'WebGUI/Create WebGUI/Create root import auth webgui create','000001000001000005000005',NULL),('oHk7fAFhEEkB7dHzi0QOQA','WebGUI/Expired','','root/import/auth/webgui/expired',1147642466,1287545014,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'WebGUI/Expired WebGUI/Expired root import auth webgui expired','000001000001000005000006',NULL),('9M-lrlPQWeeNWfvnDnK_Xg','WebGUI/Login','','root/import/auth/webgui/login',1147642466,1287545014,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'WebGUI/Login WebGUI/Login root import auth webgui login','000001000001000005000007',NULL),('_gBYAdTcbkiyamnqi2Xskg','WebGUI/Recovery','','root/import/auth/webgui/recovery',1147642466,1287545014,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'WebGUI/Recovery WebGUI/Recovery root import auth webgui recovery','000001000001000005000008',NULL),('tBL7BWiQRZFed2Y-Zjo9tQ','AdminToggle','','root/import/macro/admintoggle',1147642471,1222803200,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'AdminToggle AdminToggle root import macro admintoggle','000001000001000021000001',NULL),('GdkQpvjRtJqtzOUbwIIQRA','a_account','','root/import/macro/a_account',1147642471,1222803205,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'a_account a_account root import macro a account','000001000001000021000002',NULL),('tnc5iYyynX2hfdEs9D3P8w','EditableToggle','','root/import/macro/editabletoggle',1147642472,1222803213,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'EditableToggle EditableToggle root import macro editabletoggle','000001000001000021000003',NULL),('vgXdBcFTqU7h4wBG1ewdBw','File','','root/import/macro/file',1147642472,1222803217,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'File File root import macro file','000001000001000021000004',NULL),('hcFlqnXlsmC1ujN6Id0F0A','GroupAdd','','root/import/macro/groupadd',1147642473,1222803234,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'GroupAdd GroupAdd root import macro groupadd','000001000001000021000005',NULL),('eRJR52fvlaxfetv3DQkQYw','GroupDelete','','root/import/macro/groupdelete',1147642473,1222803238,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'GroupDelete GroupDelete root import macro groupdelete','000001000001000021000006',NULL),('5HIDHq5lAWHV5gpYGS0zLg','H_homeLink','','root/import/macro/h_homelink',1147642473,1222803244,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'H_homeLink H_homeLink root import macro h homelink','000001000001000021000007',NULL),('rYEFwXXo0tkGhQTcbDibvg','LoginToggle','','root/import/macro/logintoggle',1147642473,1222803249,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'LoginToggle LoginToggle root import macro logintoggle','000001000001000021000008',NULL),('V3l5S5TtI7wMm1WpIMhvOA','L_loginBox','','root/import/macro/l_loginbox',1147642473,1222803253,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'L_loginBox L_loginBox root import macro l loginbox','000001000001000021000009',NULL),('nqNbSUAhk9Vd1zda2SCz9A','RandomThread','','root/import/macro/randomthread',1147642474,1222803258,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'RandomThread RandomThread root import macro randomthread','000001000001000021000010',NULL),('y8XkRdxIperLKkJ3bL5sSQ','r_printable','','root/import/macro/r_printable',1147642474,1222803264,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'r_printable r_printable root import macro r printable','000001000001000021000011',NULL),('UserListTmpl0000000002','UserList with search field selection','','root/import/userlist/userlist-with-search-field-selection',1212000800,1228125752,'3','7','12','WebGUI::Asset::Template',0,'UserList with search field selection UserList with search field selection root import userlist userlist with search field selection UserList','000001000001000047000002',NULL),('UserListTmpl0000000003','UserList with multiple search keywords','','root/import/userlist/userlist-with-multiple-search-keywords',1212001437,1228125758,'3','7','12','WebGUI::Asset::Template',0,'UserList with multiple search keywords UserList with multiple search keywords root import userlist userlist with multiple search keywords UserList','000001000001000047000003',NULL),('UserListTmpl0000000001','Default UserList','','root/import/userlist/default-userlist',1212159641,1228125743,'3','7','12','WebGUI::Asset::Template',0,'Default UserList Default UserList root import userlist default userlist UserList','000001000001000047000001',NULL),('BMybD3cEnmXVk2wQ_qEsRQ','Badge Builder (Default)','','root/import/ems/badge-builder-default',1208530113,1263962529,'3','7','12','WebGUI::Asset::Template',0,'Badge Builder Default Badge Builder Default root import ems badge builder default EMS/BadgeBuilder','000001000001000012000001',NULL),('OOyMH33plAy6oCj_QWrxtg','Lookup Registrant (Default)','','root/import/ems/lookup-registrant-default',1207951375,1257311886,'3','7','12','WebGUI::Asset::Template',0,'Lookup Registrant Default Lookup Registrant Default root import ems lookup registrant default EMS/LookupRegistrant','000001000001000012000002',NULL),('stevecoolmenu000000001','Site Nav','','webgui7/style3/hierarchical-top-nav',1147642505,1224116942,'3','7','12','WebGUI::Asset::Template',0,'Site Nav Site Nav webgui7 style3 hierarchical top nav Navigation','000001000001000051000001',NULL),('7-0-style0000000000051','css03.css','','style3/css03.css',1147642505,1224117026,'3','7','12','WebGUI::Asset::Snippet',0,'css03.css css03.css style3 css03.css body html margin:0px background-color:#b53018 padding:0px body a color:#EE963E;font-weight:bold letter-spacing:1px font-size:8pt main width:98 min-width:790px margin:0px padding:0px padding-top:20px padding-bottom:20px position:relative header background url(\'^FileUrl(style3/header_bg.jpg repeat-x width:100 margin:0px height:115px headerTitle background url(\'^FileUrl(style3/header_left.jpg no-repeat left top height:100 width:100 headerRight background url(\'^FileUrl(style3/header_right.jpg no-repeat right top width:100 height:100 text-align:right position:relative headerRight title position:absolute top:25px left:20px font-family:arial text-align:left title h1 text-transform:uppercase margin-bottom:0px font-weight:normal font-size:26pt margin-top:0px color:white title h1 a color:white text-decoration:none font-size 26pt font-weight normal title h2 margin:0px font-size:12pt color:#bebebe padding-left:20px title img z-index:5 login position:absolute font-size:8pt top:45 right:150px color:white z-index:6 font-family:arial login a color:white font-weight normal letter-spacing 0px loginBox font-size:8pt margin:0px display:inline loginBox input font-size:8pt mainBody width:100 margin:0px height:500px background fff position:relative z-index:0 main > mainBody height:auto min-height:500px contentArea z-index:2 position:relative padding-top:10px padding-left:10px padding-right:20px padding-bottom:20px moz-box-sizing:border-box font-family:verdana font-size:9pt min-height:500px html main mainBody contentArea height:1 topCorner width:100 height:214px position:absolute top:0px left:0px background url(^FileUrl(/style3/main_top.jpg no-repeat z-index:1 bottomCorner width:100 height:211px position:absolute bottom:59px right:0px background url(\'^FileUrl(style3/main_bottom.jpg no-repeat right z-index:1 html bottomCorner bottom:58px footer width:100 margin:0px background:#000 url(\'^FileUrl(style3/footer_right.jpg no-repeat right top height:57px border-top:solid B53018 2px text-align:right position:relative z-index:0 footer copyright color:#3b3b3b font-family:arial position:absolute top:20px left:30px font-size:8pt main yui-skin-sam font-family:verdana font-size:9pt font-weight:normal ','000001000001000051000002',NULL),('jVKLVakT_iA2010_oEuAwg','Style3 Coolmenu','','department_nav',1224116526,1224116526,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'Style3 Coolmenu Style3 Coolmenu department nav','000001000001000051000024',NULL),('UL-ItI4L1Z6-WSuhuXVvsQ','DataTable','','root/import/datatable',1225139673,1225139673,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'DataTable DataTable root import datatable','000001000001000011',NULL),('3rjnBVJRO6ZSkxlFkYh_ug','Default DataTable Template (YUI)','','root/import/datatable/default-datatable-template-yui',1225139643,1233861835,'3','7','3','WebGUI::Asset::Template',0,'Default DataTable Template YUI Default DataTable Template YUI root import datatable default datatable template yui DataTable','000001000001000011000001',NULL),('TuYPpHx7TUyk08639Pc8Bg','Default DataTable Template (HTML)','','root/import/datatable/default-datatable-template-html',1225139643,1233861621,'3','7','3','WebGUI::Asset::Template',0,'Default DataTable Template HTML Default DataTable Template HTML root import datatable default datatable template html DataTable','000001000001000011000002',NULL),('IZkrow_zwvbf4FCH-taVTQ','Inbox','','root/import/account/inbox',1226011853,1226011853,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Inbox Inbox root import account inbox','000001000001000002000002',NULL),('K0YjxqOqr7RupSo6sIdcAg','Friends','','root/import/account/friends',1227074310,1227074310,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Friends Friends root import account friends','000001000001000002000003',NULL),('_ilRXNR3s8F2vGJ_k9ePcg','User','','root/import/account/user',1226643205,1226643205,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'User User root import account user','000001000001000002000004',NULL),('AOjPG2NHgfL9Cq6dDJ7mew','Shop','','root/import/account/shop',1226659753,1236960881,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Shop Shop root import account shop','000001000001000002000005',NULL),('qaVcU0FFzzraMX_bzELqzw','Contributions','','root/import/account/contributions',1227074362,1227074362,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Contributions Contributions root import account contributions','000001000001000002000006',NULL),('matrixtmpl000000000004','Matrix Default Edit Listing','','default-matrix-edit-listing-template',1133743239,1281501163,'3','7','12','WebGUI::Asset::Template',0,'Matrix Default Edit Listing Matrix Default Edit Listing default matrix edit listing template Matrix/EditListing','000001000001000022000004',NULL),('kJf77eCr9GAMiEzWrzsBTA','matrix-ie.css','','new-matrix/matrix-ie.css',1229639255,1281501163,'3','7','12','WebGUI::Asset::Snippet',0,'matrix-ie.css matrix-ie.css new matrix matrix ie.css matrixLeft buttons span matrixRight buttons span padding:0px 0px 0px 0px matrixLeft buttons button matrixRight buttons a top:-3px left:-2px height:22px matrixRight buttons a color:black text-decoration:none padding:1px 3px ','000001000001000022000007',NULL),('4LQT4-bGW4FkiEQLSY5gvQ','show-hide.js','','new-matrix/show-hide.js',1232400287,1281501163,'3','7','12','WebGUI::Asset::Snippet',0,'show-hide.js show-hide.js new matrix show hide.js function showHide(theLink,theId var theId = document.getElementById(theId var theLink = document.getElementById(theLink if(theId.style.display == block theId.style.display = none theLink.innerHTML = Send Creator a Message theLink.className = showLink else theId.style.display = block theLink.innerHTML = Hide theLink.className = hideLink ','000001000001000022000008',NULL),('Vch1Ww7G_JpBhOhXX07RDg','matrx-nav','','new-matrix/matrix-nav',1232664082,1281501163,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'matrx-nav matrix-nav new matrix matrix nav','000001000001000022000010',NULL),('PBtmpl0000000000000063','Default Overview Report','','root/import/survey/default-overview-report',1124395696,1250243000,'3','7','12','WebGUI::Asset::Template',0,'Default Overview Report Default Overview Report root import survey default overview report Survey/Overview','000001000001000042000001',NULL),('HW-sPoDDZR8wBZ0YgFgPtg','images','','root/import/account/images',1227634350,1227634350,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'images images root import account images','000001000001000002000009',NULL),('hBpisL-_URyZnh9clR5ohA','no_photo.gif','','root/import/account/images/no_photo.gif',1227634417,1227634417,'3','7','12','WebGUI::Asset::File::Image',1,'no_photo.gif no_photo.gif root import account images no photo.gif','000001000001000002000009000001',NULL),('FOBV6KkifreXa4GmEAUU4A','no_photo_sm.gif','','root/import/account/images/no_photo_sm.gif',1227634447,1227634447,'3','7','12','WebGUI::Asset::File::Image',1,'no_photo_sm.gif no_photo_sm.gif root import account images no photo sm.gif','000001000001000002000009000002',NULL),('PBtmpl0000000000000061','Default Survey','','root/import/survey/default-survey',1124395696,1250243000,'3','7','12','WebGUI::Asset::Template',0,'Default Survey Default Survey root import survey default survey Survey','000001000001000042000003',NULL),('S2_LsvVa95OSqc66ITAoig','EMS Schedule Listing (default)','','root/import/ems/ems-schedule-listing-default2',1242730712,1257311887,'3','7','12','WebGUI::Asset::Template',0,'EMS Schedule Listing default EMS Schedule Listing default root import ems ems schedule listing default2 EMS/Schedule','000001000001000012000007',NULL),('VyCINX2KixKYr2pzQGX9Mg','layout.css','','layout.css',1246968584,1254881103,'3','7','12','WebGUI::Asset::Snippet',0,'layout.css layout.css layout.css styles for the layout asset wg-left float left wg-right float right wg-clear clear both sidebyside wg-content-position oneovertwo wg-content-position width 49 oneovertwo wg-top width 100 oneoverthree wg-first-column oneoverthree wg-second-column oneoverthree wg-third-column threeColumns wg-first-column threeColumns wg-second-column threeColumns wg-third-column width 32 oneoverthree wg-first-column threeColumns wg-first-column margin-right:2 rightcolumn wg-first-column width 65 rightcolumn wg-second-column width 33 ','000001000001000019000006',NULL),('jmlI9IK-lV8n2WMYmmPhAA','Ad Sku','','root/import/ad-sku',1238106173,1238106173,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Ad Sku Ad Sku root import ad sku','000001000001000001',NULL),('AldPGu0u-jm_5xK13atCSQ','Default Purchase Ad Sku Template','','root/import/ad-sku/default-purchase-ad-sku-template',1238106805,1251419124,'3','7','12','WebGUI::Asset::Template',0,'Default Purchase Ad Sku Template Default Purchase Ad Sku Template root import ad sku default purchase ad sku template AdSku/Purchase','000001000001000001000001',NULL),('ohjyzab5i-yW6GOWTeDUHg','Default Manage Ad Sku Template','','root/import/ad-sku/default-manage-ad-sku-template',1238106805,1251425384,'3','7','12','WebGUI::Asset::Template',0,'Default Manage Ad Sku Template Default Manage Ad Sku Template root import ad sku default manage ad sku template AdSku/Manage','000001000001000001000002',NULL),('PBtmpl0000000000000015','Default WebGUI Welcome Message Template','','root/import/auth/webgui/create/default-webgui-welcome-message-template',1237647040,1287545014,'3','7','12','WebGUI::Asset::Template',0,'Default WebGUI Welcome Message Template Default WebGUI Welcome Message Template root import auth webgui create default webgui welcome message template Auth/WebGUI/Welcome','000001000001000005000005000002',NULL),('PBtmpl0000000000000016','Default WebGUI Account Activation Template','','root/import/auth/webgui/create/default-webgui-account-activation-template',1237407798,1287545014,'3','7','3','WebGUI::Asset::Template',0,'Default WebGUI Account Activation Template Default WebGUI Account Activation Template root import auth webgui create default webgui account activation template Auth/WebGUI/Activation','000001000001000005000005000003',NULL),('wrq7hMxb1ewQqZ46xmd8Gg','equal-cols.js','','matrix/equal-cols.js',1235706620,1281501163,'3','7','12','WebGUI::Asset::Snippet',0,'equal-cols.js equal-cols.js matrix equal cols.js function equalCol var colOne = document.getElementById(\'compareForm var colTwo = document.getElementById(\'matrixRight var colOneH = colOne.offsetHeight var colTwoH = colTwo.offsetHeight alert(colOneH + + colTwoH colOne.style.overflow = scroll colOne.style.height = colTwoH 150 + px ','000001000001000022000011',NULL),('matrixtmpl000000000007','Matrix Default Screenshots Config','','matrix-default-screenshots-config',1236594030,1281501163,'3','7','12','WebGUI::Asset::Template',0,'Matrix Default Screenshots Config Matrix Default Screenshots Config matrix default screenshots config Matrix/ScreenshotsConfig','000001000001000022000012',NULL),('matrixtmpl000000000006','Matrix Default Screenshots','','matrix-default-screenshots',1236889702,1281501163,'3','7','12','WebGUI::Asset::Template',0,'Matrix Default Screenshots Matrix Default Screenshots matrix default screenshots Matrix/Screenshots','000001000001000022000013',NULL),('RSAMkc6WQmfRE3TOr1_3Mw','ExpireIncompleteSurveyResponses','','root/import/expireincompletesurveyresponses',1234828062,1250243000,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'ExpireIncompleteSurveyResponses ExpireIncompleteSurveyResponses root import expireincompletesurveyresponses','000001000001000042000011',NULL),('ExpireIncResptmpl00001','ExpireIncompleteSurveyResponses','','root/import/expireincompletesurveyresponses/expireincompletesurveyresponses',1236752721,1250243000,'3','7','12','WebGUI::Asset::Template',0,'ExpireIncompleteSurveyResponses ExpireIncompleteSurveyResponses root import expireincompletesurveyresponses expireincompletesurveyresponses ExpireIncompleteSurveyResponses','000001000001000042000011000001',NULL),('NBVSVNLp9X_bV7WrCprtCA','Annotate Image','','image3',1237842096,1237842096,'3','7','12','WebGUI::Asset::Template',0,'Annotate Image Annotate Image image3 ImageAsset','000001000001000017000002',NULL),('qsG6B24a0SC5KrhQjmdZBw','survey.css','','survey.css',1233860274,1287545015,'3','7','12','WebGUI::Asset::Snippet',0,'survey.css survey.css survey.css body margin 0 background-repeat repeat-y background-position 0px 0px survey-header width 80 height 20px margin-left 80px survey margin-left 80px width 85 div.dateanswer overflow auto div.slider-bg position relative background:url(/extras/wobject/Survey/bg-fader-500.gif 5px 0 no-repeat height:68px width:529px div.slider-thumb cursor:default position absolute top 30px left 4px div.slider-min-thumb cursor:default position absolute top 4px div.slider-max-thumb cursor:default position absolute top 4px headertitle display none headertext display none questions display none input.mcbutton font-size 10px font-weight bold text-decoration none background-color CCCCCC background-repeat repeat-x text-align center display block margin 0.5em padding 8em min-width 60px font-family Verdana Arial Helvetica sans-serif color 000000 background-image url(/extras/wobject/Survey/gradient-glossy.png input.mcbutton:hover background-color B6D2F1 font-family Verdana Arial Helvetica sans-serif font-size 10px color 000000 input.mcbutton-selected background-color 172D9D background-repeat repeat-x color FFFFFF font-family Verdana Arial Helvetica sans-serif font-size 10px margin 0.5em padding 8em width 60px text-align center display block font-weight bold background-image url(/extras/wobject/Survey/gradient-glossy.png background-position 0px 0px By default the marker for invalid required fields is a red survey-invalid-marker color FF0000 survey font-family Verdana Arial Helvetica sans-serif font-size 10px border 3px solid 1e1e1e survey survey-header background-color cfcfcf padding-top 1px survey headertitle padding-left 5px survey progress position relative top 26px right 5px text-align right font-style italic survey progress:before content Progress survey headertext border-bottom 2px solid 1e1e1e padding 5px survey questions survey question background-color dfdfdf padding 10px 5px 10px 5px survey question p:before content Q survey scale:before content A survey submitbutton margin-left 5px restartMessage color FF0000 chart float left width 200px height 113px ','000001000001000042000010',NULL),('6uvSLY-ak_w4p_wS8q33cA','Carousel','','root/import/carousel',1239213092,1239213092,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Carousel Carousel root import carousel','000001000001000007',NULL),('CarouselTmpl0000000001','Default Carousel','','root/import/carousel/carousel-default',1239290719,1301973997,'3','7','12','WebGUI::Asset::Template',0,'Default Carousel Default Carousel root import carousel carousel default Carousel','000001000001000007000001',NULL),('CarouselTmpl0000000002','Carousel hidden textareas','','root/import/carousel/carousel-hidden-textareas',1238878995,1239475937,'3','7','12','WebGUI::Asset::Template',0,'Carousel hidden textareas Carousel hidden textareas root import carousel carousel hidden textareas Carousel','000001000001000007000002',NULL),('GaBAW-2iVhLMJaZQzVLE5A','ThingyRecord Templates','','root/import/thingyrecord-templates',1240103565,1240103565,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'ThingyRecord Templates ThingyRecord Templates root import thingyrecord templates','000001000001000045',NULL),('TKmhv8boP3TD2xwSwUBq0g','Default ThingyRecord View','','home/thinyrecord-templates/default-thingyrecord-view',1240103436,1250243000,'3','7','3','WebGUI::Asset::Template',0,'Default ThingyRecord View Default ThingyRecord View home thinyrecord templates default thingyrecord view ThingyRecord/View','000001000001000045000001',NULL),('fowHfgOkJtAxdst7rugTog','Story Manager','','root/import/storymanager',1236184911,1252595993,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Story Manager Story Manager root import storymanager','000001000001000040',NULL),('3QpYtHrq_jmAk1FNutQM5A','Story Template','','root/import/storymanager/storytemplate',1239237827,1253636379,'3','7','4','WebGUI::Asset::Template',0,'Story Template Story Template root import storymanager storytemplate Story','000001000001000040000001',NULL),('yxD5ka7XHebPLD-LXBwJqw','StoryArchive','','root/import/storymanager/storyarchive',1239918573,1253635396,'3','7','4','WebGUI::Asset::Template',0,'StoryArchive StoryArchive root import storymanager storyarchive StoryArchive','000001000001000040000002',NULL),('A16v-YjWAShXWvSACsraeg','StoryTopic','','root/import/storymanager/storytopic',1239918710,1285124154,'3','7','4','WebGUI::Asset::Template',0,'StoryTopic StoryTopic root import storymanager storytopic StoryTopic','000001000001000040000005',NULL),('0EAJ9EYb9ap2XwfrcXfdLQ','Story Archive Asset List','','root/import/storymanager/keywordlist',1240262820,1250243000,'3','7','4','WebGUI::Asset::Template',0,'Story Archive Asset List Story Archive Asset List root import storymanager keywordlist StoryArchive/KeywordList','000001000001000040000006',NULL),('9j0_Z1j3Jd0QBbY2akb6qw','Default Map View','','home/map/map-templates/default-map-view',1238053232,1304392055,'3','7','3','WebGUI::Asset::Template',0,'Default Map View Default Map View home map map templates default map view Map/View','000001000001000020000001',NULL),('oHh0UqAJeY7u2n--WD-BAA','Default Edit Map Point','','home/map/map-templates/default-edit-map-point',1238040667,1304392055,'3','7','3','WebGUI::Asset::Template',0,'Default Edit Map Point Default Edit Map Point home map map templates default edit map point MapPoint/Edit','000001000001000020000002',NULL),('u9vfx33XDk5la1-QC5FK7g','Default Map Point View','','home/map/map-templates/default-map-point-view',1238048383,1304392055,'3','7','3','WebGUI::Asset::Template',0,'Default Map Point View Default Map Point View home map map templates default map point view MapPoint/View','000001000001000020000003',NULL),('kwTL1SWCk0GlpiJ5zAAEPQ','surveyedit.css','','root/import/survey/surveyedit.css',1244488512,1287545015,'3','7','12','WebGUI::Asset::Snippet',0,'surveyedit.css surveyedit.css root import survey surveyedit.css editor_container visibility hidden z-index 100 loading-mask position absolute left 0 top 0 width 100 height 100 z-index 20000 background-color white opacity:0.6 filter:alpha(opacity=60 loading position absolute left 50 top 50 padding 2px z-index 20001 height auto margin 35px 0 0 30px loading loading-indicator background url(^Extras(\"wobject/Survey/rel_interstitial_loading.gif no-repeat color 555 font bold 13px tahoma,arial,helvetica padding 18px 80px margin 0 text-align center height auto z-index 20002 div.testarea width 200px height 100px z-index 999 border 1px solid gray background f7f7f7 position absolute top 5 left:5 div.trashcan border 1px solid gray width 175px height 50px div.editarea margin-top:40px padding:10px float:left border 1px solid gray div.editquestion padding:10px float:left div.editanswer padding:10px float:left submitbutton padding:20px div.entry padding-bottom:10px padding-left:10px ul.draglist list-style none margin:0 padding:0 ul.draglist li margin 1px ul.questionList position relative background f7f7f7 border 1px solid gray list-style none margin:0 padding:0 min-height 40px li.section background-color CCCCFF border:1px solid 7EA6B2 cursor move min-height 10px li.question background-color D1E6EC border:1px solid 7EA6B2 cursor move padding-left:10px min-height 10px li.answer background-color F1FFB8 border:1px solid 7EA6B2 cursor move padding-left:15px min-height 10px sections-panel li.selected background-image url(^Extras(\"toolbar/bullet/moveRight.gif background-position:99 center background-repeat no-repeat font-weight:bold goto-yui-ac width:15em margin-top:0.5em wGwarning background-color:#FF6666 border:1px solid red margin:5px padding:10px warning padding 5px sections-panel bd overflow auto background-color:#fff padding:10px buttons height 30px sections-panel_c yui-resize yui-resize-handle-r right 6px make room for the scroll-bars sections-panel div.ft font-size 100 ','000001000001000042000014',NULL),('i5kt5aodVs_oepNEkE7Okw','poll.css','','poll.css',1242312883,1242312883,'3','7','12','WebGUI::Asset::Snippet',0,'poll.css poll.css poll.css styles for the poll asset pollColor background-color:#808080 pollOptions pollSubmit border:0 margin:0 padding:0 ','000001000001000027000002',NULL),('uCn31PzislTZlgt_79j7cQ','style.css','','css/style.css',1258524916,1258524916,'3','7','12','WebGUI::Asset::Snippet',0,'style.css style.css css style.css fail safe topWrapper font:82.5%/1.3 helvetica,arial,sans-serif width:98 overflow:hidden margin:0 auto 2em nav float:left width:20 margin:1em 0 2em nav menu list-style:none margin:0 padding:0 contentArea float:right width:77 margin:1em 0 2em padding:5px 1 border:1px solid ccc adminControls margin:1em 0 padding:1em 0 0 border-top:1px dotted ccc ','000001000001000041000006',NULL),('FJbUTvZ2nUTn65LpW6gjsA','Profile Account Layout','','root/import/account/profile/profile-account-layout',1227070381,1256092369,'3','7','12','WebGUI::Asset::Template',0,'Profile Account Layout Profile Account Layout root import account profile profile account layout Account/Layout','000001000001000002000001000001',NULL),('75CmQgpcCSkdsL-oawdn3Q','Default Edit Profile Template','','root/import/account/profile/default-edit-profile-template',1227052575,1253555614,'3','7','12','WebGUI::Asset::Template',0,'Default Edit Profile Template Default Edit Profile Template root import account profile default edit profile template Account/Profile/Edit','000001000001000002000001000002',NULL),('2CS-BErrjMmESOtGT90qOg','Default View Profile Template','','root/import/account/profile/default-view-profile-template',1227070888,1248549087,'3','7','12','WebGUI::Asset::Template',0,'Default View Profile Template Default View Profile Template root import account profile default view profile template Account/Profile/View','000001000001000002000001000003',NULL),('MBmWlA_YEA2I6D29OMGtRg','Default Profile Error Template','','root/import/account/profile/default-profile-error-template',1226542675,1248549086,'3','7','12','WebGUI::Asset::Template',0,'Default Profile Error Template Default Profile Error Template root import account profile default profile error template Account/Profile/Error','000001000001000002000001000004',NULL),('gfZOwaTWYjbSoVaQtHBBEw','Inbox Account Layout','','root/import/account/inbox-account-layout',1226974679,1249407461,'3','7','12','WebGUI::Asset::Template',0,'Inbox Account Layout Inbox Account Layout root import account inbox account layout Account/Layout','000001000001000002000002000001',NULL),('c8xrwVuu5QE0XtF9DiVzLw','Default Inbox View Template','','root/import/account/inbox/default-inbox-view-template',1226894351,1273032723,'3','7','12','WebGUI::Asset::Template',0,'Default Inbox View Template Default Inbox View Template root import account inbox default inbox view template Account/Inbox/View','000001000001000002000002000002',NULL),('0n4HtbXaWa_XJHkFjetnLQ','Default Inbox View Message Template','','root/import/account/inbox/default-inbox-view-message-template',1226894994,1248549086,'3','7','12','WebGUI::Asset::Template',0,'Default Inbox View Message Template Default Inbox View Message Template root import account inbox default inbox view message template Account/Inbox/ViewMessage','000001000001000002000002000003',NULL),('ErEzulFiEKDkaCDVmxUavw','Default Inbox Error Template','','root/import/account/inbox/default-inbox-error-template',1226895484,1248549086,'3','7','12','WebGUI::Asset::Template',0,'Default Inbox Error Template Default Inbox Error Template root import account inbox default inbox error template Account/Inbox/Error','000001000001000002000002000004',NULL),('6uQEULvXFgCYlRWnYzZsuA','Default Inbox Send Message Template','','root/import/account/inbox/default-inbox-send-message-template',1226896682,1279073450,'3','7','12','WebGUI::Asset::Template',0,'Default Inbox Send Message Template Default Inbox Send Message Template root import account inbox default inbox send message template Account/Inbox/SendMessage','000001000001000002000002000005',NULL),('DUoxlTBXhVS-Zl3CFDpt9g','Default Message Confirm Template','','root/import/account/inbox/default-message-confirm-template',1226896802,1248549086,'3','7','12','WebGUI::Asset::Template',0,'Default Message Confirm Template Default Message Confirm Template root import account inbox default message confirm template Account/Inbox/Confirm','000001000001000002000002000006',NULL),('1Q4Je3hKCJzeo0ZBB5YB8g','Default Manage Invitations Template','','root/import/account/inbox/default-manage-invitations-template',1226898445,1248549086,'3','7','12','WebGUI::Asset::Template',0,'Default Manage Invitations Template Default Manage Invitations Template root import account inbox default manage invitations template Account/Inbox/ManageInvitations','000001000001000002000002000007',NULL),('5A8Hd9zXvByTDy4x-H28qw','Default Invitation Confirmation Template','','root/import/account/inbox/default-invitation-confirmation-template',1226899462,1248549086,'3','7','12','WebGUI::Asset::Template',0,'Default Invitation Confirmation Template Default Invitation Confirmation Template root import account inbox default invitation confirmation template Account/Inbox/Confirm','000001000001000002000002000008',NULL),('VBkY05f-E3WJS50WpdKd1Q','Default View Invitation Template','','root/import/account/inbox/default-view-invitation-template',1226899241,1248549087,'3','7','12','WebGUI::Asset::Template',0,'Default View Invitation Template Default View Invitation Template root import account inbox default view invitation template Account/Inbox/ViewInvitation','000001000001000002000002000009',NULL),('XgcsoDrbC0duVla7N7JAdw','Default Invite User Email Template','','root/import/account/inbox/default-invite-user-email-template',1226973330,1248549086,'3','7','12','WebGUI::Asset::Template',0,'Default Invite User Email Template Default Invite User Email Template root import account inbox default invite user email template Account/Inbox/InviteUserMessage','000001000001000002000002000010',NULL),('cR0UFm7I1qUI2Wbpj--08Q','Default Invite User Form Template','','root/import/account/inbox/default-invite-user-form-template',1226964738,1248549086,'3','7','12','WebGUI::Asset::Template',0,'Default Invite User Form Template Default Invite User Form Template root import account inbox default invite user form template Account/Inbox/InviteUser','000001000001000002000002000011',NULL),('SVIhz68689hwUGgcDM-gWw','Default Invite User Confirm Template','','root/import/account/inbox/default-invite-user-confirm-template',1226973314,1248549086,'3','7','12','WebGUI::Asset::Template',0,'Default Invite User Confirm Template Default Invite User Confirm Template root import account inbox default invite user confirm template Account/Inbox/InviteUserConfirm','000001000001000002000002000012',NULL),('zrNpGbT3odfIkg6nFSUy8Q','Friends Layout Template','','root/import/account/friends/friends-layout-template',1226994016,1249407461,'3','7','12','WebGUI::Asset::Template',0,'Friends Layout Template Friends Layout Template root import account friends friends layout template Account/Layout','000001000001000002000003000001',NULL),('1Yn_zE_dSiNuaBGNLPbxtw','Default Friends View Template','','root/import/account/friends/default-friends-view-template',1226994422,1248549086,'3','7','12','WebGUI::Asset::Template',0,'Default Friends View Template Default Friends View Template root import account friends default friends view template Account/Friends/View','000001000001000002000003000002',NULL),('AZFU33p0jpPJ-E6qLSWZng','Default Friends Edit Template','','root/import/account/friends/default-friends-edit-template',1226994865,1248549086,'3','7','12','WebGUI::Asset::Template',0,'Default Friends Edit Template Default Friends Edit Template root import account friends default friends edit template Account/Friends/Edit','000001000001000002000003000003',NULL),('AGJBGviWGAwjnwziiPjvDg','Default Send Request Template','','root/import/account/friends/default-send-request-template',1226995497,1248549087,'3','7','12','WebGUI::Asset::Template',0,'Default Send Request Template Default Send Request Template root import account friends default send request template Account/Friends/SendRequest','000001000001000002000003000004',NULL),('7Ijdd8SW32lVgg2H8R-Aqw','Default Friends Error Template','','root/import/account/friends/default-friends-error-template',1226995714,1248549086,'3','7','12','WebGUI::Asset::Template',0,'Default Friends Error Template Default Friends Error Template root import account friends default friends error template Account/Friends/Error','000001000001000002000003000005',NULL),('K8F0j_cq_jgo8dvWY_26Ag','Default Friends Confirmation Template','','root/import/account/friends/default-friends-confirmation-template',1226995643,1248549086,'3','7','12','WebGUI::Asset::Template',0,'Default Friends Confirmation Template Default Friends Confirmation Template root import account friends default friends confirmation template Account/Friends/Confirm','000001000001000002000003000006',NULL),('G5V6neXIDiFXN05oL-U3AQ','Default Remove Friends Confirmation Template','','root/import/account/friends/default-remove-friends-confirmation-template',1226995768,1248549087,'3','7','12','WebGUI::Asset::Template',0,'Default Remove Friends Confirmation Template Default Remove Friends Confirmation Template root import account friends default remove friends confirmation template Account/Friends/Confirm','000001000001000002000003000007',NULL),('9ThW278DWLV0-Svf68ljFQ','Account Layout','','root/import/account/user/account-layout',1226647187,1249407460,'3','7','12','WebGUI::Asset::Template',0,'Account Layout Account Layout root import account user account layout Account/Layout','000001000001000002000004000001',NULL),('aUDsJ-vB9RgP-AYvPOy8FQ','Shop Account Layout','','root/import/account/shop/shop-account-layout',1226660439,1263962529,'3','7','12','WebGUI::Asset::Template',0,'Shop Account Layout Shop Account Layout root import account shop shop account layout Account/Layout','000001000001000002000005000001',NULL),('-zxyB-O50W8YnL39Ouoc4Q','Default My Sales Template','','root/import/default-my-sales-template',1236959717,1248563425,'3','7','12','WebGUI::Asset::Template',0,'Default My Sales Template Default My Sales Template root import default my sales template Shop/MySales','000001000001000002000005000002',NULL),('b4n3VyUIsAHyIvT-W-jziA','Contributions Layout','','root/import/account/contributions/contributions-layout',1227074747,1249407461,'3','7','12','WebGUI::Asset::Template',0,'Contributions Layout Contributions Layout root import account contributions contributions layout Account/Layout','000001000001000002000006000001',NULL),('1IzRpX0tgW7iuCfaU2Kk0A','Default Contributions View','','root/import/account/contributions/default-contributions-view',1227079721,1250243000,'3','7','12','WebGUI::Asset::Template',0,'Default Contributions View Default Contributions View root import account contributions default contributions view Account/Contrib/View','000001000001000002000006000002',NULL),('N716tpSna0iIQTKxS4gTWA','Default Account Layout','','root/import/account/default-account-layout2',1226604666,1281501163,'3','7','12','WebGUI::Asset::Template',0,'Default Account Layout Default Account Layout root import account default account layout2 Account/Layout','000001000001000002000007',NULL),('CalendarMonth000000001','Default Calendar Month','','root/import/calendar-templates/default-calendar-month',1204890713,1279073449,'3','7','12','WebGUI::Asset::Template',0,'Default Calendar Month Default Calendar Month root import calendar templates default calendar month Calendar/Month','000001000001000006000007',NULL),('q5O62aH4pjUXsrQR3Pq4lw','Default Gallery View Album Thumbnails','','root/import/gallery-templates/default-gallery-view-album-thumbnails',1197825772,1285124155,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery View Album Thumbnails Default Gallery View Album Thumbnails root import gallery templates default gallery view album thumbnails GalleryAlbum/ViewThumbnails','000001000001000015000004',NULL),('kaPRSaf8UKiskiGEgJgLAw','images','','root/import/gallery-templates/images',1197330678,1285124155,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'images images root import gallery templates images','000001000001000015000017',NULL),('matrixtmpl000000000001','Matrix Default View','','matrix-default-view-template',1133743238,1281501162,'3','7','12','WebGUI::Asset::Template',0,'Matrix Default View Matrix Default View matrix default view template Matrix','000001000001000022000002',NULL),('matrixtmpl000000000003','Matrix Default Detailed Listing','','matrix-default-detailed-listing',1133743238,1281501163,'3','7','12','WebGUI::Asset::Template',0,'Matrix Default Detailed Listing Matrix Default Detailed Listing matrix default detailed listing Matrix/Detail','000001000001000022000003',NULL),('alraubvBu-YJJ614jAHD5w','matrix-nav-tmpl','','new-matrix/matrix-nav-tmpl',1232664015,1281501163,'3','7','12','WebGUI::Asset::Template',0,'matrix-nav-tmpl matrix-nav-tmpl new matrix matrix nav tmpl Navigation','000001000001000022000009',NULL),('PBtmpl0000000000000062','Default Gradebook Report','','root/import/survey/default-gradebook-report',1124395696,1250243000,'3','7','12','WebGUI::Asset::Template',0,'Default Gradebook Report Default Gradebook Report root import survey default gradebook report Survey/Gradebook','000001000001000042000002',NULL),('d8jMMMRddSQ7twP4l1ZSIw','Default Survey Take','','root/import/survey/default-survey-take',1227248175,1253555614,'3','7','12','WebGUI::Asset::Template',0,'Default Survey Take Default Survey Take root import survey default survey take Survey/Take','000001000001000042000005',NULL),('E3tzZjzhmYoNlAyP2VW33Q','Edit Story','','root/import/storymanager/editstory',1239236292,1303183716,'3','7','4','WebGUI::Asset::Template',0,'Edit Story Edit Story root import storymanager editstory Story/Edit','000001000001000040000003',NULL),('TbDcVLbbznPi0I0rxQf2CQ','Story Template Topic','','root/import/storymanager/storytemplatetopic',1237524306,1253636379,'3','7','4','WebGUI::Asset::Template',0,'Story Template Topic Story Template Topic root import storymanager storytemplatetopic Story','000001000001000040000004',NULL),('brxm_faNdZX5tRo3p50g3g','Map Templates','','home/map/map-templates',1238054297,1304392055,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'Map Templates Map Templates home map map templates','000001000001000020',NULL),('i9-G00ALhJOr0gMh-vHbKA','Inbox SMS Notification','','root/import/inbox-sms-notification',1250408924,1250408924,'3','7','4','WebGUI::Asset::Template',0,'Inbox SMS Notification Inbox SMS Notification root import inbox sms notification Account/Inbox/Notification','000001000001000002000002000014',NULL),('S3zpVitAmhy58CAioH359Q','Default Test Results','','root/import/survey/default-test-results',1242893798,1250243000,'3','7','12','WebGUI::Asset::Template',0,'Default Test Results Default Test Results root import survey default test results Survey/TestResults','000001000001000042000013',NULL),('b1316COmd9xRv4fCI3LLGA','Inbox Notification','','inbox_notification',1236956475,1236956475,'3','7','4','WebGUI::Asset::Template',0,'Inbox Notification Inbox Notification inbox notification Account/Inbox/Notification','000001000001000002000002000013',NULL),('nWNVoMLrMo059mDRmfOp9g','Default Feedback','','root/import/survey/default-feedback',1242259265,1250243000,'3','7','12','WebGUI::Asset::Template',0,'Default Feedback Default Feedback root import survey default feedback Survey/Feedback','000001000001000042000015',NULL),('l0guT3vTR3B8cL6vtP-g3A','Contribute','You don\'t have to be a developer to become a project contributor. Examples of how you can contribute include:\n \n\nTranslators - Visit i18n.webgui.org\n and either help translate a few items in an existing language, or \ncreate a new translation. \nGraphic Des','contribute',1271445611,1285124369,'3','7','3','WebGUI::Asset::Wobject::Article',1,'Contribute contribute contribute You don\'t have to be a developer to become a project contributor Examples of how you can contribute include Translators Visit i18n.webgui.org and either help translate a few items in an existing language or create a new translation Graphic Designers Create WebGUI style themes icons or fix UI bugs You can contribute your items to WebGUI\'s Addons and Plugins area for others to download and use Usability Experts Help make WebGUI more accessable and easier to use by submitting RFEs Even better submit an RFE that\'s ready to implement by including the code Doc Writers Write documents in WebGUI\'s wiki help out on the boards improve WebGUI\'s built in documentation Testers Validate WebGUI\'s features against its documentation search for errors and report bugs Test writers If you have some Perl abilities you can help develop unit tests to make sure the WebGUI API is behaving as documented Developers Write a new feature for WebGUI like a macro asset wobject auth module or workflow activity and contribute it to the Addons and Plugins If you\'re interested in developing for WebGUI be sure to check out the Development Best Practices wiki article Bug Fixers Cruise the bug list and submit patches to correct the problem Core Developers Becoming a core developer is a privilege To earn it you have to demonstrate through bug fixes and/or contributions that you can make sound programming decisions without the need for someone to scrutinize everything you check in WebGUI is a very large and complex application so getting to this level can take some time Core developers are developers with commit privileges to the subversion repository Advocate Spread the word about WebGUI tell people about how you use it and how it\'s helped you.Encourage people to try it out Marketing and Promotion If you have a talent for marketing advertising or promotion you can be a super advocate Have a marketing idea Contact tavis AT plainblack DOT com Make a WebGUI banner or print ad and contribute it Maybe you have a design for a cool wallpaper or t-shirt anything to get the word out ','000001000002000004000002',NULL),('D6cJpRcey35aSkh9Q_FPUQ','Default EU User Screen','','root/import/default-eu-user-screen',1242407725,1313542961,'3','7','12','WebGUI::Asset::Template',0,'Default EU User Screen Default EU User Screen root import default eu user screen TaxDriver/EU/User','000001000001000036000019',NULL),('lo1rpxn3t8YPyKGers5eQg','Friend Manager','Templates for the Friend Manager ','root/import/account/friendmanager',1238625621,1238625621,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Friend Manager Friend Manager root import account friendmanager Templates for the Friend Manager','000001000001000002000010',NULL),('64tqS80D53Z0JoAs2cX2VQ','FriendManager View Template','','root/import/account/friendmanager/view',1239400975,1295931508,'3','7','4','WebGUI::Asset::Template',0,'FriendManager View Template FriendManager View Template root import account friendmanager view Account/FriendManager/View','000001000001000002000010000001',NULL),('lG2exkH9FeYvn4pA63idNg','Friend Manager Edit Friends','','root/import/account/friendmanager/edit',1239383808,1289967962,'3','7','4','WebGUI::Asset::Template',0,'Friend Manager Edit Friends Friend Manager Edit Friends root import account friendmanager edit Account/FriendManager/Edit','000001000001000002000010000002',NULL),('newslettercs0000000001','Newsletter Manager (default)','','newslettercstemplate',1185754569,1252682678,'3','7','3','WebGUI::Asset::Template',0,'Newsletter Manager default Newsletter Manager newslettercstemplate Collaboration','000001000001000026000002',NULL),('iCM9pRY5yYyjufROgaCDlg','storyManager.css','','storymanager.css',1253305659,1253305659,'3','7','12','WebGUI::Asset::Snippet',0,'storyManager.css storyManager.css storymanager.css editStory width 100 editStory legend font-size 1.8em border-bottom 2px solid editStory tbody width 943px editStory td padding 5px editStory story float:left editStory story label editStory photo label display block width 100 text-align right editStory photoContainer border 1px solid float:left margin 10px 0 0 20px editStory photoContainer photoHeader font-size 1.2em font-weight bold editStory buttons clear both text-align right padding 10px 0 editStory story_formId_tbl width 100 important editStory fieldset border none storyArchive width 100 storyArchive h3 border-bottom 2px solid margin-bottom 10px storyArchive storyList list-style-type none padding-left 0 storyArchive storyList li padding-left 10px margin-bottom 10px storyArchive pagination float left list-style-type none storyArchive keywords width 100 clear both storyArchive img border none storyArchive controls a margin-right 10px viewStory storyTitle viewStory storyUpdated viewStoryTopic storyTitle viewStoryTopic storyUpdated float left viewStory storyTitle viewStoryTopic storyTitle font-size 1.5em width 100 viewStory storyHighlights viewStoryTopic storyHighlights float:right margin-top 1.5em viewStory storyPhoto viewStoryTopic storyPhoto float left margin 0 10px 10px 0 viewStory photoCaption viewStoryTopic photoCaption width 496px padding 5px display:block viewStory clear viewStoryTopic clear clear both storyTopic width 100 storyTopic h3 border-bottom 2px solid storyTopic topStory width 340px float left storyTopic storyList width 250px float left storyTopic storyListBig width 100 float left htmltagcloud wg-clear clear:both ','000001000001000040000007',NULL),('zb_OPKNqcTuIjdvvbEkRjw','article.css','','article.css',1247484073,1256092368,'3','7','12','WebGUI::Asset::Snippet',0,'article.css article.css article.css styles for the article asset withImage articleContent linkedImage articleContent width:100 overflow:hidden withImage articleImage linkedImage articleImage float:right margin:0 0 10px 10px linkedImage caption display:block ','000001000001000004000005',NULL),('PBtmpl0000000000000210','Request Tracker Post Form','','request-tracker-template2',1147642410,1277868922,'3','7','12','WebGUI::Asset::Template',0,'Request Tracker Post Form Request Tracker Post Form request tracker template2 Collaboration/PostForm','000001000001000008000028',NULL),('pbrobot000000000000001','robots.txt','','robots.txt',1147642511,1256092369,'3','7','12','WebGUI::Asset::Snippet',0,'robots.txt robots.txt robots.txt User-agent Disallow op=auth Disallow op=account Disallow op=ajaxGetI18N Disallow op=makePrintable Disallow op=viewHelp Disallow op=viewHelpIndex','000001000001000033',NULL),('4qh0kIsFUdd4Ox-Iu1JZgg','EMS','','root/import/ems',1208725439,1257311886,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'EMS EMS root import ems','000001000001000012',NULL),('hreA_bgxiTX-EzWCSZCZJw','Print Remaining Tickets Template (default)','','root/import/ems/default-print-remaining-tickets-template',1257311887,1257311887,'3','7','12','WebGUI::Asset::Template',0,'Print Remaining Tickets Template default Print Remaining Tickets Template default root import ems default print remaining tickets template EMS/PrintRemainingTickets','000001000001000012000008',NULL),('P_4uog81vSUK4KxuW_4GUA','css','','css',1258524916,1258524916,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'css css css','000001000001000054',NULL),('H_-8zjtWsO1FUpQqNtkxNQ','wg-base.css','','css/wg-base.css',1258524916,1258524916,'3','7','12','WebGUI::Asset::Snippet',0,'wg-base.css wg-base.css css wg base.css In this stylesheet you can find the styles that are used in more than one template For example file/attachment icons pagination etc Elements that are styled with this stylesheet have a classname that starts with wg general wg-icon border:0px none vertical-align middle wg-clear clear:both inline list pagination wg-inline margin:0 0 1em padding:0 wg-inline li display:inline margin:0 padding:0 wg-inline li.active font-weight:bold forms wg-captchaImage border:0 none vertical-align:middle margin-left:5px ','000001000001000054000001',NULL),('0iMMbGN3BevuCBHjjLiQNA','WebGUI/Deactivate','','root/import/auth/webgui/deactivate',1269401469,1287545015,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'WebGUI/Deactivate WebGUI/Deactivate root import auth webgui deactivate','000001000001000005000009',NULL),('zaHUYsE_PgKk8hnVd8ffEQ','WebGUI Deactivate Account Template','','default_webgui_deactivate_account_template',1269401469,1287545015,'3','7','12','WebGUI::Asset::Template',0,'WebGUI Deactivate Account Template WebGUI Deactivate Account Template default webgui deactivate account template Auth/WebGUI/Deactivate','000001000001000005000009000001',NULL),('6A4yIjWwJfIE0Ep-I0jutg','LDAP/Deactivate','','root/import/auth/ldap/deactivate',1269401469,1287545015,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'LDAP/Deactivate LDAP/Deactivate root import auth ldap deactivate','000001000001000005000010',NULL),('_P4PMiraGsLTfOjK4fYQPQ','LDAP Deactivate Account Template','','default_ldap_deactivate_account_template',1269401469,1287545015,'3','7','12','WebGUI::Asset::Template',0,'LDAP Deactivate Account Template LDAP Deactivate Account Template default ldap deactivate account template Auth/LDAP/Deactivate','000001000001000005000010000001',NULL),('_XfvgNH__bY1ykMiKYSobQ','account.css','','root/import/account/account.css',1233168041,1281501163,'3','7','12','WebGUI::Asset::Snippet',0,'account.css account.css root import account account.css general WGsubContent WGsubContent a WGsubContent a:link color:#000000 important WGbutton float:right padding-right:10px centered text-align center WGaccount_message background-color white border solid BECEF8 1px height 300px margin-bottom 10px margin-left 60px margin-top 20px overflow:-moz-scrollbars-vertical overflow-x:hidden overflow-y:scroll padding:10px text-align left vertical-align:top width 90 WGprofileMember font-size:9px margin-right:20px text-align:right WGmember color:#3e4f77 font 9px Verdana Arial Helvetica sans-serif text-align:center WGphotostyle border:solid 3e4f77 2px margin-bottom:5px margin-top:5px rightalign float right WGsend float:right padding-right 75px bio addtonetwork network WGbordered border-bottom dashed BECEF8 2px padding-bottom 10px WGfriendpic border solid BECEF8 1px WGinvitemsg width 600px height 150px ol.WGProfile_interests color:#0B2259 font-size:15px font-weight:bold list-style-type:none margin:0px padding:0px padding:5px 5px ol.WGProfile_interests li margin-bottom:15px ol.WGProfile_interests span font-size:12px font-weight:normal color:black WGpBio border-bottom:solid DDE6FB 1px margin:0px margin-bottom:5px padding-bottom:5px WGpBio div background-color:#DDE6FB padding:2px 5px margin-bottom:2px WGprogram font-size 9px contributions WGContribCount font-size:12px text-align:left padding:3px WGContribTitle background-color:#f2f5fa border solid d8dee8 1px color:#0B2259 font-size:12px font-weight:bold min-height:25px padding:3px text-align:center text-decoration underline WGContribTitleLeft background-color:#f2f5fa border solid d8dee8 1px color:#0B2259 font-size:12px font-weight:bold min-height:25px padding:3px text-align:center text-decoration underline WGContribEntry text-align:center padding:3px WGContribEntryLeft text-align:left padding:3px edit box WGeditBox background:white url(images/edit_box_bg.jpg no-repeat bottom left border:solid 8DABF1 2px display:block font-family:verdana font-size:9px font-weight:bold left:100px moz-box-sizing:border-box padding:5px position:absolute top:100px width:590px z-index:100 WGeditBox input WGeditBox select font-size:9px friends WGfriends_name font-weight:bold width:90 WGfriends_photo font-weight:bold width:10 WGfriends_photo img height 50px width 50px WGfriends_private float:right padding-bottom 5px width 50 WGfriends_ninety vertical-align:top width 90 WGfriends_seventy vertical-align:top width 70 WGfriends_ten width 10 WGfriends_ten img height 50px width 50px WGfriends_twenty width 20 WGaccepts padding-bottom 5px inbox WGProfile_msgcontainer padding:2px WGinbox_count font-size:12px font-weight:bold padding:3px text-align:left WGinbox_errors font-weight:bold color:red text-align:center WG_inbox_InviteLabel width:50px text-align:right WG_inbox_InviteLabelView font-weight:bold width:120px WGmsgcontainer padding:6px display:block margin-bottom:6px inbox contacts WGdatacells border-bottom dashed BECEF8 1px WGinbox_contactsTbl background-color:#EEF2FD font-family:arial font-size:9pt width:100 contacts height 275px overflow auto inbox forms WGbuttons_left float left WGbuttons_right float right WGinbox_from color black font-weight normal text-decoration none WGinbox_subject width 530px WGinbox_messageTo background-color white border solid BECEF8 1px height 50px overflow:-moz-scrollbars-vertical overflow-x:hidden overflow-y:scroll width 530px inbox pagination WGinbox_buttons display:inline float:left font-size:10px text-align:left width:70 WGinbox_pagination display:inline text-align:right width:20 WGinbox_messagerpp font-size:10px display:inline text-align:right width:20 WGmessage display:inline float:left font-size:10px text-align:left width:70 WGmessagerpp font-size:10px display:inline text-align:right float right WG-previous-next float right inbox threads WGevenThread background-color e1e8fb border-bottom 1px solid bfcef9 padding 8px text-align:center WGoddThread background-color eef2fd border-bottom 1px solid bfcef9 padding 8px text-align center pagination WGProfile_pagination font-size:10px text-align:right width:20 WGProfile_messagerpp font-size:10px display:inline text-align:right width:20 WGProfile_paginationLeft font-size:10px text-align:left width:20 WGProfile_paginationCenter font-size:10px text-align:center width:20 WGProfile_pagination a background-color:#f2f5fa border:solid bfc8dc 1px font-size:10px font-weight:bold padding:1px 5px text-decoration:none WGProfile_pagination a:hover background-color:#d8dee8 color:white WGProfile_pagination prevNext background-color transparent border none color black WGProfile_pagination prevNext:hover background-color transparent border none color black WGProfile_pagination active background-color:#d8dee8 border:solid bfc8dc 1px color:white font-size:10px font-weight:bold padding:1px 5px text-decoration:none WGProfile_pagination img vertical-align:middle margin-top:2px border:none profile WGProfile_registration background:none border:none font-size:9pt font-family:arial margin:0 padding:0 width:100 WGProfile_registration header background-color:#818997 color:#3e4f77 font-size:10px font-weight:bold text-align:left WGProfile_registration header a color:white text-decoration:none WGProfile_registration help a font-weight:bold text-decoration:none WGProfile_registration inputText font-size:10px margin-right:1px WGProfile_registration label font-size:9pt font-weight:bold text-align:right white-space:nowrap width:1 WGProfile_registration labelLeft font-size:9pt font-weight:bold white-space:nowrap width:1 text-align left vertical-align top WGProfile_registration smallLabel font-size:8px text-align:center WGProfile_registration smallText font-size:9px WGinboxTbl display:block margin 4px padding 2px WGProfile_registration bar WGProfile_registration barRight background-color:#f2f5fa border solid d8dee8 1px color:#3e4f77 font-size:14px font-weight:bold margin:10px 0px 10px 0px min-height:25px padding:4px 4px 0px 4px vertical-align:middle WGProfile_registration bar text-align center WGProfile_registration barRight text-align right WGProfile_registration bar a color:#0B2259 font-size:10px font-weight:bold WGProfile_registration barFive background-color:#f2f5fa border solid d8dee8 1px color:#3e4f77 font-size:14px font-weight:bold text-align:center margin-right:3px min-height:25px padding:2px width:4.3 WGProfile_registration barTen background-color:#f2f5fa border solid d8dee8 1px color:#3e4f77 font-size:14px font-weight:bold min-height:25px padding:2px text-align:center width:7.2 WGProfile_registration barFifteen background-color:#f2f5fa border solid d8dee8 1px color:#3e4f77 font-size:14px font-weight:bold margin-right:3px min-height:25px padding:2px text-align:center width:15 WGProfile_registration barFifty background-color:#f2f5fa border solid d8dee8 1px color:#3e4f77 font-size:14px font-weight:bold margin-right:3px min-height:25px padding:2px text-align:center width:50 WGbarContainer display:block margin:10px 0px 10px 0px width:100 profile edit WGfields padding 2px WGfields_left padding:2px vertical-align:top width 15 WGfields_right display:inline float:right padding:2px text-align:right width:80 vertical-align top WGProfile display:table margin 0 padding 0 width:100 WGProfileFields border:0 padding 0 margin:0 width 100 WGProfileFields ol display inline list-style-type none WGProfileFields ul list-style-type none display inline WGProfileFields ul li display inline-block display inline zoom 1 profile view WGProfile_accepts text-align:right background-color:gray padding:4px width:100 WGviewContainer margin:0 padding:0 width:90 WGinternational background-color:red color:white display:inline font-weight:bold padding:4px text-align:center WGcategoryLabel vertical-align:top width:90 WGprivateMessage background-color:gray padding:4px text-align:right WGprofileAlert background-color:red color:white font-weight:bold padding:4px text-align:center width:100 WGprofilePhoto vertical-align:top profile errors WGprofileErrors background-color ff0000 color ffffff font-weight bold text-align center WGprofilefield_required_off WGprofilefield_required background-color ffd6bb WGprofilefield_error background-color FF9494 WGerrorMsg font-weight:bold color:red text-align:center user WGuserInvite_subject background-color white border solid BECEF8 1px height 25px text-align left width 500px margin-left 50px margin-bottom 20px overflow:-moz-scrollbars-vertical overflow-x:hidden overflow-y:scroll view profile WGprofile_canEdit text-align:center background-color:red padding:4px color:white font-weight:bold WGprofile_fieldLabel background DDE6FB padding:2px width:200px WGprofile_fieldData margin-left 5px WGprofile_fieldStatus padding:4px color:white font-weight:bold TABS TABS outer WGbottombutton float:right padding-right:2px padding-top 2px position relative WGcontent padding:10px WGcleartab clear both height:0 WGsubContent color setting for border under outer tabs that surrounds inner tabs border solid d8dee8 6px WGtopbutton float:right clear:both padding-right:2px padding-top 2px position relative ul.WGtopTabs ul.WGtopTabs li list-style-type:none margin:10px 0px 0px 0px padding:0px position:relative width:auto Xposition:relative zoom:1 ul.WGtopTabs li display:block float:left margin-right 3px ul.WGtopTabs li b background-color eef2fd border-top:solid d8dee8 1px display:block padding:4px 8px position:relative top:-1px ul.WGtopTabs a non-selected tabs color settings display:block color:#9ea0bb important font-size:12px font-family Arial Helvetica sans-serif text-decoration:none background-color:#f2f5fa border-left solid d8dee8 1px border-right solid d8dee8 1px ul.WGtopTabs a:hover ul.WGtopTabs a:hover b ul.WGtopTabs a.selected ul.WGtopTabs a.selected b selected tab color settings background-color:#d8dee8 color:#3e4f77 text-align right TABS YUI WGcleardiv clear both margin 0px 0px 0px 0px padding 0px WGviewProfile wgView border none font bold 10px Verdana color 3e4f77 text-decoration:none WGview position absolute right 4px top:4px WGprofile_displayView x-system-font:none border:medium none color:#0B2258 display:inline float:right font-family:Verdana font-size:10px font-size-adjust:none font-stretch:normal font-style:normal font-variant:normal font-weight:bold line-height:normal padding-right:8px padding-top:3px text-decoration none WGprofile_displaySubContent border around friends tab content border solid d8dee8 6px border-top solid d8dee8 18px Copyright c 2008 Yahoo Inc All rights reserved Code licensed under the BSD License http://developer.yahoo.net/yui/license.txt version 2.6.0 yui tabs color settings below yui-navset defaults to yui-navset-top WGsubContent yui-skin-sam yui-navset yui-nav WGsubContent yui-skin-sam yui-navset yui-navset-top yui-nav protect nested tabviews from other orientations border:solid eef2fd color between tab list and content border-width:0 0 5px Xposition:relative zoom:1 WGsubContent yui-skin-sam yui-navset yui-nav a WGsubContent yui-skin-sam yui-navset yui-navset-top yui-nav a background:#ffffff tab background border:solid ffffff border-width:0 1px color:#bfccdd position:relative text-decoration:none font-size:12px font-family Arial Helvetica sans-serif font-weight bold WGsubContent yui-skin-sam yui-navset yui-nav a em WGsubContent yui-skin-sam yui-navset yui-navset-top yui-nav a em border:solid eef2fd border-width:1px 0 0 cursor:hand padding:0.25em 75em left:0 right 0 bottom 0 protect from other orientations top:-1px for 1px rounded corners position:relative WGsubContent yui-skin-sam yui-navset yui-nav selected a WGsubContent yui-skin-sam yui-navset yui-nav selected a:focus no focus effect for selected WGsubContent yui-skin-sam yui-navset yui-nav selected a:hover no hover effect for selected background eef2fd selected tab background color 3e4f77 font-size:12px font-family Arial Helvetica sans-serif text-decoration:none font-weight bold WGsubContent yui-skin-sam yui-navset yui-nav selected a WGsubContent yui-skin-sam yui-navset yui-nav selected a em border-color:#eef2fd selected tab border color WGsubContent yui-skin-sam yui-navset yui-nav a:hover WGsubContent yui-skin-sam yui-navset yui-nav a:focus background eef2fd hover tab background color 3e4f77 outline:0 font-size:12px font-family Arial Helvetica sans-serif text-decoration:none font-weight bold WGsubContent yui-skin-sam yui-navset yui-content background eef2fd content background color WGsubContent yui-skin-sam yui-navset yui-content WGsubContent yui-skin-sam yui-navset yui-navset-top yui-content border:5px solid eef2fd content border padding:0.75em 1em content padding left and right orientations WGsubContent yui-skin-sam yui-navset-left yui-nav WGsubContent yui-skin-sam yui-navset yui-navset-left yui-nav WGsubContent yui-skin-sam yui-navset yui-navset-right yui-nav WGsubContent yui-skin-sam yui-navset-right yui-nav border-width:0 5px 0 0 Xposition:absolute from tabview-core have to reiterate for skin-sam due to pos:rel on skin-sam yui-nav top:0 bottom:0 stretch to fill content height WGsubContent yui-skin-sam yui-navset yui-navset-right yui-nav WGsubContent yui-skin-sam yui-navset-right yui-nav border-width:0 0 0 5px WGsubContent yui-skin-sam yui-navset-left yui-nav li WGsubContent yui-skin-sam yui-navset yui-navset-left yui-nav li WGsubContent yui-skin-sam yui-navset-right yui-nav li margin:0 0 0.3em space between tabs padding:0 0 0 1px gecko make room for overflow WGsubContent yui-skin-sam yui-navset-right yui-nav li padding:0 1px 0 0 gecko make room for overflow WGsubContent yui-skin-sam yui-navset-left yui-nav selected WGsubContent yui-skin-sam yui-navset yui-navset-left yui-nav selected margin:0 1px 0.16em 0 WGsubContent yui-skin-sam yui-navset-right yui-nav selected margin:0 0 0.16em 1px WGsubContent yui-skin-sam yui-navset-left yui-nav a WGsubContent yui-skin-sam yui-navset-right yui-nav a border-width:1px 0 WGsubContent yui-skin-sam yui-navset-left yui-nav a em WGsubContent yui-skin-sam yui-navset yui-navset-left yui-nav a em WGsubContent yui-skin-sam yui-navset-right yui-nav a em border-width:0 0 0 1px padding:0.2em 75em top:auto left:-1px for 1px rounded corners WGsubContent yui-skin-sam yui-navset-right yui-nav a em border-width:0 1px 0 0 left:auto right:-1px for 1px rounded corners WGsubContent yui-skin-sam yui-navset-left yui-nav a WGsubContent yui-skin-sam yui-navset-left yui-nav selected a WGsubContent yui-skin-sam yui-navset-left yui-nav a:hover WGsubContent yui-skin-sam yui-navset-right yui-nav a WGsubContent yui-skin-sam yui-navset-right yui-nav selected a WGsubContent yui-skin-sam yui-navset-right yui-nav a:hover WGsubContent yui-skin-sam yui-navset-bottom yui-nav a WGsubContent yui-skin-sam yui-navset-bottom yui-nav selected a WGsubContent yui-skin-sam yui-navset-bottom yui-nav a:hover background-image:none no left-right or bottom-top gradient WGsubContent yui-skin-sam yui-navset-left yui-content border:1px solid d8dee8 content border bottom orientation WGsubContent yui-skin-sam yui-navset-bottom yui-nav WGsubContent yui-skin-sam yui-navset yui-navset-bottom yui-nav border-width:5px 0 0 color between tab list and content WGsubContent yui-skin-sam yui-navset yui-navset-bottom yui-nav selected WGsubContent yui-skin-sam yui-navset-bottom yui-nav selected margin:-1px 0.3em 0 0 for overlap WGsubContent yui-skin-sam yui-navset yui-navset-bottom yui-nav li WGsubContent yui-skin-sam yui-navset-bottom yui-nav li padding:0 0 1px 0 gecko make room for overflow vertical-align:top WGsubContent yui-skin-sam yui-navset yui-navset-bottom yui-nav li a WGsubContent yui-skin-sam yui-navset-bottom yui-nav li a WGsubContent yui-skin-sam yui-navset yui-navset-bottom yui-nav a em WGsubContent yui-skin-sam yui-navset-bottom yui-nav a em border-width:0 0 1px top:auto bottom:-1px for 1px rounded corners WGsubContent yui-skin-sam yui-navset-bottom yui-content WGsubContent yui-skin-sam yui-navset yui-navset-bottom yui-content border:1px solid f2f5fa content border WGsubContent yui-skin-sam background-color d8dee8 padding 10px 5 5 5px display:block yui tab placement settings below WGsubContent yui-skin-sam yui-navset yui-nav li WGsubContent yui-skin-sam yui-navset yui-navset-top yui-nav li margin:0 0.3em 0 0 space between tabs padding:5px 0 0 gecko make room for overflow zoom:1 WGsubContent yui-skin-sam yui-navset yui-nav selected WGsubContent yui-skin-sam yui-navset yui-navset-top yui-nav selected margin:0 0.3em 1px 0 for overlap WGsubContent yui-navset yui-nav li,.yui-navset yui-navset-top yui-nav li WGsubContent yui-navset yui-navset-bottom yui-nav li margin:0 0.5em 0 0 WGsubContent yui-navset-left yui-nav li,.yui-navset-right yui-nav li margin:0 0 0.5em WGsubContent yui-navset yui-content yui-hidden display:none WGsubContent yui-navset yui-navset-left yui-nav,.yui-navset yui-navset-right yui-nav WGsubContent yui-navset-left yui-nav,.yui-navset-right yui-nav width:6em WGsubContent yui-navset-top yui-nav,.yui-navset-bottom yui-nav width:auto WGsubContent yui-navset yui-navset-left,.yui-navset-left padding:0 0 0 6em WGsubContent yui-navset-right padding:0 6em 0 0 WGsubContent yui-navset-top,.yui-navset-bottom padding:auto WGsubContent yui-nav,.yui-nav li list-style:none margin:0 padding:0 WGsubContent yui-navset li em font-style:normal WGsubContent yui-navset position:relative zoom:1 WGsubContent yui-navset yui-content zoom:1 WGsubContent yui-navset yui-nav li,.yui-navset yui-navset-top yui-nav li WGsubContent yui-navset yui-navset-bottom yui-nav li display:inline-block display:-moz-inline-stack display:inline vertical-align:bottom cursor:pointer zoom:1 WGsubContent yui-navset-left yui-nav li,.yui-navset-right yui-nav li display:block WGsubContent yui-navset yui-nav a position:relative WGsubContent yui-navset yui-nav li a,.yui-navset-top yui-nav li a WGsubContent yui-navset-bottom yui-nav li a display:block display:inline-block vertical-align:bottom zoom:1 WGsubContent yui-navset-left yui-nav li a,.yui-navset-right yui-nav li a display:block WGsubContent yui-navset-bottom yui-nav li a vertical-align:text-top WGsubContent yui-navset yui-nav li a em,.yui-navset-top yui-nav li a em WGsubContent yui-navset-bottom yui-nav li a em display:block WGsubContent yui-navset yui-navset-left yui-nav,.yui-navset yui-navset-right yui-nav WGsubContent yui-navset-left yui-nav,.yui-navset-right yui-nav position:absolute z-index:1 WGsubContent yui-navset-top yui-nav,.yui-navset-bottom yui-nav position:static WGsubContent yui-navset yui-navset-left yui-nav,.yui-navset-left yui-nav left:0 right:auto WGsubContent yui-navset yui-navset-right yui-nav,.yui-navset-right yui-nav left:auto right:0 WGsubContent yui-skin-sam yui-navset yui-nav selected a em padding:0.35em 0.75em WGsubContent yui-skin-sam yui-navset-left yui-nav,.yui-skin-sam yui-navset yui-navset-left yui-nav WGsubContent yui-skin-sam yui-navset yui-navset-right yui-nav,.yui-skin-sam yui-navset-right yui-nav border-width:0 5px 0 0 bottom:0 top:0 Xposition:absolute WGsubContent yui-skin-sam yui-navset yui-navset-right yui-nav,.yui-skin-sam yui-navset-right yui-nav border-width:0 0 0 5px WGsubContent yui-skin-sam yui-navset-left yui-nav li,.yui-skin-sam yui-navset yui-navset-left yui-nav li WGsubContent yui-skin-sam yui-navset-right yui-nav li margin:0 0 0.16em padding:0 0 0 1px WGsubContent yui-skin-sam yui-navset-right yui-nav li padding:0 1px 0 0 WGsubContent yui-skin-sam yui-navset-left yui-nav a,.yui-skin-sam yui-navset-right yui-nav a border-width:1px 0 WGsubContent yui-skin-sam yui-navset-left yui-nav a em,.yui-skin-sam yui-navset yui-navset-left yui-nav a em,.yui-skin-sam yui-navset-right yui-nav a em border-width:0 0 0 1px left:-1px padding:0.2em 75em top:auto WGsubContent yui-skin-sam yui-navset-right yui-nav a em border-width:0 1px 0 0 left:auto right:-1px WGsubContent yui-skin-sam yui-navset-left yui-nav a,.yui-skin-sam yui-navset-left yui-nav selected a,.yui-skin-sam yui-navset-left yui-nav a:hover WGsubContent yui-skin-sam yui-navset-right yui-nav a,.yui-skin-sam yui-navset-right yui-nav selected a,.yui-skin-sam yui-navset-right yui-nav a:hover WGsubContent yui-skin-sam yui-navset-bottom yui-nav a,.yui-skin-sam yui-navset-bottom yui-nav selected a WGsubContent yui-skin-sam yui-navset-bottom yui-nav a:hover background-image:none WGsubContent yui-skin-sam yui-navset yui-navset-bottom yui-nav selected WGsubContent yui-skin-sam yui-navset-bottom yui-nav selected margin:-1px 0.16em 0 0 WGsubContent yui-skin-sam yui-navset yui-navset-bottom yui-nav li WGsubContent yui-skin-sam yui-navset-bottom yui-nav li padding:0 0 1px 0 vertical-align:top ','000001000001000002000008',NULL),('_9_eiaPgxzF_x_upt6-PNQ','gallery.css','','root/import/gallery-templates/gallery.css',1197988920,1304392055,'3','7','3','WebGUI::Asset::Snippet',0,'gallery.css gallery.css root import gallery templates gallery.css FIXES FLOAT ISSUES WITHOUT THIS FLOATS GET ALL NUTSY ESPECIALLY IN OPERA AND SAFARI clearfix:after content display block height 0 clear both visibility hidden clearfix display inline-block END FLOAT FIX wgGallery font-family:verdana arial text-align:left firstBar background black color:white font-size:18px font-weight:bold firstBar title margin-left:20px line-height:42px firstBar title a font-size:18px font-weight:bold color:white firstBar buttons float:right firstBar buttons a display:block float:left height:42px line-height:42px font-size:10px color:white font-weight:bold text-align:center padding:0px 5px firstBar buttons rss display:block height:29px position:relative background:transparent padding-top:13px secondBar background F1F1F1 text-align:left border-top:solid 8B8B8B 5px color black overflow hidden secondBar author font-size:10px secondBar desc p margin-left 20px margin-top 0 color black pictures searchArea float:right searchArea float:left searchArea input.searchText border:solid black 1px width:100px margin:0px padding:2px margin-top:5px font-size:10px height:15px margin-right:10px searchArea input.searchBtn border:solid black 1px margin:0px padding:3px margin-top:5px font-size:10px vertical-align:middle cursor:pointer height:21px searchArea a:link searchArea a:visited secondBar author a:link secondBar author a:visited font-size:11px color:black searchArea current font-weight:bold text-transform:uppercase text-decoration:none font-size:10px wgAlbum display moz-inline-box Although this works in later versions of FireFox it does not work in 2.x display:block display inline-block Op Saf IE vertical-align top IE Mac non capisce e a volte crea extra v space width:250px margin:10px wgAlbum albumTitle background black color:white font-size:12px font-weight:bold padding:10px padding-right:50px border:solid 475f6f 1px border-bottom:solid 8B8B8B 5px text-align:left display:block wgAlbum albumImage background F1F1F1 border-left solid black 1px border-right solid black 1px padding-top:15px height:135px wgAlbum albumImage a height:135px width:200px overflow:hidden display:block margin:0px 23px wgAlbum albumImage img border-style:none display:block width:200px height:auto border:solid black 1px wgAlbum albumDesc background F1F1F1 border-left solid black 1px border-right solid black 1px border-bottom solid black 1px text-align:center padding 5px 23px wgAlbum description font-size:10px height:40px overflow:auto text-align:left border:solid silver 1px padding:5px background-color fff color:#222 albumDesc description margin:2px 0px PAGINATION STYLES wgGallery paginationContainer text-align:center background black height:42px wgGallery container clear:both text-align:center wgGallery pagination margin:0px auto 20px auto display:table list-style-type:none white-space:nowrap padding:0px height:42px wgGallery pagination li display:table-cell wgGallery pagination a display:block width:50px line-height:42px color:white font-size:10px text-align:center wgPicture a:link wgPicture a:visited color:black wgPicture width:250px margin:10px display moz-inline-box This does not work in earlier versions of Firefox display:block float:left display inline-block Op Saf IE vertical-align top IE Mac non capisce e a volte crea extra v space wgPicture title background:#e0e0e0 display:block font-size:12px text-align:center padding:2px 5px border:solid black 1px border-bottom:solid 8B8B8B 4px wgPicture title a font-size:12px wgPicture thumbnail text-align:center background F1F1F1 padding:15px 23px 15px 23px margin:0px border-left:solid black 1px border-right:solid black 1px wgPicture thumbnail a display:block width:200px height:120px overflow:hidden border:solid black 1px wgPicture thumbnail img border-style:none width:200px height:auto wgPicture pictureDesc padding:0px border-top:solid e1e1e1 1px border-bottom:solid gray 1px border-left:solid black 1px border-right:solid black 1px background:#F1F1F1 margin:0px wgPicture pictureDesc description margin:0px padding:5px font-size:10px wgPicture details background:#e0e0e0 border:solid 999 1px border-top:solid aaa 1px font-size:9px padding:1px 3px wgPicture details date float:right wgPicture details comments float:left wgPicture details a font-size:9px BEGIN STYLES FOR PHOTO VIEW The Photo view uses some/all of the above classes plus those in this section wgSnapshot float:left margin:10px max-width:250px width:25 wgSnapshot fieldset background-color:#fefefe border:solid 555 2px padding:10px background-color:#f9f9f9 text-align:center navigation width 100 text-align center font-weight bold color navy wgSnapshot p max-width:230px wgSnapshot navigation width:100 margin:5px 0 0 text-align:center wgSnapshot navigation img border none wgSnapshot legend color:#333 font-size:15px font-weight:bold max-width:250px wgSnapshot a.thumbnail img width:200px height:auto border:solid 555 2px wgSnapshot description font-size:9px border:solid 555555 2px padding:5px width:190px margin:0px auto background-color:#fff height:50px overflow:auto text-align:left overflow:auto wgSnapshot a.fullSize margin:0px auto wgPictureDetails float:left width:70 margin:10px overflow hidden wgPictureDetails a:link wgPictureDetails a:visited color:black wgPictureDetails fieldset background-color:#fefefe border:solid 555 2px padding:10px background-color:#f9f9f9 margin-bottom:10px wgPictureDetails legend color:#333 font-size:15px font-weight:bold rowOne rowTwo margin:1px color:black padding:3px rowOne background EFEFEF border:solid CDCDCD 1px rowTwo background DCDCDC border:solid DDDDDD 1px rowOne label rowTwo label margin-left:15px text-align:left font-weight:bold font-size:11px rowOne data rowTwo data font-size:10px margin-left:5px a.fullSize:link a.fullSize:visited color:black display:block text-align:center font-weight:bold font-size:10px wgComments font-size:9px margin:10px width:90 wgComments title font-size:14px font-weight:bold color:#333 border-bottom:solid 555555 2px padding-bottom:2px wgComments title a color:navy text-decoration:none wgComments comment wgComments commentAlt position:relative padding:5px wgComments comment background-color:#e1e1e1 border-top:solid F7F7F7 1px border-bottom:solid C9C9C9 1px wgComments commentAlt background-color:#f0f0f0 border-bottom:solid CDCDCD 1px border-top:solid FBFBFB 1px wgComments number float:left font-size:30px color:silver margin:5px 10px 5px 5px wgComments posted font-style:italic padding-top:3px font-size:9px color:gray wgComments posted a color:navy text-decoration:underline BEGIN STYLES FOR THUMBNAIL VIEW The Thumbnail view uses some/all of the above classes plus those in this section thumbView width:400px height:auto thumbView thumbnail a display:block width:350px height:auto border:solid black 1px thumbView thumbnail img border-style:none width:350px height:auto thumb width:100px height:65px overflow:hidden display:block float:left border:solid black 2px margin:10px z-index 0 position relative thumb:hover background-color transparent z-index 50 overflow visible thumb img width:100px height:auto border-style:none thumb:hover img bottom 65px left 75px position absolute width 250px BEGIN STYLES FOR SLIDESHOW VIEW The Slideshow view uses some/all of the above classes plus those in this section wgSlideshow controls background url(^FileUrl(root/import/gallery-templates/images/pagination_bg.jpg repeat-x width:500px height:42px margin:0px auto border:solid black 2px wgSlideshow text-align:center slideshow-container width:500px height:auto margin:0px auto text-align:center border:solid black 2px position:relative z-index:0 slideshow-container slideshow-item img width:100 height:auto border-style:none display:block slideshow-container slideshow-item title background-color:black padding:3px color:white border-top:solid white 1px border-bottom:solid white 1px slideshow-container slideshow-item title a color:white font-size:11px font-weight:bold slideshow-container slideshow-item counter background-color:black padding:3px color:white font-size:11px font-weight:bold slideshow-container slideshow-item synopsis width:494px background-color:white padding:3px color:black font-size:11px font-weight:bold border-top:solid black 1px text-align:left BEGIN STYLES FOR SEARCH VIEW The Search view uses some/all of the above classes plus those in this section adminWrapper margin-top:20px adminWrapper label background:black font-weight:bold font-size:10px color:white adminWrapper td.data input background f1f1f1 vertical-align:middle adminWrapper td.radio input border-style:none background:none adminWrapper forwardButton cursor:pointer float:rigbt adminWrapper forwardButton:hover color:gold ','000001000001000015000016',NULL),('i6-BofrJJYozovlzFBByXg','first-photo-button.png','','root/import/gallery-templates/images/first-photo-button.png',1270612331,1285124158,'3','7','3','WebGUI::Asset::File::Image',1,'first-photo-button.png first-photo-button.png root import gallery templates images first photo button.png','000001000001000015000017000031',NULL),('fU_OZCmtdFNJ8a6bMve8ng','previous-photo-button.png','','root/import/gallery-templates/images/previous-photo-button.png',1270612331,1285124158,'3','7','3','WebGUI::Asset::File::Image',1,'previous-photo-button.png previous-photo-button.png root import gallery templates images previous photo button.png','000001000001000015000017000032',NULL),('YXCtusAxb4vzZ5sTnUA5DA','next-photo-button.png','','root/import/gallery-templates/images/next-photo-button.png',1270612331,1285124158,'3','7','3','WebGUI::Asset::File::Image',1,'next-photo-button.png next-photo-button.png root import gallery templates images next photo button.png','000001000001000015000017000033',NULL),('k_xuE82wwp8gFVl9aaaG8g','last-photo-button.png','','root/import/gallery-templates/images/last-photo-button.png',1270612331,1285124158,'3','7','3','WebGUI::Asset::File::Image',1,'last-photo-button.png last-photo-button.png root import gallery templates images last photo button.png','000001000001000015000017000034',NULL),('NPM_WItpM5IzLWBhWjYfCA','photo-navigation-spacer.png','','root/import/gallery-templates/images/photo-navigation-spacer.png',1270612331,1285124158,'3','7','3','WebGUI::Asset::File::Image',1,'photo-navigation-spacer.png photo-navigation-spacer.png root import gallery templates images photo navigation spacer.png','000001000001000015000017000035',NULL),('30h5rHxzE_Q0CyI3Gg7EJw','Cash Summary Screen (Default)','','shopping-cart-collateral-items/cash-summary',1273032715,1313542961,'3','7','4','WebGUI::Asset::Template',0,'Cash Summary Screen Default Cash Summary Screen Default shopping cart collateral items cash summary Shop/Credentials','000001000001000036000020',NULL),('jysVZeUR0Bx2NfrKs5sulg','Ogone Summary Screen (Default)','','shopping-cart-collateral-items/ogone-summary',1273032715,1313542961,'3','7','4','WebGUI::Asset::Template',0,'Ogone Summary Screen Default Ogone Summary Screen Default shopping cart collateral items ogone summary Shop/Credentials','000001000001000036000021',NULL),('300AozDaeveAjB_KN0ljlQ','PayPal Standard Summary Screen (Default)','','shopping-cart-collateral-items/paypal-std-summary',1273032715,1313542962,'3','7','4','WebGUI::Asset::Template',0,'PayPal Standard Summary Screen Default PayPal Standard Summary Screen Default shopping cart collateral items paypal std summary Shop/Credentials','000001000001000036000022',NULL),('GqnZPB0gLoZmqQzYFaq7bg','PayPal Express Checkout Summary Screen (Default)','','shopping-cart-collateral-items/paypal-express-summary',1273032716,1313542962,'3','7','4','WebGUI::Asset::Template',0,'PayPal Express Checkout Summary Screen Default PayPal Express Checkout Summary Screen Default shopping cart collateral items paypal express summary Shop/Credentials','000001000001000036000023',NULL),('stevestyle000000000001','Style 01','by Steve from Plain Black http://plainblack.com\r\n\r\nThe first of the WebGUI 7 styles','style_01',1147642499,1273032722,'3','7','12','WebGUI::Asset::Template',0,'Style 01 Style 01 by Steve from Plain Black http://plainblack.com The first of the WebGUI 7 styles style 01 style','000001000001000049000026',NULL),('stevestyle000000000002','Style 02','by Steve from Plain Black http://plainblack.com\r\n\r\nThe second of the WebGUI 7 styles','style_02',1147642504,1273032718,'3','7','12','WebGUI::Asset::Template',0,'Style 02 Style 02 by Steve from Plain Black http://plainblack.com The second of the WebGUI 7 styles style 02 style','000001000001000050000016',NULL),('stevestyle000000000003','Style 03','by Steve from Plain Black http://plainblack.com\r\n\r\nThe last of the WebGUI 7 style templates.','style_03',1147642510,1273032720,'3','7','12','WebGUI::Asset::Template',0,'Style 03 Style 03 by Steve from Plain Black http://plainblack.com The last of the WebGUI 7 style templates style 03 style','000001000001000051000020',NULL),('t87D1138NhPHhA23-hozBA','CrystalX','','crystalx',1273032716,1273032716,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'CrystalX CrystalX crystalx','000001000001000055',NULL),('QtBumey5ffc-xffRp1-7Aw','img','','crystalx/img',1273032716,1273032716,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'img img crystalx img','000001000001000055000001',NULL),('-0sK2rX1cwQt1ipUSqsiQQ','bg.gif','','crystalx/img/bg.gif',1273032716,1273032716,'3','7','3','WebGUI::Asset::File::Image',1,'bg.gif bg.gif crystalx img bg.gif','000001000001000055000001000001',NULL),('hS_eOaVz9Qb5ixndK9EXAw','header.jpg','','crystalx/img/header.jpg',1273032716,1273032716,'3','7','3','WebGUI::Asset::File::Image',1,'header.jpg header.jpg crystalx img header.jpg','000001000001000055000001000002',NULL),('k2p-Be8C98pf2cRq7E-JHg','tab_link.gif','','crystalx/img/tab_link.gif',1273032716,1273032716,'3','7','3','WebGUI::Asset::File::Image',1,'tab_link.gif tab_link.gif crystalx img tab link.gif','000001000001000055000001000003',NULL),('aYG4fjbMPbC4LCuuMp4gGA','tab_hover.gif','','crystalx/img/tab_hover.gif',1273032716,1273032716,'3','7','3','WebGUI::Asset::File::Image',1,'tab_hover.gif tab_hover.gif crystalx img tab hover.gif','000001000001000055000001000004',NULL),('F122Ey0NtVAw6Lfv1M6G_Q','ico_archive.gif','','crystalx/img/ico_archive.gif',1273032716,1273032716,'3','7','3','WebGUI::Asset::File::Image',1,'ico_archive.gif ico_archive.gif crystalx img ico archive.gif','000001000001000055000001000005',NULL),('qmXHKrQ6EDLSOGkrEKRUDA','bg_page_in.jpg','','crystalx/img/bg_page_in.jpg',1273032716,1273032716,'3','7','3','WebGUI::Asset::File::Image',1,'bg_page_in.jpg bg_page_in.jpg crystalx img bg page in.jpg','000001000001000055000001000006',NULL),('4qZgXjPPO4fwV879yu5XUg','bg_page.JPG','','crystalx/img/bg_page.jpg',1273032716,1273032716,'3','7','3','WebGUI::Asset::File::Image',1,'bg_page.JPG bg_page.JPG crystalx img bg page.jpg','000001000001000055000001000007',NULL),('mb-xeAugm5GJdvu-Wh0MtQ','search_submit.gif','','crystalx/img/search_submit.gif',1273032717,1273032717,'3','7','3','WebGUI::Asset::File::Image',1,'search_submit.gif search_submit.gif crystalx img search submit.gif','000001000001000055000001000008',NULL),('84Y9CwgzP6eNU7wZnk019Q','ico_date.gif','','crystalx/img/ico_date.gif',1273032717,1273032717,'3','7','3','WebGUI::Asset::File::Image',1,'ico_date.gif ico_date.gif crystalx img ico date.gif','000001000001000055000001000009',NULL),('ikXTtJKZfHVxqw-47E4AQA','ico_user.gif','','crystalx/img/ico_user.gif',1273032717,1273032717,'3','7','3','WebGUI::Asset::File::Image',1,'ico_user.gif ico_user.gif crystalx img ico user.gif','000001000001000055000001000010',NULL),('DhRWPTgzhvju_-TbMN3CwA','ico_comments.gif','','crystalx/img/ico_comments.gif',1273032717,1273032717,'3','7','3','WebGUI::Asset::File::Image',1,'ico_comments.gif ico_comments.gif crystalx img ico comments.gif','000001000001000055000001000011',NULL),('6njI-pZz2bwsjWh-Q1_11g','ico_list.gif','','crystalx/img/ico_list2.gif',1273032717,1273032717,'3','7','3','WebGUI::Asset::File::Image',1,'ico_list.gif ico_list.gif crystalx img ico list2.gif','000001000001000055000001000012',NULL),('_Hz1Gnd3yEnJzVS7l7nJMQ','content_all_bg.PNG','','crystalx/img/content_all_bg.png',1273032717,1273032717,'3','7','3','WebGUI::Asset::File::Image',1,'content_all_bg.PNG content_all_bg.PNG crystalx img content all bg.png','000001000001000055000001000013',NULL),('VOOrXK5dFnkGih7aTkuDWA','search.PNG','','crystalx/img/search.png',1273032717,1273032717,'3','7','3','WebGUI::Asset::File::Image',1,'search.PNG search.PNG crystalx img search.png','000001000001000055000001000014',NULL),('ruf-QejOkUHDRtfgakHlbA','col_title_bg_long.GIF','','crystalx/img/col_title_bg_long.gif',1273032717,1273032717,'3','7','3','WebGUI::Asset::File::Image',1,'col_title_bg_long.GIF col_title_bg_long.GIF crystalx img col title bg long.gif','000001000001000055000001000015',NULL),('FSHy5KjQjkt599PHS41seA','footer.jpg','','crystalx/img/footer.jpg',1273032717,1273032717,'3','7','3','WebGUI::Asset::File::Image',1,'footer.jpg footer.jpg crystalx img footer.jpg','000001000001000055000001000016',NULL),('nuYYXAz4KNNxgfumfnpo_g','ico_top.gif','','crystalx/img/ico_top.gif',1273032718,1273032718,'3','7','3','WebGUI::Asset::File::Image',1,'ico_top.gif ico_top.gif crystalx img ico top.gif','000001000001000055000001000017',NULL),('Mr7ljjoy6n4fZojpQWajKQ','ico_links.gif','','crystalx/img/ico_links.gif',1273032718,1273032718,'3','7','3','WebGUI::Asset::File::Image',1,'ico_links.gif ico_links.gif crystalx img ico links.gif','000001000001000055000001000018',NULL),('ApkqpDOrJDxK3QrWBGSRIg','ico_archive2.gif','','crystalx/img/ico_archive2.gif',1273032718,1273032718,'3','7','3','WebGUI::Asset::File::Image',1,'ico_archive2.gif ico_archive2.gif crystalx img ico archive2.gif','000001000001000055000001000019',NULL),('AzzTY0Lay1f_YGeQJFnQCA','ico_list.gif','','crystalx/img/ico_list.gif',1273032718,1273032718,'3','7','3','WebGUI::Asset::File::Image',1,'ico_list.gif ico_list.gif crystalx img ico list.gif','000001000001000055000001000020',NULL),('OiJNwP1gAlcva8_yOtL4gA','CrystalX_style','by Ning from Pluton -- http://pluton.nl\n\nCrystalX gives your site a crystal-ish look and a strictly formal style. Feel free to download and apply it to your own site.\n\nOriginally designed by \"Nuvio Webdesign\" and collected by Open Source Web Design, converted to WebGUI theme by Ning.','crystalx_style',1273032718,1273032718,'3','7','3','WebGUI::Asset::Template',0,'CrystalX_style CrystalX_style by Ning from Pluton http://pluton.nl CrystalX gives your site a crystal-ish look and a strictly formal style Feel free to download and apply it to your own site Originally designed by Nuvio Webdesign and collected by Open Source Web Design converted to WebGUI theme by Ning crystalx style style','000001000001000055000002',NULL),('JOuCU4x5BJfVHfkfMkVQdQ','crystalx.css','','crystalx/crystalx.css',1273032718,1273032718,'3','7','3','WebGUI::Asset::Snippet',0,'crystalx.css crystalx.css crystalx crystalx.css Project CrystalX URL http://www.nuvio.cz Output device screen projection Author Vit Dlouhy vit.dlouhy@nuvio.cz Nuvio www.nuvio.cz Last revision 2006-12-05 12:00 GMT+1 Structure display | position | float | overflow | width | height | border | margin | padding | background | align | font min-height:1px body border:0 margin:0 padding:0 background:#F2F5FE url(\'^FileUrl(/crystalx/img/bg.gif 0 0 repeat-x font:70%/160 verdana\",sans-serif color:#192666 text-align:center a color:#192666 a:hover color:#4F6AD7 p border:0 margin:15px 0 padding:0 div display:block border:0 margin:0 padding:0 overflow:hidden h1 h2 h3 h4 h5 border:0 margin:15px 0 10px 0 padding:0 font-weight:bold h1 font-size:260 line-height:100 font-family:\"georgia\",serif font-weight:normal h2 font-size:180 line-height:100 font-family:\"georgia\",serif font-weight:normal h3 font-size:120 line-height:100 font-weight:bold h4 font-size:120 h5 font-size:100 table display:table border-collapse:collapse margin:15px 1px padding:0 border:1px solid B7CAF6 font-size:100 tr display:table-row th td display table-cell border:1px solid B7CAF6 margin:0 padding:5px vertical-align:top text-align:left th background:#E7ECFD text-align:center color:#192666 font-weight:bold ul ol display:block border:0 margin:15px 0 15px 40px padding:0 ol list-style-type:decimal li display:list-item border:0 margin:0 padding:0 min-height:1px ul ul ul ol ol ol ol ul margin 0 0 0 20px dl border-bottom:1px solid E0E8FA margin:0 padding:5px 10px background:#CEDBF9 dt border:0 margin:0 padding:0 font-weight:bold dd border:0 margin:0 0 0 30px padding:0 form border:0 margin:0 padding:0 fieldset border:1px solid ccc margin:15px 0 padding:10px legend margin-left:10px font-size:100 font-weight:bold color:#008 hr height:1px width:724px margin 5px 23px padding 0 background:#CCC border:0 solid CCC color:#CCC a img span border:0 margin:0 padding:0 overflow:hidden abbr acronym border-bottom:1px dotted CCC cursor:help del through text-decoration:line-through strong strong font-weight:bold cite em q var font-style:italic code kbd samp font-family:monospace font-size:110 box min-height:1px box:after content display:block line-height:0px font-size:0px visibility:hidden clear:both nom margin:0 noscreen display:none main width:770px margin:0 auto text-align:left Top empty space for the background img to fit main topspace position:relative top:0 left:0 height:50px margin:0 padding:0 Header header position:relative width:770px height:100px margin:0 padding:0 background:#233C9B url(\'^FileUrl(/crystalx/img/header.jpg 0 0 no-repeat color:#FFFFFF Header logo header logo position:absolute top:35px left:35px margin:0 header logo a font-size:260 line-height:100 font-family:\"georgia\",serif font-weight:bold color:#FFF header logo a:hover color:#B5C4E3 text-decoration:none Header Search header search form position:absolute top:35px right:20px height:30px header search formContents position:absolute top:0 right:0px width:200px height:28px margin:0 padding:0 border:0 background:url(\'^FileUrl(/crystalx/img/search.png 0 0 no-repeat font:bold 90%/100 verdana\",sans-serif color:#192666 header search input#keywords_formId width:140px margin:5px 8px padding:3px 0 border:0 background:#FFF font:bold 100%/100 verdana\",sans-serif color:#192666 header search search_form position:absolute top:0 right:0px width:41px height:28px cursor:point margin:0 padding:0 Search Result header search search_result position:absolute top:220px header search home_link header search no_result header search pagination visibility:hidden page page-in pagination color:#6182D1 font-weight:bold padding:5px text-align:right page page-in pagination a color:#6182D1 page page-in pagination a:hover color:#192666 page page-in home_link padding:5px 5px 15px color:#6182D1 font-weight:bold text-align:right page page-in home_link a color:#6182D1 page page-in home_link a:hover color:#192666 search_result margin:10px 0 dl#odd background:#A0B9F3 page page-in no_result margin:0 10px color:#192666 font-weight:bold Main menu tabs menu background:#192666 margin:0 5px padding:10px 10px 0 height:32px overflow:hidden menu a cursor:pointer font-size:11px Page dynamic page width:770px background:#FFFFFF url(\'^FileUrl(/crystalx/img/bg_page.jpg 0 0 repeat-y page-in min-height:400px background:url(\'^FileUrl(/crystalx/img/bg_page_in.jpg 0 0 no-repeat padding:10px 0 0 Strip strip position:relative clear:both padding:3px 20px 10px 20px color:#6182D1 Strip Location strip location float left background:url(\'^FileUrl(/crystalx/img/ico_comments.gif 0 50 no-repeat padding 0 15px strip location a color:#6182D1 strip location a:hover color:#192666 strip location a#currentpage font-weight:bold text-decoration:none Strip DateTime strip datetime float:right background:url(\'^FileUrl(/crystalx/img/ico_date.gif 0 50 no-repeat padding 0 10px 0 15px Content Container contentContainer margin:0 padding:0 20px width:730px overflow:hidden Contents contentContainer content clear:both margin:10px 10px 0 0 padding:20px max-width:710px background:url(\'^FileUrl(/crystalx/img/content_all_bg.png 0 0 no-repeat overflow:hidden contentContainer content h2 margin:0 10px padding:10px 25px color:#192666 background:url(\'^FileUrl(/crystalx/img/ico_list.gif 0 50 no-repeat contentContainer content p text-align:justify Utility utility background FFFFFF url(\'^FileUrl(/crystalx/img/bg_page.jpg 0 0 repeat-y padding 10px 0 15px Utility Toggles toggles font-size:10px font-weight:bold text-align:left margin-left:42px toggles a margin:0 10px padding:2px 0 text-decoration:none border-bottom:1px dashed color:#6182D1 toggles a:hover border-bottom:1px solid color:#4F6AD7 toggles span.userAcc background:url(\'^FileUrl(/crystalx/img/ico_user.gif 0 50 no-repeat margin 0 0 0 8px Footer footer position:relative clear:both width:770px height:80px margin-bottom:30px background:url(\'^FileUrl(/crystalx/img/footer.jpg 0 0 no-repeat color:#6685CC footer a color:#6685CC footer a:hover color:#192666 Footer back on top top position:absolute top:55px left:550px top p position:relative width:30px height:25px margin:0 overflow:hidden top p a display:block position:absolute left:0 top:0 z-index:1 width:30px height:25px background:url(\'^FileUrl(/crystalx/img/ico_top.gif 0 0 no-repeat cursor:pointer top a:hover background:url(\'^FileUrl(/crystalx/img/ico_top.gif 30px 0 no-repeat Footer copyright footer p#copyright position:absolute top:10px left:40px margin:0 Footer created by createdby position:absolute top:10px left:562px margin:0 color:#8CA3D8 createdby a color:#8CA3D8','000001000001000055000003',NULL),('Am1J-meNBmhqFfEIWy6Gag','crystalX_Navigation','','crystalx/crystalx_navigation',1273032718,1287545014,'3','7','3','WebGUI::Asset::Wobject::Navigation',1,'crystalX_Navigation crystalX_Navigation crystalx crystalx navigation','000001000001000055000004',NULL),('gaIOm5cr2TkT9Fk6QmZWug','crystalX_navi','','crystalx/crystalx_navi',1273032718,1273032718,'3','7','3','WebGUI::Asset::Template',0,'crystalX_navi crystalX_navi crystalx crystalx navi Navigation','000001000001000055000005',NULL),('w0QifHLhsrzeOpFKl-DX-Q','crystalx_navi.css','','crystalx/crystalx_navi.css',1273032718,1273032718,'3','7','3','WebGUI::Asset::Snippet',0,'crystalx_navi.css crystalx_navi.css crystalx crystalx navi.css ','000001000001000055000006',NULL),('x_hiUi1XZloBvV47Obnu8Q','crystalX_NavigationTrail','','crystalx/crystalx_navigationtrail',1273032718,1273032718,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'crystalX_NavigationTrail crystalX_NavigationTrail crystalx crystalx navigationtrail','000001000001000055000007',NULL),('hpCk0B3vQzgc-QJhSol41w','crystalX_navitrail','','crystalx/crystalx_navitrail',1273032718,1273032718,'3','7','12','WebGUI::Asset::Template',0,'crystalX_navitrail crystalX_navitrail crystalx crystalx navitrail Navigation','000001000001000055000008',NULL),('UUwEL6hLEPdrnkZnKRzFYQ','Site Search','','crystalx/site-search',1273032718,1273032718,'3','7','3','WebGUI::Asset::Wobject::Search',1,'Site Search Site Search crystalx site search','000001000001000055000009',NULL),('OfKbvK7CrfMnfc8WDoF4Rg','crystalx_search','','crystalx/crystalx_search',1273032718,1273032718,'3','7','3','WebGUI::Asset::Template',0,'crystalx_search crystalx_search crystalx crystalx search Search','000001000001000055000010',NULL),('CQp-RFA2pMh5lFSggPPPYg','[Style] Underground','Templates and images for the \"Underground\" style from StyleShout.com ','style-underground',1273032719,1301973995,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'Style Underground Style Underground style underground Templates and images for the Underground style from StyleShout.com','000001000001000056',NULL),('_Mi_NTd3x8UB96LWezWHnw','Images','','style-underground/images',1273032719,1301973995,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'Images Images style underground images','000001000001000056000001',NULL),('A_5LVQQWR73QZR8FFbny_w','bg.gif','','style-underground/images/bg.gif',1273032719,1301973995,'3','7','3','WebGUI::Asset::File::Image',1,'bg.gif bg.gif style underground images bg.gif','000001000001000056000001000001',NULL),('wywIfa_VuTsq0c5Ed-W-MA','bullet.gif','','style-underground/images/bullet.gif',1273032719,1301973995,'3','7','3','WebGUI::Asset::File::Image',1,'bullet.gif bullet.gif style underground images bullet.gif','000001000001000056000001000002',NULL),('xmykMFjri1O2NrYHbeToVQ','footerbg.gif','','style-underground/images/footerbg.gif',1273032719,1301973995,'3','7','3','WebGUI::Asset::File::Image',1,'footerbg.gif footerbg.gif style underground images footerbg.gif','000001000001000056000001000003',NULL),('0IIGNBs_-INzqBC5VLeJgw','headerbg.gif','','style-underground/images/headerbg.gif',1273032719,1301973996,'3','7','3','WebGUI::Asset::File::Image',1,'headerbg.gif headerbg.gif style underground images headerbg.gif','000001000001000056000001000004',NULL),('FXmePdyS0YKuZ1VCGGpK9w','quote.gif','','style-underground/images/quote.gif',1273032719,1301973996,'3','7','3','WebGUI::Asset::File::Image',1,'quote.gif quote.gif style underground images quote.gif','000001000001000056000001000005',NULL),('66qCywiE_fiL9u5YIaJhgw','tableft.gif','','style-underground/images/tableft.gif',1273032719,1301973996,'3','7','3','WebGUI::Asset::File::Image',1,'tableft.gif tableft.gif style underground images tableft.gif','000001000001000056000001000006',NULL),('n5VpG4lFsOG1elaWDQbilw','tabright.gif','','style-underground/images/tabright.gif',1273032719,1301973996,'3','7','3','WebGUI::Asset::File::Image',1,'tabright.gif tabright.gif style underground images tabright.gif','000001000001000056000001000007',NULL),('g3JH1PRq6m6Bj_PnGpcrSQ','CSS','','style-underground/css',1273032719,1301973996,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'CSS CSS style underground css','000001000001000056000002',NULL),('egpnaaFqWmJwYTZ5CvFH9g','Underground.css','','style-underground/css/underground.css',1273032719,1301973996,'3','7','3','WebGUI::Asset::Snippet',0,'Underground.css Underground.css style underground css underground.css AUTHOR Erwin Aligam WEBSITE http://www.styleshout.com TEMPLATE NAME Underground TEMPLATE CODE S-0006 VERSION 1.1 Changes for WebGUI by Doug Bell Preaction doug@plainblack.com HTML ELEMENTS top elements margin 0 padding 0 body margin 0 padding 0 font 70%/1.5 Verdana Tahoma Arial Helvetica sans-serif color 333 background FFF url(^FileUrl(style-underground/images/bg.gif repeat-x links a color 003366 background-color inherit text-decoration none a:hover color CC0001 background-color inherit headers h1 h2 h3 font-family Arial Trebuchet MS Sans-Serif font-weight bold color 333 h1 font-size 120 letter-spacing 5px h2 font-size 115 text-transform uppercase h3 font-size 115 color 003366 images img border 2px solid CCC img.float-right margin 5px 0px 10px 10px img.float-left margin 5px 10px 10px 0px h1 h2 h3 p padding 0 margin 10px ul ol margin 10px 20px padding 0 20px code margin 10px 0 padding 10px text-align left display block overflow auto font 500 1em/1.5em Lucida Console courier new monospace white-space pre background FAFAFA border 1px solid f2f2f2 border-left 4px solid CC0000 acronym cursor help border-bottom 1px solid 777 blockquote margin 10px padding 0 0 0 32px background FAFAFA url(^FileUrl(style-underground/images/quote.gif no-repeat 5px 10px important background-position 8px 10px border 1px solid f2f2f2 border-left 4px solid CC0000 font-weight bold form elements form margin:10px padding 0 5px border 1px solid f2f2f2 background-color FAFAFA label display:block font-weight:bold margin:5px 0 input padding 2px border:1px solid eee font normal 1em Verdana sans-serif color:#777 textarea width:400px padding:2px font normal 1em Verdana sans-serif border:1px solid eee height:100px display:block color:#777 input.button margin 0 font bolder 12px Arial Sans-serif border 1px solid CCC padding 1px background FFF color CC0000 search form form.search position absolute top 5px right 5px padding 0 margin 0 border none background-color transparent form.search input.textbox margin 0 width 120px border 1px solid CCC background FFF color 333 form.search input.searchbutton margin 0 font-size 100 font-family Arial Sans-serif border 1px solid CCC background FFFFFF url(^FileUrl(style-underground/images/headerbg.gif repeat-x bottom left padding 1px font-weight bold height 23px color 333 width 60px LAYOUT wrap margin 0 auto width 90 header header position relative margin 0 padding 0 height 60px header span#slogan z-index 3 position absolute left 3px bottom 7px font bold 1.2em Verdana Arial Tahoma Sans-serif color FFF header-logo position relative clear both height 50px margin 0 padding 0 header-logo logo position absolute top 3px left 5px font bold 30px trebuchet MS Arial Tahoma Sans-Serif margin 0 padding 0 letter-spacing 1px color 000 navigation tabs header ul position absolute margin:0 list-style:none right:-18px bottom 3px font bold 13px Trebuchet MS Arial Sans-serif header li display:inline margin:0 padding:0 header a float:left background url(^FileUrl(style-underground/images/tableft.gif no-repeat left top margin:0 padding:0 0 0 4px text-decoration:none header a span float:left display:block background url(^FileUrl(style-underground/images/tabright.gif no-repeat right top padding:5px 15px 4px 6px color:#FFF Commented Backslash Hack hides rule from IE5-Mac header a span float:none End IE5-Mac hack header a:hover span color:#FFF header a:hover background-position:0 42px header a:hover span background-position:100 42px header current a background-position:0 42px header current a span background-position:100 42px main column main float right margin 0 padding 0 width 78 main h1 margin 10px 0 padding 4px 0 4px 8px font-size 105 color FFF text-transform uppercase background-color CC0000 letter-spacing 5px sidebar sidebar float left width 20 margin 0 padding 0 background-color FFFFFF sidebar h1 margin 10px 0 0 0 padding 4px 0 4px 8px font bold 105 Arial Sans-Serif color FFF text-transform uppercase background 333 letter-spacing 1px sidebar left-box border 1px solid EBEBEB margin 0 0 5px 0 background FFF sidebar ul.sidemenu list-style none text-align left margin 3px 0px 8px 0 padding 0 text-decoration none sidebar ul.sidemenu li border-bottom 1px solid f2f2f2 background url(^FileUrl(style-underground/images/bullet.gif no-repeat 3px 2px padding 3px 5px 3px 25px margin 0 sidebar ul.sidemenu a font-weight bolder padding 3px 0px background none footer footer clear both border-top 1px solid f2f2f2 background FFF url(^FileUrl(style-underground/images/footerbg.gif repeat-x padding 2px 0 10px 0 text-align center line-height 1.5em font-size 95 footer a text-decoration none font-weight bold alignment classes float-left float left float-right float right align-left text-align left align-right text-align right display and additional classes clear clear both red color CC0000 comments margin 20px 10px 5px 10px padding 3px 0 border-bottom 1px dashed EFF0F1 border-top 1px dashed EFF0F1 ','000001000001000056000002000001',NULL),('G0hl4VilbFKipToyxKqFrg','Prototypes','This folder holds prototype WebGUI assets with the correct templates pre-selected. ','style-underground/prototypes',1273032719,1301973997,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'Prototypes Prototypes style underground prototypes This folder holds prototype WebGUI assets with the correct templates pre-selected','000001000001000056000003',NULL),('GWU2qZqe6yEuAKG-5HtBdg','Templates','','style-underground/templates',1273032719,1301973997,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'Templates Templates style underground templates','000001000001000056000004',NULL),('Qk24uXao2yowR6zxbVJ0xA','[style] Underground','by Doug from Plain Black http://plainblack.com\r\n\r\nThis is the Underground style from http://www.styleshout.com/ made into a WebGUI package. A simple, functional style.','style-underground/style-underground',1273032719,1301973997,'3','7','3','WebGUI::Asset::Template',0,'style Underground style Underground by Doug from Plain Black http://plainblack.com This is the Underground style from http://www.styleshout.com made into a WebGUI package A simple functional style style underground style underground style','000001000001000056000004000001',NULL),('39KNX53B4nYJAyIE1lu8ZQ','[nav] Underground Top Navigation','','style-underground/nav-underground-top-navigation',1273032720,1301973997,'3','7','3','WebGUI::Asset::Template',0,'nav Underground Top Navigation nav Underground Top Navigation style underground nav underground top navigation Navigation','000001000001000056000004000002',NULL),('ztfi__vHJLsQDsMenrEn-w','[nav] Underground Side Navigation','','style-underground/nav-underground-side-navigation',1273032720,1301973997,'3','7','3','WebGUI::Asset::Template',0,'nav Underground Side Navigation nav Underground Side Navigation style underground nav underground side navigation Navigation','000001000001000056000004000003',NULL),('8qyrDCNeggB4dzKiOoRuiQ','[admintoggle] Underground Admin Toggle','','style-underground/templates/admintoggle-underground-admin-toggle',1273032720,1301973997,'3','7','3','WebGUI::Asset::Template',0,'admintoggle Underground Admin Toggle admintoggle Underground Admin Toggle style underground templates admintoggle underground admin toggle AdminToggle','000001000001000056000004000004',NULL),('M1NyNeS5jpdIsiIWFiJprw','View My Account','','style-underground/templates/view-my-account',1273032720,1301973997,'3','7','3','WebGUI::Asset::Template',0,'View My Account View My Account style underground templates view my account Macro/a_account','000001000001000056000004000005',NULL),('AsfpsOpsGzZCb9m7MyxPuw','Navigation','','style-underground/navigation',1273032720,1301973997,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'Navigation Navigation style underground navigation','000001000001000056000005',NULL),('n-Vr_wgxOkwiHGt1nJto9w','Top Navigation','','style-underground/top-navigation',1273032720,1309236774,'3','7','3','WebGUI::Asset::Wobject::Navigation',1,'Top Navigation Top Navigation style underground top navigation','000001000001000056000005000001',NULL),('jmqLxnoWb6p92Cr12lf1hw','Side Navigation','','style-underground/side-navigation',1273032720,1301973997,'3','7','3','WebGUI::Asset::Wobject::Navigation',1,'Side Navigation Side Navigation style underground side navigation','000001000001000056000005000002',NULL),('8E2UOnj_XPEghTj7nfVM0g','Search','','style-underground/search',1273032720,1301973997,'3','7','3','WebGUI::Asset::Wobject::Search',1,'Search Search style underground search','000001000001000056000006',NULL),('1qFjOEiILIwr1xB5_ebppQ','Greenportal','','greenportal',1273032721,1301973998,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'Greenportal Greenportal greenportal','000001000001000057',NULL),('xD76UfQ_JnSgTLBNvytcpQ','greenportal_image','','greenportal_image',1273032721,1301973998,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'greenportal_image greenportal_image greenportal image','000001000001000057000001',NULL),('pAXR7Kby4O-dSxOwLp1GaA','menu_top.png','','greenportal_image/menu_top.png',1273032721,1301973998,'3','7','12','WebGUI::Asset::File::Image',1,'menu_top.png menu_top.png greenportal image menu top.png','000001000001000057000001000001',NULL),('TthzMLO4n3qxy59QZ5YBHg','menu_dark.png','','greenportal_image/menu_dark.png',1273032721,1301973998,'3','7','12','WebGUI::Asset::File::Image',1,'menu_dark.png menu_dark.png greenportal image menu dark.png','000001000001000057000001000002',NULL),('3n31SQjYa150TBrRBgMPhA','menu_light.png','','greenportal_image/menu_light.png',1273032721,1301973998,'3','7','12','WebGUI::Asset::File::Image',1,'menu_light.png menu_light.png greenportal image menu light.png','000001000001000057000001000003',NULL),('R4RxDufGbbIzEmpcoEcLrw','logo.jpg','','greenportal_image/logo.jpg',1273032721,1301973998,'3','7','12','WebGUI::Asset::File::Image',1,'logo.jpg logo.jpg greenportal image logo.jpg','000001000001000057000001000004',NULL),('KKt0VB_eoQxw9xEsHsAhag','Greenportal_style','by Ning from PlutonIT http://pluton.nl\n\nA Joomla! Open Source design released under the GNU/GPL License. Enhanced and converted into WebGUI theme by Ning. The original PHP and CSS file can be downloaded following the author\'s link: http://www.studentsdesign.de/','greenportal_style',1273032721,1301973998,'3','7','12','WebGUI::Asset::Template',0,'Greenportal_style Greenportal_style by Ning from PlutonIT http://pluton.nl A Joomla Open Source design released under the GNU/GPL License Enhanced and converted into WebGUI theme by Ning The original PHP and CSS file can be downloaded following the author\'s link http://www.studentsdesign.de greenportal style style','000001000001000057000003',NULL),('h0bOzz7WvdaVZXsjpwtkww','greenportal_Navigation','','greenportal_navigation',1273032721,1301973998,'3','7','3','WebGUI::Asset::Wobject::Navigation',1,'greenportal_Navigation greenportal_Navigation greenportal navigation','000001000001000057000004',NULL),('_z3ukLCqvoaUygfsbbkBzw','Greenportal_menu','','greenportal_menu',1273032721,1301973999,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_menu Greenportal_menu greenportal menu Navigation','000001000001000057000005',NULL),('qFOfW1sKyOTnGNcP6BXbwg','greenportal_NavigationTop','','greenportal_navigationtop',1273032721,1301973999,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'greenportal_NavigationTop greenportal_NavigationTop greenportal navigationtop','000001000001000057000006',NULL),('Pt38T5_MWSue2e1N36MLdw','Greenportal_menuTop','','greenportal_menutop',1273032721,1301973999,'3','7','12','WebGUI::Asset::Template',0,'Greenportal_menuTop Greenportal_menuTop greenportal menutop Navigation','000001000001000057000007',NULL),('LDcM1Iop17nF2MoSa7zo_Q','Greenportal_dataform','','greenportal_dataform',1273032721,1301973999,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_dataform Greenportal_dataform greenportal dataform DataForm','000001000001000057000008',NULL),('hVF1taXj4bfd7DuL4XDMYg','Greenportal_datalist','','greenportal_datalist',1273032721,1301973999,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_datalist Greenportal_datalist greenportal datalist DataForm/List','000001000001000057000009',NULL),('x4-2QYRSrIB_BJfnSKKj4w','Greenportal_acknowledgement','','greenportal_acknowledgement',1273032721,1301973999,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_acknowledgement Greenportal_acknowledgement greenportal acknowledgement DataForm','000001000001000057000010',NULL),('423R4Y6XIt3wUzlnLo-chg','Greenportal_forum','','greenportal_forum',1273032721,1301973999,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_forum Greenportal_forum greenportal forum Collaboration','000001000001000057000011',NULL),('oZ1Mk-zExYUyD-JsjTvaHg','Greenportal_thread','','greenportal_thread',1273032722,1301973999,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_thread Greenportal_thread greenportal thread Collaboration/Thread','000001000001000057000012',NULL),('mYwS8CZaOLMt0raaKXGZcQ','Greenportal_postform','','greenportal_postform',1273032722,1301973999,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_postform Greenportal_postform greenportal postform Collaboration/PostForm','000001000001000057000013',NULL),('kSGR4OHsKmhLQTuLkisOww','Greenportal_search','','greenportal_search',1273032722,1301973999,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_search Greenportal_search greenportal search Collaboration/Search','000001000001000057000014',NULL),('G5DgNizuG3jXkjPp6UaGrA','Greenportal_Calendar','','greenportal_calendar',1273032722,1301973999,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'Greenportal_Calendar Greenportal_Calendar greenportal calendar','000001000001000057000015',NULL),('U78V5IJHVljvRTb6ydsTHg','Greenportal_calendarMonth','','greenportal_calendar/greenportal_calendarmonth',1273032722,1301973999,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_calendarMonth Greenportal_calendarMonth greenportal calendar greenportal calendarmonth Calendar/Month','000001000001000057000015000001',NULL),('Xqc3qPUXoFE8dt9qocdWig','Greenportal_calendarWeek','','greenportal_calendar/greenportal_calendarweek',1273032722,1301973999,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_calendarWeek Greenportal_calendarWeek greenportal calendar greenportal calendarweek Calendar/Week','000001000001000057000015000002',NULL),('IBTb7wllSt7RxFmmvm9pkQ','Greenportal_calendarDay','','greenportal_calendar/greenportal_calendarday',1273032722,1301973999,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_calendarDay Greenportal_calendarDay greenportal calendar greenportal calendarday Calendar/Day','000001000001000057000015000003',NULL),('Z1EM7JMI_4SkyfaZffSElw','Greenportal_calendarEvent','','greenportal_calendar/greenportal_calendarevent',1273032722,1301973999,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_calendarEvent Greenportal_calendarEvent greenportal calendar greenportal calendarevent Calendar/Event','000001000001000057000015000004',NULL),('fJg7SKpGZwzSNx3_ebki1A','Greenportal_calendarEventEdit','','greenportal_calendar/greenportal_calendareventedit',1273032722,1301973999,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_calendarEventEdit Greenportal_calendarEventEdit greenportal calendar greenportal calendareventedit Calendar/EventEdit','000001000001000057000015000005',NULL),('ihf4Rx6p72xn_nVKaIeOaw','Greenportal_calendarSearch','','greenportal_calendar/greenportal_calendarsearch',1273032722,1301973999,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_calendarSearch Greenportal_calendarSearch greenportal calendar greenportal calendarsearch Calendar/Search','000001000001000057000015000006',NULL),('jrWJ6nHXkqgFbml7BZ9chw','Greenportal_submission','','greenportal_submission',1273032722,1301974000,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_submission Greenportal_submission greenportal submission Collaboration/Thread','000001000001000057000016',NULL),('Ys6f3vpe0y1uRcaCJ2TlFw','Greenportal_messageboard','','greenportal_messageboard',1273032722,1301974000,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_messageboard Greenportal_messageboard greenportal messageboard MessageBoard','000001000001000057000017',NULL),('default_CS_unsubscribe','Default Collaboration System Unsubscribe','','collaboration_unsubscribe',1274238758,1277868922,'3','7','4','WebGUI::Asset::Template',0,'Default Collaboration System Unsubscribe Default Collaboration System Unsubscribe collaboration unsubscribe Collaboration/Unsubscribe','000001000001000008000030',NULL),('_hELmIJfgbAyXFNqPyApxQ','admin.css','','root/import/gallery-templates/admin.css',1197330678,1285124155,'3','7','3','WebGUI::Asset::Snippet',0,'admin.css admin.css root import gallery templates admin.css adminWrapper text-align:left font-family:arial font-size:11px position relative z-index 2 h2 font-size:15px messageStyle font-weight:bold font-family:arial font-size:10px margin-bottom:8px adminButton border:solid silver 1px background-color:#e0e0e0 font-weight:bold font-size:10px color:#333 cursor:pointer padding 0.5em 1em adminTable border:solid silver 1px background-color:#F0F0F0 color black width:320px padding:5px adminTable select adminTable input adminTable textarea border:solid gray 1px font-size:10px padding-left:5px label white-space:nowrap text-align:right padding-right:10px font-weight:bold width:1px vertical-align:top galleryOrg list-style-type:none display:block width:95 margin-top:3px padding-top:10px margin-left:5px border:gray solid 1px text-align:center font-family:verdana,arial font-size:9pt background-color:#dedede galleryOrgList margin 0px padding 0px galleryOrg left float left width 36 galleryOrg right width 63 galleryOrg img display:block height:150px margin:0px auto border none galleryOrg select galleryOrg input galleryOrg textarea border:solid gray 1px font-size:10px padding-left:5px promote margin-left:3px promote img height:14px width:16px demote margin-right:3px demote img height:14px width:16px delete img height 14px numbering position:absolute top:0px left:0px padding:1px background-color:black color:white moz-border-radius-bottomRight:5px input.captionEnter width:93px clear:both margin-bottom:3px galleryOrg button border-style:none background:none galleryOrg button img width:16px height:auto galleryOrg synopsis input width:80px ','000001000001000015000015',NULL),('68sKwDgf9cGH58-NZcU4lg','Welcome','','home',1124395696,1286336676,'3','7','3','WebGUI::Asset::Wobject::Layout',1,'Welcome Home home','000001000002',NULL),('bX5rYxb6tZ9docY6sUhBlw','Getting Started','\nCongratulations on successfully installing the WebGUI Content Engine®. If you used the Site Starter to select a set of default pages, you will see those pages in the site navigation. You will also notice that a number of additional pages appear, such','getting_started/getting-started',1147642514,1278013772,'3','7','4','WebGUI::Asset::Wobject::Article',1,'Getting Started Getting Started getting started getting started Congratulations on successfully installing the WebGUI Content Engine® If you used the Site Starter to select a set of default pages you will see those pages in the site navigation You will also notice that a number of additional pages appear such as this page These are default pages added for your convenience to help you get started with WebGUI and find the resources you need Feel free to remove these extra pages whenever you are ready To get started managing content download the PDF document below This document provides a basic introduction to the WebGUI user interface WebGUI Basics PDF Once you have read this document you may want to head over to the Documentation section where you can find more WebGUI resources ','000001000002000001000001',NULL),('8Bb8gu-me2mhL3ljFyiWLg','Talk to the Experts','Plain Black® created the WebGUI Content Engine® and is here to answer \nyour questions and provide you with services to make sure your WebGUI \nimplementation is entirely successful. We bend over backwards to make \nsure you\'re a success. Contact us ','your_next_step',1124395696,1271359194,'3','7','3','WebGUI::Asset::Wobject::Layout',1,'Talk to the Experts Your Next Step your next step Plain Black® created the WebGUI Content Engine® and is here to answer your questions and provide you with services to make sure your WebGUI implementation is entirely successful We bend over backwards to make sure you\'re a success Contact us today to see how we can help you','000001000002000002',NULL),('ix1p0AbwKAz8QWB-T-HHfg','Get Support','Plain Black provides support packages to fit any budget or need. Start out with online support which costs only $500 per year, or work with Plain Black to build a custom support package tailored to your specific needs. No matter what level of support you ','yns/support',1147642516,1271359087,'3','7','4','WebGUI::Asset::Wobject::Article',1,'Get Support Get Support yns support Plain Black provides support packages to fit any budget or need Start out with online support which costs only $500 per year or work with Plain Black to build a custom support package tailored to your specific needs No matter what level of support you purchase you will get personalized and friendly service in a timely manner ','000001000002000002000001',NULL),('iCYOjohB9SKvAPr6bXElKA','Get Hosting','Plain Black\'s professionally trained WebGUI experts can handle the task\nof hosting your web site, intranet, or extranet. Let us deal with upgrades, security, and server management so you focus on building your WebGUI site, which is where your time and exp','yns/hosting',1147642516,1271445525,'3','7','4','WebGUI::Asset::Wobject::Article',1,'Get Hosting Get Hosting yns hosting Plain Black\'s professionally trained WebGUI experts can handle the task of hosting your web site intranet or extranet Let us deal with upgrades security and server management so you focus on building your WebGUI site which is where your time and expertise should be spent And when you sign up with hosting online support is included ','000001000002000002000002',NULL),('4Yfz9hqBqM8OYMGuQK8oLw','Get Features','WebGUI\'s robust API allows for easy customization. Plain Black\'s team of developers can create any features you need for your site. We\'ve built hundreds of custom applications for people. From simple macros, to custom single sign on systems, to applicatio','yns/features',1147642516,1271352537,'3','7','4','WebGUI::Asset::Wobject::Article',1,'Get Features Get Features yns features WebGUI\'s robust API allows for easy customization Plain Black\'s team of developers can create any features you need for your site We\'ve built hundreds of custom applications for people From simple macros to custom single sign on systems to applications that will manage your entire company our team will leverage the power of WebGUI to your advantage ','000001000002000002000003',NULL),('Wl8WZ43g2rK5AYr9o4zY7w','Get Style','Branding and visual appeal are powerful marketing tools. Don\'t let your site become a wallflower. Plain Black\'s professional design team can create a custom design to make your site stand out. Our team is fast, easy to work with, and can even migrate your','yns/style',1147642516,1271445539,'3','7','4','WebGUI::Asset::Wobject::Article',1,'Get Style Get Style yns style Branding and visual appeal are powerful marketing tools Don\'t let your site become a wallflower Plain Black\'s professional design team can create a custom design to make your site stand out Our team is fast easy to work with and can even migrate your existing content into your new WebGUI site ','000001000002000002000004',NULL),('2TqQc4OISddWCZmRY1_m8A','Join Us','The WebGUI project community is a diverse and talented group. If you \nwould like to contribute back to the project there are many ways to \nbecome involved. ','join_us',1124395696,1271357565,'3','7','3','WebGUI::Asset::Wobject::Layout',1,'Join Us Join Us join us The WebGUI project community is a diverse and talented group If you would like to contribute back to the project there are many ways to become involved','000001000002000004',NULL),('k2Qj03FrAOXYra8kDJYYXw','IRC (Internet Relay Chat)','You can find members of the community on the #webgui chat channel on the Freenode IRC network. If you\'re not \nfamiliar with IRC, it\'s essentially like a chat room. A few things you\'ll need to know: \n\n\n\nYou need an IRC client program. There are many availa','join_us/irc',1271357513,1271357513,'3','7','3','WebGUI::Asset::Wobject::Article',1,'IRC Internet Relay Chat IRC join us irc You can find members of the community on the webgui chat channel on the Freenode IRC network If you\'re not familiar with IRC it\'s essentially like a chat room A few things you\'ll need to know You need an IRC client program There are many available that can be downloaded free of charge The IRC network we use is Freenode Our channel is webgui Channel operators have an next to their name All channel operators in webgui are Plain Black employees Someone with a + next to their name is a recognized contributor in the WebGUI community People who have been recognized as one of the People Behind WebGUI are often given this designation If you\'re looking for a mentor recognized contributors are a good place to start ','000001000002000004000003',NULL),('ksSfkZdsr0uC62NwIk6hFQ','WebGUI Users Conference','An annual event, this is the one time a year when WebGUI users and Plain\n Black\'s staff come together to do all things WebGUI. This is by far \nthe best way to get involved with the community as nothing can replace \nface to face interaction and mentoring.','join_us/wuc',1271356973,1271356973,'3','7','3','WebGUI::Asset::Wobject::Article',1,'WebGUI Users Conference WUC join us wuc An annual event this is the one time a year when WebGUI users and Plain Black\'s staff come together to do all things WebGUI This is by far the best way to get involved with the community as nothing can replace face to face interaction and mentoring The conference is usually held in the fall of each year and more information on attending can be found on the WebGUI Users Conference website as details become available ','000001000002000004000004',NULL),('nWxS5jnA3o3DgPEwBeR7yQ','The Forums','WebGUI \nForums are available for WebGUI related\n discussion and community support. Bounce around ideas, discuss \nimportant issues, and ask community members for help and advice. WebGUI \nForums are broken up into: \n\nEt Cetera: general WebGUI discussion \nWe','join_us/forums',1271357239,1271357239,'3','7','3','WebGUI::Asset::Wobject::Article',1,'The Forums forums join us forums WebGUI Forums are available for WebGUI related discussion and community support Bounce around ideas discuss important issues and ask community members for help and advice WebGUI Forums are broken up into Et Cetera general WebGUI discussion Web Design Templates and Themes discuss making your site look pretty Admin Forum get your questions answered about everything from security to configuration Install/Upgrade Help get answers to your installation and upgrade questions WebGUI Dev a place to discuss WebGUI and WRE core development as well as writing your own custom modules ','000001000002000004000005',NULL),('AssetReportFolder00001','Asset Report','','asset_report',1281501163,1281501163,'3','3','4','WebGUI::Asset::Wobject::Folder',1,'Asset Report Asset Report asset report','000001000001000058',NULL),('sJtcUCfn0CVbKdb4QM61Yw','Asset Report Default Template','','asset-report/asset-report-default-template',1281501163,1283921584,'3','3','4','WebGUI::Asset::Template',0,'Asset Report Default Template Asset Report Default Template asset report asset report default template AssetReport','000001000001000058000001',NULL),('N7uMnnicbyTEulcuRi1sSg','PDFs','','media/pdfs',1283900195,1283900195,'3','7','4','WebGUI::Asset::Wobject::Folder',1,'PDFs PDFs media pdfs','000001000003000001',NULL),('bCGr7FRtZt-XYlBVUEJBjw','Getting_Started_doc.pdf','','media/pdfs/getting_started_doc.pdf',1278013724,1278013724,'3','7','4','WebGUI::Asset::File::Image',1,'Getting_Started_doc.pdf Getting_Started_doc.pdf media pdfs getting started doc.pdf','000001000003000001000001',NULL),('A3T7jpTBKLYws1h5mJ0t8A','makepageprintable.css','','makepageprintable.css',1286336607,1286336607,'3','7','12','WebGUI::Asset::Snippet',0,'makepageprintable.css makepageprintable.css makepageprintable.css This is the stylesheet for the Make Page Printable Style template reset html body div span applet object iframe h1 h2 h3 h4 h5 h6 p blockquote pre a abbr acronym address big cite code del dfn em font img ins kbd q s samp small strike strong sub sup tt var b u i center dl dt dd ol ul li fieldset form label legend table caption tbody tfoot thead tr th td margin:0 padding:0 border:0 outline:0 font-size:100 vertical-align:baseline background:transparent text-decoration:none font-weight:normal font-style:normal basic formatting body font:12px/18px Georgia,\"Bitstream Charter\",\"Liberation Serif\",\"Times New Roman\",Times,serif color:#000 h1 h2 h3 h4 h5 h6 font:12px/18px Helvetica,Arial,\"Liberation Sans\",sans-serif code font:11px/18px Lucida Console\",\"Courier New\",\"Liberation Mono\",monospace h1 h2 font-size:18px line-height:24px margin:24px 0 12px h3 font-size:14px margin:0 0 12px h4 margin:0 0 6px font-weight:bold h5 margin:0 0 6px h6 font-style:italic margin:0 0 6px p ul ol dl blockquote table form fieldset margin:0 0 18px a:link a:visited text-decoration:underline color:#000 a:hover a:active text-decoration:none color:#000 ol ul blockquote padding:0 0 0 27px ol ol ol ul ul ul ul ol margin:0 dd margin:0 0 3px blockquote font-style:italic font-size:15px quotes:none blockquote p font-style:italic margin:0 0 9px q quotes:none font-style:italic blockquote:before blockquote:after q:before q:after content content:none b strong dt font-weight:bold cite dfn i em ins font-style:italic abbr acronym text-transform:lowercase font-variant:small-caps del text-decoration:line-through sub vertical-align:sub font-size:8px sup vertical-align:super font-size:8px hr border-color:#aaa border-style:dotted border-width:1px 0 0 color:#fff background:#fff margin:18px 0 padding:0 width:100 legend font-weight:bold label display:block table border-collapse:collapse border-spacing:0 caption font-style:italic margin:0 0 6px tr border-bottom:1px dotted ccc thead tr border-top:1px solid ccc border-bottom:1px solid ccc th td padding:5px 9px 4px th font-variant:small-caps very basic positioning design header border-top:1px dotted aaa border-bottom:1px dotted aaa padding:17px 6px color:#666 header h1 font-weight:bold margin:0 text-transform:uppercase header a text-decoration:none font-style:italic color:#666 font-size:11px content padding:0 6px margin:18px 0 36px content a font-weight:bold content img margin:0 0 18px footer border-top:1px dotted aaa border-bottom:1px dotted aaa padding:17px 6px color:#666 ','000001000001000041000007',NULL),('j_1qEqM6iLfQLiR6VKy0aA','Free Documentation','There are hundreds of pages of free documentation available for WebGUI, provided by both Plain Black and the community at large. The following list is by no means comprehensive, but it should get you started in the right direction. \n \n\nPrimer - A downloa','documentation/free-documentation',1215718151,1299872071,'3','7','3','WebGUI::Asset::Wobject::Article',1,'Free Documentation Free Documentation documentation free documentation There are hundreds of pages of free documentation available for WebGUI provided by both Plain Black and the community at large The following list is by no means comprehensive but it should get you started in the right direction Primer A downloadable PDF that shows you the basics of publishing content in WebGUI WebGUI User Guides all commercial user guides previously published by Plain Black are in the process of being converted into wikis You can find these wikis on the WebGUI User Guides page of www.webgui.org This is an ongoing process until all books have been converted remaining books are being made available as free PDF downloads Wiki Hundreds of pages of WebGUI community contributed content featuring a variety of tutorials Worldwide A collection of WebGUI related web sites from all over the world that have documentation and other resources for WebGUI API Docs The documentation of all of the WebGUI source code Template Help The documentation of all of WebGUI\'s template variables ','000001000002000003000001',NULL),('diZvW4bSgZWwyyGP3qXi1g','Commercial Documentation','Plain Black has created a line of commercial books which total over 1500 pages of detailed documentation about WebGUI. Both black and white and full color editions of these books are available. Visit the book store today to stock your WebGUI library. Othe','documentation/commercial-documentation',1215717972,1285610019,'3','7','3','WebGUI::Asset::Wobject::Article',1,'Commercial Documentation Commercial Documentation documentation commercial documentation Plain Black has created a line of commercial books which total over 1500 pages of detailed documentation about WebGUI Both black and white and full color editions of these books are available Visit the book store today to stock your WebGUI library Other than hands on training there is no better way to hone your WebGUI skills No matter what your need Plain Black has created a book that\'s right for you and is creating new books each year In the fall of 2010 Plain Black announced that these books will be converted into free wikis You can now access all WebGUI user guides for free on the WebGUI User Guides page on www.webgui.org These books are available for WebGUI version 7.7 and earlier For later documentation see the free resources available on the WebGUI project website ','000001000002000003000003',NULL),('sK_0zVw4kwdJ1sqREIsSzA','WebGUI Auth Password Recovery Email Template','','root/import/auth/webgui/recoveryemail',1287545015,1287545015,'3','7','4','WebGUI::Asset::Template',0,'WebGUI Auth Password Recovery Email Template Password Recovery Email root import auth webgui recoveryemail Auth/WebGUI/RecoveryEmail','000001000001000005000011',NULL),('_cD6DLM_Fs5IlrLeWUjrjg','Workflow Activity Templates','Folder for holding Workflow Activity templates. ','root/import/workflow-activity-templates',1287545015,1287545015,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Workflow Activity Templates Workflow Activity Templates root import workflow activity templates Folder for holding Workflow Activity templates','000001000001000059',NULL),('lYhMheuuLROK_iNjaQuPKg','Notify About Version Tag','','root/import/workflow-activity-templates/notify-about-version-tag',1287545015,1287545015,'3','7','12','WebGUI::Asset::Template',0,'Notify About Version Tag Notify About Version Tag root import workflow activity templates notify about version tag NotifyAboutVersionTag','000001000001000059000001',NULL),('PBtmplHelp000000000001','Help','','root/import/adminconsole/help',1124395706,1147642410,'3','7','12','WebGUI::Asset::Template',0,'Help Help root import adminconsole help AdminConsole','000001000001000003000002',NULL),('2GxjjkRuRkdUg_PccRPjpA','Select Gateway (Default)','','shopping-cart-collateral-items/select-gateway-default',1257311888,1313542962,'3','7','3','WebGUI::Asset::Template',0,'Select Gateway Default Select Gateway Default shopping cart collateral items select gateway default Shop/selectGateway','000001000001000036000024',NULL),('qxd0WpRGqDPWP8WBicYvEA','dragdropsorting.js','','root/import/gallery-templates/dragdropsorting.js',1271820952,1285124158,'3','7','12','WebGUI::Asset::Snippet',0,'dragdropsorting.js dragdropsorting.js root import gallery templates dragdropsorting.js Create our own namespace For the moment we leave this here since there are no other JS modules for the gallery if typeof Gallery == undefined Gallery = Gallery.DDSorting = Configure the drag\'n\'drop sorting app Gallery.DDSorting.parentId = photos Element Id of the container element Gallery.DDSorting.draggableNodeTags = li Type of tag used for draggable items Gallery.DDSorting.idPrefix = photoId Prefix used in Ids of draggable items Create some shortcuts var Dom = YAHOO.util.Dom var Event = YAHOO.util.Event var DDM = YAHOO.util.DragDropMgr Drag\'n\'drop sorting app for the gallery Gallery.DDSorting.init = function Make list element containing photos a drop target new YAHOO.util.DDTarget(this.parentId Get all items within list of photos var items = document.getElementById(this.parentId).getElementsByTagName(this.draggableNodeTags Initialize DDList object for all list items for i=0 i < items.length i=i+1 new Gallery.DDList(this items[i].id gallery Custom drag and drop implementation Gallery.DDList = function(app id sGroup config Gallery.DDList.superclass.constructor.call(this id sGroup config var el = this.getDragEl Dom.setStyle(el opacity 0.67 The proxy is slightly transparent Assign reference to application object this.app = app Init variables for direction and replacement tracking this.goingUp = false this.goingLeft = false this.lastY = 0 this.lastX = 0 this.before = false this.lastReplaced = null YAHOO.extend(Gallery.DDList YAHOO.util.DDProxy startDrag function(x y Make the proxy look like the source element var dragEl = this.getDragEl var clickEl = this.getEl Dom.setStyle(clickEl visibility hidden Copy source element to proxy and set class dragEl.className = clickEl.className dragEl.innerHTML = clickEl.innerHTML endDrag function(e var srcEl = this.getEl var proxy = this.getDragEl Show the proxy element and animate it to the src element\'s location Dom.setStyle(proxy visibility var a = new YAHOO.util.Motion proxy points to Dom.getXY(srcEl 0.2 YAHOO.util.Easing.easeOut var proxyid = proxy.id var thisid = this.id Hide the proxy and show the source element when finished with the animation a.onComplete.subscribe(function Dom.setStyle(proxyid visibility hidden Dom.setStyle(thisid visibility a.animate Do nothing more if no element has been replaced if this.lastReplaced == null return Get assed ids of the target to move and the last photo replaced var target = srcEl.id.replace(this.app.idPrefix var dest = this.lastReplaced.id.replace(this.app.idPrefix Prepare call to ajax service of the gallery asset We need to set the action argument to moveFile provide the asset id of the target photo in target and the asset id of the photo replaced in before or after depending on order var args = args.action = moveFile args.target = target if this.before args.before = dest else args.after = dest Callback function for asynchronous request This is required for error handling var callback = success function o Parse answer from ajax service result = YAHOO.lang.JSON.parse(o.responseText Check for errors if result.err Display error message alert(\'Failed to move photo + result.errMessage Request a reload of the page so we are back in sync location.reload failure function o Display generic error message alert(\'AJAX service for moving photos is currently not available Failed to move photo Request a reload of the page so we are back in sync location.reload Convert args object to JSON string var postData = func=ajax;args= + encodeURI(YAHOO.lang.JSON.stringify(args Make asynchronous call to gallery asset YAHOO.util.Connect.asyncRequest(\"POST this.app.url callback postData onDrag function(e Keep track of the direction of the drag for use during onDragOver var y = Event.getPageY(e var x = Event.getPageX(e Check in vertical direction if y < this.lastY this.goingUp = true else if y > this.lastY this.goingUp = false Check in horizontal direction if x < this.lastX this.goingLeft = true else if x > this.lastX this.goingLeft = false this.lastY = y this.lastX = x onDragOver function(e id var srcEl = this.getEl var destEl = Dom.get(id We are only concerned with list items we ignore the dragover notifications for the list if destEl.nodeName.toLowerCase == this.app.draggableNodeTags var orig_p = srcEl.parentNode var p = destEl.parentNode if this.goingUp || this.goingLeft Insert above/before p.insertBefore(srcEl destEl Keep track of where we moved this.lastReplaced = destEl this.before = true else Insert below/after p.insertBefore(srcEl destEl.nextSibling Keep track of where we moved this.lastReplaced = destEl this.before = false DDM.refreshCache Start application after DOM is ready Event.onDOMReady(Gallery.DDSorting.init Gallery.DDSorting true','000001000001000015000026',NULL),('f2EktltCvwQpl_3-B1yR7g','Asset Templates','','root/import/asset_templates',1288748251,1288748251,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Asset Templates Asset Templates root import asset templates','000001000001000060',NULL),('BBpxqoSseIor5C9ei9JEFQ','Underground WebGUI.css','','style-underground/css/underground-webgui.css',1273032719,1301973996,'3','7','3','WebGUI::Asset::Snippet',0,'Underground WebGUI.css Underground WebGUI.css style underground css underground webgui.css wg-toolbar p margin 0px img.wg-toolbar-icon border 0px none toolbarIcon margin 0px label display inline ','000001000001000056000002000002',NULL),('xyyn5mz3xGyvrcI1rY8C-w','greenportal.css','','greenportal.css',1273032721,1301973998,'3','7','12','WebGUI::Asset::Snippet',0,'greenportal.css greenportal.css greenportal.css CSS Document body,html text-align:center height 100 margin 3px 3px 3px 3px font-family Verdana Sans-Serif line-height 125 color:#CCCCCC background 222625 h1,h2,h3,h4,h5,h6{font-weight:bold h1{font-size:18px h2{font-size:16px h3{font-size:14px h4{font-size:12px h5{font-size:11px h6{font-size:10px main width:80 height:100 margin-left:auto margin-right:auto position:relative body > main height:auto min-height:100 font-size:10px main mainHeader width:100 height:125px background url(\'^FileUrl(/greenportal_image/logo.jpg top center no-repeat margin-bottom:5px position:relative main mainHeader title position:absolute top:55px left:180px font-size:36pt font-family Edwardian Script ITC Arial Sans-Serif font-variant small-caps font-style italic color:#CCCCCC font-weight bold overflow visible padding 20px main mainHeader title a color:#CCCCCC text-decoration:none main mainHeader title a:hover color:#FFFFFF text-decoration:none font-size:37pt main mainMenu width:186px position:absolute top:125px left:0px main mainMenu li list-style none font-size 9pt text-align:left main mainMenu menuTop color:#99CC33 background url(\'^FileUrl(/greenportal_image/menu_top.png no-repeat margin-left:-3px padding:2px 0px 3px 26px width:162px 186px-24px font-size:10pt font-weight bold main mainMenu indent1 margin-left:0px width:186px main mainMenu indent2 margin-left:17px width:168px 186-17px main mainMenu a display:block height:24px font-weight:bold text-decoration:none color:#CCCCCC background url(\'^FileUrl(/greenportal_image/menu_dark.png no-repeat padding:2px 0px 0px 24px main mainMenu a:hover,active display:block height:24px font-weight:bold text-decoration:none color:#FFFFFF background url(\'^FileUrl(/greenportal_image/menu_light.png no-repeat padding:2px 0px 0px 24px main mainContent width:75 height:100 margin-top:5px margin-left:215px text-align:left border 1px solid CCCCCC main > mainContent margin-top:0px min-height:500px main > mainContent > p margin-top:0px main mainContent topMenu margin-right 10px text-align right font-size 8pt font-weight bold main mainContent topMenu a color 99CC33 text-decoration none main mainContent topMenu a:hover text-decoration:underline main mainContent mainText margin 10px 5px 5px 10px font-size:8pt padding 5px min-height 423px text-align left main mainContent mainText a color:#FFFFFF text-decoration none font-weight bold main mainContent mainText a:hover color:#FFFF00 text-decoration none font-weight bold main mainContent mainText yui-skin-sam a color 222625 text-decoration none font-weight bold main mainFooter text-align:left padding:10px margin:5px 0px 5px 200px width:75 font-size:9px background:url(^FileUrl(/greenportal_image/logo.jpg no-repeat main mainFooter a color:#CCCCCC font-weight:bold text-decoration:none main mainFooter a:hover color:#FFFFFF font-weight:bold text-decoration:none ','000001000001000057000002',NULL),('XdlKhCDvArs40uqBhvzR3w','Article With Pagination','','article-with-pagination',1254881103,1259133275,'3','7','12','WebGUI::Asset::Template',0,'Article With Pagination Article With Pagination article with pagination Article','000001000001000004000006',NULL),('mRtqRuVikSe82BQsYBlD0A','Bare Image','','bare_image',1263962529,1263962529,'3','7','12','WebGUI::Asset::Template',0,'Bare Image Bare Image bare image ImageAsset','000001000001000017000003',NULL),('8tqyQx-LwYUHIWOlKPjJrA','EMS Event Submission Template','','root/import/ems/ems-event-submission',1258524917,1279073449,'3','7','12','WebGUI::Asset::Template',0,'EMS Event Submission Template EMS Event Submission Template root import ems ems event submission EMS/Submission','000001000001000012000009',NULL),('DoVNijm6lMDE0cYrtvEbDQ','EMS Event Submission Main Template','','root/import/ems/ems-event-submission-main',1258524917,1279073449,'3','7','12','WebGUI::Asset::Template',0,'EMS Event Submission Main Template EMS Event Submission Main Template root import ems ems event submission main EMS/SubmissionMain','000001000001000012000010',NULL),('ktSvKU8riGimhcsxXwqvPQ','EMS Event Submission Queue','','root/import/ems/ems-event-submission-queue',1258524917,1279073450,'3','7','12','WebGUI::Asset::Template',0,'EMS Event Submission Queue EMS Event Submission Queue root import ems ems event submission queue EMS/SubmissionQueue','000001000001000012000011',NULL),('pbproto000000000000002','Request Tracker','','request-tracker-prototype',1147642465,1163019036,'3','7','12','WebGUI::Asset::Wobject::Collaboration',1,'Request Tracker Request Tracker request tracker prototype','000001000001000008000031',NULL),('VCFhB9WOsDsH2Apj3c6DpQ','Three Columns','','three-columns',1254881103,1259133276,'3','7','12','WebGUI::Asset::Template',0,'Three Columns Three Columns three columns Layout','000001000001000019000008',NULL),('_aE16Rr1-bXBf8SIaLZjCg','picklanguage','','media/picklanguage',1257311888,1257311888,'3','7','12','WebGUI::Asset::Template',0,'picklanguage picklanguage media picklanguage Macro/PickLanguage','000001000001000021000013',NULL),('mfHGkp6t9gdclmzN33OEnw','Default Twitter Choose Username','','root/import/auth/twitter/chooseusername/default-twitter-choose-username',1277868927,1277868927,'3','7','12','WebGUI::Asset::Template',0,'Default Twitter Choose Username Default Twitter Choose Username root import auth twitter chooseusername default twitter choose username Auth/Twitter/ChooseUsername','000001000001000005000012',NULL),('limMkk80fMB3fqNZVf162w','Default Asset Subscription','','root/import/default-asset-subscription',1253507213,1281501163,'3','7','3','WebGUI::Asset::Template',0,'Default Asset Subscription Default Asset Subscription root import default asset subscription AssetAspect/Subscribable','000001000001000060000001',NULL),('YP9WaMPJHvCJl-YwrLVcPw','Progress Bar','','admin_progress_bar',1245376837,1245376837,'3','7','12','WebGUI::Asset::Template',0,'Progress Bar Progress Bar admin progress bar AdminConsole/ProgressBar','000001000001000060000002',NULL),('Rqwgh50A3gGcOKIrdi_kxw','Authorize.net Credentials (Default)','','shopping-cart-collateral-items/authorizenet-credentials',1313542962,1313542962,'3','7','4','WebGUI::Asset::Template',0,'Authorize.net Credentials Default Authorize.net Credentials Default shopping cart collateral items authorizenet credentials Shop/Credentials','000001000001000036000025',NULL),('3n3H85BsdeRQ0I08WmvlOg','thingy.css','','root/import/thingy-templates/thingy.css',1212091492,1313542960,'3','7','12','WebGUI::Asset::Snippet',0,'thingy.css thingy.css root import thingy templates thingy.css wgThingy margin:5px wgThingy styleButton color:black margin:0px 5px display:block float:left wgThingy spacerOne padding-left:15px wgThingy rowOne wgThingy tr.rowOne td background EEEEEE margin:1px border:solid CDCDCD 1px color:#000 padding:2px wgThingy rowTwo wgThingy tr.rowTwo td background DBDBDB margin:1px border:solid DDDDDD 1px color:#000 padding:2px wgThingsWrapper img display:block vertical-align:middle float:left wgThingsWrapper label font-weight:bold padding-left:15px wgThingy h2.title background 000 height:42px color:white font-size:18px font-weight:bold letter-spacing:1px line-height:42px padding-left:15px margin-bottom:0px wgThingy span.smaller font-size:13px color:white wgThingy controls line-height:35px height:35px background f1f1f1 margin-top:0px margin-bottom:20px padding:0px overflow:visible wgThingy label background:black color:white padding:2px 5px font-family:arial font-size:11px font-weight:bold vertical-align:middle wgThingy label a color:white searchTable input editThing input background white border:solid 555 1px editThing margin-top:15px thingyList thingyList margin:0px padding:0px thingyList position:relative float:left overflow:visible thingyList goButton:link thingyList goButton:visited padding:2px 25px 2px 2px background F1F1F1 url(^FileUrl(root/import/thingy-templates/images/go-btn.gif no-repeat right line-height:20px border:solid a2a2a2 1px color:#a2a2a2 text-decoration:none font-family:verdana arial font-size:10px font-weight:bold margin-left:20px letter-spacing:0px thingyList goButton:hover background-color:white thingyList things padding:0px margin:0px width:300px z-index:5000 position:absolute top:27px left:20px border:solid a2a2a2 1px border-top-style:none thingyList things a:link thingyList things a:visited display:block background-color:#f1f1f1 border-top:solid a2a2a2 1px border-bottom:solid 727272 1px line-height:12px font-size:10px height:12px padding:2px 5px text-decoration:none font-weight:bold color:#a2a2a2 thingyList things a:hover background-color:white ','000001000001000044000006',NULL); +INSERT INTO `assetIndex` VALUES ('PBasset000000000000003','Media','','media',1147642437,1147642437,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Media Media media','000001000003',NULL),('PBtmpl0000000000000112','Weblog','','weblog',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'Weblog Weblog weblog Collaboration','000001000001000008000004',NULL),('PBtmplBlankStyle000001','WebGUI 6 Blank Style','','pbtmplblankstyle000001',1133743239,1258524916,'3','7','12','WebGUI::Asset::Template',0,'WebGUI 6 Blank Style WebGUI 6 Blank Style pbtmplblankstyle000001 style','000001000001000041000005',NULL),('PBtmpl0000000000000079','Topics','','topics',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'Topics Topics topics Collaboration','000001000001000008000009',NULL),('PBtmpl0000000000000097','Traditional with Thumbnails','','traditional_with_thumbnails',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'Traditional with Thumbnails Traditional with Thumbnails traditional with thumbnails Collaboration','000001000001000008000003',NULL),('PBtmpl0000000000000082','Unordered List','','unordered_list',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'Unordered List Unordered List unordered list Collaboration','000001000001000008000011',NULL),('PBtmpl0000000000000124','Tabs','','tabs',1124395696,1259133275,'3','7','12','WebGUI::Asset::Template',0,'Tabs Tabs tabs Navigation','000001000001000025000004',NULL),('GNvjCFQWjY2AF2uf0aCM8Q','Syndicated Articles','','syndicated_articles',1124395696,1259133274,'3','7','12','WebGUI::Asset::Template',0,'Syndicated Articles Syndicated Articles syndicated articles SyndicatedContent','000001000001000043000002',NULL),('PBtmpl0000000000000136','Synopsis','','synopsis2',1124395696,1259133274,'3','7','12','WebGUI::Asset::Template',0,'Synopsis Synopsis synopsis2 Navigation','000001000001000025000007',NULL),('PBtmpl0000000000000116','Tab Form','','tab_form',1124395696,1257311888,'3','7','12','WebGUI::Asset::Template',0,'Tab Form Tab Form tab form DataForm','000001000001000010000005',NULL),('GRUNFctldUgop-qRLuo_DA','Default Survey Edit','','root/import/survey/default-survey-edit',1227254010,1269401469,'3','7','12','WebGUI::Asset::Template',0,'Default Survey Edit Default Survey Edit root import survey default survey edit Survey/Edit','000001000001000042000004',NULL),('ProjectManagerTMPL0004','Default Project Manager Edit Task','','default-pm-template-edit-task',1147642415,1222574693,'3','7','12','WebGUI::Asset::Template',0,'Default Project Manager Edit Task Default Project Manager Edit Task default pm template edit task ProjectManager_editTask','000001000001000030000002000001',NULL),('ProjectManagerTMPL0002','Default Project Display','','default-pm-template-project-display',1147642415,1222574693,'3','7','12','WebGUI::Asset::Template',0,'Default Project Display Default Project Display default pm template project display ProjectManager_project','000001000001000030000004000001',NULL),('PBtmpl0000000000000137','Admin Console Style','','admin_console',1124395696,1258524916,'3','7','12','WebGUI::Asset::Template',0,'Admin Console Style Admin Console admin console style','000001000001000041000003',NULL),('StockDataTMPL000000001','StockData Default View','','stockdatatmpl000000001',1133743239,1315877144,'3','7','12','WebGUI::Asset::Template',0,'StockData Default View StockData Default View stockdatatmpl000000001 StockData','000001000001000039000002',NULL),('PBtmpl0000000000000135','Side By Side','','side_by_side',1124395696,1259133276,'3','7','12','WebGUI::Asset::Template',0,'Side By Side Side By Side side by side Layout','000001000001000019000001',NULL),('PBtmpl0000000000000200','Default Search','','default_search2',1147642427,1301974000,'3','7','12','WebGUI::Asset::Template',0,'Default Search Default Search default search2 Search','000001000001000034000001',NULL),('PBtmpl0000000000000101','Ordered List','','ordered_list',1124395696,1277868922,'3','7','12','WebGUI::Asset::Template',0,'Ordered List Ordered List ordered list Collaboration','000001000001000008000024',NULL),('PBtmpl0000000000000121','Photo Gallery','','photo_gallery',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'Photo Gallery Photo Gallery photo gallery Collaboration','000001000001000008000005',NULL),('PBtmpl0000000000000081','Q and A','','q_and_a',1124395696,1277868922,'3','7','12','WebGUI::Asset::Template',0,'Q and A Q and A q and a Collaboration','000001000001000008000023',NULL),('WVtmpl0000000000000001','Random Thread Macro Default Template','','randomthread-template',1133743240,1147642426,'3','7','12','WebGUI::Asset::Template',0,'Random Thread Macro Default Template Random Thread Macro Default Template randomthread template Macro/RandomThread','000001000001000021000010000001',NULL),('PBtmpl0000000000000131','Right Column','','right_column',1124395696,1259133275,'3','7','12','WebGUI::Asset::Template',0,'Right Column Right Column right column Layout','000001000001000019000002',NULL),('PBtmpl0000000000000094','News','','plainblacknews',1124395696,1220655703,'3','7','12','WebGUI::Asset::Template',0,'News News plainblacknews Layout','000001000001000019000005',NULL),('matrixtmpl000000000005','Matrix Default Search','','matrix-search-template',1133743239,1281501163,'3','7','12','WebGUI::Asset::Template',0,'Matrix Default Search Matrix Default Search matrix search template Matrix/Search','000001000001000022000005',NULL),('MultiSearchTmpl0000001','MultiSearch Default Display','','multisearchtmpl0000001',1133743239,1230269962,'3','7','12','WebGUI::Asset::Template',0,'MultiSearch Default Display MultiSearch Default Display multisearchtmpl0000001 MultiSearch','000001000001000024000001',NULL),('matrixtmpl000000000002','Matrix Default Compare','','matrix-default-compare-template',1133743238,1281501162,'3','7','12','WebGUI::Asset::Template',0,'Matrix Default Compare Matrix Default Compare matrix default compare template Matrix/Compare','000001000001000022000001',NULL),('PBtmpl0000000000000111','Make Page Printable','','make_page_printable',1124395696,1286336607,'3','7','12','WebGUI::Asset::Template',0,'Make Page Printable Make Page Printable make page printable style','000001000001000041000002',NULL),('PBtmpl0000000000000020','Mail Form','','mail_form',1124395696,1257311887,'3','7','12','WebGUI::Asset::Template',0,'Mail Form Mail Form mail form DataForm','000001000001000010000001',NULL),('PBtmpl0000000000000113','Link','','link',1124395696,1277868922,'3','7','12','WebGUI::Asset::Template',0,'Link Link link Collaboration/Thread','000001000001000008000025',NULL),('PBtmpl0000000000000083','Link List','','link_list',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'Link List Link List link list Collaboration','000001000001000008000010',NULL),('PBtmpl0000000000000114','Link List Submission Form','','link_list_submission_form',1124395696,1277868922,'3','7','12','WebGUI::Asset::Template',0,'Link List Submission Form Link List Submission Form link list submission form Collaboration/PostForm','000001000001000008000019',NULL),('PBtmpl0000000000000115','Linked Image with Caption','','linked_image_with_caption',1124395696,1259133276,'3','7','12','WebGUI::Asset::Template',0,'Linked Image with Caption Linked Image with Caption linked image with caption Article','000001000001000004000003',NULL),('PBtmpl0000000000000098','Job','','job',1124395696,1277868922,'3','7','12','WebGUI::Asset::Template',0,'Job Job job Collaboration/Thread','000001000001000008000021',NULL),('PBtmpl0000000000000077','Job Listing','','job_listing',1124395696,1298351263,'3','7','12','WebGUI::Asset::Template',0,'Job Listing Job Listing job listing Collaboration','000001000001000008000020',NULL),('PBtmpl0000000000000122','Job Submission Form','','job_submission_form',1124395696,1277868922,'3','7','12','WebGUI::Asset::Template',0,'Job Submission Form Job Submission Form job submission form Collaboration/PostForm','000001000001000008000022',NULL),('PBtmpl0000000000000103','Article With Image','','article-with-image',1124395696,1259133275,'3','7','12','WebGUI::Asset::Template',0,'Article With Image Article With Image article with image Article','000001000001000004000001',NULL),('PBtmpl0000000000000092','Horizontal Login Box','','horizontal_login_box',1124395696,1148579524,'3','7','12','WebGUI::Asset::Template',0,'Horizontal Login Box Horizontal Login Box horizontal login box Macro/L_loginBox','000001000001000021000009000001',NULL),('PBtmpl0000000000000108','horizontalMenu','','horizontalmenu',1124395696,1259133276,'3','7','12','WebGUI::Asset::Template',0,'horizontalMenu horizontalMenu horizontalmenu Navigation','000001000001000025000002',NULL),('PBtmpl0000000000000088','Image','','image',1124395696,1300763663,'3','7','12','WebGUI::Asset::Template',0,'Image Image image ImageAsset','000001000001000017000001',NULL),('IOB0000000000000000002','Default InOutBoard Report Template','','iob-report-template',1133743239,1166019641,'3','7','12','WebGUI::Asset::Template',0,'Default InOutBoard Report Template Default InOutBoard Report Template iob report template InOutBoard/Report','000001000001000018000001',NULL),('IOB0000000000000000001','Default InOutBoard Template','','iob-template',1133743239,1169795123,'3','7','12','WebGUI::Asset::Template',0,'Default InOutBoard Template Default InOutBoard Template iob template InOutBoard','000001000001000018000002',NULL),('PBtmpl0000000000000123','Item','','item',1124395696,1259133276,'3','7','12','WebGUI::Asset::Template',0,'Item Item item Article','000001000001000004000004',NULL),('PBtmpl0000000000000024','File','','file',1124395696,1259133275,'3','7','12','WebGUI::Asset::Template',0,'File File file FileAsset','000001000001000013000001',NULL),('PBtmpl0000000000000078','File Folder','','file_folder',1124395696,1259133275,'3','7','12','WebGUI::Asset::Template',0,'File Folder File Folder file folder Folder','000001000001000014000001',NULL),('PBtmpl0000000000000107','File with size','','file_with_size',1124395696,1147642420,'3','7','12','WebGUI::Asset::Template',0,'File with size File with size file with size Macro/File','000001000001000021000004000003',NULL),('PBtmpl0000000000000133','Guest Book','','guest_book',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'Guest Book Guest Book guest book Collaboration','000001000001000008000012',NULL),('PBtmpl0000000000000117','DropMenu','','dropmenu',1124395696,1259133274,'3','7','12','WebGUI::Asset::Template',0,'DropMenu DropMenu dropmenu Navigation','000001000001000025000003',NULL),('PBtmpl0000000000000130','Tree Navigation','','root/import/navigation/tree-navigation',1124395696,1259133276,'3','7','12','WebGUI::Asset::Template',0,'Tree Navigation Tree Navigation root import navigation tree navigation Navigation','000001000001000025000005',NULL),('PBtmpl0000000000000060','Fail Safe','','fail_safe',1124395696,1258524916,'3','7','12','WebGUI::Asset::Template',0,'Fail Safe Fail Safe fail safe style','000001000001000041000001',NULL),('PBtmpl0000000000000080','FAQ','','faqtemplate',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'FAQ FAQ faqtemplate Collaboration','000001000001000008000002',NULL),('PBtmpl0000000000000099','FAQ Submission Form','','faq_submission_form',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'FAQ Submission Form FAQ Submission Form faq submission form Collaboration/PostForm','000001000001000008000018',NULL),('PBtmpl0000000000000010','Default WebGUI Account Display Template','','default_webgui_account_display_template',1124395696,1287545014,'3','7','12','WebGUI::Asset::Template',0,'Default WebGUI Account Display Template Default WebGUI Account Display Template default webgui account display template Auth/WebGUI/Account','000001000001000005000004000001',NULL),('PBtmpl0000000000000013','Default WebGUI Login Template','','default_webgui_login_template',1124395696,1287545014,'3','7','12','WebGUI::Asset::Template',0,'Default WebGUI Login Template Default WebGUI Login Template default webgui login template Auth/WebGUI/Login','000001000001000005000007000001',NULL),('PBtmpl0000000000000012','Default WebGUI Password Reset Template','','default_webgui_password_reset_template',1124395696,1287545014,'3','7','12','WebGUI::Asset::Template',0,'Default WebGUI Password Reset Template Default WebGUI Password Reset Template default webgui password reset template Auth/WebGUI/Expired','000001000001000005000006000001',NULL),('PBtmpl0000000000000057','Default WebGUI Yes/No Prompt','','default_webgui_yes/no_prompt',1124395696,1147642418,'3','7','12','WebGUI::Asset::Template',0,'Default WebGUI Yes/No Prompt Default WebGUI Yes/No Prompt default webgui yes no prompt prompt','000001000001000031000001',NULL),('PBtmpl0000000000000066','Default USS','','default_uss',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'Default USS Default USS default uss Collaboration','000001000001000008000001',NULL),('TimeTrackingTMPL000001','Default Time Tracking User View','','default-tt-template-user',1147642417,1201205738,'3','7','12','WebGUI::Asset::Template',0,'Default Time Tracking User View Default Time Tracking User View default tt template user TimeTracking_user','000001000001000046000003000001',NULL),('TimeTrackingTMPL000003','Default Time Tracking Row Template','','default-tt-template-row',1147642417,1229311434,'3','7','12','WebGUI::Asset::Template',0,'Default Time Tracking Row Template Default Time Tracking Row Template default tt template row TimeTracking_row','000001000001000046000002000001',NULL),('TimeTrackingTMPL000002','Default Time Tracking Manager View','','default-tt-template-manager',1147642417,1147642417,'3','7','12','WebGUI::Asset::Template',0,'Default Time Tracking Manager View Default Time Tracking Manager View default tt template manager TimeTracking_manager','000001000001000046000001000001',NULL),('X7DrzUcj8pOKFa_6k9D5iw','Newsletter','','root/import/newsletter',1185754569,1222804045,'3','12','3','WebGUI::Asset::Wobject::Folder',1,'Newsletter Newsletter root import newsletter','000001000001000026',NULL),('PBtmpl0000000000000065','Default Syndicated Content','','default_syndicated_content',1124395696,1259133275,'3','7','12','WebGUI::Asset::Template',0,'Default Syndicated Content Default Syndicated Content default syndicated content SyndicatedContent','000001000001000043000001',NULL),('CxMpE_UPauZA3p8jdrOABw','Default Questions','','root/import/survey/default-questions',1227556536,1250243000,'3','7','12','WebGUI::Asset::Template',0,'Default Questions Default Questions root import survey default questions Survey/Take','000001000001000042000006',NULL),('PBtmpl0000000000000059','Default SQL Report','','default_sql_report',1124395696,1229907401,'3','7','12','WebGUI::Asset::Template',0,'Default SQL Report Default SQL Report default sql report SQLReport','000001000001000038000001',NULL),('PBtmpl0000000000000067','Default Submission','','default_submission',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'Default Submission Default Submission default submission Collaboration/Thread','000001000001000008000006',NULL),('PBtmpl0000000000000068','Default Submission Form','','default_submission_form',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'Default Submission Form Default Submission Form default submission form Collaboration/PostForm','000001000001000008000017',NULL),('ProjectManagerTMPL0003','Default Project Manager Gantt Chart','','default-pm-template-gantt-chart',1147642415,1159989349,'3','7','12','WebGUI::Asset::Template',0,'Default Project Manager Gantt Chart Default Project Manager Gantt Chart default pm template gantt chart ProjectManager_gantt','000001000001000030000003000001',NULL),('ProjectManagerTMPL0001','Default Project Management System Dashboard','','default-pm-template-dashboard',1147642415,1229579830,'3','7','12','WebGUI::Asset::Template',0,'Default Project Management System Dashboard Default Project Management System Dashboard default pm template dashboard ProjectManager_dashboard','000001000001000030000001000001',NULL),('PBtmpl0000000000000055','Default Poll','','default_poll',1124395696,1259133275,'3','7','12','WebGUI::Asset::Template',0,'Default Poll Default Poll default poll Poll','000001000001000027000001',NULL),('PBtmpl0000000000000029','Default Post Form','','default_post_form',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'Default Post Form Default Post Form default post form Collaboration/PostForm','000001000001000008000013',NULL),('PBtmpl0000000000000056','Default Product','','default_product',1124395696,1248729559,'3','7','12','WebGUI::Asset::Template',0,'Default Product Default Product default product Product','000001000001000028000001',NULL),('PBtmpl0000000000000033','Default HTTP Proxy','','default_http_proxy',1124395696,1230159454,'3','7','12','WebGUI::Asset::Template',0,'Default HTTP Proxy Default HTTP Proxy default http proxy HttpProxy','000001000001000016000001',NULL),('PBtmpl0000000000000004','Default LDAP Account Display Template','','default_ldap_account_display_template',1124395696,1287545014,'3','7','12','WebGUI::Asset::Template',0,'Default LDAP Account Display Template Default LDAP Account Display Template default ldap account display template Auth/LDAP/Account','000001000001000005000001000001',NULL),('PBtmpl0000000000000006','Default LDAP Login Template','','default_ldap_login_template',1124395696,1287545014,'3','7','12','WebGUI::Asset::Template',0,'Default LDAP Login Template Default LDAP Login Template default ldap login template Auth/LDAP/Login','000001000001000005000003000001',NULL),('PBtmpl0000000000000044','Default Login Box','','default_login_box',1124395696,1148579524,'3','7','12','WebGUI::Asset::Template',0,'Default Login Box Default Login Box default login box Macro/L_loginBox','000001000001000021000009000002',NULL),('PBtmpl0000000000000047','Default Message Board','','default_message_board',1124395696,1147642414,'3','7','12','WebGUI::Asset::Template',0,'Default Message Board Default Message Board default message board MessageBoard','000001000001000023000001',NULL),('PBtmpl0000000000000054','Default Page','','default_page',1124395696,1259133276,'3','7','12','WebGUI::Asset::Template',0,'Default Page Default Page default page Layout','000001000001000019000003',NULL),('Q4uX_C557arTp6D_jwB1jQ','Wiki','','root/import/wiki',1165460175,1273032720,'3','12','12','WebGUI::Asset::Wobject::Folder',1,'Wiki Wiki root import wiki','000001000001000052',NULL),('BmLaN4rmAANkCglXUViEbg','Resource','','root/import/projectmanager/resource',1157679165,1222803871,'3','12','12','WebGUI::Asset::Wobject::Folder',1,'Resource Resource root import projectmanager resource','000001000001000030000005',NULL),('PBtmpl0000000000000039','Default File Macro','','default_file_macro',1124395696,1154535073,'3','7','12','WebGUI::Asset::Template',0,'Default File Macro Default File Macro default file macro Macro/File','000001000001000021000004000001',NULL),('PBtmpl0000000000000026','Default Forum','','default_forum',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'Default Forum Default Forum default forum Collaboration','000001000001000008000007',NULL),('PBtmpl0000000000000031','Default Forum Search','','default_forum_search',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'Default Forum Search Default Forum Search default forum search Collaboration/Search','000001000001000008000016',NULL),('PBtmpl0000000000000093','crumbTrail','','crumbtrail2',1124395696,1259133274,'3','7','12','WebGUI::Asset::Template',0,'crumbTrail crumbTrail crumbtrail2 Navigation','000001000001000025000001',NULL),('DashboardViewTmpl00001','Dashboard Default View','','dashboard-default-view-template',1133743239,1300763664,'3','7','12','WebGUI::Asset::Template',0,'Dashboard Default View Dashboard Default View dashboard default view template Dashboard','000001000001000009000001',NULL),('PBtmpl0000000000000021','Data List','','data_list',1124395696,1294721945,'3','7','12','WebGUI::Asset::Template',0,'Data List Data List data list DataForm/List','000001000001000010000004',NULL),('PBtmpl0000000000000104','Default Acknowledgement','','default_acknowledgement',1124395696,1257311888,'3','7','12','WebGUI::Asset::Template',0,'Default Acknowledgement Default Acknowledgement default acknowledgement DataForm','000001000001000010000003',NULL),('PBtmpl0000000000000002','Default Article','','default_article',1124395696,1259133276,'3','7','12','WebGUI::Asset::Template',0,'Default Article Default Article default article Article','000001000001000004000002',NULL),('PBtmpl0000000000000141','Default DataForm','','pbtmpl0000000000000141',1124395696,1257311888,'3','7','12','WebGUI::Asset::Template',0,'Default DataForm Default DataForm pbtmpl0000000000000141 DataForm','000001000001000010000006',NULL),('WikiRCTmpl000000000001','Default Recent Changes','','default-wiki-recent-changes',1165460175,1273032720,'3','7','12','WebGUI::Asset::Template',0,'Default Recent Changes Default Recent Changes default wiki recent changes WikiMaster_recentChanges','000001000001000052000001',NULL),('PBtmpl0000000000000128','Classifieds','','classifieds',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'Classifieds Classifieds classifieds Collaboration','000001000001000008000008',NULL),('PBtmpl0000000000000134','Hierarchical Top Nav','','import/hierarchical-top-nav',1124395696,1259133275,'3','7','12','WebGUI::Asset::Template',0,'Hierarchical Top Nav Hierarchical Top Nav import hierarchical top nav Navigation','000001000001000025000006',NULL),('PBtmpl0000000000000208','Request Tracker','','request-tracker-template',1147642410,1277868922,'3','7','12','WebGUI::Asset::Template',0,'Request Tracker Request Tracker request tracker template Collaboration','000001000001000008000026',NULL),('wAc4azJViVTpo-2NYOXWvg','Default Question Edit','','root/import/survey/default-question-edit',1226009650,1250243000,'3','7','12','WebGUI::Asset::Template',0,'Default Question Edit Default Question Edit root import survey default question edit Survey/Edit','000001000001000042000008',NULL),('1z9J1O08n_7gVVlBwSRBJQ','Auth','','root/import/auth',1222803099,1287545014,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Auth Auth root import auth','000001000001000005',NULL),('zyWi26q9na-iiZqL4yedog','Macro','','root/import/macro',1222803114,1222803114,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Macro Macro root import macro','000001000001000021',NULL),('PBtmpl0000000000000209','Request Tracker Thread','','request-tracker-post-template',1147642410,1277868922,'3','7','12','WebGUI::Asset::Template',0,'Request Tracker Thread Request Tracker Thread request tracker post template Collaboration/Thread','000001000001000008000027',NULL),('PBtmpl0000000000000109','One Over Three','','one_over_three',1124395696,1259133276,'3','7','12','WebGUI::Asset::Template',0,'One Over Three One Over Three one over three Layout','000001000001000019000004',NULL),('PBtmpl0000000000000001','Admin Console','','admin_console2',1124395696,1247535846,'3','7','12','WebGUI::Asset::Template',0,'Admin Console Admin Console admin console2 AdminConsole','000001000001000003000001',NULL),('LBuiKzg2mWwmOPS9AgV3bg','Get Translated','Let our team of professional translators bring your site to new customers by translating your content into additional languages. Our translation services are never machine automated. They\'re always done by professional translators that have years of exper','yns/translated',1147642517,1271348789,'3','7','4','WebGUI::Asset::Wobject::Article',1,'Get Translated Get Translated yns translated Let our team of professional translators bring your site to new customers by translating your content into additional languages Our translation services are never machine automated They\'re always done by professional translators that have years of experience reading writing and speaking many languages ','000001000002000002000005',NULL),('jTNggl7AoVSUc_ZzrvuCmw','Get Promoted','Now that you have a brilliant WebGUI site, you need to get people to visit it. We can help there too. Our marketing specialists can work with you to develop and execute the right combination of search engine placement, advertising buys, and affilliate pro','yns/promotion',1147642517,1271348789,'3','7','4','WebGUI::Asset::Wobject::Article',1,'Get Promoted Get Promoted yns promotion Now that you have a brilliant WebGUI site you need to get people to visit it We can help there too Our marketing specialists can work with you to develop and execute the right combination of search engine placement advertising buys and affilliate programs to ensure your site gets the traffic it needs ','000001000002000002000006',NULL),('Vzv1pWpg_w6R_o-b0rM2qQ','Ad','','home/ad2',1147642515,1147642515,'3','7','4','WebGUI::Asset::File',1,'Ad Ad home ad2','000001000002000001000002',NULL),('NK8bqlwVRILJknqeCDPBHg','Getting Started (part 2)','\nTo begin managing content, you should log in and click the Turn Admin On! link. The default username is \"admin\" and the default password is \"123qwe\", but you probably customized both of those when you visited this site for the very first time.\n \n\nNow tha','getting_started/getting-started-part2',1147642515,1285796040,'3','7','4','WebGUI::Asset::Wobject::Article',1,'Getting Started part 2 Getting Started part 2 getting started getting started part2 To begin managing content you should log in and click the Turn Admin On link The default username is admin and the default password is 123qwe but you probably customized both of those when you visited this site for the very first time Now that you\'re logged in we recommend that you add a new user for yourself with admin privileges just in case you forget the login information for your primary admin account Don\'t worry if you lock yourself out you can always contact Plain Black® support to get instructions to get back in NOTE If you appear to get logged out while moving between pages this is most likely your browser displaying a cached version of the page Click on your browser\'s refresh button to correct the problem For more information about services related to WebGUI click here Enjoy your new WebGUI site ','000001000002000001000003',NULL),('IWFxZDyGhQ3-SLZhELa3qw','Benefits','\n\n\n\nRich User Interface\n \n\nPowerful API\n \n\n\n\nWebGUI has a rich user experience that allows users to place their \ncontent\nthrough a drag-n-drop interface; helps users pick dates, colors, and\nmore; and has a highly customizable rich editor to allow users to','home/key-benefits',1147642514,1277737686,'3','7','4','WebGUI::Asset::Wobject::Article',1,'Benefits Benefits home key benefits Rich User Interface Powerful API WebGUI has a rich user experience that allows users to place their content through a drag-n-drop interface helps users pick dates colors and more and has a highly customizable rich editor to allow users to quickly and easily format content WebGUI allows developers to quickly plug-in new functionality to get the most from a site In addition WebGUI\'s standardized plug-in points maintain the upgrade path even with customizations Short Friendly URLs Internationalization Never worry about ugly numeric ID\'s or other things in URL\'s that make it hard for search engines and people to use a site Users can work in an interface in their native language and content can be published in as many languages as necessary Personalization Easy To Install Users see their own view of the site through dynamically generated navigation and content In addition content can be displayed based upon users viewing habits With the use of the WebGUI Runtime Environment Unix Mac OS X Linux BSD and VMWare Appliance Windows setup takes minutes rather than hours ','000001000002000007',NULL),('OhdaFLE7sXOzo_SIP2ZUgA','Welcome','The WebGUI Content Engine® is a powerful, easy to use web application framework and content management system. WebGUI contains dozens of built-in features, and allows for full customization through its rich API. It\'s easy enough for the average busine','home/welcome',1147642513,1271445348,'3','7','4','WebGUI::Asset::Wobject::Article',1,'Welcome Welcome home welcome The WebGUI Content Engine® is a powerful easy to use web application framework and content management system WebGUI contains dozens of built-in features and allows for full customization through its rich API It\'s easy enough for the average business user to use but powerful enough for any large enterprise WebGUI serves thousands of small and large businesses schools universities governments associations churches projects and communities throughout the world For examples of who is using WebGUI visit the WebGUI Sightings page Shouldn\'t your site be on this list If you\'re new to WebGUI visit the Getting Started section Once you feel comfortable explore some of the professional services available for your new WebGUI site No matter what level you\'re at tell your friends about WebGUI ','000001000002000006',NULL),('7-0-style0000000000071','wg.jpg','','style3/wg.jpg',1147642511,1147642511,'3','7','12','WebGUI::Asset::File::Image',1,'wg.jpg wg.jpg style3 wg.jpg','000001000001000051000022',NULL),('7-0-style0000000000068','spacer.gif','','style3/spacer.gif',1147642510,1147642510,'3','7','12','WebGUI::Asset::File::Image',1,'spacer.gif spacer.gif style3 spacer.gif','000001000001000051000019',NULL),('7-0-style0000000000070','Style3 Coolmenu','','style3_coolmenu',1147642510,1147642510,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'Style3 Coolmenu Style3 Coolmenu style3 coolmenu','000001000001000051000021',NULL),('7-0-style0000000000066','nav_bg_on.jpg','','style3/nav_bg_on.jpg',1147642509,1147642509,'3','7','12','WebGUI::Asset::File::Image',1,'nav_bg_on.jpg nav_bg_on.jpg style3 nav bg on.jpg','000001000001000051000017',NULL),('7-0-style0000000000064','nav_bg2.jpg','','style3/nav_bg2.jpg',1147642509,1147642509,'3','7','12','WebGUI::Asset::File::Image',1,'nav_bg2.jpg nav_bg2.jpg style3 nav bg2.jpg','000001000001000051000015',NULL),('7-0-style0000000000065','nav_bg2_on.jpg','','style3/nav_bg2_on.jpg',1147642509,1147642509,'3','7','12','WebGUI::Asset::File::Image',1,'nav_bg2_on.jpg nav_bg2_on.jpg style3 nav bg2 on.jpg','000001000001000051000016',NULL),('7-0-style0000000000067','pb.jpg','','style3/pb.jpg',1147642509,1147642509,'3','7','12','WebGUI::Asset::File::Image',1,'pb.jpg pb.jpg style3 pb.jpg','000001000001000051000018',NULL),('7-0-style0000000000063','nav_bg1_on.jpg','','style3/nav_bg1_on.jpg',1147642508,1147642508,'3','7','12','WebGUI::Asset::File::Image',1,'nav_bg1_on.jpg nav_bg1_on.jpg style3 nav bg1 on.jpg','000001000001000051000014',NULL),('7-0-style0000000000060','main_top_bg.jpg','','style3/main_top_bg.jpg',1147642508,1147642508,'3','7','12','WebGUI::Asset::File::Image',1,'main_top_bg.jpg main_top_bg.jpg style3 main top bg.jpg','000001000001000051000011',NULL),('7-0-style0000000000062','nav_bg1.jpg','','style3/nav_bg1.jpg',1147642508,1147642508,'3','7','12','WebGUI::Asset::File::Image',1,'nav_bg1.jpg nav_bg1.jpg style3 nav bg1.jpg','000001000001000051000013',NULL),('7-0-style0000000000061','nav_bg.jpg','','style3/nav_bg.jpg',1147642508,1147642508,'3','7','12','WebGUI::Asset::File::Image',1,'nav_bg.jpg nav_bg.jpg style3 nav bg.jpg','000001000001000051000012',NULL),('7-0-style0000000000059','main_top.jpg','','style3/main_top.jpg',1147642507,1213386091,'3','7','12','WebGUI::Asset::File::Image',1,'main_top.jpg main_top.jpg style3 main top.jpg','000001000001000051000010',NULL),('7-0-style0000000000057','main_bg.jpg','','style3/main_bg.jpg',1147642507,1147642507,'3','7','12','WebGUI::Asset::File::Image',1,'main_bg.jpg main_bg.jpg style3 main bg.jpg','000001000001000051000008',NULL),('7-0-style0000000000058','main_bottom.jpg','','style3/main_bottom.jpg',1147642507,1147642507,'3','7','12','WebGUI::Asset::File::Image',1,'main_bottom.jpg main_bottom.jpg style3 main bottom.jpg','000001000001000051000009',NULL),('7-0-style0000000000055','header_left.jpg','','style3/header_left.jpg',1147642506,1147642506,'3','7','12','WebGUI::Asset::File::Image',1,'header_left.jpg header_left.jpg style3 header left.jpg','000001000001000051000006',NULL),('7-0-style0000000000056','header_right.jpg','','style3/header_right.jpg',1147642506,1147642506,'3','7','12','WebGUI::Asset::File::Image',1,'header_right.jpg header_right.jpg style3 header right.jpg','000001000001000051000007',NULL),('7-0-style0000000000054','header_bg.jpg','','style3/header_bg.jpg',1147642506,1147642506,'3','7','12','WebGUI::Asset::File::Image',1,'header_bg.jpg header_bg.jpg style3 header bg.jpg','000001000001000051000005',NULL),('7-0-style0000000000052','footer_bg.jpg','','style3/footer_bg.jpg',1147642505,1147642505,'3','7','12','WebGUI::Asset::File::Image',1,'footer_bg.jpg footer_bg.jpg style3 footer bg.jpg','000001000001000051000003',NULL),('7-0-style0000000000053','footer_right.jpg','','style3/footer_right.jpg',1147642505,1147642505,'3','7','12','WebGUI::Asset::File::Image',1,'footer_right.jpg footer_right.jpg style3 footer right.jpg','000001000001000051000004',NULL),('7-0-style0000000000046','rightCol_bg.jpg','','style2/rightcol_bg.jpg',1147642504,1147642504,'3','7','12','WebGUI::Asset::File::Image',1,'rightCol_bg.jpg rightCol_bg.jpg style2 rightcol bg.jpg','000001000001000050000015',NULL),('7-0-style0000000000049','WebGUI 7 Style 3','','root/import/webgui-7-style-3',1147642504,1224117144,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'WebGUI 7 Style 3 WebGUI 7 Style 3 root import webgui 7 style 3','000001000001000051',NULL),('7-0-style0000000000048','wg.jpg','','style2/wg.jpg',1147642504,1147642504,'3','7','12','WebGUI::Asset::File::Image',1,'wg.jpg wg.jpg style2 wg.jpg','000001000001000050000017',NULL),('7-0-style0000000000045','pb_wg_bg.jpg','','style2/pb_wg_bg.jpg',1147642503,1147642503,'3','7','12','WebGUI::Asset::File::Image',1,'pb_wg_bg.jpg pb_wg_bg.jpg style2 pb wg bg.jpg','000001000001000050000014',NULL),('7-0-style0000000000044','pb_wg.jpg','','style2/pb_wg.jpg',1147642503,1147642503,'3','7','12','WebGUI::Asset::File::Image',1,'pb_wg.jpg pb_wg.jpg style2 pb wg.jpg','000001000001000050000013',NULL),('7-0-style0000000000043','pb.jpg','','style2/pb.jpg',1147642503,1147642503,'3','7','12','WebGUI::Asset::File::Image',1,'pb.jpg pb.jpg style2 pb.jpg','000001000001000050000012',NULL),('7-0-style0000000000042','page_title_bg.jpg','','style2/page_title_bg.jpg',1147642502,1147642502,'3','7','12','WebGUI::Asset::File::Image',1,'page_title_bg.jpg page_title_bg.jpg style2 page title bg.jpg','000001000001000050000011',NULL),('7-0-style0000000000041','page_title.jpg','','style2/page_title.jpg',1147642502,1147642502,'3','7','12','WebGUI::Asset::File::Image',1,'page_title.jpg page_title.jpg style2 page title.jpg','000001000001000050000010',NULL),('7-0-style0000000000040','navbar_right.jpg','','style2/navbar_right.jpg',1147642502,1147642502,'3','7','12','WebGUI::Asset::File::Image',1,'navbar_right.jpg navbar_right.jpg style2 navbar right.jpg','000001000001000050000009',NULL),('7-0-style0000000000039','navbar_left.jpg','','style2/navbar_left.jpg',1147642502,1147642502,'3','7','12','WebGUI::Asset::File::Image',1,'navbar_left.jpg navbar_left.jpg style2 navbar left.jpg','000001000001000050000008',NULL),('7-0-style0000000000036','main_bg.jpg','','style2/main_bg.jpg',1147642501,1147642501,'3','7','12','WebGUI::Asset::File::Image',1,'main_bg.jpg main_bg.jpg style2 main bg.jpg','000001000001000050000005',NULL),('7-0-style0000000000038','navbar_bg.jpg','','style2/navbar_bg.jpg',1147642501,1147642501,'3','7','12','WebGUI::Asset::File::Image',1,'navbar_bg.jpg navbar_bg.jpg style2 navbar bg.jpg','000001000001000050000007',NULL),('7-0-style0000000000035','leftCol_header02.jpg','','style2/leftcol_header02.jpg',1147642501,1147642501,'3','7','12','WebGUI::Asset::File::Image',1,'leftCol_header02.jpg leftCol_header02.jpg style2 leftcol header02.jpg','000001000001000050000004',NULL),('7-0-style0000000000037','nav_bg.jpg','','style2/nav_bg.jpg',1147642501,1147642501,'3','7','12','WebGUI::Asset::File::Image',1,'nav_bg.jpg nav_bg.jpg style2 nav bg.jpg','000001000001000050000006',NULL),('7-0-style0000000000032','context_bg.jpg','','style2/context_bg.jpg',1147642500,1147642500,'3','7','12','WebGUI::Asset::File::Image',1,'context_bg.jpg context_bg.jpg style2 context bg.jpg','000001000001000050000001',NULL),('7-0-style0000000000031','WebGUI 7 Style 2','','root/import/webgui-7-style-2',1147642500,1147642500,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'WebGUI 7 Style 2 WebGUI 7 Style 2 root import webgui 7 style 2','000001000001000050',NULL),('7-0-style0000000000033','css02.css','','style2/css02.css',1147642500,1147642500,'3','7','12','WebGUI::Asset::Snippet',0,'css02.css css02.css style2 css02.css body html height:100 body background:#7c9ab0 url(\'^FileUrl(style2/main_bg.jpg repeat-y right margin:0px rightColumn width:20 height:100 background eeeeee url(\'^FileUrl(style2/rightCol_bg.jpg repeat-y right text-align:center rightColumn pb_wg_bg background url(\'^FileUrl(style2/pb_wg_bg.jpg repeat-x width:100 text-align:left rightColumn pb_wg background url(\'^FileUrl(style2/pb_wg.jpg left no-repeat height:53px leftColumn width:80 background white url(\'^FileUrl(style2/context_bg.jpg repeat-y right leftColumn header width:100 background:#7c9ab0 url(\'^FileUrl(style2/leftCol_header.jpg right no-repeat height:86px position:relative leftColumn header title leftColumn header title_bg color:white font-size:36pt font-weight:bold font-family:arial font-variant:small-caps letter-spacing:12px top:15px left:5px position:absolute z-index:10 leftColumn header title a color:white text-decoration:none leftColumn header title_bg color:black z-index:5 top:17px left:7px leftColumn context background fff url(\'^FileUrl(style2/context_bg.jpg repeat-y right width:95 font-family:verdana font-size:9pt color:#242424 moz-box-sizing:border-box position:relative padding-left:1 padding-right:1 padding-bottom:15px leftColumn context a color:#7C9AB0 font-weight:bold leftColumn context a:hover text-decoration:none leftColumn pageTitleBG background url(\'^FileUrl(style2/page_title_bg.jpg repeat-x width:100 leftColumn pageTitleBG pageTitle background url(\'^FileUrl(style2/page_title.jpg right no-repeat width:100 height:50px leftColumn pageTitleBG pageTitle h2 font-size:14pt color:#696969 font-family:arial font-weight:normal margin:0px padding-top:2px padding-left:25px letter-spacing:3px rightColumn nav width:85 background b5b5b5 url(\'^FileUrl(style2/nav_bg.jpg repeat-x top border-right:solid 848484 1px margin-left:auto margin-right:auto text-align:left padding-left:3px padding-top:7px padding-bottom:7px rightColumn nav a color:white font-size:8pt font-weight:bold text-decoration:none font-family:arial line-height:8pt rightColumn nav selectedMenuItem color:yellow loginStyles font-size:8pt font-family:arial padding-bottom:25px loginStyles a color:#89ACCF font-weight:bold border-bottom:solid transparent 2px text-decoration:none loginStyles a:hover border-bottom:dotted B2C9D9 2px copyright border-top:solid silver 3px background-color:gray font-family:arial font-size:9pt color:silver text-align:center ','000001000001000050000002',NULL),('7-0-style0000000000034','leftCol_header.jpg','','style2/leftcol_header.jpg',1147642500,1147642500,'3','7','12','WebGUI::Asset::File::Image',1,'leftCol_header.jpg leftCol_header.jpg style2 leftcol header.jpg','000001000001000050000003',NULL),('stevenav00000000000001','Style 01 Nav','','style1_nav',1147642499,1147642499,'3','7','12','WebGUI::Asset::Template',0,'Style 01 Nav Style 01 Nav style1 nav Navigation','000001000001000049000027',NULL),('PBnav000000style01lvl2','Style 01 Nav lvl2','','style1_nav_lvl2',1147642499,1147642499,'3','7','12','WebGUI::Asset::Template',0,'Style 01 Nav lvl2 untitled style1 nav lvl2 Navigation','000001000001000049000028',NULL),('7-0-style0000000000030','webgui_btn.jpg','','style1/webgui_btn.jpg',1147642499,1147642499,'3','7','12','WebGUI::Asset::File::Image',1,'webgui_btn.jpg webgui_btn.jpg style1 webgui btn.jpg','000001000001000049000029',NULL),('7-0-style0000000000026','RootTab Level 1','','roottab_level1',1147642499,1147642499,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'RootTab Level 1 RootTab Level 1 roottab level1','000001000001000049000025',NULL),('7-0-style0000000000024','orange_left01.jpg','','style1/orange_left01.jpg',1147642498,1147642498,'3','7','12','WebGUI::Asset::File::Image',1,'orange_left01.jpg orange_left01.jpg style1 orange left01.jpg','000001000001000049000023',NULL),('7-0-style0000000000023','nav_on.jpg','','style1/nav_on.jpg',1147642498,1147642498,'3','7','12','WebGUI::Asset::File::Image',1,'nav_on.jpg nav_on.jpg style1 nav on.jpg','000001000001000049000022',NULL),('7-0-style0000000000025','RootTab Level 0','','roottab_level0',1147642498,1147642498,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'RootTab Level 0 RootTab Level 0 roottab level0','000001000001000049000024',NULL),('7-0-style0000000000019','nav2_off_right.jpg','','style1/nav2_off_right.jpg',1147642497,1147642497,'3','7','12','WebGUI::Asset::File::Image',1,'nav2_off_right.jpg nav2_off_right.jpg style1 nav2 off right.jpg','000001000001000049000018',NULL),('7-0-style0000000000020','nav2_on_left.jpg','','style1/nav2_on_left.jpg',1147642497,1147642497,'3','7','12','WebGUI::Asset::File::Image',1,'nav2_on_left.jpg nav2_on_left.jpg style1 nav2 on left.jpg','000001000001000049000019',NULL),('7-0-style0000000000022','nav_bg.jpg','','style1/nav_bg.jpg',1147642497,1147642497,'3','7','12','WebGUI::Asset::File::Image',1,'nav_bg.jpg nav_bg.jpg style1 nav bg.jpg','000001000001000049000021',NULL),('7-0-style0000000000021','nav2_on_right.jpg','','style1/nav2_on_right.jpg',1147642497,1147642497,'3','7','12','WebGUI::Asset::File::Image',1,'nav2_on_right.jpg nav2_on_right.jpg style1 nav2 on right.jpg','000001000001000049000020',NULL),('7-0-style0000000000017','nav2_off_center.jpg','','style1/nav2_off_center.jpg',1147642496,1147642496,'3','7','12','WebGUI::Asset::File::Image',1,'nav2_off_center.jpg nav2_off_center.jpg style1 nav2 off center.jpg','000001000001000049000016',NULL),('7-0-style0000000000016','nav2_center_on.jpg','','style1/nav2_center_on.jpg',1147642496,1147642496,'3','7','12','WebGUI::Asset::File::Image',1,'nav2_center_on.jpg nav2_center_on.jpg style1 nav2 center on.jpg','000001000001000049000015',NULL),('7-0-style0000000000018','nav2_off_left.jpg','','style1/nav2_off_left.jpg',1147642496,1147642496,'3','7','12','WebGUI::Asset::File::Image',1,'nav2_off_left.jpg nav2_off_left.jpg style1 nav2 off left.jpg','000001000001000049000017',NULL),('7-0-style0000000000015','nav1_on_right.jpg','','style1/nav1_on_right.jpg',1147642496,1147642496,'3','7','12','WebGUI::Asset::File::Image',1,'nav1_on_right.jpg nav1_on_right.jpg style1 nav1 on right.jpg','000001000001000049000014',NULL),('7-0-style0000000000014','nav1_on_left.jpg','','style1/nav1_on_left.jpg',1147642495,1147642495,'3','7','12','WebGUI::Asset::File::Image',1,'nav1_on_left.jpg nav1_on_left.jpg style1 nav1 on left.jpg','000001000001000049000013',NULL),('7-0-style0000000000013','nav1_on.jpg','','style1/nav1_on.jpg',1147642495,1147642495,'3','7','12','WebGUI::Asset::File::Image',1,'nav1_on.jpg nav1_on.jpg style1 nav1 on.jpg','000001000001000049000012',NULL),('7-0-style0000000000011','nav1_off_left.jpg','','style1/nav1_off_left.jpg',1147642495,1147642495,'3','7','12','WebGUI::Asset::File::Image',1,'nav1_off_left.jpg nav1_off_left.jpg style1 nav1 off left.jpg','000001000001000049000010',NULL),('7-0-style0000000000012','nav1_off_right.jpg','','style1/nav1_off_right.jpg',1147642495,1147642495,'3','7','12','WebGUI::Asset::File::Image',1,'nav1_off_right.jpg nav1_off_right.jpg style1 nav1 off right.jpg','000001000001000049000011',NULL),('7-0-style0000000000009','nav1_off.jpg','','style1/nav1_off.jpg',1147642494,1147642494,'3','7','12','WebGUI::Asset::File::Image',1,'nav1_off.jpg nav1_off.jpg style1 nav1 off.jpg','000001000001000049000008',NULL),('7-0-style0000000000010','nav1_off_center.jpg','','style1/nav1_off_center.jpg',1147642494,1147642494,'3','7','12','WebGUI::Asset::File::Image',1,'nav1_off_center.jpg nav1_off_center.jpg style1 nav1 off center.jpg','000001000001000049000009',NULL),('7-0-style0000000000008','nav1_center_on.jpg','','style1/nav1_center_on.jpg',1147642494,1147642494,'3','7','12','WebGUI::Asset::File::Image',1,'nav1_center_on.jpg nav1_center_on.jpg style1 nav1 center on.jpg','000001000001000049000007',NULL),('7-0-style0000000000006','main_bg.gif','','style1/main_bg.gif',1147642493,1147642493,'3','7','12','WebGUI::Asset::File::Image',1,'main_bg.gif main_bg.gif style1 main bg.gif','000001000001000049000005',NULL),('7-0-style0000000000007','main_bg.jpg','','style1/main_bg.jpg',1147642493,1147642493,'3','7','12','WebGUI::Asset::File::Image',1,'main_bg.jpg main_bg.jpg style1 main bg.jpg','000001000001000049000006',NULL),('7-0-style0000000000004','gui_bottom.jpg','','style1/gui_bottom.jpg',1147642493,1147642493,'3','7','12','WebGUI::Asset::File::Image',1,'gui_bottom.jpg gui_bottom.jpg style1 gui bottom.jpg','000001000001000049000003',NULL),('7-0-style0000000000005','header.jpg','','style1/header.jpg',1147642493,1147642493,'3','7','12','WebGUI::Asset::File::Image',1,'header.jpg header.jpg style1 header.jpg','000001000001000049000004',NULL),('7-0-style0000000000001','WebGUI 7 Style 1','','root/import/webgui-7-style-1',1147642492,1147642492,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'WebGUI 7 Style 1 WebGUI 7 Style 1 root import webgui 7 style 1','000001000001000049',NULL),('7-0-style0000000000002','body_bg.jpg','','style1/body_bg.jpg',1147642492,1147642492,'3','7','12','WebGUI::Asset::File::Image',1,'body_bg.jpg body_bg.jpg style1 body bg.jpg','000001000001000049000001',NULL),('7-0-style0000000000003','css01.css','','style1/css01.css',1147642492,1147642492,'3','7','12','WebGUI::Asset::Snippet',0,'css01.css css01.css style1 css01.css body html text-align:center margin:0px height:100 background-color:#494949 main width:800px background url(\'^FileUrl(style1/main_bg.jpg repeat-y height:100 margin-left:auto margin-right:auto margin-top:0px margin-bottom:0px position:relative body > main height:auto min-height:100 main mainHeader width:800px height:133px background url(\'^FileUrl(style1/header.jpg top left no-repeat margin-bottom:0px position:relative main mainHeader title position:absolute top:23px left:145px font-size:32pt font-family:arial color:white font-weight:bold main mainHeader title a color:white text-decoration:none main mainContent background url(\'^FileUrl(style1/orange_left01.jpg left top no-repeat width:100 height:100 margin-top:0px text-align:left border:solid red 0px main > mainContent margin-top:0px min-height:500px main > mainContent > p margin-top:0px main mainContent mainText a:link color:#FF7F23 main mainContent mainText a:visited color:#D25900 LEVEL 1 AND 2 NAVIGATION main mainNav_1 main mainNav_2 border-bottom:dashed DADADA 1px width:621px height:25px text-align:left position:relative margin-left:137px clear:both main mainNav_1 a:link main mainNav_1 a:visited main mainNav_2 a:link main mainNav_2 a:visited color:white text-decoration:none top:5px position:relative moz-box-sizing:border-box main mainNav_1 a:hover,#main mainNav_2 a:hover color:black main mainNav_1 div left main mainNav_2 div left width:12px height:25px display:block float:left background url(\'^FileUrl(style1/nav1_off_left.jpg no-repeat top left main mainNav_2 div left background url(\'^FileUrl(style1/nav2_off_left.jpg no-repeat top left main mainNav_1 div center main mainNav_2 div center height:25px display:block float:left background url(\'^FileUrl(style1/nav1_off_center.jpg repeat-x top left color:white font-family:arial verdana font-size:8pt main mainNav_2 div center background url(\'^FileUrl(style1/nav2_off_center.jpg repeat-x top left main mainNav_1 div right main mainNav_2 div right width:10px height:25px display:block float:left background url(\'^FileUrl(style1/nav1_off_right.jpg no-repeat top left main mainNav_2 div right background url(\'^FileUrl(style1/nav2_off_right.jpg no-repeat top left main mainNav_1 div.navOn left background url(\'^FileUrl(style1/nav1_on_left.jpg no-repeat top left main mainNav_1 div.navOn center background url(\'^FileUrl(style1/nav1_center_on.jpg repeat-x top left main mainNav_1 div.navOn right background url(\'^FileUrl(style1/nav1_on_right.jpg no-repeat top left main mainNav_2 div.navOn left background url(\'^FileUrl(style1/nav2_on_left.jpg no-repeat top left main mainNav_2 div.navOn center background url(\'^FileUrl(style1/nav2_center_on.jpg repeat-x top left main mainNav_2 div.navOn right background url(\'^FileUrl(style1/nav2_on_right.jpg no-repeat top left main mainNav_1 div.navOn a:link main mainNav_1 div.navOn a:visited main mainNav_2 div.navOn a:link main mainNav_2 div.navOn a:visited color:black ENDOF LEVEL 1 AND 2 NAVIGATION main crumbTrail margin-left:177px margin-bottom:0px color:gray font-size:8pt font-weight:bold main crumbTrail a.crumbTrail:visited main crumbTrail a.crumbTrail:link color:silver font-size:8pt font-family:arial text-decoration:none font-weight:normal main crumbTrail a.crumbTrail:hover color:gray main mainText padding-left:150px font-family:verdana font-size:9pt width:600px margin-top:0px main gui bottom:0px left:0px position:absolute width:135px font-size:8pt color:black font-family:arial text-align:right main gui loginBox padding-right:12px moz-box-sizing:border-box width:100px float:right margin-bottom:10px main gui loginBox loginBoxField width:75px main gui loginBox loginBoxButton background-color:#D65501 color:white border:solid white 2px margin-top:4px font-variant:small-caps main gui a color:white copyright color:#fff position:absolute top:110px right:40px font-family:verdana font-size:8pt font-weight:bold background-color:#2D2D2D opacity:0.4 moz-opacity:0.4 khtml-opacity:0.4 padding:2px html copyright background transparent ','000001000001000049000002',NULL),('7F-BuEHi7t9bPi008H8xZQ','Default Survey Summary','','root/import/survey/default-survey-summary',1239248021,1250243000,'3','7','12','WebGUI::Asset::Template',0,'Default Survey Summary Default Survey Summary root import survey default survey summary Survey/Summary','000001000001000042000012',NULL),('CSN-ZON7Uwv8kxf3F1fh5Q','ZipArchiveAsset','','root/import/ziparchiveasset',1147642484,1147642484,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'ZipArchiveAsset ZipArchiveAsset root import ziparchiveasset','000001000001000053',NULL),('TCtybxdqmdwdvRn555zpCQ','RichEdit','','root/import/richedit',1147642484,1147642484,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'RichEdit RichEdit root import richedit','000001000001000032',NULL),('NywJYmGWe1f6EBXJnWg9Xg','Profile','','root/import/profile',1222803606,1222803638,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Profile Profile root import profile','000001000001000029',NULL),('9wKWdum0_8z-OhhquWLtSQ','WeatherData','','root/import/weatherdata',1147642483,1147642483,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'WeatherData WeatherData root import weatherdata','000001000001000048',NULL),('AgyFhx3eXlfZXNp2MkrsiQ','Edit','','root/import/profile/edit',1147642477,1222803665,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Edit Edit root import profile edit','000001000001000029000001',NULL),('F7MAQ-cpuvQ1KuC7J4P5zQ','View','','root/import/profile/view',1147642477,1222803673,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'View View root import profile view','000001000001000029000002',NULL),('oGfxez5sksyB_PcaAsEm_Q','SyndicatedContent','','root/import/syndicatedcontent',1147642482,1247053097,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'SyndicatedContent SyndicatedContent root import syndicatedcontent','000001000001000043',NULL),('5bnNzteN7w3NnK9mF4XiCg','Survey','','root/import/survey',1147642481,1250243000,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Survey Survey root import survey','000001000001000042',NULL),('Efe2W0UgrSRDltNJ87jlfg','StockData','','root/import/stockdata',1147642480,1147642480,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'StockData StockData root import stockdata','000001000001000039',NULL),('bbiA9Zq5Gy2oCFBlILO3QA','SQLReport','','root/import/sqlreport',1147642480,1147642480,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'SQLReport SQLReport root import sqlreport','000001000001000038',NULL),('RrV4aAPnn4dM0ZcU3OXnlw','style','','root/import/style',1147642480,1286336607,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'style style root import style','000001000001000041',NULL),('Ik9HHky10DIyFTKehUD1dw','Prompt','','root/import/prompt',1147642479,1222803478,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Prompt Prompt root import prompt','000001000001000031',NULL),('f_tn9FfoSfKWX43F83v_3w','Search','','root/import/search',1147642479,1247053009,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Search Search root import search','000001000001000034',NULL),('Da6KWn805L4B5e4HFgQRQA','Shortcut','','root/import/shortcut',1147642479,1147642479,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Shortcut Shortcut root import shortcut','000001000001000037',NULL),('TYo2Bwl7aafzTtdHlS-arQ','Product','','root/import/product',1147642478,1211664878,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Product Product root import product','000001000001000028',NULL),('VZK3CRgiMb8r4dBjUmCTgQ','Poll','','root/import/poll',1147642477,1247046242,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Poll Poll root import poll','000001000001000027',NULL),('jEz8iTGNWEt2I05IhVV19Q','Operation/RedeemSubscription','','root/import/operation/redeemsubscription',1147642477,1326776037,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Operation/RedeemSubscription Operation/RedeemSubscription root import operation redeemsubscription','000001000001000036000016',NULL),('BFfNj5wA9bDw8H3cnr8pTw','Navigation','','root/import/navigation',1147642475,1247046273,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Navigation Navigation root import navigation','000001000001000025',NULL),('bBzO4CWjqU_ile3gf5Iypw','MultiSearch','','root/import/multisearch',1147642475,1147642475,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'MultiSearch MultiSearch root import multisearch','000001000001000024',NULL),('cj2y4papTVGZRFdwTI-_fw','MessageBoard','','root/import/messageboard',1147642475,1147642475,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'MessageBoard MessageBoard root import messageboard','000001000001000023',NULL),('3womoo7Teyy2YKFa25-MZg','Address Book (Default)','','shopping-cart-collateral-items/address-book-default',1212098997,1326776037,'3','7','3','WebGUI::Asset::Template',0,'Address Book Default Address Book Default shopping cart collateral items address book default Shop/AddressBook','000001000001000036000013',NULL),('g8W53Pd71uHB9pxaXhWf_A','My Purchases Detail (Default)','','shopping-cart-collateral-items/my-purchases-detail-default',1213184121,1326776037,'3','7','3','WebGUI::Asset::Template',0,'My Purchases Detail Default My Purchases Detail Default shopping cart collateral items my purchases detail default Shop/MyPurchasesDetail','000001000001000036000015',NULL),('-WM2dt0ZGpDasuL2wWocxg','ProjectManager','','root/import/projectmanager',1222803056,1222803056,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'ProjectManager ProjectManager root import projectmanager','000001000001000030',NULL),('LdiozcIUciWuvt3Z-na5Ww','Matrix','','root/import/matrix',1147642474,1281501162,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Matrix Matrix root import matrix','000001000001000022',NULL),('default_post_received1','Default Post Received','','default_post_received',1222708029,1277868922,'3','7','4','WebGUI::Asset::Template',0,'Default Post Received Default Post Received default post received Collaboration/PostReceived','000001000001000008000029',NULL),('aNNC62qLAS6TB-0_MCYjsw','Layout','','root/import/layout',1147642471,1246969327,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Layout Layout root import layout','000001000001000019',NULL),('GYaFxnMu9UsEG8oanwB6TA','Folder','','root/import/folder',1147642470,1246965871,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Folder Folder root import folder','000001000001000014',NULL),('N13SD1Fpqk00UgBt1Z8ivQ','HttpProxy','','root/import/httpproxy',1147642470,1147642470,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'HttpProxy HttpProxy root import httpproxy','000001000001000016',NULL),('tPagC0AQErZXjLFZQ6OI1g','ImageAsset','','root/import/imageasset',1147642470,1246966459,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'ImageAsset ImageAsset root import imageasset','000001000001000017',NULL),('3uuBf8cYuj1sew2OJXl9tg','InOutBoard','','root/import/inoutboard',1147642470,1147642470,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'InOutBoard InOutBoard root import inoutboard','000001000001000018',NULL),('PBtmpl0000000000000005','Default LDAP Anonymous Registration Template','','default_ldap_anonymous_registration_template',1124395696,1287545014,'3','7','12','WebGUI::Asset::Template',0,'Default LDAP Anonymous Registration Template Default LDAP Anonymous Registration Template default ldap anonymous registration template Auth/LDAP/Create','000001000001000005000002000001',NULL),('PBtmpl0000000000000011','Default WebGUI Anonymous Registration Template','','default_webgui_anonymous_registration_template',1124395696,1287545014,'3','7','12','WebGUI::Asset::Template',0,'Default WebGUI Anonymous Registration Template Default WebGUI Anonymous Registration Template default webgui anonymous registration template Auth/WebGUI/Create','000001000001000005000005000001',NULL),('tXwf1zaOXTvsqPn6yu-GSw','FileAsset','','root/import/fileasset',1147642469,1246965607,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'FileAsset FileAsset root import fileasset','000001000001000013',NULL),('S1A9iAwKcQQ6P20uTqw-Ew','Dashboard','','root/import/dashboard',1147642468,1300763664,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Dashboard Dashboard root import dashboard','000001000001000009',NULL),('-K8Hj45mbelljN9-0CXZxg','DataForm',' ','root/import/dataform',1147642468,1257311887,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'DataForm DataForm root import dataform','000001000001000010',NULL),('GNOAsX98vCsl0JRwfwL-gg','Collaboration','','root/import/collaboration',1147642466,1277868921,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Collaboration Collaboration root import collaboration','000001000001000008',NULL),('pbtmpl0000000000000220','Flash Style 3 Template','','flash-style-3-template',1147642465,1247488979,'3','7','12','WebGUI::Asset::Template',0,'Flash Style 3 Template Flash Style 3 Template flash style 3 template FileAsset','000001000001000013000002',NULL),('pbtmpl0000000000000221','Flash Tutorial Template','','flash-tutorial-template',1147642465,1247487940,'3','7','12','WebGUI::Asset::Template',0,'Flash Tutorial Template Flash Tutorial Template flash tutorial template FileAsset','000001000001000013000003',NULL),('nbSrhXZQuxIjhWFaFPSuVA','AdminConsole','','root/import/adminconsole',1147642465,1147642465,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'AdminConsole AdminConsole root import adminconsole','000001000001000003',NULL),('TvOZs8U1kRXLtwtmyW75pg','Article','','root/import/article',1147642465,1256092368,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Article Article root import article','000001000001000004',NULL),('PBtmpl0000000000000027','Default Forum Notification','','default_forum_notification',1124395696,1311652541,'3','7','12','WebGUI::Asset::Template',0,'Default Forum Notification Default Forum Notification default forum notification Collaboration/Notification','000001000001000008000015',NULL),('-PkdI8l1idu-8gDX3iOdcw','One Over Two','','one_over_two',1247482172,1259133274,'3','7','12','WebGUI::Asset::Template',0,'One Over Two One Over Two one over two Layout','000001000001000019000007',NULL),('FEDP3dk8J3Chw_gyr7_XEQ','navigation.css','','navigation.css',1246278679,1246278679,'3','7','12','WebGUI::Asset::Snippet',0,'navigation.css navigation.css navigation.css Horizontal Menu styles horizontalMenu ul.menu padding 0 margin 0 0 1em list-style none width 100 clear floated li elements overflow auto clear floated li elements horizontalMenu ul.menu li float left horizontalMenu ul.menu li a float left padding 4px 8px margin-right 1px background ddd color 000 text-decoration none horizontalMenu ul.menu li.current a background:#eee horizontalMenu ul.menu li a:hover background:#fff Tabs tabbed navigation styles tabsMenu ul.menu margin 0 0 1em tabsMenu ul.menu li display inline tabsMenu ul.menu li a border 1px solid 999 border-bottom 0 padding 5px 10px 2px color 777 text-decoration:none tabsMenu ul.menu li.current a tabsMenu ul.menu li a:hover border 1px solid 000 border-bottom 0 color 000 Indent Nav styles indentMenu a.level0 margin-left:0px display:block indentMenu a.level1 margin-left:15px display:block indentMenu a.level2 margin-left:30px display:block indentMenu a.level3 margin-left:45px display:block indentMenu a.level4 margin-left:60px display:block ','000001000001000025000028',NULL),('PBnav00000000indentnav','Indent Nav','','indent_nav',1148579525,1259133275,'3','7','12','WebGUI::Asset::Template',0,'Indent Nav Indent Nav indent nav Navigation','000001000001000025000027',NULL),('PBtmpl0000000000000085','Default Email','','default_email',1124395696,1288747840,'3','7','12','WebGUI::Asset::Template',0,'Default Email Default Email default email DataForm','000001000001000010000002',NULL),('PBnav00000000000bullet','Bulleted List','','bulleted_list',1148579524,1259133276,'3','7','12','WebGUI::Asset::Template',0,'Bulleted List Bulleted List bulleted list Navigation','000001000001000025000026',NULL),('StockDataTMPL000000002','StockData Default Display','','stockdatatmpl000000002',1133743239,1229494994,'3','7','12','WebGUI::Asset::Template',0,'StockData Default Display StockData Default Display stockdatatmpl000000002 StockData/Display','000001000001000039000001',NULL),('2OcUWHVsu_L1sDFzIMWYqw','TimeTracking','','root/import/timetracking',1222803070,1222803070,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'TimeTracking TimeTracking root import timetracking','000001000001000046',NULL),('PBtmpl0000000000000014','Default WebGUI Password Recovery Template','','default_webgui_password_recovery_template',1124395696,1287545015,'3','7','12','WebGUI::Asset::Template',0,'Default WebGUI Password Recovery Template Default WebGUI Password Recovery Template default webgui password recovery template Auth/WebGUI/Recovery2','000001000001000005000008000001',NULL),('ProjectManagerTMPL0006','Default Resource List','','default-pm-resource-list',1157679165,1157679165,'3','7','12','WebGUI::Asset::Template',0,'Default Resource List Default Resource List default pm resource list ProjectManager_resourceList','000001000001000030000005000001',NULL),('ProjectManagerTMPL0005','Default Resource Popup','','default-pm-resource-popup',1157679165,1229579830,'3','7','12','WebGUI::Asset::Template',0,'Default Resource Popup Default Resource Popup default pm resource popup ProjectManager_resourcePopup','000001000001000030000005000002',NULL),('PBtmpl0000000000000032','Default Thread','','default_thread',1124395696,1277868921,'3','7','12','WebGUI::Asset::Template',0,'Default Thread Default Thread default thread Collaboration/Thread','000001000001000008000014',NULL),('WeatherDataTmpl0000001','WeatherData Default View','','weatherdatatmpl0000001',1133743239,1210711353,'3','7','12','WebGUI::Asset::Template',0,'WeatherData Default View WeatherData Default View weatherdatatmpl0000001 WeatherData','000001000001000048000001',NULL),('PBasset000000000000001','Root','','root',1124395696,1124395696,'3','7','3','WebGUI::Asset',0,'Root Root root','000001',NULL),('PBrichedit000000000001','Content Manager\'s Rich Edit','','content_managers_rich_edit',1124395696,1256092369,'3','7','12','WebGUI::Asset::RichEdit',0,'Content Manager\'s Rich Edit Content Manager\'s Rich Edit content managers rich edit','000001000001000032000001',NULL),('PBrichedit000000000002','Forum Rich Edit','','forum_rich_edit',1124395696,1124395696,'3','7','12','WebGUI::Asset::RichEdit',0,'Forum Rich Edit Forum Rich Edit forum rich edit','000001000001000032000002',NULL),('SynConXSLT000000000001','RSS 0.9 XSLT Stylesheet','','xslt/rss0.9.xsl',1124395707,1124395707,'3','7','12','WebGUI::Asset::Snippet',0,'RSS 0.9 XSLT Stylesheet RSS 0.9 XSLT xslt rss0.9.xsl You\'re viewing an RSS version 0.9 feed Please use an RSS feed reader to view this content as intended','000001000001000043000003',NULL),('SynConXSLT000000000002','RSS 0.91 XSLT Stylesheet','','xslt/rss0.91.xsl',1124395707,1124395707,'3','7','12','WebGUI::Asset::Snippet',0,'RSS 0.91 XSLT Stylesheet RSS 0.91 XSLT xslt rss0.91.xsl You\'re viewing an RSS version 0.91 feed Please use an RSS feed reader to view this content as intended','000001000001000043000004',NULL),('SynConXSLT000000000003','RSS 1.0 XSLT Stylesheet','','xslt/rss1.0.xsl',1124395707,1124395707,'3','7','12','WebGUI::Asset::Snippet',0,'RSS 1.0 XSLT Stylesheet RSS 1.0 XSLT xslt rss1.0.xsl You\'re viewing an RSS version 1.0 feed Please use an RSS feed reader to view this content as intended ','000001000001000043000005',NULL),('SynConXSLT000000000004','RSS 2.0 XSLT Stylesheet','','xslt/rss2.0.xsl',1124395707,1124395707,'3','7','12','WebGUI::Asset::Snippet',0,'RSS 2.0 XSLT Stylesheet RSS 2.0 XSLT xslt rss2.0.xsl You\'re viewing an RSS version 2.0 feed Please use an RSS feed reader to view this content as intended ','000001000001000043000006',NULL),('vrKXEtluIhbmAS9xmPukDA','Donation (Default)','','root/import/default-donation-template',1212092352,1326776037,'3','7','12','WebGUI::Asset::Template',0,'Donation Default Donation Default root import default donation template Donation','000001000001000036000010',NULL),('eqb9sWjFEVq0yHunGV8IGw','Subscription (Default)','','root/import/subscription-default',1213182595,1326776037,'3','7','12','WebGUI::Asset::Template',0,'Subscription Default Subscription Default root import subscription default Subscription','000001000001000036000012',NULL),('PBtmpl0000000000000036','Default Admin Toggle Macro','','default_admin_toggle_macro',1124395696,1129049186,'3','7','12','WebGUI::Asset::Template',0,'Default Admin Toggle Macro Default Admin Toggle Macro default admin toggle macro Macro/AdminToggle','000001000001000021000001000001',NULL),('PBtmpl0000000000000037','Default Account Macro','','default_account_macro',1124395696,1129049186,'3','7','12','WebGUI::Asset::Template',0,'Default Account Macro Default Account Macro default account macro Macro/a_account','000001000001000021000002000001',NULL),('PBtmpl0000000000000038','Default Editable Toggle Macro','','default_editable_toggle_macro',1124395696,1129049186,'3','7','12','WebGUI::Asset::Template',0,'Default Editable Toggle Macro Default Editable Toggle Macro default editable toggle macro Macro/EditableToggle','000001000001000021000003000001',NULL),('PBtmpl0000000000000040','Default Group Add Macro','','default_group_add_macro',1124395696,1129049186,'3','7','12','WebGUI::Asset::Template',0,'Default Group Add Macro Default Group Add Macro default group add macro Macro/GroupAdd','000001000001000021000005000001',NULL),('PBtmpl0000000000000041','Default Group Delete Macro','','default_group_delete_macro',1124395696,1129049186,'3','7','12','WebGUI::Asset::Template',0,'Default Group Delete Macro Default Group Delete Macro default group delete macro Macro/GroupDelete','000001000001000021000006000001',NULL),('PBtmpl0000000000000042','Default Homelink','','default_homelink',1124395696,1129049186,'3','7','12','WebGUI::Asset::Template',0,'Default Homelink Default Homelink default homelink Macro/H_homeLink','000001000001000021000007000001',NULL),('PBtmpl0000000000000043','Default LoginToggle','','default_logintoggle',1124395696,1129049186,'3','7','12','WebGUI::Asset::Template',0,'Default LoginToggle Default LoginToggle default logintoggle Macro/LoginToggle','000001000001000021000008000001',NULL),('PBtmpl0000000000000045','Default Make Printable','','default_make_printable',1124395696,1129049186,'3','7','12','WebGUI::Asset::Template',0,'Default Make Printable Default Make Printable default make printable Macro/r_printable','000001000001000021000011000001',NULL),('PBtmpl0000000000000091','File no icon','','file_no_icon',1124395696,1129049189,'3','7','12','WebGUI::Asset::Template',0,'File no icon File no icon file no icon Macro/File','000001000001000021000004000002',NULL),('MK4fCNoyrx5SE8eyDfOpxg','Flash File','','flash-file',1247489252,1259133276,'3','7','12','WebGUI::Asset::Template',0,'Flash File Flash File flash file FileAsset','000001000001000013000004',NULL),('PBtmpl0000000000000132','Empty','','empty',1124395696,1258524916,'3','7','12','WebGUI::Asset::Template',0,'Empty Empty empty style','000001000001000041000004',NULL),('PBtmpl0000000000000140','Default Shortcut','','pbtmpl0000000000000140',1124395696,1129573244,'3','7','12','WebGUI::Asset::Template',0,'Default Shortcut Default Shortcut pbtmpl0000000000000140 Shortcut','000001000001000037000001',NULL),('hkj6WeChxFyqfP85UlRP8w','matrix.css','','new-matrix/matrix.css',1232664229,1281501163,'3','7','12','WebGUI::Asset::Snippet',0,'matrix.css matrix.css new matrix matrix.css wg-clear display inline clear both font-size:0px line-height:0px COLUMN STYLES matrixLeft float:left width:65 padding:1 min-height:1 background-color:#d2d2d2 moz-border-radius:4px webkit-border-radius 4px matrixRight float:left width:25 padding:0px min-height:1 moz-border-radius:4px webkit-border-radius 4px border solid silver 1px background-color:white margin-left:5px DROPSHADOW BUTTONS matrixLeft buttons span background-color:#888 position:relative padding:5px 0px 0px 0px moz-border-radius:4px webkit-border-radius 4px matrixLeft buttons button matrixLeft buttons a#return border:solid 2f495e 2px position:relative background-color:#e1e1e1 padding:auto 3px margin:0px font-size:11px line-height:13px position:relative top:-6px left:-2px height:22px cursor:pointer moz-border-radius:4px webkit-border-radius 4px font-weight:bold text-decoration:none color:#333 matrixLeft buttons a#return font-size:10px padding:3px 10px 2px 10px matrixLeft buttons button:hover matrixLeft buttons a#return:hover border-color:black color:white background-color:#444 WHITE AREA FOR THE LISTING OF OBJECTS TO COMPARE matrixLeft matrixListing background-color:white height:300px min-height:300px moz-border-radius:4px webkit-border-radius 4px margin:10px 2px 20px 2px padding:auto 10px matrixLeft matrixListing table border-collapse:collapse margin:0px padding:0px display:block matrixLeft matrixListing table a:link font-size:12px color:#111 matrixLeft matrixListing table a:visited color:#333 font-size:12px text-decoration:none matrixLeft matrixListing table a:hover text-decoration:none GRAY BAR THAT HOLDS THE SORT BUTTONS matrixLeft matrixListing sortButtons background-color:#f1f1f1 border:solid silver 1px moz-border-radius-topLeft:4px moz-border-radius-topRight:4px webkit-border-radius-topLeft 4px webkit-border-radius-topRight 4px border-bottom:solid D2D2D2 2px display:block STYLES TO OVERRIDE THE SORT BUTTON CSS BUILT INTO THE PERL CODE sortByViews-button sortByCompares-button sortByUpdated-button sortByClicks-button sortByName-button background none white-space:nowrap border-style:none cursor:pointer padding-bottom:4px border-style:none background-color:transparent border-right:solid silver 1px color:#555 sortByViews-button:hover sortByCompares-button:hover sortByUpdated-button:hover sortByClicks-button:hover sortByName-button:hover color:black MATRIX STATISTICS matrixRight mainTitle font-size:20px padding:5px 10px border-bottom solid gray 1px background-color:#d2d2d2 matrixRight textBox border-top:solid silver 1px padding:10px 5px matrixStatistics padding:10px matrixStatistics title font-weight:bold background-color:#f1f1f1 padding:2px 5px font-size:11px moz-border-radius:4px border:solid d2d2d2 1px matrixStatistics statistics margin-bottom:15px matrixStatistics label text-align:right width:100px font-size:10px matrixStatistics data font-size:10px matrixStatistics data a color:#111 matrixStatistics data a:hover text-decoration:none LINKS TO CONTROL ADMIN FUNCTIONS adminLinks background-color:#f1f1f1 adminLinks a:link adminLinks a:visited display:block text-align:center text-decoration:none color:#555 font-weight:normal font-size:10px padding:2px 5px border-top:solid silver 1px adminLinks a:hover color:black adminLinks a.newLink:link adminLinks a.newLink:visited background-color:#3498d1 color:white display:block adminLinks a.newLink:hover background-color:#39a6e5 STYLE FOR THE DETAILED LISTING matrixDetail min-width:1000px matrixDetail editBtns font-size:9px line-height:11px vertical-align:middle font-weight:normal margin-left:10px matrixDetail editBtns a color:black text-decoration:underline matrixDetail editBtns a:hover text-decoration:none matrixDetail stats screenshot float:left margin-right:20px matrixDetail commentsMail strong.title margin-bottom:0px margin-top:20px display:block background-color:#d2d2d2 padding:2px 10px border:solid 1px gray border-bottom-color:silver moz-border-radius-topLeft:4px moz-border-radius-topRight:4px matrixDetail assetAspectComments margin:0px 0px 20px 0px border:solid gray 1px background-color:#f1f1f1 moz-border-radius-bottomLeft:4px moz-border-radius-bottomRight:4px matrixDetail assetAspectComments assetAspectComment border-top:solid silver 1px border-bottom:solid gray 1px padding:3px background-color:#f5f5f5 matrixDetail assetAspectComments assetAspectCommentForm border-top:solid d2d2d2 5px padding:20px matrixDetail stats ul matrixDetail stats ul li list-style-type:none margin:0px padding:0px matrixDetail stats ul li display:block line-height:20px margin:4px 0px matrixDetail stats ul li strong display:block float:left width:130px text-align:right background-color:#f1f1f1 padding-right:5px margin-right:5px moz-border-radius:4px webkit-border-radius:3px font-size:11px border:solid d2d2d2 1px showLink background-color:#e1e1e1 border:2px solid 2F495E moz-border-radius:4px webkit-border-radius:4px padding:3px 10px text-decoration:none color:black showLink:hover hideLink:hover background-color:#555 color:white hideLink background-color:#f1f1f1 border:2px solid 2F495E border-bottom-style:none moz-border-radius-topLeft:4px moz-border-radius-topRight:4px webkit-border-radius-topLeft:4px webkit-border-radius-topRight:4px padding:3px 10px text-decoration:none color:black matrixMail background-color:#f1f1f1 padding:15px border:2px solid 2F495E moz-border-radius:4px moz-border-radius-topLeft:0px webkit-border-radius:4px webkit-border-radius-topLeft:0px margin-top:1px matrixMail tableData padding:5px margin:0px matrixMail input padding:0px margin:0px matrixMail formDescription text-align:right vertical-align:middle padding-right:10px font-weight:bold matrixMail form img margin-top:-18px matrixMail verify_formId height:45px line-height:45px font-size:35px padding:0px margin:0px margin-right:20px matrixRatings width:264px position:relative left:-2px top:12px matrixRatings table margin-left:0px matrixRatings td overflow:hidden matrixRatings formDescription text-align:right background-color:#97BCD1 border:solid 4D606B 1px padding:2px 5px font-weight:bold font-size:10x moz-border-radius:4px webkit-border-radius:4px color:#333 matrixRatings formDescription a:before text-decoration:none matrixRatings formDescription a display:block color:red text-decoration:none matrixRatings formDescription a:hover text-decoration:underline matrixAttributes float:left width:40 min-width:20 max-width:45 margin-right:20px rightDetails float:left width:20 min-width:20 max-width:45 attributes border:solid d2d2d2 1px background-color:#f1f1f1 margin-top:10px moz-border-radius:4px webkit-border-radius:4px padding:10px attributes table border-collapse:collapse padding:0px margin:0px attributes table td padding:2px margin:0px yui-dt0-col-value font-weight:bold font-size:14px padding:3px white-space:no-wrap COMPARISON STYLES compareList table border-collapse:collapse border:solid silver 1px margin-top:5px compareList table th a color:black padding:1px 5px compareList table td background-color:#f1f1f1 border-top:solid gray 1px border-bottom:solid silver 1px compareList yui-dt-liner color:#39A6E5 compareList yui-dt-col-name yui-dt-liner font-style:italic font-size:10px color:#555 compareList yui-dt-col-name yui-dt-liner b font-size:15px font-style:normal padding-right:25px color:black ','000001000001000022000006',NULL),('ZipArchiveTMPL00000001','Default Zip Archive Template','','zip-archive-template',1133743240,1169738426,'3','7','12','WebGUI::Asset::Template',0,'Default Zip Archive Template Default Zip Archive Template zip archive template ZipArchiveAsset','000001000001000053000001',NULL),('PBasset000000000000002','Import Node','','root/import',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Import Node Import root import','000001000001',NULL),('_iHetEvMQUOoxS-T2CM0sQ','Getting Started','','getting_started',1124395696,1273172789,'3','7','3','WebGUI::Asset::Wobject::Layout',1,'Getting Started Getting Started getting started','000001000002000001',NULL),('x3OFY6OJh_qsXkZfPwug4A','Site Map','','site_map',1124395696,1271348790,'3','7','3','WebGUI::Asset::Wobject::Layout',1,'Site Map Site Map site map','000001000002000005',NULL),('PBnav00000000000000001','crumbTrail','','crumbtrail',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'crumbTrail crumbTrail crumbtrail','000001000001000025000008',NULL),('PBnav00000000000000002','SpecificSubMenuVertical','','specificsubmenuvertical',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'SpecificSubMenuVertical SpecificSubMenuVertical specificsubmenuvertical','000001000001000025000017',NULL),('PBnav00000000000000006','SpecificSubMenuHorizontal','','specificsubmenuhorizontal',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'SpecificSubMenuHorizontal SpecificSubMenuHorizontal specificsubmenuhorizontal','000001000001000025000018',NULL),('PBnav00000000000000007','TopLevelMenuVertical','','toplevelmenuvertical',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'TopLevelMenuVertical TopLevelMenuVertical toplevelmenuvertical','000001000001000025000019',NULL),('PBnav00000000000000008','TopLevelMenuHorizontal','','toplevelmenuhorizontal',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'TopLevelMenuHorizontal TopLevelMenuHorizontal toplevelmenuhorizontal','000001000001000025000020',NULL),('PBnav00000000000000009','RootTab','','roottab',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'RootTab RootTab roottab','000001000001000025000021',NULL),('PBnav00000000000000010','TopDropMenu','','topdropmenu',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'TopDropMenu TopDropMenu topdropmenu','000001000001000025000022',NULL),('PBnav00000000000000011','dtree','','dtree',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'dtree dtree dtree','000001000001000025000023',NULL),('PBnav00000000000000012','coolmenu','','coolmenu',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'coolmenu coolmenu coolmenu','000001000001000025000024',NULL),('PBnav00000000000000013','Synopsis','','synopsis',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'Synopsis Synopsis synopsis','000001000001000025000025',NULL),('PBnav00000000000000014','FlexMenu','','flexmenu',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'FlexMenu FlexMenu flexmenu','000001000001000025000009',NULL),('PBnav00000000000000015','currentMenuVertical','','currentmenuvertical',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'currentMenuVertical currentMenuVertical currentmenuvertical','000001000001000025000010',NULL),('PBnav00000000000000016','currentMenuHorizontal','','currentmenuhorizontal',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'currentMenuHorizontal currentMenuHorizontal currentmenuhorizontal','000001000001000025000011',NULL),('PBnav00000000000000017','PreviousDropMenu','','previousdropmenu',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'PreviousDropMenu PreviousDropMenu previousdropmenu','000001000001000025000012',NULL),('PBnav00000000000000018','previousMenuVertical','','previousmenuvertical',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'previousMenuVertical previousMenuVertical previousmenuvertical','000001000001000025000013',NULL),('PBnav00000000000000019','previousMenuHorizontal','','previousmenuhorizontal',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'previousMenuHorizontal previousMenuHorizontal previousmenuhorizontal','000001000001000025000014',NULL),('PBnav00000000000000020','rootmenu','','rootmenu',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'rootmenu rootmenu rootmenu','000001000001000025000015',NULL),('PBnav00000000000000021','SpecificDropMenu','','specificdropmenu',1124395696,1124395696,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'SpecificDropMenu SpecificDropMenu specificdropmenu','000001000001000025000016',NULL),('pJd5TLAjfWMVXD6sCRLwUg','Site Map','','site_map/site_map',1124395696,1271348790,'3','7','3','WebGUI::Asset::Wobject::Navigation',1,'Site Map Site Map site map site map','000001000002000005000001',NULL),('fK-HMSboA3uu0c1KYkYspA','The Latest News','This is the latest news from Plain Black and WebGUI pulled directly from the site every hour.','the_latest_news/the_latest_news',1124395696,1124395696,'3','7','3','WebGUI::Asset::Wobject::SyndicatedContent',1,'The Latest News The Latest News the latest news the latest news This is the latest news from Plain Black and WebGUI pulled directly from the site every hour','000001000002000004000001',NULL),('WikiFrontTmpl000000001','Default Wiki Front Page','','default-wiki-front-page',1165460175,1273032720,'3','7','12','WebGUI::Asset::Template',0,'Default Wiki Front Page Default Wiki Front Page default wiki front page WikiMaster_front','000001000001000052000002',NULL),('WikiSearchTmpl00000001','Default Wiki Search','','default-wiki-search',1165460175,1273032720,'3','7','12','WebGUI::Asset::Template',0,'Default Wiki Search Default Wiki Search default wiki search WikiMaster_search','000001000001000052000003',NULL),('WikiPHTmpl000000000001','Default Page History','','default-wiki-page-history',1165460175,1273032720,'3','7','12','WebGUI::Asset::Template',0,'Default Page History Default Page History default wiki page history WikiPage_pageHistory','000001000001000052000004',NULL),('WikiPageTmpl0000000001','Default Wiki Page','','default-wiki-page',1165460175,1273032720,'3','7','12','WebGUI::Asset::Template',0,'Default Wiki Page Default Wiki Page default wiki page WikiPage','000001000001000052000005',NULL),('WikiPageEditTmpl000001','Default Wiki Page Edit','','default-wiki-page-edit',1165460175,1273032720,'3','7','12','WebGUI::Asset::Template',0,'Default Wiki Page Edit Default Wiki Page Edit default wiki page edit WikiPage_edit','000001000001000052000006',NULL),('WikiMPTmpl000000000001','Default Most Popular','','default-wiki-most-popular',1165460175,1273032720,'3','7','12','WebGUI::Asset::Template',0,'Default Most Popular Default Most Popular default wiki most popular WikiMaster_mostPopular','000001000001000052000007',NULL),('SQLReportDownload00001','SQLReport Download Default Template','','SQLReportDownload0001',1171466654,1171466654,'3','7','12','WebGUI::Asset::Template',0,'SQLReport Download Default Template untitled SQLReportDownload0001 SQLReport/Download','000001000001000038000002',NULL),('newsletter000000000001',' Summary Newsletter (default)','','newsletterdefaulttemplate',1185754569,1185754569,'3','7','3','WebGUI::Asset::Template',0,'Summary Newsletter default Summary Newsletter newsletterdefaulttemplate newsletter','000001000001000026000001',NULL),('newslettersubscrip0001','My Subscriptions (default)','','newslettermysubscriptionstemplate',1185754569,1221692339,'3','7','3','WebGUI::Asset::Template',0,'My Subscriptions default My Subscriptions newslettermysubscriptionstemplate newsletter/mysubscriptions','000001000001000026000003',NULL),('AjhlNO3wZvN5k4i4qioWcg','Default Answer Edit','','root/import/survey/default-answer-edit',1226009658,1250243000,'3','7','12','WebGUI::Asset::Template',0,'Default Answer Edit Default Answer Edit root import survey default answer edit Survey/Edit','000001000001000042000009',NULL),('QHn6T9rU7KsnS3Y70KCNTg','Account','','root/import/account',1227080251,1233173545,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Account Account root import account','000001000001000002',NULL),('HPDOcsj4gBme8D4svHodBw','Profile','','root/import/account/profile',1225404573,1225404573,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Profile Profile root import account profile','000001000001000002000001',NULL),('WikiKeyword00000000001',' Wiki Pages By Keyword (default)','','wiki-master-by-keyword-template.tmpl',1185754571,1274238756,'3','7','3','WebGUI::Asset::Template',0,'Wiki Pages By Keyword default Wiki Pages By Keyword wiki master by keyword template.tmpl WikiMaster_byKeyword','000001000001000052000008',NULL),('tempspace0000000000000','Tempspace','','tempspace',1185754574,1185754574,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'Tempspace Tempspace tempspace','000001000004',NULL),('QpmlAiYZz6VsKBM-_0wXaw','UsersOnline Macro',' ','users-online-macro-templates',1224616691,1224616691,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'UsersOnline Macro UsersOnline Macro users online macro templates','000001000001000021000012',NULL),('h_T2xtOxGRQ9QJOR6ebLpQ','UsersOnline Default View','','users-online-macro-templates/usersonline-default-view',1224616545,1224616545,'3','7','3','WebGUI::Asset::Template',0,'UsersOnline Default View UsersOnline Default View users online macro templates usersonline default view Macro/UsersOnline','000001000001000021000012000001',NULL),('4Ekp0kJoJllRRRo_J1Rj6w','UsersOnline Detailed View','','users-online-macro-templates/usersonline-detailed-view',1224616672,1224616672,'3','7','3','WebGUI::Asset::Template',0,'UsersOnline Detailed View UsersOnline Detailed View users online macro templates usersonline detailed view Macro/UsersOnline','000001000001000021000012000002',NULL),('THQhn1C-ooj-TLlEP7aIJQ','gallery-ie.css','','root/import/gallery-templates/gallery-ie.css',1225313951,1285124158,'3','7','3','WebGUI::Asset::Snippet',0,'gallery-ie.css gallery-ie.css root import gallery templates gallery ie.css wgPicture float:left wgAlbum float:left wgGallery pagination li wgGallery pagination a float:left wgGallery container display:inline-block ','000001000001000015000025',NULL),('itransact_credentials1','ITransact Credentials (Default)','','shopping-cart-collateral-items/itransact-credentials',1228953856,1326776037,'3','7','4','WebGUI::Asset::Template',0,'ITransact Credentials Default ITransact Credentials Default shopping cart collateral items itransact credentials Shop/Credentials','000001000001000036000018',NULL),('1oBRscNIcFOI-pETrCOspA','Default Section Edit','','root/import/survey/default-section-edit',1226009642,1250243000,'3','7','12','WebGUI::Asset::Template',0,'Default Section Edit Default Section Edit root import survey default section edit Survey/Edit','000001000001000042000007',NULL),('gI_TxK-5S4DNuv42wpImmw','Gallery Templates',' ','root/import/gallery-templates',1197330678,1285124155,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'Gallery Templates Gallery Templates root import gallery templates','000001000001000015',NULL),('jME5BEDYVDlBZ8jIQA9-jQ','Default Gallery Search','','root/import/gallery-templates/default-gallery-search',1197927169,1285124155,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery Search Default Gallery Search root import gallery templates default gallery search Gallery/Search','000001000001000015000001',NULL),('azCqD0IjdQSlM3ar29k5Sg','Default Gallery List Albums View','','root/import/gallery-templates/default-gallery-list-albums-view',1197881748,1285124155,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery List Albums View Default Gallery List Albums View root import gallery templates default gallery list albums view Gallery/ListAlbums','000001000001000015000002',NULL),('05FpjceLYhq4csF1Kww1KQ','Default Gallery View Album','','root/import/gallery-templates/default-gallery-view-album',1197879361,1285124155,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery View Album Default Gallery View Album root import gallery templates default gallery view album GalleryAlbum/View','000001000001000015000003',NULL),('KAMdiUdJykjN02CPHpyZOw','Default Gallery View Album Slideshow','','root/import/gallery-templates/default-gallery-view-album-slideshow',1197825787,1285124155,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery View Album Slideshow Default Gallery View Album Slideshow root import gallery templates default gallery view album slideshow GalleryAlbum/ViewSlideshow','000001000001000015000005',NULL),('OkphOEdaSGTXnFGhK4GT5A','Default Gallery List Files For User','','root/import/gallery-templates/default-gallery-list-files-for-user',1197825794,1285124155,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery List Files For User Default Gallery List Files For User root import gallery templates default gallery list files for user Gallery/ListFilesForUser','000001000001000015000006',NULL),('TEId5V-jEvUULsZA0wuRuA','Default Gallery View Photo','','root/import/gallery-templates/default-gallery-view-photo',1197989443,1285124155,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery View Photo Default Gallery View Photo root import gallery templates default gallery view photo GalleryFile/View','000001000001000015000007',NULL),('6X-7Twabn5KKO_AbgK3PEw','Default Gallery Edit Album','','root/import/gallery-templates/default-gallery-edit-album',1197987780,1285124155,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery Edit Album Default Gallery Edit Album root import gallery templates default gallery edit album GalleryAlbum/Edit','000001000001000015000008',NULL),('7JCTAiu1U_bT9ldr655Blw','Default Gallery Edit Photo','','root/import/gallery-templates/default-gallery-edit-photo',1197825824,1285124155,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery Edit Photo Default Gallery Edit Photo root import gallery templates default gallery edit photo GalleryFile/Edit','000001000001000015000009',NULL),('0X4Q3tBWUb_thsVbsYz9xQ','Default Gallery Add Archive','','root/import/gallery-templates/default-gallery-add-archive',1197987372,1285124155,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery Add Archive Default Gallery Add Archive root import gallery templates default gallery add archive GalleryAlbum/AddArchive','000001000001000015000010',NULL),('m3IbBavqzuKDd2PGGhKPlA','Default Gallery Make Shortcut','','root/import/gallery-templates/default-gallery-make-shortcut',1197825845,1285124155,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery Make Shortcut Default Gallery Make Shortcut root import gallery templates default gallery make shortcut GalleryFile/MakeShortcut','000001000001000015000011',NULL),('UTNFeV7B_aSCRmmaFCq4Vw','Default Gallery Delete Album','','root/import/gallery-templates/default-gallery-delete-album',1197825856,1285124155,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery Delete Album Default Gallery Delete Album root import gallery templates default gallery delete album GalleryAlbum/Delete','000001000001000015000012',NULL),('zcX-wIUct0S_np14xxOA-A','Default Gallery Delete File','','root/import/gallery-templates/default-gallery-delete-file',1197825866,1285124155,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery Delete File Default Gallery Delete File root import gallery templates default gallery delete file GalleryFile/Delete','000001000001000015000013',NULL),('MBZK_LPVzqhb4TV4mMRTJg','admin_ie7.css','','root/import/gallery-templates/admin_ie7.css',1197330678,1285124155,'3','7','3','WebGUI::Asset::Snippet',0,'admin_ie7.css admin_ie7.css root import gallery templates admin ie7.css input.captionEnter margin-left 5px width 92px ','000001000001000015000014',NULL),('bANo8aiAPA7aY_oQZKxIWw','rss.gif','','root/import/gallery-templates/images/rss.gif',1197330678,1285124155,'3','7','3','WebGUI::Asset::File::Image',1,'rss.gif rss.gif root import gallery templates images rss.gif','000001000001000015000017000001',NULL),('2ci_v2d4x4uvyjTRlC49OA','moveDown.gif','','root/import/gallery-templates/images/movedown.gif',1197330678,1285124156,'3','7','3','WebGUI::Asset::File::Image',1,'moveDown.gif moveDown.gif root import gallery templates images movedown.gif','000001000001000015000017000002',NULL),('O-EsSzKgAk1KolFT-x_KsA','moveUp.gif','','root/import/gallery-templates/images/moveup.gif',1197330678,1285124156,'3','7','3','WebGUI::Asset::File::Image',1,'moveUp.gif moveUp.gif root import gallery templates images moveup.gif','000001000001000015000017000003',NULL),('fdd8tGExyVwHyrB8RBbKXg','next.gif','','root/import/gallery-templates/images/next.gif',1197330839,1285124156,'3','7','3','WebGUI::Asset::File::Image',1,'next.gif next.gif root import gallery templates images next.gif','000001000001000015000017000004',NULL),('BpisgHl4ZDcSECJp6oib1w','play.gif','','root/import/gallery-templates/images/play.gif',1197330840,1285124156,'3','7','3','WebGUI::Asset::File::Image',1,'play.gif play.gif root import gallery templates images play.gif','000001000001000015000017000005',NULL),('zshreRgPAXtnF0DtVbQ1Yg','previous.gif','','root/import/gallery-templates/images/previous.gif',1197330840,1285124156,'3','7','3','WebGUI::Asset::File::Image',1,'previous.gif previous.gif root import gallery templates images previous.gif','000001000001000015000017000006',NULL),('mM3bjP_iG9sv5nQb4S17tQ','Default Gallery View Album RSS','','root/import/gallery-templates/default-gallery-album-rss',1197879662,1285124158,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery View Album RSS Default Gallery View Album RSS root import gallery templates default gallery album rss GalleryAlbum/ViewRss','000001000001000015000018',NULL),('ilu5BrM-VGaOsec9Lm7M6Q','Default Gallery List Albums RSS','','root/import/gallery-templates/default-gallery-list-albums-rss',1197878780,1285124158,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery List Albums RSS Default Gallery List Albums RSS root import gallery templates default gallery list albums rss Gallery/ListAlbumsRss','000001000001000015000019',NULL),('-ANLpoTEP-n4POAdRxCzRw','Default Gallery List Files For User RSS','','root/import/gallery-templates/default-gallery-list-files-for-user-rss',1197880641,1285124158,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery List Files For User RSS Default Gallery List Files For User RSS root import gallery templates default gallery list files for user rss Gallery/ListFilesForUserRss','000001000001000015000020',NULL),('OxJWQgnGsgyGohP2L3zJPQ','Default Gallery Edit Comment','','root/import/gallery-templates/default-gallery-edit-comment',1204663962,1285124158,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery Edit Comment Default Gallery Edit Comment root import gallery templates default gallery edit comment GalleryFile/EditComment','000001000001000015000021',NULL),('Tsg7xmPYv782j6IVz7yHFg','Calendar Templates','','root/import/calendar-templates',1204890713,1213244777,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Calendar Templates Calendar Templates root import calendar templates','000001000001000006',NULL),('kj3b-X3i6zRKnhLb4ZiCLw','Default Calendar List View','','root/import/calendar-templates/default-calendar-list-view',1204890713,1295931508,'3','7','3','WebGUI::Asset::Template',0,'Default Calendar List View Default Calendar List View root import calendar templates default calendar list view Calendar/List','000001000001000006000001',NULL),('uRL9qtk7Rb0YRJ41LmHOJw','Default Calendar Print List View','','root/import/calendar-templates/default-calendar-print-list-view',1204890713,1229311072,'3','7','3','WebGUI::Asset::Template',0,'Default Calendar Print List View Default Calendar Print List View root import calendar templates default calendar print list view Calendar/Print/List','000001000001000006000002',NULL),('CalendarWeek0000000001','Default Calendar Week','','root/import/calendar-templates/default-calendar-week',1204890713,1230358389,'3','7','12','WebGUI::Asset::Template',0,'Default Calendar Week Default Calendar Week root import calendar templates default calendar week Calendar/Week','000001000001000006000003',NULL),('CalendarDay00000000001','Default Calendar Day','','root/import/calendar-templates/default-calendar-day',1204890713,1230358389,'3','7','12','WebGUI::Asset::Template',0,'Default Calendar Day Default Calendar Day root import calendar templates default calendar day Calendar/Day','000001000001000006000004',NULL),('CalendarEvent000000001','Default Calendar Event','','root/import/calendar-templates/default-calendar-event',1204890713,1295931508,'3','7','12','WebGUI::Asset::Template',0,'Default Calendar Event Default Calendar Event root import calendar templates default calendar event Calendar/Event','000001000001000006000005',NULL),('CalendarEventEdit00001','Default Calendar Event Edit','','root/import/calendar-templates/default-calendar-event-edit',1205160982,1269401468,'3','7','12','WebGUI::Asset::Template',0,'Default Calendar Event Edit Default Calendar Event Edit root import calendar templates default calendar event edit Calendar/EventEdit','000001000001000006000006',NULL),('CalendarSearch00000001','Default Calendar Search','','root/import/calendar-templates/default-calendar-search',1204890713,1326776038,'3','7','12','WebGUI::Asset::Template',0,'Default Calendar Search Default Calendar Search root import calendar templates default calendar search Calendar/Search','000001000001000006000008',NULL),('CalendarPrintEvent0001','Default Calendar Print Event','','root/import/calendar-templates/default-calendar-print-event',1204890714,1215396964,'3','7','12','WebGUI::Asset::Template',0,'Default Calendar Print Event Default Calendar Print Event root import calendar templates default calendar print event Calendar/Print/Event','000001000001000006000009',NULL),('CalendarPrintMonth0001','Default Calendar Print Month','','root/import/calendar-templates/default-calendar-print-month',1204890714,1204890714,'3','7','12','WebGUI::Asset::Template',0,'Default Calendar Print Month Default Calendar Print Month root import calendar templates default calendar print month Calendar/Print/Month','000001000001000006000010',NULL),('CalendarPrintWeek00001','Default Calendar Print Week','','root/import/calendar-templates/default-calendar-print-week',1204890714,1204890714,'3','7','12','WebGUI::Asset::Template',0,'Default Calendar Print Week Default Calendar Print Week root import calendar templates default calendar print week Calendar/Print/Week','000001000001000006000011',NULL),('CalendarPrintDay000001','Default Calendar Print Day','','root/import/calendar-templates/default-calendar-print-day',1204890714,1204890714,'3','7','12','WebGUI::Asset::Template',0,'Default Calendar Print Day Default Calendar Print Day root import calendar templates default calendar print day Calendar/Print/Day','000001000001000006000012',NULL),('jnYdqDkUR8x7Pv2eGR1qTA','Thingy Templates','','root/import/thingy-templates',1205431513,1216250666,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Thingy Templates Thingy Templates root import thingy templates','000001000001000044',NULL),('ThingyTmpl000000000001','Default Thingy','','templates/thingy-default',1205003608,1237914005,'3','7','12','WebGUI::Asset::Template',0,'Default Thingy Default Thingy templates thingy default Thingy','000001000001000044000001',NULL),('ThingyTmpl000000000002','Default Thingy View Thing','','templates/thingy-default-view-thing',1205003676,1299559129,'3','7','12','WebGUI::Asset::Template',0,'Default Thingy View Thing Default Thingy View Thing templates thingy default view thing Thingy/ViewThing','000001000001000044000002',NULL),('ThingyTmpl000000000003','Default Thingy Edit Thing','','templates/thingy-default-edit-thing',1205003711,1224518002,'3','7','12','WebGUI::Asset::Template',0,'Default Thingy Edit Thing Default Thingy Edit Thing templates thingy default edit thing Thingy/EditThing','000001000001000044000003',NULL),('ThingyTmpl000000000004','Default Thingy Search Thing','','templates/thingy-default-search-thing',1205158717,1277868920,'3','7','12','WebGUI::Asset::Template',0,'Default Thingy Search Thing Default Thingy Search Thing templates thingy default search thing Thingy/SearchThing','000001000001000044000004',NULL),('7fE8md51vTCcuJFOvxNaGA','thumbnails.js','','root/import/gallery-templates/thumbnails.js',1205443600,1285124158,'3','7','3','WebGUI::Asset::Snippet',0,'thumbnails.js thumbnails.js root import gallery templates thumbnails.js Depends on BrowserDetect.js Make the thumbnails a little bigger while the mouse is over them function scaleThumbUp e anchor IE6 doesn\'t like to do the right thing with the CSS stuff below exclude it if BrowserDetect if BrowserDetect.browser == Explorer BrowserDetect.version < 7 return Make a new image with the same image src as the anchor var oldImage = anchor.getElementsByTagName(\"img\")[0 var newContainer = document.createElement(\"div newContainer.className = thumb-popup newContainer.style.position = absolute newContainer.style.zIndex = 1 var newWidth = oldImage.offsetWidth 3 var newHeight = oldImage.offsetHeight 3 var newLeft = anchor.offsetLeft + anchor.offsetWidth 2 newWidth 2 var newTop = anchor.offsetTop + anchor.offsetHeight 2 newHeight 2 newContainer.style.left = newLeft + px newContainer.style.top = newTop + px newContainer.style.width = newWidth + px newContainer.style.height = newHeight + px var newImage = document.createElement(\"img newImage.src = oldImage.src newImage.style.width = 100 newImage.style.height = 100 newContainer.appendChild newImage Make some text for the caption var caption = document.createElement(\"div caption.appendChild document.createTextNode anchor.title caption.className = caption newContainer.appendChild caption var newBox = document.createElement(\"a newBox.href = anchor.href newBox.style.display = block newBox.style.position = absolute newBox.style.zIndex = 10 newBox.style.left = anchor.offsetLeft + px newBox.style.top = anchor.offsetTop + px newBox.style.height = anchor.offsetHeight + px newBox.style.width = anchor.offsetWidth + px newBox.style.border = 1px solid transparent anchor.parentNode.appendChild newContainer anchor.parentNode.appendChild newBox YAHOO.util.Event.addListener newBox click function window.location.href = anchor.href YAHOO.util.Event.addListener newContainer mouseout scaleThumbDown newBox newContainer caption YAHOO.util.Event.addListener newBox mouseout scaleThumbDown newBox newContainer caption function scaleThumbDown e elements for var i = 0 i < elements.length i++ elements[i].parentNode.removeChild elements[i var anchorTimeout function enterAnchor e anchor if typeof anchorTimeout = undefined clearTimeout anchorTimeout anchorTimeout = setTimeout function scaleThumbUp e anchor 150 function leaveAnchor e anchor if typeof anchorTimeout = undefined clearTimeout anchorTimeout function initThumb var anchors = YAHOO.util.Dom.getElementsByClassName thumb for var i = 0 i < anchors.length i++ YAHOO.util.Event.addListener anchors[i mouseover enterAnchor anchors[i YAHOO.util.Event.addListener anchors[i mouseout leaveAnchor anchors[i YAHOO.util.Event.onDOMReady initThumb ','000001000001000015000022',NULL),('1oGhfj00KkCzP1ez01AfKA','slideshow.js','','root/import/gallery-templates/slideshow.js',1205635970,1285124158,'3','7','3','WebGUI::Asset::Snippet',0,'slideshow.js slideshow.js root import gallery templates slideshow.js if typeof WebGUI == undefined WebGUI = WebGUI.Slideshow config Configure and return a new Slideshow object config is an object with the following properties containerId The ID of the element that contains the Slideshow items Defaults to slideshow-container currentIndex The index of the first item in the Slideshow Defaults to 0 isPlaying If true the slideshow will begin immediately itemClassName The class name of the slideshow items Defaults to slideshow-item nextButtonId The id of the button to go to the next item pauseImageSrc The URL to the pause button image playDelay The delay in milliseconds between slides Defaults to 5000 playImageSrc The URL to the play button image playPauseButtonId The id of the button to toggle between play and pause previousButtonId The id of the button to go to the previous item wrap If true the slideshow will wrap around Control the slideshow To control the slideshow you can use the following methods next Pause the slideshow and go to the next slide previous Pause the slideshow and go to the previous slide play Play the slideshow pause Pause the slideshow togglePlay If it\'s playing pause it If it\'s paused play it WebGUI.Slideshow = function config this.containerId = config config.containerId config.containerId slideshow-container this.currentIndex = config config.currentIndex config.currentIndex 0 this.isPlaying = config config.isPlaying config.isPlaying false this.itemClassName = config config.itemClassName config.itemClassName slideshow-item this.nextButtonId = config config.nextButtonId undefined this.pauseImageSrc = config config.pauseImageSrc undefined this.playDelay = config config.playDelay config.playDelay 5000 this.playImageSrc = config config.playImageSrc undefined this.playPauseButtonId = config config.playPauseButtonId undefined this.previousButtonId = config config.previousButtonId undefined this.wrap = config config.wrap config.wrap false YAHOO.util.Event.onDOMReady this.init this true clearPlayTimeout Clears the timeout to move to the next slide WebGUI.Slideshow.prototype.clearPlayTimeout = function clearTimeout this.playTimeout this.playTimeout = undefined doPlayTick self Performs the action to move to the next slide and start a new timeout self is a new reference to the object to get around the scoping issues with setTimeout WebGUI.Slideshow.prototype.doPlayTick = function self self.showNext self.setPlayTimeout getSlideshowContainer Returns the HTMLElement for the Slideshow container WebGUI.Slideshow.prototype.getSlideshowContainer = function return document.getElementById this.containerId getSlideshowItems Returns an array of HTMLElements for the Slideshow\'s items WebGUI.Slideshow.prototype.getSlideshowItems = function var items = YAHOO.util.Dom.getElementsByClassName this.itemClassName undefined this.getSlideshowContainer return items init Initialize the slideshow Performed after the DOM is ready WebGUI.Slideshow.prototype.init = function Add handlers to buttons if this.playPauseButtonId YAHOO.util.Event.addListener this.playPauseButtonId click this.togglePlay this true if this.nextButtonId YAHOO.util.Event.addListener this.nextButtonId click this.next this true if this.previousButtonId YAHOO.util.Event.addListener this.previousButtonId click this.previous this true Hide all but the currentIndex var items = this.getSlideshowItems for var i = 0 i < items.length i++ if i = this.currentIndex items i style.display = none else items i style.display = block Start it off if necessary if this.isPlaying this.setPlayTimeout this.updatePlayPauseButton next Pause the slideshow and go to the next slide WebGUI.Slideshow.prototype.next = function this.pause this.showNext play Start the slideshow WebGUI.Slideshow.prototype.play = function if this.isPlaying this.isPlaying = true this.setPlayTimeout this.updatePlayPauseButton previous Pause the slideshow and show the previous slide WebGUI.Slideshow.prototype.previous = function this.pause this.showPrevious pause Pause the slideshow WebGUI.Slideshow.prototype.pause = function if this.isPlaying this.isPlaying = false this.clearPlayTimeout this.updatePlayPauseButton setPlayTimeout Sets the timeout to move to the next slide WebGUI.Slideshow.prototype.setPlayTimeout = function var self = this this.playTimeout = setTimeout function self.doPlayTick(self this.playDelay showNext Show the next slide WebGUI.Slideshow.prototype.showNext = function var items = this.getSlideshowItems var hideIndex = this.currentIndex var showIndex = this.currentIndex + 1 Wrap around if this.wrap showIndex >= items.length showIndex = 0 Don\'t allow going past the last item else if showIndex >= items.length return Do the switch if items hideIndex items hideIndex style.display = none if items showIndex items showIndex style.display = block this.currentIndex = showIndex showPrevious Show the previous slide WebGUI.Slideshow.prototype.showPrevious = function var items = this.getSlideshowItems var hideIndex = this.currentIndex var showIndex = this.currentIndex 1 Wrap around if this.wrap showIndex < 0 showIndex = items.length 1 Don\'t allow going past the last item else if showIndex < 0 return Do the switch items hideIndex style.display = none items showIndex style.display = block this.currentIndex = showIndex togglePlay If it\'s paused play it If it\'s playing pause it Return true if the slideshow is now playing WebGUI.Slideshow.prototype.togglePlay = function if this.isPlaying == false this.play return true else this.pause updatePlayPauseButton Update the Play/Pause button to have the correct image WebGUI.Slideshow.prototype.updatePlayPauseButton = function if this.playPauseButtonId if this.isPlaying this.playImageSrc document.getElementById this.playPauseButtonId src = this.pauseImageSrc else if this.pauseImageSrc document.getElementById this.playPauseButtonId src = this.playImageSrc ','000001000001000015000023',NULL),('3qiVYhNTXMVC5hfsumVHgg','browserdetect.js','','root/import/gallery-templates/browserdetect.js',1206743306,1285124158,'3','7','3','WebGUI::Asset::Snippet',0,'browserdetect.js browserdetect.js root import gallery templates browserdetect.js var BrowserDetect = init function this.browser = this.searchString(this.dataBrowser || An unknown browser this.version = this.searchVersion(navigator.userAgent || this.searchVersion(navigator.appVersion || an unknown version this.OS = this.searchString(this.dataOS || an unknown OS searchString function data for var i=0;i','000001000001000015000024',NULL),('usuxw9V3jN4d4pujRiEYxg','css03-ie.css','','style3/css03-ie.css',1209494150,1209494150,'3','7','12','WebGUI::Asset::Snippet',0,'css03-ie.css css03-ie.css style3 css03 ie.css contentArea height:500px padding-bottom:300px ','000001000001000051000023',NULL),('POVcY79vIqAHR8OfGt36aw','pagination_button.jpg','','root/import/gallery-templates/images/pagination_button.jpg',1209499189,1285124156,'3','7','12','WebGUI::Asset::File::Image',1,'pagination_button.jpg pagination_button.jpg root import gallery templates images pagination button.jpg','000001000001000015000017000007',NULL),('hIB-z34r8Xl-vYVYCkKr-w','bar-btn-r.jpg','','root/import/gallery-templates/images/bar-btn-r.jpg',1209499189,1285124156,'3','7','12','WebGUI::Asset::File::Image',1,'bar-btn-r.jpg bar-btn-r.jpg root import gallery templates images bar btn r.jpg','000001000001000015000017000008',NULL),('-mPUoFlYcjqjPUPRLAlxNQ','search-field-r.jpg','','root/import/gallery-templates/images/search-field-r.jpg',1209499189,1285124156,'3','7','12','WebGUI::Asset::File::Image',1,'search-field-r.jpg search-field-r.jpg root import gallery templates images search field r.jpg','000001000001000015000017000009',NULL),('MDpUOR-N8KMyt1J7Hh_h4w','bar-btn.jpg','','root/import/gallery-templates/images/bar-btn.jpg',1209499189,1285124156,'3','7','12','WebGUI::Asset::File::Image',1,'bar-btn.jpg bar-btn.jpg root import gallery templates images bar btn.jpg','000001000001000015000017000010',NULL),('YfXKByTwDZVituMc4h13Dg','pagination_bg.jpg','','root/import/gallery-templates/images/pagination_bg.jpg',1209499189,1285124156,'3','7','12','WebGUI::Asset::File::Image',1,'pagination_bg.jpg pagination_bg.jpg root import gallery templates images pagination bg.jpg','000001000001000015000017000011',NULL),('esko_HSU0Gh-uJZ1h3xRmQ','search-field-l.jpg','','root/import/gallery-templates/images/search-field-l.jpg',1209499189,1285124156,'3','7','12','WebGUI::Asset::File::Image',1,'search-field-l.jpg search-field-l.jpg root import gallery templates images search field l.jpg','000001000001000015000017000012',NULL),('oSqpGswzpBG_ErdfYwIO8A','top_bg.jpg','','root/import/gallery-templates/images/top_bg.jpg',1209499189,1285124156,'3','7','12','WebGUI::Asset::File::Image',1,'top_bg.jpg top_bg.jpg root import gallery templates images top bg.jpg','000001000001000015000017000013',NULL),('MXJklShZvLLB_DSnZQmXrQ','title_bg.jpg','','root/import/gallery-templates/images/title_bg.jpg',1209499189,1285124156,'3','7','12','WebGUI::Asset::File::Image',1,'title_bg.jpg title_bg.jpg root import gallery templates images title bg.jpg','000001000001000015000017000014',NULL),('BthxD5oJ0idmsyI3ioA2FA','bar-btn-l.jpg','','root/import/gallery-templates/images/bar-btn-l.jpg',1209499189,1285124156,'3','7','12','WebGUI::Asset::File::Image',1,'bar-btn-l.jpg bar-btn-l.jpg root import gallery templates images bar btn l.jpg','000001000001000015000017000015',NULL),('aZ-1HYQamkRHYXvzAra8WQ','search-field.jpg','','root/import/gallery-templates/images/search-field.jpg',1209499189,1285124156,'3','7','12','WebGUI::Asset::File::Image',1,'search-field.jpg search-field.jpg root import gallery templates images search field.jpg','000001000001000015000017000016',NULL),('eRkb94OYcS5AdcrrerOP5Q','rss.gif','','root/import/gallery-templates/images/rss2.gif',1209499189,1285124157,'3','7','12','WebGUI::Asset::File::Image',1,'rss.gif rss.gif root import gallery templates images rss2.gif','000001000001000015000017000017',NULL),('TbnkjAJQEASORXIpYqDkcA','blank-image.jpg','','root/import/gallery-templates/images/blank-image.jpg',1209499189,1285124157,'3','7','12','WebGUI::Asset::File::Image',1,'blank-image.jpg blank-image.jpg root import gallery templates images blank image.jpg','000001000001000015000017000018',NULL),('er-3faBjY-hhlDcc5aKqdQ','top_bg.jpg','','root/import/gallery-templates/images/top_bg2.jpg',1209499189,1285124157,'3','7','12','WebGUI::Asset::File::Image',1,'top_bg.jpg top_bg.jpg root import gallery templates images top bg2.jpg','000001000001000015000017000019',NULL),('8bFsu2FJUqHRUiHcozcVFw','sub-btn-l.jpg','','root/import/gallery-templates/images/sub-btn-l.jpg',1209499189,1285124157,'3','7','12','WebGUI::Asset::File::Image',1,'sub-btn-l.jpg sub-btn-l.jpg root import gallery templates images sub btn l.jpg','000001000001000015000017000020',NULL),('34Aayx5eA320D8VfhdfDBw','sub-btn-r.jpg','','root/import/gallery-templates/images/sub-btn-r.jpg',1209499189,1285124157,'3','7','12','WebGUI::Asset::File::Image',1,'sub-btn-r.jpg sub-btn-r.jpg root import gallery templates images sub btn r.jpg','000001000001000015000017000021',NULL),('TlhKOVmWblZOsAdqmhEpeg','sub-btn.jpg','','root/import/gallery-templates/images/sub-btn.jpg',1209499189,1285124157,'3','7','12','WebGUI::Asset::File::Image',1,'sub-btn.jpg sub-btn.jpg root import gallery templates images sub btn.jpg','000001000001000015000017000022',NULL),('Nx0ypjO3cN6QdZUBUEE0lA','pic-title-bg.jpg','','root/import/gallery-templates/images/pic-title-bg.jpg',1209499189,1285124157,'3','7','12','WebGUI::Asset::File::Image',1,'pic-title-bg.jpg pic-title-bg.jpg root import gallery templates images pic title bg.jpg','000001000001000015000017000023',NULL),('CmFZLN7iPS7XXvUEsxKPKA','row-2.jpg','','root/import/gallery-templates/images/row-2.jpg',1209499190,1285124157,'3','7','12','WebGUI::Asset::File::Image',1,'row-2.jpg row-2.jpg root import gallery templates images row 2.jpg','000001000001000015000017000024',NULL),('v_XBgwwZqgW1D5s4y05qfg','addtl-info.gif','','root/import/gallery-templates/images/addtl-info.gif',1209499190,1285124157,'3','7','12','WebGUI::Asset::File::Image',1,'addtl-info.gif addtl-info.gif root import gallery templates images addtl info.gif','000001000001000015000017000025',NULL),('4TdAkKoQbSCvI7QWcW889A','row-1.jpg','','root/import/gallery-templates/images/row-1.jpg',1209499190,1285124157,'3','7','12','WebGUI::Asset::File::Image',1,'row-1.jpg row-1.jpg root import gallery templates images row 1.jpg','000001000001000015000017000026',NULL),('SAgK6eDPCG1cgkJ59WapHQ','prev-btn.gif','','root/import/gallery-templates/images/prev-btn.gif',1209499190,1285124157,'3','7','12','WebGUI::Asset::File::Image',1,'prev-btn.gif prev-btn.gif root import gallery templates images prev btn.gif','000001000001000015000017000027',NULL),('XJYLuvGy9ubF7JNKyINtpA','play-btn.gif','','root/import/gallery-templates/images/play-btn.gif',1209499190,1285124157,'3','7','12','WebGUI::Asset::File::Image',1,'play-btn.gif play-btn.gif root import gallery templates images play btn.gif','000001000001000015000017000028',NULL),('RWj7hyv2SpZuXxwj1Wocug','next-btn.gif','','root/import/gallery-templates/images/next-btn.gif',1209499190,1285124157,'3','7','12','WebGUI::Asset::File::Image',1,'next-btn.gif next-btn.gif root import gallery templates images next btn.gif','000001000001000015000017000029',NULL),('aq8QElnlm3YufAoxRz9Pcg','data-bg.jpg','','root/import/gallery-templates/images/data-bg.jpg',1209499190,1285124158,'3','7','12','WebGUI::Asset::File::Image',1,'data-bg.jpg data-bg.jpg root import gallery templates images data bg.jpg','000001000001000015000017000030',NULL),('6D4Z-oruXPS6OlH_Kx8pBg','images','','root/import/thingy-templates/images',1209509389,1209509389,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'images images root import thingy templates images','000001000001000044000005',NULL),('hQ7z33_jOYkQ8WNX5xy9Sw','style-button.gif','','root/import/thingy-templates/images/style-button.gif',1209509455,1209509455,'3','7','12','WebGUI::Asset::File::Image',1,'style-button.gif style-button.gif root import thingy templates images style button.gif','000001000001000044000005000001',NULL),('vWW_DcHiYSrKZOkkIfEfcQ','row-2.jpg','','root/import/thingy-templates/images/row-2.jpg',1209509433,1209509433,'3','7','12','WebGUI::Asset::File::Image',1,'row-2.jpg row-2.jpg root import thingy templates images row 2.jpg','000001000001000044000005000002',NULL),('_bPYzRA87NTAUIKlfrJMHg','row-1.jpg','','root/import/thingy-templates/images/row-1.jpg',1209509433,1209509433,'3','7','12','WebGUI::Asset::File::Image',1,'row-1.jpg row-1.jpg root import thingy templates images row 1.jpg','000001000001000044000005000003',NULL),('nJjZHRwdDs5MAZYsAyioHw','title-bg.jpg','','root/import/thingy-templates/images/title-bg.jpg',1209509433,1209509433,'3','7','12','WebGUI::Asset::File::Image',1,'title-bg.jpg title-bg.jpg root import thingy templates images title bg.jpg','000001000001000044000005000004',NULL),('8hxfkrJPeFVRWF5piCNJ1A','field-bg.jpg','','root/import/thingy-templates/images/field-bg.jpg',1209509433,1209509433,'3','7','12','WebGUI::Asset::File::Image',1,'field-bg.jpg field-bg.jpg root import thingy templates images field bg.jpg','000001000001000044000005000005',NULL),('Osx7WN52iIKHZFT4vqUBHQ','search-btn.gif','','root/import/thingy-templates/images/search-btn.gif',1209509433,1209509433,'3','7','12','WebGUI::Asset::File::Image',1,'search-btn.gif search-btn.gif root import thingy templates images search btn.gif','000001000001000044000005000006',NULL),('oWff8fGzRdHPyq5VNREe9Q','top-bg.jpg','','root/import/thingy-templates/images/top-bg.jpg',1209509433,1209509433,'3','7','12','WebGUI::Asset::File::Image',1,'top-bg.jpg top-bg.jpg root import thingy templates images top bg.jpg','000001000001000044000005000007',NULL),('uqbkvb1b9443VvfkyRz95w','save-button.gif','','root/import/thingy-templates/images/save-button.gif',1209509433,1209509433,'3','7','12','WebGUI::Asset::File::Image',1,'save-button.gif save-button.gif root import thingy templates images save button.gif','000001000001000044000005000008',NULL),('8YiMkcz32xalkAn3WBLpag','go-btn.gif','','root/import/thingy-templates/images/go-btn.gif',1210181860,1210181860,'3','7','12','WebGUI::Asset::File::Image',1,'go-btn.gif go-btn.gif root import thingy templates images go btn.gif','000001000001000044000005000009',NULL),('5m5I7__l40C4hhv4ydqAHQ','thingy-ie.css','','root/import/thingy-templates/thingy-ie.css',1210181698,1216227786,'3','7','12','WebGUI::Asset::Snippet',0,'thingy-ie.css thingy-ie.css root import thingy templates thingy ie.css thingyList things padding:0px margin:0px width:200px z-index:5000 position:absolute top:27px left:20px border:solid a2a2a2 1px border-top-style:none thingyList things a:link thingyList things a:visited display:block background-color:#f1f1f1 border-top:solid a2a2a2 1px border-bottom:solid 727272 1px line-height:12px font-size:10px height:12px padding:2px 5px text-decoration:none font-weight:bold color:#a2a2a2 width:190px thingyList things a:hover background-color:white ','000001000001000044000007',NULL),('2rC4ErZ3c77OJzJm7O5s3w','EMS Badge Listing (default)','','root/import/ems/ems-badge-listing-default',1208721232,1288747841,'3','7','12','WebGUI::Asset::Template',0,'EMS Badge Listing default EMS Badge Listing default root import ems ems badge listing default EMS','000001000001000012000003',NULL),('PsFn7dJt4wMwBa8hiE3hOA','Print Badge (Default)','','root/import/ems/print-badge-default',1208558071,1257311886,'3','7','12','WebGUI::Asset::Template',0,'Print Badge Default Print Badge Default root import ems print badge default EMS/PrintBadge','000001000001000012000004',NULL),('yBwydfooiLvhEFawJb0VTQ','Print Ticket (Default)','','root/import/ems/print-ticket-default',1208629936,1257311887,'3','7','12','WebGUI::Asset::Template',0,'Print Ticket Default Print Ticket Default root import ems print ticket default EMS/PrintTicket','000001000001000012000005',NULL),('63ix2-hU0FchXGIWkG3tow','Flat Discount (Default)','','root/import/flat-discount-default',1209588387,1326776037,'3','7','12','WebGUI::Asset::Template',0,'Flat Discount Default Flat Discount Default root import flat discount default FlatDiscount','000001000001000036000011',NULL),('gbnRhcWNk1iQe32LFEB5eQ','Shelf','','root/import/shelf2',1210779723,1212086102,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Shelf Shelf root import shelf2','000001000001000035',NULL),('1XOJDcg_ITRYwVM-QnIcPw','shelf.css','','root/import/shelf2/shelf.css',1210779441,1219175575,'3','7','12','WebGUI::Asset::Snippet',0,'shelf.css shelf.css root import shelf2 shelf.css wgShelf font-size:12px font-family:arial verdana margin:15px 0px wgShelf h2 background black padding:5px padding-left:15px line-height:32px color:white margin:0px height:32px wgShelf wgShelves background F1F1F1 height:29px padding:3px line-height:29px padding-left:30px wgShelf product margin:15px margin-left:0px text-align:left background-color:#f1f1f1 border:solid e1e1e1 1px width 200px display moz-inline-box Moz display inline-block Op Saf IE vertical-align top IE Mac non capisce e a volte crea extra v space wgShelf product thumbnail display:block text-align:left margin:3px float:left wgShelf product link background e1e1e1 height:30px padding:3px line-height:24px margin-bottom:5px text-align:left display:block wgShelf product link a:link wgShelf product link a:visited color:#000 display:block wgShelf product link a:hover text-decoration:underline wgShelf product price display:block text-align:right font-size:18px font-weight:bold ','000001000001000035000003',NULL),('C5fPz-Wg85vkYRvCdl-Xqw','UserList','','root/import/userlist',1212160830,1212160830,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'UserList UserList root import userlist','000001000001000047',NULL),('aNmgn0cd6tldmC1FpW4KbA','Shop','','shopping-cart-collateral-items',1213122695,1326776036,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'Shop Shop shopping cart collateral items','000001000001000036',NULL),('2q5fxatSFLgIhXaUX-oSvg','bottom-left.jpg','','shopping-cart-collateral-items/bottom-left.jpg',1204149033,1326776036,'3','7','3','WebGUI::Asset::File::Image',1,'bottom-left.jpg bottom-left.jpg shopping cart collateral items bottom left.jpg','000001000001000036000001',NULL),('_d5WTkKjnwct-_Dk7gZHvQ','bottom-right.jpg','','shopping-cart-collateral-items/bottom-right.jpg',1204149033,1326776036,'3','7','3','WebGUI::Asset::File::Image',1,'bottom-right.jpg bottom-right.jpg shopping cart collateral items bottom right.jpg','000001000001000036000002',NULL),('Iz2mUR3jCPKyemwAea4b2g','input_bg.jpg','','shopping-cart-collateral-items/input_bg.jpg',1204149033,1326776036,'3','7','3','WebGUI::Asset::File::Image',1,'input_bg.jpg input_bg.jpg shopping cart collateral items input bg.jpg','000001000001000036000003',NULL),('JU9bjsLRoWj7GVHs__prig','top-left.jpg','','shopping-cart-collateral-items/top-left.jpg',1204149033,1326776036,'3','7','3','WebGUI::Asset::File::Image',1,'top-left.jpg top-left.jpg shopping cart collateral items top left.jpg','000001000001000036000004',NULL),('noOlnjQGexHg8c4bGVUo9g','top-right.jpg','','shopping-cart-collateral-items/top-right.jpg',1204149033,1326776036,'3','7','3','WebGUI::Asset::File::Image',1,'top-right.jpg top-right.jpg shopping cart collateral items top right.jpg','000001000001000036000005',NULL),('aIpCmr9Hi__vgdZnDTz1jw','Cart (Default)','','default-shopping-cart-template',1209921197,1326776036,'3','7','3','WebGUI::Asset::Template',0,'Cart Default Cart Default default shopping cart template Shop/Cart','000001000001000036000006',NULL),('4e-_rNs6mSWedZhQ_V5kJA','shelf-ie.css','','root/import/shelf2/shelf-ie.css',1210779672,1210779672,'3','7','12','WebGUI::Asset::Snippet',0,'shelf-ie.css shelf-ie.css root import shelf2 shelf ie.css wgShelf product margin:15px margin-left:0px float:left text-align:left background-color:#f1f1f1 border:solid e1e1e1 1px min-height:100px min-width:200px width:200px height:100px wgShelf product link background url(^FileUrl(root/import/shelf2/images/shelf-titles.jpg no-repeat top right height:30px padding:3px line-height:24px margin-bottom:5px text-align:left display:block ','000001000001000035000004',NULL),('2gtFt7c0qAFNU3BG_uvNvg','My Purchases (Default)','','shopping-cart-collateral-items/my-purchases-default',1211824430,1326776037,'3','7','3','WebGUI::Asset::Template',0,'My Purchases Default My Purchases Default shopping cart collateral items my purchases default Shop/MyPurchases','000001000001000036000008',NULL),('bPz1yk6Y9uwMDMBcmMsSCg','Email Receipt (Default)','','shopping-cart-collateral-items/email-receipt-default',1211829604,1326776037,'3','7','3','WebGUI::Asset::Template',0,'Email Receipt Default Email Receipt Default shopping cart collateral items email receipt default Shop/EmailReceipt','000001000001000036000009',NULL),('EBlxJpZQ9o-8VBOaGQbChA','MiniCart','','shopping-cart-collateral-items/minicart',1212093746,1326776037,'3','7','3','WebGUI::Asset::Template',0,'MiniCart MiniCart shopping cart collateral items minicart Shop/MiniCart','000001000001000036000014',NULL),('PBtmpl0000000000000053','Subscription code redemption','','subscription_code_redemption',1124395696,1326776037,'3','7','12','WebGUI::Asset::Template',0,'Subscription code redemption Subscription code redemption subscription code redemption Operation/RedeemSubscription','000001000001000036000017',NULL),('6tK47xsaIH-ELw0IBo0uRQ','images','','root/import/shelf2/images',1210777115,1210777115,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'images images root import shelf2 images','000001000001000035000001',NULL),('XNd7a_g_cTvJVYrVHcx2Mw','Address (Default)','','shopping-cart-collateral-items/address-default',1212099009,1326776037,'3','7','3','WebGUI::Asset::Template',0,'Address Default Address Default shopping cart collateral items address default Shop/Address','000001000001000036000007',NULL),('_bZJ9LA_KNekZiFPaP2SeQ','shelf-titles.jpg','','root/import/shelf2/images/shelf-titles.jpg',1210777868,1210777868,'3','7','12','WebGUI::Asset::File::Image',1,'shelf-titles.jpg shelf-titles.jpg root import shelf2 images shelf titles.jpg','000001000001000035000001000001',NULL),('nFen0xjkZn8WkpM93C9ceQ','Shelf (Default)','','root/import/shelf-default',1210779326,1247864696,'3','7','12','WebGUI::Asset::Template',0,'Shelf Default Shelf Default root import shelf default Shelf','000001000001000035000002',NULL),('mTOiwwk3q4k9g5-XykXhPA','Documentation','With any large system, having the right documentation to get you started is mandatory. The good news is that WebGUI has abundant documentation. ','documentation',1215717999,1271349647,'3','7','3','WebGUI::Asset::Wobject::Layout',1,'Documentation Documentation documentation With any large system having the right documentation to get you started is mandatory The good news is that WebGUI has abundant documentation','000001000002000003',NULL),('o_pq_e4vRyhMOKFzs61eag','book-covers.jpg','','documentation/book-covers.jpg',1215714957,1215714957,'3','7','3','WebGUI::Asset::File::Image',1,'book-covers.jpg book-covers.jpg documentation book covers.jpg','000001000002000003000002',NULL),('PBEmsBadgeTemplate0000','Default EMS Badge Template','','default_emsbadge',1221077977,1313542962,'3','7','4','WebGUI::Asset::Template',0,'Default EMS Badge Template Default EMS Badge Template default emsbadge EMSBadge','000001000001000012000006',NULL),('9A-mg2gwWmaYi9o_1C7ArQ','dashboard','','root/import/projectmanager/dashboard',1147642478,1222803338,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'dashboard dashboard root import projectmanager dashboard','000001000001000030000001',NULL),('yD1SMHelczihzjEmx6eXBA','editTask','','root/import/projectmanager/edittask',1147642478,1222803342,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'editTask editTask root import projectmanager edittask','000001000001000030000002',NULL),('pV7GnZdpjR3XpZaSINIoeg','gantt','','root/import/projectmanager/gantt',1147642478,1222803347,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'gantt gantt root import projectmanager gantt','000001000001000030000003',NULL),('71e17KeduiXgODLMlUxiow','project','','root/import/projectmanager/project',1147642479,1222803352,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'project project root import projectmanager project','000001000001000030000004',NULL),('vTymIDYL2YqEh6PV50F7ew','manager','','root/import/timetracking/manager',1147642482,1222803302,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'manager manager root import timetracking manager','000001000001000046000001',NULL),('lo1ac3BsoJx3ijGQ3gR-bQ','row','','root/import/timetracking/row',1147642482,1222803309,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'row row root import timetracking row','000001000001000046000002',NULL),('huASapWvFDzqwOSbcN-JFQ','user','','root/import/timetracking/user',1147642483,1222803313,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'user user root import timetracking user','000001000001000046000003',NULL),('xSmREZO3GNzK3M5PaueOOQ','LDAP/Account','','root/import/auth/ldap/account',1147642466,1287545014,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'LDAP/Account LDAP/Account root import auth ldap account','000001000001000005000001',NULL),('0bx-xoL8TSXXubFuqKAoVQ','LDAP/Create','','root/import/auth/ldap/create',1147642466,1287545014,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'LDAP/Create LDAP/Create root import auth ldap create','000001000001000005000002',NULL),('taX2UYkFF21ALpFZY2rhMw','LDAP/Login','','root/import/auth/ldap/login',1147642466,1287545014,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'LDAP/Login LDAP/Login root import auth ldap login','000001000001000005000003',NULL),('K0q_N885Httqev1VCqUWxg','WebGUI/Account','','root/import/auth/webgui/account',1147642466,1287545014,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'WebGUI/Account WebGUI/Account root import auth webgui account','000001000001000005000004',NULL),('fq1ZkYhH24R5tb96kuT10Q','WebGUI/Create','','root/import/auth/webgui/create',1147642466,1287545014,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'WebGUI/Create WebGUI/Create root import auth webgui create','000001000001000005000005',NULL),('oHk7fAFhEEkB7dHzi0QOQA','WebGUI/Expired','','root/import/auth/webgui/expired',1147642466,1287545014,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'WebGUI/Expired WebGUI/Expired root import auth webgui expired','000001000001000005000006',NULL),('9M-lrlPQWeeNWfvnDnK_Xg','WebGUI/Login','','root/import/auth/webgui/login',1147642466,1287545014,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'WebGUI/Login WebGUI/Login root import auth webgui login','000001000001000005000007',NULL),('_gBYAdTcbkiyamnqi2Xskg','WebGUI/Recovery','','root/import/auth/webgui/recovery',1147642466,1287545014,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'WebGUI/Recovery WebGUI/Recovery root import auth webgui recovery','000001000001000005000008',NULL),('tBL7BWiQRZFed2Y-Zjo9tQ','AdminToggle','','root/import/macro/admintoggle',1147642471,1222803200,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'AdminToggle AdminToggle root import macro admintoggle','000001000001000021000001',NULL),('GdkQpvjRtJqtzOUbwIIQRA','a_account','','root/import/macro/a_account',1147642471,1222803205,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'a_account a_account root import macro a account','000001000001000021000002',NULL),('tnc5iYyynX2hfdEs9D3P8w','EditableToggle','','root/import/macro/editabletoggle',1147642472,1222803213,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'EditableToggle EditableToggle root import macro editabletoggle','000001000001000021000003',NULL),('vgXdBcFTqU7h4wBG1ewdBw','File','','root/import/macro/file',1147642472,1222803217,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'File File root import macro file','000001000001000021000004',NULL),('hcFlqnXlsmC1ujN6Id0F0A','GroupAdd','','root/import/macro/groupadd',1147642473,1222803234,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'GroupAdd GroupAdd root import macro groupadd','000001000001000021000005',NULL),('eRJR52fvlaxfetv3DQkQYw','GroupDelete','','root/import/macro/groupdelete',1147642473,1222803238,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'GroupDelete GroupDelete root import macro groupdelete','000001000001000021000006',NULL),('5HIDHq5lAWHV5gpYGS0zLg','H_homeLink','','root/import/macro/h_homelink',1147642473,1222803244,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'H_homeLink H_homeLink root import macro h homelink','000001000001000021000007',NULL),('rYEFwXXo0tkGhQTcbDibvg','LoginToggle','','root/import/macro/logintoggle',1147642473,1222803249,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'LoginToggle LoginToggle root import macro logintoggle','000001000001000021000008',NULL),('V3l5S5TtI7wMm1WpIMhvOA','L_loginBox','','root/import/macro/l_loginbox',1147642473,1222803253,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'L_loginBox L_loginBox root import macro l loginbox','000001000001000021000009',NULL),('nqNbSUAhk9Vd1zda2SCz9A','RandomThread','','root/import/macro/randomthread',1147642474,1222803258,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'RandomThread RandomThread root import macro randomthread','000001000001000021000010',NULL),('y8XkRdxIperLKkJ3bL5sSQ','r_printable','','root/import/macro/r_printable',1147642474,1222803264,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'r_printable r_printable root import macro r printable','000001000001000021000011',NULL),('UserListTmpl0000000002','UserList with search field selection','','root/import/userlist/userlist-with-search-field-selection',1212000800,1228125752,'3','7','12','WebGUI::Asset::Template',0,'UserList with search field selection UserList with search field selection root import userlist userlist with search field selection UserList','000001000001000047000002',NULL),('UserListTmpl0000000003','UserList with multiple search keywords','','root/import/userlist/userlist-with-multiple-search-keywords',1212001437,1228125758,'3','7','12','WebGUI::Asset::Template',0,'UserList with multiple search keywords UserList with multiple search keywords root import userlist userlist with multiple search keywords UserList','000001000001000047000003',NULL),('UserListTmpl0000000001','Default UserList','','root/import/userlist/default-userlist',1212159641,1228125743,'3','7','12','WebGUI::Asset::Template',0,'Default UserList Default UserList root import userlist default userlist UserList','000001000001000047000001',NULL),('BMybD3cEnmXVk2wQ_qEsRQ','Badge Builder (Default)','','root/import/ems/badge-builder-default',1208530113,1263962529,'3','7','12','WebGUI::Asset::Template',0,'Badge Builder Default Badge Builder Default root import ems badge builder default EMS/BadgeBuilder','000001000001000012000001',NULL),('OOyMH33plAy6oCj_QWrxtg','Lookup Registrant (Default)','','root/import/ems/lookup-registrant-default',1207951375,1257311886,'3','7','12','WebGUI::Asset::Template',0,'Lookup Registrant Default Lookup Registrant Default root import ems lookup registrant default EMS/LookupRegistrant','000001000001000012000002',NULL),('stevecoolmenu000000001','Site Nav','','webgui7/style3/hierarchical-top-nav',1147642505,1224116942,'3','7','12','WebGUI::Asset::Template',0,'Site Nav Site Nav webgui7 style3 hierarchical top nav Navigation','000001000001000051000001',NULL),('7-0-style0000000000051','css03.css','','style3/css03.css',1147642505,1224117026,'3','7','12','WebGUI::Asset::Snippet',0,'css03.css css03.css style3 css03.css body html margin:0px background-color:#b53018 padding:0px body a color:#EE963E;font-weight:bold letter-spacing:1px font-size:8pt main width:98 min-width:790px margin:0px padding:0px padding-top:20px padding-bottom:20px position:relative header background url(\'^FileUrl(style3/header_bg.jpg repeat-x width:100 margin:0px height:115px headerTitle background url(\'^FileUrl(style3/header_left.jpg no-repeat left top height:100 width:100 headerRight background url(\'^FileUrl(style3/header_right.jpg no-repeat right top width:100 height:100 text-align:right position:relative headerRight title position:absolute top:25px left:20px font-family:arial text-align:left title h1 text-transform:uppercase margin-bottom:0px font-weight:normal font-size:26pt margin-top:0px color:white title h1 a color:white text-decoration:none font-size 26pt font-weight normal title h2 margin:0px font-size:12pt color:#bebebe padding-left:20px title img z-index:5 login position:absolute font-size:8pt top:45 right:150px color:white z-index:6 font-family:arial login a color:white font-weight normal letter-spacing 0px loginBox font-size:8pt margin:0px display:inline loginBox input font-size:8pt mainBody width:100 margin:0px height:500px background fff position:relative z-index:0 main > mainBody height:auto min-height:500px contentArea z-index:2 position:relative padding-top:10px padding-left:10px padding-right:20px padding-bottom:20px moz-box-sizing:border-box font-family:verdana font-size:9pt min-height:500px html main mainBody contentArea height:1 topCorner width:100 height:214px position:absolute top:0px left:0px background url(^FileUrl(/style3/main_top.jpg no-repeat z-index:1 bottomCorner width:100 height:211px position:absolute bottom:59px right:0px background url(\'^FileUrl(style3/main_bottom.jpg no-repeat right z-index:1 html bottomCorner bottom:58px footer width:100 margin:0px background:#000 url(\'^FileUrl(style3/footer_right.jpg no-repeat right top height:57px border-top:solid B53018 2px text-align:right position:relative z-index:0 footer copyright color:#3b3b3b font-family:arial position:absolute top:20px left:30px font-size:8pt main yui-skin-sam font-family:verdana font-size:9pt font-weight:normal ','000001000001000051000002',NULL),('jVKLVakT_iA2010_oEuAwg','Style3 Coolmenu','','department_nav',1224116526,1224116526,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'Style3 Coolmenu Style3 Coolmenu department nav','000001000001000051000024',NULL),('UL-ItI4L1Z6-WSuhuXVvsQ','DataTable','','root/import/datatable',1225139673,1225139673,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'DataTable DataTable root import datatable','000001000001000011',NULL),('3rjnBVJRO6ZSkxlFkYh_ug','Default DataTable Template (YUI)','','root/import/datatable/default-datatable-template-yui',1225139643,1233861835,'3','7','3','WebGUI::Asset::Template',0,'Default DataTable Template YUI Default DataTable Template YUI root import datatable default datatable template yui DataTable','000001000001000011000001',NULL),('TuYPpHx7TUyk08639Pc8Bg','Default DataTable Template (HTML)','','root/import/datatable/default-datatable-template-html',1225139643,1233861621,'3','7','3','WebGUI::Asset::Template',0,'Default DataTable Template HTML Default DataTable Template HTML root import datatable default datatable template html DataTable','000001000001000011000002',NULL),('IZkrow_zwvbf4FCH-taVTQ','Inbox','','root/import/account/inbox',1226011853,1226011853,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Inbox Inbox root import account inbox','000001000001000002000002',NULL),('K0YjxqOqr7RupSo6sIdcAg','Friends','','root/import/account/friends',1227074310,1227074310,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Friends Friends root import account friends','000001000001000002000003',NULL),('_ilRXNR3s8F2vGJ_k9ePcg','User','','root/import/account/user',1226643205,1226643205,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'User User root import account user','000001000001000002000004',NULL),('AOjPG2NHgfL9Cq6dDJ7mew','Shop','','root/import/account/shop',1226659753,1236960881,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Shop Shop root import account shop','000001000001000002000005',NULL),('qaVcU0FFzzraMX_bzELqzw','Contributions','','root/import/account/contributions',1227074362,1227074362,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Contributions Contributions root import account contributions','000001000001000002000006',NULL),('matrixtmpl000000000004','Matrix Default Edit Listing','','default-matrix-edit-listing-template',1133743239,1281501163,'3','7','12','WebGUI::Asset::Template',0,'Matrix Default Edit Listing Matrix Default Edit Listing default matrix edit listing template Matrix/EditListing','000001000001000022000004',NULL),('kJf77eCr9GAMiEzWrzsBTA','matrix-ie.css','','new-matrix/matrix-ie.css',1229639255,1281501163,'3','7','12','WebGUI::Asset::Snippet',0,'matrix-ie.css matrix-ie.css new matrix matrix ie.css matrixLeft buttons span matrixRight buttons span padding:0px 0px 0px 0px matrixLeft buttons button matrixRight buttons a top:-3px left:-2px height:22px matrixRight buttons a color:black text-decoration:none padding:1px 3px ','000001000001000022000007',NULL),('4LQT4-bGW4FkiEQLSY5gvQ','show-hide.js','','new-matrix/show-hide.js',1232400287,1281501163,'3','7','12','WebGUI::Asset::Snippet',0,'show-hide.js show-hide.js new matrix show hide.js function showHide(theLink,theId var theId = document.getElementById(theId var theLink = document.getElementById(theLink if(theId.style.display == block theId.style.display = none theLink.innerHTML = Send Creator a Message theLink.className = showLink else theId.style.display = block theLink.innerHTML = Hide theLink.className = hideLink ','000001000001000022000008',NULL),('Vch1Ww7G_JpBhOhXX07RDg','matrx-nav','','new-matrix/matrix-nav',1232664082,1281501163,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'matrx-nav matrix-nav new matrix matrix nav','000001000001000022000010',NULL),('PBtmpl0000000000000063','Default Overview Report','','root/import/survey/default-overview-report',1124395696,1250243000,'3','7','12','WebGUI::Asset::Template',0,'Default Overview Report Default Overview Report root import survey default overview report Survey/Overview','000001000001000042000001',NULL),('HW-sPoDDZR8wBZ0YgFgPtg','images','','root/import/account/images',1227634350,1227634350,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'images images root import account images','000001000001000002000009',NULL),('hBpisL-_URyZnh9clR5ohA','no_photo.gif','','root/import/account/images/no_photo.gif',1227634417,1227634417,'3','7','12','WebGUI::Asset::File::Image',1,'no_photo.gif no_photo.gif root import account images no photo.gif','000001000001000002000009000001',NULL),('FOBV6KkifreXa4GmEAUU4A','no_photo_sm.gif','','root/import/account/images/no_photo_sm.gif',1227634447,1227634447,'3','7','12','WebGUI::Asset::File::Image',1,'no_photo_sm.gif no_photo_sm.gif root import account images no photo sm.gif','000001000001000002000009000002',NULL),('PBtmpl0000000000000061','Default Survey','','root/import/survey/default-survey',1124395696,1250243000,'3','7','12','WebGUI::Asset::Template',0,'Default Survey Default Survey root import survey default survey Survey','000001000001000042000003',NULL),('S2_LsvVa95OSqc66ITAoig','EMS Schedule Listing (default)','','root/import/ems/ems-schedule-listing-default2',1242730712,1257311887,'3','7','12','WebGUI::Asset::Template',0,'EMS Schedule Listing default EMS Schedule Listing default root import ems ems schedule listing default2 EMS/Schedule','000001000001000012000007',NULL),('VyCINX2KixKYr2pzQGX9Mg','layout.css','','layout.css',1246968584,1254881103,'3','7','12','WebGUI::Asset::Snippet',0,'layout.css layout.css layout.css styles for the layout asset wg-left float left wg-right float right wg-clear clear both sidebyside wg-content-position oneovertwo wg-content-position width 49 oneovertwo wg-top width 100 oneoverthree wg-first-column oneoverthree wg-second-column oneoverthree wg-third-column threeColumns wg-first-column threeColumns wg-second-column threeColumns wg-third-column width 32 oneoverthree wg-first-column threeColumns wg-first-column margin-right:2 rightcolumn wg-first-column width 65 rightcolumn wg-second-column width 33 ','000001000001000019000006',NULL),('jmlI9IK-lV8n2WMYmmPhAA','Ad Sku','','root/import/ad-sku',1238106173,1238106173,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Ad Sku Ad Sku root import ad sku','000001000001000001',NULL),('AldPGu0u-jm_5xK13atCSQ','Default Purchase Ad Sku Template','','root/import/ad-sku/default-purchase-ad-sku-template',1238106805,1251419124,'3','7','12','WebGUI::Asset::Template',0,'Default Purchase Ad Sku Template Default Purchase Ad Sku Template root import ad sku default purchase ad sku template AdSku/Purchase','000001000001000001000001',NULL),('ohjyzab5i-yW6GOWTeDUHg','Default Manage Ad Sku Template','','root/import/ad-sku/default-manage-ad-sku-template',1238106805,1251425384,'3','7','12','WebGUI::Asset::Template',0,'Default Manage Ad Sku Template Default Manage Ad Sku Template root import ad sku default manage ad sku template AdSku/Manage','000001000001000001000002',NULL),('PBtmpl0000000000000015','Default WebGUI Welcome Message Template','','root/import/auth/webgui/create/default-webgui-welcome-message-template',1237647040,1287545014,'3','7','12','WebGUI::Asset::Template',0,'Default WebGUI Welcome Message Template Default WebGUI Welcome Message Template root import auth webgui create default webgui welcome message template Auth/WebGUI/Welcome','000001000001000005000005000002',NULL),('PBtmpl0000000000000016','Default WebGUI Account Activation Template','','root/import/auth/webgui/create/default-webgui-account-activation-template',1237407798,1287545014,'3','7','3','WebGUI::Asset::Template',0,'Default WebGUI Account Activation Template Default WebGUI Account Activation Template root import auth webgui create default webgui account activation template Auth/WebGUI/Activation','000001000001000005000005000003',NULL),('wrq7hMxb1ewQqZ46xmd8Gg','equal-cols.js','','matrix/equal-cols.js',1235706620,1281501163,'3','7','12','WebGUI::Asset::Snippet',0,'equal-cols.js equal-cols.js matrix equal cols.js function equalCol var colOne = document.getElementById(\'compareForm var colTwo = document.getElementById(\'matrixRight var colOneH = colOne.offsetHeight var colTwoH = colTwo.offsetHeight alert(colOneH + + colTwoH colOne.style.overflow = scroll colOne.style.height = colTwoH 150 + px ','000001000001000022000011',NULL),('matrixtmpl000000000007','Matrix Default Screenshots Config','','matrix-default-screenshots-config',1236594030,1281501163,'3','7','12','WebGUI::Asset::Template',0,'Matrix Default Screenshots Config Matrix Default Screenshots Config matrix default screenshots config Matrix/ScreenshotsConfig','000001000001000022000012',NULL),('matrixtmpl000000000006','Matrix Default Screenshots','','matrix-default-screenshots',1236889702,1281501163,'3','7','12','WebGUI::Asset::Template',0,'Matrix Default Screenshots Matrix Default Screenshots matrix default screenshots Matrix/Screenshots','000001000001000022000013',NULL),('RSAMkc6WQmfRE3TOr1_3Mw','ExpireIncompleteSurveyResponses','','root/import/expireincompletesurveyresponses',1234828062,1250243000,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'ExpireIncompleteSurveyResponses ExpireIncompleteSurveyResponses root import expireincompletesurveyresponses','000001000001000042000011',NULL),('ExpireIncResptmpl00001','ExpireIncompleteSurveyResponses','','root/import/expireincompletesurveyresponses/expireincompletesurveyresponses',1236752721,1250243000,'3','7','12','WebGUI::Asset::Template',0,'ExpireIncompleteSurveyResponses ExpireIncompleteSurveyResponses root import expireincompletesurveyresponses expireincompletesurveyresponses ExpireIncompleteSurveyResponses','000001000001000042000011000001',NULL),('NBVSVNLp9X_bV7WrCprtCA','Annotate Image','','image3',1237842096,1237842096,'3','7','12','WebGUI::Asset::Template',0,'Annotate Image Annotate Image image3 ImageAsset','000001000001000017000002',NULL),('qsG6B24a0SC5KrhQjmdZBw','survey.css','','survey.css',1233860274,1287545015,'3','7','12','WebGUI::Asset::Snippet',0,'survey.css survey.css survey.css body margin 0 background-repeat repeat-y background-position 0px 0px survey-header width 80 height 20px margin-left 80px survey margin-left 80px width 85 div.dateanswer overflow auto div.slider-bg position relative background:url(/extras/wobject/Survey/bg-fader-500.gif 5px 0 no-repeat height:68px width:529px div.slider-thumb cursor:default position absolute top 30px left 4px div.slider-min-thumb cursor:default position absolute top 4px div.slider-max-thumb cursor:default position absolute top 4px headertitle display none headertext display none questions display none input.mcbutton font-size 10px font-weight bold text-decoration none background-color CCCCCC background-repeat repeat-x text-align center display block margin 0.5em padding 8em min-width 60px font-family Verdana Arial Helvetica sans-serif color 000000 background-image url(/extras/wobject/Survey/gradient-glossy.png input.mcbutton:hover background-color B6D2F1 font-family Verdana Arial Helvetica sans-serif font-size 10px color 000000 input.mcbutton-selected background-color 172D9D background-repeat repeat-x color FFFFFF font-family Verdana Arial Helvetica sans-serif font-size 10px margin 0.5em padding 8em width 60px text-align center display block font-weight bold background-image url(/extras/wobject/Survey/gradient-glossy.png background-position 0px 0px By default the marker for invalid required fields is a red survey-invalid-marker color FF0000 survey font-family Verdana Arial Helvetica sans-serif font-size 10px border 3px solid 1e1e1e survey survey-header background-color cfcfcf padding-top 1px survey headertitle padding-left 5px survey progress position relative top 26px right 5px text-align right font-style italic survey progress:before content Progress survey headertext border-bottom 2px solid 1e1e1e padding 5px survey questions survey question background-color dfdfdf padding 10px 5px 10px 5px survey question p:before content Q survey scale:before content A survey submitbutton margin-left 5px restartMessage color FF0000 chart float left width 200px height 113px ','000001000001000042000010',NULL),('6uvSLY-ak_w4p_wS8q33cA','Carousel','','root/import/carousel',1239213092,1239213092,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Carousel Carousel root import carousel','000001000001000007',NULL),('CarouselTmpl0000000001','Default Carousel','','root/import/carousel/carousel-default',1239290719,1301973997,'3','7','12','WebGUI::Asset::Template',0,'Default Carousel Default Carousel root import carousel carousel default Carousel','000001000001000007000001',NULL),('CarouselTmpl0000000002','Carousel hidden textareas','','root/import/carousel/carousel-hidden-textareas',1238878995,1239475937,'3','7','12','WebGUI::Asset::Template',0,'Carousel hidden textareas Carousel hidden textareas root import carousel carousel hidden textareas Carousel','000001000001000007000002',NULL),('GaBAW-2iVhLMJaZQzVLE5A','ThingyRecord Templates','','root/import/thingyrecord-templates',1240103565,1240103565,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'ThingyRecord Templates ThingyRecord Templates root import thingyrecord templates','000001000001000045',NULL),('TKmhv8boP3TD2xwSwUBq0g','Default ThingyRecord View','','home/thinyrecord-templates/default-thingyrecord-view',1240103436,1250243000,'3','7','3','WebGUI::Asset::Template',0,'Default ThingyRecord View Default ThingyRecord View home thinyrecord templates default thingyrecord view ThingyRecord/View','000001000001000045000001',NULL),('fowHfgOkJtAxdst7rugTog','Story Manager','','root/import/storymanager',1236184911,1252595993,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Story Manager Story Manager root import storymanager','000001000001000040',NULL),('3QpYtHrq_jmAk1FNutQM5A','Story Template','','root/import/storymanager/storytemplate',1239237827,1253636379,'3','7','4','WebGUI::Asset::Template',0,'Story Template Story Template root import storymanager storytemplate Story','000001000001000040000001',NULL),('yxD5ka7XHebPLD-LXBwJqw','StoryArchive','','root/import/storymanager/storyarchive',1239918573,1253635396,'3','7','4','WebGUI::Asset::Template',0,'StoryArchive StoryArchive root import storymanager storyarchive StoryArchive','000001000001000040000002',NULL),('A16v-YjWAShXWvSACsraeg','StoryTopic','','root/import/storymanager/storytopic',1239918710,1285124154,'3','7','4','WebGUI::Asset::Template',0,'StoryTopic StoryTopic root import storymanager storytopic StoryTopic','000001000001000040000005',NULL),('0EAJ9EYb9ap2XwfrcXfdLQ','Story Archive Asset List','','root/import/storymanager/keywordlist',1240262820,1250243000,'3','7','4','WebGUI::Asset::Template',0,'Story Archive Asset List Story Archive Asset List root import storymanager keywordlist StoryArchive/KeywordList','000001000001000040000006',NULL),('9j0_Z1j3Jd0QBbY2akb6qw','Default Map View','','home/map/map-templates/default-map-view',1238053232,1304392055,'3','7','3','WebGUI::Asset::Template',0,'Default Map View Default Map View home map map templates default map view Map/View','000001000001000020000001',NULL),('oHh0UqAJeY7u2n--WD-BAA','Default Edit Map Point','','home/map/map-templates/default-edit-map-point',1238040667,1304392055,'3','7','3','WebGUI::Asset::Template',0,'Default Edit Map Point Default Edit Map Point home map map templates default edit map point MapPoint/Edit','000001000001000020000002',NULL),('u9vfx33XDk5la1-QC5FK7g','Default Map Point View','','home/map/map-templates/default-map-point-view',1238048383,1304392055,'3','7','3','WebGUI::Asset::Template',0,'Default Map Point View Default Map Point View home map map templates default map point view MapPoint/View','000001000001000020000003',NULL),('kwTL1SWCk0GlpiJ5zAAEPQ','surveyedit.css','','root/import/survey/surveyedit.css',1244488512,1287545015,'3','7','12','WebGUI::Asset::Snippet',0,'surveyedit.css surveyedit.css root import survey surveyedit.css editor_container visibility hidden z-index 100 loading-mask position absolute left 0 top 0 width 100 height 100 z-index 20000 background-color white opacity:0.6 filter:alpha(opacity=60 loading position absolute left 50 top 50 padding 2px z-index 20001 height auto margin 35px 0 0 30px loading loading-indicator background url(^Extras(\"wobject/Survey/rel_interstitial_loading.gif no-repeat color 555 font bold 13px tahoma,arial,helvetica padding 18px 80px margin 0 text-align center height auto z-index 20002 div.testarea width 200px height 100px z-index 999 border 1px solid gray background f7f7f7 position absolute top 5 left:5 div.trashcan border 1px solid gray width 175px height 50px div.editarea margin-top:40px padding:10px float:left border 1px solid gray div.editquestion padding:10px float:left div.editanswer padding:10px float:left submitbutton padding:20px div.entry padding-bottom:10px padding-left:10px ul.draglist list-style none margin:0 padding:0 ul.draglist li margin 1px ul.questionList position relative background f7f7f7 border 1px solid gray list-style none margin:0 padding:0 min-height 40px li.section background-color CCCCFF border:1px solid 7EA6B2 cursor move min-height 10px li.question background-color D1E6EC border:1px solid 7EA6B2 cursor move padding-left:10px min-height 10px li.answer background-color F1FFB8 border:1px solid 7EA6B2 cursor move padding-left:15px min-height 10px sections-panel li.selected background-image url(^Extras(\"toolbar/bullet/moveRight.gif background-position:99 center background-repeat no-repeat font-weight:bold goto-yui-ac width:15em margin-top:0.5em wGwarning background-color:#FF6666 border:1px solid red margin:5px padding:10px warning padding 5px sections-panel bd overflow auto background-color:#fff padding:10px buttons height 30px sections-panel_c yui-resize yui-resize-handle-r right 6px make room for the scroll-bars sections-panel div.ft font-size 100 ','000001000001000042000014',NULL),('i5kt5aodVs_oepNEkE7Okw','poll.css','','poll.css',1242312883,1242312883,'3','7','12','WebGUI::Asset::Snippet',0,'poll.css poll.css poll.css styles for the poll asset pollColor background-color:#808080 pollOptions pollSubmit border:0 margin:0 padding:0 ','000001000001000027000002',NULL),('uCn31PzislTZlgt_79j7cQ','style.css','','css/style.css',1258524916,1258524916,'3','7','12','WebGUI::Asset::Snippet',0,'style.css style.css css style.css fail safe topWrapper font:82.5%/1.3 helvetica,arial,sans-serif width:98 overflow:hidden margin:0 auto 2em nav float:left width:20 margin:1em 0 2em nav menu list-style:none margin:0 padding:0 contentArea float:right width:77 margin:1em 0 2em padding:5px 1 border:1px solid ccc adminControls margin:1em 0 padding:1em 0 0 border-top:1px dotted ccc ','000001000001000041000006',NULL),('FJbUTvZ2nUTn65LpW6gjsA','Profile Account Layout','','root/import/account/profile/profile-account-layout',1227070381,1256092369,'3','7','12','WebGUI::Asset::Template',0,'Profile Account Layout Profile Account Layout root import account profile profile account layout Account/Layout','000001000001000002000001000001',NULL),('75CmQgpcCSkdsL-oawdn3Q','Default Edit Profile Template','','root/import/account/profile/default-edit-profile-template',1227052575,1253555614,'3','7','12','WebGUI::Asset::Template',0,'Default Edit Profile Template Default Edit Profile Template root import account profile default edit profile template Account/Profile/Edit','000001000001000002000001000002',NULL),('2CS-BErrjMmESOtGT90qOg','Default View Profile Template','','root/import/account/profile/default-view-profile-template',1227070888,1248549087,'3','7','12','WebGUI::Asset::Template',0,'Default View Profile Template Default View Profile Template root import account profile default view profile template Account/Profile/View','000001000001000002000001000003',NULL),('MBmWlA_YEA2I6D29OMGtRg','Default Profile Error Template','','root/import/account/profile/default-profile-error-template',1226542675,1248549086,'3','7','12','WebGUI::Asset::Template',0,'Default Profile Error Template Default Profile Error Template root import account profile default profile error template Account/Profile/Error','000001000001000002000001000004',NULL),('gfZOwaTWYjbSoVaQtHBBEw','Inbox Account Layout','','root/import/account/inbox-account-layout',1226974679,1249407461,'3','7','12','WebGUI::Asset::Template',0,'Inbox Account Layout Inbox Account Layout root import account inbox account layout Account/Layout','000001000001000002000002000001',NULL),('c8xrwVuu5QE0XtF9DiVzLw','Default Inbox View Template','','root/import/account/inbox/default-inbox-view-template',1226894351,1273032723,'3','7','12','WebGUI::Asset::Template',0,'Default Inbox View Template Default Inbox View Template root import account inbox default inbox view template Account/Inbox/View','000001000001000002000002000002',NULL),('0n4HtbXaWa_XJHkFjetnLQ','Default Inbox View Message Template','','root/import/account/inbox/default-inbox-view-message-template',1226894994,1248549086,'3','7','12','WebGUI::Asset::Template',0,'Default Inbox View Message Template Default Inbox View Message Template root import account inbox default inbox view message template Account/Inbox/ViewMessage','000001000001000002000002000003',NULL),('ErEzulFiEKDkaCDVmxUavw','Default Inbox Error Template','','root/import/account/inbox/default-inbox-error-template',1226895484,1248549086,'3','7','12','WebGUI::Asset::Template',0,'Default Inbox Error Template Default Inbox Error Template root import account inbox default inbox error template Account/Inbox/Error','000001000001000002000002000004',NULL),('6uQEULvXFgCYlRWnYzZsuA','Default Inbox Send Message Template','','root/import/account/inbox/default-inbox-send-message-template',1226896682,1279073450,'3','7','12','WebGUI::Asset::Template',0,'Default Inbox Send Message Template Default Inbox Send Message Template root import account inbox default inbox send message template Account/Inbox/SendMessage','000001000001000002000002000005',NULL),('DUoxlTBXhVS-Zl3CFDpt9g','Default Message Confirm Template','','root/import/account/inbox/default-message-confirm-template',1226896802,1248549086,'3','7','12','WebGUI::Asset::Template',0,'Default Message Confirm Template Default Message Confirm Template root import account inbox default message confirm template Account/Inbox/Confirm','000001000001000002000002000006',NULL),('1Q4Je3hKCJzeo0ZBB5YB8g','Default Manage Invitations Template','','root/import/account/inbox/default-manage-invitations-template',1226898445,1248549086,'3','7','12','WebGUI::Asset::Template',0,'Default Manage Invitations Template Default Manage Invitations Template root import account inbox default manage invitations template Account/Inbox/ManageInvitations','000001000001000002000002000007',NULL),('5A8Hd9zXvByTDy4x-H28qw','Default Invitation Confirmation Template','','root/import/account/inbox/default-invitation-confirmation-template',1226899462,1248549086,'3','7','12','WebGUI::Asset::Template',0,'Default Invitation Confirmation Template Default Invitation Confirmation Template root import account inbox default invitation confirmation template Account/Inbox/Confirm','000001000001000002000002000008',NULL),('VBkY05f-E3WJS50WpdKd1Q','Default View Invitation Template','','root/import/account/inbox/default-view-invitation-template',1226899241,1248549087,'3','7','12','WebGUI::Asset::Template',0,'Default View Invitation Template Default View Invitation Template root import account inbox default view invitation template Account/Inbox/ViewInvitation','000001000001000002000002000009',NULL),('XgcsoDrbC0duVla7N7JAdw','Default Invite User Email Template','','root/import/account/inbox/default-invite-user-email-template',1226973330,1248549086,'3','7','12','WebGUI::Asset::Template',0,'Default Invite User Email Template Default Invite User Email Template root import account inbox default invite user email template Account/Inbox/InviteUserMessage','000001000001000002000002000010',NULL),('cR0UFm7I1qUI2Wbpj--08Q','Default Invite User Form Template','','root/import/account/inbox/default-invite-user-form-template',1226964738,1248549086,'3','7','12','WebGUI::Asset::Template',0,'Default Invite User Form Template Default Invite User Form Template root import account inbox default invite user form template Account/Inbox/InviteUser','000001000001000002000002000011',NULL),('SVIhz68689hwUGgcDM-gWw','Default Invite User Confirm Template','','root/import/account/inbox/default-invite-user-confirm-template',1226973314,1248549086,'3','7','12','WebGUI::Asset::Template',0,'Default Invite User Confirm Template Default Invite User Confirm Template root import account inbox default invite user confirm template Account/Inbox/InviteUserConfirm','000001000001000002000002000012',NULL),('zrNpGbT3odfIkg6nFSUy8Q','Friends Layout Template','','root/import/account/friends/friends-layout-template',1226994016,1249407461,'3','7','12','WebGUI::Asset::Template',0,'Friends Layout Template Friends Layout Template root import account friends friends layout template Account/Layout','000001000001000002000003000001',NULL),('1Yn_zE_dSiNuaBGNLPbxtw','Default Friends View Template','','root/import/account/friends/default-friends-view-template',1226994422,1248549086,'3','7','12','WebGUI::Asset::Template',0,'Default Friends View Template Default Friends View Template root import account friends default friends view template Account/Friends/View','000001000001000002000003000002',NULL),('AZFU33p0jpPJ-E6qLSWZng','Default Friends Edit Template','','root/import/account/friends/default-friends-edit-template',1226994865,1248549086,'3','7','12','WebGUI::Asset::Template',0,'Default Friends Edit Template Default Friends Edit Template root import account friends default friends edit template Account/Friends/Edit','000001000001000002000003000003',NULL),('AGJBGviWGAwjnwziiPjvDg','Default Send Request Template','','root/import/account/friends/default-send-request-template',1226995497,1248549087,'3','7','12','WebGUI::Asset::Template',0,'Default Send Request Template Default Send Request Template root import account friends default send request template Account/Friends/SendRequest','000001000001000002000003000004',NULL),('7Ijdd8SW32lVgg2H8R-Aqw','Default Friends Error Template','','root/import/account/friends/default-friends-error-template',1226995714,1248549086,'3','7','12','WebGUI::Asset::Template',0,'Default Friends Error Template Default Friends Error Template root import account friends default friends error template Account/Friends/Error','000001000001000002000003000005',NULL),('K8F0j_cq_jgo8dvWY_26Ag','Default Friends Confirmation Template','','root/import/account/friends/default-friends-confirmation-template',1226995643,1248549086,'3','7','12','WebGUI::Asset::Template',0,'Default Friends Confirmation Template Default Friends Confirmation Template root import account friends default friends confirmation template Account/Friends/Confirm','000001000001000002000003000006',NULL),('G5V6neXIDiFXN05oL-U3AQ','Default Remove Friends Confirmation Template','','root/import/account/friends/default-remove-friends-confirmation-template',1226995768,1248549087,'3','7','12','WebGUI::Asset::Template',0,'Default Remove Friends Confirmation Template Default Remove Friends Confirmation Template root import account friends default remove friends confirmation template Account/Friends/Confirm','000001000001000002000003000007',NULL),('9ThW278DWLV0-Svf68ljFQ','Account Layout','','root/import/account/user/account-layout',1226647187,1249407460,'3','7','12','WebGUI::Asset::Template',0,'Account Layout Account Layout root import account user account layout Account/Layout','000001000001000002000004000001',NULL),('aUDsJ-vB9RgP-AYvPOy8FQ','Shop Account Layout','','root/import/account/shop/shop-account-layout',1226660439,1263962529,'3','7','12','WebGUI::Asset::Template',0,'Shop Account Layout Shop Account Layout root import account shop shop account layout Account/Layout','000001000001000002000005000001',NULL),('-zxyB-O50W8YnL39Ouoc4Q','Default My Sales Template','','root/import/default-my-sales-template',1236959717,1248563425,'3','7','12','WebGUI::Asset::Template',0,'Default My Sales Template Default My Sales Template root import default my sales template Shop/MySales','000001000001000002000005000002',NULL),('b4n3VyUIsAHyIvT-W-jziA','Contributions Layout','','root/import/account/contributions/contributions-layout',1227074747,1249407461,'3','7','12','WebGUI::Asset::Template',0,'Contributions Layout Contributions Layout root import account contributions contributions layout Account/Layout','000001000001000002000006000001',NULL),('1IzRpX0tgW7iuCfaU2Kk0A','Default Contributions View','','root/import/account/contributions/default-contributions-view',1227079721,1250243000,'3','7','12','WebGUI::Asset::Template',0,'Default Contributions View Default Contributions View root import account contributions default contributions view Account/Contrib/View','000001000001000002000006000002',NULL),('N716tpSna0iIQTKxS4gTWA','Default Account Layout','','root/import/account/default-account-layout2',1226604666,1281501163,'3','7','12','WebGUI::Asset::Template',0,'Default Account Layout Default Account Layout root import account default account layout2 Account/Layout','000001000001000002000007',NULL),('CalendarMonth000000001','Default Calendar Month','','root/import/calendar-templates/default-calendar-month',1204890713,1279073449,'3','7','12','WebGUI::Asset::Template',0,'Default Calendar Month Default Calendar Month root import calendar templates default calendar month Calendar/Month','000001000001000006000007',NULL),('q5O62aH4pjUXsrQR3Pq4lw','Default Gallery View Album Thumbnails','','root/import/gallery-templates/default-gallery-view-album-thumbnails',1197825772,1285124155,'3','7','3','WebGUI::Asset::Template',0,'Default Gallery View Album Thumbnails Default Gallery View Album Thumbnails root import gallery templates default gallery view album thumbnails GalleryAlbum/ViewThumbnails','000001000001000015000004',NULL),('kaPRSaf8UKiskiGEgJgLAw','images','','root/import/gallery-templates/images',1197330678,1285124155,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'images images root import gallery templates images','000001000001000015000017',NULL),('matrixtmpl000000000001','Matrix Default View','','matrix-default-view-template',1133743238,1281501162,'3','7','12','WebGUI::Asset::Template',0,'Matrix Default View Matrix Default View matrix default view template Matrix','000001000001000022000002',NULL),('matrixtmpl000000000003','Matrix Default Detailed Listing','','matrix-default-detailed-listing',1133743238,1281501163,'3','7','12','WebGUI::Asset::Template',0,'Matrix Default Detailed Listing Matrix Default Detailed Listing matrix default detailed listing Matrix/Detail','000001000001000022000003',NULL),('alraubvBu-YJJ614jAHD5w','matrix-nav-tmpl','','new-matrix/matrix-nav-tmpl',1232664015,1281501163,'3','7','12','WebGUI::Asset::Template',0,'matrix-nav-tmpl matrix-nav-tmpl new matrix matrix nav tmpl Navigation','000001000001000022000009',NULL),('PBtmpl0000000000000062','Default Gradebook Report','','root/import/survey/default-gradebook-report',1124395696,1250243000,'3','7','12','WebGUI::Asset::Template',0,'Default Gradebook Report Default Gradebook Report root import survey default gradebook report Survey/Gradebook','000001000001000042000002',NULL),('d8jMMMRddSQ7twP4l1ZSIw','Default Survey Take','','root/import/survey/default-survey-take',1227248175,1253555614,'3','7','12','WebGUI::Asset::Template',0,'Default Survey Take Default Survey Take root import survey default survey take Survey/Take','000001000001000042000005',NULL),('E3tzZjzhmYoNlAyP2VW33Q','Edit Story','','root/import/storymanager/editstory',1239236292,1303183716,'3','7','4','WebGUI::Asset::Template',0,'Edit Story Edit Story root import storymanager editstory Story/Edit','000001000001000040000003',NULL),('TbDcVLbbznPi0I0rxQf2CQ','Story Template Topic','','root/import/storymanager/storytemplatetopic',1237524306,1253636379,'3','7','4','WebGUI::Asset::Template',0,'Story Template Topic Story Template Topic root import storymanager storytemplatetopic Story','000001000001000040000004',NULL),('brxm_faNdZX5tRo3p50g3g','Map Templates','','home/map/map-templates',1238054297,1304392055,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'Map Templates Map Templates home map map templates','000001000001000020',NULL),('i9-G00ALhJOr0gMh-vHbKA','Inbox SMS Notification','','root/import/inbox-sms-notification',1250408924,1250408924,'3','7','4','WebGUI::Asset::Template',0,'Inbox SMS Notification Inbox SMS Notification root import inbox sms notification Account/Inbox/Notification','000001000001000002000002000014',NULL),('S3zpVitAmhy58CAioH359Q','Default Test Results','','root/import/survey/default-test-results',1242893798,1250243000,'3','7','12','WebGUI::Asset::Template',0,'Default Test Results Default Test Results root import survey default test results Survey/TestResults','000001000001000042000013',NULL),('b1316COmd9xRv4fCI3LLGA','Inbox Notification','','inbox_notification',1236956475,1236956475,'3','7','4','WebGUI::Asset::Template',0,'Inbox Notification Inbox Notification inbox notification Account/Inbox/Notification','000001000001000002000002000013',NULL),('nWNVoMLrMo059mDRmfOp9g','Default Feedback','','root/import/survey/default-feedback',1242259265,1250243000,'3','7','12','WebGUI::Asset::Template',0,'Default Feedback Default Feedback root import survey default feedback Survey/Feedback','000001000001000042000015',NULL),('l0guT3vTR3B8cL6vtP-g3A','Contribute','You don\'t have to be a developer to become a project contributor. Examples of how you can contribute include:\n \n\nTranslators - Visit i18n.webgui.org\n and either help translate a few items in an existing language, or \ncreate a new translation. \nGraphic Des','contribute',1271445611,1285124369,'3','7','3','WebGUI::Asset::Wobject::Article',1,'Contribute contribute contribute You don\'t have to be a developer to become a project contributor Examples of how you can contribute include Translators Visit i18n.webgui.org and either help translate a few items in an existing language or create a new translation Graphic Designers Create WebGUI style themes icons or fix UI bugs You can contribute your items to WebGUI\'s Addons and Plugins area for others to download and use Usability Experts Help make WebGUI more accessable and easier to use by submitting RFEs Even better submit an RFE that\'s ready to implement by including the code Doc Writers Write documents in WebGUI\'s wiki help out on the boards improve WebGUI\'s built in documentation Testers Validate WebGUI\'s features against its documentation search for errors and report bugs Test writers If you have some Perl abilities you can help develop unit tests to make sure the WebGUI API is behaving as documented Developers Write a new feature for WebGUI like a macro asset wobject auth module or workflow activity and contribute it to the Addons and Plugins If you\'re interested in developing for WebGUI be sure to check out the Development Best Practices wiki article Bug Fixers Cruise the bug list and submit patches to correct the problem Core Developers Becoming a core developer is a privilege To earn it you have to demonstrate through bug fixes and/or contributions that you can make sound programming decisions without the need for someone to scrutinize everything you check in WebGUI is a very large and complex application so getting to this level can take some time Core developers are developers with commit privileges to the subversion repository Advocate Spread the word about WebGUI tell people about how you use it and how it\'s helped you.Encourage people to try it out Marketing and Promotion If you have a talent for marketing advertising or promotion you can be a super advocate Have a marketing idea Contact tavis AT plainblack DOT com Make a WebGUI banner or print ad and contribute it Maybe you have a design for a cool wallpaper or t-shirt anything to get the word out ','000001000002000004000002',NULL),('D6cJpRcey35aSkh9Q_FPUQ','Default EU User Screen','','root/import/default-eu-user-screen',1242407725,1326776037,'3','7','12','WebGUI::Asset::Template',0,'Default EU User Screen Default EU User Screen root import default eu user screen TaxDriver/EU/User','000001000001000036000019',NULL),('lo1rpxn3t8YPyKGers5eQg','Friend Manager','Templates for the Friend Manager ','root/import/account/friendmanager',1238625621,1238625621,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Friend Manager Friend Manager root import account friendmanager Templates for the Friend Manager','000001000001000002000010',NULL),('64tqS80D53Z0JoAs2cX2VQ','FriendManager View Template','','root/import/account/friendmanager/view',1239400975,1295931508,'3','7','4','WebGUI::Asset::Template',0,'FriendManager View Template FriendManager View Template root import account friendmanager view Account/FriendManager/View','000001000001000002000010000001',NULL),('lG2exkH9FeYvn4pA63idNg','Friend Manager Edit Friends','','root/import/account/friendmanager/edit',1239383808,1289967962,'3','7','4','WebGUI::Asset::Template',0,'Friend Manager Edit Friends Friend Manager Edit Friends root import account friendmanager edit Account/FriendManager/Edit','000001000001000002000010000002',NULL),('newslettercs0000000001','Newsletter Manager (default)','','newslettercstemplate',1185754569,1252682678,'3','7','3','WebGUI::Asset::Template',0,'Newsletter Manager default Newsletter Manager newslettercstemplate Collaboration','000001000001000026000002',NULL),('iCM9pRY5yYyjufROgaCDlg','storyManager.css','','storymanager.css',1253305659,1253305659,'3','7','12','WebGUI::Asset::Snippet',0,'storyManager.css storyManager.css storymanager.css editStory width 100 editStory legend font-size 1.8em border-bottom 2px solid editStory tbody width 943px editStory td padding 5px editStory story float:left editStory story label editStory photo label display block width 100 text-align right editStory photoContainer border 1px solid float:left margin 10px 0 0 20px editStory photoContainer photoHeader font-size 1.2em font-weight bold editStory buttons clear both text-align right padding 10px 0 editStory story_formId_tbl width 100 important editStory fieldset border none storyArchive width 100 storyArchive h3 border-bottom 2px solid margin-bottom 10px storyArchive storyList list-style-type none padding-left 0 storyArchive storyList li padding-left 10px margin-bottom 10px storyArchive pagination float left list-style-type none storyArchive keywords width 100 clear both storyArchive img border none storyArchive controls a margin-right 10px viewStory storyTitle viewStory storyUpdated viewStoryTopic storyTitle viewStoryTopic storyUpdated float left viewStory storyTitle viewStoryTopic storyTitle font-size 1.5em width 100 viewStory storyHighlights viewStoryTopic storyHighlights float:right margin-top 1.5em viewStory storyPhoto viewStoryTopic storyPhoto float left margin 0 10px 10px 0 viewStory photoCaption viewStoryTopic photoCaption width 496px padding 5px display:block viewStory clear viewStoryTopic clear clear both storyTopic width 100 storyTopic h3 border-bottom 2px solid storyTopic topStory width 340px float left storyTopic storyList width 250px float left storyTopic storyListBig width 100 float left htmltagcloud wg-clear clear:both ','000001000001000040000007',NULL),('zb_OPKNqcTuIjdvvbEkRjw','article.css','','article.css',1247484073,1256092368,'3','7','12','WebGUI::Asset::Snippet',0,'article.css article.css article.css styles for the article asset withImage articleContent linkedImage articleContent width:100 overflow:hidden withImage articleImage linkedImage articleImage float:right margin:0 0 10px 10px linkedImage caption display:block ','000001000001000004000005',NULL),('PBtmpl0000000000000210','Request Tracker Post Form','','request-tracker-template2',1147642410,1277868922,'3','7','12','WebGUI::Asset::Template',0,'Request Tracker Post Form Request Tracker Post Form request tracker template2 Collaboration/PostForm','000001000001000008000028',NULL),('pbrobot000000000000001','robots.txt','','robots.txt',1147642511,1256092369,'3','7','12','WebGUI::Asset::Snippet',0,'robots.txt robots.txt robots.txt User-agent Disallow op=auth Disallow op=account Disallow op=ajaxGetI18N Disallow op=makePrintable Disallow op=viewHelp Disallow op=viewHelpIndex','000001000001000033',NULL),('4qh0kIsFUdd4Ox-Iu1JZgg','EMS','','root/import/ems',1208725439,1257311886,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'EMS EMS root import ems','000001000001000012',NULL),('hreA_bgxiTX-EzWCSZCZJw','Print Remaining Tickets Template (default)','','root/import/ems/default-print-remaining-tickets-template',1257311887,1257311887,'3','7','12','WebGUI::Asset::Template',0,'Print Remaining Tickets Template default Print Remaining Tickets Template default root import ems default print remaining tickets template EMS/PrintRemainingTickets','000001000001000012000008',NULL),('P_4uog81vSUK4KxuW_4GUA','css','','css',1258524916,1258524916,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'css css css','000001000001000054',NULL),('H_-8zjtWsO1FUpQqNtkxNQ','wg-base.css','','css/wg-base.css',1258524916,1258524916,'3','7','12','WebGUI::Asset::Snippet',0,'wg-base.css wg-base.css css wg base.css In this stylesheet you can find the styles that are used in more than one template For example file/attachment icons pagination etc Elements that are styled with this stylesheet have a classname that starts with wg general wg-icon border:0px none vertical-align middle wg-clear clear:both inline list pagination wg-inline margin:0 0 1em padding:0 wg-inline li display:inline margin:0 padding:0 wg-inline li.active font-weight:bold forms wg-captchaImage border:0 none vertical-align:middle margin-left:5px ','000001000001000054000001',NULL),('0iMMbGN3BevuCBHjjLiQNA','WebGUI/Deactivate','','root/import/auth/webgui/deactivate',1269401469,1287545015,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'WebGUI/Deactivate WebGUI/Deactivate root import auth webgui deactivate','000001000001000005000009',NULL),('zaHUYsE_PgKk8hnVd8ffEQ','WebGUI Deactivate Account Template','','default_webgui_deactivate_account_template',1269401469,1287545015,'3','7','12','WebGUI::Asset::Template',0,'WebGUI Deactivate Account Template WebGUI Deactivate Account Template default webgui deactivate account template Auth/WebGUI/Deactivate','000001000001000005000009000001',NULL),('6A4yIjWwJfIE0Ep-I0jutg','LDAP/Deactivate','','root/import/auth/ldap/deactivate',1269401469,1287545015,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'LDAP/Deactivate LDAP/Deactivate root import auth ldap deactivate','000001000001000005000010',NULL),('_P4PMiraGsLTfOjK4fYQPQ','LDAP Deactivate Account Template','','default_ldap_deactivate_account_template',1269401469,1287545015,'3','7','12','WebGUI::Asset::Template',0,'LDAP Deactivate Account Template LDAP Deactivate Account Template default ldap deactivate account template Auth/LDAP/Deactivate','000001000001000005000010000001',NULL),('_XfvgNH__bY1ykMiKYSobQ','account.css','','root/import/account/account.css',1233168041,1281501163,'3','7','12','WebGUI::Asset::Snippet',0,'account.css account.css root import account account.css general WGsubContent WGsubContent a WGsubContent a:link color:#000000 important WGbutton float:right padding-right:10px centered text-align center WGaccount_message background-color white border solid BECEF8 1px height 300px margin-bottom 10px margin-left 60px margin-top 20px overflow:-moz-scrollbars-vertical overflow-x:hidden overflow-y:scroll padding:10px text-align left vertical-align:top width 90 WGprofileMember font-size:9px margin-right:20px text-align:right WGmember color:#3e4f77 font 9px Verdana Arial Helvetica sans-serif text-align:center WGphotostyle border:solid 3e4f77 2px margin-bottom:5px margin-top:5px rightalign float right WGsend float:right padding-right 75px bio addtonetwork network WGbordered border-bottom dashed BECEF8 2px padding-bottom 10px WGfriendpic border solid BECEF8 1px WGinvitemsg width 600px height 150px ol.WGProfile_interests color:#0B2259 font-size:15px font-weight:bold list-style-type:none margin:0px padding:0px padding:5px 5px ol.WGProfile_interests li margin-bottom:15px ol.WGProfile_interests span font-size:12px font-weight:normal color:black WGpBio border-bottom:solid DDE6FB 1px margin:0px margin-bottom:5px padding-bottom:5px WGpBio div background-color:#DDE6FB padding:2px 5px margin-bottom:2px WGprogram font-size 9px contributions WGContribCount font-size:12px text-align:left padding:3px WGContribTitle background-color:#f2f5fa border solid d8dee8 1px color:#0B2259 font-size:12px font-weight:bold min-height:25px padding:3px text-align:center text-decoration underline WGContribTitleLeft background-color:#f2f5fa border solid d8dee8 1px color:#0B2259 font-size:12px font-weight:bold min-height:25px padding:3px text-align:center text-decoration underline WGContribEntry text-align:center padding:3px WGContribEntryLeft text-align:left padding:3px edit box WGeditBox background:white url(images/edit_box_bg.jpg no-repeat bottom left border:solid 8DABF1 2px display:block font-family:verdana font-size:9px font-weight:bold left:100px moz-box-sizing:border-box padding:5px position:absolute top:100px width:590px z-index:100 WGeditBox input WGeditBox select font-size:9px friends WGfriends_name font-weight:bold width:90 WGfriends_photo font-weight:bold width:10 WGfriends_photo img height 50px width 50px WGfriends_private float:right padding-bottom 5px width 50 WGfriends_ninety vertical-align:top width 90 WGfriends_seventy vertical-align:top width 70 WGfriends_ten width 10 WGfriends_ten img height 50px width 50px WGfriends_twenty width 20 WGaccepts padding-bottom 5px inbox WGProfile_msgcontainer padding:2px WGinbox_count font-size:12px font-weight:bold padding:3px text-align:left WGinbox_errors font-weight:bold color:red text-align:center WG_inbox_InviteLabel width:50px text-align:right WG_inbox_InviteLabelView font-weight:bold width:120px WGmsgcontainer padding:6px display:block margin-bottom:6px inbox contacts WGdatacells border-bottom dashed BECEF8 1px WGinbox_contactsTbl background-color:#EEF2FD font-family:arial font-size:9pt width:100 contacts height 275px overflow auto inbox forms WGbuttons_left float left WGbuttons_right float right WGinbox_from color black font-weight normal text-decoration none WGinbox_subject width 530px WGinbox_messageTo background-color white border solid BECEF8 1px height 50px overflow:-moz-scrollbars-vertical overflow-x:hidden overflow-y:scroll width 530px inbox pagination WGinbox_buttons display:inline float:left font-size:10px text-align:left width:70 WGinbox_pagination display:inline text-align:right width:20 WGinbox_messagerpp font-size:10px display:inline text-align:right width:20 WGmessage display:inline float:left font-size:10px text-align:left width:70 WGmessagerpp font-size:10px display:inline text-align:right float right WG-previous-next float right inbox threads WGevenThread background-color e1e8fb border-bottom 1px solid bfcef9 padding 8px text-align:center WGoddThread background-color eef2fd border-bottom 1px solid bfcef9 padding 8px text-align center pagination WGProfile_pagination font-size:10px text-align:right width:20 WGProfile_messagerpp font-size:10px display:inline text-align:right width:20 WGProfile_paginationLeft font-size:10px text-align:left width:20 WGProfile_paginationCenter font-size:10px text-align:center width:20 WGProfile_pagination a background-color:#f2f5fa border:solid bfc8dc 1px font-size:10px font-weight:bold padding:1px 5px text-decoration:none WGProfile_pagination a:hover background-color:#d8dee8 color:white WGProfile_pagination prevNext background-color transparent border none color black WGProfile_pagination prevNext:hover background-color transparent border none color black WGProfile_pagination active background-color:#d8dee8 border:solid bfc8dc 1px color:white font-size:10px font-weight:bold padding:1px 5px text-decoration:none WGProfile_pagination img vertical-align:middle margin-top:2px border:none profile WGProfile_registration background:none border:none font-size:9pt font-family:arial margin:0 padding:0 width:100 WGProfile_registration header background-color:#818997 color:#3e4f77 font-size:10px font-weight:bold text-align:left WGProfile_registration header a color:white text-decoration:none WGProfile_registration help a font-weight:bold text-decoration:none WGProfile_registration inputText font-size:10px margin-right:1px WGProfile_registration label font-size:9pt font-weight:bold text-align:right white-space:nowrap width:1 WGProfile_registration labelLeft font-size:9pt font-weight:bold white-space:nowrap width:1 text-align left vertical-align top WGProfile_registration smallLabel font-size:8px text-align:center WGProfile_registration smallText font-size:9px WGinboxTbl display:block margin 4px padding 2px WGProfile_registration bar WGProfile_registration barRight background-color:#f2f5fa border solid d8dee8 1px color:#3e4f77 font-size:14px font-weight:bold margin:10px 0px 10px 0px min-height:25px padding:4px 4px 0px 4px vertical-align:middle WGProfile_registration bar text-align center WGProfile_registration barRight text-align right WGProfile_registration bar a color:#0B2259 font-size:10px font-weight:bold WGProfile_registration barFive background-color:#f2f5fa border solid d8dee8 1px color:#3e4f77 font-size:14px font-weight:bold text-align:center margin-right:3px min-height:25px padding:2px width:4.3 WGProfile_registration barTen background-color:#f2f5fa border solid d8dee8 1px color:#3e4f77 font-size:14px font-weight:bold min-height:25px padding:2px text-align:center width:7.2 WGProfile_registration barFifteen background-color:#f2f5fa border solid d8dee8 1px color:#3e4f77 font-size:14px font-weight:bold margin-right:3px min-height:25px padding:2px text-align:center width:15 WGProfile_registration barFifty background-color:#f2f5fa border solid d8dee8 1px color:#3e4f77 font-size:14px font-weight:bold margin-right:3px min-height:25px padding:2px text-align:center width:50 WGbarContainer display:block margin:10px 0px 10px 0px width:100 profile edit WGfields padding 2px WGfields_left padding:2px vertical-align:top width 15 WGfields_right display:inline float:right padding:2px text-align:right width:80 vertical-align top WGProfile display:table margin 0 padding 0 width:100 WGProfileFields border:0 padding 0 margin:0 width 100 WGProfileFields ol display inline list-style-type none WGProfileFields ul list-style-type none display inline WGProfileFields ul li display inline-block display inline zoom 1 profile view WGProfile_accepts text-align:right background-color:gray padding:4px width:100 WGviewContainer margin:0 padding:0 width:90 WGinternational background-color:red color:white display:inline font-weight:bold padding:4px text-align:center WGcategoryLabel vertical-align:top width:90 WGprivateMessage background-color:gray padding:4px text-align:right WGprofileAlert background-color:red color:white font-weight:bold padding:4px text-align:center width:100 WGprofilePhoto vertical-align:top profile errors WGprofileErrors background-color ff0000 color ffffff font-weight bold text-align center WGprofilefield_required_off WGprofilefield_required background-color ffd6bb WGprofilefield_error background-color FF9494 WGerrorMsg font-weight:bold color:red text-align:center user WGuserInvite_subject background-color white border solid BECEF8 1px height 25px text-align left width 500px margin-left 50px margin-bottom 20px overflow:-moz-scrollbars-vertical overflow-x:hidden overflow-y:scroll view profile WGprofile_canEdit text-align:center background-color:red padding:4px color:white font-weight:bold WGprofile_fieldLabel background DDE6FB padding:2px width:200px WGprofile_fieldData margin-left 5px WGprofile_fieldStatus padding:4px color:white font-weight:bold TABS TABS outer WGbottombutton float:right padding-right:2px padding-top 2px position relative WGcontent padding:10px WGcleartab clear both height:0 WGsubContent color setting for border under outer tabs that surrounds inner tabs border solid d8dee8 6px WGtopbutton float:right clear:both padding-right:2px padding-top 2px position relative ul.WGtopTabs ul.WGtopTabs li list-style-type:none margin:10px 0px 0px 0px padding:0px position:relative width:auto Xposition:relative zoom:1 ul.WGtopTabs li display:block float:left margin-right 3px ul.WGtopTabs li b background-color eef2fd border-top:solid d8dee8 1px display:block padding:4px 8px position:relative top:-1px ul.WGtopTabs a non-selected tabs color settings display:block color:#9ea0bb important font-size:12px font-family Arial Helvetica sans-serif text-decoration:none background-color:#f2f5fa border-left solid d8dee8 1px border-right solid d8dee8 1px ul.WGtopTabs a:hover ul.WGtopTabs a:hover b ul.WGtopTabs a.selected ul.WGtopTabs a.selected b selected tab color settings background-color:#d8dee8 color:#3e4f77 text-align right TABS YUI WGcleardiv clear both margin 0px 0px 0px 0px padding 0px WGviewProfile wgView border none font bold 10px Verdana color 3e4f77 text-decoration:none WGview position absolute right 4px top:4px WGprofile_displayView x-system-font:none border:medium none color:#0B2258 display:inline float:right font-family:Verdana font-size:10px font-size-adjust:none font-stretch:normal font-style:normal font-variant:normal font-weight:bold line-height:normal padding-right:8px padding-top:3px text-decoration none WGprofile_displaySubContent border around friends tab content border solid d8dee8 6px border-top solid d8dee8 18px Copyright c 2008 Yahoo Inc All rights reserved Code licensed under the BSD License http://developer.yahoo.net/yui/license.txt version 2.6.0 yui tabs color settings below yui-navset defaults to yui-navset-top WGsubContent yui-skin-sam yui-navset yui-nav WGsubContent yui-skin-sam yui-navset yui-navset-top yui-nav protect nested tabviews from other orientations border:solid eef2fd color between tab list and content border-width:0 0 5px Xposition:relative zoom:1 WGsubContent yui-skin-sam yui-navset yui-nav a WGsubContent yui-skin-sam yui-navset yui-navset-top yui-nav a background:#ffffff tab background border:solid ffffff border-width:0 1px color:#bfccdd position:relative text-decoration:none font-size:12px font-family Arial Helvetica sans-serif font-weight bold WGsubContent yui-skin-sam yui-navset yui-nav a em WGsubContent yui-skin-sam yui-navset yui-navset-top yui-nav a em border:solid eef2fd border-width:1px 0 0 cursor:hand padding:0.25em 75em left:0 right 0 bottom 0 protect from other orientations top:-1px for 1px rounded corners position:relative WGsubContent yui-skin-sam yui-navset yui-nav selected a WGsubContent yui-skin-sam yui-navset yui-nav selected a:focus no focus effect for selected WGsubContent yui-skin-sam yui-navset yui-nav selected a:hover no hover effect for selected background eef2fd selected tab background color 3e4f77 font-size:12px font-family Arial Helvetica sans-serif text-decoration:none font-weight bold WGsubContent yui-skin-sam yui-navset yui-nav selected a WGsubContent yui-skin-sam yui-navset yui-nav selected a em border-color:#eef2fd selected tab border color WGsubContent yui-skin-sam yui-navset yui-nav a:hover WGsubContent yui-skin-sam yui-navset yui-nav a:focus background eef2fd hover tab background color 3e4f77 outline:0 font-size:12px font-family Arial Helvetica sans-serif text-decoration:none font-weight bold WGsubContent yui-skin-sam yui-navset yui-content background eef2fd content background color WGsubContent yui-skin-sam yui-navset yui-content WGsubContent yui-skin-sam yui-navset yui-navset-top yui-content border:5px solid eef2fd content border padding:0.75em 1em content padding left and right orientations WGsubContent yui-skin-sam yui-navset-left yui-nav WGsubContent yui-skin-sam yui-navset yui-navset-left yui-nav WGsubContent yui-skin-sam yui-navset yui-navset-right yui-nav WGsubContent yui-skin-sam yui-navset-right yui-nav border-width:0 5px 0 0 Xposition:absolute from tabview-core have to reiterate for skin-sam due to pos:rel on skin-sam yui-nav top:0 bottom:0 stretch to fill content height WGsubContent yui-skin-sam yui-navset yui-navset-right yui-nav WGsubContent yui-skin-sam yui-navset-right yui-nav border-width:0 0 0 5px WGsubContent yui-skin-sam yui-navset-left yui-nav li WGsubContent yui-skin-sam yui-navset yui-navset-left yui-nav li WGsubContent yui-skin-sam yui-navset-right yui-nav li margin:0 0 0.3em space between tabs padding:0 0 0 1px gecko make room for overflow WGsubContent yui-skin-sam yui-navset-right yui-nav li padding:0 1px 0 0 gecko make room for overflow WGsubContent yui-skin-sam yui-navset-left yui-nav selected WGsubContent yui-skin-sam yui-navset yui-navset-left yui-nav selected margin:0 1px 0.16em 0 WGsubContent yui-skin-sam yui-navset-right yui-nav selected margin:0 0 0.16em 1px WGsubContent yui-skin-sam yui-navset-left yui-nav a WGsubContent yui-skin-sam yui-navset-right yui-nav a border-width:1px 0 WGsubContent yui-skin-sam yui-navset-left yui-nav a em WGsubContent yui-skin-sam yui-navset yui-navset-left yui-nav a em WGsubContent yui-skin-sam yui-navset-right yui-nav a em border-width:0 0 0 1px padding:0.2em 75em top:auto left:-1px for 1px rounded corners WGsubContent yui-skin-sam yui-navset-right yui-nav a em border-width:0 1px 0 0 left:auto right:-1px for 1px rounded corners WGsubContent yui-skin-sam yui-navset-left yui-nav a WGsubContent yui-skin-sam yui-navset-left yui-nav selected a WGsubContent yui-skin-sam yui-navset-left yui-nav a:hover WGsubContent yui-skin-sam yui-navset-right yui-nav a WGsubContent yui-skin-sam yui-navset-right yui-nav selected a WGsubContent yui-skin-sam yui-navset-right yui-nav a:hover WGsubContent yui-skin-sam yui-navset-bottom yui-nav a WGsubContent yui-skin-sam yui-navset-bottom yui-nav selected a WGsubContent yui-skin-sam yui-navset-bottom yui-nav a:hover background-image:none no left-right or bottom-top gradient WGsubContent yui-skin-sam yui-navset-left yui-content border:1px solid d8dee8 content border bottom orientation WGsubContent yui-skin-sam yui-navset-bottom yui-nav WGsubContent yui-skin-sam yui-navset yui-navset-bottom yui-nav border-width:5px 0 0 color between tab list and content WGsubContent yui-skin-sam yui-navset yui-navset-bottom yui-nav selected WGsubContent yui-skin-sam yui-navset-bottom yui-nav selected margin:-1px 0.3em 0 0 for overlap WGsubContent yui-skin-sam yui-navset yui-navset-bottom yui-nav li WGsubContent yui-skin-sam yui-navset-bottom yui-nav li padding:0 0 1px 0 gecko make room for overflow vertical-align:top WGsubContent yui-skin-sam yui-navset yui-navset-bottom yui-nav li a WGsubContent yui-skin-sam yui-navset-bottom yui-nav li a WGsubContent yui-skin-sam yui-navset yui-navset-bottom yui-nav a em WGsubContent yui-skin-sam yui-navset-bottom yui-nav a em border-width:0 0 1px top:auto bottom:-1px for 1px rounded corners WGsubContent yui-skin-sam yui-navset-bottom yui-content WGsubContent yui-skin-sam yui-navset yui-navset-bottom yui-content border:1px solid f2f5fa content border WGsubContent yui-skin-sam background-color d8dee8 padding 10px 5 5 5px display:block yui tab placement settings below WGsubContent yui-skin-sam yui-navset yui-nav li WGsubContent yui-skin-sam yui-navset yui-navset-top yui-nav li margin:0 0.3em 0 0 space between tabs padding:5px 0 0 gecko make room for overflow zoom:1 WGsubContent yui-skin-sam yui-navset yui-nav selected WGsubContent yui-skin-sam yui-navset yui-navset-top yui-nav selected margin:0 0.3em 1px 0 for overlap WGsubContent yui-navset yui-nav li,.yui-navset yui-navset-top yui-nav li WGsubContent yui-navset yui-navset-bottom yui-nav li margin:0 0.5em 0 0 WGsubContent yui-navset-left yui-nav li,.yui-navset-right yui-nav li margin:0 0 0.5em WGsubContent yui-navset yui-content yui-hidden display:none WGsubContent yui-navset yui-navset-left yui-nav,.yui-navset yui-navset-right yui-nav WGsubContent yui-navset-left yui-nav,.yui-navset-right yui-nav width:6em WGsubContent yui-navset-top yui-nav,.yui-navset-bottom yui-nav width:auto WGsubContent yui-navset yui-navset-left,.yui-navset-left padding:0 0 0 6em WGsubContent yui-navset-right padding:0 6em 0 0 WGsubContent yui-navset-top,.yui-navset-bottom padding:auto WGsubContent yui-nav,.yui-nav li list-style:none margin:0 padding:0 WGsubContent yui-navset li em font-style:normal WGsubContent yui-navset position:relative zoom:1 WGsubContent yui-navset yui-content zoom:1 WGsubContent yui-navset yui-nav li,.yui-navset yui-navset-top yui-nav li WGsubContent yui-navset yui-navset-bottom yui-nav li display:inline-block display:-moz-inline-stack display:inline vertical-align:bottom cursor:pointer zoom:1 WGsubContent yui-navset-left yui-nav li,.yui-navset-right yui-nav li display:block WGsubContent yui-navset yui-nav a position:relative WGsubContent yui-navset yui-nav li a,.yui-navset-top yui-nav li a WGsubContent yui-navset-bottom yui-nav li a display:block display:inline-block vertical-align:bottom zoom:1 WGsubContent yui-navset-left yui-nav li a,.yui-navset-right yui-nav li a display:block WGsubContent yui-navset-bottom yui-nav li a vertical-align:text-top WGsubContent yui-navset yui-nav li a em,.yui-navset-top yui-nav li a em WGsubContent yui-navset-bottom yui-nav li a em display:block WGsubContent yui-navset yui-navset-left yui-nav,.yui-navset yui-navset-right yui-nav WGsubContent yui-navset-left yui-nav,.yui-navset-right yui-nav position:absolute z-index:1 WGsubContent yui-navset-top yui-nav,.yui-navset-bottom yui-nav position:static WGsubContent yui-navset yui-navset-left yui-nav,.yui-navset-left yui-nav left:0 right:auto WGsubContent yui-navset yui-navset-right yui-nav,.yui-navset-right yui-nav left:auto right:0 WGsubContent yui-skin-sam yui-navset yui-nav selected a em padding:0.35em 0.75em WGsubContent yui-skin-sam yui-navset-left yui-nav,.yui-skin-sam yui-navset yui-navset-left yui-nav WGsubContent yui-skin-sam yui-navset yui-navset-right yui-nav,.yui-skin-sam yui-navset-right yui-nav border-width:0 5px 0 0 bottom:0 top:0 Xposition:absolute WGsubContent yui-skin-sam yui-navset yui-navset-right yui-nav,.yui-skin-sam yui-navset-right yui-nav border-width:0 0 0 5px WGsubContent yui-skin-sam yui-navset-left yui-nav li,.yui-skin-sam yui-navset yui-navset-left yui-nav li WGsubContent yui-skin-sam yui-navset-right yui-nav li margin:0 0 0.16em padding:0 0 0 1px WGsubContent yui-skin-sam yui-navset-right yui-nav li padding:0 1px 0 0 WGsubContent yui-skin-sam yui-navset-left yui-nav a,.yui-skin-sam yui-navset-right yui-nav a border-width:1px 0 WGsubContent yui-skin-sam yui-navset-left yui-nav a em,.yui-skin-sam yui-navset yui-navset-left yui-nav a em,.yui-skin-sam yui-navset-right yui-nav a em border-width:0 0 0 1px left:-1px padding:0.2em 75em top:auto WGsubContent yui-skin-sam yui-navset-right yui-nav a em border-width:0 1px 0 0 left:auto right:-1px WGsubContent yui-skin-sam yui-navset-left yui-nav a,.yui-skin-sam yui-navset-left yui-nav selected a,.yui-skin-sam yui-navset-left yui-nav a:hover WGsubContent yui-skin-sam yui-navset-right yui-nav a,.yui-skin-sam yui-navset-right yui-nav selected a,.yui-skin-sam yui-navset-right yui-nav a:hover WGsubContent yui-skin-sam yui-navset-bottom yui-nav a,.yui-skin-sam yui-navset-bottom yui-nav selected a WGsubContent yui-skin-sam yui-navset-bottom yui-nav a:hover background-image:none WGsubContent yui-skin-sam yui-navset yui-navset-bottom yui-nav selected WGsubContent yui-skin-sam yui-navset-bottom yui-nav selected margin:-1px 0.16em 0 0 WGsubContent yui-skin-sam yui-navset yui-navset-bottom yui-nav li WGsubContent yui-skin-sam yui-navset-bottom yui-nav li padding:0 0 1px 0 vertical-align:top ','000001000001000002000008',NULL),('_9_eiaPgxzF_x_upt6-PNQ','gallery.css','','root/import/gallery-templates/gallery.css',1197988920,1304392055,'3','7','3','WebGUI::Asset::Snippet',0,'gallery.css gallery.css root import gallery templates gallery.css FIXES FLOAT ISSUES WITHOUT THIS FLOATS GET ALL NUTSY ESPECIALLY IN OPERA AND SAFARI clearfix:after content display block height 0 clear both visibility hidden clearfix display inline-block END FLOAT FIX wgGallery font-family:verdana arial text-align:left firstBar background black color:white font-size:18px font-weight:bold firstBar title margin-left:20px line-height:42px firstBar title a font-size:18px font-weight:bold color:white firstBar buttons float:right firstBar buttons a display:block float:left height:42px line-height:42px font-size:10px color:white font-weight:bold text-align:center padding:0px 5px firstBar buttons rss display:block height:29px position:relative background:transparent padding-top:13px secondBar background F1F1F1 text-align:left border-top:solid 8B8B8B 5px color black overflow hidden secondBar author font-size:10px secondBar desc p margin-left 20px margin-top 0 color black pictures searchArea float:right searchArea float:left searchArea input.searchText border:solid black 1px width:100px margin:0px padding:2px margin-top:5px font-size:10px height:15px margin-right:10px searchArea input.searchBtn border:solid black 1px margin:0px padding:3px margin-top:5px font-size:10px vertical-align:middle cursor:pointer height:21px searchArea a:link searchArea a:visited secondBar author a:link secondBar author a:visited font-size:11px color:black searchArea current font-weight:bold text-transform:uppercase text-decoration:none font-size:10px wgAlbum display moz-inline-box Although this works in later versions of FireFox it does not work in 2.x display:block display inline-block Op Saf IE vertical-align top IE Mac non capisce e a volte crea extra v space width:250px margin:10px wgAlbum albumTitle background black color:white font-size:12px font-weight:bold padding:10px padding-right:50px border:solid 475f6f 1px border-bottom:solid 8B8B8B 5px text-align:left display:block wgAlbum albumImage background F1F1F1 border-left solid black 1px border-right solid black 1px padding-top:15px height:135px wgAlbum albumImage a height:135px width:200px overflow:hidden display:block margin:0px 23px wgAlbum albumImage img border-style:none display:block width:200px height:auto border:solid black 1px wgAlbum albumDesc background F1F1F1 border-left solid black 1px border-right solid black 1px border-bottom solid black 1px text-align:center padding 5px 23px wgAlbum description font-size:10px height:40px overflow:auto text-align:left border:solid silver 1px padding:5px background-color fff color:#222 albumDesc description margin:2px 0px PAGINATION STYLES wgGallery paginationContainer text-align:center background black height:42px wgGallery container clear:both text-align:center wgGallery pagination margin:0px auto 20px auto display:table list-style-type:none white-space:nowrap padding:0px height:42px wgGallery pagination li display:table-cell wgGallery pagination a display:block width:50px line-height:42px color:white font-size:10px text-align:center wgPicture a:link wgPicture a:visited color:black wgPicture width:250px margin:10px display moz-inline-box This does not work in earlier versions of Firefox display:block float:left display inline-block Op Saf IE vertical-align top IE Mac non capisce e a volte crea extra v space wgPicture title background:#e0e0e0 display:block font-size:12px text-align:center padding:2px 5px border:solid black 1px border-bottom:solid 8B8B8B 4px wgPicture title a font-size:12px wgPicture thumbnail text-align:center background F1F1F1 padding:15px 23px 15px 23px margin:0px border-left:solid black 1px border-right:solid black 1px wgPicture thumbnail a display:block width:200px height:120px overflow:hidden border:solid black 1px wgPicture thumbnail img border-style:none width:200px height:auto wgPicture pictureDesc padding:0px border-top:solid e1e1e1 1px border-bottom:solid gray 1px border-left:solid black 1px border-right:solid black 1px background:#F1F1F1 margin:0px wgPicture pictureDesc description margin:0px padding:5px font-size:10px wgPicture details background:#e0e0e0 border:solid 999 1px border-top:solid aaa 1px font-size:9px padding:1px 3px wgPicture details date float:right wgPicture details comments float:left wgPicture details a font-size:9px BEGIN STYLES FOR PHOTO VIEW The Photo view uses some/all of the above classes plus those in this section wgSnapshot float:left margin:10px max-width:250px width:25 wgSnapshot fieldset background-color:#fefefe border:solid 555 2px padding:10px background-color:#f9f9f9 text-align:center navigation width 100 text-align center font-weight bold color navy wgSnapshot p max-width:230px wgSnapshot navigation width:100 margin:5px 0 0 text-align:center wgSnapshot navigation img border none wgSnapshot legend color:#333 font-size:15px font-weight:bold max-width:250px wgSnapshot a.thumbnail img width:200px height:auto border:solid 555 2px wgSnapshot description font-size:9px border:solid 555555 2px padding:5px width:190px margin:0px auto background-color:#fff height:50px overflow:auto text-align:left overflow:auto wgSnapshot a.fullSize margin:0px auto wgPictureDetails float:left width:70 margin:10px overflow hidden wgPictureDetails a:link wgPictureDetails a:visited color:black wgPictureDetails fieldset background-color:#fefefe border:solid 555 2px padding:10px background-color:#f9f9f9 margin-bottom:10px wgPictureDetails legend color:#333 font-size:15px font-weight:bold rowOne rowTwo margin:1px color:black padding:3px rowOne background EFEFEF border:solid CDCDCD 1px rowTwo background DCDCDC border:solid DDDDDD 1px rowOne label rowTwo label margin-left:15px text-align:left font-weight:bold font-size:11px rowOne data rowTwo data font-size:10px margin-left:5px a.fullSize:link a.fullSize:visited color:black display:block text-align:center font-weight:bold font-size:10px wgComments font-size:9px margin:10px width:90 wgComments title font-size:14px font-weight:bold color:#333 border-bottom:solid 555555 2px padding-bottom:2px wgComments title a color:navy text-decoration:none wgComments comment wgComments commentAlt position:relative padding:5px wgComments comment background-color:#e1e1e1 border-top:solid F7F7F7 1px border-bottom:solid C9C9C9 1px wgComments commentAlt background-color:#f0f0f0 border-bottom:solid CDCDCD 1px border-top:solid FBFBFB 1px wgComments number float:left font-size:30px color:silver margin:5px 10px 5px 5px wgComments posted font-style:italic padding-top:3px font-size:9px color:gray wgComments posted a color:navy text-decoration:underline BEGIN STYLES FOR THUMBNAIL VIEW The Thumbnail view uses some/all of the above classes plus those in this section thumbView width:400px height:auto thumbView thumbnail a display:block width:350px height:auto border:solid black 1px thumbView thumbnail img border-style:none width:350px height:auto thumb width:100px height:65px overflow:hidden display:block float:left border:solid black 2px margin:10px z-index 0 position relative thumb:hover background-color transparent z-index 50 overflow visible thumb img width:100px height:auto border-style:none thumb:hover img bottom 65px left 75px position absolute width 250px BEGIN STYLES FOR SLIDESHOW VIEW The Slideshow view uses some/all of the above classes plus those in this section wgSlideshow controls background url(^FileUrl(root/import/gallery-templates/images/pagination_bg.jpg repeat-x width:500px height:42px margin:0px auto border:solid black 2px wgSlideshow text-align:center slideshow-container width:500px height:auto margin:0px auto text-align:center border:solid black 2px position:relative z-index:0 slideshow-container slideshow-item img width:100 height:auto border-style:none display:block slideshow-container slideshow-item title background-color:black padding:3px color:white border-top:solid white 1px border-bottom:solid white 1px slideshow-container slideshow-item title a color:white font-size:11px font-weight:bold slideshow-container slideshow-item counter background-color:black padding:3px color:white font-size:11px font-weight:bold slideshow-container slideshow-item synopsis width:494px background-color:white padding:3px color:black font-size:11px font-weight:bold border-top:solid black 1px text-align:left BEGIN STYLES FOR SEARCH VIEW The Search view uses some/all of the above classes plus those in this section adminWrapper margin-top:20px adminWrapper label background:black font-weight:bold font-size:10px color:white adminWrapper td.data input background f1f1f1 vertical-align:middle adminWrapper td.radio input border-style:none background:none adminWrapper forwardButton cursor:pointer float:rigbt adminWrapper forwardButton:hover color:gold ','000001000001000015000016',NULL),('i6-BofrJJYozovlzFBByXg','first-photo-button.png','','root/import/gallery-templates/images/first-photo-button.png',1270612331,1285124158,'3','7','3','WebGUI::Asset::File::Image',1,'first-photo-button.png first-photo-button.png root import gallery templates images first photo button.png','000001000001000015000017000031',NULL),('fU_OZCmtdFNJ8a6bMve8ng','previous-photo-button.png','','root/import/gallery-templates/images/previous-photo-button.png',1270612331,1285124158,'3','7','3','WebGUI::Asset::File::Image',1,'previous-photo-button.png previous-photo-button.png root import gallery templates images previous photo button.png','000001000001000015000017000032',NULL),('YXCtusAxb4vzZ5sTnUA5DA','next-photo-button.png','','root/import/gallery-templates/images/next-photo-button.png',1270612331,1285124158,'3','7','3','WebGUI::Asset::File::Image',1,'next-photo-button.png next-photo-button.png root import gallery templates images next photo button.png','000001000001000015000017000033',NULL),('k_xuE82wwp8gFVl9aaaG8g','last-photo-button.png','','root/import/gallery-templates/images/last-photo-button.png',1270612331,1285124158,'3','7','3','WebGUI::Asset::File::Image',1,'last-photo-button.png last-photo-button.png root import gallery templates images last photo button.png','000001000001000015000017000034',NULL),('NPM_WItpM5IzLWBhWjYfCA','photo-navigation-spacer.png','','root/import/gallery-templates/images/photo-navigation-spacer.png',1270612331,1285124158,'3','7','3','WebGUI::Asset::File::Image',1,'photo-navigation-spacer.png photo-navigation-spacer.png root import gallery templates images photo navigation spacer.png','000001000001000015000017000035',NULL),('30h5rHxzE_Q0CyI3Gg7EJw','Cash Summary Screen (Default)','','shopping-cart-collateral-items/cash-summary',1273032715,1326776037,'3','7','4','WebGUI::Asset::Template',0,'Cash Summary Screen Default Cash Summary Screen Default shopping cart collateral items cash summary Shop/Credentials','000001000001000036000020',NULL),('jysVZeUR0Bx2NfrKs5sulg','Ogone Summary Screen (Default)','','shopping-cart-collateral-items/ogone-summary',1273032715,1326776037,'3','7','4','WebGUI::Asset::Template',0,'Ogone Summary Screen Default Ogone Summary Screen Default shopping cart collateral items ogone summary Shop/Credentials','000001000001000036000021',NULL),('300AozDaeveAjB_KN0ljlQ','PayPal Standard Summary Screen (Default)','','shopping-cart-collateral-items/paypal-std-summary',1273032715,1326776037,'3','7','4','WebGUI::Asset::Template',0,'PayPal Standard Summary Screen Default PayPal Standard Summary Screen Default shopping cart collateral items paypal std summary Shop/Credentials','000001000001000036000022',NULL),('GqnZPB0gLoZmqQzYFaq7bg','PayPal Express Checkout Summary Screen (Default)','','shopping-cart-collateral-items/paypal-express-summary',1273032716,1326776037,'3','7','4','WebGUI::Asset::Template',0,'PayPal Express Checkout Summary Screen Default PayPal Express Checkout Summary Screen Default shopping cart collateral items paypal express summary Shop/Credentials','000001000001000036000023',NULL),('stevestyle000000000001','Style 01','by Steve from Plain Black http://plainblack.com\r\n\r\nThe first of the WebGUI 7 styles','style_01',1147642499,1273032722,'3','7','12','WebGUI::Asset::Template',0,'Style 01 Style 01 by Steve from Plain Black http://plainblack.com The first of the WebGUI 7 styles style 01 style','000001000001000049000026',NULL),('stevestyle000000000002','Style 02','by Steve from Plain Black http://plainblack.com\r\n\r\nThe second of the WebGUI 7 styles','style_02',1147642504,1273032718,'3','7','12','WebGUI::Asset::Template',0,'Style 02 Style 02 by Steve from Plain Black http://plainblack.com The second of the WebGUI 7 styles style 02 style','000001000001000050000016',NULL),('stevestyle000000000003','Style 03','by Steve from Plain Black http://plainblack.com\r\n\r\nThe last of the WebGUI 7 style templates.','style_03',1147642510,1273032720,'3','7','12','WebGUI::Asset::Template',0,'Style 03 Style 03 by Steve from Plain Black http://plainblack.com The last of the WebGUI 7 style templates style 03 style','000001000001000051000020',NULL),('t87D1138NhPHhA23-hozBA','CrystalX','','crystalx',1273032716,1273032716,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'CrystalX CrystalX crystalx','000001000001000055',NULL),('QtBumey5ffc-xffRp1-7Aw','img','','crystalx/img',1273032716,1273032716,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'img img crystalx img','000001000001000055000001',NULL),('-0sK2rX1cwQt1ipUSqsiQQ','bg.gif','','crystalx/img/bg.gif',1273032716,1273032716,'3','7','3','WebGUI::Asset::File::Image',1,'bg.gif bg.gif crystalx img bg.gif','000001000001000055000001000001',NULL),('hS_eOaVz9Qb5ixndK9EXAw','header.jpg','','crystalx/img/header.jpg',1273032716,1273032716,'3','7','3','WebGUI::Asset::File::Image',1,'header.jpg header.jpg crystalx img header.jpg','000001000001000055000001000002',NULL),('k2p-Be8C98pf2cRq7E-JHg','tab_link.gif','','crystalx/img/tab_link.gif',1273032716,1273032716,'3','7','3','WebGUI::Asset::File::Image',1,'tab_link.gif tab_link.gif crystalx img tab link.gif','000001000001000055000001000003',NULL),('aYG4fjbMPbC4LCuuMp4gGA','tab_hover.gif','','crystalx/img/tab_hover.gif',1273032716,1273032716,'3','7','3','WebGUI::Asset::File::Image',1,'tab_hover.gif tab_hover.gif crystalx img tab hover.gif','000001000001000055000001000004',NULL),('F122Ey0NtVAw6Lfv1M6G_Q','ico_archive.gif','','crystalx/img/ico_archive.gif',1273032716,1273032716,'3','7','3','WebGUI::Asset::File::Image',1,'ico_archive.gif ico_archive.gif crystalx img ico archive.gif','000001000001000055000001000005',NULL),('qmXHKrQ6EDLSOGkrEKRUDA','bg_page_in.jpg','','crystalx/img/bg_page_in.jpg',1273032716,1273032716,'3','7','3','WebGUI::Asset::File::Image',1,'bg_page_in.jpg bg_page_in.jpg crystalx img bg page in.jpg','000001000001000055000001000006',NULL),('4qZgXjPPO4fwV879yu5XUg','bg_page.JPG','','crystalx/img/bg_page.jpg',1273032716,1273032716,'3','7','3','WebGUI::Asset::File::Image',1,'bg_page.JPG bg_page.JPG crystalx img bg page.jpg','000001000001000055000001000007',NULL),('mb-xeAugm5GJdvu-Wh0MtQ','search_submit.gif','','crystalx/img/search_submit.gif',1273032717,1273032717,'3','7','3','WebGUI::Asset::File::Image',1,'search_submit.gif search_submit.gif crystalx img search submit.gif','000001000001000055000001000008',NULL),('84Y9CwgzP6eNU7wZnk019Q','ico_date.gif','','crystalx/img/ico_date.gif',1273032717,1273032717,'3','7','3','WebGUI::Asset::File::Image',1,'ico_date.gif ico_date.gif crystalx img ico date.gif','000001000001000055000001000009',NULL),('ikXTtJKZfHVxqw-47E4AQA','ico_user.gif','','crystalx/img/ico_user.gif',1273032717,1273032717,'3','7','3','WebGUI::Asset::File::Image',1,'ico_user.gif ico_user.gif crystalx img ico user.gif','000001000001000055000001000010',NULL),('DhRWPTgzhvju_-TbMN3CwA','ico_comments.gif','','crystalx/img/ico_comments.gif',1273032717,1273032717,'3','7','3','WebGUI::Asset::File::Image',1,'ico_comments.gif ico_comments.gif crystalx img ico comments.gif','000001000001000055000001000011',NULL),('6njI-pZz2bwsjWh-Q1_11g','ico_list.gif','','crystalx/img/ico_list2.gif',1273032717,1273032717,'3','7','3','WebGUI::Asset::File::Image',1,'ico_list.gif ico_list.gif crystalx img ico list2.gif','000001000001000055000001000012',NULL),('_Hz1Gnd3yEnJzVS7l7nJMQ','content_all_bg.PNG','','crystalx/img/content_all_bg.png',1273032717,1273032717,'3','7','3','WebGUI::Asset::File::Image',1,'content_all_bg.PNG content_all_bg.PNG crystalx img content all bg.png','000001000001000055000001000013',NULL),('VOOrXK5dFnkGih7aTkuDWA','search.PNG','','crystalx/img/search.png',1273032717,1273032717,'3','7','3','WebGUI::Asset::File::Image',1,'search.PNG search.PNG crystalx img search.png','000001000001000055000001000014',NULL),('ruf-QejOkUHDRtfgakHlbA','col_title_bg_long.GIF','','crystalx/img/col_title_bg_long.gif',1273032717,1273032717,'3','7','3','WebGUI::Asset::File::Image',1,'col_title_bg_long.GIF col_title_bg_long.GIF crystalx img col title bg long.gif','000001000001000055000001000015',NULL),('FSHy5KjQjkt599PHS41seA','footer.jpg','','crystalx/img/footer.jpg',1273032717,1273032717,'3','7','3','WebGUI::Asset::File::Image',1,'footer.jpg footer.jpg crystalx img footer.jpg','000001000001000055000001000016',NULL),('nuYYXAz4KNNxgfumfnpo_g','ico_top.gif','','crystalx/img/ico_top.gif',1273032718,1273032718,'3','7','3','WebGUI::Asset::File::Image',1,'ico_top.gif ico_top.gif crystalx img ico top.gif','000001000001000055000001000017',NULL),('Mr7ljjoy6n4fZojpQWajKQ','ico_links.gif','','crystalx/img/ico_links.gif',1273032718,1273032718,'3','7','3','WebGUI::Asset::File::Image',1,'ico_links.gif ico_links.gif crystalx img ico links.gif','000001000001000055000001000018',NULL),('ApkqpDOrJDxK3QrWBGSRIg','ico_archive2.gif','','crystalx/img/ico_archive2.gif',1273032718,1273032718,'3','7','3','WebGUI::Asset::File::Image',1,'ico_archive2.gif ico_archive2.gif crystalx img ico archive2.gif','000001000001000055000001000019',NULL),('AzzTY0Lay1f_YGeQJFnQCA','ico_list.gif','','crystalx/img/ico_list.gif',1273032718,1273032718,'3','7','3','WebGUI::Asset::File::Image',1,'ico_list.gif ico_list.gif crystalx img ico list.gif','000001000001000055000001000020',NULL),('OiJNwP1gAlcva8_yOtL4gA','CrystalX_style','by Ning from Pluton -- http://pluton.nl\n\nCrystalX gives your site a crystal-ish look and a strictly formal style. Feel free to download and apply it to your own site.\n\nOriginally designed by \"Nuvio Webdesign\" and collected by Open Source Web Design, converted to WebGUI theme by Ning.','crystalx_style',1273032718,1273032718,'3','7','3','WebGUI::Asset::Template',0,'CrystalX_style CrystalX_style by Ning from Pluton http://pluton.nl CrystalX gives your site a crystal-ish look and a strictly formal style Feel free to download and apply it to your own site Originally designed by Nuvio Webdesign and collected by Open Source Web Design converted to WebGUI theme by Ning crystalx style style','000001000001000055000002',NULL),('JOuCU4x5BJfVHfkfMkVQdQ','crystalx.css','','crystalx/crystalx.css',1273032718,1273032718,'3','7','3','WebGUI::Asset::Snippet',0,'crystalx.css crystalx.css crystalx crystalx.css Project CrystalX URL http://www.nuvio.cz Output device screen projection Author Vit Dlouhy vit.dlouhy@nuvio.cz Nuvio www.nuvio.cz Last revision 2006-12-05 12:00 GMT+1 Structure display | position | float | overflow | width | height | border | margin | padding | background | align | font min-height:1px body border:0 margin:0 padding:0 background:#F2F5FE url(\'^FileUrl(/crystalx/img/bg.gif 0 0 repeat-x font:70%/160 verdana\",sans-serif color:#192666 text-align:center a color:#192666 a:hover color:#4F6AD7 p border:0 margin:15px 0 padding:0 div display:block border:0 margin:0 padding:0 overflow:hidden h1 h2 h3 h4 h5 border:0 margin:15px 0 10px 0 padding:0 font-weight:bold h1 font-size:260 line-height:100 font-family:\"georgia\",serif font-weight:normal h2 font-size:180 line-height:100 font-family:\"georgia\",serif font-weight:normal h3 font-size:120 line-height:100 font-weight:bold h4 font-size:120 h5 font-size:100 table display:table border-collapse:collapse margin:15px 1px padding:0 border:1px solid B7CAF6 font-size:100 tr display:table-row th td display table-cell border:1px solid B7CAF6 margin:0 padding:5px vertical-align:top text-align:left th background:#E7ECFD text-align:center color:#192666 font-weight:bold ul ol display:block border:0 margin:15px 0 15px 40px padding:0 ol list-style-type:decimal li display:list-item border:0 margin:0 padding:0 min-height:1px ul ul ul ol ol ol ol ul margin 0 0 0 20px dl border-bottom:1px solid E0E8FA margin:0 padding:5px 10px background:#CEDBF9 dt border:0 margin:0 padding:0 font-weight:bold dd border:0 margin:0 0 0 30px padding:0 form border:0 margin:0 padding:0 fieldset border:1px solid ccc margin:15px 0 padding:10px legend margin-left:10px font-size:100 font-weight:bold color:#008 hr height:1px width:724px margin 5px 23px padding 0 background:#CCC border:0 solid CCC color:#CCC a img span border:0 margin:0 padding:0 overflow:hidden abbr acronym border-bottom:1px dotted CCC cursor:help del through text-decoration:line-through strong strong font-weight:bold cite em q var font-style:italic code kbd samp font-family:monospace font-size:110 box min-height:1px box:after content display:block line-height:0px font-size:0px visibility:hidden clear:both nom margin:0 noscreen display:none main width:770px margin:0 auto text-align:left Top empty space for the background img to fit main topspace position:relative top:0 left:0 height:50px margin:0 padding:0 Header header position:relative width:770px height:100px margin:0 padding:0 background:#233C9B url(\'^FileUrl(/crystalx/img/header.jpg 0 0 no-repeat color:#FFFFFF Header logo header logo position:absolute top:35px left:35px margin:0 header logo a font-size:260 line-height:100 font-family:\"georgia\",serif font-weight:bold color:#FFF header logo a:hover color:#B5C4E3 text-decoration:none Header Search header search form position:absolute top:35px right:20px height:30px header search formContents position:absolute top:0 right:0px width:200px height:28px margin:0 padding:0 border:0 background:url(\'^FileUrl(/crystalx/img/search.png 0 0 no-repeat font:bold 90%/100 verdana\",sans-serif color:#192666 header search input#keywords_formId width:140px margin:5px 8px padding:3px 0 border:0 background:#FFF font:bold 100%/100 verdana\",sans-serif color:#192666 header search search_form position:absolute top:0 right:0px width:41px height:28px cursor:point margin:0 padding:0 Search Result header search search_result position:absolute top:220px header search home_link header search no_result header search pagination visibility:hidden page page-in pagination color:#6182D1 font-weight:bold padding:5px text-align:right page page-in pagination a color:#6182D1 page page-in pagination a:hover color:#192666 page page-in home_link padding:5px 5px 15px color:#6182D1 font-weight:bold text-align:right page page-in home_link a color:#6182D1 page page-in home_link a:hover color:#192666 search_result margin:10px 0 dl#odd background:#A0B9F3 page page-in no_result margin:0 10px color:#192666 font-weight:bold Main menu tabs menu background:#192666 margin:0 5px padding:10px 10px 0 height:32px overflow:hidden menu a cursor:pointer font-size:11px Page dynamic page width:770px background:#FFFFFF url(\'^FileUrl(/crystalx/img/bg_page.jpg 0 0 repeat-y page-in min-height:400px background:url(\'^FileUrl(/crystalx/img/bg_page_in.jpg 0 0 no-repeat padding:10px 0 0 Strip strip position:relative clear:both padding:3px 20px 10px 20px color:#6182D1 Strip Location strip location float left background:url(\'^FileUrl(/crystalx/img/ico_comments.gif 0 50 no-repeat padding 0 15px strip location a color:#6182D1 strip location a:hover color:#192666 strip location a#currentpage font-weight:bold text-decoration:none Strip DateTime strip datetime float:right background:url(\'^FileUrl(/crystalx/img/ico_date.gif 0 50 no-repeat padding 0 10px 0 15px Content Container contentContainer margin:0 padding:0 20px width:730px overflow:hidden Contents contentContainer content clear:both margin:10px 10px 0 0 padding:20px max-width:710px background:url(\'^FileUrl(/crystalx/img/content_all_bg.png 0 0 no-repeat overflow:hidden contentContainer content h2 margin:0 10px padding:10px 25px color:#192666 background:url(\'^FileUrl(/crystalx/img/ico_list.gif 0 50 no-repeat contentContainer content p text-align:justify Utility utility background FFFFFF url(\'^FileUrl(/crystalx/img/bg_page.jpg 0 0 repeat-y padding 10px 0 15px Utility Toggles toggles font-size:10px font-weight:bold text-align:left margin-left:42px toggles a margin:0 10px padding:2px 0 text-decoration:none border-bottom:1px dashed color:#6182D1 toggles a:hover border-bottom:1px solid color:#4F6AD7 toggles span.userAcc background:url(\'^FileUrl(/crystalx/img/ico_user.gif 0 50 no-repeat margin 0 0 0 8px Footer footer position:relative clear:both width:770px height:80px margin-bottom:30px background:url(\'^FileUrl(/crystalx/img/footer.jpg 0 0 no-repeat color:#6685CC footer a color:#6685CC footer a:hover color:#192666 Footer back on top top position:absolute top:55px left:550px top p position:relative width:30px height:25px margin:0 overflow:hidden top p a display:block position:absolute left:0 top:0 z-index:1 width:30px height:25px background:url(\'^FileUrl(/crystalx/img/ico_top.gif 0 0 no-repeat cursor:pointer top a:hover background:url(\'^FileUrl(/crystalx/img/ico_top.gif 30px 0 no-repeat Footer copyright footer p#copyright position:absolute top:10px left:40px margin:0 Footer created by createdby position:absolute top:10px left:562px margin:0 color:#8CA3D8 createdby a color:#8CA3D8','000001000001000055000003',NULL),('Am1J-meNBmhqFfEIWy6Gag','crystalX_Navigation','','crystalx/crystalx_navigation',1273032718,1287545014,'3','7','3','WebGUI::Asset::Wobject::Navigation',1,'crystalX_Navigation crystalX_Navigation crystalx crystalx navigation','000001000001000055000004',NULL),('gaIOm5cr2TkT9Fk6QmZWug','crystalX_navi','','crystalx/crystalx_navi',1273032718,1273032718,'3','7','3','WebGUI::Asset::Template',0,'crystalX_navi crystalX_navi crystalx crystalx navi Navigation','000001000001000055000005',NULL),('w0QifHLhsrzeOpFKl-DX-Q','crystalx_navi.css','','crystalx/crystalx_navi.css',1273032718,1273032718,'3','7','3','WebGUI::Asset::Snippet',0,'crystalx_navi.css crystalx_navi.css crystalx crystalx navi.css ','000001000001000055000006',NULL),('x_hiUi1XZloBvV47Obnu8Q','crystalX_NavigationTrail','','crystalx/crystalx_navigationtrail',1273032718,1273032718,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'crystalX_NavigationTrail crystalX_NavigationTrail crystalx crystalx navigationtrail','000001000001000055000007',NULL),('hpCk0B3vQzgc-QJhSol41w','crystalX_navitrail','','crystalx/crystalx_navitrail',1273032718,1273032718,'3','7','12','WebGUI::Asset::Template',0,'crystalX_navitrail crystalX_navitrail crystalx crystalx navitrail Navigation','000001000001000055000008',NULL),('UUwEL6hLEPdrnkZnKRzFYQ','Site Search','','crystalx/site-search',1273032718,1273032718,'3','7','3','WebGUI::Asset::Wobject::Search',1,'Site Search Site Search crystalx site search','000001000001000055000009',NULL),('OfKbvK7CrfMnfc8WDoF4Rg','crystalx_search','','crystalx/crystalx_search',1273032718,1273032718,'3','7','3','WebGUI::Asset::Template',0,'crystalx_search crystalx_search crystalx crystalx search Search','000001000001000055000010',NULL),('CQp-RFA2pMh5lFSggPPPYg','[Style] Underground','Templates and images for the \"Underground\" style from StyleShout.com ','style-underground',1273032719,1301973995,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'Style Underground Style Underground style underground Templates and images for the Underground style from StyleShout.com','000001000001000056',NULL),('_Mi_NTd3x8UB96LWezWHnw','Images','','style-underground/images',1273032719,1301973995,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'Images Images style underground images','000001000001000056000001',NULL),('A_5LVQQWR73QZR8FFbny_w','bg.gif','','style-underground/images/bg.gif',1273032719,1301973995,'3','7','3','WebGUI::Asset::File::Image',1,'bg.gif bg.gif style underground images bg.gif','000001000001000056000001000001',NULL),('wywIfa_VuTsq0c5Ed-W-MA','bullet.gif','','style-underground/images/bullet.gif',1273032719,1301973995,'3','7','3','WebGUI::Asset::File::Image',1,'bullet.gif bullet.gif style underground images bullet.gif','000001000001000056000001000002',NULL),('xmykMFjri1O2NrYHbeToVQ','footerbg.gif','','style-underground/images/footerbg.gif',1273032719,1301973995,'3','7','3','WebGUI::Asset::File::Image',1,'footerbg.gif footerbg.gif style underground images footerbg.gif','000001000001000056000001000003',NULL),('0IIGNBs_-INzqBC5VLeJgw','headerbg.gif','','style-underground/images/headerbg.gif',1273032719,1301973996,'3','7','3','WebGUI::Asset::File::Image',1,'headerbg.gif headerbg.gif style underground images headerbg.gif','000001000001000056000001000004',NULL),('FXmePdyS0YKuZ1VCGGpK9w','quote.gif','','style-underground/images/quote.gif',1273032719,1301973996,'3','7','3','WebGUI::Asset::File::Image',1,'quote.gif quote.gif style underground images quote.gif','000001000001000056000001000005',NULL),('66qCywiE_fiL9u5YIaJhgw','tableft.gif','','style-underground/images/tableft.gif',1273032719,1301973996,'3','7','3','WebGUI::Asset::File::Image',1,'tableft.gif tableft.gif style underground images tableft.gif','000001000001000056000001000006',NULL),('n5VpG4lFsOG1elaWDQbilw','tabright.gif','','style-underground/images/tabright.gif',1273032719,1301973996,'3','7','3','WebGUI::Asset::File::Image',1,'tabright.gif tabright.gif style underground images tabright.gif','000001000001000056000001000007',NULL),('g3JH1PRq6m6Bj_PnGpcrSQ','CSS','','style-underground/css',1273032719,1301973996,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'CSS CSS style underground css','000001000001000056000002',NULL),('egpnaaFqWmJwYTZ5CvFH9g','Underground.css','','style-underground/css/underground.css',1273032719,1301973996,'3','7','3','WebGUI::Asset::Snippet',0,'Underground.css Underground.css style underground css underground.css AUTHOR Erwin Aligam WEBSITE http://www.styleshout.com TEMPLATE NAME Underground TEMPLATE CODE S-0006 VERSION 1.1 Changes for WebGUI by Doug Bell Preaction doug@plainblack.com HTML ELEMENTS top elements margin 0 padding 0 body margin 0 padding 0 font 70%/1.5 Verdana Tahoma Arial Helvetica sans-serif color 333 background FFF url(^FileUrl(style-underground/images/bg.gif repeat-x links a color 003366 background-color inherit text-decoration none a:hover color CC0001 background-color inherit headers h1 h2 h3 font-family Arial Trebuchet MS Sans-Serif font-weight bold color 333 h1 font-size 120 letter-spacing 5px h2 font-size 115 text-transform uppercase h3 font-size 115 color 003366 images img border 2px solid CCC img.float-right margin 5px 0px 10px 10px img.float-left margin 5px 10px 10px 0px h1 h2 h3 p padding 0 margin 10px ul ol margin 10px 20px padding 0 20px code margin 10px 0 padding 10px text-align left display block overflow auto font 500 1em/1.5em Lucida Console courier new monospace white-space pre background FAFAFA border 1px solid f2f2f2 border-left 4px solid CC0000 acronym cursor help border-bottom 1px solid 777 blockquote margin 10px padding 0 0 0 32px background FAFAFA url(^FileUrl(style-underground/images/quote.gif no-repeat 5px 10px important background-position 8px 10px border 1px solid f2f2f2 border-left 4px solid CC0000 font-weight bold form elements form margin:10px padding 0 5px border 1px solid f2f2f2 background-color FAFAFA label display:block font-weight:bold margin:5px 0 input padding 2px border:1px solid eee font normal 1em Verdana sans-serif color:#777 textarea width:400px padding:2px font normal 1em Verdana sans-serif border:1px solid eee height:100px display:block color:#777 input.button margin 0 font bolder 12px Arial Sans-serif border 1px solid CCC padding 1px background FFF color CC0000 search form form.search position absolute top 5px right 5px padding 0 margin 0 border none background-color transparent form.search input.textbox margin 0 width 120px border 1px solid CCC background FFF color 333 form.search input.searchbutton margin 0 font-size 100 font-family Arial Sans-serif border 1px solid CCC background FFFFFF url(^FileUrl(style-underground/images/headerbg.gif repeat-x bottom left padding 1px font-weight bold height 23px color 333 width 60px LAYOUT wrap margin 0 auto width 90 header header position relative margin 0 padding 0 height 60px header span#slogan z-index 3 position absolute left 3px bottom 7px font bold 1.2em Verdana Arial Tahoma Sans-serif color FFF header-logo position relative clear both height 50px margin 0 padding 0 header-logo logo position absolute top 3px left 5px font bold 30px trebuchet MS Arial Tahoma Sans-Serif margin 0 padding 0 letter-spacing 1px color 000 navigation tabs header ul position absolute margin:0 list-style:none right:-18px bottom 3px font bold 13px Trebuchet MS Arial Sans-serif header li display:inline margin:0 padding:0 header a float:left background url(^FileUrl(style-underground/images/tableft.gif no-repeat left top margin:0 padding:0 0 0 4px text-decoration:none header a span float:left display:block background url(^FileUrl(style-underground/images/tabright.gif no-repeat right top padding:5px 15px 4px 6px color:#FFF Commented Backslash Hack hides rule from IE5-Mac header a span float:none End IE5-Mac hack header a:hover span color:#FFF header a:hover background-position:0 42px header a:hover span background-position:100 42px header current a background-position:0 42px header current a span background-position:100 42px main column main float right margin 0 padding 0 width 78 main h1 margin 10px 0 padding 4px 0 4px 8px font-size 105 color FFF text-transform uppercase background-color CC0000 letter-spacing 5px sidebar sidebar float left width 20 margin 0 padding 0 background-color FFFFFF sidebar h1 margin 10px 0 0 0 padding 4px 0 4px 8px font bold 105 Arial Sans-Serif color FFF text-transform uppercase background 333 letter-spacing 1px sidebar left-box border 1px solid EBEBEB margin 0 0 5px 0 background FFF sidebar ul.sidemenu list-style none text-align left margin 3px 0px 8px 0 padding 0 text-decoration none sidebar ul.sidemenu li border-bottom 1px solid f2f2f2 background url(^FileUrl(style-underground/images/bullet.gif no-repeat 3px 2px padding 3px 5px 3px 25px margin 0 sidebar ul.sidemenu a font-weight bolder padding 3px 0px background none footer footer clear both border-top 1px solid f2f2f2 background FFF url(^FileUrl(style-underground/images/footerbg.gif repeat-x padding 2px 0 10px 0 text-align center line-height 1.5em font-size 95 footer a text-decoration none font-weight bold alignment classes float-left float left float-right float right align-left text-align left align-right text-align right display and additional classes clear clear both red color CC0000 comments margin 20px 10px 5px 10px padding 3px 0 border-bottom 1px dashed EFF0F1 border-top 1px dashed EFF0F1 ','000001000001000056000002000001',NULL),('G0hl4VilbFKipToyxKqFrg','Prototypes','This folder holds prototype WebGUI assets with the correct templates pre-selected. ','style-underground/prototypes',1273032719,1301973997,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'Prototypes Prototypes style underground prototypes This folder holds prototype WebGUI assets with the correct templates pre-selected','000001000001000056000003',NULL),('GWU2qZqe6yEuAKG-5HtBdg','Templates','','style-underground/templates',1273032719,1301973997,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'Templates Templates style underground templates','000001000001000056000004',NULL),('Qk24uXao2yowR6zxbVJ0xA','[style] Underground','by Doug from Plain Black http://plainblack.com\r\n\r\nThis is the Underground style from http://www.styleshout.com/ made into a WebGUI package. A simple, functional style.','style-underground/style-underground',1273032719,1301973997,'3','7','3','WebGUI::Asset::Template',0,'style Underground style Underground by Doug from Plain Black http://plainblack.com This is the Underground style from http://www.styleshout.com made into a WebGUI package A simple functional style style underground style underground style','000001000001000056000004000001',NULL),('39KNX53B4nYJAyIE1lu8ZQ','[nav] Underground Top Navigation','','style-underground/nav-underground-top-navigation',1273032720,1301973997,'3','7','3','WebGUI::Asset::Template',0,'nav Underground Top Navigation nav Underground Top Navigation style underground nav underground top navigation Navigation','000001000001000056000004000002',NULL),('ztfi__vHJLsQDsMenrEn-w','[nav] Underground Side Navigation','','style-underground/nav-underground-side-navigation',1273032720,1301973997,'3','7','3','WebGUI::Asset::Template',0,'nav Underground Side Navigation nav Underground Side Navigation style underground nav underground side navigation Navigation','000001000001000056000004000003',NULL),('8qyrDCNeggB4dzKiOoRuiQ','[admintoggle] Underground Admin Toggle','','style-underground/templates/admintoggle-underground-admin-toggle',1273032720,1301973997,'3','7','3','WebGUI::Asset::Template',0,'admintoggle Underground Admin Toggle admintoggle Underground Admin Toggle style underground templates admintoggle underground admin toggle AdminToggle','000001000001000056000004000004',NULL),('M1NyNeS5jpdIsiIWFiJprw','View My Account','','style-underground/templates/view-my-account',1273032720,1301973997,'3','7','3','WebGUI::Asset::Template',0,'View My Account View My Account style underground templates view my account Macro/a_account','000001000001000056000004000005',NULL),('AsfpsOpsGzZCb9m7MyxPuw','Navigation','','style-underground/navigation',1273032720,1301973997,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'Navigation Navigation style underground navigation','000001000001000056000005',NULL),('n-Vr_wgxOkwiHGt1nJto9w','Top Navigation','','style-underground/top-navigation',1273032720,1309236774,'3','7','3','WebGUI::Asset::Wobject::Navigation',1,'Top Navigation Top Navigation style underground top navigation','000001000001000056000005000001',NULL),('jmqLxnoWb6p92Cr12lf1hw','Side Navigation','','style-underground/side-navigation',1273032720,1301973997,'3','7','3','WebGUI::Asset::Wobject::Navigation',1,'Side Navigation Side Navigation style underground side navigation','000001000001000056000005000002',NULL),('8E2UOnj_XPEghTj7nfVM0g','Search','','style-underground/search',1273032720,1301973997,'3','7','3','WebGUI::Asset::Wobject::Search',1,'Search Search style underground search','000001000001000056000006',NULL),('1qFjOEiILIwr1xB5_ebppQ','Greenportal','','greenportal',1273032721,1301973998,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'Greenportal Greenportal greenportal','000001000001000057',NULL),('xD76UfQ_JnSgTLBNvytcpQ','greenportal_image','','greenportal_image',1273032721,1301973998,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'greenportal_image greenportal_image greenportal image','000001000001000057000001',NULL),('pAXR7Kby4O-dSxOwLp1GaA','menu_top.png','','greenportal_image/menu_top.png',1273032721,1301973998,'3','7','12','WebGUI::Asset::File::Image',1,'menu_top.png menu_top.png greenportal image menu top.png','000001000001000057000001000001',NULL),('TthzMLO4n3qxy59QZ5YBHg','menu_dark.png','','greenportal_image/menu_dark.png',1273032721,1301973998,'3','7','12','WebGUI::Asset::File::Image',1,'menu_dark.png menu_dark.png greenportal image menu dark.png','000001000001000057000001000002',NULL),('3n31SQjYa150TBrRBgMPhA','menu_light.png','','greenportal_image/menu_light.png',1273032721,1301973998,'3','7','12','WebGUI::Asset::File::Image',1,'menu_light.png menu_light.png greenportal image menu light.png','000001000001000057000001000003',NULL),('R4RxDufGbbIzEmpcoEcLrw','logo.jpg','','greenportal_image/logo.jpg',1273032721,1301973998,'3','7','12','WebGUI::Asset::File::Image',1,'logo.jpg logo.jpg greenportal image logo.jpg','000001000001000057000001000004',NULL),('KKt0VB_eoQxw9xEsHsAhag','Greenportal_style','by Ning from PlutonIT http://pluton.nl\n\nA Joomla! Open Source design released under the GNU/GPL License. Enhanced and converted into WebGUI theme by Ning. The original PHP and CSS file can be downloaded following the author\'s link: http://www.studentsdesign.de/','greenportal_style',1273032721,1301973998,'3','7','12','WebGUI::Asset::Template',0,'Greenportal_style Greenportal_style by Ning from PlutonIT http://pluton.nl A Joomla Open Source design released under the GNU/GPL License Enhanced and converted into WebGUI theme by Ning The original PHP and CSS file can be downloaded following the author\'s link http://www.studentsdesign.de greenportal style style','000001000001000057000003',NULL),('h0bOzz7WvdaVZXsjpwtkww','greenportal_Navigation','','greenportal_navigation',1273032721,1301973998,'3','7','3','WebGUI::Asset::Wobject::Navigation',1,'greenportal_Navigation greenportal_Navigation greenportal navigation','000001000001000057000004',NULL),('_z3ukLCqvoaUygfsbbkBzw','Greenportal_menu','','greenportal_menu',1273032721,1301973999,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_menu Greenportal_menu greenportal menu Navigation','000001000001000057000005',NULL),('qFOfW1sKyOTnGNcP6BXbwg','greenportal_NavigationTop','','greenportal_navigationtop',1273032721,1301973999,'3','7','12','WebGUI::Asset::Wobject::Navigation',1,'greenportal_NavigationTop greenportal_NavigationTop greenportal navigationtop','000001000001000057000006',NULL),('Pt38T5_MWSue2e1N36MLdw','Greenportal_menuTop','','greenportal_menutop',1273032721,1301973999,'3','7','12','WebGUI::Asset::Template',0,'Greenportal_menuTop Greenportal_menuTop greenportal menutop Navigation','000001000001000057000007',NULL),('LDcM1Iop17nF2MoSa7zo_Q','Greenportal_dataform','','greenportal_dataform',1273032721,1301973999,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_dataform Greenportal_dataform greenportal dataform DataForm','000001000001000057000008',NULL),('hVF1taXj4bfd7DuL4XDMYg','Greenportal_datalist','','greenportal_datalist',1273032721,1301973999,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_datalist Greenportal_datalist greenportal datalist DataForm/List','000001000001000057000009',NULL),('x4-2QYRSrIB_BJfnSKKj4w','Greenportal_acknowledgement','','greenportal_acknowledgement',1273032721,1301973999,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_acknowledgement Greenportal_acknowledgement greenportal acknowledgement DataForm','000001000001000057000010',NULL),('423R4Y6XIt3wUzlnLo-chg','Greenportal_forum','','greenportal_forum',1273032721,1301973999,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_forum Greenportal_forum greenportal forum Collaboration','000001000001000057000011',NULL),('oZ1Mk-zExYUyD-JsjTvaHg','Greenportal_thread','','greenportal_thread',1273032722,1301973999,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_thread Greenportal_thread greenportal thread Collaboration/Thread','000001000001000057000012',NULL),('mYwS8CZaOLMt0raaKXGZcQ','Greenportal_postform','','greenportal_postform',1273032722,1301973999,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_postform Greenportal_postform greenportal postform Collaboration/PostForm','000001000001000057000013',NULL),('kSGR4OHsKmhLQTuLkisOww','Greenportal_search','','greenportal_search',1273032722,1301973999,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_search Greenportal_search greenportal search Collaboration/Search','000001000001000057000014',NULL),('G5DgNizuG3jXkjPp6UaGrA','Greenportal_Calendar','','greenportal_calendar',1273032722,1301973999,'3','7','3','WebGUI::Asset::Wobject::Folder',1,'Greenportal_Calendar Greenportal_Calendar greenportal calendar','000001000001000057000015',NULL),('U78V5IJHVljvRTb6ydsTHg','Greenportal_calendarMonth','','greenportal_calendar/greenportal_calendarmonth',1273032722,1301973999,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_calendarMonth Greenportal_calendarMonth greenportal calendar greenportal calendarmonth Calendar/Month','000001000001000057000015000001',NULL),('Xqc3qPUXoFE8dt9qocdWig','Greenportal_calendarWeek','','greenportal_calendar/greenportal_calendarweek',1273032722,1301973999,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_calendarWeek Greenportal_calendarWeek greenportal calendar greenportal calendarweek Calendar/Week','000001000001000057000015000002',NULL),('IBTb7wllSt7RxFmmvm9pkQ','Greenportal_calendarDay','','greenportal_calendar/greenportal_calendarday',1273032722,1301973999,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_calendarDay Greenportal_calendarDay greenportal calendar greenportal calendarday Calendar/Day','000001000001000057000015000003',NULL),('Z1EM7JMI_4SkyfaZffSElw','Greenportal_calendarEvent','','greenportal_calendar/greenportal_calendarevent',1273032722,1301973999,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_calendarEvent Greenportal_calendarEvent greenportal calendar greenportal calendarevent Calendar/Event','000001000001000057000015000004',NULL),('fJg7SKpGZwzSNx3_ebki1A','Greenportal_calendarEventEdit','','greenportal_calendar/greenportal_calendareventedit',1273032722,1301973999,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_calendarEventEdit Greenportal_calendarEventEdit greenportal calendar greenportal calendareventedit Calendar/EventEdit','000001000001000057000015000005',NULL),('ihf4Rx6p72xn_nVKaIeOaw','Greenportal_calendarSearch','','greenportal_calendar/greenportal_calendarsearch',1273032722,1301973999,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_calendarSearch Greenportal_calendarSearch greenportal calendar greenportal calendarsearch Calendar/Search','000001000001000057000015000006',NULL),('jrWJ6nHXkqgFbml7BZ9chw','Greenportal_submission','','greenportal_submission',1273032722,1301974000,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_submission Greenportal_submission greenportal submission Collaboration/Thread','000001000001000057000016',NULL),('Ys6f3vpe0y1uRcaCJ2TlFw','Greenportal_messageboard','','greenportal_messageboard',1273032722,1301974000,'3','7','3','WebGUI::Asset::Template',0,'Greenportal_messageboard Greenportal_messageboard greenportal messageboard MessageBoard','000001000001000057000017',NULL),('default_CS_unsubscribe','Default Collaboration System Unsubscribe','','collaboration_unsubscribe',1274238758,1277868922,'3','7','4','WebGUI::Asset::Template',0,'Default Collaboration System Unsubscribe Default Collaboration System Unsubscribe collaboration unsubscribe Collaboration/Unsubscribe','000001000001000008000030',NULL),('_hELmIJfgbAyXFNqPyApxQ','admin.css','','root/import/gallery-templates/admin.css',1197330678,1285124155,'3','7','3','WebGUI::Asset::Snippet',0,'admin.css admin.css root import gallery templates admin.css adminWrapper text-align:left font-family:arial font-size:11px position relative z-index 2 h2 font-size:15px messageStyle font-weight:bold font-family:arial font-size:10px margin-bottom:8px adminButton border:solid silver 1px background-color:#e0e0e0 font-weight:bold font-size:10px color:#333 cursor:pointer padding 0.5em 1em adminTable border:solid silver 1px background-color:#F0F0F0 color black width:320px padding:5px adminTable select adminTable input adminTable textarea border:solid gray 1px font-size:10px padding-left:5px label white-space:nowrap text-align:right padding-right:10px font-weight:bold width:1px vertical-align:top galleryOrg list-style-type:none display:block width:95 margin-top:3px padding-top:10px margin-left:5px border:gray solid 1px text-align:center font-family:verdana,arial font-size:9pt background-color:#dedede galleryOrgList margin 0px padding 0px galleryOrg left float left width 36 galleryOrg right width 63 galleryOrg img display:block height:150px margin:0px auto border none galleryOrg select galleryOrg input galleryOrg textarea border:solid gray 1px font-size:10px padding-left:5px promote margin-left:3px promote img height:14px width:16px demote margin-right:3px demote img height:14px width:16px delete img height 14px numbering position:absolute top:0px left:0px padding:1px background-color:black color:white moz-border-radius-bottomRight:5px input.captionEnter width:93px clear:both margin-bottom:3px galleryOrg button border-style:none background:none galleryOrg button img width:16px height:auto galleryOrg synopsis input width:80px ','000001000001000015000015',NULL),('68sKwDgf9cGH58-NZcU4lg','Welcome','','home',1124395696,1286336676,'3','7','3','WebGUI::Asset::Wobject::Layout',1,'Welcome Home home','000001000002',NULL),('bX5rYxb6tZ9docY6sUhBlw','Getting Started','\nCongratulations on successfully installing the WebGUI Content Engine®. If you used the Site Starter to select a set of default pages, you will see those pages in the site navigation. You will also notice that a number of additional pages appear, such','getting_started/getting-started',1147642514,1278013772,'3','7','4','WebGUI::Asset::Wobject::Article',1,'Getting Started Getting Started getting started getting started Congratulations on successfully installing the WebGUI Content Engine® If you used the Site Starter to select a set of default pages you will see those pages in the site navigation You will also notice that a number of additional pages appear such as this page These are default pages added for your convenience to help you get started with WebGUI and find the resources you need Feel free to remove these extra pages whenever you are ready To get started managing content download the PDF document below This document provides a basic introduction to the WebGUI user interface WebGUI Basics PDF Once you have read this document you may want to head over to the Documentation section where you can find more WebGUI resources ','000001000002000001000001',NULL),('8Bb8gu-me2mhL3ljFyiWLg','Talk to the Experts','Plain Black® created the WebGUI Content Engine® and is here to answer \nyour questions and provide you with services to make sure your WebGUI \nimplementation is entirely successful. We bend over backwards to make \nsure you\'re a success. Contact us ','your_next_step',1124395696,1271359194,'3','7','3','WebGUI::Asset::Wobject::Layout',1,'Talk to the Experts Your Next Step your next step Plain Black® created the WebGUI Content Engine® and is here to answer your questions and provide you with services to make sure your WebGUI implementation is entirely successful We bend over backwards to make sure you\'re a success Contact us today to see how we can help you','000001000002000002',NULL),('ix1p0AbwKAz8QWB-T-HHfg','Get Support','Plain Black provides support packages to fit any budget or need. Start out with online support which costs only $500 per year, or work with Plain Black to build a custom support package tailored to your specific needs. No matter what level of support you ','yns/support',1147642516,1271359087,'3','7','4','WebGUI::Asset::Wobject::Article',1,'Get Support Get Support yns support Plain Black provides support packages to fit any budget or need Start out with online support which costs only $500 per year or work with Plain Black to build a custom support package tailored to your specific needs No matter what level of support you purchase you will get personalized and friendly service in a timely manner ','000001000002000002000001',NULL),('iCYOjohB9SKvAPr6bXElKA','Get Hosting','Plain Black\'s professionally trained WebGUI experts can handle the task\nof hosting your web site, intranet, or extranet. Let us deal with upgrades, security, and server management so you focus on building your WebGUI site, which is where your time and exp','yns/hosting',1147642516,1271445525,'3','7','4','WebGUI::Asset::Wobject::Article',1,'Get Hosting Get Hosting yns hosting Plain Black\'s professionally trained WebGUI experts can handle the task of hosting your web site intranet or extranet Let us deal with upgrades security and server management so you focus on building your WebGUI site which is where your time and expertise should be spent And when you sign up with hosting online support is included ','000001000002000002000002',NULL),('4Yfz9hqBqM8OYMGuQK8oLw','Get Features','WebGUI\'s robust API allows for easy customization. Plain Black\'s team of developers can create any features you need for your site. We\'ve built hundreds of custom applications for people. From simple macros, to custom single sign on systems, to applicatio','yns/features',1147642516,1271352537,'3','7','4','WebGUI::Asset::Wobject::Article',1,'Get Features Get Features yns features WebGUI\'s robust API allows for easy customization Plain Black\'s team of developers can create any features you need for your site We\'ve built hundreds of custom applications for people From simple macros to custom single sign on systems to applications that will manage your entire company our team will leverage the power of WebGUI to your advantage ','000001000002000002000003',NULL),('Wl8WZ43g2rK5AYr9o4zY7w','Get Style','Branding and visual appeal are powerful marketing tools. Don\'t let your site become a wallflower. Plain Black\'s professional design team can create a custom design to make your site stand out. Our team is fast, easy to work with, and can even migrate your','yns/style',1147642516,1271445539,'3','7','4','WebGUI::Asset::Wobject::Article',1,'Get Style Get Style yns style Branding and visual appeal are powerful marketing tools Don\'t let your site become a wallflower Plain Black\'s professional design team can create a custom design to make your site stand out Our team is fast easy to work with and can even migrate your existing content into your new WebGUI site ','000001000002000002000004',NULL),('2TqQc4OISddWCZmRY1_m8A','Join Us','The WebGUI project community is a diverse and talented group. If you \nwould like to contribute back to the project there are many ways to \nbecome involved. ','join_us',1124395696,1271357565,'3','7','3','WebGUI::Asset::Wobject::Layout',1,'Join Us Join Us join us The WebGUI project community is a diverse and talented group If you would like to contribute back to the project there are many ways to become involved','000001000002000004',NULL),('k2Qj03FrAOXYra8kDJYYXw','IRC (Internet Relay Chat)','You can find members of the community on the #webgui chat channel on the Freenode IRC network. If you\'re not \nfamiliar with IRC, it\'s essentially like a chat room. A few things you\'ll need to know: \n\n\n\nYou need an IRC client program. There are many availa','join_us/irc',1271357513,1271357513,'3','7','3','WebGUI::Asset::Wobject::Article',1,'IRC Internet Relay Chat IRC join us irc You can find members of the community on the webgui chat channel on the Freenode IRC network If you\'re not familiar with IRC it\'s essentially like a chat room A few things you\'ll need to know You need an IRC client program There are many available that can be downloaded free of charge The IRC network we use is Freenode Our channel is webgui Channel operators have an next to their name All channel operators in webgui are Plain Black employees Someone with a + next to their name is a recognized contributor in the WebGUI community People who have been recognized as one of the People Behind WebGUI are often given this designation If you\'re looking for a mentor recognized contributors are a good place to start ','000001000002000004000003',NULL),('ksSfkZdsr0uC62NwIk6hFQ','WebGUI Users Conference','An annual event, this is the one time a year when WebGUI users and Plain\n Black\'s staff come together to do all things WebGUI. This is by far \nthe best way to get involved with the community as nothing can replace \nface to face interaction and mentoring.','join_us/wuc',1271356973,1271356973,'3','7','3','WebGUI::Asset::Wobject::Article',1,'WebGUI Users Conference WUC join us wuc An annual event this is the one time a year when WebGUI users and Plain Black\'s staff come together to do all things WebGUI This is by far the best way to get involved with the community as nothing can replace face to face interaction and mentoring The conference is usually held in the fall of each year and more information on attending can be found on the WebGUI Users Conference website as details become available ','000001000002000004000004',NULL),('nWxS5jnA3o3DgPEwBeR7yQ','The Forums','WebGUI \nForums are available for WebGUI related\n discussion and community support. Bounce around ideas, discuss \nimportant issues, and ask community members for help and advice. WebGUI \nForums are broken up into: \n\nEt Cetera: general WebGUI discussion \nWe','join_us/forums',1271357239,1271357239,'3','7','3','WebGUI::Asset::Wobject::Article',1,'The Forums forums join us forums WebGUI Forums are available for WebGUI related discussion and community support Bounce around ideas discuss important issues and ask community members for help and advice WebGUI Forums are broken up into Et Cetera general WebGUI discussion Web Design Templates and Themes discuss making your site look pretty Admin Forum get your questions answered about everything from security to configuration Install/Upgrade Help get answers to your installation and upgrade questions WebGUI Dev a place to discuss WebGUI and WRE core development as well as writing your own custom modules ','000001000002000004000005',NULL),('AssetReportFolder00001','Asset Report','','asset_report',1281501163,1281501163,'3','3','4','WebGUI::Asset::Wobject::Folder',1,'Asset Report Asset Report asset report','000001000001000058',NULL),('sJtcUCfn0CVbKdb4QM61Yw','Asset Report Default Template','','asset-report/asset-report-default-template',1281501163,1283921584,'3','3','4','WebGUI::Asset::Template',0,'Asset Report Default Template Asset Report Default Template asset report asset report default template AssetReport','000001000001000058000001',NULL),('N7uMnnicbyTEulcuRi1sSg','PDFs','','media/pdfs',1283900195,1283900195,'3','7','4','WebGUI::Asset::Wobject::Folder',1,'PDFs PDFs media pdfs','000001000003000001',NULL),('bCGr7FRtZt-XYlBVUEJBjw','Getting_Started_doc.pdf','','media/pdfs/getting_started_doc.pdf',1278013724,1278013724,'3','7','4','WebGUI::Asset::File::Image',1,'Getting_Started_doc.pdf Getting_Started_doc.pdf media pdfs getting started doc.pdf','000001000003000001000001',NULL),('A3T7jpTBKLYws1h5mJ0t8A','makepageprintable.css','','makepageprintable.css',1286336607,1286336607,'3','7','12','WebGUI::Asset::Snippet',0,'makepageprintable.css makepageprintable.css makepageprintable.css This is the stylesheet for the Make Page Printable Style template reset html body div span applet object iframe h1 h2 h3 h4 h5 h6 p blockquote pre a abbr acronym address big cite code del dfn em font img ins kbd q s samp small strike strong sub sup tt var b u i center dl dt dd ol ul li fieldset form label legend table caption tbody tfoot thead tr th td margin:0 padding:0 border:0 outline:0 font-size:100 vertical-align:baseline background:transparent text-decoration:none font-weight:normal font-style:normal basic formatting body font:12px/18px Georgia,\"Bitstream Charter\",\"Liberation Serif\",\"Times New Roman\",Times,serif color:#000 h1 h2 h3 h4 h5 h6 font:12px/18px Helvetica,Arial,\"Liberation Sans\",sans-serif code font:11px/18px Lucida Console\",\"Courier New\",\"Liberation Mono\",monospace h1 h2 font-size:18px line-height:24px margin:24px 0 12px h3 font-size:14px margin:0 0 12px h4 margin:0 0 6px font-weight:bold h5 margin:0 0 6px h6 font-style:italic margin:0 0 6px p ul ol dl blockquote table form fieldset margin:0 0 18px a:link a:visited text-decoration:underline color:#000 a:hover a:active text-decoration:none color:#000 ol ul blockquote padding:0 0 0 27px ol ol ol ul ul ul ul ol margin:0 dd margin:0 0 3px blockquote font-style:italic font-size:15px quotes:none blockquote p font-style:italic margin:0 0 9px q quotes:none font-style:italic blockquote:before blockquote:after q:before q:after content content:none b strong dt font-weight:bold cite dfn i em ins font-style:italic abbr acronym text-transform:lowercase font-variant:small-caps del text-decoration:line-through sub vertical-align:sub font-size:8px sup vertical-align:super font-size:8px hr border-color:#aaa border-style:dotted border-width:1px 0 0 color:#fff background:#fff margin:18px 0 padding:0 width:100 legend font-weight:bold label display:block table border-collapse:collapse border-spacing:0 caption font-style:italic margin:0 0 6px tr border-bottom:1px dotted ccc thead tr border-top:1px solid ccc border-bottom:1px solid ccc th td padding:5px 9px 4px th font-variant:small-caps very basic positioning design header border-top:1px dotted aaa border-bottom:1px dotted aaa padding:17px 6px color:#666 header h1 font-weight:bold margin:0 text-transform:uppercase header a text-decoration:none font-style:italic color:#666 font-size:11px content padding:0 6px margin:18px 0 36px content a font-weight:bold content img margin:0 0 18px footer border-top:1px dotted aaa border-bottom:1px dotted aaa padding:17px 6px color:#666 ','000001000001000041000007',NULL),('j_1qEqM6iLfQLiR6VKy0aA','Free Documentation','There are hundreds of pages of free documentation available for WebGUI, provided by both Plain Black and the community at large. The following list is by no means comprehensive, but it should get you started in the right direction. \n \n\nPrimer - A downloa','documentation/free-documentation',1215718151,1299872071,'3','7','3','WebGUI::Asset::Wobject::Article',1,'Free Documentation Free Documentation documentation free documentation There are hundreds of pages of free documentation available for WebGUI provided by both Plain Black and the community at large The following list is by no means comprehensive but it should get you started in the right direction Primer A downloadable PDF that shows you the basics of publishing content in WebGUI WebGUI User Guides all commercial user guides previously published by Plain Black are in the process of being converted into wikis You can find these wikis on the WebGUI User Guides page of www.webgui.org This is an ongoing process until all books have been converted remaining books are being made available as free PDF downloads Wiki Hundreds of pages of WebGUI community contributed content featuring a variety of tutorials Worldwide A collection of WebGUI related web sites from all over the world that have documentation and other resources for WebGUI API Docs The documentation of all of the WebGUI source code Template Help The documentation of all of WebGUI\'s template variables ','000001000002000003000001',NULL),('diZvW4bSgZWwyyGP3qXi1g','Commercial Documentation','Plain Black has created a line of commercial books which total over 1500 pages of detailed documentation about WebGUI. Both black and white and full color editions of these books are available. Visit the book store today to stock your WebGUI library. Othe','documentation/commercial-documentation',1215717972,1285610019,'3','7','3','WebGUI::Asset::Wobject::Article',1,'Commercial Documentation Commercial Documentation documentation commercial documentation Plain Black has created a line of commercial books which total over 1500 pages of detailed documentation about WebGUI Both black and white and full color editions of these books are available Visit the book store today to stock your WebGUI library Other than hands on training there is no better way to hone your WebGUI skills No matter what your need Plain Black has created a book that\'s right for you and is creating new books each year In the fall of 2010 Plain Black announced that these books will be converted into free wikis You can now access all WebGUI user guides for free on the WebGUI User Guides page on www.webgui.org These books are available for WebGUI version 7.7 and earlier For later documentation see the free resources available on the WebGUI project website ','000001000002000003000003',NULL),('sK_0zVw4kwdJ1sqREIsSzA','WebGUI Auth Password Recovery Email Template','','root/import/auth/webgui/recoveryemail',1287545015,1287545015,'3','7','4','WebGUI::Asset::Template',0,'WebGUI Auth Password Recovery Email Template Password Recovery Email root import auth webgui recoveryemail Auth/WebGUI/RecoveryEmail','000001000001000005000011',NULL),('_cD6DLM_Fs5IlrLeWUjrjg','Workflow Activity Templates','Folder for holding Workflow Activity templates. ','root/import/workflow-activity-templates',1287545015,1287545015,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Workflow Activity Templates Workflow Activity Templates root import workflow activity templates Folder for holding Workflow Activity templates','000001000001000059',NULL),('lYhMheuuLROK_iNjaQuPKg','Notify About Version Tag','','root/import/workflow-activity-templates/notify-about-version-tag',1287545015,1287545015,'3','7','12','WebGUI::Asset::Template',0,'Notify About Version Tag Notify About Version Tag root import workflow activity templates notify about version tag NotifyAboutVersionTag','000001000001000059000001',NULL),('PBtmplHelp000000000001','Help','','root/import/adminconsole/help',1124395706,1147642410,'3','7','12','WebGUI::Asset::Template',0,'Help Help root import adminconsole help AdminConsole','000001000001000003000002',NULL),('2GxjjkRuRkdUg_PccRPjpA','Select Gateway (Default)','','shopping-cart-collateral-items/select-gateway-default',1257311888,1326776038,'3','7','3','WebGUI::Asset::Template',0,'Select Gateway Default Select Gateway Default shopping cart collateral items select gateway default Shop/selectGateway','000001000001000036000024',NULL),('qxd0WpRGqDPWP8WBicYvEA','dragdropsorting.js','','root/import/gallery-templates/dragdropsorting.js',1271820952,1285124158,'3','7','12','WebGUI::Asset::Snippet',0,'dragdropsorting.js dragdropsorting.js root import gallery templates dragdropsorting.js Create our own namespace For the moment we leave this here since there are no other JS modules for the gallery if typeof Gallery == undefined Gallery = Gallery.DDSorting = Configure the drag\'n\'drop sorting app Gallery.DDSorting.parentId = photos Element Id of the container element Gallery.DDSorting.draggableNodeTags = li Type of tag used for draggable items Gallery.DDSorting.idPrefix = photoId Prefix used in Ids of draggable items Create some shortcuts var Dom = YAHOO.util.Dom var Event = YAHOO.util.Event var DDM = YAHOO.util.DragDropMgr Drag\'n\'drop sorting app for the gallery Gallery.DDSorting.init = function Make list element containing photos a drop target new YAHOO.util.DDTarget(this.parentId Get all items within list of photos var items = document.getElementById(this.parentId).getElementsByTagName(this.draggableNodeTags Initialize DDList object for all list items for i=0 i < items.length i=i+1 new Gallery.DDList(this items[i].id gallery Custom drag and drop implementation Gallery.DDList = function(app id sGroup config Gallery.DDList.superclass.constructor.call(this id sGroup config var el = this.getDragEl Dom.setStyle(el opacity 0.67 The proxy is slightly transparent Assign reference to application object this.app = app Init variables for direction and replacement tracking this.goingUp = false this.goingLeft = false this.lastY = 0 this.lastX = 0 this.before = false this.lastReplaced = null YAHOO.extend(Gallery.DDList YAHOO.util.DDProxy startDrag function(x y Make the proxy look like the source element var dragEl = this.getDragEl var clickEl = this.getEl Dom.setStyle(clickEl visibility hidden Copy source element to proxy and set class dragEl.className = clickEl.className dragEl.innerHTML = clickEl.innerHTML endDrag function(e var srcEl = this.getEl var proxy = this.getDragEl Show the proxy element and animate it to the src element\'s location Dom.setStyle(proxy visibility var a = new YAHOO.util.Motion proxy points to Dom.getXY(srcEl 0.2 YAHOO.util.Easing.easeOut var proxyid = proxy.id var thisid = this.id Hide the proxy and show the source element when finished with the animation a.onComplete.subscribe(function Dom.setStyle(proxyid visibility hidden Dom.setStyle(thisid visibility a.animate Do nothing more if no element has been replaced if this.lastReplaced == null return Get assed ids of the target to move and the last photo replaced var target = srcEl.id.replace(this.app.idPrefix var dest = this.lastReplaced.id.replace(this.app.idPrefix Prepare call to ajax service of the gallery asset We need to set the action argument to moveFile provide the asset id of the target photo in target and the asset id of the photo replaced in before or after depending on order var args = args.action = moveFile args.target = target if this.before args.before = dest else args.after = dest Callback function for asynchronous request This is required for error handling var callback = success function o Parse answer from ajax service result = YAHOO.lang.JSON.parse(o.responseText Check for errors if result.err Display error message alert(\'Failed to move photo + result.errMessage Request a reload of the page so we are back in sync location.reload failure function o Display generic error message alert(\'AJAX service for moving photos is currently not available Failed to move photo Request a reload of the page so we are back in sync location.reload Convert args object to JSON string var postData = func=ajax;args= + encodeURI(YAHOO.lang.JSON.stringify(args Make asynchronous call to gallery asset YAHOO.util.Connect.asyncRequest(\"POST this.app.url callback postData onDrag function(e Keep track of the direction of the drag for use during onDragOver var y = Event.getPageY(e var x = Event.getPageX(e Check in vertical direction if y < this.lastY this.goingUp = true else if y > this.lastY this.goingUp = false Check in horizontal direction if x < this.lastX this.goingLeft = true else if x > this.lastX this.goingLeft = false this.lastY = y this.lastX = x onDragOver function(e id var srcEl = this.getEl var destEl = Dom.get(id We are only concerned with list items we ignore the dragover notifications for the list if destEl.nodeName.toLowerCase == this.app.draggableNodeTags var orig_p = srcEl.parentNode var p = destEl.parentNode if this.goingUp || this.goingLeft Insert above/before p.insertBefore(srcEl destEl Keep track of where we moved this.lastReplaced = destEl this.before = true else Insert below/after p.insertBefore(srcEl destEl.nextSibling Keep track of where we moved this.lastReplaced = destEl this.before = false DDM.refreshCache Start application after DOM is ready Event.onDOMReady(Gallery.DDSorting.init Gallery.DDSorting true','000001000001000015000026',NULL),('f2EktltCvwQpl_3-B1yR7g','Asset Templates','','root/import/asset_templates',1288748251,1288748251,'3','7','12','WebGUI::Asset::Wobject::Folder',1,'Asset Templates Asset Templates root import asset templates','000001000001000060',NULL),('BBpxqoSseIor5C9ei9JEFQ','Underground WebGUI.css','','style-underground/css/underground-webgui.css',1273032719,1301973996,'3','7','3','WebGUI::Asset::Snippet',0,'Underground WebGUI.css Underground WebGUI.css style underground css underground webgui.css wg-toolbar p margin 0px img.wg-toolbar-icon border 0px none toolbarIcon margin 0px label display inline ','000001000001000056000002000002',NULL),('xyyn5mz3xGyvrcI1rY8C-w','greenportal.css','','greenportal.css',1273032721,1301973998,'3','7','12','WebGUI::Asset::Snippet',0,'greenportal.css greenportal.css greenportal.css CSS Document body,html text-align:center height 100 margin 3px 3px 3px 3px font-family Verdana Sans-Serif line-height 125 color:#CCCCCC background 222625 h1,h2,h3,h4,h5,h6{font-weight:bold h1{font-size:18px h2{font-size:16px h3{font-size:14px h4{font-size:12px h5{font-size:11px h6{font-size:10px main width:80 height:100 margin-left:auto margin-right:auto position:relative body > main height:auto min-height:100 font-size:10px main mainHeader width:100 height:125px background url(\'^FileUrl(/greenportal_image/logo.jpg top center no-repeat margin-bottom:5px position:relative main mainHeader title position:absolute top:55px left:180px font-size:36pt font-family Edwardian Script ITC Arial Sans-Serif font-variant small-caps font-style italic color:#CCCCCC font-weight bold overflow visible padding 20px main mainHeader title a color:#CCCCCC text-decoration:none main mainHeader title a:hover color:#FFFFFF text-decoration:none font-size:37pt main mainMenu width:186px position:absolute top:125px left:0px main mainMenu li list-style none font-size 9pt text-align:left main mainMenu menuTop color:#99CC33 background url(\'^FileUrl(/greenportal_image/menu_top.png no-repeat margin-left:-3px padding:2px 0px 3px 26px width:162px 186px-24px font-size:10pt font-weight bold main mainMenu indent1 margin-left:0px width:186px main mainMenu indent2 margin-left:17px width:168px 186-17px main mainMenu a display:block height:24px font-weight:bold text-decoration:none color:#CCCCCC background url(\'^FileUrl(/greenportal_image/menu_dark.png no-repeat padding:2px 0px 0px 24px main mainMenu a:hover,active display:block height:24px font-weight:bold text-decoration:none color:#FFFFFF background url(\'^FileUrl(/greenportal_image/menu_light.png no-repeat padding:2px 0px 0px 24px main mainContent width:75 height:100 margin-top:5px margin-left:215px text-align:left border 1px solid CCCCCC main > mainContent margin-top:0px min-height:500px main > mainContent > p margin-top:0px main mainContent topMenu margin-right 10px text-align right font-size 8pt font-weight bold main mainContent topMenu a color 99CC33 text-decoration none main mainContent topMenu a:hover text-decoration:underline main mainContent mainText margin 10px 5px 5px 10px font-size:8pt padding 5px min-height 423px text-align left main mainContent mainText a color:#FFFFFF text-decoration none font-weight bold main mainContent mainText a:hover color:#FFFF00 text-decoration none font-weight bold main mainContent mainText yui-skin-sam a color 222625 text-decoration none font-weight bold main mainFooter text-align:left padding:10px margin:5px 0px 5px 200px width:75 font-size:9px background:url(^FileUrl(/greenportal_image/logo.jpg no-repeat main mainFooter a color:#CCCCCC font-weight:bold text-decoration:none main mainFooter a:hover color:#FFFFFF font-weight:bold text-decoration:none ','000001000001000057000002',NULL),('XdlKhCDvArs40uqBhvzR3w','Article With Pagination','','article-with-pagination',1254881103,1259133275,'3','7','12','WebGUI::Asset::Template',0,'Article With Pagination Article With Pagination article with pagination Article','000001000001000004000006',NULL),('mRtqRuVikSe82BQsYBlD0A','Bare Image','','bare_image',1263962529,1263962529,'3','7','12','WebGUI::Asset::Template',0,'Bare Image Bare Image bare image ImageAsset','000001000001000017000003',NULL),('8tqyQx-LwYUHIWOlKPjJrA','EMS Event Submission Template','','root/import/ems/ems-event-submission',1258524917,1279073449,'3','7','12','WebGUI::Asset::Template',0,'EMS Event Submission Template EMS Event Submission Template root import ems ems event submission EMS/Submission','000001000001000012000009',NULL),('DoVNijm6lMDE0cYrtvEbDQ','EMS Event Submission Main Template','','root/import/ems/ems-event-submission-main',1258524917,1279073449,'3','7','12','WebGUI::Asset::Template',0,'EMS Event Submission Main Template EMS Event Submission Main Template root import ems ems event submission main EMS/SubmissionMain','000001000001000012000010',NULL),('ktSvKU8riGimhcsxXwqvPQ','EMS Event Submission Queue','','root/import/ems/ems-event-submission-queue',1258524917,1279073450,'3','7','12','WebGUI::Asset::Template',0,'EMS Event Submission Queue EMS Event Submission Queue root import ems ems event submission queue EMS/SubmissionQueue','000001000001000012000011',NULL),('pbproto000000000000002','Request Tracker','','request-tracker-prototype',1147642465,1163019036,'3','7','12','WebGUI::Asset::Wobject::Collaboration',1,'Request Tracker Request Tracker request tracker prototype','000001000001000008000031',NULL),('VCFhB9WOsDsH2Apj3c6DpQ','Three Columns','','three-columns',1254881103,1259133276,'3','7','12','WebGUI::Asset::Template',0,'Three Columns Three Columns three columns Layout','000001000001000019000008',NULL),('_aE16Rr1-bXBf8SIaLZjCg','picklanguage','','media/picklanguage',1257311888,1257311888,'3','7','12','WebGUI::Asset::Template',0,'picklanguage picklanguage media picklanguage Macro/PickLanguage','000001000001000021000013',NULL),('mfHGkp6t9gdclmzN33OEnw','Default Twitter Choose Username','','root/import/auth/twitter/chooseusername/default-twitter-choose-username',1277868927,1277868927,'3','7','12','WebGUI::Asset::Template',0,'Default Twitter Choose Username Default Twitter Choose Username root import auth twitter chooseusername default twitter choose username Auth/Twitter/ChooseUsername','000001000001000005000012',NULL),('limMkk80fMB3fqNZVf162w','Default Asset Subscription','','root/import/default-asset-subscription',1253507213,1281501163,'3','7','3','WebGUI::Asset::Template',0,'Default Asset Subscription Default Asset Subscription root import default asset subscription AssetAspect/Subscribable','000001000001000060000001',NULL),('YP9WaMPJHvCJl-YwrLVcPw','Progress Bar','','admin_progress_bar',1245376837,1245376837,'3','7','12','WebGUI::Asset::Template',0,'Progress Bar Progress Bar admin progress bar AdminConsole/ProgressBar','000001000001000060000002',NULL),('Rqwgh50A3gGcOKIrdi_kxw','Authorize.net Credentials (Default)','','shopping-cart-collateral-items/authorizenet-credentials',1313542962,1326776038,'3','7','4','WebGUI::Asset::Template',0,'Authorize.net Credentials Default Authorize.net Credentials Default shopping cart collateral items authorizenet credentials Shop/Credentials','000001000001000036000025',NULL),('3n3H85BsdeRQ0I08WmvlOg','thingy.css','','root/import/thingy-templates/thingy.css',1212091492,1313542960,'3','7','12','WebGUI::Asset::Snippet',0,'thingy.css thingy.css root import thingy templates thingy.css wgThingy margin:5px wgThingy styleButton color:black margin:0px 5px display:block float:left wgThingy spacerOne padding-left:15px wgThingy rowOne wgThingy tr.rowOne td background EEEEEE margin:1px border:solid CDCDCD 1px color:#000 padding:2px wgThingy rowTwo wgThingy tr.rowTwo td background DBDBDB margin:1px border:solid DDDDDD 1px color:#000 padding:2px wgThingsWrapper img display:block vertical-align:middle float:left wgThingsWrapper label font-weight:bold padding-left:15px wgThingy h2.title background 000 height:42px color:white font-size:18px font-weight:bold letter-spacing:1px line-height:42px padding-left:15px margin-bottom:0px wgThingy span.smaller font-size:13px color:white wgThingy controls line-height:35px height:35px background f1f1f1 margin-top:0px margin-bottom:20px padding:0px overflow:visible wgThingy label background:black color:white padding:2px 5px font-family:arial font-size:11px font-weight:bold vertical-align:middle wgThingy label a color:white searchTable input editThing input background white border:solid 555 1px editThing margin-top:15px thingyList thingyList margin:0px padding:0px thingyList position:relative float:left overflow:visible thingyList goButton:link thingyList goButton:visited padding:2px 25px 2px 2px background F1F1F1 url(^FileUrl(root/import/thingy-templates/images/go-btn.gif no-repeat right line-height:20px border:solid a2a2a2 1px color:#a2a2a2 text-decoration:none font-family:verdana arial font-size:10px font-weight:bold margin-left:20px letter-spacing:0px thingyList goButton:hover background-color:white thingyList things padding:0px margin:0px width:300px z-index:5000 position:absolute top:27px left:20px border:solid a2a2a2 1px border-top-style:none thingyList things a:link thingyList things a:visited display:block background-color:#f1f1f1 border-top:solid a2a2a2 1px border-bottom:solid 727272 1px line-height:12px font-size:10px height:12px padding:2px 5px text-decoration:none font-weight:bold color:#a2a2a2 thingyList things a:hover background-color:white ','000001000001000044000006',NULL); ALTER TABLE `assetIndex` ENABLE KEYS; ALTER TABLE `assetVersionTag` DISABLE KEYS; -INSERT INTO `assetVersionTag` VALUES ('pbversion0000000000001','Base 7.10.23 Install',1,1315877146,'3',1315877146,'3',0,'','3','',NULL,NULL,NULL,NULL,0); +INSERT INTO `assetVersionTag` VALUES ('pbversion0000000000001','Base 7.10.24 Install',1,1326776041,'3',1326776041,'3',0,'','3','',NULL,NULL,NULL,NULL,0); ALTER TABLE `assetVersionTag` ENABLE KEYS; ALTER TABLE `authentication` DISABLE KEYS; INSERT INTO `authentication` VALUES ('1','LDAP','ldapUrl',NULL),('3','LDAP','ldapUrl',''),('1','LDAP','connectDN',NULL),('3','LDAP','connectDN',''),('1','WebGUI','identifier','No Login'),('3','WebGUI','identifier','RvlMjeFPs2aAhQdo/xt/Kg'),('1','WebGUI','passwordLastUpdated','1078704037'),('1','WebGUI','passwordTimeout','3122064000'),('1','WebGUI','changeUsername','1'),('1','WebGUI','changePassword','1'),('3','WebGUI','passwordLastUpdated','1078704037'),('3','WebGUI','passwordTimeout','3122064000'),('3','WebGUI','changeUsername','1'),('3','WebGUI','changePassword','1'); @@ -2500,8 +2693,8 @@ ALTER TABLE `snippet` DISABLE KEYS; INSERT INTO `snippet` VALUES ('SynConXSLT000000000001','\n\n\n \n \n \n \n \n \nYou\'re viewing an RSS version 0.9 feed. Please use an RSS feed reader to view this content as intended.\n
    \n
    \n \n
    \n
    \n \n
    \n
      \n \n
    \n
    \n
    \n \n
  • \n \n \n \n
  • \n
    \n
    ','application/xml',1124395707,3600,'\n\n\n \n \n \n \n \n \nYou\'re viewing an RSS version 0.9 feed. Please use an RSS feed reader to view this content as intended.\n
    \n
    \n \n
    \n
    \n \n
    \n
      \n \n
    \n
    \n
    \n \n
  • \n \n \n \n
  • \n
    \n
    ',0,NULL),('SynConXSLT000000000002','\n\n\n \n \n \n \n \n \n
    \nYou\'re viewing an RSS version 0.91 feed. Please use an RSS feed reader to view this content as intended.\n
    \n \n
    \n
    \n \n
    \n
      \n \n
    \n\n
    \n
    \n \n
  • \n \n \n \n
    \n \n\n
    \n
  • \n
    \n
    ','application/xml',1124395707,3600,'\n\n\n \n \n \n \n \n \n
    \nYou\'re viewing an RSS version 0.91 feed. Please use an RSS feed reader to view this content as intended.\n
    \n \n
    \n
    \n \n
    \n
      \n \n
    \n\n
    \n
    \n \n
  • \n \n \n \n
    \n \n\n
    \n
  • \n
    \n
    ',0,NULL),('SynConXSLT000000000003','\n\n\n \n \n \n \n \n \n
    \nYou\'re viewing an RSS version 1.0 feed. Please use an RSS feed reader to view this content as intended.\n
    \n \n
    \n
    \n \n
    \n
      \n \n
    \n\n
    \n
    \n \n
  • \n \n \n \n \n (\n )\n \n\n
    \n \n
    \n
  • \n
    \n
    \n','application/xml',1124395707,3600,'\n\n\n \n \n \n \n \n \n
    \nYou\'re viewing an RSS version 1.0 feed. Please use an RSS feed reader to view this content as intended.\n
    \n \n
    \n
    \n \n
    \n
      \n \n
    \n\n
    \n
    \n \n
  • \n \n \n \n \n (\n )\n \n\n
    \n \n
    \n
  • \n
    \n
    \n',0,NULL),('SynConXSLT000000000004','\n\n\n \n \n \n \n \n \n
    \nYou\'re viewing an RSS version 2.0 feed. Please use an RSS feed reader to view this content as intended.\n
    \n \n
    \n
    \n \n
    \n
      \n \n
    \n\n
    \n
    \n \n
  • \n \n \n \n \n ()\n \n\n
    \n \n
    \n
  • \n
    \n
    ','application/xml',1124395707,3600,'\n\n\n \n \n \n \n \n \n
    \nYou\'re viewing an RSS version 2.0 feed. Please use an RSS feed reader to view this content as intended.\n
    \n \n
    \n
    \n \n
    \n
      \n \n
    \n\n
    \n
    \n \n
  • \n \n \n \n \n ()\n \n\n
    \n \n
    \n
  • \n
    \n
    ',0,NULL),('7-0-style0000000000003','body, html\n{\n text-align:center;\n margin:0px;\n height:100%; \n background-color:#494949;\n}\n\n#main\n{\n width:800px;\n background: url(\'^FileUrl(style1/main_bg.jpg);\') repeat-y;\n height:100%;\n margin-left:auto;\n margin-right:auto;\n margin-top:0px;\n margin-bottom:0px;\n position:relative;\n}\nbody > #main\n{\n height:auto;\n min-height:100%;\n}\n\n#main #mainHeader\n{\n width:800px;\n height:133px;\n background: url(\'^FileUrl(style1/header.jpg);\') top left no-repeat;\n margin-bottom:0px;\n position:relative;\n}\n#main #mainHeader #title\n{\n position:absolute;\n top:23px;\n left:145px;\n font-size:32pt;\n font-family:arial;\n color:white;\n font-weight:bold;\n}\n#main #mainHeader #title a {\n color:white;\n text-decoration:none;\n}\n\n#main #mainContent\n{\n background: url(\'^FileUrl(style1/orange_left01.jpg);\') left top no-repeat;\n width:100%;\n height:100%; \n margin-top:0px;\n text-align:left;\n border:solid red 0px;\n}\n#main > #mainContent\n{\n margin-top:0px;\n min-height:500px;\n}\n#main > #mainContent > p {\n margin-top:0px;\n}\n#main #mainContent #mainText a:link {\n color:#FF7F23;\n}\n#main #mainContent #mainText a:visited {\n color:#D25900;\n}\n\n/* LEVEL 1 AND 2 NAVIGATION */\n#main .mainNav_1, #main .mainNav_2 {\n border-bottom:dashed #DADADA 1px; \n width:621px;\n height:25px;\n text-align:left;\n position:relative;\n margin-left:137px; \n clear:both;\n}\n#main .mainNav_1 a:link, #main .mainNav_1 a:visited, #main .mainNav_2 a:link, #main .mainNav_2 a:visited {\n color:white;\n text-decoration:none;\n top:5px;\n position:relative;\n -moz-box-sizing:border-box;\n}\n#main .mainNav_1 a:hover,#main .mainNav_2 a:hover {\n color:black;\n}\n#main .mainNav_1 div .left, #main .mainNav_2 div .left {\n width:12px;\n height:25px;\n display:block;\n float:left;\n background: url(\'^FileUrl(style1/nav1_off_left.jpg);\') no-repeat top left;\n}\n#main .mainNav_2 div .left {\n background: url(\'^FileUrl(style1/nav2_off_left.jpg);\') no-repeat top left;\n}\n#main .mainNav_1 div .center, #main .mainNav_2 div .center { \n height:25px;\n display:block;\n float:left;\n background: url(\'^FileUrl(style1/nav1_off_center.jpg);\') repeat-x top left;\n color:white;\n font-family:arial, verdana;\n font-size:8pt;\n}\n#main .mainNav_2 div .center {\n background: url(\'^FileUrl(style1/nav2_off_center.jpg);\') repeat-x top left;\n}\n#main .mainNav_1 div .right, #main .mainNav_2 div .right {\n width:10px;\n height:25px;\n display:block;\n float:left;\n background: url(\'^FileUrl(style1/nav1_off_right.jpg);\') no-repeat top left;\n}\n#main .mainNav_2 div .right {\n background: url(\'^FileUrl(style1/nav2_off_right.jpg);\') no-repeat top left;\n}\n#main .mainNav_1 div.navOn .left {\n background: url(\'^FileUrl(style1/nav1_on_left.jpg);\') no-repeat top left;\n}\n#main .mainNav_1 div.navOn .center {\n background: url(\'^FileUrl(style1/nav1_center_on.jpg);\') repeat-x top left;\n}\n#main .mainNav_1 div.navOn .right {\n background: url(\'^FileUrl(style1/nav1_on_right.jpg);\') no-repeat top left;\n}\n#main .mainNav_2 div.navOn .left {\n background: url(\'^FileUrl(style1/nav2_on_left.jpg);\') no-repeat top left;\n}\n#main .mainNav_2 div.navOn .center {\n background: url(\'^FileUrl(style1/nav2_center_on.jpg);\') repeat-x top left;\n}\n#main .mainNav_2 div.navOn .right {\n background: url(\'^FileUrl(style1/nav2_on_right.jpg);\') no-repeat top left;\n} \n#main .mainNav_1 div.navOn a:link, #main .mainNav_1 div.navOn a:visited, #main .mainNav_2 div.navOn a:link, #main .mainNav_2 div.navOn a:visited {\n color:black;\n}\n/* ENDOF LEVEL 1 AND 2 NAVIGATION */\n\n#main #crumbTrail {\n margin-left:177px;\n margin-bottom:0px;\n color:gray;\n font-size:8pt;\n font-weight:bold;\n}\n#main #crumbTrail a.crumbTrail:visited, #main #crumbTrail a.crumbTrail:link {\n color:silver;\n font-size:8pt; \n font-family:arial;\n text-decoration:none;\n font-weight:normal;\n}\n#main #crumbTrail a.crumbTrail:hover {\n color:gray;\n}\n\n#main #mainText\n{\n padding-left:150px;\n font-family:verdana;\n font-size:9pt;\n width:600px;\n margin-top:0px;\n}\n\n#main #gui\n{\n bottom:0px;\n left:0px;\n position:absolute;\n width:135px;\n font-size:8pt;\n color:black;\n font-family:arial;\n text-align:right;\n}\n#main #gui .loginBox {\n padding-right:12px;\n -moz-box-sizing:border-box;\n width:100px; \n float:right;\n margin-bottom:10px;\n}\n#main #gui .loginBox .loginBoxField {\n width:75px;\n}\n#main #gui .loginBox .loginBoxButton {\n background-color:#D65501;\n color:white;\n border:solid white 2px;\n margin-top:4px;\n font-variant:small-caps;\n}\n#main #gui a\n{\n color:white; \n}\n#copyright {\n color:#fff;\n position:absolute;\n top:110px;\n right:40px;\n font-family:verdana;\n font-size:8pt;\n font-weight:bold;\n background-color:#2D2D2D;\n opacity:0.4;\n -moz-opacity:0.4;\n -khtml-opacity:0.4; \n padding:2px;\n}\n* html #copyright {\n background: transparent;\n}\n','text/css',1147642492,3600,'body,html{text-align:center;margin:0px;height:100%;background-color:#494949;}#main{width:800px;background:url(\'^FileUrl(style1/main_bg.jpg);\') repeat-y;height:100%;margin-left:auto;margin-right:auto;margin-top:0px;margin-bottom:0px;position:relative;}body > #main{height:auto;min-height:100%;}#main #mainHeader{width:800px;height:133px;background:url(\'^FileUrl(style1/header.jpg);\') top left no-repeat;margin-bottom:0px;position:relative;}#main #mainHeader #title{position:absolute;top:23px;left:145px;font-size:32pt;font-family:arial;color:white;font-weight:bold;}#main #mainHeader #title a{color:white;text-decoration:none;}#main #mainContent{background:url(\'^FileUrl(style1/orange_left01.jpg);\') left top no-repeat;width:100%;height:100%;margin-top:0px;text-align:left;border:solid red 0px;}#main > #mainContent{margin-top:0px;min-height:500px;}#main > #mainContent > p{margin-top:0px;}#main #mainContent #mainText a:link{color:#FF7F23;}#main #mainContent #mainText a:visited{color:#D25900;}#main .mainNav_1,#main .mainNav_2{border-bottom:dashed #DADADA 1px;width:621px;height:25px;text-align:left;position:relative;margin-left:137px;clear:both;}#main .mainNav_1 a:link,#main .mainNav_1 a:visited,#main .mainNav_2 a:link,#main .mainNav_2 a:visited{color:white;text-decoration:none;top:5px;position:relative;-moz-box-sizing:border-box;}#main .mainNav_1 a:hover,#main .mainNav_2 a:hover{color:black;}#main .mainNav_1 div .left,#main .mainNav_2 div .left{width:12px;height:25px;display:block;float:left;background:url(\'^FileUrl(style1/nav1_off_left.jpg);\') no-repeat top left;}#main .mainNav_2 div .left{background:url(\'^FileUrl(style1/nav2_off_left.jpg);\') no-repeat top left;}#main .mainNav_1 div .center,#main .mainNav_2 div .center{height:25px;display:block;float:left;background:url(\'^FileUrl(style1/nav1_off_center.jpg);\') repeat-x top left;color:white;font-family:arial,verdana;font-size:8pt;}#main .mainNav_2 div .center{background:url(\'^FileUrl(style1/nav2_off_center.jpg);\') repeat-x top left;}#main .mainNav_1 div .right,#main .mainNav_2 div .right{width:10px;height:25px;display:block;float:left;background:url(\'^FileUrl(style1/nav1_off_right.jpg);\') no-repeat top left;}#main .mainNav_2 div .right{background:url(\'^FileUrl(style1/nav2_off_right.jpg);\') no-repeat top left;}#main .mainNav_1 div.navOn .left{background:url(\'^FileUrl(style1/nav1_on_left.jpg);\') no-repeat top left;}#main .mainNav_1 div.navOn .center{background:url(\'^FileUrl(style1/nav1_center_on.jpg);\') repeat-x top left;}#main .mainNav_1 div.navOn .right{background:url(\'^FileUrl(style1/nav1_on_right.jpg);\') no-repeat top left;}#main .mainNav_2 div.navOn .left{background:url(\'^FileUrl(style1/nav2_on_left.jpg);\') no-repeat top left;}#main .mainNav_2 div.navOn .center{background:url(\'^FileUrl(style1/nav2_center_on.jpg);\') repeat-x top left;}#main .mainNav_2 div.navOn .right{background:url(\'^FileUrl(style1/nav2_on_right.jpg);\') no-repeat top left;}#main .mainNav_1 div.navOn a:link,#main .mainNav_1 div.navOn a:visited,#main .mainNav_2 div.navOn a:link,#main .mainNav_2 div.navOn a:visited{color:black;}#main #crumbTrail{margin-left:177px;margin-bottom:0px;color:gray;font-size:8pt;font-weight:bold;}#main #crumbTrail a.crumbTrail:visited,#main #crumbTrail a.crumbTrail:link{color:silver;font-size:8pt;font-family:arial;text-decoration:none;font-weight:normal;}#main #crumbTrail a.crumbTrail:hover{color:gray;}#main #mainText{padding-left:150px;font-family:verdana;font-size:9pt;width:600px;margin-top:0px;}#main #gui{bottom:0px;left:0px;position:absolute;width:135px;font-size:8pt;color:black;font-family:arial;text-align:right;}#main #gui .loginBox{padding-right:12px;-moz-box-sizing:border-box;width:100px;float:right;margin-bottom:10px;}#main #gui .loginBox .loginBoxField{width:75px;}#main #gui .loginBox .loginBoxButton{background-color:#D65501;color:white;border:solid white 2px;margin-top:4px;font-variant:small-caps;}#main #gui a{color:white;}#copyright{color:#fff;position:absolute;top:110px;right:40px;font-family:verdana;font-size:8pt;font-weight:bold;background-color:#2D2D2D;opacity:0.4;-moz-opacity:0.4;-khtml-opacity:0.4;padding:2px;}* html #copyright{background:transparent;}',0,'WebGUI::Asset::Template::HTMLTemplate'),('7-0-style0000000000033','body, html { \n height:100%; \n}\nbody {\n background:#7c9ab0 url(\'^FileUrl(style2/main_bg.jpg);\') repeat-y right; \n margin:0px;\n}\n.rightColumn {\n width:20%;\n height:100%;\n background: #eeeeee url(\'^FileUrl(style2/rightCol_bg.jpg);\') repeat-y right; \n text-align:center; \n}\n.rightColumn #pb_wg_bg {\n background: url(\'^FileUrl(style2/pb_wg_bg.jpg);\') repeat-x;\n width:100%;\n text-align:left; \n}\n.rightColumn #pb_wg {\n background: url(\'^FileUrl(style2/pb_wg.jpg);\') left no-repeat;\n height:53px;\n}\n.leftColumn { \n width:80%; \n background: white url(\'^FileUrl(style2/context_bg.jpg);\') repeat-y right; \n} \n.leftColumn #header {\n width:100%;\n background:#7c9ab0 url(\'^FileUrl(style2/leftCol_header.jpg);\') right no-repeat; \n height:86px;\n position:relative;\n}\n.leftColumn #header #title, .leftColumn #header #title_bg {\n color:white;\n font-size:36pt;\n font-weight:bold;\n font-family:arial;\n font-variant:small-caps;\n letter-spacing:12px;\n top:15px;\n left:5px;\n position:absolute;\n z-index:10;\n}\n.leftColumn #header #title a {\n color:white;\n text-decoration:none;\n}\n.leftColumn #header #title_bg {\n color:black;\n z-index:5;\n top:17px;\n left:7px;\n}\n.leftColumn #context {\n /*background: #fff url(\'^FileUrl(style2/context_bg.jpg);\') repeat-y right; */\n width:95%;\n font-family:verdana;\n font-size:9pt;\n color:#242424;\n -moz-box-sizing:border-box; \n position:relative;\n padding-left:1%;\n padding-right:1%;\n padding-bottom:15px;\n}\n.leftColumn #context a {\n color:#7C9AB0;\n font-weight:bold;\n}\n.leftColumn #context a:hover {\n text-decoration:none;\n}\n.leftColumn #pageTitleBG {\n background: url(\'^FileUrl(style2/page_title_bg.jpg);\') repeat-x; \n width:100%;\n}\n.leftColumn #pageTitleBG #pageTitle {\n background: url(\'^FileUrl(style2/page_title.jpg);\') right no-repeat; \n width:100%;\n height:50px;\n} \n.leftColumn #pageTitleBG #pageTitle h2 {\n font-size:14pt;\n color:#696969;\n font-family:arial;\n font-weight:normal;\n margin:0px;\n padding-top:2px;\n padding-left:25px;\n letter-spacing:3px;\n}\n.rightColumn #nav {\n width:85%;\n background: #b5b5b5 url(\'^FileUrl(style2/nav_bg.jpg);\') repeat-x top; \n border-right:solid #848484 1px;\n margin-left:auto;\n margin-right:auto;\n text-align:left;\n padding-left:3px;\n padding-top:7px;\n padding-bottom:7px;\n}\n.rightColumn #nav a {\n color:white;\n font-size:8pt;\n font-weight:bold;\n text-decoration:none;\n font-family:arial;\n line-height:8pt; \n} \n.rightColumn #nav .selectedMenuItem {\n color:yellow;\n}\n#loginStyles {\n font-size:8pt;\n font-family:arial;\n padding-bottom:25px;\n}\n#loginStyles a {\n color:#89ACCF;\n font-weight:bold; \n border-bottom:solid transparent 2px;\n text-decoration:none;\n}\n#loginStyles a:hover {\n border-bottom:dotted #B2C9D9 2px;\n} \n\n.copyright {\n border-top:solid silver 3px;\n background-color:gray;\n font-family:arial;\n font-size:9pt;\n color:silver; \n text-align:center;\n}\n','text/css',1147642500,3600,'body,html{height:100%;}body{background:#7c9ab0 url(\'^FileUrl(style2/main_bg.jpg);\') repeat-y right;margin:0px;}.rightColumn{width:20%;height:100%;background:#eeeeee url(\'^FileUrl(style2/rightCol_bg.jpg);\') repeat-y right;text-align:center;}.rightColumn #pb_wg_bg{background:url(\'^FileUrl(style2/pb_wg_bg.jpg);\') repeat-x;width:100%;text-align:left;}.rightColumn #pb_wg{background:url(\'^FileUrl(style2/pb_wg.jpg);\') left no-repeat;height:53px;}.leftColumn{width:80%;background:white url(\'^FileUrl(style2/context_bg.jpg);\') repeat-y right;}.leftColumn #header{width:100%;background:#7c9ab0 url(\'^FileUrl(style2/leftCol_header.jpg);\') right no-repeat;height:86px;position:relative;}.leftColumn #header #title,.leftColumn #header #title_bg{color:white;font-size:36pt;font-weight:bold;font-family:arial;font-variant:small-caps;letter-spacing:12px;top:15px;left:5px;position:absolute;z-index:10;}.leftColumn #header #title a{color:white;text-decoration:none;}.leftColumn #header #title_bg{color:black;z-index:5;top:17px;left:7px;}.leftColumn #context{width:95%;font-family:verdana;font-size:9pt;color:#242424;-moz-box-sizing:border-box;position:relative;padding-left:1%;padding-right:1%;padding-bottom:15px;}.leftColumn #context a{color:#7C9AB0;font-weight:bold;}.leftColumn #context a:hover{text-decoration:none;}.leftColumn #pageTitleBG{background:url(\'^FileUrl(style2/page_title_bg.jpg);\') repeat-x;width:100%;}.leftColumn #pageTitleBG #pageTitle{background:url(\'^FileUrl(style2/page_title.jpg);\') right no-repeat;width:100%;height:50px;}.leftColumn #pageTitleBG #pageTitle h2{font-size:14pt;color:#696969;font-family:arial;font-weight:normal;margin:0px;padding-top:2px;padding-left:25px;letter-spacing:3px;}.rightColumn #nav{width:85%;background:#b5b5b5 url(\'^FileUrl(style2/nav_bg.jpg);\') repeat-x top;border-right:solid #848484 1px;margin-left:auto;margin-right:auto;text-align:left;padding-left:3px;padding-top:7px;padding-bottom:7px;}.rightColumn #nav a{color:white;font-size:8pt;font-weight:bold;text-decoration:none;font-family:arial;line-height:8pt;}.rightColumn #nav .selectedMenuItem{color:yellow;}#loginStyles{font-size:8pt;font-family:arial;padding-bottom:25px;}#loginStyles a{color:#89ACCF;font-weight:bold;border-bottom:solid transparent 2px;text-decoration:none;}#loginStyles a:hover{border-bottom:dotted #B2C9D9 2px;}.copyright{border-top:solid silver 3px;background-color:gray;font-family:arial;font-size:9pt;color:silver;text-align:center;}',0,NULL),('4e-_rNs6mSWedZhQ_V5kJA','.wgShelf .product {\r\n margin:15px;\r\n margin-left:0px; \r\n float:left;\r\n text-align:left;\r\n background-color:#f1f1f1;\r\n border:solid #e1e1e1 1px;\r\n min-height:100px;\r\n min-width:200px;\r\n width:200px;\r\n height:100px;\r\n}\r\n.wgShelf .product .link {\r\n background: url(^FileUrl(root/import/shelf2/images/shelf-titles.jpg);) no-repeat top right;\r\n height:30px;\r\n padding:3px;\r\n line-height:24px;\r\n margin-bottom:5px; \r\n text-align:left;\r\n display:block; \r\n}','text/css',1210779672,0,'.wgShelf .product{margin:15px;margin-left:0px;float:left;text-align:left;background-color:#f1f1f1;border:solid #e1e1e1 1px;min-height:100px;min-width:200px;width:200px;height:100px;}.wgShelf .product .link{background:url(^FileUrl(root/import/shelf2/images/shelf-titles.jpg);) no-repeat top right;height:30px;padding:3px;line-height:24px;margin-bottom:5px;text-align:left;display:block;}',0,NULL),('usuxw9V3jN4d4pujRiEYxg','#contentArea {\r\n height:500px;\r\n padding-bottom:300px;\r\n}','text/css',1209494150,1,'#contentArea{height:500px;padding-bottom:300px;}',0,NULL),('5m5I7__l40C4hhv4ydqAHQ','#thingyList .things {\r\n padding:0px;\r\n margin:0px;\r\n width:200px;\r\n z-index:5000;\r\n position:absolute;\r\n top:27px;\r\n left:20px;\r\n border:solid #a2a2a2 1px;\r\n border-top-style:none;\r\n}\r\n\r\n#thingyList .things a:link,\r\n#thingyList .things a:visited {\r\n display:block;\r\n background-color:#f1f1f1;\r\n border-top:solid #a2a2a2 1px; \r\n border-bottom:solid #727272 1px;\r\n line-height:12px;\r\n font-size:10px;\r\n height:12px;\r\n padding:2px 5px;\r\n text-decoration:none;\r\n font-weight:bold;\r\n color:#a2a2a2;\r\n width:190px;\r\n}\r\n#thingyList .things a:hover {\r\n background-color:white;\r\n}','text/css',1216227786,3600,'#thingyList .things{padding:0px;margin:0px;width:200px;z-index:5000;position:absolute;top:27px;left:20px;border:solid #a2a2a2 1px;border-top-style:none;}#thingyList .things a:link,#thingyList .things a:visited{display:block;background-color:#f1f1f1;border-top:solid #a2a2a2 1px;border-bottom:solid #727272 1px;line-height:12px;font-size:10px;height:12px;padding:2px 5px;text-decoration:none;font-weight:bold;color:#a2a2a2;width:190px;}#thingyList .things a:hover{background-color:white;}',0,NULL),('1XOJDcg_ITRYwVM-QnIcPw',' .wgShelf {\r\n font-size:12px;\r\n font-family:arial, verdana; \r\n margin:15px 0px;\r\n }\r\n .wgShelf h2 {\r\n background: black;\r\n padding:5px;\r\n padding-left:15px;\r\n line-height:32px;\r\n color:white;\r\n margin:0px;\r\n height:32px;\r\n }\r\n .wgShelf .wgShelves {\r\n background: #F1F1F1;\r\n height:29px;\r\n padding:3px;\r\n line-height:29px;\r\n padding-left:30px;\r\n }\r\n .wgShelf .product {\r\n margin:15px;\r\n margin-left:0px; \r\n text-align:left;\r\n background-color:#f1f1f1;\r\n border:solid #e1e1e1 1px;\r\n width: 200px;\r\n display: -moz-inline-box; /* Moz */\r\n display: inline-block; /* Op, Saf, IE \\*/\r\n vertical-align: top; /* IE Mac non capisce e a volte crea extra v space */\r\n }\r\n .wgShelf .product .thumbnail {\r\n display:block;\r\n text-align:left;\r\n margin:3px;\r\n float:left;\r\n }\r\n .wgShelf .product .link {\r\n background: #e1e1e1;\r\n height:30px;\r\n padding:3px;\r\n line-height:24px;\r\n margin-bottom:5px; \r\n text-align:left;\r\n display:block;\r\n }\r\n .wgShelf .product .link a:link,\r\n .wgShelf .product .link a:visited {\r\n color:#000; \r\n display:block;\r\n }\r\n .wgShelf .product .link a:hover {\r\n text-decoration:underline;\r\n }\r\n .wgShelf .product .price {\r\n display:block;\r\n text-align:right;\r\n font-size:18px;\r\n font-weight:bold;\r\n }','text/css',1219175575,0,'.wgShelf{font-size:12px;font-family:arial,verdana;margin:15px 0px;}.wgShelf h2{background:black;padding:5px;padding-left:15px;line-height:32px;color:white;margin:0px;height:32px;}.wgShelf .wgShelves{background:#F1F1F1;height:29px;padding:3px;line-height:29px;padding-left:30px;}.wgShelf .product{margin:15px;margin-left:0px;text-align:left;background-color:#f1f1f1;border:solid #e1e1e1 1px;width:200px;display:-moz-inline-box;display:inline-block;/*\\*/\n vertical-align:top; /**/}.wgShelf .product .thumbnail{display:block;text-align:left;margin:3px;float:left;}.wgShelf .product .link{background:#e1e1e1;height:30px;padding:3px;line-height:24px;margin-bottom:5px;text-align:left;display:block;}.wgShelf .product .link a:link,.wgShelf .product .link a:visited{color:#000;display:block;}.wgShelf .product .link a:hover{text-decoration:underline;}.wgShelf .product .price{display:block;text-align:right;font-size:18px;font-weight:bold;}',0,NULL),('7-0-style0000000000051','body, html {\r\n margin:0px;\r\n background-color:#b53018;\r\n padding:0px;\r\n}\r\nbody a {\r\n color:#EE963E;font-weight:bold;\r\n letter-spacing:1px;\r\n font-size:8pt;\r\n}\r\n#main {\r\n width:98%;\r\n /*min-width:790px;*/\r\n margin:0px;\r\n padding:0px;\r\n padding-top:20px;\r\n padding-bottom:20px;\r\n position:relative;\r\n}\r\n#header { \r\n background: url(\'^FileUrl(style3/header_bg.jpg);\') repeat-x;\r\n width:100%;\r\n margin:0px;\r\n height:115px;\r\n}\r\n#headerTitle {\r\n background: url(\'^FileUrl(style3/header_left.jpg);\') no-repeat left top;\r\n height:100%;\r\n width:100%;\r\n}\r\n#headerRight {\r\n background: url(\'^FileUrl(style3/header_right.jpg);\') no-repeat right top;\r\n width:100%;\r\n height:100%;\r\n text-align:right;\r\n position:relative;\r\n}\r\n#headerRight #title {\r\n position:absolute;\r\n top:25px;\r\n left:20px;\r\n font-family:arial;\r\n text-align:left;\r\n}\r\n#title h1 {\r\n text-transform:uppercase;\r\n margin-bottom:0px;\r\n font-weight:normal;\r\n font-size:26pt;\r\n margin-top:0px;\r\n color:white;\r\n}\r\n#title h1 a {\r\n color:white;\r\n text-decoration:none; font-size: 26pt; font-weight: normal; \r\n}\r\n#title h2 {\r\n margin:0px;\r\n font-size:12pt;\r\n color:#bebebe;\r\n padding-left:20px;\r\n}\r\n#title img {\r\n z-index:5;\r\n}\r\n#login {\r\n position:absolute;\r\n font-size:8pt;\r\n top:45%;\r\n right:150px;\r\n color:white;\r\n z-index:6;\r\n font-family:arial;\r\n}\r\n#login a {\r\n color:white; font-weight: normal; letter-spacing: 0px;\r\n}\r\n.loginBox {\r\n font-size:8pt;\r\n margin:0px;\r\n display:inline;\r\n}\r\n.loginBox input {\r\n font-size:8pt;\r\n}\r\n\r\n#mainBody {\r\n width:100%;\r\n margin:0px;\r\n height:500px;\r\n background: #fff;\r\n position:relative;\r\n z-index:0;\r\n}\r\n#main > #mainBody {\r\n height:auto;\r\n min-height:500px;\r\n}\r\n#contentArea {\r\n z-index:2;\r\n position:relative;\r\n padding-top:10px;\r\n padding-left:10px;\r\n padding-right:20px;\r\n padding-bottom:20px;\r\n -moz-box-sizing:border-box;\r\n font-family:verdana;\r\n font-size:9pt;\r\n min-height:500px;\r\n}\r\nhtml #main #mainBody #contentArea {\r\n height:1%;\r\n}\r\n#topCorner {\r\n width:100%;\r\n height:214px;\r\n position:absolute;\r\n top:0px;\r\n left:0px;\r\n background: url(^FileUrl(/style3/main_top.jpg);) no-repeat;\r\n z-index:1;\r\n}\r\n#bottomCorner {\r\n width:100%;\r\n height:211px;\r\n position:absolute;\r\n bottom:59px;\r\n right:0px;\r\n background: url(\'^FileUrl(style3/main_bottom.jpg);\') no-repeat right;\r\n z-index:1;\r\n}\r\n* html #bottomCorner {\r\n bottom:58px;\r\n}\r\n\r\n#footer {\r\n width:100%;\r\n margin:0px;\r\n background:#000 url(\'^FileUrl(style3/footer_right.jpg);\') no-repeat right top;\r\n height:57px;\r\n border-top:solid #B53018 2px;\r\n text-align:right;\r\n position:relative;\r\n z-index:0;\r\n}\r\n#footer #copyright {\r\n color:#3b3b3b;\r\n font-family:arial;\r\n position:absolute;\r\n top:20px;\r\n left:30px;\r\n font-size:8pt;\r\n}\r\n#main .yui-skin-sam {\r\n font-family:verdana;\r\n font-size:9pt;\r\n font-weight:normal;\r\n}','text/css',1224117026,3600,'body,html{margin:0px;background-color:#b53018;padding:0px;}body a{color:#EE963E;font-weight:bold;letter-spacing:1px;font-size:8pt;}#main{width:98%;margin:0px;padding:0px;padding-top:20px;padding-bottom:20px;position:relative;}#header{background:url(\'^FileUrl(style3/header_bg.jpg);\') repeat-x;width:100%;margin:0px;height:115px;}#headerTitle{background:url(\'^FileUrl(style3/header_left.jpg);\') no-repeat left top;height:100%;width:100%;}#headerRight{background:url(\'^FileUrl(style3/header_right.jpg);\') no-repeat right top;width:100%;height:100%;text-align:right;position:relative;}#headerRight #title{position:absolute;top:25px;left:20px;font-family:arial;text-align:left;}#title h1{text-transform:uppercase;margin-bottom:0px;font-weight:normal;font-size:26pt;margin-top:0px;color:white;}#title h1 a{color:white;text-decoration:none;font-size:26pt;font-weight:normal;}#title h2{margin:0px;font-size:12pt;color:#bebebe;padding-left:20px;}#title img{z-index:5;}#login{position:absolute;font-size:8pt;top:45%;right:150px;color:white;z-index:6;font-family:arial;}#login a{color:white;font-weight:normal;letter-spacing:0px;}.loginBox{font-size:8pt;margin:0px;display:inline;}.loginBox input{font-size:8pt;}#mainBody{width:100%;margin:0px;height:500px;background:#fff;position:relative;z-index:0;}#main > #mainBody{height:auto;min-height:500px;}#contentArea{z-index:2;position:relative;padding-top:10px;padding-left:10px;padding-right:20px;padding-bottom:20px;-moz-box-sizing:border-box;font-family:verdana;font-size:9pt;min-height:500px;}html #main #mainBody #contentArea{height:1%;}#topCorner{width:100%;height:214px;position:absolute;top:0px;left:0px;background:url(^FileUrl(/style3/main_top.jpg);) no-repeat;z-index:1;}#bottomCorner{width:100%;height:211px;position:absolute;bottom:59px;right:0px;background:url(\'^FileUrl(style3/main_bottom.jpg);\') no-repeat right;z-index:1;}* html #bottomCorner{bottom:58px;}#footer{width:100%;margin:0px;background:#000 url(\'^FileUrl(style3/footer_right.jpg);\') no-repeat right top;height:57px;border-top:solid #B53018 2px;text-align:right;position:relative;z-index:0;}#footer #copyright{color:#3b3b3b;font-family:arial;position:absolute;top:20px;left:30px;font-size:8pt;}#main .yui-skin-sam{font-family:verdana;font-size:9pt;font-weight:normal;}',0,NULL),('FEDP3dk8J3Chw_gyr7_XEQ','/*/Horizontal Menu styles/*/\r\n.horizontalMenu ul.menu {\r\n padding: 0;\r\n margin: 0 0 1em;\r\n list-style: none;\r\n width: 100%; /*/clear floated li elements/*/\r\n overflow: auto; /*/clear floated li elements/*/\r\n}\r\n.horizontalMenu ul.menu li {\r\n float: left;\r\n}\r\n.horizontalMenu ul.menu li a {\r\n float: left;\r\n padding: 4px 8px;\r\n margin-right: 1px;\r\n background: #ddd;\r\n color: #000;\r\n text-decoration: none;\r\n}\r\n.horizontalMenu ul.menu li.current a {\r\n background:#eee;\r\n}\r\n.horizontalMenu ul.menu li a:hover {\r\n background:#fff;\r\n}\r\n\r\n/*/Tabs (tabbed navigation) styles/*/\r\n.tabsMenu ul.menu {\r\n margin: 0 0 1em;\r\n}\r\n.tabsMenu ul.menu li {\r\n display: inline;\r\n}\r\n.tabsMenu ul.menu li a {\r\n border: 1px solid #999;\r\n border-bottom: 0;\r\n padding: 5px 10px 2px;\r\n color: #777;\r\n text-decoration:none;\r\n}\r\n.tabsMenu ul.menu li.current a,\r\n.tabsMenu ul.menu li a:hover {\r\n border: 1px solid #000;\r\n border-bottom: 0;\r\n color: #000;\r\n}\r\n\r\n/*/Indent Nav styles/*/\r\n.indentMenu a.level0 {\r\n margin-left:0px;\r\n display:block;\r\n}\r\n.indentMenu a.level1 {\r\n margin-left:15px;\r\n display:block; \r\n}\r\n.indentMenu a.level2 {\r\n margin-left:30px;\r\n display:block;\r\n}\r\n.indentMenu a.level3 {\r\n margin-left:45px;\r\n display:block;\r\n}\r\n.indentMenu a.level4 {\r\n margin-left:60px;\r\n display:block;\r\n}','text/css',1246278679,3600,'.horizontalMenu ul.menu{padding:0;margin:0 0 1em;list-style:none;width:100%;overflow:auto;}.horizontalMenu ul.menu li{float:left;}.horizontalMenu ul.menu li a{float:left;padding:4px 8px;margin-right:1px;background:#ddd;color:#000;text-decoration:none;}.horizontalMenu ul.menu li.current a{background:#eee;}.horizontalMenu ul.menu li a:hover{background:#fff;}.tabsMenu ul.menu{margin:0 0 1em;}.tabsMenu ul.menu li{display:inline;}.tabsMenu ul.menu li a{border:1px solid #999;border-bottom:0;padding:5px 10px 2px;color:#777;text-decoration:none;}.tabsMenu ul.menu li.current a,.tabsMenu ul.menu li a:hover{border:1px solid #000;border-bottom:0;color:#000;}.indentMenu a.level0{margin-left:0px;display:block;}.indentMenu a.level1{margin-left:15px;display:block;}.indentMenu a.level2{margin-left:30px;display:block;}.indentMenu a.level3{margin-left:45px;display:block;}.indentMenu a.level4{margin-left:60px;display:block;}',0,NULL),('i5kt5aodVs_oepNEkE7Okw','/*/styles for the poll asset/*/\r\n.pollColor {\r\nbackground-color:#808080;\r\n}\r\n.pollOptions, .pollSubmit {\r\nborder:0;\r\nmargin:0;\r\npadding:0;\r\n}','text/css',1242312883,3600,'.pollColor{background-color:#808080;}.pollOptions,.pollSubmit{border:0;margin:0;padding:0;}',0,NULL),('uCn31PzislTZlgt_79j7cQ','/*/ fail safe /*/\r\n#topWrapper {\r\nfont:82.5%/1.3 helvetica,arial,sans-serif;\r\nwidth:98%;\r\noverflow:hidden;\r\nmargin:0 auto 2em;\r\n}\r\n.nav {\r\nfloat:left;\r\nwidth:20%;\r\nmargin:1em 0 2em;\r\n}\r\n.nav .menu {\r\nlist-style:none;\r\nmargin:0;\r\npadding:0;\r\n}\r\n#contentArea {\r\nfloat:right;\r\nwidth:77%;\r\nmargin:1em 0 2em;\r\npadding:5px 1%;\r\nborder:1px solid #ccc;\r\n}\r\n#adminControls {\r\nmargin:1em 0;\r\npadding:1em 0 0;\r\nborder-top:1px dotted #ccc;\r\n}\r\n\r\n','text/css',1258524916,0,'#topWrapper{font:82.5%/1.3 helvetica,arial,sans-serif;width:98%;overflow:hidden;margin:0 auto 2em;}.nav{float:left;width:20%;margin:1em 0 2em;}.nav .menu{list-style:none;margin:0;padding:0;}#contentArea{float:right;width:77%;margin:1em 0 2em;padding:5px 1%;border:1px solid #ccc;}#adminControls{margin:1em 0;padding:1em 0 0;border-top:1px dotted #ccc;}',0,NULL),('iCM9pRY5yYyjufROgaCDlg','.editStory { width: 100%;\r\n}\r\n\r\n.editStory legend {\r\n font-size: 1.8em;\r\n border-bottom: 2px solid;\r\n}\r\n\r\n.editStory tbody {\r\n width: 943px;\r\n}\r\n\r\n.editStory td {\r\n padding: 5px;\r\n}\r\n\r\n.editStory .story {\r\n float:left;\r\n}\r\n\r\n.editStory .story label, .editStory .photo label {\r\n display: block;\r\n width: 100%;\r\n text-align: right;}\r\n\r\n.editStory .photoContainer {\r\n border: 1px solid;\r\n float:left;\r\n margin: 10px 0 0 20px;\r\n}\r\n\r\n.editStory .photoContainer .photoHeader {\r\n font-size: 1.2em;\r\n font-weight: bold;\r\n}\r\n\r\n.editStory .buttons {\r\n clear: both;\r\n text-align: right;\r\n padding: 10px 0;\r\n}\r\n\r\n.editStory #story_formId_tbl {\r\n width: 100% !important;\r\n}\r\n\r\n.editStory fieldset {\r\n border: none;\r\n}\r\n\r\n\r\n\r\n.storyArchive { width: 100%;\r\n}\r\n\r\n.storyArchive h3 {\r\n border-bottom: 2px solid;\r\n margin-bottom: 10px;\r\n}\r\n\r\n.storyArchive .storyList {\r\n list-style-type: none;\r\n padding-left: 0;\r\n}\r\n\r\n.storyArchive .storyList li {\r\n padding-left: 10px;\r\n margin-bottom: 10px;\r\n}\r\n\r\n.storyArchive .pagination { \r\n float: left;\r\n list-style-type: none;\r\n}\r\n\r\n.storyArchive .keywords {\r\n width: 100%;\r\n clear: both;\r\n}\r\n\r\n.storyArchive img {\r\n border: none;\r\n}\r\n\r\n.storyArchive .controls a {\r\n margin-right: 10px;\r\n}\r\n\r\n.viewStory .storyTitle, .viewStory .storyUpdated, .viewStoryTopic .storyTitle, .viewStoryTopic .storyUpdated {\r\n float: left;\r\n}\r\n\r\n.viewStory .storyTitle, .viewStoryTopic .storyTitle {\r\n font-size: 1.5em;\r\n width: 100%;\r\n}\r\n\r\n.viewStory .storyHighlights, .viewStoryTopic .storyHighlights {\r\n float:right;\r\n margin-top: -1.5em;\r\n}\r\n\r\n.viewStory .storyPhoto, .viewStoryTopic .storyPhoto {\r\n float: left;\r\n margin: 0 10px 10px 0;\r\n}\r\n\r\n.viewStory .photoCaption, .viewStoryTopic .photoCaption {\r\n width: 496px;\r\n padding: 5px;\r\n display:block;\r\n}\r\n.viewStory .clear, .viewStoryTopic .clear {\r\n clear: both;\r\n}\r\n.storyTopic {\r\n width: 100%;\r\n}\r\n\r\n.storyTopic h3{ border-bottom: 2px solid;\r\n}\r\n.storyTopic .topStory {\r\n width: 340px;\r\n float: left;\r\n}\r\n\r\n.storyTopic .storyList {\r\n width: 250px;\r\n float: left;\r\n}\r\n\r\n.storyTopic .storyListBig {\r\n width: 100%;\r\n float: left;\r\n}\r\n\r\n#htmltagcloud, .wg-clear {\r\n clear:both;\r\n}\r\n','text/css',1253305659,3600,'.editStory{width:100%;}.editStory legend{font-size:1.8em;border-bottom:2px solid;}.editStory tbody{width:943px;}.editStory td{padding:5px;}.editStory .story{float:left;}.editStory .story label,.editStory .photo label{display:block;width:100%;text-align:right;}.editStory .photoContainer{border:1px solid;float:left;margin:10px 0 0 20px;}.editStory .photoContainer .photoHeader{font-size:1.2em;font-weight:bold;}.editStory .buttons{clear:both;text-align:right;padding:10px 0;}.editStory #story_formId_tbl{width:100% !important;}.editStory fieldset{border:none;}.storyArchive{width:100%;}.storyArchive h3{border-bottom:2px solid;margin-bottom:10px;}.storyArchive .storyList{list-style-type:none;padding-left:0;}.storyArchive .storyList li{padding-left:10px;margin-bottom:10px;}.storyArchive .pagination{float:left;list-style-type:none;}.storyArchive .keywords{width:100%;clear:both;}.storyArchive img{border:none;}.storyArchive .controls a{margin-right:10px;}.viewStory .storyTitle,.viewStory .storyUpdated,.viewStoryTopic .storyTitle,.viewStoryTopic .storyUpdated{float:left;}.viewStory .storyTitle,.viewStoryTopic .storyTitle{font-size:1.5em;width:100%;}.viewStory .storyHighlights,.viewStoryTopic .storyHighlights{float:right;margin-top:-1.5em;}.viewStory .storyPhoto,.viewStoryTopic .storyPhoto{float:left;margin:0 10px 10px 0;}.viewStory .photoCaption,.viewStoryTopic .photoCaption{width:496px;padding:5px;display:block;}.viewStory .clear,.viewStoryTopic .clear{clear:both;}.storyTopic{width:100%;}.storyTopic h3{border-bottom:2px solid;}.storyTopic .topStory{width:340px;float:left;}.storyTopic .storyList{width:250px;float:left;}.storyTopic .storyListBig{width:100%;float:left;}#htmltagcloud,.wg-clear{clear:both;}',0,NULL),('VyCINX2KixKYr2pzQGX9Mg','/*/ styles for the layout asset /*/\r\n.wg-left {\r\n float: left;\r\n}\r\n.wg-right {\r\n float: right;\r\n}\r\n.wg-clear {\r\n clear: both;\r\n}\r\n.sidebyside .wg-content-position, .oneovertwo .wg-content-position {\r\n width: 49%;\r\n}\r\n.oneovertwo .wg-top {\r\n width: 100%;\r\n}\r\n.oneoverthree .wg-first-column, .oneoverthree .wg-second-column, .oneoverthree .wg-third-column,\r\n.threeColumns .wg-first-column, .threeColumns .wg-second-column, .threeColumns .wg-third-column {\r\n width: 32%;\r\n}\r\n.oneoverthree .wg-first-column,\r\n.threeColumns .wg-first-column {\r\n margin-right:2%;\r\n}\r\n.rightcolumn .wg-first-column {\r\n width: 65%;\r\n}\r\n.rightcolumn .wg-second-column {\r\n width: 33%;\r\n}\r\n','text/css',1254881103,0,'.wg-left{float:left;}.wg-right{float:right;}.wg-clear{clear:both;}.sidebyside .wg-content-position,.oneovertwo .wg-content-position{width:49%;}.oneovertwo .wg-top{width:100%;}.oneoverthree .wg-first-column,.oneoverthree .wg-second-column,.oneoverthree .wg-third-column,.threeColumns .wg-first-column,.threeColumns .wg-second-column,.threeColumns .wg-third-column{width:32%;}.oneoverthree .wg-first-column,.threeColumns .wg-first-column{margin-right:2%;}.rightcolumn .wg-first-column{width:65%;}.rightcolumn .wg-second-column{width:33%;}',0,NULL),('zb_OPKNqcTuIjdvvbEkRjw','/*/ styles for the article asset /*/\r\n.withImage .articleContent, .linkedImage .articleContent {\r\n width:100%;\r\n overflow:hidden;\r\n}\r\n.withImage .articleImage, .linkedImage .articleImage {\r\n float:right;\r\n margin:0 0 10px 10px;\r\n}\r\n.linkedImage .caption {\r\n display:block;\r\n}\r\n','text/css',1256092368,0,'.withImage .articleContent,.linkedImage .articleContent{width:100%;overflow:hidden;}.withImage .articleImage,.linkedImage .articleImage{float:right;margin:0 0 10px 10px;}.linkedImage .caption{display:block;}',0,NULL),('pbrobot000000000000001','User-agent: *\nDisallow: *?op=auth\nDisallow: *?op=account\nDisallow: *?op=ajaxGetI18N\nDisallow: *?op=makePrintable\nDisallow: *?op=viewHelp\nDisallow: *?op=viewHelpIndex\n\n','text/plain',1256092369,3600,'User-agent: *\nDisallow: *?op=auth\nDisallow: *?op=account\nDisallow: *?op=ajaxGetI18N\nDisallow: *?op=makePrintable\nDisallow: *?op=viewHelp\nDisallow: *?op=viewHelpIndex\n\n',0,NULL),('H_-8zjtWsO1FUpQqNtkxNQ','/*/ In this stylesheet you can find the styles that are used\r\nin more than one template. For example: file/attachment icons,\r\npagination etc. /*/\r\n/*/ Elements that are styled with this stylesheet have a\r\nclassname that starts with \"wg-\". /*/\r\n\r\n/*/ general /*/\r\n.wg-icon {\r\nborder:0px none;\r\nvertical-align: middle;\r\n}\r\n.wg-clear {\r\nclear:both;\r\n}\r\n/*/ inline list (pagination) /*/\r\n.wg-inline {\r\nmargin:0 0 1em;\r\npadding:0;\r\n}\r\n.wg-inline li {\r\ndisplay:inline;\r\nmargin:0;\r\npadding:0;\r\n}\r\n.wg-inline li.active {\r\nfont-weight:bold;\r\n}\r\n/*/ forms /*/\r\n.wg-captchaImage {\r\nborder:0 none;\r\nvertical-align:middle;\r\nmargin-left:5px;\r\n}\r\n\r\n','text/css',1258524916,0,'.wg-icon{border:0px none;vertical-align:middle;}.wg-clear{clear:both;}.wg-inline{margin:0 0 1em;padding:0;}.wg-inline li{display:inline;margin:0;padding:0;}.wg-inline li.active{font-weight:bold;}.wg-captchaImage{border:0 none;vertical-align:middle;margin-left:5px;}',0,NULL),('JOuCU4x5BJfVHfkfMkVQdQ','/*\r\n Project: CrystalX\r\n URL: http://www.nuvio.cz\r\n \r\n Output device: screen, projection\r\n \r\n Author: Vit Dlouhy (vit.dlouhy@nuvio.cz); Nuvio (www.nuvio.cz)\r\n Last revision: 2006-12-05, 12:00 GMT+1\r\n\r\n Structure:\r\n display | position | float | overflow | width | height | border | margin | padding | background | align | font\r\n*/\r\n\r\n* {min-height:1px;}\r\nbody {border:0; margin:0; padding:0; background:#F2F5FE url(\'^FileUrl(/crystalx/img/bg.gif);\') 0 0 repeat-x; font:70%/160% \"verdana\",sans-serif; color:#192666; text-align:center;}\r\n\r\na {color:#192666;}\r\na:hover {color:#4F6AD7;}\r\n\r\np {border:0; margin:15px 0; padding:0;}\r\n\r\ndiv {display:block; border:0; margin:0; padding:0; overflow:hidden;}\r\n\r\nh1, h2, h3, h4, h5 {border:0; margin:15px 0 10px 0; padding:0; font-weight:bold;}\r\nh1 {font-size:260%; line-height:100%; font-family:\"georgia\",serif; font-weight:normal;}\r\nh2 {font-size:180%; line-height:100%; font-family:\"georgia\",serif; font-weight:normal;}\r\nh3 {font-size:120%; line-height:100%; font-weight:bold;}\r\nh4 {font-size:120%;}\r\nh5 {font-size:100%;}\r\n\r\ntable {display:table; border-collapse:collapse; margin:15px 1px; padding:0; border:1px solid #B7CAF6; font-size:100%;}\r\ntr {display:table-row;}\r\nth, td {display: table-cell; border:1px solid #B7CAF6; margin:0; padding:5px; vertical-align:top; text-align:left;}\r\nth {background:#E7ECFD; text-align:center; color:#192666; font-weight:bold;}\r\n\r\nul, ol {display:block; border:0; margin:15px 0 15px 40px; padding:0;}\r\nol {list-style-type:decimal;}\r\nli {display:list-item; border:0; margin:0; padding:0; min-height:1px;}\r\nul ul, ul ol, ol ol, ol ul {margin: 0 0 0 20px;}\r\n\r\ndl {border-bottom:1px solid #E0E8FA; margin:0; padding:5px 10px; background:#CEDBF9;}\r\ndt {border:0; margin:0; padding:0; font-weight:bold;}\r\ndd {border:0; margin:0 0 0 30px; padding:0;}\r\n\r\nform {border:0; margin:0; padding:0;}\r\nfieldset {border:1px solid #ccc; margin:15px 0; padding:10px;}\r\nlegend {margin-left:10px; font-size:100%; font-weight:bold; color:#008;}\r\n\r\nhr {height:1px; width:724px; margin: 5px 23px; padding: 0; background:#CCC; border:0 solid #CCC; color:#CCC;}\r\n\r\na, img, span {border:0; margin:0; padding:0; overflow:hidden;}\r\nabbr, acronym {border-bottom:1px dotted #CCC; cursor:help;}\r\n\r\ndel, .through {text-decoration:line-through;}\r\nstrong, .strong {font-weight:bold;}\r\ncite, em, q, var {font-style:italic;}\r\ncode, kbd, samp {font-family:monospace; font-size:110%;}\r\n\r\n.box {min-height:1px;}\r\n.box:after {content:\".\"; display:block; line-height:0px; font-size:0px; visibility:hidden; clear:both;}\r\n\r\n.nom {margin:0;}\r\n.noscreen {display:none;}\r\n\r\n/* -----------------...........--------------------------------------------------------------------------------------- */\r\n\r\n#main {width:770px; margin:0 auto; text-align:left;}\r\n\r\n/* Top (empty space for the background img to fit) */\r\n#main #topspace {position:relative; top:0; left:0; height:50px; margin:0; padding:0;}\r\n\r\n/* Header */\r\n#header {position:relative; width:770px; height:100px; margin:0; padding:0; background:#233C9B url(\'^FileUrl(/crystalx/img/header.jpg);\') 0 0 no-repeat; color:#FFFFFF;}\r\n\r\n /* Header - logo */\r\n #header #logo {position:absolute; top:35px; left:35px; margin:0;}\r\n #header #logo a {font-size:260%; line-height:100%; font-family:\"georgia\",serif; font-weight:bold; color:#FFF;}\r\n #header #logo a:hover {color:#B5C4E3; text-decoration:none;}\r\n\r\n /* Header - Search */\r\n #header #search form {position:absolute; top:35px; right:20px; height:30px;}\r\n #header #search .formContents {position:absolute; top:0; right:0px; width:200px; height:28px; margin:0; padding:0; border:0; background:url(\'^FileUrl(/crystalx/img/search.png);\') 0 0 no-repeat; font:bold 90%/100% \"verdana\",sans-serif; color:#192666;}\r\n #header #search input#keywords_formId {width:140px; margin:5px 8px; padding:3px 0; border:0; background:#FFF; font:bold 100%/100% \"verdana\",sans-serif; color:#192666;}\r\n #header #search #search_form {position:absolute; top:0; right:0px; width:41px; height:28px; cursor:point; margin:0; padding:0;}\r\n\r\n /* Search Result*/\r\n #header #search #search_result {position:absolute; top:220px;}\r\n #header #search #home_link, #header #search #no_result, #header #search #pagination {visibility:hidden;}\r\n #page #page-in #pagination {color:#6182D1; font-weight:bold; padding:5px; text-align:right;}\r\n #page #page-in #pagination a {color:#6182D1;}\r\n #page #page-in #pagination a:hover {color:#192666;}\r\n #page #page-in #home_link {padding:5px 5px 15px; color:#6182D1; font-weight:bold; text-align:right;}\r\n #page #page-in #home_link a {color:#6182D1;}\r\n #page #page-in #home_link a:hover {color:#192666;}\r\n #search_result {margin:10px 0;}\r\n dl#odd {background:#A0B9F3;}\r\n #page #page-in #no_result {margin:0 10px; color:#192666; font-weight:bold;}\r\n\r\n/* Main menu (tabs) */\r\n#menu {background:#192666; margin:0 5px; padding:10px 10px 0; height:32px; overflow:hidden;}\r\n#menu a {cursor:pointer; font-size:11px;}\r\n\r\n/* Page (dynamic) */\r\n#page {width:770px; background:#FFFFFF url(\'^FileUrl(/crystalx/img/bg_page.jpg);\') 0 0 repeat-y;}\r\n#page-in {min-height:400px; background:url(\'^FileUrl(/crystalx/img/bg_page_in.jpg);\') 0 0 no-repeat; padding:10px 0 0;}\r\n\r\n/* Strip */\r\n#strip {position:relative; clear:both; padding:3px 20px 10px 20px; color:#6182D1;}\r\n\r\n /* Strip - Location */\r\n #strip #location {float: left; background:url(\'^FileUrl(/crystalx/img/ico_comments.gif);\') 0 50% no-repeat; padding: 0 15px;}\r\n #strip #location a {color:#6182D1;}\r\n #strip #location a:hover {color:#192666;}\r\n #strip #location a#currentpage {font-weight:bold; text-decoration:none;}\r\n\r\n /* Strip - DateTime */\r\n #strip #datetime {float:right; background:url(\'^FileUrl(/crystalx/img/ico_date.gif);\') 0 50% no-repeat; padding: 0 10px 0 15px;}\r\n\r\n/* Content Container */\r\n#contentContainer {margin:0; padding:0 20px; width:730px; overflow:hidden;}\r\n\r\n /* Contents */\r\n #contentContainer .content {clear:both; margin:10px 10px 0 0; padding:20px; max-width:710px; background:url(\'^FileUrl(/crystalx/img/content_all_bg.png);\') 0 0 no-repeat; overflow:hidden;}\r\n #contentContainer .content h2 {margin:0 -10px; padding:10px 25px; color:#192666; background:url(\'^FileUrl(/crystalx/img/ico_list.gif);\') 0 50% no-repeat;}\r\n #contentContainer .content p {text-align:justify;}\r\n \r\n/* Utility */\r\n#utility {background: #FFFFFF url(\'^FileUrl(/crystalx/img/bg_page.jpg);\') 0 0 repeat-y; padding: 10px 0 15px;}\r\n\r\n /* Utility - Toggles */\r\n #toggles {font-size:10px; font-weight:bold; text-align:left; margin-left:42px;}\r\n #toggles a {margin:0 10px; padding:2px 0; text-decoration:none; border-bottom:1px dashed; color:#6182D1;}\r\n #toggles a:hover {border-bottom:1px solid; color:#4F6AD7;}\r\n #toggles span.userAcc {background:url(\'^FileUrl(/crystalx/img/ico_user.gif);\') 0 50% no-repeat; margin: 0 0 0 8px;}\r\n\r\n/* Footer */\r\n#footer {position:relative; clear:both; width:770px; height:80px; margin-bottom:30px; background:url(\'^FileUrl(/crystalx/img/footer.jpg);\') 0 0 no-repeat; color:#6685CC;}\r\n#footer a {color:#6685CC;}\r\n#footer a:hover {color:#192666;}\r\n\r\n /* Footer - \"back on top\" */\r\n #top {position:absolute; top:55px; left:550px;}\r\n #top p {position:relative; width:30px; height:25px; margin:0; overflow:hidden;}\r\n #top p a {display:block; position:absolute; left:0; top:0; z-index:1; width:30px; height:25px; background:url(\'^FileUrl(/crystalx/img/ico_top.gif);\') 0 0 no-repeat; cursor:pointer;}\r\n #top a:hover {background:url(\'^FileUrl(/crystalx/img/ico_top.gif);\') -30px 0 no-repeat;} \r\n\r\n /* Footer - copyright */\r\n #footer p#copyright {position:absolute; top:10px; left:40px; margin:0;}\r\n\r\n /* Footer - created by */\r\n #createdby {position:absolute; top:10px; left:562px; margin:0; color:#8CA3D8;}\r\n #createdby a {color:#8CA3D8;}\r\n','text/css',1273032718,3600,'*{min-height:1px;}body{border:0;margin:0;padding:0;background:#F2F5FE url(\'^FileUrl(/crystalx/img/bg.gif);\') 0 0 repeat-x;font:70%/160% \"verdana\",sans-serif;color:#192666;text-align:center;}a{color:#192666;}a:hover{color:#4F6AD7;}p{border:0;margin:15px 0;padding:0;}div{display:block;border:0;margin:0;padding:0;overflow:hidden;}h1,h2,h3,h4,h5{border:0;margin:15px 0 10px 0;padding:0;font-weight:bold;}h1{font-size:260%;line-height:100%;font-family:\"georgia\",serif;font-weight:normal;}h2{font-size:180%;line-height:100%;font-family:\"georgia\",serif;font-weight:normal;}h3{font-size:120%;line-height:100%;font-weight:bold;}h4{font-size:120%;}h5{font-size:100%;}table{display:table;border-collapse:collapse;margin:15px 1px;padding:0;border:1px solid #B7CAF6;font-size:100%;}tr{display:table-row;}th,td{display:table-cell;border:1px solid #B7CAF6;margin:0;padding:5px;vertical-align:top;text-align:left;}th{background:#E7ECFD;text-align:center;color:#192666;font-weight:bold;}ul,ol{display:block;border:0;margin:15px 0 15px 40px;padding:0;}ol{list-style-type:decimal;}li{display:list-item;border:0;margin:0;padding:0;min-height:1px;}ul ul,ul ol,ol ol,ol ul{margin:0 0 0 20px;}dl{border-bottom:1px solid #E0E8FA;margin:0;padding:5px 10px;background:#CEDBF9;}dt{border:0;margin:0;padding:0;font-weight:bold;}dd{border:0;margin:0 0 0 30px;padding:0;}form{border:0;margin:0;padding:0;}fieldset{border:1px solid #ccc;margin:15px 0;padding:10px;}legend{margin-left:10px;font-size:100%;font-weight:bold;color:#008;}hr{height:1px;width:724px;margin:5px 23px;padding:0;background:#CCC;border:0 solid #CCC;color:#CCC;}a,img,span{border:0;margin:0;padding:0;overflow:hidden;}abbr,acronym{border-bottom:1px dotted #CCC;cursor:help;}del,.through{text-decoration:line-through;}strong,.strong{font-weight:bold;}cite,em,q,var{font-style:italic;}code,kbd,samp{font-family:monospace;font-size:110%;}.box{min-height:1px;}.box:after{content:\".\";display:block;line-height:0px;font-size:0px;visibility:hidden;clear:both;}.nom{margin:0;}.noscreen{display:none;}#main{width:770px;margin:0 auto;text-align:left;}#main #topspace{position:relative;top:0;left:0;height:50px;margin:0;padding:0;}#header{position:relative;width:770px;height:100px;margin:0;padding:0;background:#233C9B url(\'^FileUrl(/crystalx/img/header.jpg);\') 0 0 no-repeat;color:#FFFFFF;}#header #logo{position:absolute;top:35px;left:35px;margin:0;}#header #logo a{font-size:260%;line-height:100%;font-family:\"georgia\",serif;font-weight:bold;color:#FFF;}#header #logo a:hover{color:#B5C4E3;text-decoration:none;}#header #search form{position:absolute;top:35px;right:20px;height:30px;}#header #search .formContents{position:absolute;top:0;right:0px;width:200px;height:28px;margin:0;padding:0;border:0;background:url(\'^FileUrl(/crystalx/img/search.png);\') 0 0 no-repeat;font:bold 90%/100% \"verdana\",sans-serif;color:#192666;}#header #search input#keywords_formId{width:140px;margin:5px 8px;padding:3px 0;border:0;background:#FFF;font:bold 100%/100% \"verdana\",sans-serif;color:#192666;}#header #search #search_form{position:absolute;top:0;right:0px;width:41px;height:28px;cursor:point;margin:0;padding:0;}#header #search #search_result{position:absolute;top:220px;}#header #search #home_link,#header #search #no_result,#header #search #pagination{visibility:hidden;}#page #page-in #pagination{color:#6182D1;font-weight:bold;padding:5px;text-align:right;}#page #page-in #pagination a{color:#6182D1;}#page #page-in #pagination a:hover{color:#192666;}#page #page-in #home_link{padding:5px 5px 15px;color:#6182D1;font-weight:bold;text-align:right;}#page #page-in #home_link a{color:#6182D1;}#page #page-in #home_link a:hover{color:#192666;}#search_result{margin:10px 0;}dl#odd{background:#A0B9F3;}#page #page-in #no_result{margin:0 10px;color:#192666;font-weight:bold;}#menu{background:#192666;margin:0 5px;padding:10px 10px 0;height:32px;overflow:hidden;}#menu a{cursor:pointer;font-size:11px;}#page{width:770px;background:#FFFFFF url(\'^FileUrl(/crystalx/img/bg_page.jpg);\') 0 0 repeat-y;}#page-in{min-height:400px;background:url(\'^FileUrl(/crystalx/img/bg_page_in.jpg);\') 0 0 no-repeat;padding:10px 0 0;}#strip{position:relative;clear:both;padding:3px 20px 10px 20px;color:#6182D1;}#strip #location{float:left;background:url(\'^FileUrl(/crystalx/img/ico_comments.gif);\') 0 50% no-repeat;padding:0 15px;}#strip #location a{color:#6182D1;}#strip #location a:hover{color:#192666;}#strip #location a#currentpage{font-weight:bold;text-decoration:none;}#strip #datetime{float:right;background:url(\'^FileUrl(/crystalx/img/ico_date.gif);\') 0 50% no-repeat;padding:0 10px 0 15px;}#contentContainer{margin:0;padding:0 20px;width:730px;overflow:hidden;}#contentContainer .content{clear:both;margin:10px 10px 0 0;padding:20px;max-width:710px;background:url(\'^FileUrl(/crystalx/img/content_all_bg.png);\') 0 0 no-repeat;overflow:hidden;}#contentContainer .content h2{margin:0 -10px;padding:10px 25px;color:#192666;background:url(\'^FileUrl(/crystalx/img/ico_list.gif);\') 0 50% no-repeat;}#contentContainer .content p{text-align:justify;}#utility{background:#FFFFFF url(\'^FileUrl(/crystalx/img/bg_page.jpg);\') 0 0 repeat-y;padding:10px 0 15px;}#toggles{font-size:10px;font-weight:bold;text-align:left;margin-left:42px;}#toggles a{margin:0 10px;padding:2px 0;text-decoration:none;border-bottom:1px dashed;color:#6182D1;}#toggles a:hover{border-bottom:1px solid;color:#4F6AD7;}#toggles span.userAcc{background:url(\'^FileUrl(/crystalx/img/ico_user.gif);\') 0 50% no-repeat;margin:0 0 0 8px;}#footer{position:relative;clear:both;width:770px;height:80px;margin-bottom:30px;background:url(\'^FileUrl(/crystalx/img/footer.jpg);\') 0 0 no-repeat;color:#6685CC;}#footer a{color:#6685CC;}#footer a:hover{color:#192666;}#top{position:absolute;top:55px;left:550px;}#top p{position:relative;width:30px;height:25px;margin:0;overflow:hidden;}#top p a{display:block;position:absolute;left:0;top:0;z-index:1;width:30px;height:25px;background:url(\'^FileUrl(/crystalx/img/ico_top.gif);\') 0 0 no-repeat;cursor:pointer;}#top a:hover{background:url(\'^FileUrl(/crystalx/img/ico_top.gif);\') -30px 0 no-repeat;}#footer p#copyright{position:absolute;top:10px;left:40px;margin:0;}#createdby{position:absolute;top:10px;left:562px;margin:0;color:#8CA3D8;}#createdby a{color:#8CA3D8;}',0,NULL),('w0QifHLhsrzeOpFKl-DX-Q','','text/css',1273032718,3600,'\n/taskEdit.css\" />\n\n\n
    \">\n\" />\n\n\" />\n\" />\n
    \n
    \" size=\"20\" class=\"inputBox\" />\n\n
    \n\n

    \n

    \n','ProjectManager_resourcePopup',1,1,'ProjectManagerTMPL0005',1229579830,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n<tmpl_var title>\n\n\n/taskEdit.css\" />\n\n\n
    \">\n\" />\n\n\" />\n\" />\n
    \n
    \" size=\"20\" class=\"inputBox\" />\n\n
    \n

    \n

    \n',0,NULL,NULL),('\n

    \n
    \n\n\n

    \n
    \n\n\n
    \n \n
    \n
    \n\n\n\n\n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \"> \n
    \">
    \n \">\n \n
    \n
    %;\">
    \n
    %
    \n
    \n
    \n \n \">/edit.gif\" style=\"border-style:none;\" title=\"\" alt=\"^International(edit,Asset);\" /> \n \'));\">/delete.gif\" style=\"border-style:none;\" title=\"\" alt=\"^International(delete,Asset);\" />\n
    ','ProjectManager_dashboard',1,1,'ProjectManagerTMPL0001',1229579830,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n
    \n\n
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\"> \n
    \">
    \n\">\n\n
    \n
    %;\">
    \n
    %
    \n
    \n
    \n\n\">/edit.gif\" style=\"border-style:none;\" title=\"\" alt=\"^International(edit,Asset);\" /> \n\'));\">/delete.gif\" style=\"border-style:none;\" title=\"\" alt=\"^International(delete,Asset);\" />\n
    ',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n\n \n

    \n\n\n\n \n \n \n \n \n ^International(Error: Search string,Asset_HttpProxy); ^International(not found in content,Asset_HttpProxy);.\n \n\n\n\n\n\n \n \n \n \n \n ^International(Warning: Ending search point,Asset_HttpProxy); ^International(not found in content,Asset_HttpProxy);.\n \n','HttpProxy',1,1,'PBtmpl0000000000000033',1230159454,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n\n

    \n\n\n\n\n\n\n\n^International(Error: Search string,Asset_HttpProxy); ^International(not found in content,Asset_HttpProxy);.\n\n\n\n\n\n\n\n\n\n^International(Warning: Ending search point,Asset_HttpProxy); ^International(not found in content,Asset_HttpProxy);.\n\n',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n\n \n

    \n\n\n\n \">^International(Download this data,Asset_SQLReport);\n\n\n\n

      \n \n
    • \n
      \n
    \n
    \n\n\n\n\n \n\n\n\n \n \n \n \n \n \n \n \n \n \n \n\n
    \">\n \n \n \n \n \n
     \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \">\n \n \n \n \n \n
     \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \">\n \n \n \n \n \n
     \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \">\n \n \n \n \n \n
     \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n\n\n
    \n \n
    \n
    ','SQLReport',1,1,'PBtmpl0000000000000059',1229907401,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n\n

    \n\n\n\">^International(Download this data,Asset_SQLReport);\n\n\n

      \n\n
    • \n
      \n
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \">\n\n\n\n\n\n
     \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \">\n\n\n\n\n\n
     \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \">\n\n\n\n\n\n
     \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \">\n\n\n\n\n\n
     \n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n \n
    \n
    ',0,NULL,NULL),('\"> \n \n \n

    \n
    \n\n\n

    \n
    \n\n\n

    \n\n\n

    \n
    \n\n\n \n \n\n\n \n \n\n
    ^International(364,WebGUI);:\n \n
    ^International(For,WebGUI);: 
    \n
    \n
    ','MultiSearch',1,1,'MultiSearchTmpl0000001',1230269962,'WebGUI::Asset::Template::HTMLTemplate',1,'\">\n\n

    \n
    \n\n

    \n
    \n\n

    \n\n\n

    \n
    \n\n\n\n\n\n\n\n\n\n
    ^International(364,WebGUI);:\n\n
    ^International(For,WebGUI);: 
    \n
    \n
    ',0,NULL,NULL),('\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 \">^International(label day,Asset_Calendar);\r\n \">^International(label week,Asset_Calendar);\r\n \">^International(label month,Asset_Calendar);\r\n ?type=list\">^International(486,WebGUI);\r\n \">^International(label search,Asset_Calendar);\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
    :00
    \r\n
    \r\n
      \r\n
    • \r\n \">\r\n
    • \r\n
    \r\n
    \r\n
    ','Calendar/Day',1,1,'CalendarDay00000000001',1230358389,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\">^International(label day,Asset_Calendar);\n\">^International(label week,Asset_Calendar);\n\">^International(label month,Asset_Calendar);\n?type=list\">^International(486,WebGUI);\n\">^International(label search,Asset_Calendar);\n\n
    \n\n
    \n
    \n, , \n
    \n
    \n\n\n\n\n\n
    \n
    :00
    \n
    \n\n
    \n
    ',0,NULL,NULL),('\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 ?type=day\">^International(label day,Asset_Calendar);\r\n ?type=week\">^International(label week,Asset_Calendar);\r\n ?type=month\">^International(label month,Asset_Calendar);\r\n ?type=list\">^International(486,WebGUI);\r\n \">^International(label search,Asset_Calendar);\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
    ^International(keyword,Asset_Calendar);
    \r\n
    \r\n
    \r\n
    ^International(start date,Asset_Calendar);
    \r\n
    \r\n
    \r\n
    ^International(end date,Asset_Calendar);
    \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 ^International(search results,Asset_Calendar);\r\n ^International(page x of x,Asset_Calendar,,);\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 \" style=\"padding-left:10px\">\r\n
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n
    \r\n
    \r\n
    ','Calendar/Search',1,1,'CalendarSearch00000001',1230358389,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n?type=day\">^International(label day,Asset_Calendar);\n?type=week\">^International(label week,Asset_Calendar);\n?type=month\">^International(label month,Asset_Calendar);\n?type=list\">^International(486,WebGUI);\n\">^International(label search,Asset_Calendar);\n
    \n \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n
    ^International(keyword,Asset_Calendar);
    \n
    \n
    \n
    ^International(start date,Asset_Calendar);
    \n
    \n
    \n
    ^International(end date,Asset_Calendar);
    \n
    \n
    \n
    \n\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n
    \n^International(search results,Asset_Calendar);\n^International(page x of x,Asset_Calendar,,);\n
    \n
    \n
    \n\n\n\n
    \n
    \n\n\n\n\n\n
    \n
    \n
    \n\" style=\"padding-left:10px\">\n
    \n
    \n
    \n\n\n\n
    \n
    \n
    ',0,NULL,NULL),('\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 \">^International(label day,Asset_Calendar);\r\n \">^International(label week,Asset_Calendar);\r\n \">^International(label month,Asset_Calendar);\r\n ?type=list\">^International(486,WebGUI);\r\n \">^International(label search,Asset_Calendar);\r\n\r\n \r\n
    \r\n \r\n
    \r\n
    \r\n , to , \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n
    curDay\"> \r\n \r\n \r\n
    \r\n
    \r\n
    ','Calendar/Week',1,1,'CalendarWeek0000000001',1230358389,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\">^International(label day,Asset_Calendar);\n\">^International(label week,Asset_Calendar);\n\">^International(label month,Asset_Calendar);\n?type=list\">^International(486,WebGUI);\n\">^International(label search,Asset_Calendar);\n\n
    \n\n
    \n
    \n , to , \n
    \n
    \n\n\n\n\n\n
    \n
    \n
    curDay\">\n\n\n
    \n
    \n
    ',0,NULL,NULL),('\n\n\n\n\n/tools.css\" />\n\n\n\n\n\n\n \n \n \n \n \n \n
    \n
    \n \n \n \n \n \n
    ()\n \n
    1:23 PM EDT
    \n \n
    \n
    \n
    \n
    \n \n \n \n \n \n \n
    \n &t=1d&q=l&l=off&z=s&p=s\" alt=\"chart\" />\n \n \n \n \n \n \n \n \n \n \n
    Today5d1m3m1y5y20y
    \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ^International(stocks.last,Asset_StockData);
    ^International(Market Cap,Asset_StockData);
    ^International(Change,Asset_StockData); _up_down\" style=\"text-align: right; font-weight: bold;\">\n /\' alt=\"\" /> \n
    ^International(Open,Asset_StockData);
    ^International(Day High,Asset_StockData);
    ^International(stocks.bid,Asset_StockData);
    ^International(52 Wk High,Asset_StockData);
    ^International(EPS,Asset_StockData);
    ^International(stocks.ex_div,Asset_StockData);
    ^International(Yield,Asset_StockData);
    \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ^International(Last Trade,Asset_StockData);
    ^International(Volume,Asset_StockData); m
    ^International(% Change,Asset_StockData); _up_down\" style=\"text-align: right; font-weight: bold;\">%
    ^International(Prev Close,Asset_StockData);
    ^International(Day Low,Asset_StockData);
    ^International(stocks.ask,Asset_StockData);
    ^International(52 Wk Low,Asset_StockData);
    ^International(stocks.pe,Asset_StockData);
    ^International(Dividend,Asset_StockData);
    ^International(Exchange,Asset_StockData);
    \n
    \n
    \n\n\n\n','StockData/Display',1,1,'StockDataTMPL000000002',1229494994,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n\n/tools.css\" />\n\n\n\n\n\n\n\n\n\n\n\n
    \n
    \n\n\n\n\n\n
    ()\n\n
    1:23 PM EDT
    \n\n
    \n
    \n
    \n
    \n\n\n\n\n\n\n
    \n&t=1d&q=l&l=off&z=s&p=s\" alt=\"chart\" />\n\n\n\n\n\n\n\n\n\n\n
    Today5d1m3m1y5y20y
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(stocks.last,Asset_StockData);
    ^International(Market Cap,Asset_StockData);
    ^International(Change,Asset_StockData); _up_down\" style=\"text-align: right; font-weight: bold;\">\n/\' alt=\"\" /> \n
    ^International(Open,Asset_StockData);
    ^International(Day High,Asset_StockData);
    ^International(stocks.bid,Asset_StockData);
    ^International(52 Wk High,Asset_StockData);
    ^International(EPS,Asset_StockData);
    ^International(stocks.ex_div,Asset_StockData);
    ^International(Yield,Asset_StockData);
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(Last Trade,Asset_StockData);
    ^International(Volume,Asset_StockData); m
    ^International(% Change,Asset_StockData); _up_down\" style=\"text-align: right; font-weight: bold;\">%
    ^International(Prev Close,Asset_StockData);
    ^International(Day Low,Asset_StockData);
    ^International(stocks.ask,Asset_StockData);
    ^International(52 Wk Low,Asset_StockData);
    ^International(stocks.pe,Asset_StockData);
    ^International(Dividend,Asset_StockData);
    ^International(Exchange,Asset_StockData);
    \n
    \n
    \n\n\n',0,NULL,NULL),('
    \" class=\"dataTable\">\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
    ','DataTable',1,1,'TuYPpHx7TUyk08639Pc8Bg',1233861621,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"dataTable\">\n\n\n\n\n

    \n
    \n
    \n\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n
    ',0,NULL,NULL),('
    \" class=\"dataTable\">\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
    ','DataTable',1,1,'3rjnBVJRO6ZSkxlFkYh_ug',1233861835,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"dataTable\">\n\n

    \n
    \n\n

    \n
    \n
    \n\n
    \n
    \n\n
    \n
    ',0,NULL,NULL),('

    \" />
    ','ImageAsset',1,1,'NBVSVNLp9X_bV7WrCprtCA',1237842096,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \" />
    ',0,NULL,NULL),('
    \r\n \r\n

    \r\n
    \r\n\r\n \r\n

    • ^International(manage things label,Asset_Thingy);

    \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
    rowOnerowTwo\">\r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    ','Thingy',1,1,'ThingyTmpl000000000001',1237914005,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n

    \n
    \n\n

    • ^International(manage things label,Asset_Thingy);

    \n
    \n\n
    \n
    \n\n\n\n\n
    \n\n
    rowOnerowTwo\">\n \n
    \n
    \n
    \n
    \n
    ',0,NULL,NULL),('\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 ','Carousel',1,1,'CarouselTmpl0000000002',1239475937,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n
    \n
    \n\n\n',0,NULL,NULL),('^International(inbox notification,Account_Inbox);','Account/Inbox/Notification',1,1,'b1316COmd9xRv4fCI3LLGA',1236956475,'WebGUI::Asset::Template::HTMLTemplate',1,'^International(inbox notification,Account_Inbox);',0,NULL,NULL),('
    \n
    \n \n
    \n
    \n
    ^International(Working...,WebGUI);
    \n
     
    \n
    \n
    \n \" style=\"border-style:none;height:48px;width:48px;\" title=\"\" alt=\"\" />\n
    \n
    \n \"*\"\n
    \n
    ','AdminConsole/ProgressBar',1,1,'YP9WaMPJHvCJl-YwrLVcPw',1245376837,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    \n\n
    \n
    \n
    ^International(Working...,WebGUI);
    \n
     
    \n
    \n
    \n\" style=\"border-style:none;height:48px;width:48px;\" title=\"\" alt=\"\" />\n
    \n
    \n\"*\"\n
    \n
    ',0,NULL,NULL),('\r\n \r\n

    \r\n
    \r\n
    \r\n\r\n
    \r\n \" style=\"height:auto;min-height:100px;width:100%;display:block;\">\r\n \" /> \r\n \r\n
    ','FileAsset',1,1,'pbtmpl0000000000000220',1247488979,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n

    \n
    \n
    \n
    \n\" style=\"height:auto;min-height:100px;width:100%;display:block;\">\n\" />\n\n
    ',0,NULL,NULL),('\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n  \n
    \n \n \n \n \n \n
    \n  \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n \n \n \" >
    \n
    \n \n
    \n
    \n \n
    \n \n \">
    \n
    \n
    \n
    \n
    \n \">
    \n ^AdminToggle;
    \n ^LoginToggle;
    \n
    \n
    \n
    \n \n
    \n
    \n \n \')\">\"?\"\n \n
    \n
    \n \" style=\"border-style:none;height:48px;width:48px;\" title=\"\" alt=\"\" />\n
    \n
    \n\"*\"\n
    \n
    \n \" style=\"border-style:none;\" title=\"\" alt=\"\" />\n
    \n\n\n
    ','AdminConsole',1,1,'PBtmpl0000000000000001',1247535846,'WebGUI::Asset::Template::HTMLTemplate',1,'\n
    \n
    \n\n
    \n
    \n\n
    \n\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n\n\n\" >
    \n
    \n\n
    \n
    \n\n
    \n\n\">
    \n
    \n
    \n
    \n
    \n\">
    \n^AdminToggle;
    \n^LoginToggle;
    \n
    \n
    \n
    \n\n
    \n
    \n\n\')\">\"?\"\n\n
    \n
    \n\" style=\"border-style:none;height:48px;width:48px;\" title=\"\" alt=\"\" />\n
    \n
    \n\"*\"\n
    \n
    \n\" style=\"border-style:none;\" title=\"\" alt=\"\" />\n
    \n\n
    ',0,NULL,NULL),('

    \r\n

    \r\n\r\n\" />\" quality=\"high\" width=\"800\" height=\"600\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />\r\n

    ','FileAsset',1,1,'pbtmpl0000000000000221',1247487940,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n

    \n\n\" />\" quality=\"high\" width=\"800\" height=\"600\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />\n

    ',0,NULL,NULL),('
    \n \n

    \n
    \n\n \n

    \n
    \n\n
    \n ^ViewCart(); (^CartItemCount;)\n
    \n\n \n
    \n
    \n \n\n \n
    \n ^International(subcategories,Asset_Shelf);: \n \n \n \">\n \n
    \n
    \n\n \n
    \n \n \n \" class=\"thumbnail\">\" alt=\"\" />\n \n \n
    \n \n ()\n
    \n \n
    \n \n
    \n
    \n
    \n \n \n \n \n
    \n ^International(this shelf is empty,Asset_Shelf);\n
    \n \n \n
    \n ^International(You do not have permission to view the products on this shelf,Asset_Shelf);\n
    \n
    \n
    \n
    \n
    ','Shelf',1,1,'nFen0xjkZn8WkpM93C9ceQ',1247864696,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n

    \n
    \n\n

    \n
    \n
    \n^ViewCart(); (^CartItemCount;)\n
    \n\n
    \n
    \n\n
    \n^International(subcategories,Asset_Shelf);:\n\n\n\">\n\n
    \n
    \n\n\n\n\n\n\n\n
    \n^International(this shelf is empty,Asset_Shelf);\n
    \n\n\n
    \n^International(You do not have permission to view the products on this shelf,Asset_Shelf);\n
    \n
    \n
    \n
    \n
    ',0,NULL,NULL),('
    \n\n\n
    \n );\'\"/>\n  \n );\'\"/>\n
    \n\n \n
    \n ^International(friends only,Account_Profile);^International(private profile,Account_Profile);^International(public profile,Account_Profile);\n
    \n\n
    \n\n\n

    ^International(error label,Account_Inbox);

    \n

    \n

    \">^International(back label,Account_Profile);

    \n\n \n \n \n \n \n \n \n \n \n \n \n \n
    colspan=2 class=\"bar\">\n
    \n ^International(member since,Account_Inbox); ^D(%z,);\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    32\" class=\"bar\">
    greenredblue;\">
    \n
    \n );\" class=\"WGphotostyle\"/>
    \n
    \n
    \n \n
    \n );\'\"/>\n  \n );\'\"/>\n
    \n\n
    \n','Account/Profile/View',1,1,'2CS-BErrjMmESOtGT90qOg',1248549087,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    \n);\'\"/>\n \n);\'\"/>\n
    \n\n
    \n^International(friends only,Account_Profile);^International(private profile,Account_Profile);^International(public profile,Account_Profile);\n
    \n
    \n\n

    ^International(error label,Account_Inbox);

    \n

    \n

    \">^International(back label,Account_Profile);

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n
    colspan=2 class=\"bar\">\n
    \n^International(member since,Account_Inbox); ^D(%z,);\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    32\" class=\"bar\">
    greenredblue;\">
    \n
    \n);\" class=\"WGphotostyle\"/>
    \n
    \n
    \n
    \n);\'\"/>\n \n);\'\"/>\n
    \n
    ',1,NULL,NULL),('
    \n
    \n
    \n
    \n
    \n

    ^International(error label,Account_Inbox);

    \n

    \n

    \">^International(back label,Account_Profile);

    \n
    \n
    \n
    \n
    \n
    ','Account/Profile/Error',1,1,'MBmWlA_YEA2I6D29OMGtRg',1248549086,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    \n
    \n
    \n
    \n

    ^International(error label,Account_Inbox);

    \n

    \n

    \">^International(back label,Account_Profile);

    \n
    \n
    \n
    \n
    \n
    ',0,NULL,NULL),('\n\n
    \n','Account/Layout',1,1,'gfZOwaTWYjbSoVaQtHBBEw',1249407461,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n
    \n',0,NULL,NULL),('
    \n\n
    \n\n

    \n
    \n ^International(member since,Account_Inbox); ^D(%z,);\n

    \n

    \n disabled onclick=\"location.href=\'\'\"/> \'\" /> \'\" />\n \'\" disabled/> >\" onclick=\"location.href=\'\'\" disabled/>\n

    \n
    \n

    \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ^International(subject label,Account_Inbox);:
    ^International(from label,Account_Inbox);:
    ^International(received label,Account_Inbox);:^D(\"%z %Z\",);
    ^International(status label,Account_Inbox);:
    \n
    \n
    \n \n\n
    \n\n
    \n','Account/Inbox/ViewMessage',1,1,'0n4HtbXaWa_XJHkFjetnLQ',1248549086,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    \n

    \n
    \n^International(member since,Account_Inbox); ^D(%z,);\n

    \n

    \ndisabled onclick=\"location.href=\'\'\"/> \'\" /> \'\" />\n\'\" disabled/> >\" onclick=\"location.href=\'\'\" disabled/>\n

    \n
    \n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(subject label,Account_Inbox);:
    ^International(from label,Account_Inbox);:
    ^International(received label,Account_Inbox);:^D(\"%z %Z\",);
    ^International(status label,Account_Inbox);:
    \n
    \n
    \n
    \n
    ',0,NULL,NULL),('

    ^International(error label,Account_Inbox);

    \n

    \n

    \">^International(back label,Account_Inbox);

    \n','Account/Inbox/Error',1,1,'ErEzulFiEKDkaCDVmxUavw',1248549086,'WebGUI::Asset::Template::HTMLTemplate',1,'

    ^International(error label,Account_Inbox);

    \n

    \n

    \">^International(back label,Account_Inbox);

    ',0,NULL,NULL),('

    ^International(message sent label,Account_Inbox);

    \n

    ^International(message sent text,Account_Inbox);

    \n

    \">^International(back label,Account_Inbox);

    ','Account/Inbox/Confirm',1,1,'DUoxlTBXhVS-Zl3CFDpt9g',1248549086,'WebGUI::Asset::Template::HTMLTemplate',1,'

    ^International(message sent label,Account_Inbox);

    \n

    ^International(message sent text,Account_Inbox);

    \n

    \">^International(back label,Account_Inbox);

    ',0,NULL,NULL),('\n
    \n
    \n\n

    \n
    \n ^International(member since,Account_Inbox); ^D(%z,);\n

    \n\n

    \n \n \n\n \n \n \" class=\"prevNext\">\"Previous\" \n \"> \n  \" class=\"prevNext\">\"Next\"\n \n \n \n \n \n \n

    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n WGoddThreadWGevenThread\">\n \n \n \n \n \n \n \n \n \n \n \n \n
    \">^International(from label,Account_Inbox);\">^International(invitation label,Account_Inbox);\">^International(date label,Account_Inbox);
    \" class=\"WGinbox_from\">\">^International(invitation message,Account_Inbox,);
    ^International(no invitations,Account_Inbox);
    \n \n

    \n \n \n\n \n \n \" class=\"prevNext\">\"Previous\" \n \"> \n  \" class=\"prevNext\">\"Next\"\n \n \n \n \n \n \n

    \n\n

    \n ^International(invitation count,\'Account_Inbox\');\n

    \n\n
    \n
    \n','Account/Inbox/ManageInvitations',1,1,'1Q4Je3hKCJzeo0ZBB5YB8g',1248549086,'WebGUI::Asset::Template::HTMLTemplate',1,'\n
    \n
    \n

    \n
    \n^International(member since,Account_Inbox); ^D(%z,);\n

    \n

    \n \n\n\n\" class=\"prevNext\">\"Previous\" \n\"> \n \" class=\"prevNext\">\"Next\"\n\n\n\n\n

    \n\n\n\n\n\n\n\n\n\nWGoddThreadWGevenThread\">\n\n\n\n\n\n\n\n\n\n\n\n\n
    \">^International(from label,Account_Inbox);\">^International(invitation label,Account_Inbox);\">^International(date label,Account_Inbox);
    \" class=\"WGinbox_from\">\">^International(invitation message,Account_Inbox,);
    ^International(no invitations,Account_Inbox);
    \n

    \n \n\n\n\" class=\"prevNext\">\"Previous\" \n\"> \n \" class=\"prevNext\">\"Next\"\n\n\n\n\n

    \n

    \n ^International(invitation count,\'Account_Inbox\');\n

    \n
    \n
    \n',0,NULL,NULL),('

    ^International(invitation confirm label,Account_Inbox);

    \n

    ^International(invitation confirm message,Account_Inbox);

    \n\n \n \n \n \n \n
    ^International(\'you have not been added\',\'Friends\',);^International(\'you have been added\',\'Friends\',);
    \n

    \">^International(invitations back label,Account_Inbox);

    \n','Account/Inbox/Confirm',1,1,'5A8Hd9zXvByTDy4x-H28qw',1248549086,'WebGUI::Asset::Template::HTMLTemplate',1,'

    ^International(invitation confirm label,Account_Inbox);

    \n

    ^International(invitation confirm message,Account_Inbox);

    \n\n\n\n\n\n\n
    ^International(\'you have not been added\',\'Friends\',);^International(\'you have been added\',\'Friends\',);
    \n

    \">^International(invitations back label,Account_Inbox);

    ',0,NULL,NULL),('\n
    \n \n
    \n\n

    \n
    \n ^International(member since,Account_Inbox); ^D(%z,);\n

    \n
    \n \'\" /> \'\" disabled/> >\" onclick=\"location.href=\'\'\" disabled/>\n
    \n \n

    \n

    \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ^International(from label,Account_Inbox);:
    ^International(received label,Account_Inbox);:
    ^D(\"%z %Z\",);
    \n
    \n\n
    \n\n
    \n','Account/Inbox/ViewInvitation',1,1,'VBkY05f-E3WJS50WpdKd1Q',1248549087,'WebGUI::Asset::Template::HTMLTemplate',1,'\n
    \n
    \n

    \n
    \n^International(member since,Account_Inbox); ^D(%z,);\n

    \n
    \n \'\" /> \'\" disabled/> >\" onclick=\"location.href=\'\'\" disabled/>\n
    \n

    \n

    \n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(from label,Account_Inbox);:
    ^International(received label,Account_Inbox);:
    ^D(\"%z %Z\",);
    \n
    \n
    \n
    \n',0,NULL,NULL),('

    \n

    \n','Account/Inbox/InviteUserMessage',1,1,'XgcsoDrbC0duVla7N7JAdw',1248549086,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n

    ',0,NULL,NULL),(' \n
    \n \n
    \n\n

    \n
    \n ^International(member since,Account_Inbox); ^D(%z,);\n

    \n\n

    \n ^International(invite a friend,Account_Inbox);\n

    \n \n\n

    \n\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ^International(to label,Account_Inbox);:
    ^International(subject label,Account_Inbox);:
    \n   \n \'\" />\n
    \n\n
    \n
    \n','Account/Inbox/InviteUser',1,1,'cR0UFm7I1qUI2Wbpj--08Q',1248549086,'WebGUI::Asset::Template::HTMLTemplate',1,'\n
    \n
    \n

    \n
    \n^International(member since,Account_Inbox); ^D(%z,);\n

    \n

    \n^International(invite a friend,Account_Inbox);\n

    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(to label,Account_Inbox);:
    ^International(subject label,Account_Inbox);:
    \n  \n\'\" />\n
    \n
    \n
    \n',0,NULL,NULL),('

    ^International(invitation sent label,Account_Inbox);

    \n

    ^International(invitation sent text,Account_Inbox);

    \n

    \">^International(back label,Account_Inbox);

    ','Account/Inbox/InviteUserConfirm',1,1,'SVIhz68689hwUGgcDM-gWw',1248549086,'WebGUI::Asset::Template::HTMLTemplate',1,'

    ^International(invitation sent label,Account_Inbox);

    \n

    ^International(invitation sent text,Account_Inbox);

    \n

    \">^International(back label,Account_Inbox);

    ',0,NULL,NULL),('\n\n
    \n\" class=\"WGprofile_displayView\">^International(\'friends as others label\',\'Account_Friends\');\" class=\"WGprofile_displayView\">^International(\'edit my friends\',\'Account_Friends\');\" class=\"WGprofile_displayView\">^International(\'back label\',\'Account_Friends\');\n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    ','Account/Layout',1,1,'zrNpGbT3odfIkg6nFSUy8Q',1249407461,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n
    \n\" class=\"WGprofile_displayView\">^International(\'friends as others label\',\'Account_Friends\');\" class=\"WGprofile_displayView\">^International(\'edit my friends\',\'Account_Friends\');\" class=\"WGprofile_displayView\">^International(\'back label\',\'Account_Friends\');\n
    \n
    \n
    \n
    \n
    \n\n
    \n
    \n
    \n
    \n
    ',0,NULL,NULL),('\n
    \n\n\n

    \n
    \n ^International(member since,Account_Friends); ^D(%z,);\n

    \n\n \n\n
    \n\n
    \n\n

    \n \n \n \n

    \n \n \n \n

    \n\n \n
    class=\"bordered\">\n \n \n \n \n \n \n \n
    \">\"\"^Extras(account/images/no_photo.gif);\"/>\n \">
    \n \n ^International(member since,Account_Friends); ^D(%z,);
    \n
    \n
    \n
    \n
    \n \n

    \n \n \n \n

    \n \n \n \n

    \n\n
    \n','Account/Friends/View',1,1,'1Yn_zE_dSiNuaBGNLPbxtw',1248549086,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n

    \n
    \n^International(member since,Account_Friends); ^D(%z,);\n

    \n\n
    \n
    \n

    \n \n\n\n

    \n\n\n\n

    \n\n
    class=\"bordered\">\n\n\n\n\n\n\n\n
    \">\"\"^Extras(account/images/no_photo.gif);\"/>\n\">
    \n\n^International(member since,Account_Friends); ^D(%z,);
    \n
    \n
    \n
    \n
    \n

    \n \n\n\n

    \n\n\n\n

    \n
    ',0,NULL,NULL),('
    \n\n
    \n\n
    \n
    \n ^International(member since,Account_Inbox); ^D(%z,);\n
    \n\n \n\n
    \n\n
    \n\n

    \n \n \n \n

    \n \n \n \n

    \n\n \n \n \n \n \n \n
    class=\"WGbordered\" >\n \n \n \n \n \n \n \n \n
    \">\"Friend^Extras(account/images/no_photo.gif);\"/>
    ^International(online,Friends);^International(offline,Friends);
    \n \">
    \n \n ^International(member since,Account_Friends); ^D(%z,);
    \n ^User(homeCountry,);\n
    \n
    \n
    \n
    \n
    \n
    \n \n

    \n \n \n \n

    \n \n \n \n

    \n\n
    \n\n
    \n','Account/Friends/Edit',1,1,'AZFU33p0jpPJ-E6qLSWZng',1248549086,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    \n
    \n
    \n^International(member since,Account_Inbox); ^D(%z,);\n
    \n\n
    \n
    \n

    \n \n\n\n

    \n\n\n\n

    \n\n\n\n\n\n\n
    class=\"WGbordered\" >\n\n\n\n\n\n\n\n\n
    \">\"Friend^Extras(account/images/no_photo.gif);\"/>
    ^International(online,Friends);^International(offline,Friends);
    \n\">
    \n\n^International(member since,Account_Friends); ^D(%z,);
    \n^User(homeCountry,);\n
    \n
    \n
    \n
    \n
    \n
    \n

    \n \n\n\n

    \n\n\n\n

    \n
    \n
    ',0,NULL,NULL),('\n\n
    \n \n

    \n
    \n ^International(member since,Account_Friends); ^D(%z,);\n

    \n \n

    ^International(add to network label,Account_Friends);

    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ^International(adding user message,Account_Friends,);
    ^International(sending to message,Account_Friends);
    \n\n
    \n\n','Account/Friends/SendRequest',1,1,'AGJBGviWGAwjnwziiPjvDg',1248549087,'WebGUI::Asset::Template::HTMLTemplate',1,'\n
    \n

    \n
    \n^International(member since,Account_Friends); ^D(%z,);\n

    \n

    ^International(add to network label,Account_Friends);

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(adding user message,Account_Friends,);
    ^International(sending to message,Account_Friends);
    \n
    \n',0,NULL,NULL),('

    \n

    ^International(error label,Account_Friends);

    \n

    \n

    \">^International(back label,Account_Inbox);

    \n

    \n','Account/Friends/Error',1,1,'7Ijdd8SW32lVgg2H8R-Aqw',1248549086,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n

    ^International(error label,Account_Friends);

    \n

    \n

    \">^International(back label,Account_Inbox);

    \n

    ',0,NULL,NULL),('

    \n

    ^International(message sent label,Account_Friends);

    \n

    ^International(add to friends confirmation,Account_Friends,);

    \n

    \">^International(back to user profile,Account_Friends);

    \n

    ','Account/Friends/Confirm',1,1,'K8F0j_cq_jgo8dvWY_26Ag',1248549086,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n

    ^International(message sent label,Account_Friends);

    \n

    ^International(add to friends confirmation,Account_Friends,);

    \n

    \">^International(back to user profile,Account_Friends);

    \n

    ',0,NULL,NULL),('

    \n

    ^International(remove confirm label,Account_Friends);

    \n

    ^International(remove confirm message,Account_Friends,);

    \n

    \n \">^International(remove confirm no,Account_Friends); · \n \">^International(remove confirm yes,Account_Friends);\n

    \n

    ','Account/Friends/Confirm',1,1,'G5V6neXIDiFXN05oL-U3AQ',1248549087,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n

    ^International(remove confirm label,Account_Friends);

    \n

    ^International(remove confirm message,Account_Friends,);

    \n

    \n\">^International(remove confirm no,Account_Friends); · \n\">^International(remove confirm yes,Account_Friends);\n

    \n

    ',0,NULL,NULL),('\n\n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    ','Account/Layout',1,1,'9ThW278DWLV0-Svf68ljFQ',1249407460,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n
    \n
    \n
    \n
    ',0,NULL,NULL),('
    \n
    \n

    \n ^International(Payout Totals,Account_Shop);\n

    \n \n \n \n \n \n \n
    ^International(Paid,Account_Shop); :
    ^International(Scheduled for payment,Account_Shop); :
    ^International(Not yet scheduled,Account_Shop); : \n
    ^International(total,Shop); :
    \n \n

    ^International(my sales label,Account_Shop);

    \n \n \n \n \n \n \n \n \n \n \n \n \n WGoddThreadWGevenThread\">\n \n \n \n \n \n \n \n \n \n \n \n
    ^International(Product,Account_Shop);^International(quantity,Shop);^International(Payout,Account_Shop);
    \">
    ^International(no contributions,Account_Contributions);
    \n \n

    ^International(my sales label,Account_Shop); :: ^International(Products,Account_Shop);

    \n
    \n
    ','Shop/MySales',1,1,'-zxyB-O50W8YnL39Ouoc4Q',1248563425,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    \n

    \n^International(Payout Totals,Account_Shop);\n

    \n\n\n\n\n\n\n
    ^International(Paid,Account_Shop); :
    ^International(Scheduled for payment,Account_Shop); :
    ^International(Not yet scheduled,Account_Shop); : \n
    ^International(total,Shop); :
    \n

    ^International(my sales label,Account_Shop);

    \n\n\n\n\n\n\n\n\n\n\n\nWGoddThreadWGevenThread\">\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(Product,Account_Shop);^International(quantity,Shop);^International(Payout,Account_Shop);
    \">
    ^International(no contributions,Account_Contributions);
    \n

    ^International(my sales label,Account_Shop); :: ^International(Products,Account_Shop);

    \n
    \n
    ',0,NULL,NULL),('\n\n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    ','Account/Layout',1,1,'b4n3VyUIsAHyIvT-W-jziA',1249407461,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n
    \n
    \n
    \n
    ',0,NULL,NULL),('
    \n \" id=\"id\">\n\n \n
    \n
    \n\n \n

    \n
    \n\n \n \n
    \n \n

    \n ^ViewCart();
    \n \">^International(continue shopping button,Shop);\n \n ^ViewCart(); (^CartItemCount;)\n

    \n \n \n \n \n \n \n \n \n \n\n \n \n \n
      \n ^International(variants,Asset_Product);\n \n
    • \n
      \n
    \n \n \n \n
    \n
    \n \n \n \n \n \n
      \n ^International(30,Asset_Product);\n \n
    • \n
      \n
    \n
    \n \n \n
      \n ^International(54,Asset_Product);\n \n
    • \n
      \n
    \n
    \n\n \n
      \n ^International(31,Asset_Product);\n \n
    • :
    • \n
      \n
    \n
    \n \n \n
      \n ^International(32,Asset_Product);\n \n
    • \">
    • \n
      \n
    \n
    \n \n \n
      \n ^International(33,Asset_Product);\n \n
    • \">
    • \n
      \n
    \n
    \n
    \n \n
    \n
    \n\n','Product',1,1,'PBtmpl0000000000000056',1248729559,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\" id=\"id\">\n\n
    \n
    \n\n

    \n
    \n\n
    \n\n

    \n^ViewCart();
    \n\">^International(continue shopping button,Shop);\n\n^ViewCart(); (^CartItemCount;)\n

    \n\n\n\n\n\n\n\n\n\n\n\n
      \n^International(variants,Asset_Product);\n\n
    • \n
      \n
    \n\n\n\n
    \n
    \n\n
      \n^International(30,Asset_Product);\n\n
    • \n
      \n
    \n
    \n\n
      \n^International(54,Asset_Product);\n\n
    • \n
      \n
    \n
    \n\n
      \n^International(31,Asset_Product);\n\n
    • :
    • \n
      \n
    \n
    \n\n
      \n^International(32,Asset_Product);\n\n
    • \">
    • \n
      \n
    \n
    \n\n
      \n^International(33,Asset_Product);\n\n
    • \">
    • \n
      \n
    \n
    \n
    \n
    \n
    ',0,NULL,NULL),('^International(inbox sms notification,Account_Inbox);','Account/Inbox/Notification',1,1,'i9-G00ALhJOr0gMh-vHbKA',1250408924,'WebGUI::Asset::Template::HTMLTemplate',1,'^International(inbox sms notification,Account_Inbox);',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n

    ^International(\"form manage title\",\"Asset_AdSku\");

    \n

    \'>^International(\"form purchase link\",\"Asset_AdSku\");

    \n

    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n
    ^International(\"form manage table header title\",\"Asset_AdSku\");^International(\"form manage table header clicks\",\"Asset_AdSku\");^International(\"form manage table header impressions\",\"Asset_AdSku\");^International(\"form manage table header renew\",\"Asset_AdSku\");
    \">^International(\"form manage table value renew\",\"Asset_AdSku\");
    \n\n^ViewCart(); (^CartItemCount;)','AdSku/Manage',1,1,'ohjyzab5i-yW6GOWTeDUHg',1251425384,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n

    ^International(\"form manage title\",\"Asset_AdSku\");

    \n

    \'>^International(\"form purchase link\",\"Asset_AdSku\");

    \n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(\"form manage table header title\",\"Asset_AdSku\");^International(\"form manage table header clicks\",\"Asset_AdSku\");^International(\"form manage table header impressions\",\"Asset_AdSku\");^International(\"form manage table header renew\",\"Asset_AdSku\");
    \">^International(\"form manage table value renew\",\"Asset_AdSku\");
    \n^ViewCart(); (^CartItemCount;)',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n\n
    \n
    \n\n

    ^International(form added to cart thanks,Asset_AdSku);

    \n\n

    \n

    \n

    \">^International(form manage link,Asset_AdSku);

    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ^International(form purchase ad title,Asset_AdSku);
    ^International(form purchase ad link,Asset_AdSku);
    ^International(form purchase ad image,Asset_AdSku);
    ^International(form purchase number of clicks,Asset_AdSku);^International(form purchase per click,Asset_AdSku, );\n
    \n
    ^International(minimum clicks,Asset_AdSku,);
    ^International(form purchase number of impressions,Asset_AdSku);^International(form purchase per click,Asset_AdSku, );\n
    \n
    ^International(minimum impressions,Asset_AdSku,);
    \n \n
    \n^ViewCart(); (^CartItemCount;)','AdSku/Purchase',1,1,'AldPGu0u-jm_5xK13atCSQ',1251419124,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n
    \n
    \n\n

    ^International(form added to cart thanks,Asset_AdSku);

    \n\n

    \n

    \n

    \">^International(form manage link,Asset_AdSku);

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(form purchase ad title,Asset_AdSku);
    ^International(form purchase ad link,Asset_AdSku);
    ^International(form purchase ad image,Asset_AdSku);
    ^International(form purchase number of clicks,Asset_AdSku);^International(form purchase per click,Asset_AdSku, );\n
    \n
    ^International(minimum clicks,Asset_AdSku,);
    ^International(form purchase number of impressions,Asset_AdSku);^International(form purchase per click,Asset_AdSku, );\n
    \n
    ^International(minimum impressions,Asset_AdSku,);
    \n\n
    \n^ViewCart(); (^CartItemCount;)',0,NULL,NULL),('

    \n\n\n\n
    \n
    \n\n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \" style=\"display:none;\">\n \n \n \n \n
    ^International(\'answer label\',\'Asset_Survey\');^International(\'response count label\',\'Asset_Survey\');^International(\'response percent label\',\'Asset_Survey\');
    \');\">^International(\'show comments label\',\'Asset_Survey\');
    \n \n

    \n
    \n
    \n \n
    \n \');\">^International(\'show responses label\',\'Asset_Survey\');\n
    \n
    \" style=\"display:none;\">\n \n

    \n \n
    \n
    \n
    \n
    \n
    \n


    \n
    \n\n\n
    \n · · \n
    \n
    \n','Survey/Overview',1,1,'PBtmpl0000000000000063',1250243000,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n\n
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\" style=\"display:none;\">\n\n\n\n\n
    ^International(\'answer label\',\'Asset_Survey\');^International(\'response count label\',\'Asset_Survey\');^International(\'response percent label\',\'Asset_Survey\');
    \');\">^International(\'show comments label\',\'Asset_Survey\');
    \n\n

    \n
    \n
    \n\n
    \n\');\">^International(\'show responses label\',\'Asset_Survey\');\n
    \n
    \" style=\"display:none;\">\n\n

    \n\n
    \n
    \n
    \n
    \n
    \n


    \n
    \n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('\" id=\"id\">\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
    ^International(\'user label\',\'Asset_Survey\');^International(\'start date\',\'Asset_Survey\');^International(\'end date\',\'Asset_Survey\');^International(\'score label\',\'Asset_Survey\');^International(\'percentage label\',\'Asset_Survey\');
    \">/%
    \r\n\r\n\r\n\r\n
    \r\n · · \r\n
    \r\n
    \r\n','Survey/Gradebook',1,1,'PBtmpl0000000000000062',1250243000,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n\n

    \n\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(\'user label\',\'Asset_Survey\');^International(\'start date\',\'Asset_Survey\');^International(\'end date\',\'Asset_Survey\');^International(\'score label\',\'Asset_Survey\');^International(\'percentage label\',\'Asset_Survey\');
    \">/%
    \n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n\n \n

    \n\n\n

    \n\n\n','Survey',1,1,'PBtmpl0000000000000061',1250243000,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n\n

    \n\n

    \n',0,NULL,NULL),('
    \n
    \n
    \n
    \n\n\n
    \n

    \n^International(\'restart message\',\'Asset_Survey\');\n

    \n
    \n
    \n\n\n
    \n out of \n
    \n
    \n\n
    \n minutes left\n
    \n
    \n
    \n\n
    \n\n\n
    \n

    required\'>

    \n\n \n\n \n\n \n \n\n\n \n \n \n \n \n \' id=\'\' size=\'50\' />\n \n \n verbatim\' >\n \n \n \n \n\n \n \n \' value=\'\'>\n \n \n\n \n \n \n \n \n \" id=\"\">
    \n
    \n \n verbatim\'>\n \n \n
    \n
    \n\n \n \n \n \n \n
    \n
    \n \n verbatim\'>\n \n \n
    \n
    \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n button\" value=\"\">\n \n \n button\">\n \n \" id=\"\" value=\"\">\n \n \n \n \n \n verbatim\' name=\'verbatim\'>\n
    \n \n \n \n
    \n button\" value=\"\">\n \n \n button\">\n \n \" id=\"\" value=\"\">\n \n verbatim\' name=\'verbatim\'>\n \n
    \n
    \n\n \n \n \n \' id=\'\'>\n \n \n ^International(\'year\', \'Asset_Survey\');\n -year\' id=\'-year\' type=text size=4>\n ^International(\'month\', \'Asset_Survey\');\n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n \n \n \' id=\'\' type=text>\n button\'>\n
    container\'>
    \n \n
    \n
    \n
    \n\n \n \n\n \n \' name=\'\' value=0>\n \n \n \' name=\'\' value=\"\">\n \n\n \n

    \n
    \n \n show\'>0\n \n \n \n show\'>\n \n
    0  \n
    slider-bg\' tabindex=\'-1\' title=\'Slider\' class=slider-bg>\n \n
    slider-min-thumb\' class=slider-min-thumb>\n \n
    \n \n
    slider-max-thumb\' class=slider-max-thumb>\n \n
    \n
    \n \n \n
    \n \n
    \n\n \n\n \n \n \n\n \n

    \n
    \n | \' name=\'\'> | \n \n
      \n
    slider-bg\' tabindex=\'-1\' title=\'Slider\' class=slider-bg>\n
    slider-thumb\' class=slider-thumb>\n \n
    \n
    \n
    \n
    \n \n\n \n \n \n \n\n \n \n

    Comment:

    \n
    \n\n\n
    \n
    \n
    \n \n \n \n ^International(\'finish\', \'Asset_Survey\');^International(\'continue\', \'Asset_Survey\');\">\n
    \n
    \n\n
    \n\n
    \n\n\n\n\n\n\n','Survey/Take',1,1,'CxMpE_UPauZA3p8jdrOABw',1250243000,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    \n
    \n
    \n\n
    \n

    \n^International(\'restart message\',\'Asset_Survey\');\n

    \n
    \n
    \n\n
    \n out of \n
    \n
    \n\n
    \n minutes left\n
    \n
    \n
    \n
    \n\n
    \n

    required\'>

    \n\n\n\n\n\n\n\n\n\n\' id=\'\' size=\'50\' />\n\n\n verbatim\'>\n\n\n\n\n\n\n\' value=\'\'>\n\n\n\n\n\n\n\n\" id=\"\">
    \n
    \n\nverbatim\'>\n\n\n
    \n
    \n\n\n\n\n\n
    \n
    \n\nverbatim\'>\n\n\n
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \nbutton\" value=\"\">\n\n\nbutton\">\n\n\" id=\"\" value=\"\">\n\n\n\n\n\nverbatim\' name=\'verbatim\'>\n
    \n\n\n\n
    \nbutton\" value=\"\">\n\n\nbutton\">\n\n\" id=\"\" value=\"\">\n\nverbatim\' name=\'verbatim\'>\n\n
    \n
    \n\n\n\n\' id=\'\'>\n\n\n^International(\'year\', \'Asset_Survey\');\n-year\' id=\'-year\' type=text size=4>\n^International(\'month\', \'Asset_Survey\');\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\n\n\' id=\'\' type=text>\nbutton\'>\n
    container\'>
    \n\n
    \n
    \n
    \n\n\n\n\' name=\'\' value=0>\n\n\n\' name=\'\' value=\"\">\n\n\n

    \n
    \n\nshow\'>0\n\n\n\nshow\'>\n\n
    0  \n
    slider-bg\' tabindex=\'-1\' title=\'Slider\' class=slider-bg>\n\n
    slider-min-thumb\' class=slider-min-thumb>\n\n
    \n\n
    slider-max-thumb\' class=slider-max-thumb>\n\n
    \n
    \n\n\n
    \n\n
    \n\n\n\n\n\n

    \n
    \n| \' name=\'\'> | \n\n
      \n
    slider-bg\' tabindex=\'-1\' title=\'Slider\' class=slider-bg>\n
    slider-thumb\' class=slider-thumb>\n\n
    \n
    \n
    \n
    \n\n\n\n\n\n\n

    Comment:

    \n
    \n
    \n
    \n
    \n\n\n\n^International(\'finish\', \'Asset_Survey\');^International(\'continue\', \'Asset_Survey\');\">\n
    \n
    \n
    \n
    ',0,NULL,NULL),('
    \n
    ^International(\'please enter section information\',\'Asset_Survey\');
    \n
    \n
    \n \'>\n \n \n \n
    \n\n

    \n

    ^International(\'section number\',\'Asset_Survey\');\n
    ^International(\'section number description\',\'Asset_Survey\');
    \n
    \n

    \n \n

    \n

    ^International(\'section name\',\'Asset_Survey\');\n
    ^International(\'section name description\',\'Asset_Survey\');
    \n
    \n \' type=text>\n

    \n \n

    \n

    ^International(\'section custom variable name\',\'Asset_Survey\');\n
    ^International(\'section custom variable name description\',\'Asset_Survey\');
    \n
    \n \' name=\'variable\' size=\'2\'>\n

    \n \n \n

    \n

    \n
    ^International(\'jump to\',\'Asset_Survey\');\n
    ^International(\'jump to description\',\'Asset_Survey\');
    \n
    \n
    \n \">\n
    \n
    \n
    \n

    \n\n

    \n

    ^International(\'jump expression\',\'Asset_Survey\');\n
    ^International(\'jump expression description\',\'Asset_Survey\');
    \n
    \n
    \n \n
    \n

    \n \n \n
    \n \n

    \n

    ^International(\'randomize questions\',\'Asset_Survey\');\n
    ^International(\'randomize questions description\',\'Asset_Survey\');
    \n
    \n checked >^International(\'yes\',\'Asset_Survey\');\n checked >^International(\'no\',\'Asset_Survey\');\n

    \n \n\n

    \n

    ^International(\'questions per page\',\'Asset_Survey\');\n
    ^International(\'questions per page description\',\'Asset_Survey\');
    \n
    \n \n

    \n

    \n

    ^International(\'questions on section page\',\'Asset_Survey\');\n
    ^International(\'questions on section page description\',\'Asset_Survey\');
    \n
    \n \n ^International(\'yes\',\'Asset_Survey\');\n ^International(\'no\',\'Asset_Survey\');\n \n ^International(\'yes\',\'Asset_Survey\');\n ^International(\'no\',\'Asset_Survey\');\n \n

    \n \n \n

    \n

    ^International(\'title on every page\',\'Asset_Survey\');\n
    ^International(\'title on every page description\',\'Asset_Survey\');
    \n
    \n \n ^International(\'yes\',\'Asset_Survey\');\n ^International(\'no\',\'Asset_Survey\');\n \n ^International(\'yes\',\'Asset_Survey\');\n ^International(\'no\',\'Asset_Survey\');\n \n

    \n \n

    \n

    ^International(\'text on every page\',\'Asset_Survey\');\n
    ^International(\'text on every page description\',\'Asset_Survey\');
    \n
    \n \n ^International(\'yes\',\'Asset_Survey\');\n ^International(\'no\',\'Asset_Survey\');\n \n ^International(\'yes\',\'Asset_Survey\');\n ^International(\'no\',\'Asset_Survey\');\n \n

    \n \n

    \n

    ^International(\'terminal section\',\'Asset_Survey\');\n
    ^International(\'terminal section description\',\'Asset_Survey\');
    \n
    \n \n ^International(\'yes\',\'Asset_Survey\');\n ^International(\'no\',\'Asset_Survey\');\n \n ^International(\'yes\',\'Asset_Survey\');\n ^International(\'no\',\'Asset_Survey\');\n \n

    \n \n

    \n

    ^International(\'terminal section url\',\'Asset_Survey\');\n
    ^International(\'terminal section url description\',\'Asset_Survey\');
    \n
    \n \'>\n

    \n\n

    \n

    ^International(\'logical section\',\'Asset_Survey\');\n
    ^International(\'logical section help\',\'Asset_Survey\');
    \n
    \n \n ^International(\'yes\',\'Asset_Survey\');\n ^International(\'no\',\'Asset_Survey\');\n \n ^International(\'yes\',\'Asset_Survey\');\n ^International(\'no\',\'Asset_Survey\');\n \n

    \n \n
    \n \n

    \n

    ^International(\'section text\',\'Asset_Survey\');\n
    ^International(\'section text description\',\'Asset_Survey\');
    \n
    \n

    \n
    \n \n
    \n \n
    \n
    \n
    ','Survey/Edit',1,1,'1oBRscNIcFOI-pETrCOspA',1250243000,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    ^International(\'please enter section information\',\'Asset_Survey\');
    \n
    \n
    \n\'>\n\n\n
    \n

    \n

    ^International(\'section number\',\'Asset_Survey\');\n
    ^International(\'section number description\',\'Asset_Survey\');
    \n
    \n

    \n

    \n

    ^International(\'section name\',\'Asset_Survey\');\n
    ^International(\'section name description\',\'Asset_Survey\');
    \n
    \n\' type=text>\n

    \n

    \n

    ^International(\'section custom variable name\',\'Asset_Survey\');\n
    ^International(\'section custom variable name description\',\'Asset_Survey\');
    \n
    \n\' name=\'variable\' size=\'2\'>\n

    \n

    \n

    \n
    ^International(\'jump to\',\'Asset_Survey\');\n
    ^International(\'jump to description\',\'Asset_Survey\');
    \n
    \n
    \n\">\n
    \n
    \n
    \n

    \n

    \n

    ^International(\'jump expression\',\'Asset_Survey\');\n
    ^International(\'jump expression description\',\'Asset_Survey\');
    \n
    \n
    \n\n
    \n

    \n
    \n

    \n

    ^International(\'randomize questions\',\'Asset_Survey\');\n
    ^International(\'randomize questions description\',\'Asset_Survey\');
    \n
    \n checked >^International(\'yes\',\'Asset_Survey\');\n checked >^International(\'no\',\'Asset_Survey\');\n

    \n

    \n

    ^International(\'questions per page\',\'Asset_Survey\');\n
    ^International(\'questions per page description\',\'Asset_Survey\');
    \n
    \n\n

    \n

    \n

    ^International(\'questions on section page\',\'Asset_Survey\');\n
    ^International(\'questions on section page description\',\'Asset_Survey\');
    \n
    \n\n^International(\'yes\',\'Asset_Survey\');\n^International(\'no\',\'Asset_Survey\');\n\n^International(\'yes\',\'Asset_Survey\');\n^International(\'no\',\'Asset_Survey\');\n\n

    \n

    \n

    ^International(\'title on every page\',\'Asset_Survey\');\n
    ^International(\'title on every page description\',\'Asset_Survey\');
    \n
    \n\n^International(\'yes\',\'Asset_Survey\');\n^International(\'no\',\'Asset_Survey\');\n\n^International(\'yes\',\'Asset_Survey\');\n^International(\'no\',\'Asset_Survey\');\n\n

    \n

    \n

    ^International(\'text on every page\',\'Asset_Survey\');\n
    ^International(\'text on every page description\',\'Asset_Survey\');
    \n
    \n\n^International(\'yes\',\'Asset_Survey\');\n^International(\'no\',\'Asset_Survey\');\n\n^International(\'yes\',\'Asset_Survey\');\n^International(\'no\',\'Asset_Survey\');\n\n

    \n

    \n

    ^International(\'terminal section\',\'Asset_Survey\');\n
    ^International(\'terminal section description\',\'Asset_Survey\');
    \n
    \n\n^International(\'yes\',\'Asset_Survey\');\n^International(\'no\',\'Asset_Survey\');\n\n^International(\'yes\',\'Asset_Survey\');\n^International(\'no\',\'Asset_Survey\');\n\n

    \n

    \n

    ^International(\'terminal section url\',\'Asset_Survey\');\n
    ^International(\'terminal section url description\',\'Asset_Survey\');
    \n
    \n\'>\n

    \n

    \n

    ^International(\'logical section\',\'Asset_Survey\');\n
    ^International(\'logical section help\',\'Asset_Survey\');
    \n
    \n\n^International(\'yes\',\'Asset_Survey\');\n^International(\'no\',\'Asset_Survey\');\n\n^International(\'yes\',\'Asset_Survey\');\n^International(\'no\',\'Asset_Survey\');\n\n

    \n
    \n

    \n

    ^International(\'section text\',\'Asset_Survey\');\n
    ^International(\'section text description\',\'Asset_Survey\');
    \n
    \n

    \n
    \n\n
    \n
    \n
    \n
    ',0,NULL,NULL),('
    \n
    ^International(\'please enter question information\',\'Asset_Survey\');
    \n
    \n
    \n \'>\n \n \n \n \n \n
    \n \n

    \n

    ^International(\'question number\',\'Asset_Survey\');\n
    ^International(\'question number description\',\'Asset_Survey\');
    \n
    \n \n

    \n \n

    \n

    ^International(\'question variable name\',\'Asset_Survey\');\n
    ^International(\'question variable name description\',\'Asset_Survey\');
    \n
    \n \' name=\'variable\' size=\'2\'>\n

    \n \n

    \n

    ^International(\'question type\',\'Asset_Survey\');\n
    ^International(\'question type description\',\'Asset_Survey\');
    \n
    \n \n

    \n \n

    \n

    ^International(\'question score\',\'Asset_Survey\');\n
    ^International(\'question score description\',\'Asset_Survey\');
    \n
    \n \' name=\'value\'>\n

    \n \n

    \n

    ^International(\'required label\',\'Asset_Survey\');\n
    ^International(\'required description\',\'Asset_Survey\');
    \n
    \n checked >^International(\'yes\',\'Asset_Survey\');\n checked >^International(\'no\',\'Asset_Survey\');\n

    \n \n

    \n

    ^International(\'randomize answers\',\'Asset_Survey\');\n
    ^International(\'randomize answers description\',\'Asset_Survey\');
    \n
    \n checked >^International(\'yes\',\'Asset_Survey\');\n checked >^International(\'no\',\'Asset_Survey\');\n

    \n

    \n

    ^International(\'vertical display\',\'Asset_Survey\');\n
    ^International(\'vertical display description\',\'Asset_Survey\');
    \n
    \n checked >^International(\'yes\',\'Asset_Survey\');\n checked >^International(\'no\',\'Asset_Survey\');\n

    \n \n\n\n
    \n\n

    \n

    ^International(\'show text in button\',\'Asset_Survey\');\n
    ^International(\'show text in button description\',\'Asset_Survey\');
    \n
    \n checked >^International(\'yes\',\'Asset_Survey\');\n checked >^International(\'no\',\'Asset_Survey\');\n

    \n \n

    \n

    ^International(\'allow comment\',\'Asset_Survey\');\n
    ^International(\'allow comment description\',\'Asset_Survey\');
    \n
    \n checked >^International(\'yes\',\'Asset_Survey\');\n checked >^International(\'no\',\'Asset_Survey\');\n

    \n \n

    \n

    ^International(\'comment cols\',\'Asset_Survey\');\n
    ^International(\'cols description\',\'Asset_Survey\');
    \n
    \n \' name=\'commentCols\'>\n

    \n \n

    \n

    ^International(\'comment rows\',\'Asset_Survey\');\n
    ^International(\'rows description\',\'Asset_Survey\');
    \n
    \n \' name=\'commentRows\'> \n

    \n \n

    \n

    ^International(\'maximum number of answers\',\'Asset_Survey\');\n
    ^International(\'maximum number of answers description\',\'Asset_Survey\');
    \n
    \n \' name=\'maxAnswers\' size=\'2\'>\n

    \n\n\n
    \n\n

    \n

    \n
    ^International(\'jump to\',\'Asset_Survey\');\n
    ^International(\'jump to description\',\'Asset_Survey\');
    \n
    \n
    \n \">\n
    \n
    \n
    \n

    \n\n

    \n

    ^International(\'jump expression\',\'Asset_Survey\');\n
    ^International(\'jump expression description\',\'Asset_Survey\');
    \n
    \n
    \n \n
    \n

    \n\n \n
    \n \n

    \n

    ^International(\'question text\',\'Asset_Survey\');\n
    ^International(\'question text description\',\'Asset_Survey\');
    \n
    \n

    \n
    \n \n
    \n
    \n
    \n
    \n','Survey/Edit',1,1,'wAc4azJViVTpo-2NYOXWvg',1250243000,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    ^International(\'please enter question information\',\'Asset_Survey\');
    \n
    \n
    \n\'>\n\n\n\n\n\n
    \n

    \n

    ^International(\'question number\',\'Asset_Survey\');\n
    ^International(\'question number description\',\'Asset_Survey\');
    \n
    \n\n

    \n

    \n

    ^International(\'question variable name\',\'Asset_Survey\');\n
    ^International(\'question variable name description\',\'Asset_Survey\');
    \n
    \n\' name=\'variable\' size=\'2\'>\n

    \n

    \n

    ^International(\'question type\',\'Asset_Survey\');\n
    ^International(\'question type description\',\'Asset_Survey\');
    \n
    \n\n

    \n

    \n

    ^International(\'question score\',\'Asset_Survey\');\n
    ^International(\'question score description\',\'Asset_Survey\');
    \n
    \n\' name=\'value\'>\n

    \n

    \n

    ^International(\'required label\',\'Asset_Survey\');\n
    ^International(\'required description\',\'Asset_Survey\');
    \n
    \n checked >^International(\'yes\',\'Asset_Survey\');\n checked >^International(\'no\',\'Asset_Survey\');\n

    \n

    \n

    ^International(\'randomize answers\',\'Asset_Survey\');\n
    ^International(\'randomize answers description\',\'Asset_Survey\');
    \n
    \n checked >^International(\'yes\',\'Asset_Survey\');\n checked >^International(\'no\',\'Asset_Survey\');\n

    \n

    \n

    ^International(\'vertical display\',\'Asset_Survey\');\n
    ^International(\'vertical display description\',\'Asset_Survey\');
    \n
    \n checked >^International(\'yes\',\'Asset_Survey\');\n checked >^International(\'no\',\'Asset_Survey\');\n

    \n
    \n

    \n

    ^International(\'show text in button\',\'Asset_Survey\');\n
    ^International(\'show text in button description\',\'Asset_Survey\');
    \n
    \n checked >^International(\'yes\',\'Asset_Survey\');\n checked >^International(\'no\',\'Asset_Survey\');\n

    \n

    \n

    ^International(\'allow comment\',\'Asset_Survey\');\n
    ^International(\'allow comment description\',\'Asset_Survey\');
    \n
    \n checked >^International(\'yes\',\'Asset_Survey\');\n checked >^International(\'no\',\'Asset_Survey\');\n

    \n

    \n

    ^International(\'comment cols\',\'Asset_Survey\');\n
    ^International(\'cols description\',\'Asset_Survey\');
    \n
    \n\' name=\'commentCols\'>\n

    \n

    \n

    ^International(\'comment rows\',\'Asset_Survey\');\n
    ^International(\'rows description\',\'Asset_Survey\');
    \n
    \n\' name=\'commentRows\'> \n

    \n

    \n

    ^International(\'maximum number of answers\',\'Asset_Survey\');\n
    ^International(\'maximum number of answers description\',\'Asset_Survey\');
    \n
    \n\' name=\'maxAnswers\' size=\'2\'>\n

    \n
    \n

    \n

    \n
    ^International(\'jump to\',\'Asset_Survey\');\n
    ^International(\'jump to description\',\'Asset_Survey\');
    \n
    \n
    \n\">\n
    \n
    \n
    \n

    \n

    \n

    ^International(\'jump expression\',\'Asset_Survey\');\n
    ^International(\'jump expression description\',\'Asset_Survey\');
    \n
    \n
    \n\n
    \n

    \n
    \n

    \n

    ^International(\'question text\',\'Asset_Survey\');\n
    ^International(\'question text description\',\'Asset_Survey\');
    \n
    \n

    \n
    \n\n
    \n
    \n
    \n
    ',0,NULL,NULL),('
    \n
    ^International(\'please enter answer information\',\'Asset_Survey\');
    \n
    \n
    \n \'>\n \n \n \n \n \n
    \n \n

    \n

    ^International(\'answer number\',\'Asset_Survey\');\n
    ^International(\'answer number description\',\'Asset_Survey\');
    \n
    \n \n

    \n \n

    \n

    ^International(\'recorded answer\',\'Asset_Survey\');\n
    ^International(\'recorded answer description\',\'Asset_Survey\');
    \n
    \n \' name=\'recordedAnswer\'>\n

    \n \n

    \n

    ^International(\'answer score\',\'Asset_Survey\');\n
    ^International(\'answer score description\',\'Asset_Survey\');
    \n
    \n \' name=\'value\'>\n

    \n \n

    \n

    ^International(\'verbatim label\',\'Asset_Survey\');\n
    ^International(\'verbatim description\',\'Asset_Survey\');
    \n
    \n ^International(\'checked\',\'Asset_Survey\');>^International(\'yes\',\'Asset_Survey\');\n ^International(\'checked\',\'Asset_Survey\');>^International(\'no\',\'Asset_Survey\');\n

    \n \n

    \n

    ^International(\'min label\',\'Asset_Survey\');\n
    ^International(\'min description\',\'Asset_Survey\');
    \n
    \n \' name=\'min\' size=\'2\'>\n

    \n \n

    \n

    ^International(\'max label\',\'Asset_Survey\');\n
    ^International(\'max description\',\'Asset_Survey\');
    \n
    \n \' name=\'max\' size=\'2\'>\n

    \n \n

    \n

    ^International(\'step label\',\'Asset_Survey\');\n
    ^International(\'step description\',\'Asset_Survey\');
    \n
    \n \' name=\'step\' size=\'2\'>\n

    \n\n
    \n \n \n

    \n

    ^International(\'textCols label\',\'Asset_Survey\');\n
    ^International(\'cols description\',\'Asset_Survey\');
    \n
    \n \' name=\'textCols\'>\n

    \n \n

    \n

    ^International(\'textRows label\',\'Asset_Survey\');\n
    ^International(\'rows description\',\'Asset_Survey\');
    \n
    \n \' name=\'textRows\'>\n

    \n \n

    \n

    ^International(\'is this the correct answer\',\'Asset_Survey\');\n
    ^International(\'is this the correct answer description\',\'Asset_Survey\');
    \n
    \n checked>^International(\'yes\',\'Asset_Survey\');\n checked>^International(\'no\',\'Asset_Survey\');\n

    \n \n

    \n

    \n
    ^International(\'jump to\',\'Asset_Survey\');\n
    ^International(\'jump to description\',\'Asset_Survey\');
    \n
    \n
    \n \">\n
    \n
    \n
    \n

    \n \n

    \n

    ^International(\'jump expression\',\'Asset_Survey\');\n
    ^International(\'jump expression description\',\'Asset_Survey\');
    \n
    \n
    \n \n
    \n

    \n \n
    \n \n

    \n

    ^International(\'answer text\',\'Asset_Survey\');\n
    ^International(\'answer text description\',\'Asset_Survey\');
    \n
    \n

    \n
    \n \n
    \n \n
    \n
    \n
    \n','Survey/Edit',1,1,'AjhlNO3wZvN5k4i4qioWcg',1250243000,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    ^International(\'please enter answer information\',\'Asset_Survey\');
    \n
    \n
    \n\'>\n\n\n\n\n
    \n

    \n

    ^International(\'answer number\',\'Asset_Survey\');\n
    ^International(\'answer number description\',\'Asset_Survey\');
    \n
    \n\n

    \n

    \n

    ^International(\'recorded answer\',\'Asset_Survey\');\n
    ^International(\'recorded answer description\',\'Asset_Survey\');
    \n
    \n\' name=\'recordedAnswer\'>\n

    \n

    \n

    ^International(\'answer score\',\'Asset_Survey\');\n
    ^International(\'answer score description\',\'Asset_Survey\');
    \n
    \n\' name=\'value\'>\n

    \n

    \n

    ^International(\'verbatim label\',\'Asset_Survey\');\n
    ^International(\'verbatim description\',\'Asset_Survey\');
    \n
    \n^International(\'checked\',\'Asset_Survey\');>^International(\'yes\',\'Asset_Survey\');\n^International(\'checked\',\'Asset_Survey\');>^International(\'no\',\'Asset_Survey\');\n

    \n

    \n

    ^International(\'min label\',\'Asset_Survey\');\n
    ^International(\'min description\',\'Asset_Survey\');
    \n
    \n\' name=\'min\' size=\'2\'>\n

    \n

    \n

    ^International(\'max label\',\'Asset_Survey\');\n
    ^International(\'max description\',\'Asset_Survey\');
    \n
    \n\' name=\'max\' size=\'2\'>\n

    \n

    \n

    ^International(\'step label\',\'Asset_Survey\');\n
    ^International(\'step description\',\'Asset_Survey\');
    \n
    \n\' name=\'step\' size=\'2\'>\n

    \n
    \n

    \n

    ^International(\'textCols label\',\'Asset_Survey\');\n
    ^International(\'cols description\',\'Asset_Survey\');
    \n
    \n\' name=\'textCols\'>\n

    \n

    \n

    ^International(\'textRows label\',\'Asset_Survey\');\n
    ^International(\'rows description\',\'Asset_Survey\');
    \n
    \n\' name=\'textRows\'>\n

    \n

    \n

    ^International(\'is this the correct answer\',\'Asset_Survey\');\n
    ^International(\'is this the correct answer description\',\'Asset_Survey\');
    \n
    \nchecked>^International(\'yes\',\'Asset_Survey\');\nchecked>^International(\'no\',\'Asset_Survey\');\n

    \n

    \n

    \n
    ^International(\'jump to\',\'Asset_Survey\');\n
    ^International(\'jump to description\',\'Asset_Survey\');
    \n
    \n
    \n\">\n
    \n
    \n
    \n

    \n

    \n

    ^International(\'jump expression\',\'Asset_Survey\');\n
    ^International(\'jump expression description\',\'Asset_Survey\');
    \n
    \n
    \n\n
    \n

    \n
    \n

    \n

    ^International(\'answer text\',\'Asset_Survey\');\n
    ^International(\'answer text description\',\'Asset_Survey\');
    \n
    \n

    \n
    \n\n
    \n
    \n
    \n
    ',0,NULL,NULL),('Dear ,\r\n\r\nYour responses for the Survey have expired and have been deleted. \r\n\r\nSincerely,\r\n\r\n','ExpireIncompleteSurveyResponses',1,1,'ExpireIncResptmpl00001',1250243000,'WebGUI::Asset::Template::HTMLTemplate',1,'Dear ,\nYour responses for the Survey have expired and have been deleted.\nSincerely,\n',0,NULL,NULL),('
    \r\n \r\n

    \r\n Survey Summary Total Sections: Total Questions: Total Answers: \r\n

    \r\n

    \r\n Total Correct: Total Incorrect: \r\n

    \r\n

    \r\n

    \r\n

    \r\n \r\n
    \r\n
    \r\n Section: Correct: Incorrect: \r\n chart\'>\r\n
    \r\n
    datatable\'>
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n
    \r\n
    \r\n','Survey/Summary',1,1,'7F-BuEHi7t9bPi008H8xZQ',1250243000,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n

    \nSurvey Summary Total Sections: Total Questions: Total Answers: \n

    \n

    \nTotal Correct: Total Incorrect: \n

    \n

    \n

    \n

    \n\n
    \n
    \nSection: Correct: Incorrect: \nchart\'>\n
    \n
    datatable\'>
    \n
    \n
    \n\n\n\n
    \n
    ',0,NULL,NULL),('\n\n\n

    failpass\">^International(\'test results\', \'Asset_Survey\'); - \n ^International(\'fail\', \'Asset_Survey\');^International(\'pass\', \'Asset_Survey\');

    \n

    Tests=, Passed=, Failed=,

    \n \n \n \n \n \n \n \n failpass \">\n \n \n \n \n \n \n \n \n \n
    ^International(\'test name\', \'Asset_Survey\');^International(\'tests run\', \'Asset_Survey\');^International(\'tests passed\', \'Asset_Survey\');^International(\'tests failed\', \'Asset_Survey\');^International(\'test result\', \'Asset_Survey\');
    ^International(\'fail\', \'Asset_Survey\');^International(\'pass\', \'Asset_Survey\');\">^International(\'575\', \'WebGUI\');\">^International(\'run test\', \'Asset_Survey\');
    \n\n

    ^International(\'details\', \'Asset_Survey\');

    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    all_passed
    get_status
    failed
    parse_errors
    passed
    skipped
    todo
    todo_passed
    wait
    exit
    total
    has_problems
    has_errors
    \n\n\n\n

    failpass\">^International(\'test results\', \'Asset_Survey\'); - \n ^International(\'fail\', \'Asset_Survey\');^International(\'pass\', \'Asset_Survey\');

    \n \n \n \n passfail \">\n \n \n
    \n
    \n \n

    ^International(\'details\', \'Asset_Survey\');

    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    passed
    failed
    actual_passed
    actual_failed
    todo
    todo_passed
    skipped
    plan
    tests_planned
    tests_run
    skip_all
    has_problems
    exit
    wait
    \n\n
    ','Survey/TestResults',1,1,'S3zpVitAmhy58CAioH359Q',1250243000,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    failpass\">^International(\'test results\', \'Asset_Survey\'); -\n^International(\'fail\', \'Asset_Survey\');^International(\'pass\', \'Asset_Survey\');

    \n

    Tests=, Passed=, Failed=,

    \n\n\n\n\n\n\n\nfailpass \">\n\n\n\n\n\n\n\n\n\n
    ^International(\'test name\', \'Asset_Survey\');^International(\'tests run\', \'Asset_Survey\');^International(\'tests passed\', \'Asset_Survey\');^International(\'tests failed\', \'Asset_Survey\');^International(\'test result\', \'Asset_Survey\');
    ^International(\'fail\', \'Asset_Survey\');^International(\'pass\', \'Asset_Survey\');\">^International(\'575\', \'WebGUI\');\">^International(\'run test\', \'Asset_Survey\');
    \n

    ^International(\'details\', \'Asset_Survey\');

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    all_passed
    get_status
    failed
    parse_errors
    passed
    skipped
    todo
    todo_passed
    wait
    exit
    total
    has_problems
    has_errors
    \n\n

    failpass\">^International(\'test results\', \'Asset_Survey\'); -\n^International(\'fail\', \'Asset_Survey\');^International(\'pass\', \'Asset_Survey\');

    \n\n\npassfail \">\n\n\n
    \n
    \n

    ^International(\'details\', \'Asset_Survey\');

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    passed
    failed
    actual_passed
    actual_failed
    todo
    todo_passed
    skipped
    plan
    tests_planned
    tests_run
    skip_all
    has_problems
    exit
    wait
    \n
    ',0,NULL,NULL),('
    \n\n \n ^International(\'response complete\', \'Asset_Survey\'); on \n \n\n \n ^International(\'response restart\', \'Asset_Survey\'); on \n \n\n \n ^International(\'response timeout\', \'Asset_Survey\'); on \n \n\n \n ^International(\'response timeout restart\', \'Asset_Survey\'); on \n \n\n
    \n\n','Survey/Feedback',1,1,'nWNVoMLrMo059mDRmfOp9g',1250243000,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n^International(\'response complete\', \'Asset_Survey\'); on \n\n\n^International(\'response restart\', \'Asset_Survey\'); on \n\n\n^International(\'response timeout\', \'Asset_Survey\'); on \n\n\n^International(\'response timeout restart\', \'Asset_Survey\'); on \n\n
    ',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n\n \n\n\n

    \n \n \">\n |\n \n \n \">^International(my subscriptions,Asset_Newsletter);\n |\n \n \">\n

    \n\n

    \n\n\n

    \">
    \n

    \n
    \n\n\n
    \n \n
    \n
    \n','Collaboration',1,1,'newslettercs0000000001',1252682678,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n\n\n

    \n\n\">\n|\n\n\n\">^International(my subscriptions,Asset_Newsletter);\n|\n\n\">\n

    \n

    \n\n

    \">
    \n

    \n
    \n\n
    \n\n
    \n
    ',0,NULL,NULL),('
    \n
    \n\n

    \n
    \n ^International(member since,Account_Inbox); ^D(%z,);\n

    \n \n

    \n \n \n \" class=\"prevNext\">\"Previous\" \n \"> \n  \" class=\"prevNext\">\"Next\"\n \n \n \n

    \n \n \n \n \n \n \n \n \n \n \n \n \n WGoddThreadWGevenThread\">\n \n \n \n \n \n \n \n \n \n \n \n
    \">^International(title label,Account_Contributions);\">^International(type label,Account_Contributions);\">^International(date label,Account_Contributions);
    \">^D(,);
    ^International(no contributions,Account_Contributions);
    \n \n

    \n \n \n \" class=\"prevNext\">\"Previous\" \n \"> \n  \" class=\"prevNext\">\"Next\"\n \n \n \n

    \n \n \n

    ^International(contribution count,\'Account_Contributions\');

    \n
    \n
    ','Account/Contrib/View',1,1,'1IzRpX0tgW7iuCfaU2Kk0A',1250243000,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    \n

    \n
    \n^International(member since,Account_Inbox); ^D(%z,);\n

    \n

    \n\n\n\" class=\"prevNext\">\"Previous\" \n\"> \n \" class=\"prevNext\">\"Next\"\n\n\n\n

    \n\n\n\n\n\n\n\n\n\n\n\nWGoddThreadWGevenThread\">\n\n\n\n\n\n\n\n\n\n\n\n
    \">^International(title label,Account_Contributions);\">^International(type label,Account_Contributions);\">^International(date label,Account_Contributions);
    \">^D(,);
    ^International(no contributions,Account_Contributions);
    \n

    \n\n\n\" class=\"prevNext\">\"Previous\" \n\"> \n \" class=\"prevNext\">\"Next\"\n\n\n\n

    \n

    ^International(contribution count,\'Account_Contributions\');

    \n
    \n
    ',0,NULL,NULL),('','StoryArchive/KeywordList',1,1,'0EAJ9EYb9ap2XwfrcXfdLQ',1250243000,'WebGUI::Asset::Template::HTMLTemplate',1,'',0,NULL,NULL),('\r\n\r\n\r\n\r\n\r\n

    \r\n
    \r\n\r\n\r\n\r\n\r\n
    \r\n\">^International(continue shopping button,Shop);
    \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
    (add $)
    Hide?
    \r\n\r\n\r\n\r\n
    \r\n','ThingyRecord/View',1,1,'TKmhv8boP3TD2xwSwUBq0g',1250243000,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n

    \n
    \n\n\n
    \n\">^International(continue shopping button,Shop);
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    (add $)
    Hide?
    \n\n\n
    ',0,NULL,NULL),('\n
    \">\n
    \n\n
    \n
    \n
    \n ^International(member since,Account_Inbox); ^D(%z,);\n
    \n\n \n

    \n
    \n \n \n \n \n \n \n
    *
    \n \n \n
    \n\n
    \n
    \n
    ','Account/Profile/Edit',1,1,'75CmQgpcCSkdsL-oawdn3Q',1253555614,'WebGUI::Asset::Template::HTMLTemplate',1,'\n
    \">\n
    \n
    \n
    \n
    \n^International(member since,Account_Inbox); ^D(%z,);\n
    \n\n

    \n
    \n\n\n\n\n\n\n
    *
    \n
    \n
    \n
    \n
    ',0,NULL,NULL),('
    \n

    \n\n \n\n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n\n
    \n
    \n\n >\n >\n\n
    ','Survey/Take',1,1,'d8jMMMRddSQ7twP4l1ZSIw',1253555614,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n
    \n>\n>\n
    ',0,NULL,NULL),('\" id=\"id\">\n

    \n
    \n

    \n\n\n\n\n\">\n\n>\n\n

    \n


    \n\n

    \n

    \n

    ^International(last updated,Asset); ^International(ago,Asset_Story);

    \n

    ^International(by,Asset_Collaboration);

    \n


    \n\n \n \n \n
    \n \">\" alt=\"\" title=\"\" />

    \n ^International(Source,Asset_Story);: \n \n \n

      \n \n
    1. style=\"width:px;\">\n
      \n \">\" alt=\"\" title=\"\" />
      \n ^International(Source,Asset_Story);: \n
    2. \n
      \n
    \n \n \n \n\n

    \n

    ^International(keywords,Asset); \">

    \n
    ','Story',1,1,'3QpYtHrq_jmAk1FNutQM5A',1253636379,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n

    \n
    \n

    \n\n\n\n\n\">\n\n>\n\n

    \n


    \n\n

    \n

    \n

    ^International(last updated,Asset); ^International(ago,Asset_Story);

    \n

    ^International(by,Asset_Collaboration);

    \n


    \n\n\n\n\n
    \n\">\" alt=\"\" title=\"\" />

    \n^International(Source,Asset_Story);: \n\n\n

      \n\n
    1. style=\"width:px;\">\n
      \n\">\" alt=\"\" title=\"\" />
      \n^International(Source,Asset_Story);: \n
    2. \n
      \n
    \n\n\n\n\n

    \n

    ^International(keywords,Asset); \">

    \n
    ',0,NULL,NULL),('
    \" class=\"storyArchive\">\n\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n\n
    \n
    \n\n\n\n
      \n

      ^D(%c %D %y,);

      \n \n
    • \"> ^D(%Z,);
    • \n
      \n
    \n\n\n
      \n
    • \n\n class=\"active\">\n \">\n \n\n
    • \n
    \n
    \n\n\n
    ','StoryArchive',1,1,'yxD5ka7XHebPLD-LXBwJqw',1253635396,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"storyArchive\">\n\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n
    \n
    \n\n
      \n

      ^D(%c %D %y,);

      \n\n
    • \"> ^D(%Z,);
    • \n
      \n
    \n\n
      \n
    • \n\n class=\"active\">\n\">\n\n\n
    • \n
    \n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"viewStoryTopic\">\n\" id=\"id\">\n

    \n

    \n\n\n\n\n\">\n\n>\n\n

    \n

    \n

    \n

    ^International(last updated,Asset); ^International(ago,Asset_Story);

    \n
    \n
    \n\n \n \n \n
    \n \">\" alt=\"\" title=\"\" />

    \n ^International(Source,Asset_Story);: \n \n \n
      \n \n
    1. style=\"width:px;\">\n
      \n \">\" alt=\"\" title=\"\" />
      \n ^International(Source,Asset_Story);: \n
    2. \n
      \n
    \n \n
    \n \n\n
    \n

    ^International(by,Asset_Collaboration);

    \n \n \n
    \n

    ^International(keywords,Asset); \">

    \n
    \n','Story',1,1,'TbDcVLbbznPi0I0rxQf2CQ',1253636379,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"viewStoryTopic\">\n\" id=\"id\">\n

    \n

    \n\n\n\n\n\">\n\n>\n\n

    \n

    \n

    \n

    ^International(last updated,Asset); ^International(ago,Asset_Story);

    \n
    \n
    \n\n\n\n\n
    \n\">\" alt=\"\" title=\"\" />

    \n^International(Source,Asset_Story);: \n\n\n
      \n\n
    1. style=\"width:px;\">\n
      \n\">\" alt=\"\" title=\"\" />
      \n^International(Source,Asset_Story);: \n
    2. \n
      \n
    \n\n
    \n\n\n
    \n

    ^International(by,Asset_Collaboration);

    \n\n\n
    \n

    ^International(keywords,Asset); \">

    \n
    ',0,NULL,NULL),('\n\n\n
    \n\" class=\"WGprofile_displayView\">^International(\'back to profile label\',\'Account_Profile\');\n
    \n
    \n
    \n \n
    \n \n \n
    \n
    \n \n
    * -  ^International(\'required field\',Account_Profile);
    † - ^International(\'set by admin\',Account_Profile);
    \n
    \n
    \n
    \n
    \n
    \n','Account/Layout',1,1,'FJbUTvZ2nUTn65LpW6gjsA',1256092369,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n
    \n\" class=\"WGprofile_displayView\">^International(\'back to profile label\',\'Account_Profile\');\n
    \n
    \n
    \n\n
    \n\n\n
    \n
    \n\n
    * -  ^International(\'required field\',Account_Profile);
    † - ^International(\'set by admin\',Account_Profile);
    \n
    \n
    \n
    \n
    \n
    \n',0,NULL,NULL),('\n\n\n\n','EMS/LookupRegistrant',1,1,'OOyMH33plAy6oCj_QWrxtg',1257311886,'WebGUI::Asset::Template::HTMLTemplate',1,'\n',0,NULL,NULL),('\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','EMS/PrintBadge',1,1,'PsFn7dJt4wMwBa8hiE3hOA',1257311886,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n\n
    \n
    \n\n
    \n
    \n\n\n, \n
    \n
    \n\n
    \n
    \n\n',0,NULL,NULL),('\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','EMS/PrintTicket',1,1,'yBwydfooiLvhEFawJb0VTQ',1257311887,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n\n
    \n
    \n: \n
    \n
    \n\n / \n
    \n
    \n: \n
    \n
    \n\n',0,NULL,NULL),('\n

    \n
    \n\n

    \n
    \n\n

    \n
    \n\n\n
    \n
    \n
    \n
    \n
    \n
    \n\n\">^International(schedule back link,Asset_EventManagementSystem);\n\n\n','EMS/Schedule',1,1,'S2_LsvVa95OSqc66ITAoig',1257311887,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n

    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n\">^International(schedule back link,Asset_EventManagementSystem);\n',0,NULL,NULL),('\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','EMS/PrintRemainingTickets',1,1,'hreA_bgxiTX-EzWCSZCZJw',1257311887,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n\n
    \n\n
    \n
    \n: \n
    \n
    \n\n / \n
    \n
    \n
    \n
    \n\n',0,NULL,NULL),('\" id=\"id\">\n\n

    \n
    \n\n\n

    \n
    \n\n\n
      \n\n
    • \n\n
    \n
    \n\n\n
    \n \n
    \n
    \n\n\n
    \n \">\n • \">\n \n • \">\n \n \n • \">\n • \">\n \n
    \n
    \n\n\n\n\n \n \n \n\n\n \n \n \n \n\n\n
    \n \n \n *\n \n \n \n \n \n \n
    \n
    ^International(template captcha label,Asset_DataForm);
    \n\n\n','DataForm',1,1,'PBtmpl0000000000000020',1257311887,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n
      \n\n
    • \n\n
    \n
    \n\n
    \n\n
    \n
    \n\n
    \n\">\n• \">\n\n• \">\n\n\n• \">\n• \">\n\n
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\n*\n\n\n\n\n\n\n
    \n
    ^International(template captcha label,Asset_DataForm);
    \n',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n\n
    \n \n
    \n\n\n\n\n \n \n\n\n
    \n

    \n\" class=\"backLabel\">\n\n\n','DataForm',1,1,'PBtmpl0000000000000104',1257311888,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n\n
    \n\n
    \n\n\n\n\n\n\n\n
    \n

    \n\" class=\"backLabel\">',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n\n\n\n

    \n
    \n\n\n
      \n \n
    • \n
      \n
    \n
    \n\n\n
    \n \n
    \n
    \n\n\n
    \n \">\n • \">\n \n • \">\n \n \n • \">\n • \">\n \n
    \n
    \n\n\n
    \n \n )\" id=\"tab\" class=\"tab\">\n \n \n \n \n \n \n \n
    \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n \n \n \n \n \n *\n \n \n \n \n \n \n \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n^International(template captcha label,Asset_DataForm);
    \n\n\n\n','DataForm',1,1,'PBtmpl0000000000000116',1257311888,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n
      \n\n
    • \n
      \n
    \n
    \n\n
    \n\n
    \n
    \n\n
    \n\">\n• \">\n\n• \">\n\n\n• \">\n• \">\n\n
    \n
    \n\n
    \n\n)\" id=\"tab\" class=\"tab\">\n\n\n\n\n\n\n\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\n\n\n\n\n*\n\n\n\n\n\n\n\n
    \n\n
    \n
    \n\n
    \n
    \n\n
    \n^International(template captcha label,Asset_DataForm);
    \n\n\n',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n\n
      \n \n
    • \n
      \n
    \n
    \n\n\n \n

    \n\n\n\n

    \n \">\n • \">\n \n • \" onclick=\"\">\n \n \n • \" onclick=\"\">\n \n \n • \">\n • \">\n \n
    \n
    \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n \n \n \n \n \n *\n \n \n \n \n \n \n \n
    \n \n
    \n
    ^International(template captcha label,Asset_DataForm);
    \n
    \n\n\n\n','DataForm',1,1,'PBtmpl0000000000000141',1257311888,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n
      \n\n
    • \n
      \n
    \n
    \n\n\n

    \n\n\n

    \n\">\n• \">\n\n• \" onclick=\"\">\n\n\n• \" onclick=\"\">\n\n\n• \">\n• \">\n\n
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\n\n\n\n\n*\n\n\n\n\n\n\n\n
    \n\n
    \n
    ^International(template captcha label,Asset_DataForm);
    \n
    \n\n',0,NULL,NULL),('\r\n \">\r\n\r\n\">\r\n','Macro/PickLanguage',1,1,'_aE16Rr1-bXBf8SIaLZjCg',1257311888,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\">\n\n\">',0,NULL,NULL),('\r\n\r\n\r\n \r\n ^Page(\"title\"); - WebGUI\r\n \r\n \r\n\r\n\r\n\r\n\r\n\r\n\r\n ^AdminBar;\r\n
    \r\n\r\n ^AssetProxy(flexmenu);\r\n\r\n
    \r\n \r\n\r\n
      \r\n
    • ^H;
    • \r\n
    • ^a(^@;);
    • \r\n
    • ^LoginToggle;
    • \r\n ^GroupText(Turn Admin On,
    • ^AdminToggle;
    • );\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','style',0,1,'PBtmpl0000000000000060',1258524916,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n^Page(\"title\"); - WebGUI\n\n\n\n\n\n\n\n\n^AdminBar;\n
    \n^AssetProxy(flexmenu);\n
    \n\n
      \n
    • ^H;
    • \n
    • ^a(^@;);
    • \n
    • ^LoginToggle;
    • \n^GroupText(Turn Admin On,
    • ^AdminToggle;
    • );\n
    \n\n
    \n\n
    \n\n\n\n\n\n',0,NULL,NULL),('\r\n\r\n\r\n WebGUI <tmpl_var session.webgui.version>-<tmpl_var session.webgui.status> ^International(admin console,AdminConsole);\r\n \r\n \r\n \r\n\r\n\r\n \r\n\r\n','style',1,0,'PBtmpl0000000000000137',1258524916,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\nWebGUI <tmpl_var session.webgui.version>-<tmpl_var session.webgui.status> ^International(admin console,AdminConsole);\n\n\n\n\n\n\n\n',0,NULL,NULL),('','style',0,0,'PBtmpl0000000000000132',1258524916,'WebGUI::Asset::Template::HTMLTemplate',1,'',0,NULL,NULL),('\r\n\r\n\r\n \r\n ^Page(title); - ^c();\r\n \r\n \r\n \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n ^AdminBar();\r\n\r\n \r\n\r\n ^AdminToggle();\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n','style',1,1,'PBtmplBlankStyle000001',1258524916,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n^Page(title); - ^c();\n\n\n\n\n\n\n\n\n\n^AdminBar();\n\n^AdminToggle();\n\n\n\n\n\n',0,NULL,NULL),('
    \" class=\"nav dropMenu\">\n\n\" id=\"id\">\n\n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n
    \n\n

    \n\n

    \n
    \n\n\n\n\n
    \n','Navigation',1,1,'PBtmpl0000000000000117',1259133274,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"nav dropMenu\">\n\" id=\"id\">\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n
    \n\n

    \n\n

    \n
    \n\n\n
    ',0,NULL,NULL),('
    \" class=\"nav synopsisMenu\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n\n
    \n \n
    current\">\">
    \n
    \">
    \n
    \n
    \n
    \n\n\n
    \n','Navigation',1,1,'PBtmpl0000000000000136',1259133274,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"nav synopsisMenu\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n
    \n\n
    current\">\">
    \n
    \">
    \n
    \n
    \n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"nav crumbTrail\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n\n \n \n \"> >\n \n \n\n\n\n
    \n','Navigation',1,1,'PBtmpl0000000000000093',1259133274,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"nav crumbTrail\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n\n\n\"> >\n\n\n\n\n
    ',0,NULL,NULL),('
    \" class=\"syndicated articles\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n\n

    \">

    \n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n\n \n\n\n\n
    \n','SyndicatedContent',1,1,'GNvjCFQWjY2AF2uf0aCM8Q',1259133274,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"syndicated articles\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n

    \">

    \n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n\n\n\n
    ',0,NULL,NULL),('
    \" class=\"layout oneovertwo\">\n \n \" id=\"id\">\n\n \n \n \n\n \n

    \n \n

    \n
    \n\n \n
    \n \n \n
    \n
    \n \n \n
    \n \n \n \n \n \n\n \n \n \">\n \n \n \n \n\n \n \n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n \n\n \n \n \n \n
    \n
    \n
    \n\n \n
    \n\n \n
    \n \n \n \n \n \n\n \n \n \">\n \n \n \n \n\n \n \n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n \n\n \n \n \n \n
    \n
    \n
    \n\n \n
    \n\n \n
    \n \n \n \n \n \n\n \n \n \">\n \n \n \n \n\n \n \n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n \n\n \n \n\n \n
    \n
    \n
    \n\n \n
    \n\n
    \n\n \n \n \n \n \n
    \n
     
    \n
    \n \n
    \n\n\n
    \n','Layout',1,1,'-PkdI8l1idu-8gDX3iOdcw',1259133274,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"layout oneovertwo\">\n\" id=\"id\">\n\n\n\n\n

    \n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n
    \n\n\n\n\n\n\n\">\n\n\n\n\n\n\n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n\n\n\n\n
    \n
    \n
    \n\n
    \n\n
    \n\n\n\n\n\n\n\">\n\n\n\n\n\n\n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n\n\n\n\n
    \n
    \n
    \n\n
    \n\n
    \n\n\n\n\n\n\n\">\n\n\n\n\n\n\n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n\n\n\n\n
    \n
    \n
    \n\n
    \n
    \n\n\n\n\n\n
    \n
     
    \n
    \n\n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"article withImage\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n
    \n\n\n
    \n \" alt=\"\" />\n \n
    \n
    \n\n\n
    \n \n \n
    \n
    \n\n\n \n
    \n

    \">

    \n \n
    \n
    \n
    \n\n\n
    \n\n
    \n\n\n
    \n','Article',1,1,'PBtmpl0000000000000103',1259133275,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"article withImage\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n
    \n\n
    \n\" alt=\"\" />\n\n
    \n
    \n\n
    \n\n\n
    \n
    \n\n\n
    \n

    \">

    \n\n
    \n
    \n
    \n\n
    \n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"file\">\n\" id=\"id\">\n\n\n \n\n\n\" alt=\"\" class=\"wg-icon\" />\n\">\n\n\n
    \n','FileAsset',1,1,'PBtmpl0000000000000024',1259133275,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"file\">\n\" id=\"id\">\n\n\n\n\" alt=\"\" class=\"wg-icon\" />\n\">\n\n
    ',0,NULL,NULL),('
    \" class=\"article withPagination\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n
    \n\n\n
    \n \n \n
    \n
    \n\n\n \n \n
    \n

    \">

    \n \n
    \n
    \n
    \n
    \n\n\n
    \n\n\n \n
    \n
      \n \n
    • \n \" alt=\"\" class=\"wg-icon\" />\n \">\n
    • \n
      \n
    \n \n
    \n
    \n
    \n\n
    \n\n\n
      \n
    • \n \n class=\"active\">\n \">\n \n \n
    • \n
    \n
    \n\n\n
    \n','Article',1,1,'XdlKhCDvArs40uqBhvzR3w',1259133275,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"article withPagination\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n
    \n\n
    \n\n\n
    \n
    \n\n\n\n
    \n

    \">

    \n\n
    \n
    \n
    \n
    \n\n
    \n\n\n
    \n
      \n\n
    • \n\" alt=\"\" class=\"wg-icon\" />\n\">\n
    • \n
      \n
    \n\n
    \n
    \n
    \n
    \n\n
      \n
    • \n\n class=\"active\">\n\">\n\n\n
    • \n
    \n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"navigation indentMenu\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n \n\n \n \"\n class=\"level current ancestor\"\n onclick=\"window.open(this.href);return false;\">\n \n\n\n\n
    \n','Navigation',1,1,'PBnav00000000indentnav',1259133275,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"navigation indentMenu\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n\n\"\nclass=\"level current ancestor\"\nonclick=\"window.open(this.href);return false;\">\n\n\n\n
    ',0,NULL,NULL),('
    \" class=\"nav tabsMenu\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n\n
      \n \n class=\"current\" class=\"ancestor\">\n \">\n \n \n
    \n
    \n\n\n
    \n','Navigation',1,1,'PBtmpl0000000000000124',1259133275,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"nav tabsMenu\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n
      \n\n class=\"current\" class=\"ancestor\">\n\">\n\n\n
    \n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"layout rightcolumn\">\n\n \" id=\"id\">\n\n \n \n \n\n \n

    \n \n

    \n
    \n\n \n
    \n \n \n
    \n
    \n \n \n
    \n \n \n \n \n \n\n \n \n \">\n \n \n \n \n\n \n \n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n \n\n \n \n\n \n
    \n
    \n
    \n\n \n
    \n\n \n
    \n \n \n \n \n \n\n \n \n \">\n \n \n \n \n\n \n \n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n \n\n \n \n\n \n
    \n
    \n
    \n\n \n
    \n\n
    \n \n \n \n \n \n \n
    \n
     
    \n
    \n \n
    \n\n\n
    \n','Layout',1,1,'PBtmpl0000000000000131',1259133275,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"layout rightcolumn\">\n\" id=\"id\">\n\n\n\n\n

    \n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n
    \n\n\n\n\n\n\n\">\n\n\n\n\n\n\n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n\n\n\n\n
    \n
    \n
    \n\n
    \n\n
    \n\n\n\n\n\n\n\">\n\n\n\n\n\n\n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n\n\n\n\n
    \n
    \n
    \n\n
    \n
    \n\n\n\n\n\n
    \n
     
    \n
    \n\n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"nav topNav\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n
    \n\n \n
    \n
    \n
      \n \n \n
    \n
    \n
    \n \n
    \n
  • onclick=\"window.open(this.href); return false;\" href=\"\">\n \n
    \n
    \n
      \n \n \n \n \n \n \n
    \n \n
  • \n \n
    \n\n\n\n\n','Navigation',1,1,'PBtmpl0000000000000134',1259133275,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"nav topNav\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n
    \n\n\n
    \n
    \n
      \n\n\n
    \n
    \n
    \n\n
    \n
  • onclick=\"window.open(this.href); return false;\" href=\"\">\n\n
    \n
    \n
      \n\n\n\n\n\n\n
    \n\n
  • \n\n
    \n\n\n',0,NULL,NULL),('
    \" class=\"folder\">\n\n\" id=\"id\">\n\n\n \n\n \n\n

    \n
    \n \n\n
    \n \n\n
    \n
    \n \n\n

    \">

    \n
    \n\n \n\n \n\n \n \n\n\n\n\n \n\n\n \n \n \n \n\n\n\n
    \n \n \" class=\"wg-icon\" alt=\"\" />\n \">\n \n \" class=\"wg-icon\" alt=\"\" />\n \n \n \n \n
    \n \n \n \n \n \n \n \" class=\"wg-icon\" alt=\"\" />\n \">\n \n \" class=\"wg-icon\" alt=\"\" />\n \n \n \n \n \n ^D(\"%z %Z\",);\n \n \n
    \n\n\n
    \n','Folder',1,1,'PBtmpl0000000000000078',1259133275,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"folder\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n

    \">

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\" class=\"wg-icon\" alt=\"\" />\n\">\n\n\" class=\"wg-icon\" alt=\"\" />\n\n\n\n\n
    \n\n\n\n\n\n\n\" class=\"wg-icon\" alt=\"\" />\n\">\n\n\" class=\"wg-icon\" alt=\"\" />\n\n\n\n\n\n^D(\"%z %Z\",);\n\n\n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"poll\">\n\n\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n
    \n

    \n\n\n \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n \n\n \n \" alt=\"graph\" />\n \n \n
    \n \n \n \n \n \n
    \" class=\"pollColor\">^Spacer(1,1); % ()
    \n
    \n

    :

    \n
    \n
    \n
    \n\n\n
    \n','Poll',1,1,'PBtmpl0000000000000055',1259133275,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"poll\">\n\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n
    \n\n\n
    \n
    \n
    \n

    \n\n\n
    \n\n
    \n
    \n
    \n
    \n\n
    \n\n\n\n\" alt=\"graph\" />\n\n\n
    \n\n\n\n\n\n
    \" class=\"pollColor\">^Spacer(1,1); % ()
    \n
    \n

    :

    \n
    \n
    \n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"syndicated default\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n\n

    \">

    \n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n\n
      \n \n
    • \n \">\n - \n
    • \n
      \n
    \n
    \n\n\n
    \n','SyndicatedContent',1,1,'PBtmpl0000000000000065',1259133275,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"syndicated default\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n

    \">

    \n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n
      \n\n
    • \n\">\n- \n
    • \n
      \n
    \n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"layout default\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n\n
    \n\n \n \n \n \n \n \n \n \">\n \n \n \n \n \n \n \n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n \n \n \n \n \n \n
    \n
    \n
    \n\n \n
    \n\n
    \n\n\n \n \n \n \n
    \n
     
    \n
    \n\n
    \n\n\n
    \n','Layout',1,1,'PBtmpl0000000000000054',1259133276,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"layout default\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n
    \n\n\n\n\n\n\n\">\n\n\n\n\n\n\n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n\n\n\n\n
    \n
    \n
    \n\n
    \n
    \n\n\n\n\n\n
    \n
     
    \n
    \n\n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"nav horizontalMenu\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n\n \n\n\n\n
    \n','Navigation',1,1,'PBtmpl0000000000000108',1259133276,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"nav horizontalMenu\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n\n\n\n
    ',0,NULL,NULL),('
    \" class=\"article linkedImage\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n
    \n\n\n
    \n \n \">\" alt=\"\" />\n \n \" class=\"caption\">\n \n \n \" alt=\"\" />\n \n
    \n \n
    \n\n\n
    \n \n
    \n \n
    \n\n
    \n\n\n
    \n\n\n
    \n','Article',1,1,'PBtmpl0000000000000115',1259133276,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"article linkedImage\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n
    \n\n
    \n\n\">\" alt=\"\" />\n\n\" class=\"caption\">\n\n\n\" alt=\"\" />\n\n
    \n\n
    \n\n
    \n\n
    \n\n
    \n
    \n\n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"layout oneoverthree\">\n \n \" id=\"id\">\n\n \n \n \n\n \n

    \n \n

    \n
    \n\n \n
    \n \n \n
    \n
    \n \n \n
    \n \n \n \n \n \n\n \n \n \">\n \n \n \n \n\n \n \n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n \n\n \n \n \n \n
    \n
    \n
    \n\n \n
    \n\n
    \n\n \n
    \n \n \n \n \n \n\n \n \n \">\n \n \n \n \n\n \n \n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n \n\n \n \n \n \n
    \n
    \n
    \n\n \n
    \n\n \n
    \n \n \n \n \n \n\n \n \n \">\n \n \n \n \n\n \n \n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n \n\n \n \n\n \n
    \n
    \n
    \n\n \n
    \n\n \n
    \n \n \n \n \n \n\n \n \n \">\n \n \n \n \n\n \n \n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n \n\n \n \n \n \n
    \n
    \n
    \n\n \n
    \n\n
    \n\n \n \n \n \n \n
    \n
     
    \n
    \n \n
    \n\n\n
    \n','Layout',1,1,'PBtmpl0000000000000109',1259133276,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"layout oneoverthree\">\n\" id=\"id\">\n\n\n\n\n

    \n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n
    \n\n\n\n\n\n\n\">\n\n\n\n\n\n\n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n\n\n\n\n
    \n
    \n
    \n\n
    \n
    \n\n
    \n\n\n\n\n\n\n\">\n\n\n\n\n\n\n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n\n\n\n\n
    \n
    \n
    \n\n
    \n\n
    \n\n\n\n\n\n\n\">\n\n\n\n\n\n\n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n\n\n\n\n
    \n
    \n
    \n\n
    \n\n
    \n\n\n\n\n\n\n\">\n\n\n\n\n\n\n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n\n\n\n\n
    \n
    \n
    \n\n
    \n
    \n\n\n\n\n\n
    \n
     
    \n
    \n\n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"layout threeColumns\">\n\n \" id=\"id\">\n\n \n \n \n\n \n

    \n
    \n\n \n
    \n \n \n
    \n
    \n\n \n
    \n\n \n \n \n \n\n \n \n \">\n \n \n\n \n \n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n \n\n \n \n\n \n
    \n
    \n
    \n\n \n
    \n\n \n
    \n\n \n \n \n \n\n \n \n \">\n \n \n\n \n \n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n \n\n \n \n\n \n
    \n
    \n
    \n\n \n
    \n\n \n
    \n\n \n \n \n \n\n \n \n \">\n \n \n\n \n \n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n \n\n \n \n\n \n
    \n
    \n
    \n\n \n
    \n\n
    \n\n \n \n \n \n \n
     
    \n \n
    \n\n\n
    \n\n','Layout',1,1,'VCFhB9WOsDsH2Apj3c6DpQ',1259133276,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"layout threeColumns\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n
    \n\n\n\n\n\n\n\">\n\n\n\n\n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n\n\n\n\n
    \n
    \n
    \n\n
    \n\n
    \n\n\n\n\n\n\n\">\n\n\n\n\n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n\n\n\n\n
    \n
    \n
    \n\n
    \n\n
    \n\n\n\n\n\n\n\">\n\n\n\n\n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n\n\n\n\n
    \n
    \n
    \n\n
    \n
    \n\n\n\n\n\n
     
    \n\n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"article default\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n
    \n\n\n
    \n \n \n
    \n
    \n\n\n \n
    \n

    \">

    \n \n
    \n
    \n
    \n\n\n
    \n\n\n
    \n
      \n \n
    • \n \" alt=\"\" class=\"wg-icon\" />\n \">\n
    • \n
      \n
    \n \n
    \n
    \n\n
    \n\n\n
    \n','Article',1,1,'PBtmpl0000000000000002',1259133276,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"article default\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n
    \n\n
    \n\n\n
    \n
    \n\n\n
    \n

    \">

    \n\n
    \n
    \n
    \n\n
    \n\n
    \n
      \n\n
    • \n\" alt=\"\" class=\"wg-icon\" />\n\">\n
    • \n
      \n
    \n\n
    \n
    \n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"article item\">\n\n \" id=\"id\">\n\n \n \n \n \n

    \n \n \n \">\n \n \n \n \n \n \n

    \n \n \n
    \n \n
    \n \n
    \n \n \n
    \n
      \n \n
    • \n \" alt=\"\" class=\"wg-icon\" />\n \">\n
    • \n
      \n
    \n \n
    \n
    \n\n
    \n\n\n
    \n','Article',1,1,'PBtmpl0000000000000123',1259133276,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"article item\">\n\" id=\"id\">\n\n\n\n

    \n\n\n\">\n\n\n\n\n\n\n

    \n\n
    \n\n
    \n\n
    \n\n
    \n
      \n\n
    • \n\" alt=\"\" class=\"wg-icon\" />\n\">\n
    • \n
      \n
    \n\n
    \n
    \n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"layout sidebyside\">\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n\n
    \n\n \n \n \n \n \n \n \n \">\n \n \n \n \n \n \n \n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n \n \n \n \n \n \n
    \n
    \n
    \n\n \n
    \n\n\n
    \n\n \n \n \n \n \n \n \n \">\n \n \n \n \n \n \n \n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n \n \n \n \n \n \n
    \n
    \n
    \n\n \n
    \n\n
    \n\n\n \n \n \n \n
    \n
     
    \n
    \n\n
    \n\n\n
    \n','Layout',1,1,'PBtmpl0000000000000135',1259133276,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"layout sidebyside\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n
    \n\n\n\n\n\n\n\">\n\n\n\n\n\n\n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n\n\n\n\n
    \n
    \n
    \n\n
    \n\n
    \n\n\n\n\n\n\n\">\n\n\n\n\n\n\n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n\n\n\n\n
    \n
    \n
    \n\n
    \n
    \n\n\n\n\n\n
    \n
     
    \n
    \n\n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"nav bulletedList\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n\n
      \n\n\n\n
    \n \n\n\n class=\"current\" class=\"ancestor\"
    >\n onclick=\"window.open(this.href);return false;\" href=\"\">\n\n\n
      \">\n\n \n\n\n\n \n
    \n \n \n
    \n\n\n\n\n\n\n
    \n','Navigation',1,1,'PBnav00000000000bullet',1259133276,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"nav bulletedList\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n
      \n\n\n
    \n\n\n class=\"current\" class=\"ancestor\"
    >\nonclick=\"window.open(this.href);return false;\" href=\"\">\n\n
      \">\n\n\n\n\n\n
    \n\n\n
    \n\n\n\n\n
    ',0,NULL,NULL),('
    \" class=\"file swfobject\">\n\" id=\"id\">\n\n\n \n\n\n
    \n\n \" />\n \n \" width=\"400\" height=\"300\">\n \n \n \"Get\n \n \n \n \n\n
    \n\n\n
    \n','FileAsset',1,1,'MK4fCNoyrx5SE8eyDfOpxg',1259133276,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"file swfobject\">\n\" id=\"id\">\n\n\n\n
    \n\n\" />\n\n\" width=\"400\" height=\"300\">\n\n\n\"Get\n\n\n\n\n\n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"nav treeNav\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n\n
    \">\n
      \n\n\n \n
    \n \n \n\n class=\"expanded\" class=\"expanded\">\n \">\n\n \n
      \">\n \n \n \n\n \n \n
    \n \n \n
    \n\n\n\n
    \n\n\n\n
    \n\n\n
    \n\n','Navigation',1,1,'PBtmpl0000000000000130',1259133276,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"nav treeNav\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n
    \">\n
      \n\n\n
    \n\n\n class=\"expanded\" class=\"expanded\">\n\">\n\n
      \">\n\n\n\n\n\n
    \n\n\n
    \n\n\n
    \n\n
    \n\n
    ',0,NULL,NULL),('
    \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 \">^International(add a ticket,Asset_EventManagementSystem);\r\n •\r\n \">^International(meta fields,Asset_EventManagementSystem);\r\n •\r\n \">^International(import,Asset_EventManagementSystem);\r\n •\r\n \">^International(export,Asset_EventManagementSystem);\r\n •\r\n \">^International(print remaining tickets,Asset_EventManagementSystem);\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

    \">^International(add a ribbon,Asset_EventManagementSystem);

    \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

    \">^International(add a token,Asset_EventManagementSystem);

    \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^ViewCart;\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','EMS/BadgeBuilder',1,1,'BMybD3cEnmXVk2wQ_qEsRQ',1263962529,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    \n
    \n
    \n\n
    \n\n
    \n\n

    \n\">^International(add a ticket,Asset_EventManagementSystem);\n•\n\">^International(meta fields,Asset_EventManagementSystem);\n•\n\">^International(import,Asset_EventManagementSystem);\n•\n\">^International(export,Asset_EventManagementSystem);\n•\n\">^International(print remaining tickets,Asset_EventManagementSystem);\n

    \n
    \n


    \n

    \n

    \n
    \n\n
    \n\n
    \n\n

    \">^International(add a ribbon,Asset_EventManagementSystem);

    \n
    \n

    \n
    \n\n
    \n\n
    \n\n

    \">^International(add a token,Asset_EventManagementSystem);

    \n
    \n

    \n
    \n\n
    \n
    \n
    \n
    \n
    \n\n\n^ViewCart;\n
    \n\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n\n\n\n\n
    \n
    \n
    \n',0,NULL,NULL),('

    \" />','ImageAsset',1,1,'mRtqRuVikSe82BQsYBlD0A',1263962529,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \" />',0,NULL,NULL),('\n\n
    \n','Account/Layout',1,1,'aUDsJ-vB9RgP-AYvPOy8FQ',1263962529,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n
    \n',0,NULL,NULL),('
    \r\n\r\n\r\n\r\n

    ^International(errors,Asset_Event);

    \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 ^International(tab event,Asset_Event);\r\n ^International(recurrence,Asset_Event);\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 \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
    ^International(event title,Asset_Event);
    ^International(short title,Asset_Event);
    ^International(location,Asset_Event);
    ^International(description,Asset_Event);
    ^International(start date,Asset_Event);
    ^International(end date,Asset_Event);
    ^International(time,Asset_Event);
     
    ^International(related material,Asset_Event);\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
    \' type=\'button\' name=\'\' value=\'DEL\' onClick=\"return delete_link(\'\',\'\');\">\r\n \' value=\'\'>\r\n \' value=\"\">\r\n
    \'>\r\n\' name=\'\' value=\'\'>\r\n\' name=\'rel_delconfirm_\' value=\'0\'>\r\n
    \r\n
    \r\n
    ^International(group to view,Asset_Event);
    ^International(attachments for event,Asset_Event);
    \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
    ^International(recurrence pattern,Asset_Event);
    ^International(recurrence range,Asset_Event);\r\n

    ^International(start,Asset_Event);:

    \r\n

    \r\n

    ^International(end,Asset_Event);:

    \r\n
    \r\n
    \r\n
    \r\n\r\n\r\n\r\n\r\n','Calendar/EventEdit',1,1,'CalendarEventEdit00001',1269401468,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n\n

    ^International(errors,Asset_Event);

    \n
      \n\n
    • \n
      \n
    \n
    \n\n\n\n\n
    \n^International(tab event,Asset_Event);\n^International(recurrence,Asset_Event);\n\n\n
    \n\n\n\n\n\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(event title,Asset_Event);
    ^International(short title,Asset_Event);
    ^International(location,Asset_Event);
    ^International(description,Asset_Event);
    ^International(start date,Asset_Event);
    ^International(end date,Asset_Event);
    ^International(time,Asset_Event);
     
    ^International(related material,Asset_Event);\n\n\n\n\n\n\n\n\n\n\'>\n\n\n\n\n\n\n
    \n\n
    \' type=\'button\' name=\'\' value=\'DEL\' onClick=\"return delete_link(\'\',\'\');\">\n\' value=\'\'>\n\' value=\"\">\n
    \'>\n\' name=\'\' value=\'\'>\n\' name=\'rel_delconfirm_\' value=\'0\'>\n
    \n
    \n
    ^International(group to view,Asset_Event);
    ^International(attachments for event,Asset_Event);
    \n
    \n\n\n\n\n\n\n\n\n\n\n
    ^International(recurrence pattern,Asset_Event);
    ^International(recurrence range,Asset_Event);\n

    ^International(start,Asset_Event);:

    \n

    \n

    ^International(end,Asset_Event);:

    \n
    \n
    \n
    \n\n',0,NULL,NULL),('\n \n WebGUI ^International(assetName,Asset_Survey);\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n\n\n
    \n
    \n
    \n
    \n ^International(Loading...,WebGUI);\n
    \n
    \n
    \n\n\n \" id=\"id\">\n \n \n \n
    \n

    ^International(warnings,Asset_Survey);

    \n
    \n
    \n \n
    \n
    \n
    \n \n \n \n
    \n
    \n
    \n
    \n\n','Survey/Edit',1,1,'GRUNFctldUgop-qRLuo_DA',1269401469,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\nWebGUI ^International(assetName,Asset_Survey);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n
    \n
    \n
    \n^International(Loading...,WebGUI);\n
    \n
    \n
    \n\" id=\"id\">\n\n
    \n

    ^International(warnings,Asset_Survey);

    \n
    \n
    \n
    \n
    \n
    \n\n\n\n
    \n
    \n
    \n
    \n',0,NULL,NULL),('\n\n\n\n \n ^Page(title); - ^c;\n \n\n\n\n ^AdminBar;\n
    \n
     
    \n
    \n
    ^H(^c(););
    \n
    \n ^AssetProxy(crystalx/site-search);\n
    \n
    \n\n
    \n ^AssetProxy(crystalx/crystalx_navigation);\n
    \n\n
    \n
    \n
    \n
    You are here: ^AssetProxy(crystalx/crystalx_navigationtrail);
    \n
    ^D(\"%W, %D/%C/%y\");
    \n
    \n
    \n
    \n
    \n\n
    \n
    \n
    \n ^LoginToggle;  \n ^GroupText(\"Registered Users\",^a(^@;););  \n ^AdminToggle;\n
    \n
    \n\n
    \n

    © 2009 ^c; | Empowered by WebGUI

    \n

    Created by Nuvio | Webdesign

    \n

    \n
    \n
    \n\n\n\n','style',1,1,'OiJNwP1gAlcva8_yOtL4gA',1273032718,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n^Page(title); - ^c;\n\n\n\n^AdminBar;\n
    \n
     
    \n
    \n
    ^H(^c(););
    \n
    \n^AssetProxy(crystalx/site-search);\n
    \n
    \n
    \n^AssetProxy(crystalx/crystalx_navigation);\n
    \n
    \n
    \n
    \n
    You are here: ^AssetProxy(crystalx/crystalx_navigationtrail);
    \n
    ^D(\"%W, %D/%C/%y\");
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n^LoginToggle;  \n^GroupText(\"Registered Users\",^a(^@;););  \n^AdminToggle;\n
    \n
    \n
    \n

    © 2009 ^c; | Empowered by WebGUI

    \n

    Created by Nuvio | Webdesign

    \n

    \n
    \n
    \n\n',0,'pl9xiFGzrqfAgRzqwJ8xPg',NULL),('\n
    \n
    \n\n

    \n
    \n\n

    \n
    \n
    \n \n\n \n \n
    \" class=\"yuimenubar\">\n
    \n
      \n \n\n \n
    \n
    \n
    \n \n
    \n\n \n \n \n \n
  • \n onclick=\"window.open(this.href); return false;\"href=\"\">\n \n \n
  • \n onclick=\"window.open(this.href); return false;\"href=\"\">\n \n
  • \n onclick=\"window.open(this.href); return false;\" href=\"\">\n \n \n \n \n \n \n \n
  • \n \n
  • \n \n onclick=\"window.open(this.href); return false;\"href=\"\">\n \n \n
  • \n \n
  • \n \n onclick=\"window.open(this.href); return false;\" href=\"\">\n \n \n\n \n
    \n
    \n
      \n \n \n \n\n \n \n \n \n \n \n \n \n
    \n
    \n
    \n
  • \n \n \n
    \n \n \n\n \n\n\n\n','Navigation',1,1,'gaIOm5cr2TkT9Fk6QmZWug',1273032718,'WebGUI::Asset::Template::HTMLTemplate',1,'\n
    \n
    \n\n

    \n
    \n\n

    \n
    \n\n\n\n\n\n',0,NULL,NULL),('\r\n \r\n\r\n\r\n\r\n id=\"currentpage\"\r\n \r\n\r\n onclick=\"window.open(\'\')\" href=\"#\" \r\n href=\"\"\r\n \r\n >\r\n \r\n \r\n\r\n > \r\n\r\n\r\n','Navigation',1,1,'hpCk0B3vQzgc-QJhSol41w',1273032718,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\nid=\"currentpage\"\n\nonclick=\"window.open(\'\')\" href=\"#\"\nhref=\"\"\n>\n\n\n > \n',0,NULL,NULL),('\" id=\"id\">\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
    Go back to ^H(Home);
    \r\n\r\n \r\n
    \r\n \r\n
    id=\"odd\" >\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','Search',1,0,'OfKbvK7CrfMnfc8WDoF4Rg',1273032718,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n
    \n
    \n\n

    \n
    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n
    Go back to ^H(Home);
    \n\n
    \n\n
    id=\"odd\">\n
    );\">
    \n
    \n
    \n
    \n
    \n\n
    \n\n
    \n
    \n\n
    \n · · \n
    \n
    \n
    ',0,NULL,'[]'),('\r\n\r\n\r\n\r\n \r\n ^c; - ^Page(title);\r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n^AdminBar();\r\n\r\n\r\n \r\n \r\n\r\n\r\n \r\n\r\n
    \r\n
    \r\n
    ^H(^c;);
    \r\n
    ^c;
    \r\n
    \r\n
    \r\n

    ^Page(title);

    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \"plain\"webgui\"
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n ^AssetProxy(flexmenu);\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n ^L(\"\",\"\",\"PBtmpl0000000000000044\");\r\n ^AdminToggle;\r\n
    \r\n
    \r\n © ^D(%y); ^c;\r\n
    \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n','style',1,1,'stevestyle000000000002',1273032718,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n^c; - ^Page(title);\n\n\n\n\n\n\n\n\n\n\n^AdminBar();\n\n\n\n\n\n\n\n\n
    \n
    \n
    ^H(^c;);
    \n
    ^c;
    \n
    \n
    \n

    ^Page(title);

    \n
    \n
    \n
    \n\n
    \n
    \n
    \n
    \n\"plain\"webgui\"
    \n
    \n
    \n
    \n\n\n\n\n\n
    \n
    \n^AssetProxy(flexmenu);\n
    \n\n\n\n\n\n
    \n
    \n^L(\"\",\"\",\"PBtmpl0000000000000044\");\n^AdminToggle;\n
    \n
    \n© ^D(%y); ^c;\n
    \n\n\n\n\n\n',0,'ahKL5Wl1XmeUUCB32OzSbA',NULL),('

    \n\n
      \n
    • \n \n \"> - on by \n \n - on by \n \n ( \"> )\n \n \n
    • \n
    \n\n
    \"> | \"> | \">
    \n\n\n','WikiMaster_recentChanges',1,1,'WikiRCTmpl000000000001',1273032720,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n
      \n
    • \n\n\"> - on by \n\n - on by \n\n( \"> )\n\n\n
    • \n
    \n
    \"> | \"> | \">
    ',0,NULL,NULL),('

    \n\n

    \n\n\n

    \n\n
    \n\n

    ^International(categories label,Asset_Matrix);

    \n\n
    \n

    \n\n\n\"> ()
    \n
    \n
    \n

    \n
    \n
    \n\n

    Featured Article: \">

    \n\n
    \n\n
    \n

    \">

    \n
      \n
    • \n \n \">\n \n ()\n \n
    • \n
    \n
    \n
    \n

    \">

    \n
      \n
    1. \">
    2. \n
    \n\n
    \n
    \n\n
    \n\n\n','WikiMaster_front',1,1,'WikiFrontTmpl000000001',1273032720,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n\n

    \n\n

    \n\n
    \n\n

    ^International(categories label,Asset_Matrix);

    \n\n
    \n

    \n\n\n\"> ()
    \n
    \n
    \n

    \n
    \n
    \n\n

    Featured Article: \">

    \n\n
    \n
    \n

    \">

    \n
      \n
    • \n\n\">\n\n ()\n\n
    • \n
    \n
    \n
    \n

    \">

    \n
      \n
    1. \">
    2. \n
    \n
    \n
    \n
    ',0,NULL,NULL),('\n

    \n\n\n\n\n

    \n \n \n \n
    \n · · \n
    \n
    \n

    \n

    \">

    \n \n

    \n

    \">

    \n
    \n
    \n
    \"> | \"> | \">
    \n','WikiMaster_search',1,1,'WikiSearchTmpl00000001',1273032720,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n\n\n

    \n\n\n\n
    \n · · \n
    \n
    \n

    \n

    \">

    \n\n

    \n

    \">

    \n
    \n
    \n
    \"> | \"> | \">
    ',0,NULL,NULL),('\n
      \n\n
    • at () by
    • \n
      \n
    \n','WikiPage_pageHistory',1,1,'WikiPHTmpl000000000001',1273032720,'WebGUI::Asset::Template::HTMLTemplate',1,'
      \n\n
    • at () by
    • \n
      \n
    ',0,NULL,NULL),('

    \n

    \n\n
    \n
      \n
    • \n
    • \n
    \n
    \n
    \n
    ^International(locked,Asset_WikiPage);
    \n
    \n

    ^International(keywords,Asset);: \">

    \n
    \n
    \n
    \n
    \n
    \n\n\n\n
    \"> | \"> | \"> | \">
    ','WikiPage',1,1,'WikiPageTmpl0000000001',1273032720,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n

    \n
    \n
      \n
    • \n
    • \n
    \n
    \n
    \n
    ^International(locked,Asset_WikiPage);
    \n
    \n

    ^International(keywords,Asset);: \">

    \n
    \n
    \n
    \n
    \n
    \n\n\n\n
    \"> | \"> | \"> | \">
    ',0,NULL,NULL),('\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','WikiPage_edit',1,1,'WikiPageEditTmpl000001',1273032720,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\n\n\n',0,NULL,NULL),('

    \n\n
      \n
    1. \">
    2. \n
    \n\n
    \"> | \"> | \">
    \n\n','WikiMaster_mostPopular',1,1,'WikiMPTmpl000000000001',1273032720,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n
      \n
    1. \">
    2. \n
    \n
    \"> | \"> | \">
    ',0,NULL,NULL),('\r\n\r\n\r\n \r\n ^c; - ^Page(title);\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n\r\n\r\n^AdminBar();\r\n\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n ^L(\"\",\"\",\"PBtmpl0000000000000092\"); · ^AdminToggle;\r\n
    \r\n
    \r\n

    ^H(^c;);

    \r\n

    ^Page(title);

    \r\n
    \r\n \"webgui\"
    \r\n
    \r\n
    \r\n
    \r\n ^AssetProxy(style3_coolmenu);\r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n\r\n
    \r\n
    \r\n © ^D(%y); ^c;\r\n
    \r\n \"plain
    \r\n
    \r\n
    \r\n
    \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n','style',1,1,'stevestyle000000000003',1273032720,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n^c; - ^Page(title);\n\n\n\n\n\n\n\n\n\n\n\n^AdminBar();\n
    \n
    \n
    \n
    \n
    \n^L(\"\",\"\",\"PBtmpl0000000000000092\"); · ^AdminToggle;\n
    \n
    \n

    ^H(^c;);

    \n

    ^Page(title);

    \n
    \n\"webgui\"
    \n
    \n
    \n
    \n^AssetProxy(style3_coolmenu);\n
    \n
    \n\n
    \n
    \n
    \n
    \n
    \n© ^D(%y); ^c;\n
    \n\"plain
    \n
    \n
    \n
    \n\n\n\n\n\n',0,'Xr1JhO16oSMIEvCjcZILZQ',NULL),('\r\n\r\n\r\n \r\n ^Page(title);\r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n\r\n\r\n\r\n ^AdminBar();\r\n
    \r\n
    \r\n
    \r\n ^H(^c(););\r\n
    \r\n \r\n
    \r\n © ^D(%y); ^c;\r\n
    \r\n
    \r\n\r\n
    \r\n
    \r\n ^AssetProxy(roottab_level0);\r\n
    \r\n
    \r\n
    \r\n ^AssetProxy(roottab_level1);\r\n
    \r\n
    \r\n ^AssetProxy(crumbtrail); \r\n
    \r\n
     
    \r\n
    \r\n \r\n
    \r\n
     
    \r\n
    \r\n \r\n
    \r\n ^L(\"\",\"\",\"PBtmpl0000000000000044\");\r\n
    ^AdminToggle;
    \r\n ^AssetProxy(style1/gui_bottom.jpg);
    \r\n \"WebGUI\r\n
    \r\n
    \r\n\r\n\r\n\r\n\r\n\r\n \r\n','style',1,1,'stevestyle000000000001',1273032722,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n^Page(title);\n\n\n\n\n\n\n\n\n\n\n^AdminBar();\n
    \n
    \n
    \n^H(^c(););\n
    \n
    \n© ^D(%y); ^c;\n
    \n
    \n
    \n
    \n^AssetProxy(roottab_level0);\n
    \n
    \n
    \n^AssetProxy(roottab_level1);\n
    \n
    \n^AssetProxy(crumbtrail);\n
    \n
     
    \n
    \n\n
    \n
     
    \n
    \n
    \n^L(\"\",\"\",\"PBtmpl0000000000000044\");\n
    ^AdminToggle;
    \n^AssetProxy(style1/gui_bottom.jpg);
    \n\"WebGUI\n
    \n
    \n\n\n\n\n\n',0,'RE3ugPDieP57zCI6J_uJqw',NULL),('\n
    \n\n
    \n

    \n
    \n ^International(member since,Account_Inbox); ^D(%z,);\n

    \n \n

    \n location.href=\'\'alert(\'^International(no friends hover,Account_Inbox);\');\" />\n \n \n \" class=\"prevNext\">\"Previous\" \n \"> \n  \" class=\"prevNext\">\"Next\"\n \n \n \n

    \n \n \n \n \n \n \n \n \n \n \n \n WGoddThreadWGevenThread\">\n \n \n \n \n \n \n \n \n
     \">^International(from label,Account_Inbox);\">^International(subject label,Account_Inbox);\">^International(date label,Account_Inbox);\">^International(status label,Account_Inbox);
    old.pngnew.png);\" />\" class=\"inbox_from\">\">^D(,);
    \n \n

    \n location.href=\'\'alert(\'^International(no friends hover,Account_Inbox);\');\" />\n \n \n \" class=\"prevNext\">\"Previous\" \n \"> \n  \" class=\"prevNext\">\"Next\"\n \n \n \n

    \n\n

    \n ^International(message count,\'Account_Inbox\');\n

    \n \n
    \n\n
    \n','Account/Inbox/View',1,1,'c8xrwVuu5QE0XtF9DiVzLw',1273032723,'WebGUI::Asset::Template::HTMLTemplate',1,'\n
    \n
    \n

    \n
    \n^International(member since,Account_Inbox); ^D(%z,);\n

    \n

    \n location.href=\'\'alert(\'^International(no friends hover,Account_Inbox);\');\" />\n\n\n\" class=\"prevNext\">\"Previous\" \n\"> \n \" class=\"prevNext\">\"Next\"\n\n\n \n

    \n\n\n\n\n\n\n\n\n\n\nWGoddThreadWGevenThread\">\n\n\n\n\n\n\n\n\n
     \">^International(from label,Account_Inbox);\">^International(subject label,Account_Inbox);\">^International(date label,Account_Inbox);\">^International(status label,Account_Inbox);
    old.pngnew.png);\" />\" class=\"inbox_from\">\">^D(,);
    \n

    \n location.href=\'\'alert(\'^International(no friends hover,Account_Inbox);\');\" />\n\n\n\" class=\"prevNext\">\"Previous\" \n\"> \n \" class=\"prevNext\">\"Next\"\n\n\n \n

    \n

    \n ^International(message count,\'Account_Inbox\');\n

    \n
    \n
    \n',0,NULL,NULL),('\n

    \n\n\n\n
    ^International(Sub-keywords,Asset_WikiMaster);
    \n\n
    \n\n\n

    ^International(categories label,Asset_Matrix);

    \n

    \n\n\n\"> ()
    \n
    \n
    \n

    \n
    \n\n\n

    ^International(Related Pages,Asset_WikiMaster);

    \n\n
    \n\n\n
    \n · · \n
    \n
    \n\n\n\n','WikiMaster_byKeyword',1,1,'WikiKeyword00000000001',1274238756,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n\n\n
    ^International(Sub-keywords,Asset_WikiMaster);
    \n\n
    \n\n

    ^International(categories label,Asset_Matrix);

    \n

    \n\n\n\"> ()
    \n
    \n
    \n

    \n
    \n\n

    ^International(Related Pages,Asset_WikiMaster);

    \n\n
    \n\n
    \n · · \n
    \n
    \n',0,NULL,NULL),('
    \n \n

    \n
    \n\n \n

    \n
    \n\n \n
    \n
    \n \n\n \n \n \n \n \n\n

    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n
    \n \n \n \n \n \n \n \n \n \n
    \">
    \n \n
    \n\n \n

    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n wgRowOnewgRowTwo\">\n \n \n \n \n \n
    \">\n

    Search Results

    \n
    \n \">\n
    \n \n \n \n \n \">\n \n \n \n
    \n
    \n
    \n \n \n
    \n · · \n
    \n
    \n
    \n','Thingy/SearchThing',1,1,'ThingyTmpl000000000004',1277868920,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n

    \n
    \n\n

    \n
    \n\n
    \n
    \n\n\n\n\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n
    \n\n\n\n\n\n\n\n\n\n
    \">
    \n\n
    \n\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nwgRowOnewgRowTwo\">\n\n\n\n\n\n
    \">\n

    Search Results

    \n
    \n\">\n
    \n\n\n\n\n\">\n\n\n\n
    \n
    \n
    \n\n
    \n · · \n
    \n
    \n
    ',0,NULL,NULL),('\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n \n\n\n

    \n \n \">\n •\n \n \n \n \">\n \n \">\n \n •\n \n \">\n

    \n\n\n\n \n \n \n \n \n \n\n\n\n \n \n \n \n \n \n \n \n \n \n\n\n
    \">\">\">
    oddThreadevenThread\">oddThreadevenThread\">\"> ()oddThreadevenThread\">oddThreadevenThread\">oddThreadevenThread\">\">
    \n\n\n
    \n · · \n
    \n
    \n','Collaboration',1,1,'PBtmpl0000000000000066',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n\n\n\n

    \n
    \n\n\n\n

    \n\n\">\n•\n\n\n\n\">\n\n\">\n\n•\n\n\">\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \">\">\">
    oddThreadevenThread\">oddThreadevenThread\">\"> ()oddThreadevenThread\">oddThreadevenThread\">oddThreadevenThread\">\">
    \n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n \n\n\n

    \n \n \"> •\n \n \n \n \">\n \n \">\n \n \n •\n \n \n \n \">\n \n

    \n\n\n\n\n \n \n
    [\">]
    \n
    \n
    \n \n
    \n \n \n \n \n \n [\">]\n \n \n \n (\">)\n
    \n
    \n \" id=\"id\">
    \n \n

    \">[top]

    \n
    \n\n\n
    \n · · \n
    \n
    \n','Collaboration',1,1,'PBtmpl0000000000000080',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n\n\n\n

    \n
    \n\n\n\n

    \n\n\"> •\n\n\n\n\">\n\n\">\n\n\n•\n\n\n\n\">\n\n

    \n\n\n\n\n
    [\">]
    \n
    \n
    \n\n
    \n\n\n\n\n\n[\">]\n\n\n\n(\">)\n
    \n
    \n\" id=\"id\">
    \n\n

    \">[top]

    \n
    \n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n \n\n\n

    \n \n \">\n •\n \n \n \n \">\n \n \">\n \n •\n \n \">\n

    \n\n\n\n \n \n \n \n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n\n
    \">\">\">
    oddThreadevenThread\">oddThreadevenThread\">\"> ()oddThreadevenThread\" style=\"text-align: center;\">\n \n \">\" border=\"0\" alt=\"\" />\n \n  \n \n oddThreadevenThread\">oddThreadevenThread\">oddThreadevenThread\">\">
    \n\n\n
    \n
    \n · · \n
    \n
    \n','Collaboration',1,1,'PBtmpl0000000000000097',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n\n\n\n

    \n
    \n\n\n\n

    \n\n\">\n•\n\n\n\n\">\n\n\">\n\n•\n\n\">\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \">\">\">
    oddThreadevenThread\">oddThreadevenThread\">\"> ()oddThreadevenThread\" style=\"text-align: center;\">\n\n\">\" border=\"0\" alt=\"\" />\n\n \n\noddThreadevenThread\">oddThreadevenThread\">oddThreadevenThread\">\">
    \n\n
    \n
    \n · · \n
    \n
    ',0,NULL,NULL),('\n\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n\n \n\n\n

    \n \n \">\n •\n \n \n \n \">\n \n \">\n \n •\n \n \">\n

    \n\n

    \n\n\n

    \n \n
    \n
    \n \n \n \n \n \n \">\n \n -\n \n \n - \n \n \n - \n \n \n - \n \n \n \n \n \">\" border=\"0\" alt=\"\" align=\"right\" />\n \n \n
    \n \">\n
    \n
    \n

    \n\n\n\n

    \n \n
    \n\n','Collaboration',1,1,'PBtmpl0000000000000112',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n\n\n

    \n\n\">\n•\n\n\n\n\">\n\n\">\n\n•\n\n\">\n

    \n

    \n\n

    \n\n
    \n
    \n\n\n\n\n\n\">\n\n-\n\n\n- \n\n\n- \n\n\n- \n\n\n\n\n\">\" border=\"0\" alt=\"\" align=\"right\" />\n\n\n
    \n\">\n
    \n
    \n

    \n\n\n

    \n\n
    \n',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n\n \n\n\n

    \n \n \">\n •\n \n \n \n \">\n \n \">\n \n •\n \n \">\n

    \n\n
    \n\n\n
    \n
    \n
    ()
    \n \n \n
    \n
    \n
    \n\n
    \n\n\n
    \n · · \n
    \n
    \n','Collaboration',1,1,'PBtmpl0000000000000121',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n\n\n

    \n\n\">\n•\n\n\n\n\">\n\n\">\n\n•\n\n\">\n

    \n
    \n\n
    \n\n
    \n
    \n
    \n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('\" id=\"id\"> \n\n \n

    \n
    \n\n

    \n\n
    \n\n
    \n\" alt=\"\" />\n
    \n
    \n : \n \n \n \n \">\n \n
    \n :
    \n :
    \n : \n \n     [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n \n : [ \"> \"> ]
    \n \n \n :
    \n
    \n
    \n
    \n\n
    \n

    \n \n
    \n\n\n
    \n \n \n \n
    \n
    \n
    \n\n\n\n\n \n\n\n
    \n\n\n
    \n

    \n
    \n
    \n \n \">\n \n \">\n \n
    \n
    \n \n \n \n \n \n
    Current\">\n \">\n
    \n \n
    \n
    \n \n \n \n\n\n\n \n \n \n
    \n\" alt=\"\" />\n\n : \n \n \n \n \">\n \n
    \n : \n
    \n : \n \n     [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n :
    \n
    \n
    \n \n \n \n \n
    \n
    \n
    \n \n
    \n \n \n \n \n \n
    px;\">\n
    Current\">\n \">\n
    \n \n
    \n
    \n \n \n \n\n\n\n \n \n \n
    \n\" alt=\"\" />\n\n : \n \n \n \n \">\n \n
    \n : \n
    \n : \n \n     [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n :
    \n
    \n
    \n \n \n \n \n
    \n
    \n
    \n
    \n \n
    \n \n \n
    \n [ | | ]\n
    \n
    \n
    \n\n\n','Collaboration/Thread',1,1,'PBtmpl0000000000000067',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n

    \n
    \n\n
    \n\" alt=\"\" />\n
    \n
    \n:\n\n\n\n\">\n\n
    \n:
    \n:
    \n: \n\n    [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n\n: [ \"> \"> ]
    \n\n\n:
    \n
    \n
    \n
    \n
    \n

    \n\n
    \n\n
    \n\n\n\n
    \n
    \n
    \n\n\n\n
    \n\n
    \n

    \n
    \n
    \n\n\">\n\n\">\n\n
    \n
    \n\n\n\n\n
    Current\">\n\">\n
    \n\n
    \n
    \n\n\n\n\n\n\n\n\n\n
    \n\" alt=\"\" />\n\n:\n\n\n\n\">\n\n
    \n: \n
    \n: \n\n    [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n:
    \n
    \n
    \n\n\n\n\n
    \n
    \n
    \n\n
    \n\n\n\n\n
    px;\">\n
    Current\">\n\">\n
    \n\n
    \n
    \n\n\n\n\n\n\n\n\n\n
    \n\" alt=\"\" />\n\n:\n\n\n\n\">\n\n
    \n: \n
    \n: \n\n    [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n:
    \n
    \n
    \n\n\n\n\n
    \n
    \n
    \n
    \n\n
    \n\n
    \n[ | | ]\n
    \n
    \n
    \n',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n\n \n\n\n

    \n \n \">\n •\n \n \n \n \">\n \n \">\n \n •\n \n \">\n

    \n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n
    \">\">\">\">\">
    oddThreadevenThread\">oddThreadevenThread\">\">oddThreadevenThread\">oddThreadevenThread\">\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\"> @ oddThreadevenThread\" style=\"font-size: 11px;\">\n \">\n by\n \n \n \n \">\n \n on @ \n
    \n\n\n
    \n · · \n
    \n
    \n','Collaboration',1,1,'PBtmpl0000000000000026',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n\n\n

    \n\n\">\n•\n\n\n\n\">\n\n\">\n\n•\n\n\">\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \">\">\">\">\">
    oddThreadevenThread\">oddThreadevenThread\">\">oddThreadevenThread\">oddThreadevenThread\">\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\"> @ oddThreadevenThread\" style=\"font-size: 11px;\">\n\">\nby\n\n\n\n\">\n\non @ \n
    \n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n\n \n\n\n

    \n \n \">\n •\n \n \n \n \">\n \n \">\n \n •\n \n \">\n

    \n\n\n
    \n\n\n
    \n
    \n \">
    \n ()\n \n \n \n
    \n \n
    \n
    \n\n
    \n\n\n
    \n · · \n
    \n
    \n','Collaboration',1,1,'PBtmpl0000000000000128',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n\n\n

    \n\n\">\n•\n\n\n\n\">\n\n\">\n\n•\n\n\">\n

    \n
    \n\n
    \n\n\n
    \n
    \n
    \n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n \n\n\n

    \n \n \"> •\n \n \n \n \">\n \n \">\n \n \n \n  [\">]\n \n

    \n\n\n \n \n \">\n \n \n \n \n \n \n \n \n \"> •\n \n \n \n (\">)\n
    \n

    \n \n

    \n\n\n\n

    \n · · \n
    \n\n','Collaboration',1,1,'PBtmpl0000000000000079',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n\n\n\n

    \n
    \n\n\n\n

    \n\n\"> •\n\n\n\n\">\n\n\">\n\n\n\n [\">]\n\n

    \n\n\n\n\">\n\n\n\n\n\n\n\n\n\"> •\n\n\n\n(\">)\n
    \n

    \n\n

    \n\n\n

    \n · · \n
    \n',0,NULL,NULL),('\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n \n\n\n

    \n \n \"> •\n \n \n \n \">\n \n \">\n \n \n •\n \n \n \n \">\n \n

    \n\n\n \n \n [\">] \n \n \n \n \n \n \n \n \n [\">]\n \n \n \n (\">)\n \n

    \n \" target=\"_blank\">\n \n - \n \n

    \n
    \n\n\n
    \n · · \n
    \n
    \n','Collaboration',1,1,'PBtmpl0000000000000083',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n\n\n\n

    \n
    \n\n\n\n

    \n\n\"> •\n\n\n\n\">\n\n\">\n\n\n•\n\n\n\n\">\n\n

    \n\n\n\n[\">] \n\n\n\n\n\n\n\n\n[\">]\n\n\n\n(\">)\n\n

    \n\" target=\"_blank\">\n\n- \n\n

    \n
    \n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n \n\n\n

    \n \n \">\n •\n \n \n \n \">\n \n \">\n \n \n \n •\n \n \n \n \">\n \n

    \n\n\n\n\n
    \n · · \n
    \n
    \n','Collaboration',1,1,'PBtmpl0000000000000082',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n\n\n\n

    \n
    \n\n\n\n

    \n\n\">\n•\n\n\n\n\">\n\n\">\n\n\n•\n\n\n\n\">\n\n

    \n\n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n \n\n\n

    \n \n \"> •\n \n \n \n \">\n \n \">\n \n \n •\n \n \n \n \">\n \n

    \n\n\n\n\n\n\n\n\n
    \n\n

    \n\n\n\n\n

    \n · · \n
    \n\n','Collaboration',1,1,'PBtmpl0000000000000133',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n\n\n\n

    \n
    \n\n\n\n

    \n\n\"> •\n\n\n\n\">\n\n\">\n\n\n•\n\n\n\n\">\n\n

    \n\n\n\n\n\n\n
    \n\n

    \n\n\n

    \n · · \n
    \n',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n

    \n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n\n\n\n

    \n \n
    \n\n\n','Collaboration/PostForm',1,1,'PBtmpl0000000000000029',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\n

    \n\n
    ',0,NULL,NULL),('\n\n \n

    \n
    \n\n \n
    \n

    \">

    \n
    \n
    \n \n \">\n \n \">\n \n
    \n
    \n\n\n
    px;\">\n
    Current\">\n \">\n
    \n \n
    \n
    \n\n
    \n\" alt=\"\" />\n
    \n
    \n
    \n : \n \n \n \n \">\n \n
    \n :
    \n
    \n
    \n :
    \n : \n \n \n     [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n
    \n \n : [ \"> \"> ]
    \n
    \n
    \n
    \n \n \n
    \n \n \"> •\n \n \n \"> • \n \">\n \n
    \n
    \n
    \n
    \n
    \n\n\n
    \n [ | | ]\n
    \n
    \n\n
    \n \n \"> •\n \n \n \"> • \n \n \n \"> •\n \n \n \n \"> •\n \n \"> •\n \n \n \"> •\n \n \"> •\n \n \n \n \n \">\n \n \">\n \n \n
    \n\n','Collaboration/Thread',1,1,'PBtmpl0000000000000032',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n

    \n
    \n
    \n

    \">

    \n
    \n
    \n\n\">\n\n\">\n\n
    \n
    \n\n
    px;\">\n
    Current\">\n\">\n
    \n\n
    \n
    \n\n
    \n\" alt=\"\" />\n
    \n
    \n
    \n:\n\n\n\n\">\n\n
    \n:
    \n
    \n
    \n:
    \n: \n\n\n    [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n
    \n\n: [ \"> \"> ]
    \n
    \n
    \n
    \n\n\n
    \n\n\"> •\n\n\n\"> •\n\">\n\n
    \n
    \n
    \n
    \n
    \n\n
    \n[ | | ]\n
    \n
    \n
    \n\n\"> •\n\n\n\"> •\n\n\n\"> •\n\n\n\n\"> •\n\n\"> •\n\n\n\"> •\n\n\"> •\n\n\n\n\n\">\n\n\">\n\n\n
    ',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n\n

    \n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    class=\"odd\">\">class=\"odd\">class=\"odd\">\">class=\"odd\"> @
    \n
    \n\n\n
    \n · · \n
    \n
    \n\n\n','Collaboration/Search',1,1,'PBtmpl0000000000000031',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    class=\"odd\">\">class=\"odd\">class=\"odd\">\">class=\"odd\"> @
    \n
    \n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('\" id=\"id\">\n\n

    \n

    \n

    \n\n\n

    \n\n

    \n
    \n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n\n\n\n
    \n

    \n \n
    \n
    \n\n','Collaboration/PostForm',1,1,'PBtmpl0000000000000068',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n

    \n

    \n

    \n\n

    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\n
    \n

    \n\n
    \n
    ',0,NULL,NULL),('\" id=\"id\">\n\n

    \n

    \n\n\n

    \n\n

    \n
    \n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n\n\n\n
    \n

    \n \n
    \n
    \n\n\n','Collaboration/PostForm',1,1,'PBtmpl0000000000000099',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n

    \n

    \n\n

    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\n
    \n

    \n\n
    \n
    ',0,NULL,NULL),('\" id=\"id\">\n\n\n\n\n

    \n\n

    \n
    \n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n\n\n\n \n\n','Collaboration/PostForm',1,1,'PBtmpl0000000000000114',1277868922,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n\n

    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\n\n',0,NULL,NULL),('\" id=\"id\"> \n\n \n

    \n
    \n\n

    \n\n\n
    \n :     [ \"> \"> ]
    \n
    \n
    \n\n\n ^International(job description,Asset_Collaboration);
    \n

    \n
    \n\n\n ^International(job requirements,Asset_Collaboration);
    \n

    \n
    \n\n\n\n \n \n\n\n \n \n\n\n \n \n\n\n \n \n\n
    ^International(date posted,Asset_Collaboration); 
    ^International(location,Asset_Collaboration); 
    ^International(compensation,Asset_Collaboration); 
    ^International(views,Asset_Collaboration); 
    \n\n\n
    \n \n \n \n
    \n
    \n
    \n\n\n
    \n \n \">\n •\n \n \n \">\n •\n \">\n \n
    \n
    \n\n\n\n
    \n

    \n
    \n
    \n \n \">\n \n \">\n \n
    \n
    \n \n \n \n \n \n
    Current\">\n \">\n
    \n \n
    \n
    \n
    \n : \n \n \n \n \">\n \n
    \n :
    \n
    \n
    \n :
    \n : \n \n     [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n \n :
    \n
    \n
    \n
    \n \n \n
    \n \n \">\n •\n \n \n \">\n •\n \">\n \n
    \n
    \n
    \n
    \n
    \n \n
    \n \n \n \n \n \n
    px;\">\n
    Current\">\n \">\n
    \n \n
    \n
    \n
    \n : \n \n \n \n \">\n \n
    \n :
    \n
    \n
    \n :
    \n : \n \n     [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n \n :
    \n
    \n
    \n
    \n \n \n
    \n \n \">\n •\n \n \n \">\n •\n \">\n \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n \n \n
    \n [ | | ]\n
    \n
    \n
    \n\n
    \n \n \"> \n •\n \n \"> \n \n •\n \"> \n \n \n •\n \">\n •\n \n \n \n \">\n •\n \n \">\n •\n \n \n \">\n •\n \n \">\n •\n \n \n \n \n \"> \n \n \">\n \n \n
    ','Collaboration/Thread',1,1,'PBtmpl0000000000000098',1277868922,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n

    \n\n
    \n:     [ \"> \"> ]
    \n
    \n
    \n\n^International(job description,Asset_Collaboration);
    \n

    \n
    \n\n^International(job requirements,Asset_Collaboration);
    \n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(date posted,Asset_Collaboration); 
    ^International(location,Asset_Collaboration); 
    ^International(compensation,Asset_Collaboration); 
    ^International(views,Asset_Collaboration); 
    \n\n
    \n\n\n\n
    \n
    \n
    \n\n
    \n\n\">\n•\n\n\n\">\n•\n\">\n\n
    \n
    \n\n
    \n

    \n
    \n
    \n\n\">\n\n\">\n\n
    \n
    \n\n\n\n\n
    Current\">\n\">\n
    \n\n
    \n
    \n
    \n:\n\n\n\n\">\n\n
    \n:
    \n
    \n
    \n:
    \n: \n\n    [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n\n:
    \n
    \n
    \n
    \n\n\n
    \n\n\">\n•\n\n\n\">\n•\n\">\n\n
    \n
    \n
    \n
    \n
    \n\n
    \n\n\n\n\n
    px;\">\n
    Current\">\n\">\n
    \n\n
    \n
    \n
    \n:\n\n\n\n\">\n\n
    \n:
    \n
    \n
    \n:
    \n: \n\n    [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n\n:
    \n
    \n
    \n
    \n\n\n
    \n\n\">\n•\n\n\n\">\n•\n\">\n\n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n\n
    \n[ | | ]\n
    \n
    \n
    \n
    \n\n\">\n•\n\n\">\n\n•\n\">\n\n\n•\n\">\n•\n\n\n\n\">\n•\n\n\">\n•\n\n\n\">\n•\n\n\">\n•\n\n\n\n\n\">\n\n\">\n\n\n
    ',0,NULL,NULL),('\" id=\"id\">\n\n
    \n

    \n

    \n

    \n

    \n

    \n
    \n\n\n

    \n\n

    \n
    \n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n\n\n\n
    \n

    \n \n

    \n

    \n

    \n
    \n
    \n

    \n\n\n','Collaboration/PostForm',1,1,'PBtmpl0000000000000122',1277868922,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n

    \n

    \n

    \n

    \n

    \n

    \n
    \n\n

    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\n
    \n

    \n\n

    \n

    \n

    \n
    \n
    \n

    ',0,NULL,NULL),('\" id=\"id\">\n\n\n \n\n\n\n

    \n\n\n\n \n\n\n

    \n \n \"> •\n \n \n \n \"> \n \n \">\n \n \n •\n \n \n \n \">\n \n

    \n\n
    \n\n
    \n
    \n \n \">\n \n \n \n\n \n \n \n \n \n \"> •\n \n \n \n (\">)\n\n \n
    \n
    Q
    \n
    \n
    A
    \n\n
    \n\n\n
    \n · · \n
    \n
    \n','Collaboration',1,1,'PBtmpl0000000000000081',1277868922,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n\n\n\n

    \n
    \n\n\n\n

    \n\n\"> •\n\n\n\n\">\n\n\">\n\n\n•\n\n\n\n\">\n\n

    \n
    \n\n
    \n
    \n\n\">\n\n\n\n\n\n\n\n\n\"> •\n\n\n\n(\">)\n\n
    \n
    Q
    \n
    \n
    A
    \n\n
    \n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n \n\n\n

    \n \n \"> •\n \n \n \n \">\n \n \">\n \n \n •\n \n \n \n \">\n \n

    \n\n
      \n \n
    1. \n \n \n [\">]\n \n \n \n \n \n \n \n \n [\">]\n \n \n \n (\">)\n \n \" target=\"_blank\">\n \n - \n \n
    2. \n
      \n
    \n\n\n
    \n · · \n
    \n
    \n','Collaboration',1,1,'PBtmpl0000000000000101',1277868922,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n\n\n\n

    \n
    \n\n\n\n

    \n\n\"> •\n\n\n\n\">\n\n\">\n\n\n•\n\n\n\n\">\n\n

    \n
      \n\n
    1. \n\n\n[\">]\n\n\n\n\n\n\n\n\n[\">]\n\n\n\n(\">)\n\n\" target=\"_blank\">\n\n- \n\n
    2. \n
      \n
    \n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('\" id=\"id\"> \n\n \n

    \n
    \n\n

    \n\n\n
    \n :     [ \"> \"> ]
    \n
    \n
    \n\n\n
    \n ^International(Link Description,Asset_Collaboration);

    \n
    \n \n ^International(Link URL,Asset_Collaboration);

    \n \">

    \n
    \n
    \n\n\n\n\n
    \n \n \n \n
    \n
    \n
    \n\n\n
    \n \n \">\n •\n \n \n \">\n •\n \">\n \n
    \n
    \n\n\n\n
    \n

    \n
    \n
    \n \n \">\n \n \">\n \n
    \n
    \n \n \n \n \n \n
    Current\">\n \" id=\"id\">\n
    \n \n
    \n
    \n
    \n : \n \n \n \n \">\n \n
    \n :
    \n
    \n
    \n :
    \n : \n \n     [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n \n :
    \n
    \n
    \n
    \n \n \n
    \n \n \"> • \n \n \n \"> •\n \">\n \n
    \n
    \n
    \n
    \n
    \n \n
    \n \n \n \n \n \n
    px;\">\n
    Current\">\n \" id=\"id\">\n
    \n \n
    \n
    \n
    \n : \n \n \n \n \">\n \n
    \n :
    \n
    \n
    \n :
    \n : \n \n     [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n \n :
    \n
    \n
    \n
    \n \n \n
    \n \n \"> •\n \n \n \"> • \n \">\n \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n \n \n
    \n [ | | ]\n
    \n
    \n
    \n\n
    \n \n \"> \n •\n \n \">^International(List All Links,Asset_Collaboration);\n \n •\n \"> \n \n \n •\n \">\n \n \n •\n \n \">\n •\n \n \">\n •\n \n \n \">\n •\n \n \">\n •\n \n \n \n \n \">\n \n \">\n \n \n
    ','Collaboration/Thread',1,1,'PBtmpl0000000000000113',1277868922,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n

    \n\n
    \n:     [ \"> \"> ]
    \n
    \n
    \n\n
    \n^International(Link Description,Asset_Collaboration);

    \n
    \n^International(Link URL,Asset_Collaboration);

    \n\">

    \n
    \n
    \n\n
    \n\n\n\n
    \n
    \n
    \n\n
    \n\n\">\n•\n\n\n\">\n•\n\">\n\n
    \n
    \n\n
    \n

    \n
    \n
    \n\n\">\n\n\">\n\n
    \n
    \n\n\n\n\n
    Current\">\n\" id=\"id\">\n
    \n\n
    \n
    \n
    \n:\n\n\n\n\">\n\n
    \n:
    \n
    \n
    \n:
    \n: \n\n    [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n\n:
    \n
    \n
    \n
    \n\n\n
    \n\n\"> •\n\n\n\"> •\n\">\n\n
    \n
    \n
    \n
    \n
    \n\n
    \n\n\n\n\n
    px;\">\n
    Current\">\n\" id=\"id\">\n
    \n\n
    \n
    \n
    \n:\n\n\n\n\">\n\n
    \n:
    \n
    \n
    \n:
    \n: \n\n    [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n\n:
    \n
    \n
    \n
    \n\n\n
    \n\n\"> •\n\n\n\"> •\n\">\n\n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n\n
    \n[ | | ]\n
    \n
    \n
    \n
    \n\n\">\n•\n\n\">^International(List All Links,Asset_Collaboration);\n\n•\n\">\n\n\n•\n\">\n\n\n•\n\n\">\n•\n\n\">\n•\n\n\n\">\n•\n\n\">\n•\n\n\n\n\n\">\n\n\">\n\n\n
    ',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n\n \n\n\n

    \n \n \">\n •\n \n \n \n \">\n \n \">\n \n •\n \n \">\n

    \n\n\n\n \n \n\n \n\n \n \n \n \n \n\n\n\n\n \n \n \n \n \n \n\n \n\n \n \n \n \n \n\n\n
    \">\">\">\">\">\">
    oddThreadevenThread\">\">oddThreadevenThread\">oddThreadevenThread\">\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\"> @ oddThreadevenThread\" style=\"font-size: 11px;\">\n \">\n by\n \n \n \n \">\n \n on @ \n
    \n\n\n
    \n · · \n
    \n
    \n\n','Collaboration',1,1,'PBtmpl0000000000000208',1277868922,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n\n\n

    \n\n\">\n•\n\n\n\n\">\n\n\">\n\n•\n\n\">\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \">\">\">\">\">\">
    oddThreadevenThread\">\">oddThreadevenThread\">oddThreadevenThread\">\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\"> @ oddThreadevenThread\" style=\"font-size: 11px;\">\n\">\nby\n\n\n\n\">\n\non @ \n
    \n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('\" id=\"id\"> \n\n \n

    \n
    \n\n

    \n\n
    \n\n
    \n\" alt=\"\" />\n
    \n
    \n : \n \n \n \n \">\n \n
    \n :
    \n :
    \n :
    \n : \n \n     [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n \n :     [ \">     [ \"> ]
    \n \n \n :
    \n
    \n
    \n\n :
    \n:\n\n
    \n
    \n\n
    \n \n
    \n\n\n
    \n \n \n \n
    \n
    \n
    \n\n\n
    \n \n \">\n •\n \n \n \">\n •\n \">\n \n
    \n
    \n\n
    \n\n\n
    \n

    \n
    \n
    \n \n \">\n \n \">\n \n
    \n
    \n \n \n \n \n \n
    Current\">\n \">\n
    \n \n
    \n
    \n \n \n \n\n\n\n \n \n \n
    \n\" alt=\"\" />\n\n : \n \n \n \n \">\n \n
    \n : \n
    \n : \n \n     [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n
    \n
    \n \n \n
    \n \n \">\n •\n \n \n \">\n •\n \">\n \n
    \n
    \n
    \n
    \n
    \n \n
    \n \n \n \n \n \n
    px;\">\n
    Current\">\n \">\n
    \n \n
    \n
    \n \n \n \n\n\n\n \n \n \n
    \n\" alt=\"\" />\n\n : \n \n \n \n \">\n \n
    \n : \n
    \n : \n \n     [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n
    \n
    \n \n \n
    \n \n \">\n •\n \n \n \">\n •\n \">\n \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n \n \n
    \n [ | | ]\n
    \n
    \n
    \n\n
    \n \n \"> \n •\n \n \">\n \n \n •\n \"> \n \n \n •\n \">\n •\n \n \n \n \">\n •\n \n \">\n •\n \n \n \">\n •\n \n \">\n •\n \n \n \n \n \">\n \n \">\n \n \n
    \n','Collaboration/Thread',1,1,'PBtmpl0000000000000209',1277868922,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n

    \n
    \n\n
    \n\" alt=\"\" />\n
    \n
    \n:\n\n\n\n\">\n\n
    \n:
    \n:
    \n:
    \n: \n\n    [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n\n:     [ \">     [ \"> ]
    \n\n\n:
    \n
    \n
    \n\n:
    \n:\n\n
    \n
    \n
    \n\n
    \n\n
    \n\n\n\n
    \n
    \n
    \n\n
    \n\n\">\n•\n\n\n\">\n•\n\">\n\n
    \n
    \n
    \n\n
    \n

    \n
    \n
    \n\n\">\n\n\">\n\n
    \n
    \n\n\n\n\n
    Current\">\n\">\n
    \n\n
    \n
    \n\n\n\n\n\n\n\n\n\n
    \n\" alt=\"\" />\n\n:\n\n\n\n\">\n\n
    \n: \n
    \n: \n\n    [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n
    \n
    \n\n\n
    \n\n\">\n•\n\n\n\">\n•\n\">\n\n
    \n
    \n
    \n
    \n
    \n\n
    \n\n\n\n\n
    px;\">\n
    Current\">\n\">\n
    \n\n
    \n
    \n\n\n\n\n\n\n\n\n\n
    \n\" alt=\"\" />\n\n:\n\n\n\n\">\n\n
    \n: \n
    \n: \n\n    [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n
    \n
    \n\n\n
    \n\n\">\n•\n\n\n\">\n•\n\">\n\n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n\n
    \n[ | | ]\n
    \n
    \n
    \n
    \n\n\">\n•\n\n\">\n\n•\n\">\n\n\n•\n\">\n•\n\n\n\n\">\n•\n\n\">\n•\n\n\n\">\n•\n\n\">\n•\n\n\n\n\n\">\n\n\">\n\n\n
    ',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n

    \n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n\n
    \n\n\n\n

    \n \n
    \n','Collaboration/PostForm',1,1,'PBtmpl0000000000000210',1277868922,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n
    \n\n\n

    \n\n
    ',0,NULL,NULL),('

    ^International(post received,Asset_Post);

    \">^International(493,WebGUI);

    ','Collaboration/PostReceived',1,1,'default_post_received1',1277868922,'WebGUI::Asset::Template::HTMLTemplate',1,'

    ^International(post received,Asset_Post);

    \">^International(493,WebGUI);

    ',0,NULL,NULL),('

    ^International(Unsubscribe from %s,Asset_Collaboration,\'\">\');

    \n\n

    \n
    \n\n^International(480,WebGUI);
    \n^International(unsubscribe instructions,Asset_Collaboration);
    \n','Collaboration/Unsubscribe',1,1,'default_CS_unsubscribe',1277868922,'WebGUI::Asset::Template::HTMLTemplate',1,'

    ^International(Unsubscribe from %s,Asset_Collaboration,\'\">\');

    \n\n

    \n
    \n\n^International(480,WebGUI);
    \n^International(unsubscribe instructions,Asset_Collaboration);
    \n',0,NULL,NULL),('

    ^International(\"choose username title\",\"Auth_Twitter\");

    \r\n

    \r\n
    \r\n\r\n\r\n\r\n\r\n
    \r\n\r\n','Auth/Twitter/ChooseUsername',1,1,'mfHGkp6t9gdclmzN33OEnw',1277868927,'WebGUI::Asset::Template::HTMLTemplate',1,'

    ^International(\"choose username title\",\"Auth_Twitter\");

    \n

    \n
    \n\n\n\n\n
    ',0,NULL,NULL),('\n

    \n
    \n\n\n

    \n
    \n\n\n \n\n\n\n\n\n \n\n\n \n\n\n \n\n\n \n
    \n \">^International(label day,Asset_Calendar);\n \">^International(label week,Asset_Calendar);\n \">^International(label month,Asset_Calendar);\n ?type=list\">^International(486,WebGUI);\n \">^International(label search,Asset_Calendar);\n\n \n
    \n \n
    \n
    \n \n
    \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n
    \n\n
    \" class=\"moreDisplay\">\n
    \n
      \n \n
    • \">
    • \n
      \n
    \n
    \n
    \n
    ','Calendar/Month',1,1,'CalendarMonth000000001',1279073449,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\">^International(label day,Asset_Calendar);\n\">^International(label week,Asset_Calendar);\n\">^International(label month,Asset_Calendar);\n?type=list\">^International(486,WebGUI);\n\">^International(label search,Asset_Calendar);\n\n
    \n\n
    \n
    \n \n
    \n
    \n\n\n\n\n\n\n\n\n\n\n
    \n
    \n\n
    \" class=\"moreDisplay\">\n
    \n\n
    \n
    \n
    ',0,NULL,NULL),('\n\n

    \n
    \n
    \n \n

    \n
    \n \n

    \n
    \n\n \n
      \n \n
    • \n
      \n
    \n
    \n\n\n \n \n \n \n
    \n \n \n
    \n ^International(comments,Asset_EMSSubmission);\n \n
    \n\n
    \n\n','EMS/Submission',1,1,'8tqyQx-LwYUHIWOlKPjJrA',1279073449,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n

    \n
    \n
    \n\n

    \n
    \n\n

    \n
    \n\n
      \n\n
    • \n
      \n
    \n
    \n\n\n\n\n\n
    \n\n\n
    \n^International(comments,Asset_EMSSubmission);\n\n
    \n
    ',0,NULL,NULL),('\n

    \n
    \n\n

    \n
    \n \n

    \n
    \n\n\n\n\n\n
    \n
    \n
      \n \n
    • class=\"selected\">\">
    • \n
      \n
    \n
    \n \n
    \">
    \n
    \n
    \n
    \n
    \n\n\">^International(schedule back link,Asset_EventManagementSystem);\n\n\n\n\n\n\n\n','EMS/SubmissionMain',1,1,'DoVNijm6lMDE0cYrtvEbDQ',1279073449,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n

    \n
    \n\n\n
    \n
    \n
      \n\n
    • class=\"selected\">\">
    • \n
      \n
    \n
    \n\n
    \">
    \n
    \n
    \n
    \n
    \n\">^International(schedule back link,Asset_EventManagementSystem);\n\n\n\n\n',0,NULL,NULL),(' \n\n \n \n \n \n \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n
    \n ^International(member since,Account_Inbox); ^D(%z,);\n
    ^International(reply message label,Account_Inbox);^International(compose message label,Account_Inbox);
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ^International(recipients label,Account_Inbox);^International(to label,Account_Inbox);:
    class=\"inbox_messageTo\"> [];
    ^International(subject label,Account_Inbox);:
    32\" class=\"send\">\n   \n \'\" />\n
    \n
    \n
    \n\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n \n
    \n
    \n \n \n \n \n \n \n \n \n \n
    _name\"> []
    \n
    \n
    \n \n \n
    \n
    \n
    \n','Account/Inbox/SendMessage',1,1,'6uQEULvXFgCYlRWnYzZsuA',1279073450,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n\n\n\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n
    \n^International(member since,Account_Inbox); ^D(%z,);\n
    ^International(reply message label,Account_Inbox);^International(compose message label,Account_Inbox);
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(recipients label,Account_Inbox);^International(to label,Account_Inbox);:
    class=\"inbox_messageTo\"> [];
    ^International(subject label,Account_Inbox);:
    32\" class=\"send\">\n  \n\'\" />\n
    \n
    \n
    \n\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\n
    \n
    \n\n\n\n\n\n\n\n\n\n
    _name\"> []
    \n
    \n
    \n\n\n
    \n
    \n
    \n',0,NULL,NULL),('
    \n\n
    \n
    \n
    \n
    \n
    \n\n
    \n\n\n','EMS/SubmissionQueue',1,1,'ktSvKU8riGimhcsxXwqvPQ',1279073450,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    \n
    \n
    \n
    \n
    \n
    \n',0,NULL,NULL),('\n
    \n
    \n
    \n \n \n \n \n \n \n \n \n \n \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    ^International(\'comparison label\',\'Asset_Matrix\');
    \n
    \n \n \n \n \n \n \n \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n','Matrix/Compare',1,1,'matrixtmpl000000000002',1281501162,'WebGUI::Asset::Template::HTMLTemplate',1,'\n
    \n
    \n
    \n\n\n\n\n\n\n\n\n\n\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    ^International(\'comparison label\',\'Asset_Matrix\');
    \n
    \n\n\n\n\n\n\n
    \n
    \n
    \n
    \n
    \n
    \n
    ',0,NULL,'[]'),('\n

    \n
    \n\n

    \n\n\n
    \n \n
    \n
    \n\n\n\n
    \n
    \n \n \n
    \n
    \n \n \n \n \n \n \n \n \n
    \n
    \" enctype=\"multipart/form-data\" method=\"post\" name=\"doCompare\">

    \n
    \n
    \n
    \n
    \n\n
    \n
    \n \n
    \n
    \n
    \n\n
    \n
    \n
    \n \n
    \n
    \n \n ^International(\'add new listing text\',\'Asset_Matrix\');\n \n ^International(\'create account part1 text\',\'Asset_Matrix\'); ^International(\'create account part2 text\',\'Asset_Matrix\');\n \n
    \n \n \n
    \n \n
    \n
    ^International(\'listing statistics label\',\'Asset_Matrix\');
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ^International(\'most clicks label\',\'Asset_Matrix\');\"> ()
    ^International(\'most views label\',\'Asset_Matrix\');\"> ()
    ^International(\'most compares label\',\'Asset_Matrix\');\"> ()
    \n \n
    ^International(\'most recently updated label\',\'Asset_Matrix\');
    \n \n \n \n \n \n \n \n
    \">
    \n \n
    ^International(\'best rated label\',\'Asset_Matrix\');
    \n \n \n \n \n \n \n \n
    \"> (/10)
    \n \n
    ^International(\'worst rated label\',\'Asset_Matrix\');
    \n \n \n \n \n \n \n \n
    \"> (/10)
    \n \n
    ^International(\'site statistics label\',\'Asset_Matrix\');
    \n \n \n \n \n \n
    ^International(\'listing count label\',\'Asset_Matrix\');
    \n \n\n \n
    ^International(\'pending listings label\',\'Asset_Matrix\');:
    \n \n \n \n \n \n \n \n \n
    \">
    \n
    \n
    \n\n
    \n\n
    \n
    \n
    \n\n','Matrix',1,1,'matrixtmpl000000000001',1281501162,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n

    \n\n
    \n\n
    \n
    \n\n
    \n
    \n\n\n
    \n
    \n\n\n\n\n\n\n\n\n
    \n
    \" enctype=\"multipart/form-data\" method=\"post\" name=\"doCompare\">

    \n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n\n^International(\'add new listing text\',\'Asset_Matrix\');\n\n^International(\'create account part1 text\',\'Asset_Matrix\'); ^International(\'create account part2 text\',\'Asset_Matrix\');\n\n
    \n\n
    \n
    \n
    ^International(\'listing statistics label\',\'Asset_Matrix\');
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(\'most clicks label\',\'Asset_Matrix\');\"> ()
    ^International(\'most views label\',\'Asset_Matrix\');\"> ()
    ^International(\'most compares label\',\'Asset_Matrix\');\"> ()
    \n
    ^International(\'most recently updated label\',\'Asset_Matrix\');
    \n\n\n\n\n\n\n\n
    \">
    \n
    ^International(\'best rated label\',\'Asset_Matrix\');
    \n\n\n\n\n\n\n\n
    \"> (/10)
    \n
    ^International(\'worst rated label\',\'Asset_Matrix\');
    \n\n\n\n\n\n\n\n
    \"> (/10)
    \n
    ^International(\'site statistics label\',\'Asset_Matrix\');
    \n\n\n\n\n\n
    ^International(\'listing count label\',\'Asset_Matrix\');
    \n\n
    ^International(\'pending listings label\',\'Asset_Matrix\');:
    \n\n\n\n\n\n\n\n\n
    \">
    \n
    \n
    \n
    \n
    \n
    \n
    ',0,NULL,'[]'),('\n\n\n
    \n \n \n

    \n
    \n \n

    \n \n \n [\n ^AssetProxy(new-matrix/matrix-nav);\n blockblockblock\">\n \n • \">^International(\'edit label\',\'Asset_MatrixListing\');\n \n \n • \">^International(\'approve or deny label\',\'Asset_Matrix\');\n \n \n ]\n \n

    \n \n
    \n \n \n \n
    \n
    \n \n
    \n
    \n ^International(\'description label\',\'Asset_MatrixListing\');\n \n
    \n \n \n \n
    \n
      \n
    • ^International(\'web site label\',\'Asset_MatrixListing\');\')\" href=\"#\"> 
    • \n
    • ^International(\'version label\',\'Asset_MatrixListing\'); 
    • \n
    • ^International(\'manufacturer label\',\'Asset_MatrixListing\');\')\" href=\"#\"> 
    • \n
    • ^International(\'last updated label\',\'Asset_MatrixListing\');
    • \n
    • ^International(\'clicks label\',\'Asset_Matrix\');
    • \n
    • ^International(\'views label\',\'Asset_Matrix\');
    • \n
    • ^International(\'compares label\',\'Asset_Matrix\');
    • \n
    \n
    \n \n
    \n
    \n
    \n
    \n ^International(Comments,WebGUI);\n \n ^International(Send Creator a Message,Asset_MatrixListing);\n
    \n \n
    ^International(\'message sent message\',\'Asset_MatrixListing\');
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    ','Matrix/Detail',1,1,'matrixtmpl000000000003',1281501163,'WebGUI::Asset::Template::HTMLTemplate',1,'\n
    \n\n

    \n
    \n

    \n\n\n[\n^AssetProxy(new-matrix/matrix-nav);\nblockblockblock\">\n\n• \">^International(\'edit label\',\'Asset_MatrixListing\');\n\n\n• \">^International(\'approve or deny label\',\'Asset_Matrix\');\n\n\n]\n\n

    \n
    \n\n\n\n
    \n
    \n
    \n
    \n^International(\'description label\',\'Asset_MatrixListing\');\n\n
    \n\n\n\n
    \n
      \n
    • ^International(\'web site label\',\'Asset_MatrixListing\');\')\" href=\"#\"> 
    • \n
    • ^International(\'version label\',\'Asset_MatrixListing\'); 
    • \n
    • ^International(\'manufacturer label\',\'Asset_MatrixListing\');\')\" href=\"#\"> 
    • \n
    • ^International(\'last updated label\',\'Asset_MatrixListing\');
    • \n
    • ^International(\'clicks label\',\'Asset_Matrix\');
    • \n
    • ^International(\'views label\',\'Asset_Matrix\');
    • \n
    • ^International(\'compares label\',\'Asset_Matrix\');
    • \n
    \n
    \n\n
    \n
    \n
    \n
    \n^International(Comments,WebGUI);\n\n^International(Send Creator a Message,Asset_MatrixListing);\n
    \n\n
    ^International(\'message sent message\',\'Asset_MatrixListing\');
    \n
    \n\n
    \n
    \n
    \n
    \n
    \n
    ',0,NULL,'[]'),('

    ^International(\'edit matrix listing title\',\'Asset_MatrixListing\');

    \r\n\r\n','Matrix/EditListing',1,1,'matrixtmpl000000000004',1281501163,'WebGUI::Asset::Template::HTMLTemplate',1,'

    ^International(\'edit matrix listing title\',\'Asset_MatrixListing\');

    \n',0,NULL,'[]'),('\n\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n\n
    \n
    ^International(search label,Asset_Matrix);
    \n
    \n \n
    \n \n \n \n \n \n \n \n \n \n \n
    \n
    \n
    \n
    \n
    \n

    \">^International(Return to Matrix,Asset_Matrix);

    \n
    \n\n\n\n','Matrix/Search',1,1,'matrixtmpl000000000005',1281501163,'WebGUI::Asset::Template::HTMLTemplate',1,'\n
    \n
    \n\n
    \n
    \n\n
    \n
    \n
    \n
    \n
    ^International(search label,Asset_Matrix);
    \n
    \n\n
    \n\n\n\n\n\n\n\n\n\n\n
    \n
    \n
    \n
    \n
    \n

    \">^International(Return to Matrix,Asset_Matrix);

    \n
    ',0,NULL,'[]'),('\n\n\n\n \">^International(Return to Matrix,Asset_Matrix);\n\n\n','Navigation',1,1,'alraubvBu-YJJ614jAHD5w',1281501163,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\">^International(Return to Matrix,Asset_Matrix);\n\n',0,NULL,'[]'),('\r\n\r\n\r\n ?func=getScreenshots\r\n \r\n 400\r\n 300\r\n 0xDDDDEE\r\n 20\r\n 800\r\n 600 \r\n Verdana\r\n 12\r\n 0xFFFFFF\r\n\r\n 0x888888\r\n 0x000000\r\n true\r\n over \r\n 0\r\n\r\n 0xFFFFFF\r\n 0x888888\r\n 0x000000\r\n true\r\n\r\n 20\r\n 200\r\n\r\n 60\r\n 45\r\n 0x888888\r\n false\r\n true\r\n 100\r\n 8\r\n\r\n off \r\n false\r\n true\r\n false\r\n true\r\n \r\n \r\n\r\n rounded \r\n','Matrix/ScreenshotsConfig',1,1,'matrixtmpl000000000007',1281501163,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n?func=getScreenshots\n400\n300\n0xDDDDEE\n20\n800\n600\nVerdana\n12\n0xFFFFFF\n0x888888\n0x000000\ntrue\nover\n0\n0xFFFFFF\n0x888888\n0x000000\ntrue\n20\n200\n60\n45\n0x888888\nfalse\ntrue\n100\n8\noff\nfalse\ntrue\nfalse\ntrue\n\n\nrounded\n',0,NULL,'[]'),('\n\n\n Screenshots\n \n\n\n\n\n
    \n\n \n \n &width=800&height=600\" />\n \n \n &width=800&height=600\" />\n \n \n \"Get\n \n \n \n \n \n
    \n \n \n\n\n','Matrix/Screenshots',1,1,'matrixtmpl000000000006',1281501163,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\nScreenshots\n\n\n\n
    \n\n\n&width=800&height=600\" />\n\n\n&width=800&height=600\" />\n\n\n\"Get\n\n\n\n\n\n
    \n\n\n\n',0,NULL,'[]'),('
    \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','Account/Layout',1,1,'N716tpSna0iIQTKxS4gTWA',1281501163,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n
    \n
    \n
    \n
    ',0,NULL,'[]'),(' ^International(new post,AssetAspect_Subscribable);\n\n\n\n\n','AssetAspect/Subscribable',1,1,'limMkk80fMB3fqNZVf162w',1281501163,'WebGUI::Asset::Template::HTMLTemplate',1,' ^International(new post,AssetAspect_Subscribable);\n\n',0,NULL,'[]'),('\" id=\"id\">\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
    ^International(\"99\",\"Asset\");^International(\"creation_date\",\"Asset_AssetReport\");^International(\"created_by\",\"Asset_AssetReport\");
    \">^D(\'%C %D, %y %h:%s %p\',);^User(\'username\',);
    \r\n\r\n\r\n

    \r\n \r\n
    \r\n
    \r\n','AssetReport',1,1,'sJtcUCfn0CVbKdb4QM61Yw',1283921584,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(\"99\",\"Asset\");^International(\"creation_date\",\"Asset_AssetReport\");^International(\"created_by\",\"Asset_AssetReport\");
    \">^D(\'%C %D, %y %h:%s %p\',);^User(\'username\',);
    \n\n

    \n \n
    \n
    ',0,NULL,'[]'),('
    \" class=\"storyTopic\">\n\" id=\"id\">\n

    \n\n

    \n
    \n

    \">^International(rss,WebGUI); •\n\">Atom

    \n\n\n
    \n

    \">

    \n

    \n
    \n
    \n\n ','StoryTopic',1,1,'A16v-YjWAShXWvSACsraeg',1285124154,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"storyTopic\">\n\" id=\"id\">\n

    \n\n

    \n
    \n

    \">^International(rss,WebGUI); •\n\">Atom

    \n\n\n
    \n

    \">

    \n

    \n
    \n
    \n\n',0,NULL,NULL),('
    \r\n \r\n \r\n
    \r\n
    \r\n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\r\n \r\n \r\n \r\n
    \r\n
    \r\n ^International(\'template search title\',\'Asset_Gallery\');\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
    ^International(\'template search field title\',\'Asset_Gallery\');
    ^International(\'template search field description\',\'Asset_Gallery\');
    ^International(\'template search field keywords\',\'Asset_Gallery\');
    ^International(\'template search field location\',\'Asset_Gallery\');
    ^International(\'template search field className\',\'Asset_Gallery\');\r\n \r\n
    ^International(\'template search field creationDate\',\'Asset_Gallery\');^International(\'template search to\',\'Asset_Gallery\');
     \r\n \r\n
    \r\n
    \r\n \r\n\r\n

    \r\n\r\n \r\n
    \r\n \r\n
    \r\n ^International(\'template search results for\',\'Asset_Gallery\'); \"\".\r\n
    \r\n\r\n

    Albums

    \r\n \r\n \r\n
    \r\n \" class=\"albumTitle\">\r\n \r\n \r\n \r\n
    \r\n
    \r\n \r\n \r\n \r\n ?func=edit\">Add a Description\r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n \r\n

    Pictures

    \r\n \r\n \r\n
    \r\n \" class=\"title\">\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
    ^International(\"template file creationDate\",\"Asset_GalleryAlbum\"); ^D(\"%M/%d/%Y\",);
    \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
    ','Gallery/Search',1,1,'jME5BEDYVDlBZ8jIQA9-jQ',1285124155,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n
    \n
    \n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\n\n\n\n
    \n
    \n^International(\'template search title\',\'Asset_Gallery\');\n
    \n\n\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(\'template search field title\',\'Asset_Gallery\');
    ^International(\'template search field description\',\'Asset_Gallery\');
    ^International(\'template search field keywords\',\'Asset_Gallery\');
    ^International(\'template search field location\',\'Asset_Gallery\');
    ^International(\'template search field className\',\'Asset_Gallery\');\n\n
    ^International(\'template search field creationDate\',\'Asset_Gallery\');^International(\'template search to\',\'Asset_Gallery\');
     \n\n
    \n
    \n\n

    \n\n
    \n
    \n ^International(\'template search results for\',\'Asset_Gallery\'); \"\".\n
    \n

    Albums

    \n\n\n\n\n\n
    \n

    Pictures

    \n\n\n
    \n\" class=\"title\">\n\n\n\n\n
    \n
    \n\n
    \n
    \n
    \n
    \n\n
    ^International(\"template file creationDate\",\"Asset_GalleryAlbum\"); ^D(\"%M/%d/%Y\",);
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n
    \n
    ',0,NULL,NULL),('\r\n \r\n\r\n\r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\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 \" class=\"albumTitle\">\r\n \r\n \r\n \r\n
    \r\n
    \r\n \r\n \r\n \r\n ?func=edit\">Add a Description\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
    ','Gallery/ListAlbums',1,1,'azCqD0IjdQSlM3ar29k5Sg',1285124155,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n',0,NULL,NULL),('\n \n\n\n','GalleryAlbum/View',1,1,'05FpjceLYhq4csF1Kww1KQ',1285124155,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n',0,NULL,NULL),('\r\n \r\n\r\n\r\n
    \r\n \r\n\r\n
    \r\n
    \r\n \" class=\"current\">^International(template url_thumbnails,Asset_GalleryAlbum);  ·  \r\n \">^International(template url_slideshow,Asset_GalleryAlbum);  ·  \r\n \">^International(template url,Asset_GalleryAlbum);    \r\n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\r\n \r\n \r\n \r\n
    \r\n
    \r\n ·\r\n ^International(template by,Asset_Gallery);: \">\r\n
    \r\n\r\n \r\n\r\n
    \r\n \" class=\"title\">\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
    ^International(\'template creationDate\',\'Asset_Photo\');: ^D(\"%z %Z\",);
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n\r\n
    \r\n \r\n \" class=\"thumb\">\r\n \" />\r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    ','GalleryAlbum/ViewThumbnails',1,1,'q5O62aH4pjUXsrQR3Pq4lw',1285124155,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n',0,NULL,NULL),('\r\n \r\n\r\n\r\n
    \r\n \r\n \r\n
    \r\n
    \r\n \">^International(template url_thumbnails,Asset_GalleryAlbum);  ·  \r\n \" class=\"current\">^International(template url_slideshow,Asset_GalleryAlbum);  ·  \r\n \">^International(template url,Asset_GalleryAlbum);    \r\n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\r\n \r\n \r\n \r\n
    \r\n
    \r\n ·\r\n ^International(template by,Asset_Gallery);: \"> \r\n
    \r\n\r\n \r\n\r\n
    \r\n
    \r\n \"Previous\r\n \r\n \"Next\r\n
    \r\n
    \r\n \r\n
    \r\n \r\n
    \r\n \">\" style=\"border: none\" /> \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    ','GalleryAlbum/ViewSlideshow',1,1,'KAMdiUdJykjN02CPHpyZOw',1285124155,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n',0,NULL,NULL),('
    \n \n \n
    \n
    \n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\n \n \n \n
    \n
    \n \n
    \n\n \n\n

    ^International(template listFilesForUser albums title,Asset_Gallery);

    \n \n \n \n \n \n
    \n \n

    ^International(template listFilesForUser pictures title,Asset_Gallery);

    \n \n \n
    \n \" class=\"title\">\n \n \n \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    ^International(\'template file creationDate\',\'Asset_GalleryAlbum\'); ^D(\"%z\", );
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n \n \n
    ','Gallery/ListFilesForUser',1,1,'OkphOEdaSGTXnFGhK4GT5A',1285124155,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n
    \n
    \n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\n\n\n\n
    \n
    \n\n
    \n\n

    ^International(template listFilesForUser albums title,Asset_Gallery);

    \n\n\n\n
    \n

    ^International(template listFilesForUser pictures title,Asset_Gallery);

    \n\n
    \n\" class=\"title\">\n\n\n\n\n
    \n
    \n\n
    \n
    \n
    \n
    \n\n
    ^International(\'template file creationDate\',\'Asset_GalleryAlbum\'); ^D(\"%z\", );
    \n
    \n
    \n
    \n
    \n
    \n
    \n\n
    ',0,NULL,NULL),('\n \n\n\n
    \n \n\n
    \n
    \n \">^International(\'template url_album\',\'Asset_Photo\');    \n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\n \n \n \n
    \n
    \n ·\n ^International(\'template by\',\'Asset_Gallery\');: \">\n
    \n\n
    \n
    \n

    \n \" class=\"thumbnail\">\" alt=\"Image\" />\n \n
    \n \n
    \n
    \n \" class=\"fullSize\">^International(\'template fileUrl\',\'Asset_Photo\');\n
    \n
    \n\n
    \n \n \">\n \"first\n \n \n \"first\n \n \n \">\n \"first\n \n \n \"first\n \n \n \">\n \"first\n \n \n \"first\n \n \n \">\n \"first\n \n \n \"first\n \n
    \n\n
    \n\n
    \n
    \n ^International(template view details,Asset_Photo);\n
    \n \n ^International(\'template creationDate\',\'Asset_Photo\');:\n \n \n ^D(\"%z %Z\",);\n \n
    \n
    \n \n ^International(\'template views\',\'Asset_Photo\');:\n \n \n \n \n
    \n
    \n \n ^International(\'template by\',\'Asset_Gallery\');:\n \n \n \">\n (\">^International(\'template filesForUser\', \'Asset_Photo\');)\n \n
    \n
    \n \n ^International(\'template friendsOnly label\',\'Asset_Photo\');:\n \n \n ^International(\'template friendsOnly yes\',\'Asset_Photo\');^International(\'template friendsOnly no\',\'Asset_Photo\');\n \n
    \n
    \n \n ^International(\'template location\',\'Asset_Photo\');:\n \n \n \n \n
    \n
    \n \n ^International(template view available resolutions,Asset_Photo);\n \n \n \n \">\n \n \n
    \n
    \n \n
    \n ^International(\'template keywords\',\'Asset_Photo\');\n \n \">, \n \n
    \n
    \n
    \n ^International(more details,Asset_Photo);\n
    \n \n
    rowOnerowTwo\">\n \n :\n \n \n \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n ^International(\'template comments title\',\'Asset_Photo\'); [^International(post,Asset_Collaboration);]\n
    \n \n
    \n \n
    \n \n
    \n
    \n \n
    \n
    \n \n \n \n
    \n
    ','GalleryFile/View',1,1,'TEId5V-jEvUULsZA0wuRuA',1285124155,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n
    \n\n
    \n
    \n\">^International(\'template url_album\',\'Asset_Photo\');    \n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\n\n\n\n
    \n
    \n ·\n^International(\'template by\',\'Asset_Gallery\');: \">\n
    \n\n
    \n
    \n^International(template view details,Asset_Photo);\n
    \n\n^International(\'template creationDate\',\'Asset_Photo\');:\n\n\n^D(\"%z %Z\",);\n\n
    \n
    \n\n^International(\'template views\',\'Asset_Photo\');:\n\n\n\n\n
    \n
    \n\n^International(\'template by\',\'Asset_Gallery\');:\n\n\n\">\n(\">^International(\'template filesForUser\', \'Asset_Photo\');)\n\n
    \n
    \n\n^International(\'template friendsOnly label\',\'Asset_Photo\');:\n\n\n^International(\'template friendsOnly yes\',\'Asset_Photo\');^International(\'template friendsOnly no\',\'Asset_Photo\');\n\n
    \n
    \n\n^International(\'template location\',\'Asset_Photo\');:\n\n\n\n\n
    \n
    \n\n^International(template view available resolutions,Asset_Photo);\n\n\n\n\">\n\n\n
    \n
    \n\n
    \n^International(\'template keywords\',\'Asset_Photo\');\n\n\">, \n\n
    \n
    \n
    \n^International(more details,Asset_Photo);\n
    \n\n
    rowOnerowTwo\">\n\n:\n\n\n\n\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n^International(\'template comments title\',\'Asset_Photo\'); [^International(post,Asset_Collaboration);]\n
    \n\n
    \n\n
    \n\n
    \n
    \n\n
    \n
    \n\n\n\n
    \n
    ',0,NULL,NULL),('\n\n\n
    \n \n\n
    \n
    \n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\n \n \n \n
    \n
    \n \n ^International(\'template add\',\'Asset_GalleryAlbum\');\n \n ^International(\'template edit\',\'Asset_GalleryAlbum\');\n \n
    \n\n

    \n\n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n
    ^International(\'editForm title label\',\'Asset_GalleryAlbum\');
    ^International(\'editForm description label\',\'Asset_GalleryAlbum\');
    ^International(\'editForm othersCanAdd label\',\'Asset_GalleryAlbum\');
    \n
    \n \n
      \n \n
    1. \" class=\"galleryOrg\">\n
      \n \" href=\"?func=edit;proceed=editParent\">\" alt=\"\" />\n
      \n

      \n
      \n
      \n \n
      \n
      \n
    2. \n
      \n
    \n
    \n
    \n\n
    \n \n
    \n \n
    ','GalleryAlbum/Edit',1,1,'6X-7Twabn5KKO_AbgK3PEw',1285124155,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n
    \n\n
    \n
    \n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\n\n\n\n
    \n
    \n\n^International(\'template add\',\'Asset_GalleryAlbum\');\n\n^International(\'template edit\',\'Asset_GalleryAlbum\');\n\n
    \n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(\'editForm title label\',\'Asset_GalleryAlbum\');
    ^International(\'editForm description label\',\'Asset_GalleryAlbum\');
    ^International(\'editForm othersCanAdd label\',\'Asset_GalleryAlbum\');
    \n
    \n\n
      \n\n
    1. \" class=\"galleryOrg\">\n
      \n\" href=\"?func=edit;proceed=editParent\">\" alt=\"\" />\n
      \n

      \n
      \n
      \n\n
      \n
      \n
    2. \n
      \n
    \n
    \n
    \n
    \n\n
    \n\n
    ',0,NULL,NULL),('
    \n \n\n
    \n
    \n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\n \n \n \n
    \n
    \n \n ^International(\'template add\',\'Asset_GalleryAlbum\');\n \n ^International(\'template edit\',\'Asset_GalleryAlbum\');\n \n
    \n\n

    \n\n

    \n\n \n

    ^International(\'template error happened\',\'Asset_Photo\');

    \n
      \n \n
    • \n
      \n
    \n
    \n\n \n\n \n\n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ^International(\'template upload type\',\'Asset_GalleryAlbum\');\n ^International(\'template upload single\',\'Asset_GalleryAlbum\');\n \" class=\"adminButton\">^International(\'template upload archive\',\'Asset_GalleryAlbum\');\n
    ^International(\'editForm title label\',\'Asset_Photo\');\n \n
    ^International(\'editForm synopsis label\',\'Asset_Photo\');\n \n
    ^International(\'editForm photo new\',\'Asset_Photo\'); ^International(\'editForm photo replace\',\'Asset_Photo\');\n \n
    ^International(\'editForm keywords\',\'Asset_Photo\');\n \n
    ^International(\'editForm location\',\'Asset_Photo\');\n \n
    ^International(\'editForm friendsOnly\',\'Asset_Photo\');\n \n
    \n\n \n\n \n\n
    ','GalleryFile/Edit',1,1,'7JCTAiu1U_bT9ldr655Blw',1285124155,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n
    \n
    \n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\n\n\n\n
    \n
    \n\n^International(\'template add\',\'Asset_GalleryAlbum\');\n\n^International(\'template edit\',\'Asset_GalleryAlbum\');\n\n
    \n

    \n

    \n\n

    ^International(\'template error happened\',\'Asset_Photo\');

    \n
      \n\n
    • \n
      \n
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(\'template upload type\',\'Asset_GalleryAlbum\');\n^International(\'template upload single\',\'Asset_GalleryAlbum\');\n\" class=\"adminButton\">^International(\'template upload archive\',\'Asset_GalleryAlbum\');\n
    ^International(\'editForm title label\',\'Asset_Photo\');\n\n
    ^International(\'editForm synopsis label\',\'Asset_Photo\');\n\n
    ^International(\'editForm photo new\',\'Asset_Photo\'); ^International(\'editForm photo replace\',\'Asset_Photo\');\n\n
    ^International(\'editForm keywords\',\'Asset_Photo\');\n\n
    ^International(\'editForm location\',\'Asset_Photo\');\n\n
    ^International(\'editForm friendsOnly\',\'Asset_Photo\');\n\n
    \n\n\n
    ',0,NULL,NULL),('
    \r\n

    ^International(\'template addArchive title\',\'Asset_GalleryAlbum\');

    \r\n\r\n

    ^International(\'template addArchive body\',\'Asset_GalleryAlbum\');

    \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
    ^International(\'template upload type\',\'Asset_GalleryAlbum\');\r\n \" class=\"adminButton\">^International(\'template upload single\',\'Asset_GalleryAlbum\');\r\n ^International(\'template upload archive\',\'Asset_GalleryAlbum\');\r\n
    ^International(\'addArchive file\',\'Asset_GalleryAlbum\');\r\n \r\n
    ^International(\'addArchive keywords\',\'Asset_GalleryAlbum\');\r\n \r\n
    ^International(\'addArchive location\',\'Asset_GalleryAlbum\');\r\n \r\n
    ^International(\'addArchive sortBy\',\'Asset_GalleryAlbum\');
    ^International(\'addArchive friendsOnly\',\'Asset_GalleryAlbum\');
    \r\n \r\n
    \r\n \r\n
    \r\n \r\n \r\n\r\n
    ','GalleryAlbum/AddArchive',1,1,'0X4Q3tBWUb_thsVbsYz9xQ',1285124155,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n

    ^International(\'template addArchive title\',\'Asset_GalleryAlbum\');

    \n

    ^International(\'template addArchive body\',\'Asset_GalleryAlbum\');

    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(\'template upload type\',\'Asset_GalleryAlbum\');\n\" class=\"adminButton\">^International(\'template upload single\',\'Asset_GalleryAlbum\');\n^International(\'template upload archive\',\'Asset_GalleryAlbum\');\n
    ^International(\'addArchive file\',\'Asset_GalleryAlbum\');\n\n
    ^International(\'addArchive keywords\',\'Asset_GalleryAlbum\');\n\n
    ^International(\'addArchive location\',\'Asset_GalleryAlbum\');\n\n
    ^International(\'addArchive sortBy\',\'Asset_GalleryAlbum\');
    ^International(\'addArchive friendsOnly\',\'Asset_GalleryAlbum\');
    \n
    \n\n
    \n\n
    ',0,NULL,NULL),('
    \n \n\n
    \n
    \n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\n \n \n \n
    \n
    \n ^International(template makeShortcut title,Asset_Photo);\n
    \n\n

    \n\n
    \n\n \n \n \n \n \n \n \n \n \n \n
    ^International(template makeShortcut file,Asset_Photo);
    ^International(template makeShortcut album,Asset_Photo);
    \n\n
    \n \n
    \n\n \n
    \n
    ','GalleryFile/MakeShortcut',1,1,'m3IbBavqzuKDd2PGGhKPlA',1285124155,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n
    \n
    \n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\n\n\n\n
    \n
    \n^International(template makeShortcut title,Asset_Photo);\n
    \n

    \n
    \n\n\n\n\n\n\n\n\n\n\n
    ^International(template makeShortcut file,Asset_Photo);
    ^International(template makeShortcut album,Asset_Photo);
    \n
    \n \n
    \n\n
    \n
    ',0,NULL,NULL),('
    \n \n \n
    \n
    \n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\n \n \n \n
    \n
    \n^International(template url_delete,Asset_GalleryAlbum);\n
    \n\n

    \n\n \n\n
    ','GalleryAlbum/Delete',1,1,'UTNFeV7B_aSCRmmaFCq4Vw',1285124155,'WebGUI::Asset::Template::HTMLTemplate',1,'',0,NULL,NULL); -INSERT INTO `template` VALUES ('
    \n \n \n
    \n
    \n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\n \n \n \n
    \n
    \n^International(template url_delete,Asset_Photo);\n
    \n\n

    \n\n \n
    ','GalleryFile/Delete',1,1,'zcX-wIUct0S_np14xxOA-A',1285124155,'WebGUI::Asset::Template::HTMLTemplate',1,'',0,NULL,NULL),('\r\n\r\n\r\n<tmpl_var title>\r\n\r\n\r\n\r\n\r\n\r\n<tmpl_var title>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n','GalleryAlbum/ViewRss',1,1,'mM3bjP_iG9sv5nQb4S17tQ',1285124158,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n<tmpl_var title>\n\n\n\n\n<tmpl_var title>\n\n\n\n\n\n\n\n',0,NULL,NULL),('\r\n\r\n\r\n<tmpl_var title>\r\n\r\n\r\n\r\n\r\n\r\n<tmpl_var title>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n','Gallery/ListAlbumsRss',1,1,'ilu5BrM-VGaOsec9Lm7M6Q',1285124158,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n<tmpl_var title>\n\n\n\n\n<tmpl_var title>\n\n\n\n\n\n\n\n',0,NULL,NULL),('\r\n\r\n\r\n<tmpl_var title>\r\n\r\n\r\n\r\n\r\n\r\n<tmpl_var title>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n','Gallery/ListFilesForUserRss',1,1,'-ANLpoTEP-n4POAdRxCzRw',1285124158,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n<tmpl_var title>\n\n\n\n\n<tmpl_var title>\n\n\n\n\n\n\n\n',0,NULL,NULL),('
    \n \n\n
    \n
    \n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\n \n \"\"\n \n \"\"\n \"\"\n \n \"\"\n
    \n
    \n
    \n\n

    \n\n
    \n ^International(\"template comment add title\",\"Asset_Photo\");\n ^International(\"template comment edit title\",\"Asset_Photo\");\n \n \n
    \n
    \n \n
    \n \n
    \n
    \n \n
    \n
    ','GalleryFile/EditComment',1,1,'OxJWQgnGsgyGohP2L3zJPQ',1285124158,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n
    \n
    \n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\n\n\"\"\n\n\"\"\n\"\"\n\n\"\"\n
    \n
    \n
    \n

    \n
    \n^International(\"template comment add title\",\"Asset_Photo\");\n^International(\"template comment edit title\",\"Asset_Photo\");\n\n\n
    \n
    \n\n
    \n\n
    \n
    \n\n
    \n
    ',0,NULL,NULL),('\r\n\r\n\r\n\r\n^Page(title); · ^c();\r\n\r\n\r\n\r\n\r\n\r\n^AdminBar();\r\n\r\n
    \r\n

    ^c();

    \r\n ^u();\r\n
    \r\n\r\n
    \r\n \r\n
    \r\n\r\n
    \r\n ©^D(%y); ^c();\r\n
    \r\n\r\n\r\n \r\n\r\n\r\n\r\n\r\n','style',1,1,'PBtmpl0000000000000111',1286336607,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n^Page(title); · ^c();\n\n\n\n\n^AdminBar();\n
    \n

    ^c();

    \n^u();\n
    \n
    \n\n
    \n
    \n©^D(%y); ^c();\n
    \n\n\n\n\n',0,NULL,'[]'),('

    \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
    ','Auth/LDAP/Account',1,1,'PBtmpl0000000000000004',1287545014,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n\n

    \n\n\n

    \n\n\n\n\n\n
    \n\n\n\n
    \n
    \n
    \n\n
    ',0,NULL,NULL),('

    \n \n

    \n\n \n\n\n\n\n\n\n \n \n\n\n \n \n\n\n \n \n\n\n\n \n \n\n\n\n \n \n\n
    \n\n\n\n
    \n \n
    ','Auth/LDAP/Create',1,1,'PBtmpl0000000000000005',1287545014,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n
    \n\n
    ',0,NULL,NULL),('

    \n \n

    \n\n \n\n\n\n\n\n\n \n \n\n\n \n \n\n\n \n \n\n
    \n\n\n
    \n
      \n \n
    • \">
    • \n
      \n\n
    \n
    ','Auth/LDAP/Login',1,1,'PBtmpl0000000000000006',1287545014,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n
    \n\n
    ',0,NULL,NULL),('

    \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','Auth/WebGUI/Account',1,1,'PBtmpl0000000000000010',1287545014,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n
    \n\n
    ',0,NULL,NULL),('

    \n\n\n \n\n\n\n\n\n\n\n \n \n\n\n\n \n \n\n\n \n \n\n\n\n \n \n\n\n\n\n \n \n\n\n\n \n\n\n \n\n
     
    \n\n\n
    \n \n
    \n','Auth/WebGUI/Create',1,1,'PBtmpl0000000000000011',1287545014,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
     
    \n\n
    \n\n
    ',0,NULL,NULL),('^International(\'50\',\'WebGUI\');: \r\n^International(\'51\',\'WebGUI\');: \r\n\r\n','Auth/WebGUI/Welcome',1,1,'PBtmpl0000000000000015',1287545014,'WebGUI::Asset::Template::HTMLTemplate',1,'^International(\'50\',\'WebGUI\');: \n^International(\'51\',\'WebGUI\');: \n',0,NULL,NULL),('^International(\'email address validation email body\',\'AuthWebGUI\');\r\n\r\n','Auth/WebGUI/Activation',1,1,'PBtmpl0000000000000016',1287545014,'WebGUI::Asset::Template::HTMLTemplate',1,'^International(\'email address validation email body\',\'AuthWebGUI\');\n',0,NULL,NULL),('

    \n \n

    \n\n\n \n\n\n\n\n\n\n \n \n\n\n \n \n\n\n \n \n\n\n \n \n\n
    \n \n \n \n
    \n \n \n \n
    \n \n \n \n
    \n \n
    \n','Auth/WebGUI/Expired',1,1,'PBtmpl0000000000000012',1287545014,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\n\n
    \n\n\n\n
    \n\n\n\n
    \n\n
    \n',0,NULL,NULL),('

    \n \n

    \n\n\n \n\n\n\n\n\n\n \n \n\n\n \n \n\n\n \n \n\n
    \n\n\n
    \n \n
    ','Auth/WebGUI/Login',1,1,'PBtmpl0000000000000013',1287545014,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n
    \n\n
    ',0,NULL,NULL),('

    \n\n

    \n
    \n\n\n\n\n\n\n\n\n \n \n\n\n \n \n\n\n\n\n \n \n\n\n\n\n \n \n\n\n\n\n \n \n\n
    \n\n\n
    \n \n
    \n','Auth/WebGUI/Recovery2',1,1,'PBtmpl0000000000000014',1287545015,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n
    \n\n
    ',0,NULL,NULL),('

    \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','Auth/WebGUI/Deactivate',1,1,'zaHUYsE_PgKk8hnVd8ffEQ',1287545015,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n

    \n\n

    \n
    \n\">\n         \n\">\n
    ',0,NULL,NULL),('

    \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','Auth/LDAP/Deactivate',1,1,'_P4PMiraGsLTfOjK4fYQPQ',1287545015,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n

    \n\n

    \n
    \n\">\n         \n\">\n
    ',0,NULL,NULL),('^International(recover password email text1,AuthWebGUI,^u;);\n\n^International(recover password email text2,AuthWebGUI);\n\n\n\n^International(recover password email text3,AuthWebGUI);','Auth/WebGUI/RecoveryEmail',1,1,'sK_0zVw4kwdJ1sqREIsSzA',1287545015,'WebGUI::Asset::Template::HTMLTemplate',1,'^International(recover password email text1,AuthWebGUI,^u;);\n^International(recover password email text2,AuthWebGUI);\n\n^International(recover password email text3,AuthWebGUI);',0,NULL,NULL),('\n\n\n\n\">','NotifyAboutVersionTag',1,1,'lYhMheuuLROK_iNjaQuPKg',1287545015,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n',0,NULL,'[]'),('

    \n\n\n \n \n \n \n \n \n\n
    :
    \n\n\n

    \n\n\n \n \n \n \n \n \n\n
    :
    \n
    ','DataForm',1,1,'PBtmpl0000000000000085',1288747840,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n\n\n\n\n\n\n\n\n
    :
    \n
    \n\n

    \n\n\n\n\n\n\n\n\n
    :
    \n
    \n
    ',0,NULL,NULL),('\n

    \n
    \n\n

    \n
    \n\n

    \n
    \n\n\n\n\n\n','EMS',1,1,'2rC4ErZ3c77OJzJm7O5s3w',1288747841,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n

    \n
    \n\n',0,NULL,NULL),('

    Friends for

    \n

    \">^International(back to friend manager,Account_FriendManager);

    \n\n\n
    \n

    ^International(remove friends,Account_FriendManager);

    \n\n\n\n\n\n\n\n\n\n\n\n
    ^International(remove all,Account_FriendManager);
    \n
    \n
    \n
    \n

    ^International(add new friends,Account_FriendManager);

    \n\n

    ^International(group,WebGUI);: . \">^International(view users from all groups,Account_FriendManager);

    \n
    \n\n\n

    ^International(Add Friend Managers,Account_FriendManager);:

    \n
    \n
    \n
    \n\n','Account/FriendManager/Edit',1,1,'lG2exkH9FeYvn4pA63idNg',1289967962,'WebGUI::Asset::Template::HTMLTemplate',1,'

    Friends for

    \n

    \">^International(back to friend manager,Account_FriendManager);

    \n\n\n
    \n

    ^International(remove friends,Account_FriendManager);

    \n\n\n\n\n\n\n\n\n\n\n\n
    ^International(remove all,Account_FriendManager);
    \n
    \n
    \n
    \n

    ^International(add new friends,Account_FriendManager);

    \n\n

    ^International(group,WebGUI);: . \">^International(view users from all groups,Account_FriendManager);

    \n
    \n\n\n

    ^International(Add Friend Managers,Account_FriendManager);:

    \n
    \n
    \n
    \n\n',0,NULL,NULL),('\r\n

    \r\n

    \r\n\r\n\r\n

    \r\n \">^International(\"add entry\",\"Asset_DataForm\");\r\n • \">\r\n \r\n • \" onclick=\"\">\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
    ^International(Entry ID,Asset_DataForm);\r\n \r\n \r\n \r\n \r\n \r\n ^International(Submission Date,Asset_DataForm);
    \">
    \r\n\r\n
    \r\n [ | | ]\r\n
    \r\n
    \r\n','DataForm/List',1,1,'PBtmpl0000000000000021',1294721945,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n

    \n\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(Entry ID,Asset_DataForm);\n\n\n\n\n\n^International(Submission Date,Asset_DataForm);
    \">
    \n\n
    \n[ | | ]\n
    \n
    ',0,NULL,'[]'),('\n\n \n\n\n \n\n\n \n\n\n \n\n
    \n \">^International(label day,Asset_Calendar);\n \">^International(label week,Asset_Calendar);\n \">^International(label month,Asset_Calendar);\n \">^International(486,WebGUI);\n \">^International(label search,Asset_Calendar);\n \n \n
    \n \n \n
    \n ^International(event details,Asset_Event);\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n\n \n \n \n \n\n \n \n \n \n\n
    \n
    ^International(event title,Asset_Event);
    \n
    \n
    \n \n
    \n
    \n
    ^International(location,Asset_Event);
    \n
    \n
    \n \n
    \n
    \n
    ^International(description,Asset_Event);
    \n
    \n
    \n
    \n
    ^International(scheduled,Asset_Event);
    \n
    \n
    \n \n
    \n
    \n
    ^International(related material,Asset_Event);
    \n
    \n \n
    \n
    ^International(attachments,Asset_Event);
    \n
    \n
    \n
    ','Calendar/Event',1,1,'CalendarEvent000000001',1295931508,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\">^International(label day,Asset_Calendar);\n\">^International(label week,Asset_Calendar);\n\">^International(label month,Asset_Calendar);\n\">^International(486,WebGUI);\n\">^International(label search,Asset_Calendar);\n\n
    \n\n\n
    \n^International(event details,Asset_Event);\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n
    ^International(event title,Asset_Event);
    \n
    \n
    \n\n
    \n
    \n
    ^International(location,Asset_Event);
    \n
    \n
    \n\n
    \n
    \n
    ^International(description,Asset_Event);
    \n
    \n
    \n
    \n
    ^International(scheduled,Asset_Event);
    \n
    \n
    \n\n
    \n
    \n
    ^International(related material,Asset_Event);
    \n
    \n\n
    \n
    ^International(attachments,Asset_Event);
    \n
    \n
    \n
    ',0,NULL,NULL),('
    \n\n\n
    _pagination\">
    \n
    \">
    \n
    \n\n
    ','Account/FriendManager/View',1,1,'64tqS80D53Z0JoAs2cX2VQ',1295931508,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n\n
    \">
    \n
    \n\n
    ',0,NULL,NULL),('\n','Calendar/List',1,1,'kj3b-X3i6zRKnhLb4ZiCLw',1295931508,'WebGUI::Asset::Template::HTMLTemplate',1,'',0,NULL,'[]'),('\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n\n \n\n\n

    \n \n \">\n •\n \n \n \n \">\n \n \">\n \n •\n \n \">\n

    \n\n\n\n \n \n \n \n \n \n \n \n\n\n\n\n \n \n \n \n \n \n \n \n\n\n
    oddThreadevenThread\">oddThreadevenThread\">\"> ()oddThreadevenThread\">oddThreadevenThread\">oddThreadevenThread\">oddThreadevenThread\">
    \n\n\n
    \n · · \n
    \n
    \n','Collaboration',1,1,'PBtmpl0000000000000077',1298351263,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n\n\n

    \n\n\">\n•\n\n\n\n\">\n\n\">\n\n•\n\n\">\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    oddThreadevenThread\">oddThreadevenThread\">\"> ()oddThreadevenThread\">oddThreadevenThread\">oddThreadevenThread\">
    \n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('
    \n \n

    \n
    \n\n \n

    ^International(View,Icon);

    \n
    \n\n \n
    \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n wgRowOnewgRowTwo\">\n \n \">\n \n \n \n
    \n
    \n\n
    \n','Thingy/ViewThing',1,1,'ThingyTmpl000000000002',1299559129,'WebGUI::Asset::Template::HTMLTemplate',1,'',0,NULL,NULL),('
    \" class=\"image\">\n\" id=\"id\">\n\n\n
    \n
    \n\n\" alt=\"\" />\n\n\n
    ','ImageAsset',1,1,'PBtmpl0000000000000088',1300763663,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"image\">\n\" id=\"id\">\n\n
    \n
    \n\" />\n\n
    ',0,NULL,NULL),('
    \n \" id=\"id\">\n \n \n \n \n \n \n \n
    \n
    ^International(hide new content list,Asset_Dashboard);
    \n \n
    \n
    \n
    \n \n \n \n \">\n \n \n \n \n
    \n
    _div\" class=\"dragable\">\n
    \n
    \n _span\">\n \n \n \n \n \',\'\')\">\n \"\"\n \n \n \n \n \"\"\n \n \n \n \',\'\')\">\n \"\"\n \n \n \n \',\'\');\">\n \"\"\n \n \n \n
    \n
    \n \n
    _div\">\n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n \n \n \n \n
    \n
    ^International(Add New Content,Asset_Dashboard);
    \n
    \n \n

    \n
    \n \n \n

    \n
    \n \n \n

    \n
    \n \n
    \n \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n \n \n \">\n \n \n \n \n
    \n
    _div\" class=\"dragable\">\n \n
    \n
    \n _span\">\n \n \n \n \n \',\'\')\">\n \"\"\n \n \n \n \n \"\"\n \n \n \n \',\'\')\">\n \"\"\n \n \n \n \',\'\');\">\n \"\"\n \n \n
    \n
    \n
    \n
    \n \n
    _div\">\n \n
    \n \n
    \n
    \n
    \n \n \n \n \">\n \n \n \n \n
    \n
    _div\" class=\"dragable\">\n
    \n
    \n \n _span\">\n \n \n \n \n \n \n \',\'\')\">\n \"\"\n \n \n \n \n \n \"\"\n \n \n \n \n \',\'\')\">\n \"\"\n \n \n \n \n \',\'\');\">\n \"\"\n \n \n
    \n
    \n
    \n
    \n \n
    _div\">\n \n
    \n \n
    \n
    \n
    \n \n \n \n \">\n \n \n \n \n
    \n
    _div\" class=\"dragable\">\n
    \n
    \n \n _span\">\n \n \n \n \n \n \n \',\'\')\">\n \"\"\n \n \n \n \n \n \"\"\n \n \n \n \n \',\'\')\">\n \"\"\n \n \n \n \n \',\'\');\">\n \"\"\n \n \n
    \n
    \n
    \n
    \n \n
    _div\">\n \n
    \n \n
    \n
    \n
    \n
    \n \n \n \n \n \n \n
    \n
    \n
     
    \n
    \n
    \n \n \n
    \n
    ','Dashboard',1,1,'DashboardViewTmpl00001',1300763664,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\" id=\"id\">\n\n\n\n\n\n
    \n
    ^International(hide new content list,Asset_Dashboard);
    \n
    \n
    \n
    \n\n\n\n\">\n\n\n\n\n
    \n
    _div\" class=\"dragable\">\n
    \n
    \n_span\">\n\n\n\n\n\',\'\')\">\n\"\"\n\n\n\n\n\"\"\n\n\n\n\',\'\')\">\n\"\"\n\n\n
    \n\n\',\'\');\">\n\"\"\n\n\n
    \n
    \n
    \n\n
    _div\">\n\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n\n\n\n\n\n
    \n
    ^International(Add New Content,Asset_Dashboard);
    \n
    \n\n

    \n
    \n\n

    \n
    \n\n

    \n
    \n
    \n
    \n\n\n\n\n\n\n\n\n
    \n\n\n\n\">\n\n\n\n\n
    \n
    _div\" class=\"dragable\">\n
    \n
    \n_span\">\n\n\n\n\n\',\'\')\">\n\"\"\n\n\n\n\n\"\"\n\n\n\n\',\'\')\">\n\"\"\n\n\n\n\',\'\');\">\n\"\"\n\n\n
    \n
    \n
    \n
    \n
    _div\">\n\n
    \n
    \n
    \n
    \n\n\n\n\">\n\n\n\n\n
    \n
    _div\" class=\"dragable\">\n
    \n
    \n\n_span\">\n\n\n\n\n\n\',\'\')\">\n\"\"\n\n\n\n\n\"\"\n\n\n\n\',\'\')\">\n\"\"\n\n\n\n\',\'\');\">\n\"\"\n\n\n
    \n
    \n
    \n
    \n
    _div\">\n\n
    \n
    \n
    \n
    \n\n\n\n\">\n\n\n\n\n
    \n
    _div\" class=\"dragable\">\n
    \n
    \n\n_span\">\n\n\n\n\n\n\',\'\')\">\n\"\"\n\n\n\n\n\"\"\n\n\n\n\',\'\')\">\n\"\"\n\n\n\n\',\'\');\">\n\"\"\n\n\n
    \n
    \n
    \n
    \n
    _div\">\n\n
    \n
    \n
    \n
    \n
    \n\n\n\n\n\n
    \n
    \n
     
    \n
    \n
    \n\n
    \n
    ',0,NULL,'[]'),('\r\n\r\n\r\n\r\n^Page(title); - ^c;\r\n\r\n\r\n\r\n\r\n\r\n\r\n^AdminBar;\r\n\r\n
    \r\n\r\n \r\n
    \r\n ^AssetProxy(style-underground/top-navigation); \r\n
    \r\n \r\n
    \r\n \r\n
    yourname
    \r\n \r\n
    \r\n \r\n

    \r\n

    \r\n
    \r\n \r\n
    \r\n\r\n
    \r\n ^AssetProxy(style-underground/side-navigation);\r\n

    ^GroupText(\"Registered Users\",\"Hello, ^@;\",\"Login\");

    \r\n
    \r\n
      \r\n
    • ^LoginToggle();
    • \r\n ^a(\"View My Account\",\"style-underground/templates/view-my-account\");\r\n ^AdminToggle(\"\",\"\",\"style-underground/templates/admintoggle-underground-admin-toggle\");\r\n
    \r\n
    \r\n

    WebGUI Links

    \r\n \r\n
    \r\n \r\n
    \r\n\r\n
    \r\n \r\n\r\n
    \r\n \r\n

    \r\n © 2006 ^c;    \r\n Design by: styleshout |\r\n Valid XHTML |\r\n CSS\r\n       \r\n \r\n

    \r\n \r\n
    \r\n \r\n\r\n\r\n','style',1,1,'Qk24uXao2yowR6zxbVJ0xA',1301973997,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n^Page(title); - ^c;\n\n\n\n\n\n^AdminBar;\n\n
    \n\n
    \n^AssetProxy(style-underground/top-navigation);\n
    \n
    \n
    yourname
    \n
    \n\n

    \n

    \n
    \n
    \n
    \n^AssetProxy(style-underground/side-navigation);\n

    ^GroupText(\"Registered Users\",\"Hello, ^@;\",\"Login\");

    \n
    \n
      \n
    • ^LoginToggle();
    • \n^a(\"View My Account\",\"style-underground/templates/view-my-account\");\n^AdminToggle(\"\",\"\",\"style-underground/templates/admintoggle-underground-admin-toggle\");\n
    \n
    \n

    WebGUI Links

    \n\n
    \n
    \n\n
    \n\n
    \n

    \n© 2006 ^c;   \nDesign by: styleshout |\nValid XHTML |\nCSS\n      \n\n

    \n
    \n\n',0,'1riOzIrN9EgfdnGFyOq-_g','[]'),(' \n \n','Navigation',1,1,'39KNX53B4nYJAyIE1lu8ZQ',1301973997,'WebGUI::Asset::Template::HTMLTemplate',1,'\n',0,NULL,NULL),(' \r\n

    \r\n
    \r\n \r\n
    \r\n
    \r\n','Navigation',1,1,'ztfi__vHJLsQDsMenrEn-w',1301973997,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n
    ',0,NULL,NULL),('
  • \">
  • ','AdminToggle',1,1,'8qyrDCNeggB4dzKiOoRuiQ',1301973997,'WebGUI::Asset::Template::HTMLTemplate',1,'
  • \">
  • ',0,NULL,NULL),('
  • \">
  • ','Macro/a_account',1,1,'M1NyNeS5jpdIsiIWFiJprw',1301973997,'WebGUI::Asset::Template::HTMLTemplate',1,'
  • \">
  • ',0,NULL,NULL),('
    \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
    1. \" style=\"width:px; height:px;\">\r\n \r\n
    2. \r\n
      \r\n
    \r\n
    \r\n\r\n \r\n\r\n
    \r\n\r\n
    ','Carousel',1,1,'CarouselTmpl0000000001',1301973997,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n

    \n
    \n\n

    \n
    \n\n
    \n
    \n\n
    \">\n
      \n\n
    1. \" style=\"width:px; height:px;\">\n\n
    2. \n
      \n
    \n
    \n\n
    \n
    ',0,NULL,'[]'),('\n\n\n\n \n WebGUI - style Greenportal\n \n\n\n \n ^AdminBar;\n
    \n
    \n
    \n ^H(^c(););\n \n
    \n
    \n\n
    \n ^AssetProxy(greenportal_navigation);\n
    \n\n
    \n
    \n Currently viewing: ^AssetProxy(greenportal_navigationtop);\n
    \n\n
    \n \n
    \n
    \n\n
    \n © 2008 ^c; | Design from Joomla! Open Source\n
    \n
    \n\n\n','style',1,1,'KKt0VB_eoQxw9xEsHsAhag',1301973998,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\nWebGUI - style Greenportal\n\n\n\n^AdminBar;\n
    \n
    \n
    \n^H(^c(););\n\n
    \n
    \n
    \n^AssetProxy(greenportal_navigation);\n
    \n
    \n
    \nCurrently viewing: ^AssetProxy(greenportal_navigationtop);\n
    \n
    \n\n
    \n
    \n
    \n© 2008 ^c; | Design from Joomla! Open Source\n
    \n
    \n\n',0,'dHuYEH6gNfRu9NHXOVFa9g',NULL),('\r\n

    \r\n
    \r\n\r\n

    \r\n
    \r\n\r\n
    \r\n
    \r\n\r\n\r\n','Navigation',1,1,'_z3ukLCqvoaUygfsbbkBzw',1301973999,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n
    \n
    \n
      \n
    • Main Menu
    • \n\n\n
    • \"indent1\"\"indent2\">\n\nstyle=\"color:white;\"\n\n\nonclick=\"window.open(\'\')\" href=\"#\"\n\nhref=\"\"\n>\n\n\n
    • \n
      \n
      \n
    • User Panel
    • \n
    • ^LoginToggle;
    • \n
    • ^a(Hello‚ ^@;˜);
    • \n
    • ^AdminToggle;
    • \n
    ',0,NULL,NULL),('\r\n \r\n\r\n\r\n\r\n onclick=\"window.open(\'\')\" href=\"#\" \r\n href=\"\"\r\n \r\n >\r\n \r\n \r\n\r\n » \r\n\r\n\r\n','Navigation',1,1,'Pt38T5_MWSue2e1N36MLdw',1301973999,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\nonclick=\"window.open(\'\')\" href=\"#\"\nhref=\"\"\n>\n\n\n » \n',0,NULL,NULL),('\" id=\"id\">\r\n\r\n\r\n

    \r\n
    \r\n\r\n\r\n

    \r\n
    \r\n\r\n\r\n
      \r\n

      Registration failed because

      \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 • \" onclick=\"\">\r\n \r\n\r\n \r\n • \" onclick=\"\">\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 * required\r\n \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n\r\n\r\n','DataForm',1,1,'LDcM1Iop17nF2MoSa7zo_Q',1301973999,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n
      \n

      Registration failed because

      \n\n
    • \n
      \n
    \n
    \n\n\n

    \n\n

    \n\">\n• \">\n\n\n• \" onclick=\"\">\n\n\n• \" onclick=\"\">\n\n• \">\n• \">\n\n
    \n\n\n\n\n\n\n\n\n\n\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n* required\n\n
    \n\n
    \n
    \n
    \n\n',0,NULL,NULL),('\n

    \n

    \n\n

    Registration Database

    \n\n\n
    \n \">\n • \">\n \n \n • \" onclick=\"\">\n \n • \">\n • \">\n \n
    \n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
      Submission Date
    \" onclick=\"return confirm(\'Are you certain that you wish to delete this data entry?\')\">\"Delete\"
    \n\n','DataForm/List',1,1,'hVF1taXj4bfd7DuL4XDMYg',1301973999,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n

    \n

    Registration Database

    \n
    \n\">\n• \">\n\n\n• \" onclick=\"\">\n\n• \">\n• \">\n\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
      Submission Date
    \" onclick=\"return confirm(\'Are you certain that you wish to delete this data entry?\')\">\"Delete\"
    ',0,NULL,NULL),('\" id=\"id\">\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\">Change Info      \r\n\">\r\n\r\n\r\n','DataForm',1,1,'x4-2QYRSrIB_BJfnSKKj4w',1301973999,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n
    \n\n
    \n\n\n\n\n\n\n\n
    \n

    \n\">Change Info      \n\">',0,NULL,NULL),('\" id=\"id\">\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 \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
    \">\">\">\">\">
    oddThreadevenThread\">oddThreadevenThread\">\">oddThreadevenThread\">oddThreadevenThread\">\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\"> @ oddThreadevenThread\" style=\"font-size: 11px;\">\r\n \">\r\n by\r\n \r\n \r\n \r\n \">\r\n \r\n on @ \r\n
    \r\n\r\n\r\n
    \r\n · · \r\n
    \r\n
    \r\n','Collaboration',1,1,'423R4Y6XIt3wUzlnLo-chg',1301973999,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n\n\n

    \n\n\">\n•\n\n\n\n\">\n\n\">\n\n•\n\n\">\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \">\">\">\">\">
    oddThreadevenThread\">oddThreadevenThread\">\">oddThreadevenThread\">oddThreadevenThread\">\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\"> @ oddThreadevenThread\" style=\"font-size: 11px;\">\n\">\nby\n\n\n\n\">\n\non @ \n
    \n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('\r\n\r\n \r\n

    \r\n
    \r\n\r\n \r\n
    \r\n

    \">[Back]

    \r\n
    \r\n
    \r\n \r\n \">\r\n \r\n \">\r\n \r\n
    \r\n
    \r\n\r\n\r\n
    px;\">\r\n
    Current\">\r\n \">\r\n
    \r\n \r\n
    \r\n
    \r\n\r\n
    \r\n\" 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 \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','Collaboration/Thread',1,1,'oZ1Mk-zExYUyD-JsjTvaHg',1301973999,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n

    \n
    \n\n
    \n\n\">\n\n\">\n\n
    \n
    \n\n\n\n\n
    \n[ | | ]\n
    \n
    \n
    \n\n\"> •\n\n\n\"> •\n\n\n\">\n\n\n\n• \">\n\n• \">\n\n\n• \">\n\n• \">\n\n\n\n\n• \">\n\n• \">\n\n\n
    ',0,NULL,NULL),('\" id=\"id\">\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 \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
    \r\n\r\n\r\n','Collaboration/PostForm',1,1,'mYwS8CZaOLMt0raaKXGZcQ',1301973999,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\n

    \n\n
    ',0,NULL,NULL),('\" id=\"id\">\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
    class=\"odd\">\">class=\"odd\">class=\"odd\">\">class=\"odd\"> @
    \r\n
    \r\n\r\n\r\n
    \r\n · · \r\n
    \r\n
    \r\n\r\n\r\n','Collaboration/Search',1,1,'kSGR4OHsKmhLQTuLkisOww',1301973999,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    class=\"odd\">\">class=\"odd\">class=\"odd\">\">class=\"odd\"> @
    \n
    \n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('\n

    \n
    \n\n\n

    \n
    \n\n\n \n\n\n\n\n\n \n\n\n \n\n\n\n \n
    \n \">Day\n \">Week\n \">Month\n \">Search\n \n
     
    \n\n
    \n \">Add Event\n \">Print\n \n \n
    \n
    \n \" style=\"font-size:7pt; margin-right:12px;\">« prev\n \n \" style=\"font-size:7pt; padding-left:12px\">next » \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n
    active current\">\n \n \">\n \n\n \n \n \n\n /wobject/Calendar/images/more.gif\" />\n \n \n \n
    \n
    \n\n
    \" class=\"moreDisplay\">\n
    \n
      \n \n
    • \">
    • \n
      \n
    \n
    \n
    \n
    \n\n\n','Calendar/Month',1,1,'U78V5IJHVljvRTb6ydsTHg',1301973999,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\">Day\n\">Week\n\">Month\n\">Search\n
     
    \n
    \n\">Add Event\n\">Print\n\n\n
    \n
    \n\" style=\"font-size:7pt; margin-right:12px;\">« prev\n \n\" style=\"font-size:7pt; padding-left:12px\">next »\n
    \n\n\n\n\n\n\n\n\n\n\n
    active current\">\n\n\">\n\n\n\n\n/wobject/Calendar/images/more.gif\" />\n\n\n
    \n
    \n\n
    \" class=\"moreDisplay\">\n
    \n\n
    \n
    \n
    ',0,NULL,NULL),('\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 \" class=\"tab\">Day \r\n \" class=\"tabWeek\">Week \r\n \" class=\"tab\">Month \r\n \" class=\"tab\">Search\r\n\r\n
     
    \r\n\r\n
    \r\n \">Add Event\r\n \">Print\r\n \r\n \r\n
    \r\n
    \r\n \" style=\"margin-right:66px;\">« prev week\r\n , ~ , \r\n \" style=\"margin-left:66px\">next week » \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n
    curDay\"> \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n\r\n','Calendar/Week',1,1,'Xqc3qPUXoFE8dt9qocdWig',1301973999,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\" class=\"tab\">Day\n\" class=\"tabWeek\">Week\n\" class=\"tab\">Month\n\" class=\"tab\">Search\n
     
    \n
    \n\">Add Event\n\">Print\n\n\n
    \n
    \n\" style=\"margin-right:66px;\">« prev week\n , ~ , \n\" style=\"margin-left:66px\">next week »\n
    \n\n\n\n\n\n
    \n
    \n
    curDay\">\n\n\n
    \n
    \n
    ',0,NULL,NULL),('\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 \" class=\"tabDay\">Day\r\n \" class=\"tab\">Week\r\n \" class=\"tab\">Month\r\n \" class=\"tab\">Search\r\n\r\n
     
    \r\n\r\n
    \r\n \">Add Event\r\n \">Print\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
    :00
    \r\n
    \r\n
      \r\n
    • \r\n \">\r\n
    • \r\n
    \r\n
    \r\n
    \r\n\r\n','Calendar/Day',1,1,'IBTb7wllSt7RxFmmvm9pkQ',1301973999,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n
    \n\" class=\"tabDay\">Day\n\" class=\"tab\">Week\n\" class=\"tab\">Month\n\" class=\"tab\">Search\n
     
    \n
    \n\">Add Event\n\">Print\n\n\n
    \n
    \n\n
    \n\n\n\n\n\n
    \n
    :00
    \n
    \n\n
    \n
    ',0,NULL,NULL),('\r\n\r\n \r\n\r\n\r\n \r\n\r\n\r\n \r\n\r\n
    \r\n \" class=\"tab\">Day\r\n \" class=\"tab\">Week\r\n \" class=\"tab\">Month\r\n \" class=\"tab\">Search\r\n\r\n
     
    \r\n \r\n
    \r\n \r\n Edit \r\n • Delete • \r\n \r\n Print\r\n
    \r\n
    \r\n \" style=\"margin-right:106px;\">« prev event\r\n Event Details\r\n \" style=\"margin-left:106px\">next event »\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
    Event Title
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    Location
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    Description
    \r\n
    \r\n
    \r\n
    \r\n
    Scheduled
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    Related Material
    \r\n
    \r\n \">
    \r\n
    \r\n
    \r\n
    Attachments
    \r\n
    \r\n \"> \" />
    \r\n
    \r\n
    \r\n
    \r\n','Calendar/Event',1,1,'Z1EM7JMI_4SkyfaZffSElw',1301973999,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n\n\n\n\n\n\n
    \n\" class=\"tab\">Day\n\" class=\"tab\">Week\n\" class=\"tab\">Month\n\" class=\"tab\">Search\n
     
    \n
    \n\nEdit\n• Delete •\n\nPrint\n
    \n
    \n\" style=\"margin-right:106px;\">« prev event\nEvent Details\n\" style=\"margin-left:106px\">next event »\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n
    Event Title
    \n
    \n
    \n\n
    \n
    \n
    Location
    \n
    \n
    \n\n
    \n
    \n
    Description
    \n
    \n
    \n
    \n
    Scheduled
    \n
    \n
    \n\n
    \n
    \n
    Related Material
    \n
    \n\">
    \n
    \n
    \n
    Attachments
    \n
    \n
    \n
    ',0,NULL,NULL),('\n\n\n

    Errors!

    \n
      \n\n
    • \n
      \n
    \n
    \n\n\n\n \n\n
    \n Event\n Recurrence\n \n \n
     
    \n
    \n\n\n\n\n \n\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    Event Title
    Short Title
    Location
    Description
    Start Date
    End Date
    Time
     
    Related Links
    Group to View this Event
    Attachments for this Event
    \n
    \n \n \n\n\n\n\n\n \n \n\n\n \n \n\n\n
    Recurrence Pattern
    Recurrence Range\n

    Start:

    \n

    \n

    End:

    \n
    \n
    \n\n\n\n\n','Calendar/EventEdit',1,1,'fJg7SKpGZwzSNx3_ebki1A',1301973999,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n

    Errors!

    \n
      \n\n
    • \n
      \n
    \n
    \n\n\n\n\n
    \nEvent\nRecurrence\n\n\n
     
    \n
    \n\n\n\n\n\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    Event Title
    Short Title
    Location
    Description
    Start Date
    End Date
    Time
     
    Related Links
    Group to View this Event
    Attachments for this Event
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    Recurrence Pattern
    Recurrence Range\n

    Start:

    \n

    \n

    End:

    \n
    \n
    \n\n',0,NULL,NULL),('\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 \">^International(label day,Asset_Calendar);\r\n \">^International(label week,Asset_Calendar);\r\n \">^International(label month,Asset_Calendar);\r\n \">^International(label search,Asset_Calendar);\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
    ^International(keyword,Asset_Calendar);
    \r\n
    \r\n
    \r\n
    ^International(start date,Asset_Calendar);
    \r\n
    \r\n
    \r\n
    ^International(end date,Asset_Calendar);
    \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 ^International(search results,Asset_Calendar);\r\n ^International(page x of x,Asset_Calendar,,);\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 \" style=\"padding-left:10px\">\r\n
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n','Calendar/Search',1,1,'ihf4Rx6p72xn_nVKaIeOaw',1301973999,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\">^International(label day,Asset_Calendar);\n\">^International(label week,Asset_Calendar);\n\">^International(label month,Asset_Calendar);\n\">^International(label search,Asset_Calendar);\n
    \n \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n
    ^International(keyword,Asset_Calendar);
    \n
    \n
    \n
    ^International(start date,Asset_Calendar);
    \n
    \n
    \n
    ^International(end date,Asset_Calendar);
    \n
    \n
    \n
    \n\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n
    \n^International(search results,Asset_Calendar);\n^International(page x of x,Asset_Calendar,,);\n
    \n
    \n
    \n\n\n\n
    \n
    \n\n\n\n\n\n
    \n
    \n
    \n\" style=\"padding-left:10px\">\n
    \n
    \n
    \n\n\n\n
    \n
    \n
    ',0,NULL,NULL),('\" id=\"id\"> \r\n\r\n \r\n

    \r\n
    \r\n\r\n

    \">[]

    \r\n\r\n
    \r\n\r\n
    \r\n\" 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     [

    \">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />

    |

    \">\" alt=\"-\" style=\"border: 0px;vertical-align:middle;\" />

    ]\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
    \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
    Current\">\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\" 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     [

    \">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />

    |

    \">\" alt=\"-\" style=\"border: 0px;vertical-align:middle;\" />

    ]\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
    px;\">\r\n
    Current\">\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\" 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     [

    \">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />

    |

    \">\" alt=\"-\" style=\"border: 0px;vertical-align:middle;\" />

    ]\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 \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','Collaboration/Thread',1,1,'jrWJ6nHXkqgFbml7BZ9chw',1301974000,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n

    \">[]

    \n
    \n\n
    \n\" alt=\"\" />\n
    \n
    \n:\n\n\n\n\">\n\n
    \n:
    \n:
    \n: \n\n    [

    \">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />

    |

    \">\" alt=\"-\" style=\"border: 0px;vertical-align:middle;\" />

    ]\n
    \n
    \n\n: [ \"> \"> ]
    \n\n\n:
    \n
    \n
    \n
    \n
    \n

    \n\n
    \n\n
    \n\n\n\n
    \n
    \n
    \n\n
    \n\n\">\n\n\n•\n\">\n•\n\">\n\n
    \n
    \n
    \n\n
    \n

    \n
    \n
    \n\n\">\n\n\">\n\n
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n[ | | ]\n
    \n
    \n
    \n
    \n\n\">\n•\n\n\n\">\n•\n\n\n\">\n•\n\n\n\n\">\n•\n\n\">\n•\n\n\n\">\n•\n\n\">\n•\n\n\n\n\n\">\n\n\">\n\n\n
    \n
    ',0,NULL,NULL),('\" id=\"id\">\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 class=\"even\">\r\n \">
    \r\n \r\n \r\n class=\"even\" align=\"center\">\r\n class=\"even\" align=\"center\">\r\n class=\"even\" align=\"center\">\r\n class=\"even\" align=\"center\">\r\n class=\"even\">\r\n \">\r\n by\r\n \r\n \r\n \r\n \">\r\n \r\n on @ \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','MessageBoard',1,1,'Ys6f3vpe0y1uRcaCJ2TlFw',1301974000,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n\n

    \n\n\n\">\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n class=\"even\">\n\">
    \n\n\n class=\"even\" align=\"center\">\n class=\"even\" align=\"center\">\n class=\"even\" align=\"center\">\n class=\"even\" align=\"center\">\n class=\"even\">\n\">\nby\n\n\n\n\">\n\non @ \n\n
    \n\n
    \n\n

    \n\n
    \n
    \n\n

    \n\n',0,NULL,NULL),('

    \" class=\"search\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n
    \n
    \n \n \" size=\"30\" maxlength=\"255\" />\n \n
    \n
    \n\n\n \n
    \n ^International(\'resultsFeedback\',Asset_Search); \n ^International(\'page\',Asset_Search); ^International(\'of\',Asset_Search); \n \n
    \n \n

    \n
    \n\n
    \n \n
    );\">
    \n
    \n
    \n
    \n\n \n
      \n
    • \n \n class=\"active\">\n \">\n \n \n
    • \n
    \n
    \n\n
    \n\n\n
    \n','Search',1,1,'PBtmpl0000000000000200',1301974000,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"search\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n
    \n
    \n\n\" size=\"30\" maxlength=\"255\" />\n\n
    \n
    \n\n\n
    \n^International(\'resultsFeedback\',Asset_Search); \n^International(\'page\',Asset_Search); ^International(\'of\',Asset_Search); \n\n
    \n\n

    \n
    \n
    \n\n
    );\">
    \n
    \n
    \n
    \n\n
      \n
    • \n\n class=\"active\">\n\">\n\n\n
    • \n
    \n
    \n
    \n\n
    ',0,NULL,'[]'),('\n\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n\n

    \n\n\n\n \n \n \n \n \n \n
    \n
    \n \n \n \n \n \n
    ^International(Stock Watch,Asset_StockData);\n
    \">\n ^International(Last Update,Asset_StockData);: EDT
    \n \n
    \n
    \n
    \n \n \n \n \n \n \n \n \n \n \n qmmt_cycleqmmt_main\'>\n \n \n \n \n \n \n \n
    Name SymbolLastTickChg
    \n \')\">\n \n /\" alt=\"\" />\n _up_down\" style=\"text-align: right;whitespace:nowrap;\">
    \n
    ','StockData',1,1,'StockDataTMPL000000001',1315877144,'WebGUI::Asset::Template::HTMLTemplate',1,'\">\n\n

    \n
    \n\n

    \n
    \n\n

    \n\n\n\n\n\n\n\n\n
    \n
    \n\n\n\n\n\n
    ^International(Stock Watch,Asset_StockData);\n
    \n^International(Last Update,Asset_StockData);: EDT
    \n\n
    \n
    \n
    \n\n\n\n\n\n\n\n\n\n\nqmmt_cycleqmmt_main\'>\n\n\n\n\n\n\n\n
    Name SymbolLastTickChg
    \n\')\">\n\n/\" alt=\"\" />\n_up_down\" style=\"text-align: right;whitespace:nowrap;\">
    \n
    ',0,NULL,NULL),('\r\n

    \" class=\"editStory\">\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\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\r\n \r\n \r\n\r\n\r\n \r\n \r\n\r\n\r\n
    ^International(photo,WebGUI);
    \">\" alt=\"\" style=\"border-style:none;vertical-align:middle;\" />
    ^International(or,WebGUI);
    \r\n
    \r\n\r\n
    \r\n \r\n
    \r\n\r\n\r\n
    \r\n\r\n\r\n
    \r\n','Story/Edit',1,1,'E3tzZjzhmYoNlAyP2VW33Q',1303183716,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"editStory\">\n
    \n\n\n
    \n \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(photo,WebGUI);
    \">\" alt=\"\" style=\"border-style:none;vertical-align:middle;\"/>
    ^International(or,WebGUI);
    \n
    \n
    \n \n
    \n\n
    \n
    ',0,NULL,'[]'),('\r\n\r\n\r\n\r\n\r\n','Map/View',1,1,'9j0_Z1j3Jd0QBbY2akb6qw',1304392055,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n',0,NULL,NULL),('\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
    ','MapPoint/Edit',1,1,'oHh0UqAJeY7u2n--WD-BAA',1304392055,'WebGUI::Asset::Template::HTMLTemplate',1,'\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ',0,NULL,'[]'),('
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n,\r\n\r\n


    \r\n
    \r\n\">
    \r\n^International(phone label,Asset_MapPoint);:
    \r\n^International(fax label,Asset_MapPoint);:
    \r\n\">
    \r\n);\" />\r\n
    ','MapPoint/View',1,1,'u9vfx33XDk5la1-QC5FK7g',1304392055,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    \n
    \n
    \n
    \n,\n\n


    \n
    \n
    \">
    \n^International(phone label,Asset_MapPoint);:
    \n^International(fax label,Asset_MapPoint);:
    \n\">
    \n);\" />\n
    ',0,NULL,'[]'),('

    ^International(has posted to one of your subscriptions,Asset_Collaboration);

    \n\n\n\n\n\n

    ^International(attachments, Asset_Article);\n
    \n
    \n\n\n\n
    \n \n
    \n
    \n\n
    \n \n
    \n
    \n\n
    \n \n
    \n
    \n\n
    \n \n
    \n
    \n\n
    \n \n
    \n
    \n\n\n

    \">

    \n

    \">View this message on the web site.

    \n','Collaboration/Notification',1,1,'PBtmpl0000000000000027',1311652541,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
     
    ^International(has posted to one of your subscriptions,Asset_Collaboration);
    #\">#
      
    \n

    \">

    ',0,NULL,NULL),('
    \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\nalt\">\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\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\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
     
    ^International(remove button,Shop);^International(item,Shop);^International(price,Shop);^International(quantity,Shop);^International(extended price,Shop);^International(per item shipping,Shop);
    \r\n \r\n \r\n
    \r\n \r\n \r\n ^International(not applicable,Shop);\r\n
    \r\n
    \r\n
     
     
      
    ^International(Billing Address,Shop); ^International(Shipping Address,Shop);
    ^International(use same shipping as billing,Shop);
     
      
    \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 \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
    ^International(label help,Shop);
    \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 \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
    ^International(label help,Shop);
    \r\n
      
     
    ^International(tax,Shop);
    ^International(shipping,Shop);\r\n \r\n
    ^International(payment methods,PayDriver);\r\n \r\n
    ^International(in shop credit,Shop);(^International(available,Shop);: )
    ^International(total,Shop);
    (^International(required minimum order amount,Shop); )
      
     
    ^International(order for,Shop);
     
    \r\n\r\n\r\n
    \r\n

    ^International(50,WebGUI);\r\n^International(51,WebGUI);
    \">^International(407,WebGUI);

    \r\n
    \r\n
    \r\n','Shop/Cart',1,1,'aIpCmr9Hi__vgdZnDTz1jw',1313542961,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nalt\">\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
     
    ^International(remove button,Shop);^International(item,Shop);^International(price,Shop);^International(quantity,Shop);^International(extended price,Shop);^International(per item shipping,Shop);
    \n\n\n
    \n\n\n^International(not applicable,Shop);\n
    \n
    \n
     
     
      
    ^International(Billing Address,Shop); ^International(Shipping Address,Shop);
    ^International(use same shipping as billing,Shop);
     
      
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(label help,Shop);
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(label help,Shop);
    \n
      
     
    ^International(tax,Shop);
    ^International(shipping,Shop);\n\n
    ^International(payment methods,PayDriver);\n\n
    ^International(in shop credit,Shop);(^International(available,Shop);: )
    ^International(total,Shop);
    (^International(required minimum order amount,Shop); )
      
     
    ^International(order for,Shop);
     
    \n\n\n
    \n

    ^International(50,WebGUI);\n^International(51,WebGUI);
    \">^International(407,WebGUI);

    \n
    \n
    ',0,NULL,'[{\"url\":\"^Extras(/yui/build/yahoo-dom-event/yahoo-dom-event.js);\",\"type\":\"headScript\"},{\"url\":\"^Extras(/yui/build/json/json-min.js);\",\"type\":\"headScript\"},{\"url\":\"^Extras(/yui/build/connection/connection-min.js);\",\"type\":\"headScript\"},{\"url\":\"^Extras(/underscore/underscore-min.js);\",\"type\":\"headScript\"},{\"url\":\"^Extras(/shop/cart.js);\",\"type\":\"bodyScript\"}]'),('
    \r\n

    Add Address

    \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 \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
    ^International(label help,Shop);
    \r\n \r\n\r\n
    \r\n','Shop/Address',1,1,'XNd7a_g_cTvJVYrVHcx2Mw',1313542961,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n

    Add Address

    \n\n
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(label help,Shop);
    \n\n
    ',0,NULL,NULL),('

    ^International(thank you message,Shop);

    \n\n\n

    \">^International(order number,Shop);

    \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ^International(date,Shop);
    ^International(amount,Shop);
    ^International(in shop credit used,Shop);
    ^International(taxes,Shop);
    ^International(shipping method,Shop);
    ^International(shipping amount,Shop);
    ^International(shipping address,Shop);
    ^International(payment method,Shop);
    ^International(status message,Shop);
    ^International(payment address,Shop);
    \n
    \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n
    ^International(date,Shop);^International(item,Shop);^International(price,Shop);^International(quantity,Shop);^International(shipping address,Shop);^International(order status,Shop);^International(tracking number,Shop);
    \">
    \n ','Shop/EmailReceipt',1,1,'bPz1yk6Y9uwMDMBcmMsSCg',1313542961,'WebGUI::Asset::Template::HTMLTemplate',1,'

    ^International(thank you message,Shop);

    \n

    \">^International(order number,Shop);

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(date,Shop);
    ^International(amount,Shop);
    ^International(in shop credit used,Shop);
    ^International(taxes,Shop);
    ^International(shipping method,Shop);
    ^International(shipping amount,Shop);
    ^International(shipping address,Shop);
    ^International(payment method,Shop);
    ^International(status message,Shop);
    ^International(payment address,Shop);
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(date,Shop);^International(item,Shop);^International(price,Shop);^International(quantity,Shop);^International(shipping address,Shop);^International(order status,Shop);^International(tracking number,Shop);
    \">
    ',0,NULL,NULL),('
    \r\n \" id=\"id\">\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
    ^ViewCart;
    \r\n \">^International(continue shopping button,Shop);\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','Donation',1,1,'vrKXEtluIhbmAS9xmPukDA',1313542961,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\" id=\"id\">\n\n
    \n
    \n\n

    \n
    \n\n
    \n
    ^ViewCart;
    \n\">^International(continue shopping button,Shop);\n\n\n
    \n
    \n
    \n\n\n\n\n\n
    ',0,NULL,NULL),('\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

    \">^International(continue shopping button,Shop);\r\n\r\n\r\n\r\n\r\n','FlatDiscount',1,1,'63ix2-hU0FchXGIWkG3tow',1313542961,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n

    \n
    \n\n

    \n

    \">^International(continue shopping button,Shop);\n\n',0,NULL,NULL),('

    \r\n \" id=\"id\">\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
    \n','Subscription',1,1,'eqb9sWjFEVq0yHunGV8IGw',1313542961,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\" id=\"id\">\n\n
    \n
    \n
    \n\n

    \n
    \n\n\n\n
    \n\n
    \n
    \n
    (\">)
    \n\n\n\n
    \n
    \n
    ',0,NULL,NULL),('
    \n \n
    default\">\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n
    \n','Shop/AddressBook',1,1,'3womoo7Teyy2YKFa25-MZg',1313542961,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n
    default\">\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    ',0,NULL,NULL),('
    \r\n

    Cart

    \r\n
    \r\n \r\n
    ) ()
    \r\n
    \r\n
    \r\n
    \r\n ^International(total,Shop);: \r\n
    \r\n
    \r\n ^ViewCart;\r\n
    \r\n
    \r\n','Shop/MiniCart',1,1,'EBlxJpZQ9o-8VBOaGQbChA',1313542961,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n

    Cart

    \n
    \n\n
    ) ()
    \n
    \n
    \n
    \n^International(total,Shop);: \n
    \n
    \n^ViewCart;\n
    \n
    ',0,NULL,NULL),('
    \n \n
    \n
    \n\n

    ^International(order number,Shop);

    \n \n \n \n \n\n
      \n
    • ^International(date,Shop);
    • \n
    • ^International(Status,Shop);^International(Success,Shop);^International(Failed,Shop);
    • \n
    • ^International(amount,Shop);
    • \n
    • ^International(in shop credit used,Shop);
    • \n
    • ^International(taxes,Shop);
    • \n
    • ^International(shipping method,Shop);
    • \n
    • ^International(shipping amount,Shop);
    • \n
    • ^International(payment method,Shop);
    • \n
    • ^International(status message,Shop);
    • \n
    \n
    \n \n
    \n
    ^International(payment address,Shop);
    \n
    \n
    \n \n
    \n
    ^International(shipping address,Shop);
    \n
    \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ^International(date,Shop);^International(item,Shop);^International(price,Shop);^International(quantity,Shop);^International(shipping address,Shop);^International(order status,Shop);^International(tracking number,Shop);
    \n \n \">\n \n \n \n
    \n \n [\">] \n \n
    \n
    \n
    \n','Shop/MyPurchasesDetail',1,1,'g8W53Pd71uHB9pxaXhWf_A',1313542961,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n
    \n
    \n

    ^International(order number,Shop);

    \n\n\n\n
      \n
    • ^International(date,Shop);
    • \n
    • ^International(Status,Shop);^International(Success,Shop);^International(Failed,Shop);
    • \n
    • ^International(amount,Shop);
    • \n
    • ^International(in shop credit used,Shop);
    • \n
    • ^International(taxes,Shop);
    • \n
    • ^International(shipping method,Shop);
    • \n
    • ^International(shipping amount,Shop);
    • \n
    • ^International(payment method,Shop);
    • \n
    • ^International(status message,Shop);
    • \n
    \n
    \n
    \n
    ^International(payment address,Shop);
    \n
    \n
    \n
    \n
    ^International(shipping address,Shop);
    \n
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(date,Shop);^International(item,Shop);^International(price,Shop);^International(quantity,Shop);^International(shipping address,Shop);^International(order status,Shop);^International(tracking number,Shop);
    \n\">\n
    \n\n[\">]\n\n
    \n
    \n
    ',0,NULL,NULL),('\nBatch: \n\n\n
    \n\n','Operation/RedeemSubscription',1,1,'PBtmpl0000000000000053',1313542961,'WebGUI::Asset::Template::HTMLTemplate',1,'\nBatch: \n\n
    \n',0,NULL,NULL),('
    \n \n
    \n
      \n
    • \n
    \n
    \n
    \n\n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n
      
    ^International(subtotal,Shop);
    ^International(taxes,Shop);
    ^International(shipping,Shop);
    ^International(in shop credit,Shop);(^International(available,Shop);: )
    ^International(total,Shop);
      
    \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n
    ','Shop/Credentials',1,1,'itransact_credentials1',1313542961,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n
    \n
      \n
    • \n
    \n
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
      
    ^International(subtotal,Shop);
    ^International(taxes,Shop);
    ^International(shipping,Shop);
    ^International(in shop credit,Shop);(^International(available,Shop);: )
    ^International(total,Shop);
      
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n
    ',0,NULL,NULL),('

    ^International(Enter VAT numbers,TaxDriver_EU);

    \n\n\n

    \n ^International(70,WebGUI);: \n

    \n
    \n\n\n\n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n\n \n
    ^International(country,WebGUI);^International(vat number,TaxDriver_EU);^International(Approved for use,TaxDriver_EU);
    ^International(138,WebGUI);^Internation(139,WebGUI);\">^International(576,WebGUI);
    \n
    \n
    \n\n

    \n ^International(Add another VAT number,TaxDriver_EU);:
    \n \n

    ','TaxDriver/EU/User',1,1,'D6cJpRcey35aSkh9Q_FPUQ',1313542961,'WebGUI::Asset::Template::HTMLTemplate',1,'

    Enter VAT numbers

    \n\n

    \nError: \n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    CountryVAT NumberApproved for use
    yesno\">delete
    \n
    \n
    \n

    \nAdd another VAT Number:
    \n\n

    ',0,NULL,NULL),('\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n
      
    ^International(subtotal,Shop);
    ^International(taxes,Shop);
    ^International(shipping,Shop);
    ^International(in shop credit,Shop);(^International(available,Shop);: )
    ^International(total,Shop);
      
    \n','Shop/Credentials',1,1,'30h5rHxzE_Q0CyI3Gg7EJw',1313542961,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
      
    ^International(subtotal,Shop);
    ^International(taxes,Shop);
    ^International(shipping,Shop);
    ^International(in shop credit,Shop);(^International(available,Shop);: )
    ^International(total,Shop);
      
    ',0,NULL,NULL),('\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n
      
    ^International(subtotal,Shop);
    ^International(taxes,Shop);
    ^International(shipping,Shop);
    ^International(in shop credit,Shop);(^International(available,Shop);: )
    ^International(total,Shop);
      
    \n','Shop/Credentials',1,1,'jysVZeUR0Bx2NfrKs5sulg',1313542961,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
      
    ^International(subtotal,Shop);
    ^International(taxes,Shop);
    ^International(shipping,Shop);
    ^International(in shop credit,Shop);(^International(available,Shop);: )
    ^International(total,Shop);
      
    ',0,NULL,NULL),('\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n
      
    ^International(subtotal,Shop);
    ^International(taxes,Shop);
    ^International(shipping,Shop);
    ^International(in shop credit,Shop);(^International(available,Shop);: )
    ^International(total,Shop);
      
    \n','Shop/Credentials',1,1,'300AozDaeveAjB_KN0ljlQ',1313542962,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
      
    ^International(subtotal,Shop);
    ^International(taxes,Shop);
    ^International(shipping,Shop);
    ^International(in shop credit,Shop);(^International(available,Shop);: )
    ^International(total,Shop);
      
    ',0,NULL,NULL),('\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n
      
    ^International(subtotal,Shop);
    ^International(taxes,Shop);
    ^International(shipping,Shop);
    ^International(in shop credit,Shop);(^International(available,Shop);: )
    ^International(total,Shop);
      
    \n','Shop/Credentials',1,1,'GqnZPB0gLoZmqQzYFaq7bg',1313542962,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
      
    ^International(subtotal,Shop);
    ^International(taxes,Shop);
    ^International(shipping,Shop);
    ^International(in shop credit,Shop);(^International(available,Shop);: )
    ^International(total,Shop);
      
    ',0,NULL,NULL),('
    \r\n

    \r\n\r\n\r\n
    \r\n
    \r\n
    ','Shop/selectGateway',1,1,'2GxjjkRuRkdUg_PccRPjpA',1313542962,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n

    \n\n
    \n
    \n
    ',0,NULL,NULL),('
    \n \n
    \n
      \n
    • \n
    \n
    \n
    \n\n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n
      
    ^International(subtotal,Shop);
    ^International(taxes,Shop);
    ^International(shipping,Shop);
    ^International(in shop credit,Shop);(^International(available,Shop);: )
    ^International(total,Shop);
      
    \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n
    ','Shop/Credentials',1,1,'Rqwgh50A3gGcOKIrdi_kxw',1313542962,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n
    \n
      \n
    • \n
    \n
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
      
    ^International(subtotal,Shop);
    ^International(taxes,Shop);
    ^International(shipping,Shop);
    ^International(in shop credit,Shop);(^International(available,Shop);: )
    ^International(total,Shop);
      
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n
    ',0,NULL,NULL),('\n

    \n

    \n

    ^International(badge holder information,Asset_EventManagementSystem);

    \n\n\n

    \n
    \n\n\n \n \n \n \n \n \n \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ^International(name,Shop);
    ^International(organization,Asset_EventManagementSystem);
    ^International(address,Shop);
     
     
    ^International(city,Shop);
    ^International(state,Shop);
    ^International(code,Shop);
    ^International(country,Shop);
    ^International(phone number,Shop);
    ^International(email address,Asset_EventManagementSystem);
     
    \n
    \n
    \n
    \n
    \n
     
    \n\n\n\n\n\n\n\n\n\n\n','EMSBadge',1,1,'PBEmsBadgeTemplate0000',1313542962,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n

    \n

    ^International(badge holder information,Asset_EventManagementSystem);

    \n\n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(name,Shop);
    ^International(organization,Asset_EventManagementSystem);
    ^International(address,Shop);
     
     
    ^International(city,Shop);
    ^International(state,Shop);
    ^International(code,Shop);
    ^International(country,Shop);
    ^International(phone number,Shop);
    ^International(email address,Asset_EventManagementSystem);
    \n\n',0,NULL,NULL),('
    \n

    ^International(my purchases,Shop); · ^a(^International(Return to Account,Account););

    \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ^International(order number,Shop);^International(amount,Shop);^International(date,Shop);^International(Status,Shop);
    \">^International(Success,Shop);^International(Failed,Shop);
    \n
    \n','Shop/MyPurchases',1,1,'2gtFt7c0qAFNU3BG_uvNvg',1315877144,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n

    ^International(my purchases,Shop); · ^a(\"Return to Account\");

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(order number,Shop);^International(amount,Shop);^International(date,Shop);^International(Status,Shop);
    \">^International(Success,Shop);^International(Failed,Shop);
    \n
    ',0,NULL,NULL); +INSERT INTO `template` VALUES ('\">','Macro/AdminToggle',1,1,'PBtmpl0000000000000036',1129049186,'WebGUI::Asset::Template::HTMLTemplate',1,'\">',0,NULL,NULL),('\">','Macro/a_account',1,1,'PBtmpl0000000000000037',1129049186,'WebGUI::Asset::Template::HTMLTemplate',1,'\">',0,NULL,NULL),('\">','Macro/EditableToggle',1,1,'PBtmpl0000000000000038',1129049186,'WebGUI::Asset::Template::HTMLTemplate',1,'\">',0,NULL,NULL),('\">','Macro/GroupAdd',1,1,'PBtmpl0000000000000040',1129049186,'WebGUI::Asset::Template::HTMLTemplate',1,'\">',0,NULL,NULL),('\">','Macro/GroupDelete',1,1,'PBtmpl0000000000000041',1129049186,'WebGUI::Asset::Template::HTMLTemplate',1,'\">',0,NULL,NULL),('\">','Macro/H_homeLink',1,1,'PBtmpl0000000000000042',1129049186,'WebGUI::Asset::Template::HTMLTemplate',1,'\">',0,NULL,NULL),('\">','Macro/LoginToggle',1,1,'PBtmpl0000000000000043',1129049186,'WebGUI::Asset::Template::HTMLTemplate',1,'\">',0,NULL,NULL),('\">','Macro/r_printable',1,1,'PBtmpl0000000000000045',1129049186,'WebGUI::Asset::Template::HTMLTemplate',1,'\">',0,NULL,NULL),('\">','Macro/File',1,1,'PBtmpl0000000000000091',1129049189,'WebGUI::Asset::Template::HTMLTemplate',1,'\">',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n
    /opaque.gif);\">\n \n
    \n\n\n\n
    /opaque.gif);\">\n \n
    \n
    \n
    \n','Shortcut',1,1,'PBtmpl0000000000000140',1129573244,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n
    /opaque.gif);\">\n\n
    \n\n\n\n
    /opaque.gif);\">\n\n
    \n
    \n
    ',0,NULL,NULL),('

    \n\n\n
    \n \n
    \n
    \n
    :
    \n
    \n
    \n
    \n
    \n\n\n
    \n
    \n
    \n \n
    \n
    \n
    \n \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n\n','AdminConsole',1,1,'PBtmplHelp000000000001',1147642410,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n\n
    \n\n
    \n
    \n
    :
    \n
    \n
    \n
    \n
    \n\n
    \n
    \n
    \n\n
    \n
    \n
    \n\n
    \n
    \n
    \n\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    ',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n\n \n

    \n\n\n\n \">\n

    \n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n class=\"even\">\n \">
    \n \n \n class=\"even\" align=\"center\">\n class=\"even\" align=\"center\">\n class=\"even\" align=\"center\">\n class=\"even\" align=\"center\">\n class=\"even\">\n \">\n by\n \n \n \n \">\n \n on @ \n \n
    \n \n
    \n\n

    \n \n
    \n
    \n \n

    \n \n\n\n\n','MessageBoard',1,1,'PBtmpl0000000000000047',1147642414,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n\n

    \n\n\n\">\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n class=\"even\">\n\">
    \n\n\n class=\"even\" align=\"center\">\n class=\"even\" align=\"center\">\n class=\"even\" align=\"center\">\n class=\"even\" align=\"center\">\n class=\"even\">\n\">\nby\n\n\n\n\">\n\non @ \n\n
    \n\n
    \n\n

    \n\n
    \n
    \n\n

    \n\n',0,NULL,NULL),('\nThis is the Manager\'s View\n\n','TimeTracking_manager',1,1,'TimeTrackingTMPL000002',1147642417,'WebGUI::Asset::Template::HTMLTemplate',1,'This is the Manager\'s View',0,NULL,NULL),('

    \n\n

    \n\n

    \n\n
    \n\n\">\n\n          \n\n\">\n\n
    \n','prompt',1,1,'PBtmpl0000000000000057',1147642418,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n

    \n\n

    \n
    \n\">\n         \n\">\n
    ',0,NULL,NULL),('\">\" alt=\"\" style=\"border-style:none;vertical-align:middle;\" />()','Macro/File',1,1,'PBtmpl0000000000000107',1147642420,'WebGUI::Asset::Template::HTMLTemplate',1,'\">\" alt=\"\" style=\"border-style:none;vertical-align:middle;\" />()',0,NULL,NULL),('

    RandomThread macro debug output:

    \n
    \n
    approve.url:
    \n
    assetId:
    \n
    assetSize:
    \n\n
    <tmpl_loop attachment_loop>:
    \n
    \n
    filename:
    \n
    icon:
    \n
    isImage:
    \n
    thumbnail:
    \n
    url:
    \n</tmpl_loop>\n\n\n
    attachment.icon:
    \n
    attachment.thumbnail:
    \n
    attachment.url:
    \n
    className:
    \n
    content:
    \n
    contentType:
    \n
    createdBy:
    \n
    creationDate:
    \n
    dateSubmitted:
    \n
    dateSubmitted.human:
    \n
    dateUpdated:
    \n
    dateUpdated.human:
    \n
    delete.url:
    \n
    deny.url:
    \n
    edit.url:
    \n
    encryptPage:
    \n
    endDate:
    \n
    extraHeadTags:
    \n
    groupIdEdit:
    \n
    groupIdView:
    \n
    hasRated:
    \n
    image.url
    \n
    image.thumbnail
    \n
    isHidden:
    \n
    isLocked:
    \n
    isLockedBy:
    \n
    isMarkedRead:
    \n
    isPackage:
    \n
    isPrototype:
    \n
    isSticky:
    \n
    isSystem:
    \n
    lastPostDate:
    \n
    lastPostId:
    \n
    lineage:
    \n
    menuTitle:
    \n
    newWindow:
    \n
    ownerUserId:
    \n
    parentId:
    \n
    rate.url.1:
    \n
    rate.url.2:
    \n
    rate.url.3:
    \n
    rate.url.4:
    \n
    rate.url.5:
    \n
    rating:
    \n
    rating.value:
    \n
    replies:
    \n
    reply.url:
    \n
    reply.withquote.url:
    \n
    revisedBy:
    \n
    revisionDate:
    \n
    startDate:
    \n
    state:
    \n
    stateChanged:
    \n
    stateChangedBy:
    \n
    status:
    \n
    storageId:
    \n
    subscriptionGroupId:
    \n
    synopsis:
    \n
    tagId:
    \n
    threadId:
    \n
    title:
    \n
    title.short:
    \n
    url:
    \n
    user.canEdit:
    \n
    user.isPoster:
    \n
    userDefined1:
    \n
    userDefined2:
    \n
    userDefined3:
    \n
    userDefined4:
    \n
    userDefined5:
    \n
    userId:
    \n
    userProfile.url:
    \n
    username:
    \n
    views:
    \n
    \n','Macro/RandomThread',1,1,'WVtmpl0000000000000001',1147642426,'WebGUI::Asset::Template::HTMLTemplate',1,'

    RandomThread macro debug output:

    \n
    \n
    approve.url:
    \n
    assetId:
    \n
    assetSize:
    \n
    <tmpl_loop attachment_loop>:
    \n
    \n
    filename:
    \n
    icon:
    \n
    isImage:
    \n
    thumbnail:
    \n
    url:
    \n</tmpl_loop>\n\n
    attachment.icon:
    \n
    attachment.thumbnail:
    \n
    attachment.url:
    \n
    className:
    \n
    content:
    \n
    contentType:
    \n
    createdBy:
    \n
    creationDate:
    \n
    dateSubmitted:
    \n
    dateSubmitted.human:
    \n
    dateUpdated:
    \n
    dateUpdated.human:
    \n
    delete.url:
    \n
    deny.url:
    \n
    edit.url:
    \n
    encryptPage:
    \n
    endDate:
    \n
    extraHeadTags:
    \n
    groupIdEdit:
    \n
    groupIdView:
    \n
    hasRated:
    \n
    image.url
    \n
    image.thumbnail
    \n
    isHidden:
    \n
    isLocked:
    \n
    isLockedBy:
    \n
    isMarkedRead:
    \n
    isPackage:
    \n
    isPrototype:
    \n
    isSticky:
    \n
    isSystem:
    \n
    lastPostDate:
    \n
    lastPostId:
    \n
    lineage:
    \n
    menuTitle:
    \n
    newWindow:
    \n
    ownerUserId:
    \n
    parentId:
    \n
    rate.url.1:
    \n
    rate.url.2:
    \n
    rate.url.3:
    \n
    rate.url.4:
    \n
    rate.url.5:
    \n
    rating:
    \n
    rating.value:
    \n
    replies:
    \n
    reply.url:
    \n
    reply.withquote.url:
    \n
    revisedBy:
    \n
    revisionDate:
    \n
    startDate:
    \n
    state:
    \n
    stateChanged:
    \n
    stateChangedBy:
    \n
    status:
    \n
    storageId:
    \n
    subscriptionGroupId:
    \n
    synopsis:
    \n
    tagId:
    \n
    threadId:
    \n
    title:
    \n
    title.short:
    \n
    url:
    \n
    user.canEdit:
    \n
    user.isPoster:
    \n
    userDefined1:
    \n
    userDefined2:
    \n
    userDefined3:
    \n
    userDefined4:
    \n
    userDefined5:
    \n
    userId:
    \n
    userProfile.url:
    \n
    username:
    \n
    views:
    \n
    ',0,NULL,NULL),('\n

    \n
    \n \n\n

    \n
    \n \n\n \n \n \n       \n \n class=\"navOn\"
    class=\"navOn\">\n  \n \n onclick=\"window.open(\'\')\" href=\"#\" href=\"\"
    >\n \n  \n
    \n \n\n
    \n','Navigation',1,1,'stevenav00000000000001',1147642499,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n\n\n      \n\n class=\"navOn\"
    class=\"navOn\">\n \n\nonclick=\"window.open(\'\')\" href=\"#\" href=\"\">\n\n \n
    \n
    \n
    ',0,NULL,NULL),('\n

    \n
    \n \n\n

    \n
    \n \n\n \n \n \n       \n \n \n class=\"navOn\" class=\"navOn\">\n  \n \n onclick=\"window.open(\'\')\" href=\"#\" href=\"\">\n \n  \n \n \n \n','Navigation',1,1,'PBnav000000style01lvl2',1147642499,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n\n\n      \n\n\n class=\"navOn\" class=\"navOn\">\n \n\nonclick=\"window.open(\'\')\" href=\"#\" href=\"\">\n\n \n\n\n',0,NULL,NULL),('
    \n\n \n
    \n
    \n
    \n
    \n \n \n \n

    \">

    \n
    \n\n \n \">.\n \">\n \n \n \n
    \n
    \n\n','Macro/L_loginBox',1,1,'PBtmpl0000000000000044',1148579524,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n\n
    \n
    \n
    \n
    \n\n\n\n

    \">

    \n
    \n\n\n \">.\n\">\n\n\n\n
    \n
    ',0,NULL,NULL),('
    \n\n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \">\n \n\n \n \">.\n \">\n \n
    \n
    \n
    \n
    \n\n','Macro/L_loginBox',1,1,'PBtmpl0000000000000092',1148579524,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\">\n \n\n\n \">.\n\">\n\n
    \n
    \n
    \n
    ',0,NULL,NULL),('\">\" style=\"border-style:none;vertical-align:middle;\" alt=\"\" />\n','Macro/File',1,1,'PBtmpl0000000000000039',1154535073,'WebGUI::Asset::Template::HTMLTemplate',1,'\">\" style=\"border-style:none;vertical-align:middle;\" alt=\"\" />',0,NULL,NULL),('\n\n\n class=\"odd\">\n \n \n \n \n\n
    /\">\n \" />\n \n (\'\', \'\')\">/\" style=\"border-style:none;\" alt=\"\" title=\"\" />\n
    \n','ProjectManager_resourceList',1,1,'ProjectManagerTMPL0006',1157679165,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\nclass=\"odd\">\n\n\n\n\n\n
    /\">\n \" />\n\n(\'\', \'\')\">/\" style=\"border-style:none;\" alt=\"\" title=\"\" />\n
    ',0,NULL,NULL),('\n\n
    \n \n \n
    px;top:px;\">♦
    \n
    \n
    px;top:px;width:px;background-color:\">\n
    %;\">
    \n \n
    \n
    \n \n
    px;top:3px;margin-top:-3px;\">
    \n
    \n
    \n
    \n
    \n \" id=\"projectTableWidth\">\n \" id=\"projectScrollPercentWidth\">\n px;z-index:1;\">\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \" class=\"monthName\" style=\"height:20px;\">
    \" class=\"empty\" style=\"height:21px;\"> 
    \n
    \n
    \n\n','ProjectManager_gantt',1,1,'ProjectManagerTMPL0003',1159989349,'WebGUI::Asset::Template::HTMLTemplate',1,'\n
    \n\n\n
    px;top:px;\">♦
    \n
    \n
    px;top:px;width:px;background-color:\">\n
    %;\">
    \n\n
    \n
    \n\n
    px;top:3px;margin-top:-3px;\">
    \n
    \n
    \n
    \n
    \n\" id=\"projectTableWidth\">\n\" id=\"projectScrollPercentWidth\">\npx;z-index:1;\">\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \" class=\"monthName\" style=\"height:20px;\">
    \" class=\"empty\" style=\"height:21px;\"> 
    \n
    \n
    ',0,NULL,NULL),('

    \n
    \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n
    \n
    \n\n\n\n','InOutBoard/Report',1,1,'IOB0000000000000000002',1166019641,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n
    \n
    ',0,NULL,NULL),('\n\n \n

    \n
    \n
    \n\n\n
      \n
    • \n
    \n
    \n\n\n \">\n\n \n \n \n \n \n \n','ZipArchiveAsset',1,1,'ZipArchiveTMPL00000001',1169738426,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n

    \n
    \n
    \n\n
      \n
    • \n
    \n
    \n\n\">\n\n\n\n\n\n\n',0,NULL,NULL),('\" id=\"id\">\n\n

    \n
    \n\n \n

    \n
    \n\n
    \n \n

    \n
    \n\n
    \n\n \">\n\n\n \n  · \n \n \">\n\n
    \n\n \n
    \n \n
    \n
    \n \n \n \n \n \n \n \n class=\"odd\">\n class=\"odd\">\n class=\"odd\">\n class=\"odd\">\n \n \n \n

    \n \n \n\n','InOutBoard',1,1,'IOB0000000000000000001',1169795123,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n
    \n\n

    \n
    \n
    \n\n\">\n\n\n\n · \n\n\">\n\n
    \n\n
    \n\n
    \n
    \n\n\n\n\n\n\n class=\"odd\">\n class=\"odd\">\n class=\"odd\">\n class=\"odd\">\n\n\n\n

    ',0,NULL,NULL),('\n\n\n \n\n\n\n \n \n \n \n \n \n \n \n \n \n \n\n
    \">\n \n \n \n \n \n
     \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \">\n \n \n \n \n \n
     \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \">\n \n \n \n \n \n
     \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \">\n \n \n \n \n \n
     \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n','SQLReport/Download',1,1,'SQLReportDownload00001',1171466654,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \">\n\n\n\n\n\n
     \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \">\n\n\n\n\n\n
     \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \">\n\n\n\n\n\n
     \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \">\n\n\n\n\n\n
     \n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    ',0,NULL,NULL),('\n

    \n\n\n

    \n \">
    \n

    \n

    \n
    \n\n

    \n\n','newsletter',1,1,'newsletter000000000001',1185754569,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n\n

    \n\">
    \n

    \n

    \n
    \n

    ',0,NULL,NULL),('\n\n

    \n
    \n\n\n

    \n
    \n\n\n
    \n \n
    \n
    \n\n\n\n

    \">

    \n\n\n\n\n','TimeTracking_user',1,1,'TimeTrackingTMPL000001',1201205738,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n
    \n\n
    \n
    \n\n

    \">

    \n\n\n',0,NULL,NULL),('
    \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 © Plain Black 2006\r\n
    \r\n','Calendar/Print/Month',1,1,'CalendarPrintMonth0001',1204890714,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n \n
    \n\n\n\n\n\n\n\n
    \n
      \n
    • \n
      \n
    \n
    \n
    \n© Plain Black 2006\n
    ',0,NULL,NULL),('
    \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 © Plain Black 2006\r\n
    \r\n','Calendar/Print/Week',1,1,'CalendarPrintWeek00001',1204890714,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n   -   \n
    \n\n\n\n\n\n\n\n
    \n
      \n
    • \n
      \n
    \n
    \n
    \n© Plain Black 2006\n
    ',0,NULL,NULL),('
    \r\n \r\n
    \r\n\r\n\r\n\r\n\r\n \r\n \r\n\r\n\r\n
    :00\r\n
      \r\n
    • \r\n
      \r\n
    \r\n
    \r\n\r\n
    \r\n © Plain Black 2006\r\n
    \r\n','Calendar/Print/Day',1,1,'CalendarPrintDay000001',1204890714,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n \n
    \n\n\n\n\n\n\n\n
    :00\n
      \n
    • \n
      \n
    \n
    \n
    \n© Plain Black 2006\n
    ',0,NULL,NULL),('\">\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
    \" alt=\"\" />\r\n
    \r\n
     
    \r\n\r\n
    \r\n X\r\n
    \r\n
    \r\n
    \r\n
    °F
    \r\n

    \r\n\r\n
    \r\n\r\n\r\n\r\n\r\n\r\n\r\n
    \r\n\">\r\n
    \"The
    \r\n','WeatherData',1,1,'WeatherDataTmpl0000001',1210711353,'WebGUI::Asset::Template::HTMLTemplate',1,'\">\n\n

    \n
    \n\n

    \n
    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n
    \" alt=\"\" />\n
    \n
     
    \n
    \nX\n
    \n
    \n
    \n
    °F
    \n

    \n
    \n\n\n\n\n\n
    \n\">\n
    \"The
    ',0,NULL,NULL),('
    \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
    ^International(location,Asset_Event);
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    ^International(description label,Asset_Event);
    \r\n
    \r\n
    \r\n
    \r\n
    ^International(scheduled,Asset_Event);
    \r\n
    \r\n
    \r\n ,\r\n \r\n \r\n : , \r\n \r\n \r\n : \r\n
    \r\n
    \r\n
    ^International(related material,Asset_Event);
    \r\n
    \r\n \">
    \r\n
    \r\n
    \r\n','Calendar/Print/Event',1,1,'CalendarPrintEvent0001',1215396964,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n
    ^International(location,Asset_Event);
    \n
    \n
    \n\n
    \n
    \n
    ^International(description label,Asset_Event);
    \n
    \n
    \n
    \n
    ^International(scheduled,Asset_Event);
    \n
    \n
    \n,\n\n\n: ,\n\n\n: \n
    \n
    \n
    ^International(related material,Asset_Event);
    \n
    \n\">
    \n
    \n
    ',0,NULL,NULL),('\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
    _div\" class=\"dragable uncommitted-asset\">\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
    _div\" class=\"dragable uncommitted-asset\">\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
    _div\" class=\"dragable uncommitted-asset\">\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
    _div\" class=\"dragable uncommitted-asset\">\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','Layout',1,1,'PBtmpl0000000000000094',1220655703,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n

    \n
    \n\n

    \n
    \n\n\n\n\n
    \n\n\n\n\n\n\">\n\n\n\n\n\n
    _div\" class=\"dragable uncommitted-asset\">\n\n
    \n\n
    \n
    \n
    \n\n
     
    \n\n
    \n\n\n\n\n\n\">\n\n\n\n\n\n
    _div\" class=\"dragable uncommitted-asset\">\n\n
    \n\n
    \n
    \n
    \n\n\n
    \n\n\n\n\n\n\">\n\n\n\n\n\n
    _div\" class=\"dragable uncommitted-asset\">\n\n
    \n\n
    \n
    \n
    \n\n
     
    \n\n
    \n\n\n\n\n\n\">\n\n\n\n\n\n
    _div\" class=\"dragable uncommitted-asset\">\n\n
    \n\n
    \n
    \n
    \n\n\n
     
    \n\n
    ',0,NULL,NULL),('
    \r\n
    \r\n
    Add/Edit Task
    \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 \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 \" href=\"\" target=\"_new\" onclick=\"taskEdit_searchPopup(this.href); return false;\">\" alt=\"\" src=\"/users.gif\" />     \r\n \" href=\"\" target=\"_new\" onclick=\"taskEdit_searchPopup(this.href); return false;\">\" alt=\"\" src=\"/groups.gif\" /> \r\n \r\n
    \r\n
    \r\n\r\n
    \r\n
    \n','ProjectManager_editTask',1,1,'ProjectManagerTMPL0004',1222574693,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    \n
    Add/Edit Task
    \n
    \n\n
    \n
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
     
    \n\n\n\n\n\n\n\n\n\n\n\n
      
    \n
    \n\n\n\n\n\n\n\n\n\n
         
    \n
    \n\n\n\n\n\n\n\n\n\n
      
    \n
    \n\n\n\n\n\n\n\n\n\n
    \n:

    \n\n\" href=\"\" target=\"_new\" onclick=\"taskEdit_searchPopup(this.href); return false;\">\" alt=\"\" src=\"/users.gif\" />     \n\" href=\"\" target=\"_new\" onclick=\"taskEdit_searchPopup(this.href); return false;\">\" alt=\"\" src=\"/groups.gif\" /> \n\n
    \n
    \n\n
    \n
    ',0,NULL,NULL),('
    \r\n\r\n\r\npx;\">\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
     Task NameDurationStartFinishPred\" valign=\"top\" id=\"scrolltd\" style=\"border-style:none;width:%;\">\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
    \n','ProjectManager_project',1,1,'ProjectManagerTMPL0002',1222574693,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n\npx;\">\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\">\n\n\n\n\n\n\n\n\n\n\n\n\n\n
     Task NameDurationStartFinishPred\" valign=\"top\" id=\"scrolltd\" style=\"border-style:none;width:%;\">\n
    \n\n
    \n
     
    \n\n\n\n\n\n\n
     
     
    \n\n\n
    ',0,NULL,NULL),('\n

    ^International(my subscriptions,Asset_Newsletter);

    \n\n\n

    ^International(newsletter categories,Asset_Newsletter);

    \n\n


    \n

    \n \n
    \n
    \n

    \n
    \n\n\n\n','newsletter/mysubscriptions',1,1,'newslettersubscrip0001',1221692339,'WebGUI::Asset::Template::HTMLTemplate',1,'

    ^International(my subscriptions,Asset_Newsletter);

    \n\n

    ^International(newsletter categories,Asset_Newsletter);

    \n\n


    \n

    \n\n
    \n
    \n

    \n
    \n\n',0,NULL,NULL),('\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
    \" class=\"yuimenubar\">\r\n
    \r\n
      \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
  • onclick=\"window.open(this.href); return false;\" href=\"\">\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','Navigation',1,1,'stevecoolmenu000000001',1224116942,'WebGUI::Asset::Template::HTMLTemplate',1,'\n
    \n
    \n\n

    \n
    \n\n

    \n
    \n
    \n\n\n
    \" class=\"yuimenubar\">\n
    \n
      \n\n\n
    \n
    \n
    \n\n
    \n
  • onclick=\"window.open(this.href); return false;\" href=\"\">\n\n
    \n
    \n
      \n\n\n\n\n\n\n
    \n\n
  • \n\n
    \n\n',0,NULL,NULL),('
    \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 \r\n \r\n
    wgRowOnewgRowTwo label\" valign=\"top\">\r\n \r\n \r\n \r\n \r\n \r\n \r\n wgRowOnewgRowTwo\" valign=\"top\" colspan=\"2\">\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','Thingy/EditThing',1,1,'ThingyTmpl000000000003',1224518002,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n

    \n
    \n\n

    \n
    \n\n
    \n
    \n\n\n
      \n\n
    • \n
      \n
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    wgRowOnewgRowTwo label\" valign=\"top\">\n\n\n\n\n\n\nwgRowOnewgRowTwo\" valign=\"top\" colspan=\"2\">\n\n\n\n
    \n
    \n\n\n\n\n\n*\n\n\n
    \n
    \n
    \n
    \n\n
    \n
    ',0,NULL,NULL),('
    \r\n

    \r\n  :
    \r\n  
    \r\n  
    \r\n  \r\n

    \r\n\r\n \r\n

    \r\n  :
    \r\n \r\n \" title=\"Link to profile\">
    \r\n
    \r\n

    \r\n
    \r\n
    \r\n
    \r\n\r\n','Macro/UsersOnline',1,1,'h_T2xtOxGRQ9QJOR6ebLpQ',1224616545,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n

    \n :
    \n 
    \n 
    \n \n

    \n\n\n

    \n :
    \n\n\" title=\"Link to profile\">
    \n
    \n

    \n
    \n
    \n
    ',0,NULL,NULL),('
    \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
    \" alt=\"Avatar of \"/> \" title=\"Link to profile\">

    \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','Macro/UsersOnline',1,1,'4Ekp0kJoJllRRRo_J1Rj6w',1224616672,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n

    \n :
    \n 
    \n 
    \n \n

    \n

    \n :
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \" alt=\"Avatar of \"/> \" title=\"Link to profile\">

    \n

    \n

    \n :
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n

    \n

    \n
    ',0,NULL,NULL),('\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\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
    ^International(\'id label\',\'Asset_UserList\');^International(\'username label\',\'Asset_UserList\');\r\n\">\r\n\">\r\n\">
    \r\n\r\n^International(\'Field not public message\',\'Asset_UserList\');\r\n \r\n\r\n\r\n\r\n\r\n^International(\'Field not public message\',\'Asset_UserList\');\r\n \r\n\r\n\r\n\r\n\r\n^International(\'Field not public message\',\'Asset_UserList\');\r\n \r\n \r\n\r\n
    ^International(\'No users message\',\'Asset_UserList\');
    \r\n\r\n

    \r\n · · \r\n
    \r\n
    ','UserList',1,1,'UserListTmpl0000000001',1228125743,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n

    \n\n\n\n\n\">\n\n\n | \n\n
    \n
    \n
    \n\n
    \n\n
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(\'id label\',\'Asset_UserList\');^International(\'username label\',\'Asset_UserList\');\n\">\n\">\n\">
    \n\n^International(\'Field not public message\',\'Asset_UserList\');\n\n\n\n\n\n^International(\'Field not public message\',\'Asset_UserList\');\n\n\n\n\n\n^International(\'Field not public message\',\'Asset_UserList\');\n\n\n\n
    ^International(\'No users message\',\'Asset_UserList\');
    \n\n

    \n · · \n
    \n
    ',0,NULL,NULL),('\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\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
    ^International(\'id label\',\'Asset_UserList\');^International(\'username label\',\'Asset_UserList\');\r\n\">\r\n\">\r\n\">\r\n\">
    \r\n\r\n^International(\'Field not public message\',\'Asset_UserList\');\r\n \r\n\r\n\r\n\r\n\r\n^International(\'Field not public message\',\'Asset_UserList\');\r\n \r\n\r\n\r\n\r\n\r\n^International(\'Field not public message\',\'Asset_UserList\');\r\n \r\n \r\n\r\n\r\n\r\n^International(\'Field not public message\',\'Asset_UserList\');\r\n \r\n \r\n\r\n
    ^International(\'No users message\',\'Asset_UserList\');
    \r\n\r\n

    \r\n · · \r\n
    \r\n
    ','UserList',1,1,'UserListTmpl0000000003',1228125758,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n

    \n\n
    \n
    \n\n:
    \n:
    \n
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(\'id label\',\'Asset_UserList\');^International(\'username label\',\'Asset_UserList\');\n\">\n\">\n\">\n\">
    \n\n^International(\'Field not public message\',\'Asset_UserList\');\n\n\n\n\n\n^International(\'Field not public message\',\'Asset_UserList\');\n\n\n\n\n\n^International(\'Field not public message\',\'Asset_UserList\');\n\n\n\n\n\n^International(\'Field not public message\',\'Asset_UserList\');\n\n\n\n
    ^International(\'No users message\',\'Asset_UserList\');
    \n\n

    \n · · \n
    \n
    ',0,NULL,NULL),('\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^International(\'search in label\',\'Asset_UserList\');
    \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\r\n\r\n\r\n\r\n
    ^International(\'id label\',\'Asset_UserList\');^International(\'username label\',\'Asset_UserList\');\r\n\">\r\n\">\r\n\">
    \r\n\r\n^International(\'Field not public message\',\'Asset_UserList\');\r\n \r\n\r\n\r\n\r\n\r\n^International(\'Field not public message\',\'Asset_UserList\');\r\n \r\n\r\n\r\n\r\n\r\n^International(\'Field not public message\',\'Asset_UserList\');\r\n \r\n \r\n\r\n
    ^International(\'No users message\',\'Asset_UserList\');
    \r\n\r\n

    \r\n · · \r\n
    \r\n
    ','UserList',1,1,'UserListTmpl0000000002',1228125752,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n

    \n\n
    \n
    \n\n\n
    \n^International(\'search in label\',\'Asset_UserList\');
    \n
    \n
    \n
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(\'id label\',\'Asset_UserList\');^International(\'username label\',\'Asset_UserList\');\n\">\n\">\n\">
    \n\n^International(\'Field not public message\',\'Asset_UserList\');\n\n\n\n\n\n^International(\'Field not public message\',\'Asset_UserList\');\n\n\n\n\n\n^International(\'Field not public message\',\'Asset_UserList\');\n\n\n\n
    ^International(\'No users message\',\'Asset_UserList\');
    \n\n

    \n · · \n
    \n
    ',0,NULL,NULL),('\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \">\n \n \n \n \n \n \n \n \n \n \n \n \n
     
    /delete.gif\" border=\"0\" onclick=\"removeRow(\'\')\" style=\"cursor:pointer\" alt=\"delete\" />
    \n \n \n \n \n \n \n \n \n \n \n \n \n
    \" class=\"PM_blueLink\"> ^International(last week,Asset_TimeTracking);\" class=\"PM_blueLink\">^International(next week,Asset_TimeTracking);
     
    \n \n \n \" onclick=\"addRow();\" />   \" />\n
    \n
    \n\n\n\n \n \">\n \n \n \n \n \n \n \n \n
    /delete.gif\" border=\"0\" onclick=\"removeRow()\" style=\"cursor:pointer\" alt=\"delete\" />
    \n
    ','TimeTracking_row',1,1,'TimeTrackingTMPL000003',1229311434,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\">\n\n\n\n\n\n\n\n\n\n\n\n\n
     
    /delete.gif\" border=\"0\" onclick=\"removeRow(\'\')\" style=\"cursor:pointer\" alt=\"delete\" />
    \n\n\n\n\n\n\n\n\n\n\n\n\n
    \" class=\"PM_blueLink\"> ^International(last week,Asset_TimeTracking);\" class=\"PM_blueLink\">^International(next week,Asset_TimeTracking);
     
    \n\n\n\" onclick=\"addRow();\" />   \" />\n
    \n
    \n\n\n\n\">\n\n\n\n\n\n\n\n\n
    /delete.gif\" border=\"0\" onclick=\"removeRow()\" style=\"cursor:pointer\" alt=\"delete\" />
    \n
    ',0,NULL,NULL),('

    Calendar

    \r\n\r\n\r\n

    \r\n \r\n ^International(New Year,Asset_Calendar);,\r\n \r\n \r\n ^International(New Month,Asset_Calendar);,\r\n \r\n \r\n ^International(New Day,Asset_Calendar);\r\n \r\n

    \r\n\r\n

    \">

    \r\n \r\n

    \r\n\r\n
    \r\n\r\n\r\n \"><< ^International(previous page,Asset_Calendar);\r\n\r\n\r\n \">^International(next page,Asset_Calendar); >>\r\n','Calendar/Print/List',1,1,'uRL9qtk7Rb0YRJ41LmHOJw',1229311072,'WebGUI::Asset::Template::HTMLTemplate',1,'

    Calendar

    \n\n

    \n\n^International(New Year,Asset_Calendar);,\n\n\n^International(New Month,Asset_Calendar);,\n\n\n^International(New Day,Asset_Calendar);\n\n

    \n

    \">

    \n\n

    \n
    \n\n\"><< ^International(previous page,Asset_Calendar);\n\n\n\">^International(next page,Asset_Calendar); >>\n',0,NULL,NULL),('\n\n\n<tmpl_var title>\n\n\n/taskEdit.css\" />\n\n\n
    \">\n\" />\n\n\" />\n\" />\n
    \n
    \" size=\"20\" class=\"inputBox\" />\n\n
    \n\n

    \n

    \n','ProjectManager_resourcePopup',1,1,'ProjectManagerTMPL0005',1229579830,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n<tmpl_var title>\n\n\n/taskEdit.css\" />\n\n\n
    \">\n\" />\n\n\" />\n\" />\n
    \n
    \" size=\"20\" class=\"inputBox\" />\n\n
    \n

    \n

    \n',0,NULL,NULL),('\n

    \n
    \n\n\n

    \n
    \n\n\n
    \n \n
    \n
    \n\n\n\n\n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \"> \n
    \">
    \n \">\n \n
    \n
    %;\">
    \n
    %
    \n
    \n
    \n \n \">/edit.gif\" style=\"border-style:none;\" title=\"\" alt=\"^International(edit,Asset);\" /> \n \'));\">/delete.gif\" style=\"border-style:none;\" title=\"\" alt=\"^International(delete,Asset);\" />\n
    ','ProjectManager_dashboard',1,1,'ProjectManagerTMPL0001',1229579830,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n
    \n\n
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\"> \n
    \">
    \n\">\n\n
    \n
    %;\">
    \n
    %
    \n
    \n
    \n\n\">/edit.gif\" style=\"border-style:none;\" title=\"\" alt=\"^International(edit,Asset);\" /> \n\'));\">/delete.gif\" style=\"border-style:none;\" title=\"\" alt=\"^International(delete,Asset);\" />\n
    ',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n\n \n

    \n\n\n\n \n \n \n \n \n ^International(Error: Search string,Asset_HttpProxy); ^International(not found in content,Asset_HttpProxy);.\n \n\n\n\n\n\n \n \n \n \n \n ^International(Warning: Ending search point,Asset_HttpProxy); ^International(not found in content,Asset_HttpProxy);.\n \n','HttpProxy',1,1,'PBtmpl0000000000000033',1230159454,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n\n

    \n\n\n\n\n\n\n\n^International(Error: Search string,Asset_HttpProxy); ^International(not found in content,Asset_HttpProxy);.\n\n\n\n\n\n\n\n\n\n^International(Warning: Ending search point,Asset_HttpProxy); ^International(not found in content,Asset_HttpProxy);.\n\n',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n\n \n

    \n\n\n\n \">^International(Download this data,Asset_SQLReport);\n\n\n\n

      \n \n
    • \n
      \n
    \n
    \n\n\n\n\n \n\n\n\n \n \n \n \n \n \n \n \n \n \n \n\n
    \">\n \n \n \n \n \n
     \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \">\n \n \n \n \n \n
     \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \">\n \n \n \n \n \n
     \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \">\n \n \n \n \n \n
     \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n\n\n
    \n \n
    \n
    ','SQLReport',1,1,'PBtmpl0000000000000059',1229907401,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n\n

    \n\n\n\">^International(Download this data,Asset_SQLReport);\n\n\n

      \n\n
    • \n
      \n
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \">\n\n\n\n\n\n
     \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \">\n\n\n\n\n\n
     \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \">\n\n\n\n\n\n
     \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \">\n\n\n\n\n\n
     \n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n \n
    \n
    ',0,NULL,NULL),('\"> \n \n \n

    \n
    \n\n\n

    \n
    \n\n\n

    \n\n\n

    \n
    \n\n\n \n \n\n\n \n \n\n
    ^International(364,WebGUI);:\n \n
    ^International(For,WebGUI);: 
    \n
    \n
    ','MultiSearch',1,1,'MultiSearchTmpl0000001',1230269962,'WebGUI::Asset::Template::HTMLTemplate',1,'\">\n\n

    \n
    \n\n

    \n
    \n\n

    \n\n\n

    \n
    \n\n\n\n\n\n\n\n\n\n
    ^International(364,WebGUI);:\n\n
    ^International(For,WebGUI);: 
    \n
    \n
    ',0,NULL,NULL),('\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 \">^International(label day,Asset_Calendar);\r\n \">^International(label week,Asset_Calendar);\r\n \">^International(label month,Asset_Calendar);\r\n ?type=list\">^International(486,WebGUI);\r\n \">^International(label search,Asset_Calendar);\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
    :00
    \r\n
    \r\n
      \r\n
    • \r\n \">\r\n
    • \r\n
    \r\n
    \r\n
    ','Calendar/Day',1,1,'CalendarDay00000000001',1230358389,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\">^International(label day,Asset_Calendar);\n\">^International(label week,Asset_Calendar);\n\">^International(label month,Asset_Calendar);\n?type=list\">^International(486,WebGUI);\n\">^International(label search,Asset_Calendar);\n\n
    \n\n
    \n
    \n, , \n
    \n
    \n\n\n\n\n\n
    \n
    :00
    \n
    \n\n
    \n
    ',0,NULL,NULL),('\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 \">^International(label day,Asset_Calendar);\r\n \">^International(label week,Asset_Calendar);\r\n \">^International(label month,Asset_Calendar);\r\n ?type=list\">^International(486,WebGUI);\r\n \">^International(label search,Asset_Calendar);\r\n\r\n \r\n
    \r\n \r\n
    \r\n
    \r\n , to , \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n
    curDay\"> \r\n \r\n \r\n
    \r\n
    \r\n
    ','Calendar/Week',1,1,'CalendarWeek0000000001',1230358389,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\">^International(label day,Asset_Calendar);\n\">^International(label week,Asset_Calendar);\n\">^International(label month,Asset_Calendar);\n?type=list\">^International(486,WebGUI);\n\">^International(label search,Asset_Calendar);\n\n
    \n\n
    \n
    \n , to , \n
    \n
    \n\n\n\n\n\n
    \n
    \n
    curDay\">\n\n\n
    \n
    \n
    ',0,NULL,NULL),('\n\n\n\n\n/tools.css\" />\n\n\n\n\n\n\n \n \n \n \n \n \n
    \n
    \n \n \n \n \n \n
    ()\n \n
    1:23 PM EDT
    \n \n
    \n
    \n
    \n
    \n \n \n \n \n \n \n
    \n &t=1d&q=l&l=off&z=s&p=s\" alt=\"chart\" />\n \n \n \n \n \n \n \n \n \n \n
    Today5d1m3m1y5y20y
    \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ^International(stocks.last,Asset_StockData);
    ^International(Market Cap,Asset_StockData);
    ^International(Change,Asset_StockData); _up_down\" style=\"text-align: right; font-weight: bold;\">\n /\' alt=\"\" /> \n
    ^International(Open,Asset_StockData);
    ^International(Day High,Asset_StockData);
    ^International(stocks.bid,Asset_StockData);
    ^International(52 Wk High,Asset_StockData);
    ^International(EPS,Asset_StockData);
    ^International(stocks.ex_div,Asset_StockData);
    ^International(Yield,Asset_StockData);
    \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ^International(Last Trade,Asset_StockData);
    ^International(Volume,Asset_StockData); m
    ^International(% Change,Asset_StockData); _up_down\" style=\"text-align: right; font-weight: bold;\">%
    ^International(Prev Close,Asset_StockData);
    ^International(Day Low,Asset_StockData);
    ^International(stocks.ask,Asset_StockData);
    ^International(52 Wk Low,Asset_StockData);
    ^International(stocks.pe,Asset_StockData);
    ^International(Dividend,Asset_StockData);
    ^International(Exchange,Asset_StockData);
    \n
    \n
    \n\n\n\n','StockData/Display',1,1,'StockDataTMPL000000002',1229494994,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n\n/tools.css\" />\n\n\n\n\n\n\n\n\n\n\n\n
    \n
    \n\n\n\n\n\n
    ()\n\n
    1:23 PM EDT
    \n\n
    \n
    \n
    \n
    \n\n\n\n\n\n\n
    \n&t=1d&q=l&l=off&z=s&p=s\" alt=\"chart\" />\n\n\n\n\n\n\n\n\n\n\n
    Today5d1m3m1y5y20y
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(stocks.last,Asset_StockData);
    ^International(Market Cap,Asset_StockData);
    ^International(Change,Asset_StockData); _up_down\" style=\"text-align: right; font-weight: bold;\">\n/\' alt=\"\" /> \n
    ^International(Open,Asset_StockData);
    ^International(Day High,Asset_StockData);
    ^International(stocks.bid,Asset_StockData);
    ^International(52 Wk High,Asset_StockData);
    ^International(EPS,Asset_StockData);
    ^International(stocks.ex_div,Asset_StockData);
    ^International(Yield,Asset_StockData);
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(Last Trade,Asset_StockData);
    ^International(Volume,Asset_StockData); m
    ^International(% Change,Asset_StockData); _up_down\" style=\"text-align: right; font-weight: bold;\">%
    ^International(Prev Close,Asset_StockData);
    ^International(Day Low,Asset_StockData);
    ^International(stocks.ask,Asset_StockData);
    ^International(52 Wk Low,Asset_StockData);
    ^International(stocks.pe,Asset_StockData);
    ^International(Dividend,Asset_StockData);
    ^International(Exchange,Asset_StockData);
    \n
    \n
    \n\n\n',0,NULL,NULL),('
    \" class=\"dataTable\">\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
    ','DataTable',1,1,'TuYPpHx7TUyk08639Pc8Bg',1233861621,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"dataTable\">\n\n\n\n\n

    \n
    \n
    \n\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n
    ',0,NULL,NULL),('
    \" class=\"dataTable\">\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
    ','DataTable',1,1,'3rjnBVJRO6ZSkxlFkYh_ug',1233861835,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"dataTable\">\n\n

    \n
    \n\n

    \n
    \n
    \n\n
    \n
    \n\n
    \n
    ',0,NULL,NULL),('

    \" />
    ','ImageAsset',1,1,'NBVSVNLp9X_bV7WrCprtCA',1237842096,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \" />
    ',0,NULL,NULL),('
    \r\n \r\n

    \r\n
    \r\n\r\n \r\n

    • ^International(manage things label,Asset_Thingy);

    \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
    rowOnerowTwo\">\r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    ','Thingy',1,1,'ThingyTmpl000000000001',1237914005,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n

    \n
    \n\n

    • ^International(manage things label,Asset_Thingy);

    \n
    \n\n
    \n
    \n\n\n\n\n
    \n\n
    rowOnerowTwo\">\n \n
    \n
    \n
    \n
    \n
    ',0,NULL,NULL),('\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 ','Carousel',1,1,'CarouselTmpl0000000002',1239475937,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n
    \n
    \n\n\n',0,NULL,NULL),('^International(inbox notification,Account_Inbox);','Account/Inbox/Notification',1,1,'b1316COmd9xRv4fCI3LLGA',1236956475,'WebGUI::Asset::Template::HTMLTemplate',1,'^International(inbox notification,Account_Inbox);',0,NULL,NULL),('
    \n
    \n \n
    \n
    \n
    ^International(Working...,WebGUI);
    \n
     
    \n
    \n
    \n \" style=\"border-style:none;height:48px;width:48px;\" title=\"\" alt=\"\" />\n
    \n
    \n \"*\"\n
    \n
    ','AdminConsole/ProgressBar',1,1,'YP9WaMPJHvCJl-YwrLVcPw',1245376837,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    \n\n
    \n
    \n
    ^International(Working...,WebGUI);
    \n
     
    \n
    \n
    \n\" style=\"border-style:none;height:48px;width:48px;\" title=\"\" alt=\"\" />\n
    \n
    \n\"*\"\n
    \n
    ',0,NULL,NULL),('\r\n \r\n

    \r\n
    \r\n
    \r\n\r\n
    \r\n \" style=\"height:auto;min-height:100px;width:100%;display:block;\">\r\n \" /> \r\n \r\n
    ','FileAsset',1,1,'pbtmpl0000000000000220',1247488979,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n

    \n
    \n
    \n
    \n\" style=\"height:auto;min-height:100px;width:100%;display:block;\">\n\" />\n\n
    ',0,NULL,NULL),('\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n  \n
    \n \n \n \n \n \n
    \n  \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n \n \n \" >
    \n
    \n \n
    \n
    \n \n
    \n \n \">
    \n
    \n
    \n
    \n
    \n \">
    \n ^AdminToggle;
    \n ^LoginToggle;
    \n
    \n
    \n
    \n \n
    \n
    \n \n \')\">\"?\"\n \n
    \n
    \n \" style=\"border-style:none;height:48px;width:48px;\" title=\"\" alt=\"\" />\n
    \n
    \n\"*\"\n
    \n
    \n \" style=\"border-style:none;\" title=\"\" alt=\"\" />\n
    \n\n\n
    ','AdminConsole',1,1,'PBtmpl0000000000000001',1247535846,'WebGUI::Asset::Template::HTMLTemplate',1,'\n
    \n
    \n\n
    \n
    \n\n
    \n\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n\n\n\" >
    \n
    \n\n
    \n
    \n\n
    \n\n\">
    \n
    \n
    \n
    \n
    \n\">
    \n^AdminToggle;
    \n^LoginToggle;
    \n
    \n
    \n
    \n\n
    \n
    \n\n\')\">\"?\"\n\n
    \n
    \n\" style=\"border-style:none;height:48px;width:48px;\" title=\"\" alt=\"\" />\n
    \n
    \n\"*\"\n
    \n
    \n\" style=\"border-style:none;\" title=\"\" alt=\"\" />\n
    \n\n
    ',0,NULL,NULL),('

    \r\n

    \r\n\r\n\" />\" quality=\"high\" width=\"800\" height=\"600\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />\r\n

    ','FileAsset',1,1,'pbtmpl0000000000000221',1247487940,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n

    \n\n\" />\" quality=\"high\" width=\"800\" height=\"600\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />\n

    ',0,NULL,NULL),('
    \n \n

    \n
    \n\n \n

    \n
    \n\n
    \n ^ViewCart(); (^CartItemCount;)\n
    \n\n \n
    \n
    \n \n\n \n
    \n ^International(subcategories,Asset_Shelf);: \n \n \n \">\n \n
    \n
    \n\n \n
    \n \n \n \" class=\"thumbnail\">\" alt=\"\" />\n \n \n
    \n \n ()\n
    \n \n
    \n \n
    \n
    \n
    \n \n \n \n \n
    \n ^International(this shelf is empty,Asset_Shelf);\n
    \n \n \n
    \n ^International(You do not have permission to view the products on this shelf,Asset_Shelf);\n
    \n
    \n
    \n
    \n
    ','Shelf',1,1,'nFen0xjkZn8WkpM93C9ceQ',1247864696,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n

    \n
    \n\n

    \n
    \n
    \n^ViewCart(); (^CartItemCount;)\n
    \n\n
    \n
    \n\n
    \n^International(subcategories,Asset_Shelf);:\n\n\n\">\n\n
    \n
    \n\n\n\n\n\n\n\n
    \n^International(this shelf is empty,Asset_Shelf);\n
    \n\n\n
    \n^International(You do not have permission to view the products on this shelf,Asset_Shelf);\n
    \n
    \n
    \n
    \n
    ',0,NULL,NULL),('
    \n\n\n
    \n );\'\"/>\n  \n );\'\"/>\n
    \n\n \n
    \n ^International(friends only,Account_Profile);^International(private profile,Account_Profile);^International(public profile,Account_Profile);\n
    \n\n
    \n\n\n

    ^International(error label,Account_Inbox);

    \n

    \n

    \">^International(back label,Account_Profile);

    \n\n \n \n \n \n \n \n \n \n \n \n \n \n
    colspan=2 class=\"bar\">\n
    \n ^International(member since,Account_Inbox); ^D(%z,);\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    32\" class=\"bar\">
    greenredblue;\">
    \n
    \n );\" class=\"WGphotostyle\"/>
    \n
    \n
    \n \n
    \n );\'\"/>\n  \n );\'\"/>\n
    \n\n
    \n','Account/Profile/View',1,1,'2CS-BErrjMmESOtGT90qOg',1248549087,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    \n);\'\"/>\n \n);\'\"/>\n
    \n\n
    \n^International(friends only,Account_Profile);^International(private profile,Account_Profile);^International(public profile,Account_Profile);\n
    \n
    \n\n

    ^International(error label,Account_Inbox);

    \n

    \n

    \">^International(back label,Account_Profile);

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n
    colspan=2 class=\"bar\">\n
    \n^International(member since,Account_Inbox); ^D(%z,);\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    32\" class=\"bar\">
    greenredblue;\">
    \n
    \n);\" class=\"WGphotostyle\"/>
    \n
    \n
    \n
    \n);\'\"/>\n \n);\'\"/>\n
    \n
    ',1,NULL,NULL),('
    \n
    \n
    \n
    \n
    \n

    ^International(error label,Account_Inbox);

    \n

    \n

    \">^International(back label,Account_Profile);

    \n
    \n
    \n
    \n
    \n
    ','Account/Profile/Error',1,1,'MBmWlA_YEA2I6D29OMGtRg',1248549086,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    \n
    \n
    \n
    \n

    ^International(error label,Account_Inbox);

    \n

    \n

    \">^International(back label,Account_Profile);

    \n
    \n
    \n
    \n
    \n
    ',0,NULL,NULL),('\n\n
    \n','Account/Layout',1,1,'gfZOwaTWYjbSoVaQtHBBEw',1249407461,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n
    \n',0,NULL,NULL),('
    \n\n
    \n\n

    \n
    \n ^International(member since,Account_Inbox); ^D(%z,);\n

    \n

    \n disabled onclick=\"location.href=\'\'\"/> \'\" /> \'\" />\n \'\" disabled/> >\" onclick=\"location.href=\'\'\" disabled/>\n

    \n
    \n

    \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ^International(subject label,Account_Inbox);:
    ^International(from label,Account_Inbox);:
    ^International(received label,Account_Inbox);:^D(\"%z %Z\",);
    ^International(status label,Account_Inbox);:
    \n
    \n
    \n \n\n
    \n\n
    \n','Account/Inbox/ViewMessage',1,1,'0n4HtbXaWa_XJHkFjetnLQ',1248549086,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    \n

    \n
    \n^International(member since,Account_Inbox); ^D(%z,);\n

    \n

    \ndisabled onclick=\"location.href=\'\'\"/> \'\" /> \'\" />\n\'\" disabled/> >\" onclick=\"location.href=\'\'\" disabled/>\n

    \n
    \n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(subject label,Account_Inbox);:
    ^International(from label,Account_Inbox);:
    ^International(received label,Account_Inbox);:^D(\"%z %Z\",);
    ^International(status label,Account_Inbox);:
    \n
    \n
    \n
    \n
    ',0,NULL,NULL),('

    ^International(error label,Account_Inbox);

    \n

    \n

    \">^International(back label,Account_Inbox);

    \n','Account/Inbox/Error',1,1,'ErEzulFiEKDkaCDVmxUavw',1248549086,'WebGUI::Asset::Template::HTMLTemplate',1,'

    ^International(error label,Account_Inbox);

    \n

    \n

    \">^International(back label,Account_Inbox);

    ',0,NULL,NULL),('

    ^International(message sent label,Account_Inbox);

    \n

    ^International(message sent text,Account_Inbox);

    \n

    \">^International(back label,Account_Inbox);

    ','Account/Inbox/Confirm',1,1,'DUoxlTBXhVS-Zl3CFDpt9g',1248549086,'WebGUI::Asset::Template::HTMLTemplate',1,'

    ^International(message sent label,Account_Inbox);

    \n

    ^International(message sent text,Account_Inbox);

    \n

    \">^International(back label,Account_Inbox);

    ',0,NULL,NULL),('\n
    \n
    \n\n

    \n
    \n ^International(member since,Account_Inbox); ^D(%z,);\n

    \n\n

    \n \n \n\n \n \n \" class=\"prevNext\">\"Previous\" \n \"> \n  \" class=\"prevNext\">\"Next\"\n \n \n \n \n \n \n

    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n WGoddThreadWGevenThread\">\n \n \n \n \n \n \n \n \n \n \n \n \n
    \">^International(from label,Account_Inbox);\">^International(invitation label,Account_Inbox);\">^International(date label,Account_Inbox);
    \" class=\"WGinbox_from\">\">^International(invitation message,Account_Inbox,);
    ^International(no invitations,Account_Inbox);
    \n \n

    \n \n \n\n \n \n \" class=\"prevNext\">\"Previous\" \n \"> \n  \" class=\"prevNext\">\"Next\"\n \n \n \n \n \n \n

    \n\n

    \n ^International(invitation count,\'Account_Inbox\');\n

    \n\n
    \n
    \n','Account/Inbox/ManageInvitations',1,1,'1Q4Je3hKCJzeo0ZBB5YB8g',1248549086,'WebGUI::Asset::Template::HTMLTemplate',1,'\n
    \n
    \n

    \n
    \n^International(member since,Account_Inbox); ^D(%z,);\n

    \n

    \n \n\n\n\" class=\"prevNext\">\"Previous\" \n\"> \n \" class=\"prevNext\">\"Next\"\n\n\n\n\n

    \n\n\n\n\n\n\n\n\n\nWGoddThreadWGevenThread\">\n\n\n\n\n\n\n\n\n\n\n\n\n
    \">^International(from label,Account_Inbox);\">^International(invitation label,Account_Inbox);\">^International(date label,Account_Inbox);
    \" class=\"WGinbox_from\">\">^International(invitation message,Account_Inbox,);
    ^International(no invitations,Account_Inbox);
    \n

    \n \n\n\n\" class=\"prevNext\">\"Previous\" \n\"> \n \" class=\"prevNext\">\"Next\"\n\n\n\n\n

    \n

    \n ^International(invitation count,\'Account_Inbox\');\n

    \n
    \n
    \n',0,NULL,NULL),('

    ^International(invitation confirm label,Account_Inbox);

    \n

    ^International(invitation confirm message,Account_Inbox);

    \n\n \n \n \n \n \n
    ^International(\'you have not been added\',\'Friends\',);^International(\'you have been added\',\'Friends\',);
    \n

    \">^International(invitations back label,Account_Inbox);

    \n','Account/Inbox/Confirm',1,1,'5A8Hd9zXvByTDy4x-H28qw',1248549086,'WebGUI::Asset::Template::HTMLTemplate',1,'

    ^International(invitation confirm label,Account_Inbox);

    \n

    ^International(invitation confirm message,Account_Inbox);

    \n\n\n\n\n\n\n
    ^International(\'you have not been added\',\'Friends\',);^International(\'you have been added\',\'Friends\',);
    \n

    \">^International(invitations back label,Account_Inbox);

    ',0,NULL,NULL),('\n
    \n \n
    \n\n

    \n
    \n ^International(member since,Account_Inbox); ^D(%z,);\n

    \n
    \n \'\" /> \'\" disabled/> >\" onclick=\"location.href=\'\'\" disabled/>\n
    \n \n

    \n

    \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ^International(from label,Account_Inbox);:
    ^International(received label,Account_Inbox);:
    ^D(\"%z %Z\",);
    \n
    \n\n
    \n\n
    \n','Account/Inbox/ViewInvitation',1,1,'VBkY05f-E3WJS50WpdKd1Q',1248549087,'WebGUI::Asset::Template::HTMLTemplate',1,'\n
    \n
    \n

    \n
    \n^International(member since,Account_Inbox); ^D(%z,);\n

    \n
    \n \'\" /> \'\" disabled/> >\" onclick=\"location.href=\'\'\" disabled/>\n
    \n

    \n

    \n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(from label,Account_Inbox);:
    ^International(received label,Account_Inbox);:
    ^D(\"%z %Z\",);
    \n
    \n
    \n
    \n',0,NULL,NULL),('

    \n

    \n','Account/Inbox/InviteUserMessage',1,1,'XgcsoDrbC0duVla7N7JAdw',1248549086,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n

    ',0,NULL,NULL),(' \n
    \n \n
    \n\n

    \n
    \n ^International(member since,Account_Inbox); ^D(%z,);\n

    \n\n

    \n ^International(invite a friend,Account_Inbox);\n

    \n \n\n

    \n\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ^International(to label,Account_Inbox);:
    ^International(subject label,Account_Inbox);:
    \n   \n \'\" />\n
    \n\n
    \n
    \n','Account/Inbox/InviteUser',1,1,'cR0UFm7I1qUI2Wbpj--08Q',1248549086,'WebGUI::Asset::Template::HTMLTemplate',1,'\n
    \n
    \n

    \n
    \n^International(member since,Account_Inbox); ^D(%z,);\n

    \n

    \n^International(invite a friend,Account_Inbox);\n

    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(to label,Account_Inbox);:
    ^International(subject label,Account_Inbox);:
    \n  \n\'\" />\n
    \n
    \n
    \n',0,NULL,NULL),('

    ^International(invitation sent label,Account_Inbox);

    \n

    ^International(invitation sent text,Account_Inbox);

    \n

    \">^International(back label,Account_Inbox);

    ','Account/Inbox/InviteUserConfirm',1,1,'SVIhz68689hwUGgcDM-gWw',1248549086,'WebGUI::Asset::Template::HTMLTemplate',1,'

    ^International(invitation sent label,Account_Inbox);

    \n

    ^International(invitation sent text,Account_Inbox);

    \n

    \">^International(back label,Account_Inbox);

    ',0,NULL,NULL),('\n\n
    \n\" class=\"WGprofile_displayView\">^International(\'friends as others label\',\'Account_Friends\');\" class=\"WGprofile_displayView\">^International(\'edit my friends\',\'Account_Friends\');\" class=\"WGprofile_displayView\">^International(\'back label\',\'Account_Friends\');\n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    ','Account/Layout',1,1,'zrNpGbT3odfIkg6nFSUy8Q',1249407461,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n
    \n\" class=\"WGprofile_displayView\">^International(\'friends as others label\',\'Account_Friends\');\" class=\"WGprofile_displayView\">^International(\'edit my friends\',\'Account_Friends\');\" class=\"WGprofile_displayView\">^International(\'back label\',\'Account_Friends\');\n
    \n
    \n
    \n
    \n
    \n\n
    \n
    \n
    \n
    \n
    ',0,NULL,NULL),('\n
    \n\n\n

    \n
    \n ^International(member since,Account_Friends); ^D(%z,);\n

    \n\n \n\n
    \n\n
    \n\n

    \n \n \n \n

    \n \n \n \n

    \n\n \n
    class=\"bordered\">\n \n \n \n \n \n \n \n
    \">\"\"^Extras(account/images/no_photo.gif);\"/>\n \">
    \n \n ^International(member since,Account_Friends); ^D(%z,);
    \n
    \n
    \n
    \n
    \n \n

    \n \n \n \n

    \n \n \n \n

    \n\n
    \n','Account/Friends/View',1,1,'1Yn_zE_dSiNuaBGNLPbxtw',1248549086,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n

    \n
    \n^International(member since,Account_Friends); ^D(%z,);\n

    \n\n
    \n
    \n

    \n \n\n\n

    \n\n\n\n

    \n\n
    class=\"bordered\">\n\n\n\n\n\n\n\n
    \">\"\"^Extras(account/images/no_photo.gif);\"/>\n\">
    \n\n^International(member since,Account_Friends); ^D(%z,);
    \n
    \n
    \n
    \n
    \n

    \n \n\n\n

    \n\n\n\n

    \n
    ',0,NULL,NULL),('
    \n\n
    \n\n
    \n
    \n ^International(member since,Account_Inbox); ^D(%z,);\n
    \n\n \n\n
    \n\n
    \n\n

    \n \n \n \n

    \n \n \n \n

    \n\n \n \n \n \n \n \n
    class=\"WGbordered\" >\n \n \n \n \n \n \n \n \n
    \">\"Friend^Extras(account/images/no_photo.gif);\"/>
    ^International(online,Friends);^International(offline,Friends);
    \n \">
    \n \n ^International(member since,Account_Friends); ^D(%z,);
    \n ^User(homeCountry,);\n
    \n
    \n
    \n
    \n
    \n
    \n \n

    \n \n \n \n

    \n \n \n \n

    \n\n
    \n\n
    \n','Account/Friends/Edit',1,1,'AZFU33p0jpPJ-E6qLSWZng',1248549086,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    \n
    \n
    \n^International(member since,Account_Inbox); ^D(%z,);\n
    \n\n
    \n
    \n

    \n \n\n\n

    \n\n\n\n

    \n\n\n\n\n\n\n
    class=\"WGbordered\" >\n\n\n\n\n\n\n\n\n
    \">\"Friend^Extras(account/images/no_photo.gif);\"/>
    ^International(online,Friends);^International(offline,Friends);
    \n\">
    \n\n^International(member since,Account_Friends); ^D(%z,);
    \n^User(homeCountry,);\n
    \n
    \n
    \n
    \n
    \n
    \n

    \n \n\n\n

    \n\n\n\n

    \n
    \n
    ',0,NULL,NULL),('\n\n
    \n \n

    \n
    \n ^International(member since,Account_Friends); ^D(%z,);\n

    \n \n

    ^International(add to network label,Account_Friends);

    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ^International(adding user message,Account_Friends,);
    ^International(sending to message,Account_Friends);
    \n\n
    \n\n','Account/Friends/SendRequest',1,1,'AGJBGviWGAwjnwziiPjvDg',1248549087,'WebGUI::Asset::Template::HTMLTemplate',1,'\n
    \n

    \n
    \n^International(member since,Account_Friends); ^D(%z,);\n

    \n

    ^International(add to network label,Account_Friends);

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(adding user message,Account_Friends,);
    ^International(sending to message,Account_Friends);
    \n
    \n',0,NULL,NULL),('

    \n

    ^International(error label,Account_Friends);

    \n

    \n

    \">^International(back label,Account_Inbox);

    \n

    \n','Account/Friends/Error',1,1,'7Ijdd8SW32lVgg2H8R-Aqw',1248549086,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n

    ^International(error label,Account_Friends);

    \n

    \n

    \">^International(back label,Account_Inbox);

    \n

    ',0,NULL,NULL),('

    \n

    ^International(message sent label,Account_Friends);

    \n

    ^International(add to friends confirmation,Account_Friends,);

    \n

    \">^International(back to user profile,Account_Friends);

    \n

    ','Account/Friends/Confirm',1,1,'K8F0j_cq_jgo8dvWY_26Ag',1248549086,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n

    ^International(message sent label,Account_Friends);

    \n

    ^International(add to friends confirmation,Account_Friends,);

    \n

    \">^International(back to user profile,Account_Friends);

    \n

    ',0,NULL,NULL),('

    \n

    ^International(remove confirm label,Account_Friends);

    \n

    ^International(remove confirm message,Account_Friends,);

    \n

    \n \">^International(remove confirm no,Account_Friends); · \n \">^International(remove confirm yes,Account_Friends);\n

    \n

    ','Account/Friends/Confirm',1,1,'G5V6neXIDiFXN05oL-U3AQ',1248549087,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n

    ^International(remove confirm label,Account_Friends);

    \n

    ^International(remove confirm message,Account_Friends,);

    \n

    \n\">^International(remove confirm no,Account_Friends); · \n\">^International(remove confirm yes,Account_Friends);\n

    \n

    ',0,NULL,NULL),('\n\n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    ','Account/Layout',1,1,'9ThW278DWLV0-Svf68ljFQ',1249407460,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n
    \n
    \n
    \n
    ',0,NULL,NULL),('
    \n
    \n

    \n ^International(Payout Totals,Account_Shop);\n

    \n \n \n \n \n \n \n
    ^International(Paid,Account_Shop); :
    ^International(Scheduled for payment,Account_Shop); :
    ^International(Not yet scheduled,Account_Shop); : \n
    ^International(total,Shop); :
    \n \n

    ^International(my sales label,Account_Shop);

    \n \n \n \n \n \n \n \n \n \n \n \n \n WGoddThreadWGevenThread\">\n \n \n \n \n \n \n \n \n \n \n \n
    ^International(Product,Account_Shop);^International(quantity,Shop);^International(Payout,Account_Shop);
    \">
    ^International(no contributions,Account_Contributions);
    \n \n

    ^International(my sales label,Account_Shop); :: ^International(Products,Account_Shop);

    \n
    \n
    ','Shop/MySales',1,1,'-zxyB-O50W8YnL39Ouoc4Q',1248563425,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    \n

    \n^International(Payout Totals,Account_Shop);\n

    \n\n\n\n\n\n\n
    ^International(Paid,Account_Shop); :
    ^International(Scheduled for payment,Account_Shop); :
    ^International(Not yet scheduled,Account_Shop); : \n
    ^International(total,Shop); :
    \n

    ^International(my sales label,Account_Shop);

    \n\n\n\n\n\n\n\n\n\n\n\nWGoddThreadWGevenThread\">\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(Product,Account_Shop);^International(quantity,Shop);^International(Payout,Account_Shop);
    \">
    ^International(no contributions,Account_Contributions);
    \n

    ^International(my sales label,Account_Shop); :: ^International(Products,Account_Shop);

    \n
    \n
    ',0,NULL,NULL),('\n\n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    ','Account/Layout',1,1,'b4n3VyUIsAHyIvT-W-jziA',1249407461,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n
    \n
    \n
    \n
    ',0,NULL,NULL),('
    \n \" id=\"id\">\n\n \n
    \n
    \n\n \n

    \n
    \n\n \n \n
    \n \n

    \n ^ViewCart();
    \n \">^International(continue shopping button,Shop);\n \n ^ViewCart(); (^CartItemCount;)\n

    \n \n \n \n \n \n \n \n \n \n\n \n \n \n
      \n ^International(variants,Asset_Product);\n \n
    • \n
      \n
    \n \n \n \n
    \n
    \n \n \n \n \n \n
      \n ^International(30,Asset_Product);\n \n
    • \n
      \n
    \n
    \n \n \n
      \n ^International(54,Asset_Product);\n \n
    • \n
      \n
    \n
    \n\n \n
      \n ^International(31,Asset_Product);\n \n
    • :
    • \n
      \n
    \n
    \n \n \n
      \n ^International(32,Asset_Product);\n \n
    • \">
    • \n
      \n
    \n
    \n \n \n
      \n ^International(33,Asset_Product);\n \n
    • \">
    • \n
      \n
    \n
    \n
    \n \n
    \n
    \n\n','Product',1,1,'PBtmpl0000000000000056',1248729559,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\" id=\"id\">\n\n
    \n
    \n\n

    \n
    \n\n
    \n\n

    \n^ViewCart();
    \n\">^International(continue shopping button,Shop);\n\n^ViewCart(); (^CartItemCount;)\n

    \n\n\n\n\n\n\n\n\n\n\n\n
      \n^International(variants,Asset_Product);\n\n
    • \n
      \n
    \n\n\n\n
    \n
    \n\n
      \n^International(30,Asset_Product);\n\n
    • \n
      \n
    \n
    \n\n
      \n^International(54,Asset_Product);\n\n
    • \n
      \n
    \n
    \n\n
      \n^International(31,Asset_Product);\n\n
    • :
    • \n
      \n
    \n
    \n\n
      \n^International(32,Asset_Product);\n\n
    • \">
    • \n
      \n
    \n
    \n\n
      \n^International(33,Asset_Product);\n\n
    • \">
    • \n
      \n
    \n
    \n
    \n
    \n
    ',0,NULL,NULL),('^International(inbox sms notification,Account_Inbox);','Account/Inbox/Notification',1,1,'i9-G00ALhJOr0gMh-vHbKA',1250408924,'WebGUI::Asset::Template::HTMLTemplate',1,'^International(inbox sms notification,Account_Inbox);',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n

    ^International(\"form manage title\",\"Asset_AdSku\");

    \n

    \'>^International(\"form purchase link\",\"Asset_AdSku\");

    \n

    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n
    ^International(\"form manage table header title\",\"Asset_AdSku\");^International(\"form manage table header clicks\",\"Asset_AdSku\");^International(\"form manage table header impressions\",\"Asset_AdSku\");^International(\"form manage table header renew\",\"Asset_AdSku\");
    \">^International(\"form manage table value renew\",\"Asset_AdSku\");
    \n\n^ViewCart(); (^CartItemCount;)','AdSku/Manage',1,1,'ohjyzab5i-yW6GOWTeDUHg',1251425384,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n

    ^International(\"form manage title\",\"Asset_AdSku\");

    \n

    \'>^International(\"form purchase link\",\"Asset_AdSku\");

    \n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(\"form manage table header title\",\"Asset_AdSku\");^International(\"form manage table header clicks\",\"Asset_AdSku\");^International(\"form manage table header impressions\",\"Asset_AdSku\");^International(\"form manage table header renew\",\"Asset_AdSku\");
    \">^International(\"form manage table value renew\",\"Asset_AdSku\");
    \n^ViewCart(); (^CartItemCount;)',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n\n
    \n
    \n\n

    ^International(form added to cart thanks,Asset_AdSku);

    \n\n

    \n

    \n

    \">^International(form manage link,Asset_AdSku);

    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ^International(form purchase ad title,Asset_AdSku);
    ^International(form purchase ad link,Asset_AdSku);
    ^International(form purchase ad image,Asset_AdSku);
    ^International(form purchase number of clicks,Asset_AdSku);^International(form purchase per click,Asset_AdSku, );\n
    \n
    ^International(minimum clicks,Asset_AdSku,);
    ^International(form purchase number of impressions,Asset_AdSku);^International(form purchase per click,Asset_AdSku, );\n
    \n
    ^International(minimum impressions,Asset_AdSku,);
    \n \n
    \n^ViewCart(); (^CartItemCount;)','AdSku/Purchase',1,1,'AldPGu0u-jm_5xK13atCSQ',1251419124,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n
    \n
    \n\n

    ^International(form added to cart thanks,Asset_AdSku);

    \n\n

    \n

    \n

    \">^International(form manage link,Asset_AdSku);

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(form purchase ad title,Asset_AdSku);
    ^International(form purchase ad link,Asset_AdSku);
    ^International(form purchase ad image,Asset_AdSku);
    ^International(form purchase number of clicks,Asset_AdSku);^International(form purchase per click,Asset_AdSku, );\n
    \n
    ^International(minimum clicks,Asset_AdSku,);
    ^International(form purchase number of impressions,Asset_AdSku);^International(form purchase per click,Asset_AdSku, );\n
    \n
    ^International(minimum impressions,Asset_AdSku,);
    \n\n
    \n^ViewCart(); (^CartItemCount;)',0,NULL,NULL),('

    \n\n\n\n
    \n
    \n\n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \" style=\"display:none;\">\n \n \n \n \n
    ^International(\'answer label\',\'Asset_Survey\');^International(\'response count label\',\'Asset_Survey\');^International(\'response percent label\',\'Asset_Survey\');
    \');\">^International(\'show comments label\',\'Asset_Survey\');
    \n \n

    \n
    \n
    \n \n
    \n \');\">^International(\'show responses label\',\'Asset_Survey\');\n
    \n
    \" style=\"display:none;\">\n \n

    \n \n
    \n
    \n
    \n
    \n
    \n


    \n
    \n\n\n
    \n · · \n
    \n
    \n','Survey/Overview',1,1,'PBtmpl0000000000000063',1250243000,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n\n
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\" style=\"display:none;\">\n\n\n\n\n
    ^International(\'answer label\',\'Asset_Survey\');^International(\'response count label\',\'Asset_Survey\');^International(\'response percent label\',\'Asset_Survey\');
    \');\">^International(\'show comments label\',\'Asset_Survey\');
    \n\n

    \n
    \n
    \n\n
    \n\');\">^International(\'show responses label\',\'Asset_Survey\');\n
    \n
    \" style=\"display:none;\">\n\n

    \n\n
    \n
    \n
    \n
    \n
    \n


    \n
    \n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('\" id=\"id\">\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
    ^International(\'user label\',\'Asset_Survey\');^International(\'start date\',\'Asset_Survey\');^International(\'end date\',\'Asset_Survey\');^International(\'score label\',\'Asset_Survey\');^International(\'percentage label\',\'Asset_Survey\');
    \">/%
    \r\n\r\n\r\n\r\n
    \r\n · · \r\n
    \r\n
    \r\n','Survey/Gradebook',1,1,'PBtmpl0000000000000062',1250243000,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n\n

    \n\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(\'user label\',\'Asset_Survey\');^International(\'start date\',\'Asset_Survey\');^International(\'end date\',\'Asset_Survey\');^International(\'score label\',\'Asset_Survey\');^International(\'percentage label\',\'Asset_Survey\');
    \">/%
    \n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n\n \n

    \n\n\n

    \n\n\n','Survey',1,1,'PBtmpl0000000000000061',1250243000,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n\n

    \n\n

    \n',0,NULL,NULL),('
    \n
    \n
    \n
    \n\n\n
    \n

    \n^International(\'restart message\',\'Asset_Survey\');\n

    \n
    \n
    \n\n\n
    \n out of \n
    \n
    \n\n
    \n minutes left\n
    \n
    \n
    \n\n
    \n\n\n
    \n

    required\'>

    \n\n \n\n \n\n \n \n\n\n \n \n \n \n \n \' id=\'\' size=\'50\' />\n \n \n verbatim\' >\n \n \n \n \n\n \n \n \' value=\'\'>\n \n \n\n \n \n \n \n \n \" id=\"\">
    \n
    \n \n verbatim\'>\n \n \n
    \n
    \n\n \n \n \n \n \n
    \n
    \n \n verbatim\'>\n \n \n
    \n
    \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n button\" value=\"\">\n \n \n button\">\n \n \" id=\"\" value=\"\">\n \n \n \n \n \n verbatim\' name=\'verbatim\'>\n
    \n \n \n \n
    \n button\" value=\"\">\n \n \n button\">\n \n \" id=\"\" value=\"\">\n \n verbatim\' name=\'verbatim\'>\n \n
    \n
    \n\n \n \n \n \' id=\'\'>\n \n \n ^International(\'year\', \'Asset_Survey\');\n -year\' id=\'-year\' type=text size=4>\n ^International(\'month\', \'Asset_Survey\');\n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n \n \n \' id=\'\' type=text>\n button\'>\n
    container\'>
    \n \n
    \n
    \n
    \n\n \n \n\n \n \' name=\'\' value=0>\n \n \n \' name=\'\' value=\"\">\n \n\n \n

    \n
    \n \n show\'>0\n \n \n \n show\'>\n \n
    0  \n
    slider-bg\' tabindex=\'-1\' title=\'Slider\' class=slider-bg>\n \n
    slider-min-thumb\' class=slider-min-thumb>\n \n
    \n \n
    slider-max-thumb\' class=slider-max-thumb>\n \n
    \n
    \n \n \n
    \n \n
    \n\n \n\n \n \n \n\n \n

    \n
    \n | \' name=\'\'> | \n \n
      \n
    slider-bg\' tabindex=\'-1\' title=\'Slider\' class=slider-bg>\n
    slider-thumb\' class=slider-thumb>\n \n
    \n
    \n
    \n
    \n \n\n \n \n \n \n\n \n \n

    Comment:

    \n
    \n\n\n
    \n
    \n
    \n \n \n \n ^International(\'finish\', \'Asset_Survey\');^International(\'continue\', \'Asset_Survey\');\">\n
    \n
    \n\n
    \n\n
    \n\n\n\n\n\n\n','Survey/Take',1,1,'CxMpE_UPauZA3p8jdrOABw',1250243000,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    \n
    \n
    \n\n
    \n

    \n^International(\'restart message\',\'Asset_Survey\');\n

    \n
    \n
    \n\n
    \n out of \n
    \n
    \n\n
    \n minutes left\n
    \n
    \n
    \n
    \n\n
    \n

    required\'>

    \n\n\n\n\n\n\n\n\n\n\' id=\'\' size=\'50\' />\n\n\n verbatim\'>\n\n\n\n\n\n\n\' value=\'\'>\n\n\n\n\n\n\n\n\" id=\"\">
    \n
    \n\nverbatim\'>\n\n\n
    \n
    \n\n\n\n\n\n
    \n
    \n\nverbatim\'>\n\n\n
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \nbutton\" value=\"\">\n\n\nbutton\">\n\n\" id=\"\" value=\"\">\n\n\n\n\n\nverbatim\' name=\'verbatim\'>\n
    \n\n\n\n
    \nbutton\" value=\"\">\n\n\nbutton\">\n\n\" id=\"\" value=\"\">\n\nverbatim\' name=\'verbatim\'>\n\n
    \n
    \n\n\n\n\' id=\'\'>\n\n\n^International(\'year\', \'Asset_Survey\');\n-year\' id=\'-year\' type=text size=4>\n^International(\'month\', \'Asset_Survey\');\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\n\n\' id=\'\' type=text>\nbutton\'>\n
    container\'>
    \n\n
    \n
    \n
    \n\n\n\n\' name=\'\' value=0>\n\n\n\' name=\'\' value=\"\">\n\n\n

    \n
    \n\nshow\'>0\n\n\n\nshow\'>\n\n
    0  \n
    slider-bg\' tabindex=\'-1\' title=\'Slider\' class=slider-bg>\n\n
    slider-min-thumb\' class=slider-min-thumb>\n\n
    \n\n
    slider-max-thumb\' class=slider-max-thumb>\n\n
    \n
    \n\n\n
    \n\n
    \n\n\n\n\n\n

    \n
    \n| \' name=\'\'> | \n\n
      \n
    slider-bg\' tabindex=\'-1\' title=\'Slider\' class=slider-bg>\n
    slider-thumb\' class=slider-thumb>\n\n
    \n
    \n
    \n
    \n\n\n\n\n\n\n

    Comment:

    \n
    \n
    \n
    \n
    \n\n\n\n^International(\'finish\', \'Asset_Survey\');^International(\'continue\', \'Asset_Survey\');\">\n
    \n
    \n
    \n
    ',0,NULL,NULL),('
    \n
    ^International(\'please enter section information\',\'Asset_Survey\');
    \n
    \n
    \n \'>\n \n \n \n
    \n\n

    \n

    ^International(\'section number\',\'Asset_Survey\');\n
    ^International(\'section number description\',\'Asset_Survey\');
    \n
    \n

    \n \n

    \n

    ^International(\'section name\',\'Asset_Survey\');\n
    ^International(\'section name description\',\'Asset_Survey\');
    \n
    \n \' type=text>\n

    \n \n

    \n

    ^International(\'section custom variable name\',\'Asset_Survey\');\n
    ^International(\'section custom variable name description\',\'Asset_Survey\');
    \n
    \n \' name=\'variable\' size=\'2\'>\n

    \n \n \n

    \n

    \n
    ^International(\'jump to\',\'Asset_Survey\');\n
    ^International(\'jump to description\',\'Asset_Survey\');
    \n
    \n
    \n \">\n
    \n
    \n
    \n

    \n\n

    \n

    ^International(\'jump expression\',\'Asset_Survey\');\n
    ^International(\'jump expression description\',\'Asset_Survey\');
    \n
    \n
    \n \n
    \n

    \n \n \n
    \n \n

    \n

    ^International(\'randomize questions\',\'Asset_Survey\');\n
    ^International(\'randomize questions description\',\'Asset_Survey\');
    \n
    \n checked >^International(\'yes\',\'Asset_Survey\');\n checked >^International(\'no\',\'Asset_Survey\');\n

    \n \n\n

    \n

    ^International(\'questions per page\',\'Asset_Survey\');\n
    ^International(\'questions per page description\',\'Asset_Survey\');
    \n
    \n \n

    \n

    \n

    ^International(\'questions on section page\',\'Asset_Survey\');\n
    ^International(\'questions on section page description\',\'Asset_Survey\');
    \n
    \n \n ^International(\'yes\',\'Asset_Survey\');\n ^International(\'no\',\'Asset_Survey\');\n \n ^International(\'yes\',\'Asset_Survey\');\n ^International(\'no\',\'Asset_Survey\');\n \n

    \n \n \n

    \n

    ^International(\'title on every page\',\'Asset_Survey\');\n
    ^International(\'title on every page description\',\'Asset_Survey\');
    \n
    \n \n ^International(\'yes\',\'Asset_Survey\');\n ^International(\'no\',\'Asset_Survey\');\n \n ^International(\'yes\',\'Asset_Survey\');\n ^International(\'no\',\'Asset_Survey\');\n \n

    \n \n

    \n

    ^International(\'text on every page\',\'Asset_Survey\');\n
    ^International(\'text on every page description\',\'Asset_Survey\');
    \n
    \n \n ^International(\'yes\',\'Asset_Survey\');\n ^International(\'no\',\'Asset_Survey\');\n \n ^International(\'yes\',\'Asset_Survey\');\n ^International(\'no\',\'Asset_Survey\');\n \n

    \n \n

    \n

    ^International(\'terminal section\',\'Asset_Survey\');\n
    ^International(\'terminal section description\',\'Asset_Survey\');
    \n
    \n \n ^International(\'yes\',\'Asset_Survey\');\n ^International(\'no\',\'Asset_Survey\');\n \n ^International(\'yes\',\'Asset_Survey\');\n ^International(\'no\',\'Asset_Survey\');\n \n

    \n \n

    \n

    ^International(\'terminal section url\',\'Asset_Survey\');\n
    ^International(\'terminal section url description\',\'Asset_Survey\');
    \n
    \n \'>\n

    \n\n

    \n

    ^International(\'logical section\',\'Asset_Survey\');\n
    ^International(\'logical section help\',\'Asset_Survey\');
    \n
    \n \n ^International(\'yes\',\'Asset_Survey\');\n ^International(\'no\',\'Asset_Survey\');\n \n ^International(\'yes\',\'Asset_Survey\');\n ^International(\'no\',\'Asset_Survey\');\n \n

    \n \n
    \n \n

    \n

    ^International(\'section text\',\'Asset_Survey\');\n
    ^International(\'section text description\',\'Asset_Survey\');
    \n
    \n

    \n
    \n \n
    \n \n
    \n
    \n
    ','Survey/Edit',1,1,'1oBRscNIcFOI-pETrCOspA',1250243000,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    ^International(\'please enter section information\',\'Asset_Survey\');
    \n
    \n
    \n\'>\n\n\n
    \n

    \n

    ^International(\'section number\',\'Asset_Survey\');\n
    ^International(\'section number description\',\'Asset_Survey\');
    \n
    \n

    \n

    \n

    ^International(\'section name\',\'Asset_Survey\');\n
    ^International(\'section name description\',\'Asset_Survey\');
    \n
    \n\' type=text>\n

    \n

    \n

    ^International(\'section custom variable name\',\'Asset_Survey\');\n
    ^International(\'section custom variable name description\',\'Asset_Survey\');
    \n
    \n\' name=\'variable\' size=\'2\'>\n

    \n

    \n

    \n
    ^International(\'jump to\',\'Asset_Survey\');\n
    ^International(\'jump to description\',\'Asset_Survey\');
    \n
    \n
    \n\">\n
    \n
    \n
    \n

    \n

    \n

    ^International(\'jump expression\',\'Asset_Survey\');\n
    ^International(\'jump expression description\',\'Asset_Survey\');
    \n
    \n
    \n\n
    \n

    \n
    \n

    \n

    ^International(\'randomize questions\',\'Asset_Survey\');\n
    ^International(\'randomize questions description\',\'Asset_Survey\');
    \n
    \n checked >^International(\'yes\',\'Asset_Survey\');\n checked >^International(\'no\',\'Asset_Survey\');\n

    \n

    \n

    ^International(\'questions per page\',\'Asset_Survey\');\n
    ^International(\'questions per page description\',\'Asset_Survey\');
    \n
    \n\n

    \n

    \n

    ^International(\'questions on section page\',\'Asset_Survey\');\n
    ^International(\'questions on section page description\',\'Asset_Survey\');
    \n
    \n\n^International(\'yes\',\'Asset_Survey\');\n^International(\'no\',\'Asset_Survey\');\n\n^International(\'yes\',\'Asset_Survey\');\n^International(\'no\',\'Asset_Survey\');\n\n

    \n

    \n

    ^International(\'title on every page\',\'Asset_Survey\');\n
    ^International(\'title on every page description\',\'Asset_Survey\');
    \n
    \n\n^International(\'yes\',\'Asset_Survey\');\n^International(\'no\',\'Asset_Survey\');\n\n^International(\'yes\',\'Asset_Survey\');\n^International(\'no\',\'Asset_Survey\');\n\n

    \n

    \n

    ^International(\'text on every page\',\'Asset_Survey\');\n
    ^International(\'text on every page description\',\'Asset_Survey\');
    \n
    \n\n^International(\'yes\',\'Asset_Survey\');\n^International(\'no\',\'Asset_Survey\');\n\n^International(\'yes\',\'Asset_Survey\');\n^International(\'no\',\'Asset_Survey\');\n\n

    \n

    \n

    ^International(\'terminal section\',\'Asset_Survey\');\n
    ^International(\'terminal section description\',\'Asset_Survey\');
    \n
    \n\n^International(\'yes\',\'Asset_Survey\');\n^International(\'no\',\'Asset_Survey\');\n\n^International(\'yes\',\'Asset_Survey\');\n^International(\'no\',\'Asset_Survey\');\n\n

    \n

    \n

    ^International(\'terminal section url\',\'Asset_Survey\');\n
    ^International(\'terminal section url description\',\'Asset_Survey\');
    \n
    \n\'>\n

    \n

    \n

    ^International(\'logical section\',\'Asset_Survey\');\n
    ^International(\'logical section help\',\'Asset_Survey\');
    \n
    \n\n^International(\'yes\',\'Asset_Survey\');\n^International(\'no\',\'Asset_Survey\');\n\n^International(\'yes\',\'Asset_Survey\');\n^International(\'no\',\'Asset_Survey\');\n\n

    \n
    \n

    \n

    ^International(\'section text\',\'Asset_Survey\');\n
    ^International(\'section text description\',\'Asset_Survey\');
    \n
    \n

    \n
    \n\n
    \n
    \n
    \n
    ',0,NULL,NULL),('
    \n
    ^International(\'please enter question information\',\'Asset_Survey\');
    \n
    \n
    \n \'>\n \n \n \n \n \n
    \n \n

    \n

    ^International(\'question number\',\'Asset_Survey\');\n
    ^International(\'question number description\',\'Asset_Survey\');
    \n
    \n \n

    \n \n

    \n

    ^International(\'question variable name\',\'Asset_Survey\');\n
    ^International(\'question variable name description\',\'Asset_Survey\');
    \n
    \n \' name=\'variable\' size=\'2\'>\n

    \n \n

    \n

    ^International(\'question type\',\'Asset_Survey\');\n
    ^International(\'question type description\',\'Asset_Survey\');
    \n
    \n \n

    \n \n

    \n

    ^International(\'question score\',\'Asset_Survey\');\n
    ^International(\'question score description\',\'Asset_Survey\');
    \n
    \n \' name=\'value\'>\n

    \n \n

    \n

    ^International(\'required label\',\'Asset_Survey\');\n
    ^International(\'required description\',\'Asset_Survey\');
    \n
    \n checked >^International(\'yes\',\'Asset_Survey\');\n checked >^International(\'no\',\'Asset_Survey\');\n

    \n \n

    \n

    ^International(\'randomize answers\',\'Asset_Survey\');\n
    ^International(\'randomize answers description\',\'Asset_Survey\');
    \n
    \n checked >^International(\'yes\',\'Asset_Survey\');\n checked >^International(\'no\',\'Asset_Survey\');\n

    \n

    \n

    ^International(\'vertical display\',\'Asset_Survey\');\n
    ^International(\'vertical display description\',\'Asset_Survey\');
    \n
    \n checked >^International(\'yes\',\'Asset_Survey\');\n checked >^International(\'no\',\'Asset_Survey\');\n

    \n \n\n\n
    \n\n

    \n

    ^International(\'show text in button\',\'Asset_Survey\');\n
    ^International(\'show text in button description\',\'Asset_Survey\');
    \n
    \n checked >^International(\'yes\',\'Asset_Survey\');\n checked >^International(\'no\',\'Asset_Survey\');\n

    \n \n

    \n

    ^International(\'allow comment\',\'Asset_Survey\');\n
    ^International(\'allow comment description\',\'Asset_Survey\');
    \n
    \n checked >^International(\'yes\',\'Asset_Survey\');\n checked >^International(\'no\',\'Asset_Survey\');\n

    \n \n

    \n

    ^International(\'comment cols\',\'Asset_Survey\');\n
    ^International(\'cols description\',\'Asset_Survey\');
    \n
    \n \' name=\'commentCols\'>\n

    \n \n

    \n

    ^International(\'comment rows\',\'Asset_Survey\');\n
    ^International(\'rows description\',\'Asset_Survey\');
    \n
    \n \' name=\'commentRows\'> \n

    \n \n

    \n

    ^International(\'maximum number of answers\',\'Asset_Survey\');\n
    ^International(\'maximum number of answers description\',\'Asset_Survey\');
    \n
    \n \' name=\'maxAnswers\' size=\'2\'>\n

    \n\n\n
    \n\n

    \n

    \n
    ^International(\'jump to\',\'Asset_Survey\');\n
    ^International(\'jump to description\',\'Asset_Survey\');
    \n
    \n
    \n \">\n
    \n
    \n
    \n

    \n\n

    \n

    ^International(\'jump expression\',\'Asset_Survey\');\n
    ^International(\'jump expression description\',\'Asset_Survey\');
    \n
    \n
    \n \n
    \n

    \n\n \n
    \n \n

    \n

    ^International(\'question text\',\'Asset_Survey\');\n
    ^International(\'question text description\',\'Asset_Survey\');
    \n
    \n

    \n
    \n \n
    \n
    \n
    \n
    \n','Survey/Edit',1,1,'wAc4azJViVTpo-2NYOXWvg',1250243000,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    ^International(\'please enter question information\',\'Asset_Survey\');
    \n
    \n
    \n\'>\n\n\n\n\n\n
    \n

    \n

    ^International(\'question number\',\'Asset_Survey\');\n
    ^International(\'question number description\',\'Asset_Survey\');
    \n
    \n\n

    \n

    \n

    ^International(\'question variable name\',\'Asset_Survey\');\n
    ^International(\'question variable name description\',\'Asset_Survey\');
    \n
    \n\' name=\'variable\' size=\'2\'>\n

    \n

    \n

    ^International(\'question type\',\'Asset_Survey\');\n
    ^International(\'question type description\',\'Asset_Survey\');
    \n
    \n\n

    \n

    \n

    ^International(\'question score\',\'Asset_Survey\');\n
    ^International(\'question score description\',\'Asset_Survey\');
    \n
    \n\' name=\'value\'>\n

    \n

    \n

    ^International(\'required label\',\'Asset_Survey\');\n
    ^International(\'required description\',\'Asset_Survey\');
    \n
    \n checked >^International(\'yes\',\'Asset_Survey\');\n checked >^International(\'no\',\'Asset_Survey\');\n

    \n

    \n

    ^International(\'randomize answers\',\'Asset_Survey\');\n
    ^International(\'randomize answers description\',\'Asset_Survey\');
    \n
    \n checked >^International(\'yes\',\'Asset_Survey\');\n checked >^International(\'no\',\'Asset_Survey\');\n

    \n

    \n

    ^International(\'vertical display\',\'Asset_Survey\');\n
    ^International(\'vertical display description\',\'Asset_Survey\');
    \n
    \n checked >^International(\'yes\',\'Asset_Survey\');\n checked >^International(\'no\',\'Asset_Survey\');\n

    \n
    \n

    \n

    ^International(\'show text in button\',\'Asset_Survey\');\n
    ^International(\'show text in button description\',\'Asset_Survey\');
    \n
    \n checked >^International(\'yes\',\'Asset_Survey\');\n checked >^International(\'no\',\'Asset_Survey\');\n

    \n

    \n

    ^International(\'allow comment\',\'Asset_Survey\');\n
    ^International(\'allow comment description\',\'Asset_Survey\');
    \n
    \n checked >^International(\'yes\',\'Asset_Survey\');\n checked >^International(\'no\',\'Asset_Survey\');\n

    \n

    \n

    ^International(\'comment cols\',\'Asset_Survey\');\n
    ^International(\'cols description\',\'Asset_Survey\');
    \n
    \n\' name=\'commentCols\'>\n

    \n

    \n

    ^International(\'comment rows\',\'Asset_Survey\');\n
    ^International(\'rows description\',\'Asset_Survey\');
    \n
    \n\' name=\'commentRows\'> \n

    \n

    \n

    ^International(\'maximum number of answers\',\'Asset_Survey\');\n
    ^International(\'maximum number of answers description\',\'Asset_Survey\');
    \n
    \n\' name=\'maxAnswers\' size=\'2\'>\n

    \n
    \n

    \n

    \n
    ^International(\'jump to\',\'Asset_Survey\');\n
    ^International(\'jump to description\',\'Asset_Survey\');
    \n
    \n
    \n\">\n
    \n
    \n
    \n

    \n

    \n

    ^International(\'jump expression\',\'Asset_Survey\');\n
    ^International(\'jump expression description\',\'Asset_Survey\');
    \n
    \n
    \n\n
    \n

    \n
    \n

    \n

    ^International(\'question text\',\'Asset_Survey\');\n
    ^International(\'question text description\',\'Asset_Survey\');
    \n
    \n

    \n
    \n\n
    \n
    \n
    \n
    ',0,NULL,NULL),('
    \n
    ^International(\'please enter answer information\',\'Asset_Survey\');
    \n
    \n
    \n \'>\n \n \n \n \n \n
    \n \n

    \n

    ^International(\'answer number\',\'Asset_Survey\');\n
    ^International(\'answer number description\',\'Asset_Survey\');
    \n
    \n \n

    \n \n

    \n

    ^International(\'recorded answer\',\'Asset_Survey\');\n
    ^International(\'recorded answer description\',\'Asset_Survey\');
    \n
    \n \' name=\'recordedAnswer\'>\n

    \n \n

    \n

    ^International(\'answer score\',\'Asset_Survey\');\n
    ^International(\'answer score description\',\'Asset_Survey\');
    \n
    \n \' name=\'value\'>\n

    \n \n

    \n

    ^International(\'verbatim label\',\'Asset_Survey\');\n
    ^International(\'verbatim description\',\'Asset_Survey\');
    \n
    \n ^International(\'checked\',\'Asset_Survey\');>^International(\'yes\',\'Asset_Survey\');\n ^International(\'checked\',\'Asset_Survey\');>^International(\'no\',\'Asset_Survey\');\n

    \n \n

    \n

    ^International(\'min label\',\'Asset_Survey\');\n
    ^International(\'min description\',\'Asset_Survey\');
    \n
    \n \' name=\'min\' size=\'2\'>\n

    \n \n

    \n

    ^International(\'max label\',\'Asset_Survey\');\n
    ^International(\'max description\',\'Asset_Survey\');
    \n
    \n \' name=\'max\' size=\'2\'>\n

    \n \n

    \n

    ^International(\'step label\',\'Asset_Survey\');\n
    ^International(\'step description\',\'Asset_Survey\');
    \n
    \n \' name=\'step\' size=\'2\'>\n

    \n\n
    \n \n \n

    \n

    ^International(\'textCols label\',\'Asset_Survey\');\n
    ^International(\'cols description\',\'Asset_Survey\');
    \n
    \n \' name=\'textCols\'>\n

    \n \n

    \n

    ^International(\'textRows label\',\'Asset_Survey\');\n
    ^International(\'rows description\',\'Asset_Survey\');
    \n
    \n \' name=\'textRows\'>\n

    \n \n

    \n

    ^International(\'is this the correct answer\',\'Asset_Survey\');\n
    ^International(\'is this the correct answer description\',\'Asset_Survey\');
    \n
    \n checked>^International(\'yes\',\'Asset_Survey\');\n checked>^International(\'no\',\'Asset_Survey\');\n

    \n \n

    \n

    \n
    ^International(\'jump to\',\'Asset_Survey\');\n
    ^International(\'jump to description\',\'Asset_Survey\');
    \n
    \n
    \n \">\n
    \n
    \n
    \n

    \n \n

    \n

    ^International(\'jump expression\',\'Asset_Survey\');\n
    ^International(\'jump expression description\',\'Asset_Survey\');
    \n
    \n
    \n \n
    \n

    \n \n
    \n \n

    \n

    ^International(\'answer text\',\'Asset_Survey\');\n
    ^International(\'answer text description\',\'Asset_Survey\');
    \n
    \n

    \n
    \n \n
    \n \n
    \n
    \n
    \n','Survey/Edit',1,1,'AjhlNO3wZvN5k4i4qioWcg',1250243000,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    ^International(\'please enter answer information\',\'Asset_Survey\');
    \n
    \n
    \n\'>\n\n\n\n\n
    \n

    \n

    ^International(\'answer number\',\'Asset_Survey\');\n
    ^International(\'answer number description\',\'Asset_Survey\');
    \n
    \n\n

    \n

    \n

    ^International(\'recorded answer\',\'Asset_Survey\');\n
    ^International(\'recorded answer description\',\'Asset_Survey\');
    \n
    \n\' name=\'recordedAnswer\'>\n

    \n

    \n

    ^International(\'answer score\',\'Asset_Survey\');\n
    ^International(\'answer score description\',\'Asset_Survey\');
    \n
    \n\' name=\'value\'>\n

    \n

    \n

    ^International(\'verbatim label\',\'Asset_Survey\');\n
    ^International(\'verbatim description\',\'Asset_Survey\');
    \n
    \n^International(\'checked\',\'Asset_Survey\');>^International(\'yes\',\'Asset_Survey\');\n^International(\'checked\',\'Asset_Survey\');>^International(\'no\',\'Asset_Survey\');\n

    \n

    \n

    ^International(\'min label\',\'Asset_Survey\');\n
    ^International(\'min description\',\'Asset_Survey\');
    \n
    \n\' name=\'min\' size=\'2\'>\n

    \n

    \n

    ^International(\'max label\',\'Asset_Survey\');\n
    ^International(\'max description\',\'Asset_Survey\');
    \n
    \n\' name=\'max\' size=\'2\'>\n

    \n

    \n

    ^International(\'step label\',\'Asset_Survey\');\n
    ^International(\'step description\',\'Asset_Survey\');
    \n
    \n\' name=\'step\' size=\'2\'>\n

    \n
    \n

    \n

    ^International(\'textCols label\',\'Asset_Survey\');\n
    ^International(\'cols description\',\'Asset_Survey\');
    \n
    \n\' name=\'textCols\'>\n

    \n

    \n

    ^International(\'textRows label\',\'Asset_Survey\');\n
    ^International(\'rows description\',\'Asset_Survey\');
    \n
    \n\' name=\'textRows\'>\n

    \n

    \n

    ^International(\'is this the correct answer\',\'Asset_Survey\');\n
    ^International(\'is this the correct answer description\',\'Asset_Survey\');
    \n
    \nchecked>^International(\'yes\',\'Asset_Survey\');\nchecked>^International(\'no\',\'Asset_Survey\');\n

    \n

    \n

    \n
    ^International(\'jump to\',\'Asset_Survey\');\n
    ^International(\'jump to description\',\'Asset_Survey\');
    \n
    \n
    \n\">\n
    \n
    \n
    \n

    \n

    \n

    ^International(\'jump expression\',\'Asset_Survey\');\n
    ^International(\'jump expression description\',\'Asset_Survey\');
    \n
    \n
    \n\n
    \n

    \n
    \n

    \n

    ^International(\'answer text\',\'Asset_Survey\');\n
    ^International(\'answer text description\',\'Asset_Survey\');
    \n
    \n

    \n
    \n\n
    \n
    \n
    \n
    ',0,NULL,NULL),('Dear ,\r\n\r\nYour responses for the Survey have expired and have been deleted. \r\n\r\nSincerely,\r\n\r\n','ExpireIncompleteSurveyResponses',1,1,'ExpireIncResptmpl00001',1250243000,'WebGUI::Asset::Template::HTMLTemplate',1,'Dear ,\nYour responses for the Survey have expired and have been deleted.\nSincerely,\n',0,NULL,NULL),('
    \r\n \r\n

    \r\n Survey Summary Total Sections: Total Questions: Total Answers: \r\n

    \r\n

    \r\n Total Correct: Total Incorrect: \r\n

    \r\n

    \r\n

    \r\n

    \r\n \r\n
    \r\n
    \r\n Section: Correct: Incorrect: \r\n chart\'>\r\n
    \r\n
    datatable\'>
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n
    \r\n
    \r\n','Survey/Summary',1,1,'7F-BuEHi7t9bPi008H8xZQ',1250243000,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n

    \nSurvey Summary Total Sections: Total Questions: Total Answers: \n

    \n

    \nTotal Correct: Total Incorrect: \n

    \n

    \n

    \n

    \n\n
    \n
    \nSection: Correct: Incorrect: \nchart\'>\n
    \n
    datatable\'>
    \n
    \n
    \n\n\n\n
    \n
    ',0,NULL,NULL),('\n\n\n

    failpass\">^International(\'test results\', \'Asset_Survey\'); - \n ^International(\'fail\', \'Asset_Survey\');^International(\'pass\', \'Asset_Survey\');

    \n

    Tests=, Passed=, Failed=,

    \n \n \n \n \n \n \n \n failpass \">\n \n \n \n \n \n \n \n \n \n
    ^International(\'test name\', \'Asset_Survey\');^International(\'tests run\', \'Asset_Survey\');^International(\'tests passed\', \'Asset_Survey\');^International(\'tests failed\', \'Asset_Survey\');^International(\'test result\', \'Asset_Survey\');
    ^International(\'fail\', \'Asset_Survey\');^International(\'pass\', \'Asset_Survey\');\">^International(\'575\', \'WebGUI\');\">^International(\'run test\', \'Asset_Survey\');
    \n\n

    ^International(\'details\', \'Asset_Survey\');

    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    all_passed
    get_status
    failed
    parse_errors
    passed
    skipped
    todo
    todo_passed
    wait
    exit
    total
    has_problems
    has_errors
    \n\n\n\n

    failpass\">^International(\'test results\', \'Asset_Survey\'); - \n ^International(\'fail\', \'Asset_Survey\');^International(\'pass\', \'Asset_Survey\');

    \n \n \n \n passfail \">\n \n \n
    \n
    \n \n

    ^International(\'details\', \'Asset_Survey\');

    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    passed
    failed
    actual_passed
    actual_failed
    todo
    todo_passed
    skipped
    plan
    tests_planned
    tests_run
    skip_all
    has_problems
    exit
    wait
    \n\n
    ','Survey/TestResults',1,1,'S3zpVitAmhy58CAioH359Q',1250243000,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    failpass\">^International(\'test results\', \'Asset_Survey\'); -\n^International(\'fail\', \'Asset_Survey\');^International(\'pass\', \'Asset_Survey\');

    \n

    Tests=, Passed=, Failed=,

    \n\n\n\n\n\n\n\nfailpass \">\n\n\n\n\n\n\n\n\n\n
    ^International(\'test name\', \'Asset_Survey\');^International(\'tests run\', \'Asset_Survey\');^International(\'tests passed\', \'Asset_Survey\');^International(\'tests failed\', \'Asset_Survey\');^International(\'test result\', \'Asset_Survey\');
    ^International(\'fail\', \'Asset_Survey\');^International(\'pass\', \'Asset_Survey\');\">^International(\'575\', \'WebGUI\');\">^International(\'run test\', \'Asset_Survey\');
    \n

    ^International(\'details\', \'Asset_Survey\');

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    all_passed
    get_status
    failed
    parse_errors
    passed
    skipped
    todo
    todo_passed
    wait
    exit
    total
    has_problems
    has_errors
    \n\n

    failpass\">^International(\'test results\', \'Asset_Survey\'); -\n^International(\'fail\', \'Asset_Survey\');^International(\'pass\', \'Asset_Survey\');

    \n\n\npassfail \">\n\n\n
    \n
    \n

    ^International(\'details\', \'Asset_Survey\');

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    passed
    failed
    actual_passed
    actual_failed
    todo
    todo_passed
    skipped
    plan
    tests_planned
    tests_run
    skip_all
    has_problems
    exit
    wait
    \n
    ',0,NULL,NULL),('
    \n\n \n ^International(\'response complete\', \'Asset_Survey\'); on \n \n\n \n ^International(\'response restart\', \'Asset_Survey\'); on \n \n\n \n ^International(\'response timeout\', \'Asset_Survey\'); on \n \n\n \n ^International(\'response timeout restart\', \'Asset_Survey\'); on \n \n\n
    \n\n','Survey/Feedback',1,1,'nWNVoMLrMo059mDRmfOp9g',1250243000,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n^International(\'response complete\', \'Asset_Survey\'); on \n\n\n^International(\'response restart\', \'Asset_Survey\'); on \n\n\n^International(\'response timeout\', \'Asset_Survey\'); on \n\n\n^International(\'response timeout restart\', \'Asset_Survey\'); on \n\n
    ',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n\n \n\n\n

    \n \n \">\n |\n \n \n \">^International(my subscriptions,Asset_Newsletter);\n |\n \n \">\n

    \n\n

    \n\n\n

    \">
    \n

    \n
    \n\n\n
    \n \n
    \n
    \n','Collaboration',1,1,'newslettercs0000000001',1252682678,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n\n\n

    \n\n\">\n|\n\n\n\">^International(my subscriptions,Asset_Newsletter);\n|\n\n\">\n

    \n

    \n\n

    \">
    \n

    \n\n\n
    \n\n
    \n
    ',0,NULL,NULL),('
    \n
    \n\n

    \n
    \n ^International(member since,Account_Inbox); ^D(%z,);\n

    \n \n

    \n \n \n \" class=\"prevNext\">\"Previous\" \n \"> \n  \" class=\"prevNext\">\"Next\"\n \n \n \n

    \n \n \n \n \n \n \n \n \n \n \n \n \n WGoddThreadWGevenThread\">\n \n \n \n \n \n \n \n \n \n \n \n
    \">^International(title label,Account_Contributions);\">^International(type label,Account_Contributions);\">^International(date label,Account_Contributions);
    \">^D(,);
    ^International(no contributions,Account_Contributions);
    \n \n

    \n \n \n \" class=\"prevNext\">\"Previous\" \n \"> \n  \" class=\"prevNext\">\"Next\"\n \n \n \n

    \n \n \n

    ^International(contribution count,\'Account_Contributions\');

    \n
    \n
    ','Account/Contrib/View',1,1,'1IzRpX0tgW7iuCfaU2Kk0A',1250243000,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    \n

    \n
    \n^International(member since,Account_Inbox); ^D(%z,);\n

    \n

    \n\n\n\" class=\"prevNext\">\"Previous\" \n\"> \n \" class=\"prevNext\">\"Next\"\n\n\n\n

    \n\n\n\n\n\n\n\n\n\n\n\nWGoddThreadWGevenThread\">\n\n\n\n\n\n\n\n\n\n\n\n
    \">^International(title label,Account_Contributions);\">^International(type label,Account_Contributions);\">^International(date label,Account_Contributions);
    \">^D(,);
    ^International(no contributions,Account_Contributions);
    \n

    \n\n\n\" class=\"prevNext\">\"Previous\" \n\"> \n \" class=\"prevNext\">\"Next\"\n\n\n\n

    \n

    ^International(contribution count,\'Account_Contributions\');

    \n
    \n
    ',0,NULL,NULL),('','StoryArchive/KeywordList',1,1,'0EAJ9EYb9ap2XwfrcXfdLQ',1250243000,'WebGUI::Asset::Template::HTMLTemplate',1,'',0,NULL,NULL),('\r\n\r\n\r\n\r\n\r\n

    \r\n
    \r\n\r\n\r\n\r\n\r\n
    \r\n\">^International(continue shopping button,Shop);
    \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
    (add $)
    Hide?
    \r\n\r\n\r\n\r\n
    \r\n','ThingyRecord/View',1,1,'TKmhv8boP3TD2xwSwUBq0g',1250243000,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n

    \n
    \n\n\n
    \n\">^International(continue shopping button,Shop);
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    (add $)
    Hide?
    \n\n\n
    ',0,NULL,NULL),('\n
    \">\n
    \n\n
    \n
    \n
    \n ^International(member since,Account_Inbox); ^D(%z,);\n
    \n\n \n

    \n
    \n \n \n \n \n \n \n
    *
    \n \n \n
    \n\n
    \n
    \n
    ','Account/Profile/Edit',1,1,'75CmQgpcCSkdsL-oawdn3Q',1253555614,'WebGUI::Asset::Template::HTMLTemplate',1,'\n
    \">\n
    \n
    \n
    \n
    \n^International(member since,Account_Inbox); ^D(%z,);\n
    \n\n

    \n
    \n\n\n\n\n\n\n
    *
    \n
    \n
    \n
    \n
    ',0,NULL,NULL),('
    \n

    \n\n \n\n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n\n
    \n
    \n\n >\n >\n\n
    ','Survey/Take',1,1,'d8jMMMRddSQ7twP4l1ZSIw',1253555614,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n
    \n>\n>\n
    ',0,NULL,NULL),('\" id=\"id\">\n

    \n
    \n

    \n\n\n\n\n\">\n\n>\n\n

    \n


    \n\n

    \n

    \n

    ^International(last updated,Asset); ^International(ago,Asset_Story);

    \n

    ^International(by,Asset_Collaboration);

    \n


    \n\n \n \n \n
    \n \">\" alt=\"\" title=\"\" />

    \n ^International(Source,Asset_Story);: \n \n \n

      \n \n
    1. style=\"width:px;\">\n
      \n \">\" alt=\"\" title=\"\" />
      \n ^International(Source,Asset_Story);: \n
    2. \n
      \n
    \n \n \n \n\n

    \n

    ^International(keywords,Asset); \">

    \n
    ','Story',1,1,'3QpYtHrq_jmAk1FNutQM5A',1253636379,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n

    \n
    \n

    \n\n\n\n\n\">\n\n>\n\n

    \n


    \n\n

    \n

    \n

    ^International(last updated,Asset); ^International(ago,Asset_Story);

    \n

    ^International(by,Asset_Collaboration);

    \n


    \n\n\n\n\n
    \n\">\" alt=\"\" title=\"\" />

    \n^International(Source,Asset_Story);: \n\n\n

      \n\n
    1. style=\"width:px;\">\n
      \n\">\" alt=\"\" title=\"\" />
      \n^International(Source,Asset_Story);: \n
    2. \n
      \n
    \n\n\n\n\n

    \n

    ^International(keywords,Asset); \">

    \n
    ',0,NULL,NULL),('
    \" class=\"storyArchive\">\n\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n\n
    \n
    \n\n\n\n
      \n

      ^D(%c %D %y,);

      \n \n
    • \"> ^D(%Z,);
    • \n
      \n
    \n\n\n
      \n
    • \n\n class=\"active\">\n \">\n \n\n
    • \n
    \n
    \n\n\n
    ','StoryArchive',1,1,'yxD5ka7XHebPLD-LXBwJqw',1253635396,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"storyArchive\">\n\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n
    \n
    \n\n
      \n

      ^D(%c %D %y,);

      \n\n
    • \"> ^D(%Z,);
    • \n
      \n
    \n\n
      \n
    • \n\n class=\"active\">\n\">\n\n\n
    • \n
    \n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"viewStoryTopic\">\n\" id=\"id\">\n

    \n

    \n\n\n\n\n\">\n\n>\n\n

    \n

    \n

    \n

    ^International(last updated,Asset); ^International(ago,Asset_Story);

    \n
    \n
    \n\n \n \n \n
    \n \">\" alt=\"\" title=\"\" />

    \n ^International(Source,Asset_Story);: \n \n \n
      \n \n
    1. style=\"width:px;\">\n
      \n \">\" alt=\"\" title=\"\" />
      \n ^International(Source,Asset_Story);: \n
    2. \n
      \n
    \n \n
    \n \n\n
    \n

    ^International(by,Asset_Collaboration);

    \n \n \n
    \n

    ^International(keywords,Asset); \">

    \n
    \n','Story',1,1,'TbDcVLbbznPi0I0rxQf2CQ',1253636379,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"viewStoryTopic\">\n\" id=\"id\">\n

    \n

    \n\n\n\n\n\">\n\n>\n\n

    \n

    \n

    \n

    ^International(last updated,Asset); ^International(ago,Asset_Story);

    \n
    \n
    \n\n\n\n\n
    \n\">\" alt=\"\" title=\"\" />

    \n^International(Source,Asset_Story);: \n\n\n
      \n\n
    1. style=\"width:px;\">\n
      \n\">\" alt=\"\" title=\"\" />
      \n^International(Source,Asset_Story);: \n
    2. \n
      \n
    \n\n
    \n\n\n
    \n

    ^International(by,Asset_Collaboration);

    \n\n\n
    \n

    ^International(keywords,Asset); \">

    \n
    ',0,NULL,NULL),('\n\n\n
    \n\" class=\"WGprofile_displayView\">^International(\'back to profile label\',\'Account_Profile\');\n
    \n
    \n
    \n \n
    \n \n \n
    \n
    \n \n
    * -  ^International(\'required field\',Account_Profile);
    † - ^International(\'set by admin\',Account_Profile);
    \n
    \n
    \n
    \n
    \n
    \n','Account/Layout',1,1,'FJbUTvZ2nUTn65LpW6gjsA',1256092369,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n
    \n\" class=\"WGprofile_displayView\">^International(\'back to profile label\',\'Account_Profile\');\n
    \n
    \n
    \n\n
    \n\n\n
    \n
    \n\n
    * -  ^International(\'required field\',Account_Profile);
    † - ^International(\'set by admin\',Account_Profile);
    \n
    \n
    \n
    \n
    \n
    \n',0,NULL,NULL),('\n\n\n\n','EMS/LookupRegistrant',1,1,'OOyMH33plAy6oCj_QWrxtg',1257311886,'WebGUI::Asset::Template::HTMLTemplate',1,'\n',0,NULL,NULL),('\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','EMS/PrintBadge',1,1,'PsFn7dJt4wMwBa8hiE3hOA',1257311886,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n\n
    \n
    \n\n
    \n
    \n\n\n, \n
    \n
    \n\n
    \n
    \n\n',0,NULL,NULL),('\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','EMS/PrintTicket',1,1,'yBwydfooiLvhEFawJb0VTQ',1257311887,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n\n
    \n
    \n: \n
    \n
    \n\n / \n
    \n
    \n: \n
    \n
    \n\n',0,NULL,NULL),('\n

    \n
    \n\n

    \n
    \n\n

    \n
    \n\n\n
    \n
    \n
    \n
    \n
    \n
    \n\n\">^International(schedule back link,Asset_EventManagementSystem);\n\n\n','EMS/Schedule',1,1,'S2_LsvVa95OSqc66ITAoig',1257311887,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n

    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n\">^International(schedule back link,Asset_EventManagementSystem);\n',0,NULL,NULL),('\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','EMS/PrintRemainingTickets',1,1,'hreA_bgxiTX-EzWCSZCZJw',1257311887,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n\n
    \n\n
    \n
    \n: \n
    \n
    \n\n / \n
    \n
    \n
    \n
    \n\n',0,NULL,NULL),('\" id=\"id\">\n\n

    \n
    \n\n\n

    \n
    \n\n\n
      \n\n
    • \n\n
    \n
    \n\n\n
    \n \n
    \n
    \n\n\n
    \n \">\n • \">\n \n • \">\n \n \n • \">\n • \">\n \n
    \n
    \n\n\n\n\n \n \n \n\n\n \n \n \n \n\n\n
    \n \n \n *\n \n \n \n \n \n \n
    \n
    ^International(template captcha label,Asset_DataForm);
    \n\n\n','DataForm',1,1,'PBtmpl0000000000000020',1257311887,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n
      \n\n
    • \n\n
    \n
    \n\n
    \n\n
    \n
    \n\n
    \n\">\n• \">\n\n• \">\n\n\n• \">\n• \">\n\n
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\n*\n\n\n\n\n\n\n
    \n
    ^International(template captcha label,Asset_DataForm);
    \n',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n\n
    \n \n
    \n\n\n\n\n \n \n\n\n
    \n

    \n\" class=\"backLabel\">\n\n\n','DataForm',1,1,'PBtmpl0000000000000104',1257311888,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n\n
    \n\n
    \n\n\n\n\n\n\n\n
    \n

    \n\" class=\"backLabel\">',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n\n\n\n

    \n
    \n\n\n
      \n \n
    • \n
      \n
    \n
    \n\n\n
    \n \n
    \n
    \n\n\n
    \n \">\n • \">\n \n • \">\n \n \n • \">\n • \">\n \n
    \n
    \n\n\n
    \n \n )\" id=\"tab\" class=\"tab\">\n \n \n \n \n \n \n \n
    \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n \n \n \n \n \n *\n \n \n \n \n \n \n \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n^International(template captcha label,Asset_DataForm);
    \n\n\n\n','DataForm',1,1,'PBtmpl0000000000000116',1257311888,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n
      \n\n
    • \n
      \n
    \n
    \n\n
    \n\n
    \n
    \n\n
    \n\">\n• \">\n\n• \">\n\n\n• \">\n• \">\n\n
    \n
    \n\n
    \n\n)\" id=\"tab\" class=\"tab\">\n\n\n\n\n\n\n\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\n\n\n\n\n*\n\n\n\n\n\n\n\n
    \n\n
    \n
    \n\n
    \n
    \n\n
    \n^International(template captcha label,Asset_DataForm);
    \n\n\n',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n\n
      \n \n
    • \n
      \n
    \n
    \n\n\n \n

    \n\n\n\n

    \n \">\n • \">\n \n • \" onclick=\"\">\n \n \n • \" onclick=\"\">\n \n \n • \">\n • \">\n \n
    \n
    \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n \n \n \n \n \n *\n \n \n \n \n \n \n \n
    \n \n
    \n
    ^International(template captcha label,Asset_DataForm);
    \n
    \n\n\n\n','DataForm',1,1,'PBtmpl0000000000000141',1257311888,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n
      \n\n
    • \n
      \n
    \n
    \n\n\n

    \n\n\n

    \n\">\n• \">\n\n• \" onclick=\"\">\n\n\n• \" onclick=\"\">\n\n\n• \">\n• \">\n\n
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\n\n\n\n\n*\n\n\n\n\n\n\n\n
    \n\n
    \n
    ^International(template captcha label,Asset_DataForm);
    \n
    \n\n',0,NULL,NULL),('\r\n \">\r\n\r\n\">\r\n','Macro/PickLanguage',1,1,'_aE16Rr1-bXBf8SIaLZjCg',1257311888,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\">\n\n\">',0,NULL,NULL),('\r\n\r\n\r\n \r\n ^Page(\"title\"); - WebGUI\r\n \r\n \r\n\r\n\r\n\r\n\r\n\r\n\r\n ^AdminBar;\r\n
    \r\n\r\n ^AssetProxy(flexmenu);\r\n\r\n
    \r\n \r\n\r\n
      \r\n
    • ^H;
    • \r\n
    • ^a(^@;);
    • \r\n
    • ^LoginToggle;
    • \r\n ^GroupText(Turn Admin On,
    • ^AdminToggle;
    • );\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','style',0,1,'PBtmpl0000000000000060',1258524916,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n^Page(\"title\"); - WebGUI\n\n\n\n\n\n\n\n\n^AdminBar;\n
    \n^AssetProxy(flexmenu);\n
    \n\n
      \n
    • ^H;
    • \n
    • ^a(^@;);
    • \n
    • ^LoginToggle;
    • \n^GroupText(Turn Admin On,
    • ^AdminToggle;
    • );\n
    \n\n
    \n\n
    \n\n\n\n\n\n',0,NULL,NULL),('\r\n\r\n\r\n WebGUI <tmpl_var session.webgui.version>-<tmpl_var session.webgui.status> ^International(admin console,AdminConsole);\r\n \r\n \r\n \r\n\r\n\r\n \r\n\r\n','style',1,0,'PBtmpl0000000000000137',1258524916,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\nWebGUI <tmpl_var session.webgui.version>-<tmpl_var session.webgui.status> ^International(admin console,AdminConsole);\n\n\n\n\n\n\n\n',0,NULL,NULL),('','style',0,0,'PBtmpl0000000000000132',1258524916,'WebGUI::Asset::Template::HTMLTemplate',1,'',0,NULL,NULL),('\r\n\r\n\r\n \r\n ^Page(title); - ^c();\r\n \r\n \r\n \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n ^AdminBar();\r\n\r\n \r\n\r\n ^AdminToggle();\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n','style',1,1,'PBtmplBlankStyle000001',1258524916,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n^Page(title); - ^c();\n\n\n\n\n\n\n\n\n\n^AdminBar();\n\n^AdminToggle();\n\n\n\n\n\n',0,NULL,NULL),('
    \" class=\"nav dropMenu\">\n\n\" id=\"id\">\n\n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n
    \n\n

    \n\n

    \n
    \n\n\n\n\n
    \n','Navigation',1,1,'PBtmpl0000000000000117',1259133274,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"nav dropMenu\">\n\" id=\"id\">\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n
    \n\n

    \n\n

    \n
    \n\n\n
    ',0,NULL,NULL),('
    \" class=\"nav synopsisMenu\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n\n
    \n \n
    current\">\">
    \n
    \">
    \n
    \n
    \n
    \n\n\n
    \n','Navigation',1,1,'PBtmpl0000000000000136',1259133274,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"nav synopsisMenu\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n
    \n\n
    current\">\">
    \n
    \">
    \n
    \n
    \n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"nav crumbTrail\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n\n \n \n \"> >\n \n \n\n\n\n
    \n','Navigation',1,1,'PBtmpl0000000000000093',1259133274,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"nav crumbTrail\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n\n\n\"> >\n\n\n\n\n
    ',0,NULL,NULL),('
    \" class=\"syndicated articles\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n\n

    \">

    \n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n\n \n\n\n\n
    \n','SyndicatedContent',1,1,'GNvjCFQWjY2AF2uf0aCM8Q',1259133274,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"syndicated articles\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n

    \">

    \n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n\n\n\n
    ',0,NULL,NULL),('
    \" class=\"layout oneovertwo\">\n \n \" id=\"id\">\n\n \n \n \n\n \n

    \n \n

    \n
    \n\n \n
    \n \n \n
    \n
    \n \n \n
    \n \n \n \n \n \n\n \n \n \">\n \n \n \n \n\n \n \n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n \n\n \n \n \n \n
    \n
    \n
    \n\n \n
    \n\n \n
    \n \n \n \n \n \n\n \n \n \">\n \n \n \n \n\n \n \n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n \n\n \n \n \n \n
    \n
    \n
    \n\n \n
    \n\n \n
    \n \n \n \n \n \n\n \n \n \">\n \n \n \n \n\n \n \n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n \n\n \n \n\n \n
    \n
    \n
    \n\n \n
    \n\n
    \n\n \n \n \n \n \n
    \n
     
    \n
    \n \n
    \n\n\n
    \n','Layout',1,1,'-PkdI8l1idu-8gDX3iOdcw',1259133274,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"layout oneovertwo\">\n\" id=\"id\">\n\n\n\n\n

    \n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n
    \n\n\n\n\n\n\n\">\n\n\n\n\n\n\n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n\n\n\n\n
    \n
    \n
    \n\n
    \n\n
    \n\n\n\n\n\n\n\">\n\n\n\n\n\n\n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n\n\n\n\n
    \n
    \n
    \n\n
    \n\n
    \n\n\n\n\n\n\n\">\n\n\n\n\n\n\n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n\n\n\n\n
    \n
    \n
    \n\n
    \n
    \n\n\n\n\n\n
    \n
     
    \n
    \n\n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"article withImage\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n
    \n\n\n
    \n \" alt=\"\" />\n \n
    \n
    \n\n\n
    \n \n \n
    \n
    \n\n\n \n
    \n

    \">

    \n \n
    \n
    \n
    \n\n\n
    \n\n
    \n\n\n
    \n','Article',1,1,'PBtmpl0000000000000103',1259133275,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"article withImage\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n
    \n\n
    \n\" alt=\"\" />\n\n
    \n
    \n\n
    \n\n\n
    \n
    \n\n\n
    \n

    \">

    \n\n
    \n
    \n
    \n\n
    \n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"file\">\n\" id=\"id\">\n\n\n \n\n\n\" alt=\"\" class=\"wg-icon\" />\n\">\n\n\n
    \n','FileAsset',1,1,'PBtmpl0000000000000024',1259133275,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"file\">\n\" id=\"id\">\n\n\n\n\" alt=\"\" class=\"wg-icon\" />\n\">\n\n
    ',0,NULL,NULL),('
    \" class=\"article withPagination\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n
    \n\n\n
    \n \n \n
    \n
    \n\n\n \n \n
    \n

    \">

    \n \n
    \n
    \n
    \n
    \n\n\n
    \n\n\n \n
    \n
      \n \n
    • \n \" alt=\"\" class=\"wg-icon\" />\n \">\n
    • \n
      \n
    \n \n
    \n
    \n
    \n\n
    \n\n\n
      \n
    • \n \n class=\"active\">\n \">\n \n \n
    • \n
    \n
    \n\n\n
    \n','Article',1,1,'XdlKhCDvArs40uqBhvzR3w',1259133275,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"article withPagination\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n
    \n\n
    \n\n\n
    \n
    \n\n\n\n
    \n

    \">

    \n\n
    \n
    \n
    \n
    \n\n
    \n\n\n
    \n
      \n\n
    • \n\" alt=\"\" class=\"wg-icon\" />\n\">\n
    • \n
      \n
    \n\n
    \n
    \n
    \n
    \n\n
      \n
    • \n\n class=\"active\">\n\">\n\n\n
    • \n
    \n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"navigation indentMenu\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n \n\n \n \"\n class=\"level current ancestor\"\n onclick=\"window.open(this.href);return false;\">\n \n\n\n\n
    \n','Navigation',1,1,'PBnav00000000indentnav',1259133275,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"navigation indentMenu\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n\n\"\nclass=\"level current ancestor\"\nonclick=\"window.open(this.href);return false;\">\n\n\n\n
    ',0,NULL,NULL),('
    \" class=\"nav tabsMenu\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n\n
      \n \n class=\"current\" class=\"ancestor\">\n \">\n \n \n
    \n
    \n\n\n
    \n','Navigation',1,1,'PBtmpl0000000000000124',1259133275,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"nav tabsMenu\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n
      \n\n class=\"current\" class=\"ancestor\">\n\">\n\n\n
    \n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"layout rightcolumn\">\n\n \" id=\"id\">\n\n \n \n \n\n \n

    \n \n

    \n
    \n\n \n
    \n \n \n
    \n
    \n \n \n
    \n \n \n \n \n \n\n \n \n \">\n \n \n \n \n\n \n \n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n \n\n \n \n\n \n
    \n
    \n
    \n\n \n
    \n\n \n
    \n \n \n \n \n \n\n \n \n \">\n \n \n \n \n\n \n \n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n \n\n \n \n\n \n
    \n
    \n
    \n\n \n
    \n\n
    \n \n \n \n \n \n \n
    \n
     
    \n
    \n \n
    \n\n\n
    \n','Layout',1,1,'PBtmpl0000000000000131',1259133275,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"layout rightcolumn\">\n\" id=\"id\">\n\n\n\n\n

    \n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n
    \n\n\n\n\n\n\n\">\n\n\n\n\n\n\n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n\n\n\n\n
    \n
    \n
    \n\n
    \n\n
    \n\n\n\n\n\n\n\">\n\n\n\n\n\n\n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n\n\n\n\n
    \n
    \n
    \n\n
    \n
    \n\n\n\n\n\n
    \n
     
    \n
    \n\n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"nav topNav\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n
    \n\n \n
    \n
    \n
      \n \n \n
    \n
    \n
    \n \n
    \n
  • onclick=\"window.open(this.href); return false;\" href=\"\">\n \n
    \n
    \n
      \n \n \n \n \n \n \n
    \n \n
  • \n \n\n\n\n\n\n','Navigation',1,1,'PBtmpl0000000000000134',1259133275,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"nav topNav\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n
    \n\n\n
    \n
    \n
      \n\n\n
    \n
    \n
    \n\n
    \n
  • onclick=\"window.open(this.href); return false;\" href=\"\">\n\n
    \n
    \n
      \n\n\n\n\n\n\n
    \n\n
  • \n\n\n\n\n',0,NULL,NULL),('
    \" class=\"folder\">\n\n\" id=\"id\">\n\n\n \n\n \n\n

    \n
    \n \n\n
    \n \n\n
    \n
    \n \n\n

    \">

    \n
    \n\n \n\n \n\n \n \n\n\n\n\n \n\n\n \n \n \n \n\n\n\n
    \n \n \" class=\"wg-icon\" alt=\"\" />\n \">\n \n \" class=\"wg-icon\" alt=\"\" />\n \n \n \n \n
    \n \n \n \n \n \n \n \" class=\"wg-icon\" alt=\"\" />\n \">\n \n \" class=\"wg-icon\" alt=\"\" />\n \n \n \n \n \n ^D(\"%z %Z\",);\n \n \n
    \n\n\n
    \n','Folder',1,1,'PBtmpl0000000000000078',1259133275,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"folder\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n

    \">

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\" class=\"wg-icon\" alt=\"\" />\n\">\n\n\" class=\"wg-icon\" alt=\"\" />\n\n\n\n\n
    \n\n\n\n\n\n\n\" class=\"wg-icon\" alt=\"\" />\n\">\n\n\" class=\"wg-icon\" alt=\"\" />\n\n\n\n\n\n^D(\"%z %Z\",);\n\n\n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"poll\">\n\n\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n
    \n

    \n\n\n \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n \n\n \n \" alt=\"graph\" />\n \n \n
    \n \n \n \n \n \n
    \" class=\"pollColor\">^Spacer(1,1); % ()
    \n
    \n

    :

    \n
    \n
    \n
    \n\n\n
    \n','Poll',1,1,'PBtmpl0000000000000055',1259133275,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"poll\">\n\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n
    \n\n\n
    \n
    \n
    \n

    \n\n\n
    \n\n
    \n
    \n
    \n
    \n\n
    \n\n\n\n\" alt=\"graph\" />\n\n\n
    \n\n\n\n\n\n
    \" class=\"pollColor\">^Spacer(1,1); % ()
    \n
    \n

    :

    \n
    \n
    \n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"syndicated default\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n\n

    \">

    \n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n\n
      \n \n
    • \n \">\n - \n
    • \n
      \n
    \n
    \n\n\n
    \n','SyndicatedContent',1,1,'PBtmpl0000000000000065',1259133275,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"syndicated default\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n

    \">

    \n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n
      \n\n
    • \n\">\n- \n
    • \n
      \n
    \n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"layout default\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n\n
    \n\n \n \n \n \n \n \n \n \">\n \n \n \n \n \n \n \n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n \n \n \n \n \n \n
    \n
    \n
    \n\n \n
    \n\n
    \n\n\n \n \n \n \n
    \n
     
    \n
    \n\n
    \n\n\n
    \n','Layout',1,1,'PBtmpl0000000000000054',1259133276,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"layout default\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n
    \n\n\n\n\n\n\n\">\n\n\n\n\n\n\n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n\n\n\n\n
    \n
    \n
    \n\n
    \n
    \n\n\n\n\n\n
    \n
     
    \n
    \n\n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"nav horizontalMenu\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n\n \n\n\n\n
    \n','Navigation',1,1,'PBtmpl0000000000000108',1259133276,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"nav horizontalMenu\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n\n\n\n
    ',0,NULL,NULL),('
    \" class=\"article linkedImage\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n
    \n\n\n
    \n \n \">\" alt=\"\" />\n \n \" class=\"caption\">\n \n \n \" alt=\"\" />\n \n
    \n \n
    \n\n\n
    \n \n
    \n \n
    \n\n
    \n\n\n
    \n\n\n
    \n','Article',1,1,'PBtmpl0000000000000115',1259133276,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"article linkedImage\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n
    \n\n
    \n\n\">\" alt=\"\" />\n\n\" class=\"caption\">\n\n\n\" alt=\"\" />\n\n
    \n\n
    \n\n
    \n\n
    \n\n
    \n
    \n\n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"layout oneoverthree\">\n \n \" id=\"id\">\n\n \n \n \n\n \n

    \n \n

    \n
    \n\n \n
    \n \n \n
    \n
    \n \n \n
    \n \n \n \n \n \n\n \n \n \">\n \n \n \n \n\n \n \n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n \n\n \n \n \n \n
    \n
    \n
    \n\n \n
    \n\n
    \n\n \n
    \n \n \n \n \n \n\n \n \n \">\n \n \n \n \n\n \n \n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n \n\n \n \n \n \n
    \n
    \n
    \n\n \n
    \n\n \n
    \n \n \n \n \n \n\n \n \n \">\n \n \n \n \n\n \n \n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n \n\n \n \n\n \n
    \n
    \n
    \n\n \n
    \n\n \n
    \n \n \n \n \n \n\n \n \n \">\n \n \n \n \n\n \n \n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n \n\n \n \n \n \n
    \n
    \n
    \n\n \n
    \n\n
    \n\n \n \n \n \n \n
    \n
     
    \n
    \n \n
    \n\n\n
    \n','Layout',1,1,'PBtmpl0000000000000109',1259133276,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"layout oneoverthree\">\n\" id=\"id\">\n\n\n\n\n

    \n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n
    \n\n\n\n\n\n\n\">\n\n\n\n\n\n\n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n\n\n\n\n
    \n
    \n
    \n\n
    \n
    \n\n
    \n\n\n\n\n\n\n\">\n\n\n\n\n\n\n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n\n\n\n\n
    \n
    \n
    \n\n
    \n\n
    \n\n\n\n\n\n\n\">\n\n\n\n\n\n\n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n\n\n\n\n
    \n
    \n
    \n\n
    \n\n
    \n\n\n\n\n\n\n\">\n\n\n\n\n\n\n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n\n\n\n\n
    \n
    \n
    \n\n
    \n
    \n\n\n\n\n\n
    \n
     
    \n
    \n\n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"layout threeColumns\">\n\n \" id=\"id\">\n\n \n \n \n\n \n

    \n
    \n\n \n
    \n \n \n
    \n
    \n\n \n
    \n\n \n \n \n \n\n \n \n \">\n \n \n\n \n \n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n \n\n \n \n\n \n
    \n
    \n
    \n\n \n
    \n\n \n
    \n\n \n \n \n \n\n \n \n \">\n \n \n\n \n \n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n \n\n \n \n\n \n
    \n
    \n
    \n\n \n
    \n\n \n
    \n\n \n \n \n \n\n \n \n \">\n \n \n\n \n \n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n \n\n \n \n\n \n
    \n
    \n
    \n\n \n
    \n\n
    \n\n \n \n \n \n \n
     
    \n \n
    \n\n\n
    \n\n','Layout',1,1,'VCFhB9WOsDsH2Apj3c6DpQ',1259133276,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"layout threeColumns\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n
    \n\n\n\n\n\n\n\">\n\n\n\n\n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n\n\n\n\n
    \n
    \n
    \n\n
    \n\n
    \n\n\n\n\n\n\n\">\n\n\n\n\n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n\n\n\n\n
    \n
    \n
    \n\n
    \n\n
    \n\n\n\n\n\n\n\">\n\n\n\n\n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n\n\n\n\n
    \n
    \n
    \n\n
    \n
    \n\n\n\n\n\n
     
    \n\n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"article default\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n
    \n\n\n
    \n \n \n
    \n
    \n\n\n \n
    \n

    \">

    \n \n
    \n
    \n
    \n\n\n
    \n\n\n
    \n
      \n \n
    • \n \" alt=\"\" class=\"wg-icon\" />\n \">\n
    • \n
      \n
    \n \n
    \n
    \n\n
    \n\n\n
    \n','Article',1,1,'PBtmpl0000000000000002',1259133276,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"article default\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n
    \n\n
    \n\n\n
    \n
    \n\n\n
    \n

    \">

    \n\n
    \n
    \n
    \n\n
    \n\n
    \n
      \n\n
    • \n\" alt=\"\" class=\"wg-icon\" />\n\">\n
    • \n
      \n
    \n\n
    \n
    \n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"article item\">\n\n \" id=\"id\">\n\n \n \n \n \n

    \n \n \n \">\n \n \n \n \n \n \n

    \n \n \n
    \n \n
    \n \n
    \n \n \n
    \n
      \n \n
    • \n \" alt=\"\" class=\"wg-icon\" />\n \">\n
    • \n
      \n
    \n \n
    \n
    \n\n
    \n\n\n
    \n','Article',1,1,'PBtmpl0000000000000123',1259133276,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"article item\">\n\" id=\"id\">\n\n\n\n

    \n\n\n\">\n\n\n\n\n\n\n

    \n\n
    \n\n
    \n\n
    \n\n
    \n
      \n\n
    • \n\" alt=\"\" class=\"wg-icon\" />\n\">\n
    • \n
      \n
    \n\n
    \n
    \n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"layout sidebyside\">\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n\n
    \n\n \n \n \n \n \n \n \n \">\n \n \n \n \n \n \n \n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n \n \n \n \n \n \n
    \n
    \n
    \n\n \n
    \n\n\n
    \n\n \n \n \n \n \n \n \n \">\n \n \n \n \n \n \n \n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n \n \n \n \n \n \n
    \n
    \n
    \n\n \n
    \n\n
    \n\n\n \n \n \n \n
    \n
     
    \n
    \n\n
    \n\n\n
    \n','Layout',1,1,'PBtmpl0000000000000135',1259133276,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"layout sidebyside\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n
    \n\n\n\n\n\n\n\">\n\n\n\n\n\n\n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n\n\n\n\n
    \n
    \n
    \n\n
    \n\n
    \n\n\n\n\n\n\n\">\n\n\n\n\n\n\n
    \n
    _div\" class=\"dragable uncommitted-asset\">\n\n\n\n\n
    \n
    \n
    \n\n
    \n
    \n\n\n\n\n\n
    \n
     
    \n
    \n\n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"nav bulletedList\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n\n
      \n\n\n\n
    \n \n\n\n class=\"current\" class=\"ancestor\"
    >\n onclick=\"window.open(this.href);return false;\" href=\"\">\n\n\n
      \">\n\n \n\n\n\n \n
    \n \n \n
    \n\n\n\n\n\n\n
    \n','Navigation',1,1,'PBnav00000000000bullet',1259133276,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"nav bulletedList\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n
      \n\n\n
    \n\n\n class=\"current\" class=\"ancestor\"
    >\nonclick=\"window.open(this.href);return false;\" href=\"\">\n\n
      \">\n\n\n\n\n\n
    \n\n\n
    \n\n\n\n\n
    ',0,NULL,NULL),('
    \" class=\"file swfobject\">\n\" id=\"id\">\n\n\n \n\n\n
    \n\n \" />\n \n \" width=\"400\" height=\"300\">\n \n \n \"Get\n \n \n \n \n\n
    \n\n\n
    \n','FileAsset',1,1,'MK4fCNoyrx5SE8eyDfOpxg',1259133276,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"file swfobject\">\n\" id=\"id\">\n\n\n\n
    \n\n\" />\n\n\" width=\"400\" height=\"300\">\n\n\n\"Get\n\n\n\n\n\n
    \n\n
    ',0,NULL,NULL),('
    \" class=\"nav treeNav\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n\n
    \">\n
      \n\n\n \n
    \n \n \n\n class=\"expanded\" class=\"expanded\">\n \">\n\n \n
      \">\n \n \n \n\n \n \n
    \n \n \n
    \n\n\n\n
    \n\n\n\n
    \n\n\n
    \n\n','Navigation',1,1,'PBtmpl0000000000000130',1259133276,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"nav treeNav\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n\n
    \">\n
      \n\n\n
    \n\n\n class=\"expanded\" class=\"expanded\">\n\">\n\n
      \">\n\n\n\n\n\n
    \n\n\n
    \n\n\n
    \n\n
    \n\n
    ',0,NULL,NULL),('
    \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 \">^International(add a ticket,Asset_EventManagementSystem);\r\n •\r\n \">^International(meta fields,Asset_EventManagementSystem);\r\n •\r\n \">^International(import,Asset_EventManagementSystem);\r\n •\r\n \">^International(export,Asset_EventManagementSystem);\r\n •\r\n \">^International(print remaining tickets,Asset_EventManagementSystem);\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

    \">^International(add a ribbon,Asset_EventManagementSystem);

    \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

    \">^International(add a token,Asset_EventManagementSystem);

    \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^ViewCart;\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','EMS/BadgeBuilder',1,1,'BMybD3cEnmXVk2wQ_qEsRQ',1263962529,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    \n
    \n
    \n\n
    \n\n
    \n\n

    \n\">^International(add a ticket,Asset_EventManagementSystem);\n•\n\">^International(meta fields,Asset_EventManagementSystem);\n•\n\">^International(import,Asset_EventManagementSystem);\n•\n\">^International(export,Asset_EventManagementSystem);\n•\n\">^International(print remaining tickets,Asset_EventManagementSystem);\n

    \n
    \n


    \n

    \n

    \n
    \n\n
    \n\n
    \n\n

    \">^International(add a ribbon,Asset_EventManagementSystem);

    \n
    \n

    \n
    \n\n
    \n\n
    \n\n

    \">^International(add a token,Asset_EventManagementSystem);

    \n
    \n

    \n
    \n\n
    \n
    \n
    \n
    \n
    \n\n\n^ViewCart;\n
    \n\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n\n\n\n\n
    \n
    \n
    \n',0,NULL,NULL),('

    \" />','ImageAsset',1,1,'mRtqRuVikSe82BQsYBlD0A',1263962529,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \" />',0,NULL,NULL),('\n\n
    \n','Account/Layout',1,1,'aUDsJ-vB9RgP-AYvPOy8FQ',1263962529,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n
    \n',0,NULL,NULL),('
    \r\n\r\n\r\n\r\n

    ^International(errors,Asset_Event);

    \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 ^International(tab event,Asset_Event);\r\n ^International(recurrence,Asset_Event);\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 \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
    ^International(event title,Asset_Event);
    ^International(short title,Asset_Event);
    ^International(location,Asset_Event);
    ^International(description,Asset_Event);
    ^International(start date,Asset_Event);
    ^International(end date,Asset_Event);
    ^International(time,Asset_Event);
     
    ^International(related material,Asset_Event);\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
    \' type=\'button\' name=\'\' value=\'DEL\' onClick=\"return delete_link(\'\',\'\');\">\r\n \' value=\'\'>\r\n \' value=\"\">\r\n
    \'>\r\n\' name=\'\' value=\'\'>\r\n\' name=\'rel_delconfirm_\' value=\'0\'>\r\n
    \r\n
    \r\n
    ^International(group to view,Asset_Event);
    ^International(attachments for event,Asset_Event);
    \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
    ^International(recurrence pattern,Asset_Event);
    ^International(recurrence range,Asset_Event);\r\n

    ^International(start,Asset_Event);:

    \r\n

    \r\n

    ^International(end,Asset_Event);:

    \r\n
    \r\n
    \r\n
    \r\n\r\n\r\n\r\n\r\n','Calendar/EventEdit',1,1,'CalendarEventEdit00001',1269401468,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n\n

    ^International(errors,Asset_Event);

    \n
      \n\n
    • \n
      \n
    \n
    \n\n\n\n\n
    \n^International(tab event,Asset_Event);\n^International(recurrence,Asset_Event);\n\n\n
    \n\n\n\n\n\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(event title,Asset_Event);
    ^International(short title,Asset_Event);
    ^International(location,Asset_Event);
    ^International(description,Asset_Event);
    ^International(start date,Asset_Event);
    ^International(end date,Asset_Event);
    ^International(time,Asset_Event);
     
    ^International(related material,Asset_Event);\n\n\n\n\n\n\n\n\n\n\'>\n\n\n\n\n\n\n
    \n\n
    \' type=\'button\' name=\'\' value=\'DEL\' onClick=\"return delete_link(\'\',\'\');\">\n\' value=\'\'>\n\' value=\"\">\n
    \'>\n\' name=\'\' value=\'\'>\n\' name=\'rel_delconfirm_\' value=\'0\'>\n
    \n
    \n
    ^International(group to view,Asset_Event);
    ^International(attachments for event,Asset_Event);
    \n
    \n\n\n\n\n\n\n\n\n\n\n
    ^International(recurrence pattern,Asset_Event);
    ^International(recurrence range,Asset_Event);\n

    ^International(start,Asset_Event);:

    \n

    \n

    ^International(end,Asset_Event);:

    \n
    \n
    \n
    \n\n',0,NULL,NULL),('\n \n WebGUI ^International(assetName,Asset_Survey);\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n\n\n
    \n
    \n
    \n
    \n ^International(Loading...,WebGUI);\n
    \n
    \n
    \n\n\n \" id=\"id\">\n \n \n \n
    \n

    ^International(warnings,Asset_Survey);

    \n
    \n
    \n \n
    \n
    \n
    \n \n \n \n
    \n
    \n
    \n
    \n\n','Survey/Edit',1,1,'GRUNFctldUgop-qRLuo_DA',1269401469,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\nWebGUI ^International(assetName,Asset_Survey);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n
    \n
    \n
    \n^International(Loading...,WebGUI);\n
    \n
    \n
    \n\" id=\"id\">\n\n
    \n

    ^International(warnings,Asset_Survey);

    \n
    \n
    \n
    \n
    \n
    \n\n\n\n
    \n
    \n
    \n
    \n',0,NULL,NULL),('\n\n\n\n \n ^Page(title); - ^c;\n \n\n\n\n ^AdminBar;\n
    \n
     
    \n
    \n
    ^H(^c(););
    \n
    \n ^AssetProxy(crystalx/site-search);\n
    \n
    \n\n
    \n ^AssetProxy(crystalx/crystalx_navigation);\n
    \n\n
    \n
    \n
    \n
    You are here: ^AssetProxy(crystalx/crystalx_navigationtrail);
    \n
    ^D(\"%W, %D/%C/%y\");
    \n
    \n
    \n
    \n
    \n\n
    \n
    \n
    \n ^LoginToggle;  \n ^GroupText(\"Registered Users\",^a(^@;););  \n ^AdminToggle;\n
    \n
    \n\n
    \n

    © 2009 ^c; | Empowered by WebGUI

    \n

    Created by Nuvio | Webdesign

    \n

    \n
    \n
    \n\n\n\n','style',1,1,'OiJNwP1gAlcva8_yOtL4gA',1273032718,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n^Page(title); - ^c;\n\n\n\n^AdminBar;\n
    \n
     
    \n
    \n
    ^H(^c(););
    \n
    \n^AssetProxy(crystalx/site-search);\n
    \n
    \n
    \n^AssetProxy(crystalx/crystalx_navigation);\n
    \n
    \n
    \n
    \n
    You are here: ^AssetProxy(crystalx/crystalx_navigationtrail);
    \n
    ^D(\"%W, %D/%C/%y\");
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n^LoginToggle;  \n^GroupText(\"Registered Users\",^a(^@;););  \n^AdminToggle;\n
    \n
    \n
    \n

    © 2009 ^c; | Empowered by WebGUI

    \n

    Created by Nuvio | Webdesign

    \n

    \n
    \n
    \n\n',0,'pl9xiFGzrqfAgRzqwJ8xPg',NULL),('\n
    \n
    \n\n

    \n
    \n\n

    \n
    \n
    \n \n\n \n \n
    \" class=\"yuimenubar\">\n
    \n
      \n \n\n \n
    \n
    \n
    \n \n
    \n\n \n \n \n \n
  • \n onclick=\"window.open(this.href); return false;\"href=\"\">\n \n \n
  • \n onclick=\"window.open(this.href); return false;\"href=\"\">\n \n
  • \n onclick=\"window.open(this.href); return false;\" href=\"\">\n \n \n \n \n \n \n \n
  • \n \n
  • \n \n onclick=\"window.open(this.href); return false;\"href=\"\">\n \n \n
  • \n \n
  • \n \n onclick=\"window.open(this.href); return false;\" href=\"\">\n \n \n\n \n
    \n
    \n
      \n \n \n \n\n \n \n \n \n \n \n \n \n
    \n
    \n
    \n
  • \n \n \n
    \n \n \n\n \n\n\n\n','Navigation',1,1,'gaIOm5cr2TkT9Fk6QmZWug',1273032718,'WebGUI::Asset::Template::HTMLTemplate',1,'\n
    \n
    \n\n

    \n
    \n\n

    \n
    \n\n\n\n\n\n',0,NULL,NULL),('\r\n \r\n\r\n\r\n\r\n id=\"currentpage\"\r\n \r\n\r\n onclick=\"window.open(\'\')\" href=\"#\" \r\n href=\"\"\r\n \r\n >\r\n \r\n \r\n\r\n > \r\n\r\n\r\n','Navigation',1,1,'hpCk0B3vQzgc-QJhSol41w',1273032718,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\nid=\"currentpage\"\n\nonclick=\"window.open(\'\')\" href=\"#\"\nhref=\"\"\n>\n\n\n > \n',0,NULL,NULL),('\" id=\"id\">\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
    Go back to ^H(Home);
    \r\n\r\n \r\n
    \r\n \r\n
    id=\"odd\" >\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','Search',1,0,'OfKbvK7CrfMnfc8WDoF4Rg',1273032718,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n
    \n
    \n\n

    \n
    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n
    Go back to ^H(Home);
    \n\n
    \n\n
    id=\"odd\">\n
    );\">
    \n
    \n
    \n
    \n
    \n\n
    \n\n
    \n
    \n\n
    \n · · \n
    \n
    \n
    ',0,NULL,'[]'),('\r\n\r\n\r\n\r\n \r\n ^c; - ^Page(title);\r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n^AdminBar();\r\n\r\n\r\n \r\n \r\n\r\n\r\n \r\n\r\n
    \r\n
    \r\n
    ^H(^c;);
    \r\n
    ^c;
    \r\n
    \r\n
    \r\n

    ^Page(title);

    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \"plain\"webgui\"
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n ^AssetProxy(flexmenu);\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n ^L(\"\",\"\",\"PBtmpl0000000000000044\");\r\n ^AdminToggle;\r\n
    \r\n
    \r\n © ^D(%y); ^c;\r\n
    \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n','style',1,1,'stevestyle000000000002',1273032718,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n^c; - ^Page(title);\n\n\n\n\n\n\n\n\n\n\n^AdminBar();\n\n\n\n\n\n\n\n\n
    \n
    \n
    ^H(^c;);
    \n
    ^c;
    \n
    \n
    \n

    ^Page(title);

    \n
    \n
    \n
    \n\n
    \n
    \n
    \n
    \n\"plain\"webgui\"
    \n
    \n
    \n
    \n\n\n\n\n\n
    \n
    \n^AssetProxy(flexmenu);\n
    \n\n\n\n\n\n
    \n
    \n^L(\"\",\"\",\"PBtmpl0000000000000044\");\n^AdminToggle;\n
    \n
    \n© ^D(%y); ^c;\n
    \n\n\n\n\n\n',0,'ahKL5Wl1XmeUUCB32OzSbA',NULL),('

    \n\n
      \n
    • \n \n \"> - on by \n \n - on by \n \n ( \"> )\n \n \n
    • \n
    \n\n
    \"> | \"> | \">
    \n\n\n','WikiMaster_recentChanges',1,1,'WikiRCTmpl000000000001',1273032720,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n
      \n
    • \n\n\"> - on by \n\n - on by \n\n( \"> )\n\n\n
    • \n
    \n
    \"> | \"> | \">
    ',0,NULL,NULL),('

    \n\n

    \n\n\n

    \n\n
    \n\n

    ^International(categories label,Asset_Matrix);

    \n\n
    \n

    \n\n\n\"> ()
    \n
    \n
    \n

    \n
    \n
    \n\n

    Featured Article: \">

    \n\n
    \n\n
    \n

    \">

    \n
      \n
    • \n \n \">\n \n ()\n \n
    • \n
    \n
    \n
    \n

    \">

    \n
      \n
    1. \">
    2. \n
    \n\n
    \n
    \n\n
    \n\n\n','WikiMaster_front',1,1,'WikiFrontTmpl000000001',1273032720,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n\n

    \n\n

    \n\n
    \n\n

    ^International(categories label,Asset_Matrix);

    \n\n
    \n

    \n\n\n\"> ()
    \n
    \n
    \n

    \n
    \n
    \n\n

    Featured Article: \">

    \n\n
    \n
    \n

    \">

    \n
      \n
    • \n\n\">\n\n ()\n\n
    • \n
    \n
    \n
    \n

    \">

    \n
      \n
    1. \">
    2. \n
    \n
    \n
    \n
    ',0,NULL,NULL),('\n

    \n\n\n\n\n

    \n \n \n \n
    \n · · \n
    \n
    \n

    \n

    \">

    \n \n

    \n

    \">

    \n
    \n
    \n
    \"> | \"> | \">
    \n','WikiMaster_search',1,1,'WikiSearchTmpl00000001',1273032720,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n\n\n

    \n\n\n\n
    \n · · \n
    \n
    \n

    \n

    \">

    \n\n

    \n

    \">

    \n
    \n
    \n
    \"> | \"> | \">
    ',0,NULL,NULL),('\n
      \n\n
    • at () by
    • \n
      \n
    \n','WikiPage_pageHistory',1,1,'WikiPHTmpl000000000001',1273032720,'WebGUI::Asset::Template::HTMLTemplate',1,'
      \n\n
    • at () by
    • \n
      \n
    ',0,NULL,NULL),('

    \n

    \n\n
    \n
      \n
    • \n
    • \n
    \n
    \n
    \n
    ^International(locked,Asset_WikiPage);
    \n
    \n

    ^International(keywords,Asset);: \">

    \n
    \n
    \n
    \n
    \n
    \n\n\n\n
    \"> | \"> | \"> | \">
    ','WikiPage',1,1,'WikiPageTmpl0000000001',1273032720,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n

    \n
    \n
      \n
    • \n
    • \n
    \n
    \n
    \n
    ^International(locked,Asset_WikiPage);
    \n
    \n

    ^International(keywords,Asset);: \">

    \n
    \n
    \n
    \n
    \n
    \n\n\n\n
    \"> | \"> | \"> | \">
    ',0,NULL,NULL),('\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','WikiPage_edit',1,1,'WikiPageEditTmpl000001',1273032720,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\n\n\n',0,NULL,NULL),('

    \n\n
      \n
    1. \">
    2. \n
    \n\n
    \"> | \"> | \">
    \n\n','WikiMaster_mostPopular',1,1,'WikiMPTmpl000000000001',1273032720,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n
      \n
    1. \">
    2. \n
    \n
    \"> | \"> | \">
    ',0,NULL,NULL),('\r\n\r\n\r\n \r\n ^c; - ^Page(title);\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n\r\n\r\n^AdminBar();\r\n\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n ^L(\"\",\"\",\"PBtmpl0000000000000092\"); · ^AdminToggle;\r\n
    \r\n
    \r\n

    ^H(^c;);

    \r\n

    ^Page(title);

    \r\n
    \r\n \"webgui\"
    \r\n
    \r\n
    \r\n
    \r\n ^AssetProxy(style3_coolmenu);\r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n\r\n
    \r\n
    \r\n © ^D(%y); ^c;\r\n
    \r\n \"plain
    \r\n
    \r\n
    \r\n
    \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n','style',1,1,'stevestyle000000000003',1273032720,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n^c; - ^Page(title);\n\n\n\n\n\n\n\n\n\n\n\n^AdminBar();\n
    \n
    \n
    \n
    \n
    \n^L(\"\",\"\",\"PBtmpl0000000000000092\"); · ^AdminToggle;\n
    \n
    \n

    ^H(^c;);

    \n

    ^Page(title);

    \n
    \n\"webgui\"
    \n
    \n
    \n
    \n^AssetProxy(style3_coolmenu);\n
    \n
    \n\n
    \n
    \n
    \n
    \n
    \n© ^D(%y); ^c;\n
    \n\"plain
    \n
    \n
    \n
    \n\n\n\n\n\n',0,'Xr1JhO16oSMIEvCjcZILZQ',NULL),('\r\n\r\n\r\n \r\n ^Page(title);\r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n\r\n\r\n\r\n ^AdminBar();\r\n
    \r\n
    \r\n
    \r\n ^H(^c(););\r\n
    \r\n \r\n
    \r\n © ^D(%y); ^c;\r\n
    \r\n
    \r\n\r\n
    \r\n
    \r\n ^AssetProxy(roottab_level0);\r\n
    \r\n
    \r\n
    \r\n ^AssetProxy(roottab_level1);\r\n
    \r\n
    \r\n ^AssetProxy(crumbtrail); \r\n
    \r\n
     
    \r\n
    \r\n \r\n
    \r\n
     
    \r\n
    \r\n \r\n
    \r\n ^L(\"\",\"\",\"PBtmpl0000000000000044\");\r\n
    ^AdminToggle;
    \r\n ^AssetProxy(style1/gui_bottom.jpg);
    \r\n \"WebGUI\r\n
    \r\n
    \r\n\r\n\r\n\r\n\r\n\r\n \r\n','style',1,1,'stevestyle000000000001',1273032722,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n^Page(title);\n\n\n\n\n\n\n\n\n\n\n^AdminBar();\n
    \n
    \n
    \n^H(^c(););\n
    \n
    \n© ^D(%y); ^c;\n
    \n
    \n
    \n
    \n^AssetProxy(roottab_level0);\n
    \n
    \n
    \n^AssetProxy(roottab_level1);\n
    \n
    \n^AssetProxy(crumbtrail);\n
    \n
     
    \n
    \n\n
    \n
     
    \n
    \n
    \n^L(\"\",\"\",\"PBtmpl0000000000000044\");\n
    ^AdminToggle;
    \n^AssetProxy(style1/gui_bottom.jpg);
    \n\"WebGUI\n
    \n
    \n\n\n\n\n\n',0,'RE3ugPDieP57zCI6J_uJqw',NULL),('\n
    \n\n
    \n

    \n
    \n ^International(member since,Account_Inbox); ^D(%z,);\n

    \n \n

    \n location.href=\'\'alert(\'^International(no friends hover,Account_Inbox);\');\" />\n \n \n \" class=\"prevNext\">\"Previous\" \n \"> \n  \" class=\"prevNext\">\"Next\"\n \n \n \n

    \n \n \n \n \n \n \n \n \n \n \n \n WGoddThreadWGevenThread\">\n \n \n \n \n \n \n \n \n
     \">^International(from label,Account_Inbox);\">^International(subject label,Account_Inbox);\">^International(date label,Account_Inbox);\">^International(status label,Account_Inbox);
    old.pngnew.png);\" />\" class=\"inbox_from\">\">^D(,);
    \n \n

    \n location.href=\'\'alert(\'^International(no friends hover,Account_Inbox);\');\" />\n \n \n \" class=\"prevNext\">\"Previous\" \n \"> \n  \" class=\"prevNext\">\"Next\"\n \n \n \n

    \n\n

    \n ^International(message count,\'Account_Inbox\');\n

    \n \n
    \n\n
    \n','Account/Inbox/View',1,1,'c8xrwVuu5QE0XtF9DiVzLw',1273032723,'WebGUI::Asset::Template::HTMLTemplate',1,'\n
    \n
    \n

    \n
    \n^International(member since,Account_Inbox); ^D(%z,);\n

    \n

    \n location.href=\'\'alert(\'^International(no friends hover,Account_Inbox);\');\" />\n\n\n\" class=\"prevNext\">\"Previous\" \n\"> \n \" class=\"prevNext\">\"Next\"\n\n\n \n

    \n\n\n\n\n\n\n\n\n\n\nWGoddThreadWGevenThread\">\n\n\n\n\n\n\n\n\n
     \">^International(from label,Account_Inbox);\">^International(subject label,Account_Inbox);\">^International(date label,Account_Inbox);\">^International(status label,Account_Inbox);
    old.pngnew.png);\" />\" class=\"inbox_from\">\">^D(,);
    \n

    \n location.href=\'\'alert(\'^International(no friends hover,Account_Inbox);\');\" />\n\n\n\" class=\"prevNext\">\"Previous\" \n\"> \n \" class=\"prevNext\">\"Next\"\n\n\n \n

    \n

    \n ^International(message count,\'Account_Inbox\');\n

    \n
    \n
    \n',0,NULL,NULL),('\n

    \n\n\n\n
    ^International(Sub-keywords,Asset_WikiMaster);
    \n\n
    \n\n\n

    ^International(categories label,Asset_Matrix);

    \n

    \n\n\n\"> ()
    \n
    \n
    \n

    \n
    \n\n\n

    ^International(Related Pages,Asset_WikiMaster);

    \n\n
    \n\n\n
    \n · · \n
    \n
    \n\n\n\n','WikiMaster_byKeyword',1,1,'WikiKeyword00000000001',1274238756,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n\n\n
    ^International(Sub-keywords,Asset_WikiMaster);
    \n\n
    \n\n

    ^International(categories label,Asset_Matrix);

    \n

    \n\n\n\"> ()
    \n
    \n
    \n

    \n
    \n\n

    ^International(Related Pages,Asset_WikiMaster);

    \n\n
    \n\n
    \n · · \n
    \n
    \n',0,NULL,NULL),('
    \n \n

    \n
    \n\n \n

    \n
    \n\n \n
    \n
    \n \n\n \n \n \n \n \n\n

    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n
    \n \n \n \n \n \n \n \n \n \n
    \">
    \n \n
    \n\n \n

    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n wgRowOnewgRowTwo\">\n \n \n \n \n \n
    \">\n

    Search Results

    \n
    \n \">\n
    \n \n \n \n \n \">\n \n \n \n
    \n
    \n
    \n \n \n
    \n · · \n
    \n
    \n
    \n','Thingy/SearchThing',1,1,'ThingyTmpl000000000004',1277868920,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n

    \n
    \n\n

    \n
    \n\n
    \n
    \n\n\n\n\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n
    \n\n\n\n\n\n\n\n\n\n
    \">
    \n\n
    \n\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nwgRowOnewgRowTwo\">\n\n\n\n\n\n
    \">\n

    Search Results

    \n
    \n\">\n
    \n\n\n\n\n\">\n\n\n\n
    \n
    \n
    \n\n
    \n · · \n
    \n
    \n
    ',0,NULL,NULL),('\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n \n\n\n

    \n \n \">\n •\n \n \n \n \">\n \n \">\n \n •\n \n \">\n

    \n\n\n\n \n \n \n \n \n \n\n\n\n \n \n \n \n \n \n \n \n \n \n\n\n
    \">\">\">
    oddThreadevenThread\">oddThreadevenThread\">\"> ()oddThreadevenThread\">oddThreadevenThread\">oddThreadevenThread\">\">
    \n\n\n
    \n · · \n
    \n
    \n','Collaboration',1,1,'PBtmpl0000000000000066',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n\n\n\n

    \n
    \n\n\n\n

    \n\n\">\n•\n\n\n\n\">\n\n\">\n\n•\n\n\">\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \">\">\">
    oddThreadevenThread\">oddThreadevenThread\">\"> ()oddThreadevenThread\">oddThreadevenThread\">oddThreadevenThread\">\">
    \n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n \n\n\n

    \n \n \"> •\n \n \n \n \">\n \n \">\n \n \n •\n \n \n \n \">\n \n

    \n\n\n\n\n \n \n
    [\">]
    \n
    \n
    \n \n
    \n \n \n \n \n \n [\">]\n \n \n \n (\">)\n
    \n
    \n \" id=\"id\">
    \n \n

    \">[top]

    \n
    \n\n\n
    \n · · \n
    \n
    \n','Collaboration',1,1,'PBtmpl0000000000000080',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n\n\n\n

    \n
    \n\n\n\n

    \n\n\"> •\n\n\n\n\">\n\n\">\n\n\n•\n\n\n\n\">\n\n

    \n\n\n\n\n
    [\">]
    \n
    \n
    \n\n
    \n\n\n\n\n\n[\">]\n\n\n\n(\">)\n
    \n
    \n\" id=\"id\">
    \n\n

    \">[top]

    \n
    \n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n \n\n\n

    \n \n \">\n •\n \n \n \n \">\n \n \">\n \n •\n \n \">\n

    \n\n\n\n \n \n \n \n \n \n \n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n\n
    \">\">\">
    oddThreadevenThread\">oddThreadevenThread\">\"> ()oddThreadevenThread\" style=\"text-align: center;\">\n \n \">\" border=\"0\" alt=\"\" />\n \n  \n \n oddThreadevenThread\">oddThreadevenThread\">oddThreadevenThread\">\">
    \n\n\n
    \n
    \n · · \n
    \n
    \n','Collaboration',1,1,'PBtmpl0000000000000097',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n\n\n\n

    \n
    \n\n\n\n

    \n\n\">\n•\n\n\n\n\">\n\n\">\n\n•\n\n\">\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \">\">\">
    oddThreadevenThread\">oddThreadevenThread\">\"> ()oddThreadevenThread\" style=\"text-align: center;\">\n\n\">\" border=\"0\" alt=\"\" />\n\n \n\noddThreadevenThread\">oddThreadevenThread\">oddThreadevenThread\">\">
    \n\n
    \n
    \n · · \n
    \n
    ',0,NULL,NULL),('\n\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n\n \n\n\n

    \n \n \">\n •\n \n \n \n \">\n \n \">\n \n •\n \n \">\n

    \n\n

    \n\n\n

    \n \n
    \n
    \n \n \n \n \n \n \">\n \n -\n \n \n - \n \n \n - \n \n \n - \n \n \n \n \n \">\" border=\"0\" alt=\"\" align=\"right\" />\n \n \n
    \n \">\n
    \n
    \n

    \n\n\n\n

    \n \n
    \n\n','Collaboration',1,1,'PBtmpl0000000000000112',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n\n\n

    \n\n\">\n•\n\n\n\n\">\n\n\">\n\n•\n\n\">\n

    \n

    \n\n

    \n\n
    \n
    \n\n\n\n\n\n\">\n\n-\n\n\n- \n\n\n- \n\n\n- \n\n\n\n\n\">\" border=\"0\" alt=\"\" align=\"right\" />\n\n\n
    \n\">\n
    \n
    \n

    \n\n\n

    \n\n
    \n',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n\n \n\n\n

    \n \n \">\n •\n \n \n \n \">\n \n \">\n \n •\n \n \">\n

    \n\n
    \n\n\n
    \n
    \n
    ()
    \n \n \n
    \n
    \n
    \n\n
    \n\n\n
    \n · · \n
    \n
    \n','Collaboration',1,1,'PBtmpl0000000000000121',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n\n\n

    \n\n\">\n•\n\n\n\n\">\n\n\">\n\n•\n\n\">\n

    \n
    \n\n
    \n\n
    \n
    \n
    \n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('\" id=\"id\"> \n\n \n

    \n
    \n\n

    \n\n
    \n\n
    \n\" alt=\"\" />\n
    \n
    \n : \n \n \n \n \">\n \n
    \n :
    \n :
    \n : \n \n     [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n \n : [ \"> \"> ]
    \n \n \n :
    \n
    \n
    \n
    \n\n
    \n

    \n \n
    \n\n\n
    \n \n \n \n
    \n
    \n
    \n\n\n\n\n \n\n\n
    \n\n\n
    \n

    \n
    \n
    \n \n \">\n \n \">\n \n
    \n
    \n \n \n \n \n \n
    Current\">\n \">\n
    \n \n
    \n
    \n \n \n \n\n\n\n \n \n \n
    \n\" alt=\"\" />\n\n : \n \n \n \n \">\n \n
    \n : \n
    \n : \n \n     [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n :
    \n
    \n
    \n \n \n \n \n
    \n
    \n
    \n \n
    \n \n \n \n \n \n
    px;\">\n
    Current\">\n \">\n
    \n \n
    \n
    \n \n \n \n\n\n\n \n \n \n
    \n\" alt=\"\" />\n\n : \n \n \n \n \">\n \n
    \n : \n
    \n : \n \n     [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n :
    \n
    \n
    \n \n \n \n \n
    \n
    \n
    \n
    \n \n
    \n \n \n
    \n [ | | ]\n
    \n
    \n
    \n\n\n','Collaboration/Thread',1,1,'PBtmpl0000000000000067',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n

    \n
    \n\n
    \n\" alt=\"\" />\n
    \n
    \n:\n\n\n\n\">\n\n
    \n:
    \n:
    \n: \n\n    [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n\n: [ \"> \"> ]
    \n\n\n:
    \n
    \n
    \n
    \n
    \n

    \n\n
    \n\n
    \n\n\n\n
    \n
    \n
    \n\n\n\n
    \n\n
    \n

    \n
    \n
    \n\n\">\n\n\">\n\n
    \n
    \n\n\n\n\n
    Current\">\n\">\n
    \n\n
    \n
    \n\n\n\n\n\n\n\n\n\n
    \n\" alt=\"\" />\n\n:\n\n\n\n\">\n\n
    \n: \n
    \n: \n\n    [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n:
    \n
    \n
    \n\n\n\n\n
    \n
    \n
    \n\n
    \n\n\n\n\n
    px;\">\n
    Current\">\n\">\n
    \n\n
    \n
    \n\n\n\n\n\n\n\n\n\n
    \n\" alt=\"\" />\n\n:\n\n\n\n\">\n\n
    \n: \n
    \n: \n\n    [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n:
    \n
    \n
    \n\n\n\n\n
    \n
    \n
    \n
    \n\n
    \n\n
    \n[ | | ]\n
    \n
    \n
    \n',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n\n \n\n\n

    \n \n \">\n •\n \n \n \n \">\n \n \">\n \n •\n \n \">\n

    \n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\n
    \">\">\">\">\">
    oddThreadevenThread\">oddThreadevenThread\">\">oddThreadevenThread\">oddThreadevenThread\">\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\"> @ oddThreadevenThread\" style=\"font-size: 11px;\">\n \">\n by\n \n \n \n \">\n \n on @ \n
    \n\n\n
    \n · · \n
    \n
    \n','Collaboration',1,1,'PBtmpl0000000000000026',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n\n\n

    \n\n\">\n•\n\n\n\n\">\n\n\">\n\n•\n\n\">\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \">\">\">\">\">
    oddThreadevenThread\">oddThreadevenThread\">\">oddThreadevenThread\">oddThreadevenThread\">\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\"> @ oddThreadevenThread\" style=\"font-size: 11px;\">\n\">\nby\n\n\n\n\">\n\non @ \n
    \n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n\n \n\n\n

    \n \n \">\n •\n \n \n \n \">\n \n \">\n \n •\n \n \">\n

    \n\n\n
    \n\n\n
    \n
    \n \">
    \n ()\n \n \n \n
    \n \n
    \n
    \n\n
    \n\n\n
    \n · · \n
    \n
    \n','Collaboration',1,1,'PBtmpl0000000000000128',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n\n\n

    \n\n\">\n•\n\n\n\n\">\n\n\">\n\n•\n\n\">\n

    \n
    \n\n
    \n\n\n
    \n
    \n
    \n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n \n\n\n

    \n \n \"> •\n \n \n \n \">\n \n \">\n \n \n \n  [\">]\n \n

    \n\n\n \n \n \">\n \n \n \n \n \n \n \n \n \"> •\n \n \n \n (\">)\n
    \n

    \n \n

    \n\n\n\n

    \n · · \n
    \n\n','Collaboration',1,1,'PBtmpl0000000000000079',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n\n\n\n

    \n
    \n\n\n\n

    \n\n\"> •\n\n\n\n\">\n\n\">\n\n\n\n [\">]\n\n

    \n\n\n\n\">\n\n\n\n\n\n\n\n\n\"> •\n\n\n\n(\">)\n
    \n

    \n\n

    \n\n\n

    \n · · \n
    \n',0,NULL,NULL),('\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n \n\n\n

    \n \n \"> •\n \n \n \n \">\n \n \">\n \n \n •\n \n \n \n \">\n \n

    \n\n\n \n \n [\">] \n \n \n \n \n \n \n \n \n [\">]\n \n \n \n (\">)\n \n

    \n \" target=\"_blank\">\n \n - \n \n

    \n
    \n\n\n
    \n · · \n
    \n
    \n','Collaboration',1,1,'PBtmpl0000000000000083',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n\n\n\n

    \n
    \n\n\n\n

    \n\n\"> •\n\n\n\n\">\n\n\">\n\n\n•\n\n\n\n\">\n\n

    \n\n\n\n[\">] \n\n\n\n\n\n\n\n\n[\">]\n\n\n\n(\">)\n\n

    \n\" target=\"_blank\">\n\n- \n\n

    \n
    \n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n \n\n\n

    \n \n \">\n •\n \n \n \n \">\n \n \">\n \n \n \n •\n \n \n \n \">\n \n

    \n\n\n\n\n
    \n · · \n
    \n
    \n','Collaboration',1,1,'PBtmpl0000000000000082',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n\n\n\n

    \n
    \n\n\n\n

    \n\n\">\n•\n\n\n\n\">\n\n\">\n\n\n•\n\n\n\n\">\n\n

    \n\n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n \n\n\n

    \n \n \"> •\n \n \n \n \">\n \n \">\n \n \n •\n \n \n \n \">\n \n

    \n\n\n\n\n\n\n\n\n
    \n\n

    \n\n\n\n\n

    \n · · \n
    \n\n','Collaboration',1,1,'PBtmpl0000000000000133',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n\n\n\n

    \n
    \n\n\n\n

    \n\n\"> •\n\n\n\n\">\n\n\">\n\n\n•\n\n\n\n\">\n\n

    \n\n\n\n\n\n\n
    \n\n

    \n\n\n

    \n · · \n
    \n',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n

    \n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n\n\n\n

    \n \n
    \n\n\n','Collaboration/PostForm',1,1,'PBtmpl0000000000000029',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\n

    \n\n
    ',0,NULL,NULL),('\n\n \n

    \n
    \n\n \n
    \n

    \">

    \n
    \n
    \n \n \">\n \n \">\n \n
    \n
    \n\n\n
    px;\">\n
    Current\">\n \">\n
    \n \n
    \n
    \n\n
    \n\" alt=\"\" />\n
    \n
    \n
    \n : \n \n \n \n \">\n \n
    \n :
    \n
    \n
    \n :
    \n : \n \n \n     [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n
    \n \n : [ \"> \"> ]
    \n
    \n
    \n
    \n \n \n
    \n \n \"> •\n \n \n \"> • \n \">\n \n
    \n
    \n
    \n
    \n
    \n\n\n
    \n [ | | ]\n
    \n
    \n\n
    \n \n \"> •\n \n \n \"> • \n \n \n \"> •\n \n \n \n \"> •\n \n \"> •\n \n \n \"> •\n \n \"> •\n \n \n \n \n \">\n \n \">\n \n \n
    \n\n','Collaboration/Thread',1,1,'PBtmpl0000000000000032',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n

    \n
    \n
    \n

    \">

    \n
    \n
    \n\n\">\n\n\">\n\n
    \n
    \n\n
    px;\">\n
    Current\">\n\">\n
    \n\n
    \n
    \n\n
    \n\" alt=\"\" />\n
    \n
    \n
    \n:\n\n\n\n\">\n\n
    \n:
    \n
    \n
    \n:
    \n: \n\n\n    [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n
    \n\n: [ \"> \"> ]
    \n
    \n
    \n
    \n\n\n
    \n\n\"> •\n\n\n\"> •\n\">\n\n
    \n
    \n
    \n
    \n
    \n\n
    \n[ | | ]\n
    \n
    \n
    \n\n\"> •\n\n\n\"> •\n\n\n\"> •\n\n\n\n\"> •\n\n\"> •\n\n\n\"> •\n\n\"> •\n\n\n\n\n\">\n\n\">\n\n\n
    ',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n\n

    \n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    class=\"odd\">\">class=\"odd\">class=\"odd\">\">class=\"odd\"> @
    \n
    \n\n\n
    \n · · \n
    \n
    \n\n\n','Collaboration/Search',1,1,'PBtmpl0000000000000031',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    class=\"odd\">\">class=\"odd\">class=\"odd\">\">class=\"odd\"> @
    \n
    \n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('\" id=\"id\">\n\n

    \n

    \n

    \n\n\n

    \n\n

    \n
    \n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n\n\n\n
    \n

    \n \n
    \n
    \n\n','Collaboration/PostForm',1,1,'PBtmpl0000000000000068',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n

    \n

    \n

    \n\n

    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\n
    \n

    \n\n
    \n
    ',0,NULL,NULL),('\" id=\"id\">\n\n

    \n

    \n\n\n

    \n\n

    \n
    \n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n\n\n\n
    \n

    \n \n
    \n
    \n\n\n','Collaboration/PostForm',1,1,'PBtmpl0000000000000099',1277868921,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n

    \n

    \n\n

    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\n
    \n

    \n\n
    \n
    ',0,NULL,NULL),('\" id=\"id\">\n\n\n\n\n

    \n\n

    \n
    \n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n\n\n\n \n\n','Collaboration/PostForm',1,1,'PBtmpl0000000000000114',1277868922,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n\n

    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\n\n',0,NULL,NULL),('\" id=\"id\"> \n\n \n

    \n
    \n\n

    \n\n\n
    \n :     [ \"> \"> ]
    \n
    \n
    \n\n\n ^International(job description,Asset_Collaboration);
    \n

    \n
    \n\n\n ^International(job requirements,Asset_Collaboration);
    \n

    \n
    \n\n\n\n \n \n\n\n \n \n\n\n \n \n\n\n \n \n\n
    ^International(date posted,Asset_Collaboration); 
    ^International(location,Asset_Collaboration); 
    ^International(compensation,Asset_Collaboration); 
    ^International(views,Asset_Collaboration); 
    \n\n\n
    \n \n \n \n
    \n
    \n
    \n\n\n
    \n \n \">\n •\n \n \n \">\n •\n \">\n \n
    \n
    \n\n\n\n
    \n

    \n
    \n
    \n \n \">\n \n \">\n \n
    \n
    \n \n \n \n \n \n
    Current\">\n \">\n
    \n \n
    \n
    \n
    \n : \n \n \n \n \">\n \n
    \n :
    \n
    \n
    \n :
    \n : \n \n     [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n \n :
    \n
    \n
    \n
    \n \n \n
    \n \n \">\n •\n \n \n \">\n •\n \">\n \n
    \n
    \n
    \n
    \n
    \n \n
    \n \n \n \n \n \n
    px;\">\n
    Current\">\n \">\n
    \n \n
    \n
    \n
    \n : \n \n \n \n \">\n \n
    \n :
    \n
    \n
    \n :
    \n : \n \n     [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n \n :
    \n
    \n
    \n
    \n \n \n
    \n \n \">\n •\n \n \n \">\n •\n \">\n \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n \n \n
    \n [ | | ]\n
    \n
    \n
    \n\n
    \n \n \"> \n •\n \n \"> \n \n •\n \"> \n \n \n •\n \">\n •\n \n \n \n \">\n •\n \n \">\n •\n \n \n \">\n •\n \n \">\n •\n \n \n \n \n \"> \n \n \">\n \n \n
    ','Collaboration/Thread',1,1,'PBtmpl0000000000000098',1277868922,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n

    \n\n
    \n:     [ \"> \"> ]
    \n
    \n
    \n\n^International(job description,Asset_Collaboration);
    \n

    \n
    \n\n^International(job requirements,Asset_Collaboration);
    \n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(date posted,Asset_Collaboration); 
    ^International(location,Asset_Collaboration); 
    ^International(compensation,Asset_Collaboration); 
    ^International(views,Asset_Collaboration); 
    \n\n
    \n\n\n\n
    \n
    \n
    \n\n
    \n\n\">\n•\n\n\n\">\n•\n\">\n\n
    \n
    \n\n
    \n

    \n
    \n
    \n\n\">\n\n\">\n\n
    \n
    \n\n\n\n\n
    Current\">\n\">\n
    \n\n
    \n
    \n
    \n:\n\n\n\n\">\n\n
    \n:
    \n
    \n
    \n:
    \n: \n\n    [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n\n:
    \n
    \n
    \n
    \n\n\n
    \n\n\">\n•\n\n\n\">\n•\n\">\n\n
    \n
    \n
    \n
    \n
    \n\n
    \n\n\n\n\n
    px;\">\n
    Current\">\n\">\n
    \n\n
    \n
    \n
    \n:\n\n\n\n\">\n\n
    \n:
    \n
    \n
    \n:
    \n: \n\n    [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n\n:
    \n
    \n
    \n
    \n\n\n
    \n\n\">\n•\n\n\n\">\n•\n\">\n\n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n\n
    \n[ | | ]\n
    \n
    \n
    \n
    \n\n\">\n•\n\n\">\n\n•\n\">\n\n\n•\n\">\n•\n\n\n\n\">\n•\n\n\">\n•\n\n\n\">\n•\n\n\">\n•\n\n\n\n\n\">\n\n\">\n\n\n
    ',0,NULL,NULL),('\" id=\"id\">\n\n
    \n

    \n

    \n

    \n

    \n

    \n
    \n\n\n

    \n\n

    \n
    \n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n\n\n\n
    \n

    \n \n

    \n

    \n

    \n
    \n
    \n

    \n\n\n','Collaboration/PostForm',1,1,'PBtmpl0000000000000122',1277868922,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n

    \n

    \n

    \n

    \n

    \n

    \n
    \n\n

    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\n
    \n

    \n\n

    \n

    \n

    \n
    \n
    \n

    ',0,NULL,NULL),('\" id=\"id\">\n\n\n \n\n\n\n

    \n\n\n\n \n\n\n

    \n \n \"> •\n \n \n \n \"> \n \n \">\n \n \n •\n \n \n \n \">\n \n

    \n\n
    \n\n
    \n
    \n \n \">\n \n \n \n\n \n \n \n \n \n \"> •\n \n \n \n (\">)\n\n \n
    \n
    Q
    \n
    \n
    A
    \n\n
    \n\n\n
    \n · · \n
    \n
    \n','Collaboration',1,1,'PBtmpl0000000000000081',1277868922,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n\n\n\n

    \n
    \n\n\n\n

    \n\n\"> •\n\n\n\n\">\n\n\">\n\n\n•\n\n\n\n\">\n\n

    \n
    \n\n
    \n
    \n\n\">\n\n\n\n\n\n\n\n\n\"> •\n\n\n\n(\">)\n\n
    \n
    Q
    \n
    \n
    A
    \n\n
    \n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n \n\n\n

    \n \n \"> •\n \n \n \n \">\n \n \">\n \n \n •\n \n \n \n \">\n \n

    \n\n
      \n \n
    1. \n \n \n [\">]\n \n \n \n \n \n \n \n \n [\">]\n \n \n \n (\">)\n \n \" target=\"_blank\">\n \n - \n \n
    2. \n
      \n
    \n\n\n
    \n · · \n
    \n
    \n','Collaboration',1,1,'PBtmpl0000000000000101',1277868922,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n\n\n\n

    \n
    \n\n\n\n

    \n\n\"> •\n\n\n\n\">\n\n\">\n\n\n•\n\n\n\n\">\n\n

    \n
      \n\n
    1. \n\n\n[\">]\n\n\n\n\n\n\n\n\n[\">]\n\n\n\n(\">)\n\n\" target=\"_blank\">\n\n- \n\n
    2. \n
      \n
    \n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('\" id=\"id\"> \n\n \n

    \n
    \n\n

    \n\n\n
    \n :     [ \"> \"> ]
    \n
    \n
    \n\n\n
    \n ^International(Link Description,Asset_Collaboration);

    \n
    \n \n ^International(Link URL,Asset_Collaboration);

    \n \">

    \n
    \n
    \n\n\n\n\n
    \n \n \n \n
    \n
    \n
    \n\n\n
    \n \n \">\n •\n \n \n \">\n •\n \">\n \n
    \n
    \n\n\n\n
    \n

    \n
    \n
    \n \n \">\n \n \">\n \n
    \n
    \n \n \n \n \n \n
    Current\">\n \" id=\"id\">\n
    \n \n
    \n
    \n
    \n : \n \n \n \n \">\n \n
    \n :
    \n
    \n
    \n :
    \n : \n \n     [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n \n :
    \n
    \n
    \n
    \n \n \n
    \n \n \"> • \n \n \n \"> •\n \">\n \n
    \n
    \n
    \n
    \n
    \n \n
    \n \n \n \n \n \n
    px;\">\n
    Current\">\n \" id=\"id\">\n
    \n \n
    \n
    \n
    \n : \n \n \n \n \">\n \n
    \n :
    \n
    \n
    \n :
    \n : \n \n     [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n \n :
    \n
    \n
    \n
    \n \n \n
    \n \n \"> •\n \n \n \"> • \n \">\n \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n \n \n
    \n [ | | ]\n
    \n
    \n
    \n\n
    \n \n \"> \n •\n \n \">^International(List All Links,Asset_Collaboration);\n \n •\n \"> \n \n \n •\n \">\n \n \n •\n \n \">\n •\n \n \">\n •\n \n \n \">\n •\n \n \">\n •\n \n \n \n \n \">\n \n \">\n \n \n
    ','Collaboration/Thread',1,1,'PBtmpl0000000000000113',1277868922,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n

    \n\n
    \n:     [ \"> \"> ]
    \n
    \n
    \n\n
    \n^International(Link Description,Asset_Collaboration);

    \n
    \n^International(Link URL,Asset_Collaboration);

    \n\">

    \n
    \n
    \n\n
    \n\n\n\n
    \n
    \n
    \n\n
    \n\n\">\n•\n\n\n\">\n•\n\">\n\n
    \n
    \n\n
    \n

    \n
    \n
    \n\n\">\n\n\">\n\n
    \n
    \n\n\n\n\n
    Current\">\n\" id=\"id\">\n
    \n\n
    \n
    \n
    \n:\n\n\n\n\">\n\n
    \n:
    \n
    \n
    \n:
    \n: \n\n    [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n\n:
    \n
    \n
    \n
    \n\n\n
    \n\n\"> •\n\n\n\"> •\n\">\n\n
    \n
    \n
    \n
    \n
    \n\n
    \n\n\n\n\n
    px;\">\n
    Current\">\n\" id=\"id\">\n
    \n\n
    \n
    \n
    \n:\n\n\n\n\">\n\n
    \n:
    \n
    \n
    \n:
    \n: \n\n    [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n\n:
    \n
    \n
    \n
    \n\n\n
    \n\n\"> •\n\n\n\"> •\n\">\n\n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n\n
    \n[ | | ]\n
    \n
    \n
    \n
    \n\n\">\n•\n\n\">^International(List All Links,Asset_Collaboration);\n\n•\n\">\n\n\n•\n\">\n\n\n•\n\n\">\n•\n\n\">\n•\n\n\n\">\n•\n\n\">\n•\n\n\n\n\n\">\n\n\">\n\n\n
    ',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n\n \n\n\n

    \n \n \">\n •\n \n \n \n \">\n \n \">\n \n •\n \n \">\n

    \n\n\n\n \n \n\n \n\n \n \n \n \n \n\n\n\n\n \n \n \n \n \n \n\n \n\n \n \n \n \n \n\n\n
    \">\">\">\">\">\">
    oddThreadevenThread\">\">oddThreadevenThread\">oddThreadevenThread\">\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\"> @ oddThreadevenThread\" style=\"font-size: 11px;\">\n \">\n by\n \n \n \n \">\n \n on @ \n
    \n\n\n
    \n · · \n
    \n
    \n\n','Collaboration',1,1,'PBtmpl0000000000000208',1277868922,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n\n\n

    \n\n\">\n•\n\n\n\n\">\n\n\">\n\n•\n\n\">\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \">\">\">\">\">\">
    oddThreadevenThread\">\">oddThreadevenThread\">oddThreadevenThread\">\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\"> @ oddThreadevenThread\" style=\"font-size: 11px;\">\n\">\nby\n\n\n\n\">\n\non @ \n
    \n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('\" id=\"id\"> \n\n \n

    \n
    \n\n

    \n\n
    \n\n
    \n\" alt=\"\" />\n
    \n
    \n : \n \n \n \n \">\n \n
    \n :
    \n :
    \n :
    \n : \n \n     [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n \n :     [ \">     [ \"> ]
    \n \n \n :
    \n
    \n
    \n\n :
    \n:\n\n
    \n
    \n\n
    \n \n
    \n\n\n
    \n \n \n \n
    \n
    \n
    \n\n\n
    \n \n \">\n •\n \n \n \">\n •\n \">\n \n
    \n
    \n\n
    \n\n\n
    \n

    \n
    \n
    \n \n \">\n \n \">\n \n
    \n
    \n \n \n \n \n \n
    Current\">\n \">\n
    \n \n
    \n
    \n \n \n \n\n\n\n \n \n \n
    \n\" alt=\"\" />\n\n : \n \n \n \n \">\n \n
    \n : \n
    \n : \n \n     [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n
    \n
    \n \n \n
    \n \n \">\n •\n \n \n \">\n •\n \">\n \n
    \n
    \n
    \n
    \n
    \n \n
    \n \n \n \n \n \n
    px;\">\n
    Current\">\n \">\n
    \n \n
    \n
    \n \n \n \n\n\n\n \n \n \n
    \n\" alt=\"\" />\n\n : \n \n \n \n \">\n \n
    \n : \n
    \n : \n \n     [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n
    \n
    \n \n \n
    \n \n \">\n •\n \n \n \">\n •\n \">\n \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n \n \n
    \n [ | | ]\n
    \n
    \n
    \n\n
    \n \n \"> \n •\n \n \">\n \n \n •\n \"> \n \n \n •\n \">\n •\n \n \n \n \">\n •\n \n \">\n •\n \n \n \">\n •\n \n \">\n •\n \n \n \n \n \">\n \n \">\n \n \n
    \n','Collaboration/Thread',1,1,'PBtmpl0000000000000209',1277868922,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n

    \n
    \n\n
    \n\" alt=\"\" />\n
    \n
    \n:\n\n\n\n\">\n\n
    \n:
    \n:
    \n:
    \n: \n\n    [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n\n:     [ \">     [ \"> ]
    \n\n\n:
    \n
    \n
    \n\n:
    \n:\n\n
    \n
    \n
    \n\n
    \n\n
    \n\n\n\n
    \n
    \n
    \n\n
    \n\n\">\n•\n\n\n\">\n•\n\">\n\n
    \n
    \n
    \n\n
    \n

    \n
    \n
    \n\n\">\n\n\">\n\n
    \n
    \n\n\n\n\n
    Current\">\n\">\n
    \n\n
    \n
    \n\n\n\n\n\n\n\n\n\n
    \n\" alt=\"\" />\n\n:\n\n\n\n\">\n\n
    \n: \n
    \n: \n\n    [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n
    \n
    \n\n\n
    \n\n\">\n•\n\n\n\">\n•\n\">\n\n
    \n
    \n
    \n
    \n
    \n\n
    \n\n\n\n\n
    px;\">\n
    Current\">\n\">\n
    \n\n
    \n
    \n\n\n\n\n\n\n\n\n\n
    \n\" alt=\"\" />\n\n:\n\n\n\n\">\n\n
    \n: \n
    \n: \n\n    [
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    |
    \" method=\"post\">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />
    ]\n
    \n
    \n
    \n
    \n\n\n
    \n\n\">\n•\n\n\n\">\n•\n\">\n\n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n\n
    \n[ | | ]\n
    \n
    \n
    \n
    \n\n\">\n•\n\n\">\n\n•\n\">\n\n\n•\n\">\n•\n\n\n\n\">\n•\n\n\">\n•\n\n\n\">\n•\n\n\">\n•\n\n\n\n\n\">\n\n\">\n\n\n
    ',0,NULL,NULL),('\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n

    \n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n\n
    \n\n\n\n

    \n \n
    \n','Collaboration/PostForm',1,1,'PBtmpl0000000000000210',1277868922,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n
    \n\n\n

    \n\n
    ',0,NULL,NULL),('

    ^International(post received,Asset_Post);

    \">^International(493,WebGUI);

    ','Collaboration/PostReceived',1,1,'default_post_received1',1277868922,'WebGUI::Asset::Template::HTMLTemplate',1,'

    ^International(post received,Asset_Post);

    \">^International(493,WebGUI);

    ',0,NULL,NULL),('

    ^International(Unsubscribe from %s,Asset_Collaboration,\'\">\');

    \n\n

    \n
    \n\n^International(480,WebGUI);
    \n^International(unsubscribe instructions,Asset_Collaboration);
    \n','Collaboration/Unsubscribe',1,1,'default_CS_unsubscribe',1277868922,'WebGUI::Asset::Template::HTMLTemplate',1,'

    ^International(Unsubscribe from %s,Asset_Collaboration,\'\">\');

    \n\n

    \n
    \n\n^International(480,WebGUI);
    \n^International(unsubscribe instructions,Asset_Collaboration);
    \n',0,NULL,NULL),('

    ^International(\"choose username title\",\"Auth_Twitter\");

    \r\n

    \r\n
    \r\n\r\n\r\n\r\n\r\n
    \r\n\r\n','Auth/Twitter/ChooseUsername',1,1,'mfHGkp6t9gdclmzN33OEnw',1277868927,'WebGUI::Asset::Template::HTMLTemplate',1,'

    ^International(\"choose username title\",\"Auth_Twitter\");

    \n

    \n
    \n\n\n\n\n
    ',0,NULL,NULL),('\n

    \n
    \n\n\n

    \n
    \n\n\n \n\n\n\n\n\n \n\n\n \n\n\n \n\n\n \n
    \n \">^International(label day,Asset_Calendar);\n \">^International(label week,Asset_Calendar);\n \">^International(label month,Asset_Calendar);\n ?type=list\">^International(486,WebGUI);\n \">^International(label search,Asset_Calendar);\n\n \n
    \n \n
    \n
    \n \n
    \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n
    \n\n
    \" class=\"moreDisplay\">\n
    \n
      \n \n
    • \">
    • \n
      \n
    \n
    \n
    \n
    ','Calendar/Month',1,1,'CalendarMonth000000001',1279073449,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\">^International(label day,Asset_Calendar);\n\">^International(label week,Asset_Calendar);\n\">^International(label month,Asset_Calendar);\n?type=list\">^International(486,WebGUI);\n\">^International(label search,Asset_Calendar);\n\n
    \n\n
    \n
    \n \n
    \n
    \n\n\n\n\n\n\n\n\n\n\n
    \n
    \n\n
    \" class=\"moreDisplay\">\n
    \n\n
    \n
    \n
    ',0,NULL,NULL),('\n\n

    \n
    \n
    \n \n

    \n
    \n \n

    \n
    \n\n \n
      \n \n
    • \n
      \n
    \n
    \n\n\n \n \n \n \n
    \n \n \n
    \n ^International(comments,Asset_EMSSubmission);\n \n
    \n\n
    \n\n','EMS/Submission',1,1,'8tqyQx-LwYUHIWOlKPjJrA',1279073449,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n

    \n
    \n
    \n\n

    \n
    \n\n

    \n
    \n\n
      \n\n
    • \n
      \n
    \n
    \n\n\n\n\n\n
    \n\n\n
    \n^International(comments,Asset_EMSSubmission);\n\n
    \n
    ',0,NULL,NULL),('\n

    \n
    \n\n

    \n
    \n \n

    \n
    \n\n\n\n\n\n
    \n
    \n
      \n \n
    • class=\"selected\">\">
    • \n
      \n
    \n
    \n \n
    \">
    \n
    \n
    \n
    \n
    \n\n\">^International(schedule back link,Asset_EventManagementSystem);\n\n\n\n\n\n\n\n','EMS/SubmissionMain',1,1,'DoVNijm6lMDE0cYrtvEbDQ',1279073449,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n

    \n
    \n\n\n
    \n
    \n
      \n\n
    • class=\"selected\">\">
    • \n
      \n
    \n
    \n\n
    \">
    \n
    \n
    \n
    \n
    \n\">^International(schedule back link,Asset_EventManagementSystem);\n\n\n\n\n',0,NULL,NULL),(' \n\n \n \n \n \n \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n
    \n ^International(member since,Account_Inbox); ^D(%z,);\n
    ^International(reply message label,Account_Inbox);^International(compose message label,Account_Inbox);
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ^International(recipients label,Account_Inbox);^International(to label,Account_Inbox);:
    class=\"inbox_messageTo\"> [];
    ^International(subject label,Account_Inbox);:
    32\" class=\"send\">\n   \n \'\" />\n
    \n
    \n
    \n\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n \n
    \n
    \n \n \n \n \n \n \n \n \n \n
    _name\"> []
    \n
    \n
    \n \n \n
    \n
    \n
    \n','Account/Inbox/SendMessage',1,1,'6uQEULvXFgCYlRWnYzZsuA',1279073450,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n\n\n\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n
    \n^International(member since,Account_Inbox); ^D(%z,);\n
    ^International(reply message label,Account_Inbox);^International(compose message label,Account_Inbox);
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(recipients label,Account_Inbox);^International(to label,Account_Inbox);:
    class=\"inbox_messageTo\"> [];
    ^International(subject label,Account_Inbox);:
    32\" class=\"send\">\n  \n\'\" />\n
    \n
    \n
    \n\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\n
    \n
    \n\n\n\n\n\n\n\n\n\n
    _name\"> []
    \n
    \n
    \n\n\n
    \n
    \n
    \n',0,NULL,NULL),('
    \n\n
    \n
    \n
    \n
    \n
    \n\n
    \n\n\n','EMS/SubmissionQueue',1,1,'ktSvKU8riGimhcsxXwqvPQ',1279073450,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    \n
    \n
    \n
    \n
    \n
    \n',0,NULL,NULL),('\n
    \n
    \n
    \n \n \n \n \n \n \n \n \n \n \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    ^International(\'comparison label\',\'Asset_Matrix\');
    \n
    \n \n \n \n \n \n \n \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n','Matrix/Compare',1,1,'matrixtmpl000000000002',1281501162,'WebGUI::Asset::Template::HTMLTemplate',1,'\n
    \n
    \n
    \n\n\n\n\n\n\n\n\n\n\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    ^International(\'comparison label\',\'Asset_Matrix\');
    \n
    \n\n\n\n\n\n\n
    \n
    \n
    \n
    \n
    \n
    \n
    ',0,NULL,'[]'),('\n

    \n
    \n\n

    \n\n\n
    \n \n
    \n
    \n\n\n\n
    \n
    \n \n \n
    \n
    \n \n \n \n \n \n \n \n \n
    \n
    \" enctype=\"multipart/form-data\" method=\"post\" name=\"doCompare\">

    \n
    \n
    \n
    \n
    \n\n
    \n
    \n \n
    \n
    \n
    \n\n
    \n
    \n
    \n \n
    \n
    \n \n ^International(\'add new listing text\',\'Asset_Matrix\');\n \n ^International(\'create account part1 text\',\'Asset_Matrix\'); ^International(\'create account part2 text\',\'Asset_Matrix\');\n \n
    \n \n \n
    \n \n
    \n
    ^International(\'listing statistics label\',\'Asset_Matrix\');
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ^International(\'most clicks label\',\'Asset_Matrix\');\"> ()
    ^International(\'most views label\',\'Asset_Matrix\');\"> ()
    ^International(\'most compares label\',\'Asset_Matrix\');\"> ()
    \n \n
    ^International(\'most recently updated label\',\'Asset_Matrix\');
    \n \n \n \n \n \n \n \n
    \">
    \n \n
    ^International(\'best rated label\',\'Asset_Matrix\');
    \n \n \n \n \n \n \n \n
    \"> (/10)
    \n \n
    ^International(\'worst rated label\',\'Asset_Matrix\');
    \n \n \n \n \n \n \n \n
    \"> (/10)
    \n \n
    ^International(\'site statistics label\',\'Asset_Matrix\');
    \n \n \n \n \n \n
    ^International(\'listing count label\',\'Asset_Matrix\');
    \n \n\n \n
    ^International(\'pending listings label\',\'Asset_Matrix\');:
    \n \n \n \n \n \n \n \n \n
    \">
    \n
    \n
    \n\n
    \n\n
    \n
    \n
    \n\n','Matrix',1,1,'matrixtmpl000000000001',1281501162,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n

    \n\n
    \n\n
    \n
    \n\n
    \n
    \n\n\n
    \n
    \n\n\n\n\n\n\n\n\n
    \n
    \" enctype=\"multipart/form-data\" method=\"post\" name=\"doCompare\">

    \n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n\n^International(\'add new listing text\',\'Asset_Matrix\');\n\n^International(\'create account part1 text\',\'Asset_Matrix\'); ^International(\'create account part2 text\',\'Asset_Matrix\');\n\n
    \n\n
    \n
    \n
    ^International(\'listing statistics label\',\'Asset_Matrix\');
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(\'most clicks label\',\'Asset_Matrix\');\"> ()
    ^International(\'most views label\',\'Asset_Matrix\');\"> ()
    ^International(\'most compares label\',\'Asset_Matrix\');\"> ()
    \n
    ^International(\'most recently updated label\',\'Asset_Matrix\');
    \n\n\n\n\n\n\n\n
    \">
    \n
    ^International(\'best rated label\',\'Asset_Matrix\');
    \n\n\n\n\n\n\n\n
    \"> (/10)
    \n
    ^International(\'worst rated label\',\'Asset_Matrix\');
    \n\n\n\n\n\n\n\n
    \"> (/10)
    \n
    ^International(\'site statistics label\',\'Asset_Matrix\');
    \n\n\n\n\n\n
    ^International(\'listing count label\',\'Asset_Matrix\');
    \n\n
    ^International(\'pending listings label\',\'Asset_Matrix\');:
    \n\n\n\n\n\n\n\n\n
    \">
    \n
    \n
    \n
    \n
    \n
    \n
    ',0,NULL,'[]'),('\n\n\n
    \n \n \n

    \n
    \n \n

    \n \n \n [\n ^AssetProxy(new-matrix/matrix-nav);\n blockblockblock\">\n \n • \">^International(\'edit label\',\'Asset_MatrixListing\');\n \n \n • \">^International(\'approve or deny label\',\'Asset_Matrix\');\n \n \n ]\n \n

    \n \n
    \n \n \n \n
    \n
    \n \n
    \n
    \n ^International(\'description label\',\'Asset_MatrixListing\');\n \n
    \n \n \n \n
    \n
      \n
    • ^International(\'web site label\',\'Asset_MatrixListing\');\')\" href=\"#\"> 
    • \n
    • ^International(\'version label\',\'Asset_MatrixListing\'); 
    • \n
    • ^International(\'manufacturer label\',\'Asset_MatrixListing\');\')\" href=\"#\"> 
    • \n
    • ^International(\'last updated label\',\'Asset_MatrixListing\');
    • \n
    • ^International(\'clicks label\',\'Asset_Matrix\');
    • \n
    • ^International(\'views label\',\'Asset_Matrix\');
    • \n
    • ^International(\'compares label\',\'Asset_Matrix\');
    • \n
    \n
    \n \n
    \n
    \n
    \n
    \n ^International(Comments,WebGUI);\n \n ^International(Send Creator a Message,Asset_MatrixListing);\n
    \n \n
    ^International(\'message sent message\',\'Asset_MatrixListing\');
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    ','Matrix/Detail',1,1,'matrixtmpl000000000003',1281501163,'WebGUI::Asset::Template::HTMLTemplate',1,'\n
    \n\n

    \n
    \n

    \n\n\n[\n^AssetProxy(new-matrix/matrix-nav);\nblockblockblock\">\n\n• \">^International(\'edit label\',\'Asset_MatrixListing\');\n\n\n• \">^International(\'approve or deny label\',\'Asset_Matrix\');\n\n\n]\n\n

    \n
    \n\n\n\n
    \n
    \n
    \n
    \n^International(\'description label\',\'Asset_MatrixListing\');\n\n
    \n\n\n\n
    \n
      \n
    • ^International(\'web site label\',\'Asset_MatrixListing\');\')\" href=\"#\"> 
    • \n
    • ^International(\'version label\',\'Asset_MatrixListing\'); 
    • \n
    • ^International(\'manufacturer label\',\'Asset_MatrixListing\');\')\" href=\"#\"> 
    • \n
    • ^International(\'last updated label\',\'Asset_MatrixListing\');
    • \n
    • ^International(\'clicks label\',\'Asset_Matrix\');
    • \n
    • ^International(\'views label\',\'Asset_Matrix\');
    • \n
    • ^International(\'compares label\',\'Asset_Matrix\');
    • \n
    \n
    \n\n
    \n
    \n
    \n
    \n^International(Comments,WebGUI);\n\n^International(Send Creator a Message,Asset_MatrixListing);\n
    \n\n
    ^International(\'message sent message\',\'Asset_MatrixListing\');
    \n
    \n\n
    \n
    \n
    \n
    \n
    \n
    ',0,NULL,'[]'),('

    ^International(\'edit matrix listing title\',\'Asset_MatrixListing\');

    \r\n\r\n','Matrix/EditListing',1,1,'matrixtmpl000000000004',1281501163,'WebGUI::Asset::Template::HTMLTemplate',1,'

    ^International(\'edit matrix listing title\',\'Asset_MatrixListing\');

    \n',0,NULL,'[]'),('\n\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n\n
    \n
    ^International(search label,Asset_Matrix);
    \n
    \n \n
    \n \n \n \n \n \n \n \n \n \n \n
    \n
    \n
    \n
    \n
    \n

    \">^International(Return to Matrix,Asset_Matrix);

    \n
    \n\n\n\n','Matrix/Search',1,1,'matrixtmpl000000000005',1281501163,'WebGUI::Asset::Template::HTMLTemplate',1,'\n
    \n
    \n\n
    \n
    \n\n
    \n
    \n
    \n
    \n
    ^International(search label,Asset_Matrix);
    \n
    \n\n
    \n\n\n\n\n\n\n\n\n\n\n
    \n
    \n
    \n
    \n
    \n

    \">^International(Return to Matrix,Asset_Matrix);

    \n
    ',0,NULL,'[]'),('\n\n\n\n \">^International(Return to Matrix,Asset_Matrix);\n\n\n','Navigation',1,1,'alraubvBu-YJJ614jAHD5w',1281501163,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\">^International(Return to Matrix,Asset_Matrix);\n\n',0,NULL,'[]'),('\r\n\r\n\r\n ?func=getScreenshots\r\n \r\n 400\r\n 300\r\n 0xDDDDEE\r\n 20\r\n 800\r\n 600 \r\n Verdana\r\n 12\r\n 0xFFFFFF\r\n\r\n 0x888888\r\n 0x000000\r\n true\r\n over \r\n 0\r\n\r\n 0xFFFFFF\r\n 0x888888\r\n 0x000000\r\n true\r\n\r\n 20\r\n 200\r\n\r\n 60\r\n 45\r\n 0x888888\r\n false\r\n true\r\n 100\r\n 8\r\n\r\n off \r\n false\r\n true\r\n false\r\n true\r\n \r\n \r\n\r\n rounded \r\n','Matrix/ScreenshotsConfig',1,1,'matrixtmpl000000000007',1281501163,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n?func=getScreenshots\n400\n300\n0xDDDDEE\n20\n800\n600\nVerdana\n12\n0xFFFFFF\n0x888888\n0x000000\ntrue\nover\n0\n0xFFFFFF\n0x888888\n0x000000\ntrue\n20\n200\n60\n45\n0x888888\nfalse\ntrue\n100\n8\noff\nfalse\ntrue\nfalse\ntrue\n\n\nrounded\n',0,NULL,'[]'),('\n\n\n Screenshots\n \n\n\n\n\n
    \n\n \n \n &width=800&height=600\" />\n \n \n &width=800&height=600\" />\n \n \n \"Get\n \n \n \n \n \n
    \n \n \n\n\n','Matrix/Screenshots',1,1,'matrixtmpl000000000006',1281501163,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\nScreenshots\n\n\n\n
    \n\n\n&width=800&height=600\" />\n\n\n&width=800&height=600\" />\n\n\n\"Get\n\n\n\n\n\n
    \n\n\n\n',0,NULL,'[]'),('
    \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','Account/Layout',1,1,'N716tpSna0iIQTKxS4gTWA',1281501163,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n
    \n
    \n
    \n
    ',0,NULL,'[]'),(' ^International(new post,AssetAspect_Subscribable);\n\n\n\n\n','AssetAspect/Subscribable',1,1,'limMkk80fMB3fqNZVf162w',1281501163,'WebGUI::Asset::Template::HTMLTemplate',1,' ^International(new post,AssetAspect_Subscribable);\n\n',0,NULL,'[]'),('\" id=\"id\">\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
    ^International(\"99\",\"Asset\");^International(\"creation_date\",\"Asset_AssetReport\");^International(\"created_by\",\"Asset_AssetReport\");
    \">^D(\'%C %D, %y %h:%s %p\',);^User(\'username\',);
    \r\n\r\n\r\n

    \r\n \r\n
    \r\n
    \r\n','AssetReport',1,1,'sJtcUCfn0CVbKdb4QM61Yw',1283921584,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(\"99\",\"Asset\");^International(\"creation_date\",\"Asset_AssetReport\");^International(\"created_by\",\"Asset_AssetReport\");
    \">^D(\'%C %D, %y %h:%s %p\',);^User(\'username\',);
    \n\n

    \n \n
    \n
    ',0,NULL,'[]'),('
    \" class=\"storyTopic\">\n\" id=\"id\">\n

    \n\n

    \n
    \n

    \">^International(rss,WebGUI); •\n\">Atom

    \n\n\n
    \n

    \">

    \n

    \n
    \n
    \n\n ','StoryTopic',1,1,'A16v-YjWAShXWvSACsraeg',1285124154,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"storyTopic\">\n\" id=\"id\">\n

    \n\n

    \n
    \n

    \">^International(rss,WebGUI); •\n\">Atom

    \n\n\n
    \n

    \">

    \n

    \n
    \n
    \n\n',0,NULL,NULL),('
    \r\n \r\n \r\n
    \r\n
    \r\n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\r\n \r\n \r\n \r\n
    \r\n
    \r\n ^International(\'template search title\',\'Asset_Gallery\');\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
    ^International(\'template search field title\',\'Asset_Gallery\');
    ^International(\'template search field description\',\'Asset_Gallery\');
    ^International(\'template search field keywords\',\'Asset_Gallery\');
    ^International(\'template search field location\',\'Asset_Gallery\');
    ^International(\'template search field className\',\'Asset_Gallery\');\r\n \r\n
    ^International(\'template search field creationDate\',\'Asset_Gallery\');^International(\'template search to\',\'Asset_Gallery\');
     \r\n \r\n
    \r\n
    \r\n \r\n\r\n

    \r\n\r\n \r\n
    \r\n \r\n
    \r\n ^International(\'template search results for\',\'Asset_Gallery\'); \"\".\r\n
    \r\n\r\n

    Albums

    \r\n \r\n \r\n
    \r\n \" class=\"albumTitle\">\r\n \r\n \r\n \r\n
    \r\n
    \r\n \r\n \r\n \r\n ?func=edit\">Add a Description\r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n \r\n

    Pictures

    \r\n \r\n \r\n
    \r\n \" class=\"title\">\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
    ^International(\"template file creationDate\",\"Asset_GalleryAlbum\"); ^D(\"%M/%d/%Y\",);
    \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
    ','Gallery/Search',1,1,'jME5BEDYVDlBZ8jIQA9-jQ',1285124155,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n
    \n
    \n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\n\n\n\n
    \n
    \n^International(\'template search title\',\'Asset_Gallery\');\n
    \n\n\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(\'template search field title\',\'Asset_Gallery\');
    ^International(\'template search field description\',\'Asset_Gallery\');
    ^International(\'template search field keywords\',\'Asset_Gallery\');
    ^International(\'template search field location\',\'Asset_Gallery\');
    ^International(\'template search field className\',\'Asset_Gallery\');\n\n
    ^International(\'template search field creationDate\',\'Asset_Gallery\');^International(\'template search to\',\'Asset_Gallery\');
     \n\n
    \n
    \n\n

    \n\n
    \n
    \n ^International(\'template search results for\',\'Asset_Gallery\'); \"\".\n
    \n

    Albums

    \n\n\n\n\n\n
    \n

    Pictures

    \n\n\n
    \n\" class=\"title\">\n\n\n\n\n
    \n
    \n\n
    \n
    \n
    \n
    \n\n
    ^International(\"template file creationDate\",\"Asset_GalleryAlbum\"); ^D(\"%M/%d/%Y\",);
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n
    \n
    ',0,NULL,NULL),('\r\n \r\n\r\n\r\n
    \r\n \r\n \r\n
    \r\n
    \r\n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\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 \" class=\"albumTitle\">\r\n \r\n \r\n \r\n
    \r\n
    \r\n \r\n \r\n \r\n ?func=edit\">Add a Description\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
    ','Gallery/ListAlbums',1,1,'azCqD0IjdQSlM3ar29k5Sg',1285124155,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n',0,NULL,NULL),('\n \n\n\n','GalleryAlbum/View',1,1,'05FpjceLYhq4csF1Kww1KQ',1285124155,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n',0,NULL,NULL),('\r\n \r\n\r\n\r\n
    \r\n \r\n\r\n
    \r\n
    \r\n \" class=\"current\">^International(template url_thumbnails,Asset_GalleryAlbum);  ·  \r\n \">^International(template url_slideshow,Asset_GalleryAlbum);  ·  \r\n \">^International(template url,Asset_GalleryAlbum);    \r\n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\r\n \r\n \r\n \r\n
    \r\n
    \r\n ·\r\n ^International(template by,Asset_Gallery);: \">\r\n
    \r\n\r\n \r\n\r\n
    \r\n \" class=\"title\">\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
    ^International(\'template creationDate\',\'Asset_Photo\');: ^D(\"%z %Z\",);
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n\r\n
    \r\n \r\n \" class=\"thumb\">\r\n \" />\r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    ','GalleryAlbum/ViewThumbnails',1,1,'q5O62aH4pjUXsrQR3Pq4lw',1285124155,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n',0,NULL,NULL),('\r\n \r\n\r\n\r\n
    \r\n \r\n \r\n
    \r\n
    \r\n \">^International(template url_thumbnails,Asset_GalleryAlbum);  ·  \r\n \" class=\"current\">^International(template url_slideshow,Asset_GalleryAlbum);  ·  \r\n \">^International(template url,Asset_GalleryAlbum);    \r\n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\r\n \r\n \r\n \r\n
    \r\n
    \r\n ·\r\n ^International(template by,Asset_Gallery);: \"> \r\n
    \r\n\r\n \r\n\r\n
    \r\n
    \r\n \"Previous\r\n \r\n \"Next\r\n
    \r\n
    \r\n \r\n
    \r\n \r\n
    \r\n \">\" style=\"border: none\" /> \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    ','GalleryAlbum/ViewSlideshow',1,1,'KAMdiUdJykjN02CPHpyZOw',1285124155,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n',0,NULL,NULL),('
    \n \n \n
    \n
    \n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\n \n \n \n
    \n
    \n \n
    \n\n \n\n

    ^International(template listFilesForUser albums title,Asset_Gallery);

    \n \n \n \n \n \n
    \n \n

    ^International(template listFilesForUser pictures title,Asset_Gallery);

    \n \n \n
    \n \" class=\"title\">\n \n \n \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    ^International(\'template file creationDate\',\'Asset_GalleryAlbum\'); ^D(\"%z\", );
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n \n \n
    ','Gallery/ListFilesForUser',1,1,'OkphOEdaSGTXnFGhK4GT5A',1285124155,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n
    \n
    \n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\n\n\n\n
    \n
    \n\n
    \n\n

    ^International(template listFilesForUser albums title,Asset_Gallery);

    \n\n\n\n
    \n

    ^International(template listFilesForUser pictures title,Asset_Gallery);

    \n\n
    \n\" class=\"title\">\n\n\n\n\n
    \n
    \n\n
    \n
    \n
    \n
    \n\n
    ^International(\'template file creationDate\',\'Asset_GalleryAlbum\'); ^D(\"%z\", );
    \n
    \n
    \n
    \n
    \n
    \n
    \n\n
    ',0,NULL,NULL),('\n \n\n\n
    \n \n\n
    \n
    \n \">^International(\'template url_album\',\'Asset_Photo\');    \n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\n \n \n \n
    \n
    \n ·\n ^International(\'template by\',\'Asset_Gallery\');: \">\n
    \n\n
    \n
    \n

    \n \" class=\"thumbnail\">\" alt=\"Image\" />\n \n
    \n \n
    \n
    \n \" class=\"fullSize\">^International(\'template fileUrl\',\'Asset_Photo\');\n
    \n
    \n\n
    \n \n \">\n \"first\n \n \n \"first\n \n \n \">\n \"first\n \n \n \"first\n \n \n \">\n \"first\n \n \n \"first\n \n \n \">\n \"first\n \n \n \"first\n \n
    \n\n
    \n\n
    \n
    \n ^International(template view details,Asset_Photo);\n
    \n \n ^International(\'template creationDate\',\'Asset_Photo\');:\n \n \n ^D(\"%z %Z\",);\n \n
    \n
    \n \n ^International(\'template views\',\'Asset_Photo\');:\n \n \n \n \n
    \n
    \n \n ^International(\'template by\',\'Asset_Gallery\');:\n \n \n \">\n (\">^International(\'template filesForUser\', \'Asset_Photo\');)\n \n
    \n
    \n \n ^International(\'template friendsOnly label\',\'Asset_Photo\');:\n \n \n ^International(\'template friendsOnly yes\',\'Asset_Photo\');^International(\'template friendsOnly no\',\'Asset_Photo\');\n \n
    \n
    \n \n ^International(\'template location\',\'Asset_Photo\');:\n \n \n \n \n
    \n
    \n \n ^International(template view available resolutions,Asset_Photo);\n \n \n \n \">\n \n \n
    \n
    \n \n
    \n ^International(\'template keywords\',\'Asset_Photo\');\n \n \">, \n \n
    \n
    \n
    \n ^International(more details,Asset_Photo);\n
    \n \n
    rowOnerowTwo\">\n \n :\n \n \n \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n ^International(\'template comments title\',\'Asset_Photo\'); [^International(post,Asset_Collaboration);]\n
    \n \n
    \n \n
    \n \n
    \n
    \n \n
    \n
    \n \n \n \n
    \n
    ','GalleryFile/View',1,1,'TEId5V-jEvUULsZA0wuRuA',1285124155,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n
    \n\n
    \n
    \n\">^International(\'template url_album\',\'Asset_Photo\');    \n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\n\n\n\n
    \n
    \n ·\n^International(\'template by\',\'Asset_Gallery\');: \">\n
    \n\n
    \n
    \n^International(template view details,Asset_Photo);\n
    \n\n^International(\'template creationDate\',\'Asset_Photo\');:\n\n\n^D(\"%z %Z\",);\n\n
    \n
    \n\n^International(\'template views\',\'Asset_Photo\');:\n\n\n\n\n
    \n
    \n\n^International(\'template by\',\'Asset_Gallery\');:\n\n\n\">\n(\">^International(\'template filesForUser\', \'Asset_Photo\');)\n\n
    \n
    \n\n^International(\'template friendsOnly label\',\'Asset_Photo\');:\n\n\n^International(\'template friendsOnly yes\',\'Asset_Photo\');^International(\'template friendsOnly no\',\'Asset_Photo\');\n\n
    \n
    \n\n^International(\'template location\',\'Asset_Photo\');:\n\n\n\n\n
    \n
    \n\n^International(template view available resolutions,Asset_Photo);\n\n\n\n\">\n\n\n
    \n
    \n\n
    \n^International(\'template keywords\',\'Asset_Photo\');\n\n\">, \n\n
    \n
    \n
    \n^International(more details,Asset_Photo);\n
    \n\n
    rowOnerowTwo\">\n\n:\n\n\n\n\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n^International(\'template comments title\',\'Asset_Photo\'); [^International(post,Asset_Collaboration);]\n
    \n\n
    \n\n
    \n\n
    \n
    \n\n
    \n
    \n\n\n\n
    \n
    ',0,NULL,NULL),('\n\n\n
    \n \n\n
    \n
    \n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\n \n \n \n
    \n
    \n \n ^International(\'template add\',\'Asset_GalleryAlbum\');\n \n ^International(\'template edit\',\'Asset_GalleryAlbum\');\n \n
    \n\n

    \n\n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n
    ^International(\'editForm title label\',\'Asset_GalleryAlbum\');
    ^International(\'editForm description label\',\'Asset_GalleryAlbum\');
    ^International(\'editForm othersCanAdd label\',\'Asset_GalleryAlbum\');
    \n
    \n \n
      \n \n
    1. \" class=\"galleryOrg\">\n
      \n \" href=\"?func=edit;proceed=editParent\">\" alt=\"\" />\n
      \n

      \n
      \n
      \n \n
      \n
      \n
    2. \n
      \n
    \n
    \n
    \n\n
    \n \n
    \n \n
    ','GalleryAlbum/Edit',1,1,'6X-7Twabn5KKO_AbgK3PEw',1285124155,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n
    \n\n
    \n
    \n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\n\n\n\n
    \n
    \n\n^International(\'template add\',\'Asset_GalleryAlbum\');\n\n^International(\'template edit\',\'Asset_GalleryAlbum\');\n\n
    \n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(\'editForm title label\',\'Asset_GalleryAlbum\');
    ^International(\'editForm description label\',\'Asset_GalleryAlbum\');
    ^International(\'editForm othersCanAdd label\',\'Asset_GalleryAlbum\');
    \n
    \n\n
      \n\n
    1. \" class=\"galleryOrg\">\n
      \n\" href=\"?func=edit;proceed=editParent\">\" alt=\"\" />\n
      \n

      \n
      \n
      \n\n
      \n
      \n
    2. \n
      \n
    \n
    \n
    \n
    \n\n
    \n\n
    ',0,NULL,NULL),('
    \n \n\n
    \n
    \n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\n \n \n \n
    \n
    \n \n ^International(\'template add\',\'Asset_GalleryAlbum\');\n \n ^International(\'template edit\',\'Asset_GalleryAlbum\');\n \n
    \n\n

    \n\n

    \n\n \n

    ^International(\'template error happened\',\'Asset_Photo\');

    \n
      \n \n
    • \n
      \n
    \n
    \n\n \n\n \n\n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ^International(\'template upload type\',\'Asset_GalleryAlbum\');\n ^International(\'template upload single\',\'Asset_GalleryAlbum\');\n \" class=\"adminButton\">^International(\'template upload archive\',\'Asset_GalleryAlbum\');\n
    ^International(\'editForm title label\',\'Asset_Photo\');\n \n
    ^International(\'editForm synopsis label\',\'Asset_Photo\');\n \n
    ^International(\'editForm photo new\',\'Asset_Photo\'); ^International(\'editForm photo replace\',\'Asset_Photo\');\n \n
    ^International(\'editForm keywords\',\'Asset_Photo\');\n \n
    ^International(\'editForm location\',\'Asset_Photo\');\n \n
    ^International(\'editForm friendsOnly\',\'Asset_Photo\');\n \n
    \n\n \n\n \n\n
    ','GalleryFile/Edit',1,1,'7JCTAiu1U_bT9ldr655Blw',1285124155,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n
    \n
    \n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\n\n\n\n
    \n
    \n\n^International(\'template add\',\'Asset_GalleryAlbum\');\n\n^International(\'template edit\',\'Asset_GalleryAlbum\');\n\n
    \n

    \n

    \n\n

    ^International(\'template error happened\',\'Asset_Photo\');

    \n
      \n\n
    • \n
      \n
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(\'template upload type\',\'Asset_GalleryAlbum\');\n^International(\'template upload single\',\'Asset_GalleryAlbum\');\n\" class=\"adminButton\">^International(\'template upload archive\',\'Asset_GalleryAlbum\');\n
    ^International(\'editForm title label\',\'Asset_Photo\');\n\n
    ^International(\'editForm synopsis label\',\'Asset_Photo\');\n\n
    ^International(\'editForm photo new\',\'Asset_Photo\'); ^International(\'editForm photo replace\',\'Asset_Photo\');\n\n
    ^International(\'editForm keywords\',\'Asset_Photo\');\n\n
    ^International(\'editForm location\',\'Asset_Photo\');\n\n
    ^International(\'editForm friendsOnly\',\'Asset_Photo\');\n\n
    \n\n\n
    ',0,NULL,NULL),('
    \r\n

    ^International(\'template addArchive title\',\'Asset_GalleryAlbum\');

    \r\n\r\n

    ^International(\'template addArchive body\',\'Asset_GalleryAlbum\');

    \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
    ^International(\'template upload type\',\'Asset_GalleryAlbum\');\r\n \" class=\"adminButton\">^International(\'template upload single\',\'Asset_GalleryAlbum\');\r\n ^International(\'template upload archive\',\'Asset_GalleryAlbum\');\r\n
    ^International(\'addArchive file\',\'Asset_GalleryAlbum\');\r\n \r\n
    ^International(\'addArchive keywords\',\'Asset_GalleryAlbum\');\r\n \r\n
    ^International(\'addArchive location\',\'Asset_GalleryAlbum\');\r\n \r\n
    ^International(\'addArchive sortBy\',\'Asset_GalleryAlbum\');
    ^International(\'addArchive friendsOnly\',\'Asset_GalleryAlbum\');
    \r\n \r\n
    \r\n \r\n
    \r\n \r\n \r\n\r\n
    ','GalleryAlbum/AddArchive',1,1,'0X4Q3tBWUb_thsVbsYz9xQ',1285124155,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n

    ^International(\'template addArchive title\',\'Asset_GalleryAlbum\');

    \n

    ^International(\'template addArchive body\',\'Asset_GalleryAlbum\');

    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(\'template upload type\',\'Asset_GalleryAlbum\');\n\" class=\"adminButton\">^International(\'template upload single\',\'Asset_GalleryAlbum\');\n^International(\'template upload archive\',\'Asset_GalleryAlbum\');\n
    ^International(\'addArchive file\',\'Asset_GalleryAlbum\');\n\n
    ^International(\'addArchive keywords\',\'Asset_GalleryAlbum\');\n\n
    ^International(\'addArchive location\',\'Asset_GalleryAlbum\');\n\n
    ^International(\'addArchive sortBy\',\'Asset_GalleryAlbum\');
    ^International(\'addArchive friendsOnly\',\'Asset_GalleryAlbum\');
    \n
    \n\n
    \n\n
    ',0,NULL,NULL),('
    \n \n\n
    \n
    \n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\n \n \n \n
    \n
    \n ^International(template makeShortcut title,Asset_Photo);\n
    \n\n

    \n\n
    \n\n \n \n \n \n \n \n \n \n \n \n
    ^International(template makeShortcut file,Asset_Photo);
    ^International(template makeShortcut album,Asset_Photo);
    \n\n
    \n \n
    \n\n \n
    \n
    ','GalleryFile/MakeShortcut',1,1,'m3IbBavqzuKDd2PGGhKPlA',1285124155,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n
    \n
    \n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\n\n\n\n
    \n
    \n^International(template makeShortcut title,Asset_Photo);\n
    \n

    \n
    \n\n\n\n\n\n\n\n\n\n\n
    ^International(template makeShortcut file,Asset_Photo);
    ^International(template makeShortcut album,Asset_Photo);
    \n
    \n \n
    \n\n
    \n
    ',0,NULL,NULL),('
    \n \n \n
    \n
    \n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\n \n \n \n
    \n
    \n^International(template url_delete,Asset_GalleryAlbum);\n
    \n\n

    \n\n \n\n
    ','GalleryAlbum/Delete',1,1,'UTNFeV7B_aSCRmmaFCq4Vw',1285124155,'WebGUI::Asset::Template::HTMLTemplate',1,'',0,NULL,NULL),('
    \n \n \n
    \n
    \n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\n \n \n \n
    \n
    \n^International(template url_delete,Asset_Photo);\n
    \n\n

    \n\n \n
    ','GalleryFile/Delete',1,1,'zcX-wIUct0S_np14xxOA-A',1285124155,'WebGUI::Asset::Template::HTMLTemplate',1,'',0,NULL,NULL),('\r\n\r\n\r\n<tmpl_var title>\r\n\r\n\r\n\r\n\r\n\r\n<tmpl_var title>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n','GalleryAlbum/ViewRss',1,1,'mM3bjP_iG9sv5nQb4S17tQ',1285124158,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n<tmpl_var title>\n\n\n\n\n<tmpl_var title>\n\n\n\n\n\n\n\n',0,NULL,NULL),('\r\n\r\n\r\n<tmpl_var title>\r\n\r\n\r\n\r\n\r\n\r\n<tmpl_var title>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n','Gallery/ListAlbumsRss',1,1,'ilu5BrM-VGaOsec9Lm7M6Q',1285124158,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n<tmpl_var title>\n\n\n\n\n<tmpl_var title>\n\n\n\n\n\n\n\n',0,NULL,NULL),('\r\n\r\n\r\n<tmpl_var title>\r\n\r\n\r\n\r\n\r\n\r\n<tmpl_var title>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n','Gallery/ListFilesForUserRss',1,1,'-ANLpoTEP-n4POAdRxCzRw',1285124158,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n<tmpl_var title>\n\n\n\n\n<tmpl_var title>\n\n\n\n\n\n\n\n',0,NULL,NULL); +INSERT INTO `template` VALUES ('
    \n \n\n
    \n
    \n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\n \n \"\"\n \n \"\"\n \"\"\n \n \"\"\n
    \n
    \n
    \n\n

    \n\n
    \n ^International(\"template comment add title\",\"Asset_Photo\");\n ^International(\"template comment edit title\",\"Asset_Photo\");\n \n \n
    \n
    \n \n
    \n \n
    \n
    \n \n
    \n
    ','GalleryFile/EditComment',1,1,'OxJWQgnGsgyGohP2L3zJPQ',1285124158,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n
    \n
    \n
    \" enctype=\"multipart/form-data\" method=\"GET\" class=\"searchBox\">\n\n\"\"\n\n\"\"\n\"\"\n\n\"\"\n
    \n
    \n
    \n

    \n
    \n^International(\"template comment add title\",\"Asset_Photo\");\n^International(\"template comment edit title\",\"Asset_Photo\");\n\n\n
    \n
    \n\n
    \n\n
    \n
    \n\n
    \n
    ',0,NULL,NULL),('\r\n\r\n\r\n\r\n^Page(title); · ^c();\r\n\r\n\r\n\r\n\r\n\r\n^AdminBar();\r\n\r\n
    \r\n

    ^c();

    \r\n ^u();\r\n
    \r\n\r\n
    \r\n \r\n
    \r\n\r\n
    \r\n ©^D(%y); ^c();\r\n
    \r\n\r\n\r\n \r\n\r\n\r\n\r\n\r\n','style',1,1,'PBtmpl0000000000000111',1286336607,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n^Page(title); · ^c();\n\n\n\n\n^AdminBar();\n
    \n

    ^c();

    \n^u();\n
    \n
    \n\n
    \n
    \n©^D(%y); ^c();\n
    \n\n\n\n\n',0,NULL,'[]'),('

    \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
    ','Auth/LDAP/Account',1,1,'PBtmpl0000000000000004',1287545014,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n\n

    \n\n\n

    \n\n\n\n\n\n
    \n\n\n\n
    \n
    \n
    \n\n
    ',0,NULL,NULL),('

    \n \n

    \n\n \n\n\n\n\n\n\n \n \n\n\n \n \n\n\n \n \n\n\n\n \n \n\n\n\n \n \n\n
    \n\n\n\n
    \n \n
    ','Auth/LDAP/Create',1,1,'PBtmpl0000000000000005',1287545014,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n
    \n\n
    ',0,NULL,NULL),('

    \n \n

    \n\n \n\n\n\n\n\n\n \n \n\n\n \n \n\n\n \n \n\n
    \n\n\n
    \n
      \n \n
    • \">
    • \n
      \n\n
    \n
    ','Auth/LDAP/Login',1,1,'PBtmpl0000000000000006',1287545014,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n
    \n\n
    ',0,NULL,NULL),('

    \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','Auth/WebGUI/Account',1,1,'PBtmpl0000000000000010',1287545014,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n
    \n\n
    ',0,NULL,NULL),('

    \n\n\n \n\n\n\n\n\n\n\n \n \n\n\n\n \n \n\n\n \n \n\n\n\n \n \n\n\n\n\n \n \n\n\n\n \n\n\n \n\n
     
    \n\n\n
    \n \n
    \n','Auth/WebGUI/Create',1,1,'PBtmpl0000000000000011',1287545014,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
     
    \n\n
    \n\n
    ',0,NULL,NULL),('^International(\'50\',\'WebGUI\');: \r\n^International(\'51\',\'WebGUI\');: \r\n\r\n','Auth/WebGUI/Welcome',1,1,'PBtmpl0000000000000015',1287545014,'WebGUI::Asset::Template::HTMLTemplate',1,'^International(\'50\',\'WebGUI\');: \n^International(\'51\',\'WebGUI\');: \n',0,NULL,NULL),('^International(\'email address validation email body\',\'AuthWebGUI\');\r\n\r\n','Auth/WebGUI/Activation',1,1,'PBtmpl0000000000000016',1287545014,'WebGUI::Asset::Template::HTMLTemplate',1,'^International(\'email address validation email body\',\'AuthWebGUI\');\n',0,NULL,NULL),('

    \n \n

    \n\n\n \n\n\n\n\n\n\n \n \n\n\n \n \n\n\n \n \n\n\n \n \n\n
    \n \n \n \n
    \n \n \n \n
    \n \n \n \n
    \n \n
    \n','Auth/WebGUI/Expired',1,1,'PBtmpl0000000000000012',1287545014,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\n\n
    \n\n\n\n
    \n\n\n\n
    \n\n
    \n',0,NULL,NULL),('

    \n \n

    \n\n\n \n\n\n\n\n\n\n \n \n\n\n \n \n\n\n \n \n\n
    \n\n\n
    \n \n
    ','Auth/WebGUI/Login',1,1,'PBtmpl0000000000000013',1287545014,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n
    \n\n
    ',0,NULL,NULL),('

    \n\n

    \n
    \n\n\n\n\n\n\n\n\n \n \n\n\n \n \n\n\n\n\n \n \n\n\n\n\n \n \n\n\n\n\n \n \n\n
    \n\n\n
    \n \n
    \n','Auth/WebGUI/Recovery2',1,1,'PBtmpl0000000000000014',1287545015,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n
    \n\n
    ',0,NULL,NULL),('

    \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','Auth/WebGUI/Deactivate',1,1,'zaHUYsE_PgKk8hnVd8ffEQ',1287545015,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n

    \n\n

    \n
    \n\">\n         \n\">\n
    ',0,NULL,NULL),('

    \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','Auth/LDAP/Deactivate',1,1,'_P4PMiraGsLTfOjK4fYQPQ',1287545015,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n

    \n\n

    \n
    \n\">\n         \n\">\n
    ',0,NULL,NULL),('^International(recover password email text1,AuthWebGUI,^u;);\n\n^International(recover password email text2,AuthWebGUI);\n\n\n\n^International(recover password email text3,AuthWebGUI);','Auth/WebGUI/RecoveryEmail',1,1,'sK_0zVw4kwdJ1sqREIsSzA',1287545015,'WebGUI::Asset::Template::HTMLTemplate',1,'^International(recover password email text1,AuthWebGUI,^u;);\n^International(recover password email text2,AuthWebGUI);\n\n^International(recover password email text3,AuthWebGUI);',0,NULL,NULL),('\n\n\n\n\">','NotifyAboutVersionTag',1,1,'lYhMheuuLROK_iNjaQuPKg',1287545015,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n',0,NULL,'[]'),('

    \n\n\n \n \n \n \n \n \n\n
    :
    \n\n\n

    \n\n\n \n \n \n \n \n \n\n
    :
    \n
    ','DataForm',1,1,'PBtmpl0000000000000085',1288747840,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n\n\n\n\n\n\n\n\n
    :
    \n
    \n\n

    \n\n\n\n\n\n\n\n\n
    :
    \n
    \n
    ',0,NULL,NULL),('\n

    \n
    \n\n

    \n
    \n\n

    \n
    \n\n\n\n\n\n','EMS',1,1,'2rC4ErZ3c77OJzJm7O5s3w',1288747841,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n

    \n
    \n\n',0,NULL,NULL),('

    Friends for

    \n

    \">^International(back to friend manager,Account_FriendManager);

    \n\n\n
    \n

    ^International(remove friends,Account_FriendManager);

    \n\n\n\n\n\n\n\n\n\n\n\n
    ^International(remove all,Account_FriendManager);
    \n
    \n
    \n
    \n

    ^International(add new friends,Account_FriendManager);

    \n\n

    ^International(group,WebGUI);: . \">^International(view users from all groups,Account_FriendManager);

    \n
    \n\n\n

    ^International(Add Friend Managers,Account_FriendManager);:

    \n
    \n
    \n
    \n\n','Account/FriendManager/Edit',1,1,'lG2exkH9FeYvn4pA63idNg',1289967962,'WebGUI::Asset::Template::HTMLTemplate',1,'

    Friends for

    \n

    \">^International(back to friend manager,Account_FriendManager);

    \n\n\n
    \n

    ^International(remove friends,Account_FriendManager);

    \n\n\n\n\n\n\n\n\n\n\n\n
    ^International(remove all,Account_FriendManager);
    \n
    \n
    \n
    \n

    ^International(add new friends,Account_FriendManager);

    \n\n

    ^International(group,WebGUI);: . \">^International(view users from all groups,Account_FriendManager);

    \n
    \n\n\n

    ^International(Add Friend Managers,Account_FriendManager);:

    \n
    \n
    \n
    \n\n',0,NULL,NULL),('\r\n

    \r\n

    \r\n\r\n\r\n

    \r\n \">^International(\"add entry\",\"Asset_DataForm\");\r\n • \">\r\n \r\n • \" onclick=\"\">\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
    ^International(Entry ID,Asset_DataForm);\r\n \r\n \r\n \r\n \r\n \r\n ^International(Submission Date,Asset_DataForm);
    \">
    \r\n\r\n
    \r\n [ | | ]\r\n
    \r\n
    \r\n','DataForm/List',1,1,'PBtmpl0000000000000021',1294721945,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n

    \n\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(Entry ID,Asset_DataForm);\n\n\n\n\n\n^International(Submission Date,Asset_DataForm);
    \">
    \n\n
    \n[ | | ]\n
    \n
    ',0,NULL,'[]'),('\n\n \n\n\n \n\n\n \n\n\n \n\n
    \n \">^International(label day,Asset_Calendar);\n \">^International(label week,Asset_Calendar);\n \">^International(label month,Asset_Calendar);\n \">^International(486,WebGUI);\n \">^International(label search,Asset_Calendar);\n \n \n
    \n \n \n
    \n ^International(event details,Asset_Event);\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n\n \n \n \n \n\n \n \n \n \n\n
    \n
    ^International(event title,Asset_Event);
    \n
    \n
    \n \n
    \n
    \n
    ^International(location,Asset_Event);
    \n
    \n
    \n \n
    \n
    \n
    ^International(description,Asset_Event);
    \n
    \n
    \n
    \n
    ^International(scheduled,Asset_Event);
    \n
    \n
    \n \n
    \n
    \n
    ^International(related material,Asset_Event);
    \n
    \n \n
    \n
    ^International(attachments,Asset_Event);
    \n
    \n
    \n
    ','Calendar/Event',1,1,'CalendarEvent000000001',1295931508,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\">^International(label day,Asset_Calendar);\n\">^International(label week,Asset_Calendar);\n\">^International(label month,Asset_Calendar);\n\">^International(486,WebGUI);\n\">^International(label search,Asset_Calendar);\n\n
    \n\n\n
    \n^International(event details,Asset_Event);\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n
    ^International(event title,Asset_Event);
    \n
    \n
    \n\n
    \n
    \n
    ^International(location,Asset_Event);
    \n
    \n
    \n\n
    \n
    \n
    ^International(description,Asset_Event);
    \n
    \n
    \n
    \n
    ^International(scheduled,Asset_Event);
    \n
    \n
    \n\n
    \n
    \n
    ^International(related material,Asset_Event);
    \n
    \n\n
    \n
    ^International(attachments,Asset_Event);
    \n
    \n
    \n
    ',0,NULL,NULL),('
    \n\n\n
    _pagination\">
    \n
    \">
    \n
    \n\n
    ','Account/FriendManager/View',1,1,'64tqS80D53Z0JoAs2cX2VQ',1295931508,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n\n
    \">
    \n
    \n\n
    ',0,NULL,NULL),('\n','Calendar/List',1,1,'kj3b-X3i6zRKnhLb4ZiCLw',1295931508,'WebGUI::Asset::Template::HTMLTemplate',1,'',0,NULL,'[]'),('\" id=\"id\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n\n \n\n\n

    \n \n \">\n •\n \n \n \n \">\n \n \">\n \n •\n \n \">\n

    \n\n\n\n \n \n \n \n \n \n \n \n\n\n\n\n \n \n \n \n \n \n \n \n\n\n
    oddThreadevenThread\">oddThreadevenThread\">\"> ()oddThreadevenThread\">oddThreadevenThread\">oddThreadevenThread\">oddThreadevenThread\">
    \n\n\n
    \n · · \n
    \n
    \n','Collaboration',1,1,'PBtmpl0000000000000077',1298351263,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n\n\n

    \n\n\">\n•\n\n\n\n\">\n\n\">\n\n•\n\n\">\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    oddThreadevenThread\">oddThreadevenThread\">\"> ()oddThreadevenThread\">oddThreadevenThread\">oddThreadevenThread\">
    \n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('
    \n \n

    \n
    \n\n \n

    ^International(View,Icon);

    \n
    \n\n \n
    \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n wgRowOnewgRowTwo\">\n \n \">\n \n \n \n
    \n
    \n\n
    \n','Thingy/ViewThing',1,1,'ThingyTmpl000000000002',1299559129,'WebGUI::Asset::Template::HTMLTemplate',1,'',0,NULL,NULL),('
    \" class=\"image\">\n\" id=\"id\">\n\n\n
    \n
    \n\n\" alt=\"\" />\n\n\n
    ','ImageAsset',1,1,'PBtmpl0000000000000088',1300763663,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"image\">\n\" id=\"id\">\n\n
    \n
    \n\" />\n\n
    ',0,NULL,NULL),('
    \n \" id=\"id\">\n \n \n \n \n \n \n \n
    \n
    ^International(hide new content list,Asset_Dashboard);
    \n \n
    \n
    \n
    \n \n \n \n \">\n \n \n \n \n
    \n
    _div\" class=\"dragable\">\n
    \n
    \n _span\">\n \n \n \n \n \',\'\')\">\n \"\"\n \n \n \n \n \"\"\n \n \n \n \',\'\')\">\n \"\"\n \n \n \n \',\'\');\">\n \"\"\n \n \n \n
    \n
    \n \n
    _div\">\n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n \n \n \n \n
    \n
    ^International(Add New Content,Asset_Dashboard);
    \n
    \n \n

    \n
    \n \n \n

    \n
    \n \n \n

    \n
    \n \n
    \n \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n \n \n \">\n \n \n \n \n
    \n
    _div\" class=\"dragable\">\n \n
    \n
    \n _span\">\n \n \n \n \n \',\'\')\">\n \"\"\n \n \n \n \n \"\"\n \n \n \n \',\'\')\">\n \"\"\n \n \n \n \',\'\');\">\n \"\"\n \n \n
    \n
    \n
    \n
    \n \n
    _div\">\n \n
    \n \n
    \n
    \n
    \n \n \n \n \">\n \n \n \n \n
    \n
    _div\" class=\"dragable\">\n
    \n
    \n \n _span\">\n \n \n \n \n \n \n \',\'\')\">\n \"\"\n \n \n \n \n \n \"\"\n \n \n \n \n \',\'\')\">\n \"\"\n \n \n \n \n \',\'\');\">\n \"\"\n \n \n
    \n
    \n
    \n
    \n \n
    _div\">\n \n
    \n \n
    \n
    \n
    \n \n \n \n \">\n \n \n \n \n
    \n
    _div\" class=\"dragable\">\n
    \n
    \n \n _span\">\n \n \n \n \n \n \n \',\'\')\">\n \"\"\n \n \n \n \n \n \"\"\n \n \n \n \n \',\'\')\">\n \"\"\n \n \n \n \n \',\'\');\">\n \"\"\n \n \n
    \n
    \n
    \n
    \n \n
    _div\">\n \n
    \n \n
    \n
    \n
    \n
    \n \n \n \n \n \n \n
    \n
    \n
     
    \n
    \n
    \n \n \n
    \n
    ','Dashboard',1,1,'DashboardViewTmpl00001',1300763664,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\" id=\"id\">\n\n\n\n\n\n
    \n
    ^International(hide new content list,Asset_Dashboard);
    \n
    \n
    \n
    \n\n\n\n\">\n\n\n\n\n
    \n
    _div\" class=\"dragable\">\n
    \n
    \n_span\">\n\n\n\n\n\',\'\')\">\n\"\"\n\n\n\n\n\"\"\n\n\n\n\',\'\')\">\n\"\"\n\n\n
    \n\n\',\'\');\">\n\"\"\n\n\n
    \n
    \n
    \n\n
    _div\">\n\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n\n\n\n\n\n
    \n
    ^International(Add New Content,Asset_Dashboard);
    \n
    \n\n

    \n
    \n\n

    \n
    \n\n

    \n
    \n
    \n
    \n\n\n\n\n\n\n\n\n
    \n\n\n\n\">\n\n\n\n\n
    \n
    _div\" class=\"dragable\">\n
    \n
    \n_span\">\n\n\n\n\n\',\'\')\">\n\"\"\n\n\n\n\n\"\"\n\n\n\n\',\'\')\">\n\"\"\n\n\n\n\',\'\');\">\n\"\"\n\n\n
    \n
    \n
    \n
    \n
    _div\">\n\n
    \n
    \n
    \n
    \n\n\n\n\">\n\n\n\n\n
    \n
    _div\" class=\"dragable\">\n
    \n
    \n\n_span\">\n\n\n\n\n\n\',\'\')\">\n\"\"\n\n\n\n\n\"\"\n\n\n\n\',\'\')\">\n\"\"\n\n\n\n\',\'\');\">\n\"\"\n\n\n
    \n
    \n
    \n
    \n
    _div\">\n\n
    \n
    \n
    \n
    \n\n\n\n\">\n\n\n\n\n
    \n
    _div\" class=\"dragable\">\n
    \n
    \n\n_span\">\n\n\n\n\n\n\',\'\')\">\n\"\"\n\n\n\n\n\"\"\n\n\n\n\',\'\')\">\n\"\"\n\n\n\n\',\'\');\">\n\"\"\n\n\n
    \n
    \n
    \n
    \n
    _div\">\n\n
    \n
    \n
    \n
    \n
    \n\n\n\n\n\n
    \n
    \n
     
    \n
    \n
    \n\n
    \n
    ',0,NULL,'[]'),('\r\n\r\n\r\n\r\n^Page(title); - ^c;\r\n\r\n\r\n\r\n\r\n\r\n\r\n^AdminBar;\r\n\r\n
    \r\n\r\n \r\n
    \r\n ^AssetProxy(style-underground/top-navigation); \r\n
    \r\n \r\n
    \r\n \r\n
    yourname
    \r\n \r\n
    \r\n \r\n

    \r\n

    \r\n
    \r\n \r\n
    \r\n\r\n
    \r\n ^AssetProxy(style-underground/side-navigation);\r\n

    ^GroupText(\"Registered Users\",\"Hello, ^@;\",\"Login\");

    \r\n
    \r\n
      \r\n
    • ^LoginToggle();
    • \r\n ^a(\"View My Account\",\"style-underground/templates/view-my-account\");\r\n ^AdminToggle(\"\",\"\",\"style-underground/templates/admintoggle-underground-admin-toggle\");\r\n
    \r\n
    \r\n

    WebGUI Links

    \r\n \r\n
    \r\n \r\n
    \r\n\r\n
    \r\n \r\n\r\n
    \r\n \r\n

    \r\n © 2006 ^c;    \r\n Design by: styleshout |\r\n Valid XHTML |\r\n CSS\r\n       \r\n \r\n

    \r\n \r\n
    \r\n \r\n\r\n\r\n','style',1,1,'Qk24uXao2yowR6zxbVJ0xA',1301973997,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n^Page(title); - ^c;\n\n\n\n\n\n^AdminBar;\n\n
    \n\n
    \n^AssetProxy(style-underground/top-navigation);\n
    \n
    \n
    yourname
    \n
    \n\n

    \n

    \n
    \n
    \n
    \n^AssetProxy(style-underground/side-navigation);\n

    ^GroupText(\"Registered Users\",\"Hello, ^@;\",\"Login\");

    \n
    \n
      \n
    • ^LoginToggle();
    • \n^a(\"View My Account\",\"style-underground/templates/view-my-account\");\n^AdminToggle(\"\",\"\",\"style-underground/templates/admintoggle-underground-admin-toggle\");\n
    \n
    \n

    WebGUI Links

    \n\n
    \n
    \n\n
    \n\n
    \n

    \n© 2006 ^c;   \nDesign by: styleshout |\nValid XHTML |\nCSS\n      \n\n

    \n
    \n\n',0,'1riOzIrN9EgfdnGFyOq-_g','[]'),(' \n \n','Navigation',1,1,'39KNX53B4nYJAyIE1lu8ZQ',1301973997,'WebGUI::Asset::Template::HTMLTemplate',1,'\n',0,NULL,NULL),(' \r\n

    \r\n
    \r\n \r\n
    \r\n
    \r\n','Navigation',1,1,'ztfi__vHJLsQDsMenrEn-w',1301973997,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n
    ',0,NULL,NULL),('
  • \">
  • ','AdminToggle',1,1,'8qyrDCNeggB4dzKiOoRuiQ',1301973997,'WebGUI::Asset::Template::HTMLTemplate',1,'
  • \">
  • ',0,NULL,NULL),('
  • \">
  • ','Macro/a_account',1,1,'M1NyNeS5jpdIsiIWFiJprw',1301973997,'WebGUI::Asset::Template::HTMLTemplate',1,'
  • \">
  • ',0,NULL,NULL),('
    \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
    1. \" style=\"width:px; height:px;\">\r\n \r\n
    2. \r\n
      \r\n
    \r\n
    \r\n\r\n \r\n\r\n
    \r\n\r\n
    ','Carousel',1,1,'CarouselTmpl0000000001',1301973997,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n

    \n
    \n\n

    \n
    \n\n
    \n
    \n\n
    \">\n
      \n\n
    1. \" style=\"width:px; height:px;\">\n\n
    2. \n
      \n
    \n
    \n\n
    \n
    ',0,NULL,'[]'),('\n\n\n\n \n WebGUI - style Greenportal\n \n\n\n \n ^AdminBar;\n
    \n
    \n
    \n ^H(^c(););\n \n
    \n
    \n\n
    \n ^AssetProxy(greenportal_navigation);\n
    \n\n
    \n
    \n Currently viewing: ^AssetProxy(greenportal_navigationtop);\n
    \n\n
    \n \n
    \n
    \n\n
    \n © 2008 ^c; | Design from Joomla! Open Source\n
    \n
    \n\n\n','style',1,1,'KKt0VB_eoQxw9xEsHsAhag',1301973998,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\nWebGUI - style Greenportal\n\n\n\n^AdminBar;\n
    \n
    \n
    \n^H(^c(););\n\n
    \n
    \n
    \n^AssetProxy(greenportal_navigation);\n
    \n
    \n
    \nCurrently viewing: ^AssetProxy(greenportal_navigationtop);\n
    \n
    \n\n
    \n
    \n
    \n© 2008 ^c; | Design from Joomla! Open Source\n
    \n
    \n\n',0,'dHuYEH6gNfRu9NHXOVFa9g',NULL),('\r\n

    \r\n
    \r\n\r\n

    \r\n
    \r\n\r\n
    \r\n
    \r\n\r\n\r\n','Navigation',1,1,'_z3ukLCqvoaUygfsbbkBzw',1301973999,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n
    \n
    \n
      \n
    • Main Menu
    • \n\n\n
    • \"indent1\"\"indent2\">\n\nstyle=\"color:white;\"\n\n\nonclick=\"window.open(\'\')\" href=\"#\"\n\nhref=\"\"\n>\n\n\n
    • \n
      \n
      \n
    • User Panel
    • \n
    • ^LoginToggle;
    • \n
    • ^a(Hello‚ ^@;˜);
    • \n
    • ^AdminToggle;
    • \n
    ',0,NULL,NULL),('\r\n \r\n\r\n\r\n\r\n onclick=\"window.open(\'\')\" href=\"#\" \r\n href=\"\"\r\n \r\n >\r\n \r\n \r\n\r\n » \r\n\r\n\r\n','Navigation',1,1,'Pt38T5_MWSue2e1N36MLdw',1301973999,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\nonclick=\"window.open(\'\')\" href=\"#\"\nhref=\"\"\n>\n\n\n » \n',0,NULL,NULL),('\" id=\"id\">\r\n\r\n\r\n

    \r\n
    \r\n\r\n\r\n

    \r\n
    \r\n\r\n\r\n
      \r\n

      Registration failed because

      \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 • \" onclick=\"\">\r\n \r\n\r\n \r\n • \" onclick=\"\">\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 * required\r\n \r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n\r\n\r\n','DataForm',1,1,'LDcM1Iop17nF2MoSa7zo_Q',1301973999,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n
      \n

      Registration failed because

      \n\n
    • \n
      \n
    \n
    \n\n\n

    \n\n

    \n\">\n• \">\n\n\n• \" onclick=\"\">\n\n\n• \" onclick=\"\">\n\n• \">\n• \">\n\n
    \n\n\n\n\n\n\n\n\n\n\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n* required\n\n
    \n\n
    \n
    \n
    \n\n',0,NULL,NULL),('\n

    \n

    \n\n

    Registration Database

    \n\n\n
    \n \">\n • \">\n \n \n • \" onclick=\"\">\n \n • \">\n • \">\n \n
    \n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
      Submission Date
    \" onclick=\"return confirm(\'Are you certain that you wish to delete this data entry?\')\">\"Delete\"
    \n\n','DataForm/List',1,1,'hVF1taXj4bfd7DuL4XDMYg',1301973999,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n

    \n

    Registration Database

    \n
    \n\">\n• \">\n\n\n• \" onclick=\"\">\n\n• \">\n• \">\n\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
      Submission Date
    \" onclick=\"return confirm(\'Are you certain that you wish to delete this data entry?\')\">\"Delete\"
    ',0,NULL,NULL),('\" id=\"id\">\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\">Change Info      \r\n\">\r\n\r\n\r\n','DataForm',1,1,'x4-2QYRSrIB_BJfnSKKj4w',1301973999,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n
    \n\n
    \n\n\n\n\n\n\n\n
    \n

    \n\">Change Info      \n\">',0,NULL,NULL),('\" id=\"id\">\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 \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
    \">\">\">\">\">
    oddThreadevenThread\">oddThreadevenThread\">\">oddThreadevenThread\">oddThreadevenThread\">\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\"> @ oddThreadevenThread\" style=\"font-size: 11px;\">\r\n \">\r\n by\r\n \r\n \r\n \r\n \">\r\n \r\n on @ \r\n
    \r\n\r\n\r\n
    \r\n · · \r\n
    \r\n
    \r\n','Collaboration',1,1,'423R4Y6XIt3wUzlnLo-chg',1301973999,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n\n\n

    \n\n\">\n•\n\n\n\n\">\n\n\">\n\n•\n\n\">\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \">\">\">\">\">
    oddThreadevenThread\">oddThreadevenThread\">\">oddThreadevenThread\">oddThreadevenThread\">\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\" align=\"center\">oddThreadevenThread\"> @ oddThreadevenThread\" style=\"font-size: 11px;\">\n\">\nby\n\n\n\n\">\n\non @ \n
    \n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('\r\n\r\n \r\n

    \r\n
    \r\n\r\n \r\n
    \r\n

    \">[Back]

    \r\n
    \r\n
    \r\n \r\n \">\r\n \r\n \">\r\n \r\n
    \r\n
    \r\n\r\n\r\n
    px;\">\r\n
    Current\">\r\n \">\r\n
    \r\n \r\n
    \r\n
    \r\n\r\n
    \r\n\" 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 \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','Collaboration/Thread',1,1,'oZ1Mk-zExYUyD-JsjTvaHg',1301973999,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n

    \n
    \n\n
    \n\n\">\n\n\">\n\n
    \n
    \n\n\n\n\n
    \n[ | | ]\n
    \n
    \n
    \n\n\"> •\n\n\n\"> •\n\n\n\">\n\n\n\n• \">\n\n• \">\n\n\n• \">\n\n• \">\n\n\n\n\n• \">\n\n• \">\n\n\n
    ',0,NULL,NULL),('\" id=\"id\">\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 \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
    \r\n\r\n\r\n','Collaboration/PostForm',1,1,'mYwS8CZaOLMt0raaKXGZcQ',1301973999,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\n

    \n\n
    ',0,NULL,NULL),('\" id=\"id\">\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
    class=\"odd\">\">class=\"odd\">class=\"odd\">\">class=\"odd\"> @
    \r\n
    \r\n\r\n\r\n
    \r\n · · \r\n
    \r\n
    \r\n\r\n\r\n','Collaboration/Search',1,1,'kSGR4OHsKmhLQTuLkisOww',1301973999,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    class=\"odd\">\">class=\"odd\">class=\"odd\">\">class=\"odd\"> @
    \n
    \n\n
    \n · · \n
    \n
    ',0,NULL,NULL),('\n

    \n
    \n\n\n

    \n
    \n\n\n \n\n\n\n\n\n \n\n\n \n\n\n\n \n
    \n \">Day\n \">Week\n \">Month\n \">Search\n \n
     
    \n\n
    \n \">Add Event\n \">Print\n \n \n
    \n
    \n \" style=\"font-size:7pt; margin-right:12px;\">« prev\n \n \" style=\"font-size:7pt; padding-left:12px\">next » \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n
    active current\">\n \n \">\n \n\n \n \n \n\n /wobject/Calendar/images/more.gif\" />\n \n \n \n
    \n
    \n\n
    \" class=\"moreDisplay\">\n
    \n
      \n \n
    • \">
    • \n
      \n
    \n
    \n
    \n
    \n\n\n','Calendar/Month',1,1,'U78V5IJHVljvRTb6ydsTHg',1301973999,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\">Day\n\">Week\n\">Month\n\">Search\n
     
    \n
    \n\">Add Event\n\">Print\n\n\n
    \n
    \n\" style=\"font-size:7pt; margin-right:12px;\">« prev\n \n\" style=\"font-size:7pt; padding-left:12px\">next »\n
    \n\n\n\n\n\n\n\n\n\n\n
    active current\">\n\n\">\n\n\n\n\n/wobject/Calendar/images/more.gif\" />\n\n\n
    \n
    \n\n
    \" class=\"moreDisplay\">\n
    \n\n
    \n
    \n
    ',0,NULL,NULL),('\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 \" class=\"tab\">Day \r\n \" class=\"tabWeek\">Week \r\n \" class=\"tab\">Month \r\n \" class=\"tab\">Search\r\n\r\n
     
    \r\n\r\n
    \r\n \">Add Event\r\n \">Print\r\n \r\n \r\n
    \r\n
    \r\n \" style=\"margin-right:66px;\">« prev week\r\n , ~ , \r\n \" style=\"margin-left:66px\">next week » \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n
    curDay\"> \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n\r\n','Calendar/Week',1,1,'Xqc3qPUXoFE8dt9qocdWig',1301973999,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\" class=\"tab\">Day\n\" class=\"tabWeek\">Week\n\" class=\"tab\">Month\n\" class=\"tab\">Search\n
     
    \n
    \n\">Add Event\n\">Print\n\n\n
    \n
    \n\" style=\"margin-right:66px;\">« prev week\n , ~ , \n\" style=\"margin-left:66px\">next week »\n
    \n\n\n\n\n\n
    \n
    \n
    curDay\">\n\n\n
    \n
    \n
    ',0,NULL,NULL),('\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 \" class=\"tabDay\">Day\r\n \" class=\"tab\">Week\r\n \" class=\"tab\">Month\r\n \" class=\"tab\">Search\r\n\r\n
     
    \r\n\r\n
    \r\n \">Add Event\r\n \">Print\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
    :00
    \r\n
    \r\n
      \r\n
    • \r\n \">\r\n
    • \r\n
    \r\n
    \r\n
    \r\n\r\n','Calendar/Day',1,1,'IBTb7wllSt7RxFmmvm9pkQ',1301973999,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n
    \n\" class=\"tabDay\">Day\n\" class=\"tab\">Week\n\" class=\"tab\">Month\n\" class=\"tab\">Search\n
     
    \n
    \n\">Add Event\n\">Print\n\n\n
    \n
    \n\n
    \n\n\n\n\n\n
    \n
    :00
    \n
    \n\n
    \n
    ',0,NULL,NULL),('\r\n\r\n \r\n\r\n\r\n \r\n\r\n\r\n \r\n\r\n
    \r\n \" class=\"tab\">Day\r\n \" class=\"tab\">Week\r\n \" class=\"tab\">Month\r\n \" class=\"tab\">Search\r\n\r\n
     
    \r\n \r\n
    \r\n \r\n Edit \r\n • Delete • \r\n \r\n Print\r\n
    \r\n
    \r\n \" style=\"margin-right:106px;\">« prev event\r\n Event Details\r\n \" style=\"margin-left:106px\">next event »\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
    Event Title
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    Location
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    Description
    \r\n
    \r\n
    \r\n
    \r\n
    Scheduled
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    Related Material
    \r\n
    \r\n \">
    \r\n
    \r\n
    \r\n
    Attachments
    \r\n
    \r\n \"> \" />
    \r\n
    \r\n
    \r\n
    \r\n','Calendar/Event',1,1,'Z1EM7JMI_4SkyfaZffSElw',1301973999,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n\n\n\n\n\n\n
    \n\" class=\"tab\">Day\n\" class=\"tab\">Week\n\" class=\"tab\">Month\n\" class=\"tab\">Search\n
     
    \n
    \n\nEdit\n• Delete •\n\nPrint\n
    \n
    \n\" style=\"margin-right:106px;\">« prev event\nEvent Details\n\" style=\"margin-left:106px\">next event »\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n
    Event Title
    \n
    \n
    \n\n
    \n
    \n
    Location
    \n
    \n
    \n\n
    \n
    \n
    Description
    \n
    \n
    \n
    \n
    Scheduled
    \n
    \n
    \n\n
    \n
    \n
    Related Material
    \n
    \n\">
    \n
    \n
    \n
    Attachments
    \n
    \n
    \n
    ',0,NULL,NULL),('\n\n\n

    Errors!

    \n
      \n\n
    • \n
      \n
    \n
    \n\n\n\n \n\n
    \n Event\n Recurrence\n \n \n
     
    \n
    \n\n\n\n\n \n\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    Event Title
    Short Title
    Location
    Description
    Start Date
    End Date
    Time
     
    Related Links
    Group to View this Event
    Attachments for this Event
    \n
    \n \n \n\n\n\n\n\n \n \n\n\n \n \n\n\n
    Recurrence Pattern
    Recurrence Range\n

    Start:

    \n

    \n

    End:

    \n
    \n
    \n\n\n\n\n','Calendar/EventEdit',1,1,'fJg7SKpGZwzSNx3_ebki1A',1301973999,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n

    Errors!

    \n
      \n\n
    • \n
      \n
    \n
    \n\n\n\n\n
    \nEvent\nRecurrence\n\n\n
     
    \n
    \n\n\n\n\n\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    Event Title
    Short Title
    Location
    Description
    Start Date
    End Date
    Time
     
    Related Links
    Group to View this Event
    Attachments for this Event
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    Recurrence Pattern
    Recurrence Range\n

    Start:

    \n

    \n

    End:

    \n
    \n
    \n\n',0,NULL,NULL),('\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 \">^International(label day,Asset_Calendar);\r\n \">^International(label week,Asset_Calendar);\r\n \">^International(label month,Asset_Calendar);\r\n \">^International(label search,Asset_Calendar);\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
    ^International(keyword,Asset_Calendar);
    \r\n
    \r\n
    \r\n
    ^International(start date,Asset_Calendar);
    \r\n
    \r\n
    \r\n
    ^International(end date,Asset_Calendar);
    \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 ^International(search results,Asset_Calendar);\r\n ^International(page x of x,Asset_Calendar,,);\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 \" style=\"padding-left:10px\">\r\n
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n','Calendar/Search',1,1,'ihf4Rx6p72xn_nVKaIeOaw',1301973999,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\">^International(label day,Asset_Calendar);\n\">^International(label week,Asset_Calendar);\n\">^International(label month,Asset_Calendar);\n\">^International(label search,Asset_Calendar);\n
    \n \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n
    ^International(keyword,Asset_Calendar);
    \n
    \n
    \n
    ^International(start date,Asset_Calendar);
    \n
    \n
    \n
    ^International(end date,Asset_Calendar);
    \n
    \n
    \n
    \n\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n
    \n^International(search results,Asset_Calendar);\n^International(page x of x,Asset_Calendar,,);\n
    \n
    \n
    \n\n\n\n
    \n
    \n\n\n\n\n\n
    \n
    \n
    \n\" style=\"padding-left:10px\">\n
    \n
    \n
    \n\n\n\n
    \n
    \n
    ',0,NULL,NULL),('\" id=\"id\"> \r\n\r\n \r\n

    \r\n
    \r\n\r\n

    \">[]

    \r\n\r\n
    \r\n\r\n
    \r\n\" 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     [

    \">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />

    |

    \">\" alt=\"-\" style=\"border: 0px;vertical-align:middle;\" />

    ]\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
    \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
    Current\">\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\" 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     [

    \">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />

    |

    \">\" alt=\"-\" style=\"border: 0px;vertical-align:middle;\" />

    ]\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
    px;\">\r\n
    Current\">\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\" 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     [

    \">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />

    |

    \">\" alt=\"-\" style=\"border: 0px;vertical-align:middle;\" />

    ]\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 \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','Collaboration/Thread',1,1,'jrWJ6nHXkqgFbml7BZ9chw',1301974000,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n

    \">[]

    \n
    \n\n
    \n\" alt=\"\" />\n
    \n
    \n:\n\n\n\n\">\n\n
    \n:
    \n:
    \n: \n\n    [

    \">\" alt=\"+\" style=\"border: 0px;vertical-align:middle;\" />

    |

    \">\" alt=\"-\" style=\"border: 0px;vertical-align:middle;\" />

    ]\n
    \n
    \n\n: [ \"> \"> ]
    \n\n\n:
    \n
    \n
    \n
    \n
    \n

    \n\n
    \n\n
    \n\n\n\n
    \n
    \n
    \n\n
    \n\n\">\n\n\n•\n\">\n•\n\">\n\n
    \n
    \n
    \n\n
    \n

    \n
    \n
    \n\n\">\n\n\">\n\n
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n[ | | ]\n
    \n
    \n
    \n
    \n\n\">\n•\n\n\n\">\n•\n\n\n\">\n•\n\n\n\n\">\n•\n\n\">\n•\n\n\n\">\n•\n\n\">\n•\n\n\n\n\n\">\n\n\">\n\n\n
    \n
    ',0,NULL,NULL),('\" id=\"id\">\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 class=\"even\">\r\n \">
    \r\n \r\n \r\n class=\"even\" align=\"center\">\r\n class=\"even\" align=\"center\">\r\n class=\"even\" align=\"center\">\r\n class=\"even\" align=\"center\">\r\n class=\"even\">\r\n \">\r\n by\r\n \r\n \r\n \r\n \">\r\n \r\n on @ \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','MessageBoard',1,1,'Ys6f3vpe0y1uRcaCJ2TlFw',1301974000,'WebGUI::Asset::Template::HTMLTemplate',1,'\" id=\"id\">\n\n

    \n
    \n\n

    \n
    \n\n\n

    \n\n\n\">\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n class=\"even\">\n\">
    \n\n\n class=\"even\" align=\"center\">\n class=\"even\" align=\"center\">\n class=\"even\" align=\"center\">\n class=\"even\" align=\"center\">\n class=\"even\">\n\">\nby\n\n\n\n\">\n\non @ \n\n
    \n\n
    \n\n

    \n\n
    \n
    \n\n

    \n\n',0,NULL,NULL),('

    \" class=\"search\">\n\n\" id=\"id\">\n\n\n \n\n\n\n

    \n
    \n\n\n
    \n \n \n
    \n
    \n\n
    \n
    \n \n \" size=\"30\" maxlength=\"255\" />\n \n
    \n
    \n\n\n \n
    \n ^International(\'resultsFeedback\',Asset_Search); \n ^International(\'page\',Asset_Search); ^International(\'of\',Asset_Search); \n \n
    \n \n

    \n
    \n\n
    \n \n
    );\">
    \n
    \n
    \n
    \n\n \n
      \n
    • \n \n class=\"active\">\n \">\n \n \n
    • \n
    \n
    \n\n
    \n\n\n
    \n','Search',1,1,'PBtmpl0000000000000200',1301974000,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"search\">\n\" id=\"id\">\n\n\n\n\n

    \n
    \n\n
    \n\n\n
    \n
    \n
    \n
    \n\n\" size=\"30\" maxlength=\"255\" />\n\n
    \n
    \n\n\n
    \n^International(\'resultsFeedback\',Asset_Search); \n^International(\'page\',Asset_Search); ^International(\'of\',Asset_Search); \n\n
    \n\n

    \n
    \n
    \n\n
    );\">
    \n
    \n
    \n
    \n\n
      \n
    • \n\n class=\"active\">\n\">\n\n\n
    • \n
    \n
    \n
    \n\n
    ',0,NULL,'[]'),('\n\">\n\n\n

    \n
    \n\n\n

    \n
    \n\n\n

    \n\n\n\n \n \n \n \n \n \n
    \n
    \n \n \n \n \n \n
    ^International(Stock Watch,Asset_StockData);\n
    \">\n ^International(Last Update,Asset_StockData);: EDT
    \n \n
    \n
    \n
    \n \n \n \n \n \n \n \n \n \n \n qmmt_cycleqmmt_main\'>\n \n \n \n \n \n \n \n
    Name SymbolLastTickChg
    \n \')\">\n \n /\" alt=\"\" />\n _up_down\" style=\"text-align: right;whitespace:nowrap;\">
    \n
    ','StockData',1,1,'StockDataTMPL000000001',1315877144,'WebGUI::Asset::Template::HTMLTemplate',1,'\">\n\n

    \n
    \n\n

    \n
    \n\n

    \n\n\n\n\n\n\n\n\n
    \n
    \n\n\n\n\n\n
    ^International(Stock Watch,Asset_StockData);\n
    \n^International(Last Update,Asset_StockData);: EDT
    \n\n
    \n
    \n
    \n\n\n\n\n\n\n\n\n\n\nqmmt_cycleqmmt_main\'>\n\n\n\n\n\n\n\n
    Name SymbolLastTickChg
    \n\')\">\n\n/\" alt=\"\" />\n_up_down\" style=\"text-align: right;whitespace:nowrap;\">
    \n
    ',0,NULL,NULL),('\r\n

    \" class=\"editStory\">\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\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\r\n \r\n \r\n\r\n\r\n \r\n \r\n\r\n\r\n
    ^International(photo,WebGUI);
    \">\" alt=\"\" style=\"border-style:none;vertical-align:middle;\" />
    ^International(or,WebGUI);
    \r\n
    \r\n\r\n
    \r\n \r\n
    \r\n\r\n\r\n
    \r\n\r\n\r\n
    \r\n','Story/Edit',1,1,'E3tzZjzhmYoNlAyP2VW33Q',1303183716,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \" class=\"editStory\">\n
    \n\n\n
    \n \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(photo,WebGUI);
    \">\" alt=\"\" style=\"border-style:none;vertical-align:middle;\"/>
    ^International(or,WebGUI);
    \n
    \n
    \n \n
    \n\n
    \n
    ',0,NULL,'[]'),('\r\n\r\n\r\n\r\n\r\n','Map/View',1,1,'9j0_Z1j3Jd0QBbY2akb6qw',1304392055,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n',0,NULL,NULL),('\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
    ','MapPoint/Edit',1,1,'oHh0UqAJeY7u2n--WD-BAA',1304392055,'WebGUI::Asset::Template::HTMLTemplate',1,'\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ',0,NULL,'[]'),('
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n,\r\n\r\n


    \r\n
    \r\n\">
    \r\n^International(phone label,Asset_MapPoint);:
    \r\n^International(fax label,Asset_MapPoint);:
    \r\n\">
    \r\n);\" />\r\n
    ','MapPoint/View',1,1,'u9vfx33XDk5la1-QC5FK7g',1304392055,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    \n
    \n
    \n
    \n,\n\n


    \n
    \n
    \">
    \n^International(phone label,Asset_MapPoint);:
    \n^International(fax label,Asset_MapPoint);:
    \n\">
    \n);\" />\n
    ',0,NULL,'[]'),('

    ^International(has posted to one of your subscriptions,Asset_Collaboration);

    \n\n\n\n\n\n

    ^International(attachments, Asset_Article);\n
    \n
    \n\n\n\n
    \n \n
    \n
    \n\n
    \n \n
    \n
    \n\n
    \n \n
    \n
    \n\n
    \n \n
    \n
    \n\n
    \n \n
    \n
    \n\n\n

    \">

    \n

    \">View this message on the web site.

    \n','Collaboration/Notification',1,1,'PBtmpl0000000000000027',1311652541,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
     
    ^International(has posted to one of your subscriptions,Asset_Collaboration);
    #\">#
      
    \n

    \">

    ',0,NULL,NULL),('\n

    \n

    \n

    ^International(badge holder information,Asset_EventManagementSystem);

    \n\n\n

    \n
    \n\n\n \n \n \n \n \n \n \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ^International(name,Shop);
    ^International(organization,Asset_EventManagementSystem);
    ^International(address,Shop);
     
     
    ^International(city,Shop);
    ^International(state,Shop);
    ^International(code,Shop);
    ^International(country,Shop);
    ^International(phone number,Shop);
    ^International(email address,Asset_EventManagementSystem);
     
    \n
    \n
    \n
    \n
    \n
     
    \n\n\n\n\n\n\n\n\n\n\n','EMSBadge',1,1,'PBEmsBadgeTemplate0000',1313542962,'WebGUI::Asset::Template::HTMLTemplate',1,'

    \n

    \n

    ^International(badge holder information,Asset_EventManagementSystem);

    \n\n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(name,Shop);
    ^International(organization,Asset_EventManagementSystem);
    ^International(address,Shop);
     
     
    ^International(city,Shop);
    ^International(state,Shop);
    ^International(code,Shop);
    ^International(country,Shop);
    ^International(phone number,Shop);
    ^International(email address,Asset_EventManagementSystem);
    \n\n',0,NULL,NULL),('
    \n\n
    \n\n\n\n\n \n\n\n \n\n\n \n \n \n \n \n \n\n\nalt\">\n \n \n \n \n \n \n\n\n\n \n\n\n \n\n\n \n\n\n\n \n \n \n\n\n \n \n \n \n\n\n \n \n \n \n\n\n \n \n\n\n \n \n \n\n\n \n\n\n \n \n \n \n \n\n\n \n \n \n \n\n\n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n\n\n \n \n \n\n\n \n \n \n \n \n\n\n \n\n\n\n\n \n \n\n\n \n\n\n
     
    ^International(remove button,Shop);^International(item,Shop);^International(price,Shop);^International(quantity,Shop);^International(extended price,Shop);^International(per item shipping,Shop);
    \n \n \n
    \n \n \n ^International(not applicable,Shop);\n
    \n
    \n
     
     
      
    ^International(Billing Address,Shop); ^International(Shipping Address,Shop);
    ^International(use same shipping as billing,Shop);
     
      
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ^International(label help,Shop);
    \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ^International(label help,Shop);
    \n
      
     
    ^International(tax,Shop);
    ^International(shipping,Shop);\n \n
    ^International(payment methods,PayDriver);\n \n
    ^International(in shop credit,Shop);(^International(available,Shop);: )
    ^International(total,Shop);
    (^International(required minimum order amount,Shop); )
      
     
    ^International(order for,Shop);
     
    \n\n\n
    \n

    ^International(50,WebGUI);\n^International(51,WebGUI);
    \">^International(407,WebGUI);

    \n
    \n
    \n','Shop/Cart',1,1,'aIpCmr9Hi__vgdZnDTz1jw',1326776036,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nalt\">\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
     
    ^International(remove button,Shop);^International(item,Shop);^International(price,Shop);^International(quantity,Shop);^International(extended price,Shop);^International(per item shipping,Shop);
    \n\n\n
    \n\n\n^International(not applicable,Shop);\n
    \n
    \n
     
     
      
    ^International(Billing Address,Shop); ^International(Shipping Address,Shop);
    ^International(use same shipping as billing,Shop);
     
      
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(label help,Shop);
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(label help,Shop);
    \n
      
     
    ^International(tax,Shop);
    ^International(shipping,Shop);\n\n
    ^International(payment methods,PayDriver);\n\n
    ^International(in shop credit,Shop);(^International(available,Shop);: )
    ^International(total,Shop);
    (^International(required minimum order amount,Shop); )
      
     
    ^International(order for,Shop);
     
    \n\n\n
    \n

    ^International(50,WebGUI);\n^International(51,WebGUI);
    \">^International(407,WebGUI);

    \n
    \n
    ',0,NULL,'[{\"url\":\"^Extras(/yui/build/yahoo-dom-event/yahoo-dom-event.js);\",\"type\":\"headScript\"},{\"url\":\"^Extras(/yui/build/json/json-min.js);\",\"type\":\"headScript\"},{\"url\":\"^Extras(/yui/build/connection/connection-min.js);\",\"type\":\"headScript\"},{\"url\":\"^Extras(/underscore/underscore-min.js);\",\"type\":\"headScript\"},{\"url\":\"^Extras(/shop/cart.js);\",\"type\":\"bodyScript\"}]'),('
    \r\n

    Add Address

    \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 \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
    ^International(label help,Shop);
    \r\n \r\n\r\n
    \r\n','Shop/Address',1,1,'XNd7a_g_cTvJVYrVHcx2Mw',1326776037,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n

    Add Address

    \n\n
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(label help,Shop);
    \n\n
    ',0,NULL,NULL),('
    \n

    ^International(my purchases,Shop); · ^International(Return to Account,Account);

    \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ^International(order number,Shop);^International(amount,Shop);^International(date,Shop);^International(Status,Shop);
    \">^International(Success,Shop);^International(Failed,Shop);
    \n
    \n','Shop/MyPurchases',1,1,'2gtFt7c0qAFNU3BG_uvNvg',1326776037,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n

    ^International(my purchases,Shop); · ^a(\"Return to Account\");

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(order number,Shop);^International(amount,Shop);^International(date,Shop);^International(Status,Shop);
    \">^International(Success,Shop);^International(Failed,Shop);
    \n
    ',0,NULL,NULL),('

    ^International(thank you message,Shop);

    \n\n\n

    \">^International(order number,Shop);

    \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ^International(date,Shop);
    ^International(amount,Shop);
    ^International(in shop credit used,Shop);
    ^International(taxes,Shop);
    ^International(shipping method,Shop);
    ^International(shipping amount,Shop);
    ^International(shipping address,Shop);
    ^International(payment method,Shop);
    ^International(status message,Shop);
    ^International(payment address,Shop);
    \n
    \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n
    ^International(date,Shop);^International(item,Shop);^International(price,Shop);^International(quantity,Shop);^International(shipping address,Shop);^International(order status,Shop);^International(tracking number,Shop);
    \">
    \n ','Shop/EmailReceipt',1,1,'bPz1yk6Y9uwMDMBcmMsSCg',1326776037,'WebGUI::Asset::Template::HTMLTemplate',1,'

    ^International(thank you message,Shop);

    \n

    \">^International(order number,Shop);

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(date,Shop);
    ^International(amount,Shop);
    ^International(in shop credit used,Shop);
    ^International(taxes,Shop);
    ^International(shipping method,Shop);
    ^International(shipping amount,Shop);
    ^International(shipping address,Shop);
    ^International(payment method,Shop);
    ^International(status message,Shop);
    ^International(payment address,Shop);
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(date,Shop);^International(item,Shop);^International(price,Shop);^International(quantity,Shop);^International(shipping address,Shop);^International(order status,Shop);^International(tracking number,Shop);
    \">
    ',0,NULL,NULL),('
    \r\n \" id=\"id\">\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
    ^ViewCart;
    \r\n \">^International(continue shopping button,Shop);\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','Donation',1,1,'vrKXEtluIhbmAS9xmPukDA',1326776037,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\" id=\"id\">\n\n
    \n
    \n\n

    \n
    \n\n
    \n
    ^ViewCart;
    \n\">^International(continue shopping button,Shop);\n\n\n
    \n
    \n
    \n\n\n\n\n\n
    ',0,NULL,NULL),('\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

    \">^International(continue shopping button,Shop);\r\n\r\n\r\n\r\n\r\n','FlatDiscount',1,1,'63ix2-hU0FchXGIWkG3tow',1326776037,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n

    \n
    \n\n

    \n

    \">^International(continue shopping button,Shop);\n\n',0,NULL,NULL),('

    \r\n \" id=\"id\">\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
    \n','Subscription',1,1,'eqb9sWjFEVq0yHunGV8IGw',1326776037,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\" id=\"id\">\n\n
    \n
    \n
    \n\n

    \n
    \n\n\n\n
    \n\n
    \n
    \n
    (\">)
    \n\n\n\n
    \n
    \n
    ',0,NULL,NULL),('
    \n \n
    default\">\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n\n
    \n
    \n','Shop/AddressBook',1,1,'3womoo7Teyy2YKFa25-MZg',1326776037,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n
    default\">\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    ',0,NULL,NULL),('
    \r\n

    Cart

    \r\n
    \r\n \r\n
    ) ()
    \r\n
    \r\n
    \r\n
    \r\n ^International(total,Shop);: \r\n
    \r\n
    \r\n ^ViewCart;\r\n
    \r\n
    \r\n','Shop/MiniCart',1,1,'EBlxJpZQ9o-8VBOaGQbChA',1326776037,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n

    Cart

    \n
    \n\n
    ) ()
    \n
    \n
    \n
    \n^International(total,Shop);: \n
    \n
    \n^ViewCart;\n
    \n
    ',0,NULL,NULL),('
    \n \n
    \n
    \n\n

    ^International(order number,Shop);

    \n \n \n \n \n\n
      \n
    • ^International(date,Shop);
    • \n
    • ^International(Status,Shop);^International(Success,Shop);^International(Failed,Shop);
    • \n
    • ^International(amount,Shop);
    • \n
    • ^International(in shop credit used,Shop);
    • \n
    • ^International(taxes,Shop);
    • \n
    • ^International(shipping method,Shop);
    • \n
    • ^International(shipping amount,Shop);
    • \n
    • ^International(payment method,Shop);
    • \n
    • ^International(status message,Shop);
    • \n
    \n
    \n \n
    \n
    ^International(payment address,Shop);
    \n
    \n
    \n \n
    \n
    ^International(shipping address,Shop);
    \n
    \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    ^International(date,Shop);^International(item,Shop);^International(price,Shop);^International(quantity,Shop);^International(shipping address,Shop);^International(order status,Shop);^International(tracking number,Shop);
    \n \n \">\n \n \n \n
    \n \n [\">] \n \n
    \n
    \n
    \n','Shop/MyPurchasesDetail',1,1,'g8W53Pd71uHB9pxaXhWf_A',1326776037,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n
    \n
    \n

    ^International(order number,Shop);

    \n\n\n\n
      \n
    • ^International(date,Shop);
    • \n
    • ^International(Status,Shop);^International(Success,Shop);^International(Failed,Shop);
    • \n
    • ^International(amount,Shop);
    • \n
    • ^International(in shop credit used,Shop);
    • \n
    • ^International(taxes,Shop);
    • \n
    • ^International(shipping method,Shop);
    • \n
    • ^International(shipping amount,Shop);
    • \n
    • ^International(payment method,Shop);
    • \n
    • ^International(status message,Shop);
    • \n
    \n
    \n
    \n
    ^International(payment address,Shop);
    \n
    \n
    \n
    \n
    ^International(shipping address,Shop);
    \n
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    ^International(date,Shop);^International(item,Shop);^International(price,Shop);^International(quantity,Shop);^International(shipping address,Shop);^International(order status,Shop);^International(tracking number,Shop);
    \n\">\n
    \n\n[\">]\n\n
    \n
    \n
    ',0,NULL,NULL),('\nBatch: \n\n\n
    \n\n','Operation/RedeemSubscription',1,1,'PBtmpl0000000000000053',1326776037,'WebGUI::Asset::Template::HTMLTemplate',1,'\nBatch: \n\n
    \n',0,NULL,NULL),('
    \n \n
    \n
      \n
    • \n
    \n
    \n
    \n\n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n
      
    ^International(subtotal,Shop);
    ^International(taxes,Shop);
    ^International(shipping,Shop);
    ^International(in shop credit,Shop);(^International(available,Shop);: )
    ^International(total,Shop);
      
    \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n
    ','Shop/Credentials',1,1,'itransact_credentials1',1326776037,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n
    \n
      \n
    • \n
    \n
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
      
    ^International(subtotal,Shop);
    ^International(taxes,Shop);
    ^International(shipping,Shop);
    ^International(in shop credit,Shop);(^International(available,Shop);: )
    ^International(total,Shop);
      
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n
    ',0,NULL,NULL),('

    ^International(Enter VAT numbers,TaxDriver_EU);

    \n\n\n

    \n ^International(70,WebGUI);: \n

    \n
    \n\n\n\n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n\n \n
    ^International(country,WebGUI);^International(vat number,TaxDriver_EU);^International(Approved for use,TaxDriver_EU);
    ^International(138,WebGUI);^Internation(139,WebGUI);\">^International(576,WebGUI);
    \n
    \n
    \n\n

    \n ^International(Add another VAT number,TaxDriver_EU);:
    \n \n

    ','TaxDriver/EU/User',1,1,'D6cJpRcey35aSkh9Q_FPUQ',1326776037,'WebGUI::Asset::Template::HTMLTemplate',1,'

    Enter VAT numbers

    \n\n

    \nError: \n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    CountryVAT NumberApproved for use
    yesno\">delete
    \n
    \n
    \n

    \nAdd another VAT Number:
    \n\n

    ',0,NULL,NULL),('\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n
      
    ^International(subtotal,Shop);
    ^International(taxes,Shop);
    ^International(shipping,Shop);
    ^International(in shop credit,Shop);(^International(available,Shop);: )
    ^International(total,Shop);
      
    \n','Shop/Credentials',1,1,'30h5rHxzE_Q0CyI3Gg7EJw',1326776037,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
      
    ^International(subtotal,Shop);
    ^International(taxes,Shop);
    ^International(shipping,Shop);
    ^International(in shop credit,Shop);(^International(available,Shop);: )
    ^International(total,Shop);
      
    ',0,NULL,NULL),('\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n
      
    ^International(subtotal,Shop);
    ^International(taxes,Shop);
    ^International(shipping,Shop);
    ^International(in shop credit,Shop);(^International(available,Shop);: )
    ^International(total,Shop);
      
    \n','Shop/Credentials',1,1,'jysVZeUR0Bx2NfrKs5sulg',1326776037,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
      
    ^International(subtotal,Shop);
    ^International(taxes,Shop);
    ^International(shipping,Shop);
    ^International(in shop credit,Shop);(^International(available,Shop);: )
    ^International(total,Shop);
      
    ',0,NULL,NULL),('\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n
      
    ^International(subtotal,Shop);
    ^International(taxes,Shop);
    ^International(shipping,Shop);
    ^International(in shop credit,Shop);(^International(available,Shop);: )
    ^International(total,Shop);
      
    \n','Shop/Credentials',1,1,'300AozDaeveAjB_KN0ljlQ',1326776037,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
      
    ^International(subtotal,Shop);
    ^International(taxes,Shop);
    ^International(shipping,Shop);
    ^International(in shop credit,Shop);(^International(available,Shop);: )
    ^International(total,Shop);
      
    ',0,NULL,NULL),('\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n
      
    ^International(subtotal,Shop);
    ^International(taxes,Shop);
    ^International(shipping,Shop);
    ^International(in shop credit,Shop);(^International(available,Shop);: )
    ^International(total,Shop);
      
    \n','Shop/Credentials',1,1,'GqnZPB0gLoZmqQzYFaq7bg',1326776037,'WebGUI::Asset::Template::HTMLTemplate',1,'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
      
    ^International(subtotal,Shop);
    ^International(taxes,Shop);
    ^International(shipping,Shop);
    ^International(in shop credit,Shop);(^International(available,Shop);: )
    ^International(total,Shop);
      
    ',0,NULL,NULL),('
    \r\n

    \r\n\r\n\r\n
    \r\n
    \r\n
    ','Shop/selectGateway',1,1,'2GxjjkRuRkdUg_PccRPjpA',1326776038,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n

    \n\n
    \n
    \n
    ',0,NULL,NULL),('
    \n \n
    \n
      \n
    • \n
    \n
    \n
    \n\n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n\n \n \n \n \n \n\n
      
    ^International(subtotal,Shop);
    ^International(taxes,Shop);
    ^International(shipping,Shop);
    ^International(in shop credit,Shop);(^International(available,Shop);: )
    ^International(total,Shop);
      
    \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n
    ','Shop/Credentials',1,1,'Rqwgh50A3gGcOKIrdi_kxw',1326776038,'WebGUI::Asset::Template::HTMLTemplate',1,'
    \n\n
    \n
      \n
    • \n
    \n
    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
      
    ^International(subtotal,Shop);
    ^International(taxes,Shop);
    ^International(shipping,Shop);
    ^International(in shop credit,Shop);(^International(available,Shop);: )
    ^International(total,Shop);
      
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n\n
    ',0,NULL,NULL),('\n

    \n
    \n\n\n \n\n\n\n\n\n\n \n\n\n \n\n\n \n\n\n \n\n
    \n ?type=day\">^International(label day,Asset_Calendar);\n ?type=week\">^International(label week,Asset_Calendar);\n ?type=month\">^International(label month,Asset_Calendar);\n ?type=list\">^International(486,WebGUI);\n \">^International(label search,Asset_Calendar);\n
    \n  \n
    \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n\n
    \n
    ^International(keyword,Asset_Calendar);
    \n
    \n
    \n
    ^International(start date,Asset_Calendar);
    \n
    \n
    \n
    ^International(end date,Asset_Calendar);
    \n
    \n
    \n
    \n \n
    \n\n\n\n\n\n\n\n \n\n\n \n\n\n \n\n\n \n\n
    \n
    \n ^International(search results,Asset_Calendar);\n ^International(page x of x,Asset_Calendar,,);\n
    \n
    \n
    \n \n \n \n
    \n
    \n \n \n \n \n \n
    \n
    \n
    \n \" style=\"padding-left:10px\">\n
    \n
    \n
    \n \n \n \n
    \n
    \n
    ','Calendar/Search',1,1,'CalendarSearch00000001',1326776038,'WebGUI::Asset::Template::HTMLTemplate',1,'\n

    \n
    \n\n

    \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n?type=day\">^International(label day,Asset_Calendar);\n?type=week\">^International(label week,Asset_Calendar);\n?type=month\">^International(label month,Asset_Calendar);\n?type=list\">^International(486,WebGUI);\n\">^International(label search,Asset_Calendar);\n
    \n \n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n
    ^International(keyword,Asset_Calendar);
    \n
    \n
    \n
    ^International(start date,Asset_Calendar);
    \n
    \n
    \n
    ^International(end date,Asset_Calendar);
    \n
    \n
    \n
    \n\n
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n
    \n^International(search results,Asset_Calendar);\n^International(page x of x,Asset_Calendar,,);\n
    \n
    \n
    \n\n\n\n
    \n
    \n\n\n\n\n\n
    \n
    \n
    \n\" style=\"padding-left:10px\">\n
    \n
    \n
    \n\n\n\n
    \n
    \n
    ',0,NULL,NULL); ALTER TABLE `template` ENABLE KEYS; ALTER TABLE `userProfileCategory` DISABLE KEYS; INSERT INTO `userProfileCategory` VALUES ('1','WebGUI::International::get(449,\"WebGUI\");','WebGUI::International::get(\"misc info short\",\"WebGUI\");',6,1,1,1),('2','WebGUI::International::get(440,\"WebGUI\");','WebGUI::International::get(\"contact info short\",\"WebGUI\");',2,1,1,1),('3','WebGUI::International::get(439,\"WebGUI\");','WebGUI::International::get(\"personal info short\",\"WebGUI\");',1,1,1,1),('4','WebGUI::International::get(445,\"WebGUI\");','WebGUI::International::get(\"preferences short\",\"WebGUI\");',7,0,1,1),('5','WebGUI::International::get(443,\"WebGUI\");','WebGUI::International::get(\"home info short\",\"WebGUI\");',3,1,1,1),('6','WebGUI::International::get(442,\"WebGUI\");','WebGUI::International::get(\"work info short\",\"WebGUI\");',4,1,1,1),('7','WebGUI::International::get(444,\"WebGUI\");','WebGUI::International::get(\"demographic info short\",\"WebGUI\");',5,1,1,1); @@ -2519,9 +2712,9 @@ ALTER TABLE `vendor` DISABLE KEYS; INSERT INTO `vendor` VALUES ('defaultvendor000000000','2008-06-12 19:43:10','Default Vendor','3',NULL,NULL,NULL,NULL); ALTER TABLE `vendor` ENABLE KEYS; ALTER TABLE `wobject` DISABLE KEYS; -INSERT INTO `wobject` VALUES (0,'This is the latest news from Plain Black and WebGUI pulled directly from the site every hour.','fK-HMSboA3uu0c1KYkYspA','stevestyle000000000003','PBtmpl0000000000000111',1124395696,'stevestyle000000000003'),(1,NULL,'PBasset000000000000002','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'7-0-style0000000000026','PBtmpl0000000000000060','',1147642499,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000001','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000014','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000015','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000016','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000017','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000018','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000019','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000020','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000021','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000002','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000006','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000007','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000008','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000009','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000010','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000011','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000012','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000013','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'7-0-style0000000000070','PBtmpl0000000000000060','PBtmpl0000000000000060',1147642510,'PBtmpl0000000000000060'),(1,NULL,'7-0-style0000000000001','PBtmpl0000000000000060','',1147642492,'PBtmpl0000000000000060'),(1,NULL,'7-0-style0000000000031','PBtmpl0000000000000060','',1147642500,'PBtmpl0000000000000060'),(0,NULL,'7-0-style0000000000025','PBtmpl0000000000000060','',1147642498,'PBtmpl0000000000000060'),(1,NULL,'PBasset000000000000003','PBtmpl0000000000000060','PBtmpl0000000000000111',1147642437,'PBtmpl0000000000000060'),(1,NULL,'nbSrhXZQuxIjhWFaFPSuVA','PBtmpl0000000000000060','',1147642465,'PBtmpl0000000000000060'),(1,NULL,'N13SD1Fpqk00UgBt1Z8ivQ','PBtmpl0000000000000060','',1147642470,'PBtmpl0000000000000060'),(1,NULL,'-WM2dt0ZGpDasuL2wWocxg','PBtmpl0000000000000060','PBtmpl0000000000000111',1222803056,'PBtmpl0000000000000060'),(1,NULL,'3uuBf8cYuj1sew2OJXl9tg','PBtmpl0000000000000060','',1147642470,'PBtmpl0000000000000060'),(1,NULL,'cj2y4papTVGZRFdwTI-_fw','PBtmpl0000000000000060','',1147642475,'PBtmpl0000000000000060'),(1,NULL,'bBzO4CWjqU_ile3gf5Iypw','PBtmpl0000000000000060','',1147642475,'PBtmpl0000000000000060'),(1,NULL,'Da6KWn805L4B5e4HFgQRQA','PBtmpl0000000000000060','',1147642479,'PBtmpl0000000000000060'),(1,NULL,'bbiA9Zq5Gy2oCFBlILO3QA','PBtmpl0000000000000060','',1147642480,'PBtmpl0000000000000060'),(1,NULL,'Efe2W0UgrSRDltNJ87jlfg','PBtmpl0000000000000060','',1147642480,'PBtmpl0000000000000060'),(1,NULL,'9wKWdum0_8z-OhhquWLtSQ','PBtmpl0000000000000060','',1147642483,'PBtmpl0000000000000060'),(1,NULL,'CSN-ZON7Uwv8kxf3F1fh5Q','PBtmpl0000000000000060','',1147642484,'PBtmpl0000000000000060'),(1,NULL,'TCtybxdqmdwdvRn555zpCQ','PBtmpl0000000000000060','',1147642484,'PBtmpl0000000000000060'),(1,NULL,'pbproto000000000000002','PBtmpl0000000000000060','',1163019036,'PBtmpl0000000000000060'),(1,NULL,'tempspace0000000000000','PBtmpl0000000000000060','PBtmpl0000000000000060',1185754574,'PBtmpl0000000000000060'),(1,NULL,'Tsg7xmPYv782j6IVz7yHFg','PBtmpl0000000000000060','PBtmpl0000000000000111',1213244777,'PBtmpl0000000000000060'),(1,NULL,'TYo2Bwl7aafzTtdHlS-arQ','PBtmpl0000000000000060','PBtmpl0000000000000060',1211664878,'PBtmpl0000000000000060'),(1,NULL,'6tK47xsaIH-ELw0IBo0uRQ','PBtmpl0000000000000060','PBtmpl0000000000000111',1210777115,'PBtmpl0000000000000060'),(1,NULL,'gbnRhcWNk1iQe32LFEB5eQ','PBtmpl0000000000000060','PBtmpl0000000000000111',1212086102,'PBtmpl0000000000000060'),(1,NULL,'6D4Z-oruXPS6OlH_Kx8pBg','PBtmpl0000000000000060','PBtmpl0000000000000111',1209509389,'PBtmpl0000000000000060'),(1,NULL,'C5fPz-Wg85vkYRvCdl-Xqw','PBtmpl0000000000000060','PBtmpl0000000000000111',1212160830,'PBtmpl0000000000000060'),(1,NULL,'jnYdqDkUR8x7Pv2eGR1qTA','PBtmpl0000000000000060','PBtmpl0000000000000111',1216250666,'PBtmpl0000000000000060'),(1,NULL,'2OcUWHVsu_L1sDFzIMWYqw','PBtmpl0000000000000060','PBtmpl0000000000000111',1222803070,'PBtmpl0000000000000060'),(1,NULL,'zyWi26q9na-iiZqL4yedog','PBtmpl0000000000000060','PBtmpl0000000000000111',1222803114,'PBtmpl0000000000000060'),(1,NULL,'tBL7BWiQRZFed2Y-Zjo9tQ','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803200,'PBtmpl0000000000000060'),(1,NULL,'GdkQpvjRtJqtzOUbwIIQRA','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803205,'PBtmpl0000000000000060'),(1,NULL,'tnc5iYyynX2hfdEs9D3P8w','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803213,'PBtmpl0000000000000060'),(1,NULL,'vgXdBcFTqU7h4wBG1ewdBw','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803217,'PBtmpl0000000000000060'),(1,NULL,'hcFlqnXlsmC1ujN6Id0F0A','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803234,'PBtmpl0000000000000060'),(1,NULL,'eRJR52fvlaxfetv3DQkQYw','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803238,'PBtmpl0000000000000060'),(1,NULL,'5HIDHq5lAWHV5gpYGS0zLg','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803244,'PBtmpl0000000000000060'),(1,NULL,'rYEFwXXo0tkGhQTcbDibvg','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803249,'PBtmpl0000000000000060'),(1,NULL,'V3l5S5TtI7wMm1WpIMhvOA','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803253,'PBtmpl0000000000000060'),(1,NULL,'nqNbSUAhk9Vd1zda2SCz9A','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803258,'PBtmpl0000000000000060'),(1,NULL,'y8XkRdxIperLKkJ3bL5sSQ','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803264,'PBtmpl0000000000000060'),(1,NULL,'vTymIDYL2YqEh6PV50F7ew','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803302,'PBtmpl0000000000000060'),(1,NULL,'lo1ac3BsoJx3ijGQ3gR-bQ','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803309,'PBtmpl0000000000000060'),(1,NULL,'huASapWvFDzqwOSbcN-JFQ','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803313,'PBtmpl0000000000000060'),(1,NULL,'9A-mg2gwWmaYi9o_1C7ArQ','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803338,'PBtmpl0000000000000060'),(1,NULL,'yD1SMHelczihzjEmx6eXBA','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803342,'PBtmpl0000000000000060'),(1,NULL,'pV7GnZdpjR3XpZaSINIoeg','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803347,'PBtmpl0000000000000060'),(1,NULL,'71e17KeduiXgODLMlUxiow','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803352,'PBtmpl0000000000000060'),(1,NULL,'Ik9HHky10DIyFTKehUD1dw','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803478,'PBtmpl0000000000000060'),(1,NULL,'NywJYmGWe1f6EBXJnWg9Xg','PBtmpl0000000000000060','PBtmpl0000000000000111',1222803638,'PBtmpl0000000000000060'),(1,NULL,'AgyFhx3eXlfZXNp2MkrsiQ','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803665,'PBtmpl0000000000000060'),(1,NULL,'F7MAQ-cpuvQ1KuC7J4P5zQ','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803673,'PBtmpl0000000000000060'),(1,NULL,'BmLaN4rmAANkCglXUViEbg','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803871,'PBtmpl0000000000000060'),(1,NULL,'X7DrzUcj8pOKFa_6k9D5iw','PBtmpl0000000000000060','PBtmpl0000000000000060',1222804045,'PBtmpl0000000000000060'),(1,NULL,'UL-ItI4L1Z6-WSuhuXVvsQ','stevestyle000000000003','PBtmpl0000000000000111',1225139673,'stevestyle000000000003'),(1,NULL,'7-0-style0000000000049','PBtmpl0000000000000060','PBtmpl0000000000000060',1224117144,'PBtmpl0000000000000060'),(0,NULL,'jVKLVakT_iA2010_oEuAwg','PBtmpl0000000000000060','PBtmpl0000000000000060',1224116526,'PBtmpl0000000000000060'),(1,'

     

    ','QpmlAiYZz6VsKBM-_0wXaw','stevestyle000000000003','PBtmpl0000000000000111',1224616691,'stevestyle000000000003'),(1,NULL,'HPDOcsj4gBme8D4svHodBw','PBtmpl0000000000000060','PBtmpl0000000000000111',1225404573,'PBtmpl0000000000000060'),(1,NULL,'IZkrow_zwvbf4FCH-taVTQ','PBtmpl0000000000000060','PBtmpl0000000000000111',1226011853,'PBtmpl0000000000000060'),(1,NULL,'K0YjxqOqr7RupSo6sIdcAg','PBtmpl0000000000000060','PBtmpl0000000000000111',1227074310,'PBtmpl0000000000000060'),(1,NULL,'_ilRXNR3s8F2vGJ_k9ePcg','PBtmpl0000000000000060','PBtmpl0000000000000111',1226643205,'PBtmpl0000000000000060'),(1,NULL,'qaVcU0FFzzraMX_bzELqzw','PBtmpl0000000000000060','PBtmpl0000000000000111',1227074362,'PBtmpl0000000000000060'),(1,NULL,'QHn6T9rU7KsnS3Y70KCNTg','PBtmpl0000000000000060','PBtmpl0000000000000111',1233173545,'PBtmpl0000000000000060'),(1,NULL,'HW-sPoDDZR8wBZ0YgFgPtg','PBtmpl0000000000000060','PBtmpl0000000000000111',1227634350,'PBtmpl0000000000000060'),(1,NULL,'AOjPG2NHgfL9Cq6dDJ7mew','PBtmpl0000000000000060','PBtmpl0000000000000111',1236960881,'PBtmpl0000000000000060'),(1,NULL,'jmlI9IK-lV8n2WMYmmPhAA','PBtmpl0000000000000060','PBtmpl0000000000000111',1238106173,'PBtmpl0000000000000060'),(1,NULL,'6uvSLY-ak_w4p_wS8q33cA','PBtmpl0000000000000060','PBtmpl0000000000000111',1239213092,'PBtmpl0000000000000060'),(1,NULL,'GaBAW-2iVhLMJaZQzVLE5A','stevestyle000000000003','PBtmpl0000000000000111',1240103565,'stevestyle000000000003'),(1,'

    Templates for the Friend Manager

    ','lo1rpxn3t8YPyKGers5eQg','PBtmpl0000000000000060','PBtmpl0000000000000111',1238625621,'PBtmpl0000000000000060'),(1,NULL,'aNNC62qLAS6TB-0_MCYjsw','PBtmpl0000000000000060','PBtmpl0000000000000060',1246969327,'PBtmpl0000000000000060'),(1,NULL,'BFfNj5wA9bDw8H3cnr8pTw','PBtmpl0000000000000060','PBtmpl0000000000000060',1247046273,'PBtmpl0000000000000060'),(1,NULL,'f_tn9FfoSfKWX43F83v_3w','PBtmpl0000000000000060','PBtmpl0000000000000060',1247053009,'PBtmpl0000000000000060'),(1,NULL,'oGfxez5sksyB_PcaAsEm_Q','PBtmpl0000000000000060','PBtmpl0000000000000060',1247053097,'PBtmpl0000000000000060'),(1,NULL,'tPagC0AQErZXjLFZQ6OI1g','PBtmpl0000000000000060','PBtmpl0000000000000060',1246966459,'PBtmpl0000000000000060'),(1,NULL,'GYaFxnMu9UsEG8oanwB6TA','PBtmpl0000000000000060','PBtmpl0000000000000060',1246965871,'PBtmpl0000000000000060'),(1,NULL,'VZK3CRgiMb8r4dBjUmCTgQ','PBtmpl0000000000000060','PBtmpl0000000000000060',1247046242,'PBtmpl0000000000000060'),(1,NULL,'tXwf1zaOXTvsqPn6yu-GSw','PBtmpl0000000000000060','PBtmpl0000000000000060',1246965607,'PBtmpl0000000000000060'),(1,NULL,'5bnNzteN7w3NnK9mF4XiCg','PBtmpl0000000000000060','PBtmpl0000000000000060',1250243000,'PBtmpl0000000000000060'),(1,NULL,'RSAMkc6WQmfRE3TOr1_3Mw','PBtmpl0000000000000060','PBtmpl0000000000000111',1250243000,'PBtmpl0000000000000060'),(1,NULL,'fowHfgOkJtAxdst7rugTog','PBtmpl0000000000000060','PBtmpl0000000000000111',1252595993,'PBtmpl0000000000000060'),(1,NULL,'TvOZs8U1kRXLtwtmyW75pg','PBtmpl0000000000000060','PBtmpl0000000000000060',1256092368,'PBtmpl0000000000000060'),(1,NULL,'4qh0kIsFUdd4Ox-Iu1JZgg','PBtmpl0000000000000060','PBtmpl0000000000000111',1257311886,'PBtmpl0000000000000060'),(1,'

     

    ','-K8Hj45mbelljN9-0CXZxg','PBtmpl0000000000000060','PBtmpl0000000000000060',1257311887,'PBtmpl0000000000000060'),(1,NULL,'P_4uog81vSUK4KxuW_4GUA','PBtmpl0000000000000060','PBtmpl0000000000000111',1258524916,'PBtmpl0000000000000060'),(0,NULL,'t87D1138NhPHhA23-hozBA','PBtmpl0000000000000060','PBtmpl0000000000000060',1273032716,'PBtmpl0000000000000060'),(0,NULL,'QtBumey5ffc-xffRp1-7Aw','PBtmpl0000000000000060','PBtmpl0000000000000060',1273032716,'PBtmpl0000000000000060'),(1,NULL,'x_hiUi1XZloBvV47Obnu8Q','OiJNwP1gAlcva8_yOtL4gA','PBtmpl0000000000000111',1273032718,'PBtmpl0000000000000060'),(0,NULL,'UUwEL6hLEPdrnkZnKRzFYQ','OiJNwP1gAlcva8_yOtL4gA','PBtmpl0000000000000111',1273032718,'PBtmpl0000000000000060'),(1,NULL,'Q4uX_C557arTp6D_jwB1jQ','PBtmpl0000000000000060','PBtmpl0000000000000060',1273032720,'PBtmpl0000000000000060'),(1,NULL,'GNOAsX98vCsl0JRwfwL-gg','PBtmpl0000000000000060','PBtmpl0000000000000060',1277868921,'PBtmpl0000000000000060'),(1,NULL,'_iHetEvMQUOoxS-T2CM0sQ','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1273172789,'stevestyle000000000003'),(0,'

    \nCongratulations on successfully installing the WebGUI Content Engine®. If you used the Site Starter to select a set of default pages, you will see those pages in the site navigation. You will also notice that a number of additional pages appear, such as this page. These are default pages added for your convenience to help you get started with WebGUI and find the resources you need. Feel free to remove these extra pages whenever you are ready.

    \n

    To get started managing content, download the PDF document below. This document provides a basic introduction to the WebGUI user interface. 

    \n

    WebGUI Basics (PDF)

    \n

    Once you have read this document, you may want to head over to the Documentation section where you can find more WebGUI resources.

    ','bX5rYxb6tZ9docY6sUhBlw','Qk24uXao2yowR6zxbVJ0xA','stevestyle000000000003',1278013772,'stevestyle000000000003'),(1,'

    Plain Black® created the WebGUI Content Engine® and is here to answer \nyour questions and provide you with services to make sure your WebGUI \nimplementation is entirely successful. We bend over backwards to make \nsure you\'re a success. Contact us today to \nsee how we can help you.

    ','8Bb8gu-me2mhL3ljFyiWLg','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1271359194,'stevestyle000000000003'),(1,'

    Plain Black provides support packages to fit any budget or need. Start out with online support which costs only $500 per year, or work with Plain Black to build a custom support package tailored to your specific needs. No matter what level of support you purchase, you will get personalized and friendly service in a timely manner.

    ','ix1p0AbwKAz8QWB-T-HHfg','Qk24uXao2yowR6zxbVJ0xA','stevestyle000000000003',1271359087,'stevestyle000000000003'),(1,'

    Plain Black\'s professionally trained WebGUI experts can handle the task\nof hosting your web site, intranet, or extranet. Let us deal with upgrades, security, and server management so you focus on building your WebGUI site, which is where your time and expertise should be spent. And when you sign up with hosting, online support is included!

    ','iCYOjohB9SKvAPr6bXElKA','Qk24uXao2yowR6zxbVJ0xA','stevestyle000000000003',1271445525,'stevestyle000000000003'),(1,'

    WebGUI\'s robust API allows for easy customization. Plain Black\'s team of developers can create any features you need for your site. We\'ve built hundreds of custom applications for people. From simple macros, to custom single sign on systems, to applications that will manage your entire company, our team will leverage the power of WebGUI to your advantage.

    ','4Yfz9hqBqM8OYMGuQK8oLw','Qk24uXao2yowR6zxbVJ0xA','stevestyle000000000003',1271352537,'stevestyle000000000003'),(1,'

    Branding and visual appeal are powerful marketing tools. Don\'t let your site become a wallflower. Plain Black\'s professional design team can create a custom design to make your site stand out. Our team is fast, easy to work with, and can even migrate your existing content into your new WebGUI site.

    ','Wl8WZ43g2rK5AYr9o4zY7w','Qk24uXao2yowR6zxbVJ0xA','stevestyle000000000003',1271445539,'stevestyle000000000003'),(1,'

    Let our team of professional translators bring your site to new customers by translating your content into additional languages. Our translation services are never machine automated. They\'re always done by professional translators that have years of experience reading, writing, and speaking many languages.

    ','LBuiKzg2mWwmOPS9AgV3bg','Qk24uXao2yowR6zxbVJ0xA','stevestyle000000000003',1271348789,'stevestyle000000000003'),(1,'

    Now that you have a brilliant WebGUI site, you need to get people to visit it. We can help there too. Our marketing specialists can work with you to develop and execute the right combination of search engine placement, advertising buys, and affilliate programs to ensure your site gets the traffic it needs.

    ','jTNggl7AoVSUc_ZzrvuCmw','Qk24uXao2yowR6zxbVJ0xA','stevestyle000000000003',1271348789,'stevestyle000000000003'),(1,'

    With any large system, having the right documentation to get you started is mandatory. The good news is that WebGUI has abundant documentation.

    ','mTOiwwk3q4k9g5-XykXhPA','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1271349647,'stevestyle000000000003'),(1,'

    The WebGUI project community is a diverse and talented group. If you \nwould like to contribute back to the project there are many ways to \nbecome involved.

    ','2TqQc4OISddWCZmRY1_m8A','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1271357565,'stevestyle000000000003'),(1,'

    You can find members of the community on the #webgui chat channel on the Freenode IRC network. If you\'re not \nfamiliar with IRC, it\'s essentially like a chat room. A few things you\'ll need to know:

    \n
      \n
    \n
      \n
    • You need an IRC client program. There are many available that \ncan be downloaded free of charge.
    • \n
    • The IRC network we use is Freenode
    • \n
    • Our channel is #webgui.
    • \n
    • Channel operators have an @ next to their name. All channel operators in #webgui are Plain Black employees.
    • \n
    • Someone with a + next to their name is a recognized contributor in the WebGUI community. People who have been recognized as one of the People Behind WebGUI are often given this designation.
    • \n
    \n
      \n\n\n
    \n

    If you\'re looking for a mentor, recognized contributors are a good place\n to start.

    ','k2Qj03FrAOXYra8kDJYYXw','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1271357513,'PBtmpl0000000000000060'),(1,'

    An annual event, this is the one time a year when WebGUI users and Plain\n Black\'s staff come together to do all things WebGUI.  This is by far \nthe best way to get involved with the community as nothing can replace \nface to face interaction and mentoring. The conference is usually held \nin the fall of each year and more information on attending can be found \non the WebGUI Users \nConference website as details become available.

    ','ksSfkZdsr0uC62NwIk6hFQ','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1271356973,'PBtmpl0000000000000060'),(1,'

    WebGUI \nForums are available for WebGUI related\n discussion and community support. Bounce around ideas, discuss \nimportant issues, and ask community members for help and advice. WebGUI \nForums are broken up into:

    \n','nWxS5jnA3o3DgPEwBeR7yQ','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1271357239,'PBtmpl0000000000000060'),(0,NULL,'x3OFY6OJh_qsXkZfPwug4A','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1271348790,'stevestyle000000000003'),(0,NULL,'pJd5TLAjfWMVXD6sCRLwUg','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1271348790,'stevestyle000000000003'),(0,'

    The WebGUI Content Engine® is a powerful, easy to use web application framework and content management system. WebGUI contains dozens of built-in features, and allows for full customization through its rich API. It\'s easy enough for the average business user to use, but powerful enough for any large enterprise.

    \n

    WebGUI serves thousands of small and large businesses, schools, universities, governments, associations, churches, projects and communities throughout the world. For examples of who is using WebGUI, visit the WebGUI Sightings page. Shouldn\'t your site be on this list?

    \n

    If you\'re new to WebGUI, visit the Getting Started section. Once you feel comfortable, explore some of the professional services available for your new WebGUI site. No matter what level you\'re at, tell your friends about WebGUI.

    ','OhdaFLE7sXOzo_SIP2ZUgA','Qk24uXao2yowR6zxbVJ0xA','stevestyle000000000003',1271445348,'stevestyle000000000003'),(1,'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n

    Rich User Interface

    \n
    \n

    Powerful API

    \n
    \n

    WebGUI has a rich user experience that allows users to place their \ncontent\nthrough a drag-n-drop interface; helps users pick dates, colors, and\nmore; and has a highly customizable rich editor to allow users to \nquickly and easily format\ncontent.

    \n
    \n

    WebGUI allows developers to quickly plug-in new functionality to\nget the most from a site. In addition, WebGUI\'s standardized plug-in\npoints maintain the upgrade path even with customizations.

    \n
    \n

    Short Friendly URLs

    \n
    \n

    Internationalization

    \n
    \n

    Never worry about ugly numeric \nID\'s or other things in URL\'s that\nmake it hard for search engines and people to use a site.

    \n
    \n

    Users can work in an interface in their native language, and content can\n be published in as many languages as necessary.

    \n
    \n

    Personalization

    \n
    \n

    Easy To Install

    \n
    \n

    Users see their own view of the site through dynamically\ngenerated navigation and content. In addition, content can be displayed \nbased upon users\' viewing habits.

    \n
    \n

    With the use of the WebGUI Runtime Environment (Unix, Mac OS X, Linux, \nBSD) and VMWare Appliance (Windows) setup takes minutes rather than\nhours.

    \n
    ','IWFxZDyGhQ3-SLZhELa3qw','Qk24uXao2yowR6zxbVJ0xA','stevestyle000000000003',1277737686,'stevestyle000000000003'),(1,NULL,'LdiozcIUciWuvt3Z-na5Ww','PBtmpl0000000000000060','PBtmpl0000000000000060',1281501162,'PBtmpl0000000000000060'),(1,NULL,'Vch1Ww7G_JpBhOhXX07RDg','PBtmpl0000000000000060','PBtmpl0000000000000111',1281501163,'PBtmpl0000000000000060'),(1,NULL,'AssetReportFolder00001','PBtmpl0000000000000060','PBtmpl0000000000000060',1281501163,'PBtmpl0000000000000060'),(1,'

    You don\'t have to be a developer to become a project contributor. Examples of how you can contribute include:\n

    \n
      \n
    • Translators - Visit i18n.webgui.org\n and either help translate a few items in an existing language, or \ncreate a new translation.

    • \n
    • Graphic Designers - Create WebGUI style themes, icons, or fix UI\n bugs. You can contribute your items to WebGUI\'s Addons and Plugins area for others to download and use.

    • \n
    • Usability Experts - Help make WebGUI more accessable and \neasier to use by submitting RFEs. Even better, submit an RFE that\'s ready to implement by including the code!

    • \n
    • Doc Writers - Write documents in WebGUI\'s wiki, help\n out on the boards, improve WebGUI\'s built in documentation.

    • \n
    • Testers - Validate WebGUI\'s features against its \ndocumentation, search for errors, and report bugs.

    • \n
    • Test writers - If you have some Perl abilities, you can help \ndevelop unit tests to make sure the WebGUI API is behaving as \ndocumented.

    • \n
    • Developers - Write a new feature for WebGUI like a macro, \nasset, wobject, auth module or workflow activity and contribute it to \nthe Addons and Plugins. If you\'re interested in developing for WebGUI, be sure to check out the Development Best Practices wiki article.

    • \n
    • Bug Fixers - Cruise the bug list and submit patches to \ncorrect the problem.

    • \n
    • Core Developers - Becoming a core developer is a privilege. To earn it, you have to demonstrate through bug fixes and/or \ncontributions that you can make sound programming decisions without the \nneed for someone to scrutinize everything you check in. WebGUI is a \nvery large and complex application so getting to this level can take \nsome time. Core developers are developers with commit privileges to the\n subversion repository.

    • \n
    • Advocate - Spread the word about WebGUI, tell people about \nhow you use it and how it\'s helped you.Encourage people to try it out.

    • \n
    • Marketing and Promotion - If you have a talent for marketing,\n advertising, or promotion you can be a super advocate! Have a marketing\n idea? Contact tavis AT plainblack DOT com.  Make a WebGUI banner or \nprint ad and contribute it!  Maybe you have a design for a cool \nwallpaper or t-shirt, anything to get the word out.
    • \n
    ','l0guT3vTR3B8cL6vtP-g3A','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1285124369,'PBtmpl0000000000000060'),(1,NULL,'N7uMnnicbyTEulcuRi1sSg','PBtmpl0000000000000060','PBtmpl0000000000000111',1283900195,'PBtmpl0000000000000060'),(1,'

     

    ','gI_TxK-5S4DNuv42wpImmw','PBtmpl0000000000000060','PBtmpl0000000000000111',1285124155,'PBtmpl0000000000000060'),(1,NULL,'kaPRSaf8UKiskiGEgJgLAw','PBtmpl0000000000000060','PBtmpl0000000000000111',1285124155,'2p9ygcqH_Z11qOUvQ1uBvw'),(1,NULL,'RrV4aAPnn4dM0ZcU3OXnlw','PBtmpl0000000000000060','PBtmpl0000000000000060',1286336607,'PBtmpl0000000000000060'),(0,'

    \nTo begin managing content, you should log in and click the Turn Admin On! link. The default username is \"admin\" and the default password is \"123qwe\", but you probably customized both of those when you visited this site for the very first time.\n

    \n

    \nNow that you\'re logged in, we recommend that you add a new user for yourself with admin privileges just in case you forget the login information for your primary admin account. Don\'t worry if you lock yourself out, you can always contact Plain Black® support to get instructions to get back in.\n

    \n

    NOTE: If you appear to get logged out while moving between pages, this is most likely your browser displaying a cached version of the page. Click on your browser\'s refresh button to correct the problem.

    \n

     

    \n

    \nFor more information about services related to WebGUI click here.\n

    \n

    \nEnjoy your new WebGUI site!\n

    ','NK8bqlwVRILJknqeCDPBHg','Qk24uXao2yowR6zxbVJ0xA','stevestyle000000000003',1285796040,'stevestyle000000000003'),(1,'

    Plain Black has created a line of commercial books which total over 1500 pages of detailed documentation about WebGUI. Both black and white and full color editions of these books are available. Visit the book store today to stock your WebGUI library. Other than hands on training, there is no better way to hone your WebGUI skills. No matter what your need, Plain Black has created a book that\'s right for you and is creating new books each year.

    \n

    In the fall of 2010, Plain Black announced that these books will be converted into free wikis. You can now access all WebGUI user guides for free on the WebGUI User Guides page on www.webgui.org.

    \n

    *These books are available for WebGUI version 7.7 and earlier. For later documentation, see the free resources available on the WebGUI project website.

    ','diZvW4bSgZWwyyGP3qXi1g','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1285610019,'stevestyle000000000003'),(1,NULL,'68sKwDgf9cGH58-NZcU4lg','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1286336676,'stevestyle000000000003'),(0,NULL,'Am1J-meNBmhqFfEIWy6Gag','OiJNwP1gAlcva8_yOtL4gA','PBtmpl0000000000000111',1287545014,'PBtmpl0000000000000060'),(1,NULL,'1z9J1O08n_7gVVlBwSRBJQ','PBtmpl0000000000000060','PBtmpl0000000000000111',1287545014,'PBtmpl0000000000000060'),(1,NULL,'xSmREZO3GNzK3M5PaueOOQ','PBtmpl0000000000000060','PBtmpl0000000000000060',1287545014,'PBtmpl0000000000000060'),(1,NULL,'0bx-xoL8TSXXubFuqKAoVQ','PBtmpl0000000000000060','PBtmpl0000000000000060',1287545014,'PBtmpl0000000000000060'),(1,NULL,'taX2UYkFF21ALpFZY2rhMw','PBtmpl0000000000000060','PBtmpl0000000000000060',1287545014,'PBtmpl0000000000000060'),(1,NULL,'K0q_N885Httqev1VCqUWxg','PBtmpl0000000000000060','PBtmpl0000000000000060',1287545014,'PBtmpl0000000000000060'),(1,NULL,'fq1ZkYhH24R5tb96kuT10Q','PBtmpl0000000000000060','PBtmpl0000000000000060',1287545014,'PBtmpl0000000000000060'),(1,NULL,'oHk7fAFhEEkB7dHzi0QOQA','PBtmpl0000000000000060','PBtmpl0000000000000060',1287545014,'PBtmpl0000000000000060'),(1,NULL,'9M-lrlPQWeeNWfvnDnK_Xg','PBtmpl0000000000000060','PBtmpl0000000000000060',1287545014,'PBtmpl0000000000000060'),(1,NULL,'_gBYAdTcbkiyamnqi2Xskg','PBtmpl0000000000000060','PBtmpl0000000000000060',1287545014,'PBtmpl0000000000000060'),(1,NULL,'0iMMbGN3BevuCBHjjLiQNA','PBtmpl0000000000000060','PBtmpl0000000000000111',1287545015,'PBtmpl0000000000000060'),(1,NULL,'6A4yIjWwJfIE0Ep-I0jutg','PBtmpl0000000000000060','PBtmpl0000000000000111',1287545015,'PBtmpl0000000000000060'),(1,'

    Folder for holding Workflow Activity templates.

    ','_cD6DLM_Fs5IlrLeWUjrjg','PBtmpl0000000000000060','PBtmpl0000000000000111',1287545015,'PBtmpl0000000000000060'),(1,NULL,'f2EktltCvwQpl_3-B1yR7g','PBtmpl0000000000000060','PBtmpl0000000000000111',1288748251,'PBtmpl0000000000000060'),(1,NULL,'S1A9iAwKcQQ6P20uTqw-Ew','PBtmpl0000000000000060','PBtmpl0000000000000060',1300763664,'PBtmpl0000000000000060'),(1,'

    There are hundreds of pages of free documentation available for WebGUI, provided by both Plain Black and the community at large. The following list is by no means comprehensive, but it should get you started in the right direction.

    \n

     

    \n
      \n
    • Primer - A downloadable PDF that shows you the basics of publishing content in WebGUI.
    • \n
    • WebGUI User Guides: all commercial user guides previously published by Plain Black are in the process of being converted into wikis. You can find these wikis on the WebGUI User Guides page of www.webgui.org. This is an ongoing process; until all books have been converted, remaining books are being made available as free PDF downloads.
    • \n
    • Wiki - Hundreds of pages of WebGUI community contributed content featuring a variety of tutorials.
    • \n
    • Worldwide - A collection of WebGUI related web sites from all over the world that have documentation and other resources for WebGUI.
    • \n
    • API Docs - The documentation of all of the WebGUI source code.
    • \n
    • Template Help - The documentation of all of WebGUI\'s template variables.
    • \n
    ','j_1qEqM6iLfQLiR6VKy0aA','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1299872071,'stevestyle000000000003'),(1,'

    Templates and images for the \"Underground\" style from StyleShout.com

    ','CQp-RFA2pMh5lFSggPPPYg','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1301973995,'PBtmpl0000000000000060'),(1,NULL,'_Mi_NTd3x8UB96LWezWHnw','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1301973995,'PBtmpl0000000000000060'),(1,NULL,'g3JH1PRq6m6Bj_PnGpcrSQ','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1301973996,'PBtmpl0000000000000060'),(1,'

    This folder holds prototype WebGUI assets with the correct templates pre-selected.

    ','G0hl4VilbFKipToyxKqFrg','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1301973997,'PBtmpl0000000000000060'),(1,NULL,'GWU2qZqe6yEuAKG-5HtBdg','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1301973997,'PBtmpl0000000000000060'),(1,NULL,'AsfpsOpsGzZCb9m7MyxPuw','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1301973997,'PBtmpl0000000000000060'),(1,NULL,'jmqLxnoWb6p92Cr12lf1hw','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1301973997,'PBtmpl0000000000000060'),(1,NULL,'8E2UOnj_XPEghTj7nfVM0g','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1301973997,'PBtmpl0000000000000060'),(1,NULL,'1qFjOEiILIwr1xB5_ebppQ','PBtmpl0000000000000060','PBtmpl0000000000000060',1301973998,'PBtmpl0000000000000060'),(1,NULL,'xD76UfQ_JnSgTLBNvytcpQ','PBtmpl0000000000000060','PBtmpl0000000000000111',1301973998,'PBtmpl0000000000000060'),(0,NULL,'h0bOzz7WvdaVZXsjpwtkww','KKt0VB_eoQxw9xEsHsAhag','PBtmpl0000000000000111',1301973998,'PBtmpl0000000000000060'),(1,NULL,'qFOfW1sKyOTnGNcP6BXbwg','6D98D8TIuhExiSoo2U1eqw','PBtmpl0000000000000111',1301973999,'PBtmpl0000000000000060'),(1,NULL,'G5DgNizuG3jXkjPp6UaGrA','PBtmpl0000000000000060','PBtmpl0000000000000060',1301973999,'PBtmpl0000000000000060'),(1,NULL,'brxm_faNdZX5tRo3p50g3g','PBtmpl0000000000000060','PBtmpl0000000000000111',1304392055,'PBtmpl0000000000000060'),(1,NULL,'n-Vr_wgxOkwiHGt1nJto9w','OiJNwP1gAlcva8_yOtL4gA','PBtmpl0000000000000111',1309236774,'PBtmpl0000000000000060'),(1,NULL,'aNmgn0cd6tldmC1FpW4KbA','PBtmpl0000000000000060','PBtmpl0000000000000060',1313542960,'PBtmpl0000000000000060'),(1,NULL,'jEz8iTGNWEt2I05IhVV19Q','PBtmpl0000000000000060','PBtmpl0000000000000060',1313542961,'PBtmpl0000000000000060'); +INSERT INTO `wobject` VALUES (0,'This is the latest news from Plain Black and WebGUI pulled directly from the site every hour.','fK-HMSboA3uu0c1KYkYspA','stevestyle000000000003','PBtmpl0000000000000111',1124395696,'stevestyle000000000003'),(1,NULL,'PBasset000000000000002','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'7-0-style0000000000026','PBtmpl0000000000000060','',1147642499,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000001','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000014','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000015','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000016','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000017','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000018','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000019','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000020','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000021','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000002','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000006','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000007','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000008','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000009','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000010','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000011','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000012','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'PBnav00000000000000013','PBtmpl0000000000000060','PBtmpl0000000000000111',1124395696,'PBtmpl0000000000000060'),(0,NULL,'7-0-style0000000000070','PBtmpl0000000000000060','PBtmpl0000000000000060',1147642510,'PBtmpl0000000000000060'),(1,NULL,'7-0-style0000000000001','PBtmpl0000000000000060','',1147642492,'PBtmpl0000000000000060'),(1,NULL,'7-0-style0000000000031','PBtmpl0000000000000060','',1147642500,'PBtmpl0000000000000060'),(0,NULL,'7-0-style0000000000025','PBtmpl0000000000000060','',1147642498,'PBtmpl0000000000000060'),(1,NULL,'PBasset000000000000003','PBtmpl0000000000000060','PBtmpl0000000000000111',1147642437,'PBtmpl0000000000000060'),(1,NULL,'nbSrhXZQuxIjhWFaFPSuVA','PBtmpl0000000000000060','',1147642465,'PBtmpl0000000000000060'),(1,NULL,'N13SD1Fpqk00UgBt1Z8ivQ','PBtmpl0000000000000060','',1147642470,'PBtmpl0000000000000060'),(1,NULL,'-WM2dt0ZGpDasuL2wWocxg','PBtmpl0000000000000060','PBtmpl0000000000000111',1222803056,'PBtmpl0000000000000060'),(1,NULL,'3uuBf8cYuj1sew2OJXl9tg','PBtmpl0000000000000060','',1147642470,'PBtmpl0000000000000060'),(1,NULL,'cj2y4papTVGZRFdwTI-_fw','PBtmpl0000000000000060','',1147642475,'PBtmpl0000000000000060'),(1,NULL,'bBzO4CWjqU_ile3gf5Iypw','PBtmpl0000000000000060','',1147642475,'PBtmpl0000000000000060'),(1,NULL,'Da6KWn805L4B5e4HFgQRQA','PBtmpl0000000000000060','',1147642479,'PBtmpl0000000000000060'),(1,NULL,'bbiA9Zq5Gy2oCFBlILO3QA','PBtmpl0000000000000060','',1147642480,'PBtmpl0000000000000060'),(1,NULL,'Efe2W0UgrSRDltNJ87jlfg','PBtmpl0000000000000060','',1147642480,'PBtmpl0000000000000060'),(1,NULL,'9wKWdum0_8z-OhhquWLtSQ','PBtmpl0000000000000060','',1147642483,'PBtmpl0000000000000060'),(1,NULL,'CSN-ZON7Uwv8kxf3F1fh5Q','PBtmpl0000000000000060','',1147642484,'PBtmpl0000000000000060'),(1,NULL,'TCtybxdqmdwdvRn555zpCQ','PBtmpl0000000000000060','',1147642484,'PBtmpl0000000000000060'),(1,NULL,'pbproto000000000000002','PBtmpl0000000000000060','',1163019036,'PBtmpl0000000000000060'),(1,NULL,'tempspace0000000000000','PBtmpl0000000000000060','PBtmpl0000000000000060',1185754574,'PBtmpl0000000000000060'),(1,NULL,'Tsg7xmPYv782j6IVz7yHFg','PBtmpl0000000000000060','PBtmpl0000000000000111',1213244777,'PBtmpl0000000000000060'),(1,NULL,'TYo2Bwl7aafzTtdHlS-arQ','PBtmpl0000000000000060','PBtmpl0000000000000060',1211664878,'PBtmpl0000000000000060'),(1,NULL,'6tK47xsaIH-ELw0IBo0uRQ','PBtmpl0000000000000060','PBtmpl0000000000000111',1210777115,'PBtmpl0000000000000060'),(1,NULL,'gbnRhcWNk1iQe32LFEB5eQ','PBtmpl0000000000000060','PBtmpl0000000000000111',1212086102,'PBtmpl0000000000000060'),(1,NULL,'6D4Z-oruXPS6OlH_Kx8pBg','PBtmpl0000000000000060','PBtmpl0000000000000111',1209509389,'PBtmpl0000000000000060'),(1,NULL,'C5fPz-Wg85vkYRvCdl-Xqw','PBtmpl0000000000000060','PBtmpl0000000000000111',1212160830,'PBtmpl0000000000000060'),(1,NULL,'jnYdqDkUR8x7Pv2eGR1qTA','PBtmpl0000000000000060','PBtmpl0000000000000111',1216250666,'PBtmpl0000000000000060'),(1,NULL,'2OcUWHVsu_L1sDFzIMWYqw','PBtmpl0000000000000060','PBtmpl0000000000000111',1222803070,'PBtmpl0000000000000060'),(1,NULL,'zyWi26q9na-iiZqL4yedog','PBtmpl0000000000000060','PBtmpl0000000000000111',1222803114,'PBtmpl0000000000000060'),(1,NULL,'tBL7BWiQRZFed2Y-Zjo9tQ','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803200,'PBtmpl0000000000000060'),(1,NULL,'GdkQpvjRtJqtzOUbwIIQRA','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803205,'PBtmpl0000000000000060'),(1,NULL,'tnc5iYyynX2hfdEs9D3P8w','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803213,'PBtmpl0000000000000060'),(1,NULL,'vgXdBcFTqU7h4wBG1ewdBw','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803217,'PBtmpl0000000000000060'),(1,NULL,'hcFlqnXlsmC1ujN6Id0F0A','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803234,'PBtmpl0000000000000060'),(1,NULL,'eRJR52fvlaxfetv3DQkQYw','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803238,'PBtmpl0000000000000060'),(1,NULL,'5HIDHq5lAWHV5gpYGS0zLg','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803244,'PBtmpl0000000000000060'),(1,NULL,'rYEFwXXo0tkGhQTcbDibvg','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803249,'PBtmpl0000000000000060'),(1,NULL,'V3l5S5TtI7wMm1WpIMhvOA','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803253,'PBtmpl0000000000000060'),(1,NULL,'nqNbSUAhk9Vd1zda2SCz9A','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803258,'PBtmpl0000000000000060'),(1,NULL,'y8XkRdxIperLKkJ3bL5sSQ','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803264,'PBtmpl0000000000000060'),(1,NULL,'vTymIDYL2YqEh6PV50F7ew','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803302,'PBtmpl0000000000000060'),(1,NULL,'lo1ac3BsoJx3ijGQ3gR-bQ','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803309,'PBtmpl0000000000000060'),(1,NULL,'huASapWvFDzqwOSbcN-JFQ','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803313,'PBtmpl0000000000000060'),(1,NULL,'9A-mg2gwWmaYi9o_1C7ArQ','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803338,'PBtmpl0000000000000060'),(1,NULL,'yD1SMHelczihzjEmx6eXBA','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803342,'PBtmpl0000000000000060'),(1,NULL,'pV7GnZdpjR3XpZaSINIoeg','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803347,'PBtmpl0000000000000060'),(1,NULL,'71e17KeduiXgODLMlUxiow','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803352,'PBtmpl0000000000000060'),(1,NULL,'Ik9HHky10DIyFTKehUD1dw','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803478,'PBtmpl0000000000000060'),(1,NULL,'NywJYmGWe1f6EBXJnWg9Xg','PBtmpl0000000000000060','PBtmpl0000000000000111',1222803638,'PBtmpl0000000000000060'),(1,NULL,'AgyFhx3eXlfZXNp2MkrsiQ','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803665,'PBtmpl0000000000000060'),(1,NULL,'F7MAQ-cpuvQ1KuC7J4P5zQ','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803673,'PBtmpl0000000000000060'),(1,NULL,'BmLaN4rmAANkCglXUViEbg','PBtmpl0000000000000060','PBtmpl0000000000000060',1222803871,'PBtmpl0000000000000060'),(1,NULL,'X7DrzUcj8pOKFa_6k9D5iw','PBtmpl0000000000000060','PBtmpl0000000000000060',1222804045,'PBtmpl0000000000000060'),(1,NULL,'UL-ItI4L1Z6-WSuhuXVvsQ','stevestyle000000000003','PBtmpl0000000000000111',1225139673,'stevestyle000000000003'),(1,NULL,'7-0-style0000000000049','PBtmpl0000000000000060','PBtmpl0000000000000060',1224117144,'PBtmpl0000000000000060'),(0,NULL,'jVKLVakT_iA2010_oEuAwg','PBtmpl0000000000000060','PBtmpl0000000000000060',1224116526,'PBtmpl0000000000000060'),(1,'

     

    ','QpmlAiYZz6VsKBM-_0wXaw','stevestyle000000000003','PBtmpl0000000000000111',1224616691,'stevestyle000000000003'),(1,NULL,'HPDOcsj4gBme8D4svHodBw','PBtmpl0000000000000060','PBtmpl0000000000000111',1225404573,'PBtmpl0000000000000060'),(1,NULL,'IZkrow_zwvbf4FCH-taVTQ','PBtmpl0000000000000060','PBtmpl0000000000000111',1226011853,'PBtmpl0000000000000060'),(1,NULL,'K0YjxqOqr7RupSo6sIdcAg','PBtmpl0000000000000060','PBtmpl0000000000000111',1227074310,'PBtmpl0000000000000060'),(1,NULL,'_ilRXNR3s8F2vGJ_k9ePcg','PBtmpl0000000000000060','PBtmpl0000000000000111',1226643205,'PBtmpl0000000000000060'),(1,NULL,'qaVcU0FFzzraMX_bzELqzw','PBtmpl0000000000000060','PBtmpl0000000000000111',1227074362,'PBtmpl0000000000000060'),(1,NULL,'QHn6T9rU7KsnS3Y70KCNTg','PBtmpl0000000000000060','PBtmpl0000000000000111',1233173545,'PBtmpl0000000000000060'),(1,NULL,'HW-sPoDDZR8wBZ0YgFgPtg','PBtmpl0000000000000060','PBtmpl0000000000000111',1227634350,'PBtmpl0000000000000060'),(1,NULL,'AOjPG2NHgfL9Cq6dDJ7mew','PBtmpl0000000000000060','PBtmpl0000000000000111',1236960881,'PBtmpl0000000000000060'),(1,NULL,'jmlI9IK-lV8n2WMYmmPhAA','PBtmpl0000000000000060','PBtmpl0000000000000111',1238106173,'PBtmpl0000000000000060'),(1,NULL,'6uvSLY-ak_w4p_wS8q33cA','PBtmpl0000000000000060','PBtmpl0000000000000111',1239213092,'PBtmpl0000000000000060'),(1,NULL,'GaBAW-2iVhLMJaZQzVLE5A','stevestyle000000000003','PBtmpl0000000000000111',1240103565,'stevestyle000000000003'),(1,'

    Templates for the Friend Manager

    ','lo1rpxn3t8YPyKGers5eQg','PBtmpl0000000000000060','PBtmpl0000000000000111',1238625621,'PBtmpl0000000000000060'),(1,NULL,'aNNC62qLAS6TB-0_MCYjsw','PBtmpl0000000000000060','PBtmpl0000000000000060',1246969327,'PBtmpl0000000000000060'),(1,NULL,'BFfNj5wA9bDw8H3cnr8pTw','PBtmpl0000000000000060','PBtmpl0000000000000060',1247046273,'PBtmpl0000000000000060'),(1,NULL,'f_tn9FfoSfKWX43F83v_3w','PBtmpl0000000000000060','PBtmpl0000000000000060',1247053009,'PBtmpl0000000000000060'),(1,NULL,'oGfxez5sksyB_PcaAsEm_Q','PBtmpl0000000000000060','PBtmpl0000000000000060',1247053097,'PBtmpl0000000000000060'),(1,NULL,'tPagC0AQErZXjLFZQ6OI1g','PBtmpl0000000000000060','PBtmpl0000000000000060',1246966459,'PBtmpl0000000000000060'),(1,NULL,'GYaFxnMu9UsEG8oanwB6TA','PBtmpl0000000000000060','PBtmpl0000000000000060',1246965871,'PBtmpl0000000000000060'),(1,NULL,'VZK3CRgiMb8r4dBjUmCTgQ','PBtmpl0000000000000060','PBtmpl0000000000000060',1247046242,'PBtmpl0000000000000060'),(1,NULL,'tXwf1zaOXTvsqPn6yu-GSw','PBtmpl0000000000000060','PBtmpl0000000000000060',1246965607,'PBtmpl0000000000000060'),(1,NULL,'5bnNzteN7w3NnK9mF4XiCg','PBtmpl0000000000000060','PBtmpl0000000000000060',1250243000,'PBtmpl0000000000000060'),(1,NULL,'RSAMkc6WQmfRE3TOr1_3Mw','PBtmpl0000000000000060','PBtmpl0000000000000111',1250243000,'PBtmpl0000000000000060'),(1,NULL,'fowHfgOkJtAxdst7rugTog','PBtmpl0000000000000060','PBtmpl0000000000000111',1252595993,'PBtmpl0000000000000060'),(1,NULL,'TvOZs8U1kRXLtwtmyW75pg','PBtmpl0000000000000060','PBtmpl0000000000000060',1256092368,'PBtmpl0000000000000060'),(1,NULL,'4qh0kIsFUdd4Ox-Iu1JZgg','PBtmpl0000000000000060','PBtmpl0000000000000111',1257311886,'PBtmpl0000000000000060'),(1,'

     

    ','-K8Hj45mbelljN9-0CXZxg','PBtmpl0000000000000060','PBtmpl0000000000000060',1257311887,'PBtmpl0000000000000060'),(1,NULL,'P_4uog81vSUK4KxuW_4GUA','PBtmpl0000000000000060','PBtmpl0000000000000111',1258524916,'PBtmpl0000000000000060'),(0,NULL,'t87D1138NhPHhA23-hozBA','PBtmpl0000000000000060','PBtmpl0000000000000060',1273032716,'PBtmpl0000000000000060'),(0,NULL,'QtBumey5ffc-xffRp1-7Aw','PBtmpl0000000000000060','PBtmpl0000000000000060',1273032716,'PBtmpl0000000000000060'),(1,NULL,'x_hiUi1XZloBvV47Obnu8Q','OiJNwP1gAlcva8_yOtL4gA','PBtmpl0000000000000111',1273032718,'PBtmpl0000000000000060'),(0,NULL,'UUwEL6hLEPdrnkZnKRzFYQ','OiJNwP1gAlcva8_yOtL4gA','PBtmpl0000000000000111',1273032718,'PBtmpl0000000000000060'),(1,NULL,'Q4uX_C557arTp6D_jwB1jQ','PBtmpl0000000000000060','PBtmpl0000000000000060',1273032720,'PBtmpl0000000000000060'),(1,NULL,'GNOAsX98vCsl0JRwfwL-gg','PBtmpl0000000000000060','PBtmpl0000000000000060',1277868921,'PBtmpl0000000000000060'),(1,NULL,'_iHetEvMQUOoxS-T2CM0sQ','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1273172789,'stevestyle000000000003'),(0,'

    \nCongratulations on successfully installing the WebGUI Content Engine®. If you used the Site Starter to select a set of default pages, you will see those pages in the site navigation. You will also notice that a number of additional pages appear, such as this page. These are default pages added for your convenience to help you get started with WebGUI and find the resources you need. Feel free to remove these extra pages whenever you are ready.

    \n

    To get started managing content, download the PDF document below. This document provides a basic introduction to the WebGUI user interface. 

    \n

    WebGUI Basics (PDF)

    \n

    Once you have read this document, you may want to head over to the Documentation section where you can find more WebGUI resources.

    ','bX5rYxb6tZ9docY6sUhBlw','Qk24uXao2yowR6zxbVJ0xA','stevestyle000000000003',1278013772,'stevestyle000000000003'),(1,'

    Plain Black® created the WebGUI Content Engine® and is here to answer \nyour questions and provide you with services to make sure your WebGUI \nimplementation is entirely successful. We bend over backwards to make \nsure you\'re a success. Contact us today to \nsee how we can help you.

    ','8Bb8gu-me2mhL3ljFyiWLg','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1271359194,'stevestyle000000000003'),(1,'

    Plain Black provides support packages to fit any budget or need. Start out with online support which costs only $500 per year, or work with Plain Black to build a custom support package tailored to your specific needs. No matter what level of support you purchase, you will get personalized and friendly service in a timely manner.

    ','ix1p0AbwKAz8QWB-T-HHfg','Qk24uXao2yowR6zxbVJ0xA','stevestyle000000000003',1271359087,'stevestyle000000000003'),(1,'

    Plain Black\'s professionally trained WebGUI experts can handle the task\nof hosting your web site, intranet, or extranet. Let us deal with upgrades, security, and server management so you focus on building your WebGUI site, which is where your time and expertise should be spent. And when you sign up with hosting, online support is included!

    ','iCYOjohB9SKvAPr6bXElKA','Qk24uXao2yowR6zxbVJ0xA','stevestyle000000000003',1271445525,'stevestyle000000000003'),(1,'

    WebGUI\'s robust API allows for easy customization. Plain Black\'s team of developers can create any features you need for your site. We\'ve built hundreds of custom applications for people. From simple macros, to custom single sign on systems, to applications that will manage your entire company, our team will leverage the power of WebGUI to your advantage.

    ','4Yfz9hqBqM8OYMGuQK8oLw','Qk24uXao2yowR6zxbVJ0xA','stevestyle000000000003',1271352537,'stevestyle000000000003'),(1,'

    Branding and visual appeal are powerful marketing tools. Don\'t let your site become a wallflower. Plain Black\'s professional design team can create a custom design to make your site stand out. Our team is fast, easy to work with, and can even migrate your existing content into your new WebGUI site.

    ','Wl8WZ43g2rK5AYr9o4zY7w','Qk24uXao2yowR6zxbVJ0xA','stevestyle000000000003',1271445539,'stevestyle000000000003'),(1,'

    Let our team of professional translators bring your site to new customers by translating your content into additional languages. Our translation services are never machine automated. They\'re always done by professional translators that have years of experience reading, writing, and speaking many languages.

    ','LBuiKzg2mWwmOPS9AgV3bg','Qk24uXao2yowR6zxbVJ0xA','stevestyle000000000003',1271348789,'stevestyle000000000003'),(1,'

    Now that you have a brilliant WebGUI site, you need to get people to visit it. We can help there too. Our marketing specialists can work with you to develop and execute the right combination of search engine placement, advertising buys, and affilliate programs to ensure your site gets the traffic it needs.

    ','jTNggl7AoVSUc_ZzrvuCmw','Qk24uXao2yowR6zxbVJ0xA','stevestyle000000000003',1271348789,'stevestyle000000000003'),(1,'

    With any large system, having the right documentation to get you started is mandatory. The good news is that WebGUI has abundant documentation.

    ','mTOiwwk3q4k9g5-XykXhPA','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1271349647,'stevestyle000000000003'),(1,'

    The WebGUI project community is a diverse and talented group. If you \nwould like to contribute back to the project there are many ways to \nbecome involved.

    ','2TqQc4OISddWCZmRY1_m8A','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1271357565,'stevestyle000000000003'),(1,'

    You can find members of the community on the #webgui chat channel on the Freenode IRC network. If you\'re not \nfamiliar with IRC, it\'s essentially like a chat room. A few things you\'ll need to know:

    \n
      \n
    \n
      \n
    • You need an IRC client program. There are many available that \ncan be downloaded free of charge.
    • \n
    • The IRC network we use is Freenode
    • \n
    • Our channel is #webgui.
    • \n
    • Channel operators have an @ next to their name. All channel operators in #webgui are Plain Black employees.
    • \n
    • Someone with a + next to their name is a recognized contributor in the WebGUI community. People who have been recognized as one of the People Behind WebGUI are often given this designation.
    • \n
    \n
      \n\n\n
    \n

    If you\'re looking for a mentor, recognized contributors are a good place\n to start.

    ','k2Qj03FrAOXYra8kDJYYXw','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1271357513,'PBtmpl0000000000000060'),(1,'

    An annual event, this is the one time a year when WebGUI users and Plain\n Black\'s staff come together to do all things WebGUI.  This is by far \nthe best way to get involved with the community as nothing can replace \nface to face interaction and mentoring. The conference is usually held \nin the fall of each year and more information on attending can be found \non the WebGUI Users \nConference website as details become available.

    ','ksSfkZdsr0uC62NwIk6hFQ','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1271356973,'PBtmpl0000000000000060'),(1,'

    WebGUI \nForums are available for WebGUI related\n discussion and community support. Bounce around ideas, discuss \nimportant issues, and ask community members for help and advice. WebGUI \nForums are broken up into:

    \n','nWxS5jnA3o3DgPEwBeR7yQ','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1271357239,'PBtmpl0000000000000060'),(0,NULL,'x3OFY6OJh_qsXkZfPwug4A','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1271348790,'stevestyle000000000003'),(0,NULL,'pJd5TLAjfWMVXD6sCRLwUg','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1271348790,'stevestyle000000000003'),(0,'

    The WebGUI Content Engine® is a powerful, easy to use web application framework and content management system. WebGUI contains dozens of built-in features, and allows for full customization through its rich API. It\'s easy enough for the average business user to use, but powerful enough for any large enterprise.

    \n

    WebGUI serves thousands of small and large businesses, schools, universities, governments, associations, churches, projects and communities throughout the world. For examples of who is using WebGUI, visit the WebGUI Sightings page. Shouldn\'t your site be on this list?

    \n

    If you\'re new to WebGUI, visit the Getting Started section. Once you feel comfortable, explore some of the professional services available for your new WebGUI site. No matter what level you\'re at, tell your friends about WebGUI.

    ','OhdaFLE7sXOzo_SIP2ZUgA','Qk24uXao2yowR6zxbVJ0xA','stevestyle000000000003',1271445348,'stevestyle000000000003'),(1,'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    \n

    Rich User Interface

    \n
    \n

    Powerful API

    \n
    \n

    WebGUI has a rich user experience that allows users to place their \ncontent\nthrough a drag-n-drop interface; helps users pick dates, colors, and\nmore; and has a highly customizable rich editor to allow users to \nquickly and easily format\ncontent.

    \n
    \n

    WebGUI allows developers to quickly plug-in new functionality to\nget the most from a site. In addition, WebGUI\'s standardized plug-in\npoints maintain the upgrade path even with customizations.

    \n
    \n

    Short Friendly URLs

    \n
    \n

    Internationalization

    \n
    \n

    Never worry about ugly numeric \nID\'s or other things in URL\'s that\nmake it hard for search engines and people to use a site.

    \n
    \n

    Users can work in an interface in their native language, and content can\n be published in as many languages as necessary.

    \n
    \n

    Personalization

    \n
    \n

    Easy To Install

    \n
    \n

    Users see their own view of the site through dynamically\ngenerated navigation and content. In addition, content can be displayed \nbased upon users\' viewing habits.

    \n
    \n

    With the use of the WebGUI Runtime Environment (Unix, Mac OS X, Linux, \nBSD) and VMWare Appliance (Windows) setup takes minutes rather than\nhours.

    \n
    ','IWFxZDyGhQ3-SLZhELa3qw','Qk24uXao2yowR6zxbVJ0xA','stevestyle000000000003',1277737686,'stevestyle000000000003'),(1,NULL,'LdiozcIUciWuvt3Z-na5Ww','PBtmpl0000000000000060','PBtmpl0000000000000060',1281501162,'PBtmpl0000000000000060'),(1,NULL,'Vch1Ww7G_JpBhOhXX07RDg','PBtmpl0000000000000060','PBtmpl0000000000000111',1281501163,'PBtmpl0000000000000060'),(1,NULL,'AssetReportFolder00001','PBtmpl0000000000000060','PBtmpl0000000000000060',1281501163,'PBtmpl0000000000000060'),(1,'

    You don\'t have to be a developer to become a project contributor. Examples of how you can contribute include:\n

    \n
      \n
    • Translators - Visit i18n.webgui.org\n and either help translate a few items in an existing language, or \ncreate a new translation.

    • \n
    • Graphic Designers - Create WebGUI style themes, icons, or fix UI\n bugs. You can contribute your items to WebGUI\'s Addons and Plugins area for others to download and use.

    • \n
    • Usability Experts - Help make WebGUI more accessable and \neasier to use by submitting RFEs. Even better, submit an RFE that\'s ready to implement by including the code!

    • \n
    • Doc Writers - Write documents in WebGUI\'s wiki, help\n out on the boards, improve WebGUI\'s built in documentation.

    • \n
    • Testers - Validate WebGUI\'s features against its \ndocumentation, search for errors, and report bugs.

    • \n
    • Test writers - If you have some Perl abilities, you can help \ndevelop unit tests to make sure the WebGUI API is behaving as \ndocumented.

    • \n
    • Developers - Write a new feature for WebGUI like a macro, \nasset, wobject, auth module or workflow activity and contribute it to \nthe Addons and Plugins. If you\'re interested in developing for WebGUI, be sure to check out the Development Best Practices wiki article.

    • \n
    • Bug Fixers - Cruise the bug list and submit patches to \ncorrect the problem.

    • \n
    • Core Developers - Becoming a core developer is a privilege. To earn it, you have to demonstrate through bug fixes and/or \ncontributions that you can make sound programming decisions without the \nneed for someone to scrutinize everything you check in. WebGUI is a \nvery large and complex application so getting to this level can take \nsome time. Core developers are developers with commit privileges to the\n subversion repository.

    • \n
    • Advocate - Spread the word about WebGUI, tell people about \nhow you use it and how it\'s helped you.Encourage people to try it out.

    • \n
    • Marketing and Promotion - If you have a talent for marketing,\n advertising, or promotion you can be a super advocate! Have a marketing\n idea? Contact tavis AT plainblack DOT com.  Make a WebGUI banner or \nprint ad and contribute it!  Maybe you have a design for a cool \nwallpaper or t-shirt, anything to get the word out.
    • \n
    ','l0guT3vTR3B8cL6vtP-g3A','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1285124369,'PBtmpl0000000000000060'),(1,NULL,'N7uMnnicbyTEulcuRi1sSg','PBtmpl0000000000000060','PBtmpl0000000000000111',1283900195,'PBtmpl0000000000000060'),(1,'

     

    ','gI_TxK-5S4DNuv42wpImmw','PBtmpl0000000000000060','PBtmpl0000000000000111',1285124155,'PBtmpl0000000000000060'),(1,NULL,'kaPRSaf8UKiskiGEgJgLAw','PBtmpl0000000000000060','PBtmpl0000000000000111',1285124155,'2p9ygcqH_Z11qOUvQ1uBvw'),(1,NULL,'RrV4aAPnn4dM0ZcU3OXnlw','PBtmpl0000000000000060','PBtmpl0000000000000060',1286336607,'PBtmpl0000000000000060'),(0,'

    \nTo begin managing content, you should log in and click the Turn Admin On! link. The default username is \"admin\" and the default password is \"123qwe\", but you probably customized both of those when you visited this site for the very first time.\n

    \n

    \nNow that you\'re logged in, we recommend that you add a new user for yourself with admin privileges just in case you forget the login information for your primary admin account. Don\'t worry if you lock yourself out, you can always contact Plain Black® support to get instructions to get back in.\n

    \n

    NOTE: If you appear to get logged out while moving between pages, this is most likely your browser displaying a cached version of the page. Click on your browser\'s refresh button to correct the problem.

    \n

     

    \n

    \nFor more information about services related to WebGUI click here.\n

    \n

    \nEnjoy your new WebGUI site!\n

    ','NK8bqlwVRILJknqeCDPBHg','Qk24uXao2yowR6zxbVJ0xA','stevestyle000000000003',1285796040,'stevestyle000000000003'),(1,'

    Plain Black has created a line of commercial books which total over 1500 pages of detailed documentation about WebGUI. Both black and white and full color editions of these books are available. Visit the book store today to stock your WebGUI library. Other than hands on training, there is no better way to hone your WebGUI skills. No matter what your need, Plain Black has created a book that\'s right for you and is creating new books each year.

    \n

    In the fall of 2010, Plain Black announced that these books will be converted into free wikis. You can now access all WebGUI user guides for free on the WebGUI User Guides page on www.webgui.org.

    \n

    *These books are available for WebGUI version 7.7 and earlier. For later documentation, see the free resources available on the WebGUI project website.

    ','diZvW4bSgZWwyyGP3qXi1g','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1285610019,'stevestyle000000000003'),(1,NULL,'68sKwDgf9cGH58-NZcU4lg','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1286336676,'stevestyle000000000003'),(0,NULL,'Am1J-meNBmhqFfEIWy6Gag','OiJNwP1gAlcva8_yOtL4gA','PBtmpl0000000000000111',1287545014,'PBtmpl0000000000000060'),(1,NULL,'1z9J1O08n_7gVVlBwSRBJQ','PBtmpl0000000000000060','PBtmpl0000000000000111',1287545014,'PBtmpl0000000000000060'),(1,NULL,'xSmREZO3GNzK3M5PaueOOQ','PBtmpl0000000000000060','PBtmpl0000000000000060',1287545014,'PBtmpl0000000000000060'),(1,NULL,'0bx-xoL8TSXXubFuqKAoVQ','PBtmpl0000000000000060','PBtmpl0000000000000060',1287545014,'PBtmpl0000000000000060'),(1,NULL,'taX2UYkFF21ALpFZY2rhMw','PBtmpl0000000000000060','PBtmpl0000000000000060',1287545014,'PBtmpl0000000000000060'),(1,NULL,'K0q_N885Httqev1VCqUWxg','PBtmpl0000000000000060','PBtmpl0000000000000060',1287545014,'PBtmpl0000000000000060'),(1,NULL,'fq1ZkYhH24R5tb96kuT10Q','PBtmpl0000000000000060','PBtmpl0000000000000060',1287545014,'PBtmpl0000000000000060'),(1,NULL,'oHk7fAFhEEkB7dHzi0QOQA','PBtmpl0000000000000060','PBtmpl0000000000000060',1287545014,'PBtmpl0000000000000060'),(1,NULL,'9M-lrlPQWeeNWfvnDnK_Xg','PBtmpl0000000000000060','PBtmpl0000000000000060',1287545014,'PBtmpl0000000000000060'),(1,NULL,'_gBYAdTcbkiyamnqi2Xskg','PBtmpl0000000000000060','PBtmpl0000000000000060',1287545014,'PBtmpl0000000000000060'),(1,NULL,'0iMMbGN3BevuCBHjjLiQNA','PBtmpl0000000000000060','PBtmpl0000000000000111',1287545015,'PBtmpl0000000000000060'),(1,NULL,'6A4yIjWwJfIE0Ep-I0jutg','PBtmpl0000000000000060','PBtmpl0000000000000111',1287545015,'PBtmpl0000000000000060'),(1,'

    Folder for holding Workflow Activity templates.

    ','_cD6DLM_Fs5IlrLeWUjrjg','PBtmpl0000000000000060','PBtmpl0000000000000111',1287545015,'PBtmpl0000000000000060'),(1,NULL,'f2EktltCvwQpl_3-B1yR7g','PBtmpl0000000000000060','PBtmpl0000000000000111',1288748251,'PBtmpl0000000000000060'),(1,NULL,'S1A9iAwKcQQ6P20uTqw-Ew','PBtmpl0000000000000060','PBtmpl0000000000000060',1300763664,'PBtmpl0000000000000060'),(1,'

    There are hundreds of pages of free documentation available for WebGUI, provided by both Plain Black and the community at large. The following list is by no means comprehensive, but it should get you started in the right direction.

    \n

     

    \n
      \n
    • Primer - A downloadable PDF that shows you the basics of publishing content in WebGUI.
    • \n
    • WebGUI User Guides: all commercial user guides previously published by Plain Black are in the process of being converted into wikis. You can find these wikis on the WebGUI User Guides page of www.webgui.org. This is an ongoing process; until all books have been converted, remaining books are being made available as free PDF downloads.
    • \n
    • Wiki - Hundreds of pages of WebGUI community contributed content featuring a variety of tutorials.
    • \n
    • Worldwide - A collection of WebGUI related web sites from all over the world that have documentation and other resources for WebGUI.
    • \n
    • API Docs - The documentation of all of the WebGUI source code.
    • \n
    • Template Help - The documentation of all of WebGUI\'s template variables.
    • \n
    ','j_1qEqM6iLfQLiR6VKy0aA','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1299872071,'stevestyle000000000003'),(1,'

    Templates and images for the \"Underground\" style from StyleShout.com

    ','CQp-RFA2pMh5lFSggPPPYg','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1301973995,'PBtmpl0000000000000060'),(1,NULL,'_Mi_NTd3x8UB96LWezWHnw','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1301973995,'PBtmpl0000000000000060'),(1,NULL,'g3JH1PRq6m6Bj_PnGpcrSQ','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1301973996,'PBtmpl0000000000000060'),(1,'

    This folder holds prototype WebGUI assets with the correct templates pre-selected.

    ','G0hl4VilbFKipToyxKqFrg','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1301973997,'PBtmpl0000000000000060'),(1,NULL,'GWU2qZqe6yEuAKG-5HtBdg','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1301973997,'PBtmpl0000000000000060'),(1,NULL,'AsfpsOpsGzZCb9m7MyxPuw','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1301973997,'PBtmpl0000000000000060'),(1,NULL,'jmqLxnoWb6p92Cr12lf1hw','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1301973997,'PBtmpl0000000000000060'),(1,NULL,'8E2UOnj_XPEghTj7nfVM0g','Qk24uXao2yowR6zxbVJ0xA','PBtmpl0000000000000111',1301973997,'PBtmpl0000000000000060'),(1,NULL,'1qFjOEiILIwr1xB5_ebppQ','PBtmpl0000000000000060','PBtmpl0000000000000060',1301973998,'PBtmpl0000000000000060'),(1,NULL,'xD76UfQ_JnSgTLBNvytcpQ','PBtmpl0000000000000060','PBtmpl0000000000000111',1301973998,'PBtmpl0000000000000060'),(0,NULL,'h0bOzz7WvdaVZXsjpwtkww','KKt0VB_eoQxw9xEsHsAhag','PBtmpl0000000000000111',1301973998,'PBtmpl0000000000000060'),(1,NULL,'qFOfW1sKyOTnGNcP6BXbwg','6D98D8TIuhExiSoo2U1eqw','PBtmpl0000000000000111',1301973999,'PBtmpl0000000000000060'),(1,NULL,'G5DgNizuG3jXkjPp6UaGrA','PBtmpl0000000000000060','PBtmpl0000000000000060',1301973999,'PBtmpl0000000000000060'),(1,NULL,'brxm_faNdZX5tRo3p50g3g','PBtmpl0000000000000060','PBtmpl0000000000000111',1304392055,'PBtmpl0000000000000060'),(1,NULL,'n-Vr_wgxOkwiHGt1nJto9w','OiJNwP1gAlcva8_yOtL4gA','PBtmpl0000000000000111',1309236774,'PBtmpl0000000000000060'),(1,NULL,'aNmgn0cd6tldmC1FpW4KbA','PBtmpl0000000000000060','PBtmpl0000000000000060',1326776036,'PBtmpl0000000000000060'),(1,NULL,'jEz8iTGNWEt2I05IhVV19Q','PBtmpl0000000000000060','PBtmpl0000000000000060',1326776037,'PBtmpl0000000000000060'); ALTER TABLE `wobject` ENABLE KEYS; -INSERT INTO webguiVersion (webguiVersion,versionType,dateApplied) VALUES ('7.10.23','Initial Install',UNIX_TIMESTAMP()); +INSERT INTO webguiVersion (webguiVersion,versionType,dateApplied) VALUES ('7.10.24','Initial Install',UNIX_TIMESTAMP()); SET CHARACTER_SET_CLIENT = @OLD_CHARACTER_SET_CLIENT; SET CHARACTER_SET_RESULTS = @OLD_CHARACTER_SET_RESULTS; SET CHARACTER_SET_CONNECTION = @OLD_CHARACTER_SET_CONNECTION; diff --git a/lib/default.ttf b/share/default.ttf similarity index 100% rename from lib/default.ttf rename to share/default.ttf diff --git a/share/site.psgi b/share/site.psgi new file mode 100644 index 000000000..f1c507a1f --- /dev/null +++ b/share/site.psgi @@ -0,0 +1,79 @@ +use strict; +use Plack::Builder; +use Plack::App::File; +use WebGUI; + +builder { + my $wg = WebGUI->new( config => $ENV{WEBGUI_CONFIG} ); + my $config = $wg->config; + my $streaming_uploads = $config->get('enableStreamingUploads'); # have to restart for changes to this to take effect + + if (! $^O eq 'darwin') { + enable 'Plack::Middleware::SizeLimit' => ( + max_unshared_size => 200_000, + max_process_size => 500_000, + check_every_n_requests => 3, + ); + } + enable 'Log4perl', category => $config->getFilename, conf => WebGUI::Paths->logConfig; + enable 'SimpleContentFilter', filter => sub { + if ( utf8::is_utf8($_) ) { + utf8::encode($_); + } + }; + + # Reproduce URL handler functionality with middleware + enable '+WebGUI::Middleware::Snoop'; + + # For PassThru, use Plack::Builder::mount + + # Serve "Extras" + # Plack::Middleware::Static is fallback (you should be using something else to serve static files in production, + # unless you're using the corona Plack server, then it doesn't matter nearly so much) + + my ( $extrasURL, $extrasPath ) = ( $config->get('extrasURL'), $config->get('extrasPath') ); + enable_if { $streaming_uploads } 'XSendfile'; + enable_if { ! $streaming_uploads } 'Static', root => "$extrasPath/", path => sub {s{^\Q$extrasURL/}{}}; + + # Open/close the WebGUI::Session at the outer-most onion layer + enable '+WebGUI::Middleware::Session', config => $config; + + enable '+WebGUI::Middleware::HTTPExceptions'; + + enable 'ErrorDocument', 503 => $config->get('maintenancePage'); + enable_if { ! $_[0]->{'webgui.debug'} } 'ErrorDocument', 500 => $config->get('maintenancePage'); + + enable '+WebGUI::Middleware::Maintenance'; + + # enable_if { $_[0]->{'webgui.debug'} } 'StackTrace'; + enable_if { $_[0]->{'webgui.debug'} } '+WebGUI::Middleware::StackTrace'; + + enable_if { $_[0]->{'webgui.debug'} } 'Debug', panels => [ + 'Timer', + 'Memory', + 'Session', + 'Parameters', + 'PerlConfig', + [ 'MySQLTrace', skip_packages => qr/\AWebGUI::SQL(?:\z|::)/ ], + 'Response', + 'Logger', + ]; + enable_if { $_[0]->{'webgui.debug'} } '+WebGUI::Middleware::Debug::Environment'; + enable_if { $_[0]->{'webgui.debug'} } '+WebGUI::Middleware::Debug::Performance'; + + # This one uses the Session object, so it comes after WebGUI::Middleware::Session + mount $config->get('uploadsURL') => builder { + enable '+WebGUI::Middleware::WGAccess'; + Plack::App::File->new(root => $config->get('uploadsPath')); + }; + + # enable config defined Middleware + + for my $mw ( @{ $config->get('plackMiddleware') || [] } ) { + enable $mw; + } + + # Return the app + mount '/' => $wg->to_app; +}; + diff --git a/share/upgrades/7.10.24-8.0.0/addAssetEditTemplate.pl b/share/upgrades/7.10.24-8.0.0/addAssetEditTemplate.pl new file mode 100644 index 000000000..cd51c0625 --- /dev/null +++ b/share/upgrades/7.10.24-8.0.0/addAssetEditTemplate.pl @@ -0,0 +1,9 @@ + +use WebGUI::Upgrade::Script; + +start_step "Adding Edit Asset Template"; + +session->setting->set( 'templateIdAssetEdit' => 'yKl2HX76TSuv42vmprFbXQ' ); + +done; + diff --git a/share/upgrades/7.10.24-8.0.0/addI18nMacroAlias.pl b/share/upgrades/7.10.24-8.0.0/addI18nMacroAlias.pl new file mode 100644 index 000000000..dfa4acf1b --- /dev/null +++ b/share/upgrades/7.10.24-8.0.0/addI18nMacroAlias.pl @@ -0,0 +1,9 @@ + +use WebGUI::Upgrade::Script; + +start_step "Adding International macro alias: ^i18n(...);"; + +config->addToHash( 'macros', 'i18n' => 'International' ); + +done; + diff --git a/share/upgrades/7.10.24-8.0.0/addMaintenancePageToConfig.pl b/share/upgrades/7.10.24-8.0.0/addMaintenancePageToConfig.pl new file mode 100644 index 000000000..e35052024 --- /dev/null +++ b/share/upgrades/7.10.24-8.0.0/addMaintenancePageToConfig.pl @@ -0,0 +1,14 @@ +use WebGUI::Upgrade::Script; + +use File::Basename; +use Cwd qw(realpath); +use File::Spec::Functions; +use WebGUI::Paths; + +start_step "Moving preload files"; + +my $webgui_root = realpath( catdir( dirname( $INC{'WebGUI/Upgrade/Script.pm'} ), (updir) x 3 ) ); + +config->set('maintenancePage', catfile( $webgui_root, 'www', 'maintenance.html' )); + +done; diff --git a/share/upgrades/7.10.24-8.0.0/addNewAdminConsole.pl b/share/upgrades/7.10.24-8.0.0/addNewAdminConsole.pl new file mode 100644 index 000000000..bde82bcc1 --- /dev/null +++ b/share/upgrades/7.10.24-8.0.0/addNewAdminConsole.pl @@ -0,0 +1,21 @@ + +use WebGUI::Upgrade::Script; +use List::MoreUtils qw( any ); + +start_step "Adding new Admin Console"; + +config->addToArrayAfter( + 'contentHandlers', 'WebGUI::Content::Referral', 'WebGUI::Content::Admin' +); + +# Remove irrelevant Admin Console items +config->deleteFromHash( 'adminConsole', 'adminConsoleOff' ); +config->deleteFromHash( 'adminConsole', 'assets' ); + +# Remove old admin handlers +config->deleteFromArray( 'contentHandlers', 'WebGUI::Content::AssetManager' ); + +# Add template setting +session->setting->set( 'templateIdAdmin' => 'p8g7xlQaTeKSRRDo-_ejSQ' ); + +done; diff --git a/share/upgrades/7.10.24-8.0.0/addTemplateToolkit.pl b/share/upgrades/7.10.24-8.0.0/addTemplateToolkit.pl new file mode 100644 index 000000000..77017d4cd --- /dev/null +++ b/share/upgrades/7.10.24-8.0.0/addTemplateToolkit.pl @@ -0,0 +1,12 @@ + +use WebGUI::Upgrade::Script; + +start_step "Adding Template Toolkit template parser"; + +my $class = 'WebGUI::Asset::Template::TemplateToolkit'; +unless ( grep { $_ eq $class } @{ session->config->get('templateParsers') } ) { + config->addToArray( 'templateParsers' => $class ); +} + +done; + diff --git a/share/upgrades/7.10.24-8.0.0/admin_console.wgpkg b/share/upgrades/7.10.24-8.0.0/admin_console.wgpkg new file mode 100644 index 000000000..886184d57 Binary files /dev/null and b/share/upgrades/7.10.24-8.0.0/admin_console.wgpkg differ diff --git a/share/upgrades/7.10.24-8.0.0/admin_progress_bar.wgpkg b/share/upgrades/7.10.24-8.0.0/admin_progress_bar.wgpkg new file mode 100644 index 000000000..10fc4408f Binary files /dev/null and b/share/upgrades/7.10.24-8.0.0/admin_progress_bar.wgpkg differ diff --git a/share/upgrades/7.10.24-8.0.0/default_page.wgpkg b/share/upgrades/7.10.24-8.0.0/default_page.wgpkg new file mode 100644 index 000000000..8aad02a34 Binary files /dev/null and b/share/upgrades/7.10.24-8.0.0/default_page.wgpkg differ diff --git a/share/upgrades/7.10.24-8.0.0/documentation_free-documentation.wgpkg b/share/upgrades/7.10.24-8.0.0/documentation_free-documentation.wgpkg new file mode 100644 index 000000000..0bf534bdf Binary files /dev/null and b/share/upgrades/7.10.24-8.0.0/documentation_free-documentation.wgpkg differ diff --git a/share/upgrades/7.10.24-8.0.0/facebook_auth.pl b/share/upgrades/7.10.24-8.0.0/facebook_auth.pl new file mode 100644 index 000000000..cf18fc50b --- /dev/null +++ b/share/upgrades/7.10.24-8.0.0/facebook_auth.pl @@ -0,0 +1,4 @@ +use WebGUI::Upgrade::Script; +start_step "Add Facebook auto to the config file"; +config->addToArray('authMethods', 'Facebook'); +done; diff --git a/share/upgrades/7.10.24-8.0.0/facebook_auth.sql b/share/upgrades/7.10.24-8.0.0/facebook_auth.sql new file mode 100644 index 000000000..2aedfa326 --- /dev/null +++ b/share/upgrades/7.10.24-8.0.0/facebook_auth.sql @@ -0,0 +1,4 @@ +insert into settings values ('facebookAuthEnabled',0); +insert into settings values ('facebookAuthAppId',''); +insert into settings values ('facebookAuthSecret',''); +insert into settings values ('facebookAuthTemplateIdChooseUsername','anlFXped9lqXPThZTdFX0A'); \ No newline at end of file diff --git a/share/upgrades/7.10.24-8.0.0/migrateToNewCache.pl b/share/upgrades/7.10.24-8.0.0/migrateToNewCache.pl new file mode 100644 index 000000000..5241484e0 --- /dev/null +++ b/share/upgrades/7.10.24-8.0.0/migrateToNewCache.pl @@ -0,0 +1,36 @@ +use WebGUI::Upgrade::Script; +use Module::Find; + +start_step "Migrating to new cache"; + +rm_lib + findallmod('WebGUI::Cache'), + 'WebGUI::Workflow::Activity::CleanDatabaseCache', + 'WebGUI::Workflow::Activity::CleanFileCache', +; + +config->set("cache", { + 'driver' => 'FastMmap', + 'expires_variance' => '0.10', + 'root_dir' => '/tmp/WebGUICache', +}); + +config->set('hotSessionFlushToDb', 600); +config->delete('disableCache'); +config->delete('cacheType'); +config->delete('fileCacheRoot'); +config->deleteFromArray('workflowActivities/None', 'WebGUI::Workflow::Activity::CleanDatabaseCache'); +config->deleteFromArray('workflowActivities/None', 'WebGUI::Workflow::Activity::CleanFileCache'); + +sql 'DROP TABLE IF EXISTS cache'; +sql 'DELETE FROM WorkflowActivity WHERE className in (?,?)', + 'WebGUI::Workflow::Activity::CleanDatabaseCache', + 'WebGUI::Workflow::Activity::CleanFileCache', +; +sql 'DELETE FROM WorkflowActivityData WHERE activityId IN (?,?)', + 'pbwfactivity0000000002', + 'pbwfactivity0000000022', +; + +done; + diff --git a/share/upgrades/7.10.24-8.0.0/moveFileLocations.pl b/share/upgrades/7.10.24-8.0.0/moveFileLocations.pl new file mode 100644 index 000000000..f468869c7 --- /dev/null +++ b/share/upgrades/7.10.24-8.0.0/moveFileLocations.pl @@ -0,0 +1,20 @@ +use WebGUI::Upgrade::Script; + +use File::Basename; +use Cwd qw(realpath); +use File::Spec::Functions; +use WebGUI::Paths; + +start_step "Moving preload files"; + +my $webgui_root = realpath( catdir( dirname( $INC{'WebGUI/Upgrade/Script.pm'} ), (updir) x 3 ) ); + +unlink catfile($webgui_root, 'lib', 'default.ttf'); + +unlink catfile($webgui_root, 'sbin', 'preload.custom.example'); +unlink catfile($webgui_root, 'sbin', 'preload.exclude.example'); + +rename catfile($webgui_root, 'sbin', 'preload.custom'), WebGUI::Paths->preloadCustom; +rename catfile($webgui_root, 'sbin', 'preload.exclude'), WebGUI::Paths->preloadExclusions; + +done; diff --git a/share/upgrades/7.10.24-8.0.0/moveMaintenance.pl b/share/upgrades/7.10.24-8.0.0/moveMaintenance.pl new file mode 100644 index 000000000..0c9fdc26a --- /dev/null +++ b/share/upgrades/7.10.24-8.0.0/moveMaintenance.pl @@ -0,0 +1,13 @@ +use WebGUI::Upgrade::Script; + +use File::Spec::Functions; +use File::Basename; +use Cwd qw(realpath); + +my $webgui_root = realpath( catdir( dirname( $INC{'WebGUI/Upgrade/Script.pm'} ), (updir) x 3 ) ); + +start_step "Moving maintenance file"; + +unlink catfile($webgui_root, 'docs', 'maintenance.html'); + +done; diff --git a/share/upgrades/7.10.24-8.0.0/moveRequiredProfileFields.pl b/share/upgrades/7.10.24-8.0.0/moveRequiredProfileFields.pl new file mode 100644 index 000000000..b184dd6bc --- /dev/null +++ b/share/upgrades/7.10.24-8.0.0/moveRequiredProfileFields.pl @@ -0,0 +1,43 @@ + +use WebGUI::Upgrade::Script; + +use WebGUI::Pluggable; +use WebGUI::ProfileField; + +start_step "Move core profile fields to users table..."; + +my @fields = qw( ableToBeFriend alias allowPrivateMessages avatar cellPhone dateFormat + email firstDayOfWeek firstName language lastName publicProfile receiveInboxEmailNotifications + receiveInboxSmsNotifications showMessageOnLoginSeen showOnline signature timeFormat timeZone + toolbar uiLevel versionTagMode ); + +# Create the new columns +report "Creating new columns in the user table"; +for my $fieldName ( @fields ) { + my $field = WebGUI::ProfileField->new( session, $fieldName ); + my $fieldClass = $field->getFormControlClass; + eval { WebGUI::Pluggable::load( $fieldClass ) }; + my $dbType = $fieldClass->getDatabaseFieldType; + session->db->write( sprintf q{ ALTER TABLE users ADD COLUMN `%s` %s }, $fieldName, $dbType ); +} + +# Update the table +report "Copying data for all users, this could take a while"; +my @pairs = map { q{`users`.`} . $_ . q{`=`userProfileData`.`} . $_ . q{`} } @fields; +session->db->write( + q{ UPDATE `users`,`userProfileData` SET } . join( ", ", @pairs ) . + q{ WHERE `users`.`userId` = `userProfileData`.`userId` } +); + +# Drop the old tables +report "Removing old columns"; +for my $fieldName ( @fields ) { + session->db->write( qq{ ALTER TABLE userProfileData DROP COLUMN `$fieldName` } ); +} + +# Move not-profile fields in userProfileData +session->db->write( qq{ ALTER TABLE users ADD privacyFields LONGTEXT } ); +session->db->write( qq{ UPDATE users,userProfileData SET users.privacyFields = userProfileData.wg_privacySettings } ); +session->db->write( qq{ ALTER TABLE userProfileData DROP COLUMN wg_privacySettings } ); + +done; diff --git a/share/upgrades/7.10.24-8.0.0/one_over_three.wgpkg b/share/upgrades/7.10.24-8.0.0/one_over_three.wgpkg new file mode 100644 index 000000000..87037f01e Binary files /dev/null and b/share/upgrades/7.10.24-8.0.0/one_over_three.wgpkg differ diff --git a/share/upgrades/7.10.24-8.0.0/one_over_two.wgpkg b/share/upgrades/7.10.24-8.0.0/one_over_two.wgpkg new file mode 100644 index 000000000..180d5eacc Binary files /dev/null and b/share/upgrades/7.10.24-8.0.0/one_over_two.wgpkg differ diff --git a/share/upgrades/7.10.24-8.0.0/pbtmplblankstyle000001.wgpkg b/share/upgrades/7.10.24-8.0.0/pbtmplblankstyle000001.wgpkg new file mode 100644 index 000000000..d9fa4a06e Binary files /dev/null and b/share/upgrades/7.10.24-8.0.0/pbtmplblankstyle000001.wgpkg differ diff --git a/share/upgrades/7.10.24-8.0.0/plainblacknews.wgpkg b/share/upgrades/7.10.24-8.0.0/plainblacknews.wgpkg new file mode 100644 index 000000000..178a3b987 Binary files /dev/null and b/share/upgrades/7.10.24-8.0.0/plainblacknews.wgpkg differ diff --git a/share/upgrades/7.10.24-8.0.0/removeAdminBar.pl b/share/upgrades/7.10.24-8.0.0/removeAdminBar.pl new file mode 100644 index 000000000..9487d7597 --- /dev/null +++ b/share/upgrades/7.10.24-8.0.0/removeAdminBar.pl @@ -0,0 +1,47 @@ +use WebGUI::Upgrade::Script; + +start_step "Editing templates to remove AdminBar macro calls"; + +use WebGUI::Macro; +use WebGUI::Asset::Template; +use File::Spec; +use Cwd qw(realpath); +use WebGUI::Paths; + +my $removeAdminBar = sub { + my $macro = shift; + if ($macro->{macro} eq 'AdminBar' || $macro->{macroPackage} eq 'WebGUI::Macro::AdminBar' ) { + return ''; + } + else { + return; + } +}; +my $iter = WebGUI::Asset::Template->getIsa( session ); +ASSET: while (1) { + my $template = eval { $iter->() }; + if (my $e = Exception::Class->caught()) { + session->log->error($@); + next ASSET; + } + last ASSET unless $template; + + my $content = $template->template; + WebGUI::Macro::transform( session, \$content, $removeAdminBar ); + $template->template( $content ); + $template->write; +} + +done; + +start_step "Removing Admin Bar from config file"; + +session->config->delete( 'macros/AdminBar' ); + +done; + +start_step "Removing Admin Bar module"; + +rm_lib('WebGUI::Macro::AdminBar'); + +done; diff --git a/share/upgrades/7.10.24-8.0.0/removeFilePile.pl b/share/upgrades/7.10.24-8.0.0/removeFilePile.pl new file mode 100644 index 000000000..f052bc98e --- /dev/null +++ b/share/upgrades/7.10.24-8.0.0/removeFilePile.pl @@ -0,0 +1,16 @@ +use WebGUI::Upgrade::Script; +use File::Spec; +use WebGUI::Paths; +use Cwd qw(realpath); + +start_step "Removing FilePile asset from config file"; + +config->deleteFromHash( 'assets', 'WebGUI::Asset::FilePile' ); + +done; + +start_step "Removing FilePile asset module"; + +rm_lib('WebGUI::Asset::FilePile'); + +done; diff --git a/share/upgrades/7.10.24-8.0.0/removeMobileUserAgents.pl b/share/upgrades/7.10.24-8.0.0/removeMobileUserAgents.pl new file mode 100644 index 000000000..c1516d79e --- /dev/null +++ b/share/upgrades/7.10.24-8.0.0/removeMobileUserAgents.pl @@ -0,0 +1,7 @@ +use WebGUI::Upgrade::Script; + +start_step "Removing mobile agent list"; + +config->delete('mobileUserAgents'); + +done; diff --git a/share/upgrades/7.10.24-8.0.0/removeShowPerformance.pl b/share/upgrades/7.10.24-8.0.0/removeShowPerformance.pl new file mode 100644 index 000000000..3a238e7f1 --- /dev/null +++ b/share/upgrades/7.10.24-8.0.0/removeShowPerformance.pl @@ -0,0 +1,7 @@ +use WebGUI::Upgrade::Script; + +start_step "Removing show performance setting"; + +session->setting->remove('showPerformanceIndicators'); + +done; diff --git a/share/upgrades/7.10.24-8.0.0/removeURLHandlers.pl b/share/upgrades/7.10.24-8.0.0/removeURLHandlers.pl new file mode 100644 index 000000000..5987dcca2 --- /dev/null +++ b/share/upgrades/7.10.24-8.0.0/removeURLHandlers.pl @@ -0,0 +1,8 @@ +use WebGUI::Upgrade::Script; + +start_step "Removing URL Handlers from WebGUI Configuration files"; + +config->delete( 'urlHandlers' ); + +done; + diff --git a/share/upgrades/7.10.24-8.0.0/removeWebGUIStatistics.pl b/share/upgrades/7.10.24-8.0.0/removeWebGUIStatistics.pl new file mode 100644 index 000000000..ec761a57e --- /dev/null +++ b/share/upgrades/7.10.24-8.0.0/removeWebGUIStatistics.pl @@ -0,0 +1,24 @@ +use WebGUI::Upgrade::Script; +use File::Spec; +use WebGUI::Paths; +use Cwd qw(realpath); + +start_step "Removing WebGUI statistics workflows and code"; + +config->deleteFromHash( 'adminConsole', 'statistics' ); + +report "Deleting Workflow Activities"; +my $activity = dbh->write(q|delete from WorkflowActivity where className='WebGUI::Workflow::Activity::SendWebguiStats'|); + +report "Deleting Workflow and Cron"; +my $workflow = WebGUI::Workflow->new(session, 'send_webgui_statistics'); +$workflow->delete; +##This may not be in there if it is not enabled. +my $task = WebGUI::Workflow::Cron->new(session, 'send_webgui_statistics'); +$task && $task->delete; + +report "Deleting files"; +rm_lib 'WebGUI::Operation::Statistics'; +rm_lib 'WebGUI::Workflow::Activity::SendWebguiStats'; + +done; diff --git a/share/upgrades/7.10.24-8.0.0/right_column.wgpkg b/share/upgrades/7.10.24-8.0.0/right_column.wgpkg new file mode 100644 index 000000000..5898f56c3 Binary files /dev/null and b/share/upgrades/7.10.24-8.0.0/right_column.wgpkg differ diff --git a/share/upgrades/7.10.24-8.0.0/root_import_adminconsole_admin-interface.wgpkg b/share/upgrades/7.10.24-8.0.0/root_import_adminconsole_admin-interface.wgpkg new file mode 100644 index 000000000..a15aaf08a Binary files /dev/null and b/share/upgrades/7.10.24-8.0.0/root_import_adminconsole_admin-interface.wgpkg differ diff --git a/share/upgrades/7.10.24-8.0.0/root_import_adminconsole_edit-asset.wgpkg b/share/upgrades/7.10.24-8.0.0/root_import_adminconsole_edit-asset.wgpkg new file mode 100644 index 000000000..2be8a3268 Binary files /dev/null and b/share/upgrades/7.10.24-8.0.0/root_import_adminconsole_edit-asset.wgpkg differ diff --git a/share/upgrades/7.10.24-8.0.0/root_import_default-asset-subscription.wgpkg b/share/upgrades/7.10.24-8.0.0/root_import_default-asset-subscription.wgpkg new file mode 100644 index 000000000..f04fa276d Binary files /dev/null and b/share/upgrades/7.10.24-8.0.0/root_import_default-asset-subscription.wgpkg differ diff --git a/share/upgrades/7.10.24-8.0.0/root_import_default-facebook-choose-username.wgpkg b/share/upgrades/7.10.24-8.0.0/root_import_default-facebook-choose-username.wgpkg new file mode 100644 index 000000000..3b9bb8ef2 Binary files /dev/null and b/share/upgrades/7.10.24-8.0.0/root_import_default-facebook-choose-username.wgpkg differ diff --git a/share/upgrades/7.10.24-8.0.0/root_import_richedit.wgpkg b/share/upgrades/7.10.24-8.0.0/root_import_richedit.wgpkg new file mode 100644 index 000000000..1c70f3674 Binary files /dev/null and b/share/upgrades/7.10.24-8.0.0/root_import_richedit.wgpkg differ diff --git a/share/upgrades/7.10.24-8.0.0/side_by_side.wgpkg b/share/upgrades/7.10.24-8.0.0/side_by_side.wgpkg new file mode 100644 index 000000000..add9aabd2 Binary files /dev/null and b/share/upgrades/7.10.24-8.0.0/side_by_side.wgpkg differ diff --git a/share/upgrades/7.10.24-8.0.0/style-underground.wgpkg b/share/upgrades/7.10.24-8.0.0/style-underground.wgpkg new file mode 100644 index 000000000..62f8bdc9f Binary files /dev/null and b/share/upgrades/7.10.24-8.0.0/style-underground.wgpkg differ diff --git a/share/upgrades/7.10.24-8.0.0/three-columns.wgpkg b/share/upgrades/7.10.24-8.0.0/three-columns.wgpkg new file mode 100644 index 000000000..58ad75b8b Binary files /dev/null and b/share/upgrades/7.10.24-8.0.0/three-columns.wgpkg differ diff --git a/share/upgrades/7.10.24-8.0.0/zzz_renameAccountMacroTemplateVariables.pl b/share/upgrades/7.10.24-8.0.0/zzz_renameAccountMacroTemplateVariables.pl new file mode 100644 index 000000000..f58a12fc1 --- /dev/null +++ b/share/upgrades/7.10.24-8.0.0/zzz_renameAccountMacroTemplateVariables.pl @@ -0,0 +1,20 @@ + +use WebGUI::Upgrade::Script; + +start_step "Rename Account Macro template variables"; + +my $sth = session->db->read( q|SELECT assetId, revisionDate FROM template where namespace="Macro/a_account"| ); +ASSET: while ( my ($assetId, $revisionDate) = $sth->array ) { + my $asset = eval { WebGUI::Asset->newById( session, $assetId, $revisionDate ); }; + next ASSET if Exception::Class->caught; + my $template = $asset->get('template'); + $template =~ s/account\.url/account_url/msg; + $template =~ s/account\.text/account_text/msg; + $asset->update({ + template => $template, + }); +} + + +done; + diff --git a/share/upgrades/7.10.24-8.0.0/zzz_renameAdminToggleMacroTemplateVariables.pl b/share/upgrades/7.10.24-8.0.0/zzz_renameAdminToggleMacroTemplateVariables.pl new file mode 100644 index 000000000..2fb06f3e0 --- /dev/null +++ b/share/upgrades/7.10.24-8.0.0/zzz_renameAdminToggleMacroTemplateVariables.pl @@ -0,0 +1,20 @@ + +use WebGUI::Upgrade::Script; + +start_step "Rename AdminToggle Macro template variables"; + +my $sth = session->db->read( q|SELECT assetId, revisionDate FROM template where namespace="Macro/AdminToggle"| ); +ASSET: while ( my ($assetId, $revisionDate) = $sth->array ) { + my $asset = eval { WebGUI::Asset->newById( session, $assetId, $revisionDate ); }; + next ASSET if Exception::Class->caught; + my $template = $asset->get('template'); + $template =~ s/toggle\.url/toggle_url/msg; + $template =~ s/toggle\.text/toggle_text/msg; + $asset->update({ + template => $template, + }); +} + + +done; + diff --git a/share/upgrades/7.10.24-8.0.0/zzz_renameFormBuilderTemplateVars.pl b/share/upgrades/7.10.24-8.0.0/zzz_renameFormBuilderTemplateVars.pl new file mode 100644 index 000000000..0e88dff53 --- /dev/null +++ b/share/upgrades/7.10.24-8.0.0/zzz_renameFormBuilderTemplateVars.pl @@ -0,0 +1,63 @@ + +use WebGUI::Upgrade::Script; +use WebGUI::Asset::Template; + +start_step "Migrating templates to FormBuilder variables..."; +version_tag "Migrating templates to FormBuilder"; + +# Map of namespace => { oldName => newName } +# This is done first. +my %namespaces = ( + "Account/FriendManager/Edit" => { + formHeader => "form_header", + friends_loop => "form_field_friendToAxe_loop", + checkForm => "field", + # username => "label", # This only in the friends_loop, see replacements below + removeAll => "form_field_removeAllFriends", + addUser => "form_field_userToAdd", + addManagers => "form_field_addManagers", + submit => "form_field_submit", + formFooter => "form_footer", + }, + "Account/Friends/SendRequest" => { + form_message_rich => "form_field_message_field", + submit_button => "form_field_submit", + }, +); + +# Map of namespace => { match => replacement } +# This is done second +my %replacements = ( + "Account/FriendManager/Edit" => { + "()" => '%s', + "(friendToAxe_loop.+?)username(.+?tmpl_loop)" => '%slabel%s', + }, +); + + +for my $ns ( keys %namespaces ) { + # Get all the templates in this namespace + for my $assetId ( keys %{ WebGUI::Asset::Template->getList( session, $ns ) } ) { + my $asset = asset( $assetId ); + my $template = $asset->template; + + for my $old ( keys %{ $namespaces{$ns} || {} } ) { + my $new = $namespaces{$ns}->{$old}; + $template =~ s/$old/$new/g; + } + + for my $match ( keys %{ $replacements{$ns} || {} } ) { + my $replace = $replacements{$ns}->{$match}; + $template =~ s/$match/sprintf( $replace, $1, $2, $3, $4, $5, $6, $7, $8, $9 )/es; # No, I do not feel good about this + } + + $asset->addRevision( { + template => $template, + tagId => version_tag->getId, + status => "pending", + } ); + } +} + +version_tag->commit; +done; diff --git a/share/upgrades/7.10.24-8.0.0/zzzz_convertToInnoDb.pl b/share/upgrades/7.10.24-8.0.0/zzzz_convertToInnoDb.pl new file mode 100644 index 000000000..34e44d0d1 --- /dev/null +++ b/share/upgrades/7.10.24-8.0.0/zzzz_convertToInnoDb.pl @@ -0,0 +1,15 @@ + +use WebGUI::Upgrade::Script; + +start_step "Convert all tables except assetIndex to InnoDB"; + +my $get_table = session->db->table_info('', '', '%', 'TABLE'); + +TABLE: while ( my $table = $get_table->fetchrow_hashref() ) { + next TABLE if $table->{TABLE_NAME} eq 'assetIndex'; + session->db->write("ALTER TABLE ". dbh->quote_identifier($table->{TABLE_NAME}). " ENGINE=InnoDB"); +} + + +done; + diff --git a/share/upgrades/_upgrade.skeleton b/share/upgrades/_upgrade.skeleton new file mode 100644 index 000000000..a48f51bf5 --- /dev/null +++ b/share/upgrades/_upgrade.skeleton @@ -0,0 +1,23 @@ +use WebGUI::Upgrade::Script; + +start_step "Running an upgrade step"; + +# clear_cache; + +# my $session = session; +# my $config = config; +# my $dbh = dbh; +# sql 'CREATE TABLE ...'; +# version_tag "Doing asset work"; + +# rm_lib 'WebGUI::Old::Module'; + +# my $asset = asset('assetId'); +# my $asset = asset('asset/url'); +# my $asset = import_node->addChild( ... ); +# my $assets = root_asset->getLineage( ... ); + +# my $file = collateral->file('filename'); +# import_package 'some_files.wgpkg'; + +done; diff --git a/t/00_compile.t b/t/00_compile.t index 61826e1a2..cb72a1c32 100644 --- a/t/00_compile.t +++ b/t/00_compile.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -26,7 +26,7 @@ my $wgLib = catdir($wgRoot, 'lib'); unshift @INC, $wgLib; my @modules = findModules($wgLib); -my @scripts = findScripts(catdir($wgRoot, 'docs', 'upgrades'), catdir($wgRoot, 'sbin')); +my @scripts = findScripts(catdir($wgRoot, 'sbin'), catdir($wgRoot, 'share', 'upgrades', '*')); plan tests => 2 * (scalar @modules + scalar @scripts); my $failed_compile = 0; @@ -37,9 +37,10 @@ foreach my $library (@modules) { local $SIG{__WARN__} = sub { my $warn = shift; # file the warning occurred in + my $caller = caller; my $warning_file = realpath( (caller(0))[1] ); - # only care about it if it is within the WebGUI lib directory - if ($warning_file =~ /^\Q$wgLib/) { + # only care about it if it is within the WebGUI lib directory or is an explicit warning + if ($warning_file =~ /^\Q$wgLib/ || $caller eq 'Carp') { $warnings .= $warn; } }; @@ -74,6 +75,8 @@ for my $script (@scripts) { local $SIG{__WARN__} = sub { $warnings .= shift; }; + # upgrade scripts need a version defined to be able to compile + local $ENV{WEBGUI_UPGRADE_VERSION} = '8.0.0'; eval $to_compile; chomp $warnings; is($@, '', "$short_name compiles successfully"); diff --git a/t/Account.t b/t/Account.t index 2cd2a29c0..24744e59d 100644 --- a/t/Account.t +++ b/t/Account.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 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,9 +12,7 @@ # This tests the operation of WebGUI::Account modules. You can use # as a base to test your own modules. -use FindBin; use strict; -use lib "$FindBin::Bin/lib"; use Test::More; use WebGUI::Test; # Must use this before any other WebGUI modules use WebGUI::Session; diff --git a/t/Account/FriendManager.t b/t/Account/FriendManager.t new file mode 100644 index 000000000..3d76d64f9 --- /dev/null +++ b/t/Account/FriendManager.t @@ -0,0 +1,84 @@ +# vim:syntax=perl +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 +#------------------------------------------------------------------ + +# Test the Account FriendManager +# +# + +use FindBin; +use strict; +use lib "$FindBin::Bin/lib"; +use Test::More; +use WebGUI::Test; # Must use this before any other WebGUI modules +use WebGUI::Session; +use WebGUI::Test::Mechanize; + +#---------------------------------------------------------------------------- +# Init +my $session = WebGUI::Test->session; + +#---------------------------------------------------------------------------- +# Test the edit page of the friends manager + +# Start a session +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get_ok( '/' ); + +# Get our admin +my $admin = WebGUI::User->new( $mech->session, "3" ); + +# Add a user who can be a friend for admin +my $edgar_friendly = WebGUI::Test->user( username => 'edgarfriendly', ableToBeFriend => 1 ); +$edgar_friendly = WebGUI::User->new( $mech->session, $edgar_friendly->getId ); # fix the session + +# Add a user who is not very nice +my $simon_phoenix = WebGUI::Test->user( username => 'simonphoenix', ableToBeFriend => 0 ); +$simon_phoenix = WebGUI::User->new( $mech->session, $simon_phoenix->getId ); # fix the session + +$mech->session->user({ user => $admin }); + +$mech->get_ok( '/?op=account;module=friendManager;do=editFriends;userId=3;groupName=Registered%20Users', "friend manager" ); +$mech->content_lacks( $simon_phoenix->getId, "simon isn't friendly" ); +$mech->submit_form_ok( + { + form_name => "friendManager", + fields => { + userToAdd => $edgar_friendly->getId, + }, + }, + "submit form to add a friend" +); +ok( $admin->friends->hasUser( $edgar_friendly ), "friend was added" ); + +$mech->get_ok( '/?op=account;module=friendManager;do=editFriends;userId=3;groupName=Registered%20Users', "friend manager" ); +$mech->content_lacks( $simon_phoenix->getId, "simon isn't friendly" ); +$mech->submit_form_ok( + { + form_name => "friendManager", + fields => { + friendToAxe => $edgar_friendly->getId, + }, + }, + "submit form to axe a friend" +); + +# Instance a new group with the same ID as the admin's friends group. +# There is some stale cache problem with using $admin->friends directly +ok( !WebGUI::Group->new( $session, $admin->get('friendsGroup') )->hasUser( $edgar_friendly ), "friend was removed" ); + +TODO: { + local $TODO = "Fix this stale cache problem"; + ok( !$admin->friends->hasUser( $edgar_friendly ), "friend was removed" ); +}; + +done_testing; + +#vim:ft=perl diff --git a/t/Account/Friends.t b/t/Account/Friends.t index 298427cf4..ede199056 100644 --- a/t/Account/Friends.t +++ b/t/Account/Friends.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 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,12 +12,11 @@ # This tests the operation of WebGUI::Account modules. You can use # as a base to test your own modules. -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use Test::More; use WebGUI::Test; # Must use this before any other WebGUI modules use WebGUI::Session; +use WebGUI::Test::Mechanize; #---------------------------------------------------------------------------- # Init @@ -27,7 +26,7 @@ my $session = WebGUI::Test->session; #---------------------------------------------------------------------------- # Tests -plan tests => 7; # Increment this number for each test you create +plan tests => 11; # Increment this number for each test you create #---------------------------------------------------------------------------- # Test the creation of WebGUI::Account::Friends @@ -69,4 +68,37 @@ is( $account->getUrl( 'op=account' ), $session->url->page( 'op=account' ), 'getUrl doesnt add op=account if already exists' ); +#---------------------------------------------------------------------------- +# Test the send friend request form + +# Start a session +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get_ok( '/' ); + +# Get our admin +my $admin = WebGUI::User->new( $mech->session, "3" ); + +# Add a user who can be a friend for admin +my $edgar_friendly = WebGUI::Test->user( username => 'edgarfriendly', ableToBeFriend => 1, publicProfile => 'all', ); +$edgar_friendly = WebGUI::User->new( $mech->session, $edgar_friendly->getId ); # fix the session + +# Add a user who is not very nice +my $simon_phoenix = WebGUI::Test->user( username => 'simonphoenix', ableToBeFriend => 0, publicProfile => 'none' ); +$simon_phoenix = WebGUI::User->new( $mech->session, $simon_phoenix->getId ); # fix the session + +$mech->session->user({ user => $admin }); + +$mech->get_ok( "/?op=account;module=friends;do=sendFriendsRequest;uid=" . $edgar_friendly->getId, "get send request form" ); +$mech->submit_form_ok( + { + form_name => "messageForm", + fields => { }, # keep the defaults + }, + "submit send request form", +); + +my $friend = WebGUI::Friends->new($mech->session); +ok( $friend->isInvited($edgar_friendly->getId), "invitation was sent" ); + + #vim:ft=perl diff --git a/t/Account/Profile.t b/t/Account/Profile.t index 8b56538d1..960c6f0ae 100644 --- a/t/Account/Profile.t +++ b/t/Account/Profile.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -173,7 +173,7 @@ $andy = $session->user; #Test that the address was saved to the profile cmp_bag ( - [ map { $andy->profileField($_) } keys %profile_info ], + [ map { $andy->get($_) } keys %profile_info ], [ values %profile_info ], 'Profile fields were updated' ); diff --git a/t/AdSpace.t b/t/AdSpace.t index 66f7fedfd..69fd4178e 100644 --- a/t/AdSpace.t +++ b/t/AdSpace.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,12 +8,11 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/lib"; use WebGUI::Test; use WebGUI::Session; use WebGUI::AdSpace::Ad; +use WebGUI::AdSpace; use Test::More; use Test::Deep; @@ -30,18 +29,15 @@ my $newAdSpaceSettings = { my $numTests = 35; # increment this value for each test you create $numTests += 2 * scalar keys %{ $newAdSpaceSettings }; -++$numTests; ##For conditional testing on module load plan tests => $numTests; -my $loaded = use_ok('WebGUI::AdSpace'); - my $session = WebGUI::Test->session; my ($adSpace, $alfred, $alfred2, $bruce, $catWoman, ); my ($jokerAd, $penguinAd, $twoFaceAd); -local $ENV{REMOTE_ADDR} = '10.0.0.1'; -local $ENV{HTTP_USER_AGENT} = 'Mozilla/5.0'; +$session->request->env->{REMOTE_ADDR} = '10.0.0.1'; +$session->request->env->{HTTP_USER_AGENT} = 'Mozilla/5.0'; $adSpace = WebGUI::AdSpace->create($session, {name=>"Alfred"}); diff --git a/t/AdSpace/Ad.t b/t/AdSpace/Ad.t index 3ceead543..9ccc929ad 100644 --- a/t/AdSpace/Ad.t +++ b/t/AdSpace/Ad.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,12 +8,11 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; use WebGUI::AdSpace; +use WebGUI::AdSpace::Ad; use Test::More; use Test::Deep; @@ -38,12 +37,9 @@ my $newAdSettings = { my $numTests = 33; # increment this value for each test you create $numTests += scalar keys %{ $newAdSettings }; -++$numTests; ##For conditional testing on module load plan tests => $numTests; -my $loaded = use_ok('WebGUI::AdSpace::Ad'); - my $session = WebGUI::Test->session; my $ad; my ($richAd, $textAd, $imageAd, $nonAd, $setAd); @@ -51,9 +47,8 @@ my $imageStorage = WebGUI::Storage->create($session); WebGUI::Test->addToCleanup($imageStorage); $imageStorage->addFileFromScalar('foo.bmp', 'This is not really an image'); - -local $ENV{REMOTE_ADDR} = '10.0.0.1'; -local $ENV{HTTP_USER_AGENT} = 'Mozilla/5.0'; +$session->request->env->{REMOTE_ADDR} = '10.0.0.1'; +$session->request->env->{HTTP_USER_AGENT} = 'Mozilla/5.0'; my $adSpace = WebGUI::AdSpace->create($session, {name=>"Tim Robbins"}); WebGUI::Test->addToCleanup($adSpace); @@ -205,5 +200,6 @@ is($setAd->get('adText'), 'Performing a valuable service for the community', 'se $setAd->set({ url => '', adText => ''}); is($setAd->get('url'), '', 'set: clearing url'); is($setAd->get('adText'), '', 'set: clearing adText'); +$setAd->delete; #vim:ft=perl diff --git a/t/Admin.t b/t/Admin.t new file mode 100644 index 000000000..9b95e8c96 --- /dev/null +++ b/t/Admin.t @@ -0,0 +1,252 @@ +# vim:syntax=perl +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 +#------------------------------------------------------------------ + +# Write a little about what this script tests. +# +# + +use FindBin; +use strict; +use lib "$FindBin::Bin/lib"; +use JSON; +use Test::More; +use Test::Deep; +use WebGUI::Test; # Must use this before any other WebGUI modules +use WebGUI::Session; +use WebGUI::Test::Mechanize; + +#---------------------------------------------------------------------------- +# Init + +# Create a new admin plugin +package WebGUI::Admin::Plugin::Test; + +use Moose; +use base 'WebGUI::Admin::Plugin'; + +has '+title' => ( default => "title" ); +has '+icon' => ( default => "icon" ); +has '+iconSmall' => ( default => "iconSmall" ); +has 'test_config' => ( is => 'rw', default => 'default' ); + +sub canView { return 1; } +sub process { return { message => 'success' } } +sub www_view { return "view" } +sub www_test { return "test" } +sub www_config { return $_[0]->test_config } + +package main; +BEGIN { $INC{'WebGUI/Admin/Plugin/Test.pm'} = __FILE__; } + +my $session = WebGUI::Test->session; +$session->user({ userId => 3 }); + +my $import = WebGUI::Asset->getImportNode( $session ); +# Add a couple admin plugins to the config file +WebGUI::Test->originalConfig( "adminConsole" ); +$session->config->addToHash('adminConsole', 'test', { + className => 'WebGUI::Admin::Plugin::Test', +} ); +$session->config->addToHash('adminConsole', 'test2', { + url => '?op=admin;plugin=test;method=config', +} ); + +# Add some assets +my $snip = $import->addChild( { + className => 'WebGUI::Asset::Snippet', + title => 'test', + groupIdEdit => '3', + synopsis => "aReallyLongWordToGetIndexed", + keywords => "AKeywordToGetIndexed", +} ); +$snip->commit; +addToCleanup( $snip ); + +ok(WebGUI::Test->waitForAllForks(10), "... Forks finished"); + +#---------------------------------------------------------------------------- +# Tests + +my $output; + +# Test www_ methods +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->config ); +$mech->get('/'); # Start a session +$mech->session->user({ userId => '3' }); + +# www_processAssetHelper +$mech->get_ok( '/?op=admin;method=processAssetHelper;helperId=cut;assetId=' . $snip->getId ); + +cmp_deeply( + JSON->new->decode( $mech->content ), + map( { $_->{forkId} = ignore(); $_ } WebGUI::AssetHelper::Cut->new( id => 'cut', session => $session, asset => $snip )->process( )), + 'www_processAssetHelper', +); + +ok(WebGUI::Test->waitForAllForks(10), "... Forks finished"); + +# www_processPlugin +$mech->get_ok( '/?op=admin;method=processPlugin;id=test' ); +$output = $mech->content; +cmp_deeply( + JSON->new->decode( $output ), + WebGUI::Admin::Plugin::Test->process( $session ), + 'Test plugin process()', +) || diag( $output ); + +# www_findUser +$mech->get_ok( '/?op=admin;method=findUser;query=Adm' ); +$output = $mech->content; +cmp_deeply( + JSON->new->decode( $output ), + { results => superbagof( superhashof( { + userId => 3, + } ) ) }, + 'found the Admin user', +) || diag( $output ); + +# www_getClipboard +$snip->cut; +$mech->get_ok( '/?op=admin;method=getClipboard' ); +$output = $mech->content; +cmp_deeply( + JSON->new->decode( $output )->[0], + superhashof({ + assetId => $snip->getId, + url => $snip->getUrl, + title => $snip->menuTitle, + revisionDate => $snip->revisionDate, + icon => $snip->getIcon("small"), + }), + 'getClipboard found our snippet', +); + +# www_getCurrentVersionTag +# no current tag +$mech->get_ok( '/?op=admin;method=getCurrentVersionTag' ); +$output = $mech->content; +cmp_deeply( + JSON->new->decode( $output ), + { }, + 'www_getCurrentVersionTag no current version tag', +); +ok( !WebGUI::VersionTag->getWorking( $mech->session, "nocreate" ), "doesn't create a tag" ); + +# current tag +my $newtag = WebGUI::VersionTag->getWorking( $mech->session ); +addToCleanup( $newtag ); +$mech->get_ok( '/?op=admin;method=getCurrentVersionTag' ); +$output = $mech->content; +cmp_deeply( + JSON->new->decode( $output ), + { + tagId => $newtag->getId, + name => $newtag->get('name'), + editUrl => $newtag->getEditUrl, + commitUrl => $newtag->getCommitUrl, + leaveUrl => '/?op=leaveVersionTag', + }, + 'www_getCurrentVersionTag', +); + +# www_getVersionTags +$mech->get_ok( '/?op=admin;method=getVersionTags' ); +$output = $mech->content; +cmp_deeply( + JSON->new->decode( $output ), + superbagof( { + tagId => $newtag->getId, + name => $newtag->get("name"), + isCurrent => 1, + joinUrl => $newtag->getJoinUrl, + editUrl => $newtag->getEditUrl, + icon => $session->url->extras( 'icon/tag_green.png' ), + } ), + 'www_getVersionTags', +); + +# www_getTreeData +$mech->get_ok( '/?op=admin;method=getTreeData;assetUrl=' . $import->url ); +$output = $mech->content; +cmp_deeply( + JSON->new->decode( $output ), + superhashof({ + totalAssets => $import->getChildCount, + sort => ignore(), + dir => ignore(), + assets => [ + map { superhashof({ + assetId => $_->getId, + url => $_->getUrl, + lineage => $_->lineage, + title => $_->menuTitle, + revisionDate => $_->revisionDate, + childCount => $_->getChildCount, + assetSize => $_->assetSize, + lockedBy => ($_->isLockedBy ? $_->lockedBy->username : ''), + canEdit => $_->canEdit && $_->canEditIfLocked, + helpers => $_->getHelpers, + icon => $_->getIcon("small"), + className => $_->get('className'), + }) } @{ $import->getLineage( ['children'], { returnObjects => 1, maxAssets => 25 } ) } + ], + currentAsset => superhashof({ + assetId => $import->getId, + url => $import->getUrl, + title => $import->get('menuTitle'), # "Import" vs "Import Node" + icon => $import->getIcon("small"), + helpers => $import->getHelpers, + }), + crumbtrail => [ + map { superhashof({ title => $_->getTitle, url => $_->getUrl }) } + @{ $import->getLineage( ['ancestors'], { returnObjects => 1 } ) } + ], + }), + 'www_getTreeData', +); + +# www_searchAssets + +$mech->get_ok( '/?op=admin;method=searchAssets;query=aReallyLongWordToGetIndexed' ); +$output = $mech->content; +cmp_deeply( + JSON->new->decode( $output ), + { + totalAssets => 1, + sort => undef, + dir => "", + assets => [ + { + assetId => $snip->getId, + url => $snip->getUrl, + lineage => $snip->lineage, + title => $snip->menuTitle, + revisionDate => $snip->revisionDate, + childCount => $snip->getChildCount, + assetSize => $snip->assetSize, + lockedBy => ($snip->isLockedBy ? $snip->lockedBy->username : ''), + canEdit => $snip->canEdit && $snip->canEditIfLocked, + helpers => $snip->getHelpers, + icon => $snip->getIcon('small'), + className => $snip->get('className'), # getName is 'Snippet', className is 'WebGUI::Asset::Snippet' + revisions => ignore(), + type => ignore(), + } + ], + }, + 'www_searchAssets', +); + +ok(WebGUI::Test->waitForAllForks(10), "Forks finished"); + +done_testing; + +#vim:ft=perl diff --git a/t/Asset.t b/t/Asset.t new file mode 100644 index 000000000..358b1b09c --- /dev/null +++ b/t/Asset.t @@ -0,0 +1,405 @@ +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 strict; +use warnings; +no warnings qw(uninitialized); + +use WebGUI::Test; + +use Test::More; +use Test::Deep; +use Test::Exception; +use WebGUI::Exception; +use WebGUI::Asset; +use WebGUI::Keyword; + + +my $session = WebGUI::Test->session; + +{ + + note "new, session and title"; + my $asset = WebGUI::Asset->new({session => $session, }); + + isa_ok $asset, 'WebGUI::Asset'; + isa_ok $asset->session, 'WebGUI::Session'; + is $asset->session->getId, $session->getId, 'asset was assigned the correct session'; + + can_ok $asset, 'title', 'menuTitle'; + is $asset->title, 'Untitled', 'title: default is untitled'; + + $asset->title('asset title'); + is $asset->title, 'asset title', '... set, get'; + $asset->title(''); + is $asset->title, 'Untitled', '... get default title when empty title set'; + $asset->title('

    Header

    text'); + is $asset->title, 'Headertext', '... HTML is filtered out'; + $asset->title('

    '); + is $asset->title, 'Untitled', '... if HTML filters out all, returns default'; + + is $asset->get('title'), $asset->title, '... get(title) works'; + + is $asset->menuTitle, 'Untitled', 'menuTitle: default is untitled'; +} + +{ + note "assetId, getId"; + my $asset = WebGUI::Asset->new({session => $session, }); + can_ok $asset, qw/assetId getId/; + ok $session->id->valid( $asset->assetId), 'assetId generated by default is valid'; + is $asset->assetId, $asset->getId, '... getId is an alias for assetId'; + + my $asset2 = WebGUI::Asset->new({ session => $session, assetId => '' }); +} + +{ + + note "menuTitle"; + my $asset = WebGUI::Asset->new({ + session => $session, + title => 'asset title', + }); + + is $asset->menuTitle, 'asset title', 'menuTitle: default is title'; + + $asset->menuTitle('asset menuTitle'); + is $asset->menuTitle, 'asset menuTitle', '... set and get'; + + $asset->menuTitle(''); + is $asset->menuTitle, 'asset title', '... set to default when trying to clear the title'; + + $asset->menuTitle('

    Header

    text'); + is $asset->menuTitle, 'Headertext', '... HTML is filtered out'; + $asset->menuTitle('

    '); + is $asset->menuTitle, 'asset title', '... if HTML filters out all, returns default'; + + $asset = WebGUI::Asset->new({ + session => $session, + title => 'asset title', + menuTitle => 'menuTitle asset', + }); + is $asset->menuTitle, 'menuTitle asset', '... set via constructor'; +} + +{ + note "Class dispatch"; + my $asset = WebGUI::Asset->new({ + session => $session, + title => 'testing snippet', + className => 'WebGUI::Asset::Snippet', + }); + + isa_ok $asset, 'WebGUI::Asset'; + is $asset->className, 'WebGUI::Asset', 'passing className is ignored'; + + use WebGUI::Asset::Snippet; + $asset = WebGUI::Asset::Snippet->new({ + session => $session, + title => 'testing snippet', + }); + + isa_ok $asset, 'WebGUI::Asset::Snippet'; + is $asset->className, 'WebGUI::Asset::Snippet', 'className is set by the invoking class'; +} + +{ + note "Property inspection"; + my $asset = WebGUI::Asset->new({ + session => $session, + }); + + cmp_deeply( + [$asset->meta->get_all_properties], + array_each( + methods( + tableName => 'assetData', + ) + ), + 'all properties have the right tableName' + ); + +} + +{ + note "get, specific properties"; + my $asset = WebGUI::Asset->new({ + session => $session, + }); + my $properties = $asset->get(); + ok !exists $properties->{session}, 'no session'; + ok exists $properties->{keywords}, 'keywords'; ##Test for function later + ok exists $properties->{assetId}, 'assetId'; + ok exists $properties->{revisionDate}, 'assetId'; + ok exists $properties->{parentId}, 'parentId'; + ok exists $properties->{lineage}, 'lineage'; +} + +{ + note "getClassById"; + my $class; + $class = WebGUI::Asset->getClassById($session, 'PBasset000000000000001'); + is $class, 'WebGUI::Asset', 'getClassById: retrieve a class'; + $class = WebGUI::Asset->getClassById($session, 'PBasset000000000000001'); + is $class, 'WebGUI::Asset', '... cache check'; + $class = WebGUI::Asset->getClassById($session, 'PBasset000000000000002'); + is $class, 'WebGUI::Asset::Wobject::Folder', '... retrieve another class'; +} + +{ + note "newByPropertyHashRef"; + my $asset; + $asset = WebGUI::Asset->newByPropertyHashRef($session, {className => 'WebGUI::Asset::Snippet', title => 'The Shawshank Snippet'}); + isa_ok $asset, 'WebGUI::Asset::Snippet'; + is $asset->title, 'The Shawshank Snippet', 'title is assigned from the property hash'; + + my $a2 = WebGUI::Asset::Snippet->newByPropertyHashRef($session, {}); + isa_ok $asset, 'WebGUI::Asset::Snippet'; +} + +{ + note "new, fetching from db"; + my $asset; + $asset = WebGUI::Asset->new($session, 'PBasset000000000000001'); + isa_ok $asset, 'WebGUI::Asset'; + is $asset->title, 'Root', 'got the right asset'; +} + +{ + note "new (caching), purgeCache"; + my $testId = 'wg8TestAsset0000000001'; + my $revisionDate = time(); + $session->db->write("insert into asset (assetId) VALUES (?)", [$testId]); + $session->db->write("insert into assetData (assetId, revisionDate) VALUES (?,?)", [$testId, $revisionDate]); + + my $datum; + $datum = $session->cache->get("asset".$testId.$revisionDate); + is $datum, undef, 'no cache exists for the test assetId, yet'; + + my $testAsset = WebGUI::Asset->new($session, $testId, $revisionDate); + $datum = $session->cache->get("asset".$testId.$revisionDate); + isnt $datum, undef, 'cache was created on new (from db)'; + + $testAsset->purgeCache(); + $datum = $session->cache->get("asset".$testId.$revisionDate); + is $datum, undef, 'purgeCache removes the cache entry'; + + $session->db->write("delete from asset where assetId=?", [$testId]); + $session->db->write("delete from assetData where assetId=?", [$testId]); +} + +{ + note "write, update"; + + my $testId = 'wg8TestAsset0000000001'; + my $revisionDate = time(); + $session->db->write("insert into asset (assetId) VALUES (?)", [$testId]); + $session->db->write("insert into assetData (assetId, revisionDate) VALUES (?,?)", [$testId, $revisionDate]); + + my $testAsset = WebGUI::Asset->new($session, $testId, $revisionDate); + $testAsset->title('wg8 test title'); + $testAsset->lastModified(0); + is $testAsset->assetSize, 0, 'assetSize is 0 by default'; + $testAsset->write(); + isnt $testAsset->lastModified, 0, 'lastModified updated on write'; + isnt $testAsset->assetSize, 0, 'assetSize updated on write'; + + my $testData = $session->db->quickHashRef('select * from assetData where assetId=? and revisionDate=?',[$testId, $revisionDate]); + is $testData->{title}, 'wg8 test title', 'data written correctly to db'; + + $testAsset->update({ + isHidden => 1, + encryptPage => 1, + }); + + is $testAsset->isHidden, 1, 'isHidden set via update'; + is $testAsset->encryptPage, 1, 'encryptPage set via update'; + + $testData = $session->db->quickHashRef('select * from assetData where assetId=? and revisionDate=?',[$testId, $revisionDate]); + is $testData->{isHidden}, 1, 'isHidden written correctly to db'; + is $testData->{encryptPage}, 1, 'encryptPage written correctly to db'; + + $session->db->write("delete from asset where assetId=?", [$testId]); + $session->db->write("delete from assetData where assetId=?", [$testId]); +} + +{ + note "setVersionLock"; + my $testId1 = 'wg8TestAsset0000000001'; + my $testId2 = 'wg8TestAsset0000000002'; + my $now = time(); + my $baseLineage = $session->db->quickScalar('select lineage from asset where assetId=?',['PBasset000000000000002']); + my $testLineage = $baseLineage. '909090'; + $session->db->write("insert into asset (assetId, className, lineage) VALUES (?,?,?)", [$testId1, 'WebGUI::Asset', $testLineage]); + $session->db->write("insert into assetData (assetId, revisionDate, status) VALUES (?,?,?)", [$testId1, $now, 'approved']); + my $testLineage2 = $testLineage . '000001'; + $session->db->write("insert into asset (assetId, className, parentId, lineage) VALUES (?,?,?,?)", [$testId2, 'WebGUI::Asset', $testId1, $testLineage2]); + $session->db->write("insert into assetData (assetId, revisionDate) VALUES (?,?)", [$testId2, $now]); + + my $testAsset = WebGUI::Asset->new($session, $testId2, $now); + my $originalSessionUser = $session->user->userId; + $session->user({userId => 7}); + $testAsset->setVersionLock; + is $testAsset->isLockedBy, 7, 'locked by userId 7'; + ok $testAsset->isLocked, 'asset is locked'; + is $session->db->quickScalar('select isLockedBy from asset where assetId=?',[$testId2]), 7, 'userId written to db'; + + $session->db->write("delete from asset where assetId like 'wg8TestAsset00000%'"); + $session->db->write("delete from assetData where assetId like 'wg8TestAsset00000%'"); + $session->user({userId => $originalSessionUser}); +} + +{ + note "getParent"; + my $testId1 = 'wg8TestAsset0000000001'; + my $testId2 = 'wg8TestAsset0000000002'; + my $now = time(); + my $baseLineage = $session->db->quickScalar('select lineage from asset where assetId=?',['PBasset000000000000002']); + my $testLineage = $baseLineage. '909090'; + $session->db->write("insert into asset (assetId, className, lineage) VALUES (?,?,?)", [$testId1, 'WebGUI::Asset', $testLineage]); + $session->db->write("insert into assetData (assetId, revisionDate, status) VALUES (?,?,?)", [$testId1, $now, 'approved']); + my $testLineage2 = $testLineage . '000001'; + $session->db->write("insert into asset (assetId, className, parentId, lineage) VALUES (?,?,?,?)", [$testId2, 'WebGUI::Asset', $testId1, $testLineage2]); + $session->db->write("insert into assetData (assetId, revisionDate) VALUES (?,?)", [$testId2, $now]); + + my $testAsset = WebGUI::Asset->new($session, $testId2, $now); + is $testAsset->parentId, $testId1, 'parentId assigned correctly on db fetch in new'; + my $testParent = $testAsset->getParent(); + isa_ok $testParent, 'WebGUI::Asset'; + + $session->db->write("delete from asset where assetId like 'wg8TestAsset00000%'"); + $session->db->write("delete from assetData where assetId like 'wg8TestAsset00000%'"); +} + +{ + note "addRevision"; + my $testId1 = 'wg8TestAsset0000000001'; + my $testId2 = 'wg8TestAsset0000000002'; + my $now = time(); + my $revisionDate = $now - 50; + my $baseLineage = $session->db->quickScalar('select lineage from asset where assetId=?',['PBasset000000000000002']); + my $testLineage = $baseLineage. '909090'; + $session->db->write("insert into asset (assetId, className, lineage) VALUES (?,?,?)", [$testId1, 'WebGUI::Asset', $testLineage]); + $session->db->write("insert into assetData (assetId, revisionDate, status) VALUES (?,?,?)", [$testId1, $revisionDate, 'approved']); + my $testLineage2 = $testLineage . '000001'; + $session->db->write("insert into asset (assetId, className, parentId, lineage) VALUES (?,?,?,?)", [$testId2, 'WebGUI::Asset', $testId1, $testLineage2]); + $session->db->write("insert into assetData (assetId, revisionDate) VALUES (?,?)", [$testId2, $revisionDate]); + + my $testAsset = WebGUI::Asset->new($session, $testId2, $revisionDate); + my $originalSessionUser = $session->user->userId; + $session->user({userId => 7}); + $testAsset->title('test title 43'); + $testAsset->write(); + my $tag = WebGUI::VersionTag->getWorking($session); + my $revAsset = $testAsset->addRevision({}, $now); + my $revAssetDb = $revAsset->cloneFromDb; + isa_ok $revAsset, 'WebGUI::Asset'; + is $revAsset->revisionDate, $now, 'revisionDate set correctly on new revision'; + is $revAsset->title, 'test title 43', 'data fetch from database correct'; + is $revAsset->revisedBy, $session->user->userId, 'revisedBy is current session user'; + my $count = $session->db->quickScalar('SELECT COUNT(*) from assetData where assetId=?',[$testId2]); + is $count, 2, 'two records in the database'; + WebGUI::Test->addToCleanup($tag); + + $session->db->write("delete from asset where assetId like 'wg8TestAsset00000%'"); + $session->db->write("delete from assetData where assetId like 'wg8TestAsset00000%'"); + $session->user({userId => $originalSessionUser}); +} + +{ + note "get_tables, with inheritance"; + use WebGUI::Asset::Snippet; + my @tables = WebGUI::Asset::Snippet->meta->get_tables; + cmp_deeply( + \@tables, + [qw/assetData snippet/], + 'get_tables works on inherited classes' + ); +} + +{ + note "getDefault"; + my $asset = WebGUI::Asset->getDefault($session); + isa_ok $asset, 'WebGUI::Asset::Wobject::Layout'; +} + +{ + note "calling new with no assetId throws an exception"; + my $asset = eval { WebGUI::Asset->new($session, ''); }; + my $e = Exception::Class->caught; + isa_ok $e, 'WebGUI::Error'; +} + +{ + note "get gets WebGUI::Definition properties, and standard attributes"; + my $asset = WebGUI::Asset->new({session => $session, parentId => 'I have a parent'}); + is $asset->get('className'), 'WebGUI::Asset', 'get(property) works on className'; + is $asset->get('assetId'), $asset->assetId, '... works on assetId'; + is $asset->get('parentId'), 'I have a parent', '... works on parentId'; + my $properties = $asset->get(); + is $properties->{className}, 'WebGUI::Asset', 'get() works on className'; + is $properties->{assetId}, $asset->assetId, '... works on assetId'; + is $properties->{parentId}, 'I have a parent', '... works on parentId'; +} + +{ + note "keywords"; + my $default = WebGUI::Asset->getDefault($session); + my $asset = $default->addChild({ + className => 'WebGUI::Asset::Snippet', + }); + WebGUI::Test->addToCleanup($asset); + can_ok($asset, 'keywords'); + $asset->keywords('chess set, checkers board'); + is ($asset->keywords, 'chess set, checkers board', 'set and get of keywords via direct accessor'); + is ($asset->get('keywords'), 'chess set, checkers board', 'via get method'); + my $keygate = WebGUI::Keyword->new($session); + is $keygate->getKeywordsForAsset({assetId => $asset->getId}), '', 'not persisted to the db'; + $asset->write; + cmp_bag( + $keygate->getKeywordsForAsset({assetId => $asset->assetId, asArrayRef => 1,}), + ['checkers board', 'chess set'], + 'written to the db' + ); + + my $asset_copy = $asset->cloneFromDb; + cmp_bag( + WebGUI::Keyword::string2list($asset_copy->keywords), + ['checkers board', 'chess set'], + 'refreshed from db' + ); + + my $asset2 = $default->addChild({ + className => 'WebGUI::Asset::Snippet', + keywords => 'checkmate', + }); + WebGUI::Test->addToCleanup($asset2); + is $asset2->keywords, 'checkmate', 'keywords set on addChild'; + is $keygate->getKeywordsForAsset({assetId => $asset2->assetId}), 'checkmate', '... and persisted to the db'; +} + +{ + note "valid_parent_classes"; + my $classes = WebGUI::Asset->valid_parent_classes; + cmp_deeply($classes, [qw/WebGUI::Asset/], 'Any asset okay'); +} + +{ + note "url, inherited URLs from parent"; + my $home = WebGUI::Asset->getDefault($session); + my $asset = $home->addChild({ + className => 'WebGUI::Asset::Wobject::Article', + title => 'sub', + }); + WebGUI::Test->addToCleanup($asset); + is $asset->url, 'home/sub', 'by default, asset gets a url from the title, and the parent'; +} + +done_testing; diff --git a/t/Asset/Asset.t b/t/Asset/Asset.t index 9907d545f..285172d06 100644 --- a/t/Asset/Asset.t +++ b/t/Asset/Asset.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Test::Maker::Permission; @@ -33,8 +31,6 @@ use Storable qw/dclone/; my $session = WebGUI::Test->session; -my @fixIdTests = getFixIdTests($session); -my @fixTitleTests = getFixTitleTests($session); my @getTitleTests = getTitleTests($session); my $rootAsset = WebGUI::Asset->getRoot($session); @@ -63,14 +59,14 @@ $testGroups{'canEdit asset'} = WebGUI::Group->new($session, 'new'); $testUsers{'canEdit group user'} = WebGUI::User->new($session, 'new'); $testUsers{'canEdit group user'}->addToGroups([$testGroups{'canEdit asset'}->getId]); $testUsers{'canEdit group user'}->username('Edit Group User'); -addToCleanup($testGroups{'canEdit asset'}); +WebGUI::Test->addToCleanup($testGroups{'canEdit asset'}); ##A group and user for groupIdEdit $testGroups{'canAdd asset'} = WebGUI::Group->new($session, 'new'); $testUsers{'canAdd group user'} = WebGUI::User->new($session, 'new'); $testUsers{'canAdd group user'}->addToGroups([$testGroups{'canAdd asset'}->getId]); $testUsers{'canEdit group user'}->username('Can Add Group User'); -addToCleanup($testGroups{'canAdd asset'}, values %testUsers); +WebGUI::Test->addToCleanup($testGroups{'canAdd asset'}, values %testUsers); my $canAddMaker = WebGUI::Test::Maker::Permission->new(); $canAddMaker->prepare({ @@ -102,12 +98,8 @@ $properties = { groupIdView => 7, }; -my $versionTag2 = WebGUI::VersionTag->getWorking($session); -addToCleanup($versionTag2); - my $canEditAsset = $rootAsset->addChild($properties, $properties->{id}); - -$versionTag2->commit; +WebGUI::Test->addToCleanup( $canEditAsset ); $properties = {}; ##Clear out the hash so that it doesn't leak later by accident. my $canEditMaker = WebGUI::Test::Maker::Permission->new(); @@ -118,8 +110,6 @@ $canEditMaker->prepare({ 'fail' => [1, $testUsers{'regular user'}, ], }); -my $versionTag3 = WebGUI::VersionTag->getWorking($session); -addToCleanup($versionTag3); $properties = { # '1234567890123456789012' id => 'canViewAsset0000000010', @@ -133,8 +123,7 @@ $properties = { my $canViewAsset = $rootAsset->addChild($properties, $properties->{id}); - -$versionTag3->commit; +WebGUI::Test->addToCleanup( $canViewAsset ); $properties = {}; ##Clear out the hash so that it doesn't leak later by accident. my $canViewMaker = WebGUI::Test::Maker::Permission->new(); @@ -152,46 +141,31 @@ $canViewMaker->prepare( }, ); -#### TestAsset class to test definition / update relationship -BEGIN { $INC{ 'WebGUI/Asset/TestAsset.pm' } = __FILE__ } -package WebGUI::Asset::TestAsset; - -our @ISA = ( 'WebGUI::Asset' ); -sub definition { - my ( $class, $session, $definition ) = @_; - - # Alter assetData fields for testing purposes. Do not do - # this in normal circumstances. Ever. - $definition = $class->SUPER::definition( $session, $definition ); - - # Make synopsis serialized - $definition->[0]->{properties}->{synopsis}->{serialize} = 1; - - return $definition; +note "loadModule"; +{ + my $className = eval { WebGUI::Asset->loadModule('Moose::Asset'); }; + my $e = Exception::Class->caught; + isa_ok($e, 'WebGUI::Error::InvalidParam', 'loadModule must get a WebGUI::Asset class'); + cmp_deeply( + $e, + methods( + error => 'Not a WebGUI::Asset class', + param => 'Moose::Asset', + ), + '... checking error message', + ); } -package main; - -plan tests => 138 - + scalar(@fixIdTests) - + scalar(@fixTitleTests) - + 2*scalar(@getTitleTests) #same tests used for getTitle and getMenuTitle - + $canAddMaker->plan - + $canAddMaker2->plan - + $canEditMaker->plan - + $canViewMaker->plan - ; - # Test the default constructor my $defaultAsset = WebGUI::Asset->getDefault($session); -is(ref $defaultAsset, 'WebGUI::Asset::Wobject::Layout','default constructor'); +isa_ok($defaultAsset, 'WebGUI::Asset::Wobject::Layout'); # Test the new constructor my $assetId = "PBnav00000000000000001"; # one of the default nav assets # - explicit class -my $asset = WebGUI::Asset->new($session, $assetId, 'WebGUI::Asset::Wobject::Navigation'); -is (ref $asset, 'WebGUI::Asset::Wobject::Navigation','new constructor explicit - ref check'); +my $asset = WebGUI::Asset->newById($session, $assetId); +isa_ok ($asset, 'WebGUI::Asset::Wobject::Navigation'); is ($asset->getId, $assetId, 'new constructor explicit - returns correct asset'); # - new by hashref properties @@ -200,60 +174,97 @@ $asset = WebGUI::Asset->newByPropertyHashRef($session, { className=>"WebGUI::Asset::Wobject::Navigation", assetId=>$assetId }); -is (ref $asset, 'WebGUI::Asset::Wobject::Navigation', 'new constructor newByHashref - ref check'); +isa_ok ($asset, 'WebGUI::Asset::Wobject::Navigation'); is ($asset->getId, $assetId, 'new constructor newByHashref - returns correct asset'); # - implicit class $asset = undef; $asset = WebGUI::Asset::Wobject::Navigation->new($session, $assetId); -is (ref $asset, 'WebGUI::Asset::Wobject::Navigation', 'new constructor implicit - ref check'); +isa_ok ($asset, 'WebGUI::Asset::Wobject::Navigation'); is ($asset->getId, $assetId, 'new constructor implicit - returns correct asset'); # - die gracefully -my $deadAsset = 1; - # -- no asset id -$deadAsset = WebGUI::Asset->new($session, '', 'WebGUI::Asset::Wobject::Navigation'); -is ($deadAsset, undef,'new constructor with no assetId returns undef'); +note "new, constructor fails"; +{ + my $deadAsset = eval { WebGUI::Asset->new($session, ''); }; + my $e = Exception::Class->caught; + isa_ok($e, 'WebGUI::Error::InvalidParam', 'new must get an assetId'); + cmp_deeply( + $e, + methods( + error => 'Asset constructor new() requires an assetId.', + ), + '... checking error message', + ); +} # -- no class my $primevalAsset = WebGUI::Asset->new($session, $assetId); isa_ok ($primevalAsset, 'WebGUI::Asset'); -# Test the newByDynamicClass Constructor +# Test the newById Constructor $asset = undef; -$asset = WebGUI::Asset->newByDynamicClass($session, $assetId); -is (ref $asset, 'WebGUI::Asset::Wobject::Navigation', 'newByDynamicClass constructor - ref check'); -is ($asset->getId, $assetId, 'newByDynamicClass constructor - returns correct asset'); +note "new"; +use WebGUI::Asset::Wobject::Navigation; +$asset = WebGUI::Asset::Wobject::Navigation->new($session, $assetId); +isa_ok ($asset, 'WebGUI::Asset::Wobject::Navigation'); +is ($asset->getId, $assetId, 'new constructor - returns correct asset when invoked with correct class'); -# - die gracefully -$deadAsset = 1; +note "getClassById"; +{ + my $deadAsset = eval { WebGUI::Asset->getClassById($session, 'RoysNonExistantAssetId'); }; + my $e = Exception::Class->caught; + isa_ok($e, 'WebGUI::Error::InvalidParam', 'getClassById must have a valid assetId'); + cmp_deeply( + $e, + methods( + error => "Couldn't lookup className", + param => 'RoysNonExistantAssetId', + ), + '... checking error message', + ); +} -# -- invalid asset id -$deadAsset = WebGUI::Asset->newByDynamicClass($session, 'RoysNonExistantAssetId'); -is ($deadAsset, undef,'newByDynamicClass constructor with invalid assetId returns undef'); +note "newById"; +{ + my $deadAsset = eval { WebGUI::Asset->newById($session); }; + my $e = Exception::Class->caught; + isa_ok($e, 'WebGUI::Error::InvalidParam', "newById won't work without an assetId"); + cmp_deeply( + $e, + methods( + error => "newById must get an assetId", + ), + '... checking error message', + ); +} -# -- no assetId -is( - WebGUI::Asset->newByDynamicClass( $session ), - undef, - "newByDynamicClass constructor returns 'undef' with no assetId", -); +note "newByUrl"; +{ + my $deadAsset = eval { WebGUI::Asset->newByUrl($session, '/workFromHomeScam'); }; + my $e = Exception::Class->caught; + isa_ok($e, 'WebGUI::Error::ObjectNotFound'); + cmp_deeply( + $e, + methods( + error => "The URL was requested, but does not exist in your asset tree.", + id => 'workfromhomescam', + ), + '... checking error message', + ); + my $root = eval { WebGUI::Asset->newByUrl($session, '/root'); }; + isa_ok($root, 'WebGUI::Asset'); + $root = eval { WebGUI::Asset->newByUrl($session, '/ROOT'); }; + isa_ok($root, 'WebGUI::Asset'); + $root = eval { WebGUI::Asset->newByUrl($session, '/root/'); }; + isa_ok($root, 'WebGUI::Asset'); +} # -- no session -is( - WebGUI::Asset->newByDynamicClass( ), - undef, - "newByDynamicClass constructor returns 'undef' with no valid WebGUI::Session", -); -is( - WebGUI::Asset->newByDynamicClass( "nothing" ), - undef, - "newByDynamicClass constructor returns 'undef' with no valid WebGUI::Session", -); - # Root Asset +my $rootAsset = WebGUI::Asset->getRoot($session); isa_ok($rootAsset, 'WebGUI::Asset'); is($rootAsset->getId, 'PBasset000000000000001', 'Root Asset ID check'); @@ -278,39 +289,6 @@ is($tempNode->getId, 'tempspace0000000000000', 'Tempspace Asset ID check'); is($tempNode->getParent->getId, $rootAsset->getId, 'Tempspace parent is Root Asset'); -################################################################ -# -# update -# -################################################################ - -# Create a new TestAsset instance -my $ta = $importNode->addChild( { - className => 'WebGUI::Asset::TestAsset', -} ); -isa_ok( $ta, 'WebGUI::Asset::TestAsset', 'addChild returns correct object' ); - -ok( - eval { $ta->update({ synopsis => [ "one", "two" ] }); 1; }, - 'update() succeeds with ref on serialized property', -); -cmp_deeply( - $ta->get('synopsis'), - [ "one", "two" ], - "serialized property returns deserialized ref", -); - -ok( - eval { $ta->update({ synopsis => '[ "two", "three" ]', }); 1; }, - 'update() succeeds with serialized string on serialized property', -); -cmp_deeply( - $ta->get('synopsis'), - [ "two", "three" ], - "serialized property returns deserialized ref", -); -$ta->purge; - ################################################################ # # urlExists @@ -332,22 +310,23 @@ ok( WebGUI::Asset->urlExists($session, $importUrl, {assetId => 'notAnWebGUI ################################################################ # -# addEditLabel +# getName # ################################################################ my $i18n = WebGUI::International->new($session, 'Asset_Wobject'); +is($importNode->getName, $i18n->get('assetName', 'Asset_Folder'), 'getName: Returns the internationalized name of the Asset, core Asset'); + +################################################################ +# +# addEditLabel +# +################################################################ + is($importNode->addEditLabel, $i18n->get('edit').' '.$importNode->getName, 'addEditLabel, default mode is edit mode'); -my $origRequest = $session->{_request}; -my $newRequest = Test::MockObject->new(); -my $func; -$newRequest->set_bound('body', \$func); -$newRequest->set_bound('param', \$func); -$session->{_request} = $newRequest; -$func = 'add'; +$session->request->setup_param({ func => 'add' }); is($importNode->addEditLabel, $i18n->get('add').' '.$importNode->getName, 'addEditLabel, use add mode'); -$session->{_request} = $origRequest; ################################################################ # @@ -355,11 +334,7 @@ $session->{_request} = $origRequest; # ################################################################ -my $versionTag = WebGUI::VersionTag->getWorking($session); -addToCleanup($versionTag); -$versionTag->set({name=>"Asset tests"}); - -$properties = { +my $properties = { # '1234567890123456789012' id => 'fixUrlAsset00000000012', title => 'fixUrl Asset Test', @@ -368,18 +343,21 @@ $properties = { }; my $fixUrlAsset = $defaultAsset->addChild($properties, $properties->{id}); +WebGUI::Test->addToCleanup( $fixUrlAsset ); # '1234567890123456789012' $properties->{id} = 'fixUrlAsset00000000013'; $properties->{url} = 'fixUrlFolderURL9'; my $fixUrlAsset2 = $defaultAsset->addChild($properties, $properties->{id}); +WebGUI::Test->addToCleanup( $fixUrlAsset2 ); # '1234567890123456789012' $properties->{id} = 'fixUrlAsset00000000014'; $properties->{url} = 'fixUrlFolderURL00'; my $fixUrlAsset3 = $defaultAsset->addChild($properties, $properties->{id}); +WebGUI::Test->addToCleanup( $fixUrlAsset3 ); # '1234567890123456789012' $properties->{id} = 'fixUrlAsset00000000015'; @@ -387,6 +365,7 @@ $properties->{url} = 'fixUrlFolderURL100'; my $fixUrlAsset4 = $defaultAsset->addChild($properties, $properties->{id}); is($fixUrlAsset4->get('url'), 'fixurlfolderurl100', 'asset setup correctly for 100->101 test'); +WebGUI::Test->addToCleanup( $fixUrlAsset4 ); delete $properties->{url}; # '1234567890123456789012' @@ -394,6 +373,7 @@ $properties->{id} = 'fixUrlAsset00000000016'; $properties->{menuTitle} = 'fix url folder url autogenerated'; my $fixUrlAsset5 = $defaultAsset->addChild($properties, $properties->{id}); +WebGUI::Test->addToCleanup( $fixUrlAsset5 ); my $properties2 = { # '1234567890123456789012' @@ -404,8 +384,7 @@ my $properties2 = { }; my $fixTitleAsset = $defaultAsset->addChild($properties2, $properties2->{id}); -##Commit this asset right away -$fixTitleAsset->commit; +WebGUI::Test->addToCleanup( $fixTitleAsset ); $properties2 = { # '1234567890123456789012' @@ -416,9 +395,7 @@ $properties2 = { }; my $getTitleAsset = $defaultAsset->addChild($properties2, $properties2->{id}); -$getTitleAsset->commit; - -$versionTag->commit; +WebGUI::Test->addToCleanup( $getTitleAsset ); $session->setting->set('urlExtension', undef); @@ -426,10 +403,6 @@ is($importNode->fixUrl('1234'.'_'x235 . 'abcdefghij'), '1234'.'_'x235 . 'abcdefg is($importNode->fixUrl('1234'.'_'x250 . 'abcdefghij'), '1234'.'_'x216, 'fixUrl truncates long URLs over 250 characters to 220 characters'); is $importNode->fixUrl('---'), '-', '... 3 dashes are collapsed down to a single dash'; -WebGUI::Test->originalConfig('extrasURL'); -WebGUI::Test->originalConfig('uploadsURL'); -WebGUI::Test->originalConfig('assets'); - $session->config->set('extrasURL', '/extras'); $session->config->set('uploadsURL', '/uploads'); @@ -471,37 +444,6 @@ is($importNode->fixUrl('fixurl'), 'fixurl.html', 'Automatic adding of extensions is($importNode->fixUrl('fixurl.css'), 'fixurl.css', 'extensions aren\'t automatically added if there is already and extension'); $session->setting->set('urlExtension', undef); -################################################################ -# -# fixId -# -################################################################ - -my $ownerUserId = $importNode->getValue('ownerUserId'); - -foreach my $test (@fixIdTests) { - my $fixedId = $importNode->fixId($test->{id}, 'ownerUserId'); - my $expectedId = $test->{pass} ? $test->{id} : $ownerUserId; - is($fixedId, $expectedId, $test->{comment}); -} - -################################################################ -# -# fixTitle -# -################################################################ - -my $importNodeTitle = $importNode->getTitle(); - -foreach my $test (@fixTitleTests) { - my $fixedTitle = $importNode->fixTitle($test->{title}, 'ownerUserId'); - my $expectedTitle = defined $test->{fixed} ? $test->{fixed} : $importNodeTitle; - is($fixedTitle, $expectedTitle, $test->{comment}); -} - -$fixTitleAsset->update({'title' => 0}); - -is($fixTitleAsset->fixTitle(''), 'Untitled', q{fixTitle: title is false, fixTitle returns 'Untitled'}); ################################################################ # @@ -544,36 +486,6 @@ TODO: { ok(0, "Test the default name for the icon, if not given in the definition sub"); } -################################################################ -# -# canAdd -# -################################################################ - -$session->config->set('assets/WebGUI::Asset/addGroup', $testGroups{'canAdd asset'}->getId ); - -$canAddMaker->run; - -#Without proper group setup, Turn On Admin is excluded from adding assets via assetAddPrivilege - -$canAddMaker2->run; - -################################################################ -# -# canEdit -# -################################################################ - -$canEditMaker->run; - -################################################################ -# -# canView -# -################################################################ - -$canViewMaker->run; - ################################################################ # # addMissing @@ -581,19 +493,15 @@ $canViewMaker->run; ################################################################ $session->user({ userId => 3 }); -$session->var->switchAdminOff; -is($canEditAsset->addMissing('/nowhereMan'), undef, q{addMissing doesn't return anything unless use is in Admin Mode}); - -$session->var->switchAdminOn; -my $addMissing = $canEditAsset->addMissing('/nowhereMan'); -ok($addMissing, 'addMissing returns some output when in Admin Mode'); +my $addMissing = $rootAsset->addMissing('/nowhereMan'); +ok($addMissing, 'addMissing returns some output when in Turn Admin On group'); { my $parser = HTML::TokeParser->new(\$addMissing); my $link = $parser->get_tag('a'); my $url = $link->[1]{'href'} || '-'; - like($url, qr{func=add;class=WebGUI::Asset::Wobject::Layout;url=/nowhereMan$}, 'addMissing: Link will add a new page asset with correct URL'); + like($url, qr{func=add;className=WebGUI::Asset::Wobject::Layout;url=/nowhereMan$}, 'addMissing: Link will add a new page asset with correct URL'); } @@ -606,102 +514,27 @@ ok($addMissing, 'addMissing returns some output when in Admin Mode'); is($rootAsset->getContainer->getId, $rootAsset->getId, 'getContainer: A folder is a container, its container is itself'); is($fixTitleAsset->getContainer->getId, $defaultAsset->getId, 'getContainer: A snippet is not a container, its container is its parent'); -################################################################ -# -# getName -# -################################################################ - -is($fixTitleAsset->getName, $i18n->get('assetName', 'Asset_Snippet'), 'getName: Returns the internationalized name of the Asset, Snippet'); -is($importNode->getName, $i18n->get('assetName', 'Asset_Folder'), 'getName: Returns the internationalized name of the Asset, Folder'); -is($canEditAsset->getName, $i18n->get('asset', 'Asset'), 'getName: Returns the internationalized name of the Asset, core Asset'); - -################################################################ -# -# getToolbarState -# toggleToolbar -# -################################################################ - -is($getTitleAsset->getToolbarState, undef, 'getToolbarState: default toolbar state is undef'); -$getTitleAsset->toggleToolbar(); -is($getTitleAsset->getToolbarState, 1, 'getToolbarState: toggleToolbarState toggled the state to 1'); -$getTitleAsset->toggleToolbar(); -is($getTitleAsset->getToolbarState, 0, 'getToolbarState: toggleToolbarState toggled the state to 0'); - ################################################################ # # getUiLevel # ################################################################ -is($canEditAsset->getUiLevel, 1, 'getUiLevel: WebGUI::Asset uses the default uiLevel of 1'); +#is($canEditAsset->getUiLevel, 1, 'getUiLevel: WebGUI::Asset uses the default uiLevel of 1'); is($fixTitleAsset->getUiLevel, 5, 'getUiLevel: Snippet has an uiLevel of 5'); my $origAssetUiLevel = $session->config->get('assetUiLevel'); $session->config->set('assets/WebGUI::Asset/uiLevel', 8); $session->config->set('assets/WebGUI::Asset::Snippet/uiLevel', 8); -is($canEditAsset->getUiLevel, 8, 'getUiLevel: WebGUI::Asset has a configured uiLevel of 8'); +#is($canEditAsset->getUiLevel, 8, 'getUiLevel: WebGUI::Asset has a configured uiLevel of 8'); is($fixTitleAsset->getUiLevel, 8, 'getUiLevel: Snippet has a configured uiLevel of 8'); -################################################################ -# -# assetExists -# -################################################################ - -{ - - my $id = $canViewAsset->getId; - my $class = 'WebGUI::Asset'; - my $date = $canViewAsset->get('revisionDate'); - - ok ( WebGUI::Asset->assetExists($session, $id, $class, $date), 'assetExists with proper class, id and revisionDate'); - ok (!WebGUI::Asset->assetExists($session, $id, 'WebGUI::Asset::Snippet', $date), 'assetExists with wrong class does not exist'); - my $id2 = $id; - ++$id2; - ok (!WebGUI::Asset->assetExists($session, $id2, $class, $date), 'assetExists with wrong id does not exist'); - ok (!WebGUI::Asset->assetExists($session, $id, $class, $date+1), 'assetExists with wrong revisionDate does not exist'); - -} - -################################################################ -# -# getEditTabs -# -################################################################ - -my @tabs = $canViewAsset->getEditTabs; -is(scalar(@tabs), 4, 'getEditTabs: 4 tabs by default'); - -################################################################ -# -# getEditForm -# -################################################################ - $session->style->sent(0); ##Prevent extra output from being generated by session->style ##At some point, a test will need to tie STDOUT and make sure ##that the output is correct. -isa_ok($canViewAsset->getEditForm, 'WebGUI::TabForm', 'getEditForm: Returns a tabForm'); - -TODO: { - local $TODO = 'More getEditForm tests'; - ok(0, 'Validate form output'); -} - -################################################################ -# -# newByDynamicClass -# -################################################################ - -my $newFixTitleAsset = WebGUI::Asset->newByDynamicClass($session, $fixTitleAsset->getId); -isnt($newFixTitleAsset, undef, 'newByDynamicClass did not fail'); -isa_ok($newFixTitleAsset, 'WebGUI::Asset', 'newByDynamicClass: able to look up an existing asset by id'); -cmp_deeply($newFixTitleAsset->{_properties}, $fixTitleAsset->{_properties}, 'newByDynamicClass created a duplicate asset'); +#isa_ok($canViewAsset->getEditForm, 'WebGUI::TabForm', 'getEditForm: Returns a tabForm'); ################################################################ # @@ -733,15 +566,17 @@ is($rootAsset->get('isExportable'), 1, 'isExportable exists, defaults to 1'); # getSeparator # ################################################################ -is($rootAsset->getSeparator, '~~~PBasset000000000000001~~~', 'getSeparator, known assetId'); -is($rootAsset->getSeparator('!'), '!!!PBasset000000000000001!!!', 'getSeparator, given pad character'); -isnt($rootAsset->getSeparator, $mediaFolder->getSeparator, 'getSeparator: unique string'); +note "getSeparator"; +is($rootAsset->getSeparator, '~~~PBasset000000000000001~~~', '... known assetId'); +is($rootAsset->getSeparator('!'), '!!!PBasset000000000000001!!!', '... given pad character'); +isnt($rootAsset->getSeparator, $mediaFolder->getSeparator, '... unique string'); ################################################################ # # get # ################################################################ +note "get"; my $assetProps = $rootAsset->get(); my $funkyTitle = q{Miss Annie's Whoopie Emporium and Sasparilla Shop}; $assetProps->{title} = $funkyTitle; @@ -753,18 +588,19 @@ isnt( $rootAsset->get('title'), $funkyTitle, 'get returns a safe copy of the Ass # getIsa # ################################################################ +note "getIsa"; my $node = WebGUI::Asset->getRoot($session); my $product1 = $node->addChild({ className => 'WebGUI::Asset::Sku::Product'}, undef, undef, { skipAutoCommitWorkflows => 1}); my $product2 = $node->addChild({ className => 'WebGUI::Asset::Sku::Product'}, undef, undef, { skipAutoCommitWorkflows => 1}); my $product3 = $node->addChild({ className => 'WebGUI::Asset::Sku::Product'}, undef, undef, { skipAutoCommitWorkflows => 1}); -my $pTag = WebGUI::VersionTag->getWorking($session); -$pTag->commit; -addToCleanup($pTag); +my $ptag = WebGUI::VersionTag->getWorking($session); +$ptag->commit; +WebGUI::Test->addToCleanup($product1, $product2, $product3, $ptag); my $product4 = $node->addChild({ className => 'WebGUI::Asset::Sku::Product'}, undef, undef, { skipAutoCommitWorkflows => 1}); -addToCleanup($product4); +WebGUI::Test->addToCleanup($product4); my $getAProduct = WebGUI::Asset::Sku::Product->getIsa($session); -isa_ok($getAProduct, 'CODE', 'getIsa returns a sub ref'); +isa_ok($getAProduct, 'CODE'); my $counter = 0; my $productIds = []; while( my $product = $getAProduct->()) { @@ -801,10 +637,7 @@ $product4->purge; # inheritUrlFromParent # ################################################################ - -my $versionTag4 = WebGUI::VersionTag->getWorking($session); -addToCleanup($versionTag4); -$versionTag4->set( { name => 'inheritUrlFromParent tests' } ); +note "inheritUrlFromParent"; $properties = { # '1234567890123456789012' @@ -815,6 +648,7 @@ $properties = { }; my $iufpAsset = $defaultAsset->addChild($properties, $properties->{id}); +WebGUI::Test->addToCleanup( $iufpAsset ); $iufpAsset->commit; $properties2 = { @@ -826,9 +660,11 @@ $properties2 = { }; my $iufpAsset2 = $iufpAsset->addChild($properties2, $properties2->{id}); +WebGUI::Test->addToCleanup( $iufpAsset2 ); $iufpAsset2->update( { inheritUrlFromParent => 1 } ); +is $iufpAsset2->inheritUrlFromParent, 1, 'inheritUrlFromParent set'; $iufpAsset2->commit; -is($iufpAsset2->get('url'), 'inheriturlfromparent01/inheriturlfromparent02', 'inheritUrlFromParent works'); +is($iufpAsset2->url, 'inheriturlfromparent01/inheriturlfromparent02', 'inheritUrlFromParent works'); my $properties2a = { # '1234567890123456789012' @@ -840,13 +676,14 @@ my $properties2a = { }; my $iufpAsset2a = $iufpAsset->addChild($properties2a, $properties2a->{id}); +WebGUI::Test->addToCleanup( $iufpAsset2a ); $iufpAsset2a->commit; -is($iufpAsset2a->get('url'), 'inheriturlfromparent01/inheriturlfromparent2a', '... works when created with the property'); +is($iufpAsset2a->url, 'inheriturlfromparent01/inheriturlfromparent2a', '... works when created with the property'); # works for setting, now try disabling. Should not change the URL. $iufpAsset2->update( { inheritUrlFromParent => 0 } ); $iufpAsset2->commit; -is($iufpAsset2->get('url'), 'inheriturlfromparent01/inheriturlfromparent02', '... setting inheritUrlFromParent to 0 works'); +is($iufpAsset2->url, 'inheriturlfromparent01/inheriturlfromparent02', '... setting inheritUrlFromParent to 0 works'); # also make sure that it is actually disabled is($iufpAsset2->get('inheritUrlFromParent'), 0, "... disabling inheritUrlFromParent actually works"); @@ -861,105 +698,30 @@ my $properties3 = { url => 'inheriturlfromparent03', }; my $iufpAsset3 = $iufpAsset2->addChild($properties3, $properties3->{id}); +WebGUI::Test->addToCleanup( $iufpAsset3 ); $iufpAsset3->commit; $iufpAsset2->update( { inheritUrlFromParent => 1 } ); $iufpAsset2->commit; $iufpAsset3->update( { inheritUrlFromParent => 1 } ); $iufpAsset3->commit; -is($iufpAsset3->get('url'), 'inheriturlfromparent01/inheriturlfromparent02/inheriturlfromparent03', '... recurses properly'); +is($iufpAsset3->url, 'inheriturlfromparent01/inheriturlfromparent02/inheriturlfromparent03', '... recurses properly'); $iufpAsset2->update({url => 'iufp2'}); -is($iufpAsset2->get('url'), 'inheriturlfromparent01/iufp2', '... update works propertly when iUFP is not passed'); +is($iufpAsset2->url, 'inheriturlfromparent01/iufp2', '... update works propertly when iUFP is not passed'); -################################################################ -# -# addRevision to uncommitted child of uncommitted parent -# -################################################################ - -my $versionTag5 = WebGUI::VersionTag->getWorking($session); -$versionTag5->set( { name => 'move revision of uncommitted child to uncommitted parent tests vt1' } ); - -$properties = { - - # '1234567890123456789012' - id => 'moveVersionToParent_01', - title => 'moveVersionToParent_01', - className => 'WebGUI::Asset::Wobject::Layout', - url => 'moveVersionToParent_01', -}; - -my $parentAsset = $defaultAsset->addChild( $properties, $properties->{id}, undef, { skipAutoCommitWorkflows => 1 } ); -my $parentVersionTag = WebGUI::VersionTag->new( $session, $parentAsset->get('tagId') ); -is( $parentVersionTag->get('isCommitted'), 0, 'built non-committed parent asset' ); - -my $versionTag6 = WebGUI::VersionTag->create( $session, {} ); -$versionTag6->set( { name => 'move revision of uncommitted child to uncommitted parent tests vt2' } ); -$versionTag6->setWorking; - -$properties2 = { - - # '1234567890123456789012' - id => 'moveVersionToParent_03', - title => 'moveVersionToParent_03', - className => 'WebGUI::Asset::Wobject::Layout', - url => 'moveVersionToParent_03', -}; - -my $childAsset = $parentAsset->addChild( - $properties2, $properties2->{id}, - time(), - { skipAutoCommitWorkflows => 1 } -); -my $testAsset = WebGUI::Asset->newPending( $session, $childAsset->get('parentId') ); -my $testVersionTag = WebGUI::VersionTag->new( $session, $testAsset->get('tagId') ); - -my $childVersionTag; -$childVersionTag = WebGUI::VersionTag->new( $session, $childAsset->get('tagId') ); -is( $childVersionTag->get('isCommitted'), 0, 'built non-committed child asset' ); - -is( $testAsset->get('tagId'), - $childAsset->get('tagId'), - 'uncommitted parent asset and uncommitted child asset have same version tag at addChild' -); - -$properties2 = { - - # '1234567890123456789012' - id => 'moveVersionToParent_03', - title => 'moveVersionToParent_03a', - className => 'WebGUI::Asset::Wobject::Layout', - url => 'moveVersionToParent_03a', -}; -sleep 2; -$childAsset->addRevision( $properties2, time(), { skipAutoCommitWorkflows => 1 } ); - -is( $parentVersionTag->get('isCommitted'), 0, 'confimr non-committed parent asset after revision' ); -is( $childVersionTag->get('isCommitted'), 0, 'confirm non-committed child asset after revision' ); - -is( $testAsset->get('tagId'), - $childAsset->get('tagId'), - 'uncommitted parent asset and uncommitted child asset have same version tag after addRevision' -); - -eval { $testVersionTag->commit; }; - -$session->log->warn('parent asset is now committed'); -is( $testVersionTag->get('isCommitted'), 1, 'parent asset is now committed' ); - -$childVersionTag = WebGUI::VersionTag->new( $session, $childAsset->get('tagId') ); -is( $childVersionTag->get('isCommitted'), 1, 'child asset is now committed' ); - ################################################################ # # cloneFromDb # ################################################################ -my $assetToCommit = $defaultAsset->addChild({ className => 'WebGUI::Asset::Snippet', title => 'Snippet to commit and clone from db', }); my $cloneTag = WebGUI::VersionTag->getWorking($session); -addToCleanup($cloneTag); +my $assetToCommit = $defaultAsset->addChild({ + className => 'WebGUI::Asset::Snippet', + title => 'Snippet to commit and clone from db', +}); +WebGUI::Test->addToCleanup($cloneTag); $cloneTag->commit; is($assetToCommit->get('status'), 'pending', 'cloneFromDb: local asset is still pending'); $assetToCommit = $assetToCommit->cloneFromDb; @@ -978,10 +740,7 @@ my $trashedAsset = $defaultAsset->addChild({ my $clippedAsset = $defaultAsset->addChild({ className => 'WebGUI::Asset::Snippet', title => 'Clippy', }); - -my $checkTag = WebGUI::VersionTag->getWorking($session); -$checkTag->commit; -addToCleanup($checkTag); +WebGUI::Test->addToCleanup( $trashedAsset, $clippedAsset ); $trashedAsset = $trashedAsset->cloneFromDb; $clippedAsset = $clippedAsset->cloneFromDb; $trashedAsset->trash; @@ -989,27 +748,27 @@ $clippedAsset->cut; is $trashedAsset->get('state'), 'trash', 'checkView setup: trashed an asset'; is $clippedAsset->get('state'), 'clipboard', '... clipped an asset'; -$session->var->switchAdminOff; -$session->http->setRedirectLocation(''); -$session->http->setStatus(200, 'OK'); +$session->user({ userId => 1 }); +$session->response->location(''); +$session->response->status(200, 'OK'); $trashedAsset->checkView(); -is $session->http->getStatus, 410, '... status set to 410 for trashed asset'; -is $session->http->getRedirectLocation, '', '... no redirect set'; +is $session->response->status, 410, '... status set to 410 for trashed asset'; +is $session->response->location, '', '... no redirect set'; -$session->http->setStatus(200, 'OK'); +$session->response->status(200, 'OK'); $clippedAsset->checkView(); -is $session->http->getStatus, 410, '... status set to 410 for cut asset'; -is $session->http->getRedirectLocation, '', '... no redirect set'; +is $session->response->status, 410, '... status set to 410 for cut asset'; +is $session->response->location, '', '... no redirect set'; -$session->var->switchAdminOn; -$session->http->setStatus(200, 'OK'); -is $trashedAsset->checkView(), 'chunked', '... returns "chunked" when admin is on for trashed asset'; -is $session->http->getRedirectLocation, $trashedAsset->getUrl('func=manageTrash'), '... trashed asset sets redirect to manageTrash'; +$session->user({ userId => 3 }); +$session->response->status(200, 'OK'); +is $trashedAsset->checkView(), 'chunked', '... returns "chunked" when admin for trashed asset'; +is $session->response->location, $trashedAsset->getUrl('func=manageTrash'), '... trashed asset sets redirect to manageTrash'; -$session->http->setRedirectLocation(''); -is $clippedAsset->checkView(), 'chunked', 'checkView: returns "chunked" when admin is on for cut asset'; -is $session->http->getRedirectLocation, $clippedAsset->getUrl('func=manageClipboard'), '... cut asset sets redirect to manageClipboard'; +$session->response->location(''); +is $clippedAsset->checkView(), 'chunked', 'checkView: returns "chunked" when admin for cut asset'; +is $session->response->location, $clippedAsset->getUrl('func=manageClipboard'), '... cut asset sets redirect to manageClipboard'; ################################################################ # @@ -1021,7 +780,7 @@ use HTML::Packer; my $asset = WebGUI::Asset->getImportNode( $session )->addChild({ className => 'WebGUI::Asset::Snippet', }); -addToCleanup( $asset ); +WebGUI::Test->addToCleanup( $asset ); my $unpacked = qq{ @@ -1065,118 +824,6 @@ ok !$asset->get('extraHeadTagsPacked'), 'extraHeadTagsPacked cleared'; } ##Return an array of hashrefs. Each hashref describes a test -##for the fixId method. - -sub getFixIdTests { - my $session = shift; - return ( - { - id => '0', - pass => 1, - comment => 'digit zero', - }, - { - id => '1', - pass => 1, - comment => 'digit one', - }, - { - id => '123', - pass => 1, - comment => '3 digit integer', - }, - { - id => '12345678901'x2, - pass => 1, - comment => '22 digit integer', - }, - { - id => '12345678901'x4, - pass => 0, - comment => '44 digit integer', - }, - { - id => '', - pass => 0, - comment => 'null string is rejected', - }, - { - id => 'a', - pass => 0, - comment => 'single lower case character rejected', - }, - { - # '1234567890123456789012' - id => 'abc123ZYX098deadbeef()', - pass => 0, - comment => 'illegal characters in length 22 string rejected', - }, - { - id => $session->id->generate, - pass => 1, - comment => 'valid id accepted', - }, - ); -} - -##Return an array of hashrefs. Each hashref describes a test -##for the fixTitle method. If "fixed" != undef, it should -##contain what the fixTitle method will return. - -sub getFixTitleTests { - my $session = shift; - return ({ - title => undef, - fixed => undef, - comment => "undef returns the Asset's title", - }, - { - title => '', - fixed => undef, - comment => "null string returns the Asset's title", - }, - { - title => 'untitled', - fixed => undef, - comment => "'untitled' returns the Asset's title", - }, - { - title => 'UnTiTlEd', - fixed => undef, - comment => "'untitled' in any case returns the Asset's title", - }, - { - title => 'Username: ^@;', - fixed => 'Username: ^@;', - comment => "Macros are negated", - }, - { - title => '<b>A bold title</b>', - fixed => 'A bold title', - comment => "Markup is stripped out", - }, - { - title => 'Javascript: <script>Evil code goes in here</script>', - fixed => 'Javascript: ', - comment => "javascript removed", - }, - { - title => 'This is a good Title', - fixed => 'This is a good Title', - comment => "Good titles are passed", - }, - { - title => '<b></b>', - fixed => '', - comment => "If there is no title left after processing, then it is set to untitled.", - }, - { - title => q|Quotes '"|, - fixed => q|Quotes '"|, - comment => "Quotes are not processed.", - }, - ); -} ##Return an array of hashrefs. Each hashref describes a test ##for the getTitle and getMenuTitle tests. If "assetName" != 0, they @@ -1235,3 +882,5 @@ subtest 'canAdd tolerates being called as an object method', sub { ok !$class->canAdd($session), 'Cannot add when called as a class method'; ok !$snip->canAdd($session), '...or an object method'; }; + +done_testing; diff --git a/t/Asset/AssetClipboard.t b/t/Asset/AssetClipboard.t index c3767a427..b8f3fb502 100644 --- a/t/Asset/AssetClipboard.t +++ b/t/Asset/AssetClipboard.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,16 +8,13 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; ##The goal of this test is to check the creation and purging of ##versions. use WebGUI::Test; use WebGUI::Session; -use WebGUI::Utility; use WebGUI::Asset; use WebGUI::VersionTag; use Test::MockObject; @@ -25,7 +22,7 @@ use Test::MockObject::Extends; use WebGUI::Fork; use Test::More; # increment this value for each test you create -plan tests => 30; +plan tests => 15; my $session = WebGUI::Test->session; $session->user({userId => 3}); @@ -75,10 +72,10 @@ $versionTag->commit; my $duplicatedSnippet = $snippet->duplicate; -is($duplicatedSnippet->get('title'), 'snippet', 'duplicated snippet has correct title'); -isnt($duplicatedSnippet->getId, $snippetAssetId, 'duplicated snippet does not have same assetId as original'); +is($duplicatedSnippet->title, 'snippet', 'duplicated snippet has correct title'); +isnt($duplicatedSnippet->getId, $snippetAssetId, 'duplicated snippet does not have same assetId as original'); is( - $duplicatedSnippet->get("revisionDate"), + $duplicatedSnippet->revisionDate, $snippetRevisionDate, 'duplicated snippet has the same revision date', ); @@ -87,9 +84,7 @@ is($snippet->getId, $snippetAssetId, 'original snippet has cor is($snippet->getParent->getId, $root->getId, 'original snippet is a child of root'); is($duplicatedSnippet->getParent->getId, $root->getId, 'duplicated snippet is also a child of root'); -my $newVersionTag = WebGUI::VersionTag->getWorking($session); -$newVersionTag->commit; -WebGUI::Test->addToCleanup($newVersionTag); +WebGUI::Test->addToCleanup( $duplicatedSnippet ); #################################################### # @@ -97,6 +92,8 @@ WebGUI::Test->addToCleanup($newVersionTag); # #################################################### +note "cut"; + is( $topFolder->cut, 1, 'cut: returns 1 if successful' ); is($topFolder->get('state'), 'clipboard', '... state set to trash on the trashed asset object'); is($topFolder->cloneFromDb->get('state'), 'clipboard', '... state set to trash in db on object'); @@ -131,43 +128,6 @@ sub is_tree_of_folders { return $pass ? pass $message : fail $message; } -# test www_copy -my $tag = WebGUI::VersionTag->create($session); -$tag->setWorking; -WebGUI::Test->addToCleanup($tag); - -my $tempspace = WebGUI::Asset->getTempspace($session); -my $folder = {className => 'WebGUI::Asset::Wobject::Folder'}; -my $root = $tempspace->addChild($folder); -my $child = $root->addChild($folder); -my $grandchild = $child->addChild($folder); - -sub copied { - for my $a (@{$tempspace->getAssetsInClipboard}) { - if ($a->getParent->getId eq $tempspace->getId) { - return $a; - } - } - return undef; -} - -my $process = Test::MockObject->new->mock(update => sub {}); -my @methods = ( - # single duplicate doesn't fork, so we can just test the www method to - # make sure it gets it right - sub { shift->www_copy }, - sub { shift->duplicateBranch(1, 'clipboard') }, - sub { shift->duplicateBranch(0, 'clipboard') }, -); -my @prefixes = qw(single children descendants); -for my $i (0..2) { - my $meth = $methods[$i]; - $root->$meth(); - my $clip = copied(); - is_tree_of_folders($clip, $i+1, @prefixes[$i]); - $clip->purge; -} - #################################################### # # paste @@ -177,14 +137,15 @@ for my $i (0..2) { my $versionTag2 = WebGUI::VersionTag->getWorking($session); WebGUI::Test->addToCleanup($versionTag2); +my $tempspace = WebGUI::Test->asset; my $page = $tempspace->addChild({ - className => 'WebGUI::Asset::Wobject::Layout', - title => 'Parent asset', + className => 'WebGUI::Asset::Wobject::Layout', + title => 'Parent asset', }); my $shortcut = $tempspace->addChild({ - className => 'WebGUI::Asset::Shortcut', - shortcutToAssetId => $page->getId, + className => 'WebGUI::Asset::Shortcut', + shortcutToAssetId => $page->getId, }); $versionTag2->commit; @@ -218,19 +179,17 @@ $process->mock( "session" => sub { return $session } ); # Try with a Collaboration and some Threads my $tag = WebGUI::VersionTag->getWorking( $session ); WebGUI::Test->addToCleanup($tag); -my $collab = $tempspace->addChild({ +my $collab = WebGUI::Test->asset( className => 'WebGUI::Asset::Wobject::Collaboration', groupIdEdit => "3", - status => "pending", - tagId => $tag->getId, -}, undef, undef, { skipAutoCommitWorkflows => 1, skipNotification => 1 }); +); my $thread = $collab->addChild({ className => 'WebGUI::Asset::Post::Thread', groupIdEdit => "3", - status => "pending", - tagId => $tag->getId, -}, undef, undef, { skipAutoCommitWorkflows => 1, skipNotification => 1 }); +}, undef, undef, { skipAutoCommitWorkflows => 1, skipNotification => 1, }, +); $tag->commit; +$thread = $thread->cloneFromDb; ##so that the cached parent asset with the wrong status does not update the db. $thread->cut; WebGUI::Asset::pasteInFork( $process, { assetId => $collab->getId, list => [ $thread->getId ] } ); $thread = $thread->cloneFromDb; diff --git a/t/Asset/AssetExportHtml.t b/t/Asset/AssetExportHtml.t index 75cce1115..94337ac53 100644 --- a/t/Asset/AssetExportHtml.t +++ b/t/Asset/AssetExportHtml.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 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,13 +12,10 @@ # These tests are for the shiny rewritten export functionality. it tries # really hard to test every permutation of the code. -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use Test::More; use Monkey::Patch qw(patch_class); use WebGUI::Test; # Must use this before any other WebGUI modules -use WebGUI::PseudoRequest; use WebGUI::Session; use WebGUI::Asset; @@ -45,7 +42,7 @@ my @events; my $testRan = 1; -plan tests => 124; # Increment this number for each test you create +plan tests => 125; # Increment this number for each test you create sub export_ok { my ($asset, $message) = @_; @@ -186,7 +183,7 @@ is(-d $accessibleDirectory, 1, "exportCheckPath creating subdirectory actually c my $versionTag = WebGUI::VersionTag->getWorking($session); $versionTag->set({name=>"Asset Export Test"}); -addToCleanup($versionTag); +WebGUI::Test->addToCleanup($versionTag); my $importNode = WebGUI::Asset->getImportNode($session); @@ -207,6 +204,10 @@ my $grandChild = $firstChild->addChild({ }); $versionTag->commit; +foreach my $asset ($parent, $firstChild, $grandChild) { + $asset = $asset->cloneFromDb; +} + my $isExportable; # simple test first. the asset we're checking isn't exportable. should of course return 0. @@ -308,7 +309,7 @@ is($gcAsPath->absolute($exportPath)->stringify, $litmus->absolute($exportPath)-> # now let's get tricky and test different file extensions my $storage = WebGUI::Storage->create($session); -WebGUI::Test->addToCleanup($storage); +WebGUI::Test->addToCleanup('WebGUI::Storage' => $storage->getId); my $filename = 'somePerlFile_pl.txt'; $storage->addFileFromScalar($filename, $filename); $session->user({userId=>3}); @@ -324,7 +325,7 @@ my $properties = { my $versionTag = WebGUI::VersionTag->getWorking($session); $versionTag->set({name=>"Asset Export Test"}); -addToCleanup($versionTag); +WebGUI::Test->addToCleanup($versionTag); my $asset = $importNode->addChild($properties, $properties->{id}); $asset->update({ @@ -388,7 +389,7 @@ is($fileAsPath->absolute($exportPath)->stringify, $litmus->absolute($exportPath) # we need to be tricky here and call code in wG proper which calls www_ methods # even though we don't have access to modperl. the following hack lets us do # that. -#$session->http->setNoHeader(1); +#$session->response->setNoHeader(1); $session->user( { userId => 1 } ); my $content; @@ -398,7 +399,10 @@ $config->set('exportPath', $guidPath->absolute->stringify); export_ok $parent, 'exportWriteFile works when creating exportPath'; # now make sure that it contains the correct content -eval { $content = WebGUI::Test->getPage($parent, 'exportHtml_view', { user => WebGUI::User->new($session, 1) } ) }; +$content = WebGUI::Test->getPage2( + $parent->get('url').'?func=exportHtml_view', + { user => WebGUI::User->new($session, 1) }, +); is(scalar $parent->exportGetUrlAsPath->slurp, $content, "exportWriteFile puts the correct contents in exported parent"); @@ -411,7 +415,7 @@ my $unwritablePath = Path::Class::Dir->new($config->get('uploadsPath'), 'temp', chmod 0000, $guidPath->stringify; $config->set('exportPath', $unwritablePath->absolute->stringify); -$session->http->setNoHeader(1); +$session->response->setNoHeader(1); SKIP: { skip 'Root will cause this test to fail since it does not obey file permissions', 2 if $< == 0; @@ -442,30 +446,34 @@ $config->set('exportPath', $guidPath->absolute->stringify); chmod 0755, $guidPath->stringify; $unwritablePath->remove; -$session->http->setNoHeader(1); +$session->response->setNoHeader(1); +eval { $firstChild->exportWriteFile() }; +is($@, '', "exportWriteFile works for first_child"); + +# ensure that the file was actually written export_ok $firstChild, 'exportWriteFile works for first_child'; # verify it has the correct contents -eval { $content = WebGUI::Test->getPage($firstChild, 'exportHtml_view') }; +eval { $content = WebGUI::Test->getPage2( $firstChild->get('url').'?func=exportHtml_view', ) }; is(scalar $firstChild->exportGetUrlAsPath->absolute->slurp, $content, "exportWriteFile puts the correct contents in exported first_child"); # and one more level. remove the export path to ensure directory creation keeps # working. $guidPath->rmtree; -$session->http->setNoHeader(1); +$session->response->setNoHeader(1); $session->user( { userId => 1 } ); export_ok $grandChild, 'exportWriteFile works for grandchild'; # finally, check its contents $session->style->sent(0); -eval { $content = WebGUI::Test->getPage($grandChild, 'exportHtml_view') }; +eval { $content = WebGUI::Test->getPage2( $grandChild->get('url').'?func=exportHtml_view', ) }; is(scalar $grandChild->exportGetUrlAsPath->absolute->slurp, $content, "exportWriteFile puts correct content in exported grandchild"); # test different extensions $guidPath->rmtree; -$asset = WebGUI::Asset->new($session, 'ExportTest000000000001'); -$session->http->setNoHeader(1); +$asset = WebGUI::Asset->newById($session, 'ExportTest000000000001'); +$session->response->setNoHeader(1); export_ok $asset, 'exportWriteFile for perl file works'; @@ -481,7 +489,7 @@ $guidPath->rmtree; # isn't allowed to see. this means that we'll need to temporarily change the # permissions on something. $parent->update( { groupIdView => 3 } ); # admins -$session->http->setNoHeader(1); +$session->response->setNoHeader(1); @events = trap { eval { $parent->exportWriteFile() }; $e = Exception::Class->caught(); @@ -635,9 +643,7 @@ is(readlink $symlinkedRoot->stringify, $parentPath, 'exportSymlinkRoot sets up l unlink $symlinkedRoot->stringify; subtest exportRelated => sub { - my $old = WebGUI::VersionTag->getWorking($session, 'noCreate'); - my $tag = WebGUI::VersionTag->create($session); - $tag->setWorking(); + my $parent = WebGUI::Test->asset; my $topic = $parent->addChild({ className => 'WebGUI::Asset::Wobject::StoryTopic', keywords => 'relatedAssetTesting' @@ -649,20 +655,9 @@ subtest exportRelated => sub { className => 'WebGUI::Asset::Story', keywords => 'relatedAssetTesting', }); - $tag->commit(); - my $cleanup = guard { $tag->rollback; if ($old) { $old->setWorking(); } }; - - # This will include some folders, because of the way Archive works - my $expected = $archive->getLineage(['self', 'descendants']); - push @$expected, $topic->getId; - - # getContainer should be included; since parent is a Layout, the - # upward-recursion will stop there. - push @$expected, $topic->getContainer->getId; - - cmp_bag( + cmp_deeply( $archive->exportGetAssetIds({ depth => 99, exportRelated => 1}), - $expected, + superbagof(map { $_->getId } ($topic, $archive, $story)), 'exporting archive includes topic with exportRelated' ); is(0, scalar grep { $_ eq $topic->getId } @@ -675,9 +670,9 @@ subtest exportRelated => sub { # exportGetDescendants() # clear these out now so that they don't interfere with the lineage tests -$asset = WebGUI::Asset->new($session, 'ExportTest000000000001'); +$asset = WebGUI::Asset->newById($session, 'ExportTest000000000001'); $asset->purge; -$asset = WebGUI::Asset->new($session, 'ExportTest000000000002'); +$asset = WebGUI::Asset->newById($session, 'ExportTest000000000002'); $asset->purge; $session->user( { userId => 1 } ); @@ -805,12 +800,12 @@ is($@, '', "exportAsHtml on parent does not throw an error"); ##Note, string com [ qw/ parent index.html /], ); -my $numberCreatedAll = scalar @createdFiles; -like($message, qr/Exported $numberCreatedAll pages/, "exportAsHtml on parent returns correct message"); - # turn them into Path::Class::File objects @shouldExist = map { Path::Class::File->new($exportPath, @{$_})->absolute->stringify } @createdFiles; +my $numberCreatedAll = scalar @createdFiles; +like($message, qr/Exported $numberCreatedAll pages/, "exportAsHtml on parent returns correct message"); + # ensure that the files that should exist do exist my @doExist; $exportPath->recurse( callback => sub { my $o = shift; $o->is_dir ? return : push @doExist, $o->absolute->stringify } ); @@ -960,7 +955,7 @@ SKIP: { # user can't view asset $parent->update( { groupIdView => 3 } ); -$session->http->setNoHeader(1); +$session->response->setNoHeader(1); chmod 0755, $tempDirectory; eval { ($message) = $parent->exportAsHtml( { userId => 1, depth => 99 } ) }; diff --git a/t/Asset/AssetLineage.t b/t/Asset/AssetLineage.t index 1455ddbd2..e3a343ae2 100644 --- a/t/Asset/AssetLineage.t +++ b/t/Asset/AssetLineage.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,17 +8,17 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; use WebGUI::User; use WebGUI::Asset; -use Test::More tests => 99; # increment this value for each test you create +use Test::More tests => 111; # increment this value for each test you create use Test::Deep; +use Test::Exception; +use Data::Dumper; # Test the methods in WebGUI::AssetLineage @@ -84,10 +84,131 @@ my $snippet2 = $folder2->addChild( { $versionTag->commit; -my @snipIds = map { $_->getId } @snippets; -my $lineageIds = $folder->getLineage(['descendants']); +#################################################### +# +# getLineageSql +# +#################################################### + +note "getLineageSql"; +ok $root->getLineageSql(['ancestors']), 'valid SQL returned in an error condition'; + +#################################################### +# +# getLineage +# +#################################################### + +my @snipIds; +my $lineageIds; + +@snipIds = map { $_->getId } @snippets; +$lineageIds = $folder->getLineage(['descendants']); + +cmp_deeply($lineageIds, \@snipIds, 'default order returned by getLineage is lineage order'); + +@snipIds = map { $_->getId } @snippets; +my $ids = $folder->getLineage(['descendants']); +cmp_bag( + \@snipIds, + $ids, + '... get descendants of folder' +); + +$ids = $folder->getLineage(['self','descendants']); +unshift @snipIds, $folder->getId; +cmp_bag( + \@snipIds, + $ids, + '... get descendants of folder and self' +); + +$ids = $folder->getLineage(['self','children']); +cmp_bag( + \@snipIds, + $ids, + '... descendants == children if there are no grandchildren' +); + +$ids = $topFolder->getLineage(['self','children']); +cmp_bag( + [$topFolder->getId, $folder->getId, $folder2->getId, ], + $ids, + '... children (no descendants) of topFolder', +); + +$ids = $topFolder->getLineage(['self','descendants']); +cmp_bag( + [$topFolder->getId, @snipIds, $folder2->getId, $snippet2->getId], + $ids, + '... descendants of topFolder', +); + +my $empty = getListFromIterator($root->getLineageIterator(['ancestors'])); +cmp_bag( + $empty, + [], + '... getting ancestors of root returns empty array' +); + +#################################################### +# +# getLineageIterator +# +#################################################### + +sub getListFromIterator { + my $iterator = shift; + my @items; + while (my $item = $iterator->()) { + push @items, $item->getId; + } + return \@items; +} + +@snipIds = map { $_->getId } @snippets; +my $ids = getListFromIterator($folder->getLineageIterator(['descendants'])); +cmp_bag( + \@snipIds, + $ids, + 'getLineageIterator: get descendants of folder' +); + +$ids = getListFromIterator($folder->getLineageIterator(['self','descendants'])); +cmp_bag( + [$folder->getId, @snipIds], + $ids, + 'getLineageIterator: get descendants of folder and self' +); + +$ids = getListFromIterator($folder->getLineageIterator(['self','children'])); +cmp_bag( + [$folder->getId, @snipIds], + $ids, + 'getLineageIterator: descendants == children if there are no grandchildren' +); + +$ids = getListFromIterator($topFolder->getLineageIterator(['self','children'])); +cmp_bag( + [$topFolder->getId, $folder->getId, $folder2->getId, ], + $ids, + 'getLineageIterator: children (no descendants) of topFolder', +); + +$ids = getListFromIterator($topFolder->getLineageIterator(['self','descendants'])); +cmp_bag( + [$topFolder->getId, $folder->getId, @snipIds, $folder2->getId, $snippet2->getId], + $ids, + 'getLineageIterator: descendants of topFolder', +); + +my $empty = getListFromIterator($root->getLineageIterator(['ancestors'])); +cmp_bag( + $empty, + [], + '... getting ancestors of root returns empty array' +); -cmp_bag(\@snipIds, $lineageIds, 'default order returned by getLineage is lineage order'); #################################################### # @@ -184,12 +305,12 @@ is( # #################################################### -#note $snippets[0]->get('lineage'); -#note $snippet2->get('lineage'); +#note $snippets[0]->lineage; +#note $snippet2->lineage; ##Uncomment me to crash the test -#$snippet2->cascadeLineage($snippets[0]->get('lineage')); -#note $snippets[0]->get('lineage'); -#note $snippet2->get('lineage'); +#$snippet2->cascadeLineage($snippets[0]->lineage); +#note $snippets[0]->lineage; +#note $snippet2->lineage; #################################################### # @@ -246,17 +367,19 @@ $session->config->delete( 'db' ); # #################################################### -is($snippets[0]->swapRank($snippets[1]->get('lineage')), 1, 'swapRank: self and adjacent'); +is($snippets[0]->swapRank($snippets[1]->lineage), 1, 'swapRank: self and adjacent'); + +$folder->cloneFromDb; @snipIds[0,1] = @snipIds[1,0]; $lineageIds = $folder->getLineage(['descendants']); cmp_bag( \@snipIds, $lineageIds, - 'swapRank: swapped first and second snippets' + '... swapped first and second snippets' ); -@snippets[0..1] = map { WebGUI::Asset->newByUrl($session, "snippet$_") } 0..1; +@snippets[0..1] = map { $_->cloneFromDb } @snippets[0..1]; is( $snippets[1]->swapRank($snippets[0]->get('lineage'), $snippets[1]->get('lineage'), ), @@ -280,10 +403,10 @@ is(scalar @snippets, $folder->getChildCount, 'changing lineage does not change is(1 , $folder2->getChildCount, 'changing lineage does not change relationship in folder2'); ##Reinstance the asset object due to db manipulation -$folder = WebGUI::Asset->newByDynamicClass($session, $folder->getId); -$folder2 = WebGUI::Asset->newByDynamicClass($session, $folder2->getId); -@snippets = map { WebGUI::Asset->newByDynamicClass($session, $snippets[$_]->getId) } 0..6; -$snippet2 = WebGUI::Asset->newByDynamicClass($session, $snippet2->getId); +$folder = $folder->cloneFromDb; +$folder2 = $folder2->cloneFromDb; +@snippets = map { $_->cloneFromDb } @snippets; +$snippet2 = $snippet2->cloneFromDb; #################################################### # @@ -405,7 +528,7 @@ delete $cachedLineage->{$snippet4->get('lineage')}->{class}; my $snippet4 = WebGUI::Asset->newByLineage($session, $snippets[4]->get('lineage')); is ($snippet4->getId, $snippets[4]->getId, '... failing class cache forces lookup'); -is(WebGUI::Asset->newByLineage($session, 'notALineage'), undef, '... returns undef'); +dies_ok { WebGUI::Asset->newByLineage($session, 'notALineage') } '... throws an exception'; ok(!exists $session->stow->get('assetLineage')->{assetLineage}, '... no entry for the bad lineage in stow'); #################################################### @@ -536,44 +659,26 @@ my $vTag2 = WebGUI::VersionTag->getWorking($session); $vTag2->set({name=>"deep addChild test"}); WebGUI::Test->addToCleanup($vTag2); -WebGUI::Test->interceptLogging(); +WebGUI::Test->interceptLogging( sub { + my $log_data = shift; -my @deepAsset = ($root); + my @deepAsset = ($root); -for (1..42) { - $deepAsset[$_] = $deepAsset[$_-1]->addChild( { - className => "WebGUI::Asset::Snippet", - groupIdView => 7, - ownerUserId => 3, #For coverage on addChild properties - title => "Deep Snippet $_", - menuTitle => "Deep Snip $_", - }); -} + for (1..42) { + $deepAsset[$_] = $deepAsset[$_-1]->addChild( { + className => "WebGUI::Asset::Snippet", + groupIdView => 7, + ownerUserId => 3, #For coverage on addChild properties + title => "Deep Snippet $_", + menuTitle => "Deep Snip $_", + }); + } -$vTag2->commit; + $vTag2->commit; -is($deepAsset[41]->getParent->getId, $deepAsset[40]->getId, 'addChild will not create an asset with a lineage deeper than 42 levels'); -like($WebGUI::Test::logger_warns, qr/Adding it as a sibling instead/, 'addChild logged a warning about deep assets'); - -{ - my $tag = WebGUI::VersionTag->getWorking($session); - addToCleanup($tag); - my $uncommittedParent = $root->addChild({ - className => "WebGUI::Asset::Wobject::Layout", - groupIdView => 7, - ownerUserId => 3, - title => "Uncommitted Parent", - }); - $tag->leaveTag; - my $parent = WebGUI::Asset->newPending($session, $uncommittedParent->getId); - my $floater = $parent->addChild({ - className => "WebGUI::Asset::Snippet", - groupIdView => 7, - ownerUserId => 3, #For coverage on addChild properties - title => "Child of uncommitted parent", - }); - is $parent->get('tagId'), $floater->get('tagId'), 'addChild: with uncommitted parent, adds child and puts it into the same tag as the parent'; -} + is($deepAsset[41]->getParent->getId, $deepAsset[40]->getId, 'addChild will not create an asset with a lineage deeper than 42 levels'); + like($log_data->{warn}, qr/Adding it as a sibling instead/, 'addChild logged a warning about deep assets'); +}); TODO: { local $TODO = "Tests to make later"; diff --git a/t/Asset/AssetMetaData.t b/t/Asset/AssetMetaData.t index 016eafaca..339f07a53 100644 --- a/t/Asset/AssetMetaData.t +++ b/t/Asset/AssetMetaData.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; ##The goal of this test is to check the creation and purging of ##versions. @@ -18,17 +16,17 @@ use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Test::Metadata; use WebGUI::Session; -use WebGUI::Utility; use WebGUI::Asset; use WebGUI::VersionTag; +use WebGUI::Test::Mechanize; use Test::More; # increment this value for each test you create use Test::Deep; -plan tests => 16; +plan tests => 25; my $session = WebGUI::Test->session; $session->user({userId => 3}); -my $root = WebGUI::Asset->getRoot($session); +my $root = WebGUI::Test->asset; my $versionTag = WebGUI::VersionTag->getWorking($session); $versionTag->set({name=>"Asset Package test"}); WebGUI::Test->addToCleanup($versionTag); @@ -253,12 +251,11 @@ cmp_deeply( # check that asset metadata versioning works properly subtest 'asset metadata versioning' => sub { - my $asset = WebGUI::Asset->getImportNode($session)->addChild( + my $asset = WebGUI::Test->asset->addChild( { className => 'WebGUI::Asset::Snippet', } ); - WebGUI::Test->addToCleanup($asset); my $meta = WebGUI::Test::Metadata->new($asset); $meta->update('version one'); sleep 1; @@ -314,4 +311,47 @@ sub buildNameIndex { return $nameStruct; } +#---------------------------------------------------------------------------- +# www_editMetaDataField + +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get_ok( '/' ); +$mech->session->user({userId => 3}); + +my %fieldInfo = ( + fieldName => 'rsi_type', + description => 'What type of RSI this content will inflict upon you', + fieldType => 'text', +); +$mech->get_ok( $folder->getUrl( 'func=editMetaDataField' ) ); +$mech->submit_form_ok({ + fields => \%fieldInfo, + }, + "add a new field", +); + +my $field = ( grep { $_->{fieldName} eq $fieldInfo{fieldName} } values %{$folder->getMetaDataFields} )[0]; +ok( $field ); +cmp_deeply( + $field, + superhashof( \%fieldInfo ), + "Field info saved correctly", +); + +$mech->get_ok( $folder->getUrl( 'func=editMetaDataField;fid=' . $field->{fieldId} ) ); +$fieldInfo{ description } = 'What type of RSI this content will protect you from'; +$mech->submit_form_ok({ + fields => \%fieldInfo, + }, + "edit an existing field", +); + +$field = $folder->getMetaDataFields( $field->{fieldId} ); +ok( $field ); +cmp_deeply( + $field, + superhashof( \%fieldInfo ), + "Field info saved correctly", +); + #vim:ft=perl diff --git a/t/Asset/AssetPackage.t b/t/Asset/AssetPackage.t index 8d6c4ac10..b9e49ea5b 100644 --- a/t/Asset/AssetPackage.t +++ b/t/Asset/AssetPackage.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,16 +8,13 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; ##The goal of this test is to check the creation and purging of ##versions. use WebGUI::Test; use WebGUI::Session; -use WebGUI::Utility; use WebGUI::Asset; use WebGUI::VersionTag; @@ -35,13 +32,15 @@ my $versionTag = WebGUI::VersionTag->getWorking($session); WebGUI::Test->addToCleanup($versionTag); $versionTag->set({name=>"Asset Package test"}); +my $time = time() -2; + my $folder = $root->addChild({ url => 'testFolder', title => 'folder', menuTitle => 'folderMenuTitle', className => 'WebGUI::Asset::Wobject::Folder', isPackage => 1, -}); +}, undef, $time); my $targetFolder = $root->addChild({ url => 'targetFolder', @@ -56,7 +55,7 @@ my $subSnippet = $folder->addChild({ menuTitle => 'snippetMenuTitle', className => 'WebGUI::Asset::Snippet', snippet => 'A snippet of text', -}); +}, undef, $time); my $snippet = $root->addChild({ url => 'snip_snip', @@ -64,7 +63,7 @@ my $snippet = $root->addChild({ className => 'WebGUI::Asset::Snippet', snippet => 'Always upgrade to the latest version', isPackage => 1, -}); +}, undef, $time); my $packageAssetId = $folder->getId; $session->request->setup_body({ assetId => $packageAssetId }); @@ -75,16 +74,18 @@ is(scalar @{ $targetFolderChildren }, 0, 'target folder has no children'); $versionTag->commit; -sleep 2; +#sleep 2; my $storage = $snippet->exportPackage(); isa_ok($storage, 'WebGUI::Storage', 'exportPackage returns a WebGUI::Storage object'); -my $snippetRev = $snippet->addRevision({ snippet => 'Only upgrade existing data if revisionDate is newer' }); +my $vt2 = WebGUI::VersionTag->getWorking($session); +my $snippetRev = $snippet->addRevision({ + snippet => 'Only upgrade existing data if revisionDate is newer', +}); is($snippetRev->get('snippet'), 'Only upgrade existing data if revisionDate is newer', 'importPackage, overwriteLatest: precondition check, content'); cmp_ok( $snippetRev->get('revisionDate'), '>', $snippet->get('revisionDate'), '... precondition check, revisionDate'); -my $vt2 = WebGUI::VersionTag->getWorking($session); $vt2->commit; WebGUI::Test->addToCleanup($vt2); @@ -104,21 +105,20 @@ is(scalar @{ $deployedFolderChildren }, 1, 'deployed package folder still has 1 isa_ok($deployedFolderChildren->[0] , 'WebGUI::Asset::Snippet', 'deployed child is a Snippet'); ##Unset isPackage in this versionTag for the next tests -$folder->addRevision({isPackage => 0}); - my $newVersionTag = WebGUI::VersionTag->getWorking($session); WebGUI::Test->addToCleanup($newVersionTag); +$folder->addRevision({isPackage => 0, }); $newVersionTag->commit; -my $newFolder = WebGUI::Asset->new($session, $folder->getId); +my $newFolder = WebGUI::Asset->newById($session, $folder->getId); ok(! $newFolder->get('isPackage'), 'Disabled isPackage in original folder asset'); sleep 1; -my $updatedSnippet = WebGUI::Asset->new($session, $snippet->getId); +my $updatedSnippet = WebGUI::Asset->newById($session, $snippet->getId); $root->importPackage($storage, { overwriteLatest => 1 }); -$updatedSnippet = WebGUI::Asset->new($session, $snippet->getId); +$updatedSnippet = WebGUI::Asset->newById($session, $snippet->getId); is($updatedSnippet->get('snippet'), 'Always upgrade to the latest version', 'importPackage: overwriteLatest causes revision dates to be ignored'); cmp_ok( $updatedSnippet->get('revisionDate'), '>', $snippetRev->get('revisionDate'), '... revisionDate check on imported package with overwriteLatest'); diff --git a/t/Asset/AssetTrash.t b/t/Asset/AssetTrash.t index 05d1c4fce..2002b7fc6 100644 --- a/t/Asset/AssetTrash.t +++ b/t/Asset/AssetTrash.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; @@ -57,6 +55,7 @@ my $folder1a2 = $folder1a->addChild({ $versionTag->commit; + #################################################### # # trash @@ -64,11 +63,11 @@ $versionTag->commit; #################################################### is( $topFolder->trash, 1, 'trash: returns 1 if successful' ); -is($topFolder->get('state'), 'trash', '... state set to trash on the trashed asset object'); -is($topFolder->cloneFromDb->get('state'), 'trash', '... state set to trash in db on object'); -is($folder1a->cloneFromDb->get('state'), 'trash-limbo', '... state set to trash-limbo on child #1'); -is($folder1b->cloneFromDb->get('state'), 'trash-limbo', '... state set to trash-limbo on child #2'); -is($folder1a2->cloneFromDb->get('state'), 'trash-limbo', '... state set to trash-limbo on grandchild #1-1'); +is($topFolder->state, 'trash', '... state set to trash on the trashed asset object'); +is($topFolder->cloneFromDb->state, 'trash', '... state set to trash in db on object'); +is($folder1a->cloneFromDb->state, 'trash-limbo', '... state set to trash-limbo on child #1'); +is($folder1b->cloneFromDb->state, 'trash-limbo', '... state set to trash-limbo on child #2'); +is($folder1a2->cloneFromDb->state, 'trash-limbo', '... state set to trash-limbo on grandchild #1-1'); #################################################### # diff --git a/t/Asset/AssetVersion.t b/t/Asset/AssetVersion.t index b49a0c6ac..69b2638db 100644 --- a/t/Asset/AssetVersion.t +++ b/t/Asset/AssetVersion.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,34 +8,33 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; ##The goal of this test is to check the creation and purging of ##versions. use WebGUI::Test; use WebGUI::Session; -use WebGUI::Utility; -use WebGUI::Asset::Template; +use WebGUI::Asset::Snippet; use Test::More; # increment this value for each test you create plan tests => 26; my $session = WebGUI::Test->session; -my $propertyHash = { - template => "Hi, I'm a template", +my %propertyHash = ( + template => "Hi, I'm a snippet", url => '/template/versionTest', - title => 'Version Test Template', - menuTitle => 'Version Test Template', - namespace => 'Article', - className => 'WebGUI::Asset::Template', -}; + title => 'Version Test Snippet', + menuTitle => 'Version Test Snippet', + namespace => 'Snippet', + className => 'WebGUI::Asset::Snippet', +); my $root = WebGUI::Asset->getRoot($session); my $originalVersionTags = $session->db->quickScalar(q{select count(*) from assetVersionTag}); +my $tag = WebGUI::VersionTag->getWorking( $session ); +WebGUI::Test->addToCleanup($tag); ################################################################ # @@ -44,35 +43,33 @@ my $originalVersionTags = $session->db->quickScalar(q{select count(*) from asset ################################################################ note "purgeRevision tests"; -my $template = $root->addChild($propertyHash); -$template->commit; +my $snippet = $root->addChild({%propertyHash,}); +$snippet->commit; -is (ref $template, "WebGUI::Asset::Template", "Template Asset created"); -checkTableEntries($template->getId, 1,1,1,1); +isa_ok $snippet, "WebGUI::Asset::Snippet"; +checkTableEntries($snippet->getId, 1,1,1,1); -sleep 1; +my $snippetv2 = $snippet->addRevision({snippet => 'Hello, I am a snippet with formal grammar',},time+1); +$snippetv2->commit; -my $templatev2 = $template->addRevision({template => 'Hello, I am a template with formal grammar'}); -$templatev2->commit; +is ($snippetv2->getId, $snippet->getId, 'Both versions of the asset have the same assetId'); +checkTableEntries($snippetv2->getId, 1,2,2,1); -is ($templatev2->getId, $template->getId, 'Both versions of the asset have the same assetId'); -checkTableEntries($templatev2->getId, 1,2,2,1); +$snippetv2->purgeRevision; -$templatev2->purgeRevision; +checkTableEntries($snippetv2->getId, 1,1,1,1); -checkTableEntries($templatev2->getId, 1,1,1,1); +undef $snippetv2; -undef $templatev2; +my $snippetv2a = $snippet->addRevision({snippet => 'Hey, yall! Ima snippet.',},time+2); +$snippetv2a->commit; -my $templatev2a = $template->addRevision({template => 'Hey, yall! Ima template.'}); -$templatev2a->commit; +$snippet->purgeRevision; -$template->purgeRevision; +checkTableEntries($snippet->getId, 1,1,1,1); -checkTableEntries($template->getId, 1,1,1,1); - -$template->purgeRevision; -checkTableEntries($template->getId, 0,0,0,0); +$snippet->purgeRevision; +checkTableEntries($snippet->getId, 0,0,0,0); my $versionTagCheck; $versionTagCheck = $session->db->quickScalar(q{select count(*) from assetVersionTag}); @@ -84,22 +81,22 @@ is($versionTagCheck, $originalVersionTags, 'version tag cleaned up by deleting l # ################################################################ -$template = $root->addChild($propertyHash); +$snippet = $root->addChild({%propertyHash,}); my $tag1 = WebGUI::VersionTag->getWorking($session); $tag1->commit; WebGUI::Test->addToCleanup($tag1); -sleep 1; -$templatev2 = $template->addRevision({template => 'Vie gates. Ich bin ein templater.'}); +my $snippet = $snippet->cloneFromDb; my $tag2 = WebGUI::VersionTag->getWorking($session); -$tag2->commit; WebGUI::Test->addToCleanup($tag2); +$snippetv2 = $snippet->addRevision({snippet => 'Vie gates. Ich bin ein snippetr.',}, time+3); +$tag2->commit; note "purge"; -checkTableEntries($templatev2->getId, 1,2,2); +checkTableEntries($snippetv2->getId, 1,2,2); $versionTagCheck = $session->db->quickScalar(q{select count(*) from assetVersionTag}); is($versionTagCheck, $originalVersionTags+2, 'created two version tags'); -$template->purge; -checkTableEntries($templatev2->getId, 0,0,0); +$snippet->purge; +checkTableEntries($snippetv2->getId, 0,0,0); $versionTagCheck = $session->db->quickScalar(q{select count(*) from assetVersionTag}); is($versionTagCheck, $originalVersionTags, 'purge deleted both tags'); @@ -110,7 +107,7 @@ is($versionTagCheck, $originalVersionTags, 'purge deleted both tags'); ################################################################ sub checkTableEntries { - my ($assetId, $assetNum, $assetDataNum, $templateNum) = @_; + my ($assetId, $assetNum, $assetDataNum, $snippetNum) = @_; my ($count) = $session->db->quickArray('select COUNT(*) from asset where assetId=?', [$assetId]); is ($count, $assetNum, sprintf 'Expecting %d Assets with that id in asset', $assetNum); @@ -119,7 +116,7 @@ sub checkTableEntries { is ($count, $assetDataNum, sprintf 'Expecting %d Assets with that id in assetData', $assetDataNum); - ($count) = $session->db->quickArray('select COUNT(*) from template where assetId=?', [$assetId]); - is ($count, $templateNum, - sprintf 'Expecting %d Assets with that id in template', $templateNum); + ($count) = $session->db->quickArray('select COUNT(*) from snippet where assetId=?', [$assetId]); + is ($count, $snippetNum, + sprintf 'Expecting %d Assets with that id in snippet', $snippetNum); } diff --git a/t/Asset/Asset_diagnose.t b/t/Asset/Asset_diagnose.t index 400d3ac62..d00d4f99e 100644 --- a/t/Asset/Asset_diagnose.t +++ b/t/Asset/Asset_diagnose.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,22 +8,19 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; ##The goal of this test is to look for orphaned assetIds across ##all assets in the Asset's main table, and the asset and assetData tables. use WebGUI::Test; use WebGUI::Session; -use WebGUI::Utility; use Test::More; # increment this value for each test you create use Test::Deep; my $session = WebGUI::Test->session; -my @assets = grep { !isIn($_, qw/WebGUI::Asset::FilePile/) } ( +my @assets = grep { $_ ne 'WebGUI::Asset::FilePile' } ( keys %{ $session->config->get('assets') } ); @@ -43,9 +40,8 @@ SKIP: { } foreach my $asset ( @assets ) { - eval "use $asset"; - my $def = $asset->definition($session); - my $tableName = $def->[0]->{tableName}; + my $className = WebGUI::Asset->loadModule($asset); + my $tableName = $className->meta->tableName; my $classIds = $session->db->buildArrayRef( q{ diff --git a/t/Asset/EMSSubmissionForm.t b/t/Asset/EMSSubmissionForm.t index 4a4847b40..f81a6b2d2 100644 --- a/t/Asset/EMSSubmissionForm.t +++ b/t/Asset/EMSSubmissionForm.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,12 +13,11 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use Test::More; use Test::Deep; use Test::Warn; +use Test::Exception; use HTML::Form; use JSON; use WebGUI::Test; # Must use this before any other WebGUI modules @@ -74,11 +73,6 @@ sub logout { $session->user({userId => 1}); } loginAdmin; -# Create a version tag to work in -my $versionTag = WebGUI::VersionTag->getWorking($session); -$versionTag->set({name=>"EventManagementSystem Test"}); -WebGUI::Test->addToCleanup($versionTag); - # Do our work in the import node my $node = WebGUI::Asset->getImportNode($session); @@ -87,14 +81,14 @@ loginRgstr ; # Add an EMS asset my $ems = $node->addChild({ className =>'WebGUI::Asset::Wobject::EventManagementSystem', - title => 'Test EMS', - description => 'This is a test ems', - url => '/test-ems', workflowIdCommit => 'pbworkflow000000000003', # Commit Content Immediately registrationStaffGroupId => $registrars->getId, groupIdView => $attendees->getId, submittedLocationsList => join( "\n", my @submissionLocations = qw'loc1 loc2' ), }); +my $ems_tag = WebGUI::VersionTag->getWorking($session); +$ems_tag->commit; +WebGUI::Test->addToCleanup($ems, $ems_tag); # I scooped this out ot WG::Asset::Wobject::EventManagementSystem # its not pretty, but there is no other way to add a meta field my $mf1Id = $ems->setCollateral("EMSEventMetaField", "fieldId",{ @@ -119,9 +113,7 @@ my $mf2Id = $ems->setCollateral("EMSEventMetaField", "fieldId",{ my $i18n = $ems->i18n; -$versionTag->commit; -$versionTag = WebGUI::VersionTag->getWorking($session); -WebGUI::Test->addToCleanup($versionTag); +$ems = $ems->cloneFromDb; my $id1 = $ems->getNextSubmissionId; my $id2 = $ems->getNextSubmissionId; @@ -207,7 +199,7 @@ my $submission = { title => 'my favorite thing to talk about', description => 'the description', startDate => '1255150800', - }; +}; $session->request->setup_body($submission); my $sub1 = $frmA->addSubmission; WebGUI::Test->addToCleanup( $sub1 ); @@ -225,7 +217,7 @@ $submission = { title => 'why i like to be important', description => 'the description', mfRequiredUrl => 'http://google.com', - }; +}; $session->request->setup_body($submission); my $sub2 = $frmB->addSubmission; WebGUI::Test->addToCleanup( $sub2 ); @@ -320,7 +312,7 @@ cmp_deeply($sub1->get('comments')->[0],{ comment => 'this is a test comment', rating => 0, date => re( qr/\d{10}/ ), - ip => undef, + ip => ignore(), }, "successfully added comment" ); $sub1->update({ @@ -336,6 +328,8 @@ is($sub1->get('submissionStatus'),'approved','set status to approved'); $sub2->update({ submissionStatus => 'denied' }); is($sub2->get('submissionStatus'),'denied','set status to denied'); +diag $sub1->submissionStatus; +diag $sub1->ticketId; SKIP: { skip "workflow activities not coded yet", 10 if 0; @@ -351,13 +345,18 @@ is($approveSubmissions->run, 'complete', 'approval complete'); is($approveSubmissions->run, 'done', 'approval done'); $sub1 = $sub1->cloneFromDb; +diag $sub1->submissionStatus; +diag $sub1->ticketId; +diag $sub1->getRevisionCount; is( $sub1->get('submissionStatus'),'created','approval successfull'); -my $ticket = WebGUI::Asset->newByDynamicClass($session, $sub1->get('ticketId')); -WebGUI::Test->addToCleanup( $ticket ) if $ticket ; +my $ticket = eval { WebGUI::Asset->newById($session, $sub1->get('ticketId')); }; +my $e = Exception::Class->caught(); SKIP: { -skip 'no ticket created', 1 unless isa_ok( $ticket, 'WebGUI::Asset::Sku::EMSTicket', 'approval created a ticket'); -is( $ticket->get('title'), $sub1->get('title'), 'Ticket title matches submission title' ); + skip 'no ticket created', 2 if $e; + isa_ok( $ticket, 'WebGUI::Asset::Sku::EMSTicket', 'approval created a ticket'); + WebGUI::Test->addToCleanup( $ticket ) if $ticket ; + is( $ticket->get('title'), $sub1->get('title'), 'Ticket title matches submission title' ); } my $newDate = time - ( 60 * 60 * 24 * ( $sub2->getParent->get('daysBeforeCleanup') + 1 ) ), @@ -372,15 +371,12 @@ $cleanupSubmissions->reset; is($cleanupSubmissions->run, 'complete', 'cleanup complete'); is($cleanupSubmissions->run, 'done', 'cleanup done'); -$sub2 = WebGUI::Asset->newByDynamicClass($session, $sub2Id); -is( $sub2, undef, 'submission deleted'); +dies_ok { WebGUI::Asset->newById($session, $sub2Id) } 'submission deleted'; } # end of workflow skip } # end of create submission skip -$versionTag->commit; - # this is not the greatest test but it does run through the basic create submissionForm code. loginRgstr; diff --git a/t/Asset/Event.t b/t/Asset/Event.t index a67b73ef7..196629569 100644 --- a/t/Asset/Event.t +++ b/t/Asset/Event.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,14 +8,13 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use Test::More; # increment this value for each test you create use Test::Deep; + plan tests => 30; use WebGUI::Session; @@ -28,9 +27,14 @@ my $versionTag = WebGUI::VersionTag->getWorking($session); $versionTag->set({name=>"Adding Calendar for Event Asset Test"}); WebGUI::Test->addToCleanup($versionTag); my $defaultAsset = WebGUI::Asset->getDefault($session); -my $cal = $defaultAsset->addChild({className=>'WebGUI::Asset::Wobject::Calendar'}); +my $cal = $defaultAsset->addChild({ + className=>'WebGUI::Asset::Wobject::Calendar', +}); $versionTag->commit; +my $versionTag2 = WebGUI::VersionTag->getWorking($session); +WebGUI::Test->addToCleanup($versionTag2); + my $properties = { # '1234567890123456789012' id => 'EventAssetTest00000001', @@ -128,8 +132,6 @@ my $event6 = $cal->addChild($properties3, $properties3->{id}, time()-5); my $event6a = $event6->addRevision({ title => 'Event with storage', }, undef, { skipAutoCommitWorkflows => 1, }); ok($session->id->valid($event6a->get('storageId')), 'addRevision gives the new revision a valid storageId'); isnt($event6a->get('storageId'), $event6->get('storageId'), '... and it is different from the previous revision'); -my $versionTag2 = WebGUI::VersionTag->getWorking($session); -WebGUI::Test->addToCleanup($versionTag2); my $event7 = $cal->addChild({ className => 'WebGUI::Asset::Event', @@ -149,8 +151,8 @@ is ($event7->get('endDate'), '2000-09-02', 'endDate bumped by 1 day'); # Valid dates $session->request->setup_body({ startDate => '0000-00-01', endDate => '1000-00-01' }); my $event = $cal->addChild({ className => 'WebGUI::Asset::Event' }, undef, time()+10); -my $output = $event->processPropertiesFromFormPost; -is( ref $output, 'ARRAY', 'ppffp returns error array' ); +my $output = $event->processEditForm; +is( ref $output, 'ARRAY', 'returns error array' ); is( scalar @$output, 2, 'has two errors' ); ####################################### diff --git a/t/Asset/Event/edit.t b/t/Asset/Event/edit.t index 3cb86bb38..b41414a77 100644 --- a/t/Asset/Event/edit.t +++ b/t/Asset/Event/edit.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,16 +13,14 @@ # assets. # -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use Test::More; use Test::Deep; use WebGUI::Test; # Must use this before any other WebGUI modules +use WebGUI::Test::Mechanize; use WebGUI::Asset; use WebGUI::VersionTag; use WebGUI::Session; -plan skip_all => 'set WEBGUI_LIVE to enable this test' unless $ENV{WEBGUI_LIVE}; #---------------------------------------------------------------------------- # Init @@ -30,25 +28,13 @@ my $session = WebGUI::Test->session; my $node = WebGUI::Asset->getImportNode( $session ); my @versionTags = ( WebGUI::VersionTag->getWorking( $session ) ); -# Override some settings to make things easier to test -# userFunctionStyleId -$session->setting->set( 'userFunctionStyleId', 'PBtmpl0000000000000132' ); -$session->setting->set( 'defaultVersionTagWorkflow', 'pbworkflow000000000003' ); - # Create a user for testing purposes my $user = WebGUI::User->new( $session, "new" ); WebGUI::Test->addToCleanup($user); $user->username( 'dufresne' . time ); -my $identifier = 'ritahayworth'; -my $auth = WebGUI::Operation::Auth::getInstance( $session, $user->authMethod, $user->userId ); -$auth->saveParams( $user->userId, $user->authMethod, { - 'identifier' => Digest::MD5::md5_base64( $identifier ), -}); my ( $mech ); -# Get the site's base URL -my $baseUrl = 'http://' . $session->config->get('sitename')->[0]; # Create a Calendar to add Events to my $calendar = $node->addChild( { @@ -67,30 +53,17 @@ WebGUI::Test->addToCleanup($versionTags[-1]); #---------------------------------------------------------------------------- # Tests -if ( !eval { require Test::WWW::Mechanize; 1; } ) { - plan skip_all => 'Cannot load Test::WWW::Mechanize. Will not test.'; -} -$mech = Test::WWW::Mechanize->new; -$mech->get( $baseUrl ); -if ( !$mech->success ) { - plan skip_all => "Cannot load URL '$baseUrl'. Will not test."; -} - -plan skip_all => 'set WEBGUI_LIVE to enable this test' - unless $ENV{WEBGUI_LIVE}; - -plan tests => 8; # Increment this number for each test you create - #---------------------------------------------------------------------------- # Add event: Users without permission are not shown form -$mech = Test::WWW::Mechanize->new; -$mech->get( $baseUrl . $calendar->getUrl('func=add;class=WebGUI::Asset::Event') ); +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get( $calendar->getUrl('func=add;className=WebGUI::Asset::Event') ); $mech->content_lacks( q{value="editSave"} ); #---------------------------------------------------------------------------- # Add event: Users with permission are shown form to add event -$mech = getMechLogin( $baseUrl, $user, $identifier ); +$mech->get('/'); +$mech->session->user({ user => $user }); # Properties given to the form my $properties = { @@ -98,7 +71,7 @@ my $properties = { menuTitle => 'Event Menu Title', }; -$mech->get_ok( $baseUrl . $calendar->getUrl('func=add;class=WebGUI::Asset::Event') ); +$mech->get_ok( $calendar->getUrl('func=add;className=WebGUI::Asset::Event') ); $mech->submit_form_ok( { with_fields => $properties, @@ -128,17 +101,18 @@ $eventUrl = $event->getUrl; #---------------------------------------------------------------------------- # Edit Event: Users without permission are not shown form -$mech = Test::WWW::Mechanize->new; - -$mech->get( $baseUrl . $eventUrl . '?func=edit' ); +$mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get( $eventUrl . '?func=edit' ); +ok !$mech->success, 'edit form was not loaded'; $mech->content_lacks( q{value="editSave"} ); #---------------------------------------------------------------------------- # Edit Event: User with permission is shown form to edit event -$mech = getMechLogin( $baseUrl, $user, $identifier ); +$mech->get('/'); +$mech->session->user({ user => $user }); -$mech->get_ok( $baseUrl . $eventUrl . '?func=edit' ); +$mech->get_ok( $eventUrl . '?func=edit' ); my $properties = { title => "Event Title" . time, @@ -170,26 +144,6 @@ $properties = { cmp_deeply( $event->get, superhashof( $properties ), 'Events properties saved correctly' ); -#---------------------------------------------------------------------------- -# getMechLogin( baseUrl, WebGUI::User, "identifier" ) -# Returns a Test::WWW::Mechanize session after logging in the given user using -# the given identifier (password) -# baseUrl is a fully-qualified URL to the site to login to -sub getMechLogin { - my $baseUrl = shift; - my $user = shift; - my $identifier = shift; - - my $mech = Test::WWW::Mechanize->new; - $mech->get( $baseUrl . '?op=auth;method=displayLogin' ); - $mech->submit_form( - with_fields => { - username => $user->username, - identifier => $identifier, - }, - ); - - return $mech; -} +done_testing; #vim:ft=perl diff --git a/t/Asset/Event/permissions.t b/t/Asset/Event/permissions.t index 14105f4a1..895d48f1f 100644 --- a/t/Asset/Event/permissions.t +++ b/t/Asset/Event/permissions.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use Test::More; use WebGUI::Test; # Must use this before any other WebGUI modules use WebGUI::Test::Maker::Permission; diff --git a/t/Asset/Event/recur.t b/t/Asset/Event/recur.t index 29efce18d..07fbc83d2 100644 --- a/t/Asset/Event/recur.t +++ b/t/Asset/Event/recur.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,8 +13,6 @@ use strict; -use FindBin; -use lib "$FindBin::Bin/../../../lib"; use Test::More; use DateTime; diff --git a/t/Asset/File.t b/t/Asset/File.t index b677ff28e..c56e468b1 100644 --- a/t/Asset/File.t +++ b/t/Asset/File.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use Test::MockObject; my $mocker = Test::MockObject->new(); @@ -66,15 +64,15 @@ my $asset = $defaultAsset->addChild($properties, $properties->{id}); ############################################ ok($asset->getStorageLocation, 'File Asset getStorageLocation initialized'); -ok($asset->get('storageId'), 'getStorageLocation updates asset object with storage location'); -is($asset->get('storageId'), $asset->getStorageLocation->getId, 'Asset storageId and cached storageId agree'); +ok($asset->storageId, 'getStorageLocation updates asset object with storage location'); +is($asset->storageId, $asset->getStorageLocation->getId, 'Asset storageId and cached storageId agree'); $asset->update({ storageId => $storage->getId, filename => $filename, }); -is($storage->getId, $asset->get('storageId'), 'Asset updated with correct new storageId'); +is($storage->getId, $asset->storageId, 'Asset updated with correct new storageId'); is($storage->getId, $asset->getStorageLocation->getId, 'Cached Asset storage location updated with correct new storageId'); $versionTag->commit; @@ -86,7 +84,8 @@ $versionTag->commit; ############################################ my $fileStorage = WebGUI::Storage->create($session); -WebGUI::Test::addToCleanup($fileStorage); +WebGUI::Test->addToCleanup($fileStorage); +$mocker->set_always('get', $fileStorage->getId); $mocker->set_always('getValue', $fileStorage->getId); my $fileFormStorage = $asset->getStorageFromPost(); isa_ok($fileFormStorage, 'WebGUI::Storage', 'Asset::File::getStorageFromPost'); @@ -108,7 +107,7 @@ cmp_deeply( #---------------------------------------------------------------------------- # Add another new revision, changing the privs my $newRev = $asset->addRevision( { ownerUserId => '3', groupIdView => '3' }, time + 5 ); -WebGUI::Test::addToCleanup( WebGUI::VersionTag->getWorking( $session ) ); +WebGUI::Test->addToCleanup( $newRev ); $privs = JSON->new->decode( $newRev->getStorageLocation->getFileContentsAsScalar('.wgaccess') ); cmp_deeply( $privs, @@ -122,7 +121,7 @@ cmp_deeply( # Add a new revision, changing the privs my $newRev = $asset->addRevision( { groupIdView => '7' }, time + 8 ); -WebGUI::Test::addToCleanup( WebGUI::VersionTag->getWorking( $session ) ); +WebGUI::Test->addToCleanup( $newRev ); is( $newRev->getStorageLocation->getFileContentsAsScalar('.wgaccess'), undef, "wgaccess doesn't exist" ); #---------------------------------------------------------------------------- @@ -137,15 +136,13 @@ is ($privs, '{"state":"trash"}', '... correct state'); #---------------------------------------------------------------------------- # trash should update storage location -my $tag = WebGUI::VersionTag->getWorking( $session ); $asset = $defaultAsset->addChild( $properties ); $asset->getStorageLocation->addFileFromScalar($filename, $filename); $asset->update({ filename => $filename, }); -$tag->commit; -addToCleanup( $tag ); +WebGUI::Test->addToCleanup( $asset ); $asset->trash; my $storage = $asset->getStorageLocation; my $dir = $storage->getPathClassDir(); @@ -160,7 +157,6 @@ is ($privs, '{"state":"trash"}', '... correct state'); $asset->restore; unlike( $storage->getFileContentsAsScalar('.wgaccess'), qr{"state"\:"trash"}, "wgaccess not trashed" ); - ############################################ # # www_view @@ -169,9 +165,9 @@ unlike( $storage->getFileContentsAsScalar('.wgaccess'), qr{"state"\:"trash"}, "w $session->config->set('enableStreamingUploads', '0'); $asset->www_view; -is($session->http->getRedirectLocation, $storage->getUrl('someScalarFile.txt'), 'www_view: sets a redirect'); +is($session->response->location, $storage->getUrl('someScalarFile.txt'), 'www_view: sets a redirect'); $session->config->set('enableStreamingUploads', '1'); -$session->http->setRedirectLocation(''); +$session->response->location(''); $asset->www_view; -is($session->http->getRedirectLocation, '', '... redirect not set when enableStreamingUploads is set'); +is($session->response->location, '', '... redirect not set when enableStreamingUploads is set'); diff --git a/t/Asset/File/GalleryFile/Photo/00base.t b/t/Asset/File/GalleryFile/Photo/00base.t index 7882ac88b..0ea1dd771 100644 --- a/t/Asset/File/GalleryFile/Photo/00base.t +++ b/t/Asset/File/GalleryFile/Photo/00base.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../../../../lib"; ## The goal of this test is to test the creation and deletion of photo assets @@ -18,6 +16,7 @@ use Scalar::Util; use WebGUI::Test; use WebGUI::Session; use Test::More; +use Test::Exception; #---------------------------------------------------------------------------- # Init @@ -91,9 +90,6 @@ is( my $properties = $photo->get; $photo->purge; -is( - WebGUI::Asset->newByDynamicClass($session, $properties->{assetId}), undef, - "Photo no longer able to be instanciated", -); +dies_ok { WebGUI::Asset->newById($session, $properties->{assetId}) } "Photo no longer able to be instanciated"; #vim:ft=perl diff --git a/t/Asset/File/GalleryFile/Photo/adjustOrientation.t b/t/Asset/File/GalleryFile/Photo/adjustOrientation.t index 9545b0e6b..e53b7918e 100644 --- a/t/Asset/File/GalleryFile/Photo/adjustOrientation.t +++ b/t/Asset/File/GalleryFile/Photo/adjustOrientation.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../../../../lib"; # Test the 'adjustOrientation' method called by 'applyConstraints'. It is # responsible for rotating JPEG images according to orientation information @@ -33,7 +31,7 @@ my $versionTag = WebGUI::VersionTag->getWorking($session); # Name version tag and make sure it gets cleaned up $versionTag->set({name=>"Orientation adjustment test"}); -addToCleanup($versionTag); +WebGUI::Test->addToCleanup($versionTag); # Create gallery and a single album my $gallery diff --git a/t/Asset/File/GalleryFile/Photo/comment.t b/t/Asset/File/GalleryFile/Photo/comment.t index bd7dc40e9..9becb8279 100644 --- a/t/Asset/File/GalleryFile/Photo/comment.t +++ b/t/Asset/File/GalleryFile/Photo/comment.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../../../../lib"; ## The goal of this test is to test the adding, deleting, editing, and # getting comments for photos @@ -26,29 +24,20 @@ use WebGUI::International; #---------------------------------------------------------------------------- # Init my $session = WebGUI::Test->session; -my $node = WebGUI::Asset->getImportNode($session); -my @versionTags = (); -push @versionTags, WebGUI::VersionTag->getWorking($session); -WebGUI::Test->addToCleanup($versionTags[-1]); -$versionTags[-1]->set({name=>"Photo Test, add Gallery, Album and 1 Photo"}); - -my @addArguments = ( undef, undef, { skipAutoCommitWorkflows => 1 } ); my $gallery - = $node->addChild({ + = WebGUI::Test->asset( className => "WebGUI::Asset::Wobject::Gallery", groupIdAddComment => "2", # "Registered Users" - }); + ); my $album = $gallery->addChild({ className => "WebGUI::Asset::Wobject::GalleryAlbum", - }, @addArguments ); + }); my $photo = $album->addChild({ className => "WebGUI::Asset::File::GalleryFile::Photo", - }, @addArguments ); - -$versionTags[-1]->commit; + }); #---------------------------------------------------------------------------- # Tests @@ -257,7 +246,7 @@ my $html; $photo = $album->addChild({ className => "WebGUI::Asset::File::GalleryFile::Photo", - }, @addArguments ); + }); # Permissions $html = WebGUI::Test->getPage($photo, "www_editCommentSave", { diff --git a/t/Asset/File/GalleryFile/Photo/download.t b/t/Asset/File/GalleryFile/Photo/download.t index 4001af2eb..7e8177914 100644 --- a/t/Asset/File/GalleryFile/Photo/download.t +++ b/t/Asset/File/GalleryFile/Photo/download.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -11,9 +11,7 @@ # The goal of this test is to test the getDownloadFileUrl and www_download() # methods -use FindBin; use strict; -use lib "$FindBin::Bin/../../../../lib"; use WebGUI::Test; use WebGUI::Session; @@ -24,40 +22,22 @@ use WebGUI::Asset::File::GalleryFile::Photo; #---------------------------------------------------------------------------- # Init my $session = WebGUI::Test->session; -my $node = WebGUI::Asset->getImportNode($session); - -my @versionTags = (); -push @versionTags, WebGUI::VersionTag->getWorking($session); -$versionTags[-1]->set({name=>"Photo Test, add Gallery, Album and 1 Photo"}); -WebGUI::Test->addToCleanup($versionTags[-1]); my $gallery - = $node->addChild({ + = WebGUI::Test->asset( className => "WebGUI::Asset::Wobject::Gallery", imageResolutions => "100\n200\n300", groupIdView => 7, - }); + ); my $album = $gallery->addChild({ className => "WebGUI::Asset::Wobject::GalleryAlbum", - }, - undef, - undef, - { - skipAutoCommitWorkflows => 1, }); my $photo = $album->addChild({ className => "WebGUI::Asset::File::GalleryFile::Photo", - }, - undef, - undef, - { - skipAutoCommitWorkflows => 1, }); -$versionTags[-1]->commit; - #---------------------------------------------------------------------------- # Tests plan tests => 3; diff --git a/t/Asset/File/GalleryFile/Photo/edit.t b/t/Asset/File/GalleryFile/Photo/edit.t index 64c476d4f..55797aa41 100644 --- a/t/Asset/File/GalleryFile/Photo/edit.t +++ b/t/Asset/File/GalleryFile/Photo/edit.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -11,14 +11,13 @@ # This script tests the edit and saving of Photo assets -use FindBin; use strict; -use lib "$FindBin::Bin/../../../../lib"; use Test::More; use Test::Deep; use WebGUI::Test; # Must use this before any other WebGUI modules +use WebGUI::Test::Mechanize; use WebGUI::Asset; use WebGUI::Asset::Wobject::Gallery; use WebGUI::Asset::Wobject::GalleryAlbum; @@ -26,8 +25,6 @@ use WebGUI::Asset::File::GalleryFile::Photo; use WebGUI::VersionTag; use WebGUI::Session; -plan skip_all => 'set WEBGUI_LIVE to enable this test' unless $ENV{WEBGUI_LIVE}; - #---------------------------------------------------------------------------- # Init @@ -36,23 +33,12 @@ my $node = WebGUI::Asset->getImportNode( $session ); # Create version tag and make sure it gets cleaned up my $versionTag = WebGUI::VersionTag->getWorking($session); -addToCleanup($versionTag); - -# Override some settings to make things easier to test -# userFunctionStyleId -$session->setting->set( 'userFunctionStyleId', 'PBtmpl0000000000000132' ); -# specialState -$session->setting->set( 'specialState', '' ); +WebGUI::Test->addToCleanup($versionTag); # Create a user for testing purposes my $user = WebGUI::User->new( $session, "new" ); WebGUI::Test->addToCleanup($user); $user->username( 'dufresne' . time ); -my $identifier = 'ritahayworth'; -my $auth = WebGUI::Operation::Auth::getInstance( $session, $user->authMethod, $user->userId ); -$auth->saveParams( $user->userId, $user->authMethod, { - 'identifier' => Digest::MD5::md5_base64( $identifier ), -}); # Create gallery and a single album my $gallery @@ -77,43 +63,25 @@ my $album # Commit assets for testing $versionTag->commit; -# Get the site's base URL -my $baseUrl = 'http://' . $session->config->get('sitename')->[0]; - -# Common variables -my ( $mech, $photo ); - #---------------------------------------------------------------------------- # Tests -if ( !eval { require Test::WWW::Mechanize; 1; } ) { - plan skip_all => 'Cannot load Test::WWW::Mechanize. Will not test.'; -} -$mech = Test::WWW::Mechanize->new; -$mech->get( $baseUrl ); -if ( !$mech->success ) { - plan skip_all => "Cannot load URL '$baseUrl'. Will not test."; -} - -plan tests => 10; # Increment this number for each test you create - - #---------------------------------------------------------------------------- # Test permissions for new photos -$mech = Test::WWW::Mechanize->new; +my $mech = WebGUI::Test::Mechanize->new(config => WebGUI::Test->file); # Save a new photo -$mech->get( $baseUrl . $album->getUrl("func=add;class=WebGUI::Asset::File::GalleryFile::Photo") ); +$mech->get( $album->getUrl("func=add;className=WebGUI::Asset::File::GalleryFile::Photo") ); $mech->content_lacks( 'value="editSave"' ); - +$mech->content_contains( 'value="addSave"' ); #---------------------------------------------------------------------------- # Test editing existing photo # Create single photo inside the album -$photo +my $photo = $album->addChild({ className => "WebGUI::Asset::File::GalleryFile::Photo", ownerUserId => $user->getId, @@ -139,10 +107,11 @@ my %properties = ( ); # Log in -$mech = getMechLogin( $baseUrl, $user, $identifier ); +$mech->get('/'); ##Prime the pump to get a session; +$mech->session->user({ user => $user }); # Request photo edit view -$mech->get_ok( $baseUrl . $photo->getUrl('func=edit'), 'Request Photo edit view' ); +$mech->get_ok( $photo->getUrl('func=edit'), 'Request Photo edit view' ); # Try to submit edit form $mech->submit_form_ok({ form_name => 'photoEdit', @@ -150,7 +119,7 @@ $mech->submit_form_ok({ }, 'Submit Photo edit form' ); # Re-create instance of Photo asset -$photo = WebGUI::Asset->newByDynamicClass($session, $photo->getId); +$photo = WebGUI::Asset->newById($session, $photo->getId); # Check whether properties were changed correctly cmp_deeply($photo->get, superhashof(\%properties), 'All changes applied'); @@ -172,7 +141,7 @@ $photo->setFile( WebGUI::Test->getTestCollateralPath("rotation_test.png") ); # Request photo edit view -$mech->get_ok( $baseUrl . $photo->getUrl('func=edit;proceed=editParent'), 'Request Photo edit view with "proceed=editParent"' ); +$mech->get_ok( $photo->getUrl('func=edit;proceed=editParent'), 'Request Photo edit view with "proceed=editParent"' ); # Submit changes $mech->submit_form( form_name => 'photoEdit' ); # Currently, a redirect using the proceed parameter will not change the URL @@ -185,8 +154,10 @@ $mech->content_contains( 'name="galleryAlbumEdit"', "Redirected to parent's edit SKIP: { skip "File control needs to be fixed to be more 508-compliant before this can be used", 4; - $mech = getMechLogin( $baseUrl, $user, $identifier ); - $mech->get_ok( $baseUrl . $album->getUrl("func=add;class=WebGUI::Asset::File::GalleryFile::Photo") ); + my $mech = WebGUI::Test::Mechanize->new(config => WebGUI::Test->file); + $mech->get('/'); ##Prime the pump to get a session; + $mech->session->user({ user => $user }); + $mech->get_ok( $album->getUrl("func=add;className=WebGUI::Asset::File::GalleryFile::Photo") ); open my $file, '<', WebGUI::Test->getTestCollateralPath( 'lamp.jpg' ) or die( "Couldn't open test collateral 'lamp.jpg' for reading: $!" ); @@ -213,36 +184,15 @@ SKIP: { }; # Make sure properties were saved - my $photo = WebGUI::Asset->newByDynamicClass( $session, $album->getFileIds->[0] ); + my $photo = WebGUI::Asset->newById( $session, $album->getFileIds->[0] ); cmp_deeply( $photo->get, superhashof( $properties ), "Photo properties saved correctly" ); # First File in an album should update assetIdThumbnail - my $album = WebGUI::Asset->newByDynamicClass( $session, $album->getId ); + my $album = WebGUI::Asset->newById( $session, $album->getId ); is( $album->get('assetIdThumbnail'), $photo->getId, "Album assetIdThumbnail gets set by first File added", ); } - -#---------------------------------------------------------------------------- -# getMechLogin( baseUrl, WebGUI::User, "identifier" ) -# Returns a Test::WWW::Mechanize session after logging in the given user using -# the given identifier (password) -# baseUrl is a fully-qualified URL to the site to login to -sub getMechLogin { - my $baseUrl = shift; - my $user = shift; - my $identifier = shift; - - my $mech = Test::WWW::Mechanize->new; - $mech->get( $baseUrl . '?op=auth;method=displayLogin' ); - $mech->submit_form( - with_fields => { - username => $user->username, - identifier => $identifier, - }, - ); - - return $mech; -} +done_testing; diff --git a/t/Asset/File/GalleryFile/Photo/exif.t b/t/Asset/File/GalleryFile/Photo/exif.t index 1e1725a1f..c737205eb 100644 --- a/t/Asset/File/GalleryFile/Photo/exif.t +++ b/t/Asset/File/GalleryFile/Photo/exif.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../../../../lib"; ## The goal of this test is to test the EXIF functionality of WebGUI's photo # asset @@ -62,7 +60,6 @@ for my $key ( qw{ Directory } ) { delete $exif->{ $key }; } - #---------------------------------------------------------------------------- # Tests plan tests => 2; diff --git a/t/Asset/File/GalleryFile/Photo/makeResolutions.t b/t/Asset/File/GalleryFile/Photo/makeResolutions.t index 0ef67aa5d..bdce8a323 100644 --- a/t/Asset/File/GalleryFile/Photo/makeResolutions.t +++ b/t/Asset/File/GalleryFile/Photo/makeResolutions.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../../../../lib"; ## The goal of this test is to test the creation of photo download # resolutions @@ -26,25 +24,16 @@ use WebGUI::Asset::File::GalleryFile::Photo; # Init my $session = WebGUI::Test->session; my $node = WebGUI::Asset->getImportNode($session); -my @versionTags = (); -push @versionTags, WebGUI::VersionTag->getWorking($session); -$versionTags[-1]->set({name=>"Photo Test"}); -WebGUI::Test->addToCleanup($versionTags[-1]); my ($gallery, $album, $photo); $gallery - = $node->addChild({ + = WebGUI::Test->asset( className => "WebGUI::Asset::Wobject::Gallery", imageResolutions => "1600\n1024\n800\n640", - }); + ); $album = $gallery->addChild({ className => "WebGUI::Asset::Wobject::GalleryAlbum", - }, - undef, - undef, - { - skipAutoCommitWorkflows => 1, }); #---------------------------------------------------------------------------- @@ -56,13 +45,7 @@ plan tests => 14; $photo = $album->addChild({ className => "WebGUI::Asset::File::GalleryFile::Photo", - }, - undef, - undef, - { - skipAutoCommitWorkflows => 1, }); -$versionTags[-1]->commit; $photo->getStorageLocation->addFileFromFilesystem( WebGUI::Test->getTestCollateralPath('page_title.jpg') ); $photo->update({ filename => 'page_title.jpg' }); @@ -92,32 +75,19 @@ TODO: { #---------------------------------------------------------------------------- # Array of resolutions passed to makeResolutions overrides defaults from # parent asset -push @versionTags, WebGUI::VersionTag->getWorking($session); -WebGUI::Test->addToCleanup($versionTags[-1]); $gallery - = $node->addChild({ + = WebGUI::Test->asset( className => "WebGUI::Asset::Wobject::Gallery", imageResolutions => "1600\n1024\n800\n640", - }); + ); $album = $gallery->addChild({ className => "WebGUI::Asset::Wobject::GalleryAlbum", - }, - undef, - undef, - { - skipAutoCommitWorkflows => 1, }); $photo = $album->addChild({ className => "WebGUI::Asset::File::GalleryFile::Photo", - }, - undef, - undef, - { - skipAutoCommitWorkflows => 1, }); -$versionTags[-1]->commit; $photo->getStorageLocation->addFileFromFilesystem( WebGUI::Test->getTestCollateralPath('page_title.jpg') ); $photo->update({ filename => 'page_title.jpg' }); @@ -146,18 +116,10 @@ TODO: { #---------------------------------------------------------------------------- # makeResolutions allows API to specify resolutions to make as array reference # argument -push @versionTags, WebGUI::VersionTag->getWorking($session); -WebGUI::Test->addToCleanup($versionTags[-1]); $photo - = $node->addChild({ + = $album->addChild({ className => "WebGUI::Asset::File::GalleryFile::Photo", - }, - undef, - undef, - { - skipAutoCommitWorkflows => 1, }); -$versionTags[-1]->commit; $photo->getStorageLocation->addFileFromFilesystem( WebGUI::Test->getTestCollateralPath('page_title.jpg') ); $photo->update({ filename => 'page_title.jpg' }); @@ -184,18 +146,10 @@ TODO: { #---------------------------------------------------------------------------- # makeResolutions throws a warning on an invalid resolution but keeps going -push @versionTags, WebGUI::VersionTag->getWorking($session); -WebGUI::Test->addToCleanup($versionTags[-1]); $photo - = $node->addChild({ + = $album->addChild({ className => "WebGUI::Asset::File::GalleryFile::Photo", - }, - undef, - undef, - { - skipAutoCommitWorkflows => 1, }); -$versionTags[-1]->commit; $photo->getStorageLocation->addFileFromFilesystem( WebGUI::Test->getTestCollateralPath('page_title.jpg') ); $photo->update({ filename => 'page_title.jpg' }); { # localize our signal handler diff --git a/t/Asset/File/GalleryFile/Photo/makeShortcut.t b/t/Asset/File/GalleryFile/Photo/makeShortcut.t index 6ebee5d56..ad9128e6a 100644 --- a/t/Asset/File/GalleryFile/Photo/makeShortcut.t +++ b/t/Asset/File/GalleryFile/Photo/makeShortcut.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -11,42 +11,38 @@ # The goal of this test is to test the makeShortcut method and www_makeShortcut # pages -use FindBin; use strict; -use lib "$FindBin::Bin/../../../../lib"; use Scalar::Util; use WebGUI::Test; use WebGUI::Session; use Test::More; use Test::Deep; -use WebGUI::Test::Maker::HTML; use WebGUI::Asset::File::GalleryFile::Photo; #---------------------------------------------------------------------------- # Init my $session = WebGUI::Test->session; my $node = WebGUI::Asset->getImportNode($session); -my $versionTag = WebGUI::VersionTag->getWorking($session); -$versionTag->set({name=>"Photo Test"}); -WebGUI::Test->addToCleanup($versionTag); -my $maker = WebGUI::Test::Maker::HTML->new; my $otherParent - = $node->addChild({ + = WebGUI::Test->asset( className => "WebGUI::Asset::Wobject::Layout", - }); -my $photo - = $node->addChild({ - className => "WebGUI::Asset::File::GalleryFile::Photo", - userDefined1 => "ORIGINAL", - }, - undef, - undef, - { - skipAutoCommitWorkflows => 1, + ); +my $gallery + = WebGUI::Test->asset( + className => "WebGUI::Asset::Wobject::Gallery", + imageResolutions => "1600x1200\n1024x768\n800x600\n640x480", + ); +my $album + = $gallery->addChild({ + className => "WebGUI::Asset::Wobject::GalleryAlbum", }); -$versionTag->commit; +my $photo + = $album->addChild({ + className => "WebGUI::Asset::File::GalleryFile::Photo", + userDefined1 => "ORIGINAL", + }); #---------------------------------------------------------------------------- # Tests diff --git a/t/Asset/File/GalleryFile/Photo/navigation.t b/t/Asset/File/GalleryFile/Photo/navigation.t index 468fcadb0..fe73ca276 100644 --- a/t/Asset/File/GalleryFile/Photo/navigation.t +++ b/t/Asset/File/GalleryFile/Photo/navigation.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,44 +8,29 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../../../../lib"; ## The goal of this test is to test the creation and deletion of photo assets use WebGUI::Test; use WebGUI::Session; use Test::More; +use WebGUI::VersionTag; #---------------------------------------------------------------------------- # Init my $session = WebGUI::Test->session; my $node = WebGUI::Asset->getImportNode($session); -my $versionTag = WebGUI::VersionTag->getWorking($session); - -$versionTag->set({name=>"Photo Test"}); - -addToCleanup($versionTag); # Create gallery and a single album +my $tag = WebGUI::VersionTag->getWorking($session); my $gallery - = $node->addChild({ + = WebGUI::Test->asset( className => "WebGUI::Asset::Wobject::Gallery", - }, - undef, - undef, - { - skipAutoCommitWorkflows => 1, - }); + ); my $album = $gallery->addChild({ className => "WebGUI::Asset::Wobject::GalleryAlbum", - }, - undef, - undef, - { - skipAutoCommitWorkflows => 1, }); # Create 5 photos inside the gallery @@ -56,25 +41,17 @@ for (my $i = 0; $i < 5; $i++) $photo[$i] = $album->addChild({ className => "WebGUI::Asset::File::GalleryFile::Photo", - }, - undef, - undef, - { - skipAutoCommitWorkflows => 1, }); } +$tag->commit; +WebGUI::Test->addToCleanup($tag); -# Commit all changes -$versionTag->commit; +foreach my $asset ($gallery, $album, @photo) { + $asset = $asset->cloneFromDb; +} #---------------------------------------------------------------------------- # Tests -plan tests => 11; - -#---------------------------------------------------------------------------- -# Test module compiles okay -# plan tests => 1 -use_ok("WebGUI::Asset::File::GalleryFile::Photo"); #---------------------------------------------------------------------------- # Test getFirstFile method @@ -106,3 +83,4 @@ is( $photo[2]->getNextFile->getId, $photo[3]->getId, 'Photo next of photo no. 3 is( $photo[3]->getNextFile->getId, $photo[4]->getId, 'Photo next of photo no. 4 is photo no. 5' ); is( $photo[4]->getNextFile, undef, 'Photo next of photo no. 5 is undef' ); +done_testing; diff --git a/t/Asset/File/GalleryFile/Photo/permissions.t b/t/Asset/File/GalleryFile/Photo/permissions.t index b8b73fbad..d2b7379ec 100644 --- a/t/Asset/File/GalleryFile/Photo/permissions.t +++ b/t/Asset/File/GalleryFile/Photo/permissions.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -10,9 +10,7 @@ # Test permissions of Photo assets -use FindBin; use strict; -use lib "$FindBin::Bin/../../../../lib"; use WebGUI::Test; use WebGUI::Session; @@ -27,9 +25,6 @@ my $node = WebGUI::Asset->getImportNode($session); my $maker = WebGUI::Test::Maker::Permission->new; $session->user({ userId => 3 }); -my $versionTag = WebGUI::VersionTag->getWorking($session); -$versionTag->set({name=>"Photo Test, add Gallery, Album and 1 Photo"}); -WebGUI::Test->addToCleanup($versionTag); # Add a new user to the test user's friends list my $friend = WebGUI::User->new($session, "new"); @@ -41,13 +36,13 @@ my $notFriend = WebGUI::User->new( $session, "new" ); WebGUI::Test->addToCleanup($notFriend); my $gallery - = $node->addChild({ + = WebGUI::Test->asset( className => "WebGUI::Asset::Wobject::Gallery", groupIdView => "2", # Registered Users groupIdEdit => "3", # Admins groupIdComment => "2", # Registered Users ownerUserId => $session->user->userId, - }); + ); my $album = $gallery->addChild({ @@ -55,37 +50,24 @@ my $album groupIdView => "2", # Registered Users groupIdEdit => "3", # Admins ownerUserId => $session->user->userId, - }, - undef, - undef, - { - skipAutoCommitWorkflows => 1, }); my $photo = $album->addChild({ className => "WebGUI::Asset::File::GalleryFile::Photo", friendsOnly => 0, - }, - undef, - undef, - { - skipAutoCommitWorkflows => 1, }); my $photo2 = $photo->cloneFromDb; my $album2 = $album->cloneFromDb; $session->stow->delete('assetRevision'); -$versionTag->leaveTag; $session->user({userId => $notFriend->userId}); note "If you get stuck here, then there is an infinite loop in getParent/getGallery"; my $album2a = WebGUI::Asset->new($session, $photo2->getId); $session->user({userId => 1}); -$versionTag->commit; - #---------------------------------------------------------------------------- # Tests plan tests => 40; diff --git a/t/Asset/File/GalleryFile/Photo/rotate.t b/t/Asset/File/GalleryFile/Photo/rotate.t index 9b20ac9b9..58c95f1ac 100644 --- a/t/Asset/File/GalleryFile/Photo/rotate.t +++ b/t/Asset/File/GalleryFile/Photo/rotate.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../../../../lib"; # The goal of this test is to confirm correct rotation of all files attached # to a Photo asset after calling the rotate method. @@ -27,51 +25,28 @@ use Test::Deep; # Init my $session = WebGUI::Test->session; my $node = WebGUI::Asset->getImportNode($session); -my $versionTag = WebGUI::VersionTag->getWorking($session); - -# Name version tag and make sure it gets cleaned up -$versionTag->set({name=>"Photo rotation test"}); -addToCleanup($versionTag); # Create gallery and a single album my $gallery - = $node->addChild({ + = WebGUI::Test->asset( className => "WebGUI::Asset::Wobject::Gallery", imageResolutions => "1024", - }, - undef, - undef, - { - skipAutoCommitWorkflows => 1, - }); + ); my $album = $gallery->addChild({ className => "WebGUI::Asset::Wobject::GalleryAlbum", - }, - undef, - undef, - { - skipAutoCommitWorkflows => 1, }); # Create single photo inside the album my $photo = $album->addChild({ className => "WebGUI::Asset::File::GalleryFile::Photo", - }, - undef, - undef, - { - skipAutoCommitWorkflows => 1, }); # Attach image file to photo asset (setFile also makes download versions) $photo->setFile( WebGUI::Test->getTestCollateralPath("rotation_test.png") ); my $storage = $photo->getStorageLocation; -# Commit all changes -$versionTag->commit; - #---------------------------------------------------------------------------- plan tests => 2; diff --git a/t/Asset/File/GalleryFile/Photo/setFile.t b/t/Asset/File/GalleryFile/Photo/setFile.t index a45720b75..ce96c88e8 100644 --- a/t/Asset/File/GalleryFile/Photo/setFile.t +++ b/t/Asset/File/GalleryFile/Photo/setFile.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../../../../lib"; ## The goal of this test is to test the creation and deletion of photo assets @@ -23,34 +21,19 @@ use WebGUI::Asset::File::GalleryFile::Photo; #---------------------------------------------------------------------------- # Init my $session = WebGUI::Test->session; -my $node = WebGUI::Asset->getImportNode($session); -my $versionTag = WebGUI::VersionTag->getWorking($session); -WebGUI::Test->addToCleanup($versionTag); -$versionTag->set({name=>"Photo Test"}); my $gallery - = $node->addChild({ + = WebGUI::Test->asset( className => "WebGUI::Asset::Wobject::Gallery", imageResolutions => "1024", - }); + ); my $album = $gallery->addChild({ className => "WebGUI::Asset::Wobject::GalleryAlbum", - }, - undef, - undef, - { - skipAutoCommitWorkflows => 1, }); my $photo = $album->addChild({ className => "WebGUI::Asset::File::GalleryFile::Photo", - }, - undef, - undef, - { - skipAutoCommitWorkflows => 1, }); -$versionTag->commit; #---------------------------------------------------------------------------- # Tests diff --git a/t/Asset/File/GalleryFile/Photo/view.t b/t/Asset/File/GalleryFile/Photo/view.t index fc400dd6e..fd1367e91 100644 --- a/t/Asset/File/GalleryFile/Photo/view.t +++ b/t/Asset/File/GalleryFile/Photo/view.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -10,13 +10,12 @@ # The goal of this test is to test the view and getTemplateVars methods -use FindBin; use strict; -use lib "$FindBin::Bin/../../../../lib"; use WebGUI::Test; use WebGUI::HTML; use WebGUI::Session; +use WebGUI::VersionTag; use Test::More; use Test::Deep; use WebGUI::Asset::File::GalleryFile::Photo; @@ -25,65 +24,47 @@ use WebGUI::Asset::File::GalleryFile::Photo; # Init my $session = WebGUI::Test->session; my $user = WebGUI::User->new( $session, 3 ); -my $node = WebGUI::Asset->getImportNode($session); -my $versionTag = WebGUI::VersionTag->getWorking($session); -$versionTag->set({name=>"Photo Test"}); -addToCleanup($versionTag); +my $tag = WebGUI::VersionTag->getWorking($session); my $gallery - = $node->addChild({ + = WebGUI::Test->asset( className => "WebGUI::Asset::Wobject::Gallery", groupIdAddComment => 7, # Everyone groupIdAddFile => 2, # Registered Users - }); + ); my $album = $gallery->addChild({ className => "WebGUI::Asset::Wobject::GalleryAlbum", - }, - undef, - undef, - { - skipAutoCommitWorkflows => 1, }); my $previousPhoto = $album->addChild({ className => "WebGUI::Asset::File::GalleryFile::Photo", ownerUserId => $user->getId, - }, - undef, - undef, - { - skipAutoCommitWorkflows => 1, }); my $photo = $album->addChild({ className => "WebGUI::Asset::File::GalleryFile::Photo", ownerUserId => $user->getId, - }, - undef, - undef, - { - skipAutoCommitWorkflows => 1, }); my $nextPhoto = $album->addChild({ className => "WebGUI::Asset::File::GalleryFile::Photo", ownerUserId => $user->getId, - }, - undef, - undef, - { - skipAutoCommitWorkflows => 1, }); -$versionTag->commit; $photo->setFile( WebGUI::Test->getTestCollateralPath('page_title.jpg') ); +$tag->commit; +WebGUI::Test->addToCleanup($tag); +foreach my $asset ($gallery, $album, $previousPhoto, $photo, $nextPhoto) { + $asset = $asset->cloneFromDb; +} + #---------------------------------------------------------------------------- # Tests plan tests => 1; @@ -118,7 +99,7 @@ my $testTemplateVars = { thumbnailUrl => $photo->getThumbnailUrl, numberOfComments => scalar @{ $photo->getCommentIds }, exifLoop => ignore(), # Tested elsewhere - isPending => ( $photo->get("status") eq "pending" ), + isPending => ( $photo->status eq "pending" ), firstFile_url => $previousPhoto->getUrl, firstFile_thumbnailUrl => $previousPhoto->getThumbnailUrl, diff --git a/t/Asset/File/Image.t b/t/Asset/File/Image.t index 25802588d..5c568b187 100644 --- a/t/Asset/File/Image.t +++ b/t/Asset/File/Image.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use Test::MockObject; use Test::MockObject::Extends; @@ -22,6 +20,7 @@ BEGIN { } use WebGUI::Test; +use WebGUI::Test::MockAsset; use WebGUI::Session; use WebGUI::Image; use WebGUI::Storage; @@ -41,7 +40,7 @@ $rectangle->setBackgroundColor('#0000FF'); ##Create a storage location my $storage = WebGUI::Storage->create($session); -addToCleanup($storage); +WebGUI::Test->addToCleanup($storage); ##Save the image to the location $rectangle->saveToStorageLocation($storage, 'blue.png'); @@ -54,46 +53,43 @@ cmp_bag($storage->getFiles, ['blue.png'], 'Only 1 file in storage with correct n ##Initialize an Image Asset with that filename and storage location $session->user({userId=>3}); -my $versionTag = WebGUI::VersionTag->getWorking($session); -$versionTag->set({name=>"Image Asset test"}); my $properties = { - # '1234567890123456789012' - id => 'ImageAssetTest00000001', - title => 'Image Asset Test', + # '1234567890123456789012' + id => 'ImageAssetTest00000001', + title => 'Image Asset Test', className => 'WebGUI::Asset::File::Image', - url => 'image-asset-test', + url => 'image-asset-test', }; -my $defaultAsset = WebGUI::Asset->getDefault($session); +my $defaultAsset = WebGUI::Test->asset(); my $asset = $defaultAsset->addChild($properties, $properties->{id}); ok($asset->getStorageLocation, 'Image Asset getStorageLocation initialized'); -ok($asset->get('storageId'), 'getStorageLocation updates Image asset object with storage location'); -is($asset->get('storageId'), $asset->getStorageLocation->getId, 'Image Asset storageId and cached storageId agree'); +ok($asset->storageId, 'getStorageLocation updates Image asset object with storage location'); +is($asset->storageId, $asset->getStorageLocation->getId, 'Image Asset storageId and cached storageId agree'); $asset->update({ storageId => $storage->getId, filename => 'blue.png', }); -is($storage->getId, $asset->get('storageId'), 'Asset updated with correct new storageId'); +is($storage->getId, $asset->storageId, 'Asset updated with correct new storageId'); is($storage->getId, $asset->getStorageLocation->getId, 'Cached Asset storage location updated with correct new storageId'); -my $filename = $asset->getStorageLocation->getPath . "/" . $asset->get("filename"); - -$asset->getStorageLocation->rotate($asset->get("filename"), 90); -my $im = Image::Magick->new; -$im->Read( $filename ); -is( $im->Get('width'), "200", "image width rotated 90" ); -is( $im->Get('height'), "100", "image height rotated 90" ); +my $filename = $asset->getStorageLocation->getPath . "/" . $asset->filename; my @stat_before = stat($filename); -$asset->getStorageLocation->resize($asset->get("filename"), 200, 300); +ok($asset->getStorageLocation->rotate($asset->filename, 90), 'rotate worked'); +my @stat_after = stat($filename); +is(isnt_array(\@stat_before, \@stat_after), 1, 'Image is different after rotation'); + +@stat_before = stat($filename); +$asset->getStorageLocation->resize($asset->filename, 200, 300); my @stat_after = stat($filename); is(isnt_array(\@stat_before, \@stat_after), 1, 'Image is different after resize'); @stat_before = stat($filename); -$asset->getStorageLocation->crop($asset->get("filename"), 100, 125, 10, 25); -@stat_after = stat($filename); +$asset->getStorageLocation->crop($asset->filename, 100, 125, 10, 25); +my @stat_after = stat($filename); is(isnt_array(\@stat_before, \@stat_after), 1, 'Image is different after crop'); my $sth = $session->db->read('describe ImageAsset annotations'); @@ -101,31 +97,28 @@ isnt($sth->hashRef, undef, 'Annotations column is defined'); #------------------------------------------------------------------------------ # Template variables +{ + my $templateId = 'FILE_IMAGE_TEMPLATE___'; -my $templateMock = Test::MockObject->new({}); -$templateMock->set_isa('WebGUI::Asset::Template'); -$templateMock->set_always('getId', $templateId); +my $templateMock = WebGUI::Test::MockAsset->new('WebGUI::Asset::Template'); +$templateMock->mock_id($templateId); $templateMock->set_true('prepare'); my $templateVars; -$templateMock->mock('process', sub { $templateVars = $_[1]; } ); +$templateMock->mock('process', sub { $templateVars = $_[1]; return ''; } ); $asset->update({ parameters => 'alt="alternate"', templateId => $templateId, }); -{ - WebGUI::Test->mockAssetId($templateId, $templateMock); $asset->prepareView(); $asset->view(); like($templateVars->{parameters}, qr{ id="[^"]{22}"}, 'id in parameters is quoted'); like($templateVars->{parameters}, qr{alt="alternate"}, 'original parameters included'); - WebGUI::Test->unmockAssetId($templateId); } -$versionTag->commit; -addToCleanup($versionTag); +done_testing(); sub isnt_array { my ($a, $b) = @_; diff --git a/t/Asset/File/Image/setfile.t b/t/Asset/File/Image/setfile.t index 0d7735294..c411078f4 100644 --- a/t/Asset/File/Image/setfile.t +++ b/t/Asset/File/Image/setfile.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../../../lib"; ## The goal of this test is to test the additional functionality of the # overridden setFile method @@ -23,15 +21,10 @@ use WebGUI::Asset::File::Image; #---------------------------------------------------------------------------- # Init my $session = WebGUI::Test->session; -my $node = WebGUI::Asset->getImportNode($session); -my $versionTag = WebGUI::VersionTag->getWorking($session); -WebGUI::Test->addToCleanup($versionTag); -$versionTag->set({name=>"Image Test"}); my $image - = $node->addChild({ + = WebGUI::Test->asset( className => "WebGUI::Asset::File::Image", - }); -$versionTag->commit; + ); #---------------------------------------------------------------------------- # Tests diff --git a/t/Asset/File/ZipArchive.t b/t/Asset/File/ZipArchive.t index 814931d41..531251163 100644 --- a/t/Asset/File/ZipArchive.t +++ b/t/Asset/File/ZipArchive.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use WebGUI::Test; diff --git a/t/Asset/File/setfile.t b/t/Asset/File/setfile.t index e161ae81a..98b596119 100644 --- a/t/Asset/File/setfile.t +++ b/t/Asset/File/setfile.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; ## The goal of this test is to test the creation and deletion of photo assets @@ -22,15 +20,10 @@ use WebGUI::Asset::File; #---------------------------------------------------------------------------- # Init my $session = WebGUI::Test->session; -my $node = WebGUI::Asset->getImportNode($session); -my $versionTag = WebGUI::VersionTag->getWorking($session); -$versionTag->set({name=>"File Test"}); my $file - = $node->addChild({ + = WebGUI::Test->asset( className => "WebGUI::Asset::File", - }); -$versionTag->commit; -WebGUI::Test->addToCleanup($versionTag); + ); #---------------------------------------------------------------------------- # Tests @@ -47,11 +40,12 @@ ok( #---------------------------------------------------------------------------- # setFile allows file path argument and adds the file # plan tests => 1 -$file->setFile( WebGUI::Test->getTestCollateralPath("WebGUI.pm") ); +$file->setFile( WebGUI::Test->getTestCollateralPath("International/lib/WebGUI/i18n/PigLatin/WebGUI.pm") ); my $storage = $file->getStorageLocation; is_deeply( $storage->getFiles, ['WebGUI_pm.txt'], "Storage location contains only the file we added, name was changed to prevent uploading of code", ); + #vim:ft=perl diff --git a/t/Asset/JSONCollateral.t b/t/Asset/JSONCollateral.t index 013debaf0..7a459d013 100644 --- a/t/Asset/JSONCollateral.t +++ b/t/Asset/JSONCollateral.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; ################################################################ # @@ -46,16 +44,15 @@ create table jsonCollateralDummy ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1; EOSQL +WebGUI::Test->addToCleanup(SQL => 'drop table jsonCollateralDummy'); + plan tests => 40; -my $asset = WebGUI::Asset->getDefault($session)->addChild({ +my $asset = WebGUI::Test->asset->addChild({ className => 'WebGUI::Asset::JSONCollateralDummy', title => 'JSON Collateral Test Asset', }); -my $tag = WebGUI::VersionTag->getWorking($session); -$tag->commit; - ################################################################ # # Checking Asset serialization @@ -97,7 +94,7 @@ cmp_deeply( # ################################################################ -my $assetClone = WebGUI::Asset->new($session, $asset->getId, 'WebGUI::Asset::JSONCollateralDummy'); +my $assetClone = $asset->cloneFromDb; cmp_deeply( $assetClone->get('jsonField'), @@ -344,13 +341,3 @@ cmp_deeply( '...collateral was removed' ); -note $asset->getId; - - -$tag->rollback; -$asset->purge; - -$session->db->write(<<EOSQL); -drop table jsonCollateralDummy -EOSQL - diff --git a/t/Asset/MapPoint.t b/t/Asset/MapPoint.t index 8b81df533..b2f56b92b 100644 --- a/t/Asset/MapPoint.t +++ b/t/Asset/MapPoint.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -28,11 +28,7 @@ my $session = WebGUI::Test->session; $session->user({ userId => 3 }); # Do our work in the import node -my $node = WebGUI::Asset->getImportNode($session); - -# Grab a named version tag -my $versionTag = WebGUI::VersionTag->getWorking($session); -$versionTag->set({name=>"Map setup"}); +my $node = WebGUI::Test->asset; # Create a map my $map = $node->addChild({ @@ -42,10 +38,6 @@ my $map = $node->addChild({ workflowIdPoint => "pbworkflow000000000003", }); -#Commit the map before creating the map point -$versionTag->commit(); -WebGUI::Test->addToCleanup($versionTag); - # Create a map point my $test_point = { website => 'http://www.plainblack.com', diff --git a/t/Asset/MatrixListing.t b/t/Asset/MatrixListing.t index dd4dd75c2..5779d3c76 100644 --- a/t/Asset/MatrixListing.t +++ b/t/Asset/MatrixListing.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,39 +8,78 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; ##The goal of this test is to test the creation of a MatrixListing Asset. use WebGUI::Test; use WebGUI::Session; -use Test::More tests => 2; # increment this value for each test you create +use Test::More tests => 14; # increment this value for each test you create +use Test::Deep; use WebGUI::Asset::Wobject::Matrix; use WebGUI::Asset::MatrixListing; my $session = WebGUI::Test->session; -my $node = WebGUI::Asset->getImportNode($session); +$session->user({ userId => 3 }); my ($matrix, $matrixListing); +$matrix = WebGUI::Test->asset( + className => 'WebGUI::Asset::Wobject::Matrix', + categories => "One\nTwo\nThree", + groupIdEdit => '3', +); -my $versionTag = WebGUI::VersionTag->getWorking($session); -WebGUI::Test->addToCleanup($versionTag); -$versionTag->set({name=>"Matrix Listing Test"}); - -$matrix = $node->addChild({className=>'WebGUI::Asset::Wobject::Matrix'}); -$versionTag->commit; +# Can't set attributeId here or new attributes won't get added +my $styleId = $matrix->editAttributeSave( { + assetId => $matrix->getId, + category => "One", + name => "Style", + fieldType => "textarea", +} ); +my $colorId = $matrix->editAttributeSave( { + assetId => $matrix->getId, + category => "One", + name => "Color", + fieldType => "text", +} ); +my $shapeId = $matrix->editAttributeSave( { + assetId => $matrix->getId, + category => "Two", + name => "Shape", + fieldType => "selectBox", + options => "square\ncircle\noval\ntriangle", +} ); +my $sheepId = $matrix->editAttributeSave( { + assetId => $matrix->getId, + category => "Three", + name => "Sheep", + fieldType => "yesNo", +} ); $matrixListing = $matrix->addChild({className=>'WebGUI::Asset::MatrixListing'}); -# Wikis create and autocommit a version tag when a child is added. Lets get the name so we can roll it back. -my $secondVersionTag = WebGUI::VersionTag->new($session,$matrixListing->get("tagId")); -WebGUI::Test->addToCleanup($secondVersionTag); - # Test for sane object types isa_ok($matrix, 'WebGUI::Asset::Wobject::Matrix'); isa_ok($matrixListing, 'WebGUI::Asset::MatrixListing'); +# Test for proper edit form +my $fb = $matrixListing->getEditForm; + +my ( $fieldset, $field ); +ok( $fieldset = $fb->getFieldset( "One" ), "getEditForm has fieldset for One category" ); +ok( $field = $fieldset->getField( "attribute_$styleId" ), "fieldset has field for style" ); +isa_ok( $field, 'WebGUI::Form::Textarea' ); +ok( $field = $fieldset->getField( "attribute_$colorId" ), "fieldset has field for color" ); +isa_ok( $field, 'WebGUI::Form::Text' ); + +ok( $fieldset = $fb->getFieldset( "Two" ), "getEditForm has fieldset for Two category" ); +ok( $field = $fieldset->getField( "attribute_$shapeId" ), "fieldset has field for shape" ); +isa_ok( $field, 'WebGUI::Form::SelectBox' ); +is( $field->get('options'), join("\n", "square", "circle", "oval", "triangle" ), "correct select options" ); + +ok( $fieldset = $fb->getFieldset( "Three" ), "getEditForm has fieldset for Three category" ); +ok( $field = $fieldset->getField( "attribute_$sheepId" ), 'fieldset has field for sheep' ); +isa_ok( $field, 'WebGUI::Form::YesNo' ); + # Try to add content under a MatrixListing asset #my $article = $matrixListing->addChild({className=>'WebGUI::Asset::Wobject::Article'}); #is($article, undef, "Can't add an Article wobject as a child to a Matrix Listing."); diff --git a/t/Asset/Post.t b/t/Asset/Post.t index 9a13c6b8f..1dee6c730 100644 --- a/t/Asset/Post.t +++ b/t/Asset/Post.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -14,9 +14,7 @@ # 2. The tests for the features I've implemented; namely, functionality and # general access controls on who can edit a post. -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; use Test::More tests => 20; # increment this value for each test you create @@ -33,15 +31,11 @@ my $session = WebGUI::Test->session; my $node = WebGUI::Asset->getImportNode($session); # Grab a named version tag -my $versionTag = WebGUI::VersionTag->getWorking($session); -$versionTag->set({name=>"Collab setup"}); # Need to create a Collaboration system in which the post lives. my @addArgs = ( undef, undef, { skipAutoCommitWorkflows => 1, skipNotification => 1 } ); -my $collab = $node->addChild({className => 'WebGUI::Asset::Wobject::Collaboration', editTimeout => '1'}, @addArgs); - -# The Collaboration system must be committed before a post can be made. +my $collab = WebGUI::Test->asset->addChild({className => 'WebGUI::Asset::Wobject::Collaboration', editTimeout => '1'}, @addArgs); # Need to do $post->canEdit tests, which test group membership. Therefore, # create three users and a group for the process. One user will be doing the @@ -83,9 +77,6 @@ my $props = { my $post = $collab->addChild($props, @addArgs); -$versionTag->commit(); -WebGUI::Test->addToCleanup($versionTag); - # Test for a sane object type isa_ok($post, 'WebGUI::Asset::Post::Thread'); @@ -98,7 +89,6 @@ isa_ok($post, 'WebGUI::Asset::Post::Thread'); # so for the test that's supposed to pass (for $otherUser, who's in # $groupToEditPost), we need to change the session user a second time. The same # applies for $groupIdEditUser, for a total of three user changes. -sleep 1; ok(!$post->canEdit(), "Posting user can't edit after editTime has passed"); @@ -122,7 +112,7 @@ $post->update({synopsis => $synopsis}); ##There is a bug in DBD::mysql with not properly encoding 8-bit characters. Also, HTML::Entities produces ##8-bit utf8 (not strict) characters. So we write a quick test to make sure our patch in splitTag works correctly. -my $dbPost = WebGUI::Asset->newByDynamicClass($session, $post->getId); +my $dbPost = WebGUI::Asset->newById($session, $post->getId); like($dbPost->get('synopsis'), qr/Brandhei.e Neuigkeiten rund um's Klettern f.r euch aus der Region /, 'patch test for DBD::Mysql and HTML::Entities'); ($synopsis, $content) = $post->getSynopsisAndContent('', q|less than < greater than >|); @@ -137,7 +127,6 @@ is($synopsis, q|less than < greater than >|, '... HTML entities decoded by HTML: # ###################################################################### -my $versionTag2 = WebGUI::VersionTag->getWorking($session); my $post1 = $collab->addChild({ className => 'WebGUI::Asset::Post::Thread', content => 'hello, world!', @@ -148,8 +137,6 @@ my $post2 = $collab->addChild({ content => 'hello, world!', ownerUserId => 1, }, @addArgs); -$versionTag2->commit(); -WebGUI::Test->addToCleanup($versionTag); my $variables; $session->user({userId => 1}); $variables = $post1->getTemplateVars(); diff --git a/t/Asset/Post/Thread.t b/t/Asset/Post/Thread.t index 4e07ae6c9..6d0274c0e 100644 --- a/t/Asset/Post/Thread.t +++ b/t/Asset/Post/Thread.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use WebGUI::Test; use WebGUI::Session; use Test::More tests => 17; # increment this value for each test you create @@ -27,10 +25,10 @@ my $node = WebGUI::Asset->getImportNode($session); # Grab a named version tag my $versionTag = WebGUI::VersionTag->getWorking($session); $versionTag->set({name=>"Collab setup"}); -addToCleanup($versionTag); +WebGUI::Test->addToCleanup($versionTag); # Need to create a Collaboration system in which the post lives. -my @addArgs = ( undef, undef, { skipAutoCommitWorkflows => 1, skipNotification => 1 } ); +my @addArgs = ( undef, undef, { skipNotification => 1, skipAutoCommitWorkflows => 1 } ); my $collab = $node->addChild({ className => 'WebGUI::Asset::Wobject::Collaboration', editTimeout => '1', @@ -47,23 +45,18 @@ my $props = { }; my $thread = $collab->addChild($props, @addArgs); +$thread->setSkipNotification; $versionTag->commit(); +$collab = $collab->cloneFromDb; +$thread = $thread->cloneFromDb; my $uncommittedThread = $collab->addChild($props, @addArgs); +$uncommittedThread->setSkipNotification; # Test for a sane object type isa_ok($thread, 'WebGUI::Asset::Post::Thread'); -my $env = $session->env; -$env = Test::MockObject::Extends->new($env); - -my %mockEnv = ( - REMOTE_ADDR => '192.168.0.2', -); - -$env->mock('get', sub { return $mockEnv{$_[1]}}); - $session->user({userId => 3}); $thread->rate(1); $thread->trash; @@ -80,12 +73,18 @@ $collab->update({threadsPerPage => 3, postsPerPage => 10,}); note 'getCSLinkUrl'; my @newThreads; my $threadCount = 15; +my $versionTag2 = WebGUI::VersionTag->getWorking($session); +WebGUI::Test->addToCleanup( $versionTag2 ); while ($threadCount--) { push @newThreads, $collab->addChild($props, @addArgs); } -my $versionTag2 = WebGUI::VersionTag->getWorking($session); +$_->setSkipNotification for @newThreads; $versionTag2->commit; +foreach my $asset (@newThreads) { + $asset = $asset->cloneFromDb; +} + my $csUrl = $collab->get('url'); like $newThreads[-1]->getCSLinkUrl, qr/^$csUrl/, 'getCsLinkUrl returns URL of the parent CS with no gateway'; like $newThreads[-1]->getCSLinkUrl, qr/\?pn=1/, '... and has the right page number'; diff --git a/t/Asset/Post/Thread/bug_12142_duplicate.t b/t/Asset/Post/Thread/bug_12142_duplicate.t index cf0cde0ad..655f48534 100644 --- a/t/Asset/Post/Thread/bug_12142_duplicate.t +++ b/t/Asset/Post/Thread/bug_12142_duplicate.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -29,7 +29,8 @@ use WebGUI::Test; use WebGUI::Asset; my $session = WebGUI::Test->session; -my $thread = WebGUI::Asset->getImportNode($session)->addChild( +my $collab = WebGUI::Test->asset( className => 'WebGUI::Asset::Wobject::Collaboration' ); +my $thread = $collab->addChild( { className => 'WebGUI::Asset::Post::Thread', subscriptionGroupId => $session->id->generate(), diff --git a/t/Asset/Post/Thread/bug_12206_bad_subscription_groups_in_duplicate.t b/t/Asset/Post/Thread/bug_12206_bad_subscription_groups_in_duplicate.t index c2bd5390b..883c72746 100644 --- a/t/Asset/Post/Thread/bug_12206_bad_subscription_groups_in_duplicate.t +++ b/t/Asset/Post/Thread/bug_12206_bad_subscription_groups_in_duplicate.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -31,12 +31,17 @@ use WebGUI::Test; use WebGUI::Asset; my $session = WebGUI::Test->session; -my $thread = WebGUI::Asset->getImportNode($session)->addChild( +my $cs = WebGUI::Asset->getImportNode($session)->addChild( + { + className => 'WebGUI::Asset::Wobject::Collaboration', + } +); +my $thread = $cs->addChild( { className => 'WebGUI::Asset::Post::Thread', } ); -WebGUI::Test->addToCleanup($thread); +WebGUI::Test->addToCleanup($cs); $thread->createSubscriptionGroup(); my $admin = WebGUI::User->new($session, 3); ok !$admin->isInGroup($thread->get('subscriptionGroupId')); diff --git a/t/Asset/Post/Thread/getAdjacentThread.t b/t/Asset/Post/Thread/getAdjacentThread.t index a38f71fc4..2f306e47b 100644 --- a/t/Asset/Post/Thread/getAdjacentThread.t +++ b/t/Asset/Post/Thread/getAdjacentThread.t @@ -1,7 +1,7 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -14,9 +14,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../../../lib"; use Test::More; use WebGUI::Test; # Must use this before any other WebGUI modules use WebGUI::Session; @@ -27,10 +25,10 @@ my $session = WebGUI::Test->session; my @versionTags = ( WebGUI::VersionTag->getWorking( $session ) ); my @addChildArgs = ( {skipAutoCommitWorkflows=>1} ); -my $collab = WebGUI::Asset->getImportNode( $session )->addChild({ +my $collab = WebGUI::Test->asset( className => 'WebGUI::Asset::Wobject::Collaboration', threadsPerPage => 20, -}); +); my @threads = ( $collab->addChild( { @@ -60,8 +58,6 @@ my @threads = ( ); $_->setSkipNotification for @threads; -$versionTags[-1]->commit; -WebGUI::Test->addToCleanup($versionTags[-1]); #---------------------------------------------------------------------------- # Tests @@ -157,10 +153,10 @@ $session->scratch->delete($collab->getId.'_sortDir'); # @threads = all the threads sub testGetAdjacentThread { my ( $label, $sort, $order, @threads ) = @_; - + my $idxFirst = shift @{$order}; my $idxLast = pop @{$order}; - + # First is( $threads[$idxFirst]->getNextThread->getId, getNextThread( $sort, $threads[$idxFirst], @threads )->getId, @@ -216,7 +212,7 @@ sub sortThreads { sub getNextThread { my ( $sortSub, $thread, @threads ) = @_; my @sorted = @{ sortThreads( $sortSub, @threads ) }; - + for my $i ( 0..$#sorted ) { if ( $sorted[$i]->getId eq $thread->getId ) { return $sorted[$i+1]; @@ -228,7 +224,7 @@ sub getPreviousThread { my ( $sortSub, $thread, @threads ) = @_; # Use reverse so that $i-1 != -1 (which gets us the last thread) my @sorted = reverse @{ sortThreads( $sortSub, @threads ) }; - + for my $i ( 0..$#sorted ) { if ( $sorted[$i]->getId eq $thread->getId ) { return $sorted[$i+1]; diff --git a/t/Asset/Post/Thread/permission.t b/t/Asset/Post/Thread/permission.t index 02448c13a..f862e8ed2 100644 --- a/t/Asset/Post/Thread/permission.t +++ b/t/Asset/Post/Thread/permission.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../../../lib"; use Test::More; use WebGUI::Test; # Must use this before any other WebGUI modules use WebGUI::Session; @@ -26,7 +24,7 @@ use WebGUI::Test::Maker::Permission; my $session = WebGUI::Test->session; $session->user( { userId => 3 } ); my $maker = WebGUI::Test::Maker::Permission->new; -my $node = WebGUI::Asset->getImportNode( $session ); +my $node = WebGUI::Test->asset(); my %user; $user{"2"} = WebGUI::User->new( $session, "new" ); @@ -58,12 +56,13 @@ my $thread ownerUserId => $user{"2"}->userId, groupIdView => 7, }, @addArgs ); +$thread->setSkipNotification; $versionTag->commit( { timeout => 1_000_000 } ); # Re-load the collab to get the newly committed properties -$collab = WebGUI::Asset->newByDynamicClass( $session, $collab->getId ); -$thread = WebGUI::Asset->newByDynamicClass( $session, $thread->getId ); +$collab = WebGUI::Asset->newById( $session, $collab->getId ); +$thread = WebGUI::Asset->newById( $session, $thread->getId ); #---------------------------------------------------------------------------- # Tests @@ -104,7 +103,7 @@ $maker->prepare( { # Reply with allowReplies = 0 $collab->update({ allowReplies => 0 }); -$thread = WebGUI::Asset->newByDynamicClass( $session, $thread->getId ); +$thread = WebGUI::Asset->newById( $session, $thread->getId ); $maker->prepare( { object => $thread, method => 'canReply', diff --git a/t/Asset/Post/archiving.t b/t/Asset/Post/archiving.t index 327c70c27..25185be68 100644 --- a/t/Asset/Post/archiving.t +++ b/t/Asset/Post/archiving.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -11,9 +11,7 @@ ## Test that archiving a post works, and checking side effects like updating ## lastPost information in the Thread, and CS. -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use WebGUI::Test; use WebGUI::Session; use Test::More tests => 13; # increment this value for each test you create @@ -31,9 +29,9 @@ my $versionTag = WebGUI::VersionTag->getWorking($session); $versionTag->set({name=>"Collab setup"}); # Need to create a Collaboration system in which the post lives. -my @addArgs = ( undef, undef, { skipAutoCommitWorkflows => 1, skipNotification => 1 } ); +my $addArgs = { skipAutoCommitWorkflows => 1, skipNotification => 1 }; -my $collab = $node->addChild({className => 'WebGUI::Asset::Wobject::Collaboration'}, @addArgs); +my $collab = $node->addChild({className => 'WebGUI::Asset::Wobject::Collaboration', }); # finally, add posts and threads to the collaboration system @@ -41,30 +39,34 @@ my $first_thread = $collab->addChild( { className => 'WebGUI::Asset::Post::Thread', }, undef, WebGUI::Test->webguiBirthday, - { skipAutoCommitWorkflows => 1, skipNotification => 1 } + $addArgs, ); +$first_thread->setSkipNotification; my $second_thread = $collab->addChild( { className => 'WebGUI::Asset::Post::Thread', }, undef, WebGUI::Test->webguiBirthday, - { skipAutoCommitWorkflows => 1, skipNotification => 1 } + $addArgs, ); +$second_thread->setSkipNotification; ##Thread 1, Post 1 => t1p1 my $t1p1 = $first_thread->addChild( { className => 'WebGUI::Asset::Post', }, undef, WebGUI::Test->webguiBirthday, - { skipAutoCommitWorkflows => 1, skipNotification => 1 } + $addArgs, ); +$t1p1->setSkipNotification; my $t1p2 = $first_thread->addChild( { className => 'WebGUI::Asset::Post', }, undef, WebGUI::Test->webguiBirthday + 1, - { skipAutoCommitWorkflows => 1, skipNotification => 1 } + $addArgs ); +$t1p2->setSkipNotification; my $past = time()-15; @@ -72,15 +74,16 @@ my $t2p1 = $second_thread->addChild( { className => 'WebGUI::Asset::Post', }, undef, $past, - { skipAutoCommitWorkflows => 1, skipNotification => 1 } + $addArgs, ); +$t2p1->setSkipNotification; my $t2p2 = $second_thread->addChild( { className => 'WebGUI::Asset::Post', }, - undef, - undef, - { skipAutoCommitWorkflows => 1, skipNotification => 1 } + undef, undef, + $addArgs, ); +$t2p2->setSkipNotification; $versionTag->commit(); WebGUI::Test->addToCleanup($versionTag); @@ -91,29 +94,29 @@ foreach my $asset ($collab, $t1p1, $t1p2, $t2p1, $t2p2, $first_thread, $second_t is $collab->getChildCount, 2, 'collab has correct number of children'; -is $collab->get('lastPostId'), $t2p2->getId, 'lastPostId set in collab'; -is $collab->get('lastPostDate'), $t2p2->get('creationDate'), 'lastPostDate, too'; +is $collab->lastPostId, $t2p2->getId, 'lastPostId set in collab'; +is $collab->lastPostDate, $t2p2->creationDate, 'lastPostDate, too'; $t2p2->setStatusArchived; -is $t2p2->get('status'), 'archived', 'setStatusArchived set the post to be archived'; +is $t2p2->status, 'archived', 'setStatusArchived set the post to be archived'; $second_thread = $second_thread->cloneFromDb; -is $second_thread->get('lastPostId'), $t2p1->getId, '.. updated lastPostId in the thread'; -is $second_thread->get('lastPostDate'), $t2p1->get('creationDate'), '... lastPostDate, too'; +is $second_thread->lastPostId, $t2p1->getId, '.. updated lastPostId in the thread'; +is $second_thread->lastPostDate, $t2p1->creationDate, '... lastPostDate, too'; $collab = $collab->cloneFromDb; -is $collab->get('lastPostId'), $t2p1->getId, '.. updated lastPostId in the CS'; -is $collab->get('lastPostDate'), $t2p1->get('creationDate'), '... lastPostDate, too'; +is $collab->lastPostId, $t2p1->getId, '.. updated lastPostId in the CS'; +is $collab->lastPostDate, $t2p1->creationDate, '... lastPostDate, too'; $t2p2->setStatusUnarchived; -is $t2p2->get('status'), 'approved', 'setStatusUnarchived sets the post back to approved'; +is $t2p2->status, 'approved', 'setStatusUnarchived sets the post back to approved'; $second_thread = $second_thread->cloneFromDb; -is $second_thread->get('lastPostId'), $t2p2->getId, '.. updated lastPostId in the thread'; -is $second_thread->get('lastPostDate'), $t2p2->get('creationDate'), '... lastPostDate, too'; +is $second_thread->lastPostId, $t2p2->getId, '.. updated lastPostId in the thread'; +is $second_thread->lastPostDate, $t2p2->creationDate, '... lastPostDate, too'; $collab = $collab->cloneFromDb; -is $collab->get('lastPostId'), $t2p2->getId, '.. updated lastPostId in the CS'; -is $collab->get('lastPostDate'), $t2p2->get('creationDate'), '... lastPostDate, too'; +is $collab->lastPostId, $t2p2->getId, '.. updated lastPostId in the CS'; +is $collab->lastPostDate, $t2p2->creationDate, '... lastPostDate, too'; #vim:ft=perl diff --git a/t/Asset/Post/committing.t b/t/Asset/Post/committing.t new file mode 100644 index 000000000..ae0213e3f --- /dev/null +++ b/t/Asset/Post/committing.t @@ -0,0 +1,72 @@ +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 +#------------------------------------------------------------------- + +## Test that committing a post works, and doesn't affect the parent thread. + +use strict; +use Test::More; +use WebGUI::Test; +use WebGUI::Session; +use WebGUI::Asset::Wobject::Collaboration; +use WebGUI::Asset::Post; +use WebGUI::Asset::Post::Thread; + +my $session = WebGUI::Test->session; + +# Do our work in the import node +my $node = WebGUI::Asset->getImportNode($session); + +# Grab a named version tag +my $versionTag = WebGUI::VersionTag->getWorking($session); +$versionTag->set({name=>"Collab setup"}); +my $addArgs = { skipAutoCommitWorkflows => 1, skipNotification => 1 }; + +my $collab = $node->addChild( + { + className => 'WebGUI::Asset::Wobject::Collaboration', + title => 'Test Collaboration', + }, +); + +# finally, add posts and threads to the collaboration system + +my $first_thread = $collab->addChild( + { + className => 'WebGUI::Asset::Post::Thread', + title => 'Test Thread', + }, + undef, undef, $addArgs, +); +$first_thread->setSkipNotification; + +##Thread 1, Post 1 => t1p1 +my $t1p1 = $first_thread->addChild( + { + className => 'WebGUI::Asset::Post', + title => 'Test Post', + }, + undef, undef, $addArgs, +); +$t1p1->setSkipNotification; + +$versionTag->commit(); +WebGUI::Test->addToCleanup($versionTag); + +foreach my $asset ($collab, $t1p1, $first_thread, ) { + $asset = $asset->cloneFromDb; +} + +is $collab->getChildCount, 1, 'collab has correct number of children'; +is $first_thread->status, 'approved', 'thread is approved'; +is $t1p1->status, 'approved', 'post is approved'; + +done_testing; + +#vim:ft=perl diff --git a/t/Asset/Post/notification.t b/t/Asset/Post/notification.t index c82ce61fc..96cda27f2 100644 --- a/t/Asset/Post/notification.t +++ b/t/Asset/Post/notification.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -11,9 +11,7 @@ ## Test that trashing a post works, and checking side effects like updating ## lastPost information in the Thread, and CS. -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use WebGUI::Test; use WebGUI::Session; use Test::More tests => 12; # increment this value for each test you create @@ -26,30 +24,29 @@ use Encode; my $session = WebGUI::Test->session; -# Do our work in the import node -my $node = WebGUI::Asset->getImportNode($session); - # Grab a named version tag my $versionTag = WebGUI::VersionTag->getWorking($session); $versionTag->set({name=>"Collab setup"}); +WebGUI::Test->addToCleanup($versionTag); # Need to create a Collaboration system in which the post lives. my @addArgs = ( undef, undef, { skipAutoCommitWorkflows => 1, skipNotification => 1 } ); -my $notification_template = $node->addChild({ +my $notification_template = WebGUI::Test->asset( className => 'WebGUI::Asset::Template', template => "<body>!!!url:<tmpl_var url>!!!content:<tmpl_var content>!!!</body>", parser => 'WebGUI::Asset::Template::HTMLTemplate', -}, @addArgs); +); -my $collab = $node->addChild({ +my $collab = WebGUI::Test->asset( className => 'WebGUI::Asset::Wobject::Collaboration', notificationTemplateId => $notification_template->getId, -}, @addArgs); +); # finally, add posts and threads to the collaboration system my $first_thread = $collab->addChild( { className => 'WebGUI::Asset::Post::Thread', }, @addArgs); +$first_thread->setSkipNotification; ##Thread 1, Post 1 => t1p1 my $title = "H\x{00E4}ufige Fragen"; @@ -65,9 +62,9 @@ my $t1p1 = $first_thread->addChild( }, @addArgs ); +$t1p1->setSkipNotification; $versionTag->commit(); -WebGUI::Test->addToCleanup($versionTag); is $t1p1->get('title'), "H\x{00E4}ufige Fragen", "utf8 in title set correctly"; is $t1p1->get('url'), "h\x{00E4}ufige-fragen", "... in url"; diff --git a/t/Asset/Post/permission.t b/t/Asset/Post/permission.t index a896f3eb1..1fe5aa2e1 100644 --- a/t/Asset/Post/permission.t +++ b/t/Asset/Post/permission.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use Test::More; use WebGUI::Test; # Must use this before any other WebGUI modules use WebGUI::Session; @@ -57,19 +55,21 @@ my $thread className => 'WebGUI::Asset::Post::Thread', ownerUserId => $user{"2"}->userId, }, @addArgs ); +$thread->setSkipNotification; my $post = $thread->addChild({ className => 'WebGUI::Asset::Post', ownerUserId => $user{"2"}->userId, }, @addArgs ); +$post->setSkipNotification; $versionTag->commit( { timeout => 1_000_000 } ); # Re-load the collab to get the newly committed properties -$collab = WebGUI::Asset->newByDynamicClass( $session, $collab->getId ); -$thread = WebGUI::Asset->newByDynamicClass( $session, $thread->getId ); -$post = WebGUI::Asset->newByDynamicClass( $session, $post->getId ); +$collab = WebGUI::Asset->newById( $session, $collab->getId ); +$thread = WebGUI::Asset->newById( $session, $thread->getId ); +$post = WebGUI::Asset->newById( $session, $post->getId ); #---------------------------------------------------------------------------- # Tests diff --git a/t/Asset/Post/purging.t b/t/Asset/Post/purging.t index 9e62c7b84..0993772ba 100644 --- a/t/Asset/Post/purging.t +++ b/t/Asset/Post/purging.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/Asset/Post/trashing.t b/t/Asset/Post/trashing.t index f45473a2b..4646daa97 100644 --- a/t/Asset/Post/trashing.t +++ b/t/Asset/Post/trashing.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -11,9 +11,7 @@ ## Test that trashing a post works, and checking side effects like updating ## lastPost information in the Thread, and CS. -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use WebGUI::Test; use WebGUI::Session; use Test::More tests => 13; # increment this value for each test you create @@ -31,9 +29,9 @@ my $versionTag = WebGUI::VersionTag->getWorking($session); $versionTag->set({name=>"Collab setup"}); # Need to create a Collaboration system in which the post lives. -my @addArgs = ( undef, undef, { skipAutoCommitWorkflows => 1, skipNotification => 1 } ); +my $addArgs = { skipAutoCommitWorkflows => 1, skipNotification => 1 }; -my $collab = $node->addChild({className => 'WebGUI::Asset::Wobject::Collaboration'}, @addArgs); +my $collab = $node->addChild({className => 'WebGUI::Asset::Wobject::Collaboration', }, ); # finally, add posts and threads to the collaboration system @@ -41,14 +39,14 @@ my $first_thread = $collab->addChild( { className => 'WebGUI::Asset::Post::Thread', }, undef, WebGUI::Test->webguiBirthday, - { skipAutoCommitWorkflows => 1, skipNotification => 1 } + $addArgs, ); my $second_thread = $collab->addChild( { className => 'WebGUI::Asset::Post::Thread', }, undef, WebGUI::Test->webguiBirthday, - { skipAutoCommitWorkflows => 1, skipNotification => 1 } + $addArgs, ); ##Thread 1, Post 1 => t1p1 @@ -56,14 +54,14 @@ my $t1p1 = $first_thread->addChild( { className => 'WebGUI::Asset::Post', }, undef, WebGUI::Test->webguiBirthday, - { skipAutoCommitWorkflows => 1, skipNotification => 1 } + $addArgs, ); my $t1p2 = $first_thread->addChild( { className => 'WebGUI::Asset::Post', }, undef, WebGUI::Test->webguiBirthday + 1, - { skipAutoCommitWorkflows => 1, skipNotification => 1 } + $addArgs, ); my $past = time()-15; @@ -72,16 +70,19 @@ my $t2p1 = $second_thread->addChild( { className => 'WebGUI::Asset::Post', }, undef, $past, - { skipAutoCommitWorkflows => 1, skipNotification => 1 } + $addArgs, ); my $t2p2 = $second_thread->addChild( { className => 'WebGUI::Asset::Post', }, - undef, - undef, - { skipAutoCommitWorkflows => 1, skipNotification => 1 } + undef, undef, + $addArgs, ); +foreach my $asset ($t1p1, $t1p2, $t2p1, $t2p2, $first_thread, $second_thread, ) { + $asset->setSkipNotification; +} + $versionTag->commit(); WebGUI::Test->addToCleanup($versionTag); diff --git a/t/Asset/Redirect/mech.t b/t/Asset/Redirect/mech.t index 875ed103c..9e3d89f81 100644 --- a/t/Asset/Redirect/mech.t +++ b/t/Asset/Redirect/mech.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,27 +13,17 @@ # asset. # -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use Test::More; use WebGUI::Test; # Must use this before any other WebGUI modules use WebGUI::Asset; use WebGUI::VersionTag; use WebGUI::Session; -plan skip_all => 'set WEBGUI_LIVE to enable this test' unless $ENV{WEBGUI_LIVE}; +use WebGUI::Test::Mechanize; #---------------------------------------------------------------------------- # Init my $session = WebGUI::Test->session; -my $node = WebGUI::Asset->getImportNode( $session ); -my @versionTags = ( WebGUI::VersionTag->getWorking( $session ) ); - -# Override some settings to make things easier to test -# userFunctionStyleId -$session->setting->set( 'userFunctionStyleId', 'PBtmpl0000000000000132' ); -# specialState -$session->setting->set( 'specialState', '' ); # Create a user for testing purposes my $user = WebGUI::User->new( $session, "new" ); @@ -42,7 +32,7 @@ $user->username( 'dufresne' ); my $identifier = 'ritahayworth'; my $auth = WebGUI::Operation::Auth::getInstance( $session, $user->authMethod, $user->userId ); $auth->saveParams( $user->userId, $user->authMethod, { - 'identifier' => Digest::MD5::md5_base64( $identifier ), + 'identifier' => Digest::MD5::md5_base64( $identifier ), }); my ($mech, $redirect, $response); @@ -56,43 +46,39 @@ my $redirectUrl = time . "shawshank"; my $testContent = "Perhaps if you've gone this far, you'd be willing to go further."; my $snippetUrl = time . "zejuatenejo"; my $redirectToUrl = $snippetUrl . "?name=value"; -my $redirectToAsset - = $node->addChild({ - className => 'WebGUI::Asset::Snippet', +my $redirectToAsset + = WebGUI::Test->asset( + className => 'WebGUI::Asset::Snippet', url => $snippetUrl, snippet => $testContent, - }); -$versionTags[-1]->commit; -WebGUI::Test->addToCleanup($versionTags[-1]); + ); +my $tag1 = WebGUI::VersionTag->getWorking($session); +WebGUI::Test->addToCleanup($tag1); +$tag1->commit; +$redirectToAsset = $redirectToAsset->cloneFromDb; + +my $count = time; # A known count for url uniqueness #---------------------------------------------------------------------------- # Tests -if ( !eval { require Test::WWW::Mechanize; 1; } ) { - plan skip_all => 'Cannot load Test::WWW::Mechanize. Will not test.'; -} -$mech = Test::WWW::Mechanize->new; -$mech->get( $baseUrl ); -if ( !$mech->success ) { - plan skip_all => "Cannot load URL '$baseUrl'. Will not test."; -} - -plan tests => 12; # Increment this number for each test you create - #---------------------------------------------------------------------------- # Test operation with a public Redirect -push @versionTags, WebGUI::VersionTag->getWorking( $session ); -WebGUI::Test->addToCleanup($versionTags[-1]); -$redirect - = $node->addChild({ +$redirect + = WebGUI::Test->asset( className => 'WebGUI::Asset::Redirect', redirectUrl => $redirectToUrl, - url => $redirectUrl . scalar(@versionTags), - }); -$versionTags[-1]->commit; + url => $redirectUrl . ++$count, + ); +my $tag2 = WebGUI::VersionTag->getWorking($session); +WebGUI::Test->addToCleanup($tag2); +$tag2->commit; +$redirect = $redirect->cloneFromDb; -$mech = Test::WWW::Mechanize->new; -$mech->get_ok( $baseUrl . $redirectUrl . scalar(@versionTags), "We get the redirect" ); +$mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get_ok('/', 'initialize mech object with session'); +$mech->get_ok($snippetUrl, 'snippet can be fetched'); +$mech->get_ok( $redirectUrl . $count, "We get the redirect" ); $mech->content_contains( $testContent, "We made it to the snippet" ); $response = $mech->res->previous; @@ -105,20 +91,22 @@ is( #---------------------------------------------------------------------------- # Test operation with a private Redirect through a login -push @versionTags, WebGUI::VersionTag->getWorking( $session ); -WebGUI::Test->addToCleanup($versionTags[-1]); $redirect - = $node->addChild({ + = WebGUI::Test->asset( className => 'WebGUI::Asset::Redirect', redirectUrl => $redirectToUrl, - url => $redirectUrl . scalar(@versionTags), + url => $redirectUrl . ++$count, groupIdView => 2, groupIdEdit => 3, - }); -$versionTags[-1]->commit; + ); -$mech = Test::WWW::Mechanize->new; -$mech->get( $baseUrl . $redirectUrl . scalar(@versionTags) ); +my $tag = WebGUI::VersionTag->getWorking($session); +$tag->commit; +WebGUI::Test->addToCleanup($tag); +$redirect = $redirect->cloneFromDb; + +$mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get( $baseUrl . $redirectUrl . $count ); $mech->submit_form_ok( { with_fields => { username => $user->username, @@ -137,24 +125,26 @@ is( #---------------------------------------------------------------------------- -# Test operation with a private Redirect through a login with translate +# Test operation with a private Redirect through a login with translate # query params -push @versionTags, WebGUI::VersionTag->getWorking( $session ); -WebGUI::Test->addToCleanup($versionTags[-1]); $redirect - = $node->addChild({ + = WebGUI::Test->asset( className => 'WebGUI::Asset::Redirect', redirectUrl => $redirectToUrl, - url => $redirectUrl . scalar(@versionTags), + url => $redirectUrl . ++$count, groupIdView => 2, groupIdEdit => 3, forwardQueryParams => 1, - }); -$versionTags[-1]->commit; + ); + +my $tag = WebGUI::VersionTag->getWorking($session); +$tag->commit; +WebGUI::Test->addToCleanup($tag); +$redirect = $redirect->cloneFromDb; my $extraParams = 'extra=hi'; -$mech = Test::WWW::Mechanize->new; -$mech->get( $baseUrl . $redirectUrl . scalar(@versionTags) . '?' . $extraParams ); +$mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get( $baseUrl . $redirectUrl . $count . '?' . $extraParams ); $mech->submit_form_ok( { with_fields => { username => $user->username, @@ -174,4 +164,6 @@ TODO: { ); }; +done_testing; + #vim:ft=perl diff --git a/t/Asset/Shortcut/000-create-delete.t b/t/Asset/Shortcut/000-create-delete.t index 812924793..aab7a2dda 100644 --- a/t/Asset/Shortcut/000-create-delete.t +++ b/t/Asset/Shortcut/000-create-delete.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; ## The goal of this test is to test the creation and deletion of shortcut assets @@ -22,16 +20,12 @@ use WebGUI::Asset::Snippet; #---------------------------------------------------------------------------- # Init my $session = WebGUI::Test->session; -my $node = WebGUI::Asset->getImportNode($session); -my $versionTag = WebGUI::VersionTag->getWorking($session); -$versionTag->set({name=>"Shortcut Test"}); -WebGUI::Test->addToCleanup($versionTag); # Make a snippet to shortcut my $snippet - = $node->addChild({ + = WebGUI::Test->asset( className => "WebGUI::Asset::Snippet", - }); + ); #---------------------------------------------------------------------------- # Tests @@ -46,10 +40,10 @@ use_ok("WebGUI::Asset::Shortcut"); # Test creating a shortcut to snippet # plan tests => 2 my $shortcut - = $node->addChild({ + = WebGUI::Test->asset( className => "WebGUI::Asset::Shortcut", shortcutToAssetId => $snippet->getId, - }); + ); isa_ok( $shortcut, "WebGUI::Asset::Shortcut", diff --git a/t/Asset/Shortcut/010-linked-asset.t b/t/Asset/Shortcut/010-linked-asset.t index a8cea8e14..f426b9e44 100644 --- a/t/Asset/Shortcut/010-linked-asset.t +++ b/t/Asset/Shortcut/010-linked-asset.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; ## The goal of this test is to test the link between the asset and its shortcut # and that changes to the asset are propagated to the shortcut @@ -27,7 +25,6 @@ use Data::Dumper; #---------------------------------------------------------------------------- # Init my $session = WebGUI::Test->session; -my $node = WebGUI::Asset->getImportNode($session); my $snippet; my $shortcut; @@ -56,6 +53,7 @@ is( "Original assetId is correct" ); +my $node = WebGUI::Asset->getImportNode( $session ); cmp_bag( $original->exportGetRelatedAssetIds, [ $shortcut->getId, $node->getId ], @@ -116,7 +114,7 @@ eval { }; is( - $contentLastModified, 0, + $contentLastModified, undef, "Purged Linked Asset: getContentLastModified returns 0 when linked asset missing", ); @@ -130,10 +128,10 @@ init(); $snippet->trash(); $snippet->purge(); -$shortcut = $shortcut->cloneFromDb(); +$shortcut = eval { $shortcut->cloneFromDb(); }; ok( - !defined $shortcut, + Exception::Class->caught(), "Purge Linked Asset: Shortcut is purged even though it's in the trash" ); @@ -143,10 +141,10 @@ init(); #---------------------------------------------------------------------------- # Test purging snippet purges shortcut also $snippet->purge; -$shortcut = $shortcut->cloneFromDb(); +$shortcut = eval { $shortcut->cloneFromDb(); }; ok( - !defined $shortcut, + Exception::Class->caught(), "Purge Linked Asset: Shortcut is not defined", ); @@ -154,18 +152,15 @@ ok( # init a new snippet and shortcut; handy to have in a sub because we destroy # them in some tests and need to reset them for the next round sub init { - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->set({name=>"Shortcut Test"}); - WebGUI::Test->addToCleanup($versionTag); # Make a snippet to shortcut $snippet - = $node->addChild({ + = WebGUI::Test->asset( className => "WebGUI::Asset::Snippet", - }); + ); $shortcut - = $node->addChild({ + = WebGUI::Test->asset( className => "WebGUI::Asset::Shortcut", shortcutToAssetId => $snippet->getId, - }); + ); } diff --git a/t/Asset/Shortcut/020-content-last-modified.t b/t/Asset/Shortcut/020-content-last-modified.t index 3be51bd89..aaf8e9d8b 100644 --- a/t/Asset/Shortcut/020-content-last-modified.t +++ b/t/Asset/Shortcut/020-content-last-modified.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -25,11 +25,8 @@ use WebGUI::Asset::Snippet; #---------------------------------------------------------------------------- # Init my $session = WebGUI::Test->session; -my $node = WebGUI::Asset->getImportNode($session); +my $node = WebGUI::Test->asset; -my $versionTag = WebGUI::VersionTag->getWorking($session); -$versionTag->set({name=>"Shortcut Test"}); -WebGUI::Test->addToCleanup($versionTag); # Make a snippet to shortcut my $now = time(); my $snippet = $node->addChild({ @@ -42,7 +39,6 @@ my $shortcut = $node->addChild({ shortcutToAssetId => $snippet->getId, }, undef, $now-10); -$versionTag->commit; $session->db->write(q|update assetData set lastModified=? where assetId=?|,[WebGUI::Test->webguiBirthday, $snippet->getId]); foreach my $asset ($snippet, $shortcut) { $asset = $asset->cloneFromDb; diff --git a/t/Asset/Shortcut/forms.t b/t/Asset/Shortcut/forms.t new file mode 100644 index 000000000..04bc6e82f --- /dev/null +++ b/t/Asset/Shortcut/forms.t @@ -0,0 +1,106 @@ +# vim:syntax=perl +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 +#------------------------------------------------------------------ + +# Test the getUserPrefsForm, editOverrides form and +# +# + +use FindBin; +use strict; +use lib "$FindBin::Bin/lib"; +use Test::More; +use WebGUI::Test; # Must use this before any other WebGUI modules +use WebGUI::Session; +use WebGUI::Test::Mechanize; + +#---------------------------------------------------------------------------- +# Init +my $session = WebGUI::Test->session; +$session->user({ userId => 3 }); + +my $tag = WebGUI::VersionTag->getWorking($session); +my $page = WebGUI::Test->asset( className => 'WebGUI::Asset::Wobject::Dashboard' ); +my $asset = WebGUI::Test->asset( + className => 'WebGUI::Asset::Wobject::Article', + description => 'Description', +); +my $shortcut = $page->addChild( { + className => 'WebGUI::Asset::Shortcut', + shortcutToAssetId => $asset->getId, + prefFieldsToShow => 'alias', +} ); +WebGUI::Test->addToCleanup($tag); +$tag->commit; +foreach my $object ($page, $asset, $shortcut) { + $object = $object->cloneFromDb; +} +#---------------------------------------------------------------------------- +# Tests + +#---------------------------------------------------------------------------- +# getUserPrefsForm +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get_ok( '/' ); +$mech->session->user({ userId => 3 }); + +$mech->get_ok( $shortcut->getUrl( 'func=getUserPrefsForm' ) ); +$mech->submit_form_ok( { + fields => { alias => "myself" }, +} ); +$mech->session->user->uncache; +my $user = WebGUI::User->new( $session, $mech->session->user->getId ); +is( $user->get('alias'), "myself", "alias gets set" ); + +# Admin is allowed to edit visitor's prefs +$mech->get_ok( $shortcut->getUrl( 'func=getUserPrefsForm;visitor=1' ) ); +$mech->submit_form_ok( { + fields => { alias => "visitor" }, +} ); +isnt( $mech->session->user->get('alias'), "visitor", "admin alias doesn't get set" ); +is( WebGUI::User->new( $mech->session, '1' )->get('alias'), 'visitor', 'visitors alias set' ); + +#---------------------------------------------------------------------------- +# editOverrides + +# form field +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get_ok('/'); +$mech->session->user({ userId => 3 }); + +# Make sure edit form has a link to edit the override +$mech->get_ok( $shortcut->getUrl( 'func=edit' ) ); +$mech->follow_link_ok( + { url_regex => qr/func=editOverride;fieldName=title/ }, + "Follow the link to edit the override", +); +$mech->submit_form_ok( { + fields => { title => "New Title" }, +} ); +$shortcut = WebGUI::Asset->newById( $mech->session, $shortcut->getId ); +my %overrides = $shortcut->getOverrides; +is( $overrides{overrides}{title}{newValue}, "New Title" ); + +# textarea +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get_ok('/'); +$mech->session->user({ userId => 3 }); + +$mech->get_ok( $shortcut->getUrl( 'func=editOverride;fieldName=description' ) ); +$mech->submit_form_ok( { + fields => { newOverrideValueText => "New" }, +} ); +$shortcut = WebGUI::Asset->newById( $mech->session, $shortcut->getId ); +my %overrides = $shortcut->getOverrides; +is( $overrides{overrides}{description}{newValue}, "New" ); + + +done_testing; +#vim:ft=perl diff --git a/t/Asset/Sku.t b/t/Asset/Sku.t index 898191611..f699a6e4a 100644 --- a/t/Asset/Sku.t +++ b/t/Asset/Sku.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # This tests WebGUI::Asset::Sku, which is the base class for commerce items -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use Test::More; use WebGUI::Test; # Must use this before any other WebGUI modules use WebGUI::Session; @@ -30,11 +28,12 @@ my $session = WebGUI::Test->session; #---------------------------------------------------------------------------- # Tests -plan tests => 22; # Increment this number for each test you create +plan tests => 24; # Increment this number for each test you create #---------------------------------------------------------------------------- # put your tests here my $root = WebGUI::Asset->getRoot($session); +note "Make sku\n"; my $sku = $root->addChild({ className=>"WebGUI::Asset::Sku", title=>"Test Sku", @@ -43,6 +42,7 @@ isa_ok($sku, "WebGUI::Asset::Sku"); WebGUI::Test->addToCleanup($sku); $sku->addToCart; +WebGUI::Test->addToCleanup($sku->getCart); $sku->applyOptions({ test1 => "YY" @@ -52,6 +52,7 @@ my $options = $sku->getOptions; is($options->{test1}, "YY", "Can set and get an option."); +is $sku->taxConfiguration, '{}', 'default tax configuration is a string with an empty hashref in it'; is($sku->getMaxAllowedInCart, 99999999, "Got a valid default max in cart."); is($sku->getQuantityAvailable, 99999999, "skus should have an unlimited quantity by default"); is($sku->getQuantityAvailable, $sku->getMaxAllowedInCart, "quantity available and max allowed in cart should be the same"); @@ -65,13 +66,14 @@ is($sku->isRecurring, 0, "skus are not recurring by default"); is($sku->isShippingRequired, 0, "skus are not shippable by default"); is($sku->getConfiguredTitle, $sku->getTitle, "configured title and title should be the same by default"); is($sku->shipsSeparately, 0, 'shipsSeparately return 0 by default'); +is($sku->isShippingSeparately, 0, 'isShippingSeparately return 0 by default'); -$sku->update({shipsSeparately => 1,}); -is($sku->shipsSeparately, 0, 'shipsSeparately only returns true when isShippingRequired AND shipsSeparately'); +$sku->shipsSeparately(1); +is($sku->isShippingSeparately, 0, 'isShippingSeparately only returns true when isShippingRequired AND shipsSeparately'); { local *WebGUI::Asset::Sku::isShippingRequired = sub { return 1}; - is($sku->shipsSeparately, 1, 'shipsSeparately only returns true when isShippingRequired AND shipsSeparately'); + is($sku->isShippingSeparately, 1, 'isShippingSeparately only returns true when isShippingRequired AND shipsSeparately'); } ok(! $sku->isShippingRequired, 'Making sure that GLOB is no longer in effect'); @@ -79,7 +81,6 @@ ok(! $sku->isShippingRequired, 'Making sure that GLOB is no longer in effect'); isa_ok($sku->getCart, "WebGUI::Shop::Cart", "can get a cart object"); my $item = $sku->addToCart; isa_ok($item, "WebGUI::Shop::CartItem", "can add to cart"); -$item->cart->delete; my $loadSku = WebGUI::Asset::Sku->newBySku($session, $sku->get("sku")); is($loadSku->getId, $sku->getId, "newBySku() works."); diff --git a/t/Asset/Sku/Ad.t b/t/Asset/Sku/Ad.t index d6092ba45..365e0b173 100644 --- a/t/Asset/Sku/Ad.t +++ b/t/Asset/Sku/Ad.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # This tests WebGUI::Asset::Sku::Ad -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use Test::More; use Test::Deep; diff --git a/t/Asset/Sku/Donation.t b/t/Asset/Sku/Donation.t index 20c3f0d14..278540d11 100644 --- a/t/Asset/Sku/Donation.t +++ b/t/Asset/Sku/Donation.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # This tests WebGUI::Asset::Sku::Donation -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use Test::More; use WebGUI::Test; # Must use this before any other WebGUI modules use WebGUI::Session; diff --git a/t/Asset/Sku/EMSRibbon.t b/t/Asset/Sku/EMSRibbon.t new file mode 100644 index 000000000..5f4ac890d --- /dev/null +++ b/t/Asset/Sku/EMSRibbon.t @@ -0,0 +1,58 @@ +# vim:syntax=perl +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 +#------------------------------------------------------------------ + +# Test the EMSRibbon asset +# +# + +use FindBin; +use strict; +use lib "$FindBin::Bin/lib"; +use Test::More; +use WebGUI::Test; # Must use this before any other WebGUI modules +use WebGUI::Test::Mechanize; +use WebGUI::Shop::Cart; +use WebGUI::Session; + +#---------------------------------------------------------------------------- +# Init +my $session = WebGUI::Test->session; +my $tag = WebGUI::VersionTag->getWorking($session); +my $ems = WebGUI::Test->asset( className => 'WebGUI::Asset::Wobject::EventManagementSystem' ); +my $badge = $ems->addChild({ + className => 'WebGUI::Asset::Sku::EMSBadge', +}); +my $ribbon = $ems->addChild({ + className => 'WebGUI::Asset::Sku::EMSRibbon', +}); +$tag->commit; +WebGUI::Test->addToCleanup($tag); + +#---------------------------------------------------------------------------- +# Tests + +#---------------------------------------------------------------------------- +# Test the addToCart form +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get_ok( '/' ); +$mech->session->user({ userId => 3 }); +$mech->get_ok( $ribbon->getUrl( 'badgeId=' . $badge->getId ) ); +$mech->submit_form_ok({ + fields => { }, +}); + +my $cart = WebGUI::Shop::Cart->newBySession( $mech->session ); +WebGUI::Test->addToCleanup($cart); +ok( $cart->getItemsByAssetId([ $ribbon->getId ])->[0]->getId, $ribbon->getId ); + + +done_testing; +#vim:ft=perl diff --git a/t/Asset/Sku/EMSTicket.t b/t/Asset/Sku/EMSTicket.t new file mode 100644 index 000000000..b302e710b --- /dev/null +++ b/t/Asset/Sku/EMSTicket.t @@ -0,0 +1,58 @@ +# vim:syntax=perl +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 +#------------------------------------------------------------------ + +# Test the EMSTicket asset +# +# + +use FindBin; +use strict; +use lib "$FindBin::Bin/lib"; +use Test::More; +use WebGUI::Test; # Must use this before any other WebGUI modules +use WebGUI::Test::Mechanize; +use WebGUI::Shop::Cart; +use WebGUI::Session; + +#---------------------------------------------------------------------------- +# Init +my $session = WebGUI::Test->session; +my $tag = WebGUI::VersionTag->getWorking($session); +my $ems = WebGUI::Test->asset( className => 'WebGUI::Asset::Wobject::EventManagementSystem' ); +my $badge = $ems->addChild({ + className => 'WebGUI::Asset::Sku::EMSBadge', +}); +my $ticket = $ems->addChild({ + className => 'WebGUI::Asset::Sku::EMSTicket', +}); +$tag->commit; +WebGUI::Test->addToCleanup($tag); + +#---------------------------------------------------------------------------- +# Tests + +#---------------------------------------------------------------------------- +# Test the addToCart form +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get_ok( '/' ); +$mech->session->user({ userId => 3 }); +$mech->get_ok( $ticket->getUrl( 'badgeId=' . $badge->getId ) ); +$mech->submit_form_ok({ + fields => { }, +}); + +my $cart = WebGUI::Shop::Cart->newBySession( $mech->session ); +WebGUI::Test->addToCleanup($cart); +ok( $cart->getItemsByAssetId([ $ticket->getId ])->[0]->getId, $ticket->getId ); + + +done_testing; +#vim:ft=perl diff --git a/t/Asset/Sku/EMSToken.t b/t/Asset/Sku/EMSToken.t new file mode 100644 index 000000000..cf756d799 --- /dev/null +++ b/t/Asset/Sku/EMSToken.t @@ -0,0 +1,58 @@ +# vim:syntax=perl +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 +#------------------------------------------------------------------ + +# Test the EMSToken asset +# +# + +use FindBin; +use strict; +use lib "$FindBin::Bin/lib"; +use Test::More; +use WebGUI::Test; # Must use this before any other WebGUI modules +use WebGUI::Test::Mechanize; +use WebGUI::Shop::Cart; +use WebGUI::Session; + +#---------------------------------------------------------------------------- +# Init +my $session = WebGUI::Test->session; +my $tag = WebGUI::VersionTag->getWorking($session); +my $ems = WebGUI::Test->asset( className => 'WebGUI::Asset::Wobject::EventManagementSystem' ); +my $badge = $ems->addChild({ + className => 'WebGUI::Asset::Sku::EMSBadge', +}); +my $token = $ems->addChild({ + className => 'WebGUI::Asset::Sku::EMSToken', +}); +$tag->commit; +WebGUI::Test->addToCleanup($tag); + +#---------------------------------------------------------------------------- +# Tests + +#---------------------------------------------------------------------------- +# Test the addToCart form +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get_ok( '/' ); +$mech->session->user({ userId => 3 }); +$mech->get_ok( $token->getUrl( 'badgeId=' . $badge->getId ) ); +$mech->submit_form_ok({ + fields => { }, +}); + +my $cart = WebGUI::Shop::Cart->newBySession( $mech->session ); +WebGUI::Test->addToCleanup($cart); +ok( $cart->getItemsByAssetId([ $token->getId ])->[0]->getId, $token->getId ); + + +done_testing; +#vim:ft=perl diff --git a/t/Asset/Sku/Product.t b/t/Asset/Sku/Product.t index 8bbee56ef..6f1e823c1 100644 --- a/t/Asset/Sku/Product.t +++ b/t/Asset/Sku/Product.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # This tests WebGUI::Asset::Sku::Product -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use Test::More; use Test::Deep; @@ -27,40 +25,51 @@ use WebGUI::Session; use WebGUI::Asset; use WebGUI::Asset::Sku::Product; use WebGUI::Storage; +use WebGUI::Test::Mechanize; use JSON; #---------------------------------------------------------------------------- # Init my $session = WebGUI::Test->session; - -#---------------------------------------------------------------------------- -# Tests - -plan tests => 13; # Increment this number for each test you create - #---------------------------------------------------------------------------- # put your tests here -my $node = WebGUI::Asset->getRoot($session); -my $product = $node->addChild({ +my $tag = WebGUI::VersionTag->getWorking($session); +WebGUI::Test->addToCleanup($tag); + +my $product = WebGUI::Test->asset( className => "WebGUI::Asset::Sku::Product", title => "Rock Hammer", -}); + groupIdEdit => 3, +); +$tag->commit; +$product = $product->cloneFromDb; is($product->getThumbnailUrl(), '', 'Product with no image1 property returns the empty string'); +note "Checking automatically generated deleteFileUrl links"; +foreach my $file_property (qw/image1 image2 image3 brochure manual warranty/) { + my $form_properties = $product->getFormProperties($file_property); + like $form_properties->{deleteFileUrl}, qr/file=$file_property/, '...' . $file_property; +} + my $image = WebGUI::Storage->create($session); WebGUI::Test->addToCleanup($image); $image->addFileFromFilesystem(WebGUI::Test->getTestCollateralPath('lamp.jpg')); $image->generateThumbnail('lamp.jpg'); -my $imagedProduct = $node->addChild({ +my $imageTag = WebGUI::VersionTag->getWorking($session); + +my $imagedProduct = WebGUI::Test->asset( className => "WebGUI::Asset::Sku::Product", title => "Bible", image1 => $image->getId, isShippingRequired => 1, -}); +); + +$imageTag->commit; +$imagedProduct = $imagedProduct->cloneFromDb; ok($imagedProduct->getThumbnailUrl(), 'getThumbnailUrl is not empty'); is($imagedProduct->getThumbnailUrl(), $image->getThumbnailUrl('lamp.jpg'), 'getThumbnailUrl returns the right path to the URL'); @@ -110,32 +119,24 @@ cmp_deeply( '... form only has 1 variant, since the other one has 0 quantity' ); -my $tag = WebGUI::VersionTag->getWorking($session); -$tag->commit; -WebGUI::Test->addToCleanup($tag); - #################################################### # # addRevision # #################################################### -sleep 2; -my $newImagedProduct = $imagedProduct->addRevision({title => 'Bible and hammer'}); +my $newImagedProduct = $imagedProduct->addRevision({title => 'Bible and hammer'},time+2); like($newImagedProduct->get('image1'), $session->id->getValidator, 'addRevision: new product rev got an image1 storage location'); isnt($newImagedProduct->get('image1'), $imagedProduct->get('image1'), '... and it is not the same as the old one'); -WebGUI::Test->addToCleanup(WebGUI::VersionTag->getWorking($session)); -WebGUI::VersionTag->getWorking($session)->commit; - #################################################### # # view, template variables # #################################################### -my $jsonTemplate = $node->addChild({ +my $jsonTemplate = WebGUI::Test->asset( className => 'WebGUI::Asset::Template', parser => 'WebGUI::Asset::Template::HTMLTemplate', title => 'JSON template for Product testing', @@ -149,25 +150,22 @@ my $jsonTemplate = $node->addChild({ "manual_url" :"<tmpl_var manual_url>" } |, -}); +); my @storages = map { WebGUI::Storage->create($session) } 0..2; -my $viewProduct = $node->addChild({ +my $viewTag = WebGUI::VersionTag->getWorking($session); +my $viewProduct = WebGUI::Test->asset( className => 'WebGUI::Asset::Sku::Product', title => 'View Product for template variable tests', templateId => $jsonTemplate->getId, brochure => $storages[0]->getId, warranty => $storages[1]->getId, manual => $storages[2]->getId, -}); - -my $tag2 = WebGUI::VersionTag->getWorking($session); -$tag2->commit; -WebGUI::Test->addToCleanup($tag2); - -##Fetch a copy from the db, just like a page fetch -$viewProduct = WebGUI::Asset->new($session, $viewProduct->getId, 'WebGUI::Asset::Sku::Product'); +); +$viewTag->commit; +WebGUI::Test->addToCleanup($viewTag); +$viewProduct = $viewProduct->cloneFromDb; $viewProduct->prepareView(); my $json = $viewProduct->view(); @@ -185,3 +183,334 @@ cmp_deeply( }, 'brochure, warranty and manual vars are blank since their storages are empty' ); + +#---------------------------------------------------------------------------- +# addAccessory +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get_ok( '/' ); +$mech->session->user({ userId => 3 }); +$mech->get_ok( $product->getUrl( 'func=addAccessory' ) ); + +$mech->submit_form_ok({ + fields => { + accessoryAccessId => $imagedProduct->getId, + proceed => 1, + }, +}, 'add imagedProduct as an accessory and add another'); + +$product = $product->cloneFromDb; +cmp_deeply( + $product->getAllCollateral( 'accessoryJSON' ), + [ { accessoryAssetId => $imagedProduct->getId } ], + 'accessory updated' +); + +$mech->submit_form_ok({ + fields => { + accessoryAccessId => $viewProduct->getId, + proceed => 0, + }, +}, 'add viewProduct and go back' ); + +WebGUI::Test->addToCleanup(WebGUI::Shop::Cart->newBySession($mech->session)); + +$product = $product->cloneFromDb; +cmp_deeply( + $product->getAllCollateral( 'accessoryJSON' ), + [ { accessoryAssetId => $imagedProduct->getId }, { accessoryAssetId => $viewProduct->getId } ], + 'accessory edited' +); + +#---------------------------------------------------------------------------- +# addRelated +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get_ok( '/' ); +$mech->session->user({ userId => 3 }); +$mech->get_ok( $product->getUrl( 'func=addRelated' ) ); + +$mech->submit_form_ok({ + fields => { + relatedAssetId => $imagedProduct->getId, + proceed => 1, + }, +}, 'add imagedProduct as a related and add another'); + +$product = $product->cloneFromDb; +cmp_deeply( + $product->getAllCollateral( 'relatedJSON' ), + [ { relatedAssetId => $imagedProduct->getId } ], + 'added related asset' +); + +$mech->submit_form_ok({ + fields => { + relatedAssetId => $viewProduct->getId, + proceed => 0, + }, +}, 'add viewProduct and go back' ); +WebGUI::Test->addToCleanup(WebGUI::Shop::Cart->newBySession($mech->session)); + +$product = $product->cloneFromDb; +cmp_deeply( + $product->getAllCollateral( 'relatedJSON' ), + [ { relatedAssetId => $imagedProduct->getId }, { relatedAssetId => $viewProduct->getId } ], + 'added another related asset' +); + +#---------------------------------------------------------------------------- +# editBenefit +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get_ok( '/' ); +$mech->session->user({ userId => 3 }); +$mech->get_ok( $product->getUrl( 'func=editBenefit' ) ); + +$mech->submit_form_ok({ + fields => { + benefit => 'One new benefit', + proceed => 1, + }, +}, 'add one new benefit'); + +$product = $product->cloneFromDb; +cmp_deeply( + $product->getAllCollateral( 'benefitJSON' ), + [ { benefit => 'One new benefit', benefitId => ignore() } ], + 'added a benefit' +); + +$mech->submit_form_ok({ + fields => { + benefit => 'Two new benefit', + proceed => 0, + }, +}, 'add one more new benefit' ); +WebGUI::Test->addToCleanup(WebGUI::Shop::Cart->newBySession($mech->session)); + +$product = $product->cloneFromDb; +cmp_deeply( + $product->getAllCollateral( 'benefitJSON' ), + [ + { benefit => 'One new benefit', benefitId => ignore() }, + { benefit => 'Two new benefit', benefitId => ignore() }, + ], + 'second benefit successfully added' +); + +my $benefit = $product->getAllCollateral( 'benefitJSON' )->[0]; +$mech->get_ok( $product->getUrl( 'func=editBenefit;bid=' . $benefit->{benefitId} ) ); + +$mech->submit_form_ok( { + fields => { + benefit => 'One edited benefit', + }, +}, 'edit an existing benefit' ); +$product = $product->cloneFromDb; +cmp_deeply( + $product->getAllCollateral( 'benefitJSON' ), + [ + { benefit => 'One edited benefit', benefitId => ignore() }, + { benefit => 'Two new benefit', benefitId => ignore() }, + ], + 'benefit edited' +); + + +#---------------------------------------------------------------------------- +# editFeature +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get_ok( '/' ); +$mech->session->user({ userId => 3 }); +$mech->get_ok( $product->getUrl( 'func=editFeature' ) ); + +$mech->submit_form_ok({ + fields => { + feature => 'One new feature', + proceed => 1, + }, +}, 'add one new feature'); + +$product = $product->cloneFromDb; +cmp_deeply( + $product->getAllCollateral( 'featureJSON' ), + [ { feature => 'One new feature', featureId => ignore() } ], + 'added a feature' +); + +$mech->submit_form_ok({ + fields => { + feature => 'Two new feature', + proceed => 0, + }, +}, 'add one more new feature' ); +WebGUI::Test->addToCleanup(WebGUI::Shop::Cart->newBySession($mech->session)); + +$product = $product->cloneFromDb; +cmp_deeply( + $product->getAllCollateral( 'featureJSON' ), + [ + { feature => 'One new feature', featureId => ignore() }, + { feature => 'Two new feature', featureId => ignore() }, + ], + 'added another feature' +); + +my $feature = $product->getAllCollateral( 'featureJSON' )->[0]; +$mech->get_ok( $product->getUrl( 'func=editFeature;fid=' . $feature->{featureId} ) ); + +$mech->submit_form_ok( { + fields => { + feature => 'One edited feature', + }, +}, 'edit an existing feature' ); +$product = $product->cloneFromDb; +cmp_deeply( + $product->getAllCollateral( 'featureJSON' ), + [ + { feature => 'One edited feature', featureId => ignore() }, + { feature => 'Two new feature', featureId => ignore() }, + ], + 'edited a feature' +); + + +#---------------------------------------------------------------------------- +# editSpecification +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get_ok( '/' ); +$mech->session->user({ userId => 3 }); +$mech->get_ok( $product->getUrl( 'func=editSpecification' ) ); + +$mech->submit_form_ok({ + fields => { + name => "One", + value => "1", + units => "Oneitude", + proceed => 1, + }, +}, 'add one new specification'); + +$product = $product->cloneFromDb; +cmp_deeply( + $product->getAllCollateral( 'specificationJSON' ), + [ + { name => "One", value => "1", units => "Oneitude", specificationId => ignore(), }, + ], + 'specification added' +); + +$mech->submit_form_ok({ + fields => { + name => "Cold", + value => "2", + units => "Colditude", + proceed => 0, + }, +}, 'add one more new feature' ); +WebGUI::Test->addToCleanup(WebGUI::Shop::Cart->newBySession($mech->session)); + +$product = $product->cloneFromDb; +cmp_deeply( + $product->getAllCollateral( 'specificationJSON' ), + [ + { name => "One", value => "1", units => "Oneitude", specificationId => ignore(), }, + { name => "Cold", value => "2", units => "Colditude", specificationId => ignore(), }, + ], + 'another specification added' +); + +my $spec = $product->getAllCollateral( 'specificationJSON' )->[0]; +$mech->get_ok( $product->getUrl( 'func=editSpecification;sid=' . $spec->{specificationId} ) ); + +$mech->submit_form_ok( { + fields => { + name => "Oneitude", + value => "3", + units => "Ones", + }, +}, 'edit an existing specification' ); +$product = $product->cloneFromDb; +cmp_deeply( + $product->getAllCollateral( 'specificationJSON' ), + [ + { name => "Oneitude", value => "3", units => "Ones", specificationId => $spec->{specificationId}, }, + { name => "Cold", value => "2", units => "Colditude", specificationId => ignore(), }, + ], + 'specification edited' +); + + +#---------------------------------------------------------------------------- +# editVariant +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get_ok( '/' ); +$mech->session->user({ userId => 3 }); +$mech->get_ok( $product->getUrl( 'func=editVariant' ) ); +my %variantFlexo = ( + varSku => "3370318", + shortdesc => "He just looks evil because he has a beard.", + price => "199.99", + weight => "100", + quantity => 1, +); +$mech->submit_form_ok({ + fields => { + %variantFlexo, + proceed => 1, + }, +}, 'add one new variant'); + +$product = $product->cloneFromDb; +cmp_deeply( + $product->getAllCollateral( 'variantsJSON' ), + [ + { %variantFlexo, variantId => ignore() }, + ], + 'added a variant' +); + +my %variantBender = ( + varSku => "2716057", + shortdesc => "He's just evil", + price => "109.99", + weight => "100", + quantity => 1, +); +$mech->submit_form_ok({ + fields => { + %variantBender, + proceed => 0, + }, +}, 'add one more new variant' ); +WebGUI::Test->addToCleanup(WebGUI::Shop::Cart->newBySession($mech->session)); + +$product = $product->cloneFromDb; +cmp_deeply( + $product->getAllCollateral( 'variantsJSON' ), + [ + { %variantFlexo, variantId => ignore() }, + { %variantBender, variantId => ignore() }, + ], + 'added another variant' +); + +my $variant = $product->getAllCollateral( 'variantsJSON' )->[1]; +$mech->get_ok( $product->getUrl( 'func=editVariant;vid=' . $variant->{variantId} ) ); +$variantBender{variantId} = $variant->{variantId}; +$variantBender{shortdesc} = "He found religion"; +$variantBender{weight} = 99; +$variantBender{price} = 119.99; + +$mech->submit_form_ok( { + fields => { %variantBender }, +}, 'edit an existing variant' ); +$product = $product->cloneFromDb; +cmp_deeply( + $product->getAllCollateral( 'variantsJSON' ), + [ + { %variantFlexo, variantId => ignore() }, + { %variantBender, variantId => ignore() }, + ], + 'variant edited' +); + +done_testing; diff --git a/t/Asset/Sku/ProductCollateral.t b/t/Asset/Sku/ProductCollateral.t index 44a181eb7..a2e7186d6 100644 --- a/t/Asset/Sku/ProductCollateral.t +++ b/t/Asset/Sku/ProductCollateral.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # This tests WebGUI::Asset::Sku::Donation -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use Test::More; use Test::Deep; @@ -304,8 +302,8 @@ my $product6 = $root->addChild({ $newVid = $product6->setCollateral('variantsJSON', 'vid', 'new', { wideChar => qq!on 16\x{201d} hand-crocheted Cord! , vid => 'new' }); -my $product6a = WebGUI::Asset->newByDynamicClass($session, $product6->getId); -lives_ok { $product6a->getAllCollateral('variantsJSON', 'vid', $newVid); } 'Product collateral handles wide-character encodings okay'; +my $product6a = WebGUI::Asset->newById($session, $product6->getId); +lives_ok { $product6a->getAllCollateral('variantsJSON', 'vid', $newVid); }, 'Product collateral handles wide-character encodings okay'; $product6->purge; diff --git a/t/Asset/Sku/Subscription.t b/t/Asset/Sku/Subscription.t index eb4502172..710c50d53 100644 --- a/t/Asset/Sku/Subscription.t +++ b/t/Asset/Sku/Subscription.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,12 +13,11 @@ # # This tests WebGUI::Asset::Sku::Donation -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use Test::More; use Test::Deep; use WebGUI::Test; # Must use this before any other WebGUI modules +use WebGUI::Test::Mechanize; use WebGUI::Session; use WebGUI::Asset; use WebGUI::Asset::Sku::Subscription; @@ -27,30 +26,30 @@ use WebGUI::Asset::Sku::Subscription; # Init my $session = WebGUI::Test->session; - -#---------------------------------------------------------------------------- -# Tests - -plan tests => 4; # Increment this number for each test you create - -#---------------------------------------------------------------------------- -# put your tests here -my $root = WebGUI::Asset->getRoot($session); my $group = WebGUI::Group->new($session, 'new'); WebGUI::Test->addToCleanup($group); my $user = WebGUI::User->create($session); WebGUI::Test->addToCleanup($user); -my $sku = $root->addChild({ + +#---------------------------------------------------------------------------- +# Tests + +plan tests => 39; # Increment this number for each test you create + +#---------------------------------------------------------------------------- +# put your tests here +my $tag = WebGUI::VersionTag->getWorking($session); +my $sku = WebGUI::Test->asset( className => "WebGUI::Asset::Sku::Subscription", title => "Test Subscription", price => 50.00, recurringSubscription => 0, subscriptionGroup => $group->getId, duration => 'Monthly', - }); -my $versionTag = WebGUI::VersionTag->getWorking($session); -WebGUI::Test->addToCleanup($versionTag); + ); +$tag->commit; +$sku = $sku->cloneFromDb; isa_ok($sku, "WebGUI::Asset::Sku::Subscription"); is($sku->getPrice, 50.00, "Price should be 50.00"); @@ -70,3 +69,170 @@ cmp_deeply( num(2*$sku->getExpirationOffset, 10), "... increments user's expiration offset when the subscription is non-recurring and they are already a group member" ); + +#---------------------------------------------------------------------------- +# www_createSubscriptionBatch +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get_ok( '/' ); +$mech->session->user({ userId => 3 }); +$mech->get_ok( $sku->getUrl( 'func=createSubscriptionCodeBatch' ) ); +$mech->submit_form_ok( { + fields => { + noc => 2, + codeLength => 20, + expires => 60 * 60 * 24 * 14, # 14 days + name => "Paycheck", + description => "Sign up to get your paycheck!", + }, +}, 'generate subscription codes' ); + +my $batches = $session->db->buildArrayRefOfHashRefs( + "SELECT * FROM Subscription_codeBatch WHERE subscriptionId=?", + [ $sku->getId ], +); +cmp_deeply( $batches, + [ + { + name => "Paycheck", + description => "Sign up to get your paycheck!", + expirationDate => ignore(), + dateCreated => ignore(), + subscriptionId => $sku->getId, + batchId => ignore(), + }, + ], + "code batch got created", +); + +my $codes = $session->db->buildArrayRefOfHashRefs( + "SELECT * FROM Subscription_code WHERE batchId=?", + [ $batches->[0]->{batchId} ], +); +cmp_deeply( $codes, + [ + { + code => ignore(), + batchId => $batches->[0]->{batchId}, + status => 'Unused', + dateUsed => 0, + usedBy => 0, + }, + { + code => ignore(), + batchId => $batches->[0]->{batchId}, + status => 'Unused', + dateUsed => 0, + usedBy => 0, + }, + ], + "codes got created", +); + + +#---------------------------------------------------------------------------- +# www_listSubscriptionCodeBatches +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get_ok( '/' ); +$mech->session->user({ userId => 3 }); + +# Add another code for the selection +my $batchId = $session->db->setRow( 'Subscription_codeBatch', 'batchId', { + batchId => 'new', + name => "Fired!", + description => "Sign up to get fired!", + subscriptionId => $sku->getId, + expirationDate => time + 3600 * 24 * 7, + dateCreated => time + 1500, +}); + +$mech->get_ok( $sku->getUrl( 'func=listSubscriptionCodeBatches' ) ); +$mech->content_contains( "Sign up to get your paycheck!" ); +$mech->content_contains( "Sign up to get fired!" ); +$mech->submit_form_ok( { + fields => { + selection => "dc", + dcStart => time+1000, + dcStop => time+2000, + }, +}, 'limit subscription code batches' ); +$mech->content_lacks( "Sign up to get your paycheck!" ); +$mech->content_contains( "Sign up to get fired!" ); + + +#---------------------------------------------------------------------------- +# www_listSubscriptionCodes +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get_ok( '/' ); +$mech->session->user({ userId => 3 }); + +# Add more codes for the selection +my $codeId = $session->db->setRow( 'Subscription_code', 'code', { + batchId => $batchId, + usedBy => 3, + dateUsed => time+150, +}, "1234567890qwertyuiopasdfghjklzxcvbnm" ); + +# Limit by dateCreated +$mech->get_ok( $sku->getUrl( 'func=listSubscriptionCodes' ) ); +$mech->submit_form_ok( { + fields => { + selection => "dc", + dcStart => time+1000, + dcStop => time+2000, + }, +}, 'limit subscription code batches by date created' ); + +# The codes are there +$mech->content_lacks( $codes->[0]{code} ); +$mech->content_lacks( $codes->[1]{code} ); +$mech->content_contains( $codeId ); + +# Limit by dateUsed +$mech->get_ok( $sku->getUrl( 'func=listSubscriptionCodes' ) ); +$mech->submit_form_ok( { + fields => { + selection => "du", + duStart => time+100, + duStop => time+200, + }, +}, 'limit subscription code batches by date used' ); + +# The codes are there +$mech->content_lacks( $codes->[0]{code} ); +$mech->content_lacks( $codes->[1]{code} ); +$mech->content_contains( $codeId ); + +# Limit by batchId +$mech->get_ok( $sku->getUrl( 'func=listSubscriptionCodes' ) ); +$mech->submit_form_ok( { + fields => { + selection => "b", + bid => $batches->[0]{batchId}, + }, +}, 'limit subscription code batches by batchId' ); + +# The codes are there +$mech->content_contains( $codes->[0]{code} ); +$mech->content_contains( $codes->[1]{code} ); +$mech->content_lacks( $codeId ); + +#---------------------------------------------------------------------------- +# www_redeemSubscriptionCode +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get_ok( '/' ); +$mech->session->user({ userId => 3 }); + +$mech->get_ok( $sku->getUrl( 'func=redeemSubscriptionCode' ) ); +$mech->submit_form_ok({ + fields => { + code => $codes->[0]{code}, + }, +}, "redeem a code" ); + +my $i18n = WebGUI::International->new($session, "Asset_Subscription"); +$mech->content_contains( $i18n->get('redeem code success') ); + +my %redeemed = $session->db->quickHash( "SELECT * FROM Subscription_code WHERE code=?", [ $codes->[0]{code} ] ); +is( $redeemed{status}, 'Used', "status updated" ); +is( $redeemed{usedBy}, $mech->session->user->userId, "used by updated" ); +cmp_ok( $redeemed{dateUsed}, '>=', time - 10, "dateUsed updated" ); diff --git a/t/Asset/Snippet.t b/t/Asset/Snippet.t index f5e6fa232..d18e3aed5 100644 --- a/t/Asset/Snippet.t +++ b/t/Asset/Snippet.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; ##The goal of this test is to test the creation of Snippet Assets. @@ -24,8 +22,8 @@ my $session = WebGUI::Test->session; my $node = WebGUI::Asset->getImportNode($session); my $versionTag = WebGUI::VersionTag->getWorking($session); $versionTag->set({name=>"Snippet Test"}); -addToCleanup($versionTag); -my $snippet = $node->addChild({className=>'WebGUI::Asset::Snippet'}); +WebGUI::Test->addToCleanup($versionTag); +my $snippet = $node->addChild({className=>'WebGUI::Asset::Snippet', }); # Make sure TemplateToolkit is in the config file WebGUI::Test->originalConfig( 'templateParsers' ); @@ -47,15 +45,6 @@ foreach my $property (keys %{$properties}) { is ($snippet->get($property), $properties->{$property}, "updated $property is ".$properties->{$property}); } -# Test the getToolbar method -for (1..2) { - my $toolbarState = $snippet->getToolbarState; - my $toolbar = $snippet->getToolbar; - is($toolbar, undef, 'getToolbar method returns undef when _toolbarState is set') if $toolbarState; - isnt($toolbar, undef, 'getToolbar method returns something other than undef when _toolbarState is not set') unless $toolbarState; - $snippet->toggleToolbar; -} - # Rudimentry test of the view method my $output = $snippet->view; @@ -83,7 +72,6 @@ $snippet->update({ snippet => q|^SQL(select value from settings where name="[% title %]");| }); -WebGUI::Test->originalConfig('macros'); $session->config->addToHash('macros', 'SQL', 'SQL'); is($snippet->view(), 'WebGUI', 'Interpolating macros in works with template in the correct order'); @@ -109,11 +97,17 @@ is $snippet->view(1), 'Cache test: 3', 'receive uncached content since view was #---------------------------------------------------------------------- #Check packing -my $snippet2 = $node->addChild({className => 'WebGUI::Asset::Snippet'}); my $tag2 = WebGUI::VersionTag->getWorking($session); +my $snippet2 = $node->addChild({className => 'WebGUI::Asset::Snippet', }); $snippet2->update({mimeType => 'text/javascript'}); $tag2->commit; -addToCleanup($tag2); +WebGUI::Test->addToCleanup($tag2); + +$snippet2->snippet('uncompressable'); +is $snippet2->snippetPacked, 'uncompressable', 'packed snippet content was set'; + +$snippet2->snippet("two\n\nwords"); +is $snippet2->snippetPacked, "two words", '... and packed'; open my $JSFILE, WebGUI::Test->getTestCollateralPath('jquery.js') or die "Unable to open jquery test collateral file: $!"; @@ -124,6 +118,7 @@ my $jquery; }; close $JSFILE; +$snippet2 = $snippet2->cloneFromDb; is $snippet2->get('snippetPacked'), undef, 'no packed content'; lives_ok { $snippet2->update({snippet => $jquery}); } 'did not die during packing jquery'; ok $snippet2->get('snippetPacked'), 'snippet content was packed'; diff --git a/t/Asset/Story.t b/t/Asset/Story.t index 550e6a410..3d404eb0d 100644 --- a/t/Asset/Story.t +++ b/t/Asset/Story.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 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,7 +12,6 @@ use Test::MockTime qw/:all/; use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Test::Maker::Permission; @@ -20,6 +19,7 @@ use WebGUI::Session; use WebGUI::Storage; use WebGUI::User; use WebGUI::Group; +use WebGUI::Asset::Story; use Test::More; # increment this value for each test you create use Test::Deep; @@ -53,7 +53,8 @@ $canEditMaker->prepare({ }); -my $defaultNode = WebGUI::Asset->getDefault($session); +my $defaultNode = WebGUI::Test->asset; +my $tag = WebGUI::VersionTag->getWorking($session); my $archive = $defaultNode->addChild({ className => 'WebGUI::Asset::Wobject::StoryArchive', title => 'Test Archive', @@ -69,13 +70,10 @@ my $topic = $defaultNode->addChild({ assetId => 'TestStoryTopicAsset123', keywords => 'tango,yankee', }); -my $archiveTag = WebGUI::VersionTag->getWorking($session); -$archiveTag->commit; -WebGUI::Test->addToCleanup($archiveTag); -foreach my $asset ($archive, $topic) { - $asset = $asset->cloneFromDb; -} +$tag->commit; +$archive = $archive->cloneFromDb; +$topic = $topic->cloneFromDb; my $storage1 = WebGUI::Storage->create($session); my $storage2 = WebGUI::Storage->create($session); WebGUI::Test->addToCleanup($storage1, $storage2); @@ -86,19 +84,12 @@ WebGUI::Test->addToCleanup($storage1, $storage2); # ############################################################ -my $tests = 50; +my $tests = 48; plan tests => 1 + $tests + $canEditMaker->plan ; -my $class = 'WebGUI::Asset::Story'; -my $loaded = use_ok($class); - -SKIP: { - -skip "Unable to load module $class", $tests unless $loaded; - ############################################################ # # validParent @@ -131,20 +122,12 @@ $story = $archive->addChild({ }); isa_ok($story, 'WebGUI::Asset::Story', 'Created a Story asset'); -is($story->get('photo'), '[]', 'by default, photos is an empty JSON array'); -is($story->get('isHidden'), 1, 'by default, stories are hidden'); +is($story->photo, '[]', 'by default, photos is an empty JSON array'); +is($story->isHidden, 1, 'by default, stories are hidden'); $story->update({isHidden => 0}); -is($story->get('isHidden'), 1, 'stories cannot be set to not be hidden'); -is($story->get('state'), 'published', 'Story is published'); -$story->requestAutoCommit; - -{ - ##Version control does not alter the current object's status, fetch an updated copy from the - ##db. - my $storyDB = WebGUI::Asset->newByUrl($session, $story->getUrl); - is($storyDB->get('status'), 'approved', 'Story is approved'); -} - +is($story->isHidden, 1, 'stories cannot be set to not be hidden'); +is($story->state, 'published', 'Story is published'); +$story->commit; ############################################################ # @@ -191,7 +174,7 @@ $story->setPhotoData([ }, ]); -is($story->get('photo'), q|[{"caption":"Shawshank Prison","byLine":"Andrew Dufresne"}]|, 'setPhotoData: set JSON in the photo property'); +is($story->photo, q|[{"caption":"Shawshank Prison","byLine":"Andrew Dufresne"}]|, 'setPhotoData: set JSON in the photo property'); $photoData = $story->getPhotoData(); $photoData->[0]->{caption}="My cell"; @@ -292,8 +275,8 @@ cmp_deeply( 'link' => all(re('^'.$session->url->getSiteURL),re('story-1$')), guid => re('story-1$'), author => 'JT Smith', - date => $story->get('lastModified'), - pubDate => $session->datetime->epochToMail($story->get('creationDate')), + date => $story->lastModified, + pubDate => $session->datetime->epochToMail($story->creationDate), }, 'getRssData: returns correct data' ); @@ -312,7 +295,7 @@ $story->update({ highlights => "one\ntwo\nthree", keywords => "foxtrot,tango,whiskey", }); -is($story->get('highlights'), "one\ntwo\nthree", 'highlights set correctly for template var check'); +is($story->highlights, "one\ntwo\nthree", 'highlights set correctly for template var check'); $storage1->addFileFromFilesystem(WebGUI::Test->getTestCollateralPath('gooey.jpg')); $storage2->addFileFromFilesystem(WebGUI::Test->getTestCollateralPath('lamp.jpg')); @@ -363,14 +346,14 @@ is($viewVariables->{headline}, 'WebGUI, Web Done Right', '... headline is okay') cmp_bag( $viewVariables->{keyword_loop}, [ - { keyword => "foxtrot", url => '/home/test-archive?func=view;keyword=foxtrot', }, - { keyword => "tango", url => '/home/test-archive?func=view;keyword=tango', }, - { keyword => "whiskey", url => '/home/test-archive?func=view;keyword=whiskey', }, + { keyword => "foxtrot", url => re('test-archive\?func=view;keyword=foxtrot$'), }, + { keyword => "tango", url => re('test-archive\?func=view;keyword=tango$'), }, + { keyword => "whiskey", url => re('test-archive\?func=view;keyword=whiskey$'), }, ], 'viewTemplateVariables: keywords_loop is okay' -); +) or diag( Dumper $viewVariables->{keyword_loop} ); -is ($viewVariables->{updatedTimeEpoch}, $story->get('revisionDate'), 'viewTemplateVariables: updatedTimeEpoch'); +is ($viewVariables->{updatedTimeEpoch}, $story->revisionDate, 'viewTemplateVariables: updatedTimeEpoch'); my $rockstarVar = { imageUrl => 'http://www.plainblack.com/rockstar.jpg', @@ -541,5 +524,4 @@ my $revision_storageId = $revision->getPhotoData->[0]->{storageId}; ok($revision_storageId && ($revision_storageId ne $rev_storage->getId), 'storageId in the revision is different from the original'); -} #vim:ft=perl diff --git a/t/Asset/Template.t b/t/Asset/Template.t index 97274388d..2b8c49dce 100644 --- a/t/Asset/Template.t +++ b/t/Asset/Template.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,28 +8,28 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; use WebGUI::Asset::Template; use Exception::Class; -use Test::More tests => 58; # increment this value for each test you create +use Test::More; use Test::Deep; use Data::Dumper; use Test::Exception; use JSON qw{ from_json }; my $session = WebGUI::Test->session; +my $tag = WebGUI::VersionTag->getWorking($session); +WebGUI::Test->addToCleanup( $tag ); my $default = $session->config->get('defaultTemplateParser'); my $ht = 'WebGUI::Asset::Template::HTMLTemplate'; my $list = WebGUI::Asset::Template->getList($session); cmp_deeply($list, {}, 'getList with no classname returns an empty hashref'); -my $tmplText = " <tmpl_var variable> <tmpl_if conditional>true</tmpl_if> <tmpl_loop loop>XY</tmpl_loop> "; +my $tmplText = " <tmpl_var variable> <tmpl_if conditional>true</tmpl_if> <tmpl_loop loop>XY</tmpl_loop> <tmpl_var setParam_var> "; my %var = ( variable=>"AAAAA", conditional=>1, @@ -40,34 +40,77 @@ ok($output =~ m/\bAAAAA\b/, "processRaw() - variables"); ok($output =~ m/true/, "processRaw() - conditionals"); ok($output =~ m/\s(?:XY){5}\s/, "processRaw() - loops"); -my $importNode = WebGUI::Asset::Template->getImportNode($session); +my $importNode = WebGUI::Test->asset; +my $template = $importNode->addChild({className=>"WebGUI::Asset::Template", title=>"test", url=>"testingtemplates", template=>$tmplText, namespace=>'WebGUI Test Template', }); my $template = $importNode->addChild({className=>"WebGUI::Asset::Template"}); is($template->get('parser'), $default, "default parser is $default"); -$template = $importNode->addChild({className=>"WebGUI::Asset::Template", title=>"test", url=>"testingtemplates", template=>$tmplText, namespace=>'WebGUI Test Template',parser=>$ht}); +$template = $importNode->addChild({className=>"WebGUI::Asset::Template", title=>"test", url=>"testingtemplates", template=>$tmplText, namespace=>'WebGUI Test Template',parser=>$ht, }); isa_ok($template, 'WebGUI::Asset::Template', "creating a template"); $var{variable} = "BBBBB"; +$template->setParam( setParam_var => 'HUEG SUCCESS' ); $output = $template->process(\%var); ok($output =~ m/\bBBBBB\b/, "process() - variables"); ok($output =~ m/true/, "process() - conditionals"); ok($output =~ m/\b(?:XY){5}\b/, "process() - loops"); +ok($output =~ m/\bHUEG SUCCESS\b/, "process() merges with setParam" ); +$template->deleteParam( 'setParam_var' ); +# Test with a style template +my $style = $importNode->addChild({ + className => 'WebGUI::Asset::Template', + title => 'test style', + namespace => 'style', + template => '<IGOTSTYLE><tmpl_var body.content></IGOTSTYLE>', + parser => 'WebGUI::Asset::Template::HTMLTemplate', +}); +$template->style( $style->getId ); +$output = $template->process({}); +ok( $output =~ m{^<IGOTSTYLE>.+</IGOTSTYLE>$}, 'style template is added' ); +$template->style( undef ); + +#----------------------------------------------------------------------------- +# Forms in templates +$template = WebGUI::Test->asset( + className => 'WebGUI::Asset::Template', + template => '<tmpl_var NAME_header>', + namespace => 'WebGUI Test Template', + parser => $ht, +); +my $form = WebGUI::FormBuilder->new( $session ); +$template->addForm( NAME => $form ); +$output = $template->process; +is( $output, $form->getHeader, 'form variables added to template' ); + +# Params passed into process() override everything +$output = $template->process({ NAME_header => 'NOT_SO_FAST' }); +is( $output, 'NOT_SO_FAST', "params passed into process() override all others" ); +$template->forms( {} ); +$template->param( {} ); + +#------------------------------------------------------------------------------ +# JSON output # See if template listens the Accept header -my $request = $session->request; -my $in = $request->headers_in; -my $out = $request->headers_out; -$in->{Accept} = 'application/json'; +$session->request->header('Accept' => 'application/json'); my $json = $template->process(\%var); my $andNowItsAPerlHashRef = eval { from_json( $json ) }; ok( !$@, 'Accept = json, JSON is returned' ); cmp_deeply( \%var, $andNowItsAPerlHashRef, 'Accept = json, The correct JSON is returned' ); +# Try Accept application/json again, but with a setParam +$template->setParam( herp_status => 'derp' ); +$json = $template->process(\%var); +$andNowItsAPerlHashRef = eval { from_json( $json ) }; +ok( !$@, 'Accept = json, JSON is returned with setParam' ); +# Also test getParam +cmp_deeply( { %var, herp_status => $template->getParam('herp_status') }, $andNowItsAPerlHashRef, 'Accept = json, The correct JSON is returned with setParam' ); + # Done, so remove the json Accept header. -delete $session->request->headers_in->{Accept}; +$session->request->headers->remove_header('Accept'); # Testing the stuff-your-variables-into-the-body-with-delimiters header my $oldUser = $session->user; @@ -75,7 +118,7 @@ my $oldUser = $session->user; # log in as admin so we pass canEdit $session->user({ userId => 3 }); my $hname = 'X-Webgui-Template-Variables'; -$in->{$hname} = $template->getId; +$session->request->headers->header($hname => $template->getId); # processRaw sets some session variables (including username), so we need to # re-do it. @@ -88,9 +131,8 @@ $template->process(\%var); my $output = WebGUI::Asset::Template->getVariableJson($session); -delete $in->{$hname}; -my $start = delete $out->{"$hname-Start"}; -my $end = delete $out->{"$hname-End"}; +my $start = $session->response->headers->header("$hname-Start"); +my $end = $session->response->headers->header("$hname-End"); my ($json) = $output =~ /\Q$start\E(.*)\Q$end\E/; $andNowItsAPerlHashRef = eval { from_json( $json ) }; cmp_deeply( $andNowItsAPerlHashRef, \%var, "$hname: json returned correctly" ) @@ -114,14 +156,10 @@ is($templateCopy->get('isDefault'), 0, 'isDefault set to 0 on copy'); my $template3 = $importNode->addChild({ className => "WebGUI::Asset::Template", title => 'headBlock test', - headBlock => "tag1 tag2 tag3", template => "this is a template", parser => $ht, }, undef, time()-5); -ok(!$template3->get('headBlock'), 'headBlock is empty'); -is($template3->get('extraHeadTags'), 'tag1 tag2 tag3', 'extraHeadTags contains headBlock info'); - my @atts = ( {type => 'headScript', url => 'foo'}, {type => 'headScript', url => 'bar'}, @@ -152,7 +190,7 @@ cmp_bag( 'attachments are duplicated' ) or diag( Dumper \@atts3dup ); -my $template3rev = $template3->addRevision(); +my $template3rev = $template3->addRevision({}); my $att4 = $template3rev->getAttachments('headScript'); is($att4->[0]->{url}, 'foo', 'rev has foo'); is($att4->[1]->{url}, 'bar', 'rev has bar'); @@ -205,7 +243,6 @@ $template3rev->purgeRevision(); ## Check how templates in the trash and clipboard are handled. $session->asset($importNode); -$session->var->switchAdminOff; my $trashTemplate = $importNode->addChild({ className => "WebGUI::Asset::Template", @@ -220,7 +257,7 @@ is($trashTemplate->process, '', 'process: returns nothing when the template is i $trashTemplate->cut; is($trashTemplate->process, '', '... returns nothing when the template is in the trash, and admin mode is off'); -$session->var->switchAdminOn; +$session->user({ userId => 3 }); $trashTemplate->trash; is($trashTemplate->process, 'Template in trash', '... returns message when the template is in the trash, and admin mode is on'); @@ -228,7 +265,7 @@ is($trashTemplate->process, 'Template in trash', '... returns message when the t $trashTemplate->cut; is($trashTemplate->process, 'Template in clipboard', '... returns message when the template is in the trash, and admin mode is on'); -$session->var->switchAdminOff; +$session->user({ userId => 1 }); # Check error logging for bad templates @@ -239,19 +276,17 @@ my $brokenTemplate = $importNode->addChild({ parser => $ht, }); -WebGUI::Test->interceptLogging; -my $brokenOutput = $brokenTemplate->process({}); -my $logError = $WebGUI::Test::logger_error; -my $brokenUrl = $brokenTemplate->getUrl; -my $brokenId = $brokenTemplate->getId; -like($brokenOutput, qr/^There is a syntax error in this template/, 'process: returned error output contains boilerplate'); -like($brokenOutput, qr/$brokenUrl/, '... and the template url'); -like($brokenOutput, qr/$brokenId/, '... and the template id'); -like($logError, qr/$brokenUrl/, 'process: logged error has the url'); -like($logError, qr/$brokenId/, '... and the template id'); -WebGUI::Test->restoreLogging; - -WebGUI::Test->addToCleanup(WebGUI::VersionTag->getWorking($session)); +WebGUI::Test->interceptLogging( sub { + my $log_data = shift; + my $brokenOutput = $brokenTemplate->process({}); + my $brokenUrl = $brokenTemplate->getUrl; + my $brokenId = $brokenTemplate->getId; + like($brokenOutput, qr/^There is a syntax error in this template/, 'process: returned error output contains boilerplate'); + like($brokenOutput, qr/$brokenUrl/, '... and the template url'); + like($brokenOutput, qr/$brokenId/, '... and the template id'); + like($log_data->{error}, qr/$brokenUrl/, 'process: logged error has the url'); + like($log_data->{error}, qr/$brokenId/, '... and the template id'); +}); my $userStyleTemplate = $importNode->addChild({ className => "WebGUI::Asset::Template", @@ -273,9 +308,6 @@ my $someOtherTemplate = $importNode->addChild({ $session->setting->set('userFunctionStyleId', $userStyleTemplate->getId); -my $purgeCutTag = WebGUI::VersionTag->getWorking($session); -WebGUI::Test->addToCleanup($purgeCutTag); - is($session->setting->get('userFunctionStyleId'), $userStyleTemplate->getId, 'Setup for cut tests.'); $userStyleTemplate->cut; @@ -311,3 +343,16 @@ throws_ok 'Parser not in config dies'; isa_ok $class->getParser( $session, 'WebGUI::Asset::Template::HTMLTemplateExpr'), 'WebGUI::Asset::Template::HTMLTemplateExpr', 'parser in config is created'; +{ +use Test::MockObject::Extends; +my $mockparser = Test::MockObject->new->mock( process => sub { $@ = "failed" } ); +my $mockTemplate = Test::MockObject::Extends->new( $class ) + ->mock( get => sub { return '' } ) + ->mock( session => sub { return $session } ) + ->mock( getParser => sub { return $mockparser } ) + ; +is $mockTemplate->process, 'failed', 'handle non-reference exceeption'; +} + +done_testing; + diff --git a/t/Asset/Template/HTMLTemplateExpr.t b/t/Asset/Template/HTMLTemplateExpr.t index b8b31da3e..7e6f67af7 100644 --- a/t/Asset/Template/HTMLTemplateExpr.t +++ b/t/Asset/Template/HTMLTemplateExpr.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use HTML::TokeParser; use WebGUI::Test; @@ -36,8 +34,7 @@ SKIP: { skip "HTML::Template::Expr or plugin not loaded", $num_tests unless $plugin; $session->config->set('templateParsers', ['WebGUI::Asset::Template::HTMLTemplate', 'WebGUI::Asset::Template::HTMLTemplateExpr',] ); - my ($versionTag, $template) = setup_assets($session); - WebGUI::Test->addToCleanup($versionTag); + my $template = setup_assets($session); my $templateOutput = $template->process({ "foo.bar" => "baz", "number.value" => 2 }); my $companyName = $session->config->get('companyName'); like($templateOutput, qr/NAME=$companyName/, "session variable with underscores"); @@ -47,9 +44,6 @@ SKIP: { sub setup_assets { my $session = shift; - my $importNode = WebGUI::Asset->getImportNode($session); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->set({name=>"HTMLTemplateExpr test"}); my $properties = { title => 'HTML Template Expr test', className => 'WebGUI::Asset::Template', @@ -59,7 +53,6 @@ sub setup_assets { # '1234567890123456789012' template => q!NAME=<tmpl_var session_setting_companyName>\nFOOBAR=<tmpl_var name="foo_bar">\nEQN=<tmpl_var EXPR="2+number_value">!, }; - my $template = $importNode->addChild($properties, $properties->{id}); - $versionTag->commit; - return ($versionTag, $template); + my $template = WebGUI::Test->asset->addChild($properties, $properties->{id}); + return $template; } diff --git a/t/Asset/Template/packed.t b/t/Asset/Template/packed.t index 86ed1a706..31950dc63 100644 --- a/t/Asset/Template/packed.t +++ b/t/Asset/Template/packed.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -14,9 +14,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use Test::More; use WebGUI::Test; # Must use this before any other WebGUI modules use WebGUI::Session; diff --git a/t/Asset/WikiPage.t b/t/Asset/WikiPage.t index a1873dbc9..8e0784498 100644 --- a/t/Asset/WikiPage.t +++ b/t/Asset/WikiPage.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; ##The goal of this test is to test the creation of a WikiPage Asset. @@ -23,23 +21,19 @@ use WebGUI::Asset::WikiPage; my $session = WebGUI::Test->session; -my $node = WebGUI::Asset->getImportNode($session); +my $node = WebGUI::Test->asset; my $versionTag = WebGUI::VersionTag->getWorking($session); $versionTag->set({name=>"Wiki Test"}); WebGUI::Test->addToCleanup($versionTag); - -my $wiki = $node->addChild({className=>'WebGUI::Asset::Wobject::WikiMaster', title => 'Wiki Test', url => 'wikitest'}); +my $wiki = $node->addChild({className=>'WebGUI::Asset::Wobject::WikiMaster', title => 'Wiki Test', url => 'wikitest',}); my @autoCommitCoda = (undef, undef, {skipAutoCommitWorkflows => 1, skipNotification => 1}); -$versionTag->commit; my $wikipage = $wiki->addChild( - {className=>'WebGUI::Asset::WikiPage'}, + {className=>'WebGUI::Asset::WikiPage', + title =>'wikipage', }, @autoCommitCoda, ); -# Wikis create and autocommit a version tag when a child is added. Lets get the name so we can roll it back. -my $secondVersionTag = WebGUI::VersionTag->new($session,$wikipage->get("tagId")); -$secondVersionTag->commit; -WebGUI::Test->addToCleanup($secondVersionTag ); +WebGUI::Test->addToCleanup($wikipage); # Test for sane object types isa_ok($wiki, 'WebGUI::Asset::Wobject::WikiMaster'); @@ -51,9 +45,9 @@ is($article, undef, "Can't add an Article wobject as a child to a Wiki Page."); # See if the duplicate method works my $wikiPageCopy = $wikipage->duplicate(); +$wikiPageCopy = $wikiPageCopy->cloneFromDb; +$wikiPageCopy->update({ title => 'wikipage copy', }); isa_ok($wikiPageCopy, 'WebGUI::Asset::WikiPage'); -my $thirdVersionTag = WebGUI::VersionTag->new($session,$wikiPageCopy->get("tagId")); -WebGUI::Test->addToCleanup($thirdVersionTag); ## isProtected diff --git a/t/Asset/WikiPage/permissions.t b/t/Asset/WikiPage/permissions.t index caa8c0b7c..fcb10f730 100644 --- a/t/Asset/WikiPage/permissions.t +++ b/t/Asset/WikiPage/permissions.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; ##The goal of this test is to test permissions handling for the WikiMaster and WikiPage. @@ -25,12 +23,12 @@ my $session = WebGUI::Test->session; my $node = WebGUI::Asset->getImportNode($session); my $versionTag = WebGUI::VersionTag->getWorking($session); $versionTag->set({name=>"Wiki Test"}); -addToCleanup($versionTag); +WebGUI::Test->addToCleanup($versionTag); my $assetEdit = WebGUI::Group->new($session, "new"); my $wikiAdmin = WebGUI::Group->new($session, "new"); my $wikiEditPage = WebGUI::Group->new($session, "new"); -addToCleanup($assetEdit, $wikiAdmin, $wikiEditPage); +WebGUI::Test->addToCleanup($assetEdit, $wikiAdmin, $wikiEditPage); my $assetEditor = WebGUI::User->create($session); $assetEdit->addUsers([$assetEditor->userId]); @@ -40,7 +38,7 @@ my $wikiPageEditor = WebGUI::User->create($session); $wikiEditPage->addUsers([$wikiPageEditor->userId]); my $wikiOwner = WebGUI::User->create($session); my $wikiPageOwner = WebGUI::User->create($session); -addToCleanup($assetEditor, $wikiAdministrator, $wikiPageEditor, $wikiOwner, $wikiPageOwner); +WebGUI::Test->addToCleanup($assetEditor, $wikiAdministrator, $wikiPageEditor, $wikiOwner, $wikiPageOwner); $session->user({user => $wikiOwner}); my $wiki = $node->addChild({ @@ -57,10 +55,7 @@ my $wikipage = $wiki->addChild({ }, undef, undef, {skipAutoCommitWorkflows => 1, skipNotification => 1}); is $wikipage->get('ownerUserId'), $wikiPageOwner->userId, 'wiki page owned by correct user'; -# Wikis create and autocommit a version tag when a child is added. Lets get the name so we can roll it back. -my $secondVersionTag = WebGUI::VersionTag->new($session,$wikipage->get("tagId")); -$secondVersionTag->commit; -addToCleanup($secondVersionTag ); +WebGUI::Test->addToCleanup($wikipage); # Test for sane object types isa_ok($wiki, 'WebGUI::Asset::Wobject::WikiMaster'); diff --git a/t/Asset/WikiPage/subscribable.t b/t/Asset/WikiPage/subscribable.t index 7dbcff4f5..301ff2af6 100644 --- a/t/Asset/WikiPage/subscribable.t +++ b/t/Asset/WikiPage/subscribable.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use Test::More; use WebGUI::Test; # Must use this before any other WebGUI modules use WebGUI::Session; @@ -23,7 +21,7 @@ use WebGUI::Session; #---------------------------------------------------------------------------- # Init my $session = WebGUI::Test->session; -my $import = WebGUI::Asset->getImportNode( $session ); +my $import = WebGUI::Test->asset; my $wiki = $import->addChild( { className => 'WebGUI::Asset::Wobject::WikiMaster', @@ -34,9 +32,7 @@ my $wiki my $page = $wiki->addChild( { className => 'WebGUI::Asset::WikiPage', - }, undef, undef, { skipAutoCommitWorkflows => 1 } ); - -WebGUI::Test->addToCleanup( WebGUI::VersionTag->getWorking( $session ) ); + } ); #---------------------------------------------------------------------------- # Tests @@ -51,7 +47,4 @@ ok( my $template = $page->getSubscriptionTemplate, 'getSubscriptionTemplate retu isa_ok( $template, 'WebGUI::Asset::Template', 'getSubscriptionTemplate' ); is( $template->getId, 'limMkk80fMB3fqNZVf162w', 'getSubscriptionTemplate gets wikimaster template' ); -#---------------------------------------------------------------------------- -# Cleanup - #vim:ft=perl diff --git a/t/Asset/Wobject/Article.t b/t/Asset/Wobject/Article.t index 5f0df35d2..e54f617aa 100644 --- a/t/Asset/Wobject/Article.t +++ b/t/Asset/Wobject/Article.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,25 +8,23 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; use File::Spec; -use lib "$FindBin::Bin/../../lib"; ##The goal of this test is to test the creation of Article Wobjects. use WebGUI::Test; +use WebGUI::Test::MockAsset; use WebGUI::Session; use Test::More tests => 24; # increment this value for each test you create use Test::Deep; -use Test::MockObject; use Data::Dumper; use WebGUI::Asset::Wobject::Article; my $session = WebGUI::Test->session; # Do our work in the import node -my $node = WebGUI::Asset->getImportNode($session); +my $node = WebGUI::Test->asset; # Lets create an article wobject using all defaults then test to see if those defaults were set # @@ -41,9 +39,6 @@ my $node = WebGUI::Asset->getImportNode($session); # storageId => undef, #}; -my $versionTag = WebGUI::VersionTag->getWorking($session); -$versionTag->set({name=>"Article Test"}); -WebGUI::Test->addToCleanup($versionTag); my $article = $node->addChild({className=>'WebGUI::Asset::Wobject::Article'}); # Test for a sane object type @@ -121,12 +116,12 @@ my $output = $article->view; isnt ($output, "", 'view method returns something'); # Lets see if caching works -my $cachedOutput = WebGUI::Cache->new($session, 'view_'.$article->getId)->get; +my $cachedOutput = $session->cache->get('view_'.$article->getId); is ($output, $cachedOutput, 'view method caches output'); # Lets see if the purgeCache method works $article->purgeCache; -$cachedOutput = WebGUI::Cache->new($session, 'view_'.$article->getId)->get; # Check cache post purge +$cachedOutput = $session->cache->get('view_'.$article->getId); # Check cache post purge isnt ($output, $cachedOutput, 'purgeCache method deletes cache'); @@ -136,9 +131,8 @@ isnt ($output, $cachedOutput, 'purgeCache method deletes cache'); # -------------------------------------------------------------------------------------------------- my $templateId = 'DUMMY_TEMPLATE________'; -my $templateMock = Test::MockObject->new({}); -$templateMock->set_isa('WebGUI::Asset::Template'); -$templateMock->set_always('getId', $templateId); +my $templateMock = WebGUI::Test::MockAsset->new('WebGUI::Asset::Template'); +$templateMock->mock_id($templateId); my $templateVars; $templateMock->set_true('prepare', sub { } ); $templateMock->mock('process', sub { $templateVars = $_[1]; } ); @@ -151,12 +145,8 @@ foreach my $f (@extTestFiles) { } $article->update({templateId=>$templateId}); -{ - WebGUI::Test->mockAssetId($templateId, $templateMock); - $article->prepareView; - $article->view; - WebGUI::Test->unmockAssetId($templateId); -} +$article->prepareView; +$article->view; cmp_bag( $templateVars->{attachment_loop}, diff --git a/t/Asset/Wobject/AssetReport.t b/t/Asset/Wobject/AssetReport.t index f880d49d8..a3b5a4335 100644 --- a/t/Asset/Wobject/AssetReport.t +++ b/t/Asset/Wobject/AssetReport.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use Test::More; use Test::Deep; use JSON; diff --git a/t/Asset/Wobject/Calendar.t b/t/Asset/Wobject/Calendar.t index 30bde489f..e1a050675 100644 --- a/t/Asset/Wobject/Calendar.t +++ b/t/Asset/Wobject/Calendar.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; ##The goal of this test is to test the creation of Calendar Wobjects. @@ -57,23 +55,16 @@ use Data::Dumper; use WebGUI::Asset::Wobject::Calendar; use WebGUI::Asset::Event; -plan tests => 15 + scalar @icalWrapTests; - my $session = WebGUI::Test->session; # Do our work in the import node -my $node = WebGUI::Asset->getImportNode($session); - -my $versionTag = WebGUI::VersionTag->getWorking($session); -$versionTag->set({name=>"Calendar Test"}); -addToCleanup($versionTag); +my $node = WebGUI::Test->asset; my $cal = $node->addChild({className=>'WebGUI::Asset::Wobject::Calendar'}); my $windowCal = $node->addChild({ className => 'WebGUI::Asset::Wobject::Calendar', title => 'Calendar for doing event window testing', }); -$versionTag->commit(); # Test for a sane object type isa_ok($cal, 'WebGUI::Asset::Wobject::Calendar'); @@ -127,13 +118,15 @@ my $windowStart = $startDt->clone; my $endDt = $startDt->clone->add(days => 2); my $windowEnd = $endDt->clone->subtract(seconds => 1); +my $tag2 = WebGUI::VersionTag->getWorking($session); + my $inside = $windowCal->addChild({ className => 'WebGUI::Asset::Event', title => 'Inside window, no times, same day', startDate => $bday->toDatabaseDate, endDate => $bday->toDatabaseDate, timeZone => $tz, -}, undef, undef, {skipAutoCommitWorkflows => 1}); +},); my $insidewt = $windowCal->addChild({ className => 'WebGUI::Asset::Event', @@ -143,7 +136,7 @@ my $insidewt = $windowCal->addChild({ startTime => $bday->toDatabaseTime, endTime => $bday->clone->add(hours => 1)->toDatabaseTime, timeZone => $tz, -}, undef, undef, {skipAutoCommitWorkflows => 1}); +},); my $outsideHigh = $windowCal->addChild({ className => 'WebGUI::Asset::Event', @@ -151,7 +144,7 @@ my $outsideHigh = $windowCal->addChild({ startDate => $endDt->clone->add(days => 2)->toDatabaseDate, endDate => $endDt->clone->add(days => 3)->toDatabaseDate, timeZone => $tz, -}, undef, undef, {skipAutoCommitWorkflows => 1}); +},); my $outsideLow = $windowCal->addChild({ className => 'WebGUI::Asset::Event', @@ -159,7 +152,7 @@ my $outsideLow = $windowCal->addChild({ startDate => $startDt->clone->subtract(days => 3)->toDatabaseDate, endDate => $startDt->clone->subtract(days => 2)->toDatabaseDate, timeZone => $tz, -}, undef, undef, {skipAutoCommitWorkflows => 1}); +},); my $straddle = $windowCal->addChild({ className => 'WebGUI::Asset::Event', @@ -167,7 +160,7 @@ my $straddle = $windowCal->addChild({ startDate => $startDt->clone->subtract(days => 1)->toDatabaseDate, endDate => $endDt->clone->add(days => 1)->toDatabaseDate, timeZone => $tz, -}, undef, undef, {skipAutoCommitWorkflows => 1}); +},); my $straddlewt = $windowCal->addChild({ className => 'WebGUI::Asset::Event', @@ -177,7 +170,7 @@ my $straddlewt = $windowCal->addChild({ startTime => $startDt->clone->subtract(hours => 12)->toDatabaseTime, endTime => $endDt->clone->add(hours => 12)->toDatabaseTime, timeZone => $tz, -}, undef, undef, {skipAutoCommitWorkflows => 1}); +},); my $straddleLowwt = $windowCal->addChild({ className => 'WebGUI::Asset::Event', @@ -187,7 +180,7 @@ my $straddleLowwt = $windowCal->addChild({ startTime => $startDt->clone->subtract(hours => 12)->toDatabaseTime, endTime => $startDt->clone->add(hours => 12)->toDatabaseTime, timeZone => $tz, -}, undef, undef, {skipAutoCommitWorkflows => 1}); +},); my $straddleHighwt = $windowCal->addChild({ className => 'WebGUI::Asset::Event', @@ -197,7 +190,7 @@ my $straddleHighwt = $windowCal->addChild({ startTime => $endDt->clone->subtract(hours => 12)->toDatabaseTime, endTime => $endDt->clone->add(hours => 12)->toDatabaseTime, timeZone => $tz, -}, undef, undef, {skipAutoCommitWorkflows => 1}); +},); my $justBeforewt = $windowCal->addChild({ className => 'WebGUI::Asset::Event', @@ -207,7 +200,7 @@ my $justBeforewt = $windowCal->addChild({ startTime => $startDt->clone->subtract(hours => 1)->toDatabaseTime, endTime => $startDt->toDatabaseTime, timeZone => $tz, -}, undef, undef, {skipAutoCommitWorkflows => 1}); +},); my $justAfterwt = $windowCal->addChild({ className => 'WebGUI::Asset::Event', @@ -217,7 +210,7 @@ my $justAfterwt = $windowCal->addChild({ startTime => $endDt->toDatabaseTime, endTime => $endDt->clone->add(hours => 1)->toDatabaseTime, timeZone => $tz, -}, undef, undef, {skipAutoCommitWorkflows => 1}); +}, ); my $justBefore = $windowCal->addChild({ className => 'WebGUI::Asset::Event', @@ -225,7 +218,7 @@ my $justBefore = $windowCal->addChild({ startDate => $startDt->clone->add(days => -1)->toDatabaseDate, endDate => $startDt->clone->add(days => -1)->toDatabaseDate, timeZone => $tz, -}, undef, undef, {skipAutoCommitWorkflows => 1}); +},); my $justAfter = $windowCal->addChild({ className => 'WebGUI::Asset::Event', @@ -233,7 +226,7 @@ my $justAfter = $windowCal->addChild({ startDate => $endDt->clone->add(days => 1)->toDatabaseDate, endDate => $endDt->clone->add(days => 1)->toDatabaseDate, timeZone => $tz, -}, undef, undef, {skipAutoCommitWorkflows => 1}); +},); my $starting = $windowCal->addChild({ className => 'WebGUI::Asset::Event', @@ -241,7 +234,7 @@ my $starting = $windowCal->addChild({ startDate => $startDt->toDatabaseDate, endDate => $startDt->toDatabaseDate, timeZone => $tz, -}, undef, undef, {skipAutoCommitWorkflows => 1}); +}, ); my $ending = $windowCal->addChild({ className => 'WebGUI::Asset::Event', @@ -249,7 +242,7 @@ my $ending = $windowCal->addChild({ startDate => $endDt->clone->add(days => -1)->toDatabaseDate, endDate => $endDt->clone->add(days => -1)->toDatabaseDate, timeZone => $tz, -}, undef, undef, {skipAutoCommitWorkflows => 1}); +},); my $coincident = $windowCal->addChild({ className => 'WebGUI::Asset::Event', @@ -257,7 +250,7 @@ my $coincident = $windowCal->addChild({ startDate => $startDt->toDatabaseDate, endDate => $endDt->toDatabaseDate, timeZone => $tz, -}, undef, undef, {skipAutoCommitWorkflows => 1}); +},); my $coincidentLow = $windowCal->addChild({ className => 'WebGUI::Asset::Event', @@ -265,7 +258,7 @@ my $coincidentLow = $windowCal->addChild({ startDate => $startDt->toDatabaseDate, endDate => $endDt->clone->add(days => 1)->toDatabaseDate, timeZone => $tz, -}, undef, undef, {skipAutoCommitWorkflows => 1}); +},); my $coincidentHigh = $windowCal->addChild({ className => 'WebGUI::Asset::Event', @@ -273,7 +266,7 @@ my $coincidentHigh = $windowCal->addChild({ startDate => $startDt->clone->add( days => -1, )->toDatabaseDate, endDate => $endDt->toDatabaseDate, timeZone => $tz, -}, undef, undef, {skipAutoCommitWorkflows => 1}); +},); # no suffix = all day event # wt suffix = with times @@ -296,9 +289,8 @@ my $coincidentHigh = $windowCal->addChild({ # # Everything above the window should be included in the set of events returned. -my $tag2 = WebGUI::VersionTag->getWorking($session); $tag2->commit; -addToCleanup($tag2); +WebGUI::Test->addToCleanup($tag2); is(scalar @{ $windowCal->getLineage(['children'])}, 17, 'added events to the window calendar'); @@ -338,7 +330,7 @@ my $allDay = $weekCal->addChild({ startTime => $allDayDt->clone->truncate(to => 'day')->toDatabaseTime, endTime => $allDayDt->clone->add(days => 1)->truncate(to => 'day')->toDatabaseTime, timeZone => $tz, -}, undef, undef, {skipAutoCommitWorkflows => 1}); +}, ); my $endOfWeek = $weekCal->addChild({ className => 'WebGUI::Asset::Event', @@ -348,11 +340,7 @@ my $endOfWeek = $weekCal->addChild({ startTime => $nextWeekDt->toDatabaseTime, endTime => $nextWeekDt->clone->add(hours => 1)->toDatabaseTime, timeZone => $tz, -}, undef, undef, {skipAutoCommitWorkflows => 1}); - -my $tag3 = WebGUI::VersionTag->getWorking($session); -$tag3->commit; -addToCleanup($tag3); +}, ); my $weekVars = $weekCal->viewWeek({ start => $bday }); my @eventBins = (); @@ -418,7 +406,7 @@ $allDay = $monthCal->addChild({ startTime => $allDayDt->clone->truncate(to => 'day')->toDatabaseTime, endTime => $allDayDt->clone->add(days => 1)->truncate(to => 'day')->toDatabaseTime, timeZone => $tz, -}, undef, undef, {skipAutoCommitWorkflows => 1}); +},); my $endOfMonth = $monthCal->addChild({ className => 'WebGUI::Asset::Event', @@ -428,11 +416,7 @@ my $endOfMonth = $monthCal->addChild({ startTime => $nextMonthDt->toDatabaseTime, endTime => $nextMonthDt->clone->add(hours => 1)->toDatabaseTime, timeZone => $tz, -}, undef, undef, {skipAutoCommitWorkflows => 1}); - -my $tag4 = WebGUI::VersionTag->getWorking($session); -$tag4->commit; -addToCleanup($tag4); +}, ); my $monthVars = $monthCal->viewMonth({ start => $bday }); @eventBins = (); @@ -489,7 +473,7 @@ $allDay = $dayCal->addChild({ startTime => $allDayDt->clone->truncate(to => 'day')->toDatabaseTime, endTime => $allDayDt->clone->add(days => 1)->truncate(to => 'day')->toDatabaseTime, timeZone => $tz, -}, undef, undef, {skipAutoCommitWorkflows => 1}); +}, ); my $nextDay = $dayCal->addChild({ className => 'WebGUI::Asset::Event', @@ -499,11 +483,7 @@ my $nextDay = $dayCal->addChild({ startTime => $nextDayDt->toDatabaseTime, endTime => $nextDayDt->clone->add(hours => 1)->toDatabaseTime, timeZone => $tz, -}, undef, undef, {skipAutoCommitWorkflows => 1}); - -my $tag5 = WebGUI::VersionTag->getWorking($session); -$tag5->commit; -addToCleanup($tag5); +},); my $hourVars = $dayCal->viewDay({ start => $nextDayDt }); @eventBins = (); @@ -556,7 +536,7 @@ my $prevDay = $listCal->addChild({ my $tag6 = WebGUI::VersionTag->getWorking($session); $tag6->commit; -addToCleanup($tag6); +WebGUI::Test->addToCleanup($tag6); my $listVars = $listCal->viewList({ start => $bday }); @@ -571,6 +551,9 @@ cmp_deeply( '... correct set of events in list view' ); +ok(exists $listVars->{events}->[0]->{new_year} && $listVars->{events}->[0]->{new_year}, 'first event has new_year set'); +ok(exists $listVars->{events}->[0]->{new_month} && $listVars->{events}->[0]->{new_month}, 'first event has new_month set'); +ok(exists $listVars->{events}->[0]->{new_day} && $listVars->{events}->[0]->{new_day}, 'first event has new_day set'); ###################################################################### # @@ -583,11 +566,6 @@ my $feedCal = $node->addChild({ title => 'Calendar for doing feed tests', }); -my $feedTag = WebGUI::VersionTag->getWorking($session); -$feedTag->set({name=>"Calendar Feed Test"}); -addToCleanup($feedTag); -$feedTag->commit; - cmp_deeply( $feedCal->getFeeds(), [], @@ -598,11 +576,10 @@ cmp_deeply( $feedCal->update({icalFeeds => '[]'}); is_deeply $feedCal->get('icalFeeds'), [], 'set as JSON, returned perl'; -$feedCal->{_properties}->{icalFeeds} = '[]'; -is $feedCal->get('icalFeeds'), '[]', 'poked into the object directly, returned as JSON'; - cmp_deeply( $feedCal->getFeeds(), [], 'but getFeeds still returns a data structure.' ); + +done_testing; diff --git a/t/Asset/Wobject/Carousel.t b/t/Asset/Wobject/Carousel.t index 8eb9f96b2..e4dff3d7d 100644 --- a/t/Asset/Wobject/Carousel.t +++ b/t/Asset/Wobject/Carousel.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; ##The goal of this test is to test the creation of Carousel Wobjects. @@ -22,11 +20,7 @@ use WebGUI::Asset::Wobject::Carousel; my $session = WebGUI::Test->session; # Do our work in the import node -my $node = WebGUI::Asset->getImportNode($session); - -my $versionTag = WebGUI::VersionTag->getWorking($session); -$versionTag->set({name=>"Search Test"}); -WebGUI::Test->addToCleanup($versionTag); +my $node = WebGUI::Test->asset; my $carousel = $node->addChild({className=>'WebGUI::Asset::Wobject::Carousel'}); # Test for a sane object type diff --git a/t/Asset/Wobject/Collaboration.t b/t/Asset/Wobject/Collaboration.t index 49547fd43..c056edc18 100644 --- a/t/Asset/Wobject/Collaboration.t +++ b/t/Asset/Wobject/Collaboration.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use WebGUI::Test; use WebGUI::Session; use WebGUI::User; @@ -30,15 +28,15 @@ my @addChildCoda = (undef, undef, ); # Do our work in the import node -my $node = WebGUI::Asset->getImportNode($session); +my $node = WebGUI::Test->asset; # grab a named version tag my $versionTag = WebGUI::VersionTag->getWorking($session); -addToCleanup($versionTag); +WebGUI::Test->addToCleanup($versionTag); $versionTag->set({name => 'Collaboration => groupToEditPost test'}); # place the collab system under a layout to ensure we're using the inherited groupIdEdit value -my $layout = $node->addChild({className => 'WebGUI::Asset::Wobject::Layout'}); +my $layout = $node->addChild({className => 'WebGUI::Asset::Wobject::Layout', }); # set the layout as the current asset for the same reason $session->asset($layout); @@ -64,27 +62,28 @@ cmp_ok($collab->get('groupToEditPost'), 'eq', $collab->get('groupIdEdit'), 'grou is($collab->get('itemsPerFeed'), 25, 'itemsPerFeed is set to the default'); # finally, add the post to the collaboration system +my $tag1 = WebGUI::VersionTag->getWorking($session); my $props = { className => 'WebGUI::Asset::Post::Thread', content => 'hello, world!', }; my $thread = $collab->addChild($props, @addChildCoda); -my $tag1 = WebGUI::VersionTag->getWorking($session); +$thread->setSkipNotification; $tag1->commit; -addToCleanup($tag1); +WebGUI::Test->addToCleanup($tag1); # Test for a sane object type isa_ok($thread, 'WebGUI::Asset::Post::Thread'); +my $tag2 = WebGUI::VersionTag->getWorking($session); $props = { className => 'WebGUI::Asset::Post::Thread', content => 'jello, world!', }; - my $thread2 = $collab->addChild($props, @addChildCoda); -my $tag2 = WebGUI::VersionTag->getWorking($session); +$thread2->setSkipNotification; $tag2->commit; -addToCleanup($tag2); +WebGUI::Test->addToCleanup($tag2); my $rssitems = $collab->getRssFeedItems(); is(scalar @{ $rssitems }, 2, 'rssitems set to number of posts added'); @@ -96,7 +95,6 @@ is($collab->getAtomFeedUrl, '/collab?func=viewAtom', 'getAtomFeedUrl'); note "Mail Cron job tests"; my $dupedCollab = $collab->duplicate(); -addToCleanup(WebGUI::VersionTag->new($session, $dupedCollab->get('tagId'))); ok($dupedCollab->get('getMailCronId'), 'Duplicated CS has a cron job'); isnt($dupedCollab->get('getMailCronId'), $collab->get('getMailCronId'), '... and it is different from its source asset'); @@ -109,10 +107,12 @@ $thread2->archive(); $collab = $collab->cloneFromDb; is $collab->get('threads'), 1, 'CS lost 1 thread due to archiving'; -my $thread3 = $collab->addChild($props, @addChildCoda); -my $tag3 = WebGUI::VersionTag->getWorking($session); -$tag3->commit; -addToCleanup($tag3); +my $thread3 = $collab->addChild({ + className => 'WebGUI::Asset::Post::Thread', + content => "Again!", +}, @addChildCoda); +$thread->setSkipNotification; +$thread3->commit; $collab = $collab->cloneFromDb; is $collab->get('threads'), 2, '... added 1 thread'; diff --git a/t/Asset/Wobject/Collaboration/getThreads.t b/t/Asset/Wobject/Collaboration/getThreads.t index c0556106c..fe69526a7 100644 --- a/t/Asset/Wobject/Collaboration/getThreads.t +++ b/t/Asset/Wobject/Collaboration/getThreads.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,21 +13,19 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../../../lib"; use Test::More; use Test::Deep; use WebGUI::Test; # Must use this before any other WebGUI modules use WebGUI::Session; +my $addArgs = { skipNotifications => 1, skipAutoCommitWorkflows => 1, }; + #---------------------------------------------------------------------------- # Init my $session = WebGUI::Test->session; -my @versionTags = ( WebGUI::VersionTag->getWorking( $session ) ); -WebGUI::Test->addToCleanup($versionTags[-1]); -my @addChildArgs = ( {skipAutoCommitWorkflows=>1} ); -my $collab = WebGUI::Asset->getImportNode( $session )->addChild({ +my $tag = WebGUI::VersionTag->getWorking($session); +my $collab = WebGUI::Test->asset->addChild({ className => 'WebGUI::Asset::Wobject::Collaboration', threadsPerPage => 20, }); @@ -38,29 +36,34 @@ my @threads = ( title => "X - Foo", isSticky => 0, threadRating => 4, - }, undef, 1, @addChildArgs), + }, undef, 1, $addArgs ), $collab->addChild( { className => 'WebGUI::Asset::Post::Thread', title => "W - Bar", isSticky => 0, threadRating => 2, - }, undef, 2, @addChildArgs), + }, undef, 2, $addArgs ), $collab->addChild( { className => 'WebGUI::Asset::Post::Thread', title => "Z - Baz", isSticky => 1, threadRating => 6, - }, undef, 3, @addChildArgs), + }, undef, 3, $addArgs ), $collab->addChild( { className => 'WebGUI::Asset::Post::Thread', title => "Y - Shank", isSticky => 1, threadRating => 5, - }, undef, 4, @addChildArgs), + }, undef, 4, $addArgs ), ); + $_->setSkipNotification for @threads; # 100+ messages later... -$versionTags[-1]->commit; +$tag->commit; + +foreach my $asset ($collab, @threads) { + $asset = $asset->cloneFromDb; +} #---------------------------------------------------------------------------- # Tests @@ -88,13 +91,16 @@ $session->db->write( 'UPDATE Collaboration SET sortBy=NULL,sortOrder=NULL WHERE assetId=?', [$collab->getId] ); -my $collab2 = WebGUI::Asset::Wobject::Collaboration->new( $session, $collab->getId ); +my $collab2 = WebGUI::Asset::Wobject::Collaboration->newById( $session, $collab->getId ); $p = $collab2->getThreadsPaginator; $page = $p->getPageData; $expect = sortThreads( sub { $b->get('revisionDate') <=> $a->get('revisionDate') }, @threads ); cmp_deeply( $page, $expect, 'getThreadsPaginator sort by no default' ) or diag( "GOT: " . Dumper $page ), diag( "EXPECTED: " . Dumper $expect ); undef $collab2; +# clear scratch to reset sort +$session->scratch->delete($collab->getId.'_sortBy'); +$session->scratch->delete($collab->getId.'_sortDir'); # sortBy default from asset $collab->update({ diff --git a/t/Asset/Wobject/Collaboration/permission.t b/t/Asset/Wobject/Collaboration/permission.t index ad56908b9..e23d45291 100644 --- a/t/Asset/Wobject/Collaboration/permission.t +++ b/t/Asset/Wobject/Collaboration/permission.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../../../lib"; use Test::More; use WebGUI::Test; # Must use this before any other WebGUI modules use WebGUI::Session; @@ -26,18 +24,14 @@ use WebGUI::Test::Maker::Permission; my $session = WebGUI::Test->session; $session->user( { userId => 3 } ); my $maker = WebGUI::Test::Maker::Permission->new; -my $node = WebGUI::Asset->getImportNode( $session ); +my $node = WebGUI::Test->asset; my %user; $user{"2"} = WebGUI::User->new( $session, "new" ); $user{"2"}->addToGroups( ['2'] ); # Registered user WebGUI::Test->addToCleanup($user{'2'}); -my $versionTag = WebGUI::VersionTag->getWorking( $session ); -$versionTag->set( { name => "Collaboration Test" } ); -WebGUI::Test->addToCleanup($versionTag); - -my @addArgs = ( undef, undef, { skipAutoCommitWorkflows => 1 } ); +my $tag = WebGUI::VersionTag->getWorking($session); my $collab = $node->addChild({ @@ -47,12 +41,10 @@ my $collab ownerUserId => 3, # Admin postGroupId => 2, # Registered Users canStartThreadGroupId => 3, # Admin - }, @addArgs ); + },); -$versionTag->commit( { timeout => 1_000_000 } ); - -# Re-load the collab to get the newly committed properties -$collab = WebGUI::Asset->newByDynamicClass( $session, $collab->getId ); +$tag->commit; +$collab = $collab->cloneFromDb; #---------------------------------------------------------------------------- # Tests diff --git a/t/Asset/Wobject/Collaboration/templateVariables.t b/t/Asset/Wobject/Collaboration/templateVariables.t index 7cab1d4e0..4c4e604b7 100644 --- a/t/Asset/Wobject/Collaboration/templateVariables.t +++ b/t/Asset/Wobject/Collaboration/templateVariables.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,15 +13,15 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../../../lib"; use WebGUI::Test; # Must use this before any other WebGUI modules use Test::More; use Test::Deep; use Data::Dumper; use WebGUI::Session; +my $addArgs = { skipNotifications => 1, skipAutoCommitWorkflows => 1, }; + #---------------------------------------------------------------------------- # Tests plan tests => 23; # Increment this number for each test you create @@ -29,8 +29,8 @@ plan tests => 23; # Increment this number for each test you create #---------------------------------------------------------------------------- # Init my $session = WebGUI::Test->session; -my @addChildArgs = ( {skipAutoCommitWorkflows=>1, skipNotification => 1, } ); -my $collab = WebGUI::Asset->getImportNode( $session )->addChild({ +my $tag = WebGUI::VersionTag->getWorking($session); +my $collab = WebGUI::Test->asset->addChild({ className => 'WebGUI::Asset::Wobject::Collaboration', threadsPerPage => 20, displayLastReply => 1, @@ -42,19 +42,24 @@ my @threads = ( title => "X - Foo", isSticky => 0, ownerUserId => 1, - }, undef, 1, @addChildArgs), + }, undef, 1, $addArgs ), $collab->addChild( { className => 'WebGUI::Asset::Post::Thread', title => "X - Bar", isSticky => 0, ownerUserId => 3, - }, undef, 2, @addChildArgs), + }, undef, 2, $addArgs ), ); -$_->setSkipNotification for @threads; # 100+ messages later... -my $versionTag = WebGUI::VersionTag->getWorking( $session ); -$versionTag->commit; -WebGUI::Test->addToCleanup($versionTag); +for my $t ( @threads ) { + $t->setSkipNotification; +} + +$tag->commit; + +foreach my $asset ($collab, @threads) { + $asset = $asset->cloneFromDb; +} my $templateVars; my $posts; @@ -89,7 +94,7 @@ ok( !$posts->[0]->{'user.isVisitor'}, 'first post made by visitor'); ok( $posts->[0]->{'hideProfileUrl'}, 'hide profile url, and user is visitor'); ok( !$posts->[0]->{'lastReply.user.isVisitor'}, 'lastReply not made by visitor'); ok( $posts->[0]->{'lastReply.hideProfileUrl'}, 'lastReply hide profile url, since user is visitor'); -is( $posts->[0]->{'lastReply.url'}, $threads[1]->getUrl.'?pn=1#id'.$threads[1]->getId, 'lastReply url has a query fragment prefixed by "id"'); +is( $posts->[0]->{'lastReply.url'}, $threads[1]->getUrl.'#id'.$threads[1]->getId, 'lastReply url has a query fragment prefixed by "id"'); is( $posts->[0]->{'url'}, $threads[1]->getUrl.'#id'.$threads[1]->getId, 'url has a query fragment prefixed by "id"'); @@ -100,18 +105,18 @@ is( $posts->[0]->{'url'}, $threads[1]->getUrl.'#id'.$threads[1]->getId, 'url ha ################################################################### my @newThreads = (); +my $vt2 = WebGUI::VersionTag->getWorking($session); foreach my $index (1 .. 5) { $newThreads[$index] = $collab->addChild( { className => 'WebGUI::Asset::Post::Thread', title => "X - Bar", isSticky => 0, ownerUserId => 3, - }, undef, 2+$index, @addChildArgs); + }, undef, 2+$index, $addArgs ); $newThreads[$index]->setSkipNotification; } -my $vt2 = WebGUI::VersionTag->getWorking($session); $vt2->commit; -addToCleanup($versionTag); +WebGUI::Test->addToCleanup($vt2); $session->user({userId => 3}); $templateVars = $collab->getViewTemplateVars(); diff --git a/t/Asset/Wobject/Collaboration/unarchiveAll.t b/t/Asset/Wobject/Collaboration/unarchiveAll.t index ff3610d6c..5e7964a49 100644 --- a/t/Asset/Wobject/Collaboration/unarchiveAll.t +++ b/t/Asset/Wobject/Collaboration/unarchiveAll.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../../../lib"; use Test::More; use WebGUI::Test; # Must use this before any other WebGUI modules use WebGUI::Session; @@ -23,10 +21,12 @@ use WebGUI::Session; #---------------------------------------------------------------------------- # Init my $session = WebGUI::Test->session; +$session->user({ userId => '3' }); my $collab = WebGUI::Asset->getImportNode( $session )->addChild({ className => 'WebGUI::Asset::Wobject::Collaboration', archiveAfter => 60*60*365.25, + groupIdEdit => '3', }); # Add a thread @@ -35,12 +35,15 @@ my @threads = ( className => 'WebGUI::Asset::Post::Thread', status => 'archived', title => 'Archived', - }, undef, undef, { skipAutoCommitWorkflows => 1, skipNotification => 1 }), + groupIdEdit => '3', + }), ); +for my $t ( @threads ) { + $t->setSkipNotification; + $t->commit; +} -my $tag = WebGUI::VersionTag->getWorking( $session ); -$tag->commit; -WebGUI::Test->addToCleanup($tag); +WebGUI::Test->addToCleanup($collab,@threads); #---------------------------------------------------------------------------- # Tests @@ -49,8 +52,9 @@ plan tests => 1; # Increment this number for each test you create #---------------------------------------------------------------------------- # www_unarchiveAll sets all threads to approved +note( $threads[0]->status ); $collab->www_unarchiveAll; -$threads[0] = WebGUI::Asset->newByDynamicClass( $session, $threads[0]->getId ); +$threads[0] = $threads[0]->cloneFromDb; is( $threads[0]->get('status'), 'approved', "unarchiveAll sets thread to approved" ); #vim:ft=perl diff --git a/t/Asset/Wobject/DataForm.t b/t/Asset/Wobject/DataForm.t index dea735556..51d62b1f4 100644 --- a/t/Asset/Wobject/DataForm.t +++ b/t/Asset/Wobject/DataForm.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,12 +13,11 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use Test::More; use Test::Deep; use WebGUI::Test; # Must use this before any other WebGUI modules +use WebGUI::Test::Mechanize; use WebGUI::Asset; use WebGUI::Asset::Wobject::DataForm; use WebGUI::VersionTag; @@ -29,47 +28,49 @@ use WebGUI::Session; my $session = WebGUI::Test->session; # Create a DataForm -my $df = WebGUI::Asset->getImportNode( $session ) +my $tag = WebGUI::VersionTag->getWorking($session); +my $df = WebGUI::Test->asset ->addChild( { className => "WebGUI::Asset::Wobject::DataForm", mailData => 0, fieldConfiguration => '[]', - } ); + }, undef, time-10 ); -my $dform = WebGUI::Asset->getDefault($session)->addChild({ +my $dform = WebGUI::Test->asset->addChild({ className => "WebGUI::Asset::Wobject::DataForm", mailData => 0, -}); +}, undef, time-5); $dform->createField('gotCaptcha', { type => 'Captcha', name => 'humanCheck', }); - -my $versionTag = WebGUI::VersionTag->getWorking($session); -WebGUI::Test->addToCleanup($versionTag); -$versionTag->commit; +$tag->commit; +$df = $df->cloneFromDb; +$dform = $dform->cloneFromDb; #---------------------------------------------------------------------------- # Tests -plan tests => 4; # Increment this number for each test you create +plan tests => 18; # Increment this number for each test you create #---------------------------------------------------------------------------- # _createForm -WebGUI::Test->interceptLogging; +WebGUI::Test->interceptLogging( sub { + my $log_data = shift; -$df->_createForm( - { - name => 'test field', - type => 'MASSIVE FORM FAILURE', - }, - 'some value' -); + $df->_createForm( + { + name => 'test field', + type => 'MASSIVE FORM FAILURE', + }, + 'some value' + ); -is($WebGUI::Test::logger_error, "Unable to load form control - MASSIVE FORM FAILURE", '_createForm logs when it cannot load a form type'); + is($log_data->{error}, "Unable to load form control - MASSIVE FORM FAILURE", '_createForm logs when it cannot load a form type'); +}); #---------------------------------------------------------------------------- # getContentLastModified -sleep 3; +sleep 3; # whyyyyyyyy $df->{_mode} = 'form'; is($df->getContentLastModified, $df->get('lastModified'), 'getContentLastModified: form normally returns lastModified'); @@ -88,4 +89,107 @@ cmp_ok( '... form with a captcha does not return lastModified, even in form mode' ); +#---------------------------------------------------------------------------- +# www_editField +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get_ok('/'); +$mech->session->user({ userId => 3 }); + +# Create a new field +$mech->get_ok( $df->getUrl( 'func=editField;fieldName=new' ) ); +$mech->submit_form_ok( { + fields => { + label => 'Request', + newName => 'request', + tabId => 0, + subtext => 'Submit your request to the circular file', + type => "Textarea", + }, +}, "add a new field" ); + +$df = WebGUI::Asset->newById( $mech->session, $df->getId ); +cmp_deeply( + $df->getFieldConfig( "request" ), + superhashof( { + label => 'Request', + name => 'request', + tabId => undef, + subtext => 'Submit your request to the circular file', + type => 'Textarea', + } ), + "field exists with correct config", +); + +# Edit that field +sleep 1; # stupid addRevision +$mech->get_ok( $df->getUrl( 'func=editField;fieldName=request' ) ); +$mech->submit_form_ok( { + fields => { + label => 'Beg Here', + tabId => 0, + subtext => 'Throw yourself upon the mercy of the manager', + }, +}, "edit the field" ); + +$df = WebGUI::Asset->newPending( $mech->session, $df->getId ); +cmp_deeply( + $df->getFieldConfig( "request" ), + superhashof( { + label => 'Beg Here', + name => 'request', + tabId => undef, + subtext => 'Throw yourself upon the mercy of the manager', + type => 'Textarea', + } ), + "field config updated", +); + + +#---------------------------------------------------------------------------- +# www_editTab +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get_ok('/'); +$mech->session->user({ userId => 3 }); + +# Create a new tab +$mech->get_ok( $df->getUrl( 'func=editTab' ) ); +$mech->submit_form_ok( { + fields => { + label => 'Request Info', + subtext => "We won't be reading it, but fill it out anyway or get fired.", + }, +}, "add a new tab" ); + +$df = WebGUI::Asset->newById( $mech->session, $df->getId ); +# Figure out the ID +my $tabId = ( keys %{$df->getTabConfig} )[0]; +cmp_deeply( + $df->getTabConfig( $tabId ), + superhashof( { + label => 'Request Info', + subtext => "We won't be reading it, but fill it out anyway or get fired.", + } ), + "tab exists with correct config", +); + +# Edit that tab +sleep 1; # stupid addRevision +$mech->get_ok( $df->getUrl( 'func=editTab;tabId=' . $tabId ) ); +$mech->submit_form_ok( { + fields => { + label => 'Begging Info', + subtext => "Adding puppydog eyes may help your case, slightly", + }, +}, "edit the tab" ); + +$df = WebGUI::Asset->newPending( $mech->session, $df->getId ); +cmp_deeply( + $df->getTabConfig( $tabId ), + superhashof( { + label => 'Begging Info', + subtext => "Adding puppydog eyes may help your case, slightly", + } ), + "tab config updated", +); + #vim:ft=perl diff --git a/t/Asset/Wobject/DataForm/addEntry.t b/t/Asset/Wobject/DataForm/addEntry.t new file mode 100644 index 000000000..bd5fdedf5 --- /dev/null +++ b/t/Asset/Wobject/DataForm/addEntry.t @@ -0,0 +1,74 @@ +# vim:syntax=perl +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 +#------------------------------------------------------------------ + +# Test the viewList and related methods of the DataForm +# +# + +use strict; +use Test::More; +use Test::Deep; +use WebGUI::Test; # Must use this before any other WebGUI modules +use WebGUI::Session; + +#---------------------------------------------------------------------------- +# Init +my $session = WebGUI::Test->session; + +my $df = WebGUI::Test->asset->addChild( { + className => 'WebGUI::Asset::Wobject::DataForm', +} ); + +# Add fields to the dataform +$df->createField( "name", { type => "text", } ); +$df->createField( "message", { type => "text", } ); + +# Add entries to the dataform +my @entryProperties = ( + { + name => "Andy", + subject => "Problem!", + message => "I need a Rita Heyworth", + }, + { + name => "Red", + subject => "Solution!", + message => "I need about tree fiddy", + } +); + +my $birthday = WebGUI::Test->webguiBirthday; + +is $df->entryClass, 'WebGUI::AssetCollateral::DataForm::Entry', 'entry class returns the right class'; + +ok ! $df->hasEntries, 'hasEntries: no entries yet'; + +my $entry; +$entry = $df->entryClass->newFromHash( $df, $entryProperties[0] ); +isa_ok $entry, $df->entryClass; + +$entry->submissionDate(WebGUI::DateTime->new($session, $birthday++)); +my $entryId = $entry->save; +ok $session->id->valid($entryId), 'save returns the entryId, a GUID'; + +ok $df->hasEntries, 'hasEntries returns true after entries added'; +is $df->entryClass->getCount($df), 1, 'getCount returns the number of entries'; + +$entry = $df->entryClass->newFromHash( $df, $entryProperties[0] ); +isa_ok $entry, $df->entryClass; + +$entry->submissionDate(WebGUI::DateTime->new($session, $birthday++)); +$entry->save; +ok $df->hasEntries, 'hasEntries returns true after entries added'; +is $df->entryClass->getCount($df), 2, 'count incremented'; + +done_testing; +#vim:ft=perl diff --git a/t/Asset/Wobject/DataForm/diagnose.t b/t/Asset/Wobject/DataForm/diagnose.t index 27f0020ff..825c02a61 100644 --- a/t/Asset/Wobject/DataForm/diagnose.t +++ b/t/Asset/Wobject/DataForm/diagnose.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../../../lib"; ##The goal of this test is to diagnose problems in DataForms. ## Orphaned DataForms with no Asset table entries diff --git a/t/Asset/Wobject/DataForm/moveField.t b/t/Asset/Wobject/DataForm/moveField.t index f81adf357..2199e9042 100644 --- a/t/Asset/Wobject/DataForm/moveField.t +++ b/t/Asset/Wobject/DataForm/moveField.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../../../lib"; use Test::More; use Test::Deep; use WebGUI::Test; # Must use this before any other WebGUI modules diff --git a/t/Asset/Wobject/DataForm/viewForm.t b/t/Asset/Wobject/DataForm/viewForm.t index 8cf5cd5c6..dec947fac 100644 --- a/t/Asset/Wobject/DataForm/viewForm.t +++ b/t/Asset/Wobject/DataForm/viewForm.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -25,7 +25,7 @@ use WebGUI::Session; # Init my $session = WebGUI::Test->session; -my $df = WebGUI::Asset->getImportNode($session)->addChild( { +my $df = WebGUI::Test->asset->addChild( { className => 'WebGUI::Asset::Wobject::DataForm', defaultview => 0, templateId => 'PBtmpl0000000000000141', @@ -35,12 +35,6 @@ my $df = WebGUI::Asset->getImportNode($session)->addChild( { $df->createField( "bigName", { type => "textarea", isHidden => 0, } ); $df->createField( "messageCount", { type => "integer", isHidden => 0, } ); -my $tag = WebGUI::VersionTag->getWorking( $session ); -WebGUI::Test->addToCleanup( $tag ); -$tag->commit; - -$df = $df->cloneFromDb; - #---------------------------------------------------------------------------- # Tests diff --git a/t/Asset/Wobject/DataForm/viewList.t b/t/Asset/Wobject/DataForm/viewList.t index c7630cce5..887652357 100644 --- a/t/Asset/Wobject/DataForm/viewList.t +++ b/t/Asset/Wobject/DataForm/viewList.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../../../lib"; use Test::More; use Test::Deep; use WebGUI::Test; # Must use this before any other WebGUI modules @@ -25,12 +23,10 @@ use WebGUI::Session; # Init my $session = WebGUI::Test->session; -my $df = WebGUI::Asset->getImportNode($session)->addChild( { +my $df = WebGUI::Test->asset->addChild( { className => 'WebGUI::Asset::Wobject::DataForm', } ); -addToCleanup( WebGUI::VersionTag->getWorking( $session ) ); - # Add fields to the dataform $df->createField( "name", { type => "text", } ); $df->createField( "message", { type => "text", } ); @@ -145,7 +141,7 @@ while ( $entryIdx >= 0 ) { 'record.entryId' => $entries[$entryIdx]->getId, 'record.userId' => $session->user->userId, 'record.username' => $session->user->username, - 'record.ipAddress' => undef, + 'record.ipAddress' => $session->request->address, 'record.delete.icon' => ignore(), 'record.delete.url' => ignore(), 'record.edit.icon' => ignore(), diff --git a/t/Asset/Wobject/DataTable.t b/t/Asset/Wobject/DataTable.t index bf23b805b..ddf24f30e 100644 --- a/t/Asset/Wobject/DataTable.t +++ b/t/Asset/Wobject/DataTable.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use Test::More; use Test::Deep; use JSON; diff --git a/t/Asset/Wobject/EventManagementSystem.t b/t/Asset/Wobject/EventManagementSystem.t index d6de3906b..d85521132 100644 --- a/t/Asset/Wobject/EventManagementSystem.t +++ b/t/Asset/Wobject/EventManagementSystem.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,11 +13,11 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use Test::More; use WebGUI::Test; # Must use this before any other WebGUI modules +use WebGUI::Test::Mechanize; +use WebGUI::Test::MockAsset; use WebGUI::Session; use WebGUI::User; use WebGUI::Group; @@ -40,38 +40,25 @@ $registrars->addUsers([$registrar->getId]); $attendees->addUsers([$attender->getId]); # Do our work in the import node -my $node = WebGUI::Asset->getImportNode($session); +my $node = WebGUI::Test->asset; # Create a version tag to work in my $versionTag = WebGUI::VersionTag->getWorking($session); $versionTag->set({name=>"EventManagementSystem Test"}); -#---------------------------------------------------------------------------- -# Tests - -plan tests => 41; # Increment this number for each test you create - -#---------------------------------------------------------------------------- - -# check base module and all related -use_ok('WebGUI::Asset::Wobject::EventManagementSystem'); -use_ok('WebGUI::Asset::Sku::EMSBadge'); -use_ok('WebGUI::Asset::Sku::EMSTicket'); -use_ok('WebGUI::Asset::Sku::EMSRibbon'); -use_ok('WebGUI::Asset::Sku::EMSToken'); - # Add an EMS asset my $ems = $node->addChild({ className =>'WebGUI::Asset::Wobject::EventManagementSystem', title => 'Test EMS', description => 'This is a test ems', - url => '/test-ems', + url => 'test-ems', workflowIdCommit => 'pbworkflow000000000003', # Commit Content Immediately registrationStaffGroupId => $registrars->getId, - groupIdView => $attendees->getId + groupIdView => $attendees->getId, }); $versionTag->commit; WebGUI::Test->addToCleanup($versionTag); +$ems = $ems->cloneFromDb; # Test for a sane object type isa_ok($ems, 'WebGUI::Asset::Wobject::EventManagementSystem'); @@ -181,14 +168,12 @@ my $printRemainingTicketsTemplateId = $ems->get('printRemainingTicketsTemplateId is($printRemainingTicketsTemplateId, "hreA_bgxiTX-EzWCSZCZJw", 'Default print remaining tickets template id ok'); #Make sure printRemainingTickets template returns the right data -my $templateMock = Test::MockObject->new({}); -$templateMock->set_isa('WebGUI::Asset::Template'); -$templateMock->set_always('getId', $printRemainingTicketsTemplateId); -my $templateVars; -$templateMock->mock('process', sub { $templateVars = $_[1]; } ); - { - WebGUI::Test->mockAssetId($printRemainingTicketsTemplateId, $templateMock); + my $templateMock = WebGUI::Test::MockAsset->new('WebGUI::Asset::Template'); + $templateMock->mock_id($printRemainingTicketsTemplateId); + my $templateVars; + $templateMock->mock('process', sub { $templateVars = $_[1]; } ); + $ems->www_printRemainingTickets(); my $ticket1 = { @@ -345,38 +330,39 @@ $templateMock->mock('process', sub { $templateVars = $_[1]; } ); 'eventSubmissionQueueTemplateId' => ignore(), 'eventSubmissionTemplateId' => ignore(), 'submittedLocationsList' => ignore(), + 'keywords' => ignore(), + 'uiLevel' => ignore(), 'tickets_loop' => \@ticketArray, + controls => ignore(), keywords => ignore(), }, "www_printRemainingTickets: template variables valid" ); - - WebGUI::Test->unmockAssetId($printRemainingTicketsTemplateId); } #Make sure permissions work on pages my $data; $session->user({userId => $crasher->getId}); -$session->http->setStatus(201); +$session->response->status(201); $data = $ems->www_viewSchedule(); -is($session->http->getStatus, 401, 'www_viewSchedule: visitor may not see the schedule'); +is($session->response->status, 401, 'www_viewSchedule: visitor may not see the schedule'); $data = $ems->www_printRemainingTickets(); -is($session->http->getStatus, 401, 'www_printRemainingTickets: visitor may not print the remaining tickets'); +is($session->response->status, 401, 'www_printRemainingTickets: visitor may not print the remaining tickets'); -$session->http->setStatus(201); +$session->response->status(201); $session->user({userId => $attender->getId}); $data = $ems->www_viewSchedule(); -is($session->http->getStatus, 201, '... attender user can see the schedule'); +is($session->response->status, 201, '... attender user can see the schedule'); $data = $ems->www_printRemainingTickets(); -is($session->http->getStatus, 401, 'www_printRemainingTickets: attender may not print the remaining tickets'); +is($session->response->status, 401, 'www_printRemainingTickets: attender may not print the remaining tickets'); -$session->http->setStatus(201); +$session->response->status(201); $session->user({userId => $registrar->getId}); $data = $ems->www_printRemainingTickets(); -is($session->http->getStatus, 201, 'www_printRemainingTickets: registration staff may print the remaining tickets'); +is($session->response->status, 201, 'www_printRemainingTickets: registration staff may print the remaining tickets'); -$session->http->setStatus(201); +$session->response->status(201); $session->user({userId => $crasher->getId}); my ($json, $records); $json = $ems->www_getScheduleDataJSON(); @@ -632,3 +618,216 @@ cmp_deeply( JSON::from_json($data), { 'Location page #2 looks good' ); +#---------------------------------------------------------------------------- +# www_editBadgeGroup +my $ems_tag = WebGUI::VersionTag->getWorking($session); +$ems = WebGUI::Test->asset( + className => 'WebGUI::Asset::Wobject::EventManagementSystem', + groupIdEdit => '3', +); +$ems_tag->commit; +$ems = $ems->cloneFromDb; + +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get_ok('/'); +$mech->session->user({ userId => 3 }); + +# Create a new one +$mech->get_ok( $ems->getUrl( 'func=editBadgeGroup;badgeGroupId=new' ), "Get form to create a new badge group" ); +$mech->submit_form_ok( { + fields => { + name => 'Inmate Training', + }, +}, "create a new badge group" ); + +my $bgroup = $session->db->quickHashRef( + "SELECT * FROM EMSBadgeGroup WHERE name=?", + [ "Inmate Training" ], +); +ok( $bgroup, "Badge group exists" ); +is( $bgroup->{emsAssetId}, $ems->getId, 'ems asset id set correctly' ); + +# Edit existing one +$mech->get_ok( + $ems->getUrl( 'func=editBadgeGroup;badgeGroupId=' . $bgroup->{badgeGroupId} ), + "Get form to edit our badge group", +); +$mech->submit_form_ok( { + fields => { + name => 'Inmate Beating', + }, +}, "Edit an existing badge group" ); + +$bgroup = $session->db->quickHashRef( + "SELECT * FROM EMSBadgeGroup WHERE badgeGroupId=?", + [ $bgroup->{badgeGroupId} ], +); +ok( $bgroup, "Badge group exists" ); +is( $bgroup->{emsAssetId}, $ems->getId, 'ems asset id set correctly' ); +is( $bgroup->{name}, "Inmate Beating", 'badge name set correctly' ); + +#---------------------------------------------------------------------------- +# www_editEventMetaField +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get_ok('/'); +$mech->session->user({ userId => 3 }); + +# Create a new one +my %metaField = ( + label => 'Security Level', + visible => 1, + required => 1, + dataType => 'Text', + helpText => 'What security level is required for this event?', +); + +$mech->get_ok( $ems->getUrl( 'func=editEventMetaField' ), 'Get form to create new meta field' ); +$mech->submit_form_ok( { + fields => { %metaField }, +}, 'create a new meta field' ); + +# Meta field exists +my $field = $session->db->quickHashRef( + "SELECT * FROM EMSEventMetaField WHERE assetId=?", + [ $ems->getId ], +); +ok( $field, 'meta field exists' ); +cmp_deeply( + $field, + superhashof( { %metaField, assetId => $ems->getId } ), + 'meta field contains correct data', +); + +# Edit existing one +$metaField{ helpText } = "This is new help text"; +$mech->get_ok( + $ems->getUrl( 'func=editEventMetaField;fieldId=' . $field->{fieldId} ), + 'Get form to edit meta field' +); +$mech->submit_form_ok( { + fields => { %metaField }, +}, 'create a new meta field' ); + +# Meta field still exists +my $field = $session->db->quickHashRef( + "SELECT * FROM EMSEventMetaField WHERE assetId=?", + [ $ems->getId ], +); +ok( $field, 'meta field exists' ); +cmp_deeply( + $field, + superhashof( { %metaField, assetId => $ems->getId } ), + 'meta field contains correct data', +); + +#---------------------------------------------------------------------------- +# getEventFieldsForImport +use Data::Dumper; +my $fields = $ems->getEventFieldsForImport; +cmp_deeply( + $fields, + array_each( superhashof( { + type => ignore(), + name => ignore(), + label => ignore(), + } ) ), + 'getEventFieldsForImport contains correct items', +); + +#---------------------------------------------------------------------------- +# www_importEvents +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get_ok('/'); +$mech->session->user({ userId => 3 }); + +$mech->get_ok( $ems->getUrl( 'func=importEvents' ), 'get form to import events' ); +$mech->set_fields( + file_file => WebGUI::Test::collateral( "ems_events.csv" ), + ignore_first_line => 1, +); +# Remove the fields we don't have +my @unticks = qw( assetId vendorId seatsAvailable price eventNumber location relatedBadgeGroups + relatedRibbons +); +for my $val ( @unticks ) { + $mech->untick( 'fieldsToImport', $val ); +} +$mech->click_ok( "send", "import files" ); + +# Events exist +my $events = $ems->getLineage( ['children'], { + includeOnlyClasses => ['WebGUI::Asset::Sku::EMSTicket'], + returnObjects => 1, +} ); +is( scalar @$events, 2, '2 events added' ); +cmp_deeply( + [ map { $_->get } sort { $a->title cmp $b->title } @$events ], + [ superhashof( + { + title => "One", + description => "Oneness", + startDate => WebGUI::DateTime->new( $session, mysql => '2010-01-01 00:00:00', time_zone => $session->user->get('timeZone'), )->toMysql, + duration => 2, + } + ), + superhashof( + { + title => 'Two', + description => 'Twoness', + startDate => WebGUI::DateTime->new( $session, mysql => '2010-02-02 00:00:00', time_zone => $session->user->get('timeZone') )->toMysql, + duration => 3, + } + ), + ], + 'correct asset props are set' +); + + +#---------------------------------------------------------------------------- +# www_manageRegistrant +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get_ok('/'); +$mech->session->user({ userId => 3 }); + +# Need a badge +my $badger_tag = WebGUI::VersionTag->getWorking($session); +my $badger = $ems->addChild({ + className => 'WebGUI::Asset::Sku::EMSBadge', + title => 'Badgers', + }); +$badger_tag->commit; +$badger = $badger->cloneFromDb; +# Add cart and complete checkout +my $regBadgeId + = $session->db->setRow( 'EMSRegistrant', 'badgeId', { + badgeId => "new", + badgeAssetId => $badger->getId, + emsAssetId => $ems->getId, + } ); + +$mech->get_ok( $ems->getUrl( 'func=manageRegistrant;badgeId=' . $regBadgeId ) ); +my %reg = ( + userId => '3', + name => 'Homer S.', + address1 => '742 Evergreen Terr.', + city => 'Springfield', + notes => 'Will need assistance.', +); +$mech->submit_form_ok({ + fields => { %reg }, + }, + "save our registrant's information" +); + +my $regInfo = $session->db->getRow( 'EMSRegistrant', 'badgeId', $regBadgeId ); +cmp_deeply( + $regInfo, + superhashof( { + %reg, + badgeAssetId => $badger->getId, + emsAssetId => $ems->getId, + } ), + "Registrant info saved correctly", +); + +done_testing; diff --git a/t/Asset/Wobject/Folder.t b/t/Asset/Wobject/Folder.t index 7336595f3..3ebbc70bf 100644 --- a/t/Asset/Wobject/Folder.t +++ b/t/Asset/Wobject/Folder.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/Asset/Wobject/Gallery/00base.t b/t/Asset/Wobject/Gallery/00base.t index f01e04ccd..90f1c20fc 100644 --- a/t/Asset/Wobject/Gallery/00base.t +++ b/t/Asset/Wobject/Gallery/00base.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../../../lib"; ## The goal of this test is to test the creation and deletion of gallery assets @@ -41,6 +39,8 @@ my $gallery }); $versionTag->commit; +WebGUI::Test->addToCleanup($versionTag); +$gallery->cloneFromDb; is( Scalar::Util::blessed($gallery), "WebGUI::Asset::Wobject::Gallery", @@ -62,9 +62,7 @@ isa_ok( my $properties = $gallery->get; $gallery->purge; -is( - WebGUI::Asset->newByDynamicClass($session, $properties->{assetId}), undef, - "Gallery no longer able to be instanciated", -); +eval { WebGUI::Asset->newById($session, $properties->{assetId}); }; +ok( Exception::Class->caught(), 'Gallery no longer able to be instanciated after purge'); #vim:ft=perl diff --git a/t/Asset/Wobject/Gallery/permission.t b/t/Asset/Wobject/Gallery/permission.t index 0b167aa4f..722207b72 100644 --- a/t/Asset/Wobject/Gallery/permission.t +++ b/t/Asset/Wobject/Gallery/permission.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../../../lib"; ## The goal of this test is to test permissions inside Gallerys @@ -22,10 +20,7 @@ use Test::More; #---------------------------------------------------------------------------- # Init my $session = WebGUI::Test->session; -my $node = WebGUI::Asset->getImportNode($session); -my $versionTag = WebGUI::VersionTag->getWorking($session); -$versionTag->set({name=>"Gallery Test"}); -WebGUI::Test->addToCleanup($versionTag); +my $node = WebGUI::Test->asset; my $maker = WebGUI::Test::Maker::Permission->new; my $gallery; diff --git a/t/Asset/Wobject/Gallery/search.t b/t/Asset/Wobject/Gallery/search.t index b17b0d7c1..43e4855a6 100644 --- a/t/Asset/Wobject/Gallery/search.t +++ b/t/Asset/Wobject/Gallery/search.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../../../lib"; # Test of the Gallery basic and advanced search. In non-live tests, the Gallery # search is accessed via the "search" method. Form parameters are passed in via @@ -34,17 +32,12 @@ my $node = WebGUI::Asset->getImportNode($session); my $versionTag = WebGUI::VersionTag->getWorking($session); $versionTag->set( { name=>"Gallery Search Test" } ); -addToCleanup( $versionTag ); +WebGUI::Test->addToCleanup( $versionTag ); # Create gallery and a single album my $gallery = $node->addChild({ className => "WebGUI::Asset::Wobject::Gallery", - }, - undef, - undef, - { - skipAutoCommitWorkflows => 1, }); my $album @@ -53,11 +46,6 @@ my $album title => "album", synopsis => "synopsis2", keywords => "group2", - }, - undef, - undef, - { - skipAutoCommitWorkflows => 1, }); my $albumId = $album->getId; @@ -69,11 +57,6 @@ my $photo1 synopsis => "synopsis1", keywords => "group1", location => "Heidelberg", - }, - undef, - undef, - { - skipAutoCommitWorkflows => 1, }); my $id1 = $photo1->getId; @@ -84,11 +67,6 @@ my $photo2 synopsis => "synopsis2", keywords => "group1", location => "Mannheim", - }, - undef, - undef, - { - skipAutoCommitWorkflows => 1, }); my $id2 = $photo2->getId; @@ -99,11 +77,6 @@ my $photo3 synopsis => "synopsis1", keywords => "group2", location => "Mannheim", - }, - undef, - undef, - { - skipAutoCommitWorkflows => 1, }); my $id3 = $photo3->getId; diff --git a/t/Asset/Wobject/GalleryAlbum/00base.t b/t/Asset/Wobject/GalleryAlbum/00base.t index 75cde0ed2..8a25697de 100644 --- a/t/Asset/Wobject/GalleryAlbum/00base.t +++ b/t/Asset/Wobject/GalleryAlbum/00base.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../../../lib"; ## The goal of this test is to test the creation and deletion of album assets @@ -22,10 +20,7 @@ use Test::More; #---------------------------------------------------------------------------- # Init my $session = WebGUI::Test->session; -my $node = WebGUI::Asset->getImportNode($session); -my $versionTag = WebGUI::VersionTag->getWorking($session); -$versionTag->set({name=>"Album Test"}); -WebGUI::Test->addToCleanup($versionTag); +my $node = WebGUI::Test->asset; my $gallery = $node->addChild({ className => "WebGUI::Asset::Wobject::Gallery", @@ -44,15 +39,8 @@ use_ok("WebGUI::Asset::Wobject::GalleryAlbum"); my $album = $gallery->addChild({ className => "WebGUI::Asset::Wobject::GalleryAlbum", - }, - undef, - undef, - { - skipAutoCommitWorkflows => 1, }); -$versionTag->commit; - is( Scalar::Util::blessed($album), "WebGUI::Asset::Wobject::GalleryAlbum", "Album is a WebGUI::Asset::Wobject::GalleryAlbum object", @@ -67,10 +55,7 @@ isa_ok( my $properties = $album->get; $album->purge; -is( - WebGUI::Asset->newByDynamicClass($session, $properties->{assetId}), undef, - "Album no longer able to be instanciated", -); - +eval { WebGUI::Asset->newById($session, $properties->{assetId}); }; +ok( Exception::Class->caught(), 'Album no longer able to be instanciated'); #vim:ft=perl diff --git a/t/Asset/Wobject/GalleryAlbum/addArchive.t b/t/Asset/Wobject/GalleryAlbum/addArchive.t index 2e72019f9..43e14a2f3 100644 --- a/t/Asset/Wobject/GalleryAlbum/addArchive.t +++ b/t/Asset/Wobject/GalleryAlbum/addArchive.t @@ -1,6 +1,6 @@ # $vim: syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -9,9 +9,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../../../lib"; ## The goal of this test is to test the permissions of GalleryAlbum assets @@ -25,9 +23,8 @@ use Test::Deep; my $session = WebGUI::Test->session; my $node = WebGUI::Asset->getImportNode($session); my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->set({name=>"Add Archive to Album Test"}); -addToCleanup($versionTag); +WebGUI::Test->addToCleanup($versionTag); my $gallery = $node->addChild({ @@ -43,20 +40,8 @@ my $album = $gallery->addChild({ className => "WebGUI::Asset::Wobject::GalleryAlbum", ownerUserId => "3", # Admin - }, - undef, - undef, - { - skipAutoCommitWorkflows => 1, }); -# Properties applied to every photo in the archive -my $properties = { - keywords => "something", - location => "somewhere", - friendsOnly => "1", -}; - $versionTag->commit; @@ -70,6 +55,13 @@ plan tests => 11; # elephant_images.zip contains three jpgs: Aana1.jpg, Aana2.jpg, Aana3.jpg $versionTag = WebGUI::VersionTag->getWorking($session); +# Properties applied to every photo in the archive +my $properties = { + keywords => "something", + location => "somewhere", + friendsOnly => "1", +}; + $album->addArchive( WebGUI::Test->getTestCollateralPath('elephant_images.zip'), $properties ); my $images = $album->getLineage(['descendants'], { returnObjects => 1 }); diff --git a/t/Asset/Wobject/GalleryAlbum/ajax.t b/t/Asset/Wobject/GalleryAlbum/ajax.t index ec15521f3..5720a6dc7 100644 --- a/t/Asset/Wobject/GalleryAlbum/ajax.t +++ b/t/Asset/Wobject/GalleryAlbum/ajax.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../../../lib"; ## The goal of this test is to test the creation and deletion of album assets @@ -18,13 +16,12 @@ use JSON; use WebGUI::Test; use WebGUI::Session; use Test::More; +use WebGUI::Asset::Wobject::GalleryAlbum; #---------------------------------------------------------------------------- # Init my $session = WebGUI::Test->session; -my $node = WebGUI::Asset->getImportNode($session); -my $versionTag = WebGUI::VersionTag->getWorking($session); -WebGUI::Test->addToCleanup($versionTag); +my $node = WebGUI::Test->asset; my %user; $user{'1'} = WebGUI::User->new( $session, "new" ); @@ -36,27 +33,15 @@ WebGUI::Test->addToCleanup($user{'2'}); # Create everything as user no. 1 $session->user({ user => $user{'1'} }); -$versionTag->set({name=>"Album Test"}); - # Create gallery and a single album my $gallery = $node->addChild({ className => "WebGUI::Asset::Wobject::Gallery", groupIdEdit => 3, # Admins - }, - undef, - undef, - { - skipAutoCommitWorkflows => 1, }); my $album = $gallery->addChild({ className => "WebGUI::Asset::Wobject::GalleryAlbum", - }, - undef, - undef, - { - skipAutoCommitWorkflows => 1, }); # Create 5 photos inside the gallery @@ -67,18 +52,10 @@ for (my $i = 0; $i < 5; $i++) my $photo = $album->addChild({ className => "WebGUI::Asset::File::GalleryFile::Photo", - }, - undef, - undef, - { - skipAutoCommitWorkflows => 1, }); $photoId[$i] = $photo->getId; } -# Commit all changes -$versionTag->commit; - # Make album default asset $session->asset( $album ); @@ -87,16 +64,12 @@ my $result; #---------------------------------------------------------------------------- # Tests -plan tests => 19; - -#---------------------------------------------------------------------------- -# Test module compiles okay -use_ok("WebGUI::Asset::Wobject::GalleryAlbum"); +plan tests => 18; #---------------------------------------------------------------------------- # Test calling without arguments -diag("general testing"); +note("general testing"); # Provide no arguments at all $result = callAjaxService({ }); @@ -106,7 +79,7 @@ ok( $result->{ err } != 0 && $result->{ errMessage }, "Error after call without #---------------------------------------------------------------------------- # Test moveFile action with incomplete of invalid arguments -diag("moveFile action"); +note("moveFile action"); # Omit target $result = callAjaxService({ @@ -251,7 +224,7 @@ sub callAjaxService { my $args = shift; # Setup the mock request object - $session->request->method('POST'); + $session->request->env->{'REQUEST_METHOD'} = 'POST'; $session->request->setup_body({ args => encode_json($args) }); # Call ajax service function and decode reply diff --git a/t/Asset/Wobject/GalleryAlbum/delete.t b/t/Asset/Wobject/GalleryAlbum/delete.t index 8834d2f32..4e1fed04e 100644 --- a/t/Asset/Wobject/GalleryAlbum/delete.t +++ b/t/Asset/Wobject/GalleryAlbum/delete.t @@ -1,6 +1,6 @@ # $vim: syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -9,9 +9,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../../../lib"; ## The goal of this test is to test the deleting of GalleryAlbums @@ -25,10 +23,7 @@ use Test::More; my $maker = WebGUI::Test::Maker::HTML->new; my $session = WebGUI::Test->session; $session->user({ userId => 3 }); -my $node = WebGUI::Asset->getImportNode($session); -my $versionTag = WebGUI::VersionTag->getWorking($session); -$versionTag->set({name=>"Album Test"}); -WebGUI::Test->addToCleanup($versionTag); +my $node = WebGUI::Test->asset; my $gallery = $node->addChild({ className => "WebGUI::Asset::Wobject::Gallery", @@ -42,15 +37,8 @@ my $album = $gallery->addChild({ className => "WebGUI::Asset::Wobject::GalleryAlbum", ownerUserId => "3", # Admin - }, - undef, - undef, - { - skipAutoCommitWorkflows => 1, }); -$versionTag->commit; - #---------------------------------------------------------------------------- # Tests plan tests => 5; @@ -96,11 +84,7 @@ $maker->prepare({ }); $maker->run; -is( - WebGUI::Asset->newByDynamicClass( $session, $assetId ), - undef, - "GalleryAlbum cannot be instanciated after www_deleteConfirm", -); - +eval { WebGUI::Asset->newById( $session, $assetId ); }; +ok (Exception::Class->caught(), "GalleryAlbum cannot be instanciated after www_deleteConfirm"); #vim:ft=perl diff --git a/t/Asset/Wobject/GalleryAlbum/edit.t b/t/Asset/Wobject/GalleryAlbum/edit.t index 2043d0518..648b7f8d3 100644 --- a/t/Asset/Wobject/GalleryAlbum/edit.t +++ b/t/Asset/Wobject/GalleryAlbum/edit.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -14,14 +14,12 @@ # - users can add albums. # - photos can be rotated. -use FindBin; use strict; -use lib "$FindBin::Bin/../../../lib"; use Test::More; use WebGUI::Test; # Must use this before any other WebGUI modules +use WebGUI::Test::Mechanize; # Must use this before any other WebGUI modules use WebGUI::Session; use Test::Deep; -plan skip_all => 'set WEBGUI_LIVE to enable this test' unless $ENV{WEBGUI_LIVE}; #---------------------------------------------------------------------------- # Init @@ -29,12 +27,6 @@ my $session = WebGUI::Test->session; my $node = WebGUI::Asset->getImportNode( $session ); my @versionTags = ( WebGUI::VersionTag->getWorking( $session ) ); -# Override some settings to make things easier to test -# userFunctionStyleId -$session->setting->set( 'userFunctionStyleId', 'PBtmpl0000000000000132' ); -# specialState -$session->setting->set( 'specialState', '' ); - # Create a user for testing purposes my $user = WebGUI::User->new( $session, "new" ); WebGUI::Test->addToCleanup($user); @@ -45,11 +37,6 @@ $auth->saveParams( $user->userId, $user->authMethod, { 'identifier' => Digest::MD5::md5_base64( $identifier ), }); -my ($mech, $redirect, $response); - -# Get the site's base URL -my $baseUrl = 'http://' . $session->config->get('sitename')->[0]; - my $i18n = WebGUI::International->new( $session, 'Asset_GalleryAlbum' ); my $gallery @@ -68,25 +55,19 @@ WebGUI::Test->addToCleanup(@versionTags); if ( !eval { require Test::WWW::Mechanize; 1; } ) { plan skip_all => 'Cannot load Test::WWW::Mechanize. Will not test.'; } -$mech = Test::WWW::Mechanize->new; -$mech->get( $baseUrl ); -if ( !$mech->success ) { - plan skip_all => "Cannot load URL '$baseUrl'. Will not test."; -} - -plan tests => 11; # Increment this number for each test you create +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get_ok( '/' ); #---------------------------------------------------------------------------- # Visitor user cannot add albums -$mech = Test::WWW::Mechanize->new; -$mech->get( $baseUrl . $gallery->getUrl('func=add;class=WebGUI::Asset::Wobject::GalleryAlbum') ); - -# Should contain the Log In form +$mech->get( $gallery->getUrl('func=add;className=WebGUI::Asset::Wobject::GalleryAlbum') ); +ok $mech->res->is_error, 'HTTP error returned from server'; $mech->content_contains( "Permission Denied" ); #---------------------------------------------------------------------------- # Registered User can add albums -$mech = getMechLogin( $baseUrl, $user, $identifier ); +$mech->session->user({ user => $user }); +WebGUI::Test->addToCleanup($mech->session); # Complete the GalleryAlbum edit form my $properties = { @@ -94,25 +75,32 @@ my $properties = { description => 'This is a new Gallery Album', }; -$mech->get_ok( $baseUrl . $gallery->getUrl('func=add;class=WebGUI::Asset::Wobject::GalleryAlbum') ); +$mech->get_ok( $gallery->getUrl('func=add;className=WebGUI::Asset::Wobject::GalleryAlbum') ); $mech->submit_form_ok( { with_fields => $properties, }, 'Sent GalleryAlbum edit form' ); +my $added_tag = WebGUI::VersionTag->getWorking($mech->session); +WebGUI::Test->addToCleanup($added_tag); + # Shows the confirmation page $mech->content_contains( $i18n->get( 'what next' ), 'Shows message about what next', ); $mech->content_contains( - q{func=add;class=WebGUI::Asset::File::GalleryFile::Photo}, + q{func=add;className=WebGUI::Asset::File::GalleryFile::Photo}, 'Shows link to add a Photo', ); # Creates the album with the appropriate properties -my $album = WebGUI::Asset->newByDynamicClass( $session, $gallery->getAlbumIds->[0] ); +my $album = WebGUI::Asset->newById( $session, $gallery->getAlbumIds->[0] ); cmp_deeply( $properties, subhashof( $album->get ), "Properties from edit form are set correctly" ); +SKIP: { + +skip 'rotation, deletion, reordering no longer a part of the edit form', 5; + #---------------------------------------------------------------------------- # Photos can be rotated using the respective form buttons @@ -121,11 +109,14 @@ my $album = $gallery->getFirstChild; # Add single photo to this album. No need to commit since auto-commit was # enabled for the Gallery asset. +my $tag = WebGUI::VersionTag->getWorking($session); my $photo = $album->addChild({ className => "WebGUI::Asset::File::GalleryFile::Photo", }); my $photoId = $photo->getId; +$tag->commit; +WebGUI::Test->addToCleanup($tag); # Attach image file to photo asset (setFile also makes download versions) $photo->setFile( WebGUI::Test->getTestCollateralPath("rotation_test.png") ); @@ -138,7 +129,7 @@ foreach my $file ( @{$storage->getFiles('showAll') } ) { } # Rotate photo (i.e. all attached images) by 90° CW -$mech->get_ok( $baseUrl . $album->getUrl('func=edit'), 'Request GalleryAlbum edit screen' ); +$mech->get_ok( $album->getUrl('func=edit'), 'Request GalleryAlbum edit screen' ); # Select the proper form $mech->form_name( 'galleryAlbumEdit' ); # Try to click the "rotate right" button @@ -172,24 +163,6 @@ foreach my $file ( @{$storage->getFiles('showAll') } ) { # Compare dimensions cmp_deeply( \@oldDims, \@newerDims, "Check if all files were rotated by 90° CCW" ); -#---------------------------------------------------------------------------- -# getMechLogin( baseUrl, WebGUI::User, "identifier" ) -# Returns a Test::WWW::Mechanize session after logging in the given user using -# the given identifier (password) -# baseUrl is a fully-qualified URL to the site to login to -sub getMechLogin { - my $baseUrl = shift; - my $user = shift; - my $identifier = shift; - - my $mech = Test::WWW::Mechanize->new; - $mech->get( $baseUrl . '?op=auth;method=displayLogin' ); - $mech->submit_form( - with_fields => { - username => $user->username, - identifier => $identifier, - }, - ); - - return $mech; } + +done_testing; diff --git a/t/Asset/Wobject/GalleryAlbum/navigation.t b/t/Asset/Wobject/GalleryAlbum/navigation.t index 765cb4497..c851a6f25 100644 --- a/t/Asset/Wobject/GalleryAlbum/navigation.t +++ b/t/Asset/Wobject/GalleryAlbum/navigation.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../../../lib"; ## The goal of this test is to test the creation and deletion of album assets @@ -21,63 +19,38 @@ use Test::More; #---------------------------------------------------------------------------- # Init my $session = WebGUI::Test->session; -my $node = WebGUI::Asset->getImportNode($session); -my $versionTag = WebGUI::VersionTag->getWorking($session); -WebGUI::Test->addToCleanup($versionTag); - -$versionTag->set({name=>"Album Test"}); +my $node = WebGUI::Test->asset; # Create gallery and a single album +my $tag = WebGUI::VersionTag->getWorking($session); my $gallery = $node->addChild({ className => "WebGUI::Asset::Wobject::Gallery", - }, - undef, - undef, - { - skipAutoCommitWorkflows => 1, }); my $album = $gallery->addChild({ className => "WebGUI::Asset::Wobject::GalleryAlbum", - }, - undef, - undef, - { - skipAutoCommitWorkflows => 1, }); # Create 5 photos inside the gallery my @photo; - for (my $i = 0; $i < 5; $i++) { $photo[$i] = $album->addChild({ className => "WebGUI::Asset::File::GalleryFile::Photo", - }, - undef, - undef, - { - skipAutoCommitWorkflows => 1, - }); + }, undef, undef, { skipNotifications => 1, skipAutoCommitWorkflows => 1, }); } -# Commit all changes -$versionTag->commit; - -#---------------------------------------------------------------------------- -# Tests -plan tests => 15; - -#---------------------------------------------------------------------------- -# Test module compiles okay -use_ok("WebGUI::Asset::Wobject::GalleryAlbum"); +$tag->commit; +foreach my $asset ($gallery, $album, @photo) { + $asset = $asset->cloneFromDb; +} #---------------------------------------------------------------------------- # Test getPreviousFileId -diag('getPreviousFileId'); +note 'getPreviousFileId'; is( $album->getPreviousFileId($photo[2]->getId), $photo[1]->getId, 'Id of photo previous of photo no. 3 equals id of photo no. 2' ); is( $album->getPreviousFileId($photo[1]->getId), $photo[0]->getId, 'Id of photo previous of photo no. 2 equals id of photo no. 1' ); is( $album->getPreviousFileId($photo[0]->getId), undef, 'Id of photo previous of photo no. 3 is undef' ); @@ -90,7 +63,7 @@ is( $album->getPreviousFileId($album->getId), undef, 'Return undef if non-child #---------------------------------------------------------------------------- # Test getNextFileId -diag('getNextFileId'); +note 'getNextFileId'; is( $album->getNextFileId($photo[2]->getId), $photo[3]->getId, 'Id of photo next of photo no. 3 equals id of photo no. 4' ); is( $album->getNextFileId($photo[3]->getId), $photo[4]->getId, 'Id of photo next of photo no. 4 equals id of photo no. 5' ); is( $album->getNextFileId($photo[4]->getId), undef, 'Id of photo next of photo no. 5 is undef' ); @@ -100,4 +73,6 @@ is( $album->getNextFileId(''), undef, 'Return undef if empty string specified'); is( $album->getNextFileId('123456'), undef, 'Return undef if non-existing id specified'); is( $album->getNextFileId($album->getId), undef, 'Return undef if non-child id specified'); +done_testing; + #vim:ft=perl diff --git a/t/Asset/Wobject/GalleryAlbum/permission.t b/t/Asset/Wobject/GalleryAlbum/permission.t index 5b05ca872..7f0113c67 100644 --- a/t/Asset/Wobject/GalleryAlbum/permission.t +++ b/t/Asset/Wobject/GalleryAlbum/permission.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../../../lib"; ## The goal of this test is to test the permissions of GalleryAlbum assets @@ -23,16 +21,13 @@ use WebGUI::Test::Maker::Permission; # Init my $maker = WebGUI::Test::Maker::Permission->new; my $session = WebGUI::Test->session; -my $node = WebGUI::Asset->getImportNode($session); +my $node = WebGUI::Test->asset; my %user; $user{"2"} = WebGUI::User->new( $session, "new" ); $user{"2"}->addToGroups( ['2'] ); # Registered user WebGUI::Test->addToCleanup($user{'2'}); -my $versionTag = WebGUI::VersionTag->getWorking($session); -$versionTag->set({name=>"Album Test"}); -addToCleanup($versionTag); my $gallery = $node->addChild({ className => "WebGUI::Asset::Wobject::Gallery", @@ -46,15 +41,8 @@ my $album = $gallery->addChild({ className => "WebGUI::Asset::Wobject::GalleryAlbum", ownerUserId => "3", # Admin - }, - undef, - undef, - { - skipAutoCommitWorkflows => 1, }); -$versionTag->commit; - #---------------------------------------------------------------------------- # Tests plan tests => 36; diff --git a/t/Asset/Wobject/GalleryAlbum/rss.t b/t/Asset/Wobject/GalleryAlbum/rss.t index 989eaacba..48803457d 100644 --- a/t/Asset/Wobject/GalleryAlbum/rss.t +++ b/t/Asset/Wobject/GalleryAlbum/rss.t @@ -1,6 +1,6 @@ # $vim: syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -9,18 +9,16 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../../../lib"; ## The goal of this test is to test the rss view of GalleryAlbums use WebGUI::Test; +use WebGUI::Test::Mechanize; use WebGUI::Session; use Test::More; use Test::Deep; use XML::Simple; -plan skip_all => 'set WEBGUI_LIVE to enable this test' unless $ENV{WEBGUI_LIVE}; #---------------------------------------------------------------------------- # Init @@ -69,32 +67,15 @@ for my $i ( 0 .. 5 ) { $versionTag->commit; -# Override some settings to make things easier to test -# userFunctionStyleId -$session->setting->set( 'userFunctionStyleId', 'PBtmpl0000000000000132' ); -# specialState -$session->setting->set( 'specialState', '' ); - -my ( $mech ); -my $baseUrl = $session->url->getSiteURL; - #---------------------------------------------------------------------------- # Tests -if ( !eval { require Test::WWW::Mechanize; 1; } ) { - plan skip_all => 'Cannot load Test::WWW::Mechanize. Will not test.'; -} -$mech = Test::WWW::Mechanize->new; -$mech->get( $baseUrl ); -if ( !$mech->success ) { - plan skip_all => "Cannot load URL '$baseUrl'. Will not test."; -} - -plan tests => 1; +my $mech = Test::WWW::Mechanize->new; #---------------------------------------------------------------------------- # Test www_viewRss -$mech = Test::WWW::Mechanize->new; +$mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get_ok('/', 'initialize mech object with session'); my $url = $session->url->getSiteURL . $session->url->makeAbsolute( $album->getUrl('func=viewRss') ); $mech->get( $url ); cmp_deeply( @@ -119,3 +100,5 @@ cmp_deeply( }, "RSS Datastructure is complete and correct", ); + +done_testing; diff --git a/t/Asset/Wobject/GalleryAlbum/slideshow.t b/t/Asset/Wobject/GalleryAlbum/slideshow.t index cee4baba5..6c5af69a9 100644 --- a/t/Asset/Wobject/GalleryAlbum/slideshow.t +++ b/t/Asset/Wobject/GalleryAlbum/slideshow.t @@ -1,6 +1,6 @@ # $vim: syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -9,9 +9,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../../../lib"; ## The goal of this test is to test the slideshow view of GalleryAlbums @@ -24,9 +22,7 @@ use WebGUI::Test::Maker::HTML; # Init my $maker = WebGUI::Test::Maker::HTML->new; my $session = WebGUI::Test->session; -my $node = WebGUI::Asset->getImportNode($session); -my $versionTag = WebGUI::VersionTag->getWorking($session); -$versionTag->set({name=>"Album Test"}); +my $node = WebGUI::Test->asset; my $gallery = $node->addChild({ className => "WebGUI::Asset::Wobject::Gallery", @@ -40,11 +36,6 @@ my $album = $gallery->addChild({ className => "WebGUI::Asset::Wobject::GalleryAlbum", ownerUserId => "3", # Admin - }, - undef, - undef, - { - skipAutoCommitWorkflows => 1, }); my @photos; for my $i ( 0 .. 5 ) { @@ -52,17 +43,9 @@ for my $i ( 0 .. 5 ) { = $album->addChild({ className => "WebGUI::Asset::File::GalleryFile::Photo", filename => "$i.jpg", - }, - undef, - undef, - { - skipAutoCommitWorkflows => 1, }); } -$versionTag->commit; -WebGUI::Test->addToCleanup($versionTag); - #---------------------------------------------------------------------------- # Tests plan tests => 1; diff --git a/t/Asset/Wobject/GalleryAlbum/thumbnails.t b/t/Asset/Wobject/GalleryAlbum/thumbnails.t index 4a345662b..63d64ac53 100644 --- a/t/Asset/Wobject/GalleryAlbum/thumbnails.t +++ b/t/Asset/Wobject/GalleryAlbum/thumbnails.t @@ -1,6 +1,6 @@ # $vim: syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -9,9 +9,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../../../lib"; ## The goal of this test is to test the thumbnails view of GalleryAlbums @@ -24,10 +22,7 @@ use WebGUI::Test::Maker::HTML; # Init my $maker = WebGUI::Test::Maker::HTML->new; my $session = WebGUI::Test->session; -my $node = WebGUI::Asset->getImportNode($session); -my $versionTag = WebGUI::VersionTag->getWorking($session); -WebGUI::Test->addToCleanup($versionTag); -$versionTag->set({name=>"Album Test"}); +my $node = WebGUI::Test->asset; my $gallery = $node->addChild({ className => "WebGUI::Asset::Wobject::Gallery", @@ -41,11 +36,6 @@ my $album = $gallery->addChild({ className => "WebGUI::Asset::Wobject::GalleryAlbum", ownerUserId => "3", # Admin - }, - undef, - undef, - { - skipAutoCommitWorkflows => 1, }); my @photos; for my $i ( 0 .. 5 ) { @@ -53,16 +43,9 @@ for my $i ( 0 .. 5 ) { = $album->addChild({ className => "WebGUI::Asset::File::GalleryFile::Photo", filename => "$i.jpg", - }, - undef, - undef, - { - skipAutoCommitWorkflows => 1, }); } -$versionTag->commit; - #---------------------------------------------------------------------------- # Tests plan tests => 1; diff --git a/t/Asset/Wobject/GalleryAlbum/view.t b/t/Asset/Wobject/GalleryAlbum/view.t index 3e3115a20..12a864761 100644 --- a/t/Asset/Wobject/GalleryAlbum/view.t +++ b/t/Asset/Wobject/GalleryAlbum/view.t @@ -1,6 +1,6 @@ # $vim: syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -9,9 +9,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../../../lib"; ## The goal of this test is to test the default view and associated subs @@ -42,11 +40,6 @@ my $album = $gallery->addChild({ className => "WebGUI::Asset::Wobject::GalleryAlbum", ownerUserId => "3", # Admin - }, - undef, - undef, - { - skipAutoCommitWorkflows => 1, }); my @photos; for my $i ( 0 .. 5 ) { @@ -54,11 +47,6 @@ for my $i ( 0 .. 5 ) { = $album->addChild({ className => "WebGUI::Asset::File::GalleryFile::Photo", filename => "$i.jpg", - }, - undef, - undef, - { - skipAutoCommitWorkflows => 1, }); } @@ -96,7 +84,7 @@ cmp_deeply( my $expected = { "url_addPhoto" => all( - re( qr/class=WebGUI::Asset::File::GalleryFile::Photo/ ), + re( qr/className=WebGUI::Asset::File::GalleryFile::Photo/ ), re( qr/func=add/ ), re( $album->getUrl ), ), diff --git a/t/Asset/Wobject/InOutBoard.t b/t/Asset/Wobject/InOutBoard.t index 29fd6a4ff..5303487ec 100644 --- a/t/Asset/Wobject/InOutBoard.t +++ b/t/Asset/Wobject/InOutBoard.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,24 +8,23 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use Test::MockObject; use Test::MockObject::Extends; ##The goal of this test is to test the creation of Article Wobjects. use WebGUI::Test; +use WebGUI::Test::MockAsset; +use WebGUI::Test::Mechanize; use WebGUI::Session; -use Test::More tests => 9; # increment this value for each test you create +use Test::More; # increment this value for each test you create use Test::Deep; use Data::Dumper; my $templateId = 'INOUTBOARD_TEMPLATE___'; -my $templateMock = Test::MockObject->new({}); -$templateMock->set_isa('WebGUI::Asset::Template'); -$templateMock->set_always('getId', $templateId); +my $templateMock = WebGUI::Test::MockAsset->new('WebGUI::Asset::Template'); +$templateMock->mock_id($templateId); my $templateVars; $templateMock->mock('prepare', sub { } ); $templateMock->mock('process', sub { $templateVars = $_[1]; } ); @@ -46,18 +45,13 @@ foreach my $name (@names) { } WebGUI::Test->addToCleanup(@users); -# Do our work in the import node -my $node = WebGUI::Asset->getImportNode($session); - -my $versionTag = WebGUI::VersionTag->getWorking($session); -$versionTag->set({name=>"InOutBoard Test"}); -WebGUI::Test->addToCleanup($versionTag); -my $board = $node->addChild({ +my $tag = WebGUI::VersionTag->getWorking($session); +my $board = WebGUI::Test->asset( className => 'WebGUI::Asset::Wobject::InOutBoard', - inOutTemplateId => $templateId, -}); +); +$tag->commit; +$board = $board->cloneFromDb; -WebGUI::Test->mockAssetId($templateId, $templateMock); $board->prepareView(); # Test for a sane object type @@ -69,13 +63,17 @@ isa_ok($board, 'WebGUI::Asset::Wobject::InOutBoard'); # ################################################################ -$session->request->setup_body({ - delegate => $users[0]->userId, - status => 'In', - message => 'work time', -}); -$session->scratch->set('userId', $users[0]->userId); -$board->www_setStatus; +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get_ok( '/' ); +$mech->session->user({ user => $users[0] }); + +$mech->get_ok( $board->getUrl ); +$mech->submit_form_ok({ + fields => { + status => 'In', + message => 'work time', + }, +}, "update status" ); my $status; $status = $session->db->quickHashRef('select * from InOutBoard_status where assetId=? and userId=?',[$board->getId, $users[0]->userId]); cmp_deeply( @@ -99,18 +97,22 @@ cmp_deeply( status => 'In', message => 'work time', dateStamp => re('^\d+$'), - createdBy => 1, + createdBy => $users[0]->getId, }, '... set statusLog for a user' ); -$session->scratch->set('userId', $users[1]->userId); -$session->request->setup_body({ - delegate => $users[1]->userId, - status => undef, - message => 'work time', +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get_ok( '/' ); +$mech->session->user({ user => $users[1] }); + +$mech->get_ok( $board->getUrl ); +$mech->submit_form_ok({ + fields => { + status => undef, + message => 'work time', + }, }); -$board->www_setStatus; $status = $session->db->quickHashRef('select * from InOutBoard_status where assetId=? and userId=?',[$board->getId, $users[1]->userId]); cmp_deeply( $status, @@ -125,10 +127,6 @@ cmp_deeply( '... no statusLog set when status is blank' ); - -$session->request->setup_body({ }); -$session->scratch->delete('userId'); - ################################################################ # # getStatusList @@ -143,6 +141,8 @@ is_deeply [$board->getStatusList], [qw(In Out Home Lunch)], 'getStatusList'; # ################################################################ +$board->update({ inOutTemplateId => $templateId }); +$board->prepareView; $board->view; cmp_bag( $templateVars->{rows_loop}, @@ -162,7 +162,6 @@ cmp_bag( 'view: returns one entry for each user, entry is correct for user with status' ) or diag(Dumper $templateVars->{rows_loop}); -WebGUI::Test->unmockAssetId($templateId); ################################################################ # # purge @@ -176,3 +175,74 @@ $count = $session->db->quickScalar('select count(*) from InOutBoard_status where is ($count, 0, 'purge: cleans up status table'); $count = $session->db->quickScalar('select count(*) from InOutBoard_statusLog where assetId=?',[$boardId]); is ($count, 0, '... cleans up statusLog table'); + + +#---------------------------------------------------------------------------- +# selectDelegates +my $tag2 = WebGUI::VersionTag->getWorking($session); +$board = WebGUI::Test->asset( + className => 'WebGUI::Asset::Wobject::InOutBoard', + inOutGroup => '7', # everyone +); +$tag2->commit; +$board = $board->cloneFromDb; + +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get_ok( '/' ); +$mech->session->user({ user => $users[0] }); + +$mech->get_ok( $board->getUrl( 'func=selectDelegates' ) ); +$mech->submit_form_ok({ + fields => { + delegates => $users[1]->getId, + }, +}, "add a delegate" ); + +my $hasDelegate = $session->db->quickScalar( + "SELECT COUNT(*) FROM InOutBoard_delegates WHERE userId=? AND + delegateUserId=? AND assetId=?", + [ $users[0]->getId, $users[1]->getId, $board->getId ], + ); +ok( $hasDelegate, "delegate saved in db" ); + +#---------------------------------------------------------------------------- +# selectDelegates + +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get_ok( '/' ); +$mech->session->user({ userId => '3' }); + +# Add some input to report on +$session->db->write( + "insert into InOutBoard_statusLog (assetId,userId,createdBy,status,dateStamp,message) values (?,?,?,?,?,?)", + [$board->getId, $users[0]->getId, '3', "in", time, "No sleep till Brooklyn!" ], +); +$session->db->write( + "insert into InOutBoard_statusLog (assetId,userId,createdBy,status,dateStamp,message) values (?,?,?,?,?,?)", + [$board->getId, $users[1]->getId, '3', "out", time+1000, "Sleeping till Brooklyn!" ], +); + +$mech->get_ok( $board->getUrl( 'func=viewReport' ) ); +$mech->submit_form_ok( { + fields => { + }, + }, "configure the report", +); + +# Report was ok! +$mech->content_contains( "No sleep till Brooklyn!" ); +$mech->content_contains( "Sleeping till Brooklyn!" ); + +$mech->submit_form_ok( { + fields => { + startDate => time + 100, + endDate => time + 2000, + }, + }, "configure the report again", +); + +# Report was ok! +$mech->content_lacks( "No sleep till Brooklyn!" ); +$mech->content_contains( "Sleeping till Brooklyn!" ); + +done_testing; diff --git a/t/Asset/Wobject/Layout.t b/t/Asset/Wobject/Layout.t index 7e0a72c40..992ca3bf6 100644 --- a/t/Asset/Wobject/Layout.t +++ b/t/Asset/Wobject/Layout.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -16,9 +16,9 @@ use lib "$FindBin::Bin/../../lib"; use Test::MockTime qw/:all/; ##Must be loaded before all other code use WebGUI::Test; use WebGUI::Session; -use Test::More tests => 5; # increment this value for each test you create +use Test::More; use WebGUI::Asset::Wobject::Layout; -use WebGUI::Asset::Template; +use WebGUI::Asset; my $session = WebGUI::Test->session; @@ -67,23 +67,34 @@ is $page->getContentLastModifiedBy, $revised_user1->userId, '... check that a ne # inheriting mobileStyleTemplateId and mobileTemplateId; from ``Mobile template is not being inherited (#12246)'' -my $importNode = WebGUI::Asset::Template->getImportNode($session); -my $template1 = $importNode->addChild({className=>"WebGUI::Asset::Template"}); -my $template2 = $importNode->addChild({className=>"WebGUI::Asset::Template"}); -WebGUI::Test->addToCleanup($template1, $template2); +$session->setting->set('useMobileStyle', 1); +$session->setting->set('anonymousRegistration', 1); + +my $importNode = WebGUI::Asset->getImportNode($session); +my $template1 = $importNode->addChild({className=>"WebGUI::Asset::Template", namespace => 'style', }); +my $template2 = $importNode->addChild({className=>"WebGUI::Asset::Template", namespace => 'Layout', }); my $mobileStyleTemplateId = $template1->getId; my $mobileTemplateId = $template2->getId; -$page->update({ mobileStyleTemplateId => $mobileStyleTemplateId, mobileTemplateId => $mobileTemplateId }); -my $url = $page->get('url') . '/layout_child_test'; -my $html = WebGUI::Test->getPage($page, "www_add", { - userId => 3, - formParams => { - class => 'WebGUI::Asset::Wobject::Layout', - url => $page->get('url') . '/layout_child_test', - }, -}); -like $html, qr/name="mobileTemplateId" value="$mobileTemplateId"/, 'child PageLayout inherited parents mobileTempaleId'; -like $html, qr/name="mobileStyleTemplateId" value="$mobileStyleTemplateId"/, 'child PageLayout inherited parents mobileStyleTempaleId'; +my $mobile_page = $importNode->addChild({ + className => "WebGUI::Asset::Wobject::Layout", + mobileStyleTemplateId => $mobileStyleTemplateId, + mobileTemplateId => $mobileTemplateId, } +); +WebGUI::Test->addToCleanup($template1, $template2); +my $tag = WebGUI::VersionTag->getWorking($session); +$tag->commit; +WebGUI::Test->addToCleanup($tag); + +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->config ); +$mech->get_ok('/'); +$mech->session->user({userId => 3}); +$mech->get_ok($mobile_page->getUrl('func=add;userId=3;className=WebGUI::Asset::Wobject::Layout')); +my ($mobileTemplateInput) = $mech->find_all_inputs(name => 'mobileTemplateId'); +is $mobileTemplateInput->value, $mobileTemplateId, 'child PageLayout inherited parents mobileTemplateId'; +my ($mobileStyleTemplateInput) = $mech->find_all_inputs(name => 'mobileStyleTemplateId'); +is $mobileStyleTemplateInput->value, $mobileStyleTemplateId, 'child PageLayout inherited parents mobileStyleTemplateId'; + +done_testing; diff --git a/t/Asset/Wobject/Matrix.t b/t/Asset/Wobject/Matrix.t index d18c58376..50e7abf85 100644 --- a/t/Asset/Wobject/Matrix.t +++ b/t/Asset/Wobject/Matrix.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,16 +8,14 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; use File::Spec; -use lib "$FindBin::Bin/../../lib"; ##The goal of this test is to test the creation of UserList Wobjects. use WebGUI::Test; use WebGUI::Session; -use Test::More tests => 30; # increment this value for each test you create +use Test::More; # increment this value for each test you create use Test::Deep; use JSON; use WebGUI::Asset::Wobject::Matrix; @@ -31,6 +29,8 @@ my $versionTag = WebGUI::VersionTag->getWorking($session); $versionTag->set({name=>"Matrix Test"}); WebGUI::Test->addToCleanup($versionTag); my $matrix = $node->addChild({className=>'WebGUI::Asset::Wobject::Matrix'}); +$versionTag->commit; +$matrix = $matrix->cloneFromDb; # Test for a sane object type isa_ok($matrix, 'WebGUI::Asset::Wobject::Matrix'); @@ -104,11 +104,12 @@ is($newAttribute->{attributeId},undef,"The new attribute was successfully delete # add a listing -my $matrixListing = $matrix->addChild({className=>'WebGUI::Asset::MatrixListing'}, undef, undef, { skipAutoCommitWorkflows => 1, skipNotification => 1}); +my $listing_tag = WebGUI::VersionTag->getWorking($session); +my $matrixListing = $matrix->addChild({className=>'WebGUI::Asset::MatrixListing'}, undef, undef, { skipNotification => 1}); +$listing_tag->commit; +$matrixListing = $matrixListing->cloneFromDb; -my $secondVersionTag = WebGUI::VersionTag->new($session,$matrixListing->get("tagId")); -$secondVersionTag->commit; -WebGUI::Test->addToCleanup($secondVersionTag); +WebGUI::Test->addToCleanup($matrixListing); # Test for sane object type isa_ok($matrixListing, 'WebGUI::Asset::MatrixListing'); @@ -157,7 +158,7 @@ cmp_deeply( # Test Listings Caching -my $listingsEncoded = WebGUI::Cache->new($session,"matrixListings_".$matrix->getId)->get; +my $listingsEncoded = $session->cache->get("matrixListings_".$matrix->getId); $listings = JSON->new->decode($listingsEncoded); cmp_deeply( @@ -229,9 +230,9 @@ cmp_deeply( # Test statistics caching by view method -WebGUI::Cache->new($session,"matrixStatistics_".$matrix->getId)->delete; +$session->cache->remove("matrixStatistics_".$matrix->getId); $matrix->view; -my $varStatisticsEncoded = WebGUI::Cache->new($session,"matrixStatistics_".$matrix->getId)->get; +my $varStatisticsEncoded = $session->cache->get("matrixStatistics_".$matrix->getId); my $varStatistics = JSON->new->decode($varStatisticsEncoded); cmp_deeply( @@ -302,9 +303,9 @@ $matrixListing->setRatings({category1=>'1',category2=>'9'}); $matrixListing->setRatings({category1=>'3',category2=>'5'}); $matrixListing->setRatings({category1=>'1',category2=>'9'}); -WebGUI::Cache->new($session,"matrixStatistics_".$matrix->getId)->delete; +$session->cache->remove("matrixStatistics_".$matrix->getId); $matrix->view; -my $varStatisticsEncoded = WebGUI::Cache->new($session,"matrixStatistics_".$matrix->getId)->get; +my $varStatisticsEncoded = $session->cache->get("matrixStatistics_".$matrix->getId); my $varStatistics = JSON->new->decode($varStatisticsEncoded); cmp_deeply( @@ -349,10 +350,10 @@ cmp_deeply( 'With only 9 ratings, still no statistics' ); -WebGUI::Cache->new($session,"matrixStatistics_".$matrix->getId)->delete; +$session->cache->remove("matrixStatistics_".$matrix->getId); $matrixListing->setRatings({category1=>'3'}); $matrix->view; -my $varStatisticsEncoded = WebGUI::Cache->new($session,"matrixStatistics_".$matrix->getId)->get; +my $varStatisticsEncoded = $session->cache->get("matrixStatistics_".$matrix->getId); my $varStatistics = JSON->new->decode($varStatisticsEncoded); cmp_deeply( @@ -364,7 +365,7 @@ cmp_deeply( best_rating_loop => [{ url => '/'.$matrixListing->get('url'), category=> 'category1', - name => 'untitled', + name => 'Untitled', mean => 2, median => 3, count => 10, @@ -380,7 +381,7 @@ cmp_deeply( worst_rating_loop => [{ url => '/'.$matrixListing->get('url'), category=> 'category1', - name => 'untitled', + name => 'Untitled', mean => 2, median => 3, count => 10, @@ -397,10 +398,10 @@ cmp_deeply( 'statistics calculated for the category with 10 ratings' ); -WebGUI::Cache->new($session,"matrixStatistics_".$matrix->getId)->delete; +$session->cache->remove("matrixStatistics_".$matrix->getId); $matrixListing->setRatings({category2=>'5'}); $matrix->view; -my $varStatisticsEncoded = WebGUI::Cache->new($session,"matrixStatistics_".$matrix->getId)->get; +my $varStatisticsEncoded = $session->cache->get("matrixStatistics_".$matrix->getId); my $varStatistics = JSON->new->decode($varStatisticsEncoded); cmp_deeply( @@ -412,7 +413,7 @@ cmp_deeply( best_rating_loop => [{ url => '/'.$matrixListing->get('url'), category=> 'category1', - name => 'untitled', + name => 'Untitled', mean => 2, median => 3, count => 10, @@ -420,7 +421,7 @@ cmp_deeply( { url => '/'.$matrixListing->get('url'), category=> 'category2', - name => 'untitled', + name => 'Untitled', mean => 7, median => 9, count => 10, @@ -428,7 +429,7 @@ cmp_deeply( worst_rating_loop => [{ url => '/'.$matrixListing->get('url'), category=> 'category1', - name => 'untitled', + name => 'Untitled', mean => 2, median => 3, count => 10, @@ -436,7 +437,7 @@ cmp_deeply( { url => '/'.$matrixListing->get('url'), category=> 'category2', - name => 'untitled', + name => 'Untitled', mean => 7, median => 9, count => 10, @@ -444,3 +445,5 @@ cmp_deeply( }, 'statistics calculated for the category with 10 ratings' ); + +done_testing; diff --git a/t/Asset/Wobject/Poll.t b/t/Asset/Wobject/Poll.t index f70aab16c..92e2af66a 100644 --- a/t/Asset/Wobject/Poll.t +++ b/t/Asset/Wobject/Poll.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use Test::More; use Test::Deep; use Data::Dumper; @@ -50,7 +48,7 @@ SKIP: { skip "Unable to load module $class", $tests unless $loaded; -my $defaultNode = WebGUI::Asset->getDefault($session); +my $defaultNode = WebGUI::Test->asset; my $template = $defaultNode->addChild({ className => 'WebGUI::Asset::Template', parser => 'WebGUI::Asset::Template::HTMLTemplate', @@ -77,10 +75,6 @@ my $poll = $defaultNode->addChild({ graphConfiguration => '{"graph_labelFontSize":"20","xyGraph_chartWidth":"200","xyGraph_drawRulers":"1","graph_labelColor":"#333333","xyGraph_drawAxis":"1","graph_formNamespace":"Graph_XYGraph_Bar","graph_backgroundColor":"#ffffff","xyGraph_bar_barSpacing":0,"graph_labelFontId":"defaultFont","graph_labelOffset":"10","xyGraph_drawMode":"sideBySide","xyGraph_yGranularity":"10","xyGraph_chartHeight":"200","graph_imageHeight":"300","graph_imageWidth":"300","xyGraph_drawLabels":"1","xyGraph_bar_groupSpacing":0,"graph_paletteId":"defaultPalette"}', }); -my $versionTag = WebGUI::VersionTag->getWorking($session); -WebGUI::Test->addToCleanup($versionTag); -$versionTag->commit; - isa_ok($poll, 'WebGUI::Asset::Wobject::Poll'); $poll->setVote('daily', 1, '127.0.0.1'); diff --git a/t/Asset/Wobject/ProjectManager.t b/t/Asset/Wobject/ProjectManager.t new file mode 100644 index 000000000..a43bee9fa --- /dev/null +++ b/t/Asset/Wobject/ProjectManager.t @@ -0,0 +1,114 @@ +# vim:syntax=perl +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 +#------------------------------------------------------------------ + +# Test the Project Manager +# +# + +use FindBin; +use strict; +use lib "$FindBin::Bin/lib"; +use Test::More; +use Test::Deep; +use WebGUI::Test; # Must use this before any other WebGUI modules +use WebGUI::Test::Mechanize; +use WebGUI::Session; + +#---------------------------------------------------------------------------- +# Init +my $session = WebGUI::Test->session; + +my $tag = WebGUI::VersionTag->getWorking($session); +my $pm = WebGUI::Test->asset( + className => 'WebGUI::Asset::Wobject::ProjectManager', + groupToAdd => 3, +); +$tag->commit; +$pm = $pm->cloneFromDb; + +#---------------------------------------------------------------------------- +# Tests + +#---------------------------------------------------------------------------- +# www_editProject +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get_ok('/'); +$mech->session->user({ userId => 3 }); + +# Add a new project +my %projectData = ( + name => 'Build a Library', + description => 'Build a library to teach them how to be men.', + targetBudget => "80.00", +); + +$mech->get_ok( $pm->getUrl( 'func=editProject;projectId=new' ) ); +$mech->submit_form_ok( { + fields => { %projectData }, + }, "create a new project" +); + +# Check if created +my $pj = $session->db->quickHashRef( + "SELECT * FROM PM_project WHERE assetId=?", + [ $pm->getId ], +); +ok( $pj, "project exists" ); +cmp_deeply( + $pj, + superhashof({ + %projectData, + assetId => $pm->getId, + }), + "Project info correct", +); + +# Initial milestone created too +my $task = $session->db->quickHashRef( + "SELECT * FROM PM_task WHERE projectId=?", + [ $pj->{projectId} ], +); +ok( keys %$task, "task exists" ); +cmp_deeply( + $task, + superhashof({ + projectId => $pj->{projectId}, + taskType => "milestone", + }), + "Task info correct", +); + + +# Now edit it +$projectData{ description } = "Keep those heathens in their place."; +$mech->get_ok( $pm->getUrl( 'func=editProject;projectId=' . $pj->{projectId} ) ); +$mech->submit_form_ok( { + fields => { %projectData }, + }, "edit project" +); + +# Check if edited +my $pj = $session->db->quickHashRef( + "SELECT * FROM PM_project WHERE assetId=?", + [ $pm->getId ], +); +ok( $pj, "edited project exists" ); +cmp_deeply( + $pj, + superhashof({ + %projectData, + assetId => $pm->getId, + }), + "edited Project info correct", +); + +done_testing; +#vim:ft=perl diff --git a/t/Asset/Wobject/SQLReport.t b/t/Asset/Wobject/SQLReport.t index d42dcad2a..bc71fb8e0 100644 --- a/t/Asset/Wobject/SQLReport.t +++ b/t/Asset/Wobject/SQLReport.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use Test::More; use Test::Deep; use Data::Dumper; @@ -37,7 +35,7 @@ plan tests => 4; #---------------------------------------------------------------------------- # put your tests here -my $defaultNode = WebGUI::Asset->getDefault($session); +my $defaultNode = WebGUI::Test->asset; my $report = $defaultNode->addChild({ className => 'WebGUI::Asset::Wobject::SQLReport', @@ -46,10 +44,6 @@ my $report = $defaultNode->addChild({ dqQuery1 => 'select * from users', }); -my $versionTag = WebGUI::VersionTag->getWorking($session); -$versionTag->commit; -addToCleanup($versionTag); - isa_ok($report, 'WebGUI::Asset::Wobject::SQLReport'); is($report->get('cacheTimeout'), 50, 'cacheTimeout set correctly'); diff --git a/t/Asset/Wobject/Search.t b/t/Asset/Wobject/Search.t index 5e05bac22..3acf4b831 100644 --- a/t/Asset/Wobject/Search.t +++ b/t/Asset/Wobject/Search.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,13 +8,12 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; ##The goal of this test is to test the creation of Search Wobjects. use WebGUI::Test; +use WebGUI::Test::MockAsset; use WebGUI::Session; use Test::More tests => 13; # increment this value for each test you create use Test::Deep; @@ -28,8 +27,10 @@ my $node = WebGUI::Asset->getDefault($session); my $versionTag = WebGUI::VersionTag->getWorking($session); $versionTag->set({name=>"Search Test"}); -addToCleanup($versionTag); +WebGUI::Test->addToCleanup($versionTag); my $search = $node->addChild({className=>'WebGUI::Asset::Wobject::Search'}); +$versionTag->commit; +$search = $search->cloneFromDb; # Test for a sane object type isa_ok($search, 'WebGUI::Asset::Wobject::Search'); @@ -49,9 +50,8 @@ foreach my $newSetting (keys %{$newSearchSettings}) { #1234567890123456789012# my $templateId = '_FAUX_SEARCH_TEMPLATE_'; -my $templateMock = Test::MockObject->new({}); -$templateMock->set_isa('WebGUI::Asset::Template'); -$templateMock->set_always('getId', $templateId); +my $templateMock = WebGUI::Test::MockAsset->new('WebGUI::Asset::Template'); +$templateMock->mock_id($templateId); $templateMock->set_true('prepare'); my $templateVars; $templateMock->mock('process', sub { $templateVars = $_[1]; } ); @@ -68,7 +68,6 @@ $search->update({ doit => 1, keywords => 'building + applications', }); - WebGUI::Test->mockAssetId($templateId, $templateMock); $search->prepareView; eval { $search->view; }; ok(! $@, 'view did now error out on standalone regexp wildcard') @@ -85,7 +84,6 @@ $search->update({ eval { $search->view; }; ok(! $@, 'view did now error out on prefix regexp wildcard') or diag $@; - WebGUI::Test->unmockAssetId($templateId); $session->request->setup_body({}); } @@ -93,7 +91,7 @@ $search->update({ { my $versionTag2 = WebGUI::VersionTag->getWorking($session); $versionTag2->set({name=>"Collab setup"}); - my @addArgs = ( undef, undef, { skipAutoCommitWorkflows => 1, skipNotification => 1 } ); + my @addArgs = ( undef, undef, { skipNotification => 1, skipAutoCommitWorkflows => 1, } ); my $collab = $node->addChild({ className => 'WebGUI::Asset::Wobject::Collaboration', editTimeout => '1', @@ -108,14 +106,14 @@ $search->update({ }; my $thread = $collab->addChild($props, @addArgs); + $thread->setSkipNotification; $versionTag2->commit(); - addToCleanup($versionTag2); + WebGUI::Test->addToCleanup($versionTag2); $session->request->setup_body({ doit => 1, keywords => 'shale', }); - WebGUI::Test->mockAssetId($templateId, $templateMock); $search->prepareView; $search->view; $search->update({useContainers => 0}); @@ -124,7 +122,6 @@ $search->update({ $search->view; like $templateVars->{result_set}->[0]->{url}, qr{\?pn=\d}, 'search returns paginated URL for a Thread when useContainers=1'; - WebGUI::Test->unmockAssetId($templateId); $session->request->setup_body({}); $search->update({useContainers => 0}); } @@ -148,13 +145,13 @@ $search->update({ my $snippet = $folder->addChild($props, @addArgs); $versionTag3->commit(); - addToCleanup($versionTag3); + WebGUI::Test->addToCleanup($versionTag3); $session->request->setup_body({ doit => 1, keywords => 'juxtaposition', }); - WebGUI::Test->mockAssetId($templateId, $templateMock); + WebGUI::Test::MockAsset->mock_id($templateId, $templateMock); $search->prepareView; $search->view; $search->update({useContainers => 0}); @@ -163,7 +160,7 @@ $search->update({ $search->view; is $templateVars->{result_set}->[0]->{url}, $snippet->get('url'), 'search returns regular URL for article because user cannot see container'; - WebGUI::Test->unmockAssetId($templateId); + WebGUI::Test::MockAsset->unmock_id($templateId); $session->request->setup_body({}); $search->update({useContainers => 0}); } diff --git a/t/Asset/Wobject/Search/addRecord.t b/t/Asset/Wobject/Search/addRecord.t index bca2dda6d..4ee57c931 100644 --- a/t/Asset/Wobject/Search/addRecord.t +++ b/t/Asset/Wobject/Search/addRecord.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -20,6 +20,7 @@ use WebGUI::Test; use WebGUI::Session; use Test::More tests => 6; # increment this value for each test you create use Test::Deep; +use WebGUI::Test::MockAsset; use WebGUI::Asset::Wobject::Search; my $session = WebGUI::Test->session; @@ -29,8 +30,8 @@ $session->user({userId => 3}); my $node = WebGUI::Asset->getImportNode($session); -my $default = WebGUI::Asset->getDefault($session); -my $importArticle = $node->addChild({ +my $default = WebGUI::Test->asset; +my $importArticle = WebGUI::Test->asset->addChild({ className => 'WebGUI::Asset::Wobject::Article', description => 'rockhound', }); @@ -48,34 +49,33 @@ my $defaultArticle = $default->addChild({ description => 'shawshank prison', url => 'introduction' }); +$defaultArticle->indexContent; my $search = $default->addChild({ className => 'WebGUI::Asset::Wobject::Search', searchRoot => $default->getId, templateId => $templateId, }); -my $tag = WebGUI::VersionTag->getWorking($session); -$tag->commit; -WebGUI::Test->addToCleanup($tag); +$search->indexContent; my $indexer = WebGUI::Search::Index->new($defaultArticle); $indexer->addRecord(url => 'brochure', keywords => 'roomy spacious prison'); { - WebGUI::Test->mockAssetId($templateId, $templateMock); + WebGUI::Test::MockAsset->mock_id($templateId, $templateMock); $search->prepareView(); $session->request->setup_body({doit => 1, keywords => 'shawshank'}); $search->view(); - WebGUI::Test->unmockAssetId($templateId); + WebGUI::Test::MockAsset->unmock_id($templateId); } is scalar @{ $templateVars->{result_set} }, 1, 'search for shawshank, returns 1 record'; is $templateVars->{result_set}->[0]->{url}, 'introduction', '... url is correct'; { - WebGUI::Test->mockAssetId($templateId, $templateMock); + WebGUI::Test::MockAsset->mock_id($templateId, $templateMock); $search->prepareView(); $session->request->setup_body({doit => 1, keywords => 'prison'}); $search->view(); - WebGUI::Test->unmockAssetId($templateId); + WebGUI::Test::MockAsset->unmock_id($templateId); } is scalar @{ $templateVars->{result_set} }, 2, 'search for prison, returns 2 records'; diff --git a/t/Asset/Wobject/Search/searchroot.t b/t/Asset/Wobject/Search/searchroot.t index c9dd68dc6..a7016b1a9 100644 --- a/t/Asset/Wobject/Search/searchroot.t +++ b/t/Asset/Wobject/Search/searchroot.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,10 +8,8 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; use JSON qw/from_json/; -use lib "$FindBin::Bin/../../../lib"; ##The goal of this test is to test the creation of Search Wobjects. @@ -28,6 +26,8 @@ $session->user({userId => 3}); my $node = WebGUI::Asset->getImportNode($session); +my $tag2 = WebGUI::VersionTag->getWorking($session); + my $default = WebGUI::Asset->getDefault($session); my $importArticle = $node->addChild({ className => 'WebGUI::Asset::Wobject::Article', @@ -47,7 +47,6 @@ my $search = $default->addChild({ searchRoot => $default->getId, templateId => $template->getId, }); -my $tag2 = WebGUI::VersionTag->getWorking($session); $tag2->commit; $search->prepareView(); diff --git a/t/Asset/Wobject/Shelf.t b/t/Asset/Wobject/Shelf.t index 222d07880..2b70168d9 100644 --- a/t/Asset/Wobject/Shelf.t +++ b/t/Asset/Wobject/Shelf.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use Test::More; use Test::Deep; use Exception::Class; @@ -35,7 +33,7 @@ my $session = WebGUI::Test->session; #---------------------------------------------------------------------------- # Tests -my $tests = 65; +my $tests = 6; plan tests => 1 + $tests; #---------------------------------------------------------------------------- @@ -50,450 +48,7 @@ SKIP: { skip "Unable to load module $class", $tests unless $loaded; - my $root = WebGUI::Asset->getRoot($session); - my $shelf = $root->addChild({className => $class}); - - ####################################################################### - # - # import - # - ####################################################################### - - eval { $shelf->importProducts(); }; - $e = Exception::Class->caught(); - isa_ok($e, 'WebGUI::Error::InvalidParam', 'importProducts: error handling for an undefined path to file'); - is($e->error, 'Must provide the path to a file', 'importProducts: error handling for an undefined path to file'); - - eval { $shelf->importProducts('/path/to/nowhere'); }; - $e = Exception::Class->caught(); - isa_ok($e, 'WebGUI::Error::InvalidFile', 'importProducts: error handling for file that does not exist in the filesystem'); - is($e->error, 'File could not be found', 'importProducts: error handling for file that does not exist in the filesystem'); - cmp_deeply( - $e, - methods( - brokenFile => '/path/to/nowhere', - ), - 'importTaxData: error handling for file that does not exist in the filesystem', - ); - - my $productsFile = WebGUI::Test->getTestCollateralPath('productTables/goodProductTable.csv'); - - SKIP: { - skip 'Root will cause this test to fail since it does not obey file permissions', 3 - if $< == 0; - - my $originalChmod = (stat $productsFile)[2]; - chmod oct(0000), $productsFile; - - eval { $shelf->importProducts($productsFile); }; - $e = Exception::Class->caught(); - isa_ok($e, 'WebGUI::Error::InvalidFile', 'importProducts: error handling for file that cannot be read'); - is($e->error, 'File is not readable', 'importProducts: error handling for file that that cannot be read'); - cmp_deeply( - $e, - methods( - brokenFile => $productsFile, - ), - 'importProducts: error handling for file that that cannot be read', - ); - - chmod $originalChmod, $productsFile; - - } - - $failure=0; - eval { - $failure = $shelf->importProducts( - WebGUI::Test->getTestCollateralPath('productTables/missingHeaders.csv'), - ); - }; - ok (!$failure, 'Product data is not imported when headers are missing'); - $e = Exception::Class->caught(); - isa_ok($e, 'WebGUI::Error::InvalidFile', 'importProducts: a file with a missing header column'); - cmp_deeply( - $e, - methods( - error => 'Bad header found in the CSV file', - brokenFile => WebGUI::Test->getTestCollateralPath('productTables/missingHeaders.csv'), - ), - 'importProducts: error handling for a file with a missing header', - ); - - $failure=0; - eval { - $failure = $shelf->importProducts( - WebGUI::Test->getTestCollateralPath('productTables/badHeaders.csv'), - ); - }; - ok (!$failure, 'Product data is not imported when the headers are wrong'); - $e = Exception::Class->caught(); - isa_ok($e, 'WebGUI::Error::InvalidFile', 'importProducts: a file with bad headers'); - cmp_deeply( - $e, - methods( - error => 'Bad header found in the CSV file', - brokenFile => WebGUI::Test->getTestCollateralPath('productTables/badHeaders.csv'), - ), - 'importProducts: error handling for a file with a missing header', - ); - - my $pass=0; - $pass = $shelf->importProducts( - WebGUI::Test->getTestCollateralPath('productTables/goodProductTable.csv'), - ); - ok($pass, 'Products imported'); - - my $count = $session->db->quickScalar('select count(*) from Product'); - is($count, 2, 'two products were imported'); - - my $soda = WebGUI::Asset::Sku->newBySku($session, 'soda'); - isa_ok($soda, 'WebGUI::Asset::Sku::Product'); - is($soda->getTitle(), 'Sweet Soda-bottled in Oregon', 'Title set correctly for soda'); - is($soda->get('url'), 'sweet-soda-bottled-in-oregon', 'URL for new product from the title'); - is($soda->get('menuTitle'), $soda->getTitle, 'menuTitle is the same as title'); - my $sodaCollateral = $soda->getAllCollateral('variantsJSON'); - cmp_deeply( - $sodaCollateral, - [ - { - varSku => 'soda-sweet', - shortdesc => 'Sweet Soda', - price => 0.95, - weight => 0.95, - quantity => 500, - variantId => ignore(), - }, - ], - 'collateral set correctly for soda' - ); - - my $shirt = WebGUI::Asset::Sku->newBySku($session, 't-shirt'); - isa_ok($shirt, 'WebGUI::Asset::Sku::Product'); - is($shirt->getTitle(), 'Colored T-Shirts', 'Title set correctly for t-shirt'); - my $shirtCollateral = $shirt->getAllCollateral('variantsJSON'); - cmp_deeply( - $shirtCollateral, - [ - { - varSku => 'red-t-shirt', - shortdesc => 'Red T-Shirt', - price => '5.00', - weight => '1.33', - quantity => '1000', - variantId => ignore(), - }, - { - varSku => 'blue-t-shirt', - shortdesc => 'Blue T-Shirt', - price => '5.25', - weight => '1.33', - quantity => '2000', - variantId => ignore(), - }, - ], - 'collateral set correctly for shirt' - ); - - ####################################################################### - # - # export - # - ####################################################################### - - my $productsOut = $shelf->exportProducts(); - isa_ok($productsOut, 'WebGUI::Storage', 'exportProducts returns a Storage object'); - is(scalar @{ $productsOut->getFiles }, 1, 'The storage contains just 1 file...'); - is(scalar $productsOut->getFiles->[0], 'siteProductData.csv', '...with the correct filename'); - my $productData = $productsOut->getFileContentsAsScalar($productsOut->getFiles->[0]); - my @productData = split /\n/, $productData; - is(scalar @productData, 4, 'productData should have 4 entries, 1 header + 3 data'); - is($productData[0], 'mastersku,title,varSku,shortdescription,price,weight,quantity', 'header line is okay'); - @productData = map { [ WebGUI::Text::splitCSV($_) ] } @productData[1..3]; - my ($sodas, $shirts) = ([], []); - foreach my $productData (@productData) { - if ($productData->[0] eq 'soda') { - push @{ $sodas }, $productData; - } - elsif ($productData->[0] eq 't-shirt') { - push @{ $shirts }, $productData; - } - } - is(scalar @{ $sodas }, 1, 'just 1 soda'); - is(scalar @{ $shirts }, 2, '2 shirts'); - - cmp_deeply( - $sodas, - [ ['soda', 'Sweet Soda-bottled in Oregon', - 'soda-sweet', 'Sweet Soda', 0.95, 0.95, 500] ], - 'soda data is okay' - ); - - ####################################################################### - # - # import, part 2 - # - ####################################################################### - - $pass=0; - $pass = $shelf->importProducts( - WebGUI::Test->getTestCollateralPath('productTables/secondProductTable.csv'), - ); - ok($pass, 'Products imported for the second time'); - - $count = $session->db->quickScalar('select count(*) from Product'); - is($count, 3, 'three products were imported'); - - $soda = WebGUI::Asset::Sku->newBySku($session, 'soda'); - $sodaCollateral = $soda->getAllCollateral('variantsJSON'); - cmp_deeply( - $sodaCollateral, - [ - { - varSku => 'soda-sweet', - shortdesc => 'Sweet Soda', - price => '1.00', - weight => 0.85, - quantity => 500, - variantId => ignore(), - }, - ], - 'collateral updated correctly for soda' - ); - - $shirt = WebGUI::Asset::Sku->newBySku($session, 't-shirt'); - $shirtCollateral = $shirt->getAllCollateral('variantsJSON'); - cmp_deeply( - $shirtCollateral, - [ - { - varSku => 'red-t-shirt', - shortdesc => 'Red T-Shirt', - price => '5.00', - weight => '1.33', - quantity => '500', - variantId => ignore(), - }, - { - varSku => 'blue-t-shirt', - shortdesc => 'Blue T-Shirt', - price => '5.25', - weight => '1.33', - quantity => '2000', - variantId => ignore(), - }, - ], - 'collateral updated correctly for shirt' - ); - - my $record = WebGUI::Asset::Sku->newBySku($session, 'classical-records-1'); - isa_ok($record, 'WebGUI::Asset::Sku::Product'); - my $recordCollateral = $record->getAllCollateral('variantsJSON'); - cmp_deeply( - $recordCollateral, - [ - { - varSku => 'track-16', - shortdesc => 'Track 16', - price => '3.25', - weight => '0.00', - quantity => 50, - variantId => ignore(), - }, - ], - 'collateral set correctly for classical record' - ); - - ####################################################################### - # - # import, part 3 - # - ####################################################################### - - $pass=0; - $pass = $shelf->importProducts( - WebGUI::Test->getTestCollateralPath('productTables/thirdProductTable.csv'), - ); - ok($pass, 'Products imported for the third time'); - - $count = $session->db->quickScalar('select count(*) from Product'); - is($count, 3, 'still have 3 products, nothing new added'); - - $soda = WebGUI::Asset::Sku->newBySku($session, 'soda'); - is($soda->getTitle(), 'Sweet Soda-totally organic', 'Title updated correctly for soda'); - is($soda->get('menuTitle'), 'Sweet Soda-totally organic', 'menuTitle updated correctly for soda'); - is($soda->get('url'), 'sweet-soda-bottled-in-oregon', 'URL for updated product from the original title, not the updated title'); - $shirt = WebGUI::Asset::Sku->newBySku($session, 't-shirt'); - $shirtCollateral = $shirt->getAllCollateral('variantsJSON'); - cmp_deeply( - $shirtCollateral, - [ - { - varSku => 'red-t-shirt', - shortdesc => 'Red T-Shirt', - price => '5.00', - weight => '1.33', - quantity => '500', - variantId => ignore(), - }, - { - varSku => 'blue-t-shirt', - shortdesc => 'Blue T-Shirt', - price => '5.25', - weight => '1.33', - quantity => '2000', - variantId => ignore(), - }, - ], - 'collateral updated correctly for shirt' - ); - - $record = WebGUI::Asset::Sku->newBySku($session, 'classical-records-1'); - $recordCollateral = $record->getAllCollateral('variantsJSON'); - cmp_deeply( - $recordCollateral, - [ - { - varSku => 'track-16', - shortdesc => 'Track 16', - price => '3.25', - weight => '0.00', - quantity => 50, - variantId => ignore(), - }, - { - varSku => 'track-9', - shortdesc => 'Track 9', - price => '3.25', - weight => '0.00', - quantity => 55, - variantId => ignore(), - }, - ], - 'collateral added correctly for classical record' - ); - - $shelf->purge; - undef $shelf; - - $record = WebGUI::Asset::Sku->newBySku($session, 'classical-records-1'); - is($record, undef, 'deleting a shelf deletes all products beneath it'); - - ####################################################################### - # - # import, quoted headers and fields - # - ####################################################################### - - my $shelf2 = $root->addChild({className => $class}); - - $pass = 0; - eval { - $pass = $shelf2->importProducts( - WebGUI::Test->getTestCollateralPath('productTables/quotedTable.csv'), - ); - }; - ok($pass, 'Able to load a table with quoted fields'); - $e = Exception::Class->caught(); - is($e, '', 'No exception thrown on a file with quoted fields'); - is($shelf2->getChildCount, 3, 'imported 3 children skus for shelf2 with quoted fields'); - - $shelf2->purge; - undef $shelf2; - - ####################################################################### - # - # import, windows line endings - # - ####################################################################### - - $shelf2 = WebGUI::Asset->getRoot($session)->addChild({className => $class}); - - $pass = 0; - eval { - $pass = $shelf2->importProducts( - WebGUI::Test->getTestCollateralPath('productTables/windowsTable.csv'), - ); - }; - ok($pass, 'Able to load a table with windows style newlines'); - $e = Exception::Class->caught(); - is($e, '', 'No exception thrown on a file with quoted fields'); - is($shelf2->getChildCount, 2, 'imported 2 children skus for shelf2 with windows line endings fields'); - - $shelf2->purge; - undef $shelf2; - - ####################################################################### - # - # import, old sku column header - # - ####################################################################### - - $shelf2 = WebGUI::Asset->getRoot($session)->addChild({className => $class}); - - $pass = 0; - eval { - $pass = $shelf2->importProducts( - WebGUI::Test->getTestCollateralPath('productTables/windowsTable.csv'), - ); - }; - ok($pass, 'Able to load a table with old style, sku instead of varSku'); - $e = Exception::Class->caught(); - is($e, '', 'No exception thrown on a file old headers'); - is($shelf2->getChildCount, 2, 'imported 2 children skus for shelf2 with old headers'); - - $shelf2->purge; - undef $shelf2; - - ##Clear out this tag so we can do downstream work. - my $tag = WebGUI::VersionTag->getWorking($session); - $tag->commit; - WebGUI::Test->addToCleanup($tag); - - ####################################################################### - # - # import, funky data in the price column - # - ####################################################################### - - my $shelf3 = WebGUI::Asset->getRoot($session)->addChild({className => $class}); - - $pass = 0; - eval { - $pass = $shelf3->importProducts( - WebGUI::Test->getTestCollateralPath('productTables/dollarsigns.csv'), - ); - }; - ok($pass, 'Able to load a table with odd characters in the price column'); - $e = Exception::Class->caught(); - is($e, '', '... no exception thrown'); - is($shelf3->getChildCount, 1, '...imported 1 child sku for shelf3 with old headers'); - - my $sign = $shelf3->getFirstChild(); - my $signCollateral = $sign->getAllCollateral('variantsJSON'); - cmp_deeply( - $signCollateral, - [ - { - varSku => 'dollar signs', - shortdesc => 'Silver Dollar Signs', - price => '5.00', - weight => '0.33', - quantity => '1000', - variantId => ignore(), - }, - ], - 'collateral set correctly for sign' - ); - - - $shelf3->purge; - undef $shelf3; - - ##Clear out this tag so we can do downstream work. - my $tag = WebGUI::VersionTag->getWorking($session); - $tag->commit; - WebGUI::Test->addToCleanup($tag); - + my $root = WebGUI::Test->asset; ####################################################################### # @@ -517,9 +72,6 @@ SKIP: { className => $class, templateId => $testTemplate->getId, }); - my $tag2 = WebGUI::VersionTag->getWorking($session); - WebGUI::Test->addToCleanup($tag2); - $tag2->commit; $session->user({userId => 1}); $testShelf->prepareView; my $json = $testShelf->view; @@ -532,10 +84,6 @@ SKIP: { groupIdView => $inGroup->getId, title => 'Private Product', }); - my $tag3 = WebGUI::VersionTag->getWorking($session); - WebGUI::Test->addToCleanup($tag3); - $tag3->commit; - $session->user({user => $tommy}); $testShelf->prepareView; $json = $testShelf->view; diff --git a/t/Asset/Wobject/StockData.t b/t/Asset/Wobject/StockData.t index e6ab0417d..d3d5d8fb1 100644 --- a/t/Asset/Wobject/StockData.t +++ b/t/Asset/Wobject/StockData.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -22,7 +22,6 @@ use Test::Deep; use JSON; use WebGUI::Test; # Must use this before any other WebGUI modules use WebGUI::Session; -use WebGUI::Cache; #---------------------------------------------------------------------------- # Init @@ -52,8 +51,9 @@ is $stocks->{qw/GWR symbol/}, 'GWR', 'stock fetch successful'; cmp_ok $stocks->{qw/GWR last_fetch/}, '<', $now-500, 'last_fetch set in the past'; my $last_fetch = $stocks->{qw/GWR last_fetch/}; -my $cache = WebGUI::Cache->new($session, [$asset->getId, 'usa', 'GWR']); -is $cache->get()->{qw/GWR symbol/}, 'GWR', 'cache loaded with valid data'; +is $session->cache->get( join "", $asset->getId, 'usa', 'GWR' )->{qw/GWR symbol/}, + 'GWR', + 'cache loaded with valid data'; restore_time(); diff --git a/t/Asset/Wobject/StoryArchive.t b/t/Asset/Wobject/StoryArchive.t index 8f98f6f5b..18f7d5a86 100644 --- a/t/Asset/Wobject/StoryArchive.t +++ b/t/Asset/Wobject/StoryArchive.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use Test::More; use Test::Deep; use File::Copy qw/mv/; @@ -27,7 +25,6 @@ use WebGUI::Test; # Must use this before any other WebGUI modules use WebGUI::Test::Maker::Permission; use WebGUI::Session; use WebGUI::Text; -use WebGUI::Utility; use WebGUI::DateTime; use DateTime; @@ -63,36 +60,26 @@ $canPostMaker->prepare({ fail => [1, $reader ], }); -my $tests = 56 - + $canPostMaker->plan - ; -plan tests => 1 - + $tests; - #---------------------------------------------------------------------------- # put your tests here -my $class = 'WebGUI::Asset::Wobject::StoryArchive'; -my $loaded = use_ok($class); +use_ok('WebGUI::Asset::Wobject::StoryArchive'); my $storage; my $versionTag; my $creationDateSth = $session->db->prepare('update asset set creationDate=? where assetId=?'); -my @skipAutoCommit = (undef, undef, { skipAutoCommitWorkflows => 1 }); +my @skipAutoCommit = WebGUI::Test->getAssetSkipCoda; -SKIP: { - -skip "Unable to load module $class", $tests unless $loaded; -my $home = WebGUI::Asset->getDefault($session); +my $home = WebGUI::Test->asset; +$versionTag = WebGUI::VersionTag->getWorking($session); $archive = $home->addChild({ - className => $class, + className => 'WebGUI::Asset::Wobject::StoryArchive', title => 'My Stories', url => '/home/mystories', styleTemplateId => $home->get('styleTemplateId'), }); -$versionTag = WebGUI::VersionTag->getWorking($session); $versionTag->commit; WebGUI::Test->addToCleanup($versionTag); $archive = $archive->cloneFromDb; @@ -142,17 +129,17 @@ is($todayFolder->get('styleTemplateId'), $archive->get('styleTemplateId'), '... { my $undo = WebGUI::Test->overrideSetting(urlExtension => 'ext'); my $arch2 = $home->addChild({ - className => $class, + className => 'WebGUI::Asset::Wobject::StoryArchive', title => 'Extension Tester', }); - addToCleanup($arch2); + WebGUI::Test->addToCleanup($arch2); is $arch2->get('url'), - 'home/extension-tester.ext', + $home->get('url').'/extension-tester.ext', 'ext added'; is $arch2->getFolderUrl('blah'), - 'home/extension-tester/blah.ext', + $home->get('url').'/extension-tester/blah.ext', 'folder url: strip extension from parent and add to child'; my $folder = $arch2->getFolder($now); @@ -205,8 +192,8 @@ isa_ok($child, 'WebGUI::Asset::Wobject::Folder', '... will add folders, so impor $child->purge; -$child = $archive->addChild({className => 'WebGUI::Asset::Story', title => 'First Story'}, @skipAutoCommit); my $tag1 = WebGUI::VersionTag->getWorking($session); +$child = $archive->addChild({className => 'WebGUI::Asset::Story', title => 'First Story', }, @skipAutoCommit); $tag1->commit; WebGUI::Test->addToCleanup($tag1); isa_ok($child, 'WebGUI::Asset::Story', 'addChild added and returned a Story'); @@ -242,9 +229,9 @@ my $newFolder = $archive->getFolder($yesterday); my ($wgBdayMorn,undef) = $session->datetime->dayStartEnd($wgBday); my ($yesterdayMorn,undef) = $session->datetime->dayStartEnd($yesterday); -my $story = $oldFolder->addChild({ className => 'WebGUI::Asset::Story', title => 'WebGUI is released', keywords => 'roger,foxtrot,echo,all'}, @skipAutoCommit); -$creationDateSth->execute([$wgBday, $story->getId]); my $tag2 = WebGUI::VersionTag->getWorking($session); +my $story = $oldFolder->addChild({ className => 'WebGUI::Asset::Story', title => 'WebGUI is released', keywords => 'roger,foxtrot,echo,all', }, @skipAutoCommit); +$creationDateSth->execute([$wgBday, $story->getId]); $tag2->commit; WebGUI::Test->addToCleanup($tag2); @@ -253,9 +240,9 @@ WebGUI::Test->addToCleanup($tag2); is ($storyDB->get('status'), 'approved', 'addRevision always calls for an autocommit'); } -my $pastStory = $newFolder->addChild({ className => 'WebGUI::Asset::Story', title => "Yesterday is history" }, @skipAutoCommit); -$creationDateSth->execute([$yesterday, $pastStory->getId]); my $tag3 = WebGUI::VersionTag->getWorking($session); +my $pastStory = $newFolder->addChild({ className => 'WebGUI::Asset::Story', title => "Yesterday is history", }, @skipAutoCommit); +$creationDateSth->execute([$yesterday, $pastStory->getId]); $tag3->commit; WebGUI::Test->addToCleanup($tag3); @@ -283,7 +270,7 @@ cmp_deeply( ); KEY: foreach my $key (keys %{ $templateVars }) { - next KEY if isIn($key, qw/canPostStories addStoryUrl date_loop mode/); + next KEY if $key ~~ [qw/canPostStories addStoryUrl date_loop mode/]; delete $templateVars->{$key}; } @@ -324,14 +311,14 @@ cmp_deeply( 'viewTemplateVariables: returns expected template variables with 3 stories in different folders, user is cannot edit stories' ); -my $story2 = $folder->addChild({ className => 'WebGUI::Asset::Story', title => 'Story 2', keywords => "roger,foxtrot,all"}, @skipAutoCommit); -my $story3 = $folder->addChild({ className => 'WebGUI::Asset::Story', title => 'Story 3', keywords => "foxtrot,echo,all"}, @skipAutoCommit); -my $story4 = $folder->addChild({ className => 'WebGUI::Asset::Story', title => 'Story 4', keywords => "roger,echo,all"}, @skipAutoCommit); +my $tag4 = WebGUI::VersionTag->getWorking($session); +my $story2 = $folder->addChild({ className => 'WebGUI::Asset::Story', title => 'Story 2', keywords => "roger,foxtrot,all", }, @skipAutoCommit); +my $story3 = $folder->addChild({ className => 'WebGUI::Asset::Story', title => 'Story 3', keywords => "foxtrot,echo,all", }, @skipAutoCommit); +my $story4 = $folder->addChild({ className => 'WebGUI::Asset::Story', title => 'Story 4', keywords => "roger,echo,all", }, @skipAutoCommit); foreach my $storilet ($story2, $story3, $story4) { $session->db->write("update asset set creationDate=$now where assetId=?",[$storilet->getId]); } $archive->update({storiesPerPage => 3}); -my $tag4 = WebGUI::VersionTag->getWorking($session); $tag4->commit; WebGUI::Test->addToCleanup($tag4); @@ -341,7 +328,7 @@ $session->user({userId => 3}); $templateVars = $archive->viewTemplateVariables(); KEY: foreach my $key (keys %{ $templateVars }) { - next KEY if isIn($key, qw/canPostStories addStoryUrl date_loop/); + next KEY if $key ~~ [qw/canPostStories addStoryUrl date_loop/]; delete $templateVars->{$key}; } @@ -349,7 +336,7 @@ cmp_deeply( $templateVars, { canPostStories => 1, - addStoryUrl => '/home/mystories?func=add;class=WebGUI::Asset::Story', + addStoryUrl => '/home/mystories?func=add;className=WebGUI::Asset::Story', date_loop => [ { epochDate => ignore(), @@ -717,10 +704,6 @@ WebGUI::Test->addToCleanup($zzz_child); $archive->update({storiesPerPage => 25, storySortOrder => 'Alphabetically' }); -$tag1 = WebGUI::VersionTag->getWorking($session); -$tag1->commit; -WebGUI::Test->addToCleanup($tag1); - $templateVars = $archive->viewTemplateVariables(); cmp_deeply ( @@ -766,9 +749,10 @@ cmp_deeply ( 'viewTemplateVariables: sorted by story title' ); -} ## end SKIP block - $creationDateSth->finish; +done_testing(); + +#---------------------------------------------------------------------------- sub simpleHrefParser { my ($text) = @_; diff --git a/t/Asset/Wobject/StoryTopic.t b/t/Asset/Wobject/StoryTopic.t index 17b062992..4d1e560e0 100644 --- a/t/Asset/Wobject/StoryTopic.t +++ b/t/Asset/Wobject/StoryTopic.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use Test::More; use Test::Deep; use Data::Dumper; @@ -38,9 +36,7 @@ plan tests => 21; my $class = 'WebGUI::Asset::Wobject::StoryTopic'; -my $versionTag = WebGUI::VersionTag->getWorking($session); - -my $archive = WebGUI::Asset->getDefault($session)->addChild({className => 'WebGUI::Asset::Wobject::StoryArchive', title => 'My Stories', url => '/home/mystories'}); +my $archive = WebGUI::Test->asset->addChild({className => 'WebGUI::Asset::Wobject::StoryArchive', title => 'My Stories', url => '/home/mystories'}); my $now = time(); my $nowFolder = $archive->getFolder($now); @@ -53,6 +49,7 @@ my $creationDateSth = $session->db->prepare('update asset set creationDate=? whe my $pastStory = $newFolder->addChild({ className => 'WebGUI::Asset::Story', title => "Yesterday is history", keywords => 'andy,norton'}); $creationDateSth->execute([$yesterday, $pastStory->getId]); $pastStory->requestAutoCommit; +$pastStory = $pastStory->cloneFromDb; my @staff = qw/norton hadley mert trout/; my @inmates = qw/bogs red brooks andy heywood tommy jake skeet/; @@ -63,14 +60,14 @@ my $storyHandler = {}; STORY: foreach my $name (@characters) { my $namedStory = $nowFolder->addChild({ className => 'WebGUI::Asset::Story', title => $name, keywords => $name, } ); - $storyHandler->{$name} = $namedStory; $creationDateSth->execute([$now, $namedStory->getId]); $namedStory->requestAutoCommit; + $storyHandler->{$name} = $namedStory->cloneFromDb; } $storyHandler->{bogs}->update({subtitle => 'drinking his food through a straw'}); -my $topic = WebGUI::Asset->getDefault($session)->addChild({ +my $topic = WebGUI::Test->asset->addChild({ className => 'WebGUI::Asset::Wobject::StoryTopic', title => 'Popular inmates in Shawshank Prison', keywords => join(',', @inmates), @@ -83,8 +80,7 @@ $topic->update({ storiesShort => 3, }); -$versionTag->commit; -addToCleanup($versionTag); +$topic = $topic->cloneFromDb; ################################################################ # @@ -355,6 +351,7 @@ cmp_deeply( $pastStory->update( { title => "aaaay was history but isn't any more" } ); $pastStory->requestAutoCommit; +$pastStory = $pastStory->cloneFromDb; $topic->update({ storiesPer => 4, storiesShort => 4, }); # storiesPer is used when _standAlone is true, storiesShort otherwise $topic->{_standAlone} = 0; @@ -400,15 +397,13 @@ cmp_variable_loop( # Regression -- Empty StoryTopics shouldn't blow up ################################################################ -my $emptyarchive = WebGUI::Asset->getDefault($session)->addChild({ +my $emptyarchive = WebGUI::Test->asset->addChild({ className => 'WebGUI::Asset::Wobject::StoryTopic', title => 'Why Do Good Things Happen To Bad People', url => '/home/badstories', keywords => 'aksjhgkja asgjhshs assajshhsg5', }); -addToCleanup($emptyarchive); # blows up under the debugger...? -$versionTag->commit; $emptyarchive->{_standAlone} = 1; ok(eval { $emptyarchive->viewTemplateVariables() }, "viewTemplateVariables with _standAlone = 1 doesn't throw an error"); diff --git a/t/Asset/Wobject/Survey.t b/t/Asset/Wobject/Survey.t index 7f156a398..0b615412f 100644 --- a/t/Asset/Wobject/Survey.t +++ b/t/Asset/Wobject/Survey.t @@ -4,12 +4,11 @@ use strict; use warnings; -use FindBin; -use lib "$FindBin::Bin/../../lib"; use Test::More; use Test::Deep; use Data::Dumper; use WebGUI::Test; # Must use this before any other WebGUI modules +use WebGUI::Test::Mechanize; use WebGUI::Session; #---------------------------------------------------------------------------- @@ -18,7 +17,7 @@ my $session = WebGUI::Test->session; #---------------------------------------------------------------------------- # Tests -plan tests => 47; +plan tests => 53; #---------------------------------------------------------------------------- # put your tests here @@ -27,17 +26,16 @@ my ($survey); my $user = WebGUI::User->new( $session, 'new' ); WebGUI::Test->addToCleanup($user); -my $import_node = WebGUI::Asset->getImportNode($session); +my $import_node = WebGUI::Test->asset; # Create a Survey -$survey = $import_node->addChild( { className => 'WebGUI::Asset::Wobject::Survey', } ); my $tag = WebGUI::VersionTag->getWorking($session); +$survey = $import_node->addChild( { className => 'WebGUI::Asset::Wobject::Survey', } ); $tag->commit; $survey = $survey->cloneFromDb; -WebGUI::Test->addToCleanup($survey); isa_ok($survey, 'WebGUI::Asset::Wobject::Survey'); -my $sJSON = $survey->surveyJSON; +my $sJSON = $survey->getSurveyJSON; # Load bare-bones survey, containing a single section (S0) $sJSON->update([0], { variable => 'S0' }); @@ -68,9 +66,9 @@ my $responseId = $survey->responseId; my $s = WebGUI::Asset::Wobject::Survey->newByResponseId($session, $responseId); is($s->getId, $survey->getId, 'newByResponseId returns same Survey'); } -is($survey->get('maxResponsesPerUser'), 1, 'maxResponsesPerUser defaults to 1'); +is($survey->maxResponsesPerUser, 1, 'maxResponsesPerUser defaults to 1'); ok($survey->canTakeSurvey, '..which means user can take survey'); -is($survey->get('revisionDate'), $session->db->quickScalar('select revisionDate from Survey_response where Survey_responseId = ?', [$responseId]), 'Current revisionDate used'); +is($survey->revisionDate, $session->db->quickScalar('select revisionDate from Survey_response where Survey_responseId = ?', [$responseId]), 'Current revisionDate used'); #################################################### # @@ -174,7 +172,7 @@ cmp_deeply(from_json($surveyEnd), { type => 'forward', url => '/getting_started' # Check a simple www_jumpTo request $session->user( { userId => 3 } ); WebGUI::Test->getPage( $survey, 'www_jumpTo', { formParams => {id => '0'} } ); - is( $session->http->getStatus, '201', 'Page request ok' ); # why is "201 - created" status used?? + is( $session->response->status, '201', 'Page request ok' ); # why is "201 - created" status used?? is($survey->responseJSON->nextResponse, 0, 'S0 is the first response'); tie my %expectedSurveyOrder, 'Tie::IxHash'; @@ -206,20 +204,21 @@ cmp_deeply(from_json($surveyEnd), { type => 'forward', url => '/getting_started' # Modify Survey structure, new revision not created $survey->submitObjectEdit({ id => "0", text => "new text"}); - is($survey->surveyJSON->section([0])->{text}, 'new text', 'Survey updated'); + is($survey->getSurveyJSON->section([0])->{text}, 'new text', 'Survey updated'); is($session->db->quickScalar('select revisionDate from Survey where assetId = ?', [$surveyId]), $revisionDate, 'Revision unchanged'); # Push revisionDate into the past because we can't have 2 revision dates with the same epoch (this is very hacky) - $revisionDate--; + $revisionDate -= 5; $session->stow->deleteAll(); - WebGUI::Cache->new($session)->flush; + $session->cache->clear; $session->db->write('update Survey set revisionDate = ? where assetId = ?', [$revisionDate, $surveyId]); $session->db->write('update assetData set revisionDate = ? where assetId = ?', [$revisionDate, $surveyId]); $session->db->write('update wobject set revisionDate = ? where assetId = ?', [$revisionDate, $surveyId]); - $survey = WebGUI::Asset->new($session, $surveyId); + $survey = WebGUI::Asset->newById($session, $surveyId); isa_ok($survey, 'WebGUI::Asset::Wobject::Survey', 'Got back survey after monkeying with revisionDate'); is($session->db->quickScalar('select revisionDate from Survey where assetId = ?', [$surveyId]), $revisionDate, 'Revision date pushed back'); + is($survey->revisionDate, $revisionDate, '... and in the object, too'); # Create new response my $responseId = $survey->responseId; @@ -232,11 +231,11 @@ cmp_deeply(from_json($surveyEnd), { type => 'forward', url => '/getting_started' # Make another change, causing new revision to be automatically created $survey->submitObjectEdit({ id => "0", text => "newer text"}); - my $newerSurvey = WebGUI::Asset->new($session, $surveyId); # retrieve newer revision + my $newerSurvey = WebGUI::Asset->newById($session, $surveyId); # retrieve newer revision isa_ok($newerSurvey, 'WebGUI::Asset::Wobject::Survey', 'After change, re-retrieved Survey instance'); is($newerSurvey->getId, $surveyId, '..which is the same survey'); - is($newerSurvey->surveyJSON->section([0])->{text}, 'newer text', '..with updated text'); - ok($newerSurvey->get('revisionDate') > $revisionDate, '..and newer revisionDate'); + is($newerSurvey->getSurveyJSON->section([0])->{text}, 'newer text', '..with updated text'); + ok($newerSurvey->revisionDate > $revisionDate, '..and newer revisionDate'); # Create another response (this one will use the new revision) my $newUser = WebGUI::User->new( $session, 'new' ); @@ -257,7 +256,7 @@ SKIP: { skip "Unable to load GraphViz", 1 if $@; -$survey->surveyJSON->remove([1]); +$survey->getSurveyJSON->remove([1]); my ($storage, $filename) = $survey->graph( { format => 'plain', layout => 'dot' } ); like($storage->getFileContentsAsScalar($filename), qr{ ^graph .* # starts with graph @@ -266,51 +265,22 @@ like($storage->getFileContentsAsScalar($filename), qr{ stop$ # ..and end with stop }xs, 'Generated graph looks roughly okay'); -} - -$survey->getAdminConsole(); -my $adminConsole = $survey->getAdminConsole(); -cmp_deeply( - $adminConsole->{_submenuItem}, - [ - { - 'extras' => undef, - 'url' => re('func=edit$'), - 'label' => 'Edit' +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get_ok( '/' ); +$mech->session->user({ userId => 3 }); +$mech->get_ok( $survey->getUrl( 'func=graph' ) ); +$mech->submit_form_ok({ + fields => { + format => "plain", + layout => "dot", }, - { - 'extras' => undef, - 'url' => re('func=editSurvey$'), - 'label' => 'Edit Survey' - }, - { - 'extras' => undef, - 'url' => re('func=takeSurvey$'), - 'label' => 'Take Survey' - }, - { - 'extras' => undef, - 'url' => re('func=graph$'), - 'label' => 'Visualize' - }, - { - 'extras' => undef, - 'url' => re('func=editTestSuite$'), - 'label' => 'Test Suite' - }, - { - 'extras' => undef, - 'url' => re('func=runTests$'), - 'label' => 'Run All Tests' - }, - { - 'extras' => undef, - 'url' => re('func=runTests;format=tap$'), - 'label' => 'Run All Tests (TAP)' - } - ], - "Admin console submenu", + }, + "generate a graph", ); +# Can only test for the uploads, mech doesn't have uploads handler +$mech->content_contains( 'uploads/temp', 'uploads link exists' ); + +} #################################################### # @@ -321,3 +291,27 @@ cmp_deeply( my $survey_json = $survey->www_loadSurvey({}); my $survey_data = JSON::from_json($survey_json); unlike($survey_data->{edithtml}, qr/\^International/, 'www_loadSurvey process macros'); + +#---------------------------------------------------------------------------- +# www_editTest +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get_ok( '/' ); +$mech->session->user({ userId => 3 }); +$mech->get_ok( $survey->getUrl( 'func=editTest' ) ); +$mech->submit_form_ok({ + fields => { + name => 'TEST Test', + }, + }, "Create a new test" +); + +use WebGUI::Asset::Wobject::Survey::Test; +my $tests = WebGUI::Asset::Wobject::Survey::Test->getAllIds( $session, { + constraints => [{ + 'assetId = ?' => $survey->getId, + }], +}); +is( @$tests, 1, "test exists" ); +my $test = WebGUI::Asset::Wobject::Survey::Test->new( $session, $tests->[0] ); +ok( $test, "test exists" ); +is( $test->name, "TEST Test", "name set correctly" ); diff --git a/t/Asset/Wobject/Survey/ExpressionEngine.t b/t/Asset/Wobject/Survey/ExpressionEngine.t index 7fdd2227c..46c4e6a72 100644 --- a/t/Asset/Wobject/Survey/ExpressionEngine.t +++ b/t/Asset/Wobject/Survey/ExpressionEngine.t @@ -4,8 +4,6 @@ use strict; use warnings; -use FindBin; -use lib "$FindBin::Bin/../../../lib"; use Test::More; use Test::Deep; use Test::MockObject::Extends; @@ -28,11 +26,9 @@ plan tests => $tests + 1; #---------------------------------------------------------------------------- # put your tests here -my $usedOk = use_ok('WebGUI::Asset::Wobject::Survey::ExpressionEngine'); - my $e = "WebGUI::Asset::Wobject::Survey::ExpressionEngine"; +use_ok($e); -WebGUI::Test->originalConfig('enableSurveyExpressionEngine'); $session->config->set( 'enableSurveyExpressionEngine', 0 ); is( $e->run( $session, 'jump { 1 } target' ), undef, "Nothing happens unless we turn on enableSurveyExpressionEngine in config" ); @@ -192,25 +188,26 @@ my $survey = WebGUI::Asset->getImportNode($session)->addChild( { className => 'WebGUI::Asset::Wobject::Survey', }, ); -isa_ok($survey, 'WebGUI::Asset::Wobject::Survey'); -WebGUI::Test->addToCleanup($survey); +$versionTag->commit; WebGUI::Test->addToCleanup($versionTag); +$survey = $survey->cloneFromDb; +isa_ok($survey, 'WebGUI::Asset::Wobject::Survey'); my $url = $survey->get('url'); my $id = $survey->getId; -$survey->surveyJSON->newObject([]); # s0 -$survey->surveyJSON->newObject([0]); # s0q0 -$survey->surveyJSON->newObject([0,0]); # s0q0a0 -$survey->surveyJSON->newObject([0]); # s0q1 -$survey->surveyJSON->newObject([0,1]); # s0q1a0 +$survey->getSurveyJSON->newObject([]); # s0 +$survey->getSurveyJSON->newObject([0]); # s0q0 +$survey->getSurveyJSON->newObject([0,0]); # s0q0a0 +$survey->getSurveyJSON->newObject([0]); # s0q1 +$survey->getSurveyJSON->newObject([0,1]); # s0q1a0 -$survey->surveyJSON->section([0])->{variable} = 'ext_s0'; -$survey->surveyJSON->question([0,0])->{variable} = 'ext_s0q0'; -$survey->surveyJSON->question([0,1])->{variable} = 'ext_s0q1'; -$survey->surveyJSON->answer([0,0,0])->{recordedAnswer} = 'ext_s0q0a0'; -$survey->surveyJSON->answer([0,0,0])->{value} = 150; # worth 150 points -$survey->surveyJSON->answer([0,1,0])->{recordedAnswer} = 'ext_s0q1a0'; -$survey->surveyJSON->answer([0,1,0])->{value} = 50; # worth 50 points +$survey->getSurveyJSON->section([0])->{variable} = 'ext_s0'; +$survey->getSurveyJSON->question([0,0])->{variable} = 'ext_s0q0'; +$survey->getSurveyJSON->question([0,1])->{variable} = 'ext_s0q1'; +$survey->getSurveyJSON->answer([0,0,0])->{recordedAnswer} = 'ext_s0q0a0'; +$survey->getSurveyJSON->answer([0,0,0])->{value} = 150; # worth 150 points +$survey->getSurveyJSON->answer([0,1,0])->{recordedAnswer} = 'ext_s0q1a0'; +$survey->getSurveyJSON->answer([0,1,0])->{value} = 50; # worth 50 points my $responseId = $survey->responseId( { userId => $user->userId } ); diff --git a/t/Asset/Wobject/Survey/Reports.t b/t/Asset/Wobject/Survey/Reports.t index 54b833963..5bb08629c 100644 --- a/t/Asset/Wobject/Survey/Reports.t +++ b/t/Asset/Wobject/Survey/Reports.t @@ -4,8 +4,6 @@ use strict; use warnings; -use FindBin; -use lib "$FindBin::Bin/../../../lib"; use Test::More; use Test::Deep; use Data::Dumper; @@ -19,13 +17,12 @@ my $session = WebGUI::Test->session; #---------------------------------------------------------------------------- # Tests -my $tests = 2; -plan tests => $tests + 1; +plan tests => 3; #---------------------------------------------------------------------------- # put your tests here -my $usedOk = use_ok('WebGUI::Asset::Wobject::Survey'); +use_ok('WebGUI::Asset::Wobject::Survey'); my $user = WebGUI::User->new( $session, 'new' ); WebGUI::Test->addToCleanup($user); @@ -39,7 +36,7 @@ isa_ok($survey, 'WebGUI::Asset::Wobject::Survey'); # Returns the contents of the Survey_tempReport table sub getAll { $session->db->buildArrayRefOfHashRefs('select * from Survey_tempReport where assetId = ?', [$survey->getId]) } -my $sJSON = $survey->surveyJSON; +my $sJSON = $survey->getSurveyJSON; # Load bare-bones survey, containing a single section (S0) $sJSON->update([0], { variable => 'S0' }); @@ -125,5 +122,4 @@ superhashof({ value => 20, # e.g. score })]); - #vim:ft=perl diff --git a/t/Asset/Wobject/Survey/ResponseJSON.t b/t/Asset/Wobject/Survey/ResponseJSON.t index 3b31bccc2..843681d5c 100644 --- a/t/Asset/Wobject/Survey/ResponseJSON.t +++ b/t/Asset/Wobject/Survey/ResponseJSON.t @@ -4,8 +4,6 @@ use strict; use warnings; -use FindBin; -use lib "$FindBin::Bin/../../../lib"; use Test::More; use Test::Deep; use Test::MockObject::Extends; @@ -336,7 +334,6 @@ cmp_deeply($rJSON->responseScores(indexBy => 'variable'), { s1q0 => 100, s1q1 => # #################################################### # Turn on the survey Expression Engine -WebGUI::Test->originalConfig('enableSurveyExpressionEngine'); $session->config->set('enableSurveyExpressionEngine', 1); $rJSON->survey->section([0])->{variable} = 's0'; $rJSON->survey->question([0,0])->{variable} = 's0q0'; # surveyOrder index = 0 diff --git a/t/Asset/Wobject/Survey/SurveyJSON.t b/t/Asset/Wobject/Survey/SurveyJSON.t index 4830b4c25..d4bb12a93 100644 --- a/t/Asset/Wobject/Survey/SurveyJSON.t +++ b/t/Asset/Wobject/Survey/SurveyJSON.t @@ -4,8 +4,6 @@ use strict; use warnings; -use FindBin; -use lib "$FindBin::Bin/../../../lib"; use Test::More; use Test::Deep; use Test::Exception; diff --git a/t/Asset/Wobject/Survey/Test.t b/t/Asset/Wobject/Survey/Test.t index 4f7aedb72..6e3b5415d 100644 --- a/t/Asset/Wobject/Survey/Test.t +++ b/t/Asset/Wobject/Survey/Test.t @@ -4,8 +4,6 @@ use strict; use warnings; -use FindBin; -use lib "$FindBin::Bin/../../../lib"; use Test::More; use Test::Deep; use Test::Exception; @@ -21,7 +19,6 @@ my $session = WebGUI::Test->session; #---------------------------------------------------------------------------- # Tests -plan tests => 94; my $tp = use_ok('TAP::Parser'); my $tpa = use_ok('TAP::Parser::Aggregator'); @@ -34,7 +31,6 @@ my $user = WebGUI::User->new( $session, 'new' ); WebGUI::Test->addToCleanup($user); my $import_node = WebGUI::Asset->getImportNode($session); -WebGUI::Test->originalConfig('enableSurveyExpressionEngine'); $session->config->set('enableSurveyExpressionEngine', 1); # Create a Survey @@ -42,7 +38,12 @@ my $s = $import_node->addChild( { className => 'WebGUI::Asset::Wobject::Survey', isa_ok( $s, 'WebGUI::Asset::Wobject::Survey' ); WebGUI::Test->addToCleanup($s); -my $sJSON = $s->surveyJSON; +my $tag = WebGUI::VersionTag->getWorking($session); +$tag->commit; +WebGUI::Test->addToCleanup($tag); +$s = $s->cloneFromDb; + +my $sJSON = $s->getSurveyJSON; # N.B. Survey starts off with a single empty section (S0) @@ -150,10 +151,29 @@ cmp_deeply( 'surveyOrderIndex correct' ); -my $t1 = WebGUI::Asset::Wobject::Survey::Test->create( $session, { assetId => $s->getId } ); +my $t1 = WebGUI::Asset::Wobject::Survey::Test->new( $session, { assetId => $s->getId } ); WebGUI::Test->addToCleanup(sub {$t1->delete();}); my $spec; +can_ok($t1, qw/assetId name test lastUpdated testId session dateCreated sequenceNumber update set get/); +$t1->name('test name'); +is $t1->name, 'test name', 'name: direct mutator works okay'; +$t1->test('some test'); +is $t1->test, 'some test', 'test: mutator check'; +$t1->set({ name => 'tested name' }); +is $t1->name, 'tested name', 'name: set works okay'; +$t1->set({test => 'tested some'}); +is $t1->test, 'tested some', 'test: set'; +$t1->update({ name => 'different name' }); +is $t1->name, 'different name', 'update: updated name'; +$t1->update({ test => 'another test', name => 'another name', }); +is $t1->name, 'another name', 'update: name, test and name together'; +is $t1->test, 'another test', 'update: test'; + +my $name_prop = $t1->meta->find_attribute_by_name('name'); +ok $name_prop->does('WebGUI::Definition::Meta::Property'), '::Test property does Meta::Property'; +ok $name_prop->does('WebGUI::Definition::Meta::Settable'), '::Test property does Meta::Settable'; + # No tests $spec = <<END_SPEC; [ ] @@ -684,7 +704,7 @@ sub try_it { my ( $test, $spec, $opts ) = @_; chomp($spec); - $test->update( { test => $spec } ); + $test->test($spec); my $result = $t1->run(); ok( $result, 'Tests ran ok' ); @@ -722,4 +742,6 @@ Hashes differ on element: a expect : '2' END_CMP +done_testing; + #vim:ft=perl diff --git a/t/Asset/Wobject/Survey/package.t b/t/Asset/Wobject/Survey/package.t new file mode 100644 index 000000000..3071b5f1b --- /dev/null +++ b/t/Asset/Wobject/Survey/package.t @@ -0,0 +1,67 @@ +# Tests WebGUI::Asset::Wobject::Survey Reporting +# +# + +use strict; +use warnings; +use FindBin; +use lib "$FindBin::Bin/../../../lib"; +use Test::More; +use Test::Deep; +use Data::Dumper; +use Clone qw/clone/; +use WebGUI::Test; # Must use this before any other WebGUI modules +use WebGUI::Session; +WebGUI::Error->Trace(1); # Turn on tracing of uncaught Exception::Class exceptions + +#---------------------------------------------------------------------------- +# Init +my $session = WebGUI::Test->session; + +#---------------------------------------------------------------------------- +# put your tests here + +my $import_node = WebGUI::Asset->getImportNode($session); + +# Create a Survey +my $survey = $import_node->addChild( { className => 'WebGUI::Asset::Wobject::Survey', } ); +WebGUI::Test->addToCleanup($survey); + +my $sJSON = $survey->getSurveyJSON; + +# Load bare-bones survey, containing a single section (S0) +$sJSON->update([0], { variable => 'S0' }); + +# Add 1 question to S0 +$sJSON->newObject([0]); # S0Q0 +$sJSON->update([0,0], { variable => 'toes', questionType => 'Multiple Choice' }); +$sJSON->update([0,0,0], { text => 'one',}); +$sJSON->update([0,0,1], { text => 'two',}); +$sJSON->update([0,0,2], { text => 'more than two',}); +$sJSON->update([0,1], { variable => 'name', questionType => 'Text' }); + +$survey->addType('toes', [0,0]); + +$survey->persistSurveyJSON; ##This does not update the SurveyJSON object cacched in the Survey object +$survey=$survey->cloneFromDb; + +my $asset_data = $survey->exportAssetData(); + +ok exists $asset_data->{question_types}, 'question_types entry exists in asset data to package'; +ok exists $asset_data->{question_types}->{toes}, 'the toes type in a question type' or + explain $asset_data; +ok !exists $asset_data->{question_types}->{name}, 'name question not in question types'; + +$asset_data->{question_types}->{fingers} = clone $asset_data->{question_types}->{toes}; + +$survey->importAssetCollateralData($asset_data); + +$survey = $survey->cloneFromDb; +my $multipleChoiceTypes = $survey->getSurveyJSON->multipleChoiceTypes; + +ok exists $multipleChoiceTypes->{fingers}, 'fingers type imported as package collateral data'; +ok exists $multipleChoiceTypes->{toes}, 'still have toes, too'; + +done_testing(); + +#vim:ft=perl diff --git a/t/Asset/Wobject/SyndicatedContent.t b/t/Asset/Wobject/SyndicatedContent.t index c6b164635..09d6ddc73 100644 --- a/t/Asset/Wobject/SyndicatedContent.t +++ b/t/Asset/Wobject/SyndicatedContent.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,10 +8,8 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; use File::Spec; -use lib "$FindBin::Bin/../../lib"; use Data::Dumper; @@ -24,7 +22,6 @@ use Test::More tests => 30; # increment this value for each test you create use Test::Deep; use WebGUI::Asset::Wobject::SyndicatedContent; use XML::FeedPP; -use WebGUI::Cache; my $session = WebGUI::Test->session; my %var; @@ -33,12 +30,9 @@ my %var; ## SETUP ## ############################## # Do our work in the import node -my $node = WebGUI::Asset->getImportNode($session); +my $node = WebGUI::Test->asset; # Create a version tag to work in -my $versionTag = WebGUI::VersionTag->getWorking($session); -$versionTag->set({name=>"SyndicatedContent Test"}); -addToCleanup($versionTag); my $syndicated_content = $node->addChild({className=>'WebGUI::Asset::Wobject::SyndicatedContent'}); ############################## @@ -215,8 +209,7 @@ sub titles_are { $syndicated_content->update({ hasTerms => 'WebGUI', }); my $testFeedUrl = 'http://www.example.com/feed.rss'; $syndicated_content->update({ rssUrl => $testFeedUrl, }); -my $cache = WebGUI::Cache->new($session, $testFeedUrl, 'RSS'); -$cache->set(slurp_rss('tbb.rss'), 60); +$session->cache->set($testFeedUrl, slurp_rss('tbb.rss'), 60); my $feed = $syndicated_content->generateFeed; @@ -241,7 +234,7 @@ $syndicated_content->update({ hasTerms => '', maxHeadlines => 50, }); -$cache->set(slurp_rss('duplicate-link.rss'), 60); +$session->cache->set($testFeedUrl, slurp_rss('duplicate-link.rss'), 60); my $oddFeed1 = $syndicated_content->generateFeed(); my @oddItems = $oddFeed1->get_item(); @@ -253,7 +246,7 @@ is (@oddItems, 2, 'feed has items even without pubDates or links'); # #################################################################### -$cache->set(slurp_rss('tbb_odd.rss'), 60); +$session->cache->set($testFeedUrl, slurp_rss('tbb_odd.rss'), 60); my @ascending = ( 'I have arrived in Lisboa!', 'WebGUI 8 Performance', diff --git a/t/Asset/Wobject/SyndicatedContent/encodings.t b/t/Asset/Wobject/SyndicatedContent/encodings.t index 29804f44e..841ac1ae1 100644 --- a/t/Asset/Wobject/SyndicatedContent/encodings.t +++ b/t/Asset/Wobject/SyndicatedContent/encodings.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -23,7 +23,6 @@ plan tests => 13; # increment this value for each test you create use Test::Deep; use WebGUI::Asset::Wobject::SyndicatedContent; use XML::FeedPP; -use WebGUI::Cache; my $session = WebGUI::Test->session; my %var; @@ -33,12 +32,9 @@ my %var; ############################## # Do our work in the import node -my $node = WebGUI::Asset->getImportNode($session); +my $node = WebGUI::Test->asset; # Create a version tag to work in -my $versionTag = WebGUI::VersionTag->getWorking($session); -$versionTag->set({name=>"SyndicatedContent Test"}); -addToCleanup($versionTag); my $syndicated_content = $node->addChild({className=>'WebGUI::Asset::Wobject::SyndicatedContent'}); #################################################################### @@ -54,7 +50,7 @@ $syndicated_content->update({ hasTerms => '', rssUrl => $testFeedUrl, }); -my $cache = WebGUI::Cache->new($session, $testFeedUrl, 'RSS'); +$session->cache->set($testFeedUrl, , 60); my $utf8_es = slurp_rss('utf8-es.rss'); my $utf8_ru = slurp_rss('utf8-ru.rss'); @@ -67,46 +63,46 @@ my $iso_8859_5 = slurp_rss('iso-8859-5.rss'); my $es_title = "PM captur\x{00F3} a tres delincuentes que robaron agencia bancaria en San Mart\x{00ED}n"; my $ru_title = "\x{412}\x{438}\x{43a}\x{438}\x{43f}\x{435}\x{434}\x{438}\x{44f} - \x{421}\x{432}\x{435}\x{436}\x{438}\x{435} \x{43f}\x{440}\x{430}\x{432}\x{43a}\x{438} [ru]"; -$cache->set($utf8_es, 60); +$session->cache->set($testFeedUrl, $utf8_es, 60); is $syndicated_content->generateFeed->title, $es_title, 'Latin-1 compatible, UTF-8 encoded'; -$cache->set($utf8_ru, 60); +$session->cache->set($testFeedUrl, $utf8_ru, 60); is $syndicated_content->generateFeed->title, $ru_title, 'Russian, UTF-8 encoded'; -$cache->set($entity_es, 60); +$session->cache->set($testFeedUrl, $entity_es, 60); is $syndicated_content->generateFeed->title, $es_title, 'Latin-1 compatible, Entity encoded, utf8 flag off'; -$cache->set($entity_ru, 60); +$session->cache->set($testFeedUrl, $entity_ru, 60); is $syndicated_content->generateFeed->title, $ru_title, 'Russian, Entity encoded, utf8 flag off'; -$cache->set($UTF8_BOM . $utf8_es, 60); +$session->cache->set($testFeedUrl, $UTF8_BOM . $utf8_es, 60); is $syndicated_content->generateFeed->title, $es_title, 'Latin-1 compatible, UTF-8 encoded, With BOM'; -$cache->set(Encode::decode_utf8($utf8_es), 60); +$session->cache->set($testFeedUrl, Encode::decode_utf8($utf8_es), 60); is $syndicated_content->generateFeed->title, $es_title, 'Latin-1 compatible, Decoded'; -$cache->set(Encode::decode_utf8($utf8_ru), 60); +$session->cache->set($testFeedUrl, Encode::decode_utf8($utf8_ru), 60); is $syndicated_content->generateFeed->title, $ru_title, 'Russian, Decoded'; -$cache->set(Encode::decode_utf8($entity_es), 60); +$session->cache->set($testFeedUrl, $UTF8_BOM . $utf8_es, 60); is $syndicated_content->generateFeed->title, $es_title, 'Latin-1, Entity encoded, utf8 flag on'; -$cache->set(Encode::decode_utf8($entity_ru), 60); +$session->cache->set($testFeedUrl, Encode::decode_utf8($entity_ru), 60); is $syndicated_content->generateFeed->title, $ru_title, 'Russian, Entity encoded, utf8 flag on'; -$cache->set($UTF8_BOM . Encode::decode_utf8($utf8_es), 60); +$session->cache->set($testFeedUrl, $UTF8_BOM . Encode::decode_utf8($utf8_es), 60); is $syndicated_content->generateFeed->title, $es_title, 'Latin-1 compatible, Decoded, With BOM'; -$cache->set($utf8_no_prolog, 60); +$session->cache->set($testFeedUrl, $utf8_no_prolog, 60); is $syndicated_content->generateFeed->title, $es_title, 'No encoding in prolog, Decoded'; -$cache->set($iso_8859_1, 60); +$session->cache->set($testFeedUrl, $iso_8859_1, 60); is $syndicated_content->generateFeed->title, $es_title, 'ISO-8859-1 encoded'; -$cache->set($iso_8859_5, 60); +$session->cache->set($testFeedUrl, $iso_8859_5, 60); is $syndicated_content->generateFeed->title, $ru_title, 'ISO-8859-5 encoded'; -$cache->delete; +$session->cache->remove($testFeedUrl); sub slurp_rss { my $file = shift; diff --git a/t/Asset/Wobject/Thingy.t b/t/Asset/Wobject/Thingy.t index 87d76c825..9b792d236 100644 --- a/t/Asset/Wobject/Thingy.t +++ b/t/Asset/Wobject/Thingy.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,37 +8,34 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; ##The goal of this test is to test the creation of Thingy Wobjects. use WebGUI::Test; +use WebGUI::Test::MockAsset; use WebGUI::Session; -use Test::More tests => 38; # increment this value for each test you create +use Test::More tests => 47; # increment this value for each test you create use Test::Deep; use JSON; use WebGUI::Asset::Wobject::Thingy; +use WebGUI::Test::Mechanize; use Data::Dumper; my $session = WebGUI::Test->session; # Do our work in the import node -my $node = WebGUI::Asset->getImportNode($session); +my $node = WebGUI::Test->asset; my $templateId = 'THING_EDIT_TEMPLATE___'; -my $templateMock = Test::MockObject->new({}); -$templateMock->set_isa('WebGUI::Asset::Template'); -$templateMock->set_always('getId', $templateId); +my $templateMock = WebGUI::Test::MockAsset->new('WebGUI::Asset::Template'); +$templateMock->mock_id($templateId); my $templateVars; $templateMock->mock('process', sub { $templateVars = $_[1]; } ); -my $versionTag = WebGUI::VersionTag->getWorking($session); -$versionTag->set({name=>"Thingy Test"}); -WebGUI::Test->addToCleanup($versionTag); +my $tag = WebGUI::VersionTag->getWorking($session); my $thingy = $node->addChild({className=>'WebGUI::Asset::Wobject::Thingy'}); -$versionTag->commit; +$tag->commit; $thingy = $thingy->cloneFromDb; # Test for a sane object type @@ -323,7 +320,6 @@ ok( ! $thingy->hasEnteredMaxPerUser($otherThingId), 'hasEnteredMaxPerUser: retur my @edit_thing_form_fields = qw/form_start form_end form_submit field_loop/; { - WebGUI::Test->mockAssetId($templateId, $templateMock); $thingy->editThingData($otherThingId); my %miniVars; @miniVars{@edit_thing_form_fields} = @{ $templateVars }{ @edit_thing_form_fields }; @@ -343,7 +339,6 @@ $thingy->editThingDataSave($otherThingId, 'new', {"field_".$otherFieldId => 'oth ok( $thingy->hasEnteredMaxPerUser($otherThingId), 'hasEnteredMaxPerUser returns true with one row entered, and maxEntriesPerUser=1'); { - WebGUI::Test->mockAssetId($templateId, $templateMock); $thingy->editThingData($otherThingId); my %miniVars; @miniVars{@edit_thing_form_fields} = @{ $templateVars }{ @edit_thing_form_fields }; @@ -375,7 +370,6 @@ ok( ! $thingy->hasEnteredMaxEntries($otherThingId), 'hasEnteredMaxEntries: retur my @edit_thing_form_fields = qw/form_start form_end form_submit field_loop/; { - WebGUI::Test->mockAssetId($templateId, $templateMock); $thingy->editThingData($otherThingId); my %miniVars; @miniVars{@edit_thing_form_fields} = @{ $templateVars }{ @edit_thing_form_fields }; @@ -395,7 +389,6 @@ $thingy->editThingDataSave($otherThingId, 'new', {"field_".$otherFieldId => 'oth ok( $thingy->hasEnteredMaxEntries($otherThingId), 'hasEnteredMaxEntries returns true with one row entered, and maxEntriesTotal=1'); { - WebGUI::Test->mockAssetId($templateId, $templateMock); $thingy->editThingData($otherThingId); my %miniVars; @miniVars{@edit_thing_form_fields} = @{ $templateVars }{ @edit_thing_form_fields }; @@ -491,13 +484,105 @@ $session->request->setup_body({ }); $session->user({userId => '3'}); -$session->http->setStatus(200); +$session->response->status(200); my $json = $thingy->www_editThingDataSaveViaAjax(); is $json, '{}', 'www_editThingDataSaveViaAjax: Empty JSON hash'; -is $session->http->getStatus, 200, '... http status=200'; +is $session->response->status, 200, '... http status=200'; $session->request->setup_body({ }); +#---------------------------------------------------------------------------- +# www_editField + +my $fieldThingId = $thingy->addThing(); +diag( "Field Thing ID: $fieldThingId" ); + +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get_ok( '/' ); +$mech->session->user({ userId => 3 }); + +my %fieldInfo = ( + thingId => $fieldThingId, + label => 'Escape Plan', + defaultValue => 'zihuatanejo', + pretext => '', + subtext => 'PS: Dont tell anyone!', +); +$mech->get_ok( $thingy->getUrl( 'func=editField;thingId=' . $fieldThingId . ';fieldId=new' ) ); +$mech->submit_form_ok({ + fields => \%fieldInfo, + }, + "add field to thing", +); + +my $field = $session->db->quickHashRef( + "SELECT * FROM Thingy_fields WHERE assetId=? AND thingId=?", + [ $thingy->getId, $fieldThingId ], +); +ok( $field, "field exists" ); +cmp_deeply( $field, superhashof( \%fieldInfo ), 'field info saved' ); + +#---------------------------------------------------------------------------- +# www_importForm + +my $tag2 = WebGUI::VersionTag->getWorking($session); +my $thingy = WebGUI::Test->asset( + className => 'WebGUI::Asset::Wobject::Thingy', +); +$tag2->commit; +$thingy = $thingy->cloneFromDb; +my $thingId = $thingy->addThing(); +my @fieldIds = ( + $thingy->addField({ + assetId => $thingy->getId, + thingId => $thingId, + sequenceNumber => 1, + label => 'Name', + fieldType => 'text', + }), + $thingy->addField({ + assetId => $thingy->getId, + thingId => $thingId, + sequenceNumber => 2, + label => 'Age', + fieldType => 'Integer', + }), +); + +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get_ok( '/' ); +$mech->session->user({ userId => 3 }); + +$mech->get_ok( $thingy->getUrl( 'func=importForm;thingId=' . $thingId ) ); +$mech->submit_form_ok({ + fields => { + importFile_file => WebGUI::Test::collateral( "thingy.csv" ), + "fileContains_$fieldIds[0]" => 1, + "fileContains_$fieldIds[1]" => 1, + }, + }, + "Import data into thing", +); + +my @thingData = $session->db->buildArrayRefOfHashRefs( + "select * from ". $session->db->quote_identifier("Thingy_".$thingId), +); +cmp_deeply( + @thingData, + bag( + superhashof({ + "field_$fieldIds[0]" => "Andy Dufresne", + "field_$fieldIds[1]" => "42", + }), + superhashof({ + "field_$fieldIds[0]" => "Red Ellis", + "field_$fieldIds[1]" => "47", + }), + ), + " All rows imported ", +) or diag( explain \@thingData ); + + ################################################################# # # Unique fields diff --git a/t/Asset/Wobject/Thingy/duplicate.t b/t/Asset/Wobject/Thingy/duplicate.t index 4bc82565a..145ee0b1d 100644 --- a/t/Asset/Wobject/Thingy/duplicate.t +++ b/t/Asset/Wobject/Thingy/duplicate.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -27,19 +27,15 @@ use Data::Dumper; my $session = WebGUI::Test->session; # Do our work in the import node -my $node = WebGUI::Asset->getImportNode($session); +my $node = WebGUI::Test->asset; -my $versionTag = WebGUI::VersionTag->getWorking($session); -$versionTag->set({name=>"Thingy Test"}); -WebGUI::Test->addToCleanup($versionTag); my $thingy = $node->addChild({ className => 'WebGUI::Asset::Wobject::Thingy', groupIdView => 7, url => 'some_thing', }); is $session->db->quickScalar('select count(*) from assetIndex where assetId=?',[$thingy->getId]), 0, 'no records yet'; -$versionTag->commit; -$thingy = $thingy->cloneFromDb; +$thingy->commit; # Test indexThing, without needing a real thing my $groupIdEdit = $thingy->get("groupIdEdit"); diff --git a/t/Asset/Wobject/Thingy/editThingDataSave.t b/t/Asset/Wobject/Thingy/editThingDataSave.t index 97e751c02..7842ec7e4 100644 --- a/t/Asset/Wobject/Thingy/editThingDataSave.t +++ b/t/Asset/Wobject/Thingy/editThingDataSave.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -25,11 +25,7 @@ use Data::Dumper; my $session = WebGUI::Test->session; # Do our work in the import node -my $node = WebGUI::Asset->getImportNode($session); - -my $versionTag = WebGUI::VersionTag->getWorking($session); -$versionTag->set({name=>"Thingy Test"}); -WebGUI::Test->addToCleanup($versionTag); +my $node = WebGUI::Test->asset; my $thingy = $node->addChild({className=>'WebGUI::Asset::Wobject::Thingy'}); # Test adding a new Thing diff --git a/t/Asset/Wobject/Thingy/getFieldValue.t b/t/Asset/Wobject/Thingy/getFieldValue.t index c7ebbb214..ac360e618 100644 --- a/t/Asset/Wobject/Thingy/getFieldValue.t +++ b/t/Asset/Wobject/Thingy/getFieldValue.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/Asset/Wobject/Thingy/getSearchTemplateVars.t b/t/Asset/Wobject/Thingy/getSearchTemplateVars.t index 6ad2df58f..c82a5151d 100644 --- a/t/Asset/Wobject/Thingy/getSearchTemplateVars.t +++ b/t/Asset/Wobject/Thingy/getSearchTemplateVars.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -27,19 +27,15 @@ use Data::Dumper; my $session = WebGUI::Test->session; # Do our work in the import node -my $node = WebGUI::Asset->getImportNode($session); +my $node = WebGUI::Test->asset; -my $versionTag = WebGUI::VersionTag->getWorking($session); -$versionTag->set({name=>"Thingy Test"}); -WebGUI::Test->addToCleanup($versionTag); my $thingy = $node->addChild({ className => 'WebGUI::Asset::Wobject::Thingy', groupIdView => 7, url => 'some_thing', }); is $session->db->quickScalar('select count(*) from assetIndex where assetId=?',[$thingy->getId]), 0, 'no records yet'; -$versionTag->commit; -$thingy = $thingy->cloneFromDb; +$thingy->commit; # Test indexThing, without needing a real thing my $groupIdEdit = $thingy->get("groupIdEdit"); diff --git a/t/Asset/Wobject/Thingy/indexing.t b/t/Asset/Wobject/Thingy/indexing.t index 4c4073a7b..529e5727c 100644 --- a/t/Asset/Wobject/Thingy/indexing.t +++ b/t/Asset/Wobject/Thingy/indexing.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -266,7 +266,7 @@ is @{ $search->getAssetIds }, 3, 'setup for indexContent, start with 3 records.. my $updateTag = WebGUI::VersionTag->getWorking($session); WebGUI::Test->addToCleanup($updateTag); -$thingy = $thingy->addRevision({ url => 'wild_thing' }); +$thingy = $thingy->addRevision({ url => 'wild_thing',}); $updateTag->commit; $thingy = $thingy->cloneFromDb; diff --git a/t/Asset/Wobject/Thingy/www_editThingDataSaveViaAjax.t b/t/Asset/Wobject/Thingy/www_editThingDataSaveViaAjax.t index 8130d90be..4e1a70e48 100644 --- a/t/Asset/Wobject/Thingy/www_editThingDataSaveViaAjax.t +++ b/t/Asset/Wobject/Thingy/www_editThingDataSaveViaAjax.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -92,10 +92,10 @@ $session->request->setup_body({ }); $session->user({userId => '3'}); -$session->http->setStatus(200); +$session->response->status(200); my $json = $thingy->www_editThingDataSaveViaAjax(); is $json, '{}', 'www_editThingDataSaveViaAjax: Empty JSON hash'; -is $session->http->getStatus, 200, '... http status=200'; +is $session->response->status, 200, '... http status=200'; $session->request->setup_body({ diff --git a/t/Asset/Wobject/UserList.t b/t/Asset/Wobject/UserList.t index 8646bca06..361fd3a4d 100644 --- a/t/Asset/Wobject/UserList.t +++ b/t/Asset/Wobject/UserList.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,10 +8,8 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; use File::Spec; -use lib "$FindBin::Bin/../../lib"; ##The goal of this test is to test the creation of UserList Wobjects. @@ -23,11 +21,7 @@ use WebGUI::Asset::Wobject::UserList; my $session = WebGUI::Test->session; # Do our work in the import node -my $node = WebGUI::Asset->getImportNode($session); - -my $versionTag = WebGUI::VersionTag->getWorking($session); -$versionTag->set({name=>"UserList Test"}); -WebGUI::Test->addToCleanup($versionTag); +my $node = WebGUI::Test->asset; my $userList = $node->addChild({className=>'WebGUI::Asset::Wobject::UserList'}); # Test for a sane object type diff --git a/t/Asset/Wobject/WeatherData.t b/t/Asset/Wobject/WeatherData.t index b875ae473..9b766dfb1 100644 --- a/t/Asset/Wobject/WeatherData.t +++ b/t/Asset/Wobject/WeatherData.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -22,8 +22,8 @@ use Test::Deep; use Clone qw/clone/; use WebGUI::Test; # Must use this before any other WebGUI modules +use WebGUI::Test::MockAsset; use WebGUI::Session; -use WebGUI::Cache; #---------------------------------------------------------------------------- # Init @@ -60,9 +60,7 @@ else { #1234567890123456789012# my $templateId = 'FAKE_WEATHER_TEMPLATEq'; -my $templateMock = Test::MockObject->new({}); -$templateMock->set_isa('WebGUI::Asset::Template'); -$templateMock->set_always('getId', $templateId); +my $templateMock = WebGUI::Test::MockAsset->new('WebGUI::Asset::Template'); my $templateVars; $templateMock->mock('process', sub { $templateVars = clone $_[1]; } ); @@ -77,11 +75,10 @@ my $asset = $node->addChild( { WebGUI::Test->addToCleanup($asset); my $now = time(); -diag $now; set_relative_time(-1000); -diag time(); -WebGUI::Test->mockAssetId($templateId, $templateMock); +$templateMock->mock_id($templateId); +$templateMock->set_true('prepare'); $asset->prepareView(); $asset->view(); @@ -89,16 +86,13 @@ my $weather_data = $templateVars->{'ourLocations.loop'}->[0]; is $weather_data->{cityState}, 'Madison, WI (53715)', 'data from weather.com returned'; my $last_fetch = $weather_data->{last_fetch}; -diag $last_fetch; cmp_ok $last_fetch, '<', $now-500, 'last_fetch set in the past'; -my $cache = WebGUI::Cache->new($session, [$asset->getId, '53715']); -is $cache->get()->{'locations'}->[0]->{cityState}, 'Madison, WI (53715)', 'cache loaded with valid data'; +is $session->cache->get(join "", $asset->getId, '53715' )->{'locations'}->[0]->{cityState}, 'Madison, WI (53715)', 'cache loaded with valid data'; restore_time(); -$cache = WebGUI::Cache->new($session, [$asset->getId, '53715']); -is $cache->get()->{'locations'}->[0]->{cityState}, 'Madison, WI (53715)', 'cache loaded with valid data'; +is $session->cache->get(join "", $asset->getId, '53715' )->{'locations'}->[0]->{cityState}, 'Madison, WI (53715)', 'cache loaded with valid data'; $asset->update({locations => "53715\n97123"}); diff --git a/t/Asset/Wobject/WikiMaster.t b/t/Asset/Wobject/WikiMaster.t index 1f3ee44b0..25bd329b2 100644 --- a/t/Asset/Wobject/WikiMaster.t +++ b/t/Asset/Wobject/WikiMaster.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use Test::More; use Test::Differences; use Test::Deep; @@ -26,7 +24,7 @@ use WebGUI::Session; #---------------------------------------------------------------------------- # Init my $session = WebGUI::Test->session; -my $import = WebGUI::Asset->getImportNode( $session ); +my $import = WebGUI::Test->asset; my @childCoda = (undef, undef, { skipAutoCommitWorkflows => 1, skipNotification => 1, } ); my @revCoda = (undef, { skipAutoCommitWorkflows => 1, skipNotification => 1, } ); @@ -40,13 +38,7 @@ my $wiki groupIdView => '2', }, @childCoda ); -my $wikitag = WebGUI::VersionTag->getWorking( $session ); -$wikitag->commit; -WebGUI::Test->addToCleanup($wikitag); -$wiki = $wiki->cloneFromDb; - my %page_set = (); - foreach my $keywords (qw/staff inmates criminals/) { $page_set{$keywords} = $wiki->addChild({ className => 'WebGUI::Asset::WikiPage', @@ -54,11 +46,6 @@ foreach my $keywords (qw/staff inmates criminals/) { }, @childCoda); } -my $tag_set1 = WebGUI::VersionTag->getWorking($session); -$tag_set1->commit; -WebGUI::Test->addToCleanup($tag_set1); - - #---------------------------------------------------------------------------- # Tests @@ -152,10 +139,6 @@ foreach my $title (qw/red andy brooks heywood norton hadley/) { }, @childCoda); } -my $tag_set2 = WebGUI::VersionTag->getWorking($session); -$tag_set2->commit; -WebGUI::Test->addToCleanup($tag_set2); - cmp_deeply( $wiki->getKeywordHierarchy(), [ @@ -191,10 +174,6 @@ cmp_deeply( $wiki->setSubKeywords('andy', 'criminals', 'inmates'); $wiki->setSubKeywords('brooks', 'criminals'); -my $tag_set3 = WebGUI::VersionTag->getWorking($session); -$tag_set3->commit; -WebGUI::Test->addToCleanup($tag_set3); - cmp_deeply( $wiki->getKeywordHierarchy(), [ @@ -261,12 +240,12 @@ $page_set{criminals}->update({keywords => 'red,andy,tommy'}); $session->user({userId => 3}); ok $wiki->canView(), 'checking permission handling in www_byKeyword: Admin can view the wiki'; $wiki->www_byKeyword; -is $session->http->getStatus, 201, '... HTTP status set to 201'; +is $session->response->status, 201, '... HTTP status set to 201'; $session->user({userId => 1}); ok !$wiki->canView(), '... visitor cannot view the wiki'; $wiki->www_byKeyword; -is $session->http->getStatus, 401, '... HTTP status set to 401, no access'; +is $session->response->status, 401, '... HTTP status set to 401, no access'; #vim:ft=perl diff --git a/t/Asset/Wobject/WikiMaster/featured.t b/t/Asset/Wobject/WikiMaster/featured.t index 952125e02..f149a78f6 100644 --- a/t/Asset/Wobject/WikiMaster/featured.t +++ b/t/Asset/Wobject/WikiMaster/featured.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../../../lib"; use Test::More; use Test::Deep; use WebGUI::Test; # Must use this before any other WebGUI modules @@ -24,7 +22,7 @@ use WebGUI::Session; #---------------------------------------------------------------------------- # Init my $session = WebGUI::Test->session; -my $import = WebGUI::Asset->getImportNode( $session ); +my $import = WebGUI::Test->asset; my $wiki = $import->addChild( { @@ -44,8 +42,6 @@ my $featuredPage content => 'A how-to book', }, undef, undef, { skipAutoCommitWorkflows => 1 } ); -WebGUI::Test->addToCleanup( WebGUI::VersionTag->getWorking( $session ) ); - #---------------------------------------------------------------------------- # Tests diff --git a/t/Asset/Wobject/WikiMaster/search.t b/t/Asset/Wobject/WikiMaster/search.t index 9c18df264..646a009be 100644 --- a/t/Asset/Wobject/WikiMaster/search.t +++ b/t/Asset/Wobject/WikiMaster/search.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -19,6 +19,7 @@ use lib "$FindBin::Bin/../../../lib"; use Test::More; use Test::Deep; use WebGUI::Test; # Must use this before any other WebGUI modules +use WebGUI::Test::MockAsset; use WebGUI::Session; #---------------------------------------------------------------------------- @@ -28,9 +29,9 @@ my $import = WebGUI::Asset->getImportNode( $session ); my $templateId = 'WIKIMASTER_TEMPLATE___'; -my $templateMock = Test::MockObject->new({}); -$templateMock->set_isa('WebGUI::Asset::Template'); -$templateMock->set_always('getId', $templateId); +my $templateMock = WebGUI::Test::MockAsset->new('WebGUI::Asset::Template'); +$templateMock->mock_id($templateId); +$templateMock->set_true('prepare'); my $templateVars; $templateMock->mock('process', sub { $templateVars = $_[1]; } ); @@ -55,13 +56,11 @@ $session->request->setup_body({ $session->user({userId => 3}); { - WebGUI::Test->mockAssetId($templateId, $templateMock); $wiki->www_search(); - WebGUI::Test->unmockAssetId($templateId); } is $templateVars->{addPageUrl}, - $wiki->getUrl('func=add;class=WebGUI::Asset::WikiPage;title=Red%26Andy'), + $wiki->getUrl('func=add;className=WebGUI::Asset::WikiPage;title=Red%26Andy'), 'search encodes unsafe characters in addPageUrl'; $session->user({userId => 1}); @@ -71,7 +70,7 @@ $templateVars = {}; $wiki->www_search; is_deeply $templateVars, {}, '... no template variables set'; -is $session->http->getStatus, 401, '... HTTP status set to 401, no access'; +is $session->response->status, 401, '... HTTP status set to 401, no access'; #---------------------------------------------------------------------------- # diff --git a/t/Asset/Wobject/WikiMaster/subscribable.t b/t/Asset/Wobject/WikiMaster/subscribable.t index 6a385f448..80c908ea7 100644 --- a/t/Asset/Wobject/WikiMaster/subscribable.t +++ b/t/Asset/Wobject/WikiMaster/subscribable.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../../../lib"; use Test::More; use WebGUI::Test; # Must use this before any other WebGUI modules use WebGUI::Session; @@ -24,7 +22,7 @@ use WebGUI::Group; #---------------------------------------------------------------------------- # Init my $session = WebGUI::Test->session; -my $import = WebGUI::Asset->getImportNode( $session ); +my $import = WebGUI::Test->asset; my $wiki = $import->addChild( { className => 'WebGUI::Asset::Wobject::WikiMaster', @@ -32,8 +30,6 @@ my $wiki groupIdView => '7', # Everyone } ); -WebGUI::Test->addToCleanup( WebGUI::VersionTag->getWorking( $session ) ); - #---------------------------------------------------------------------------- # Tests diff --git a/t/Asset/dispatch.t b/t/Asset/dispatch.t index 71e1b6787..d6bf0b312 100644 --- a/t/Asset/dispatch.t +++ b/t/Asset/dispatch.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use Test::More; use WebGUI::Test; # Must use this before any other WebGUI modules use WebGUI::Session; @@ -73,9 +71,6 @@ sub www_dies { package main; -my $tag = WebGUI::VersionTag->getWorking( $session ); -WebGUI::Test->addToCleanup( $tag ); - #---------------------------------------------------------------------------- # Tests @@ -85,7 +80,7 @@ plan tests => 18; # Increment this number for each test you create # Test dispatch # Add a TestDispatch asset and test -my $td = WebGUI::Asset->getImportNode( $session )->addChild( { +my $td = WebGUI::Test->asset->addChild( { url => 'testDispatch', className => 'WebGUI::Asset::TestDispatch', } ); @@ -126,12 +121,12 @@ isnt( $output, "www_view", "?func= dispatch cancelled because of unhandled fragm $td->cut(); $output = $td->dispatch(); is $output, undef, 'dispatch returns undef when trying to access an asset that is not published, and admin is not on'; -$session->var->switchAdminOn; +$session->user({ userId => 3 }); $output = $td->dispatch(); is $output, 'www_view', 'when admin is on, the asset can be accessed'; $td->publish(); -$session->var->switchAdminOff; +$session->user({ userId => 1 }); $output = $td->dispatch(); is $output, 'www_view', 'asset state restored for next tests'; @@ -139,14 +134,20 @@ is $output, 'www_view', 'asset state restored for next tests'; $session->request->setup_body( { func => 'brokenTemplate', } ); -WebGUI::Test->interceptLogging; -is( $td->dispatch, "www_view", "if a query method throws a Template exception, view is returned instead" ); -is $WebGUI::Test::logger_error, 'Template not found templateId: This is a GUID assetId: '. $td->getId, '... and logged an error'; -$session->request->setup_body( { - func => 'dies', -} ); -is( $td->dispatch, "www_view", "if a query method dies, view is returned instead" ); -is $WebGUI::Test::logger_warns, "Couldn't call method www_dies on asset for url: Root cause: ...aside from that bullet\n", '.. and logged a warn'; -WebGUI::Test->restoreLogging; +WebGUI::Test->interceptLogging(sub { + my $log_data = shift; + is( $td->dispatch, "www_view", "if a query method throws a Template exception, view is returned instead" ); + my $template_id = $td->getId; + ok $log_data->{error} =~ m /Template not found/ && $log_data->{error} =~ m/templateId: / && $log_data->{error} =~ m/$template_id/, '... and logged an error'; +}); + +WebGUI::Test->interceptLogging(sub { + my $log_data = shift; + $session->request->setup_body( { + func => 'dies', + } ); + is( $td->dispatch, "www_view", "if a query method dies, view is returned instead" ); + ok $log_data->{error} =~ m/Couldn't call method/ && $log_data->{error} =~ m/www_dies/ && $log_data->{error} =~ m/\.\.\.aside from that bullet/, '.. and logged an error'; +}); #vim:ft=perl diff --git a/t/Asset/maximum_assets.t b/t/Asset/maximum_assets.t index bc36fd0f9..fb49252d2 100644 --- a/t/Asset/maximum_assets.t +++ b/t/Asset/maximum_assets.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,6 +13,7 @@ use strict; use lib "$FindBin::Bin/../lib"; use WebGUI::Test; +use WebGUI::Test::MockAsset; use WebGUI::Session; use WebGUI::Asset; @@ -48,8 +49,8 @@ $session->request->setup_body({ assetId => 'new', }); { - WebGUI::Test->mockAssetId($templateId, $templateMock); - $rootAsset->www_editSave; + WebGUI::Test::MockAsset->mock_id($templateId, $templateMock); + $rootAsset->www_addSave; like $templateVars->{'body.content'}, qr/limited the number of assets/, 'tripped maximumAssets'; my $count = $session->db->quickScalar('select count(*) from asset'); } diff --git a/t/Asset/permissions.t b/t/Asset/permissions.t new file mode 100644 index 000000000..0ef9a5664 --- /dev/null +++ b/t/Asset/permissions.t @@ -0,0 +1,180 @@ +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 strict; + +use WebGUI::Test; +use WebGUI::Test::Maker::Permission; +use WebGUI::Session; +use WebGUI::Asset; +use WebGUI::User; +use WebGUI::Asset::Wobject::Navigation; +use WebGUI::Asset::Wobject::Folder; +use WebGUI::Asset::Sku; +use WebGUI::Asset::Sku::Product; +use WebGUI::AssetVersioning; +use WebGUI::VersionTag; + +use Test::More; +use Test::Deep; +use Test::MockObject; +use HTML::TokeParser; +use Data::Dumper; +use Storable qw/dclone/; + +my $session = WebGUI::Test->session; + +my $rootAsset = WebGUI::Test->asset; + +##Test users. +##All users in here will be deleted at the end of the test. DO NOT PUT +##Visitor or Admin in here! +my %testUsers = (); +##Just a regular user +$testUsers{'regular user'} = WebGUI::User->new($session, 'new'); +$testUsers{'regular user'}->username('regular user'); +##Users in group 12 can add Assets +$testUsers{'canAdd turnOnAdmin'} = WebGUI::User->new($session, 'new'); +$testUsers{'canAdd turnOnAdmin'}->addToGroups(['12']); +$testUsers{'canAdd turnOnAdmin'}->username('Turn On Admin user'); + +##Just a user for owning assets +$testUsers{'owner'} = WebGUI::User->new($session, 'new'); +$testUsers{'owner'}->username('Asset Owner'); + +##Test Groups +##All groups in here will be deleted at the end of the test +my %testGroups = (); +##A group and user for groupIdEdit +$testGroups{'canEdit asset'} = WebGUI::Group->new($session, 'new'); +$testUsers{'canEdit group user'} = WebGUI::User->new($session, 'new'); +$testUsers{'canEdit group user'}->addToGroups([$testGroups{'canEdit asset'}->getId]); +$testUsers{'canEdit group user'}->username('Edit Group User'); +WebGUI::Test->addToCleanup($testGroups{'canEdit asset'}); + +##A group and user for groupIdEdit +$testGroups{'canAdd asset'} = WebGUI::Group->new($session, 'new'); +$testUsers{'canAdd group user'} = WebGUI::User->new($session, 'new'); +$testUsers{'canAdd group user'}->addToGroups([$testGroups{'canAdd asset'}->getId]); +$testUsers{'canEdit group user'}->username('Can Add Group User'); +WebGUI::Test->addToCleanup($testGroups{'canAdd asset'}); +WebGUI::Test->addToCleanup(values %testUsers); + +my $canAddMaker = WebGUI::Test::Maker::Permission->new(); +$canAddMaker->prepare({ + 'className' => 'WebGUI::Asset', + 'session' => $session, + 'method' => 'canAdd', + #'pass' => [3, $testUsers{'canAdd turnOnAdmin'}, $testUsers{'canAdd group user'} ], + 'pass' => [3, $testUsers{'canAdd group user'} ], + 'fail' => [1, $testUsers{'regular user'}, ], +}); + +my $canAddMaker2 = WebGUI::Test::Maker::Permission->new(); +$canAddMaker2->prepare({ + 'className' => 'WebGUI::Asset', + 'session' => $session, + 'method' => 'canAdd', + 'fail' => [$testUsers{'canAdd turnOnAdmin'},], +}); + +my $properties; +$properties = { + # '1234567890123456789012' + id => 'canEditAsset0000000010', + title => 'canEdit Asset Test', + url => 'canEditAsset1', + className => 'WebGUI::Asset', + ownerUserId => $testUsers{'owner'}->userId, + groupIdEdit => $testGroups{'canEdit asset'}->getId, + groupIdView => 7, +}; + +my $canEditAsset = $rootAsset->addChild($properties, $properties->{id}); + +$properties = {}; ##Clear out the hash so that it doesn't leak later by accident. + +my $canEditMaker = WebGUI::Test::Maker::Permission->new(); +$canEditMaker->prepare({ + 'object' => $canEditAsset, + 'method' => 'canEdit', + 'pass' => [3, $testUsers{'owner'}, $testUsers{'canEdit group user'}, ], + 'fail' => [1, $testUsers{'regular user'}, ], +}); + +$properties = { + # '1234567890123456789012' + id => 'canViewAsset0000000010', + title => 'canView Asset Test', + url => 'canViewAsset1', + className => 'WebGUI::Asset', + ownerUserId => $testUsers{'owner'}->userId, + groupIdEdit => $testGroups{'canEdit asset'}->getId, + groupIdView => $testGroups{'canEdit asset'}->getId, +}; + + +my $canViewAsset = $rootAsset->addChild($properties, $properties->{id}); + +$properties = {}; ##Clear out the hash so that it doesn't leak later by accident. + +my $canViewMaker = WebGUI::Test::Maker::Permission->new(); +$canViewMaker->prepare( + { + 'object' => $canEditAsset, + 'method' => 'canView', + 'pass' => [1, 3, $testUsers{'owner'}, $testUsers{'canEdit group user'}, $testUsers{'regular user'},], + }, + { + 'object' => $canViewAsset, + 'method' => 'canView', + 'pass' => [3, $testUsers{'owner'}, $testUsers{'canEdit group user'}, ], + 'fail' => [1, $testUsers{'regular user'}, ], + }, +); + +plan tests => $canAddMaker->plan + + $canAddMaker2->plan + + $canEditMaker->plan + + $canViewMaker->plan + ; + +################################################################ +# +# canAdd +# +################################################################ + +$session->config->set('assets/WebGUI::Asset/addGroup', $testGroups{'canAdd asset'}->getId ); + +$session->asset(WebGUI::Test->asset); +$canAddMaker->run; + +#Without proper group setup, Turn On Admin is excluded from adding assets via assetAddPrivilege + +$canAddMaker2->run; + +################################################################ +# +# canEdit +# +################################################################ + +$canEditMaker->run; + +################################################################ +# +# canView +# +################################################################ + +$canViewMaker->run; + + diff --git a/t/Asset/processTemplate.t b/t/Asset/processTemplate.t index 00843f083..fd4f58d37 100644 --- a/t/Asset/processTemplate.t +++ b/t/Asset/processTemplate.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,6 +13,7 @@ use strict; use lib "$FindBin::Bin/../lib"; use WebGUI::Test; +use WebGUI::Test::MockAsset; use WebGUI::Session; use WebGUI::Asset; @@ -35,14 +36,12 @@ $snippet = $snippet->cloneFromDb; ##Override the user function style template so we can examine its output easily #1234567890123456789012# my $templateId = 'USER_STYLE_OVERRIDE___'; -my $templateMock = Test::MockObject->new({}); -$templateMock->set_isa('WebGUI::Asset::Template'); -$templateMock->set_always('getId', $templateId); +my $templateMock = WebGUI::Test::MockAsset->new('WebGUI::Asset::Template'); +$templateMock->mock_id($templateId); my $templateVars; $templateMock->mock('process', sub { $templateVars = clone($_[1]); } ); { - WebGUI::Test->mockAssetId($templateId, $templateMock); $snippet->processTemplate({}, $templateId); use WebGUI::Keyword; my $keywords = WebGUI::Keyword::string2list($templateVars->{keywords}); diff --git a/t/AssetAspect/RssFeed.t b/t/AssetAspect/RssFeed.t index 8c64dd597..f0a7356eb 100644 --- a/t/AssetAspect/RssFeed.t +++ b/t/AssetAspect/RssFeed.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use Test::More; use Test::Deep; use File::Path; @@ -31,8 +29,6 @@ use WebGUI::Asset::RssAspectDummy; # Init my $session = WebGUI::Test->session; -WebGUI::Test->originalConfig('exportPath'); - #---------------------------------------------------------------------------- # Tests @@ -186,10 +182,4 @@ cmp_bag( 'exportAssetCollateral: feed files exported, shawshank.html file' ); -##################################################### -# -# exportAssetCollateral -# -##################################################### - #vim:ft=perl diff --git a/t/AssetHelper/ChangeUrl.t b/t/AssetHelper/ChangeUrl.t new file mode 100644 index 000000000..fe5acee99 --- /dev/null +++ b/t/AssetHelper/ChangeUrl.t @@ -0,0 +1,75 @@ +# vim:syntax=perl +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 +#------------------------------------------------------------------ + +# Test the ChangeUrl asset helper +# +# + +use FindBin; +use strict; +use lib "$FindBin::Bin/lib"; +use Test::More; +use Test::Deep; +use WebGUI::Test; # Must use this before any other WebGUI modules +use WebGUI::Session; +use WebGUI::AssetHelper::ChangeUrl; +use WebGUI::Test::Mechanize; + +$SIG{HUP} = sub { use Carp; confess "hup"; }; + +#---------------------------------------------------------------------------- +# Init +my $session = WebGUI::Test->session; + +my $tag = WebGUI::VersionTag->getWorking($session); +my $asset = WebGUI::Test->asset->addChild( { + className => 'WebGUI::Asset::Snippet', + url => 'example', + groupIdEdit => 3, # Admins +} ); +$tag->commit; +$asset = $asset->cloneFromDb; + +#---------------------------------------------------------------------------- +# Check permissions +my $helper = WebGUI::AssetHelper::ChangeUrl->new( id => 'change_url', session => $session, asset => $asset ); + +$session->user({ userId => 1 }); +my $output = $helper->process( $asset ); +ok( $output->{error}, "Errors on bad permissions" ); + + +#---------------------------------------------------------------------------- +# Change URL! + +$session->user({ userId => 3 }); # By the power of grayskull! +my $output = $helper->process; +cmp_deeply( $output, { + openDialog => all( + re( 'method=changeUrl' ), + re( 'assetId=' . $asset->getId ), + ), +}, "Opens a dialog" ); + +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get( "/" ); +$mech->session->user({ userId => 3 }); # I have the powerrrrrr! +$mech->get_ok( $output->{openDialog} ); +$mech->submit_form_ok( { + fields => { url => 'example123123', confirm => 1 } +}, "Go through the form" ); + +$asset = $asset->cloneFromDb; +is( $asset->url, 'example123123', 'URL got changed' ); + +done_testing(); + +#vim:ft=perl diff --git a/t/AssetHelper/Copy.t b/t/AssetHelper/Copy.t new file mode 100644 index 000000000..6ba749bfb --- /dev/null +++ b/t/AssetHelper/Copy.t @@ -0,0 +1,66 @@ +# vim:syntax=perl +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 +#------------------------------------------------------------------ + +# Write a little about what this script tests. +# +# + +use strict; +use Test::More; +use Test::Deep; +use WebGUI::Test; # Must use this before any other WebGUI modules +use WebGUI::Session; +use WebGUI::Asset; +use WebGUI::AssetHelper::Copy; +use WebGUI::Test::Mechanize; + +#---------------------------------------------------------------------------- +# Init +my $session = WebGUI::Test->session; + + +#---------------------------------------------------------------------------- +# Tests + +plan tests => 3; # Increment this number for each test you create + +#---------------------------------------------------------------------------- +# put your tests here + +my $output; +$session->setting->set( "versionTagMode" => "autoCommit" ); +my $home = WebGUI::Asset->getDefault($session); +my $root = WebGUI::Asset->getRoot($session); + +{ + + my $helper = WebGUI::AssetHelper::Copy->new( id => 'copy', session => $session, asset => $home ); + $output = $helper->process; + cmp_deeply( + $output, + { + forkId => re('[a-zA-Z0-9_-]{22}'), + }, + 'AssetHelper/Copy forks a process' + ); + + WebGUI::Test->addToCleanup( 'WebGUI::Fork' => $output->{forkId} ); +} + + +ok(WebGUI::Test->waitForAllForks(10), "Forks finished"); + +$session->cache->clear; +my $clippies = $root->getLineage(["descendants"], {statesToInclude => [qw{clipboard clipboard-limbo}], returnObjects => 1,}); +is @{ $clippies }, 1, '... only copied 1 asset to the clipboard, no children'; +WebGUI::Test->addToCleanup(@{ $clippies }); + +#vim:ft=perl diff --git a/t/AssetHelper/CopyBranch.t b/t/AssetHelper/CopyBranch.t new file mode 100644 index 000000000..bb7636b09 --- /dev/null +++ b/t/AssetHelper/CopyBranch.t @@ -0,0 +1,93 @@ +# vim:syntax=perl +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 +#------------------------------------------------------------------ + +# Write a little about what this script tests. +# +# + +use strict; +use Test::More; +use Test::Deep; +use WebGUI::Test; # Must use this before any other WebGUI modules +use WebGUI::Session; +use WebGUI::Asset; +use WebGUI::AssetHelper::CopyBranch; +use WebGUI::Test::Mechanize; + +#---------------------------------------------------------------------------- +# Init +my $session = WebGUI::Test->session; + + +#---------------------------------------------------------------------------- +# Tests + +plan tests => 5; # Increment this number for each test you create + +#---------------------------------------------------------------------------- +# put your tests here + +my $output; +my $node = WebGUI::Asset->getImportNode($session); +my $root = WebGUI::Asset->getRoot( $session ); +my $tag = WebGUI::VersionTag->getWorking( $session ); +my $top = $node->addChild({ + className => 'WebGUI::Asset::Wobject::Layout', + title => 'Top', +} ); +my $child = $top->addChild({ + className => 'WebGUI::Asset::Wobject::Layout', + title => 'Child', +}); +my $grand = $child->addChild({ + className => 'WebGUI::Asset::Snippet', + title => 'Grand', +}); +$tag->commit; +WebGUI::Test->addToCleanup( $tag ); + +foreach my $asset ($top, $child, $grand) { + $asset = $asset->cloneFromDb; +} + +{ + my $helper = WebGUI::AssetHelper::CopyBranch->new( id => 'copy_branch', session => $session, asset => $top ); + $output = $helper->process; + cmp_deeply( + $output, + { + openDialog => all( + re('helperId=copy_branch'), + re('method=getWith'), + re('assetId=' . $top->getId ), + ), + }, + 'AssetHelper/CopyBranch opens a dialog for the copy method' + ); +} + +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get_ok( '/?op=assetHelper;helperId=copy_branch;method=copy;with=children;assetId=' . $top->getId ); +WebGUI::Test->waitForAllForks(10); + +my $clippies = $root->getLineage(["descendants"], {statesToInclude => [qw{clipboard clipboard-limbo}], returnObjects => 1,}); +is @{ $clippies }, 2, '... copied 2 asset to the clipboard'; +for my $asset ( @$clippies ) { + $asset->purge; +} + +$mech->get_ok( '/?op=assetHelper;helperId=copy_branch;method=copy;with=descendants;assetId=' . $top->getId ); +WebGUI::Test->waitForAllForks(10); +my $clippies = $root->getLineage(["descendants"], {statesToInclude => [qw{clipboard clipboard-limbo}], returnObjects => 1,}); +is @{ $clippies }, 3, '... copied 3 asset to the clipboard'; +WebGUI::Test->addToCleanup( @$clippies ); + +#vim:ft=perl diff --git a/t/AssetHelper/CreateShortcut.t b/t/AssetHelper/CreateShortcut.t new file mode 100644 index 000000000..b2fe1806a --- /dev/null +++ b/t/AssetHelper/CreateShortcut.t @@ -0,0 +1,77 @@ +# vim:syntax=perl +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 +#------------------------------------------------------------------ + +# Write a little about what this script tests. +# +# + +use strict; +use Test::More; +use Test::Deep; +use WebGUI::Test; # Must use this before any other WebGUI modules +use WebGUI::Session; +use WebGUI::Asset; +use WebGUI::AssetHelper::CreateShortcut; +use WebGUI::Test::Mechanize; + +#---------------------------------------------------------------------------- +# Init +my $session = WebGUI::Test->session; + + +#---------------------------------------------------------------------------- +# Tests + +my $output; +my $import = WebGUI::Asset->getImportNode($session); + +my $priv_page = WebGUI::Test->asset( groupIdView => '3' ); +my $helper = WebGUI::AssetHelper::CreateShortcut->new( id => 'shortcut', session => $session, asset => $priv_page ); +$session->user({userId => 1}); +$output = $helper->process; +cmp_deeply( + $output, + { + error => re('You do not have sufficient privileges'), + }, + 'AssetHelper/CreateShortcut checks for editing privileges' +); + +$session->setting->set( versionTagMode => 'autoCommit' ); +$session->setting->set( skipCommitComments => '1' ); +$session->user({userId => 3}); +my $tag = WebGUI::VersionTag->getWorking($session); +my $safe_page = WebGUI::Test->asset; +my $helper = WebGUI::AssetHelper::CreateShortcut->new( id => 'shortcut', session => $session, asset => $safe_page ); +$output = $helper->process; +$tag->commit; +cmp_deeply( + $output, + { + message => re( '.' ), # message exists + }, + 'AssetHelper/CreateShortcut returns a message' +); + +my $shortcutId = $session->db->quickScalar( + 'SELECT assetId FROM Shortcut WHERE shortcutToAssetId=?', + [ $safe_page->getId ], +); + +ok( $shortcutId, 'shortcut exists' ); +ok( my $shortcut = WebGUI::Asset->newById( $session, $shortcutId ), 'can be instanced' ); +WebGUI::Test::addToCleanup( $shortcut ); +is( $shortcut->state, 'clipboard', 'is on clipboard' ); +is( $shortcut->status, 'approved', 'was auto-committed' ); + +done_testing(); + +#vim:ft=perl diff --git a/t/AssetHelper/Cut.t b/t/AssetHelper/Cut.t new file mode 100644 index 000000000..f8b24cbbe --- /dev/null +++ b/t/AssetHelper/Cut.t @@ -0,0 +1,83 @@ +# vim:syntax=perl +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 +#------------------------------------------------------------------ + +# Write a little about what this script tests. +# +# + +use strict; +use Test::More; +use Test::Deep; +use WebGUI::Test; # Must use this before any other WebGUI modules +use WebGUI::Session; +use WebGUI::Asset; +use WebGUI::AssetHelper::Cut; +use WebGUI::Test::Mechanize; + +#---------------------------------------------------------------------------- +# Init +my $session = WebGUI::Test->session; + + +#---------------------------------------------------------------------------- +# Tests + +my $output; +my $import = WebGUI::Asset->getImportNode($session); + +$session->user({userId => 1}); +my $helper = WebGUI::AssetHelper::Cut->new( id => 'cut', session => $session, asset => $import ); +$output = $helper->process; +cmp_deeply( + $output, + { + error => re('You do not have sufficient privileges'), + }, + 'AssetHelper/Cut checks for editing privileges' +); + +$session->user({userId => 3}); +$output = $helper->process; +cmp_deeply( + $output, + { + error => re('vital component'), + }, + 'AssetHelper/Cut checks for system pages' +); + +my $safe_page = $import->getFirstChild; +my $helper = WebGUI::AssetHelper::Cut->new( id => 'cut', session => $session, asset => $safe_page ); +$output = $helper->process; +cmp_deeply( + $output, + { + forkId => re(qr/[a-zA-Z0-9_-]{22}/), + }, + 'AssetHelper/Cut forks a process' +); + +WebGUI::Test->waitForAllForks; + +$session->cache->clear; +$safe_page = WebGUI::Asset->newById( $session, $safe_page->assetId ); +is $safe_page->state, 'clipboard', '... and the asset was really cut'; + +$session->asset($import); +ok $import->paste($safe_page->getId), 'page pasted correctly'; + +$session->cache->clear; +my $safe_page2 = WebGUI::Asset->newById($session, $safe_page->assetId); +is $safe_page2->state, 'published', 'reset asset for further testing'; + +done_testing(); + +#vim:ft=perl diff --git a/t/AssetHelper/Delete.t b/t/AssetHelper/Delete.t new file mode 100644 index 000000000..6fc1f36a8 --- /dev/null +++ b/t/AssetHelper/Delete.t @@ -0,0 +1,78 @@ +# vim:syntax=perl +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 +#------------------------------------------------------------------ + +# Write a little about what this script tests. +# +# + +use strict; +use Test::More; +use Test::Deep; +use WebGUI::Test; # Must use this before any other WebGUI modules +use WebGUI::Session; +use WebGUI::Asset; +use WebGUI::AssetHelper::Delete; +use WebGUI::Test::Mechanize; + +#---------------------------------------------------------------------------- +# Init +my $session = WebGUI::Test->session; + + +#---------------------------------------------------------------------------- +# Tests + +my $output; +my $import = WebGUI::Asset->getImportNode($session); +my $helper = WebGUI::AssetHelper::Delete->new( id => 'Delete', session => $session, asset => $import ); + +$session->user({userId => 1}); +$output = $helper->process; +cmp_deeply( + $output, + { + error => re('You do not have sufficient privileges'), + }, + 'AssetHelper/Delete checks for editing privileges' +); + +$session->user({userId => 3}); +$output = $helper->process; +cmp_deeply( + $output, + { + error => re('vital component'), + }, + 'AssetHelper/Delete checks for system pages' +); + +my $safe_page = $import->getFirstChild; +my $helper = WebGUI::AssetHelper::Delete->new( id => 'Delete', session => $session, asset => $safe_page ); +$output = $helper->process; +cmp_deeply( + $output, + { + forkId => re(qr/[a-zA-Z0-9_-]{22}/), + }, + 'AssetHelper/Delete forks a process' +); + +WebGUI::Test->waitForAllForks; + +$session->cache->clear; +$safe_page = WebGUI::Asset->newById( $session, $safe_page->assetId ); +is $safe_page->state, 'trash', '... and the asset was really Deleted'; + +$safe_page->restore; + +done_testing(); + +#vim:ft=perl diff --git a/t/AssetHelper/Duplicate.t b/t/AssetHelper/Duplicate.t new file mode 100644 index 000000000..eb1409799 --- /dev/null +++ b/t/AssetHelper/Duplicate.t @@ -0,0 +1,62 @@ +# vim:syntax=perl +#------------------------------------------------------------------- +# WebGUI is Duplicateright 2001-2009 Plain Black Corporation. +#------------------------------------------------------------------- +# Please read the legal notices (docs/legal.txt) and the license +# (docs/license.txt) that came with this distribution before using +# this software. +#------------------------------------------------------------------ +# http://www.plainblack.com info@plainblack.com +#------------------------------------------------------------------ + +# Write a little about what this script tests. +# +# + +use strict; +use Test::More; +use Test::Deep; +use WebGUI::Test; # Must use this before any other WebGUI modules +use WebGUI::Session; +use WebGUI::Asset; +use WebGUI::AssetHelper::Duplicate; +use WebGUI::Test::Mechanize; + +#---------------------------------------------------------------------------- +# Init +my $session = WebGUI::Test->session; + + +#---------------------------------------------------------------------------- +# Tests + +plan tests => 3; # Increment this number for each test you create + +#---------------------------------------------------------------------------- +# put your tests here + +my $output; +$session->setting->set( "versionTagMode" => "autoCommit" ); +my $root = WebGUI::Test->asset; +my $test = $root->addChild( { className => 'WebGUI::Asset::Snippet' } ); +my $helper = WebGUI::AssetHelper::Duplicate->new( id => 'duplicate', session => $session, asset => $test ); + +{ + + $output = $helper->process; + cmp_deeply( + $output, + { + forkId => re('[a-zA-Z0-9_-]{22}'), + }, + 'AssetHelper/Duplicate forks a process' + ); +} + +ok(WebGUI::Test->waitForAllForks(10), "Forks finished"); + +$session->cache->clear; +my $children = $root->getLineage(["children"]); +is @{ $children }, 2, '... created a new asset'; + +#vim:ft=perl diff --git a/t/AssetHelper/EditBranch.t b/t/AssetHelper/EditBranch.t new file mode 100644 index 000000000..bef94f06c --- /dev/null +++ b/t/AssetHelper/EditBranch.t @@ -0,0 +1,92 @@ +# vim:syntax=perl +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 +#------------------------------------------------------------------ + +# Write a little about what this script tests. +# +# + +use strict; +use Test::More; +use Test::Deep; +use WebGUI::Test; # Must use this before any other WebGUI modules +use WebGUI::Session; +use WebGUI::Asset; +use WebGUI::AssetHelper::EditBranch; +use WebGUI::Test::Mechanize; + +#---------------------------------------------------------------------------- +# Init +my $session = WebGUI::Test->session; + + +#---------------------------------------------------------------------------- +# Tests + +my $output; +my $node = WebGUI::Asset->getImportNode($session); +my $root = WebGUI::Asset->getRoot( $session ); +my $top = $node->addChild({ + className => 'WebGUI::Asset::Wobject::Layout', + title => 'Top', + ownerUserId => '1', +} ); +my $child = $top->addChild({ + className => 'WebGUI::Asset::Wobject::Layout', + title => 'Child', + ownerUserId => '3', +}); +my $grand = $child->addChild({ + className => 'WebGUI::Asset::Snippet', + title => 'Grand', + ownerUserId => '4', +}); +my $tag = WebGUI::VersionTag->getWorking( $session ); +$tag->commit; +WebGUI::Test->addToCleanup( $top, $child, $grand ); + +{ + my $helper = WebGUI::AssetHelper::EditBranch->new( id => 'edit_branch', session => $session, asset => $top ); + + $output = $helper->process; + cmp_deeply( + $output, + { + openDialog => all( + re('method=editBranch'), + re('assetId=' . $top->getId ), + ), + }, + 'AssetHelper/EditBranch opens a dialog for the copy method' + ); +} + +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get('/'); +$mech->session->user({ userId => 3 }); +$mech->get_ok( '/?op=assetHelper;helperId=edit_branch;method=editBranch;assetId=' . $top->getId ); +$mech->submit_form_ok({ + fields => { + ownerUserId => '3', + change_ownerUserId => '1', + }, +}); + +$top = WebGUI::Asset->newPending( $session, $top->getId ); +$child = WebGUI::Asset->newPending( $session, $child->getId ); +$grand = WebGUI::Asset->newPending( $session, $grand->getId ); + +is( $top->ownerUserId, '3', 'top changed' ); +is( $child->ownerUserId, '3', 'child changed' ); +is( $grand->ownerUserId, '3', 'child changed' ); + +done_testing(); + +#vim:ft=perl diff --git a/t/AssetHelper/ExportHtml.t b/t/AssetHelper/ExportHtml.t new file mode 100644 index 000000000..cf0fcb94d --- /dev/null +++ b/t/AssetHelper/ExportHtml.t @@ -0,0 +1,97 @@ +# vim:syntax=perl +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 +#------------------------------------------------------------------ + +# Write a little about what this script tests. +# +# + +use strict; +use File::Spec; +use File::Temp; +use Test::More; +use Test::Deep; +use WebGUI::Test; # Must use this before any other WebGUI modules +use WebGUI::Session; +use WebGUI::Asset; +use WebGUI::AssetHelper::ExportHtml; +use WebGUI::Test::Mechanize; + +#---------------------------------------------------------------------------- +# Init +my $session = WebGUI::Test->session; +$session->user({ userId => 3 }); + +my $output; +my $node = WebGUI::Asset->getImportNode($session); +my $root = WebGUI::Asset->getRoot( $session ); +my $tag = WebGUI::VersionTag->getWorking($session); +my $top = $node->addChild({ + className => 'WebGUI::Asset::Wobject::Layout', + title => 'Top', + description => 'This is the top', + groupIdView => '7', + url => 'top', +} ); +my $child = $top->addChild({ + className => 'WebGUI::Asset::Wobject::Layout', + title => 'Child', + description => 'This is the child', + groupIdView => '7', +}); +my $grand = $child->addChild({ + className => 'WebGUI::Asset::Wobject::Article', + title => 'Grand', + description => 'This is some content', + groupIdView => '7', +}); +WebGUI::Test->addToCleanup( $top ); +$tag->commit; + +my $dir = File::Temp->newdir; +WebGUI::Test->originalConfig( "exportPath" ); +WebGUI::Test->config->set( "exportPath" => $dir->dirname ); + +#---------------------------------------------------------------------------- +# Tests + +{ + my $helper = WebGUI::AssetHelper::ExportHtml->new( id => 'export_html', session => $session, asset => $top ); + $output = $helper->process($top); + cmp_deeply( + $output, + { + openDialog => all( + re('method=export'), + re('assetId=' . $top->getId ), + ), + }, + 'AssetHelper/ExportHtml opens a dialog' + ); +} + +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get('/'); +$mech->session->user({ userId => 3 }); +$mech->get_ok( '/?op=assetHelper;helperId=export_html;method=export;assetId=' . $top->getId ); +$mech->submit_form_ok({ + fields => { + }, +}); + +ok(WebGUI::Test->waitForAllForks(10), "Forks finished"); + +ok( -e File::Spec->catfile( $dir->dirname, 'top', 'index.html' ), 'top export exists' ); +ok( -e File::Spec->catfile( $dir->dirname, 'top', 'child', 'index.html' ), 'child export exists' ); +ok( -e File::Spec->catfile( $dir->dirname, 'top', 'child', 'grand', 'index.html' ), 'grand export exists' ); + +done_testing(); + +#vim:ft=perl diff --git a/t/AssetHelper/Lock.t b/t/AssetHelper/Lock.t new file mode 100644 index 000000000..f83844beb --- /dev/null +++ b/t/AssetHelper/Lock.t @@ -0,0 +1,86 @@ +# vim:syntax=perl +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 +#------------------------------------------------------------------ + +# Write a little about what this script tests. +# +# + +use strict; +use Test::More; +use Test::Deep; +use WebGUI::Test; # Must use this before any other WebGUI modules +use WebGUI::Session; +use WebGUI::Asset; +use WebGUI::AssetHelper::Lock; + +#---------------------------------------------------------------------------- +# Init +my $session = WebGUI::Test->session; + +#---------------------------------------------------------------------------- +# put your tests here + +my $output; +my $home = WebGUI::Test->asset; + +my $editor = WebGUI::User->create($session); +$editor->addToGroups([4]); +WebGUI::Test->addToCleanup($editor); + +$session->user({userId => 3}); +my $tag = WebGUI::VersionTag->getWorking($session); +my $newPage = $home->addChild({ + className => 'WebGUI::Asset::Wobject::Layout', + title => 'Test page', + groupIdEdit => '4', + ownerUserId => '3', +}, undef, WebGUI::Test->webguiBirthday, { skipAutoCommitWorkflows => 1, }); +$tag->commit; + +$newPage = WebGUI::Asset->newById($session, $newPage->assetId); + +my $helper = WebGUI::AssetHelper::Lock->new( id => 'lock', session => $session, asset => $newPage ); +$session->user({userId => 1}); +$output = $helper->process; +cmp_deeply( + $output, + { + error => re('You do not have sufficient privileges'), + }, + 'AssetHelper/Lock checks for editing privileges' +); + +$session->user({userId => 3}); +$output = $helper->process; +cmp_deeply( + $output, + { + message => 'Locked the asset Test page.', + }, + '... locks the asset' +); + +$newPage = WebGUI::Asset->newById($session, $newPage->assetId); +ok $newPage->isLocked, 'Asset is locked, and ready for next test'; +is $newPage->getRevisionCount, 2, 'new revision added'; + +$helper = WebGUI::AssetHelper::Lock->new( id => 'lock', session => $session, asset => $newPage ); +$session->user({userId => $editor->getId}); +$output = $helper->process; +cmp_deeply( + $output, + { + error => 'The asset Test page is already locked.', + }, + '... returns an error message if the asset is already locked' +); + +done_testing; diff --git a/t/AssetHelper/Product/ExportCSV.t b/t/AssetHelper/Product/ExportCSV.t new file mode 100644 index 000000000..dc7bbe9c9 --- /dev/null +++ b/t/AssetHelper/Product/ExportCSV.t @@ -0,0 +1,123 @@ + +# vim:syntax=perl +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 +#------------------------------------------------------------------ + +# Write a little about what this script tests. +# +# + +use FindBin; +use strict; +use lib "$FindBin::Bin/lib"; +use File::Slurp qw( read_file ); +use File::Spec::Functions qw( catfile ); +use Test::More; +use Test::Deep; +use WebGUI::Test; # Must use this before any other WebGUI modules +use WebGUI::Session; +use WebGUI::Storage; +use WebGUI::AssetHelper::Product::ExportCSV; + +#---------------------------------------------------------------------------- +# Init +my $session = WebGUI::Test->session; + + +#---------------------------------------------------------------------------- +# Tests + +my $root = WebGUI::Test->asset; +my $class = 'WebGUI::Asset::Wobject::Shelf'; +my $tag = WebGUI::VersionTag->getWorking($session); +my $shelf = $root->addChild({className => $class}); + +my $soda = [ + { + varSku => 'soda-sweet', + shortdesc => 'Sweet Soda', + price => 0.95, + weight => 0.95, + quantity => 500, + variantId => $session->id->generate, + }, + ]; +my $shirts = [ + { + varSku => 'red-t-shirt', + shortdesc => 'Red T-Shirt', + price => '5.00', + weight => '1.33', + quantity => '1000', + variantId => $session->id->generate, + }, + { + varSku => 'blue-t-shirt', + shortdesc => 'Blue T-Shirt', + price => '5.25', + weight => '1.33', + quantity => '2000', + variantId => $session->id->generate, + }, + ]; +$shelf->addChild({ + className => 'WebGUI::Asset::Sku::Product', + variantsJSON => JSON->new->encode( $soda ), + title => 'Sweet Soda-bottled in Oregon', + sku => 'soda', + }); +$shelf->addChild({ + className => 'WebGUI::Asset::Sku::Product', + variantsJSON => JSON->new->encode( $shirts ), + title => 'Shirts', + sku => 't-shirt', + }); + +$tag->commit; +my $helper = WebGUI::AssetHelper::Product::ExportCSV->new( + id => 'exportProducts', + session => $session, + asset => $shelf, +); +my $exportProducts = \&WebGUI::AssetHelper::Product::ExportCSV::exportProducts; +my $process = Test::MockObject::Extends->new( WebGUI::Fork->create( $session ) ); +WebGUI::Test->addToCleanup( sub { $process->delete } ); + +$exportProducts->($process, {}); +# Determine the storage location from the URL +my $status = JSON->new->decode( $process->{delay}->() ); +my ( $filePath )= $status->{ redirect } =~ m!^/uploads/(.+)$!; + +my $productData = read_file catfile( $session->config->get('uploadsPath'), $filePath); +my @productData = split /\n/, $productData; +is(scalar @productData, 4, 'productData should have 4 entries, 1 header + 3 data'); +is($productData[0], 'mastersku,title,varSku,shortdescription,price,weight,quantity', 'header line is okay'); +@productData = map { [ WebGUI::Text::splitCSV($_) ] } @productData[1..3]; +my ($sodas, $shirts) = ([], []); +foreach my $productData (@productData) { + if ($productData->[0] eq 'soda') { + push @{ $sodas }, $productData; + } + elsif ($productData->[0] eq 't-shirt') { + push @{ $shirts }, $productData; + } +} +is(scalar @{ $sodas }, 1, 'just 1 soda'); +is(scalar @{ $shirts }, 2, '2 shirts'); + +cmp_deeply( + $sodas, + [ ['soda', 'Sweet Soda-bottled in Oregon', + 'soda-sweet', 'Sweet Soda', 0.95, 0.95, 500] ], + 'soda data is okay' +); + +done_testing; +#vim:ft=perl diff --git a/t/AssetHelper/Product/ImportCSV.t b/t/AssetHelper/Product/ImportCSV.t new file mode 100644 index 000000000..776ff11cc --- /dev/null +++ b/t/AssetHelper/Product/ImportCSV.t @@ -0,0 +1,479 @@ +# vim:syntax=perl +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 +#------------------------------------------------------------------ + +# Write a little about what this script tests. +# +# + +use FindBin; +use strict; +use lib "$FindBin::Bin/lib"; +use Test::More; +use Test::Deep; +use WebGUI::Test; # Must use this before any other WebGUI modules +use WebGUI::Session; +use WebGUI::Asset::Wobject::Shelf; +use WebGUI::AssetHelper::Product::ImportCSV; +use Test::MockObject::Extends; +use WebGUI::Fork; +use File::Temp; +use File::Copy; + + +#---------------------------------------------------------------------------- +# Init +my $session = WebGUI::Test->session; + + +#---------------------------------------------------------------------------- +# Tests + +my $root = WebGUI::Test->asset; +my $class = 'WebGUI::Asset::Wobject::Shelf'; +my $shelf = $root->addChild({className => $class}); + +####################################################################### +# +# import +# +####################################################################### + +my $helper = WebGUI::AssetHelper::Product::ImportCSV->new( + id => 'importProducts', + session => $session, + asset => $shelf, +); +my $importProducts = \&WebGUI::AssetHelper::Product::ImportCSV::importProducts; +my $process = Test::MockObject::Extends->new( WebGUI::Fork->create( $session ) ); +WebGUI::Test->addToCleanup( sub { $process->delete } ); + +eval { $importProducts->( $process, { assetId => $helper->asset->getId } ); }; +my $e = Exception::Class->caught(); +isa_ok($e, 'WebGUI::Error::InvalidParam', 'importProducts: error handling for an undefined path to file'); +is($e->error, 'Must provide the path to a file', 'importProducts: error handling for an undefined path to file'); + +eval { $importProducts->( $process, { assetId => $helper->asset->getId, filePath => '/path/to/nowhere' } ); }; +$e = Exception::Class->caught(); +isa_ok($e, 'WebGUI::Error::InvalidFile', 'importProducts: error handling for file that does not exist in the filesystem'); +is($e->error, 'File could not be found', 'importProducts: error handling for file that does not exist in the filesystem'); +cmp_deeply( + $e, + methods( + brokenFile => '/path/to/nowhere', + ), + 'importTaxData: error handling for file that does not exist in the filesystem', +); + +my $productsFile = WebGUI::Test->getTestCollateralPath('productTables/goodProductTable.csv'); + +SKIP: { + skip 'Root will cause this test to fail since it does not obey file permissions', 3 + if $< == 0; + + my (undef, $productsTempFile) = File::Temp::tempfile('productTableXXXX', OPEN => 0, TMPDIR => 1, SUFFIX => '.csv'); + File::Copy::copy($productsFile, $productsTempFile); + + chmod oct(0000), $productsTempFile; + + eval { $importProducts->($process, { assetId => $helper->asset->getId, filePath => $productsTempFile } ); }; + $e = Exception::Class->caught(); + isa_ok($e, 'WebGUI::Error::InvalidFile', 'importProducts: error handling for file that cannot be read') || skip 'invalid error thrown', 2; + is($e->error, 'File is not readable', 'importProducts: error handling for file that that cannot be read'); + cmp_deeply( + $e, + methods( + brokenFile => $productsTempFile, + ), + 'importProducts: error handling for file that that cannot be read', + ); + unlink $productsTempFile; +} + +my $failure=0; +eval { + $failure = $importProducts->( $process, { + assetId => $helper->asset->getId, + filePath => WebGUI::Test->getTestCollateralPath('productTables/missingHeaders.csv'), + } ); +}; +ok (!$failure, 'Product data is not imported when headers are missing'); +$e = Exception::Class->caught(); +isa_ok($e, 'WebGUI::Error::InvalidFile', 'importProducts: a file with a missing header column'); +cmp_deeply( + $e, + methods( + error => 'Bad header found in the CSV file', + brokenFile => WebGUI::Test->getTestCollateralPath('productTables/missingHeaders.csv'), + ), + 'importProducts: error handling for a file with a missing header', +); + +$failure=0; +eval { + $failure = $importProducts->( $process, { + assetId => $helper->asset->getId, + filePath => WebGUI::Test->getTestCollateralPath('productTables/badHeaders.csv'), + } + ); +}; +ok (!$failure, 'Product data is not imported when the headers are wrong'); +$e = Exception::Class->caught(); +isa_ok($e, 'WebGUI::Error::InvalidFile', 'importProducts: a file with bad headers'); +cmp_deeply( + $e, + methods( + error => 'Bad header found in the CSV file', + brokenFile => WebGUI::Test->getTestCollateralPath('productTables/badHeaders.csv'), + ), + 'importProducts: error handling for a file with a missing header', +); + +my $pass=0; +$pass = $importProducts->( $process, { + assetId => $helper->asset->getId, + filePath => WebGUI::Test->getTestCollateralPath('productTables/goodProductTable.csv'), +} ); +ok($pass, 'Products imported'); + +my $count = $session->db->quickScalar('select count(*) from Product'); +is($count, 2, 'two products were imported'); + +my $soda = WebGUI::Asset::Sku->newBySku($session, 'soda'); +isa_ok($soda, 'WebGUI::Asset::Sku::Product'); +is($soda->getTitle(), 'Sweet Soda-bottled in Oregon', 'Title set correctly for soda'); +is($soda->get('url'), 'sweet-soda-bottled-in-oregon', 'URL for new product from the title'); +is($soda->get('menuTitle'), $soda->getTitle, 'menuTitle is the same as title'); +my $sodaCollateral = $soda->getAllCollateral('variantsJSON'); +cmp_deeply( + $sodaCollateral, + [ + { + varSku => 'soda-sweet', + shortdesc => 'Sweet Soda', + price => 0.95, + weight => 0.95, + quantity => 500, + variantId => ignore(), + }, + ], + 'collateral set correctly for soda' +); + +my $shirt = WebGUI::Asset::Sku->newBySku($session, 't-shirt'); +isa_ok($shirt, 'WebGUI::Asset::Sku::Product'); +is($shirt->getTitle(), 'Colored T-Shirts', 'Title set correctly for t-shirt'); +my $shirtCollateral = $shirt->getAllCollateral('variantsJSON'); +cmp_deeply( + $shirtCollateral, + [ + { + varSku => 'red-t-shirt', + shortdesc => 'Red T-Shirt', + price => '5.00', + weight => '1.33', + quantity => '1000', + variantId => ignore(), + }, + { + varSku => 'blue-t-shirt', + shortdesc => 'Blue T-Shirt', + price => '5.25', + weight => '1.33', + quantity => '2000', + variantId => ignore(), + }, + ], + 'collateral set correctly for shirt' +); + +####################################################################### +# +# import, part 2 +# +####################################################################### + +$pass=0; +$pass = $importProducts->( $process, { + assetId => $helper->asset->getId, + filePath => WebGUI::Test->getTestCollateralPath('productTables/secondProductTable.csv'), +}); +ok($pass, 'Products imported for the second time'); + +$count = $session->db->quickScalar('select count(*) from Product'); +is($count, 3, 'three products were imported'); + +$soda = WebGUI::Asset::Sku->newBySku($session, 'soda'); +$sodaCollateral = $soda->getAllCollateral('variantsJSON'); +cmp_deeply( + $sodaCollateral, + [ + { + varSku => 'soda-sweet', + shortdesc => 'Sweet Soda', + price => '1.00', + weight => 0.85, + quantity => 500, + variantId => ignore(), + }, + ], + 'collateral updated correctly for soda' +); + +$shirt = WebGUI::Asset::Sku->newBySku($session, 't-shirt'); +$shirtCollateral = $shirt->getAllCollateral('variantsJSON'); +cmp_deeply( + $shirtCollateral, + [ + { + varSku => 'red-t-shirt', + shortdesc => 'Red T-Shirt', + price => '5.00', + weight => '1.33', + quantity => '500', + variantId => ignore(), + }, + { + varSku => 'blue-t-shirt', + shortdesc => 'Blue T-Shirt', + price => '5.25', + weight => '1.33', + quantity => '2000', + variantId => ignore(), + }, + ], + 'collateral updated correctly for shirt' +); + +my $record = WebGUI::Asset::Sku->newBySku($session, 'classical-records-1'); +isa_ok($record, 'WebGUI::Asset::Sku::Product'); +my $recordCollateral = $record->getAllCollateral('variantsJSON'); +cmp_deeply( + $recordCollateral, + [ + { + varSku => 'track-16', + shortdesc => 'Track 16', + price => '3.25', + weight => '0.00', + quantity => 50, + variantId => ignore(), + }, + ], + 'collateral set correctly for classical record' +); + +####################################################################### +# +# import, part 3 +# +####################################################################### + +$pass=0; +$pass = $importProducts->( $process, { + assetId => $helper->asset->getId, + filePath => WebGUI::Test->getTestCollateralPath('productTables/thirdProductTable.csv'), +} ); +ok($pass, 'Products imported for the third time'); + +$count = $session->db->quickScalar('select count(*) from Product'); +is($count, 3, 'still have 3 products, nothing new added'); + +$soda = WebGUI::Asset::Sku->newBySku($session, 'soda'); +is($soda->getTitle(), 'Sweet Soda-totally organic', 'Title updated correctly for soda'); +is($soda->get('menuTitle'), 'Sweet Soda-totally organic', 'menuTitle updated correctly for soda'); +is($soda->get('url'), 'sweet-soda-bottled-in-oregon', 'URL for updated product from the original title, not the updated title'); +$shirt = WebGUI::Asset::Sku->newBySku($session, 't-shirt'); +$shirtCollateral = $shirt->getAllCollateral('variantsJSON'); +cmp_deeply( + $shirtCollateral, + [ + { + varSku => 'red-t-shirt', + shortdesc => 'Red T-Shirt', + price => '5.00', + weight => '1.33', + quantity => '500', + variantId => ignore(), + }, + { + varSku => 'blue-t-shirt', + shortdesc => 'Blue T-Shirt', + price => '5.25', + weight => '1.33', + quantity => '2000', + variantId => ignore(), + }, + ], + 'collateral updated correctly for shirt' +); + +$record = WebGUI::Asset::Sku->newBySku($session, 'classical-records-1'); +$recordCollateral = $record->getAllCollateral('variantsJSON'); +cmp_deeply( + $recordCollateral, + [ + { + varSku => 'track-16', + shortdesc => 'Track 16', + price => '3.25', + weight => '0.00', + quantity => 50, + variantId => ignore(), + }, + { + varSku => 'track-9', + shortdesc => 'Track 9', + price => '3.25', + weight => '0.00', + quantity => 55, + variantId => ignore(), + }, + ], + 'collateral added correctly for classical record' +); + +$shelf->purge; +undef $shelf; + +$record = eval { WebGUI::Asset::Sku->newBySku($session, 'classical-records-1'); }; +ok(Exception::Class->caught(), 'deleting a shelf deletes all products beneath it'); + +####################################################################### +# +# import, quoted headers and fields +# +####################################################################### + +my $shelf2 = $root->addChild({className => $class}); +$helper = WebGUI::AssetHelper::Product::ImportCSV->new( + session => $session, + asset => $shelf2, + id => 'importProducts', +); + +$pass = 0; +eval { + $pass = $importProducts->( $process, { + assetId => $helper->asset->getId, + filePath => WebGUI::Test->getTestCollateralPath('productTables/quotedTable.csv'), + } ); +}; +ok($pass, 'Able to load a table with quoted fields'); +$e = Exception::Class->caught(); +is($e, '', 'No exception thrown on a file with quoted fields'); +is($shelf2->getChildCount, 3, 'imported 3 children skus for shelf2 with quoted fields'); + +$shelf2->purge; +undef $shelf2; + +####################################################################### +# +# import, windows line endings +# +####################################################################### + +$shelf2 = WebGUI::Asset->getRoot($session)->addChild({className => $class}); +$helper = WebGUI::AssetHelper::Product::ImportCSV->new( + session => $session, + asset => $shelf2, + id => 'importProducts', +); + +$pass = 0; +eval { + $pass = $importProducts->( $process, { + assetId => $helper->asset->getId, + filePath => WebGUI::Test->getTestCollateralPath('productTables/windowsTable.csv'), + } ); +}; +ok($pass, 'Able to load a table with windows style newlines'); +$e = Exception::Class->caught(); +is($e, '', 'No exception thrown on a file with quoted fields'); +is($shelf2->getChildCount, 2, 'imported 2 children skus for shelf2 with windows line endings fields'); + +$shelf2->purge; +undef $shelf2; + +####################################################################### +# +# import, old sku column header +# +####################################################################### + +$shelf2 = WebGUI::Test->asset->addChild({className => $class}); +$helper = WebGUI::AssetHelper::Product::ImportCSV->new( + session => $session, + asset => $shelf2, + id => 'importProducts', +); + +$pass = 0; +eval { + $pass = $importProducts->( $process, { + assetId => $helper->asset->getId, + filePath => WebGUI::Test->getTestCollateralPath('productTables/windowsTable.csv'), + }); +}; +ok($pass, 'Able to load a table with old style, sku instead of varSku'); +$e = Exception::Class->caught(); +is($e, '', 'No exception thrown on a file old headers'); +is($shelf2->getChildCount, 2, 'imported 2 children skus for shelf2 with old headers'); + +$shelf2->purge; +undef $shelf2; + +####################################################################### +# +# import, funky data in the price column +# +####################################################################### + +my $shelf3 = WebGUI::Test->asset->addChild({className => $class}); +$helper = WebGUI::AssetHelper::Product::ImportCSV->new( + session => $session, + asset => $shelf3, + id => 'importProducts', +); + +$pass = 0; +eval { + $pass = $importProducts->( $process, { + assetId => $helper->asset->getId, + filePath => WebGUI::Test->getTestCollateralPath('productTables/dollarsigns.csv'), + }); +}; +ok($pass, 'Able to load a table with odd characters in the price column'); +$e = Exception::Class->caught(); +is($e, '', '... no exception thrown'); +is($shelf3->getChildCount, 1, '...imported 1 child sku for shelf3 with old headers'); + +my $sign = $shelf3->getFirstChild(); +my $signCollateral = $sign->getAllCollateral('variantsJSON'); +cmp_deeply( + $signCollateral, + [ + { + varSku => 'dollar signs', + shortdesc => 'Silver Dollar Signs', + price => '5.00', + weight => '0.33', + quantity => '1000', + variantId => ignore(), + }, + ], + 'collateral set correctly for sign' +); + +$shelf3->purge; +undef $shelf3; + +done_testing(); +#vim:ft=perl diff --git a/t/Auth.t b/t/Auth.t index cd5175dbf..26d97c6de 100644 --- a/t/Auth.t +++ b/t/Auth.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/lib"; use Test::More; use Test::Deep; use Exception::Class; @@ -29,9 +27,7 @@ use WebGUI::Session; my $session = WebGUI::Test->session; my @cleanupUsernames = (); # Will be cleaned up when we're done -my $AUTH_METHOD = "TEST"; # Used as second argument to WebGUI::Auth->new my $auth; # will be used to create auth instances -my ($request, $oldRequest, $output); #---------------------------------------------------------------------------- # Tests @@ -41,15 +37,12 @@ plan tests => 11; # Increment this number for each test you create #---------------------------------------------------------------------------- # Test createAccountSave and returnUrl together # Set up request -$oldRequest = $session->request; -$request = WebGUI::PseudoRequest->new; -$request->setup_param({ +my $createAccountSession = WebGUI::Test->newSession(0, { returnUrl => 'REDIRECT_URL', }); -$session->{_request} = $request; -$auth = WebGUI::Auth->new( $session, $AUTH_METHOD ); -my $username = $session->id->generate; +$auth = WebGUI::Auth->new( $createAccountSession ); +my $username = $createAccountSession->id->generate; my $language = "PigLatin"; push @cleanupUsernames, $username; installPigLatin(); @@ -59,8 +52,8 @@ WebGUI::Test->addToCleanup(sub { rmdir File::Spec->catdir(WebGUI::Test->lib, qw/WebGUI i18n PigLatin/); }); -$session->scratch->setLanguageOverride($language); -$output = $auth->createAccountSave( $username, { }, "PASSWORD" ); +$createAccountSession->scratch->setLanguageOverride($language); +my $output = $auth->www_createAccountSave( $username, { }, "PASSWORD" ); WebGUI::Test->addToCleanup(sub { for my $username ( @cleanupUsernames ) { # We don't create actual, real users, so we have to cleanup by hand @@ -94,46 +87,38 @@ WebGUI::Test->addToCleanup(sub { }); is( - $session->http->getRedirectLocation, 'REDIRECT_URL', + $createAccountSession->response->location, 'REDIRECT_URL', "returnUrl field is used to set redirect after createAccountSave", ); -is $session->user->profileField('language'), $language, 'languageOverride is taken in to account in createAccountSave'; -$session->scratch->delete('language'); ##Remove language override - -# Session Cleanup -$session->{_request} = $oldRequest; +is $createAccountSession->user->get('language'), $language, 'languageOverride is taken in to account in createAccountSave'; +$createAccountSession->scratch->delete('language'); ##Remove language override #---------------------------------------------------------------------------- # Test login and returnUrl together # Set up request -$oldRequest = $session->request; -$request = WebGUI::PseudoRequest->new; -$request->setup_param({ + +my $loginSession = WebGUI::Test->newSession(0, { returnUrl => 'REDIRECT_LOGIN_URL', }); -$session->{_request} = $request; -$auth = WebGUI::Auth->new( $session, $AUTH_METHOD, 3 ); -my $username = $session->id->generate; +$auth = WebGUI::Auth->new( $loginSession, 3 ); +my $username = $loginSession->id->generate; push @cleanupUsernames, $username; $session->setting->set('showMessageOnLogin', 0); -$output = $auth->login; +$output = $auth->www_login; is( - $session->http->getRedirectLocation, 'REDIRECT_LOGIN_URL', + $loginSession->response->location, 'REDIRECT_LOGIN_URL', "returnUrl field is used to set redirect after login", ); is $output, undef, 'login returns undef when showMessageOnLogin is false'; - -# Session Cleanup -$session->{_request} = $oldRequest; - #---------------------------------------------------------------------------- # Test createAccountSave +$auth = WebGUI::Auth->new( $session ); $username = $session->id->generate; push @cleanupUsernames, $username; @@ -150,14 +135,14 @@ tie my %profile_info, "Tie::IxHash", ( email => 'andy@shawshank.com' ); -$auth->createAccountSave( $username, { }, "PASSWORD", \%profile_info ); +diag $auth->www_createAccountSave( $username, { }, "PASSWORD", \%profile_info ); #Reset andy to the session users since stuff has changed my $andy = $session->user; #Test that the address was saved to the profile cmp_bag( - [ map { $andy->profileField($_) } keys %profile_info ], + [ map { $andy->get($_) } keys %profile_info ], [ values %profile_info ], 'Profile fields were saved' ); @@ -233,13 +218,12 @@ sub installPigLatin { use File::Copy; mkdir File::Spec->catdir(WebGUI::Test->lib, 'WebGUI', 'i18n', 'PigLatin'); copy( - WebGUI::Test->getTestCollateralPath('WebGUI.pm'), + WebGUI::Test->getTestCollateralPath('International/lib/WebGUI/i18n/PigLatin/WebGUI.pm'), File::Spec->catfile(WebGUI::Test->lib, qw/WebGUI i18n PigLatin WebGUI.pm/) ); copy( - WebGUI::Test->getTestCollateralPath('PigLatin.pm'), + WebGUI::Test->getTestCollateralPath('International/lib/WebGUI/i18n/PigLatin.pm'), File::Spec->catfile(WebGUI::Test->lib, qw/WebGUI i18n PigLatin.pm/) ); } - diff --git a/t/Auth/LDAP.t b/t/Auth/LDAP.t index 2f91c34e9..742743ad2 100644 --- a/t/Auth/LDAP.t +++ b/t/Auth/LDAP.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use Test::More; use WebGUI::Test; # Must use this before any other WebGUI modules use WebGUI::Session; @@ -37,7 +35,7 @@ my $ldapProps = WebGUI::Test->getSmokeLDAPProps(); $session->db->setRow("ldapLink","ldapLinkId",$ldapProps, $ldapProps->{ldapLinkId}); my $ldapLink = WebGUI::LDAPLink->new( $session, $ldapProps->{ldapLinkId} ); -addToCleanup($ldapLink); +WebGUI::Test->addToCleanup($ldapLink); my $ldap = $ldapLink->bind; $session->setting->set('ldapConnection', $ldapProps->{ldapLinkId} ); @@ -47,7 +45,7 @@ $ldapGroup->set( "ldapLinkId", $ldapProps->{ldapLinkId} ); $ldapGroup->set( "ldapGroup", "cn=Convicts,o=shawshank" ); $ldapGroup->set( "ldapGroupProperty", "member" ); $ldapGroup->set( "ldapRecursiveProperty", "uid" ); -addToCleanup($ldapGroup); +WebGUI::Test->addToCleanup($ldapGroup); #---------------------------------------------------------------------------- # Test Login of existing user @@ -58,17 +56,17 @@ $user->update({ username => "Andy Dufresne", }); my $auth = $user->authInstance; -$auth->saveParams( $user->getId, $user->get('authMethod'), { +$auth->update( ldapUrl => $ldapProps->{ldapUrl}, connectDN => "uid=Andy Dufresne,o=shawshank", ldapConnection => $ldapProps->{ldapLinkId}, -} ); +); $session->request->setup_body({ username => 'Andy Dufresne', identifier => 'AndyDufresne', }); -my $out = $auth->login(); +my $out = $auth->www_login(); is( $session->user->getId, $user->getId, 'Andy is logged in' ); @@ -85,7 +83,7 @@ $session->request->setup_body({ }); $auth = WebGUI::Auth::LDAP->new( $session, 'LDAP' ); -$out = $auth->createAccountSave; +$out = $auth->www_createAccountSave; is( $session->user->get('username'), 'Ellis Redding', 'Ellis was created' ); WebGUI::Test->addToCleanup( $session->user ); @@ -101,7 +99,7 @@ $session->request->setup_body({ identifier => 'BogsDiamond', }); $auth = WebGUI::Auth::LDAP->new( $session, 'LDAP' ); -$out = $auth->login; +$out = $auth->www_login; is( $session->user->get('username'), 'Bogs Diamond', 'Bogs was created' ) or diag( $auth->error ); @@ -134,10 +132,10 @@ $session->request->setup_body({ identifier => 'BrooksHatley', }); $auth = WebGUI::Auth::LDAP->new( $session, 'LDAP' ); -$out = $auth->login; +$out = $auth->www_login; is $session->user->get('username'), 'Brooks Hatley', 'Brooks was created'; cmp_deeply( - $auth->getParams, + $auth->get, { connectDN => 'uid=Brooks Hatley,o=shawshank', ldapConnection => '00000000000000testlink', @@ -146,7 +144,7 @@ cmp_deeply( 'authentication information set after creating account' ); WebGUI::Test->addToCleanup( $session->user, ); -$out = $auth->logout; +$out = $auth->www_logout; is $session->user->get('username'), 'Visitor', 'Brooks was logged out'; $ldap->moddn( 'uid=Brooks Hatley,o=shawshank', @@ -167,10 +165,10 @@ $session->request->setup_body({ }); $auth = WebGUI::Auth::LDAP->new( $session, 'LDAP' ); -$out = $auth->login; +$out = $auth->www_login; is $session->user->get('username'), 'Brooks Hatley', 'Brooks was logged in after name change'; cmp_deeply( - $auth->getParams, + $auth->get, { connectDN => 'uid=Brooks Hatlen,o=shawshank', ldapConnection => '00000000000000testlink', diff --git a/t/Auth/Twitter.t b/t/Auth/Twitter.t index c9dea6f49..587ff0015 100644 --- a/t/Auth/Twitter.t +++ b/t/Auth/Twitter.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use Test::More; use WebGUI::Test; # Must use this before any other WebGUI modules use WebGUI::Session; @@ -70,7 +68,7 @@ isa_ok( $nt, 'Net::Twitter' ); is( $auth->www_login, "redirect", "www_login always returns redirect" ); ok( $session->scratch->get('AuthTwitterToken'), 'auth token gets set to scratch' ); ok( $session->scratch->get('AuthTwitterTokenSecret'), 'auth token secret gets set to scratch' ); -like( $session->http->getRedirectLocation, qr/twitter[.]com/, "redirect to twitter.com" ); +like( $session->response->location, qr/twitter[.]com/, "redirect to twitter.com" ); # www_callback # I have no idea how to test this... @@ -90,8 +88,9 @@ my $userId = $session->db->quickScalar( "SELECT userId FROM authentication WHERE authMethod=? AND fieldName=? AND fieldData=?", [ "Twitter", "twitterUserId", "2345" ], ); -ok( $userId, 'user exists in authentication table' ); $user = WebGUI::User->new( $session, $userId ); +note( $userId ); +isnt( $user->userId, 1, 'user exists in authentication table' ); is( $user->username, "RedHerring", "correct username is set" ); WebGUI::Test->addToCleanup( $user ); diff --git a/t/Auth/WebGUI.t b/t/Auth/WebGUI.t new file mode 100644 index 000000000..658b06bdb --- /dev/null +++ b/t/Auth/WebGUI.t @@ -0,0 +1,72 @@ +# vim:syntax=perl +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 +#------------------------------------------------------------------ + +# Test the WebGUI Auth module +# +# + +use FindBin; +use strict; +use lib "$FindBin::Bin/lib"; +use Test::More; +use Test::Exception; +use Test::Deep; +use WebGUI::Test; # Must use this before any other WebGUI modules +use WebGUI::Session; +use WebGUI::Auth::WebGUI; + +#---------------------------------------------------------------------------- +# Init +my $session = WebGUI::Test->session; + +my $user = WebGUI::User->create( $session ); +WebGUI::Test->addToCleanup( $user ); + +#---------------------------------------------------------------------------- +# Test instance + +my $auth = WebGUI::Auth::WebGUI->new( $session, $user ); +is( $auth->user, $user, 'Auth accepts user object' ); + +$auth = WebGUI::Auth::WebGUI->new( $session, $user->userId ); +is( $auth->userId, $user->userId, 'Auth accepts userId' ); + +$session->user({ user => $user }); +$auth = WebGUI::Auth::WebGUI->new( $session ); +is( $auth->user, $user, 'Auth defaults to current user' ); + +#---------------------------------------------------------------------------- +# Test get, delete, and update +lives_ok( sub { $auth->update( test1 => "one" ) }, 'update accepts list of key/value pairs' ); +lives_ok( sub { $auth->update({ test2 => "two" }) }, 'update accepts single hashref' ); + +is( $auth->get('test1'), "one", 'get returns scalar with argument' ); +cmp_deeply( + $auth->get, + superhashof( { + test1 => "one", + test2 => "two", + } ), + "get without arguments returns hashref", +); + +lives_ok( sub { $auth->delete( "test1" ) }, 'delete a single key' ); +ok( !$auth->get('test1'), "delete actually deletes" ); +lives_ok( sub { $auth->delete }, 'delete all keys' ); +ok( !$auth->get('test2'), "deleted all" ); + +#---------------------------------------------------------------------------- +# + + +done_testing; + +#vim:ft=perl diff --git a/t/Auth/mech.t b/t/Auth/mech.t index 8464da41a..b12c5cee0 100644 --- a/t/Auth/mech.t +++ b/t/Auth/mech.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -18,21 +18,17 @@ # unauthorized page # returnUrl: tests use returnUrl= to try to return to the right place -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use Test::More; use WebGUI::Test; # Must use this before any other WebGUI modules use WebGUI::Asset; use WebGUI::VersionTag; use WebGUI::Session; -plan skip_all => 'set WEBGUI_LIVE to enable this test' unless $ENV{WEBGUI_LIVE}; +use WebGUI::Test::Mechanize; #---------------------------------------------------------------------------- # Init my $session = WebGUI::Test->session; -my $node = WebGUI::Asset->getImportNode( $session ); -my @versionTags = ( WebGUI::VersionTag->getWorking( $session ) ); # Override some settings to make things easier to test # userFunctionStyleId @@ -48,22 +44,22 @@ WebGUI::Test->addToCleanup($user); $user->username( $USERNAME ); $user->addToGroups( ['3'] ); my $auth = WebGUI::Operation::Auth::getInstance( $session, $user->authMethod, $user->userId ); -$auth->saveParams( $user->userId, $user->authMethod, { - 'identifier' => Digest::MD5::md5_base64( $IDENTIFIER ), -}); +$auth->update( + 'identifier' => $auth->hashPassword($IDENTIFIER) +); -my ($mech, $redirect, $response, $url); +my ($redirect, $response, $url); # Get the site's base URL -my $baseUrl = 'http://' . $session->config->get('sitename')->[0]; -# $baseUrl .= ':8000'; # no easy way to automatically find this -$baseUrl .= $session->config->get('gateway'); +my $baseUrl = 'http://localhost/'; my $httpAuthUrl = 'http://' . $USERNAME . ':' . $IDENTIFIER . '@' . $session->config->get('sitename')->[0]; # $httpAuthUrl .= ':8000'; # no easy way to automatically find this $httpAuthUrl .= $session->config->get('gateway'); # Make an asset we can login on +my $tag = WebGUI::VersionTag->getWorking($session); +my $node = WebGUI::Test->asset; my $asset = $node->addChild({ className => 'WebGUI::Asset::Wobject::Article', @@ -73,27 +69,18 @@ my $asset groupIdEdit => 3, # Admins styleTemplateId => 'PBtmpl0000000000000132', }); -$versionTags[-1]->commit; my $assetUrl = $baseUrl . $asset->get('url'); -WebGUI::Test->addToCleanup(@versionTags); +$tag->commit; +my $node = $node->cloneFromDb; +my $asset = $asset->cloneFromDb; #---------------------------------------------------------------------------- # Tests -if ( !eval { require Test::WWW::Mechanize; 1; } ) { - plan skip_all => 'Cannot load Test::WWW::Mechanize. Will not test.'; -} -$mech = Test::WWW::Mechanize->new; -$mech->get( $baseUrl ); -if ( !$mech->success ) { - plan skip_all => "Cannot load URL '$baseUrl'. Will not test."; -} - -plan tests => 42; # Increment this number for each test you create +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->config ); #---------------------------------------------------------------------------- # no form: Test logging in on a normal page sends the user back to the same page -$mech = Test::WWW::Mechanize->new; $mech->get( $assetUrl ); $mech->base_is( $assetUrl, "We got the page we were expecting" ); $url = $assetUrl . '?op=auth;method=login;username=' . $USERNAME . ';identifier=' . $IDENTIFIER; @@ -105,7 +92,7 @@ $mech->content_contains( "ARTICLE", "We are shown the article" ); #---------------------------------------------------------------------------- # no form: Test logging in on a normal page sends user back to same page AFTER at least one # failed attempt -$mech = Test::WWW::Mechanize->new; +$mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->config ); $mech->get( $assetUrl ); $mech->base_is( $assetUrl, "We got the page we were expecting" ); $url = $assetUrl . '?op=auth;method=login;username=' . $USERNAME . ';identifier=nowai'; @@ -124,15 +111,13 @@ $mech->content_contains( "ARTICLE", "We are shown the article" ); #---------------------------------------------------------------------------- # displayLogin: Test logging in on a normal page sends the user back to the same page -$mech = Test::WWW::Mechanize->new; +$mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->config ); $mech->get( $assetUrl ); $mech->base_is( $assetUrl, "We got the page we were expecting" ); $mech->get_ok( $assetUrl . "?op=auth;method=displayLogin" ); $mech->submit_form_ok( { with_fields => { - op => 'auth', - method => 'login', username => $USERNAME, identifier => $IDENTIFIER, }, @@ -144,7 +129,7 @@ $mech->base_is( $assetUrl, "We were redirected to the same page after login" ); #---------------------------------------------------------------------------- # displayLogin: Test logging in on a normal page sends user back to same page AFTER at least one # failed attempt -$mech = Test::WWW::Mechanize->new; +$mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->config ); $mech->get( $assetUrl ); $mech->base_is( $assetUrl, "We got the page we were expecting" ); $mech->get_ok( $assetUrl . "?op=auth;method=displayLogin" ); @@ -167,7 +152,7 @@ $mech->base_is( $assetUrl, "We were redirected to the same page after login and #---------------------------------------------------------------------------- # displayLogin: Test logging in on an operation other than ?op=auth -$mech = Test::WWW::Mechanize->new; +$mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->config ); $mech->get( $assetUrl . '?op=listUsers' ); $mech->base_is( $assetUrl . '?op=listUsers', "We got the page we were expecting" ); $mech->get_ok( $assetUrl . "?op=auth;method=displayLogin" ); @@ -185,7 +170,7 @@ $mech->base_is( $assetUrl, "We weren't redirected"); #---------------------------------------------------------------------------- # displayLogin: Test logging in on an operation other than ?op=auth after at least one # failed attempt -$mech = Test::WWW::Mechanize->new; +$mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->config ); $mech->get( $assetUrl . '?op=listUsers' ); $mech->base_is( $assetUrl . '?op=listUsers', "We got the page we were expecting" ); $mech->get_ok( $assetUrl . "?op=auth;method=displayLogin" ); @@ -209,7 +194,7 @@ $mech->base_is( $assetUrl, "We weren't redirected" ); #---------------------------------------------------------------------------- # displayLogin: Test logging in after directly going to ?op=auth;method=init -$mech = Test::WWW::Mechanize->new; +$mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->config ); $mech->get_ok( $assetUrl . '?op=auth;method=init' ); $mech->base_is( $assetUrl . '?op=auth;method=init', "We got the page we were expecting" ); $mech->get_ok( $assetUrl . "?op=auth;method=displayLogin" ); @@ -228,7 +213,7 @@ $mech->base_is( $assetUrl, "We were redirected to the right page" ); #---------------------------------------------------------------------------- # displayLogin: Test logging in after directly going to ?op=auth;method=init and failing # at least once. -$mech = Test::WWW::Mechanize->new; +$mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->config ); $mech->get_ok( $assetUrl . '?op=auth;method=init' ); $mech->base_is( $assetUrl . '?op=auth;method=init', "We got the page we were expecting" ); $mech->get_ok( $assetUrl . "?op=auth;method=displayLogin" ); @@ -251,7 +236,7 @@ $mech->base_is( $assetUrl, "We were redirected to the right place" ); #---------------------------------------------------------------------------- # returnUrl: Test logging in on a normal page sends the user back to the same page -$mech = Test::WWW::Mechanize->new; +$mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->config ); $mech->get( $assetUrl ); $mech->base_is( $assetUrl, "We got the page we were expecting" ); $url = $assetUrl @@ -264,7 +249,7 @@ $mech->base_is( $baseUrl . 'root/import', "We were redirected properly" ); #---------------------------------------------------------------------------- # returnUrl: Test logging in on a normal page sends user back to same page AFTER at least one # failed attempt -$mech = Test::WWW::Mechanize->new; +$mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->config ); $mech->get( $assetUrl ); $mech->base_is( $assetUrl, "We got the page we were expecting" ); $url = $assetUrl @@ -281,10 +266,4 @@ $mech->submit_form_ok( ); $mech->base_is( $assetUrl, "We don't get redirected" ); -#---------------------------------------------------------------------------- -# HTTP basic auth -$mech = Test::WWW::Mechanize->new; -$mech->get( $httpAuthUrl ); -$mech->content_contains( "Hello, $USERNAME", "We are greeted by name" ); -$mech->get( $httpAuthUrl . $asset->get('url') ); -$mech->content_contains( "ARTICLE", "We are shown the article" ); +done_testing; diff --git a/t/Cache/Database.t b/t/Cache/Database.t deleted file mode 100644 index 0d0fe1dfb..000000000 --- a/t/Cache/Database.t +++ /dev/null @@ -1,79 +0,0 @@ -# vim:syntax=perl -#------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. -#------------------------------------------------------------------- -# Please read the legal notices (docs/legal.txt) and the license -# (docs/license.txt) that came with this distribution before using -# this software. -#------------------------------------------------------------------ -# http://www.plainblack.com info@plainblack.com -#------------------------------------------------------------------ - -# Write a little about what this script tests. -# -# - -use FindBin; -use strict; -use lib "$FindBin::Bin/../lib"; -use Storable qw(freeze thaw); -use Test::More; -use Time::HiRes; -use WebGUI::Test; # Must use this before any other WebGUI modules -use WebGUI::Session; -use WebGUI::Cache::Database; - -#---------------------------------------------------------------------------- -# Init -my $session = WebGUI::Test->session; - -# presupposes that there are cached items to test -my $cacheEntries = $session->db->buildArrayRefOfHashRefs("select expires,cachekey,namespace,content from cache order by rand() limit 100"); - -#---------------------------------------------------------------------------- -# Tests - -plan tests => 2 + scalar(@{$cacheEntries}); # Increment this number for each test you create - -#---------------------------------------------------------------------------- -# put your tests here - -my $cache = WebGUI::Cache::Database->new($session, "this", "that"); -my $testValue = "a rock that has no earthly business in that field"; - -$cache->set($testValue); -is($cache->get, $testValue, "set/get works"); -$cache->delete; -is($cache->get, undef, "delete works"); - - - -# performance tests -my $numTests = 0; -my $totalTime = 0; -foreach my $entry (@{$cacheEntries}) { - my $start = [Time::HiRes::gettimeofday]; - my $cache = WebGUI::Cache::Database->new($session, $entry->{cachekey}, $entry->{namespace}); - $cache->{_key} = $entry->{cachekey}; # evil: don't do this at home kids - my $value = $cache->get; - if ($entry->{expires} > time()) { - my $entryValue = $entry->{content}; - eval { $entryValue = thaw($entryValue); }; - $entryValue = ($entryValue && ref $entryValue) ? $$entryValue : undef; - is_deeply($value, $entryValue, "cache entry is valid"); - } - else { - is($value, undef, "cache entry has timed out"); - } - $numTests++; - $totalTime += Time::HiRes::tv_interval($start); -} -print "\nTime to run $numTests cache tests is $totalTime seconds. Average time per test is ".($totalTime/$numTests)." seconds.\n" if ($numTests > 0); -# end performance tests - - -#---------------------------------------------------------------------------- -# Cleanup -END { - -} diff --git a/t/Cache/FileCache.t b/t/Cache/FileCache.t deleted file mode 100644 index 2ac4add4f..000000000 --- a/t/Cache/FileCache.t +++ /dev/null @@ -1,115 +0,0 @@ -# vim:syntax=perl -#------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. -#------------------------------------------------------------------- -# Please read the legal notices (docs/legal.txt) and the license -# (docs/license.txt) that came with this distribution before using -# this software. -#------------------------------------------------------------------ -# http://www.plainblack.com info@plainblack.com -#------------------------------------------------------------------ - -# Write a little about what this script tests. -# -# - -use FindBin; -use strict; -use lib "$FindBin::Bin/../lib"; -use Test::More; -use Test::Deep; -use Path::Class; -use File::Path; -use File::Basename qw(basename); - -use WebGUI::Test; # Must use this before any other WebGUI modules -use WebGUI::Session; -use WebGUI::Cache; - -#---------------------------------------------------------------------------- -# Init -my $session = WebGUI::Test->session; - - -#---------------------------------------------------------------------------- -# Tests - -my $tests = 14; -plan tests => 1 + $tests; - -#---------------------------------------------------------------------------- -# put your tests here - -my $origCacheType = $session->config->get('cacheType'); -$session->config->set('cacheType', 'WebGUI::Cache::FileCache'); - -my $origCacheRoot = $session->config->get('fileCacheRoot'); -$session->config->delete('fileCacheRoot'); - -my $loaded = use_ok('WebGUI::Cache::FileCache'); - -SKIP: { - - skip 'Unable to load module WebGUI::Cache::FileCache', $tests unless $loaded; - - my $cacher = WebGUI::Cache->new($session, 'ReservedForTests'); - - isa_ok($cacher, 'WebGUI::Cache::FileCache', 'WebGUI::Cache creates the correct object type'); - isa_ok($cacher->session, 'WebGUI::Session', 'session method returns a session object'); - - cmp_deeply( - $cacher, - noclass({ - _session => ignore(), - _namespace => basename(WebGUI::Test->file), - _key => re('[a-zA-Z0-9+\-]{22}'), - }), - 'New FileCache object has correct defaults', - ); - - $cacher = WebGUI::Cache->new($session, 'ReservedForTests', 'ReservedForTests'); - - cmp_deeply( - $cacher, - noclass({ - _session => ignore(), - _namespace => 'ReservedForTests', - _key => re('[a-zA-Z0-9+\-]{22}'), - }), - 'Second fileCache object was recreated with custom namespace', - ); - - my $root = '/tmp'; ##Default for Unix testing. Need to extend this for Windows someday... - my $namespace = Path::Class::Dir->new($root, qw/WebGUICache ReservedForTests/); - is($cacher->getNamespaceRoot, $namespace->stringify, 'getNamespaceRoot returns the correct path'); - - ok(! -e $cacher->getNamespaceRoot, 'The namespace does not exist in the filesystem'); - - my $folder = $namespace->subdir($cacher->{_key}); - is($cacher->getFolder, $folder->stringify, 'getFolder returns the correct path, which is the namespace with a key subdirectory'); - ok(! -e $cacher->getFolder, 'The folder does not exist in the filesystem'); - - $cacher->set('Some value'); - ok( -e $namespace->stringify, 'setting data into the cache creates the namespace dir'); - ok( -e $folder->stringify, 'setting data into the cache creates the folder dir'); - ok( -e $folder->file('expires')->stringify, 'expiry file was created'); - ok( -e $folder->file('cache')->stringify, 'cache file was created'); - - $cacher->delete(); - ok(! -e $cacher->getFolder, 'delete removes the cache folder'); - - $cacher->flush(); - ok(! -e $cacher->getNamespaceRoot, 'purge removes the namespace folder'); - - undef $cacher; - -} - -#---------------------------------------------------------------------------- -# Cleanup -END { - $session->config->set('cacheType', $origCacheType); - if ($origCacheRoot) { - $session->config->get('fileCacheRoot', $origCacheRoot); - } -} diff --git a/t/Config.t b/t/Config.t index b93903db6..b88a4ffd2 100644 --- a/t/Config.t +++ b/t/Config.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,19 +8,16 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/lib"; use WebGUI::Test; -use Test::More tests => 15; # increment this value for each test you create +use Test::More tests => 13; # increment this value for each test you create use Test::Deep; use File::Basename qw(basename); use Cwd; my $config = WebGUI::Test->config; my $configFile = WebGUI::Test->file; -my $webguiRoot = WebGUI::Test->root; ok( defined $config, "load config" ); ok( $config->get("dsn") ne "", "get()" ); @@ -28,8 +25,6 @@ is( ref $config->get("macros"), "HASH", "get() macros hash" ); is( ref $config->get("assets"), "HASH", "get() assets hash" ); is( ref $config->get("shippingDrivers"), "ARRAY", "get() shippingDrivers array" ); is( $config->getFilename, basename($configFile), "getFilename()" ); -is( $config->getWebguiRoot, Cwd::realpath($webguiRoot), "getWebguiRoot()" ); -ok( defined WebGUI::Config->readAllConfigs($webguiRoot), "readAllConfigs" ); $config->addToArray("shippingDrivers","TEST"); my $found = 0; foreach my $driver ( @{$config->get("shippingDrivers")}) { diff --git a/t/Content/Asset.t b/t/Content/Asset.t index a515d9970..85432125e 100644 --- a/t/Content/Asset.t +++ b/t/Content/Asset.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use Test::More; use Test::MockObject::Extends; use Test::Deep; @@ -73,7 +71,7 @@ sub www_edit { return "you'll never see me!" } package main; my $td - = WebGUI::Asset->getImportNode( $session )->addChild( { + = WebGUI::Test->asset->addChild( { title => "one", className => 'WebGUI::Asset::TestDispatch', url => 'testdispatch', @@ -82,19 +80,12 @@ my $td my $utf8_url = "Viel-spa\x{00DF}"; utf8::upgrade $utf8_url; my $utf8 - = WebGUI::Asset->getImportNode( $session )->addChild( { + = WebGUI::Test->asset->addChild( { title => "utf8", className => 'WebGUI::Asset::TestDispatch', url => $utf8_url, } ); -WebGUI::Test->addToCleanup( WebGUI::VersionTag->getWorking( $session ) ); - -#---------------------------------------------------------------------------- -# Tests - -plan tests => 25; # Increment this number for each test you create - #---------------------------------------------------------------------------- # test getUrlPermutation( url ) method @@ -166,12 +157,11 @@ is $output, "bar", "special /foo handler"; # Add an asset that clobbers the TestDispatch's /foo my $clobberingTime - = WebGUI::Asset->getImportNode( $session )->addChild( { + = WebGUI::Test->asset->addChild( { title => "two", className => 'WebGUI::Asset::TestDispatch', url => $td->get('url') . '/foo', } ); -WebGUI::Test->addToCleanup($clobberingTime); is( WebGUI::Content::Asset::dispatch( $session, "testdispatch/foo" ), @@ -184,7 +174,7 @@ $clobberingTime->purge; # Add an asset that declines everything instead my $declined - = WebGUI::Asset->getImportNode( $session )->addChild( { + = WebGUI::Test->asset->addChild( { title => "three", className => 'WebGUI::Asset::TestDecline', url => $td->get('url') . '/foo', @@ -213,6 +203,30 @@ $output = WebGUI::Content::Asset::dispatch( $session ); is $output, 'www_view one', 'an empty URL returns the default asset'; $session->setting->set('defaultPage', $originalDefaultPage); +#---------------------------------------------------------------------------- +# 304 Content Not Modified response + +my $newAsset = WebGUI::Test->asset->addChild( { + className => 'WebGUI::Asset::Wobject::Article', +} ); + +my $http_request = HTTP::Request::Common::GET('http://'.$session->config->get('sitename')->[0]); +$http_request->header('If-Modified-Since' => $session->datetime->epochToHttp(time + 20)); # 20 seconds into the future! +my $notModifiedSession = WebGUI::Test->newSession( undef, $http_request); +WebGUI::Test->addToCleanup( $notModifiedSession ); + +my $output = WebGUI::Content::Asset::handler( $notModifiedSession ); +is( $output, "chunked", "304 returns chunked" ); +is( $notModifiedSession->response->status, "304", "http status code set" ); +ok( !$notModifiedSession->closed, "session is not closed" ); + +$notModifiedSession = WebGUI::Test->newSession( undef, $http_request); +WebGUI::Test->addToCleanup( $notModifiedSession ); +$notModifiedSession->user({ userId => 3}); +my $output = WebGUI::Content::Asset::handler( $notModifiedSession ); +isnt( $notModifiedSession->response->status, "304", "logged in user doesn't get 304" ); +ok( !$notModifiedSession->closed, "session is not closed" ); + # Test that requesting a URL that doesn't exist, but one of the permutations does exist, returns undef $session->request->setup_body({ }); @@ -223,15 +237,16 @@ is $output, undef, 'getting a URL which does not exist returns undef'; is $session->asset, undef, '... session asset is not set'; use WebGUI::Asset::RssAspectDummy; -my $dummy = WebGUI::Asset->getImportNode($session)->addChild({ +my $dummy = WebGUI::Test->asset->addChild({ className => 'WebGUI::Asset::RssAspectDummy', url => '/home/shawshank', title => 'Dummy Title', synopsis => 'Dummy Synopsis', description => 'Dummy Description', }); -WebGUI::Test->addToCleanup($dummy); $output = WebGUI::Content::Asset::dispatch( $session, '/home/shawshank/no-child-here' ); is $output, undef, 'RSS Aspect propagates the fragment'; +done_testing; + #vim:ft=perl diff --git a/t/Content/Maintenance.t b/t/Content/Maintenance.t index 49e6b41d0..812e1c2b8 100644 --- a/t/Content/Maintenance.t +++ b/t/Content/Maintenance.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; use WebGUI::Content::Maintenance; diff --git a/t/Content/SetLanguage.t b/t/Content/SetLanguage.t index 20f6978fd..f6962f7d8 100644 --- a/t/Content/SetLanguage.t +++ b/t/Content/SetLanguage.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; use WebGUI::Content::SetLanguage; diff --git a/t/Content/Setup.t b/t/Content/Setup.t index 18e51e217..bd2e0a697 100644 --- a/t/Content/Setup.t +++ b/t/Content/Setup.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; use WebGUI::Content::Setup; diff --git a/t/Content/SiteIndex.t b/t/Content/SiteIndex.t index 81b216999..e614810c8 100644 --- a/t/Content/SiteIndex.t +++ b/t/Content/SiteIndex.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; use WebGUI::Content::SiteIndex; @@ -28,7 +26,8 @@ my $session = WebGUI::Test->session; my $output = WebGUI::Content::SiteIndex::handler($session); is $output, undef, 'no content returned unless sitemap.xml is requested'; -$session->request->uri('/sitemap.xml'); +$session->request->env->{PATH_INFO} = '/sitemap.xml'; +delete $session->url->{_requestedUrl}; $output = WebGUI::Content::SiteIndex::handler($session); my $xmlData = XMLin($output, KeepRoot => 1, @@ -48,9 +47,7 @@ my $hiddenPage = WebGUI::Asset->getDefault($session)->addChild({ title => 'seekrit hidden page', url => 'hidden_page', }); -my $versionTag = WebGUI::VersionTag->getWorking($session); -$versionTag->commit; -addToCleanup($versionTag); +WebGUI::Test->addToCleanup($hiddenPage); $output = WebGUI::Content::SiteIndex::handler($session); $xmlData = XMLin($output, diff --git a/t/Content/Wizard.t b/t/Content/Wizard.t index 1b654810b..0da5da74a 100644 --- a/t/Content/Wizard.t +++ b/t/Content/Wizard.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use Test::More; use WebGUI::Test; # Must use this before any other WebGUI modules use WebGUI::Session; @@ -24,10 +22,24 @@ use WebGUI::Session; # Init my $session = WebGUI::Test->session; +BEGIN { + $INC{'WebGUI/Wizard/HelloWorld.pm'} = __FILE__; +} + +package WebGUI::Wizard::HelloWorld; + +use base "WebGUI::Wizard"; + +sub _get_steps { return ["hello"] } +sub www_hello { return "Hello World!\n" } +sub wrapStyle { return $_[1] } + #---------------------------------------------------------------------------- # Tests +package main; + plan tests => 3; # Increment this number for each test you create #---------------------------------------------------------------------------- @@ -43,12 +55,4 @@ $session->request->setup_body( { } ); is( WebGUI::Content::Wizard::handler( $session ), "Hello World!\n", "Accepts request and returns response" ); -package WebGUI::Wizard::HelloWorld; - -use base "WebGUI::Wizard"; - -sub _get_steps { return ["hello"] } -sub www_hello { return "Hello World!\n" } -sub wrapStyle { return $_[1] } - #vim:ft=perl diff --git a/t/Crud.t b/t/Crud.t index 9d70967e8..aca5f1488 100644 --- a/t/Crud.t +++ b/t/Crud.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 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,13 +12,36 @@ # Tests WebGUI::Crud -use FindBin; use strict; -use lib "$FindBin::Bin/lib"; use Test::More; use WebGUI::Test; # Must use this before any other WebGUI modules use WebGUI::Session; -use WebGUI::Crud; + +BEGIN { + $INC{'WebGUI/Cruddy.pm'} = __FILE__; +} + +package WebGUI::Cruddy; + +use Moose; +use WebGUI::Definition::Crud; +extends 'WebGUI::Crud'; + +define tableName => 'some_crud_table'; +define tableKey => 'id'; + +has id => ( + required => 1, + is => 'ro', +); + +property prop => ( + label => 'prop', + fieldType => 'text', + default => 'propeller', +); + +package main; #---------------------------------------------------------------------------- # Init @@ -28,14 +51,10 @@ my $session = WebGUI::Test->session; #---------------------------------------------------------------------------- # Tests -plan tests => 55; # Increment this number for each test you create - -#---------------------------------------------------------------------------- - # check table structure -WebGUI::Crud->crud_createTable($session); -WebGUI::Test->addToCleanup(sub { WebGUI::Crud->crud_dropTable($session); }); -my $sth = $session->db->read("describe unnamed_crud_table"); +WebGUI::Cruddy->crud_createTable($session); +WebGUI::Test->addToCleanup(sub { WebGUI::Cruddy->crud_dropTable($session); }); +my $sth = $session->db->read("describe some_crud_table"); my ($col, $type) = $sth->array(); is($col, 'id', "structure: id name"); is($type, 'char(22)', "structure: id type"); @@ -51,93 +70,112 @@ is($type, 'datetime', "structure: lastUpdated type"); $sth->finish; # check data -my $record1 = WebGUI::Crud->create($session); -isa_ok($record1, "WebGUI::Crud", "isa WebGUI::Crud"); -like($record1->get('dateCreated'), qr/\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}/, "dateCreated looks like a date"); -like($record1->get('lastUpdated'), qr/\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}/, "lastUpdated looks like a date"); -like($record1->get('sequenceNumber'), qr/\d+/, "sequenceNumber looks like a number"); -is($record1->get('sequenceNumber'), 1, "record 1 sequenceNumber is 1"); -like($record1->get('id'), qr/[A-Za-z0-9_-]{22}/, "id looks like a guid"); +my $record1 = WebGUI::Cruddy->new($session); +can_ok($record1, 'id'); +isa_ok($record1, "WebGUI::Crud"); +like($record1->dateCreated, qr/\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}/, "dateCreated looks like a date"); +like($record1->lastUpdated, qr/\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}/, "lastUpdated looks like a date"); +like($record1->sequenceNumber, qr/\d+/, "sequenceNumber looks like a number"); +is($record1->sequenceNumber, 1, "record 1 sequenceNumber is 1"); +like($record1->id, qr/[A-Za-z0-9_-]{22}/, "id looks like a guid"); +my $written = $session->db->quickScalar('select COUNT(*) from some_crud_table where id=?',[ $record1->id ]); +is $written, 1, 'autowrite for a new object works'; + +can_ok($record1, 'prop'); +my $prop = $record1->meta->find_attribute_by_name('prop'); +ok($prop->does('WebGUI::Definition::Meta::Property'), 'prop does WebGUI::Definition::Meta::Property'); +ok($prop->does('WebGUI::Definition::Meta::Property::Crud'), 'prop does WebGUI::Definition::Meta::Property::Crud'); +ok($prop->does('WebGUI::Definition::Meta::Settable'), 'prop does WebGUI::Definition::Meta::Settable'); +$record1->update({ prop => 'proposition', }); +is $record1->prop, 'proposition', 'update works'; +my $dbBday = WebGUI::DateTime->new($session, WebGUI::Test->webguiBirthday)->toDatabase; +$record1->update({ + prop => '', + lastUpdated => $dbBday, +}); +isnt $record1->lastUpdated, $dbBday, 'lastUpdated overwritten'; # custom id -my $record2 = WebGUI::Crud->create($session,{},{id=>'theshawshankredemption'}); -is($record2->get('id'),'theshawshankredemption',"custom id works"); +my $record2 = WebGUI::Cruddy->new($session, {id=>'theshawshankredemption'}); +is($record2->id,'theshawshankredemption',"custom id works"); $record2->delete; # instanciation -my $record2 = WebGUI::Crud->create($session); +$record2 = WebGUI::Cruddy->new($session); isnt($record1->getId, $record2->getId, "can retrieve unique rows"); -my $copyOfRecord2 = WebGUI::Crud->new($session, $record2->getId); +my $copyOfRecord2 = WebGUI::Cruddy->new($session, $record2->getId); is($record2->getId, $copyOfRecord2->getId, "can reinstanciate record"); # sequencing -is($record2->get('sequenceNumber'), 2, "record 1 sequenceNumber is 2"); -my $record3 = WebGUI::Crud->create($session); -is($record3->get('sequenceNumber'), 3, "record 1 sequenceNumber is 3"); -my $record4 = WebGUI::Crud->create($session); -is($record4->get('sequenceNumber'), 4, "record 1 sequenceNumber is 4"); +is($record2->sequenceNumber, 2, "record 1 sequenceNumber is 2"); +my $record3 = WebGUI::Cruddy->new($session); +is($record3->sequenceNumber, 3, "record 1 sequenceNumber is 3"); +my $record4 = WebGUI::Cruddy->new($session); +is($record4->sequenceNumber, 4, "record 1 sequenceNumber is 4"); ok($record4->demote, "demotion reports success"); -is($record4->get('sequenceNumber'), 4, "can't demote further than end"); +is($record4->sequenceNumber, 4, "can't demote further than end"); ok($record1->promote, "promotion reports success"); -is($record1->get('sequenceNumber'), 1, "can't promote further than beginning"); +is($record1->sequenceNumber, 1, "can't promote further than beginning"); $record4->promote; -is($record4->get('sequenceNumber'), 3, "promotion from end works"); +is($record4->sequenceNumber, 3, "promotion from end works"); $record4->demote; -is($record4->get('sequenceNumber'), 4, "demotion to end works"); +is($record4->sequenceNumber, 4, "demotion to end works"); $record1->demote; -is($record1->get('sequenceNumber'), 2, "demotion from beginning works"); +is($record1->sequenceNumber, 2, "demotion from beginning works"); $record1->promote; -is($record1->get('sequenceNumber'), 1, "promotion to beginning works"); +is($record1->sequenceNumber, 1, "promotion to beginning works"); $record2->demote; -is($record2->get('sequenceNumber'), 3, "demotion from middle works"); +is($record2->sequenceNumber, 3, "demotion from middle works"); $record2->promote; -is($record2->get('sequenceNumber'), 2, "promotion from middle works"); +is($record2->sequenceNumber, 2, "promotion from middle works"); # deleting ok($record2->delete, "deletion reports success"); -my $copyOfRecord3 = WebGUI::Crud->new($session, $record3->getId); -my $copyOfRecord4 = WebGUI::Crud->new($session, $record4->getId); -is($copyOfRecord3->get('sequenceNumber'), '2', "deletion of record 2 moved record 3 to sequence 2"); -is($copyOfRecord4->get('sequenceNumber'), '3', "deletion of record 2 moved record 4 to sequence 3"); +my $copyOfRecord3 = WebGUI::Cruddy->new($session, $record3->getId); +my $copyOfRecord4 = WebGUI::Cruddy->new($session, $record4->getId); +is($copyOfRecord3->sequenceNumber, '2', "deletion of record 2 moved record 3 to sequence 2"); +is($copyOfRecord4->sequenceNumber, '3', "deletion of record 2 moved record 4 to sequence 3"); # updating -sleep 1; +$copyOfRecord4->dateCreated(WebGUI::DateTime->new($session, WebGUI::Test->webguiBirthday)->toMysql); ok($copyOfRecord4->update, "update returns success"); -isnt($copyOfRecord4->get('lastUpdated'), $copyOfRecord4->get('dateCreated'), "updates work"); +isnt($copyOfRecord4->lastUpdated, $copyOfRecord4->get('dateCreated'), "updates work"); # retrieve data -my ($sql, $params) = WebGUI::Crud->getAllSql($session); -is($sql, "select `unnamed_crud_table`.`id` from `unnamed_crud_table` order by `unnamed_crud_table`.`sequenceNumber`", "getAllSql() SQL no options"); -($sql, $params) = WebGUI::Crud->getAllSql($session, {sequenceKeyValue=>1}); -is($sql, "select `unnamed_crud_table`.`id` from `unnamed_crud_table` order by `unnamed_crud_table`.`sequenceNumber`", "getAllSql() SQL sequence key value with no key specified"); +my ($sql, $params) = WebGUI::Cruddy->getAllSql($session); +is($sql, "select `some_crud_table`.`id` from `some_crud_table` order by `some_crud_table`.`sequenceNumber`", "getAllSql() SQL no options"); +($sql, $params) = WebGUI::Cruddy->getAllSql($session, {sequenceKeyValue=>1}); +is($sql, "select `some_crud_table`.`id` from `some_crud_table` order by `some_crud_table`.`sequenceNumber`", "getAllSql() SQL sequence key value with no key specified"); is($params->[0], undef, "getAllSql() PARAMS sequence key value with no key specified"); -($sql, $params) = WebGUI::Crud->getAllSql($session, {limit=>5}); -is($sql, "select `unnamed_crud_table`.`id` from `unnamed_crud_table` order by `unnamed_crud_table`.`sequenceNumber` limit 5", "getAllSql() SQL with a row limit"); -($sql, $params) = WebGUI::Crud->getAllSql($session,{limit=>[10,20]}); -is($sql, "select `unnamed_crud_table`.`id` from `unnamed_crud_table` order by `unnamed_crud_table`.`sequenceNumber` limit 10,20", "getAllSql() SQL with a start and row limit"); -($sql, $params) = WebGUI::Crud->getAllSql($session,{orderBy=>'lastUpdated'}); -is($sql, "select `unnamed_crud_table`.`id` from `unnamed_crud_table` order by lastUpdated", "getAllSql() with a custom order by clause"); -($sql, $params) = WebGUI::Crud->getAllSql($session,{join=>['someTable using (someId)']}); -is($sql, "select `unnamed_crud_table`.`id` from `unnamed_crud_table` left join someTable using (someId) order by `unnamed_crud_table`.`sequenceNumber`", "getAllSql() with a custom join"); -($sql, $params) = WebGUI::Crud->getAllSql($session,{joinUsing=>[{myTable => 'myId'}]}); -is($sql, "select `unnamed_crud_table`.`id` from `unnamed_crud_table` left join `myTable` using (`myId`) order by `unnamed_crud_table`.`sequenceNumber`", "getAllSql() with a custom joinUsing"); -($sql, $params) = WebGUI::Crud->getAllSql($session,{constraints=>[{'sequenceNumber=?'=>1}]}); -is($sql, "select `unnamed_crud_table`.`id` from `unnamed_crud_table` where (sequenceNumber=?) order by `unnamed_crud_table`.`sequenceNumber`", "getAllSql() SQL with a constraint"); +($sql, $params) = WebGUI::Cruddy->getAllSql($session, {limit=>5}); +is($sql, "select `some_crud_table`.`id` from `some_crud_table` order by `some_crud_table`.`sequenceNumber` limit 5", "getAllSql() SQL with a row limit"); +($sql, $params) = WebGUI::Cruddy->getAllSql($session,{limit=>[10,20]}); +is($sql, "select `some_crud_table`.`id` from `some_crud_table` order by `some_crud_table`.`sequenceNumber` limit 10,20", "getAllSql() SQL with a start and row limit"); +($sql, $params) = WebGUI::Cruddy->getAllSql($session,{orderBy=>'lastUpdated'}); +is($sql, "select `some_crud_table`.`id` from `some_crud_table` order by lastUpdated", "getAllSql() with a custom order by clause"); +($sql, $params) = WebGUI::Cruddy->getAllSql($session,{join=>['someTable using (someId)']}); +is($sql, "select `some_crud_table`.`id` from `some_crud_table` left join someTable using (someId) order by `some_crud_table`.`sequenceNumber`", "getAllSql() with a custom join"); +($sql, $params) = WebGUI::Cruddy->getAllSql($session,{joinUsing=>[{myTable => 'myId'}]}); +is($sql, "select `some_crud_table`.`id` from `some_crud_table` left join `myTable` using (`myId`) order by `some_crud_table`.`sequenceNumber`", "getAllSql() with a custom joinUsing"); +($sql, $params) = WebGUI::Cruddy->getAllSql($session,{constraints=>[{'sequenceNumber=?'=>1}]}); +is($sql, "select `some_crud_table`.`id` from `some_crud_table` where (sequenceNumber=?) order by `some_crud_table`.`sequenceNumber`", "getAllSql() SQL with a constraint"); is($params->[0], 1, "getAllSql PARAMS with a constraint"); -($sql, $params) = WebGUI::Crud->getAllSql($session,{constraints=>[{'sequenceNumber=? or sequenceNumber=?'=>[1,2]}]}); -is($sql, "select `unnamed_crud_table`.`id` from `unnamed_crud_table` where (sequenceNumber=? or sequenceNumber=?) order by `unnamed_crud_table`.`sequenceNumber`", "getAllSql() SQL with two constraints"); +($sql, $params) = WebGUI::Cruddy->getAllSql($session,{constraints=>[{'sequenceNumber=? or sequenceNumber=?'=>[1,2]}]}); +is($sql, "select `some_crud_table`.`id` from `some_crud_table` where (sequenceNumber=? or sequenceNumber=?) order by `some_crud_table`.`sequenceNumber`", "getAllSql() SQL with two constraints"); is($params->[1], 2, "getAllSql PARAMS with two constraints"); -is(scalar(@{WebGUI::Crud->getAllIds($session)}), 3, "getAllIds()"); -my $iterator = WebGUI::Crud->getAllIterator($session); +is(scalar(@{WebGUI::Cruddy->getAllIds($session)}), 3, "getAllIds()"); +my $iterator = WebGUI::Cruddy->getAllIterator($session); while (my $object = $iterator->()) { - isa_ok($object, 'WebGUI::Crud', 'Put your trust in the Lord. Your ass belongs to me.'); + isa_ok($object, 'WebGUI::Cruddy', 'Put your trust in the Lord. Your ass belongs to me.'); } #crud management stuff -is(ref WebGUI::Crud->crud_getProperties($session), 'HASH', 'properties work'); -is(WebGUI::Crud->crud_getTableKey($session), 'id', 'default key is id'); -is(WebGUI::Crud->crud_getTableName($session), 'unnamed_crud_table', 'default table is unnamed_crud_table'); -is(WebGUI::Crud->crud_getSequenceKey($session), '', 'default sequence key is blank'); +is(ref WebGUI::Cruddy->crud_getProperties($session), 'HASH', 'properties work'); +is(WebGUI::Cruddy->crud_getTableKey(), 'id', 'default key is id'); +is(WebGUI::Cruddy->crud_getTableName(), 'some_crud_table', 'default table is some_crud_table'); +is(WebGUI::Cruddy->crud_getSequenceKey(), undef, 'default sequence key is blank'); + +done_testing(); #vim:ft=perl diff --git a/t/Crud/Subclass.t b/t/Crud/Subclass.t index c54bccf1c..6634ce467 100644 --- a/t/Crud/Subclass.t +++ b/t/Crud/Subclass.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -10,9 +10,7 @@ #------------------------------------------------------------------ # Tests a subclass of WebGUI::Crud -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use Test::More; use WebGUI::Test; # Must use this before any other WebGUI modules use WebGUI::SubClass; @@ -31,12 +29,12 @@ plan tests => 4; # Increment this number for each test you create # Create WebGUI::Crud::Subclass->crud_createTable($session); WebGUI::Test->addToCleanup(sub { WebGUI::Crud::Subclass->crud_dropTable($session); }); -my $record1 = WebGUI::Crud::Subclass->create($session, { field1 => 10 }); +my $record1 = WebGUI::Crud::Subclass->new($session, { field1 => 10 }); isa_ok($record1, "WebGUI::Crud", "isa WebGUI::Crud"); is($record1->get('field1'), 10, "got back correct field1 value"); # bug #10660 (zero should not trigger defaultValue) -is(WebGUI::Crud::Subclass->create($session, { field1 => 0 })->get('field1'), 0, 'zero does not trigger default'); -is(WebGUI::Crud::Subclass->create($session, { field1 => '' })->get('field1'), 5, '..but empty string intentionally triggers default'); +is(WebGUI::Crud::Subclass->new($session, { field1 => 0 })->get('field1'), 0, 'zero does not trigger default'); +is(WebGUI::Crud::Subclass->new($session, { field1 => '' })->get('field1'), '', '..but empty string does not trigger default either'); #vim:ft=perl diff --git a/t/Crud/serialize.t b/t/Crud/serialize.t index 36e2b1121..900addae0 100644 --- a/t/Crud/serialize.t +++ b/t/Crud/serialize.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 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,9 +12,7 @@ # Tests WebGUI::Crud -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use Test::More; use Test::Deep; use JSON; @@ -38,11 +36,13 @@ WebGUI::Test->addToCleanup(sub { WebGUI::Serialize->crud_dropTable($session); }); -my $cereal = WebGUI::Serialize->create($session); +my $cereal = WebGUI::Serialize->new($session); isa_ok($cereal, 'WebGUI::Serialize'); cmp_deeply( $cereal->get, { + _new => 1, + _dirty => 0, someName => 'someName', jsonField => [], dateCreated => ignore(), @@ -101,18 +101,20 @@ cmp_deeply( 'new: deserialized data correctly' ); +use Data::Dumper; my $objData = $cereal->get('jsonField'); $objData->[0]->{fiber} = 0; cmp_deeply( $cereal->get('jsonField'), [ { + fiber => 0, sugarContent => 50, averageNutrition => 3, foodColoring => 15, }, ], - 'get: returns safe references' -); + 'get: returns unsafe references' +) or diag Dumper($cereal->jsonField); #vim:ft=perl diff --git a/t/DatabaseLink.t b/t/DatabaseLink.t index c1986b66d..f128445ce 100644 --- a/t/DatabaseLink.t +++ b/t/DatabaseLink.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/lib"; use WebGUI::Test; use WebGUI::Session; @@ -211,7 +209,7 @@ my $dbLinkParams = { }; $dbLink = WebGUI::DatabaseLink->create($session, $dbLinkParams); -addToCleanup($dbLink); +WebGUI::Test->addToCleanup($dbLink); $dbLinkParams->{databaseLinkId} = ignore(); cmp_deeply( diff --git a/t/DateTime.t b/t/DateTime.t index 3879f832a..a8ec425a1 100644 --- a/t/DateTime.t +++ b/t/DateTime.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/lib"; use WebGUI::Test; use WebGUI::Session; use WebGUI::User; @@ -113,6 +111,6 @@ sub addUser { ##so the test will not fail in the summer $user->profileField("timeZone","America/Hermosillo"); $user->username("Time Zone"); - addToCleanup($user); + WebGUI::Test->addToCleanup($user); return $user; } diff --git a/t/Definition.t b/t/Definition.t new file mode 100644 index 000000000..eafffb98c --- /dev/null +++ b/t/Definition.t @@ -0,0 +1,261 @@ +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 strict; +use warnings; +no warnings qw(uninitialized); + +use WebGUI::Test; + +use Test::More; +#use Test::More tests => 17; +use Test::Deep; +use Test::Exception; + +my $session = WebGUI::Test->session; + +{ + package WGT::Class; + use Moose; + use WebGUI::Definition; + + define 'define1' => 'define1 value'; + property 'property1' => ( + arbitrary_key => 'arbitrary_value', + label => 'property1', + ); + property 'property2' => ( + nother_key => 'nother_value', + label => 'property2', + ); + + # define creates methods + ::can_ok +__PACKAGE__, 'define1'; + + # properties create methods + ::can_ok +__PACKAGE__, 'property1'; + + # role applied + ::can_ok +__PACKAGE__, 'update'; + ::can_ok +__PACKAGE__, 'get'; + ::can_ok +__PACKAGE__, 'set'; + + ::ok +__PACKAGE__->meta->does_role('WebGUI::Definition::Role::Object'), 'meta class check on the package'; + + ::cmp_deeply( + [ +__PACKAGE__->getProperties ], + [qw/property1 property2/], + 'getProperties works as a class method' + ); + +} + +{ + package WGT::Class2; + use Moose; + use WebGUI::Definition; + + define 'define1' => 'define1 value'; + property 'property3' => ( label => 'label' ); + property 'property1' => ( label => 'label' ); + property 'property2' => ( label => 'label' ); + + my @set_order = (); + + before 'property1' => sub { + my $self = shift; + push @set_order, '1'; + }; + + before 'property2' => sub { + my $self = shift; + push @set_order, '2'; + }; + + before 'property3' => sub { + my $self = shift; + push @set_order, '3'; + }; + + my $object = WGT::Class2->new(); + $object->set(property1 => 1, property2 => 0, property3 => 1); + ::cmp_deeply( [ @set_order ], [3,1,2], 'properties set in insertion order'); + + @set_order = (); + $object->set(property2 => 1, property3 => 0, property1 => 1); + ::cmp_deeply( [ @set_order ], [3,1,2], '... and again'); + + ::cmp_deeply( + $object->getFormProperties('property1'), + { label => 'label' }, + 'getFormProperties works for a simple set of properties' + ); + +} + +{ + package WGT::Class3; + use Moose; + use WebGUI::Definition; + + define 'define1' => 'define1 value'; + property 'property1' => ( + label => ['webgui', 'WebGUI'], + hoverHelp => ['webgui help %s', 'WebGUI', 'extra'], + options => \&property1_options, + named_url => \&named_url, + ); + has session => ( + is => 'ro', + required => 1, + ); + sub property1_options { + return { one => 1, two => 2, three => 3 }; + } + + sub named_url { + my ($self, $property, $property_name) = @_; + ::note "Checking arguments passed to subroutine for defining a form property"; + ::isa_ok($self, 'WGT::Class3'); + ::ok($property->can('form'), 'propery has a form method'); + #::ok($property->can('serialize'), 'and a serialize method'); + ::is($property_name, 'named_url', 'form property name sent'); + return $property->name; + } + + my $object = WGT::Class3->new({session => $session}); + + ::cmp_deeply( + $object->getFormProperties('property1'), + { + label => 'WebGUI', + hoverHelp => 'webgui help extra', + options => { one => 1, two => 2, three => 3 }, + named_url => 'property1', + }, + 'getFormProperties handles i18n and subroutines' + ); + + ::cmp_deeply( + __PACKAGE__->getFormProperties($object->session,'property1'), + { + label => 'WebGUI', + hoverHelp => 'webgui help extra', + options => { one => 1, two => 2, three => 3 }, + named_url => 'property1', + }, + 'getFormProperties called as class method', + ); + +} + +{ + package WGT::Class4; + use Moose; + use WebGUI::Definition; + extends 'WGT::Class3'; + + define 'define41' => 'define41 value'; + property 'property41' => ( + label => ['webgui', 'WebGUI'], + ); + has something => ( + is => 'rw', + ); + + my $object3 = WGT::Class3->new({session => $session}); + my $object4 = WGT::Class4->new({session => $session}); + + ::cmp_bag ( + [WGT::Class3->meta->get_all_attributes_list], + [qw/ property1 session /], + 'get_all_attributes_list returns all attributes in all metaclasses for the class' + ); + + ::cmp_bag ( + [WGT::Class4->meta->get_all_attributes_list], + [qw/ property41 something property1 session /], + '... checking inherited class' + ); +} + +{ + package WGT::Class5; + use Moose; + use WebGUI::Definition; + + property 'traitorous' => ( + noFormPost => 1, + traits => ['Array'], + isa => 'ArrayRef', + is => 'ro', + handles => { + pop_traitor => 'pop', + push_traitor => 'push', + }, + default => sub { [] }, + ); + + my $object5 = WGT::Class5->new({session => $session}); + $object5->push_traitor('Boggs'); + ::cmp_deeply($object5->traitorous, ['Boggs'], 'push_traitor handler worked'); + +} + +{ + package WGT::Class6; + use Moose; + use Moose::Util::TypeConstraints; + use WebGUI::Definition; + use JSON; + use WebGUI::Types; + + property 'leaded' => ( + noFormPost => 1, + default => sub { [] }, + traits => ['Array', 'WebGUI::Definition::Meta::Property::Serialize'], + isa => 'WebGUI::Type::JSONArray', + coerce => 1, + ); + + property 'regular' => ( + noFormPost => 1, + default => sub { [] }, + traits => ['Array'], + isa => 'ArrayRef', + ); + + my $object6 = WGT::Class6->new({session => $session}); + my $leaded = $object6->meta->find_attribute_by_name('leaded'); + my $regular = $object6->meta->find_attribute_by_name('regular'); + use Moose::Util; + ::ok Moose::Util::does_role($leaded, 'WebGUI::Definition::Meta::Property::Serialize'), 'does_role detects role'; + ::ok !Moose::Util::does_role($regular, 'WebGUI::Definition::Meta::Property::Serialize'), 'does_role detects lack of role'; + ::ok $leaded->does('WebGUI::Definition::Meta::Property::Serialize'), 'property does role'; + ::ok !$regular->does('WebGUI::Definition::Meta::Property::Serialize'), 'property lacks role'; + + my $object6a = WGT::Class6->new({session => $session, leaded => '[{"a": "alpha"}]', }); + ::cmp_deeply( + $object6a->leaded, + [ { a => "alpha", }, ], + 'coercion from JSON worked on custom subtype' + ); + + my $object6b = WGT::Class6->new({session => $session, leaded => [{"b" => "beta"}], }); + ::cmp_deeply( + $object6b->leaded, + [ { b => "beta", }, ], + 'regular constructor without coercion' + ); + +} + + +done_testing(); diff --git a/t/Definition/Asset.t b/t/Definition/Asset.t new file mode 100644 index 000000000..7d018c1cf --- /dev/null +++ b/t/Definition/Asset.t @@ -0,0 +1,259 @@ +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 strict; +use warnings; +no warnings qw(uninitialized); + + +use Test::More; +use Test::Deep; +use Test::Exception; +use WebGUI::Test; + +{ + package WGT::Class::Atset; + use Moose; + use WebGUI::Definition::Asset; + + define tableName => 'asset'; + ::dies_ok { property 'property1' => (); } 'must have a fieldType'; + ::lives_ok { property 'property1' => (fieldType => 'text'); } 'label will default to name if not passed'; + ::lives_ok { property 'property1' => ( + fieldType => 'YUI Super Form', + noFormPost => '1', + ); + } '... pass noFormPost flag'; + ::lives_ok { property 'property1' => ( + fieldType => 'YUI Super Form', + label => 'JSON Powered Uber Widget', + ); + } '... pass label'; + +} + +{ + package WGT::Class::Asset; + use Moose; + use WebGUI::Definition::Asset; + + define tableName => 'asset'; + property 'property2' => ( + fieldType => 'text', + label => 'property2', + ); + property 'property1' => ( + fieldType => 'text', + label => 'property1', + ); + + my $filter2 = 0; + around 'property2' => sub { + my $orig = shift; + my $self = shift; + $filter2 = 1; + $self->$orig(@_); + }; + + my $written; + sub write { + $written++; + } + + ::is +__PACKAGE__->meta->get_attribute('property1')->tableName, 'asset', 'tableName copied from attribute into property'; + + ::can_ok +__PACKAGE__, 'update'; + ::can_ok +__PACKAGE__, 'tableName'; + ::can_ok +__PACKAGE__, 'get'; + ::can_ok +__PACKAGE__, 'set'; + + my $object = __PACKAGE__->new; + $object->set({property1 => 'property value'}); + ::is $object->property1, 'property value', 'checking set, hashref form'; + + $object->set('property1', 'newer property value'); + ::is $object->property1, 'newer property value', '... hash form'; + + # write called + $object->update; + ::is $written, 1, 'update calls write'; + + $object->property2('foo'); + ::is $filter2, 1, 'around modifier called'; + ::is $object->property2(), 'foo', '...and it works for set/get'; + + $object->update(property2 => 'bar', property1 => 'baz'); + ::is $object->property1(), 'baz', 'update set property1'; + ::is $object->property2(), 'bar', 'and ... property1'; + + ::is $object->tableName, 'asset', 'tableName set for object'; + $object->tableName('not asset'); + ::is $object->tableName, 'asset', 'tableName may not be set from the object'; + $object->meta->tableName('not asset'); + ::is $object->tableName, 'not asset', 'object can access meta and change the table'; + $object->meta->tableName('asset'); + + ::cmp_deeply( + [ $object->meta->get_property_list ], + [qw/property2 property1/], + '->meta->get_property_list returns properties as a list in insertion order' + ); + + ::cmp_deeply( + [$object->getProperties ], + [qw/property2 property1/], + 'getProperties is an alias for ->meta->get_property_list' + ); + + ::cmp_deeply( + [$object->meta->get_tables ], + [qw/asset/], + 'get_tables returns a list of all tables used by this class' + ); + + my $object2 = __PACKAGE__->new(tableName => 'notAsset'); + ::is $object2->tableName, 'asset', 'tableName ignored in constructor'; + + ::cmp_deeply( + [ __PACKAGE__->meta->get_tables ], + [qw/asset/], + 'get_tables works for a simple asset' + ); + +} + +{ + + package WGT::Class::AlsoAsset; + use Moose; + use WebGUI::Definition::Asset; + + define tableName => 'asset'; + property 'property1' => ( + fieldType => 'text', + label => 'property1', + ); + property 'property2' => ( + fieldType => 'text', + label => 'property2', + ); + property 'property3' => ( + fieldType => 'text', + label => 'property3', + ); + + package WGT::Class::Asset::Snippet; + use Moose; + use WebGUI::Definition::Asset; + extends 'WGT::Class::AlsoAsset'; + + define tableName => 'snippet'; + property 'property10' => ( + fieldType => 'text', + label => 'property10', + ); + property 'property11' => ( + fieldType => 'text', + label => 'property11', + ); + + package main; + + is +WGT::Class::AlsoAsset->tableName, 'asset', 'tableName set in base class'; + + is +WGT::Class::Asset::Snippet->meta->find_attribute_by_name('property10')->tableName, 'snippet', 'tableName set in subclass'; + is +WGT::Class::Asset::Snippet->meta->find_attribute_by_name('property1')->tableName, 'asset', '... but inherited properties keep their tableName'; + + cmp_bag( + [ map {$_->name} WGT::Class::AlsoAsset->meta->get_attributes ], + [qw/property1 property2 property3/], + 'get_attributes returns attributes for my class' + ); + + cmp_bag( + [ map {$_->name} WGT::Class::Asset::Snippet->meta->get_attributes ], + [qw/property10 property11/], + '...even in a subclass' + ); + + cmp_deeply( + [ WGT::Class::Asset::Snippet->getProperties ], + [qw/property1 property2 property3 property10 property11/], + 'checking inheritance of properties by name, insertion order' + ); + + ::cmp_deeply( + [ WGT::Class::AlsoAsset->meta->get_tables ], + [qw/asset/], + 'get_tables: checking inheritance' + ); + + ::cmp_deeply( + [ WGT::Class::Asset::Snippet->meta->get_tables ], + [qw/asset snippet/], + 'get_tables: checking inheritance on subclass' + ); + +} + +{ + + package WGT::Class::Asset::NotherOne; + use Moose; + use WebGUI::Definition::Asset; + extends 'WGT::Class::AlsoAsset'; + + define tableName => 'snippet'; + property 'property10' => ( + fieldType => 'text', + label => 'property10', + ); + property 'property1' => ( + fieldType => 'text', + label => 'property1', + ); + + package main; + + cmp_deeply( + [WGT::Class::Asset::NotherOne->getProperties], + [qw/property1 property2 property3 property10/], + 'checking inheritance of properties by name, insertion order with an overridden property' + ); + +} + +{ + + package WGT::Class::Asset::Tertiary; + use Moose; + use WebGUI::Definition::Asset; + extends 'WGT::Class::AlsoAsset'; + + define tableName => 'tertius'; + property 'defaulted' => ( + fieldType => 'text', + label => 'defaulted', + default => 'a sane default', + ); + property 'no_default' => ( + fieldType => 'text', + label => 'noDefault', + ); + + package main; + my $object = WGT::Class::Asset::Tertiary->new; + is $object->defaulted(), 'a sane default', 'setup: checking default'; + is $object->no_default(), undef, '... and one without default'; + + $object->defaulted(undef); + is $object->defaulted(), undef, 'Moose setters accept undef'; +} +done_testing; diff --git a/t/Event.t b/t/Event.t index 2164cdab4..2b171c3d3 100644 --- a/t/Event.t +++ b/t/Event.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/Exception/Shop.t b/t/Exception/Shop.t index 4fb6fe1e4..0646af70d 100644 --- a/t/Exception/Shop.t +++ b/t/Exception/Shop.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use Test::More; use WebGUI::Test; # Must use this before any other WebGUI modules use WebGUI::Session; diff --git a/t/Exception/app.t b/t/Exception/app.t new file mode 100644 index 000000000..cb8519abc --- /dev/null +++ b/t/Exception/app.t @@ -0,0 +1,114 @@ +# Test what happens when the WebGUI PSGI app throws exceptions +use strict; +use WebGUI; +use WebGUI::Test; +use Plack::Test; +use Plack::Builder; +use HTTP::Request::Common; +use Test::More; +use WebGUI::Test::Mechanize; +use HTTP::Exception; + +my $wg = WebGUI->new(config => WebGUI::Test->config); + +my $regular_app = builder { + enable '+WebGUI::Middleware::Session', config => $wg->config; + enable '+WebGUI::Middleware::HTTPExceptions'; + $wg; +}; + +my $generic_dead_app = builder { + enable '+WebGUI::Middleware::HTTPExceptions'; + + # Pretend that WebGUI dies during request handling + sub { die 'WebGUI died' } +}; + +my $specific_dead_app = builder { + enable '+WebGUI::Middleware::HTTPExceptions'; + + # Pretend that WebGUI throws a '501 - Not Implemented' HTTP error + sub { HTTP::Exception->throw(501) }; +}; + +my $fatal_app = builder { + enable '+WebGUI::Middleware::Session', config => $wg->config; + enable '+WebGUI::Middleware::HTTPExceptions'; + + # Pretend that WebGUI calls $session->log->fatal during request handling + sub { + my $env = shift; + + WebGUI::Test->addToCleanup($env->{'webgui.session'}); + $env->{'webgui.session'}->log->fatal('Fatally yours'); + } +}; + +my $not_found_app = builder { + enable '+WebGUI::Middleware::Session', config => $wg->config; + enable '+WebGUI::Middleware::HTTPExceptions'; + + sub { + my $env = shift; + WebGUI::Test->addToCleanup($env->{'webgui.session'}); + HTTP::Exception->throw(404) + }; +}; + +test_psgi $regular_app, sub { + my $cb = shift; + my $res = $cb->( GET "/" ); + is $res->code, 200, 'regular app, status code'; + like $res->content, qr/My Company/, 'testing regular app'; + use Data::Dumper; + my ($sessionId) = $res->header('Set-Cookie') =~ /wgSession=(\w{22})/; + if ($sessionId) { + my $session = WebGUI::Session->open(WebGUI::Test->config, undef, $sessionId); + $session->end; + } +}; + +# N.B. The die() is caught thanks to WebGUI::Middleware::HTTPExceptions, +# but generates a warning to STDOUT - should perhaps be silenced? +test_psgi $generic_dead_app, sub { + my $cb = shift; + my $res = $cb->( GET "/" ); + is $res->code, 500, 'generic dead app, status code'; + is $res->content, 'Internal Server Error', '... status description'; +}; + +test_psgi $specific_dead_app, sub { + my $cb = shift; + my $res = $cb->( GET "/" ); + is $res->code, 501, 'specific dead app, status code'; + is $res->content, 'Not Implemented', '... status description'; # how apt +}; + +test_psgi $not_found_app, sub { + my $cb = shift; + my $res = $cb->( GET "/" ); + is $res->code, 404, 'not found app, status code'; + is $res->content, 'Not Found', '... status description'; # how apt +}; + +test_psgi $fatal_app, sub { + my $cb = shift; + my $res = $cb->( GET "/" ); + is $res->code, 500, 'fatal app, status code'; + + # WebGUI doesn't know who you are, so it displays the generic error page + like $res->content, qr/Fatally yours/, '... status description is $@ stringified from the logged fatal'; +}; + +test_psgi $fatal_app, sub { + my $cb = shift; + + local *WebGUI::Session::Log::canShowDebug = sub {1}; + my $res = $cb->( GET "/" ); + is $res->code, 500, 'generic dead app, debug, status code'; + + # We canShowDebug, so WebGUI gives us more info + like $res->content, qr/Fatally yours/, '... status description'; +}; + +done_testing; diff --git a/t/FilePump/Bundle.t b/t/FilePump/Bundle.t index acecc392c..dc4d58461 100644 --- a/t/FilePump/Bundle.t +++ b/t/FilePump/Bundle.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use Test::More; use Test::Deep; use Test::Exception; @@ -25,7 +23,7 @@ use WebGUI::Test; # Must use this before any other WebGUI modules use WebGUI::Session; my $startTime = time(); -my $wgBday = 997966800; +my $wgBday = WebGUI::Test->webguiBirthday; #---------------------------------------------------------------------------- # Init @@ -34,16 +32,17 @@ my $session = WebGUI::Test->session; #---------------------------------------------------------------------------- # Tests -plan tests => 64; +plan tests => 65; #---------------------------------------------------------------------------- # put your tests here use WebGUI::FilePump::Bundle; -my $bundle = WebGUI::FilePump::Bundle->create($session); +my $bundle = WebGUI::FilePump::Bundle->new($session); isa_ok($bundle, 'WebGUI::FilePump::Bundle'); isa_ok($bundle, 'WebGUI::Crud'); +can_ok($bundle, qw/update write getJSONCollateralDataIndex/); is($bundle->get('lastModified'), 0, 'by default, lastModified is 0'); @@ -256,7 +255,7 @@ cmp_ok($bundle->get('lastModified'), '>=', $startTime, '... updates lastModified # ################################################################### -my $root = WebGUI::Asset->getRoot($session); +my $root = WebGUI::Test->asset; my $snippet = $root->addChild({ className => 'WebGUI::Asset::Snippet', @@ -277,10 +276,6 @@ WebGUI::Test->addToCleanup($storage); $storage->addFileFromScalar('addendum', 'Red was too'); $storage->addFileFromFilesystem(WebGUI::Test->getTestCollateralPath('ShawshankRedemptionMoviePoster.jpg')); -my $snippetTag = WebGUI::VersionTag->getWorking($session); -WebGUI::Test->addToCleanup($snippetTag); -$snippetTag->commit; - my $guts; $guts = $bundle->fetchAsset(URI->new('asset://filePumpSnippet')); cmp_deeply( @@ -446,7 +441,7 @@ ok(!-e $buildDir->stringify, 'delete deletes the current build directory'); my @jsFiles = qw/hoverhelp.js inputcheck.js/; foreach my $jsFile (@jsFiles) { - my $bundle = WebGUI::FilePump::Bundle->create($session); + my $bundle = WebGUI::FilePump::Bundle->new($session); $bundle->addFile('JS', 'file:extras/'.$jsFile); lives_ok { $bundle->build } "built file $jsFile"; $bundle->delete; diff --git a/t/Fork.t b/t/Fork.t index 8e9d51909..fc42e4416 100644 --- a/t/Fork.t +++ b/t/Fork.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -39,7 +39,7 @@ my $request = $process->request( $testClass, 'simple', ['data'] ); cmp_bag( [ keys %$request ], - [qw(webguiRoot configFile sessionId id module subname data)], + [qw(configFile sessionId id module subname data)], 'request hash has the right keys' ); @@ -101,6 +101,8 @@ close $pipe; backgroundTest('On-demand fork'); is $forkCount, 1, 'we did fork'; +ok(WebGUI::Test->waitForAllForks(10), "Forks finished"); + done_testing; #vim:ft=perl diff --git a/t/Form.t b/t/Form.t index 4d0848bbe..6bd196e52 100644 --- a/t/Form.t +++ b/t/Form.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/lib"; use Test::More; use Test::Deep; use WebGUI::Test; diff --git a/t/Form/AssetReportQuery.t b/t/Form/AssetReportQuery.t index b5b2523c7..f09fb100f 100644 --- a/t/Form/AssetReportQuery.t +++ b/t/Form/AssetReportQuery.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Form; diff --git a/t/Form/ButtonGroup.t b/t/Form/ButtonGroup.t new file mode 100644 index 000000000..9f73f94fe --- /dev/null +++ b/t/Form/ButtonGroup.t @@ -0,0 +1,87 @@ +# vim:syntax=perl +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 +#------------------------------------------------------------------ + +# Test the ButtonGroup form element +# +# + +use strict; +use Test::More; +use Test::Deep; +use WebGUI::Test; # Must use this before any other WebGUI modules +use WebGUI::Session; + +#---------------------------------------------------------------------------- +# Init +my $session = WebGUI::Test->session; + + +#---------------------------------------------------------------------------- +# Tests + +#---------------------------------------------------------------------------- +# put your tests here + +use WebGUI::Form::ButtonGroup; +use WebGUI::FormBuilder; + +#---------------------------------------------------------------------------- +# buttons as params + +my $bOne = WebGUI::Form::TestButton->new( $session, { name => "one" } ); +my $bTwo = WebGUI::Form::TestButton->new( $session, { name => "two" } ); +my $bg = WebGUI::Form::ButtonGroup->new( $session, { + buttons => [ $bOne, $bTwo ], +} ); + +cmp_deeply( + $bg->get('buttons'), + [ $bOne, $bTwo ], + "buttons is arrayref of objects", +); + +#---------------------------------------------------------------------------- +# addButton + +my $bThree = $bg->addButton( "TestButton", { name => "three" } ); +isa_ok( $bThree, 'WebGUI::Form::TestButton', 'addButton returns object' ); +is( $bThree->get('name'), "three", 'addButton passes params to constructor' ); +cmp_deeply( + $bg->get('buttons'), + [ $bOne, $bTwo, $bThree ], + "addButton adds button to list", +); + +#---------------------------------------------------------------------------- +# toHtml + +my $html = $bg->toHtml; +like( $html, qr/onetwothree/, 'buttons rendered without extras between or around' ); + +$bg->addButton("TestButton", { name => "four" } ); +like( $bg->toHtml, qr/onetwothreefour/, 'calling addButton twice does not nuke your buttons' ); + +done_testing(); + +#---------------------------------------------------------------------------- +# Test collateral + +package WebGUI::Form::TestButton; +# Fool WebGUI::Pluggable to prevent complaints +BEGIN { $INC{'WebGUI/Form/TestButton.pm'} = __FILE__ } + +use base 'WebGUI::Form::Control'; + +sub toHtml { + return $_[0]->get('name'); +} + +#vim:ft=perl diff --git a/t/Form/CheckList.t b/t/Form/CheckList.t index 5b502ea4a..1c8fe8bdc 100644 --- a/t/Form/CheckList.t +++ b/t/Form/CheckList.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use Tie::IxHash; diff --git a/t/Form/Checkbox.t b/t/Form/Checkbox.t index e2c19d052..fdcf4ba79 100644 --- a/t/Form/Checkbox.t +++ b/t/Form/Checkbox.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Form; diff --git a/t/Form/ClassName.t b/t/Form/ClassName.t index 82c317951..8364a7ad8 100644 --- a/t/Form/ClassName.t +++ b/t/Form/ClassName.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Form; diff --git a/t/Form/CsrfToken.t b/t/Form/CsrfToken.t index 4d67d108a..834998f94 100644 --- a/t/Form/CsrfToken.t +++ b/t/Form/CsrfToken.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Form; diff --git a/t/Form/DataTable.t b/t/Form/DataTable.t index df0bf63ec..6ad43895f 100644 --- a/t/Form/DataTable.t +++ b/t/Form/DataTable.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use Test::More; use Test::Deep; use JSON; diff --git a/t/Form/Date.t b/t/Form/Date.t index 41225ac60..1c6c6faf2 100644 --- a/t/Form/Date.t +++ b/t/Form/Date.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Form; diff --git a/t/Form/DateTime.t b/t/Form/DateTime.t index ad06395d4..751441107 100644 --- a/t/Form/DateTime.t +++ b/t/Form/DateTime.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Form; diff --git a/t/Form/Div.t b/t/Form/Div.t index a31f2249b..e6e9d9703 100644 --- a/t/Form/Div.t +++ b/t/Form/Div.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Form; diff --git a/t/Form/DynamicField.t b/t/Form/DynamicField.t index bb772f8c4..2f7fa2f1a 100644 --- a/t/Form/DynamicField.t +++ b/t/Form/DynamicField.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Form; diff --git a/t/Form/Email.t b/t/Form/Email.t index 0775bb715..6a1b2428b 100644 --- a/t/Form/Email.t +++ b/t/Form/Email.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Form; diff --git a/t/Form/Float.t b/t/Form/Float.t index b6db2dcfb..7596e90bf 100644 --- a/t/Form/Float.t +++ b/t/Form/Float.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Form; diff --git a/t/Form/GetName.t b/t/Form/GetName.t index 03035b14c..2c00e00a9 100644 --- a/t/Form/GetName.t +++ b/t/Form/GetName.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Form::FieldType; diff --git a/t/Form/Group.t b/t/Form/Group.t index f527edd4e..0e48eaead 100644 --- a/t/Form/Group.t +++ b/t/Form/Group.t @@ -1,5 +1,5 @@ -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/Form/Hidden.t b/t/Form/Hidden.t index 7675cabd2..f70a1d1ad 100644 --- a/t/Form/Hidden.t +++ b/t/Form/Hidden.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Form; diff --git a/t/Form/Integer.t b/t/Form/Integer.t index f563c7403..05f8ea2a0 100644 --- a/t/Form/Integer.t +++ b/t/Form/Integer.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Form; diff --git a/t/Form/ListEquiv.t b/t/Form/ListEquiv.t index 1713e8a6c..e0bcfc3fb 100644 --- a/t/Form/ListEquiv.t +++ b/t/Form/ListEquiv.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Form::DynamicField; diff --git a/t/Form/Password.t b/t/Form/Password.t index 298770d6b..292ff683c 100644 --- a/t/Form/Password.t +++ b/t/Form/Password.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Form; diff --git a/t/Form/Phone.t b/t/Form/Phone.t index cc118f8a9..955ca0de1 100644 --- a/t/Form/Phone.t +++ b/t/Form/Phone.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Form; diff --git a/t/Form/ProfileEnabled.t b/t/Form/ProfileEnabled.t index e21a0c757..15b993fba 100644 --- a/t/Form/ProfileEnabled.t +++ b/t/Form/ProfileEnabled.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,15 +8,12 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Form::FieldType; use WebGUI::Form::DynamicField; use WebGUI::Session; -use WebGUI::Utility; #The goal of this test is to verify that the isDynamicCompatible setting #works on all form elements and that only the correct forms are profile @@ -45,7 +42,7 @@ my @notEnabled = qw/Button Control List MimeType SubscriptionGroup Slider Submit foreach my $formType (@formTypes) { my $form = WebGUI::Form::DynamicField->new($session, fieldType => $formType); my $ref = (split /::/, ref $form)[-1]; - if (isIn($ref, @notEnabled)) { + if ($ref ~~ @notEnabled) { ok(!$form->isDynamicCompatible, " $ref should not be profile enabled"); } else { diff --git a/t/Form/Radio.t b/t/Form/Radio.t index 22e80b8f0..50fbf0a3a 100644 --- a/t/Form/Radio.t +++ b/t/Form/Radio.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Form; diff --git a/t/Form/SelectBox.t b/t/Form/SelectBox.t index 573c1b97a..8bf8522cf 100644 --- a/t/Form/SelectBox.t +++ b/t/Form/SelectBox.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Form; diff --git a/t/Form/SelectList.t b/t/Form/SelectList.t index 1303cfacc..ee8d8560c 100644 --- a/t/Form/SelectList.t +++ b/t/Form/SelectList.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Form; diff --git a/t/Form/SelectRichEditor.t b/t/Form/SelectRichEditor.t index d9f4e808d..990e521e1 100644 --- a/t/Form/SelectRichEditor.t +++ b/t/Form/SelectRichEditor.t @@ -1,6 +1,6 @@ # $vim: syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -9,9 +9,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; ## The goal of this test is to test the SelectRichEditor form control diff --git a/t/Form/Template.t b/t/Form/Template.t index a5729ff98..27c99bdf0 100644 --- a/t/Form/Template.t +++ b/t/Form/Template.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Form::Template; diff --git a/t/Form/Text.t b/t/Form/Text.t index 7b4830654..5f322aa58 100644 --- a/t/Form/Text.t +++ b/t/Form/Text.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Form; diff --git a/t/Form/Textarea.t b/t/Form/Textarea.t index 8f4009e69..7bafb56e4 100644 --- a/t/Form/Textarea.t +++ b/t/Form/Textarea.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Form; diff --git a/t/Form/TimeField.t b/t/Form/TimeField.t index 11c25f84d..b1d5380ea 100644 --- a/t/Form/TimeField.t +++ b/t/Form/TimeField.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/Form/TimeZone.t b/t/Form/TimeZone.t index 470ea2b2b..9aee34147 100644 --- a/t/Form/TimeZone.t +++ b/t/Form/TimeZone.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Form::TimeZone; diff --git a/t/Form/Url.t b/t/Form/Url.t index fc3319406..02c0a3e11 100644 --- a/t/Form/Url.t +++ b/t/Form/Url.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Form; diff --git a/t/Form/User.t b/t/Form/User.t index f321ae722..cc25eca44 100644 --- a/t/Form/User.t +++ b/t/Form/User.t @@ -1,5 +1,5 @@ -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/Form/Workflow.t b/t/Form/Workflow.t index f61a5b17f..cd1329b2c 100644 --- a/t/Form/Workflow.t +++ b/t/Form/Workflow.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/Form/Zipcode.t b/t/Form/Zipcode.t index 028b2f53a..ead41de70 100644 --- a/t/Form/Zipcode.t +++ b/t/Form/Zipcode.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Form; diff --git a/t/FormBuilder.t b/t/FormBuilder.t new file mode 100644 index 000000000..b7a79b7af --- /dev/null +++ b/t/FormBuilder.t @@ -0,0 +1,397 @@ +# vim:syntax=perl +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 +#------------------------------------------------------------------ + +# Write a little about what this script tests. +# +# + +use warnings; +use strict; +use Test::More; +use Test::Deep; +use WebGUI::Test; # Must use this before any other WebGUI modules +use WebGUI::Session; +use WebGUI::BestPractices; + +use Carp; +$SIG{ __DIE__ } = sub { Carp::confess( @_ ) }; + +#---------------------------------------------------------------------------- +# Init +my $session = WebGUI::Test->session; + + +#---------------------------------------------------------------------------- +# Tests + +#---------------------------------------------------------------------------- +# Constructor and properties +use_ok( 'WebGUI::FormBuilder' ); + +my $fb = WebGUI::FormBuilder->new( $session ); +isa_ok( $fb, 'WebGUI::FormBuilder' ); +is( $fb->method, 'POST', 'method default' ); +ok( !$fb->action, 'action default' ); +is( $fb->enctype, 'multipart/form-data', 'enctype default' ); +ok( !$fb->name, 'name default' ); + +$fb = WebGUI::FormBuilder->new( $session, + action => '/myurl', + enctype => 'application/x-www-form-urlencoded', + name => 'search', + method => 'get', + extras => q{onclick="alert('hi');"}, +); +isa_ok( $fb, 'WebGUI::FormBuilder' ); +is( $fb->method, 'get' ); +is( $fb->action, '/myurl' ); +is( $fb->enctype, 'application/x-www-form-urlencoded' ); +is( $fb->name, 'search' ); +is( $fb->extras, q{onclick="alert('hi');"} ); + +# Test mutators +is( $fb->method("POST"), "POST" ); +is( $fb->method, "POST" ); +is( $fb->action('/otherurl'), '/otherurl' ); +is( $fb->action, '/otherurl' ); +is( $fb->enctype('multipart/form-data'), 'multipart/form-data' ); +is( $fb->enctype, 'multipart/form-data' ); +is( $fb->name('myname'), 'myname' ); +is( $fb->name, 'myname' ); +is( $fb->extras(""), "" ); +is( $fb->extras, "" ); + +# getHeader +like( $fb->getHeader, qr{ method="POST"} ); +like( $fb->getHeader, qr{ action="/otherurl"} ); +like( $fb->getHeader, qr{ enctype="multipart/form-data"} ); +like( $fb->getHeader, qr{ name="myname"} ); + +$fb->extras(q{onclick="alert()"}); +like( $fb->getHeader, qr{ onclick="alert\(\)"} ); + +#---------------------------------------------------------------------------- +# Adding objects +# -- This tests the HasTabs, HasFieldsets, and HasFields roles + +# addTab with properties +my $tab = $fb->addTab( name => "mytab", label => "My Tab" ); +isa_ok( $tab, 'WebGUI::FormBuilder::Tab' ); +is( $fb->getTab('mytab'), $tab, 'getTab returns exact object' ); +is( $fb->tabsets, $fb->tabsets, 'tabsets always returns same arrayref' ); +cmp_deeply( + $fb->tabsets, + [ $fb->getTabset( "default" ) ], + 'tabsets', +); +cmp_deeply( + $fb->tabsets->[0]->tabs, + [ $tab ], + 'tabs', +); + +# addTab with objects +my $field = $tab->addField( + 'WebGUI::Form::Text' => ( + name => 'search', + value => "Search Now", + ) +); +my $fset = $tab->addFieldset( + name => 'advanced', + label => 'Advanced Search', +); +my $subtab = $tab->addTab( + name => 'more', + label => 'More', +); + +my $newTab = $fb->addTab( $tab, name => 'newname' ); +isa_ok( $newTab, 'WebGUI::FormBuilder::Tab' ); +isnt( $newTab, $tab, 'addTab creates a new object from the properties' ); +is( $newTab->name, 'newname', 'addTab allows property overrides' ); +is( $newTab->label, 'My Tab', 'label was not overridden' ); +ok( $newTab->fields->[0], 'field exists' ); +is( $newTab->fields->[0]->get('name'), 'search', 'field has same name' ); +ok( $newTab->fieldsets->[0], 'fieldset exists' ); +is( $newTab->fieldsets->[0]->name, 'advanced', 'fieldset has same name' ); +ok( $newTab->tabsets->[0], 'subtabset exists' ); +is( $newTab->tabsets->[0]->name, 'default', 'subtabset has correct name' ); +ok( $newTab->tabsets->[0]->tabs->[0], 'subtab exists' ); +is( $newTab->tabsets->[0]->tabs->[0]->name, 'more', 'subtab has correct name' ); + +cmp_deeply( + $fb->tabsets->[0]->tabs, + [ $tab, $newTab ], + 'added tab', +); +is( $fb->getTab('newname'), $newTab, 'new tab can be gotten' ); + +# deleteTab +my $deletedTab = $fb->deleteTab( 'newname' ); +is( $deletedTab, $newTab, 'deleteTab returns object' ); +cmp_deeply( + $fb->tabsets->[0]->tabs, + [ $tab ], + 'deleted tab', +); +ok( !$fb->getTab('newname'), 'deleted tab cannot be gotten' ); + +# addFieldset with properties +$fb = WebGUI::FormBuilder->new( $session ); +$fset = $fb->addFieldset( + name => 'advanced', + label => 'Advanced Search', +); +is( $fb->getFieldset('advanced'), $fset, 'getFieldset returns exact object' ); +is( $fb->fieldsets, $fb->fieldsets, 'fieldsets always returns same arrayref' ); +cmp_deeply( + $fb->fieldsets, + [ $fset ], + 'fieldsets', +); + +# addFieldset with objects +$field = $fset->addField( + 'WebGUI::Form::Text' => ( + name => 'search', + value => "Search Now", + ) +); +my $subfset = $fset->addFieldset( + name => 'advanced', + label => 'Advanced Search', +); +$tab = $fset->addTab( + name => 'more', + label => 'More', +); + +my $newFset = $fb->addFieldset( $fset, name => 'newname' ); +isa_ok( $newFset, 'WebGUI::FormBuilder::Fieldset' ); +isnt( $newFset, $fset, 'addFieldset creates a new object from the properties' ); +is( $newFset->name, 'newname', 'addFieldset allows property overrides' ); +is( $newFset->label, 'Advanced Search', 'label was not overridden' ); +ok( $newFset->fields->[0], 'field exists' ); +is( $newFset->fields->[0]->get('name'), 'search', 'field has same name' ); +ok( $newFset->fieldsets->[0], 'subfieldset exists' ); +is( $newFset->fieldsets->[0]->name, 'advanced', 'subfieldset has same name' ); +ok( $newFset->tabsets->[0]->tabs->[0], 'tab exists' ); +is( $newFset->tabsets->[0]->tabs->[0]->name, 'more', 'tab has same name' ); +cmp_deeply( + $fb->fieldsets, + [ $fset, $newFset], + 'added fieldset', +); +is( $fb->getFieldset('newname'), $newFset, 'new fieldset can be gotten' ); + +# deletefieldset +my $deletedFieldset = $fb->deleteFieldset( 'newname' ); +is( $deletedFieldset, $newFset, 'deletefieldset returns object' ); +cmp_deeply( + $fb->fieldsets, + [ $fset ], + 'deleted fieldset', +); +ok( !$fb->getFieldset('newname'), 'deleted fieldset cannot be gotten' ); + +# addField with properties +$fb = WebGUI::FormBuilder->new( $session ); +$field = $fb->addField( + 'Text' => ( + name => 'search', + value => 'Search Now', + ) +); + +isa_ok( $field, 'WebGUI::Form::Text' ); +is( $fb->getField('search'), $field, 'getField returns exact object' ); +is( $fb->fields, $fb->fields, 'fields always returns same arrayref' ); +cmp_deeply( + $fb->fields, + [ $field ], + 'fields', +); + +# addField with object +my $field2 = $fb->addField( + WebGUI::Form::Text->new( $session, { + name => 'type', + label => "Asset Type", + } ) +); +isa_ok( $field2, 'WebGUI::Form::Text' ); +is( $fb->getField('type'), $field2, 'getField returns exact object' ); +cmp_deeply( + $fb->fields, + [ $field, $field2 ], + 'fields 2', +); + +# deleteField +my $field3 = $fb->deleteField( 'type' ); +is( $field3, $field2, 'deleteField returns same field' ); +ok( !$fb->getField('type'), 'field is deleted' ); +cmp_deeply( + $fb->fields, + [ $field ], + 'field is deleted from fields', +); + +# addFieldAt +$fb = WebGUI::FormBuilder->new( $session ); +$field = $fb->addField( 'Text', name => "zero" ); + +$tab = $fb->addTab( tabset => 'one', name => 'one' ); +$fset = $fb->addFieldset( name => 'three', label => 'Three' ); +$field2 = $fb->addFieldAt( WebGUI::Form::Text->new( $session, name => "two" ), 2 ); + +cmp_deeply( + $fb->objects, + [ $field, $fb->getTabset('one'), $field2, $fset ], + 'objects array is correct', +); +cmp_deeply( + $fb->fields, + [ $field, $field2 ], + 'fields array is correct', +); + +#---------------------------------------------------------------------------- +# Serialize and deserialize + +$fb = WebGUI::FormBuilder->new( $session ); +$fset = $fb->addFieldset( name => 'search', label => 'Search' ); +$fset->addField( 'text', name => 'keywords', label => 'Keywords' ); +$tab = $fb->addTab( name => 'advanced', label => 'Advanced Search' ); +$tab->addField( 'text', name => 'type', label => 'Type' ); +$fb->addField( 'submit', name => 'submit', label => 'Submit' ); + + +#---------------------------------------------------------------------------- +# toTemplateVars + +$fb = WebGUI::FormBuilder->new( $session ); +$field = $fb->addField( 'Text', name => 'field1' ); +my $fieldset = $fb->addFieldset( name => 'two', label => 'Two' ); +my $fieldsetField = $fieldset->addField( 'Text', name => 'two one' ); +$tab = $fb->addTab( name => 'three 1', label => 'Three 1' ); +$tab->addField( 'Text', name => 'three 1 1' ); +my $tab2 = $fb->addTab( name => 'three 2', label => 'Three 2' ); +$tab2->addField( 'Checkbox', name => 'three 2 1' ); +$tab2->addField( 'Checkbox', name => 'three 2 1' ); +$field2 = $fb->addField( 'Submit', name => 'submit' ); +$field3 = $fb->addField( 'Button', name => 'cancel' ); + +my $expected_var = { + header => $fb->getHeader, + footer => $fb->getFooter, + %{ object_vars( $fb ) }, +}; + +# Add the prefix +$expected_var = { map { ("fb_$_" => delete $expected_var->{$_}) } keys %$expected_var }; + +cmp_deeply( + $fb->toTemplateVars('fb_'), + $expected_var, + 'toTemplateVars complete and correct' +); + +done_testing; + +sub field_vars { + my $field = shift; + my $var = { + field => $field->toHtmlWithWrapper, + field_input => $field->toHtml, + %{$field->toTemplateVars}, # not testing field's toTemplateVars method + }; + return $var; +} + +sub fieldset_vars { + my $fieldset = shift; + return { + name => $fieldset->name, + label => $fieldset->label, + legend => $fieldset->legend, + isFieldset => 1, + %{object_vars( $fieldset )}, + }; +} + +sub tabset_vars { + my $tabset = shift; + my $var = { + name => $tabset->name, + isTabset => 1, + tabs => [ map { { %{object_vars( $_ )}, name => $_->name, label => $_->label } } @{$tabset->tabs} ], + }; + for my $tab ( @{ $var->{tabs} } ) { + my $name = $tab->{name}; + $var->{ "tabs_${name}" } = ignore(); # Ignore html for tabs, just as long as it's there + for my $key ( keys %$tab ) { + $var->{ "tabs_${name}_${key}" } = $tab->{ $key }; + } + } + return $var; +} + +sub object_vars { + my $f = shift; + my $var = {}; + + # Stream of objects + for my $obj ( @{$f->objects} ) { + use Scalar::Util qw(blessed); + given ( blessed $obj ) { + when ( undef ) { + push @{$var->{objects}}, $obj; + } + when ( $_->isa( 'WebGUI::FormBuilder::Tabset' ) ) { + my $props = tabset_vars( $obj ); + my $name = $props->{name}; + for my $key ( keys %$props ) { + $var->{ "tabset_${name}_${key}" } = $props->{$key}; + } + push @{ $var->{tabsetloop} }, $props; + push @{$var->{objects}}, $props; + } + when ( $_->isa( 'WebGUI::FormBuilder::Fieldset' ) ) { + my $props = fieldset_vars( $obj ); + my $name = $props->{name}; + for my $key ( keys %$props ) { + $var->{ "fieldset_${name}_${key}" } = $props->{$key}; + } + push @{ $var->{fieldsetloop} }, $props; + push @{$var->{objects}}, $props; + } + when ( $_->isa( 'WebGUI::Form::Control' ) ) { + my $props = field_vars( $obj ); + my $name = $props->{name}; + for my $key ( keys %$props ) { + $var->{ "field_${name}_${key}" } = $props->{$key}; + } + push @{$var->{ "field_${name}_loop" }}, $props; + push @{ $var->{fieldloop} }, $props; + $var->{ "field_${name}" } = $props->{field}; + push @{$var->{objects}}, $props; + } + } + } + + return $var; +} + +#vim:ft=perl + + diff --git a/t/FormBuilder/Tab.t b/t/FormBuilder/Tab.t new file mode 100644 index 000000000..9f5aa14bc --- /dev/null +++ b/t/FormBuilder/Tab.t @@ -0,0 +1,46 @@ +# vim:syntax=perl +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 +#------------------------------------------------------------------ + +# Test the tab object +# +# + +use strict; +use Test::More; +use WebGUI::Test; # Must use this before any other WebGUI modules +use WebGUI::Session; + +#---------------------------------------------------------------------------- +# Init +my $session = WebGUI::Test->session; + + +#---------------------------------------------------------------------------- +# Tests + +plan tests => 8; # Increment this number for each test you create + +#---------------------------------------------------------------------------- +# Creation, accessors and mutators +use_ok( 'WebGUI::FormBuilder::Tab' ); +my $tab = WebGUI::FormBuilder::Tab->new( $session, name => 'no name', ); +isa_ok( $tab, 'WebGUI::FormBuilder::Tab' ); + +ok( !$tab->label, 'no default' ); +is( $tab->session, $session ); + +$tab = WebGUI::FormBuilder::Tab->new( $session, name => "myname", label => 'My Label' ); +is( $tab->name, 'myname' ); +is( $tab->label, 'My Label' ); +is( $tab->label('New Label'), 'New Label' ); +is( $tab->label, 'New Label' ); + +#vim:ft=perl diff --git a/t/Group.t b/t/Group.t index 2226e2fb6..14cdae498 100644 --- a/t/Group.t +++ b/t/Group.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,17 +8,13 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/lib"; use WebGUI::Test; use WebGUI::Session; -use WebGUI::Utility; use WebGUI::User; use WebGUI::Group; -use WebGUI::Cache; use Test::More; use Test::Deep; @@ -76,9 +72,8 @@ my @ipTests = ( my $session = WebGUI::Test->session; -my $testCache = WebGUI::Cache->new($session, 'myTestKey'); -$testCache->flush; -WebGUI::Test->addToCleanup(sub { $testCache->flush; }); +$session->cache->remove('myTestKey'); +WebGUI::Test->addToCleanup(sub { $session->cache->remove('myTestKey'); }); foreach my $gid ('new', '') { my $g = WebGUI::Group->new($session, $gid); @@ -416,13 +411,12 @@ is( $session->stow->get('isInGroup'), undef, 'setting dbQuery clears cached isIn is( $mob[0]->isInGroup($gY->getId), 1, 'mob[0] is in group Y after setting dbQuery'); is( $mob[0]->isInGroup($gZ->getId), 1, 'mob[0] isInGroup Z'); -ok( isIn($mob[0]->userId, @{ $gY->getAllUsers() }), 'mob[0] in list of group Y users'); -ok( !isIn($mob[0]->userId, @{ $gZ->getUsers() }), 'mob[0] not in list of group Z users'); +ok( $mob[0]->userId ~~ $gY->getAllUsers, 'mob[0] in list of group Y users'); +ok( ! ($mob[0]->userId ~~ $gZ->getUsers), 'mob[0] not in list of group Z users'); -ok( isIn($mob[0]->userId, @{ $gZ->getAllUsers() }), 'mob[0] in list of group Z users, recursively'); +ok( $mob[0]->userId ~~ $gZ->getAllUsers, 'mob[0] in list of group Z users, recursively'); -WebGUI::Cache->new($session, $gY->getId)->delete(); ##Delete cached key for testing -$session->stow->delete("isInGroup"); +$gY->clearCaches; my @mobIds = map { $_->userId } @mob; @@ -435,8 +429,7 @@ cmp_bag( $session->db->write('delete from myUserTable where userId=?',[$mob[0]->getId]); my $inDb = $session->db->quickScalar("select count(*) from myUserTable where userId=?",[$mob[0]->getId]); ok ( !$inDb, 'mob[0] no longer in myUserTable'); -WebGUI::Cache->new($session, ["groupMembers",$gY->getId])->delete; #Delete cache so we get a good test -$session->stow->delete("isInGroup"); #Delete stow so we get a good test +$session->cache->remove("isInGroup"); #Delete stow so we get a good test is_deeply( [ (map { $gY->hasDatabaseUser($_->getId) } @mob) ], @@ -541,7 +534,7 @@ my @sessionBank = (); foreach my $idx (0..$#scratchTests) { ##Create a new session - $sessionBank[$idx] = WebGUI::Session->open(WebGUI::Test->root, WebGUI::Test->file); + $sessionBank[$idx] = WebGUI::Session->open(WebGUI::Test->file); ##Create a new user and make this session's default user that user $itchies[$idx] = WebGUI::User->new($sessionBank[$idx], "new"); @@ -568,8 +561,7 @@ foreach my $scratchTest (@scratchTests) { is($scratchTest->{user}->isInGroup($gS->getId), $scratchTest->{expect}, $scratchTest->{comment}); } -WebGUI::Cache->new($session, $gS->getId)->delete(); ##Delete cached key for testing -$session->stow->delete("isInGroup"); +$session->cache->remove("isInGroup"); #hasScratchUser test foreach my $idx (0..$#scratchTests) { @@ -622,12 +614,13 @@ cmp_bag( my @tcps = (); foreach my $idx (0..$#ipTests) { - ##Set the ip to be used by the session for this user my $ip = $ipTests[$idx]->{ip}; - $ENV{REMOTE_ADDR} = $ip; ##Create a new session - $sessionBank[$idx] = WebGUI::Session->open(WebGUI::Test->root, WebGUI::Test->file); + $sessionBank[$idx] = WebGUI::Test->newSession; + + ##Set the ip to be used by the session for this user + $sessionBank[$idx]->request->env->{REMOTE_ADDR} = $ip; ##Create a new user and make this session's default user that user $tcps[$idx] = WebGUI::User->new($sessionBank[$idx], "new"); @@ -641,7 +634,6 @@ foreach my $idx (0..$#ipTests) { $ipTests[$idx]->{session} = $sessionBank[$idx]; } WebGUI::Test->addToCleanup(@tcps); -WebGUI::Test->addToCleanup(@sessionBank); my $gI = WebGUI::Group->new($session, "new"); WebGUI::Test->addToCleanup($gI); @@ -674,8 +666,8 @@ foreach my $ipTest (@ipTests) { note "Checking for user Visitor session leak via IP address"; - $ENV{REMOTE_ADDR} = '191.168.1.1'; my $remoteSession = WebGUI::Test->newSession; + $remoteSession->request->env->{REMOTE_ADDR} = '191.168.1.1'; $remoteSession->user({userId => 1}); my $localIpGroup = WebGUI::Group->new($session, 'new'); @@ -684,8 +676,8 @@ foreach my $ipTest (@ipTests) { ok !$remoteSession->user->isInGroup($localIpGroup->getId), 'Remote Visitor fails to be in the group'; - $ENV{REMOTE_ADDR} = '192.168.33.1'; my $localSession = WebGUI::Test->newSession; + $localSession->request->env->{REMOTE_ADDR} = '192.168.33.1'; WebGUI::Test->addToCleanup($localIpGroup, $remoteSession, $localSession); $localSession->user({userId => 1}); $localIpGroup->clearCaches; diff --git a/t/Group/group_scratch.t b/t/Group/group_scratch.t index 3005b64b9..900f5c281 100644 --- a/t/Group/group_scratch.t +++ b/t/Group/group_scratch.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -21,7 +21,7 @@ use WebGUI::Group; #---------------------------------------------------------------------------- # Init my $session1 = WebGUI::Test->session; -my $session2 = WebGUI::Session->open(WebGUI::Test::root, WebGUI::Test::file); +my $session2 = WebGUI::Test->newSession; #---------------------------------------------------------------------------- # Tests diff --git a/t/Group/ldap_groups.t b/t/Group/ldap_groups.t index 742b2d35e..998fe4cb8 100644 --- a/t/Group/ldap_groups.t +++ b/t/Group/ldap_groups.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/Group/resetGroupFields.t b/t/Group/resetGroupFields.t index 86227a08d..97638afe0 100644 --- a/t/Group/resetGroupFields.t +++ b/t/Group/resetGroupFields.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; @@ -33,7 +31,7 @@ WebGUI::Test->addToCleanup($settingGroup); my $activityGroup = WebGUI::Group->new($session, 'new'); WebGUI::Test->addToCleanup($activityGroup); -my $home = WebGUI::Asset->getDefault($session); +my $home = WebGUI::Test->asset; my $snippet1 = $home->addChild({ className => 'WebGUI::Asset::Snippet', @@ -91,7 +89,6 @@ my $workflow = WebGUI::Workflow->create($session, ); WebGUI::Test->addToCleanup($workflow); -WebGUI::Test->originalConfig('workflowActivities'); $session->config->addToArray('workflowActivities/User', 'WebGUI::Workflow::Activity::AddUserToGroup'); my $userActivity = $workflow->addActivity('WebGUI::Workflow::Activity::AddUserToGroup'); @@ -107,7 +104,7 @@ is($userActivity->get('groupId'), $activityGroup->getId, 'group in Workflow Acti $assetGroup->delete; -my $newSnippet1 = WebGUI::Asset->newByDynamicClass($session, $snippet1->getId); +my $newSnippet1 = WebGUI::Asset->newById($session, $snippet1->getId); cmp_deeply( $newSnippet1->get, @@ -118,7 +115,7 @@ cmp_deeply( 'groupIdEdit updated on test snippet' ); -my $newSnippet2 = WebGUI::Asset->newByDynamicClass($session, $snippet2->getId); +my $newSnippet2 = WebGUI::Asset->newById($session, $snippet2->getId); cmp_deeply( $newSnippet2->get, @@ -129,7 +126,7 @@ cmp_deeply( 'other snippet not touched' ); -my $newSnippet3 = WebGUI::Asset->newByDynamicClass($session, $snippet3->getId); +my $newSnippet3 = WebGUI::Asset->newById($session, $snippet3->getId); cmp_deeply( $newSnippet3->get, @@ -140,7 +137,7 @@ cmp_deeply( 'multiple fields updated' ); -my $newGallery1 = WebGUI::Asset->newByDynamicClass($session, $gallery1->getId); +my $newGallery1 = WebGUI::Asset->newById($session, $gallery1->getId); cmp_deeply( $newGallery1->get, @@ -177,4 +174,3 @@ $activityGroup->delete; my $userActivity2 = WebGUI::Workflow::Activity->new($session, $userActivity->getId); is ($userActivity2->get('groupId'), 3, 'group in Workflow Activity set to Admin'); -WebGUI::Test->addToCleanup(WebGUI::VersionTag->getWorking($session)); diff --git a/t/HTML.t b/t/HTML.t index bff61c4eb..227edaec9 100644 --- a/t/HTML.t +++ b/t/HTML.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/lib"; use WebGUI::Test; use WebGUI::HTML; diff --git a/t/Macro/AdminBar.t b/t/HTML/addToRow.t similarity index 53% rename from t/Macro/AdminBar.t rename to t/HTML/addToRow.t index 9f82f421f..10f66deb3 100644 --- a/t/Macro/AdminBar.t +++ b/t/HTML/addToRow.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,25 +8,28 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; +use WebGUI::HTML; use WebGUI::Session; -use WebGUI::Macro::AdminBar; -use HTML::TokeParser; -use Test::More; # increment this value for each test you create +use Test::More; +use Test::Deep; +use Data::Dumper; my $session = WebGUI::Test->session; -plan tests => 2; +plan tests => 3; -my $output; -$output = WebGUI::Macro::AdminBar::process($session); -is($output, undef, 'AdminBar returns undef unless admin is on'); -$session->var->switchAdminOn; -$output = WebGUI::Macro::AdminBar::process($session); -ok($output, 'AdminBar returns something when admin is on'); +is WebGUI::HTML::arrayToRow(1), + '<tr><td>1</td></tr>', + 'addToRow: 1 element'; +is WebGUI::HTML::arrayToRow(1,2), + '<tr><td>1</td><td>2</td></tr>', + '... 2 elements'; + +is WebGUI::HTML::arrayToRow(), + '<tr><td></td></tr>', + '... 0 elements'; diff --git a/t/HTML/splitSeparator.t b/t/HTML/splitSeparator.t index c0ae59cc1..78b676176 100644 --- a/t/HTML/splitSeparator.t +++ b/t/HTML/splitSeparator.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::HTML; diff --git a/t/HTML/splitTag.t b/t/HTML/splitTag.t index 9bd2aec21..3b3f64951 100644 --- a/t/HTML/splitTag.t +++ b/t/HTML/splitTag.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::HTML; diff --git a/t/Help/compiled.t b/t/Help/compiled.t index d30f617bd..5f099184f 100644 --- a/t/Help/compiled.t +++ b/t/Help/compiled.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,12 +8,11 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; +use WebGUI::Pluggable; use WebGUI::Operation::Help; use Test::More; use Test::Exception; @@ -27,22 +26,23 @@ my $numTests = 0; my $session = WebGUI::Test->session; -my @helpFileSet = WebGUI::Operation::Help::_getHelpFilesList($session); +my @helpFileSet = WebGUI::Pluggable::findAndLoad('WebGUI::Help'); $numTests = scalar @helpFileSet; #One for each help compile plan tests => $numTests + 2; -foreach my $helpSet (@helpFileSet) { - my $helpName = $helpSet->[1]; - my $help = WebGUI::Operation::Help::_load($session, $helpName); - ok(keys %{ $help }, "$helpName compiled"); +foreach my $helpFile (@helpFileSet) { + my ($namespace) = $helpFile =~ m{WebGUI::Help::(.+$)}; + my $help = WebGUI::Operation::Help::_load($session, $namespace); + ok(keys %{ $help }, "$namespace compiled"); } #---------------------------------------------------------------------------- # Test invalid help files -WebGUI::Test->interceptLogging; -lives_ok { WebGUI::Operation::Help::_load( $session, '::HI::' ) } "invalid help module doesnt die"; -like( $WebGUI::Test::logger_error, qr/^Help failed to compile/, 'invalid help module errored' ); +WebGUI::Test->interceptLogging( sub { + my $log_data = shift; + lives_ok { WebGUI::Operation::Help::_load( $session, '::HI::' ) } "invalid help module doesnt die"; + like( $log_data->{error}, qr/^Help failed to compile/, 'invalid help module errored' ); +}); -WebGUI::Test->restoreLogging; diff --git a/t/Help/isa.t b/t/Help/isa.t index 276cf62d0..f4efad76c 100644 --- a/t/Help/isa.t +++ b/t/Help/isa.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; @@ -30,10 +28,8 @@ my $session = WebGUI::Test->session; plan tests => 4; -installCollateral(); -WebGUI::Test->addToCleanup(sub { - unlink File::Spec->catfile(WebGUI::Test->lib, qw/WebGUI Help HelpTest.pm/); -}); +local @INC = @INC; +unshift @INC, File::Spec->catdir( WebGUI::Test->getTestCollateralPath, 'Help-isa', 'lib' ); my $allHelp = WebGUI::Operation::Help::_load($session, 'HelpTest'); @@ -169,11 +165,4 @@ cmp_deeply( 'isa imports variables with nested loops' ); -sub installCollateral { - copy( - File::Spec->catfile( WebGUI::Test->getTestCollateralPath, qw/Help HelpTest.pm/), - File::Spec->catfile( WebGUI::Test->lib, qw/WebGUI Help/) - ); -} - #vim:ft=perl diff --git a/t/Help/related.t b/t/Help/related.t index 7ca1494e9..633044410 100644 --- a/t/Help/related.t +++ b/t/Help/related.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; @@ -28,14 +26,14 @@ my $numTests = 0; my $session = WebGUI::Test->session; -my @helpFileSet = WebGUI::Operation::Help::_getHelpFilesList($session); +my @helpFileSet = WebGUI::Pluggable::findAndLoad('WebGUI::Help'); my %helpTable; foreach my $helpSet (@helpFileSet) { - my $helpName = $helpSet->[1]; - my $help = WebGUI::Operation::Help::_load($session, $helpName); - $helpTable{ $helpName } = $help; + my ($namespace) = $helpSet =~ m{WebGUI::Help::(.+$)}; + my $help = WebGUI::Operation::Help::_load($session, $namespace); + $helpTable{ $namespace } = $help; } ##Scan #1, how many tests do we expect? diff --git a/t/Inbox.t b/t/Inbox.t index 1135f146f..4439a9759 100644 --- a/t/Inbox.t +++ b/t/Inbox.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/lib"; use WebGUI::Test; use WebGUI::Session; diff --git a/t/Inbox/Groups.t b/t/Inbox/Groups.t index 1cc748fa5..7697c2ec7 100644 --- a/t/Inbox/Groups.t +++ b/t/Inbox/Groups.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,8 +13,6 @@ use strict; use warnings; -use FindBin; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; diff --git a/t/Inbox/Message.t b/t/Inbox/Message.t index 20ad3774b..1b37dd8a4 100644 --- a/t/Inbox/Message.t +++ b/t/Inbox/Message.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use Test::More; use Test::Deep; use WebGUI::Test; # Must use this before any other WebGUI modules diff --git a/t/International.t b/t/International.t index 304be4d19..a99eec2e5 100644 --- a/t/International.t +++ b/t/International.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/lib"; use WebGUI::Test; use WebGUI::Session; use Test::More; # increment this value for each test you create @@ -20,18 +18,10 @@ use WebGUI::Content::SetLanguage; my $session = WebGUI::Test->session; -my $numTests = 1; ##For conditional load check -my $langTests = 4; ##For language look-up tests -$numTests += 20 + $langTests; - -plan tests => $numTests; +plan tests => 25; my $loaded = use_ok('WebGUI::International'); -SKIP: { - -skip 'Module was not loaded, skipping all tests', $numTests-1 unless $loaded; - my $i18n = WebGUI::International->new($session, undef, 'English'); isa_ok($i18n, 'WebGUI::International', 'object of correct type created'); @@ -49,12 +39,8 @@ is($i18n->getNamespace(), 'Asset', 'getNamespace: set namespace to Asset'); is($i18n->get('topicName'), 'Assets', 'get: get English label for topicName in Asset: Assets'); is($i18n->get('topicName', 'WebGUI'), 'WebGUI', 'get: test manual namespace override'); -installPigLatin(); -WebGUI::Test->addToCleanup(sub { - unlink File::Spec->catfile(WebGUI::Test->lib, qw/WebGUI i18n PigLatin WebGUI.pm/); - unlink File::Spec->catfile(WebGUI::Test->lib, qw/WebGUI i18n PigLatin.pm/); - rmdir File::Spec->catdir(WebGUI::Test->lib, qw/WebGUI i18n PigLatin/); -}); +local @INC = @INC; +unshift @INC, File::Spec->catdir( WebGUI::Test->getTestCollateralPath, 'International', 'lib' ); #tests for sub new my $i18nNew1 = WebGUI::International->new($session); @@ -70,8 +56,6 @@ my $languages = $i18n->getLanguages(); my $gotPigLatin = exists $languages->{PigLatin}; -SKIP: { - skip 'No PigLatin language pack for testing', $langTests unless $gotPigLatin; is( $i18n->get('account','WebGUI','English'), $i18n->get('account','WebGUI','PigLatin'), @@ -98,43 +82,27 @@ SKIP: { 'keys with spaces work' ); -} - is($i18n->getLanguage('English', 'label'), 'English', 'getLanguage, specific property'); isa_ok($i18n->getLanguage('English'), 'HASH', 'getLanguage, without a specific property returns a hashref'); -} - -sub installPigLatin { - mkdir File::Spec->catdir(WebGUI::Test->lib, 'WebGUI', 'i18n', 'PigLatin'); - copy( - WebGUI::Test->getTestCollateralPath('WebGUI.pm'), - File::Spec->catfile(WebGUI::Test->lib, qw/WebGUI i18n PigLatin WebGUI.pm/) - ); - copy( - WebGUI::Test->getTestCollateralPath('PigLatin.pm'), - File::Spec->catfile(WebGUI::Test->lib, qw/WebGUI i18n PigLatin.pm/) - ); -} - #test for sub new with language overridden by scratch my $formvariables = { - 'op' =>'setLanguage', - 'language' => 'PigLatin' + 'op' =>'setLanguage', + 'language' => 'PigLatin' }; $session->request->setup_body($formvariables); WebGUI::Content::SetLanguage::handler($session); my $newi18n = WebGUI::International->new($session); - is( - $newi18n->get('webgui','WebGUI','PigLatin'), - 'ebGUIWay', - 'if the piglatin language is in the scratch that messages should be retrieved' +is( + $newi18n->get('webgui','WebGUI','PigLatin'), + 'ebGUIWay', + 'if the piglatin language is in the scratch that messages should be retrieved' ); - is( - $newi18n->get('104','Asset','PigLatin'), - $newi18n->get('104', 'WebGUI', 'English'), - 'Language check after SetLanguage contentHandler : key from missing file return English key' +is( + $newi18n->get('104','Asset','PigLatin'), + $newi18n->get('104', 'WebGUI', 'English'), + 'Language check after SetLanguage contentHandler : key from missing file return English key' ); #vim:ft=perl diff --git a/t/Keyword.t b/t/Keyword.t index 8c5c02b97..623924251 100644 --- a/t/Keyword.t +++ b/t/Keyword.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/lib"; use WebGUI::Test; use WebGUI::Session; use WebGUI::Keyword; @@ -24,7 +22,10 @@ use Data::Dumper; my $session = WebGUI::Test->session; # put your tests here -my $home = WebGUI::Asset->getDefault($session); +my $tag = WebGUI::VersionTag->getWorking($session); +my $home = WebGUI::Test->asset; +$tag->commit; +$home = $home->cloneFromDb; isa_ok($home, "WebGUI::Asset"); my $keyword = WebGUI::Keyword->new($session); @@ -77,13 +78,9 @@ my $snippet = $home->addChild({ keywords => 'webgui', }); -my $tag = WebGUI::VersionTag->getWorking($session); -WebGUI::Test->addToCleanup($tag); -$tag->commit; - my $assetIds = $keyword->getMatchingAssets({ keyword => 'webgui', }); -cmp_deeply( +cmp_bag( $assetIds, [ $snippet->getId, $home->getId, ], 'getMatchingAssets, by keyword, assetIds in order by creationDate, descending' @@ -91,8 +88,7 @@ cmp_deeply( # sorted by title, alphabetically -my $aa_story = $home->addChild({ className => 'WebGUI::Asset::Story', title => "aaaa", keywords => 'webgui' }); -WebGUI::Test->addToCleanup($aa_story); +my $aa_story = $home->addChild({ className => 'WebGUI::Asset::Snippet', title => "aaaa", keywords => 'webgui' }); $assetIds = $keyword->getMatchingAssets({ keyword => 'webgui', sortOrder => 'Alphabetically', }); @@ -115,7 +111,7 @@ cmp_deeply( '... only published assets' ); -cmp_deeply( +cmp_bag( $keyword->getMatchingAssets({ keyword => 'webgui', states => [ qw/published trash/, ]}), [$snippet->getId, $home->getId, ], '... retrieving assets in more than one state' diff --git a/t/LDAPLink.t b/t/LDAPLink.t index bf1bd0c83..3107c9bc8 100644 --- a/t/LDAPLink.t +++ b/t/LDAPLink.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/lib"; use Test::More; use Test::Deep; use Data::Dumper; @@ -41,7 +39,7 @@ plan tests => 9; # Increment this number for each test you create { my $ldap = WebGUI::LDAPLink->new($session, "new"); - addToCleanup($ldap); + WebGUI::Test->addToCleanup($ldap); isa_ok($ldap, 'WebGUI::LDAPLink'); is $ldap->{_ldapLinkId}, "new", '... created with correct linkId'; } @@ -57,7 +55,7 @@ SKIP: { my $ldapProps = WebGUI::Test->getSmokeLDAPProps(); $session->db->setRow('ldapLink', 'ldapLinkId', $ldapProps, $ldapProps->{ldapLinkId}); my $ldap = WebGUI::LDAPLink->new($session, $ldapProps->{ldapLinkId}); - addToCleanup($ldap); + WebGUI::Test->addToCleanup($ldap); cmp_deeply $ldap->get(), superhashof($ldapProps), 'all db properties retrieved'; my $connection = $ldap->bind(); isa_ok $connection, 'Net::LDAP', 'returned by bind'; @@ -77,7 +75,7 @@ SKIP: { $ldapProps->{identifier} = 'hadley'; $session->db->setRow('ldapLink', 'ldapLinkId', $ldapProps, $ldapProps->{ldapLinkId}); my $ldap = WebGUI::LDAPLink->new($session, $ldapProps->{ldapLinkId}); - addToCleanup($ldap); + WebGUI::Test->addToCleanup($ldap); my $connection = $ldap->bind(); isa_ok $connection, 'Net::LDAP', 'returned by bind'; is $ldap->{_error}, 104, 'auth error due to bad identifier'; diff --git a/t/Macro.t b/t/Macro.t index d0aecdec2..269f381fe 100644 --- a/t/Macro.t +++ b/t/Macro.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/lib"; use WebGUI::Test; use WebGUI::Session; @@ -34,7 +32,6 @@ $registeredUser->username('TimBob'); WebGUI::Test->addToCleanup($registeredUser); $session->user({user => $registeredUser}); -WebGUI::Test->originalConfig('macros'); ##Overwrite any local configuration so that we know how to call it. foreach my $macro (qw/ GroupText LoginToggle PageTitle MacroStart MacroEnd MacroNest @@ -44,8 +41,6 @@ foreach my $macro (qw/ } $session->config->addToHash('macros', "Ex'tras", "Extras"); -plan tests => 51; - my $macroText = "CompanyName: ^c;"; my $companyName = $session->setting->get('companyName'); WebGUI::HTML::makeParameterSafe( \$companyName ); @@ -338,3 +333,31 @@ is ( '@MacroCall[`1`.` 2`.`3`]:', 'internal spaces are okay' ); + +my $macroText = 'before ^VisualMacro("1", 2,); after'; +my $macroData; +WebGUI::Macro::transform($session, \$macroText, sub { + $macroData = shift; + return "replace"; +}); + +is ( + $macroText, + 'before replace after', + 'transform replaces macro calls' +); + +is_deeply($macroData, { + session => $session, + macro => 'VisualMacro', + macroPackage => 'WebGUI::Macro::VisualMacro', + originalString => '^VisualMacro("1", 2,);', + parameters => [ + '1', + ' 2', + ], + parameterString => '("1", 2,)', +}, 'transform passes sub correct data'); + +done_testing; + diff --git a/t/Macro/AOIHits.t b/t/Macro/AOIHits.t index cdd059a2b..affe31ed2 100644 --- a/t/Macro/AOIHits.t +++ b/t/Macro/AOIHits.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; diff --git a/t/Macro/AOIRank.t b/t/Macro/AOIRank.t index 901ba287f..4268ffdba 100644 --- a/t/Macro/AOIRank.t +++ b/t/Macro/AOIRank.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; diff --git a/t/Macro/AdSpace.t b/t/Macro/AdSpace.t index 0699e3889..3dc5e86f2 100644 --- a/t/Macro/AdSpace.t +++ b/t/Macro/AdSpace.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; diff --git a/t/Macro/AdminText.t b/t/Macro/AdminText.t index e3616ccdb..99fd6b222 100644 --- a/t/Macro/AdminText.t +++ b/t/Macro/AdminText.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; @@ -21,7 +19,7 @@ my $session = WebGUI::Test->session; use Test::More; # increment this value for each test you create -plan tests => 6; +plan tests => 4; my $output; @@ -31,11 +29,7 @@ is($output, '', 'user is not admin'); $session->user({userId => 3}); $output = WebGUI::Macro::AdminText::process($session, 'admin'); -is($output, '', 'user is admin, not in admin mode'); - -$session->var->switchAdminOn; -$output = WebGUI::Macro::AdminText::process($session, 'admin'); -is($output, 'admin', 'admin in admin mode'); +is($output, 'admin', 'user is admin'); $output = WebGUI::Macro::AdminText::process($session, ''); is($output, '', 'null text'); @@ -43,6 +37,3 @@ is($output, '', 'null text'); $output = WebGUI::Macro::AdminText::process($session); is($output, undef, 'undef text'); -$session->var->switchAdminOff; -$output = WebGUI::Macro::AdminText::process($session, 'admin'); -is($output, '', 'user is admin, not in admin mode'); diff --git a/t/Macro/AdminToggle.t b/t/Macro/AdminToggle.t index 1daad5257..83eea2686 100644 --- a/t/Macro/AdminToggle.t +++ b/t/Macro/AdminToggle.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; @@ -24,7 +22,7 @@ my $session = WebGUI::Test->session; my $template = addTemplate(); -my $homeAsset = WebGUI::Asset->getDefault($session); +my $homeAsset = WebGUI::Test->asset; $session->asset($homeAsset); my $i18n = WebGUI::International->new($session,'Macro_AdminToggle'); @@ -35,7 +33,6 @@ my @testSets = ( userId => 1, adminStatus => 'off', onText => q!!, - offText => q!!, template => q!!, output => '', }, @@ -44,19 +41,8 @@ my @testSets = ( userId => 3, adminStatus => 'off', onText => '', - offText => '', template => q!!, - url => $session->url->append($homeAsset->getUrl(),'op=switchOnAdmin'), - output => \&simpleHTMLParser, - }, - { - comment => 'Admin sees offText, default call', - userId => 3, - adminStatus => 'on', - onText => '', - offText => '', - template => q!!, - url => $session->url->append($homeAsset->getUrl(),'op=switchOffAdmin'), + url => $session->url->append($homeAsset->getUrl(),'op=admin'), output => \&simpleHTMLParser, }, { @@ -64,19 +50,8 @@ my @testSets = ( userId => 3, adminStatus => 'off', onText => 'Admin powers... Activate!', - offText => 'Chillin, dude', template => q!!, - url => $session->url->append($homeAsset->getUrl(),'op=switchOnAdmin'), - output => \&simpleHTMLParser, - }, - { - comment => 'Admin sees offText, custom text', - userId => 3, - adminStatus => 'on', - onText => 'Admin powers... Activate!', - offText => 'Chillin, dude', - template => q!!, - url => $session->url->append($homeAsset->getUrl(),'op=switchOffAdmin'), + url => $session->url->append($homeAsset->getUrl(),'op=admin'), output => \&simpleHTMLParser, }, { @@ -84,19 +59,8 @@ my @testSets = ( userId => 3, adminStatus => 'off', onText => 'Admin powers... Activate!', - offText => 'Chillin, dude', template => $template->get('url'), - url => $session->url->append($homeAsset->getUrl(),'op=switchOnAdmin'), - output => \&simpleTextParser, - }, - { - comment => 'Admin sees offText, custom text and template', - userId => 3, - adminStatus => 'on', - onText => 'Admin powers... Activate!', - offText => 'Chillin, dude', - template => $template->get('url'), - url => $session->url->append($homeAsset->getUrl(),'op=switchOffAdmin'), + url => $session->url->append($homeAsset->getUrl(),'op=admin'), output => \&simpleTextParser, }, ); @@ -110,16 +74,9 @@ plan tests => $numTests + 1; ##conditional module load and TODO at end foreach my $testSet (@testSets) { $session->user({userId=>$testSet->{userId}}); - if ($testSet->{adminStatus} eq 'off') { - $session->var->switchAdminOff(); - $testSet->{label} = $testSet->{onText} || $i18n->get(516); - } - else { - $session->var->switchAdminOn(); - $testSet->{label} = $testSet->{offText} || $i18n->get(517); - } + $testSet->{label} = $testSet->{onText} || $i18n->get(516); my $output = WebGUI::Macro::AdminToggle::process( $session, - $testSet->{onText}, $testSet->{offText}, $testSet->{template} ); + $testSet->{onText}, $testSet->{template} ); if (ref $testSet->{output} eq 'CODE') { my ($url, $label) = $testSet->{output}->($output); is($label, $testSet->{label}, $testSet->{comment}.", label"); @@ -137,22 +94,18 @@ TODO: { sub addTemplate { $session->user({userId=>3}); - my $importNode = WebGUI::Asset->getImportNode($session); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->set({name=>"AdminToggle test"}); + my $importNode = WebGUI::Test->asset; my $properties = { title => 'AdminToggle test template', className => 'WebGUI::Asset::Template', url => 'admintoggle-test', namespace => 'Macro/AdminToggle', - template => "HREF=<tmpl_var toggle.url>\nLABEL=<tmpl_var toggle.text>", + template => "HREF=<tmpl_var toggle_url>\nLABEL=<tmpl_var toggle_text>", id => 'AdminToggleTemplate--Z', usePacked => 0, parser => 'WebGUI::Asset::Template::HTMLTemplate', }; my $template = $importNode->addChild($properties, $properties->{id}); - $versionTag->commit; - addToCleanup($versionTag); return $template; } diff --git a/t/Macro/AssetProxy.t b/t/Macro/AssetProxy.t index 107ed7676..1dbbb976d 100644 --- a/t/Macro/AssetProxy.t +++ b/t/Macro/AssetProxy.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; @@ -30,6 +28,6 @@ my $output; $output = WebGUI::Macro::AssetProxy::process($session); is $output, undef, 'calling AssetProxy with no identifier returns no error message in normal mode'; -$session->var->switchAdminOn; +$session->user({userId => 3}); $output = WebGUI::Macro::AssetProxy::process($session); like $output, qr/Invalid Asset URL/, '..., adminOn, return error message'; diff --git a/t/Macro/At_username.t b/t/Macro/At_username.t index cb81b9cad..ac0fb3fe9 100644 --- a/t/Macro/At_username.t +++ b/t/Macro/At_username.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; diff --git a/t/Macro/BackToSite.t b/t/Macro/BackToSite.t index 1ecb46887..4512b1e0b 100644 --- a/t/Macro/BackToSite.t +++ b/t/Macro/BackToSite.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Macro::BackToSite; diff --git a/t/Macro/CanEditText.t b/t/Macro/CanEditText.t index e1807e8da..063ba01ee 100644 --- a/t/Macro/CanEditText.t +++ b/t/Macro/CanEditText.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; @@ -21,7 +19,7 @@ my $session = WebGUI::Test->session; use Test::More; # increment this value for each test you create -my $homeAsset = WebGUI::Asset->getDefault($session); +my $homeAsset = WebGUI::Test->asset; my ($asset, $group, @users) = setupTest($session, $homeAsset); my @testSets = ( @@ -86,8 +84,6 @@ sub setupTest { my $cm = WebGUI::Group->find($session, "Content Managers"); $cm->addGroups([$editGroup->getId]); ##Create an asset with specific editing privileges - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->set({name=>"CanEditText test"}); my $properties = { title => 'CanEditText test template', className => 'WebGUI::Asset::Wobject::Article', @@ -96,13 +92,12 @@ sub setupTest { id => 'CanEditTextTestAsset01', groupIdEdit => $editGroup->getId(), }; - my $asset = $defaultNode->addChild($properties, $properties->{id}); - $versionTag->commit; + my $asset = WebGUI::Test->asset->addChild($properties, $properties->{id}); my @users = map { WebGUI::User->new($session, "new") } 0..2; ##User 1 is a content manager $users[1]->addToGroups([$cm->getId]); ##User 2 is a member of a content manager sub-group $users[2]->addToGroups([$editGroup->getId]); - addToCleanup($versionTag, $editGroup, @users); + WebGUI::Test->addToCleanup($editGroup, @users); return ($asset, $editGroup, @users); } diff --git a/t/Macro/CartItemCount.t b/t/Macro/CartItemCount.t index b2482c484..28429591d 100644 --- a/t/Macro/CartItemCount.t +++ b/t/Macro/CartItemCount.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; diff --git a/t/Macro/ConvertUTCToTZ.t b/t/Macro/ConvertUTCToTZ.t index 257b2a727..dfd5bb4b5 100644 --- a/t/Macro/ConvertUTCToTZ.t +++ b/t/Macro/ConvertUTCToTZ.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2008 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; diff --git a/t/Macro/D_date.t b/t/Macro/D_date.t index 7495492ba..ce626196f 100644 --- a/t/Macro/D_date.t +++ b/t/Macro/D_date.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; diff --git a/t/Macro/DeactivateAccount.t b/t/Macro/DeactivateAccount.t index f7dfc6eca..bd8dbf89b 100644 --- a/t/Macro/DeactivateAccount.t +++ b/t/Macro/DeactivateAccount.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2008 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; diff --git a/t/Macro/EditableToggle.t b/t/Macro/EditableToggle.t deleted file mode 100644 index 4f868a2ca..000000000 --- a/t/Macro/EditableToggle.t +++ /dev/null @@ -1,275 +0,0 @@ -#------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. -#------------------------------------------------------------------- -# Please read the legal notices (docs/legal.txt) and the license -# (docs/license.txt) that came with this distribution before using -# this software. -#------------------------------------------------------------------- -# http://www.plainblack.com info@plainblack.com -#------------------------------------------------------------------- - -use FindBin; -use strict; -use lib "$FindBin::Bin/../lib"; - -use WebGUI::Test; -use WebGUI::Session; -use HTML::TokeParser; -use WebGUI::Macro::EditableToggle; -use Data::Dumper; - -use Test::More; # increment this value for each test you create - -my $session = WebGUI::Test->session; - -my $homeAsset = WebGUI::Asset->getDefault($session); -my ($versionTag, $asset, @users) = setupTest($session, $homeAsset); - -my $i18n = WebGUI::International->new($session,'Macro_EditableToggle'); - -my @testSets = ( - { - comment => 'Visitor sees nothing, admin off, home asset', - userId => 1, - adminStatus => 'off', - asset => $homeAsset, - onText => '', - offText => '', - template => q!!, - output => '', - }, - { - comment => 'Visitor sees nothing, admin on, home asset', - userId => 1, - adminStatus => 'on', - asset => $homeAsset, - onText => '', - offText => '', - template => q!!, - output => '', - }, - { - comment => 'Admin sees off text, home asset', - userId => 3, - adminStatus => 'off', - asset => $homeAsset, - onText => '', - offText => '', - template => q!!, - output => \&simpleHTMLParser, - }, - { - comment => 'Admin sees on text, home asset', - userId => 3, - adminStatus => 'on', - asset => $homeAsset, - onText => '', - offText => '', - template => q!!, - output => \&simpleHTMLParser, - }, - { - comment => 'Admin sees off text, custom asset', - userId => 3, - adminStatus => 'off', - asset => $asset, - onText => '', - offText => '', - template => q!!, - output => \&simpleHTMLParser, - }, - { - comment => 'Admin sees on text, custom asset', - userId => 3, - adminStatus => 'on', - asset => $asset, - onText => '', - offText => '', - template => q!!, - output => \&simpleHTMLParser, - }, - { - comment => 'user 0 sees nothing, admin off, custom asset', - userId => $users[0]->userId, - adminStatus => 'off', - asset => $asset, - onText => '', - offText => '', - template => q!!, - output => '', - }, - { - comment => 'user 0 sees nothing, admin on, custom asset', - userId => $users[0]->userId, - adminStatus => 'on', - asset => $asset, - onText => '', - offText => '', - template => q!!, - output => '', - }, - { - comment => 'user 1 sees nothing, admin off, custom asset', - userId => $users[1]->userId, - adminStatus => 'off', - asset => $asset, - onText => '', - offText => '', - template => q!!, - output => '', - }, - { - comment => 'user 1 sees nothing, admin on, custom asset', - userId => $users[1]->userId, - adminStatus => 'on', - asset => $asset, - onText => '', - offText => '', - template => q!!, - output => '', - }, - { - comment => 'user 2 sees on text, admin off, custom asset', - userId => $users[2]->userId, - adminStatus => 'off', - asset => $asset, - onText => '', - offText => '', - template => q!!, - output => \&simpleHTMLParser, - }, - { - comment => 'user 2 sees off text, admin on, custom asset', - userId => $users[2]->userId, - adminStatus => 'on', - asset => $asset, - onText => '', - offText => '', - template => q!!, - output => \&simpleHTMLParser, - }, - { - comment => 'user 2 sees on text, admin off, custom asset and text', - userId => $users[2]->userId, - adminStatus => 'off', - asset => $asset, - onText => 'Admin powers... Activate!', - offText => 'Chillin, dude', - template => q!!, - output => \&simpleHTMLParser, - }, - { - comment => 'user 2 sees off text, admin on, custom asset and text', - userId => $users[2]->userId, - adminStatus => 'on', - asset => $asset, - onText => 'Admin powers... Activate!', - offText => 'Chillin, dude', - template => q!!, - output => \&simpleHTMLParser, - }, - { - comment => 'user 2 sees off text, admin on, custom asset, text, template', - userId => $users[2]->userId, - adminStatus => 'on', - asset => $asset, - onText => 'Admin powers... Activate!', - offText => 'Chillin, dude', - template => $asset->get('url'), - output => \&simpleTextParser, - }, -); - -my $numTests = 0; -foreach my $testSet (@testSets) { - $numTests += 1 + (ref $testSet->{output} eq 'CODE'); -} - -$numTests += 1; ##Empty session Asset plus use_ok - -plan tests => $numTests; - -is( - WebGUI::Macro::EditableToggle::process($session,'on','off',''), - '', - q!Call with no default session asset returns ''!, -); - -foreach my $testSet (@testSets) { - $session->user({userId=>$testSet->{userId}}); - $session->asset($testSet->{asset}); - if ($testSet->{adminStatus} eq 'off') { - $session->var->switchAdminOff(); - $testSet->{label} = $testSet->{onText} || $i18n->get(516); - $testSet->{url} = $session->url->page('op=switchOnAdmin'), - } - elsif ($testSet->{adminStatus} eq 'on') { - $session->var->switchAdminOn(); - $testSet->{label} = $testSet->{offText} || $i18n->get(517); - $testSet->{url} = $session->url->page('op=switchOffAdmin'), - } - else { - BAIL_OUT('Unknown admin status selected'); - } - my $output = WebGUI::Macro::EditableToggle::process($session, - $testSet->{onText}, $testSet->{offText}, $testSet->{template}); - if (ref $testSet->{output} eq 'CODE') { - my ($url, $label) = $testSet->{output}->($output); - is($label, $testSet->{label}, $testSet->{comment}.", label"); - is($url, $testSet->{url}, $testSet->{comment}.", url"); - } - else { - is($output, $testSet->{output}, $testSet->{comment}); - } -} - -sub simpleHTMLParser { - my ($text) = @_; - my $p = HTML::TokeParser->new(\$text); - - my $token = $p->get_tag("a"); - my $url = $token->[1]{href} || "-"; - my $label = $p->get_trimmed_text("/a"); - - return ($url, $label); -} - -sub simpleTextParser { - my ($text) = @_; - - my ($url) = $text =~ /HREF=(.+?)(\n?LABEL|\Z)/; - my ($label) = $text =~ /LABEL=(.+?)(\n?HREF|\Z)/; - - return ($url, $label); -} - -sub setupTest { - my ($session, $defaultNode) = @_; - $session->user({userId=>3}); - my $editGroup = WebGUI::Group->new($session, "new"); - my $tao = WebGUI::Group->find($session, "Turn Admin On"); - ##Create an asset with specific editing privileges - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->set({name=>"EditableToggle test"}); - my $properties = { - title => 'EditableToggle test template', - className => 'WebGUI::Asset::Template', - parser => 'WebGUI::Asset::Template::HTMLTemplate', - url => 'editabletoggle-test', - namespace => 'Macro/EditableToggle', - template => "HREF=<tmpl_var toggle.url>\nLABEL=<tmpl_var toggle.text>", - groupIdEdit => $editGroup->getId(), - # '1234567890123456789012' - id => 'EditableToggleTemplate', - usePacked => 1, - }; - my $asset = $defaultNode->addChild($properties, $properties->{id}); - $versionTag->commit; - my @users = map { WebGUI::User->new($session, "new") } 0..2; - ##User 1 is an editor - $users[1]->addToGroups([$editGroup->getId]); - ##User 2 is an editor AND can turn on Admin - $users[2]->addToGroups([$editGroup->getId, $tao->getId]); - addToCleanup($versionTag, $editGroup, @users); - return ($versionTag, $asset, @users); -} diff --git a/t/Macro/Env.t b/t/Macro/Env.t index d84b51fb1..9542bdc5e 100644 --- a/t/Macro/Env.t +++ b/t/Macro/Env.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; @@ -25,7 +23,7 @@ my $session = WebGUI::Test->session; ##can be retrieved via the macro. There are also tests for null, undef, ##and non-existant keys. -my %env = %{ $session->env->{_env} }; +my %env = %{ $session->request->env }; my @keys = keys %env; my $numTests = 3 + scalar keys %env; diff --git a/t/Macro/Execute.t b/t/Macro/Execute.t index 6fb513a4b..d53c51018 100644 --- a/t/Macro/Execute.t +++ b/t/Macro/Execute.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; diff --git a/t/Macro/Extras.t b/t/Macro/Extras.t index 7bfeccfcd..d98cce302 100644 --- a/t/Macro/Extras.t +++ b/t/Macro/Extras.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; diff --git a/t/Macro/FetchMimeType.t b/t/Macro/FetchMimeType.t index e0788c3ed..a52314b00 100644 --- a/t/Macro/FetchMimeType.t +++ b/t/Macro/FetchMimeType.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; @@ -59,7 +57,7 @@ plan tests => $numTests; foreach my $testSet (@testSets) { my $file = $testSet->{input} - ? join '/', WebGUI::Test->root, 'www/extras', $testSet->{input} + ? join '/', WebGUI::Paths->extras, $testSet->{input} : $testSet->{input}; my $output = WebGUI::Macro::FetchMimeType::process($session, $file); is($output, $testSet->{output}, $testSet->{comment} ); diff --git a/t/Macro/FilePump.t b/t/Macro/FilePump.t index 00ebdd412..a29b8e5be 100644 --- a/t/Macro/FilePump.t +++ b/t/Macro/FilePump.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use Test::More; use WebGUI::Test; # Must use this before any other WebGUI modules use WebGUI::Session; @@ -34,10 +32,10 @@ plan tests => 11; #---------------------------------------------------------------------------- # put your tests here -my $bundle = WebGUI::FilePump::Bundle->create($session, { bundleName => 'test bundle'}); +my $bundle = WebGUI::FilePump::Bundle->new($session, { bundleName => 'test bundle'}); WebGUI::Test->addToCleanup( sub { $bundle->delete } ); -my $root = WebGUI::Asset->getRoot($session); +my $root = WebGUI::Test->asset; my $snippet = $root->addChild({ className => 'WebGUI::Asset::Snippet', @@ -54,10 +52,6 @@ my $fileAsset = $root->addChild({ $fileAsset->getStorageLocation->addFileFromScalar('pumpfile.css', qq| body {\npadding: 0px;}\n\n|); is($fileAsset->getStorageLocation->getFileContentsAsScalar($fileAsset->get('filename')), qq| body {\npadding: 0px;}\n\n|, 'Sanity check - got back expected file contents'); -my $snippetTag = WebGUI::VersionTag->getWorking($session); -WebGUI::Test->addToCleanup($snippetTag); -$snippetTag->commit; - ok($bundle->addFile('JS', 'asset://filePumpSnippet'), 'Added filePumpSnippet'); ok($bundle->addFile('CSS', 'asset://filePumpFileAsset'), 'Added filePumpAsset'); @@ -95,7 +89,7 @@ is( '... check illegal file type access returns empty string' ); -$session->var->switchAdminOn(); +$session->user({ userId => 3 }); is( WebGUI::Macro::FilePump::process($session, 'test bundle', 'JS'), sprintf(qq|<script type="text/javascript" src="%s" ></script>\n<script type="text/javascript" src="%s" ></script>\n|, diff --git a/t/Macro/FileUrl.t b/t/Macro/FileUrl.t index ac3dced78..7ce6adef4 100644 --- a/t/Macro/FileUrl.t +++ b/t/Macro/FileUrl.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; @@ -90,7 +88,7 @@ $numTests += 1; #non-existant URL plan tests => $numTests; -my $homeAsset = WebGUI::Asset->getDefault($session); +my $homeAsset = WebGUI::Test->asset; my @testSets = setupTest($session, $homeAsset, @testSets); @@ -109,8 +107,6 @@ is($output, $i18n->get('invalid url'), "Non-existant url returns error message") sub setupTest { my ($session, $homeAsset, @testSets) = @_; - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->set({name=>"FileUrl macro test"}); my $testNum = 0; foreach my $testSet (@testSets) { @@ -135,7 +131,5 @@ sub setupTest { $testSet->{asset} = $asset; ++$testNum; } - $versionTag->commit; - addToCleanup($versionTag); return @testSets; } diff --git a/t/Macro/FormField.t b/t/Macro/FormField.t index 689c252d0..d30b6be0d 100644 --- a/t/Macro/FormField.t +++ b/t/Macro/FormField.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2011 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -14,7 +14,6 @@ use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; -use WebGUI::Macro::AdminBar; use HTML::TokeParser; use HTML::Form; use Tie::IxHash; diff --git a/t/Macro/FormParam.t b/t/Macro/FormParam.t index c608eaf2f..94681af31 100644 --- a/t/Macro/FormParam.t +++ b/t/Macro/FormParam.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; @@ -70,35 +68,22 @@ TODO: { sub auto_check { my ($session, $testBlock) = @_; - my $origSessionRequest = $session->{_request}; ##Create a by-name interface to the test to simplify the ##mocked request. my %tests = map { $_->{key} => $_ } @{ $testBlock }; is(scalar keys %tests, scalar @{ $testBlock }, 'no collisions in testBlock'); - my $request = Test::MockObject->new; - $request->mock('body', - sub { - my ($self, $value) = @_; - return unless exists $tests{$value}; - if (ref $tests{$value}->{testValue} eq "ARRAY") { - return @{ $tests{$value}->{testValue} } ; - } - else { - return $tests{$value}->{testValue}; - } - } - ); - $request->mock('param', sub {shift->body(@_)}); - - $session->{_request} = $request; + my $param_hash = Hash::MultiValue->from_mixed( + map { $_->{key} => $_->{testValue} } @{ $testBlock } + ); + local $session->request->env->{'plack.request.query'} = $param_hash; + local $session->request->env->{'plack.request.body'} = $param_hash; + local $session->request->env->{'plack.request.merged'} = $param_hash; foreach my $test ( @{ $testBlock } ) { $test->{expected} = $test->{testValue} if $test->{expected} eq 'EQUAL'; my $value = WebGUI::Macro::FormParam::process($session, $test->{key}); is($value, $test->{expected}, $test->{comment}); } - - $session->{_request} = $origSessionRequest; } diff --git a/t/Macro/GroupAdd.t b/t/Macro/GroupAdd.t index 90b3374d1..b2392da4b 100644 --- a/t/Macro/GroupAdd.t +++ b/t/Macro/GroupAdd.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; @@ -23,7 +21,7 @@ use JSON qw/from_json/; my $session = WebGUI::Test->session; -my $homeAsset = WebGUI::Asset->getDefault($session); +my $homeAsset = WebGUI::Test->asset; my ($template, $groups, $users) = setupTest($session, $homeAsset); my @testSets = ( @@ -147,16 +145,14 @@ sub setupTest { $groups[1] = WebGUI::Group->new($session, "new"); $groups[1]->name('Regular Old Group'); $groups[1]->autoAdd(0); - addToCleanup(@groups); + WebGUI::Test->addToCleanup(@groups); ##Three users. One in each group and one with no group membership my @users = map { WebGUI::User->new($session, "new") } 0..2; $users[0]->addToGroups([$groups[0]->getId]); $users[1]->addToGroups([$groups[1]->getId]); - addToCleanup(@users); + WebGUI::Test->addToCleanup(@users); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->set({name=>"GroupAdd test"}); my $properties = { title => 'GroupAdd test template', className => 'WebGUI::Asset::Template', @@ -169,8 +165,6 @@ sub setupTest { usePacked => 1, }; my $asset = $defaultNode->addChild($properties, $properties->{id}); - $versionTag->commit; - addToCleanup($versionTag); return $asset, \@groups, \@users; } diff --git a/t/Macro/GroupDelete.t b/t/Macro/GroupDelete.t index 1abe6d26d..a8225f370 100644 --- a/t/Macro/GroupDelete.t +++ b/t/Macro/GroupDelete.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; @@ -22,7 +20,7 @@ use HTML::TokeParser; my $session = WebGUI::Test->session; -my $homeAsset = WebGUI::Asset->getDefault($session); +my $homeAsset = WebGUI::Test->asset; my ($template, $groups, $users) = setupTest($session, $homeAsset); my @testSets = ( @@ -146,16 +144,14 @@ sub setupTest { $groups[1] = WebGUI::Group->new($session, "new"); $groups[1]->name('Regular Old Group'); $groups[1]->autoDelete(0); - addToCleanup(@groups); + WebGUI::Test->addToCleanup(@groups); ##Three users. One in each group and one with no group membership my @users = map { WebGUI::User->new($session, "new") } 0..2; $users[0]->addToGroups([$groups[0]->getId]); $users[1]->addToGroups([$groups[1]->getId]); - addToCleanup(@users); + WebGUI::Test->addToCleanup(@users); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->set({name=>"GroupDelete test"}); my $properties = { title => 'GroupDelete test template', className => 'WebGUI::Asset::Template', @@ -168,8 +164,6 @@ sub setupTest { id => 'GroupDelete001Template', }; my $asset = $defaultNode->addChild($properties, $properties->{id}); - $versionTag->commit; - addToCleanup($versionTag); return $asset, \@groups, \@users; } diff --git a/t/Macro/GroupText.t b/t/Macro/GroupText.t index f8c9595f9..1c6867084 100644 --- a/t/Macro/GroupText.t +++ b/t/Macro/GroupText.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; @@ -59,14 +57,14 @@ my $sth = $session->db->prepare('INSERT INTO myUserTable VALUES(?)'); foreach my $mob (@mob) { $sth->execute([ $mob->userId ]); } -addToCleanup(@mob); +WebGUI::Test->addToCleanup(@mob); ##Create the 3 groups $ms_users = WebGUI::Group->new($session, "new"); $ms_distributors = WebGUI::Group->new($session, "new"); $ms_int_distributors = WebGUI::Group->new($session, "new"); -addToCleanup($ms_users, $ms_distributors, $ms_int_distributors); +WebGUI::Test->addToCleanup($ms_users, $ms_distributors, $ms_int_distributors); $ms_users->name('MS Users'); $ms_distributors->name('MS Distributors'); @@ -88,7 +86,7 @@ $ms_distributors->addGroups([$ms_int_distributors->getId]); $disti = WebGUI::User->new($session, 'new'); $int_disti = WebGUI::User->new($session, 'new'); -addToCleanup($disti, $int_disti); +WebGUI::Test->addToCleanup($disti, $int_disti); $ms_distributors->addUsers([$disti->userId]); $ms_int_distributors->addUsers([$int_disti->userId]); diff --git a/t/Macro/H_homeLink.t b/t/Macro/H_homeLink.t index ac7a0dcf7..f16070d09 100644 --- a/t/Macro/H_homeLink.t +++ b/t/Macro/H_homeLink.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,23 +8,27 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; use HTML::TokeParser; use Data::Dumper; +use WebGUI::VersionTag; use Test::More; # increment this value for each test you create my $session = WebGUI::Test->session; -my ($versionTag, $template) = addTemplate(); -WebGUI::Test->addToCleanup($versionTag); +my $tag = WebGUI::VersionTag->getWorking($session); +my ($template) = addTemplate(); +my $homeAsset = WebGUI::Test->asset; +$tag->commit; -my $homeAsset = WebGUI::Asset->getDefault($session); +my $originalDefault = $session->setting->get('defaultPage'); +WebGUI::Test->addToCleanup(sub { $session->setting->set('defaultPage', $originalDefault); }); +$session->setting->set( 'defaultPage', $homeAsset->getId ); +WebGUI::Test->addToCleanup($tag); my $i18n = WebGUI::International->new($session,'Macro_H_homeLink'); @@ -91,9 +95,7 @@ foreach my $testSet (@testSets) { sub addTemplate { $session->user({userId=>3}); - my $importNode = WebGUI::Asset->getImportNode($session); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->set({name=>"H_homeLink test"}); + my $importNode = WebGUI::Test->asset; my $properties = { title => 'H_homeLink test template', className => 'WebGUI::Asset::Template', @@ -105,8 +107,7 @@ sub addTemplate { usePacked => 1, }; my $template = $importNode->addChild($properties, $properties->{id}); - $versionTag->commit; - return ($versionTag, $template); + return ($template); } sub simpleHTMLParser { diff --git a/t/Macro/Hash_userId.t b/t/Macro/Hash_userId.t index cd2f2fca9..91e185b89 100644 --- a/t/Macro/Hash_userId.t +++ b/t/Macro/Hash_userId.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -10,9 +10,7 @@ ##The goal of this test is to make sure the Hash_userId macro works. -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; diff --git a/t/Macro/If.t b/t/Macro/If.t index fe2e929d4..847809368 100644 --- a/t/Macro/If.t +++ b/t/Macro/If.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; diff --git a/t/Macro/Include.t b/t/Macro/Include.t index c87dc5d58..08a0e8aa2 100644 --- a/t/Macro/Include.t +++ b/t/Macro/Include.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,11 +8,10 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; +use WebGUI::Paths; use WebGUI::Session; use WebGUI::Storage; use WebGUI::Macro::Include; @@ -23,8 +22,8 @@ my $session = WebGUI::Test->session; my $i18n = WebGUI::International->new($session, 'Macro_Include'); -my $configFile = WebGUI::Test->root .'/etc/'. WebGUI::Test->file; -my $spectreConf = WebGUI::Test->root . '/etc/spectre.conf'; +my $configFile = WebGUI::Paths->configBase . '/'. WebGUI::Test->file; +my $spectreConf = WebGUI::Paths->spectreConfig; my $goodFile = 'The contents of this file are accessible'; my $twoLines = "This file contains two lines of text\nThis is the second line"; diff --git a/t/Macro/International.t b/t/Macro/International.t index ae4033da5..b16bac503 100644 --- a/t/Macro/International.t +++ b/t/Macro/International.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; diff --git a/t/Macro/L_loginBox.t b/t/Macro/L_loginBox.t index b7a1e4a27..544203b0b 100644 --- a/t/Macro/L_loginBox.t +++ b/t/Macro/L_loginBox.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; @@ -21,7 +19,7 @@ use Test::More; # increment this value for each test you create my $session = WebGUI::Test->session; -my $homeAsset = WebGUI::Asset->getDefault($session); +my $homeAsset = WebGUI::Test->asset; $session->asset($homeAsset); my $template = setupTest($session, $homeAsset); $session->user({userId=>1}); @@ -29,16 +27,13 @@ $session->user({userId=>1}); ##Replace the original ENV hash with one that will return a ##known user agent. Since it usually contains a reference to %ENV, ##you can't just modify that hash since it's protected -my $origEnv = $session->{_env}; -my %newEnvHash = ( - 'HTTP_USER_AGENT' => 'mozilla', - 'QUERY_STRING' => 'func=search', -); -$session->{_env}->{_env} = \%newEnvHash; +my $env = $session->request->env; +$session->request->headers->user_agent('mozilla'); +$env->{'QUERY_STRING'} = 'func=search'; my $i18n = WebGUI::International->new($session,'Macro_L_loginBox'); -plan tests => 30; +plan tests => 31; my $output = WebGUI::Macro::L_loginBox::process($session,'','',$template->getId); my %vars = simpleTextParser($output); @@ -61,7 +56,7 @@ is( $vars{'password.form'}, WebGUI::Form::password($session,{ name=>"identifier", - size=>8, + size=>12, extras=>'class="loginBoxField"' }), 'password.form' @@ -71,7 +66,7 @@ is( $vars{'username.form'}, WebGUI::Form::text($session,{ name=>"username", - size=>8, + size=>12, extras=>'class="loginBoxField"' }), 'username.form' @@ -105,7 +100,7 @@ is($vars{'form.footer'}, WebGUI::Form::formFooter($session), 'form.footer'); is( $vars{'form.returnUrl'}, WebGUI::Form::hidden( $session, { name => 'returnUrl', - value => $session->url->page($session->env->get("QUERY_STRING")), + value => $session->url->page($session->request->env->{"QUERY_STRING"}), }), 'form.returnUrl' ); @@ -118,11 +113,11 @@ $output = WebGUI::Macro::L_loginBox::process($session,24,'Log In',$template->get %vars = simpleTextParser($output); is($vars{'customText'}, 'Log In', 'custom text sent'); -like($vars{'username.form'}, qr/size="16"/, 'boxSize set in username.form'); -like($vars{'password.form'}, qr/size="16"/, 'boxSize set in password.form'); +like($vars{'username.form'}, qr/size="24"/, 'boxSize set in username.form'); +like($vars{'password.form'}, qr/size="24"/, 'boxSize set in password.form'); ##Change browser to be MSIE like and watch boxSize change -$newEnvHash{'HTTP_USER_AGENT'} = "msie"; +$session->request->headers->user_agent('msie'); $output = WebGUI::Macro::L_loginBox::process($session,24,'Log In',$template->getId); %vars = simpleTextParser($output); @@ -155,6 +150,12 @@ $output = WebGUI::Macro::L_loginBox::process($session,'','',$template->getId); %vars = simpleTextParser($output); like($vars{'form.header'}, qr{https://}, 'form.header action set to use SSL by encryptLogin'); +WebGUI::Test->originalConfig('webServerPort'); +$session->config->set('webServerPort', 8081); +$output = WebGUI::Macro::L_loginBox::process($session,'','',$template->getId); +%vars = simpleTextParser($output); +unlike($vars{'form.header'}, qr{:8081}, '... when setting, remove the port'); + ##Finally, a test that the default Template exists $output = WebGUI::Macro::L_loginBox::process($session,'','',''); @@ -202,8 +203,6 @@ sub setupTest { my ($session, $defaultNode) = @_; $session->user({userId=>3}); ##Create an asset with specific editing privileges - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->set({name=>"L_loginBox test"}); my $properties = { title => 'L_loginBox test template', className => 'WebGUI::Asset::Template', @@ -225,7 +224,5 @@ sub setupTest { account.create.label form.footer form.returnUrl/; #$properties->{template} .= "\n"; my $template = $defaultNode->addChild($properties, $properties->{id}); - $versionTag->commit; - addToCleanup($versionTag); return $template; } diff --git a/t/Macro/LastModified.t b/t/Macro/LastModified.t index 5907bae34..b9dc9f9ef 100644 --- a/t/Macro/LastModified.t +++ b/t/Macro/LastModified.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; @@ -20,7 +18,7 @@ use Test::More; # increment this value for each test you create my $session = WebGUI::Test->session; -my $homeAsset = WebGUI::Asset->getDefault($session); +my $homeAsset = WebGUI::Test->asset; my ($time) = $session->dbSlave->quickArray("SELECT max(revisionDate) FROM assetData where assetId=?",[$homeAsset->getId]); @@ -51,9 +49,6 @@ $numTests += 2; #For the use_ok, default asset, and revisionDate=0 plan tests => $numTests; -my $versionTag = WebGUI::VersionTag->getWorking($session); -addToCleanup($versionTag); - my $output = WebGUI::Macro::LastModified::process($session); is($output, '', "Macro returns '' if no asset is defined"); @@ -65,9 +60,7 @@ foreach my $testSet (@testSets) { is($output, $testSet->{output}, $testSet->{comment}); } -$versionTag->set({name=>"Adding assets for LastModified macro tests"}); - -my $root = WebGUI::Asset->getRoot($session); +my $root = WebGUI::Test->asset; my %properties_A = ( className => 'WebGUI::Asset', title => 'Asset A', @@ -80,7 +73,6 @@ my %properties_A = ( ); my $assetA = $root->addChild(\%properties_A, $properties_A{id}, 0e0); -$versionTag->commit; ##Save the original revisionDate and then rewrite it in the db to be 0 my $revDate = $session->db->quickArray('select max(revisionDate) from assetData where assetId=?', [$assetA->getId]); diff --git a/t/Macro/LastUpdatedBy.t b/t/Macro/LastUpdatedBy.t index 60c0f2f15..3a3274718 100644 --- a/t/Macro/LastUpdatedBy.t +++ b/t/Macro/LastUpdatedBy.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -16,29 +16,25 @@ use WebGUI::Test; use WebGUI::Session; use WebGUI::User; use WebGUI::Macro::LastUpdatedBy; +use WebGUI::VersionTag; use Test::More; # increment this value for each test you create my $session = WebGUI::Test->session; $session->user({userId => 1}); -my $homeAsset = WebGUI::Asset->getDefault($session); +my $homeAsset = WebGUI::Test->asset; my $numTests = 3; plan tests => $numTests; -my $versionTag = WebGUI::VersionTag->getWorking($session); -addToCleanup($versionTag); - my $output = WebGUI::Macro::LastUpdatedBy::process($session); is($output, '', "Macro returns '' if no asset is defined"); ##Make the homeAsset the default asset in the session. $session->asset($homeAsset); -$versionTag->set({name=>"Adding asset for LastUpdatedBy macro tests"}); - my $revised_user = WebGUI::User->new($session, 'new'); $revised_user->username('Andy'); WebGUI::Test->addToCleanup($revised_user); @@ -56,10 +52,12 @@ my %properties_A = ( # '1234567890123456789012', ); +my $tag = WebGUI::VersionTag->getWorking($session); my $assetA = $root->addChild(\%properties_A, $properties_A{id}); -$versionTag->commit; $session->asset($assetA); +$tag->commit; +WebGUI::Test->addToCleanup($tag); $output = WebGUI::Macro::LastUpdatedBy::process($session); is($output, 'Andy', 'Default asset last revised by andy'); diff --git a/t/Macro/LoginToggle.t b/t/Macro/LoginToggle.t index d96fdef54..482851a06 100644 --- a/t/Macro/LoginToggle.t +++ b/t/Macro/LoginToggle.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; @@ -22,7 +20,7 @@ use Test::More; # increment this value for each test you create my $session = WebGUI::Test->session; -my $homeAsset = WebGUI::Asset->getDefault($session); +my $homeAsset = WebGUI::Test->asset; $session->asset($homeAsset); my $template = setupTest($session, $homeAsset); @@ -181,8 +179,6 @@ sub setupTest { $session->user({userId=>3}); my $tao = WebGUI::Group->find($session, "Turn Admin On"); ##Create an asset with specific editing privileges - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->set({name=>"LoginToggle test"}); my $properties = { title => 'LoginToggle test template', className => 'WebGUI::Asset::Template', @@ -196,7 +192,5 @@ sub setupTest { id => 'LoginToggleTemplateA01', }; my $template = $defaultNode->addChild($properties, $properties->{id}); - $versionTag->commit; - addToCleanup($versionTag); return ($template); } diff --git a/t/Macro/MiniCart.t b/t/Macro/MiniCart.t index f4e66f541..782937863 100644 --- a/t/Macro/MiniCart.t +++ b/t/Macro/MiniCart.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; @@ -35,7 +33,7 @@ my $donation = WebGUI::Asset->getRoot($session)->addChild({ }); my $template = setupJSONtemplate($session); -addToCleanup($cart, $donation, $template); +WebGUI::Test->addToCleanup($cart, $donation, $template); my $json; my $templateVars; diff --git a/t/Macro/NewMail.t b/t/Macro/NewMail.t index e7f53ab9c..67c69e4b7 100644 --- a/t/Macro/NewMail.t +++ b/t/Macro/NewMail.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; @@ -27,7 +25,7 @@ plan tests => $numTests; my $inboxUser = WebGUI::User->create($session); $session->user({userId => $inboxUser->getId}); -addToCleanup($inboxUser); +WebGUI::Test->addToCleanup($inboxUser); my $inbox = WebGUI::Inbox->new($session); diff --git a/t/Macro/Page.t b/t/Macro/Page.t index 6d063586a..6878d9b39 100644 --- a/t/Macro/Page.t +++ b/t/Macro/Page.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; @@ -51,7 +49,7 @@ $numTests += 1; #For macro call with undefined session asset plan tests => $numTests; -my $homeAsset = WebGUI::Asset->getDefault($session); +my $homeAsset = WebGUI::Test->asset; @testSets = setupTest($session, $homeAsset, @testSets); @@ -74,14 +72,10 @@ foreach my $testSet (@testSets) { sub setupTest { my ($session, $homeAsset, @testSets) = @_; - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->set({name=>"Page macro test"}); foreach my $testSet (@testSets) { my %properties = %{ $testSet }; my $asset = $homeAsset->addChild(\%properties, $properties{assetId}); $testSet->{asset} = $asset; } - $versionTag->commit; - addToCleanup($versionTag); return @testSets; } diff --git a/t/Macro/PageTitle.t b/t/Macro/PageTitle.t index 846968494..5e0d87cc8 100644 --- a/t/Macro/PageTitle.t +++ b/t/Macro/PageTitle.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; @@ -26,10 +24,7 @@ my $numTests = 7; plan tests => $numTests; -my $homeAsset = WebGUI::Asset->getDefault($session); - -my $versionTag = WebGUI::VersionTag->getWorking($session); -$versionTag->set({name=>"PageTitle macro test"}); +my $homeAsset = WebGUI::Test->asset; # Create a new snippet and set it's title then check it against the macros output my $snippetTitle = "Roy's Incredible Snippet of Mystery and Intrique"; @@ -41,9 +36,6 @@ my $snippet = $homeAsset->addChild({ groupIdEdit=>3, }); -$versionTag->commit; -addToCleanup($versionTag); - is( WebGUI::Macro::PageTitle::process($session), undef, @@ -60,23 +52,8 @@ $session->asset($snippet); my $macroOutput = WebGUI::Macro::PageTitle::process($session); is($macroOutput, $snippet->get('title'), "testing title returned from localy created asset with known title"); -my $origSessionRequest = $session->{_request}; - -my ($operation, $function) = (0,0); - -my $request = Test::MockObject->new; -$request->mock('body', - sub { - my ($self, $value) = @_; - return 1 if $operation and ($value eq "op"); - return 1 if $function and ($value eq "func"); - return 0; - } -); -$request->mock('param', sub {shift->body(@_)}); - -$session->{_request} = $request; - +my $request = $session->request; +$request->setup_param({op => 0, func => 0}); $output = WebGUI::Macro::PageTitle::process($session); is($output, $session->asset->get('title'), 'fetching title for session asset, no func or op'); @@ -84,17 +61,14 @@ my $urlizedTitle = sprintf q!<a href="%s">%s</a>!, $session->asset->getUrl, $session->asset->get('title'); -$operation = 1; -$function = 0; +$request->setup_param({op => 1, func => 0}); $output = WebGUI::Macro::PageTitle::process($session); is($output, $urlizedTitle, 'fetching urlized title via an operation'); -$operation = 0; -$function = 1; +$request->setup_param({op => 0, func => 1}); $output = WebGUI::Macro::PageTitle::process($session); is($output, $urlizedTitle, 'fetching urlized title via a function'); -$operation = 1; -$function = 1; +$request->setup_param({op => 1, func => 1}); $output = WebGUI::Macro::PageTitle::process($session); is($output, $urlizedTitle, 'fetching urlized title via an operation and function'); diff --git a/t/Macro/PageUrl.t b/t/Macro/PageUrl.t index 97d9cb4df..91e9b9772 100644 --- a/t/Macro/PageUrl.t +++ b/t/Macro/PageUrl.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; diff --git a/t/Macro/PickLanguage.t b/t/Macro/PickLanguage.t index 5c8761539..646de5975 100644 --- a/t/Macro/PickLanguage.t +++ b/t/Macro/PickLanguage.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -7,9 +7,7 @@ #------------------------------------------------------------------- # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; @@ -20,6 +18,7 @@ use Test::More; # increment this value for each test you create use Test::Deep; use Test::MockObject; use Test::MockObject::Extends; +use WebGUI::Test::MockAsset; my $session = WebGUI::Test->session; @@ -35,15 +34,13 @@ $macroMock->set_true('process'); my $templateId = 'PICKLANGUAGE_TEMPLATE_'; -my $templateMock = Test::MockObject->new({}); -$templateMock->set_isa('WebGUI::Asset::Template'); -$templateMock->set_always('getId', $templateId); +my $templateMock = WebGUI::Test::MockAsset->new('WebGUI::Asset::Template'); +$templateMock->mock_id($templateId); my $templateVars; $templateMock->mock('process', sub { $templateVars = $_[1]; } ); { - WebGUI::Test->mockAssetId($templateId, $templateMock); WebGUI::Macro::PickLanguage::process($session,$templateMock->getId); cmp_deeply( @@ -63,19 +60,16 @@ $templateMock->mock('process', sub { $templateVars = $_[1]; } ); }, 'some template variables are created' ); - WebGUI::Test->unmockAssetId($templateId); } #test when template Id is left empty $templateId = ''; my $templateNoId = $templateMock->mock('process',''); -$templateMock->set_always('getId', $templateId); +$templateMock->mock_id($templateId); $templateMock->mock('process', sub { $templateVars = $_[1]; } ); { - - WebGUI::Test->mockAssetId($templateId, $templateMock); WebGUI::Macro::PickLanguage::process($session,$templateMock->getId); cmp_deeply( @@ -95,19 +89,9 @@ $templateMock->mock('process', sub { $templateVars = $_[1]; } ); }, 'some template variables are created, when no templateId is passed on with the macro' ); - WebGUI::Test->unmockAssetId($templateId); } -#{ -# WebGUI::Test->mockAssetId($templateNoId, $templateMock); -# $error = WebGUI::Macro::PickLanguage::process($session,$templateMock->getId); -# -# is($error,'Could not instanciate template with id []',"Empty template Id should return error"); -# -# WebGUI::Test->unmockAssetId($templateNoId); -#} - #test for an incorrect template Id $templateId = '1234567890123456789012'; @@ -118,10 +102,8 @@ my $error; { - WebGUI::Test->mockAssetId($templateWrongId, $templateMock); $error = WebGUI::Macro::PickLanguage::process($session,$templateMock->getId); is($error,'Could not instanciate template with id [1234567890123456789012]',"Template from the wrong namespace should not be initiated"); - WebGUI::Test->unmockAssetId($templateWrongId); } diff --git a/t/Macro/Quote.t b/t/Macro/Quote.t index c05026b52..b6215bf01 100644 --- a/t/Macro/Quote.t +++ b/t/Macro/Quote.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Macro::Quote; diff --git a/t/Macro/RandomAssetProxy.t b/t/Macro/RandomAssetProxy.t index b56da64eb..0461ac1ae 100644 --- a/t/Macro/RandomAssetProxy.t +++ b/t/Macro/RandomAssetProxy.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; diff --git a/t/Macro/RandomThread.t b/t/Macro/RandomThread.t index c7a93a258..2e04a812f 100644 --- a/t/Macro/RandomThread.t +++ b/t/Macro/RandomThread.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; diff --git a/t/Macro/RenderThingData.t b/t/Macro/RenderThingData.t index 246f8b7c8..7ac269746 100644 --- a/t/Macro/RenderThingData.t +++ b/t/Macro/RenderThingData.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 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,6 +12,7 @@ use strict; use lib "$FindBin::Bin/../lib"; use WebGUI::Test; +use WebGUI::Test::MockAsset; use WebGUI::Session; use WebGUI::Asset::Template; use WebGUI::Macro::RenderThingData; @@ -21,37 +22,24 @@ use Test::More; # increment this value for each test you create use Test::MockObject; use Test::Deep; -my $templateId = 'PICKLANGUAGE_TEMPLATE_'; -my $templateId = 'VIEW_THING_DATA_TEMPL8T'; +my $templateId = lc 'VIEW_THING_DATA_TEMPL8T'; my $templateUrl = 'view_thing_data_template'; -my $templateMock = Test::MockObject->new({}); -$templateMock->set_isa('WebGUI::Asset::Template'); -$templateMock->set_always('getId', $templateId); +my $templateMock = WebGUI::Test::MockAsset->new('WebGUI::Asset::Template'); my $templateVars; my $templateProcessed = 0; $templateMock->mock('process', sub { $templateVars = $_[1]; $templateProcessed = 1; } ); my $session = WebGUI::Test->session; -WebGUI::Test->mockAssetId($templateId, $templateMock); -WebGUI::Test->mockAssetUrl($templateUrl, $templateMock); - -WebGUI::Test->addToCleanup(sub { - WebGUI::Test->unmockAssetId($templateId); - WebGUI::Test->unmockAssetUrl($templateUrl); -}); +$templateMock->mock_id( $templateId ); +$templateMock->mock_url( $templateUrl ); plan tests => 7; -my $node = WebGUI::Asset->getImportNode($session); -my $versionTag = WebGUI::VersionTag->getWorking($session); -$versionTag->set({name=>"Thingy Test"}); -WebGUI::Test->addToCleanup($versionTag); +my $node = WebGUI::Test->asset; my $thingy = $node->addChild({ className => 'WebGUI::Asset::Wobject::Thingy', groupIdView => 7, url => 'some_thing', }); -$versionTag->commit; -$thingy = $thingy->cloneFromDb; my %thingProperties = ( thingId => "THING_RECORD", diff --git a/t/Macro/RootTitle.t b/t/Macro/RootTitle.t index 353d14e6c..20bd638b6 100644 --- a/t/Macro/RootTitle.t +++ b/t/Macro/RootTitle.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; @@ -32,7 +30,7 @@ my $session = WebGUI::Test->session; my $versionTag = WebGUI::VersionTag->getWorking($session); $versionTag->set({name=>"Adding assets for RootTitle tests"}); -addToCleanup($versionTag); +WebGUI::Test->addToCleanup($versionTag); my $root = WebGUI::Asset->getRoot($session); my %properties_A = ( @@ -118,7 +116,9 @@ my $asset_ = $root->addChild(\%properties__, $properties__{id}); $versionTag->commit; -my $origLineage = $asset_->get('lineage'); +WebGUI::Test->addToCleanup($assetZ, $asset_); + +my $origLineage = $asset_->lineage; my $newLineage = substr $origLineage, 0, length($origLineage)-1; $session->db->write('update asset set lineage=? where assetId=?',[$newLineage, $asset_->getId]); @@ -165,6 +165,8 @@ $numTests += 1; plan tests => $numTests; +use WebGUI::Macro::RootTitle; + is( WebGUI::Macro::RootTitle::process($session), '', diff --git a/t/Macro/SQL.t b/t/Macro/SQL.t index b6b26b521..dbffe37b6 100644 --- a/t/Macro/SQL.t +++ b/t/Macro/SQL.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Macro::Slash_gatewayUrl; @@ -146,7 +144,7 @@ foreach my $testSet (@testSets) { $WebGUIdbLink->set({allowMacroAccess=>$originalMacroAccessValue}); my $newLinkId = $WebGUIdbLink->copy; -addToCleanup(WebGUI::DatabaseLink->new($session, $newLinkId)); +WebGUI::Test->addToCleanup(WebGUI::DatabaseLink->new($session, $newLinkId)); my $output = WebGUI::Macro::SQL::process( $session, q{show columns from testTable like 'zero'}, diff --git a/t/Macro/SessionId.t b/t/Macro/SessionId.t index 5c4867db4..5357e3698 100644 --- a/t/Macro/SessionId.t +++ b/t/Macro/SessionId.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; diff --git a/t/Macro/Slash_gatewayUrl.t b/t/Macro/Slash_gatewayUrl.t index 670de8cc4..80b28b8e6 100644 --- a/t/Macro/Slash_gatewayUrl.t +++ b/t/Macro/Slash_gatewayUrl.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; diff --git a/t/Macro/Spacer.t b/t/Macro/Spacer.t index 6ef495fc8..6dc108c6c 100644 --- a/t/Macro/Spacer.t +++ b/t/Macro/Spacer.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Macro::Spacer; diff --git a/t/Macro/SpectreCheck.t b/t/Macro/SpectreCheck.t index c64a0e6e8..ee5c13d22 100644 --- a/t/Macro/SpectreCheck.t +++ b/t/Macro/SpectreCheck.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; diff --git a/t/Macro/Splat_random.t b/t/Macro/Splat_random.t index 3326c9880..6ccf13a61 100644 --- a/t/Macro/Splat_random.t +++ b/t/Macro/Splat_random.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Macro::Splat_random; diff --git a/t/Macro/Thumbnail.t b/t/Macro/Thumbnail.t index 0faa5213d..21313524a 100644 --- a/t/Macro/Thumbnail.t +++ b/t/Macro/Thumbnail.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Macro::Thumbnail; @@ -48,8 +46,6 @@ cmp_bag($storage->getFiles, ['square.png'], 'Only 1 file in storage with correct ##Initialize an Image Asset with that filename and storage location $session->user({userId=>3}); -my $versionTag = WebGUI::VersionTag->getWorking($session); -$versionTag->set({name=>"Thumbnail macro test"}); my $properties = { # '1234567890123456789012' id => 'ThumbnailAsset00000001', @@ -57,7 +53,7 @@ my $properties = { className => 'WebGUI::Asset::File::Image', url => 'thumbnail-test', }; -my $defaultAsset = WebGUI::Asset->getDefault($session); +my $defaultAsset = WebGUI::Test->asset; $session->asset($defaultAsset); my $asset = $defaultAsset->addChild($properties, $properties->{id}); $asset->update({ @@ -67,9 +63,6 @@ $asset->update({ $asset->generateThumbnail(); -$versionTag->commit; -addToCleanup($versionTag); - ##Call the Thumbnail Macro with that Asset's URL and see if it returns ##the correct URL. diff --git a/t/Macro/TwitterLogin.t b/t/Macro/TwitterLogin.t index 7b50bbb3f..3da37947a 100644 --- a/t/Macro/TwitterLogin.t +++ b/t/Macro/TwitterLogin.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use Test::More; use WebGUI::Test; # Must use this before any other WebGUI modules use WebGUI::Session; diff --git a/t/Macro/URLEncode.t b/t/Macro/URLEncode.t index f5c21668b..58bcff119 100644 --- a/t/Macro/URLEncode.t +++ b/t/Macro/URLEncode.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Macro::URLEncode; diff --git a/t/Macro/User.t b/t/Macro/User.t index 6ffb58797..9afe8b001 100644 --- a/t/Macro/User.t +++ b/t/Macro/User.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Macro::User; diff --git a/t/Macro/UsersOnline.t b/t/Macro/UsersOnline.t index 7bd6e14d6..70a78a7e8 100644 --- a/t/Macro/UsersOnline.t +++ b/t/Macro/UsersOnline.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,20 +8,18 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use JSON; use WebGUI::Test; use WebGUI::International; use WebGUI::Session; -use WebGUI::Session::Var; use WebGUI::User; use WebGUI::Macro::UsersOnline; use Test::More; # increment this value for each test you create +use Test::Exception; my $session = WebGUI::Test->session; @@ -34,12 +32,11 @@ plan tests => 30; # Basic testing ----------------------------------------------------------- # Check for default template -my $defTemplate = WebGUI::Asset->new($session, 'h_T2xtOxGRQ9QJOR6ebLpQ'); -ok(defined $defTemplate, 'default template is present'); +lives_ok { WebGUI::Asset->newById($session, 'h_T2xtOxGRQ9QJOR6ebLpQ'); }, 'default template is present'; # Call with default values my $html = WebGUI::Macro::UsersOnline::process($session); -cmp_ok((length $html), '>', 0, 'call with default template and values returns some output'); +ok($html, 'call with default template and values returns some output'); # Test labels ------------------------------------------------------------- @@ -178,10 +175,10 @@ sub setupUsers { # Create sessions such that users are added to the userSession table foreach (@users) { - my $newSession = WebGUI::Session->open(WebGUI::Test::root, WebGUI::Test::file); + my $newSession = WebGUI::Session->open(WebGUI::Test::file); $newSession->user({user => $_}); } - addToCleanup(@users); + WebGUI::Test->addToCleanup(@users); return @users; } @@ -235,6 +232,6 @@ sub setupJSONtemplate { } EOTMPL my $template = WebGUI::Asset->getImportNode($session)->addChild({className=>'WebGUI::Asset::Template', parser => 'WebGUI::Asset::Template::HTMLTemplate', namespace => 'Macro/UsersOnline', template=>$templateBody}); - addToCleanup($template); + WebGUI::Test->addToCleanup($template); return $template; } diff --git a/t/Macro/ViewCart.t b/t/Macro/ViewCart.t index 063b09421..11c343065 100644 --- a/t/Macro/ViewCart.t +++ b/t/Macro/ViewCart.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; diff --git a/t/Macro/a_account.t b/t/Macro/a_account.t index d0ee0e1ef..82384855d 100644 --- a/t/Macro/a_account.t +++ b/t/Macro/a_account.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; @@ -25,7 +23,7 @@ my $session = WebGUI::Test->session; # <a class="myAccountLink" href="<tmpl_var account.url>"><tmpl_var account.text></a> my $template = addTemplate(); -my $homeAsset = WebGUI::Asset->getDefault($session); +my $homeAsset = WebGUI::Test->asset; $session->asset($homeAsset); @@ -84,22 +82,18 @@ foreach my $testSet (@testSets) { sub addTemplate { $session->user({userId=>3}); - my $importNode = WebGUI::Asset->getImportNode($session); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->set({name=>"a_account test"}); + my $importNode = WebGUI::Test->asset; my $properties = { title => 'a_account test template', className => 'WebGUI::Asset::Template', parser => 'WebGUI::Asset::Template::HTMLTemplate', url => 'a_account-test', namespace => 'Macro/a_account', - template => "HREF=<tmpl_var account.url>\nLABEL=<tmpl_var account.text>", + template => "HREF=<tmpl_var account_url>\nLABEL=<tmpl_var account_text>", id => 'testTemplatea_account1', usePacked => 1, }; my $template = $importNode->addChild($properties, $properties->{id}); - $versionTag->commit; - addToCleanup($versionTag); return $template; } diff --git a/t/Macro/c_companyName.t b/t/Macro/c_companyName.t index d3b22abb1..b97cd3bf8 100644 --- a/t/Macro/c_companyName.t +++ b/t/Macro/c_companyName.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; diff --git a/t/Macro/e_companyEmail.t b/t/Macro/e_companyEmail.t index d54c6f0fa..c50dd74eb 100644 --- a/t/Macro/e_companyEmail.t +++ b/t/Macro/e_companyEmail.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; diff --git a/t/Macro/r_printable.t b/t/Macro/r_printable.t index d13be8562..4dcdb3ec6 100644 --- a/t/Macro/r_printable.t +++ b/t/Macro/r_printable.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Macro::r_printable; @@ -23,7 +21,7 @@ use HTML::TokeParser; my $session = WebGUI::Test->session; -my $homeAsset = WebGUI::Asset->getDefault($session); +my $homeAsset = WebGUI::Test->asset; $session->asset($homeAsset); my $template = setupTest($session, $homeAsset); @@ -111,8 +109,6 @@ foreach my $testSet (@testSets) { sub setupTest { my ($session, $defaultNode) = @_; - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->set({name=>"r_printable test"}); my $properties = { title => 'printable test template', className => 'WebGUI::Asset::Template', @@ -125,8 +121,6 @@ sub setupTest { usePacked => 1, }; my $asset = $defaultNode->addChild($properties, $properties->{id}); - $versionTag->commit; - addToCleanup($versionTag); return $asset; } diff --git a/t/Macro/u_companyUrl.t b/t/Macro/u_companyUrl.t index 2149df6a1..5c3f0a45c 100644 --- a/t/Macro/u_companyUrl.t +++ b/t/Macro/u_companyUrl.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Macro::u_companyUrl; diff --git a/t/Mail/Send.t b/t/Mail/Send.t index 126ff1b15..7007f9ab9 100644 --- a/t/Mail/Send.t +++ b/t/Mail/Send.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 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,21 +12,18 @@ # This script tests the creation, sending, and queuing of mail messages # TODO: There is plenty left to do in this script. use strict; -use FindBin; -use lib "$FindBin::Bin/../lib"; use JSON qw( from_json to_json ); use Test::More; use Test::Deep; -use Data::Dumper; use MIME::Parser; use Encode qw/decode encode/; +use Try::Tiny; use WebGUI::Test; +use WebGUI::Paths; use WebGUI::Mail::Send; -$| = 1; - #---------------------------------------------------------------------------- # Init my $session = WebGUI::Test->session; @@ -34,15 +31,10 @@ my $session = WebGUI::Test->session; my $mail; # The WebGUI::Mail::Send object my $mime; # for getMimeEntity -# See if we have an SMTP server to use -my $hasServer = 0; -eval { WebGUI::Test->prepareMailServer; $hasServer = 1 }; -if ( $@ ) { diag( "Can't prepare mail server: $@" ) } - #---------------------------------------------------------------------------- # Tests -plan tests => 38; # Increment this number for each test you create +plan tests => 40; # Increment this number for each test you create WebGUI::Test->addToCleanup(SQL => 'delete from mailQueue'); @@ -130,6 +122,18 @@ my $dbMail = WebGUI::Mail::Send->retrieve($session, $messageId); is($dbMail->getMimeEntity->head->get('List-ID'), "=?UTF-8?Q?H=C3=84ufige=20Fragen?=\n", 'addHeaderField: handles utf-8 correctly in List-ID'); is($dbMail->getMimeEntity->head->get('Subject'), "=?UTF-8?Q?H=C3=84ufige=20Fragen?=\n", '... in Subject'); +# TODO: Test that addHtml creates a body with the right content type +use utf8; +$mail = WebGUI::Mail::Send->create( $session, { + to => 'norton@localhost', + subject => "H\x{00C4}ufige Fragen", +}); +$mail->addHeaderField('List-ID', "H\x{00C4}ufige Fragen"); +my $messageId = $mail->queue; +my $dbMail = WebGUI::Mail::Send->retrieve($session, $messageId); +is($dbMail->getMimeEntity->head->get('List-ID'), "=?UTF-8?Q?H=C3=84ufige=20Fragen?=\n", 'addHeaderField: handles utf-8 correctly in List-ID'); +is($dbMail->getMimeEntity->head->get('Subject'), "=?UTF-8?Q?H=C3=84ufige=20Fragen?=\n", '... in Subject'); + { my $mail = WebGUI::Mail::Send->create( $session ); ok ! $mail->{_footerAdded}, 'footerAdded flag set to false by default'; @@ -185,14 +189,14 @@ is($dbMail->getMimeEntity->head->get('Subject'), "=?UTF-8?Q?H=C3=84ufige=20Frage $textMail->addText("H\x{00C4}ufige Fragen"); $textMail->addFooter(); is $textMail->getMimeEntity->parts(0)->bodyhandle->as_string, - encode('utf-8', "H\x{00C4}ufige Fragen\n\n"), + encode('utf8', "H\x{00C4}ufige Fragen\n\n"), 'check that adding a footer does not double encode the body when it is text'; my $htmlMail = WebGUI::Mail::Send->create( $session ); $htmlMail->addHtml("__H\x{00C4}ufige Fragen__"); $htmlMail->addFooter(); my ($encoded_segment) = $htmlMail->getMimeEntity->parts(0)->bodyhandle->as_string =~ /__([^_]+)__/; is $encoded_segment, - encode('utf-8', "H\x{00C4}ufige Fragen"), + encode('utf8', "H\x{00C4}ufige Fragen"), '... similarly with an html body'; $session->setting->set('mailFooter', $origFooter); } @@ -222,134 +226,113 @@ my $smtpServerOk = 0; #---------------------------------------------------------------------------- # Test emailOverride SKIP: { - my $numtests = 2; # Number of tests in this block - - # Must be able to write the config, or we'll die - if ( !-w File::Spec->catfile( WebGUI::Test::root, 'etc', WebGUI::Test::file() ) ) { - skip "Cannot test emailOverride: Can't write new configuration value", $numtests; + try { + require WebGUI::Test::MailServer; + $smtpServerOk = 1; } + catch { + skip "Cannot run live SMTP tests: $_", 6; + }; - # Must have an SMTP server, or it's pointless - if ( !$hasServer ) { - skip "Cannot test emailOverride: Module Net::SMTP::Server not loaded!", $numtests; - } + WebGUI::Test::MailServer::test_smtp($session, sub { + my $cb = shift; - sleep 1; - $smtpServerOk = 1; + # Override the emailOverride + $session->config->set( 'emailOverride', 'dufresne@localhost' ); - # Override the emailOverride - my $oldEmailOverride = $session->config->get('emailOverride'); - $session->config->set( 'emailOverride', 'dufresne@localhost' ); + # Send the mail + my $mail + = WebGUI::Mail::Send->create( $session, { + to => 'norton@localhost', + } ); + $mail->addText( 'His judgement cometh and that right soon.' ); - # Send the mail - my $mail - = WebGUI::Mail::Send->create( $session, { - to => 'norton@localhost', - } ); - $mail->addText( 'His judgement cometh and that right soon.' ); + $mail->send; + my $received = $cb->(); - $mail->send; - my $received = WebGUI::Test->getMail; + # Test the mail + like( $received->{to}->[0], qr/dufresne\@localhost/, + "Email TO: address is overridden", + ); - if (!$received) { - skip "Cannot test emailOverride: No response received from smtpd", $numtests; - } + my $parser = MIME::Parser->new(); + $parser->output_to_core(1); + my $parsed_message = $parser->parse_data($received->{contents}); + my $head = $parsed_message->head; + my $messageId = decode('MIME-Header', $head->get('Message-Id')); + like ($messageId, qr/^<WebGUI-([a-zA-Z0-9\-_]){22}@\w+\.\w{2,4}>$/, 'Message-Id is valid'); - # Test the mail - like( $received->{to}->[0], qr/dufresne\@localhost/, - "Email TO: address is overridden", - ); + $session->config->delete( 'emailOverride' ); - my $parser = MIME::Parser->new(); - $parser->output_to_core(1); - my $parsed_message = $parser->parse_data($received->{contents}); - my $head = $parsed_message->head; - my $messageId = decode('MIME-Header', $head->get('Message-Id')); - like ($messageId, qr/^<WebGUI-([a-zA-Z0-9\-_]){22}@\w+\.\w{2,4}>$/, 'Message-Id is valid'); + # Send the mail + $mail + = WebGUI::Mail::Send->create( $session, { + to => 'norton@localhost', + } ); + $mail->addText( "I understand you're a man who knows how to get things." ); - # Restore the emailOverride - $session->config->set( 'emailOverride', $oldEmailOverride ); -} + $mail->send; + $received = $cb->(); -SKIP: { - my $numtests = 4; # Number of tests in this block + # Test the mail + my $parsed_message = $received->{parsed}; + my $head = $parsed_message->head; + my $messageId = decode('MIME-Header', $head->get('Message-Id')); + chomp $messageId; + like ($messageId, qr/^<WebGUI-([a-zA-Z0-9\-_]){22}@\w+\.\w{2,4}>$/, 'generated Message-Id is valid'); - skip "Cannot test message ids", $numtests unless $smtpServerOk; + # Send the mail + $mail + = WebGUI::Mail::Send->create( $session, { + to => 'norton@localhost', + messageId => '<leadingAngleOnly@localhost.localdomain', + } ); + $mail->addText( "What say you there, fuzzy-britches? Feel like talking?" ); - # Send the mail - my $mail - = WebGUI::Mail::Send->create( $session, { - to => 'norton@localhost', - } ); - $mail->addText( "I understand you're a man who knows how to get things." ); + $mail->send; + $received = $cb->(); - $mail->send; - my $received = WebGUI::Test->getMail; + $parsed_message = $received->{parsed}; + $head = $parsed_message->head; + $messageId = decode('MIME-Header', $head->get('Message-Id')); + chomp $messageId; + is($messageId, '<leadingAngleOnly@localhost.localdomain>', 'bad messageId corrected (added ending angle)'); - if (!$received) { - skip "Cannot test messageIds: No response received from smtpd", $numtests; - } + # Send the mail + $mail + = WebGUI::Mail::Send->create( $session, { + to => 'norton@localhost', + messageId => 'endingAngleOnly@localhost.localdomain>', + } ); + $mail->addText( "Dear Warden, You were right. Salvation lies within." ); - # Test the mail - my $parser = MIME::Parser->new(); - $parser->output_to_core(1); - my $parsed_message = $parser->parse_data($received->{contents}); - my $head = $parsed_message->head; - my $messageId = decode('MIME-Header', $head->get('Message-Id')); - chomp $messageId; - like ($messageId, qr/^<WebGUI-([a-zA-Z0-9\-_]){22}@\w+\.\w{2,4}>$/, 'generated Message-Id is valid'); + $mail->send; + $received = $cb->(); - # Send the mail - $mail - = WebGUI::Mail::Send->create( $session, { - to => 'norton@localhost', - messageId => '<leadingAngleOnly@localhost.localdomain', - } ); - $mail->addText( "What say you there, fuzzy-britches? Feel like talking?" ); + $parsed_message = $received->{parsed}; + $parsed_message = $parser->parse_data($received->{contents}); + $head = $parsed_message->head; + $messageId = decode('MIME-Header', $head->get('Message-Id')); + chomp $messageId; + is($messageId, '<endingAngleOnly@localhost.localdomain>', 'bad messageId corrected (added starting angle)'); - $mail->send; - $received = WebGUI::Test->getMail; + # Send the mail + $mail + = WebGUI::Mail::Send->create( $session, { + to => 'red@localhost', + messageId => 'noAngles@localhost.localdomain', + } ); + $mail->addText( "Neither are they. You have to be human first. They don't qualify." ); - $parsed_message = $parser->parse_data($received->{contents}); - $head = $parsed_message->head; - $messageId = decode('MIME-Header', $head->get('Message-Id')); - chomp $messageId; - is($messageId, '<leadingAngleOnly@localhost.localdomain>', 'bad messageId corrected (added ending angle)'); - - # Send the mail - $mail - = WebGUI::Mail::Send->create( $session, { - to => 'norton@localhost', - messageId => 'endingAngleOnly@localhost.localdomain>', - } ); - $mail->addText( "Dear Warden, You were right. Salvation lies within." ); - - $mail->send; - $received = WebGUI::Test->getMail; - - $parsed_message = $parser->parse_data($received->{contents}); - $head = $parsed_message->head; - $messageId = decode('MIME-Header', $head->get('Message-Id')); - chomp $messageId; - is($messageId, '<endingAngleOnly@localhost.localdomain>', 'bad messageId corrected (added starting angle)'); - - # Send the mail - $mail - = WebGUI::Mail::Send->create( $session, { - to => 'red@localhost', - messageId => 'noAngles@localhost.localdomain', - } ); - $mail->addText( "Neither are they. You have to be human first. They don't qualify." ); - - $mail->send; - $received = WebGUI::Test->getMail; - - $parsed_message = $parser->parse_data($received->{contents}); - $head = $parsed_message->head; - $messageId = decode('MIME-Header', $head->get('Message-Id')); - chomp $messageId; - is($messageId, '<noAngles@localhost.localdomain>', 'bad messageId corrected (added both angles)'); + $mail->send; + $received = $cb->(); + $parsed_message = $received->{parsed}; + $head = $parsed_message->head; + $messageId = decode('MIME-Header', $head->get('Message-Id')); + chomp $messageId; + is($messageId, '<noAngles@localhost.localdomain>', 'bad messageId corrected (added both angles)'); + }); } #---------------------------------------------------------------------------- @@ -382,24 +365,24 @@ WebGUI::Test->addToCleanup($inboxGroup); $inboxGroup->addUsers([$emailUser->userId, $inboxUser->userId, $lonelyUser->userId]); SKIP: { - my $numtests = 1; # Number of tests in this block + skip "Cannot test email notifications", 1 unless $smtpServerOk; - # Must be able to write the config, or we'll die - skip "Cannot test email notifications", $numtests unless $smtpServerOk; + WebGUI::Test::MailServer::test_smtp($session, sub { + my $cb = shift; + # Send the mail + $mail = WebGUI::Mail::Send->create( $session, { + toUser => $inboxUser->userId, + }, + 'fromInbox', + ); + $mail->addText( 'sent via email' ); - # Send the mail - $mail = WebGUI::Mail::Send->create( $session, { - toUser => $inboxUser->userId, - }, - 'fromInbox', - ); - $mail->addText( 'sent via email' ); + $mail->send; + my $received = $cb->(); - $mail->send; - my $received = WebGUI::Test->getMail; - - # Test the mail - is($received->{to}->[0], '<ellis_boyd_redding@shawshank.gov>', 'send, toUser with email address'); + # Test the mail + is($received->{to}->[0], '<ellis_boyd_redding@shawshank.gov>', 'send, toUser with email address'); + }); } #---------------------------------------------------------------------------- @@ -443,11 +426,8 @@ cmp_bag( 'send: when the original is sent, new messages are created for each user in the group, following their user profile settings' ); -SKIP: { - my $numtests = 2; # Number of tests in this block - - skip "Cannot test making emails single part", $numtests unless $smtpServerOk; - +WebGUI::Test::MailServer::test_smtp($session, sub { + my $cb = shift; # Send the mail my $mail = WebGUI::Mail::Send->create( $session, { @@ -457,24 +437,16 @@ SKIP: { ok ($mail->getMimeEntity->is_multipart, 'starting with a multipart message'); $mail->send; - my $received = WebGUI::Test->getMail; + my $received = $cb->(); - if (!$received) { - skip "Cannot making single part: No response received from smtpd", $numtests; - } - - # Test the mail my $parser = MIME::Parser->new(); $parser->output_to_core(1); my $parsed_message = $parser->parse_data($received->{contents}); ok (!$parsed_message->is_multipart, 'converted to singlepart since it only has 1 part.'); -} - -SKIP: { - my $numtests = 2; # Number of tests in this block - - skip "Cannot test making emails single part", $numtests unless $smtpServerOk; +}); +WebGUI::Test::MailServer::test_smtp($session, sub { + my $cb = shift; # Send the mail my $mail = WebGUI::Mail::Send->create( $session, { @@ -485,17 +457,12 @@ SKIP: { ok ($mail->getMimeEntity->is_multipart, 'starting with a multipart message'); $mail->send; - my $received = WebGUI::Test->getMail; + my $received = $cb->(); - if (!$received) { - skip "Cannot making single part: No response received from smtpd", $numtests; - } - - # Test the mail my $parser = MIME::Parser->new(); $parser->output_to_core(1); my $parsed_message = $parser->parse_data($received->{contents}); ok ( $parsed_message->is_multipart, 'left as multipart since it has more than 1 part'); -} +}); # TODO: Test the emailToLog config setting diff --git a/t/Operation/AdSpace.t b/t/Operation/AdSpace.t index a07fe923f..48da9b96e 100644 --- a/t/Operation/AdSpace.t +++ b/t/Operation/AdSpace.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use Test::More; use WebGUI::Test; # Must use this before any other WebGUI modules use WebGUI::Session; diff --git a/t/Operation/Auth.t b/t/Operation/Auth.t index 495562d7c..95a965d83 100644 --- a/t/Operation/Auth.t +++ b/t/Operation/Auth.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use Test::More; use WebGUI::Test; # Must use this before any other WebGUI modules use WebGUI::Session; @@ -87,13 +85,15 @@ $session->user({ userId => 3 }); isa_ok( WebGUI::Operation::Auth::getInstance( $session ), 'WebGUI::Auth::WebGUI', - 'AuthType is defined by the logged-in user', + 'AuthType is defined by the logged-in user, despite being in request', ); #---------------------------------------------------------------------------- # Test the web method for auth operation # First a clean session, without an authenticated user $session->user({ userId => 1 }); +$session->request->setup_body({}); + my $output = WebGUI::Operation::Auth::www_auth($session); like( $output, diff --git a/t/Operation/Settings.t b/t/Operation/Settings.t new file mode 100644 index 000000000..d86c1577c --- /dev/null +++ b/t/Operation/Settings.t @@ -0,0 +1,72 @@ +# vim:syntax=perl +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 +#------------------------------------------------------------------ + +# Write a little about what this script tests. +# +# + +use FindBin; +use strict; +use lib "$FindBin::Bin/lib"; +use Test::More; +use Test::Deep; +use WebGUI::Test; # Must use this before any other WebGUI modules +use WebGUI::Test::Mechanize; +use WebGUI::Session; + +#---------------------------------------------------------------------------- +# Init +my $session = WebGUI::Test->session; + + +#---------------------------------------------------------------------------- +# Tests + +#---------------------------------------------------------------------------- +# Edit some settings up in here + +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get_ok( '/' ); +$mech->session->user({ userId => 3 }); + +my %newSettings = ( + # Test some normal settings + companyName => 'Shawshank Penetentiary', + companyEmail => 'warden@shawshank.justice.gov', + + # Test some Auth settings + facebookAuthEnabled => 1, + ldapConnection => 'SOME_RANDOM_ID', + twitterEnabled => 1, + webguiPasswordLength => 9_001, + + # Test some Account settings + overrideAbleToBeFriend => 1, + inboxInviteUserSubject => 'Your incarceration adventure begins here!', +); + +$mech->get_ok( '/?op=editSettings' ); +$mech->submit_form_ok({ + fields => \%newSettings, + }, + "Settings edited" +); + +my $testSettings = $session->db->buildHashRef("select * from settings", [], {noOrder => 1}); +cmp_deeply( + $testSettings, + superhashof( \%newSettings ), + "Settings are set", +); + +done_testing; + +#vim:ft=perl diff --git a/t/Operation/User.t b/t/Operation/User.t index e9a919e7d..969413372 100644 --- a/t/Operation/User.t +++ b/t/Operation/User.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -9,46 +9,96 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------ -# This tests the operation of Authentication -# -# +# Test the User operation -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; -use Test::More; -use Test::Deep; -use Exception::Class; - use WebGUI::Test; # Must use this before any other WebGUI modules use WebGUI::Session; +use WebGUI::Test::Mechanize; use WebGUI::User; use WebGUI::Operation::User; +use Test::More; +use Test::Deep; #---------------------------------------------------------------------------- # Init my $session = WebGUI::Test->session; $session->user({ userId => 3 }); +#---------------------------------------------------------------------------- +# Tests + +#---------------------------------------------------------------------------- +# Create a new user +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get_ok( '/' ); +$mech->session->user({userId => 3}); + +$mech->get_ok( '?op=editUser;uid=new' ); +my %fields = ( + username => 'AndrewDufresne', + email => 'andy@shawshank.doj.gov', + alias => 'Randall Stevens', + status => 'Active', + ); +$mech->submit_form_ok({ + fields => { + %fields, + 'authWebGUI.identifier' => 'zihuatanejo', + groupsToAdd => '12', + }, + }, + "Add a new user", +); + +ok( my $user = WebGUI::User->newByUsername( $session, 'AndrewDufresne' ), "user exists" ); +WebGUI::Test->addToCleanup( $user ); +is( $user->get('email'), $fields{email}, 'checking email' ); +is( $user->get('alias'), $fields{alias}, '... alias' ); +is( $user->status, $fields{status}, '... status' ); +ok( $user->isInGroup( 12 ), '... added to group 12' ); +my $auth = WebGUI::Auth::WebGUI->new( $session, $user ); +is( $auth->get('identifier'), $auth->hashPassword('zihuatanejo'), "password was set correctly" ); + +# Edit an existing user +$mech->get_ok( '?op=editUser;uid=' . $user->getId ); +%fields = ( + username => "EllisRedding", + email => 'red@shawshank.doj.gov', + alias => 'Red', + status => 'Active', +); +$mech->submit_form_ok({ + fields => { + %fields, + 'authWebGUI.identifier' => 'rehabilitated', + groupsToDelete => '12', + }, + }, + "Edit an existing user", +); + +ok( my $user = WebGUI::User->newByUsername( $mech->session, 'EllisRedding' ), "user exists" ); +is( $user->get('email'), $fields{email}, '... checking email' ); +is( $user->get('alias'), $fields{alias}, '... checking alias' ); +is( $user->status, $fields{status}, '... checking status' ); +ok( not ($user->isInGroup( 12 )), '.. checking group deletion' ); +$auth = WebGUI::Auth::WebGUI->new( $session, $user ); +is( $auth->get('identifier'), $auth->hashPassword('rehabilitated'), "password was set correctly" ); + +####################################################################### +# +# Address testing in the profile +# +####################################################################### + my $andy = WebGUI::User->new($session, "new"); WebGUI::Test->addToCleanup($andy); $andy->username("andydufresne"); -#---------------------------------------------------------------------------- -# Tests +$mech->get_ok( '?op=editUser;uid=' . $andy->getId ); -plan tests => 10; # Increment this number for each test you create - -#---------------------------------------------------------------------------- - - -####################################################################### -# -# www_editUserSave -# -####################################################################### - -tie my %profile_info, "Tie::IxHash", ( +my %profile_info = ( firstName => "Andy", lastName => "Dufresne", homeAddress => "123 Shank Ave.", @@ -59,22 +109,19 @@ tie my %profile_info, "Tie::IxHash", ( homePhone => "111-111-1111", email => 'andy@shawshank.com' ); - -$session->request->setup_body({ - uid => $andy->getId, - username => $andy->username, - webguiCsrfToken => $session->scratch->get('webguiCsrfToken'), - %profile_info -}); -$session->request->method('POST'); - -WebGUI::Operation::User::www_editUserSave($session); +$mech->submit_form_ok({ + fields => { + %profile_info, + }, + }, + "Edit an existing user for address testing", +); $andy = WebGUI::User->new($session,$andy->getId); #Test that the address was saved to the profile cmp_bag( - [ map { $andy->profileField($_) } keys %profile_info ], + [ map { $andy->get($_) } keys %profile_info ], [ values %profile_info ], 'Profile fields were saved' ); @@ -94,6 +141,7 @@ my @addresses = @{ $book->getAddresses() }; is(scalar(@addresses), 1 , "One address was created in the address book"); my $address = $addresses[0]; +ok ($address->get('isProfile'), '... and it is a profile address'); tie my %address_info, "Tie::IxHash", ( firstName => $address->get("firstName"), @@ -111,7 +159,7 @@ tie my %address_info, "Tie::IxHash", ( cmp_bag( [ values %profile_info ], [ values %address_info ], - 'Shop address was has the right information' + 'Shop address has the right information' ); #Test that the address is returned as the profile address @@ -139,21 +187,21 @@ is( homePhone => "222-222-2222", email => 'andy@freeman.com' ); +$mech->get_ok( '?op=editUser;uid=' . $andy->getId ); +$mech->submit_form_ok({ + fields => { + %profile_info, + }, + }, + "Update existing address info", +); -$session->request->setup_body({ - uid => $andy->getId, - username => $andy->username, - webguiCsrfToken => $session->scratch->get('webguiCsrfToken'), - %profile_info -}); -$session->request->method('POST'); -WebGUI::Operation::User::www_editUserSave($session); $andy = WebGUI::User->new($session,$andy->getId); #Test that the address was saved to the profile cmp_bag ( - [ map { $andy->profileField($_) } keys %profile_info ], + [ map { $andy->get($_) } keys %profile_info ], [ values %profile_info ], 'Profile fields were updated' ); @@ -190,5 +238,7 @@ my $address = $addresses[0]; cmp_bag( [ values %profile_info ], [ values %address_info ], - 'Shop address was has the right information' + 'Shop address has the right information' ); + +done_testing; diff --git a/t/Operation/User/service.t b/t/Operation/User/service.t index 23494198c..a5d023a6f 100644 --- a/t/Operation/User/service.t +++ b/t/Operation/User/service.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use Test::More; use Test::Deep; use WebGUI::Test; # Must use this before any other WebGUI modules @@ -29,7 +27,6 @@ use Data::Dumper; #---------------------------------------------------------------------------- # Init my $session = WebGUI::Test->session; -WebGUI::Test->originalConfig( "serviceSubnets" ); $session->config->delete('serviceSubnets'); my ( $response, $responseObj, $auth, $userAndy, $userRed ); @@ -46,7 +43,7 @@ plan tests => 56; # Increment this number for each test you create # - user $session->user({ userId => 1 }); $response = WebGUI::Operation::User::www_ajaxCreateUser( $session ); -is( $session->http->getMimeType, 'application/json', "Correct mime type (default: json)" ); +is( $session->response->content_type, 'application/json', "Correct mime type (default: json)" ); cmp_deeply( JSON->new->decode( $response ), { @@ -57,14 +54,14 @@ cmp_deeply( ); # - serviceSubnets -$ENV{REMOTE_ADDR} = '2.2.2.2'; +$session->request->env->{REMOTE_ADDR} = '2.2.2.2'; $session->config->set('serviceSubnets',['1.1.1.1/32']); $session->user({ userId => 3 }); $session->request->setup_body({ as => "xml", }); $response = WebGUI::Operation::User::www_ajaxCreateUser( $session ); -is( $session->http->getMimeType, 'application/xml', "Correct mime type (as => xml)" ); +is( $session->response->content_type, 'application/xml', "Correct mime type (as => xml)" ); cmp_deeply( XML::Simple::XMLin( $response ), { @@ -85,7 +82,7 @@ $session->request->setup_body({ }); $session->user({ userId => 3 }); $response = WebGUI::Operation::User::www_ajaxCreateUser( $session ); -is( $session->http->getMimeType, 'application/json', "Correct mime type (as => json)" ); +is( $session->response->content_type, 'application/json', "Correct mime type (as => json)" ); cmp_deeply( JSON->new->decode( $response ), { @@ -102,7 +99,7 @@ $session->request->setup_body({ firstName => 'Jake', }); $response = WebGUI::Operation::User::www_ajaxCreateUser( $session ); -is( $session->http->getMimeType, 'application/json', "Correct mime type (default: json)" ); +is( $session->response->content_type, 'application/json', "Correct mime type (default: json)" ); cmp_deeply( JSON->new->decode( $response ), { @@ -124,7 +121,7 @@ $session->request->setup_body({ 'auth:LDAP:connectDN' => 'u=andy;o=block-e;dc=shawshank;dc=me', }); $response = WebGUI::Operation::User::www_ajaxCreateUser( $session ); -is( $session->http->getMimeType, 'application/json', "Correct mime type (default: json" ); +is( $session->response->content_type, 'application/json', "Correct mime type (default: json" ); $responseObj = JSON->new->decode( $response ); cmp_deeply( $responseObj, @@ -156,7 +153,7 @@ $session->request->setup_body({ 'auth:LDAP:connectDN' => 'u=red;o=block-e;dc=shawshank;dc=me', }); $response = WebGUI::Operation::User::www_ajaxCreateUser( $session ); -is( $session->http->getMimeType, 'application/json', "Correct mime type (default: json" ); +is( $session->response->content_type, 'application/json', "Correct mime type (default: json" ); $responseObj = JSON->new->decode( $response ); cmp_deeply( $responseObj, @@ -186,7 +183,7 @@ is( $auth->getParams->{connectDN}, 'u=red;o=block-e;dc=shawshank;dc=me', "Auth p # - user $session->user({ userId => 1 }); $response = WebGUI::Operation::User::www_ajaxUpdateUser( $session ); -is( $session->http->getMimeType, 'application/json', "Correct mime type (default: json)" ); +is( $session->response->content_type, 'application/json', "Correct mime type (default: json)" ); cmp_deeply( JSON->new->decode( $response ), { @@ -197,14 +194,14 @@ cmp_deeply( ); # - serviceSubnets -$ENV{REMOTE_ADDR} = '2.2.2.2'; +$session->request->env->{REMOTE_ADDR} = '2.2.2.2'; $session->config->set('serviceSubnets',['1.1.1.1/32']); $session->user({ userId => 3 }); $session->request->setup_body({ as => "xml", }); $response = WebGUI::Operation::User::www_ajaxUpdateUser( $session ); -is( $session->http->getMimeType, 'application/xml', "Correct mime type (as => xml)" ); +is( $session->response->content_type, 'application/xml', "Correct mime type (as => xml)" ); cmp_deeply( XML::Simple::XMLin( $response ), { @@ -225,7 +222,7 @@ $session->request->setup_body({ }); $session->user({ userId => 3 }); $response = WebGUI::Operation::User::www_ajaxUpdateUser( $session ); -is( $session->http->getMimeType, 'application/json', "Correct mime type (as => json)" ); +is( $session->response->content_type, 'application/json', "Correct mime type (as => json)" ); cmp_deeply( JSON->new->decode( $response ), { @@ -244,7 +241,7 @@ $session->request->setup_body({ }); $session->user({ userId => 3 }); $response = WebGUI::Operation::User::www_ajaxUpdateUser( $session ); -is( $session->http->getMimeType, 'application/json', "Correct mime type (default: json)" ); +is( $session->response->content_type, 'application/json', "Correct mime type (default: json)" ); cmp_deeply( JSON->new->decode( $response ), { @@ -266,7 +263,7 @@ $session->request->setup_body({ 'auth:LDAP:connectDN' => 'u=rich;o=escapee;dc=shawshank;dc=me', }); $response = WebGUI::Operation::User::www_ajaxUpdateUser( $session ); -is( $session->http->getMimeType, 'application/json', "Correct mime type (default: json" ); +is( $session->response->content_type, 'application/json', "Correct mime type (default: json" ); $responseObj = JSON->new->decode( $response ); cmp_deeply( $responseObj, @@ -297,7 +294,7 @@ $session->request->setup_body({ 'auth:LDAP:connectDN' => 'u=red;o=parollee;dc=shawshank;dc=me', }); $response = WebGUI::Operation::User::www_ajaxUpdateUser( $session ); -is( $session->http->getMimeType, 'application/json', "Correct mime type (default: json" ); +is( $session->response->content_type, 'application/json', "Correct mime type (default: json" ); $responseObj = JSON->new->decode( $response ); cmp_deeply( $responseObj, @@ -326,7 +323,7 @@ is( $auth->getParams->{connectDN}, 'u=red;o=parollee;dc=shawshank;dc=me', "Auth # - user $session->user({ userId => 1 }); $response = WebGUI::Operation::User::www_ajaxDeleteUser( $session ); -is( $session->http->getMimeType, 'application/json', "Correct mime type (default: json)" ); +is( $session->response->content_type, 'application/json', "Correct mime type (default: json)" ); cmp_deeply( JSON->new->decode( $response ), { @@ -337,14 +334,14 @@ cmp_deeply( ); # - serviceSubnets -$ENV{REMOTE_ADDR} = '2.2.2.2'; +$session->request->env->{REMOTE_ADDR} = '2.2.2.2'; $session->config->set('serviceSubnets',['1.1.1.1/32']); $session->user({ userId => 3 }); $session->request->setup_body({ as => "xml", }); $response = WebGUI::Operation::User::www_ajaxDeleteUser( $session ); -is( $session->http->getMimeType, 'application/xml', "Correct mime type (as => xml)" ); +is( $session->response->content_type, 'application/xml', "Correct mime type (as => xml)" ); cmp_deeply( XML::Simple::XMLin( $response ), { @@ -363,7 +360,7 @@ $session->request->setup_body({ }); $session->user({ userId => 3 }); $response = WebGUI::Operation::User::www_ajaxDeleteUser( $session ); -is( $session->http->getMimeType, 'application/json', "Correct mime type (as => json)" ); +is( $session->response->content_type, 'application/json', "Correct mime type (as => json)" ); cmp_deeply( JSON->new->decode( $response ), { @@ -380,7 +377,7 @@ $session->request->setup_body({ }); $session->user({ userId => 3 }); $response = WebGUI::Operation::User::www_ajaxDeleteUser( $session ); -is( $session->http->getMimeType, 'application/json', "Correct mime type (default: json)" ); +is( $session->response->content_type, 'application/json', "Correct mime type (default: json)" ); cmp_deeply( JSON->new->decode( $response ), { @@ -397,7 +394,7 @@ $session->request->setup_body({ }); $session->user({ userId => 3 }); $response = WebGUI::Operation::User::www_ajaxDeleteUser( $session ); -is( $session->http->getMimeType, 'application/json', "Correct mime type (default: json)" ); +is( $session->response->content_type, 'application/json', "Correct mime type (default: json)" ); cmp_deeply( JSON->new->decode( $response ), { @@ -414,7 +411,7 @@ $session->request->setup_body({ }); $session->user({ userId => 3 }); $response = WebGUI::Operation::User::www_ajaxDeleteUser( $session ); -is( $session->http->getMimeType, 'application/json', "Correct mime type (default: json)" ); +is( $session->response->content_type, 'application/json', "Correct mime type (default: json)" ); cmp_deeply( JSON->new->decode( $response ), { @@ -430,7 +427,7 @@ $session->request->setup_body({ userId => $userAndy->getId, }); $response = WebGUI::Operation::User::www_ajaxDeleteUser( $session ); -is( $session->http->getMimeType, 'application/json', 'Correct mime type (default: json)' ); +is( $session->response->content_type, 'application/json', 'Correct mime type (default: json)' ); cmp_deeply( JSON->new->decode( $response ), { @@ -444,7 +441,7 @@ $session->request->setup_body({ userId => $userRed->getId, }); $response = WebGUI::Operation::User::www_ajaxDeleteUser( $session ); -is( $session->http->getMimeType, 'application/json', 'Correct mime type (default: json)' ); +is( $session->response->content_type, 'application/json', 'Correct mime type (default: json)' ); cmp_deeply( JSON->new->decode( $response ), { diff --git a/t/Operation/Workflow.t b/t/Operation/Workflow.t new file mode 100644 index 000000000..2107c3318 --- /dev/null +++ b/t/Operation/Workflow.t @@ -0,0 +1,92 @@ +# vim:syntax=perl +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 +#------------------------------------------------------------------ + +# Test the forms for Workflow editing +# +# + +use FindBin; +use strict; +use lib "$FindBin::Bin/lib"; +use Test::More; +use WebGUI::Test; # Must use this before any other WebGUI modules +use WebGUI::Session; +use WebGUI::Test::Mechanize; + +#---------------------------------------------------------------------------- +# Init +my $session = WebGUI::Test->session; + +#---------------------------------------------------------------------------- +# Tests + +plan tests => 14; # Increment this number for each test you create + +#---------------------------------------------------------------------------- +# Add a workflow +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get_ok( '/' ); +$mech->session->user({ userId => 3 }); + +$mech->get_ok( '?op=addWorkflow' ); +$mech->submit_form_ok({ + fields => { + type => "None", + }, + }, + "Add a new workflow" +); + +my $workflowId = $mech->value( 'workflowId' ); +ok( $workflowId, "workflow id in edit form" ); +ok( my $workflow = WebGUI::Workflow->new( $mech->session, $workflowId ), "can be instanced" ); +WebGUI::Test::addToCleanup( $workflow ); +is( $workflow->get('type'), "None", "type set correctly" ); + +my %workflowFields = ( + title => 'New Test Workflow', + description => 'Descriptive', +); +$mech->submit_form_ok({ + fields => \%workflowFields, + }, + "Update the new workflow's name and settings", +); + +$workflow = WebGUI::Workflow->new( $mech->session, $workflowId ); +is( $workflow->get('title'), $workflowFields{title}, "title set correctly" ); +is( $workflow->get('description'), $workflowFields{description}, "description set correctly" ); + +# Add an activity +$mech->follow_link_ok( + { + url_regex => qr/WebGUI::Workflow::Activity::DeleteExpiredSessions/, + }, + "Add a DeleteExpiredSessions activity", +); + +my %activityFields = ( + title => 'New Workflow Activity', + description => 'As if you needed one.', +); +$mech->submit_form_ok({ + fields => \%activityFields, + }, + "Edit the activity properties", +); + +my $activities = $workflow->getActivities; +is( @$activities, 1, 'workflow has one activity' ); +is( $activities->[0]->get('title'), $activityFields{title}, "activity title set" ); +is( $activities->[0]->get('description'), $activityFields{description}, "activity description set" ); + + +#vim:ft=perl diff --git a/t/POD.t b/t/POD.t index 5d08edd07..b9ab1c6e5 100644 --- a/t/POD.t +++ b/t/POD.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/lib"; use WebGUI::Test; use Test::More; @@ -23,18 +21,18 @@ my $threshold = $ENV{POD_COVERAGE} == 2 ? 0.9999 : 0; my @modules = (); -find(\&countModules, File::Spec->catdir( WebGUI::Test->lib, 'WebGUI' ) ); +my $lib_path = WebGUI::Test->lib; +find(\&countModules, $lib_path ); my $moduleCount = scalar(@modules); plan tests => $moduleCount; -use Data::Dumper; foreach my $package (sort @modules) { my $pc = Pod::Coverage->new( package => $package, - also_private => [ qr/definition/ ], + also_private => [ qr/^definition$/, qr/^run$/], nonwhitespace => ($ENV{POD_COVERAGE} == 3 ? 1 : 0), ); my $coverage = $pc->coverage > $threshold; - my $goodReason = $pc->why_unrated() eq 'no public symbols defined'; + my $goodReason = $pc->why_unrated() eq'no public symbols defined'; SKIP: { skip "No subroutines found by Devel::Symdump for $package", 1 if $goodReason; ok($coverage, sprintf "%s has %d%% POD coverage", $package, $pc->coverage*100); @@ -51,8 +49,8 @@ sub countModules { return unless $filename =~ m/\.pm$/; return if $filename =~ m/WebGUI\/i18n/; return if $filename =~ m/WebGUI\/Help/; - my $package = $filename; - $package =~ s/^.*(WebGUI.*)\.pm$/$1/; + my $package = File::Spec->abs2rel($filename, $lib_path); $package =~ s/\//::/g; + $package =~ s/\.pm$//; push(@modules,$package); } diff --git a/t/PSGI/ConfigMiddleware.t b/t/PSGI/ConfigMiddleware.t new file mode 100644 index 000000000..0555e04c0 --- /dev/null +++ b/t/PSGI/ConfigMiddleware.t @@ -0,0 +1,46 @@ +use strict; +use warnings; +use Test::More tests => 3; + +use Plack::Test; +use Plack::Util; +use HTTP::Request::Common; +use WebGUI::Paths; +use WebGUI::Test; + +SKIP: { + skip 'set WEBGUI_LIVE to enable these tests', 3 unless $ENV{WEBGUI_LIVE}; + + my $session = WebGUI::Test->session; + $session->config->addToArray( 'plackMiddleware', '+WebGUI::Middleware::SHOUTING' ); + + local $ENV{WEBGUI_CONFIG} = WebGUI::Test->file; # tell the share/site.psgi which site to load + + my $app = Plack::Util::load_psgi( WebGUI::Paths->defaultPSGI ); + + ok( $app, "created a PSGI app from app.psgi" ); + + test_psgi $app, sub { + my $cb = shift; + my $res = $cb->( GET "/home" ); + is $res->code, 200, 'able to fetch pages with WebGUI::Middleware::SHOUTING installed'; + like $res->content, qr/EASY TO USE WEB APPLICATION FRAMEWORK/, 'contains the text "EASY TO USE WEB APPLICATION FRAMEWORK"'; + }; + + $session->config->deleteFromArray( 'plackMiddleware', '+WebGUI::Middleware::SHOUTING' ); +} + +package WebGUI::Middleware::SHOUTING; +BEGIN { $INC{'WebGUI/Middleware/SHOUTING.pm'} = __FILE__; }; + +use parent 'Plack::Middleware'; + +sub call { + my($self, $env) = @_; + my $res = $self->app->($env); + for ( ref $res->[2] ? @{ $res->[2] } : ( $res->[2] ) ) { + s{>(.*?)<}{'>' . uc($1) . '<'}gse; + } + return $res; +} + diff --git a/t/PSGI/Http.t b/t/PSGI/Http.t new file mode 100644 index 000000000..dc4ea874f --- /dev/null +++ b/t/PSGI/Http.t @@ -0,0 +1,68 @@ +use strict; +use warnings; +use Test::More tests => 7; + +use Plack::Test; +use Plack::Util; +use HTTP::Request::Common; +use WebGUI::Paths; +use WebGUI::Test; + +# test things about responses +# this is like t/Session/Http.t but Plack specific + +SKIP: { + skip 'set WEBGUI_LIVE to enable these tests', 7 unless $ENV{WEBGUI_LIVE}; + + my $session = WebGUI::Test->session; + + my $prev_streaming_uploads = $session->config->get('enableStreamingUploads'); + + local $ENV{WEBGUI_CONFIG} = WebGUI::Test->file; # tell the share/site.psgi which site to load + + # + # fire up a Plack to test streaming + # + + $session->config->set('enableStreamingUploads', 1); + + my $app = Plack::Util::load_psgi( WebGUI::Paths->defaultPSGI ); + + ok( $app, "created a PSGI app from app.psgi" ); + + test_psgi $app, sub { + my $cb = shift; + my $res = $cb->( GET "/root/import/gallery-templates/images/previous.gif" ); + is $res->code, 200, 'enableStreamingUploads: 200 response'; + is $res->header('Content-Type'), 'image/gif', '... content type is image/gif'; + ok substr($res->content, 0, 100) =~ m/GIF89/, '... data contains the string GIF89'; + }; + + + # + # fire up another Plack to test non-streaming + # + + $session->config->set('enableStreamingUploads', 0); + + $app = Plack::Util::load_psgi( WebGUI::Paths->defaultPSGI ); + + my $redirect_url; + + test_psgi $app, sub { + my $cb = shift; + my $res = $cb->( GET "/root/import/gallery-templates/images/previous.gif" ); + is $res->code, 302, 'enableStreamingUploads: 302 response'; + ok $res->header('Location'), '... Location header in response'; + $res = $cb->(GET $res->header('Location') ); + is $res->code, 200, '... following location, we get a 200 response code'; + }; + + # + # put things back how they were + # + + $session->config->set('enableStreamingUploads', $prev_streaming_uploads); + +}; + diff --git a/t/PSGI/StackTrace.t b/t/PSGI/StackTrace.t new file mode 100644 index 000000000..ecbc44432 --- /dev/null +++ b/t/PSGI/StackTrace.t @@ -0,0 +1,47 @@ +use strict; +use warnings; +use Test::More tests => 4; + +use Plack::Test; +use Plack::Util; +use HTTP::Request::Common; +use WebGUI::Paths; +use WebGUI::Test; + +my $app = Plack::Util::load_psgi( WebGUI::Paths->defaultPSGI ); + +SKIP: { + skip 'set WEBGUI_LIVE to enable these tests', 4 unless $ENV{WEBGUI_LIVE}; + + no warnings 'redefine'; + + local *WebGUI::Asset::Template::www_die = sub { + my $self = shift; + $self->session->log->fatal("Invalid fill color"); + }; + + my $session = WebGUI::Test->session; + + my $prev_showDebug = $session->setting->get( 'showDebug' ); + my $prev_ipDebug = $session->setting->get( 'ipDebug' ); + + $session->setting->set( 'showDebug', 1 ); + $session->setting->set( 'ipDebug', '' ); + + local $ENV{HTTP_ACCEPT} = 'text/html'; + open(local *STDERR, '>', "/dev/null") or die $!; + + test_psgi $app, sub { + my $cb = shift; + my $res = $cb->( GET "/make_page_printable?func=die" ); + is $res->code, 500, '500 return code on booby-trapped with showDebug/ipDebug set to show errors'; + like $res->content, qr/Error trace/, 'Error trace contains the text "Error trace"'; + like $res->content, qr/Show function arguments/, 'Error trace contains the text "Show function arguments"'; + like $res->content, qr/Show lexical variables/, 'Error trace contains the text "Show lexical variables"'; + }; + + $session->setting->set( 'showDebug', $prev_showDebug ); + $session->setting->set( 'ipDebug', $prev_ipDebug ); + +} + diff --git a/t/PSGI/default-site.t b/t/PSGI/default-site.t new file mode 100644 index 000000000..b2799756d --- /dev/null +++ b/t/PSGI/default-site.t @@ -0,0 +1,23 @@ +use strict; +use warnings; +use Test::More tests => 4; + +use Plack::Test; +use Plack::Util; +use HTTP::Request::Common; +use WebGUI::Paths; + +my $app = Plack::Util::load_psgi( WebGUI::Paths->defaultPSGI ); + +test_psgi $app, sub { + my $cb = shift; + + my $res = $cb->( GET "/" ); + is $res->code, 200; + like $res->content, qr/My Company/; + + $res = $cb->( GET "/?op=editSettings" ); + is $res->code, 401; + like $res->content, qr/Administrative Function/; + +}; diff --git a/t/Paginator.t b/t/Paginator.t index f3ea0b1bf..ae236ad5e 100644 --- a/t/Paginator.t +++ b/t/Paginator.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,13 +8,10 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/lib"; use WebGUI::Test; use WebGUI::Session; -use WebGUI::Utility; use WebGUI::Paginator; use Test::More; # increment this value for each test you create diff --git a/t/PassiveProfiling.t b/t/PassiveProfiling.t index b26ae5c16..de392e322 100644 --- a/t/PassiveProfiling.t +++ b/t/PassiveProfiling.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/lib"; use WebGUI::Test; @@ -30,10 +28,8 @@ plan tests => 1 + $numTests; my $loaded = use_ok('WebGUI::PassiveProfiling'); -my $versionTag = WebGUI::VersionTag->getWorking($session); WebGUI::Test->addToCleanup(SQL => ['delete from passiveProfileLog where dateOfEntry >= ?', $startingTime-1]); -WebGUI::Test->addToCleanup($versionTag); -my $home = WebGUI::Asset->getDefault($session); +my $home = WebGUI::Test->asset; my $pageProperties = { # '1234567890123456789012' @@ -62,8 +58,6 @@ $snippetProperties->{url}++; my $snippet2 = $page->addChild($snippetProperties, $snippetProperties->{id}); -$versionTag->commit; - SKIP: { skip 'Module was not loaded, skipping all tests', $numTests -1 unless $loaded; diff --git a/t/Paths.t b/t/Paths.t new file mode 100644 index 000000000..0c2220e70 --- /dev/null +++ b/t/Paths.t @@ -0,0 +1,46 @@ +use 5.010; +use strict; +use warnings; + +use Test::More; +use WebGUI::Paths; + +my @pathMethods = qw( + configBase + logConfig + spectreConfig + preloadCustom + preloadExclusions + upgrades + extras + defaultUploads + defaultCreateSQL + share +); +can_ok 'WebGUI::Paths', @pathMethods; + +ok !(grep { WebGUI::Paths->can($_) } qw( + croak + realpath + catdir + splitpath + catpath + splitpath + updir + catfile + try + catch + _readTextLines + subname +)), 'Internal functions cleaned up'; + +my @configs = WebGUI::Paths->siteConfigs; +ok !(\@configs ~~ WebGUI::Paths->spectreConfig), 'Spectre config not listed in configs'; + +for my $method (@pathMethods) { + my $return = WebGUI::Paths->$method; + ok $return, "$method returns a path"; +} + +done_testing; + diff --git a/t/Pluggable.t b/t/Pluggable.t index 257b23b2f..dff757376 100644 --- a/t/Pluggable.t +++ b/t/Pluggable.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 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,9 +12,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/lib"; use Test::More; use WebGUI::Test; use File::Find; @@ -75,13 +73,13 @@ dies_ok { WebGUI::Pluggable::load( 'HA::::HA' ) } 'load dies on bad input'; #---------------------------------------------------------------------------- # Test find and findAndLoad { # Block to localize @INC - my $lib = WebGUI::Test->lib; + my $lib = File::Spec->catdir( WebGUI::Test->getTestCollateralPath, 'Pluggable', 'lib' ); local @INC = ( $lib ); # Use the i18n files to test my @testFiles = (); - File::Find::find( - sub { + File::Find::find( + sub { if ( !/^[.]/ && /[.]pm$/ ) { my $name = $File::Find::name; $name =~ s{^$lib[/]}{}; @@ -90,60 +88,59 @@ dies_ok { WebGUI::Pluggable::load( 'HA::::HA' ) } 'load dies on bad input'; push @testFiles, $name; } }, - File::Spec->catfile( $lib, 'WebGUI', 'i18n' ), + File::Spec->catfile( $lib, 'WebGUI', 'Test', 'Pluggable' ), ); cmp_deeply( - [ WebGUI::Pluggable::find( 'WebGUI::i18n' ) ], + [ WebGUI::Pluggable::find( 'WebGUI::Test::Pluggable' ) ], bag( @testFiles ), "find() finds all modules by default", ); cmp_deeply( - [ WebGUI::Pluggable::find( 'WebGUI::i18n', { onelevel => 1 } ) ], - bag( grep { /^WebGUI::i18n::[^:]+$/ } @testFiles ), + [ WebGUI::Pluggable::find( 'WebGUI::Test::Pluggable', { onelevel => 1 } ) ], + bag( grep { /^WebGUI::Test::Pluggable::[^:]+$/ } @testFiles ), "find() with onelevel", ); cmp_deeply( - [ WebGUI::Pluggable::find( 'WebGUI::i18n', { exclude => [ 'WebGUI::i18n::English::WebGUI' ] } ) ], - bag( grep { $_ ne 'WebGUI::i18n::English::WebGUI' } @testFiles ), + [ WebGUI::Pluggable::find( 'WebGUI::Test::Pluggable', { exclude => [ 'WebGUI::Test::Pluggable::Second' ] } ) ], + bag( grep { $_ ne 'WebGUI::Test::Pluggable::Second' } @testFiles ), "find() with exclude", ); cmp_deeply( - [ WebGUI::Pluggable::find( 'WebGUI::i18n', { exclude => [ 'WebGUI::i18n::English::WebGUI*' ] } ) ], - bag( grep { $_ ne 'WebGUI::i18n::English::WebGUI' && $_ ne 'WebGUI::i18n::English::WebGUIProfile' } @testFiles ), + [ WebGUI::Pluggable::find( 'WebGUI::Test::Pluggable', { exclude => [ 'WebGUI::Test::Pluggable::First*' ] } ) ], + bag( grep { $_ ne 'WebGUI::Test::Pluggable::First' && $_ ne 'WebGUI::Test::Pluggable::FirstOne' } @testFiles ), "find() with exclude with glob", ); cmp_deeply( - [ WebGUI::Pluggable::find( 'WebGUI::i18n', { exclude => [ 'WebGUI::i18n::English*' ] } ) ], + [ WebGUI::Pluggable::find( 'WebGUI::Test::Pluggable', { exclude => [ 'WebGUI::Test::Pluggable*' ] } ) ], [], "find() with exclude with massive glob", ); cmp_deeply( - [ WebGUI::Pluggable::find( 'WebGUI::i18n', { exclude => [ 'WebGUI::i18n::English::WebGUI.*' ] } ) ], - bag( grep { $_ ne 'WebGUI::i18n::English::WebGUI' && $_ ne 'WebGUI::i18n::English::WebGUIProfile' } @testFiles ), + [ WebGUI::Pluggable::find( 'WebGUI::Test::Pluggable', { exclude => [ 'WebGUI::Test::Pluggable::First.*' ] } ) ], + bag( grep { $_ ne 'WebGUI::Test::Pluggable::First' && $_ ne 'WebGUI::Test::Pluggable::FirstOne' } @testFiles ), "find() with exclude with regex", ); cmp_deeply( - [ WebGUI::Pluggable::find( 'WebGUI::i18n', { exclude => [ qw/WebGUI::i18n::English::WebGUI.* WebGUI::i18n::English::ShipDriver_USPS*/ ] } ) ], + [ WebGUI::Pluggable::find( 'WebGUI::Test::Pluggable', { exclude => [ qw/WebGUI::Test::Pluggable::First WebGUI::Test::Pluggable::Second::Child/ ] } ) ], bag( grep { - $_ ne 'WebGUI::i18n::English::WebGUI' - && $_ ne 'WebGUI::i18n::English::WebGUIProfile' - && $_ ne 'WebGUI::i18n::English::ShipDriver_USPS' - && $_ ne 'WebGUI::i18n::English::ShipDriver_USPSInternational' + $_ ne 'WebGUI::Test::Pluggable::First' + && $_ ne 'WebGUI::Test::Pluggable::Second::Child' } @testFiles ), "find() with multiple excludes", ); - cmp_deeply( - [ WebGUI::Pluggable::find( 'WebGUI::i18n', { onelevel => 1, return => "name" } ) ], - bag( map { /::([^:]+)$/; $1 } grep { /^WebGUI::i18n::[^:]+$/ } @testFiles ), + cmp_deeply( + [ WebGUI::Pluggable::find( 'WebGUI::Test::Pluggable', { onelevel => 1, return => "name" } ) ], + bag( map { /::([^:]+)$/; $1 } grep { /^WebGUI::Test::Pluggable::[^:]+$/ } @testFiles ), "find() with return => name", ); }; + #vim:ft=perl diff --git a/t/PodChecker.t b/t/PodChecker.t index 1502032d2..14b778a81 100644 --- a/t/PodChecker.t +++ b/t/PodChecker.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -9,8 +9,6 @@ #------------------------------------------------------------------- use strict; -use FindBin qw($Bin); -use lib "$FindBin::Bin/lib"; use File::Find; use Pod::Checker; diff --git a/t/ProfileCategory.t b/t/ProfileCategory.t index 95c0051da..e34659b5b 100644 --- a/t/ProfileCategory.t +++ b/t/ProfileCategory.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2008 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/lib"; use WebGUI::Test; use WebGUI::Session; diff --git a/t/ProfileField.t b/t/ProfileField.t index ca9592d0b..78c1912a7 100644 --- a/t/ProfileField.t +++ b/t/ProfileField.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/lib"; use Test::More; use Data::Dumper; use File::Spec; @@ -237,11 +235,11 @@ sub installPigLatin { use File::Copy; mkdir File::Spec->catdir(WebGUI::Test->lib, 'WebGUI', 'i18n', 'PigLatin'); copy( - WebGUI::Test->getTestCollateralPath('WebGUI.pm'), + WebGUI::Test->getTestCollateralPath('International/lib/WebGUI/i18n/PigLatin/WebGUI.pm'), File::Spec->catfile(WebGUI::Test->lib, qw/WebGUI i18n PigLatin WebGUI.pm/) ); copy( - WebGUI::Test->getTestCollateralPath('PigLatin.pm'), + WebGUI::Test->getTestCollateralPath('International/lib/WebGUI/i18n/PigLatin.pm'), File::Spec->catfile(WebGUI::Test->lib, qw/WebGUI i18n PigLatin.pm/) ); } diff --git a/t/ProgressBar.t b/t/ProgressBar.t index f4e582b79..e534177df 100644 --- a/t/ProgressBar.t +++ b/t/ProgressBar.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -23,8 +23,6 @@ use strict; use warnings; -use FindBin; -use lib "$FindBin::Bin/lib"; use Test::More; use Test::MockObject::Extends; diff --git a/t/Role/Asset/Comments.t b/t/Role/Asset/Comments.t new file mode 100644 index 000000000..74124062f --- /dev/null +++ b/t/Role/Asset/Comments.t @@ -0,0 +1,84 @@ +# vim:syntax=perl +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 +#------------------------------------------------------------------ + +# Write a little about what this script tests. +# +# + +use strict; +use Test::More; +use Test::Deep; +use Test::MockObject; + +use WebGUI::Test; # Must use this before any other WebGUI modules +use WebGUI::Session; + +#---------------------------------------------------------------------------- +# Init +my $session = WebGUI::Test->session; +$session->db->dbh->do('drop table if exists dummyTable'); +$session->db->dbh->do(<<EOSQL); +create table dummyTable( + assetId varchar(22) NOT NULL, + revisionDate bigint(20) NOT NULL, + PRIMARY KEY (`assetId`,`revisionDate`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +EOSQL + +package WebGUI::Asset::DummyComments; + +use Moose; +use WebGUI::Definition::Asset; +use WebGUI::Types; +extends 'WebGUI::Asset'; +define tableName => 'dummyTable'; +with 'WebGUI::Role::Asset::Comments'; + +package main; + +use WebGUI::Asset; + +my $mock = Test::MockObject->new(); +$mock->fake_module('WebGUI::Asset::DummyComments', '__DUMMY__DUMMY__' => sub {}, ); + +#---------------------------------------------------------------------------- +# put your tests here + +my $dummy = WebGUI::Test->asset->addChild({ + className => 'WebGUI::Asset::DummyComments', + url => '/home/shawshank', + title => 'Dummy Title', + synopsis => 'Dummy Synopsis', + description => 'Dummy Description', +}); + +ok $dummy->does('WebGUI::Role::Asset::Comments'), 'dummy object does the right role'; +$dummy->comments([{ television => 'drop', misdemeanor => 'felony', }]); +$dummy->write(); + +my $json = $session->db->quickScalar('select comments from assetAspectComments where assetId=?', [$dummy->assetId]); +like $json, qr/"television":"drop"/, 'checking serialize to json in the db'; + +my $dummy2 = $dummy->cloneFromDb(); +cmp_deeply( + $dummy2->comments(), + [ { television => 'drop', misdemeanor => 'felony', }], + 'checking JSON and deserialize from db' +); + +done_testing(); + +#---------------------------------------------------------------------------- +# Cleanup +END { + $session->db->dbh->do('drop table if exists dummyTable'); +} +#vim:ft=perl diff --git a/t/SQL.t b/t/SQL.t index d7049fd93..4c6c2c1fd 100644 --- a/t/SQL.t +++ b/t/SQL.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,17 +8,14 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/lib"; use WebGUI::Test; use WebGUI::Session; use Data::Dumper; +use Test::More; use Test::Deep; -use Test::More tests => 57; # increment this value for each test you create - my $session = WebGUI::Test->session; # read @@ -145,6 +142,8 @@ my $setRowId = $session->db->setRow("incrementer","incrementerId",{incrementerId ok($setRowId ne "", "setRow() - return ID"); my ($setRowResult) = $session->db->quickArray("select nextValue from incrementer where incrementerId=".$session->db->quote($setRowId)); is($setRowResult, 47, "setRow() - set data"); +is $session->db->setRow("incrementer", "incrementerId",{incrementerId=>'new', nextValue => 48}, 'oogeyBoogeyBoo'), + 'oogeyBoogeyBoo', 'overriding default id with a custom one'; # getRow my $getRow = $session->db->getRow("incrementer","incrementerId",$setRowId); @@ -174,9 +173,9 @@ SKIP: { skip("No InnoDB tables in this MySQL. Skipping all transaction related tests.",7) if (lc $mysqlVariables{have_innodb} ne 'yes'); $session->db->dbh->do('DROP TABLE IF EXISTS testTable'); $session->db->dbh->do('CREATE TABLE testTable (myIndex int(8) NOT NULL default 0, message CHAR(64), PRIMARY KEY(myIndex)) TYPE=InnoDB'); - addToCleanup( SQL => 'DROP TABLE testTable' ); + WebGUI::Test->addToCleanup( SQL => 'DROP TABLE testTable' ); - my $dbh2 = WebGUI::SQL->connect($session,$session->config->get("dsn"), $session->config->get("dbuser"), $session->config->get("dbpass")); + my $dbh2 = WebGUI::SQL->connect($session->config->get("dsn"), $session->config->get("dbuser"), $session->config->get("dbpass")); my ($sth, $sth2, $rc); $sth = $session->db->prepare('select myIndex from testTable'); @@ -310,3 +309,4 @@ $session->db->write( ); ok( $session->db->quickCSV( 'SELECT * FROM testTable' ), 'get some output even with newlines in data' ); +done_testing(); diff --git a/t/Search.t b/t/Search.t index 2da50d94e..336b58955 100644 --- a/t/Search.t +++ b/t/Search.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/lib"; use Test::More; use Test::Deep; use WebGUI::Test; # Must use this before any other WebGUI modules @@ -70,9 +68,7 @@ SKIP: { title => 'Chinese ideograph experiment', description => "甲骨文", } ); - my $tag = WebGUI::VersionTag->getWorking( $session ); - $tag->commit; - WebGUI::Test->addToCleanup($tag); + WebGUI::Test->addToCleanup($article); WebGUI::Search::Index->create( $article ); my $searcher = WebGUI::Search->new($session); my $assetIds = $searcher->search({ keywords => "Chinese", })->getAssetIds; diff --git a/t/Search/Index.t b/t/Search/Index.t index 8a293c481..25c073694 100644 --- a/t/Search/Index.t +++ b/t/Search/Index.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use Test::More; use Test::Deep; use WebGUI::Test; # Must use this before any other WebGUI modules @@ -27,15 +25,12 @@ my $session = WebGUI::Test->session; my ( $db ) = $session->quick(qw{ db }); # Create an article to index -my $article = WebGUI::Asset->getImportNode( $session )->addChild( { +my $article = WebGUI::Test->asset->addChild( { className => 'WebGUI::Asset::Wobject::Article', keywords => 'keyword1,keyword2', title => 'title', menuTitle => 'menuTitle', } ); -WebGUI::Test->addToCleanup( - WebGUI::VersionTag->getWorking( $session ), -); #---------------------------------------------------------------------------- # Tests diff --git a/t/Session.t b/t/Session.t index e956e6acf..de8450fe2 100644 --- a/t/Session.t +++ b/t/Session.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/lib"; use WebGUI::Test; use WebGUI::Session; @@ -18,8 +16,7 @@ use WebGUI::Session; use WebGUI::User; use Test::More; - -plan tests => 4; # increment this value for each test you create +use Test::Deep; my $session = WebGUI::Test->session; @@ -34,7 +31,14 @@ is($userId, $user->userId, 'changing session user changes sessionId inside userS $session->user({userId => 3}); is($session->user->userId, 3, 'Set session user to Admin, check userId==3'); -is($session->user->profileField('uiLevel'), 9, 'Set session user to Admin, check uiLevel==9'); +is($session->user->get('uiLevel'), 9, 'Set session user to Admin, check uiLevel==9'); + +my $dupe = $session->duplicate; +WebGUI::Test->addToCleanup($dupe); + +is($session->get('sessionId'), $session->getId, 'getId returns sessionId'); + +is $dupe->getId, $session->getId, 'duplicated session has the same sessionId'; ################################################################ # @@ -54,6 +58,160 @@ $session->config->set('dbslave2', $slaveHash2); WebGUI::Test->addToCleanup(sub {$session->config->delete('dbslave2');}); my $slave2 = $session->dbSlave; -isa_ok($slave2, 'WebGUI::SQL'); +isa_ok($slave2, 'WebGUI::SQL::db'); + +cmp_ok($session->get("lastPageView"), '>', 0, "lastPageView set to something"); + +can_ok($session, qw/isAdminOn/); +$session->user({userId => 3}); +is($session->isAdminOn, 1, "admin has admin on"); +$session->user({userId => 1}); +is($session->isAdminOn, 0, "visitor has admin off"); + +my $token = $session->scratch->get('webguiCsrfToken'); +ok( $token, 'CSRF token set'); +ok( $session->id->valid($token), '...is a valid GUID'); + +my $id = $session->getId; +my ($count) = $session->db->quickArray("select count(*) from userSession where sessionId=?", [$id]); +is($count, 1, "created an user session entry in the database"); + +my $env; +$session->request->env->{REMOTE_ADDR} = '192.168.0.34'; + +my $varSession = WebGUI::Session->open($session->config, $session->request->env); +WebGUI::Test->addToCleanup($varSession); +my $varTime = time(); +isnt($varSession->scratch->get('webguiCsrfToken'), $token, '... calling new without sessionId creates a new token'); +isnt($varSession->getId, $session->getId, "new session has a different id from current session"); + +my $varExpires = $varTime + $session->setting->get('sessionTimeout'); +cmp_ok(abs($varSession->get('lastPageView') - $varTime), '<=', 1, 'lastPageView set correctly'); +cmp_ok(abs($varSession->get('expires') - $varExpires), '<=', 1, 'expires set correctly'); + +is($varSession->get('userId'), 1, 'default userId is 1'); + +is($varSession->get('adminOn'), $varSession->isAdminOn, "get('adminOn') and isAdminOn return the same thing"); +is($varSession->get('adminOn'), 0, "adminOn is off by default"); ##retest +is($varSession->get('lastIP'), '192.168.0.34', "lastIP fetched"); + + +my $illegalSessionId = 'illegalSessionIdThatIsTooLong'; +# '1234567890123456789012' +my $varIllegal = WebGUI::Session->open($session->config, undef, ); +WebGUI::Test->addToCleanup($varIllegal); + +isa_ok($varIllegal, 'WebGUI::Session', 'invalid sessionId will still produce a Session object'); +ok($session->id->valid($varIllegal->getId), 'valid ID created for the new session, when bad Id was suggested'); +ok(index($varIllegal->getId, $illegalSessionId) == -1, 'illegal session was not truncated to make the new Id'); + +$session->request->env->{REMOTE_ADDR} = '10.0.0.5'; +my $varCopy = WebGUI::Session->open($session->config, $session->request->env, $varSession->getId); +is($varCopy->scratch->get('webguiCsrfToken'), $varSession->scratch->get('webguiCsrfToken'), 'opening a copy of a user session did not change the CSRF token'); + +cmp_deeply( + $varCopy, + methods( + ['get', 'sessionId'] => $varSession->get('sessionId'), + ['get', 'userId'] => $varSession->get('userId'), + ['get', 'adminOn'] => $varSession->get('adminOn'), + ), + 'similar methods in copy of original var object' +); + +is($varCopy->get('lastIP'), '10.0.0.5', "lastIP set on copy"); + +my $varSessionId = $varSession->getId; +$varSession->end; +($count) = $session->db->quickArray("select count(*) from userSession where sessionId=?",[$varSession->getId]); +ok($count == 0,"end() removes current entry from database"); + +{ + my $sessionId = 'nonExistantIdButValid0'; + # '1234567890123456789012' + my $testSession = WebGUI::Session->open($session->config, undef, $sessionId); + my $guard = WebGUI::Test->cleanupGuard($testSession); + isa_ok($testSession, 'WebGUI::Session', 'non-existant sessionId will still produce a Var object'); + is($testSession->getId, $sessionId, 'user session Id set to non-existant Id'); +} + +{ + my $expire = WebGUI::Session->open($session->config); + my $guard = WebGUI::Test->cleanupGuard($expire); + $expire->user({ userId => 3 }); + # jury rig the database and the cache to expire + my $expire_time = $expire->get('lastPageView') - 1; + $session->db->write("update userSession set userId=?, expires=? where sessionId=?", [3, $expire_time, $expire->getId]); + $session->user({userId => 3}); + my $copyOfSession = { %{ $expire->get() } }; + $copyOfSession->{expires} = $expire_time; + $session->cache->set($expire->getId, $copyOfSession); + + my $copy = WebGUI::Session->open($session->config, undef, $expire->getId); + my $guard2 = WebGUI::Test->cleanupGuard($copy); + is $copy->getId, $expire->getId, 'new Var object has correct id'; + isnt $copy->isAdminOn, $expire->isAdminOn, 'new adminOn not equal to old adminOn'; + is $copy->isAdminOn, 0, 'new Var object has default adminOn'; + isnt $copy->get('userId'), 3, 'new userId not equal to old userId'; +} + +{ + ##Var objects for noFuss tests + my $trial = WebGUI::Session->open($session->config); + my $expiring = WebGUI::Session->open($session->config); + my $guard = WebGUI::Test->cleanupGuard($trial, $expiring); + $session->db->write("update userSession set expires=? where sessionId=?", [$expiring->get('lastPageView')-5, $expiring->getId]); + $expiring->{_var}{expires} = $expiring->get('lastPageView')-5; + + ##Valid fetch with no fuss + my $varTest = WebGUI::Session->open($session->config, $session->request->env, $trial->getId, 1); + my $guard2 = WebGUI::Test->cleanupGuard($varTest); + + cmp_deeply( + $varTest, + methods( + ['get', 'sessionId'] => $trial->getId, + ['get', 'userId'] => 1, + ['get', 'adminOn'] => 0, + ['get', 'lastIP'] => '127.0.0.1', + ['get', 'expires'] => $trial->get('expires'), + ['get', 'lastPageView'] => $trial->get('lastPageView'), + ), + 'fetching a valid session with noFuss does not update the object info' + ); + + ##Test a valid fetch + my $expired = WebGUI::Session->open($session->config, undef, $expiring->getId, 1); + my $guard3 = WebGUI::Test->cleanupGuard($expired); + + cmp_deeply( + $expired, + methods( + ['get', 'sessionId'] => $expiring->getId, + ['get', 'userId'] => 1, + ['get', 'adminOn'] => 0, + ['get', 'lastIP'] => '127.0.0.1', + ['get', 'lastPageView'] => $expiring->get('lastPageView'), + ['get', 'expires'] => $expiring->get('expires'), + ), + 'fetching a valid session with noFuss does not update the object info, even if it has expired' + ); + +} + +my $varId4 = 'idDoesNotExist00779988'; +# '1234567890123456789012' +my $varTest = WebGUI::Session->open($session->config, undef, $varId4, 1); +WebGUI::Test->addToCleanup($varTest); +isa_ok($varTest, "WebGUI::Session", "non-existant Id with noFuss returns a valid object..."); +is($varTest->getId, $varId4, "...and we got our requested Id"); + +$varTest->start(3, $varTest->getId); +is($varTest->get('userId'), 3, 'userId set via start'); +$varTest->start("", $varTest->getId); +is($varTest->get('userId'), 1, 'calling start with null userId returns default user (visitor)'); + + +done_testing; #vim:ft=perl diff --git a/t/Cache/CHI.t b/t/Session/Cache.t similarity index 58% rename from t/Cache/CHI.t rename to t/Session/Cache.t index 1299df88c..8faef721d 100644 --- a/t/Cache/CHI.t +++ b/t/Session/Cache.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -9,13 +9,11 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------ -# Test the CHI cache driver +# Test the CHI cache # # -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use Test::More; use WebGUI::Test; # Must use this before any other WebGUI modules use WebGUI::Session; @@ -28,23 +26,13 @@ my $session = WebGUI::Test->session; #---------------------------------------------------------------------------- # Tests -plan tests => 3; # Increment this number for each test you create +plan tests => 1; # Increment this number for each test you create + +my $cache = $session->cache; +isa_ok( $cache, "CHI::Driver" ); #---------------------------------------------------------------------------- # put your tests here -use_ok( 'WebGUI::Cache::CHI' ); -WebGUI::Test->originalConfig('cacheType'); -WebGUI::Test->originalConfig('cache'); -$session->config->set('cacheType', 'WebGUI::Cache::CHI'); -$session->config->set('cache', { driver => 'FastMmap', }); - -my $cache = WebGUI::Cache::CHI->new($session, "this", "that"); -my $testValue = "a rock that has no earthly business in that field"; - -$cache->set($testValue); -is($cache->get, $testValue, "set/get works"); -$cache->delete; -is($cache->get, undef, "delete works"); #vim:ft=perl diff --git a/t/Session/CheckClient.t b/t/Session/CheckClient.t index 377a94eb6..193ca8e12 100644 --- a/t/Session/CheckClient.t +++ b/t/Session/CheckClient.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -18,7 +18,6 @@ # so 100 will test all items, 75 will # test 75% or 3 out of four items -use FindBin; use strict; use lib "$FindBin::Bin/../lib"; @@ -42,26 +41,26 @@ my @testArray = ( output => 1, comment => "UnChaos hybrid search engine" }, - { - agent => "(DreamPassport/3.0; isao/MyDiGiRabi)", - output => 0, - comment => "DreamCast DreamPassport browser" - }, - { - agent => "Privoxy web proxy", # I think proxy's whould be considered browsers? - output => 0, - comment => "s.also Privoxy/3.0 (Anonymous)" - }, +# { +# agent => "(DreamPassport/3.0; isao/MyDiGiRabi)", +# output => 0, +# comment => "DreamCast DreamPassport browser" +# }, +# { +# agent => "Privoxy web proxy", # I think proxy's whould be considered browsers? +# output => 0, +# comment => "s.also Privoxy/3.0 (Anonymous)" +# }, { agent => "123spider-Bot (Version: 1.02, powered by www.123spider.de", output => 1, comment => "123spider.de (Germany) web directory link checking" }, - { - agent => "1st ZipCommander (Net) - http://www.zipcommander.com/", - output => 0, - comment => "1st ZipCommander Net - IE based browser" - }, +# { +# agent => "1st ZipCommander (Net) - http://www.zipcommander.com/", +# output => 0, +# comment => "1st ZipCommander Net - IE based browser" +# }, { agent => "2Bone_LinkChecker/1.0 libwww-perl/5.64", output => 1, @@ -72,11 +71,11 @@ my @testArray = ( output => 1, comment => "A-Online.at robot - now Jet2Web Search" }, - { - agent => "Advanced Browser (http://www.avantbrowser.com)", - output => 0, - comment => "Avant Browser - IE based browser" - }, +# { +# agent => "Advanced Browser (http://www.avantbrowser.com)", +# output => 0, +# comment => "Avant Browser - IE based browser" +# }, { agent => "AESOP_com_SpiderMan", output => 1, @@ -92,21 +91,21 @@ my @testArray = ( output => 1, comment => "Mozilla/5.0 (compatible;MAINSEEK_BOT)" }, - { - agent => "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.0.1) Gecko/20021219 Chimera/0.6", - output => 0, - comment => "Chimera browser (Mozilla/Gecko engine) - now Camino Mac PowerPC" - }, - { - agent => "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/xx (KHTML like Gecko) OmniWeb/v5xx.xx", - output => 0, - comment => "OmniWeb 5.x.x Mac OS X browser" - }, - { - agent => "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:x.x.x) Gecko/20041107 Firefox/x.x", - output => 0, - comment => "Firefox browser (Mozilla/Gecko engine) - ex Firebird WinXP" - }, +# { +# agent => "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.0.1) Gecko/20021219 Chimera/0.6", +# output => 0, +# comment => "Chimera browser (Mozilla/Gecko engine) - now Camino Mac PowerPC" +# }, +# { +# agent => "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/xx (KHTML like Gecko) OmniWeb/v5xx.xx", +# output => 0, +# comment => "OmniWeb 5.x.x Mac OS X browser" +# }, +# { +# agent => "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:x.x.x) Gecko/20041107 Firefox/x.x", +# output => 0, +# comment => "Firefox browser (Mozilla/Gecko engine) - ex Firebird WinXP" +# }, { agent => "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1) VoilaBot BETA 1.2 (support.voilabotorange-ftgroup.com)", output => 1, @@ -117,11 +116,11 @@ my @testArray = ( output => 1, comment => "Healthline health related search robot (72.5.115.xx)" }, - { - agent => "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.8.0.2) Gecko/20060309 SeaMonkey/1.0", - output => 0, - comment => "SeaMonkey browser suite (ex Mozilla) on Linux" - }, +# { +# agent => "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.8.0.2) Gecko/20060309 SeaMonkey/1.0", +# output => 0, +# comment => "SeaMonkey browser suite (ex Mozilla) on Linux" +# }, { agent => "Mozilla/5.0 [en] (compatible; Gulper Web Bot 0.2.4 www.ecsl.cs.sunysb.edu/~maxim/cgi-bin/Link/GulperBot)", output => 1, @@ -183,17 +182,10 @@ sub testCount { plan tests => testCount() ; -my $output; foreach my $testSet (@testArray) { - $output = FAKE_ENV->new( $testSet->{agent}, - $testSet->{address} || '69.42.78.32') - ->requestNotViewed(); + $session->request->headers->user_agent($testSet->{agent}); + $session->request->env->{REMOTE_ADDR} = $testSet->{address} || '69.42.78.32'; + my $output = $session->request->requestNotViewed; is($output, $testSet->{output}, $testSet->{comment}); } -{ # this is a local fake of the session, used for testing only -package FAKE_ENV; -use base 'WebGUI::Session::Env'; -sub new { shift; return bless { _env => { HTTP_USER_AGENT => $_[0], REMOTE_ADDR => $_[1] } }, __PACKAGE__; } -} - diff --git a/t/Session/DateTime.t b/t/Session/DateTime.t index 7b4d077c8..8a296a5ee 100644 --- a/t/Session/DateTime.t +++ b/t/Session/DateTime.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use File::Copy; use File::Spec; @@ -19,9 +17,9 @@ use WebGUI::Session; use Test::More tests => 95; # increment this value for each test you create -installBadLocale(); -WebGUI::Test->addToCleanup(sub { unlink File::Spec->catfile(WebGUI::Test->lib, qw/WebGUI i18n BadLocale.pm/); }); - +local @INC = @INC; +unshift @INC, File::Spec->catdir( WebGUI::Test->getTestCollateralPath, 'Session-DateTime', 'lib' ); + my $session = WebGUI::Test->session; my $dt = $session->datetime; @@ -120,10 +118,12 @@ $session->user({userId => 1}); ##back to Visitor my $wgBdayMail = 'Thu, 16 Aug 2001 08:00:00 -0500'; is ($dt->mailToEpoch($wgBdayMail), $wgbday, 'mailToEpoch'); -WebGUI::Test->interceptLogging(); +WebGUI::Test->interceptLogging( sub { + my $log_data = shift; -is ($dt->mailToEpoch(750), undef, 'mailToEpoch returns undef on failure to parse'); -like($WebGUI::Test::logger_warns, qr{750 is not a valid date for email}, "DateTime logs a warning on failure to parse"); + is ($dt->mailToEpoch(750), undef, 'mailToEpoch returns undef on failure to parse'); + like($log_data->{warn}, qr{750 is not a valid date for email}, "DateTime logs a warning on failure to parse"); +}); #################################################### # @@ -307,11 +307,4 @@ my $dayEpoch = DateTime->from_epoch(epoch => $wgbday)->subtract(days => 10)->epo is($dt->epochToHuman($dayEpoch,'%D'), '6', '... single digit day'); is($dt->epochToHuman($dayEpoch,'%H'), '8', '... single digit hour'); -sub installBadLocale { - copy( - WebGUI::Test->getTestCollateralPath('BadLocale.pm'), - File::Spec->catfile(WebGUI::Test->lib, qw/WebGUI i18n BadLocale.pm/) - ); -} - #vim:ft=perl diff --git a/t/Session/Env.t b/t/Session/Env.t deleted file mode 100644 index 7c1d71133..000000000 --- a/t/Session/Env.t +++ /dev/null @@ -1,40 +0,0 @@ -#------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. -#------------------------------------------------------------------- -# Please read the legal notices (docs/legal.txt) and the license -# (docs/license.txt) that came with this distribution before using -# this software. -#------------------------------------------------------------------- -# http://www.plainblack.com info@plainblack.com -#------------------------------------------------------------------- - -use FindBin; -use strict; -use lib "$FindBin::Bin/../lib"; - -use WebGUI::Test; -use WebGUI::Session; - -use Test::More tests => 3; # increment this value for each test you create -use Test::MockObject::Extends; - -my $session = WebGUI::Test->session; - - -cmp_ok($session->env->get("PATH"), 'ne', "", "get() one valid entry"); - -#Replace the ENV hash so that we can test getIp. - -my $env = $session->env; -$env = Test::MockObject::Extends->new($env); - -my %mockEnv = ( - REMOTE_ADDR => '192.168.0.2', -); - -$env->mock('get', sub { return $mockEnv{$_[1]}}); - -is ($env->getIp(), $mockEnv{'REMOTE_ADDR'}, 'getIp'); - -$mockEnv{HTTP_X_FORWARDED_FOR} = '10.0.2.5', -is ($env->getIp(), $mockEnv{'HTTP_X_FORWARDED_FOR'}, 'getIp with HTTP forwarding'); diff --git a/t/Session/ErrorHandler.t b/t/Session/ErrorHandler.t index 4c3b4557c..3d830daca 100644 --- a/t/Session/ErrorHandler.t +++ b/t/Session/ErrorHandler.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,27 +8,26 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; use Test::More; use Test::MockObject::Extends; +use Try::Tiny; -my $numTests = 39; +my $numTests = 13; plan tests => $numTests; my $session = WebGUI::Test->session; ##Setup for security method test -my %newEnv = ( REMOTE_ADDR => '192.168.0.6' ); -$session->env->{_env} = \%newEnv; +my $env = $session->request->env; +$env->{REMOTE_ADDR} = '192.168.0.6'; -my ($eh) = $session->quick('errorHandler'); +my $log = $session->log; #################################################### # @@ -36,21 +35,19 @@ my ($eh) = $session->quick('errorHandler'); # #################################################### -WebGUI::Test->interceptLogging(); +WebGUI::Test->interceptLogging( sub { + my $log_data = shift; -my $accumulated_warn = ""; -$eh->warn("This is a warning"); -is($WebGUI::Test::logger_warns, "This is a warning", "warn: Log4perl called"); -$accumulated_warn .= "This is a warning\n"; -is($session->errorHandler->{_debug_warn}, $accumulated_warn, "warn: message internally appended"); -$eh->warn("Second warning"); -is($WebGUI::Test::logger_warns, "Second warning", "warn: Log4perl called again"); -$accumulated_warn .= "Second warning\n"; -is($session->errorHandler->{_debug_warn}, $accumulated_warn, "warn: second message appended"); -$eh->security('Shields up, red alert'); -my $security = sprintf '%s (%d) connecting from %s attempted to %s', - $session->user->username, $session->user->userId, $session->env->getIp, 'Shields up, red alert'; -is($WebGUI::Test::logger_warns, $security, 'security: calls warn with username, userId and IP address'); + my $accumulated_warn = ""; + $log->warn("This is a warning"); + is($log_data->{warn}, "This is a warning", "warn: Log4perl called"); + $log->warn("Second warning"); + is($log_data->{warn}, "Second warning", "warn: Log4perl called again"); + $log->security('Shields up, red alert'); + my $security = sprintf '%s (%d) connecting from %s attempted to %s', + $session->user->username, $session->user->userId, $session->request->address, 'Shields up, red alert'; + is($log_data->{warn}, $security, 'security: calls warn with username, userId and IP address'); +}); #################################################### # @@ -58,50 +55,30 @@ is($WebGUI::Test::logger_warns, $security, 'security: calls warn with username, # #################################################### -my $accumulated_info = ''; -$eh->info("This is informative"); -is($WebGUI::Test::logger_info, "This is informative", "info: Log4perl called"); -$accumulated_info .= "This is informative\n"; -is($session->errorHandler->{_debug_info}, $accumulated_info, "info: message internally appended"); -$eh->info("More info"); -is($WebGUI::Test::logger_info, "More info", "info: Log4perl called again"); -$accumulated_info .= "More info\n"; -is($session->errorHandler->{_debug_info}, $accumulated_info, "info: second message appended"); -$eh->audit('Check this out'); -my $audit = sprintf '%s (%d) %s', $session->user->username, $session->user->userId, 'Check this out'; -is($WebGUI::Test::logger_info, $audit, 'audit: calls info with username and userId'); +WebGUI::Test->interceptLogging( sub { + my $log_data = shift; + $log->info("This is informative"); + is($log_data->{info}, "This is informative", "info: Log4perl called"); + $log->info("More info"); + is($log_data->{info}, "More info", "info: Log4perl called again"); + $log->audit('Check this out'); + my $audit = sprintf '%s (%d) %s', $session->user->username, $session->user->userId, 'Check this out'; + is($log_data->{info}, $audit, 'audit: calls info with username and userId'); +}); #################################################### # -# debug, query +# debug # #################################################### -$eh->{'_debug_debug'} = ''; ##Manually clean debug -$eh->debug("This is a bug"); -is($WebGUI::Test::logger_debug, "This is a bug", "debug: Log4perl called"); -is($eh->{'_debug_debug'}, "This is a bug\n", "debug: message internally appended"); -$eh->debug("More bugs"); -is($WebGUI::Test::logger_debug, "More bugs", "debug: Log4perl called again"); -is($eh->{'_debug_debug'}, "This is a bug\nMore bugs\n", "debug: second message appended"); - -$eh->{'_debug_debug'} = ''; ##Manually clean debug -my $queryCount = $eh->{_queryCount}; -$eh->query('select this'); -++$queryCount; -is($WebGUI::Test::logger_debug, "query $queryCount:\n select this", "query: Log4perl called debug via query"); - -$eh->query('select that', 'literal'); -++$queryCount; -is($WebGUI::Test::logger_debug, "query $queryCount:\n select that", "query: Log4perl called debug via query, literal placeholder"); - -$eh->query('select more', []); -++$queryCount; -is($WebGUI::Test::logger_debug, "query $queryCount:\n select more", "query: Log4perl called debug via query, empty placeholder"); - -$eh->query('select many', [1, 2]); -++$queryCount; -is($WebGUI::Test::logger_debug, "query $queryCount:\n select many\n with placeholders: [1,2]", "query: Log4perl called debug via query, empty placeholder"); +WebGUI::Test->interceptLogging( sub { + my $log_data = shift; + $log->debug("This is a bug"); + is($log_data->{debug}, "This is a bug", "debug: Log4perl called"); + $log->debug("More bugs"); + is($log_data->{debug}, "More bugs", "debug: Log4perl called again"); +}); #################################################### # @@ -109,115 +86,13 @@ is($WebGUI::Test::logger_debug, "query $queryCount:\n select many\n with place # #################################################### -$eh->{'_debug_debug'} = ''; ##Manually clean debug -$eh->error("ERROR"); -is($WebGUI::Test::logger_error, "ERROR", "error: Log4perl called error"); -like($WebGUI::Test::logger_debug, qr/^Stack trace for ERROR ERROR/, "error: Log4perl called debug"); -is($eh->{'_debug_error'}, "ERROR\n", "error: message internally appended"); -$eh->error("More errors"); -is($WebGUI::Test::logger_error, "More errors", "error: Log4perl called error again"); -is($eh->{'_debug_error'}, "ERROR\nMore errors\n", "error: new message internally appended"); - -#################################################### -# -# getStackTrace -# -#################################################### - -is ($eh->getStackTrace, undef, 'no stack trace due to shallow depth, must be 2 deep for a stack trace'); -like(&depth1(), qr/main(.*?)ErrorHandler\.t/, 'stack trace has correct information'); - -sub depth1 { - return &depth2(); -} - -sub depth2 { - return $eh->getStackTrace; -} - -#################################################### -# -# canShowBasedOnIP -# -#################################################### - -is($eh->canShowBasedOnIP(''), 0, 'canShowBasedOnIP: must send IP setting'); - -#################################################### -# -# canShowDebug -# -#################################################### - - -$session->setting->set('showDebug', 0); -delete $eh->{_canShowDebug}; -ok(! $eh->canShowDebug, 'canShowDebug: returns 0 if not enabled'); - -$session->setting->set('showDebug', 1); -$session->http->setMimeType('audio/mp3'); -delete $eh->{_canShowDebug}; -ok(! $eh->canShowDebug, 'canShowDebug: returns 0 if mime type is wrong'); - -$session->http->setMimeType('text/html'); -$session->setting->set('debugIp', ''); -delete $eh->{_canShowDebug}; -ok($eh->canShowDebug, 'canShowDebug: returns 1 if debugIp is empty string'); - -$session->setting->set('debugIp', '10.0.0.5/32, 192.168.0.4/30'); -$newEnv{REMOTE_ADDR} = '172.17.0.5'; -delete $eh->{_canShowDebug}; -ok(! $eh->canShowDebug, 'canShowDebug: returns 0 if debugIp is set and IP address is out of filter'); -$newEnv{REMOTE_ADDR} = '10.0.0.5'; -delete $eh->{_canShowDebug}; -ok($eh->canShowDebug, 'canShowDebug: returns 1 if debugIp is set and IP address matches filter'); -$newEnv{REMOTE_ADDR} = '192.168.0.5'; -delete $eh->{_canShowDebug}; -ok($eh->canShowDebug, 'canShowDebug: returns 1 if debugIp is set and IP address matches filter'); - -#################################################### -# -# canShowPerformanceIndicators -# -#################################################### - -$session->setting->set('showPerformanceIndicators', 0); -is($eh->canShowPerformanceIndicators, 0, 'canShowPerformanceIndicators: returns 0 if not enabled'); - -$session->setting->set('showPerformanceIndicators', 1); -$session->setting->set('debugIp', ''); -is($eh->canShowPerformanceIndicators, 1, 'canShowPerformanceIndicators: returns 1 if debugIp is blank'); - -$session->setting->set('debugIp', '10.0.0.5/32, 192.168.0.4/30'); -$newEnv{REMOTE_ADDR} = '172.17.0.5'; -is($eh->canShowPerformanceIndicators, 0, 'canShowPerformanceIndicators: returns 0 if debugIp is set and IP address does not match'); -$newEnv{REMOTE_ADDR} = '10.0.0.5'; -is($eh->canShowPerformanceIndicators, 1, 'canShowPerformanceIndicators: returns 0 if debugIp is set and IP address matches exactly'); -$newEnv{REMOTE_ADDR} = '192.168.0.5'; -is($eh->canShowPerformanceIndicators, 1, 'canShowPerformanceIndicators: returns 0 if debugIp is set and IP address matches subnet'); - -#################################################### -# -# showDebug -# -#################################################### - -my $form = $session->form; -$form = Test::MockObject::Extends->new($form); -$form->mock('paramsHashRef', - sub { - return { - password => 'passWord', - identifier => 'qwe123', - username => 'Admin', - }; - }); - -foreach my $entry (qw/_debug_error _debug_warn _debug_info _debug_debug/) { - $eh->{$entry} = $entry . "\n"; -} - -my $showDebug = $eh->showDebug; +WebGUI::Test->interceptLogging( sub { + my $log_data = shift; + $log->error("ERROR"); + is($log_data->{error}, "ERROR", "error: Log4perl called error"); + $log->error("More errors"); + is($log_data->{error}, "More errors", "error: Log4perl called error again"); +}); #################################################### # @@ -225,17 +100,16 @@ my $showDebug = $eh->showDebug; # #################################################### -my $newSession = WebGUI::Session->open(WebGUI::Test::root, WebGUI::Test::file); -WebGUI::Test->addToCleanup($newSession); -my $outputBuffer; -open my $outputHandle, '>', \$outputBuffer or die "Unable to create scalar filehandle: $!\n"; -$newSession->output->setHandle($outputHandle); -WEBGUI_FATAL: { - $newSession->log->fatal('Bad things are happenning'); -} -ok(1, 'fatal: recovered from fatal okay'); -TODO: { - local $TODO = 'Validate the fatal output'; - ok(0, 'output from fatal when there is a db handler and request present'); -} - +WebGUI::Test->interceptLogging( sub { + my $log_data = shift; + my $thrown = try { + $log->fatal('Bad things are happenning'); + fail 'fatal throws exception'; + fail ' ... exception isa WebGUI::Exception::Fatal'; + } + catch { + pass 'fatal throws exception'; + isa_ok $_, 'WebGUI::Error::Fatal'; + }; + is $log_data->{fatal}, 'Bad things are happenning', 'fatal: logger called correctly'; +}); diff --git a/t/Session/Form.t b/t/Session/Form.t index c094b06ad..69893b5d2 100644 --- a/t/Session/Form.t +++ b/t/Session/Form.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; @@ -22,16 +20,16 @@ plan tests => 4; my $session = WebGUI::Test->session; my $token = $session->scratch->get('webguiCsrfToken'); -$session->request->method('POST'); +$session->request->env->{'REQUEST_METHOD'} = 'POST'; $session->request->setup_param({ webguiCsrfToken => $token, }); ok($session->form->validToken, 'validToken: right method and form value'); -$session->request->method('GET'); +$session->request->env->{'REQUEST_METHOD'} = 'GET'; ok(! $session->form->validToken, '... wrong method, right form value'); -$session->request->method('POST'); +$session->request->env->{'REQUEST_METHOD'} = 'POST'; $session->request->setup_param({ webguiCsrfToken => 'bad token', }); ok(! $session->form->validToken, 'validToken: right method and wrong form value'); -$session->request->method('GET'); +$session->request->env->{'REQUEST_METHOD'} = 'GET'; ok(! $session->form->validToken, 'validToken: wrong method and form value'); diff --git a/t/Session/Http.t b/t/Session/Http.t index 2ee64ea5d..a479234c9 100644 --- a/t/Session/Http.t +++ b/t/Session/Http.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -7,13 +7,15 @@ #------------------------------------------------------------------- # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- - -use FindBin; + +# this test file is now slightly badly named since the functions in +# WebGUI::Session::HTTML have all been migrated to +# WebGUI::Session::Request and ::Response. still, these tests need +# to continue to pass. + use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; -use WebGUI::PseudoRequest; use WebGUI::Session; use HTML::TokeParser; use DateTime; @@ -23,11 +25,10 @@ use Data::Dumper; use Test::More; # increment this value for each test you create use Test::Deep; -plan tests => 57; - my $session = WebGUI::Test->session; -my $http = $session->http; +my $http = $session->http; +my $response = $session->response; use Test::MockObject::Extends; @@ -35,60 +36,27 @@ use Test::MockObject::Extends; ##try and implement the mod_perl cookie handling code. $http = Test::MockObject::Extends->new($http); my $cookieName = $session->config->getCookieName; -my $varId = $session->var->getId(); +my $varId = $session->getId(); $http->mock( getCookies => sub { return {$cookieName => $varId} } ); isa_ok($http, 'WebGUI::Session::Http', 'session has correct object type'); -#################################################### -# -# setStatus, getStatus, getStatusDescription -# -#################################################### - -$http->setStatus('123'); - -is($http->getStatus, '123', 'getStatus: returns correct code'); -is($http->getStatusDescription, 'OK', 'getStatusDescription: returns default description via getStatus'); - -$http->setStatus(''); - -is($http->getStatusDescription, 'OK', 'getStatusDescription: returns default description via itself'); -is($http->getStatus, '200', 'getStatus: returns default code'); - -$http->setStatus('', 'packets are great'); - -is($http->getStatusDescription, 'packets are great', 'getStatusDescription: returns correct description'); - #################################################### # # isRedirect # #################################################### -$http->setStatus('200'); +$response->status('200'); ok(!$http->isRedirect, 'isRedirect: 200 is not'); -$http->setStatus('301'); -ok($http->isRedirect, 'isRedirect: 301 is'); +$response->status('301'); +ok($http->isRedirect, '... 301 is'); -$http->setStatus('302'); -ok($http->isRedirect, 'isRedirect: 302 is too'); -$http->setStatus('200'); - -#################################################### -# -# setMimeType, getMimeType -# -#################################################### - -$http->setMimeType(''); -is($http->getMimeType, 'text/html; charset=UTF-8', 'set/get MimeType: default is text/html'); - -$http->setMimeType('image/jpeg'); -is($http->getMimeType, 'image/jpeg', 'set/get MimeType: set specific type and get it'); -$http->setMimeType(''); +$response->status('302'); +ok($http->isRedirect, '... 302 is too'); +$response->status('200'); #################################################### # @@ -98,29 +66,24 @@ $http->setMimeType(''); $http->setStreamedFile(''); is($http->getStreamedFile, undef, 'set/get StreamedFile: false values return undef, empty string'); -$http->setStreamedFile(0); +$http->setStreamedFile(undef); is($http->getStreamedFile, undef, 'set/get StreamedFile: false values return undef, empty string'); -$http->setStreamedFile('/home/streaming'); -is($http->getStreamedFile, '/home/streaming', 'set/get StreamedFile: set specific location and get it'); +my $actual_file = $session->config->get('uploadsPath') . '/9e/a3/9ea37e148e517d4ae3d6326f691d848f/previous.gif'; # arbitrary file that exactually exists and hopefully will continue for a while +$http->setStreamedFile( $actual_file ); +is($http->getStreamedFile, $actual_file, 'set/get StreamedFile: set specific location and get it'); + +do { + eval { + $http->setStreamedFile( $actual_file . '_but_actually_not_an_actual_file_because_someone_appended_a_bunch_of_bloody_garbage_to_it' ); + }; + my $e = WebGUI::Error->caught("WebGUI::Error::InvalidFile"); + my $errorMessage = $e->error; + ok($errorMessage =~ m/No such file or directory/, "set/get StreamedFile: setting a non-existant file blows stuff up but that's okay because it's handled gracefully" ); +}; + $http->setStreamedFile(''); -#################################################### -# -# setFilename, getFilename -# -#################################################### - -$http->setFilename('foo.bin'); -is($http->getFilename, 'foo.bin', 'set/get Filename: filename passed'); -is($http->getMimeType(), 'application/octet-stream', 'set/get Filename: default mime type is octet/stream'); - -$http->setFilename('foo.txt','text/plain'); -is($http->getFilename, 'foo.txt', 'set/get Filename: filename set'); -is($http->getMimeType(), 'text/plain', 'set/get Filename: mime type set'); -$http->setFilename(''); -$http->setMimeType(''); - #################################################### # # setLastModified, getLastModified @@ -151,20 +114,15 @@ $http->setCacheControl(undef); #################################################### # -# setRedirect, getRedirectLocation +# setRedirect # #################################################### -##Let's make a "request object" :) -my $request = WebGUI::PseudoRequest->new(); -$session->{_request} = $request; - $session->request->uri('/here/later'); $http->setRedirect('/here/now'); -is($http->getStatus, 302, 'setRedirect: sets HTTP status'); -is($http->getStatusDescription, 'Redirect', 'setRedirect: sets HTTP status description'); -is($http->getRedirectLocation, '/here/now', 'setRedirect: redirect location'); +is($response->status, 302, 'setRedirect: sets HTTP status'); +is($response->location, '/here/now', 'setRedirect: redirect location'); $session->style->useEmptyStyle(1); my $styled = $session->style->generateAdditionalHeadTags(); @@ -177,7 +135,7 @@ my $expectedMetas = [ ]; cmp_bag(\@metas, $expectedMetas, 'setRedirect:sets meta tags in the style object'); -$request->uri('/here/now'); +$session->request->uri('/here/now'); $session->url->{_requestedUrl} = ''; my $sessionAsset = $session->asset; $session->{_asset} = WebGUI::Asset->getDefault($session); @@ -185,7 +143,7 @@ my $defaultAssetUrl = $session->asset->getUrl; is($http->setRedirect($defaultAssetUrl), undef, 'setRedirect: returns undef if returning to self and no params'); -$request->setup_body({ param1 => 'value1' }); +$session->request->setup_body({ param1 => 'value1' }); isnt($http->setRedirect('/here/now'), undef, 'setRedirect: does not return undef if returning to self but there are params'); $session->{_asset} = $sessionAsset; @@ -216,14 +174,23 @@ is($http->sendHeader, undef, 'sendHeader returns undef when no request object is # #################################################### -##Clear request object to run a new set of requests -$request = WebGUI::PseudoRequest->new(); -$session->{_request} = $request; +{ + ##A new, clean session + my $session1 = WebGUI::Test->newSession('noCleanup'); + my $guard = WebGUI::Test->cleanupGuard($session1); -$http->setRedirect('/here/there'); -$http->sendHeader; -is($request->status, 302, 'sendHeader as redirect: status set to 301'); -is_deeply($request->headers_out->fetch, {'Location' => '/here/there'}, 'sendHeader as redirect: location set'); + $session1->http->setRedirect('/here/there'); + $session1->http->sendHeader; + is($session1->response->status, 302, 'sendHeader as redirect: status set to 301'); + cmp_deeply( + headers_out($session1->response->headers), + { + 'Location' => '/here/there', + 'Content-Type' => 'text/html; charset=UTF-8', + }, + '... location set' + ); +} #################################################### # @@ -231,24 +198,34 @@ is_deeply($request->headers_out->fetch, {'Location' => '/here/there'}, 'sendHead # #################################################### -##Clear request object to run a new set of requests -$request = WebGUI::PseudoRequest->new(); -$session->{_request} = $request; -$http->setStatus(200, 'Just spiffy'); -$http->setMimeType(''); -$http->setLastModified(1200); -$http->setNoHeader(0); +{ -$http->sendHeader(); -is($request->status, 200, 'sendHeader: status set'); -is($request->status_line, '200 Just spiffy', 'sendHeader: status_line set'); -is($request->content_type, 'text/html; charset=UTF-8', 'sendHeader: default mimetype'); -is($request->no_cache, undef, 'sendHeader: no_cache undefined'); -my $expected_headers = { - 'Last-Modified' => $session->datetime->epochToHttp(1200), - 'Cache-Control' => 'must-revalidate, max-age=1', -}; -cmp_deeply($request->headers_out->fetch, $expected_headers, 'sendHeader: normal headers'); + ##A new, clean session + my $session = WebGUI::Test->newSession('nocleanup'); + my $guard = WebGUI::Test->cleanupGuard($session); + my $http = $session->http; + my $response = $session->response; + $response->status(200); + $session->request->protocol(''); + $http->setLastModified(1200); + + $http->sendHeader(); + is($response->status, 200, 'sendHeader: status set'); + cmp_deeply( + [ $response->content_type ], + [ 'text/html', 'charset=UTF-8'] + , '... default mimetype' + ); + cmp_deeply( + headers_out($response->headers), + { + 'Last-Modified' => $session->datetime->epochToHttp(1200), + 'Cache-Control' => 'must-revalidate, max-age=1', + 'Content-Type' => 'text/html; charset=UTF-8', + }, + '... normal headers' + ); +} #################################################### # @@ -256,74 +233,91 @@ cmp_deeply($request->headers_out->fetch, $expected_headers, 'sendHeader: normal # #################################################### -$http->setNoHeader(0); -$http->setFilename('image.png'); -$http->setMimeType('image/png'); -$request->protocol('HTTP 1.1'); -$http->sendHeader(); -is($request->content_type, 'image/png', 'sendHeader: mimetype'); -is_deeply( - $request->headers_out->fetch, - { - 'Last-Modified' => $session->datetime->epochToHttp(1200), - 'Content-Disposition' => q!attachment; filename="image.png"!, - 'Cache-Control' => 'must-revalidate, max-age=1', - }, - 'sendHeader: normal headers' -); - +{ + ##A new, clean session + my $session = WebGUI::Test->newSession('nocleanup', { SERVER_PROTOCOL => 'HTTP 1.1', }); + my $guard = WebGUI::Test->cleanupGuard($session); + my $http = $session->http; + my $response = $session->response; + $response->header( 'Content-Disposition' => qq{attachment; filename="image.png"}); + $response->content_type('image/png'); + $http->sendHeader(); + is($response->headers->content_type, 'image/png', 'sendHeader: mimetype'); + cmp_deeply( + headers_out($response->headers), + { + 'Last-Modified' => $session->datetime->epochToHttp(time()), + 'Content-Disposition' => q!attachment; filename="image.png"!, + 'Content-Type' => 'image/png', + 'Cache-Control' => 'must-revalidate, max-age=1' + }, + '... normal headers' + ); +} #################################################### # # sendHeader, old HTTP protocol # #################################################### -$request = WebGUI::PseudoRequest->new(); -$session->{_request} = $request; +{ + ##A new, clean session + my $http_request = HTTP::Request::Common::GET('http://'.$session->config->get('sitename')->[0]); + $http_request->protocol('HTTP/1.0'); + my $session = WebGUI::Test->newSession('nocleanup', $http_request); + my $guard = WebGUI::Test->cleanupGuard($session); + my $http = $session->http; + my $response = $session->response; + my $time = $session->datetime->epochToHttp(time()); + $http->sendHeader(); + my $headers = headers_out($response->headers); + my $expire_header = $headers->{Expires}; + my $delta = deltaHttpTimes($session->datetime->epochToHttp(), $expire_header); + cmp_ok($delta->seconds, '<=', 1, 'sendHeader, old HTTP protocol: adds extra cache header field'); + cmp_deeply( + $headers, + { + 'Last-Modified' => ignore(), + 'Cache-Control' => 'must-revalidate, max-age=1', + 'Content-Type' => 'text/html; charset=UTF-8', + 'Expires' => ignore(), + }, + '... checking headers' + ); -$http->setNoHeader(0); -$http->setFilename(''); -$request->protocol('HTTP 1.0'); -$http->sendHeader(); -my $headers_out = $request->headers_out->fetch; -my $expire_header = delete $headers_out->{Expires}; -my $delta = deltaHttpTimes($session->datetime->epochToHttp(), $expire_header); -cmp_ok($delta->seconds, '<=', 1, 'sendHeader, old HTTP protocol: adds extra cache header field'); -is_deeply( - $request->headers_out->fetch, - { - 'Last-Modified' => $session->datetime->epochToHttp(1200), - 'Cache-Control' => 'must-revalidate, max-age=1', - }, - 'sendHeader: normal headers' -); +} #################################################### # # sendHeader, old HTTP protocol, cacheControl set to 500 # #################################################### -$request = WebGUI::PseudoRequest->new(); -$session->{_request} = $request; - -$http->setNoHeader(0); -$http->setFilename(''); -$request->protocol('HTTP 1.0'); -$http->setCacheControl(500); -$http->sendHeader(); -$headers_out = $request->headers_out->fetch; -$expire_header = delete $headers_out->{Expires}; -$delta = deltaHttpTimes($session->datetime->epochToHttp(time+500), $expire_header); -cmp_ok($delta->seconds, '<=', 2, 'sendHeader, old HTTP protocol, cacheControl=500: adds extra cache header field'); -is_deeply( - $request->headers_out->fetch, - { - 'Last-Modified' => $session->datetime->epochToHttp(1200), - 'Cache-Control' => 'must-revalidate, max-age=500', - }, - 'sendHeader: normal headers' -); +{ + ##A new, clean session + my $http_request = HTTP::Request::Common::GET('http://'.$session->config->get('sitename')->[0]); + $http_request->protocol('HTTP/1.0'); + my $session = WebGUI::Test->newSession('nocleanup', $http_request); + my $guard = WebGUI::Test->cleanupGuard($session); + my $http = $session->http; + my $response = $session->response; + $http->setCacheControl(500); + $http->sendHeader(); + my $headers = headers_out($response->headers); + my $expire_header = $headers->{Expires}; + my $delta = deltaHttpTimes($session->datetime->epochToHttp(time+500), $expire_header); + cmp_ok($delta->seconds, '<=', 2, 'sendHeader, old HTTP protocol, cacheControl=500: adds extra cache header field'); + cmp_deeply( + $headers, + { + 'Last-Modified' => ignore(), + 'Cache-Control' => 'must-revalidate, max-age=500', + 'Content-Type' => 'text/html; charset=UTF-8', + 'Expires' => ignore(), + }, + '... checking headers' + ); +} #################################################### # @@ -332,24 +326,28 @@ is_deeply( #################################################### ##Clear request object to run a new set of requests -$request = WebGUI::PseudoRequest->new(); -$session->{_request} = $request; -$http->setFilename(''); -$http->setNoHeader(0); +{ + ##A new, clean session + my $session = WebGUI::Test->newSession('nocleanup'); + my $guard = WebGUI::Test->cleanupGuard($session); + my $http = $session->http; + my $response = $session->response; -$session->setting->set('preventProxyCache', 1); + $session->setting->set('preventProxyCache', 1); -$http->sendHeader(); -is($request->no_cache, 1, 'sendHeader: no_cache set when preventProxyCache set'); -is_deeply( - $request->headers_out->fetch, - { - 'Cache-Control' => 'private, max-age=1', - }, - 'sendHeader: Cache-Control setting when preventProxyCache set' -); + $http->sendHeader(); + cmp_deeply( + headers_out($response->headers), + { + 'Content-Type' => 'text/html; charset=UTF-8', + 'Cache-Control' => 'private, max-age=1, no-cache', + 'Pragma' => 'no-cache', + }, + 'sendHeader: Cache-Control setting when preventProxyCache set' + ); -$session->setting->set('preventProxyCache', 0); + $session->setting->set('preventProxyCache', 0); +} #################################################### # @@ -357,22 +355,24 @@ $session->setting->set('preventProxyCache', 0); # #################################################### -##Clear request object to run a new set of requests -$request = WebGUI::PseudoRequest->new(); -$session->{_request} = $request; -$http->setFilename(''); -$http->setNoHeader(0); -$http->setCacheControl('none'); - -$http->sendHeader(); -is($request->no_cache, 1, 'sendHeader: no_cache set when preventProxyCache set'); -is_deeply( - $request->headers_out->fetch, - { - 'Cache-Control' => 'private, max-age=1', - }, - 'sendHeader: Cache-Control setting when preventProxyCache set' -); +{ + ##A new, clean session + my $session = WebGUI::Test->newSession('nocleanup'); + my $guard = WebGUI::Test->cleanupGuard($session); + my $http = $session->http; + my $response = $session->response; + $http->setCacheControl('none'); + $http->sendHeader(); + cmp_deeply( + headers_out($response->headers), + { + 'Cache-Control' => 'private, max-age=1, no-cache', + 'Content-Type' => 'text/html; charset=UTF-8', + 'Pragma' => 'no-cache', + }, + 'sendHeader: Cache-Control setting when cacheControl="none"' + ); +} #################################################### # @@ -380,40 +380,28 @@ is_deeply( # #################################################### -##Clear request object to run a new set of requests -$request = WebGUI::PseudoRequest->new(); -$session->{_request} = $request; -$http->setFilename(''); -$http->setNoHeader(0); -$session->user({userId => 3}); +{ + ##A new, clean session + my $session = WebGUI::Test->newSession('nocleanup'); + my $guard = WebGUI::Test->cleanupGuard($session); + my $http = $session->http; + my $response = $session->response; + $session->user({userId => 3}); -$http->sendHeader(); -is($request->no_cache, 1, 'sendHeader: no_cache set when preventProxyCache set'); -is_deeply( - $request->headers_out->fetch, - { - 'Cache-Control' => 'private, max-age=1', - }, - 'sendHeader: Cache-Control setting when preventProxyCache set' -); + $http->sendHeader(); + cmp_deeply( + headers_out($response->headers), + { + 'Cache-Control' => 'private, max-age=1, no-cache', + 'Content-Type' => 'text/html; charset=UTF-8', + 'Pragma' => 'no-cache', + }, + 'sendHeader: Cache-Control setting when user is not Visitor' + ); -$session->user({userId => 1}); +} -#################################################### -# -# ifModifiedSince -# -#################################################### -##Clear request object to run a new set of requests -$request = WebGUI::PseudoRequest->new(); -$session->{_request} = $request; -$request->headers_in->{'If-Modified-Since'} = ''; -ok $session->http->ifModifiedSince(0), 'ifModifiedSince: empty header always returns true'; - -$request->headers_in->{'If-Modified-Since'} = $session->datetime->epochToHttp(WebGUI::Test->webguiBirthday); -ok $session->http->ifModifiedSince(WebGUI::Test->webguiBirthday + 5), '... epoch check, true'; -ok !$session->http->ifModifiedSince(WebGUI::Test->webguiBirthday - 5), '... epoch check, false'; -ok $session->http->ifModifiedSince(WebGUI::Test->webguiBirthday - 5, 3600), '... epoch check, made true by maxCacheTimeout'; +done_testing; #################################################### # @@ -421,6 +409,13 @@ ok $session->http->ifModifiedSince(WebGUI::Test->webguiBirthday - 5, 3600), '.. # #################################################### +=head2 fetchMultipleMetas ($text) + +Parse a piece of text as HTML, and extract out all the meta tags from it. Returns the meta +tags as a list. + +=cut + sub fetchMultipleMetas { my ($text) = @_; my $p = HTML::TokeParser->new(\$text); @@ -435,6 +430,12 @@ sub fetchMultipleMetas { return @metas; } +=head2 deltaHttpTimes ($http1, $http2) + +Takes two dates in HTTP format, and returns $http1 - $http2 + +=cut + sub deltaHttpTimes { my ($http1, $http2) = @_; my $httpParser = DateTime::Format::Strptime->new(pattern =>'%a, %d %b %Y %H:%M:%S', time_zone => 'GMT'); @@ -442,3 +443,19 @@ sub deltaHttpTimes { my $dt2 = $httpParser->parse_datetime($http2); my $delta_time = $dt1-$dt2; } + +=head2 headers_out ($header_object) + +Returns an array reference of HTTP headers, as hashrefs, from a HTTP::Headers object, to make comparison with +Test::Deep easier. + +=cut + +sub headers_out { + my ($head_obj) = @_; + my $headers = {}; + foreach my $field_name ($head_obj->header_field_names) { + $headers->{$field_name} = $head_obj->header($field_name); + } + return $headers; +} diff --git a/t/Session/Icon.t b/t/Session/Icon.t index 48c5bb170..d1efb2c8b 100644 --- a/t/Session/Icon.t +++ b/t/Session/Icon.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; @@ -20,14 +18,8 @@ use Test::Deep; use Test::MockObject; use HTML::TokeParser; -my $numTests = 10; - my @iconTests = fetchTestSet(); -$numTests += scalar(@iconTests) * 4; - -plan tests => $numTests; - my $session = WebGUI::Test->session; #################################################### @@ -38,14 +30,13 @@ my $session = WebGUI::Test->session; # #################################################### -my $origToolbar = $session->user->profileField('toolbar'); -WebGUI::Test->addToCleanup(sub { $session->user->profileField('toolbar', $origToolbar); },); +my $origToolbar = $session->user->get('toolbar'); +WebGUI::Test->addToCleanup(sub { $session->user->update('toolbar', $origToolbar); },); my $toolbars = $session->url->extras('toolbar/'); -my $newRequest = Test::MockObject->new; +my $request = $session->request; my $requestedUrl = '/home/depot'; -$newRequest->set_bound('uri', \$requestedUrl); -$session->{_request} = $newRequest; +$request->env->{PATH_INFO} = $requestedUrl; my $i18n = WebGUI::International->new($session, 'Icon'); @@ -55,13 +46,13 @@ my $i18n = WebGUI::International->new($session, 'Icon'); # #################################################### -$session->user->profileField('toolbar', 'useLanguageDefault'); +$session->user->update('toolbar', 'useLanguageDefault'); is($session->icon->getBaseURL, $toolbars.'bullet/', 'getBaseUrl: default English toolbar is bullet'); -$session->user->profileField('toolbar', 'mullet'); +$session->user->update('toolbar', 'mullet'); is($session->icon->getBaseURL, $toolbars.'mullet/', 'getBaseUrl: fetch user preference of mullet toolbar'); -$session->user->profileField('toolbar', $origToolbar); +$session->user->update('toolbar', $origToolbar); #################################################### # @@ -157,6 +148,7 @@ SKIP: { cmp_bag(\@toolbarDirs, \@toolbarOptionDirs, 'getToolbarOptions'); } +done_testing; sub linkAndText { my ($text, $tag, @params) = @_; diff --git a/t/Session/Id.t b/t/Session/Id.t index b3bb07867..9813255e8 100644 --- a/t/Session/Id.t +++ b/t/Session/Id.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,13 +8,10 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; -use WebGUI::Utility; use Test::More; @@ -53,23 +50,27 @@ my @testSets = ( my $session = WebGUI::Test->session; -plan tests => scalar(@testSets) + 6; - # generate my $generateId = $session->id->generate(); is(length($generateId), 22, "generate() - length of 22 characters"); -my @uniqueIds; -my $isUnique = 1; -my $isValid = 1; -for (1..2000) { - last unless $isUnique; - my $id = $session->id->generate(); - $isUnique = ($isUnique ? !isIn($id,@uniqueIds) : 0); - $isValid = ($isValid ? $session->id->valid($id) : 0); - push(@uniqueIds,$id); + +my %uniqueIds; +GEN_LOOP: { + for (1..2000) { + my $id = $session->id->generate(); + if (! $session->id->valid($id)) { + fail "GUID $id is valid"; + last GEN_LOOP; + } + elsif ($uniqueIds{$id}) { + fail "GUID $id is unique"; + last GEN_LOOP; + } + $uniqueIds{$id} = 1; + } + pass "All GUIDs valid"; + pass "All GUIDs unique"; } -ok($isUnique, "generate() - unique"); -ok($isValid, "generate() - valid id generated"); foreach my $testSet (@testSets) { is($session->id->valid($testSet->{guid}), $testSet->{valid}, $testSet->{comment}); @@ -80,6 +81,10 @@ foreach my $testSet (@testSets) { is($session->id->toHex('wjabZsKOb7kBBSiO3bQwzA'), 'c2369b66c28e6fb90105288eddb430cc', 'toHex works'); is($session->id->fromHex('c2369b66c28e6fb90105288eddb430cc'), 'wjabZsKOb7kBBSiO3bQwzA', 'fromHex works'); +is( $session->id->toHex('EhTwB4FAnLZPn-ftde39aA'), '1214f00781409cb64f9ff7ed75edfd68', 'toHex with -' ); my $re = $session->id->getValidator; is( ref $re, 'Regexp', 'getValidator returns a regexp object'); + +done_testing; + diff --git a/t/Session/Os.t b/t/Session/Os.t deleted file mode 100644 index 9fd1f7bfb..000000000 --- a/t/Session/Os.t +++ /dev/null @@ -1,52 +0,0 @@ -#------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. -#------------------------------------------------------------------- -# Please read the legal notices (docs/legal.txt) and the license -# (docs/license.txt) that came with this distribution before using -# this software. -#------------------------------------------------------------------- -# http://www.plainblack.com info@plainblack.com -#------------------------------------------------------------------- - -use FindBin; -use strict; -use lib "$FindBin::Bin/../lib"; - -use WebGUI::Test; -use WebGUI::Session; -use WebGUI::Session::Os; - -my @testSets = ( - { - os => 'Win', - type => 'Windowsish', - }, - { - os => 'win32', - type => 'Windowsish', - }, - { - os => 'MSWin32', - type => 'Windowsish', - }, - { - os => 'Amiga OS', - type => 'Linuxish', - }, -); - -use Test::More; - -my $numTests = 2 * scalar @testSets; - -plan tests => $numTests; - -my $session = WebGUI::Test->session; - -foreach my $test (@testSets) { - local $^O = $test->{os}; - my $os = WebGUI::Session::Os->new($session); - is($os->get('name'), $test->{os}, "$test->{os}: name set"); - is($os->get('type'), $test->{type}, "$test->{os}: type set"); -} - diff --git a/t/Session/Output.t b/t/Session/Output.t index 18c5364ef..ff047837c 100644 --- a/t/Session/Output.t +++ b/t/Session/Output.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,19 +8,16 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; use Test::More; # increment this value for each test you create +use Test::Deep; +use Data::Dumper; -my $skip_tests = 8; -my $num_tests = 1 + $skip_tests; - -plan tests => $num_tests; +plan tests => 9; my $session = WebGUI::Test->session; @@ -30,41 +27,38 @@ my $output = $session->output; isa_ok($output, 'WebGUI::Session::Output', 'session has correct object type'); -my $recentVersion = $^V gt v5.8; +my $otherHandleBuffer; +open my $otherHandle, '>', \$otherHandleBuffer or die "Unable to create second filehandle: $!\n"; -SKIP: { - skip "You have an old perl", $skip_tests unless $recentVersion; +my $response = $session->response; - my $otherHandleBuffer; - open my $otherHandle, '>', \$otherHandleBuffer or die "Unable to create second filehandle: $!\n"; +$output->setHandle(undef); +is($output->{_handle}, undef, 'setHandle: handle cleared'); - my $request = $session->request; +$output->print('Hello STDOUT'); +is($response->body->[-1], 'Hello STDOUT', 'print with no handle goes to STDOUT'); - $output->setHandle(undef); - is($output->{_handle}, undef, 'setHandle: handle cleared'); +$output->print(' more stuff'); +cmp_deeply( + $response->body, + ['Hello STDOUT', ' more stuff'], + '... tied variables accumulate' +); - $output->print('Hello STDOUT'); - is($request->get_output, 'Hello STDOUT', 'print with no handle goes to STDOUT'); +$session->user({userId => 3}); +$output->print('^#;'); +like($response->body->[-1], qr/3\Z/, '... macro processing'); - $output->print(' more stuff'); - is($request->get_output, 'Hello STDOUT more stuff', 'print: tied variables accumulate'); +$output->print('^#;', 1); +like($response->body->[-1], qr/\^#;\Z/, '... macro processing skipped due to flag'); - $session->user({userId => 3}); - $output->print('^#;'); - like($request->get_output, qr/3\Z/, 'print: macro processing'); +$session->response->content_type('application/json'); +$output->print('^#;'); +like($response->body->[-1], qr/\^#;\Z/, '... macro processing skipped due to mime type'); - $output->print('^#;', 1); - like($request->get_output, qr/\^#;\Z/, 'print: macro processing skipped'); - - $session->http->setMimeType('application/json'); - $output->print('^#;'); - like($request->get_output, qr/\^#;\Z/, 'print: macro processing skipped'); - - $session->http->setMimeType(''); - $output->setHandle($otherHandle); - $output->print('New content'); - is($otherHandleBuffer, 'New content', 'print: set to explicit handle'); - unlike($request->get_output, qr/New content\Z/, 'print: no leakage back to STDOUT'); - -} +$session->response->content_type(''); +$output->setHandle($otherHandle); +$output->print('New content'); +is($otherHandleBuffer, 'New content', '... set to explicit handle'); +unlike($response->body->[-1], qr/New content\Z/, '... no leakage back to STDOUT'); diff --git a/t/Session/Privilege.t b/t/Session/Privilege.t index 9e127c2a6..116b31371 100644 --- a/t/Session/Privilege.t +++ b/t/Session/Privilege.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; @@ -23,46 +21,40 @@ my @simpleTests = ( { method => 'adminOnly', status => 401, - description => 'Admin Only', titleCode => 35, }, { method => 'insufficient', status => 401, - description => 'Insufficient Privileges', titleCode => 37, }, { method => 'locked', status => 401, - description => 'Insufficient Privileges', titleCode => 37, }, { method => 'notMember', status => 400, - description => 'Not A Member', titleCode => 345, }, { method => 'vitalComponent', status => 403, - description => 'Vital Component', titleCode => 40, }, { method => 'noAccess', status => 401, - description => 'No Access', titleCode => 37, }, ); my $num_tests = 1; -$num_tests += 4 * scalar @simpleTests; ##For each simple privilege validation -$num_tests += 3; ##For noAccess as Visitor tests -$num_tests += 4; ##For insufficient with noStyle=1 +$num_tests += 3 * scalar @simpleTests; ##For each simple privilege validation +$num_tests += 2; ##For noAccess as Visitor tests +$num_tests += 3; ##For insufficient with noStyle=1 plan tests => $num_tests; @@ -72,8 +64,7 @@ my $session = WebGUI::Test->session; my $privilege = $session->privilege; -my ($versionTag, $userTemplate) = setup_assets($session); -WebGUI::Test->addToCleanup($versionTag); +my ($userTemplate) = setup_assets($session); isa_ok($privilege, 'WebGUI::Session::Privilege', 'session has correct object type'); @@ -91,8 +82,7 @@ my $i18n = WebGUI::International->new($session); foreach my $test (@simpleTests) { my $method = $test->{method}; my $output = $privilege->$method; - is($session->http->getStatus(), $test->{status}, "$method: status code"); - is($session->http->getStatusDescription(), $test->{description}, "$method: description"); + is($session->response->status(), $test->{status}, "$method: status code"); my $title = $i18n->get($test->{titleCode}); like($output, qr{<h1>$title</h1>}, "$method: correct title"); like($output, qr{^USERSTYLE}, "$method: renders in WebGUI User Style"); @@ -106,8 +96,7 @@ foreach my $test (@simpleTests) { #################################################### my $output = $privilege->insufficient(1); -is($session->http->getStatus(), '401', 'insufficient: status code with Visitor'); -is($session->http->getStatusDescription(), 'Insufficient Privileges', 'insufficient: description with Visitor'); +is($session->response->status(), '401', 'insufficient: status code with Visitor'); my $title = $i18n->get(37); unlike($output, qr{^USERSTYLE}, "insufficient: when noStyle is true the user style is not used"); like($output, qr{<h1>$title</h1>}, "insufficient: when noStyle is true the title is still okay"); @@ -121,16 +110,13 @@ like($output, qr{<h1>$title</h1>}, "insufficient: when noStyle is true the title $session->user({userId=>1}); my $output = $privilege->noAccess; -is($session->http->getStatus(), '401', 'noAccess: status code with Visitor'); -is($session->http->getStatusDescription(), 'No Access', 'noAccess: description with Visitor'); +is($session->response->status(), '401', 'noAccess: status code with Visitor'); ##Is the auth screen returned, not validating the auth screen is($output, WebGUI::Operation::Auth::www_auth($session, "init"), 'noAccess: visitor sees auth screen'); sub setup_assets { my $session = shift; - my $importNode = WebGUI::Asset->getImportNode($session); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->set({name=>"Session Style test"}); + my $importNode = WebGUI::Test->asset; my $properties = { title => 'user template for printing', className => 'WebGUI::Asset::Template', @@ -143,7 +129,7 @@ sub setup_assets { # '1234567890123456789012' }; my $userTemplate = $importNode->addChild($properties, $properties->{id}); - return ($versionTag, $userTemplate); + return ($userTemplate); } #vim:ft=perl diff --git a/t/Session/Request.t b/t/Session/Request.t new file mode 100644 index 000000000..635e63d23 --- /dev/null +++ b/t/Session/Request.t @@ -0,0 +1,51 @@ +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 strict; + +use WebGUI::Test; +use WebGUI::Session; + +use Test::More; # increment this value for each test you create + +my $session = WebGUI::Test->session; + +my $response = $session->response; + +#################################################### +# +# ifModifiedSince +# +#################################################### +##Clear request object to run a new set of requests + +{ + ##A new, clean session + my $http_request = HTTP::Request::Common::GET('http://'.$session->config->get('sitename')->[0]); + $http_request->header('If-Modified-Since' => ''); + my $session = WebGUI::Test->newSession('nocleanup', $http_request); + my $guard = WebGUI::Test->addToCleanup($session); + ok $session->request->ifModifiedSince(0), 'ifModifiedSince: empty header always returns true'; + +} + +{ + my $http_request = HTTP::Request::Common::GET('http://'.$session->config->get('sitename')->[0]); + $http_request->header('If-Modified-Since' => $session->datetime->epochToHttp(WebGUI::Test->webguiBirthday)); + my $session = WebGUI::Test->newSession('nocleanup', $http_request); + my $guard = WebGUI::Test->cleanupGuard($session); + ok $session->request->ifModifiedSince(WebGUI::Test->webguiBirthday + 5), '... epoch check, true'; + ok !$session->request->ifModifiedSince(WebGUI::Test->webguiBirthday - 5), '... epoch check, false'; + ok $session->request->ifModifiedSince(WebGUI::Test->webguiBirthday - 5, 3600), '... epoch check, made true by maxCacheTimeout'; +} + +done_testing; + + diff --git a/t/Session/Scratch.t b/t/Session/Scratch.t index 95c759aa2..1df401821 100644 --- a/t/Session/Scratch.t +++ b/t/Session/Scratch.t @@ -1,133 +1,131 @@ -#------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. -#------------------------------------------------------------------- -# Please read the legal notices (docs/legal.txt) and the license -# (docs/license.txt) that came with this distribution before using -# this software. -#------------------------------------------------------------------- -# http://www.plainblack.com info@plainblack.com -#------------------------------------------------------------------- - -use FindBin; -use strict; -use lib "$FindBin::Bin/../lib"; - -use WebGUI::Test; -use WebGUI::Session; - -use Test::More tests => 62; # increment this value for each test you create -use Test::Deep; - -my $session = WebGUI::Test->session; - -my $scratch = $session->scratch; -my $maxCount = 10; - -$scratch->deleteAll(); - -for (my $count = 1; $count <= $maxCount; $count++){ - $scratch->set("Test$count",$count); -} - -for (my $count = 1; $count <= $maxCount; $count++){ - is($scratch->get("Test$count"), $count, "Passed set/get $count"); -} - -is($scratch->delete("nonExistantVariable"), undef, 'delete returns value if deleted, otherwise undef'); -is($scratch->delete("Test1"), 1, 'delete returns number deleted'); -is($scratch->delete(), undef, 'delete without name of variable to delete returns undef'); -is($scratch->get("Test1"), undef, "delete()"); - -$scratch->deleteAll; -is($scratch->get("Test2"), undef, "deleteAll()"); - -my $testScratchSession = $scratch->session(); - -is($testScratchSession, $session, "session()"); - -##Build some variables to test database persistency - -for (my $count = 1; $count <= $maxCount; $count++){ - $scratch->set("dBase$count",$count); - my ($setValue) = $session->db->quickArray("select value from userSessionScratch where sessionId=? and name=?",[$session->getId, "dBase$count"]); - is($setValue, $count, "database store for set on $count"); -} - -##Creating a new session with the previous session's Id should clone the scratch data -my $newSession = WebGUI::Session->open(WebGUI::Test->root, WebGUI::Test->file, undef, undef, $session->getId); -WebGUI::Test->addToCleanup($newSession); - -is($newSession->getId, $session->getId, "Successful session duplication"); - -for (my $count = 1; $count <= $maxCount; $count++){ - is($newSession->scratch->get("dBase$count"), $count, "Passed set/get $count"); -} - -$scratch->set("dBase5", 15); - -my ($changedValue) = $session->db->quickArray("select value from userSessionScratch where sessionId=? and name=?",[$session->getId, "dBase5"]); -is($changedValue, 15, "changing stored scratch value"); -is($scratch->get("dBase5"), 15, "checking cached scratch value"); - -$newSession->scratch->deleteAll; -$newSession->close; - -is($scratch->set('retVal',2), 1, 'set returns number of rows affected'); -is($scratch->set(), undef, 'set returns undef unless it gets a name'); -is($scratch->set('','value'), undef, 'set returns undef unless it gets a name even if there is a value'); - -############################################ -# -# Multi-session deleting -# -############################################ - -my @sessionBank = map { WebGUI::Session->open(WebGUI::Test->root, WebGUI::Test->file) } 0..3; - -WebGUI::Test->addToCleanup(@sessionBank); - -##Set variables to be deleted by name -foreach my $i (0..3) { - $sessionBank[$i]->scratch->set('deletableName', $i); -} -##Set variables to be deleted by name and value -$sessionBank[0]->scratch->set('deletableValue', 'a'); -$sessionBank[1]->scratch->set('deletableValue', 'a'); -$sessionBank[2]->scratch->set('deletableValue', 'b'); -$sessionBank[2]->scratch->set('falseValue', ''); -$sessionBank[3]->scratch->set('deletableValue', 'c'); -$sessionBank[3]->scratch->set('falseValue', '0'); - -is($scratch->deleteName(), undef, 'deleteName without name of variable to delete returns undef'); -is($sessionBank[2]->scratch->deleteName("deletableName"), 4, 'deleteName returns number of elements deleted'); -is($sessionBank[2]->scratch->get("deletableName"), undef, 'deleteName clears session cached in the object that calls it'); -is($sessionBank[1]->scratch->get('deletableName'), 1, "deleteName does not change session cached vriables"); -my ($entries) = $session->db->quickArray("select count(name) from userSessionScratch where name=?",['deletableName']); -is($entries, 0, "deleteName deletes entries in the database"); - -is($sessionBank[1]->scratch->deleteNameByValue('deletableValue', 'a'), 2, 'deleteNameByValue deleted two rows'); -($entries) = $session->db->quickArray("select count(name) from userSessionScratch where name=?",['deletableValue']); -is($entries, 2, "deleteNameByValue deleted entries in the database"); -is($sessionBank[1]->scratch->get('deletableValue'), undef, 'deleteNameByValue removes session cache in object that called it...'); -is($sessionBank[0]->scratch->get('deletableValue'), 'a', 'but not in any other object whose database entry was cleared'); -cmp_bag($session->db->buildArrayRef('select value from userSessionScratch where name=?',['deletableValue']), ['b', 'c'], 'deleteNameByValue values that were not deleted'); - -is($sessionBank[2]->scratch->deleteNameByValue('deletableValue', 'c'), 1, 'deleteNameByValue deleted one row'); - -is($sessionBank[0]->scratch->deleteNameByValue('',35), undef, 'deleteNameByValue requires a NAME'); -is($sessionBank[0]->scratch->deleteNameByValue('scratch'), undef, 'deleteNameByValue requires a value'); -is($sessionBank[0]->scratch->deleteNameByValue('',''), undef, 'deleteNameByValue require a NAME and a VALUE'); -is($sessionBank[3]->scratch->deleteNameByValue('falseValue','0'), 1, 'deleteNameByValue will delete values that are false (0)'); -is($sessionBank[2]->scratch->deleteNameByValue('falseValue',''), 1, "deleteNameByValue will delete values that are false ('')"); - -$scratch->setLanguageOverride('English'); -is($scratch->getLanguageOverride, 'English', 'session scratch language is not correctly set'); -$scratch->removeLanguageOverride; -is($scratch->getLanguageOverride, undef, 'The session scratch variable language is not removed'); -$scratch->setLanguageOverride('myimmaginarylanguagethatisnotinstalled'); -is($scratch->getLanguageOverride, undef, 'A non-existing language is set'); -$scratch->setLanguageOverride('English'); -$scratch->setLanguageOverride(); -is($scratch->getLanguageOverride, 'English', 'A empty string is falsely recognised as a language'); - -#vim:ft=perl +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 strict; + +use WebGUI::Test; +use WebGUI::Session; + +use Test::More tests => 62; # increment this value for each test you create +use Test::Deep; + +my $session = WebGUI::Test->session; + +my $scratch = $session->scratch; +my $maxCount = 10; + +$scratch->deleteAll(); + +for (my $count = 1; $count <= $maxCount; $count++){ + $scratch->set("Test$count",$count); +} + +for (my $count = 1; $count <= $maxCount; $count++){ + is($scratch->get("Test$count"), $count, "Passed set/get $count"); +} + +is($scratch->delete("nonExistantVariable"), undef, 'delete returns value if deleted, otherwise undef'); +is($scratch->delete("Test1"), 1, 'delete returns number deleted'); +is($scratch->delete(), undef, 'delete without name of variable to delete returns undef'); +is($scratch->get("Test1"), undef, "delete()"); + +$scratch->deleteAll; +is($scratch->get("Test2"), undef, "deleteAll()"); + +my $testScratchSession = $scratch->session(); + +is($testScratchSession, $session, "session()"); + +##Build some variables to test database persistency + +for (my $count = 1; $count <= $maxCount; $count++){ + $scratch->set("dBase$count",$count); + my ($setValue) = $session->db->quickArray("select value from userSessionScratch where sessionId=? and name=?",[$session->getId, "dBase$count"]); + is($setValue, $count, "database store for set on $count"); +} + +##Creating a new session with the previous session's Id should clone the scratch data +my $newSession = WebGUI::Session->open(WebGUI::Test->file, undef, $session->getId); +WebGUI::Test->addToCleanup($newSession); + +is($newSession->getId, $session->getId, "Successful session duplication"); + +for (my $count = 1; $count <= $maxCount; $count++){ + is($newSession->scratch->get("dBase$count"), $count, "Passed set/get $count"); +} + +$scratch->set("dBase5", 15); + +my ($changedValue) = $session->db->quickArray("select value from userSessionScratch where sessionId=? and name=?",[$session->getId, "dBase5"]); +is($changedValue, 15, "changing stored scratch value"); +is($scratch->get("dBase5"), 15, "checking cached scratch value"); + +$newSession->scratch->deleteAll; +$newSession->close; + +is($scratch->set('retVal',2), 1, 'set returns number of rows affected'); +is($scratch->set(), undef, 'set returns undef unless it gets a name'); +is($scratch->set('','value'), undef, 'set returns undef unless it gets a name even if there is a value'); + +############################################ +# +# Multi-session deleting +# +############################################ + +my @sessionBank = map { WebGUI::Session->open(WebGUI::Test->file) } 0..3; + +WebGUI::Test->addToCleanup(@sessionBank); + +##Set variables to be deleted by name +foreach my $i (0..3) { + $sessionBank[$i]->scratch->set('deletableName', $i); +} +##Set variables to be deleted by name and value +$sessionBank[0]->scratch->set('deletableValue', 'a'); +$sessionBank[1]->scratch->set('deletableValue', 'a'); +$sessionBank[2]->scratch->set('deletableValue', 'b'); +$sessionBank[2]->scratch->set('falseValue', ''); +$sessionBank[3]->scratch->set('deletableValue', 'c'); +$sessionBank[3]->scratch->set('falseValue', '0'); + +is($scratch->deleteName(), undef, 'deleteName without name of variable to delete returns undef'); +is($sessionBank[2]->scratch->deleteName("deletableName"), 4, 'deleteName returns number of elements deleted'); +is($sessionBank[2]->scratch->get("deletableName"), undef, 'deleteName clears session cached in the object that calls it'); +is($sessionBank[1]->scratch->get('deletableName'), 1, "deleteName does not change session cached vriables"); +my ($entries) = $session->db->quickArray("select count(name) from userSessionScratch where name=?",['deletableName']); +is($entries, 0, "deleteName deletes entries in the database"); + +is($sessionBank[1]->scratch->deleteNameByValue('deletableValue', 'a'), 2, 'deleteNameByValue deleted two rows'); +($entries) = $session->db->quickArray("select count(name) from userSessionScratch where name=?",['deletableValue']); +is($entries, 2, "deleteNameByValue deleted entries in the database"); +is($sessionBank[1]->scratch->get('deletableValue'), undef, 'deleteNameByValue removes session cache in object that called it...'); +is($sessionBank[0]->scratch->get('deletableValue'), 'a', 'but not in any other object whose database entry was cleared'); +cmp_bag($session->db->buildArrayRef('select value from userSessionScratch where name=?',['deletableValue']), ['b', 'c'], 'deleteNameByValue values that were not deleted'); + +is($sessionBank[2]->scratch->deleteNameByValue('deletableValue', 'c'), 1, 'deleteNameByValue deleted one row'); + +is($sessionBank[0]->scratch->deleteNameByValue('',35), undef, 'deleteNameByValue requires a NAME'); +is($sessionBank[0]->scratch->deleteNameByValue('scratch'), undef, 'deleteNameByValue requires a value'); +is($sessionBank[0]->scratch->deleteNameByValue('',''), undef, 'deleteNameByValue require a NAME and a VALUE'); +is($sessionBank[3]->scratch->deleteNameByValue('falseValue','0'), 1, 'deleteNameByValue will delete values that are false (0)'); +is($sessionBank[2]->scratch->deleteNameByValue('falseValue',''), 1, "deleteNameByValue will delete values that are false ('')"); + +$scratch->setLanguageOverride('English'); +is($scratch->getLanguageOverride, 'English', 'session scratch language is not correctly set'); +$scratch->removeLanguageOverride; +is($scratch->getLanguageOverride, undef, 'The session scratch variable language is not removed'); +$scratch->setLanguageOverride('myimmaginarylanguagethatisnotinstalled'); +is($scratch->getLanguageOverride, undef, 'A non-existing language is set'); +$scratch->setLanguageOverride('English'); +$scratch->setLanguageOverride(); +is($scratch->getLanguageOverride, 'English', 'A empty string is falsely recognised as a language'); + +#vim:ft=perl diff --git a/t/Session/Setting.t b/t/Session/Setting.t index ce90ea387..615e4bade 100644 --- a/t/Session/Setting.t +++ b/t/Session/Setting.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; diff --git a/t/Session/Stow.t b/t/Session/Stow.t index 6fe0a1205..b786c61f5 100644 --- a/t/Session/Stow.t +++ b/t/Session/Stow.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,14 +8,12 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; -use Test::More tests => 35; # increment this value for each test you create +use Test::More tests => 33; # increment this value for each test you create my $session = WebGUI::Test->session; @@ -25,9 +23,6 @@ my $stow = $session->stow; my $count = 0; my $maxCount = 20; -my $disableCache = $session->config->get('disableCache'); -$session->config->set('disableCache',0); - for (my $count = 1; $count <= $maxCount; $count++){ $stow->set("Test$count",$count); } @@ -41,22 +36,6 @@ is($stow->get("Test1"), undef, "delete()"); $stow->deleteAll; is($stow->get("Test2"), undef, "deleteAll()"); -#################################################### -# -# get, set with disableCache -# -#################################################### - -$session->config->set('disableCache', 1); -is($stow->get('Test2'), undef, 'get: when config->disableCache is set get returns undef'); - -WebGUI::Test->interceptLogging(); - -$stow->set('unavailableVariable', 'too bad'); -is($WebGUI::Test::logger_debug, 'Stow->set() is being called but cache has been disabled', 'debug emitted by set when disableCache is true'); - -$session->config->set('disableCache', 0); - is($session->stow->set('', 'null string'), undef, 'set returns undef when name is empty string'); is($session->stow->set(0, 'zero'), undef, 'set returns undef when name is zero'); diff --git a/t/Session/Style.t b/t/Session/Style.t index 457fe9f40..6e7715359 100644 --- a/t/Session/Style.t +++ b/t/Session/Style.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use HTML::TokeParser; use WebGUI::Test; @@ -19,8 +17,9 @@ use WebGUI::Asset; use WebGUI::VersionTag; use WebGUI; -use Test::More tests => 58; # increment this value for each test you create +use Test::More; use Test::Deep; +use Data::Dumper; my $session = WebGUI::Test->session; @@ -28,8 +27,6 @@ my $session = WebGUI::Test->session; my $style = $session->style; -my $crappyPerl = $^V lt v5.8; - isa_ok($style, 'WebGUI::Session::Style', 'session has correct object type'); #################################################### @@ -139,19 +136,20 @@ is($url, '-', 'setScript: called with no params or script url'); $style->setScript('http://www.plainblack.com/stuff.js'); is($style->setScript('http://www.plainblack.com/stuff.js'), undef, 'setScript: called with duplicate url returns undef'); my $scriptOutput = $style->generateAdditionalHeadTags; -($url) = simpleLinkParser('script', $scriptOutput); -is($url, 'http://www.plainblack.com/stuff.js', 'setScript: called with script url'); +($url, $params) = simpleLinkParser('script', $scriptOutput); +is($url, 'http://www.plainblack.com/stuff.js', '... called with script url'); +is_deeply($params, { type => 'text/javascript', }, '... defaults to text/javascript'); -my $setParams = { type => 'text/javascript' }; +my $setParams = { type => 'textual/mongoscript' }; my $setUrl = 'http://www.webguidev.org/sorting.js'; $style->setScript($setUrl, $setParams); my $scriptOutput = $style->generateAdditionalHeadTags; ($url, $params) = simpleLinkParser('script', $scriptOutput); -is($url, $setUrl, 'setScript: called with new script url'); -is_deeply($params, $setParams, 'setScript: params set properly'); +is($url, $setUrl, '... called with new script url'); +is_deeply($params, $setParams, '... params set properly'); sendImmediate($style, 'setScript', 'http://dev.setscript.com/script.js', - 'setScript, sent: data automatically sent out via Session->Output'); + '... sent: data automatically sent out via Session->Output'); TODO: { local $TODO = "more setScript tests"; @@ -175,8 +173,7 @@ is($macroOutput, 1, 'generateAdditionalHeadTags: process a macro'); # #################################################### -my ($versionTag, $templates, $article, $snippet) = setup_assets($session); -WebGUI::Test->addToCleanup($versionTag); +my ($templates, $article, $snippet) = setup_assets($session); $style->sent(0); is($style->sent, 0, 'process: setup sent to 0'); @@ -198,7 +195,7 @@ $session->setting->set('userFunctionStyleId', $templates->{user}->getId); is($style->userStyle('userStyle'), 'USER PRINTABLE STYLE TEMPLATE:userStyle', 'userStyle returns templated output according to userFunctionStyleId in settings'); -is($session->http->{_http}{cacheControl}, 'none', 'userStyle(via process): HTTP cacheControl set to none to prevent proxying'); +is($session->http->getCacheControl, 'none', 'userStyle(via process): HTTP cacheControl set to none to prevent proxying'); is($style->userStyle('userStyle'), 'USER PRINTABLE STYLE TEMPLATE:userStyle', 'userStyle returns templated output according to userFunctionStyleId in settings'); @@ -309,8 +306,7 @@ $head =~ s/(^HEAD=.+$)/$1/s; cmp_bag(\@metas, $expectedMetas, 'process:default meta tags with no caching head tags, preventProxyCache setting'); $session->setting->set('preventProxyCache', $origPreventProxyCache); -##No accessor -is($session->http->{_http}{cacheControl}, 'none', 'process: HTTP cacheControl set to none to prevent proxying'); +is($session->http->getCacheControl, 'none', 'process: HTTP cacheControl set to none to prevent proxying'); #################################################### # @@ -409,6 +405,8 @@ is($style->process('test output'), "WebGUI was unable to instantiate your style template with the id: .test output", 'process: no valid printableStyleTemplateFound in asset branch returns error'); +done_testing(); + #################################################### # # Utility routines for printing @@ -452,24 +450,16 @@ sub fetchMultipleMetas { sub sendImmediate { my ($style, $action, $output, $comment) = @_; - SKIP: { - skip "You have an old perl", 1 if $crappyPerl; - my $request = $style->session->request; - $request->clear_output; - $style->sent(1); - $style->$action($output); - like($request->get_output, qr/$output/, $comment); - $style->sent(0); - } - + $style->sent(1); + $style->$action($output); + like($style->session->response->body->[-1], qr/$output/, $comment); + $style->sent(0); } #like($buffer, qr/$output/, ); sub setup_assets { my $session = shift; - my $importNode = WebGUI::Asset->getImportNode($session); - my $versionTag = WebGUI::VersionTag->getWorking($session); - $versionTag->set({name=>"Session Style test"}); + my $importNode = WebGUI::Test->asset; my $templates = {}; my $properties = { title => 'personal style test template', @@ -563,6 +553,6 @@ sub setup_assets { snippet => 'I am a snippet', }; my $snippet = $daddySnippet->addChild($properties, $properties->{id}); - $versionTag->commit; - return ($versionTag, $templates, $asset, $snippet); + WebGUI::Test->addToCleanup($daddySnippet, $snippet); + return ($templates, $asset, $snippet); } diff --git a/t/Session/Url.t b/t/Session/Url.t index aaca5c6ec..d280f4eb4 100644 --- a/t/Session/Url.t +++ b/t/Session/Url.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,12 +8,9 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; -use WebGUI::PseudoRequest; use WebGUI::Session; use WebGUI::Asset; @@ -29,7 +26,7 @@ my @getRefererUrlTests = ( comment => 'getRefererUrl returns the url minus the gateway', }, { - input => 'http://www.domain.com/myUrl.html?op=switchAdminOn', + input => 'http://www.domain.com/myUrl.html?op=admin', output => 'myUrl.html', comment => 'getRefererUrl returns the url minus the gateway', }, @@ -51,13 +48,9 @@ my @getRefererUrlTests = ( ); use Test::More; -use Test::MockObject::Extends; -plan tests => 87 + scalar(@getRefererUrlTests); my $session = WebGUI::Test->session; - -my $pseudoRequest = WebGUI::PseudoRequest->new(); -$session->{_request} = $pseudoRequest; +my $request = $session->request; #disable caching my $preventProxyCache = $session->setting->get('preventProxyCache'); @@ -138,17 +131,14 @@ $session->url->setSiteURL('http://webgui.org'); is( $session->url->getSiteURL, 'http://webgui.org', 'override config setting with setSiteURL'); ##Create a fake environment hash so we can muck with it. -my %mockEnv = %ENV; -my $env = $session->env; -$env = Test::MockObject::Extends->new($env); -$env->mock('get', sub { return $mockEnv{$_[1]} } ); +my $env = $session->request->env; -$mockEnv{HTTPS} = "on"; +$env->{'psgi.url_scheme'} = "https"; $session->url->setSiteURL(undef); is( $session->url->getSiteURL, 'https://'.$sitename, 'getSiteURL from config as http_host with SSL'); -$mockEnv{HTTPS} = ""; -$mockEnv{HTTP_HOST} = "devsite.com"; +$env->{'psgi.url_scheme'} = "http"; +$env->{HTTP_HOST} = "devsite.com"; $session->url->setSiteURL(undef); is( $session->url->getSiteURL, 'http://'.$sitename, 'getSiteURL where requested host is not a configured site'); @@ -200,31 +190,25 @@ is( $session->url->makeCompliant($character), $character, 'utf8 allowed in URLs' # ####################################### -my $originalRequest = $session->request; ##Save the original request object -$session->{_request} = undef; +my $setUri = sub { + $request->env->{PATH_INFO} = $_[0]; +}; -is($session->url->getRequestedUrl, undef, 'getRequestedUrl returns undef unless it has a request object'); -$session->{_request} = $originalRequest; +$setUri->('empty'); +is($session->request->uri, 'http://devsite.com/empty', 'Validate Mock Object operation'); -$pseudoRequest->uri('empty'); -is($session->request->uri, 'empty', 'Validate Mock Object operation'); +$setUri->('full'); +is($session->request->uri, 'http://devsite.com/full', 'Validate Mock Object operation #2'); -$pseudoRequest->uri('full'); -is($session->request->uri, 'full', 'Validate Mock Object operation #2'); +$setUri->('/path1/file1'); +is($session->url->getRequestedUrl, '/path1/file1', 'getRequestedUrl, fetch'); -$pseudoRequest->uri('/path1/file1'); -is($session->url->getRequestedUrl, 'path1/file1', 'getRequestedUrl, fetch'); - -$pseudoRequest->uri('/path2/file2'); -is($session->url->getRequestedUrl, 'path1/file1', 'getRequestedUrl, check cache of previous result'); - -$session->url->{_requestedUrl} = undef; ##Manually clear cached value -$pseudoRequest->uri('/path2/file2?param1=one;param2=two'); -is($session->url->getRequestedUrl, 'path2/file2', 'getRequestedUrl, does not return params'); +$setUri->('/path2/file2'); +is($session->url->getRequestedUrl, '/path1/file1', 'getRequestedUrl, check cache of previous result'); $session->url->{_requestedUrl} = undef; my $utf8_url = "Viel Spa\x{00DF}"; -$pseudoRequest->uri($utf8_url); +$setUri->($utf8_url); use Encode; my $decoded_url = decode_utf8($utf8_url); is $session->url->getRequestedUrl(), $decoded_url, 'getRequestedUrl returns utf8 decoded data'; @@ -239,7 +223,7 @@ my $sessionAsset = $session->asset; $session->asset(undef); $session->url->{_requestedUrl} = undef; ##Manually clear cached value -$pseudoRequest->uri('/path1/">file1'); +$setUri->('/path1/">file1'); is($session->url->page, '/path1/%22%3Efile1', 'page with no args returns getRequestedUrl through gateway, escaping the requested URL for safety'); is($session->url->page('op=viewHelpTOC;topic=Article'), '/path1/%22%3Efile1?op=viewHelpTOC;topic=Article', 'page: pairs are appended'); @@ -269,12 +253,8 @@ $session->asset($sessionAsset); # ####################################### -$mockEnv{'HTTP_REFERER'} = 'test'; - -is($session->env->get('HTTP_REFERER'), 'test', 'testing overridden ENV'); - foreach my $test (@getRefererUrlTests) { - $mockEnv{HTTP_REFERER} = $test->{input}; + $session->request->referer($test->{input}); is($session->url->getRefererUrl, $test->{output}, $test->{comment}); } @@ -330,14 +310,10 @@ is($session->url->extras('/dir1/foo.html'), join('', $cdnCfg->{extrasCdn}, 'dir1 is($session->url->extras('tinymce'), join('', $extras, 'tinymce'), 'extras exclusion from CDN'); # Note: env is already mocked above. -$mockEnv{HTTPS} = 'on'; +$env->{'psgi.url_scheme'} = "https"; is($session->url->extras('/dir1/foo.html'), join('', $cdnCfg->{extrasSsl}, 'dir1/foo.html'), 'extras using extrasSsl with HTTPS'); -$mockEnv{HTTPS} = undef; -$mockEnv{SSLPROXY} = 1; -is($session->url->extras('/dir1/foo.html'), join('', $cdnCfg->{extrasSsl}, 'dir1/foo.html'), - 'extras using extrasSsl with SSLPROXY'); -delete $mockEnv{SSLPROXY}; +$env->{'psgi.url_scheme'} = "http"; ####################################### # @@ -377,7 +353,7 @@ is $session->url->urlize('home/././here'), 'home/here', '... removes $sessionAsset = $session->asset; $session->{_asset} = undef; $session->url->{_requestedUrl} = undef; ##Manually clear cached value -$pseudoRequest->uri('/goBackToTheSite'); +$setUri->('/goBackToTheSite'); is($session->url->getBackToSiteURL, '/goBackToTheSite', 'getBackToSiteURL: when session asset is undefined, the method falls back to using page'); @@ -413,27 +389,26 @@ TODO: { ok(0, 'test a child of the media folder'); } -my $versionTag = WebGUI::VersionTag->getWorking($session); -WebGUI::Test->addToCleanup($versionTag); -my $statefulAsset = WebGUI::Asset->getRoot($session)->addChild({ className => 'WebGUI::Asset::Snippet' }); -$versionTag->commit; -$session->asset( $statefulAsset ); +my $parentAsset = WebGUI::Asset->getRoot($session); +my $statefulAsset = $parentAsset->addChild({ className => 'WebGUI::Asset::Snippet' }); +WebGUI::Test->addToCleanup($statefulAsset); +$statefulAsset = $statefulAsset->cloneFromDb; +$session->asset($statefulAsset); -$statefulAsset->{_properties}{state} = 'published'; is( $session->url->getBackToSiteURL, - WebGUI::Asset->getRoot($session)->getUrl, + $parentAsset->getUrl, q!getBackToSiteURL: When asset state is published, it returns you to the Assets container! ); -$statefulAsset->{_properties}{state} = 'trash'; +$statefulAsset->state( 'trash'); is( $session->url->getBackToSiteURL, $defaultAssetUrl, q!getBackToSiteURL: When asset state is trash, it returns you to the default Asset! ); -$statefulAsset->{_properties}{state} = 'clipboard'; +$statefulAsset->state('clipboard'); is( $session->url->getBackToSiteURL, $defaultAssetUrl, @@ -451,42 +426,35 @@ WebGUI::Test->originalConfig('sslEnabled'); ##Test all the false cases, first $session->config->set('sslEnabled', 0); -$mockEnv{HTTPS} = 'not on'; -$mockEnv{SSLPROXY} = 0; +$env->{'psgi.url_scheme'} = "http"; ok( ! $session->url->forceSecureConnection(), 'sslEnabled must be 1 to force SSL'); $session->config->set('sslEnabled', 1); -$mockEnv{HTTPS} = 'on'; -$mockEnv{SSLPROXY} = 0; +$env->{'psgi.url_scheme'} = "https"; ok( ! $session->url->forceSecureConnection(), 'HTTPS must not be "on" to force SSL'); - -$session->config->set('sslEnabled', 1); -$mockEnv{HTTPS} = 'not on'; -$mockEnv{SSLPROXY} = 1; -ok( ! $session->url->forceSecureConnection(), 'SSLPROXY must not be true to force SSL'); ok( ! $session->url->forceSecureConnection('/test/url'), 'all conditions must be met, even if a URL is directly passed in'); ##Validate the HTTP object state before we start -$session->http->setStatus('200', 'OK'); -is($session->http->getStatus, 200, 'http status is okay, 200'); -is($session->http->getRedirectLocation, undef, 'redirect location is empty'); +$session->response->status('200'); +is($session->response->status, 200, 'http status is okay, 200'); +is($session->response->location, undef, 'redirect location is empty'); -$mockEnv{HTTPS} = 'not on'; -$mockEnv{SSLPROXY} = 0; +$env->{'psgi.url_scheme'} = "http"; my $secureUrl = $session->url->getSiteURL . '/foo/bar/baz/buz'; $secureUrl =~ s/http:/https:/; ok($session->url->forceSecureConnection('/foo/bar/baz/buz'), 'forced secure connection'); -is($session->http->getStatus, 302, 'http status set to redirect, 302'); -is($session->http->getRedirectLocation, $secureUrl, 'redirect location set to proper passed in URL with SSL and sitename added'); +is($session->response->status, 302, 'http status set to redirect, 302'); +is($session->response->location, $secureUrl, 'redirect location set to proper passed in URL with SSL and sitename added'); -$session->http->setStatus('200', 'OK'); -$session->http->setRedirectLocation(undef); +$session->response->status('200', 'OK'); +$session->response->location(undef); $secureUrl = $session->url->getSiteURL . $session->url->page(); $secureUrl =~ s/http:/https:/; ok($session->url->forceSecureConnection(), 'forced secure connection with no url param'); ok($session->http->isRedirect, '... and redirect status code was set'); -is($session->http->getRedirectLocation, $secureUrl, '... and redirect status code was set'); +is($session->response->location, $secureUrl, '... and redirect status code was set'); +done_testing; diff --git a/t/Session/Var.t b/t/Session/Var.t deleted file mode 100644 index 4667ed1ff..000000000 --- a/t/Session/Var.t +++ /dev/null @@ -1,215 +0,0 @@ -#------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. -#------------------------------------------------------------------- -# Please read the legal notices (docs/legal.txt) and the license -# (docs/license.txt) that came with this distribution before using -# this software. -#------------------------------------------------------------------- -# http://www.plainblack.com info@plainblack.com -#------------------------------------------------------------------- - -use FindBin; -use strict; -use lib "$FindBin::Bin/../lib"; - -use WebGUI::Test; -use WebGUI::Session; -use WebGUI::Session::Var; - -use Test::More tests => 44; # increment this value for each test you create -use Test::Deep; - -my $session = WebGUI::Test->session; - -ok($session->var->getId ne "", "getId()"); -cmp_ok($session->var->get("lastPageView"), '>', 0, "get(lastPageView)"); -is($session->var->isAdminOn, 0, "isAdminOn()"); -$session->var->switchAdminOn; -is($session->var->isAdminOn, 1, "switchAdminOn()"); -$session->var->switchAdminOff; -is($session->var->isAdminOn, 0, "switchAdminOff()"); - -my $token = $session->scratch->get('webguiCsrfToken'); -ok( $token, 'CSRF token set'); -ok( $session->id->valid($token), '...is a valid GUID'); - -my $id = $session->var->getId; -my ($count) = $session->db->quickArray("select count(*) from userSession where sessionId=?",[$id]); -is($count, 1, "created an user session entry in the database"); - -my %newEnvHash = ( REMOTE_ADDR => '192.168.0.34'); -my $origEnv = $session->env->{_env}; -$session->env->{_env} = \%newEnvHash; - -my $var = WebGUI::Session::Var->new($session); -my $varTime = time(); -my $varExpires = $varTime + $session->setting->get('sessionTimeout'); -isa_ok($var, 'WebGUI::Session::Var', 'new returns Var object'); -isnt($session->scratch->get('webguiCsrfToken'), $token, '... calling new without sessionId creates a new token'); -$token = $session->scratch->get('webguiCsrfToken'); - -cmp_ok(abs($var->get('lastPageView') - $varTime), '<=', 1, 'lastPageView set correctly'); -cmp_ok(abs($var->get('expires') - $varExpires), '<=', 1, 'expires set correctly'); - -is($var->get('userId'), 1, 'default userId is 1'); - -is($var->get('sessionId'), $var->getId, "get('sessionId') and getId return the same thing"); -isnt($var->getId, $session->var->getId, "a sessionId different from our Session's var sessionId was created"); -is($var->getId, $session->getId, 'SessionId set to userSessionId from var'); - -is($var->get('adminOn'), $var->isAdminOn, "get('adminOn') and isAdminOn return the same thing"); -is($var->get('adminOn'), 0, "adminOn is off by default"); ##retest - -is($var->get('lastIP'), '192.168.0.34', "lastIP fetched"); - -isa_ok($var->session, 'WebGUI::Session', 'session method returns a Session object'); -is($var->session->getId, $session->getId, 'session method returns our Session object'); - -sleep(2); -$newEnvHash{REMOTE_ADDR} = '10.0.5.5'; - -#Grab a more recent version of our user session object -$varTime = time(); -my $var2 = WebGUI::Session::Var->new($session, $session->getId); -$varExpires = $varTime + $session->setting->get('sessionTimeout'); -is($var2->session->scratch->get('webguiCsrfToken'), $token, 'opening a new user session did not change the CSRF token'); - -cmp_deeply( - $var2, - methods( - ['get', 'sessionId'] => $var->get('sessionId'), - ['get', 'userId'] => $var->get('userId'), - ['get', 'adminOn'] => $var->get('adminOn'), - ), - 'similar methods in copy of original var object' -); - -cmp_ok(abs($var2->get('lastPageView') - $varTime), '<=', 1, 'lastPageView set correctly on copy'); -cmp_ok(abs($var2->get('expires') - $varExpires), '<=', 1, 'expires set correctly on copy'); -is($var2->get('lastIP'), '10.0.5.5', "lastIP set on copy"); - -my $var2Id = $var2->getId; -$var2->end; -($count) = $session->db->quickArray("select count(*) from userSession where sessionId=?",[$var2->getId]); -ok($count == 0,"end() removes current entry from database"); -$var->end; - -$var2 = WebGUI::Session::Var->new($session, 'illegalSessionIdThatIsTooLong'); -# '1234567890123456789012' -isa_ok($var2, 'WebGUI::Session::Var', 'invalid sessionId will still produce a Var object'); -($count) = $session->db->quickArray("select count(*) from userSession where sessionId=?",[$var2->getId]); -is($count, 0, "object store of sessionId does not match database record"); -$var2Id = $var2->getId; -$var2->end; -my $idToDelete = substr $var2Id,0,22; -($count) = $session->db->quickArray("select count(*) from userSession where sessionId=?",[$idToDelete]); -is($count, 1, "Unable to delete database record for Var object with invalid sessionId"); - -my $varId3 = 'nonExistantIdButValid0'; -# '1234567890123456789012' -$var = WebGUI::Session::Var->new($session, $varId3); -isa_ok($var, 'WebGUI::Session::Var', 'non-existant sessionId will still produce a Var object'); -is($var->getId, $varId3, 'user session Id set to non-existant Id'); -is($session->getId, $varId3, 'session Id set to non-existant Id'); - -cmp_deeply( - $var, - methods( - ['get', 'sessionId'] => $varId3, - ['get', 'userId'] => 1, - ['get', 'adminOn'] => 0, - ['get', 'lastIP'] => '10.0.5.5', - ), - 'non-existant Id returns default values' -); - -$var->end; - -##Grab a new Var object that we'll expire. We'll detect the expiration -##by looking for admin status and userId -$var2 = WebGUI::Session::Var->new($session); -$var2->switchAdminOn; -$session->db->write("update userSession set userId=? where sessionId=?", - [3, $var2->getId]); -$session->db->write("update userSession set expires=? where sessionId=?", - [$var2->get('lastPageView')-1, $var2->getId]); - -my $var3 = WebGUI::Session::Var->new($session, $var2->getId); -is($var3->getId, $var2->getId, 'new Var object has correct id'); -isnt($var3->isAdminOn, $var2->isAdminOn, 'new adminOn not equal to old adminOn'); -is($var3->isAdminOn, 0, 'new Var object has default adminOn'); -isnt($var3->get('userId'), 3, 'new userId not equal to old userId'); -$var2->end; -$var3->end; - -##Var objects for noFuss tests -my $var4 = WebGUI::Session::Var->new($session); -my $varExpiring = WebGUI::Session::Var->new($session); -$session->db->write("update userSession set expires=? where sessionId=?", - [$varExpiring->get('lastPageView')-1, $varExpiring->getId]); -$varExpiring->{_var}{expires} = $varExpiring->get('lastPageView')-1; - -sleep 1; - -$newEnvHash{REMOTE_ADDR} = '127.0.0.1'; - -##Test a valid fetch -my $varTest = WebGUI::Session::Var->new($session, $var4->getId, 1); - -cmp_deeply( - $varTest, - methods( - ['get', 'sessionId'] => $var4->getId, - ['get', 'userId'] => 1, - ['get', 'adminOn'] => 0, - ['get', 'lastIP'] => '10.0.5.5', - ['get', 'expires'] => $var4->get('expires'), - ['get', 'lastPageView'] => $var4->get('lastPageView'), - ), - 'fetching a valid session with noFuss does not update the object info' -); - -$varTest->end; -$var4->end; - -##Test a valid fetch -$varTest = WebGUI::Session::Var->new($session, $varExpiring->getId, 1); - -cmp_deeply( - $varTest, - methods( - ['get', 'sessionId'] => $varExpiring->getId, - ['get', 'userId'] => 1, - ['get', 'adminOn'] => 0, - ['get', 'lastIP'] => '10.0.5.5', - ['get', 'lastPageView'] => $varExpiring->get('lastPageView'), - ['get', 'expires'] => $varExpiring->get('expires'), - ), - 'fetching a valid session with noFuss does not update the object info, even if it has expired' -); - -$varExpiring->end; -$varTest->end; - -my $varId4 = 'idDoesNotExist00779988'; -# '1234567890123456789012' -$varTest = WebGUI::Session::Var->new($session, $varId4, 1); -isa_ok($varTest, "WebGUI::Session::Var", "non-existant Id with noFuss returns a valid object..."); -is($varTest->getId, $varId4, "...and we got our requested Id"); - -$varTest->start(3, $varTest->getId); -is($varTest->get('userId'), 3, 'userId set via start'); -$varTest->start("", $varTest->getId); -is($varTest->get('userId'), 1, 'calling start with null userId returns default user (visitor)'); - -END { - - $session->env->{_env} = $origEnv; - - foreach my $varObj ($var, $var2, $var3, $var4, $varExpiring, $varTest) { - if (defined $varObj and ref $varObj eq 'WebGUI::Session::Var') { - $varObj->end(); - } - } - $session->db->write("delete from userSession where sessionId=?",[$idToDelete]); -} diff --git a/t/Shop/Address.t b/t/Shop/Address.t index 91aefb480..05c9589b1 100644 --- a/t/Shop/Address.t +++ b/t/Shop/Address.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use Test::More; use Test::Deep; use Exception::Class; @@ -28,11 +26,6 @@ use WebGUI::Shop::AddressBook; # Init my $session = WebGUI::Test->session; -#---------------------------------------------------------------------------- -# Tests - -plan tests => 28; - #---------------------------------------------------------------------------- # put your tests here @@ -42,13 +35,13 @@ my $address; ####################################################################### # -# create +# new # ####################################################################### -eval { $address = WebGUI::Shop::Address->create(); }; +eval { $address = WebGUI::Shop::Address->new(); }; $e = Exception::Class->caught(); -isa_ok($e, 'WebGUI::Error::InvalidObject', 'create takes exception to not giving it an address book'); +isa_ok($e, 'WebGUI::Error::InvalidObject', 'new takes exception to not giving it an address book'); cmp_deeply( $e, methods( @@ -57,12 +50,12 @@ cmp_deeply( got => '', param => undef, ), - 'create takes exception to not giving it address book', + '... parameter check', ); -eval { $address = WebGUI::Shop::Address->create($session); }; +eval { $address = WebGUI::Shop::Address->new($session); }; $e = Exception::Class->caught(); -isa_ok($e, 'WebGUI::Error::InvalidObject', 'create takes exception to not giving it a session variable'); +isa_ok($e, 'WebGUI::Error::InvalidObject', 'new takes exception to giving it a session variable'); cmp_deeply( $e, methods( @@ -71,29 +64,17 @@ cmp_deeply( got => 'WebGUI::Session', param => $session, ), - 'create takes exception to giving it a session variable', + '... parameter check', ); $session->user({userId => 3}); -my $book = WebGUI::Shop::AddressBook->create($session); -my $book2 = WebGUI::Shop::AddressBook->create($session); +my $book = WebGUI::Shop::AddressBook->new($session); +my $book2 = WebGUI::Shop::AddressBook->new($session); WebGUI::Test->addToCleanup($book, $book2); -eval { $address = WebGUI::Shop::Address->create($book); }; -$e = Exception::Class->caught(); -isa_ok($e, 'WebGUI::Error::InvalidParam', 'create takes exception to not giving it address data'); -cmp_deeply( - $e, - methods( - error => 'Need a hash reference.', - param => undef, - ), - 'create takes exception to giving it address data', -); - -$address = WebGUI::Shop::Address->create($book, {}); -isa_ok($address, 'WebGUI::Shop::Address', 'create returns an Address object with an empty hashref'); +$address = WebGUI::Shop::Address->new($book, {}); +isa_ok($address, 'WebGUI::Shop::Address', 'new returns an Address object with an empty hashref'); ####################################################################### # @@ -126,29 +107,30 @@ is($address->getId, $address->get('addressId'), 'getId is an alias for get addre cmp_deeply( $address->get, { - label => undef, - firstName => undef, - lastName => undef, - address1 => undef, - address2 => undef, - address3 => undef, - city => undef, - state => undef, - country => undef, - code => undef, - phoneNumber => undef, - email => undef, - organization => undef, - addressId => ignore(), #checked elsewhere + label => '', + firstName => '', + lastName => '', + address1 => '', + address2 => '', + address3 => '', + city => '', + state => '', + country => '', + code => '', + phoneNumber => '', + email => '', + organization => '', + addressId => ignore(), #checked elsewhere addressBookId => $book->getId, - isProfile => 0, + addressBook => $book, + isProfile => bool(0), }, 'get the whole thing and check a new, blank object' ); my $addressGuts = $address->get(); $addressGuts->{'label'} = 'hacked'; -is($address->get('label'), undef, 'get returns a safe copy of the hash'); +is($address->get('label'), '', 'get returns a safe copy of the hash'); ####################################################################### # @@ -173,46 +155,6 @@ $address->update({ addressBookId => $book->getId }); # ####################################################################### -eval { $address = WebGUI::Shop::Address->new(); }; -$e = Exception::Class->caught(); -isa_ok($e, 'WebGUI::Error::InvalidObject', 'new takes exception to not giving it an address book'); -cmp_deeply( - $e, - methods( - error => 'Need an address book.', - expected => 'WebGUI::Shop::AddressBook', - got => '', - param => ignore, - ), - 'new takes exception to not giving it address book', -); - -eval { $address = WebGUI::Shop::Address->new($session); }; -$e = Exception::Class->caught(); -isa_ok($e, 'WebGUI::Error::InvalidObject', 'new takes exception to not giving it a session variable'); -cmp_deeply( - $e, - methods( - error => 'Need an address book.', - expected => 'WebGUI::Shop::AddressBook', - got => 'WebGUI::Session', - param => ignore, - ), - 'new takes exception to giving it a session variable', -); - -eval { $address = WebGUI::Shop::Address->new($book); }; -$e = Exception::Class->caught(); -isa_ok($e, 'WebGUI::Error::InvalidParam', 'new takes exception to not giving it an address to instanciate'); -cmp_deeply( - $e, - methods( - error => 'Need an addressId.', - param => undef, - ), - 'new takes exception to giving it an address to instanciate', -); - eval { $address = WebGUI::Shop::Address->new($book, 'neverAnId'); }; $e = Exception::Class->caught(); isa_ok($e, 'WebGUI::Error::ObjectNotFound', 'new takes exception to not giving it a bad address instanciate'); @@ -246,3 +188,5 @@ cmp_deeply( $address->delete; my $check = $session->db->quickScalar('select count(*) from address where addressId=?',[$address->getId]); is( $check, 0, 'delete worked'); + +done_testing; diff --git a/t/Shop/AddressBook.t b/t/Shop/AddressBook.t index a92789b1d..ecc69f02b 100644 --- a/t/Shop/AddressBook.t +++ b/t/Shop/AddressBook.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,16 +13,16 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use Test::More; use Test::Deep; +use Data::Dumper; use Exception::Class; use WebGUI::Test; # Must use this before any other WebGUI modules use WebGUI::Session; use WebGUI::Text; +use WebGUI::Shop::AddressBook; use JSON; #---------------------------------------------------------------------------- @@ -34,11 +34,6 @@ $tempAdmin->addToGroups(['3']); WebGUI::Test->addToCleanup($tempAdmin); $session->user({ userId => $tempAdmin->getId} ); -#---------------------------------------------------------------------------- -# Tests - -plan tests => 42; - #---------------------------------------------------------------------------- # put your tests here @@ -65,17 +60,7 @@ cmp_deeply( 'new takes exception to not giving it a session object', ); -eval { $book = WebGUI::Shop::AddressBook->new($session); }; -$e = Exception::Class->caught(); -isa_ok($e, 'WebGUI::Error::InvalidParam', 'new takes exception to not giving it a addressBookId'); -cmp_deeply( - $e, - methods( - error => 'Need an addressBookId.', - ), - 'new takes exception to not giving it a addressBook Id', -); - +$session->user({userId => 3}); eval { $book = WebGUI::Shop::AddressBook->new($session, 'neverAGUID'); }; $e = Exception::Class->caught(); isa_ok($e, 'WebGUI::Error::ObjectNotFound', 'new takes exception to not giving it an existing addressBookId'); @@ -87,31 +72,12 @@ cmp_deeply( ), 'new takes exception to not giving it a addressBook Id', ); - - -####################################################################### -# -# create -# -####################################################################### - -eval { $book = WebGUI::Shop::AddressBook->create(); }; -$e = Exception::Class->caught(); -isa_ok($e, 'WebGUI::Error::InvalidParam', 'create takes exception to not giving it a session object'); -cmp_deeply( - $e, - methods( - error => 'Need a session.', - expected => 'WebGUI::Session', - got => '', - ), - 'create takes exception to not giving it a session object', -); - $session->user({userId => 1}); -eval { $book = WebGUI::Shop::AddressBook->create($session); }; + + +eval { $book = WebGUI::Shop::AddressBook->new($session); }; $e = Exception::Class->caught(); -isa_ok($e, 'WebGUI::Error::InvalidParam', 'create takes exception to making an address book for Visitor'); +isa_ok($e, 'WebGUI::Error::InvalidParam', 'new takes exception to making an address book for Visitor'); cmp_deeply( $e, methods( @@ -121,22 +87,23 @@ cmp_deeply( ); $session->user({userId => $tempAdmin->getId}); -$book = WebGUI::Shop::AddressBook->create($session); -isa_ok($book, 'WebGUI::Shop::AddressBook', 'create returns the right kind of object'); +$book = WebGUI::Shop::AddressBook->new($session); +isa_ok($book, 'WebGUI::Shop::AddressBook', 'new returns the right kind of object'); isa_ok($book->session, 'WebGUI::Session', 'session method returns a session object'); is($session->getId, $book->session->getId, 'session method returns OUR session object'); -ok($session->id->valid($book->getId), 'create makes a valid GUID style addressBookId'); +ok($session->id->valid($book->getId), 'new makes a valid GUID style addressBookId'); is($book->get('userId'), $tempAdmin->getId, 'create uses $session->user to get the userid for this book'); +is($book->userId, $tempAdmin->getId, '... testing direct accessor'); my $bookCount = $session->db->quickScalar('select count(*) from addressBook where addressBookId=?',[$book->getId]); is($bookCount, 1, 'only 1 address book was created'); -my $alreadyHaveBook = WebGUI::Shop::AddressBook->create($session); -isnt($book->getId, $alreadyHaveBook->getId, 'creating an addressbook as visitor, even when you already have one, always returns a new one'); +my $alreadyHaveBook = WebGUI::Shop::AddressBook->new($session); +isnt($book->getId, $alreadyHaveBook->getId, 'creating an addressbook, even when you already have one, always returns a new one'); ####################################################################### # @@ -182,15 +149,16 @@ $book->update({ lastShipId => $address1->getId, lastPayId => $address2->getId}); cmp_deeply( $book->get(), { - userId => ignore(), - addressBookId => ignore(), + userId => ignore(), + addressBookId => ignore(), defaultAddressId => ignore(), }, - 'update updates the object properties cache' + 'update does not add new properties to the object' ); my $bookClone = WebGUI::Shop::AddressBook->new($session, $book->getId); +delete $book->{_addressCache}; cmp_deeply( $bookClone, $book, @@ -227,9 +195,6 @@ is($profile_address->getId,$address1->getId,"getProfileAddress returns addresses # ####################################################################### -#Clear the book address cache -$book->uncache; - my $address_info = { label => 'Profile Label', addressId => $address1->getId, @@ -265,14 +230,11 @@ cmp_bag( my $u = WebGUI::User->new($session,$book->get("userId")); cmp_bag( - [ map { $u->profileField($_) } keys %{ $book->getProfileAddressMappings } ], + [ map { $u->get($_) } keys %{ $book->getProfileAddressMappings } ], [ map { $address1->get($_) } values %{ $book->getProfileAddressMappings } ], 'Profile address was updated and matches address fields' ); -#Test that updates to non profile address does not update the profile -$book->uncache; - $address_info = { label => 'Non Profile Label', addressId => $address2->getId, @@ -308,7 +270,7 @@ cmp_bag( ); cmp_bag( - [ map { $u->profileField($_) } keys %{ $book->getProfileAddressMappings } ], + [ map { $u->get($_) } keys %{ $book->getProfileAddressMappings } ], [ map { $address1->get($_) } values %{ $book->getProfileAddressMappings } ], 'Profile address was not updated when non profile fields were saved' ); @@ -319,9 +281,6 @@ cmp_bag( # ####################################################################### -#clear the cache -$book->uncache; - $session->request->setup_body({ 'addressId' => $address2->getId, 'callback' => q|{'url':''}| @@ -337,9 +296,6 @@ cmp_bag( ); -#clear the cache -$book->uncache; - $session->request->setup_body({ 'addressId' => $address1->getId, 'callback' => q|{'url':''}| @@ -361,9 +317,6 @@ cmp_bag( # ####################################################################### -#clear the cache -$book->uncache; - my $addressBookId = $alreadyHaveBook->getId; my $firstCount = $session->db->quickScalar('select count(*) from addressBook where addressBookId=?',[$addressBookId]); $alreadyHaveBook->delete(); @@ -375,7 +328,7 @@ ok(($firstCount == 1 && $afterCount == 0), 'delete: one book deleted'); $addressBookId = $bookClone->getId; $bookClone->delete(); $bookCount = $session->db->quickScalar('select count(*) from addressBook where addressBookId=?',[$addressBookId]); -my $addrCount = $session->db->quickScalar('select count(*) from address where addressBookId=?',[$addressBookId]); +$addrCount = $session->db->quickScalar('select count(*) from address where addressBookId=?',[$addressBookId]); is($bookCount, 0, '... book deleted'); is($addrCount, 0, '... also deletes addresses in the book'); @@ -390,13 +343,14 @@ my $otherSession = WebGUI::Test->newSession; my $mergeUser = WebGUI::User->create($otherSession); WebGUI::Test->addToCleanup($mergeUser); $otherSession->user({user => $mergeUser}); -my $adminBook = WebGUI::Shop::AddressBook->create($otherSession); +my $adminBook = WebGUI::Shop::AddressBook->new($otherSession); WebGUI::Test->addToCleanup($adminBook); my $goodAddress = $adminBook->addAddress({label => 'first'}); my $session2 = WebGUI::Test->newSession; $session2->user({user => $mergeUser}); my $bookAdmin = WebGUI::Shop::AddressBook->newByUserId($session2); +WebGUI::Test->addToCleanup($bookAdmin); cmp_bag( [ map { $_->getId } @{ $bookAdmin->getAddresses } ], @@ -413,6 +367,7 @@ cmp_bag( #Create some data to search for my $andySession = WebGUI::Test->newSession; my $andy = WebGUI::User->create($andySession); +$andy->username('andy'); WebGUI::Test->addToCleanup($andy); $andySession->user({ userId => $andy->getId }); my $andyBook = WebGUI::Shop::AddressBook->create($andySession); @@ -453,6 +408,7 @@ my $andyAddr2 = $andyBook->addAddress({ my $redSession = WebGUI::Test->newSession; my $red = WebGUI::User->create($redSession); +$red->username('red'); WebGUI::Test->addToCleanup($red); $redSession->user({userId => $red->getId}); my $redBook = WebGUI::Shop::AddressBook->create($redSession); @@ -471,12 +427,14 @@ my $redAddr = $redBook->addAddress({ country => 'US', phoneNumber => '111-111-1111', email => 'red@shawshank.com', - organization => 'Shawshank' + organization => 'Shawshank', + isProfile => 0, }); my $brooksSession = WebGUI::Test->newSession; my $brooks = WebGUI::User->create($brooksSession); +$brooks->username('brooks'); WebGUI::Test->addToCleanup($brooks); $brooksSession->user({userId => $brooks->getId}); my $brooksBook = WebGUI::Shop::AddressBook->create($brooksSession); @@ -495,7 +453,8 @@ my $brooksAddr = $brooksBook->addAddress({ country => 'US', phoneNumber => '111-111-1111', email => 'brooks@shawshank.com', - organization => 'Shawshank' + organization => 'Shawshank', + isProfile => 0, }); #Test search as admin @@ -505,11 +464,20 @@ $session->request->setup_body({ my $results = JSON->new->decode($book->www_ajaxSearch); +my $andyAddr1_get = $andyAddr1->get; +my $andyAddr2_get = $andyAddr2->get; +my $redAddr_get = $redAddr->get; +my $brooksAddr_get = $brooksAddr->get; + +foreach my $addr ($andyAddr1_get, $andyAddr2_get, $redAddr_get, $brooksAddr_get) { + delete $addr->{addressBook}; +} + cmp_bag( $results, [ - { %{$andyAddr1->get}, username => $andy->username }, - { %{$andyAddr2->get}, username => $andy->username }, + { %{$andyAddr1_get}, username => $andy->username, }, + { %{$andyAddr2_get}, username => $andy->username, }, ], 'Ajax Address Search matches name correctly for admins' ); @@ -533,7 +501,7 @@ $results = JSON->new->decode($book->www_ajaxSearch); cmp_bag( $results, - [{ %{$andyAddr1->get}, username => $andy->username }], + [{ %{$andyAddr1_get}, username => $andy->username }], 'Ajax Address Search matches multiple fields correctly' ); @@ -571,9 +539,9 @@ $results = JSON->new->decode($book->www_ajaxSearch); cmp_bag( $results, [ - { %{$andyAddr1->get}, username => $andy->username }, - { %{$redAddr->get}, username => $red->username }, - { %{$brooksAddr->get}, username => $brooks->username }, + { %{$andyAddr1_get}, username => $andy->username }, + { %{$redAddr_get}, username => $red->username }, + { %{$brooksAddr_get}, username => $brooks->username }, ], 'Ajax Address Search returns cross user results for admins' ); @@ -588,9 +556,9 @@ $results = JSON->new->decode($andyBook->www_ajaxSearch); cmp_bag( $results, [ - { %{$andyAddr1->get}, username => $andy->username }, - { %{$redAddr->get}, username => $red->username }, - { %{$brooksAddr->get}, username => $brooks->username }, + { %{$andyAddr1_get}, username => $andy->username }, + { %{$redAddr_get}, username => $red->username }, + { %{$brooksAddr_get}, username => $brooks->username }, ], 'Ajax Address Search returns cross user results for shop admins' ); @@ -605,9 +573,9 @@ $results = JSON->new->decode($redBook->www_ajaxSearch); cmp_bag( $results, [ - { %{$andyAddr1->get}, username => $andy->username }, - { %{$redAddr->get}, username => $red->username }, - { %{$brooksAddr->get}, username => $brooks->username }, + { %{$andyAddr1_get}, username => $andy->username }, + { %{$redAddr_get}, username => $red->username }, + { %{$brooksAddr_get}, username => $brooks->username }, ], 'Ajax Address Search returns cross user results for shop cashiers' ); @@ -620,8 +588,10 @@ $results = JSON->new->decode($brooksBook->www_ajaxSearch); cmp_bag( $results, - [{ %{$brooksAddr->get}, username => $brooks->username }], + [{ %{$brooksAddr_get}, username => $brooks->username }], 'Ajax Address Search returns only current user results for non privileged users' ); undef $book; + +done_testing; diff --git a/t/Shop/Cart.t b/t/Shop/Cart.t index 0e61cfea3..9575f1585 100644 --- a/t/Shop/Cart.t +++ b/t/Shop/Cart.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use Test::More; use Test::Deep; use Test::Exception; @@ -33,11 +31,6 @@ use JSON 'from_json'; my $session = WebGUI::Test->session; my $i18n = WebGUI::International->new($session, "Shop"); -#---------------------------------------------------------------------------- -# Tests - -plan tests => 38; # Increment this number for each test you create - #---------------------------------------------------------------------------- # put your tests here @@ -84,11 +77,7 @@ $item->update({shippingAddressId => "XXXX"}); is($item->get("shippingAddressId"), "XXXX", "Can set shippingAddressId in the cart item properties."); $item->update({shippingAddressId => undef}); -my $now = time(); -$cart->update({creationDate => $now}); -is($cart->get('creationDate'), $now, 'update: set creationDate'); - -like($cart->getId, qr/[A-Za-z0-9\_\-]{22}/, "Id looks like a guid."); +ok($session->id->valid($cart->getId), "Id looks like a guid."); is(ref($cart->get), "HASH", "Cart properties are a hash reference."); is($cart->get("sessionId"), $session->getId, "Can retrieve a value from the cart properties."); @@ -157,7 +146,7 @@ is( $cart->readyForCheckout, 0, 'Cannot checkout an empty cart' ); is($session->db->quickScalar("select count(*) from cartItem where cartId=?",[ $cart->getId ]), 0, "Items are removed from cart."); -my $session2 = WebGUI::Session->open(WebGUI::Test->root, WebGUI::Test->file); +my $session2 = WebGUI::Test->newSession; WebGUI::Test->addToCleanup($session2); $session2->user({userId => 3}); my $cart2 = WebGUI::Shop::Cart->newBySession($session2); @@ -232,3 +221,5 @@ SKIP: { skip 1, 'requiresShipping died, so skipping' unless $requiresShipping_ok; ok !$cart->requiresShipping, 'Shipping no longer required on a cart with missing assets'; } + +done_testing; diff --git a/t/Shop/Credit.t b/t/Shop/Credit.t index e5721673e..c01be940b 100644 --- a/t/Shop/Credit.t +++ b/t/Shop/Credit.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -37,11 +37,6 @@ my $session = WebGUI::Test->session; plan tests => 27; -#---------------------------------------------------------------------------- -# figure out if the test can actually run - -my $e; - ####################################################################### # # new @@ -54,6 +49,8 @@ WebGUI::Test->addToCleanup($credit_user); # Test incorrect for parameters +my $e; + eval { $credit = WebGUI::Shop::Credit->new(); }; $e = Exception::Class->caught(); isa_ok ($e, 'WebGUI::Error::InvalidParam', 'new takes exception to not giving it a session object'); diff --git a/t/Shop/Pay.t b/t/Shop/Pay.t index 7a4e183ea..dc11821a0 100644 --- a/t/Shop/Pay.t +++ b/t/Shop/Pay.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,12 +13,11 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use Test::More; use Test::Deep; -#use Test::Exception; +use Test::Exception; +use Data::Dumper; use JSON; use HTML::Form; @@ -30,11 +29,6 @@ use WebGUI::TestException; # Init my $session = WebGUI::Test->session; -#---------------------------------------------------------------------------- -# Tests - -plan tests => 18; - #---------------------------------------------------------------------------- # put your tests here @@ -50,21 +44,13 @@ my $anotherDriver; # ####################################################################### -my $e; my $pay; +dies_ok { $pay = WebGUI::Shop::Pay->new(); } + 'new takes an exception to not giving it a session variable'; -throws_deeply ( sub { $pay = WebGUI::Shop::Pay->new(); }, - 'WebGUI::Error::InvalidObject', - { - error => 'Must provide a session variable', - got => '', - expected => 'WebGUI::Session', - }, - 'new takes an exception to not giving it a session variable' -); - -$pay = WebGUI::Shop::Pay->new($session); +lives_ok { $pay = WebGUI::Shop::Pay->new(session => $session); } 'new called with hash arguments'; +lives_ok { $pay = WebGUI::Shop::Pay->new($session); } 'new called only with session'; isa_ok($pay, 'WebGUI::Shop::Pay', 'new returned the right kind of object'); ####################################################################### @@ -147,7 +133,8 @@ my $defaultPayDrivers = { 'WebGUI::Shop::PayDriver::CreditCard::AuthorizeNet' => 'Credit Card (Authorize.net)', }; -cmp_deeply( $drivers, $defaultPayDrivers, 'getDrivers returns the default PayDrivers'); +cmp_deeply( $drivers, $defaultPayDrivers, 'getDrivers returns the default PayDrivers') + or diag Dumper $drivers; ####################################################################### # @@ -230,3 +217,4 @@ cmp_bag( # ####################################################################### +done_testing(); diff --git a/t/Shop/PayDriver.t b/t/Shop/PayDriver.t index f4557954c..1932ad341 100644 --- a/t/Shop/PayDriver.t +++ b/t/Shop/PayDriver.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use Test::More; use Test::Deep; use Data::Dumper; @@ -27,91 +25,16 @@ use WebGUI::Session; use WebGUI::Shop::Cart; use WebGUI::Shop::Credit; use WebGUI::Shop::PayDriver; +use Clone; use WebGUI::User; +use WebGUI::Test::Mechanize; #---------------------------------------------------------------------------- # Init my $session = WebGUI::Test->session; -#---------------------------------------------------------------------------- -# Tests - -plan tests => 56; - -#---------------------------------------------------------------------------- -# figure out if the test can actually run - my $e; -####################################################################### -# -# definition -# -####################################################################### - -my $definition; - -eval { $definition = WebGUI::Shop::PayDriver->definition(); }; -$e = Exception::Class->caught(); -isa_ok ($e, 'WebGUI::Error::InvalidParam', 'definition takes an exception to not giving it a session variable'); -cmp_deeply ( - $e, - methods( - error => 'Must provide a session variable', - ), - 'definition: requires a session variable', -); - -$definition = WebGUI::Shop::PayDriver->definition($session); - -use Data::Dumper; - -cmp_deeply ( - $definition, - [ { - name => 'Payment Driver', - properties => { - label => { - fieldType => 'text', - label => ignore(), - hoverHelp => ignore(), - defaultValue => "Credit Card", - }, - enabled => { - fieldType => 'yesNo', - label => ignore(), - hoverHelp => ignore(), - defaultValue => 1, - }, - groupToUse => { - fieldType => 'group', - label => ignore(), - hoverHelp => ignore(), - defaultValue => 7, - }, - } - } ], - , - 'Definition returns an array of hashrefs', -); - -$definition = WebGUI::Shop::PayDriver->definition($session, [ { name => 'Red' }]); - -cmp_deeply ( - $definition, - [ - { - name => 'Red', - }, - { - name => 'Payment Driver', - properties => ignore(), - } - ], - , - 'New data is appended correctly', -); - ####################################################################### # # create @@ -122,26 +45,15 @@ my $driver; # Test incorrect for parameters -eval { $driver = WebGUI::Shop::PayDriver->create(); }; +eval { $driver = WebGUI::Shop::PayDriver->new(); }; $e = Exception::Class->caught(); -isa_ok ($e, 'WebGUI::Error::InvalidParam', 'create takes exception to not giving it a session object'); +isa_ok ($e, 'WebGUI::Error::InvalidParam', 'new takes exception to not giving it a session object'); cmp_deeply ( $e, methods( error => 'Must provide a session variable', ), - 'create takes exception to not giving it a session object', -); - -eval { $driver = WebGUI::Shop::PayDriver->create($session, {}); }; -$e = Exception::Class->caught(); -isa_ok ($e, 'WebGUI::Error::InvalidParam', 'create takes exception to giving it an empty hashref of options'); -cmp_deeply ( - $e, - methods( - error => 'Must provide a hashref of options', - ), - 'create takes exception to not giving it an empty hashref of options', + 'new takes exception to not giving it a session object', ); # Test functionality @@ -149,15 +61,15 @@ cmp_deeply ( my $options = { label => 'Fast and harmless', enabled => 1, - group => 3, - receiptMessage => 'Pannenkoeken zijn nog lekkerder met spek', + groupToUse => 3, }; -$driver = WebGUI::Shop::PayDriver->create( $session, $options ); +$driver = WebGUI::Shop::PayDriver->new( $session, Clone::clone($options) ); -isa_ok ($driver, 'WebGUI::Shop::PayDriver', 'create creates WebGUI::Shop::PayDriver object'); +isa_ok ($driver, 'WebGUI::Shop::PayDriver', 'new creates WebGUI::Shop::PayDriver object'); like($driver->getId, $session->id->getValidator, 'driver id is a valid GUID'); +$driver->write; my $dbData = $session->db->quickHashRef('select * from paymentGateway where paymentGatewayId=?', [ $driver->getId ]); cmp_deeply ( @@ -165,7 +77,7 @@ cmp_deeply ( { paymentGatewayId => $driver->getId, className => ref $driver, - options => q|{"group":3,"receiptMessage":"Pannenkoeken zijn nog lekkerder met spek","label":"Fast and harmless","enabled":1}|, + options => q|{"groupToUse":3,"label":"Fast and harmless","enabled":1}|, }, 'Correct data written to the db', ); @@ -198,14 +110,6 @@ is ($driver->getId, $driver->paymentGatewayId, 'getId retur is ($driver->className, ref $driver, 'className property set correctly'); -####################################################################### -# -# options -# -####################################################################### - -cmp_deeply ($driver->options, $options, 'options accessor works'); - ####################################################################### # # getName @@ -223,7 +127,29 @@ cmp_deeply ( 'getName requires a session object passed to it', ); -is (WebGUI::Shop::PayDriver->getName($session), 'Payment Driver', 'getName returns the human readable name of this driver'); +is (WebGUI::Shop::PayDriver->getName($session), 'Payment Driver', 'getName returns the human readable name of this driver'); + +####################################################################### +# +# method checks +# +####################################################################### + +can_ok $driver, qw/get set update write getName className label enabled paymentGatewayId groupToUse/; + +####################################################################### +# +# default label +# +####################################################################### + +$driver->label(''); +is $driver->label, $driver->getName($session), 'empty label replaced with plugin name'; +$driver->label('untitled'); +is $driver->label, $driver->getName($session), 'label=untitled replaced with plugin name'; +$driver->label('uNtItLeD'); +is $driver->label, $driver->getName($session), '...regardless of case'; +$driver->label('Fast and harmless'); ####################################################################### # @@ -231,9 +157,17 @@ is (WebGUI::Shop::PayDriver->getName($session), 'Payment Driver', 'getN # ####################################################################### -cmp_deeply ($driver->get, $driver->options, 'get works like the options method with no param passed'); -is ($driver->get('enabled'), 1, 'get the enabled entry from the options'); -is ($driver->get('label'), 'Fast and harmless', 'get the label entry from the options'); +use Data::Dumper; + +cmp_deeply( + $driver->get, + { + %{ $options }, + paymentGatewayId => ignore(), + }, + 'get works like the options method with no param passed' +); +is ($driver->get('label'), 'Fast and harmless', 'get the label entry from the options'); my $optionsCopy = $driver->get; $optionsCopy->{label} = 'And now for something completely different'; @@ -250,8 +184,8 @@ isnt( ####################################################################### my $cart = $driver->getCart; +WebGUI::Test->addToCleanup($cart); isa_ok ($cart, 'WebGUI::Shop::Cart', 'getCart returns an instantiated WebGUI::Shop::Cart object'); -addToCleanup($cart); ####################################################################### # @@ -261,16 +195,16 @@ addToCleanup($cart); my $form = $driver->getEditForm; -isa_ok ($form, 'WebGUI::HTMLForm', 'getEditForm returns an HTMLForm object'); +isa_ok ($form, 'WebGUI::FormBuilder', 'getEditForm returns an FormBuilder object'); -my $html = $form->print; +my $html = $form->toHtml; ##Any URL is fine, really my @forms = HTML::Form->parse($html, 'http://www.webgui.org'); is (scalar @forms, 1, 'getEditForm generates just 1 form'); my @inputs = $forms[0]->inputs; -is (scalar @inputs, 11, 'getEditForm: the form has 11 controls'); +is (scalar @inputs, 10, 'getEditForm: the form has 10 controls'); my @interestingFeatures; foreach my $input (@inputs) { @@ -283,11 +217,7 @@ cmp_deeply( \@interestingFeatures, [ { - name => 'webguiCsrfToken', - type => 'hidden', - }, - { - name => undef, + name => 'send', type => 'submit', }, { @@ -331,6 +261,74 @@ cmp_deeply( ); +# Try to add a new PayDriver +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get_ok( '/' ); +$mech->session->user({userId => 3}); + +# Get to the management screen +$mech->get_ok( '?shop=pay;method=manage' ); + +# Click the Add Payment button +$mech->form_with_fields( 'className', 'add' ); +$mech->select( 'className' => 'WebGUI::Shop::PayDriver::Cash' ); +$mech->click_ok( 'add' ); + +# Fill in the form +$mech->submit_form_ok({ + fields => { + label => 'Authority Scrip', + enabled => '1', + }, + }, + "add a new gateway", +); + +# Payment method added! +$mech->content_contains( 'Authority Scrip', 'new label shows up in manage screen' ); + +# Find our new payment gateway +my $paydriverId; +for my $row ( @{ $session->db->buildArrayRefOfHashRefs( 'SELECT * FROM paymentGateway' ) } ) { + my $options = JSON->new->decode( $row->{options} ); + if ( $options->{label} eq 'Authority Scrip' ) { + $paydriverId = $row->{paymentGatewayId}; + } +} +ok( my $paydriver = WebGUI::Shop::PayDriver->new( $mech->session, $paydriverId ), 'paydriver can be instanced' ); +WebGUI::Test::addToCleanup( $paydriver ); +is( $paydriver->label, 'Authority Scrip', 'label set correctly' ); +ok( $paydriver->enabled, 'driver is enabled' ); + +# Edit an existing PayDriver +# Find the right form and click the Edit button +my $formNumber = 1; +for my $form ( $mech->forms ) { + if ( $form->value( 'do' ) eq 'edit' && $form->value( 'paymentGatewayId' ) eq $paydriverId ) { + last; + } + $formNumber++; +} +$mech->submit_form_ok({ + form_number => $formNumber, + }, 'click edit button', +); + +# Fill in the form +$mech->submit_form_ok({ + fields => { + label => 'Free Luna Dollars', + enabled => 1, + }, + }, + "edit an existing method", +); + +# Payment method edited! +$mech->content_contains( 'Free Luna Dollars', 'new label shows up in manage screen' ); +ok( my $paydriver = WebGUI::Shop::PayDriver->new( $mech->session, $paydriverId ), 'paydriver can be instanced' ); +is( $paydriver->label, 'Free Luna Dollars', 'label set correctly' ); +ok( $paydriver->enabled, 'driver is enabled' ); ####################################################################### # @@ -378,7 +376,7 @@ my $driverCopy = WebGUI::Shop::PayDriver->new($session, $driver->getId); is ($driver->getId, $driverCopy->getId, 'same id'); is ($driver->className, $driverCopy->className, 'same className'); -cmp_deeply ($driver->options, $driverCopy->options, 'same options'); +cmp_deeply ($driver->get, $driverCopy->get, 'same properties'); TODO: { local $TODO = 'tests for new'; @@ -391,22 +389,10 @@ TODO: { # ####################################################################### -eval { $driver->update(); }; -$e = Exception::Class->caught(); -isa_ok ($e, 'WebGUI::Error::InvalidParam', 'update takes exception to not giving it a hashref of options'); -cmp_deeply ( - $e, - methods( - error => 'update was not sent a hashref of options to store in the database', - ), - 'update takes exception to not giving it a hashref of options', -); - my $newOptions = { label => 'Yet another label', enabled => 0, - group => 4, - receiptMessage => 'Dropjes!', + groupToUse => 4, }; $driver->update($newOptions); @@ -416,12 +402,10 @@ my $storedJson = $session->db->quickScalar('select options from paymentGateway w cmp_deeply( $newOptions, from_json($storedJson), - , 'update() actually stores data', ); -is( $driver->get('receiptMessage'), 'Dropjes!', '... updates object, receiptMessage'); -is( $driver->get('group'), 4, '... updates object, group'); +is( $driver->get('groupToUse'), 4, '... updates object, group'); is( $driver->get('enabled'), 0, '... updates object, enabled'); is( $driver->get('label'), 'Yet another label', '... updates object, label'); @@ -462,8 +446,7 @@ TODO: { # ####################################################################### -my $versionTag = WebGUI::VersionTag->getWorking($session); -my $node = WebGUI::Asset->getImportNode($session); +my $node = WebGUI::Test->asset; my $widget = $node->addChild({ className => 'WebGUI::Asset::Sku::Product', title => 'Test product for cart template variables in the Product', @@ -477,11 +460,11 @@ my $blue_widget = $widget->setCollateral('variantsJSON', 'variantId', 'new', } ); -$versionTag->commit; my $credited_user = WebGUI::User->create($session); $session->user({user => $credited_user}); + my $cart = WebGUI::Shop::Cart->newBySession($session); -WebGUI::Test->addToCleanup($versionTag, $cart, $credited_user); +WebGUI::Test->addToCleanup($cart, $credited_user); my $addressBook = $cart->getAddressBook; my $workAddress = $addressBook->addAddress({ label => 'work', @@ -494,6 +477,7 @@ $cart->update({ billingAddressId => $workAddress->getId, shippingAddressId => $workAddress->getId, }); + $widget->addToCart($widget->getCollateral('variantsJSON', 'variantId', $blue_widget)); my $cart_variables = {}; @@ -550,3 +534,32 @@ is ($count, 0, 'delete deleted the object'); undef $driver; +####################################################################### +# +# processPropertiesFromFormPost +# +####################################################################### + +$session->request->setup_body({ + label => 'form processed driver', + enabled => 1, + groupToUse => 7, +}); + +my $form_driver = WebGUI::Shop::PayDriver->new($session, {}); +WebGUI::Test->addToCleanup($form_driver); + +$form_driver->processPropertiesFromFormPost; + +cmp_deeply( + $form_driver->get(), + { + label => 'form processed driver', + enabled => 1, + groupToUse => 7, + paymentGatewayId => $form_driver->paymentGatewayId, + }, + 'form contents processed. Missing form properties inherit defaults' +); + +done_testing; diff --git a/t/Shop/PayDriver/ITransact.t b/t/Shop/PayDriver/ITransact.t index 91a12733b..0d0f67627 100644 --- a/t/Shop/PayDriver/ITransact.t +++ b/t/Shop/PayDriver/ITransact.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2008 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use Test::More; use Test::Deep; use WebGUI::Test; # Must use this before any other WebGUI modules @@ -26,6 +24,8 @@ use WebGUI::Shop::Transaction; use WebGUI::Shop::PayDriver::ITransact; use JSON; use HTML::Form; +use WebGUI::Shop::PayDriver::ITransact; +use XML::Simple; #---------------------------------------------------------------------------- # Init @@ -36,12 +36,9 @@ $session->user({userId => 3}); #---------------------------------------------------------------------------- # Tests -plan tests => 28; - #---------------------------------------------------------------------------- # figure out if the test can actually run - my $e; my $ship = WebGUI::Shop::Ship->new($session); my $cart = WebGUI::Shop::Cart->newBySession($session); @@ -62,9 +59,7 @@ $cart->update({ }); my $transaction; -my $versionTag = WebGUI::VersionTag->getWorking($session); - -my $home = WebGUI::Asset->getDefault($session); +my $home = WebGUI::Test->asset; my $rockHammer = $home->addChild({ className => 'WebGUI::Asset::Sku::Product', @@ -88,64 +83,17 @@ my $foreignHammer = $rockHammer->setCollateral('variantsJSON', 'variantId', 'new } ); - -$versionTag->commit; -WebGUI::Test->addToCleanup($versionTag); - my $hammerItem = $rockHammer->addToCart($rockHammer->getCollateral('variantsJSON', 'variantId', $smallHammer)); - -####################################################################### -# -# definition -# -####################################################################### - -note('Testing definition'); -my $definition; - -eval { $definition = WebGUI::Shop::PayDriver::ITransact->definition(); }; -$e = Exception::Class->caught(); -isa_ok ($e, 'WebGUI::Error::InvalidParam', 'definition takes an exception to not giving it a session variable'); -cmp_deeply ( - $e, - methods( - error => 'Must provide a session variable', - ), - 'definition: requires a session variable', -); - -####################################################################### -# -# create -# -####################################################################### - -my $driver; - -# Test incorrect for parameters - -eval { $driver = WebGUI::Shop::PayDriver::ITransact->create(); }; -$e = Exception::Class->caught(); -isa_ok ($e, 'WebGUI::Error::InvalidParam', 'create takes exception to not giving it a session object'); -cmp_deeply ( - $e, - methods( - error => 'Must provide a session variable', - ), - 'create takes exception to not giving it a session object', -); - -eval { $driver = WebGUI::Shop::PayDriver::ITransact->create($session, {}); }; -$e = Exception::Class->caught(); -isa_ok ($e, 'WebGUI::Error::InvalidParam', 'create takes exception to giving it an empty hashref of options'); -cmp_deeply ( - $e, - methods( - error => 'Must provide a hashref of options', - ), - 'create takes exception to not giving it an empty hashref of options', -); +my $ship = WebGUI::Shop::Ship->new($session); +my $cart = WebGUI::Shop::Cart->newBySession($session); +WebGUI::Test->addToCleanup($cart); +my $shipper = $ship->getShipper('defaultfreeshipping000'); +my $address = $cart->getAddressBook->addAddress( { firstName => 'Ellis Boyd', lastName => 'Redding'} ); +$cart->update({ + shippingAddressId => $address->getId, + shipperId => $shipper->getId, +}); my $vendorId = $session->config->get("testing/ITransact/vendorId"); my $password = $session->config->get("testing/ITransact/password"); @@ -158,6 +106,20 @@ if (!$password) { $password = "joePass"; } +####################################################################### +# +# getName +# +####################################################################### + +ok(WebGUI::Shop::PayDriver::ITransact->getName($session), 'getName returns a name'); + +####################################################################### +# +# _generatePaymentRequestXML +# +####################################################################### + my $options = { label => 'Fast and harmless', enabled => 1, @@ -166,92 +128,9 @@ my $options = { password => $password, useCVV2 => 1, }; - -$driver = WebGUI::Shop::PayDriver::ITransact->create( $session, $options ); - -isa_ok ($driver, 'WebGUI::Shop::PayDriver::ITransact', 'create creates WebGUI::Shop::PayDriver object'); -like($driver->getId, $session->id->getValidator, 'driver id is a valid GUID'); - -####################################################################### -# -# session -# -####################################################################### - -isa_ok ($driver->session, 'WebGUI::Session', 'session method returns a session object'); -is ($session->getId, $driver->session->getId, 'session method returns OUR session object'); - -####################################################################### -# -# paymentGatewayId, getId -# -####################################################################### - -like ($driver->paymentGatewayId, $session->id->getValidator, 'got a valid GUID for paymentGatewayId'); -is ($driver->getId, $driver->paymentGatewayId, 'getId returns the same thing as paymentGatewayId'); - -####################################################################### -# -# className -# -####################################################################### - -is ($driver->className, ref $driver, 'className property set correctly'); - -####################################################################### -# -# options -# -####################################################################### - -cmp_deeply( - $driver->options, - superhashof( $options ), - 'options accessor works' -); - -####################################################################### -# -# getName -# -####################################################################### - -eval { WebGUI::Shop::PayDriver::ITransact->getName(); }; -$e = Exception::Class->caught(); -isa_ok ($e, 'WebGUI::Error::InvalidParam', 'getName requires a session object passed to it'); -cmp_deeply ( - $e, - methods( - error => 'Must provide a session variable', - ), - 'getName requires a session object passed to it', -); - -is(WebGUI::Shop::PayDriver::ITransact->getName($session), 'Credit Card (ITransact)', 'getName returns the human readable name of this driver'); - -####################################################################### -# -# get -# -####################################################################### - -cmp_deeply ($driver->get, $driver->options, 'get works like the options method with no param passed'); -is ($driver->get('enabled'), 1, 'get the enabled entry from the options'); -is ($driver->get('label'), 'Fast and harmless', 'get the label entry from the options'); - -my $optionsCopy = $driver->get; -$optionsCopy->{label} = 'And now for something completely different'; -isnt( - $driver->get('label'), - 'And now for something completely different', - 'hashref returned by get() is a copy of the internal hashref' -); - -####################################################################### -# -# _generatePaymentRequestXML -# -####################################################################### +my $driver = WebGUI::Shop::PayDriver::ITransact->new( $session, $options ); +$driver->write; +WebGUI::Test->addToCleanup($driver); my $dt = WebGUI::DateTime->new($session, time()); $dt->add({ years => 1, }); @@ -265,7 +144,7 @@ $driver->{_cardData} = { }; $cart->update({gatewayId => $driver->getId,}); -$transaction = WebGUI::Shop::Transaction->create($session, { +$transaction = WebGUI::Shop::Transaction->new($session, { cart => $cart, isRecurring => $cart->requiresRecurringPayment, }); @@ -285,11 +164,17 @@ TODO: { ####################################################################### SKIP: { - skip "Skipping XML requests to ITransact due to lack of userId and password", 2 unless $hasTestAccount; - my $response = eval { $driver->doXmlRequest($xml) }; + skip "Skipping XML requests to ITransact due to lack of real userId and password", 2 unless $hasTestAccount; note 'doXmlrequest'; - isa_ok($response, 'HTTP::Response', 'returns a HTTP::Response object'); - ok( $response->is_success, '... was successful'); + my $response = eval { $driver->doXmlRequest($xml) }; + my $ok_response = isa_ok($response, 'HTTP::Response', 'returns a HTTP::Response object'); + SKIP: { + skip "Skipping response check since we did not get a response", 1 unless $ok_response; + ok( $response->is_success, '... response was successful'); + my $transactionResult = XMLin( $response->content, SuppressEmpty => '' ); + ok defined($transactionResult->{TransactionData}), '... transaction was successful' + or diag $xml.$response->content; + } } my $hammer2 = $rockHammer->addToCart($rockHammer->getCollateral('variantsJSON', 'variantId', $foreignHammer)); @@ -304,25 +189,17 @@ TODO: { SKIP: { skip "Skipping XML requests to ITransact due to lack of userId and password", 2 unless $hasTestAccount; my $response = eval { $driver->doXmlRequest($xml) }; - isa_ok($response, 'HTTP::Response', 'returns a HTTP::Response object'); - ok( $response->is_success, '... was successful'); - note $response->content; + my $ok_response = isa_ok($response, 'HTTP::Response', 'returns a HTTP::Response object'); + ok( $response->is_success, '... was successful for two item transaction'); + SKIP: { + skip "Skipping response check since we did not get a response", 1 unless $ok_response; + ok( $response->is_success, '... response was successful for a two item transaction'); + my $transactionResult = XMLin( $response->content, SuppressEmpty => '' ); + ok defined($transactionResult->{TransactionData}), '... transaction was successful' + or diag $xml.$response->content; + } } -####################################################################### -# -# delete -# -####################################################################### - -$driver->delete; - -my $count = $session->db->quickScalar('select count(*) from paymentGateway where paymentGatewayId=?', [ - $driver->paymentGatewayId -]); - -is ($count, 0, 'delete deleted the object'); - -undef $driver; +done_testing; #vim:ft=perl diff --git a/t/Shop/PayDriver/Ogone.t b/t/Shop/PayDriver/Ogone.t index 205f01cc0..de06c4958 100644 --- a/t/Shop/PayDriver/Ogone.t +++ b/t/Shop/PayDriver/Ogone.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2008 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -9,13 +9,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------ -# Write a little about what this script tests. -# -# - -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use Test::More; use Test::Deep; use WebGUI::Test; # Must use this before any other WebGUI modules @@ -32,7 +26,7 @@ my $session = WebGUI::Test->session; #---------------------------------------------------------------------------- # Tests -plan tests => 45; +plan tests => 12; #---------------------------------------------------------------------------- # figure out if the test can actually run @@ -41,104 +35,7 @@ my $e; ####################################################################### # -# definition -# -####################################################################### - -note('Testing definition'); -my $definition; - -eval { $definition = WebGUI::Shop::PayDriver::Ogone->definition(); }; -$e = Exception::Class->caught(); -isa_ok ($e, 'WebGUI::Error::InvalidParam', 'definition takes an exception to not giving it a session variable'); -cmp_deeply ( - $e, - methods( - error => 'Must provide a session variable', - ), - 'definition: requires a session variable', -); - -$definition = WebGUI::Shop::PayDriver::Ogone->definition($session); - -use Data::Dumper; -my $expectDefinition = { - name => 'Ogone', - properties => { - pspid => { - fieldType => 'text', - label => ignore(), - hoverHelp => ignore(), - defaultValue => q{} - }, - shaSecret => { - fieldType => 'password', - label => ignore(), - hoverHelp => ignore(), - }, - postbackSecret => { - fieldType => 'password', - label => ignore(), - hoverHelp => ignore(), - }, - locale => { - fieldType => 'text', - label => ignore(), - hoverHelp => ignore(), - defaultValue => 'en_US', - maxlength => 5, - size => 5, - }, - currency => { - fieldType => 'text', - label => ignore(), - hoverHelp => ignore(), - defaultValue => 'EUR', - maxlength => 3, - size => 3, - }, - useTestMode => { - fieldType => 'yesNo', - label => ignore(), - hoverHelp => ignore(), - defaultValue => 1, - }, - summaryTemplateId => { - fieldType => 'template', - label => ignore(), - hoverHelp => ignore(), - defaultValue => ignore(), - namespace => 'Shop/Credentials', - }, - }, -}; - -cmp_deeply ( $definition->[0], $expectDefinition, 'Definition returns an array of hashrefs' ); - -$definition = WebGUI::Shop::PayDriver::Ogone->definition($session, [ { name => 'Ogone First' }]); - -cmp_deeply ( - $definition, - [ - { - name => 'Ogone First', - }, - { - name => 'Ogone', - properties => ignore(), - }, - { - name => 'Payment Driver', - properties => ignore(), - } - ], - , - 'New data is appended correctly', -); - -####################################################################### -# -# create +# new # ####################################################################### @@ -146,104 +43,18 @@ my $driver; # Test incorrect for parameters -eval { $driver = WebGUI::Shop::PayDriver::Ogone->create(); }; -$e = Exception::Class->caught(); -isa_ok ($e, 'WebGUI::Error::InvalidParam', 'create takes exception to not giving it a session object'); -cmp_deeply ( - $e, - methods( - error => 'Must provide a session variable', - ), - 'create takes exception to not giving it a session object', -); - -eval { $driver = WebGUI::Shop::PayDriver::Ogone->create($session, {}); }; -$e = Exception::Class->caught(); -isa_ok ($e, 'WebGUI::Error::InvalidParam', 'create takes exception to giving it an empty hashref of options'); -cmp_deeply ( - $e, - methods( - error => 'Must provide a hashref of options', - ), - 'create takes exception to not giving it an empty hashref of options', -); - -# Test functionality -my $signature = '-----BEGIN PKCS7----- -MIIHPwYJKoZIhvcNAQcEoIIHMDCCBywCAQExggE0MIIB -MAIBADCBmDCBkjELMAkGA1UEBhMCVVMxCzAJBgNVBAgT -AkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYD -VQQKEwtQYXlQYWwgSW5jLjEVMBMGA1UECxQMc3RhZ2Ux -X2NlcnRzMRMwEQYDVQQDFApzdGFnZTFfYXBpMRwwGgYJ -KoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tAgEAMA0GCSqG -SIb3DQEBAQUABIGAiJLqJ8905lNbvKoa715KsOJtSOGy -4d6fEKV7+S8KU8E/RK0SFmMgGPRpmXdzx9MXCU43/tXj -lyuyOeZQUBaAIaWoNpfZmBUYIvJVh4W+bDH6JUkugelp -CaTjxXOx/F1qj79D9z06AK+N3yW1fM41fM7X9Q1Bc12g -THjJUKXcIIcxCzAJBgUrDgMCGgUAMIGkBgkqhkiG9w0B -BwEwFAYIKoZIhvcNAwcECOsHG9QOvcJFgIGAwmbN5Acd -cnCH0ZTnsSOq5GtXeQf0j2jCBCg6y7b4ZXQwgdqUC/7x -eb0yicuiRVuRB9WLr/0rGFuSYENpKVUqWYjnlg3TsxLP -IxDCp6lfFqsrclppyZ9CP+xim7y0qKqZZufJG8HgCHxk -3BPD6LqByjQjDVpqKKmCNJ1HlwXGN+SgggOWMIIDkjCC -AvugAwIBAgIBADANBgkqhkiG9w0BAQQFADCBkzELMAkG -A1UEBhMCVVMxCzAJBgNVBAgTAkNBMREwDwYDVQQHEwhT -YW4gSm9zZTEPMA0GA1UEChMGUGF5UGFsMRwwGgYDVQQL -ExNTeXN0ZW1zIEVuZ2luZWVyaW5nMRMwEQYDVQQDEwpT -b3V2aWsgRGFzMSAwHgYJKoZIhvcNAQkBFhFzb3VkYXNA -cGF5cGFsLmNvbTAeFw0wNDA1MjExODE4NTBaFw0wNDA2 -MjAxODE4NTBaMIGTMQswCQYDVQQGEwJVUzELMAkGA1UE -CBMCQ0ExETAPBgNVBAcTCFNhbiBKb3NlMQ8wDQYDVQQK -EwZQYXlQYWwxHDAaBgNVBAsTE1N5c3RlbXMgRW5naW5l -ZXJpbmcxEzARBgNVBAMTClNvdXZpayBEYXMxIDAeBgkq -hkiG9w0BCQEWEXNvdWRhc0BwYXlwYWwuY29tMIGfMA0G -CSqGSIb3DQEBAQUAA4GNADCBiQKBgQDatyhVzmVe+kCN -tOSNS+c7p9pNHlFGbGtIWgIAKSOVlaTk4JD/UAvQzYnn -eWPUk+Xb5ShTx8YRDEtRtecy/PwSIIrtS2sC8RrmjZxU -uNRqPB6y1ahGwGcNd/wOIy3FekGE/ctX7oG6/Voz/E2Z -EyJaPm7KwYiDQYz7kWJ6eB+kDwIDAQABo4HzMIHwMB0G -A1UdDgQWBBQx23WZRMmnADSXDr+P7uxORBdDuzCBwAYD -VR0jBIG4MIG1gBQx23WZRMmnADSXDr+P7uxORBdDu6GB -maSBljCBkzELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNB -MREwDwYDVQQHEwhTYW4gSm9zZTEPMA0GA1UEChMGUGF5 -UGFsMRwwGgYDVQQLExNTeXN0ZW1zIEVuZ2luZWVyaW5n -MRMwEQYDVQQDEwpTb3V2aWsgRGFzMSAwHgYJKoZIhvcN -AQkBFhFzb3VkYXNAcGF5cGFsLmNvbYIBADAMBgNVHRME -BTADAQH/MA0GCSqGSIb3DQEBBAUAA4GBAIBlMsXVnxYe -ZtVTG3rsVYePdkMs+0WdRd+prTK4ZBcAkCyNk9jCq5dy -VziCi4ZCleMqR5Y0NH1+BQAf8vxxcb4Z7p0rryXGb96f -ZfkSYd99a4qGKW3aSIsc2kpaC/ezQg8vuD6JSo6VhJIb -Zn0oWajvkHNMENOwN/Ym5stvAxtnMYIBnzCCAZsCAQEw -gZkwgZMxCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTER -MA8GA1UEBxMIU2FuIEpvc2UxDzANBgNVBAoTBlBheVBh -bDEcMBoGA1UECxMTU3lzdGVtcyBFbmdpbmVlcmluZzET -MBEGA1UEAxMKU291dmlrIERhczEgMB4GCSqGSIb3DQEJ -ARYRc291ZGFzQHBheXBhbC5jb20CAQAwCQYFKw4DAhoF -AKBdMBgGCSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJ -KoZIhvcNAQkFMQ8XDTA0MDUyNjE5MTgxNFowIwYJKoZI -hvcNAQkEMRYEFI2w1oe5qvHYB0w9Z/ntkRcDqLlhMA0G -CSqGSIb3DQEBAQUABIGAimA3r6ZXmyynFGF5cOj6E1Hq -Ebtelq2tg4HroAHZLWoQ3kc/7IM0LCuWZmgtD5739NSS -0+tOFSdH68sxKsdooR3MFTbdzWhtej5fPKRa6BfHGPjI -9R9NoAQBmaeUuOiPSeVTzXDOKDbZB0sJtmWNeueTD9D0 -BOu+vkC1g+HRToc= ------END PKCS7-----'; - my $options = { label => 'Fast and harmless', enabled => 1, - group => 3, - receiptMessage => 'Pannenkoeken zijn nog lekkerder met kaas', - vendorId => 'oqapi', - signature => $signature, + groupToUse => 3, currency => 'EUR', - useSandbox => '0', - emailMessage => 'Thank you very very much' }; -$driver = WebGUI::Shop::PayDriver::Ogone->create( $session, $options ); +$driver = WebGUI::Shop::PayDriver::Ogone->new( $session, $options ); +WebGUI::Test->addToCleanup($driver); +$driver->write; -isa_ok ($driver, 'WebGUI::Shop::PayDriver::Ogone', 'create creates WebGUI::Shop::PayDriver object'); +isa_ok ($driver, 'WebGUI::Shop::PayDriver::Ogone', 'new creates WebGUI::Shop::PayDriver object'); like($driver->getId, $session->id->getValidator, 'driver id is a valid GUID'); my $dbData = $session->db->quickHashRef('select * from paymentGateway where paymentGatewayId=?', [ $driver->getId ]); @@ -261,54 +72,21 @@ my $paymentGatewayOptions = from_json($dbData->{'options'}); cmp_deeply ( $paymentGatewayOptions, { - "group" => 3, - "receiptMessage" => 'Pannenkoeken zijn nog lekkerder met kaas', - "label" => 'Fast and harmless', - "enabled" => 1, - "vendorId" => 'oqapi', - "signature" => $signature, - "currency" => 'EUR', - "useSandbox" => '0', - "emailMessage" => 'Thank you very very much' + groupToUse => 3, + label => 'Fast and harmless', + enabled => 1, + currency => 'EUR', + pspid => '', + summaryTemplateId => 'jysVZeUR0Bx2NfrKs5sulg', + useTestMode => 1, + locale => 'en_US', + shaSecret => undef, + postbackSecret => undef, }, 'Correct options are written to the db' ); -####################################################################### -# -# session -# -####################################################################### - -isa_ok ($driver->session, 'WebGUI::Session', 'session method returns a session object'); -is ($session->getId, $driver->session->getId, 'session method returns OUR session object'); - -####################################################################### -# -# paymentGatewayId, getId -# -####################################################################### - -like ($driver->paymentGatewayId, $session->id->getValidator, 'got a valid GUID for paymentGatewayId'); -is ($driver->getId, $driver->paymentGatewayId, 'getId returns the same thing as paymentGatewayId'); - -####################################################################### -# -# className -# -####################################################################### - -is ($driver->className, ref $driver, 'className property set correctly'); - -####################################################################### -# -# options -# -####################################################################### - -cmp_deeply ($driver->options, $options, 'options accessor works'); - ####################################################################### # # getName @@ -328,24 +106,6 @@ cmp_deeply ( is (WebGUI::Shop::PayDriver::Ogone->getName($session), 'Ogone', 'getName returns the human readable name of this driver'); -####################################################################### -# -# get -# -####################################################################### - -cmp_deeply ($driver->get, $driver->options, 'get works like the options method with no param passed'); -is ($driver->get('enabled'), 1, 'get the enabled entry from the options'); -is ($driver->get('label'), 'Fast and harmless', 'get the label entry from the options'); - -my $optionsCopy = $driver->get; -$optionsCopy->{label} = 'And now for something completely different'; -isnt( - $driver->get('label'), - 'And now for something completely different', - 'hashref returned by get() is a copy of the internal hashref' -); - ####################################################################### # # getCart @@ -353,8 +113,8 @@ isnt( ####################################################################### my $cart = $driver->getCart; -isa_ok ($cart, 'WebGUI::Shop::Cart', 'getCart returns an instantiated WebGUI::Shop::Cart object'); WebGUI::Test->addToCleanup($cart); +isa_ok ($cart, 'WebGUI::Shop::Cart', 'getCart returns an instantiated WebGUI::Shop::Cart object'); ####################################################################### # @@ -364,16 +124,16 @@ WebGUI::Test->addToCleanup($cart); my $form = $driver->getEditForm; -isa_ok ($form, 'WebGUI::HTMLForm', 'getEditForm returns an HTMLForm object'); +isa_ok ($form, 'WebGUI::FormBuilder', 'getEditForm returns an HTMLForm object'); -my $html = $form->print; +my $html = $form->toHtml; ##Any URL is fine, really my @forms = HTML::Form->parse($html, 'http://www.webgui.org'); is (scalar @forms, 1, 'getEditForm generates just 1 form'); my @inputs = $forms[0]->inputs; -is (scalar @inputs, 18, 'getEditForm: the form has 18 controls'); +is (scalar @inputs, 17, 'getEditForm: the form has 18 controls'); my @interestingFeatures; foreach my $input (@inputs) { @@ -386,11 +146,7 @@ cmp_deeply( \@interestingFeatures, [ { - name => 'webguiCsrfToken', - type => 'hidden', - }, - { - name => undef, + name => 'send', type => 'submit', }, { @@ -462,123 +218,4 @@ cmp_deeply( ); -####################################################################### -# -# new -# -####################################################################### - -my $oldDriver; - -eval { $oldDriver = WebGUI::Shop::PayDriver::Ogone->new(); }; -$e = Exception::Class->caught(); -isa_ok ($e, 'WebGUI::Error::InvalidParam', 'new takes exception to not giving it a session object'); -cmp_deeply ( - $e, - methods( - error => 'Must provide a session variable', - ), - 'new takes exception to not giving it a session object', -); - -eval { $oldDriver = WebGUI::Shop::PayDriver::Ogone->new($session); }; -$e = Exception::Class->caught(); -isa_ok ($e, 'WebGUI::Error::InvalidParam', 'new takes exception to not giving it a paymentGatewayId'); -cmp_deeply ( - $e, - methods( - error => 'Must provide a paymentGatewayId', - ), - 'new takes exception to not giving it a paymentGatewayId', -); - -eval { $oldDriver = WebGUI::Shop::PayDriver::Ogone->new($session, 'notEverAnId'); }; -$e = Exception::Class->caught(); -isa_ok ($e, 'WebGUI::Error::ObjectNotFound', 'new croaks unless the requested paymentGatewayId object exists in the db'); -cmp_deeply ( - $e, - methods( - error => 'paymentGatewayId not found in db', - id => 'notEverAnId', - ), - 'new croaks unless the requested paymentGatewayId object exists in the db', -); - -my $driverCopy = WebGUI::Shop::PayDriver::Ogone->new($session, $driver->getId); - -is ($driver->getId, $driverCopy->getId, 'same id'); -is ($driver->className, $driverCopy->className, 'same className'); -cmp_deeply ($driver->options, $driverCopy->options, 'same options'); - -####################################################################### -# -# update -# -####################################################################### - -eval { $driver->update(); }; -$e = Exception::Class->caught(); -isa_ok ($e, 'WebGUI::Error::InvalidParam', 'update takes exception to not giving it a hashref of options'); -cmp_deeply ( - $e, - methods( - error => 'update was not sent a hashref of options to store in the database', - ), - 'update takes exception to not giving it a hashref of options', -); - -my $newOptions = { - label => 'Yet another label', - enabled => 0, - group => 4, - receiptMessage => 'Dropjes!', -}; - -$driver->update($newOptions); -my $storedOptions = $session->db->quickScalar('select options from paymentGateway where paymentGatewayId=?', [ - $driver->getId, -]); -cmp_deeply( - $newOptions, - from_json($storedOptions), - , - 'update() actually stores data', -); - - -####################################################################### -# -# canUse -# -####################################################################### - -my $newOptions = { - label => 'Yet another label', - enabled => 1, - group => 4, - receiptMessage => 'Dropjes!', -}; - -$driver->update($newOptions); -$session->user({userId => 3}); -ok($driver->canUse, 'canUse: session->user is used if no argument is passed'); -ok(!$driver->canUse({userId => 1}), 'canUse: userId explicit works, visitor cannot use this driver'); - - -####################################################################### -# -# delete -# -####################################################################### - -$driver->delete; - -my $count = $session->db->quickScalar('select count(*) from paymentGateway where paymentGatewayId=?', [ - $driver->paymentGatewayId -]); - -is ($count, 0, 'delete deleted the object'); - -undef $driver; - #vim:ft=perl diff --git a/t/Shop/PayDriver/PayPalStd.t b/t/Shop/PayDriver/PayPalStd.t index fe1f746d5..2a98dcb9d 100644 --- a/t/Shop/PayDriver/PayPalStd.t +++ b/t/Shop/PayDriver/PayPalStd.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use Test::More; use Test::Deep; use JSON; @@ -23,6 +21,7 @@ use HTML::Form; use WebGUI::Test; # Must use this before any other WebGUI modules use WebGUI::Session; +use WebGUI::Shop::PayDriver::PayPal::PayPalStd; #---------------------------------------------------------------------------- # Init @@ -31,16 +30,13 @@ my $session = WebGUI::Test->session; #---------------------------------------------------------------------------- # Tests -my $tests = 3; -plan tests => 1 + $tests; +plan tests => 3; #---------------------------------------------------------------------------- # figure out if the test can actually run my $e; -my $loaded = use_ok('WebGUI::Shop::PayDriver::PayPal::PayPalStd'); - ####################################################################### # # getName @@ -50,25 +46,15 @@ my $driver; my $options = { label => 'PayPal', enabled => 1, - group => 3, - receiptMessage => 'Pannenkoeken zijn nog lekkerder met spek', + groupToUse => 3, }; -$driver = WebGUI::Shop::PayDriver::PayPal::PayPalStd->create( $session, $options ); +$driver = WebGUI::Shop::PayDriver::PayPal::PayPalStd->new( $session, $options ); +WebGUI::Test->addToCleanup($driver); isa_ok ($driver, 'WebGUI::Shop::PayDriver'); isa_ok ($driver, 'WebGUI::Shop::PayDriver::PayPal::PayPalStd'); is($driver->getName($session), 'PayPal', 'getName returns the human readable name of this driver'); -####################################################################### -# -# delete -# -####################################################################### - -$driver->delete; - -undef $driver; - #vim:ft=perl diff --git a/t/Shop/Ship.t b/t/Shop/Ship.t index 7d73d55eb..85a20aa68 100644 --- a/t/Shop/Ship.t +++ b/t/Shop/Ship.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,11 +13,10 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use Test::More; use Test::Deep; +use Test::Exception; use JSON; use HTML::Form; use Data::Dumper; @@ -33,8 +32,6 @@ my $session = WebGUI::Test->session; #---------------------------------------------------------------------------- # Tests -plan tests => 22; - #---------------------------------------------------------------------------- # put your tests here @@ -50,22 +47,10 @@ my $ship; # ####################################################################### -my $e; +dies_ok { $ship = WebGUI::Shop::Ship->new(); } 'new takes an exception to not giving it a session variable'; -eval { $ship = WebGUI::Shop::Ship->new(); }; -$e = Exception::Class->caught(); -isa_ok($e, 'WebGUI::Error::InvalidParam', 'new takes an exception to not giving it a session variable'); -cmp_deeply( - $e, - methods( - error => 'Must provide a session variable', - got => '', - expected => 'WebGUI::Session', - ), - 'new: requires a session variable', -); - -$ship = WebGUI::Shop::Ship->new($session); +lives_ok { $ship = WebGUI::Shop::Ship->new(session => $session); } 'new takes hash arguments'; +lives_ok { $ship = WebGUI::Shop::Ship->new($session); } 'new takes a bare session object'; isa_ok($ship, 'WebGUI::Shop::Ship', 'new returned the right kind of object'); isa_ok($ship->session, 'WebGUI::Session', 'session method returns a session object'); @@ -101,6 +86,8 @@ cmp_bag( my $shipper; +my $e; + eval { $shipper = $ship->addShipper(); }; $e = Exception::Class->caught(); isa_ok($e, 'WebGUI::Error::InvalidParam', 'addShipper croaks without a class'); @@ -137,13 +124,13 @@ cmp_deeply( eval { $shipper = $ship->addShipper('WebGUI::Shop::ShipDriver::FlatRate', {}); }; $e = Exception::Class->caught(); -isa_ok($e, 'WebGUI::Error::InvalidParam', 'addShipper croaks without options to build a object with'); +isa_ok($e, 'WebGUI::Error::InvalidParam', 'addShipper croaks with empty options to build a object with'); cmp_deeply( $e, methods( error => 'You must pass a hashref of options to create a new ShipDriver object', ), - 'addShipper croaks without options to build a object with', + 'addShipper croaks with empty options to build a object with', ); my $driver = $ship->addShipper('WebGUI::Shop::ShipDriver::FlatRate', { enabled=>1, label=>q{Jake's Jailbird Airmail}, groupToUse=>7}); @@ -213,4 +200,7 @@ cmp_deeply( ); $cart->delete; + +done_testing(); + #vim:ft=perl diff --git a/t/Shop/ShipDriver.t b/t/Shop/ShipDriver.t index 01095937f..aa1f9a769 100644 --- a/t/Shop/ShipDriver.t +++ b/t/Shop/ShipDriver.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use Test::More; use Test::Deep; use JSON; @@ -23,6 +21,9 @@ use HTML::Form; use WebGUI::Test; # Must use this before any other WebGUI modules use WebGUI::Session; +use WebGUI::Shop::ShipDriver; +use WebGUI::Test::Mechanize; +use Clone; #---------------------------------------------------------------------------- # Init @@ -31,125 +32,41 @@ my $session = WebGUI::Test->session; #---------------------------------------------------------------------------- # Tests -my $tests = 44; -plan tests => 1 + $tests; +plan tests => 48; #---------------------------------------------------------------------------- # put your tests here my $e; -my $loaded = use_ok('WebGUI::Shop::ShipDriver'); - -my $storage; - ####################################################################### # -# definition -# -####################################################################### - -my $definition; - -eval { $definition = WebGUI::Shop::ShipDriver->definition(); }; -$e = Exception::Class->caught(); -isa_ok($e, 'WebGUI::Error::InvalidParam', 'definition takes an exception to not giving it a session variable'); -cmp_deeply( - $e, - methods( - error => 'Must provide a session variable', - ), - 'definition: requires a session variable', -); - -$definition = WebGUI::Shop::ShipDriver->definition($session); - -cmp_deeply( - $definition, - [ { - name => 'Shipper Driver', - properties => { - label => { - fieldType => 'text', - label => ignore(), - hoverHelp => ignore(), - defaultValue => undef, - }, - enabled => { - fieldType => 'yesNo', - label => ignore(), - hoverHelp => ignore(), - defaultValue => 1, - }, - groupToUse => { - fieldType => 'group', - label => ignore(), - hoverHelp => ignore(), - defaultValue => 7, - }, - } - } ], - , - 'Definition returns an array of hashrefs', -); - -$definition = WebGUI::Shop::ShipDriver->definition($session, [ { name => 'Red' }]); - -cmp_deeply( - $definition, - [ - { - name => 'Red', - }, - { - name => 'Shipper Driver', - properties => ignore(), - } - ], - , - 'New data is appended correctly', -); - -####################################################################### -# -# create +# new # ####################################################################### my $driver; -eval { $driver = WebGUI::Shop::ShipDriver->create(); }; +eval { $driver = WebGUI::Shop::ShipDriver->new(); }; $e = Exception::Class->caught(); -isa_ok($e, 'WebGUI::Error::InvalidParam', 'create takes exception to not giving it a session object'); +isa_ok($e, 'WebGUI::Error::InvalidParam', 'new takes exception to not giving it a session object'); cmp_deeply( $e, methods( error => 'Must provide a session variable', ), - 'create takes exception to not giving it a session object', + 'new takes exception to not giving it a session object', ); -eval { $driver = WebGUI::Shop::ShipDriver->create($session); }; +eval { $driver = WebGUI::Shop::ShipDriver->new($session); }; $e = Exception::Class->caught(); -isa_ok($e, 'WebGUI::Error::InvalidParam', 'create takes exception to not giving it a hashref of options'); +isa_ok($e, 'WebGUI::Error::InvalidParam', 'new takes exception to not giving it a hashref of options'); cmp_deeply( $e, methods( - error => 'Must provide a hashref of options', + error => 'Must provide a shipperId', ), - 'create takes exception to not giving it a hashref of options', -); - - -eval { $driver = WebGUI::Shop::ShipDriver->create($session, {}); }; -$e = Exception::Class->caught(); -isa_ok($e, 'WebGUI::Error::InvalidParam', 'create takes exception to not giving it an empty hashref of options'); -cmp_deeply( - $e, - methods( - error => 'Must provide a hashref of options', - ), - 'create takes exception to not giving it an empty hashref of options', + 'new takes exception to not giving it a shipperId', ); my $options = { @@ -158,7 +75,8 @@ my $options = { groupToUse => 7, }; -$driver = WebGUI::Shop::ShipDriver->create( $session, $options ); +$driver = WebGUI::Shop::ShipDriver->new( $session, Clone::clone($options) ); +$driver->write; WebGUI::Test->addToCleanup($driver); isa_ok($driver, 'WebGUI::Shop::ShipDriver'); @@ -169,8 +87,7 @@ is($session->getId, $driver->session->getId, 'session method returns OUR session like($driver->getId, $session->id->getValidator, 'got a valid GUID for shipperId'); - -cmp_deeply($driver->get, $options, 'options accessor works'); +cmp_deeply($driver->get, { %{$options}, shipperId=>ignore()} , 'get works'); my $dbData = $session->db->quickHashRef('select * from shipper where shipperId=?',[$driver->getId]); cmp_deeply( @@ -189,7 +106,7 @@ cmp_deeply( # ####################################################################### -is (WebGUI::Shop::ShipDriver->getName($session), 'Shipper Driver', 'getName returns the human readable name of this driver'); +is (WebGUI::Shop::ShipDriver->getName($session), 'Shipping Driver', 'getName returns the human readable name of this driver'); ####################################################################### # @@ -211,16 +128,16 @@ is($driver->get('label'), 'Slow and dangerous', 'get returns a safe copy of the my $form = $driver->getEditForm; -isa_ok($form, 'WebGUI::HTMLForm', 'getEditForm returns an HTMLForm object'); +isa_ok($form, 'WebGUI::FormBuilder', 'getEditForm returns a FormBuilder object'); -my $html = $form->print; +my $html = $form->toHtml; ##Any URL is fine, really my @forms = HTML::Form->parse($html, 'http://www.webgui.org'); is (scalar @forms, 1, 'getEditForm generates just 1 form'); my @inputs = $forms[0]->inputs; -is (scalar @inputs, 10, 'getEditForm: the form has 10 controls'); +is (scalar @inputs, 9, 'getEditForm: the form has 10 controls'); my @interestingFeatures; foreach my $input (@inputs) { @@ -233,17 +150,9 @@ cmp_deeply( \@interestingFeatures, [ { - name => 'webguiCsrfToken', - type => 'hidden', - }, - { - name => undef, + name => 'send', type => 'submit', }, - { - name => 'driverId', - type => 'hidden', - }, { name => 'shop', type => 'hidden', @@ -256,6 +165,10 @@ cmp_deeply( name => 'do', type => 'hidden', }, + { + name => 'driverId', + type => 'hidden', + }, { name => 'label', type => 'text', @@ -278,6 +191,76 @@ cmp_deeply( ); +my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); +$mech->get_ok( '/' ); +$mech->session->user({ userId => 3 }); + +# Get to the management screen +$mech->get_ok( '?shop=ship;method=manage' ); + +# Click the Add Shipping button +$mech->form_with_fields( 'className', 'add' ); +$mech->select( 'className' => 'WebGUI::Shop::ShipDriver::FlatRate' ); +$mech->click_ok( 'add' ); + +# Fill in the form +$mech->submit_form_ok({ + fields => { + label => 'Blue Box', + enabled => 1, + flatFee => 5.00, + }, + }, + "add a new driver", +); + +# Shipping method added! +$mech->content_contains( 'Blue Box', 'new shipping label shows up in manage screen' ); + +# Find our new shipping driver +my $shipdriverId; +for my $row ( @{ $session->db->buildArrayRefOfHashRefs( 'SELECT * FROM shipper' ) } ) { + my $options = JSON->new->decode( $row->{options} ); + if ( $options->{label} eq 'Blue Box' ) { + $shipdriverId = $row->{shipperId}; + } +} +ok( my $shipdriver = WebGUI::Shop::ShipDriver::FlatRate->new( $mech->session, $shipdriverId ), 'shipdriver can be instanced' ); +WebGUI::Test::addToCleanup( $shipdriver ); +is( $shipdriver->label, 'Blue Box', 'label set correctly' ); +ok( $shipdriver->enabled, 'driver is enabled' ); +is( $shipdriver->flatFee, 5.00, 'flat fee added correctly' ); + +# Edit an existing ShipDriver +# Find the right form and click the Edit button +my $formNumber = 1; +for my $form ( $mech->forms ) { + if ( $form->value( 'do' ) eq 'edit' && $form->value( 'driverId' ) eq $shipdriverId ) { + last; + } + $formNumber++; +} +$mech->submit_form_ok({ + form_number => $formNumber, + }, 'click edit button', +); + +# Fill in the form +$mech->submit_form_ok({ + fields => { + label => "Brown Box", + } + }, + "edit shipping method", +); + +# Shipping method edited! +$mech->content_contains( 'Brown Box', 'new label shows up in manage screen' ); +ok( my $shipdriver = WebGUI::Shop::ShipDriver::FlatRate->new( $mech->session, $shipdriverId ), 'shipdriver can be instanced' ); +is( $shipdriver->label, 'Brown Box', 'label set correctly' ); +ok( $shipdriver->enabled, 'driver is enabled' ); +is( $shipdriver->flatFee, 5.00, 'flat fee still only $5' ); + ####################################################################### # # new @@ -286,28 +269,6 @@ cmp_deeply( my $oldDriver; -eval { $oldDriver = WebGUI::Shop::ShipDriver->new(); }; -$e = Exception::Class->caught(); -isa_ok($e, 'WebGUI::Error::InvalidParam', 'new takes exception to not giving it a session object'); -cmp_deeply( - $e, - methods( - error => 'Must provide a session variable', - ), - 'new takes exception to not giving it a session object', -); - -eval { $oldDriver = WebGUI::Shop::ShipDriver->new($session); }; -$e = Exception::Class->caught(); -isa_ok($e, 'WebGUI::Error::InvalidParam', 'new takes exception to not giving it a shipperId'); -cmp_deeply( - $e, - methods( - error => 'Must provide a shipperId', - ), - 'new takes exception to not giving it a shipperId', -); - eval { $oldDriver = WebGUI::Shop::ShipDriver->new($session, 'notEverAnId'); }; $e = Exception::Class->caught(); isa_ok($e, 'WebGUI::Error::ObjectNotFound', 'new croaks unless the requested shipperId object exists in the db'); @@ -341,17 +302,6 @@ like ($@, qr/^You must override the calculate method/, 'calculate croaks to forc # ####################################################################### -eval { $driver->update(); }; -$e = Exception::Class->caught(); -isa_ok($e, 'WebGUI::Error::InvalidParam', 'update takes exception to not giving it a hashref of options'); -cmp_deeply( - $e, - methods( - error => 'update was not sent a hashref of options to store in the database', - ), - 'update takes exception to not giving it a hashref of options', -); - isa_ok( $driver->get(), 'HASH', 'get returns a hashref if called with no param'); is($driver->get('groupToUse'), 7, '... default group is 7'); diff --git a/t/Shop/ShipDriver/FlatRate.t b/t/Shop/ShipDriver/FlatRate.t index 082a7eaef..0249e2bd5 100644 --- a/t/Shop/ShipDriver/FlatRate.t +++ b/t/Shop/ShipDriver/FlatRate.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use Test::More; use Test::Deep; use JSON; @@ -31,101 +29,12 @@ my $session = WebGUI::Test->session; #---------------------------------------------------------------------------- # Tests -my $tests = 19; -plan tests => 1 + $tests; +plan tests => 17; #---------------------------------------------------------------------------- # put your tests here -my $loaded = use_ok('WebGUI::Shop::ShipDriver::FlatRate'); - -my $storage; -my ($driver, $cart, $car, $key); -my $versionTag; - -SKIP: { - -skip 'Unable to load module WebGUI::Shop::ShipDriver::FlatRate', $tests unless $loaded; - -####################################################################### -# -# definition -# -####################################################################### - -my $definition; -my $e; ##Exception variable, used throughout the file - -eval { $definition = WebGUI::Shop::ShipDriver::FlatRate->definition(); }; -$e = Exception::Class->caught(); -isa_ok($e, 'WebGUI::Error::InvalidParam', 'definition takes an exception to not giving it a session variable'); -cmp_deeply( - $e, - methods( - error => 'Must provide a session variable', - ), - 'definition: requires a session variable', -); - - -$definition = WebGUI::Shop::ShipDriver::FlatRate->definition($session); - -cmp_deeply( - $definition, - [ { - name => 'Flat Rate', - properties => { - flatFee => { - fieldType => 'float', - label => ignore(), - hoverHelp => ignore(), - defaultValue => 0, - }, - percentageOfPrice => { - fieldType => 'float', - label => ignore(), - hoverHelp => ignore(), - defaultValue => 0, - }, - pricePerWeight => { - fieldType => 'float', - label => ignore(), - hoverHelp => ignore(), - defaultValue => 0, - }, - pricePerItem => { - fieldType => 'float', - label => ignore(), - hoverHelp => ignore(), - defaultValue => 0, - }, - } - }, - { - name => 'Shipper Driver', - properties => { - label => { - fieldType => 'text', - label => ignore(), - hoverHelp => ignore(), - defaultValue => undef, - }, - enabled => { - fieldType => 'yesNo', - label => ignore(), - hoverHelp => ignore(), - defaultValue => 1, - }, - groupToUse => { - fieldType => 'group', - label => ignore(), - hoverHelp => ignore(), - defaultValue => 7, - }, - } - } ], - 'Definition returns an array of hashrefs', -); +use_ok('WebGUI::Shop::ShipDriver::FlatRate'); ####################################################################### # @@ -142,11 +51,13 @@ my $options = { pricePerItem => 0.1, }; -$driver = WebGUI::Shop::ShipDriver::FlatRate->create($session, $options); +my $driver2 = WebGUI::Shop::ShipDriver::FlatRate->new($session, $options); +$driver2->write; +WebGUI::Test->addToCleanup($driver2); -isa_ok($driver, 'WebGUI::Shop::ShipDriver::FlatRate'); +isa_ok($driver2, 'WebGUI::Shop::ShipDriver::FlatRate'); -isa_ok($driver, 'WebGUI::Shop::ShipDriver'); +isa_ok($driver2, 'WebGUI::Shop::ShipDriver'); ####################################################################### # @@ -162,18 +73,18 @@ is (WebGUI::Shop::ShipDriver::FlatRate->getName($session), 'Flat Rate', 'getName # ####################################################################### -my $form = $driver->getEditForm; +my $form = $driver2->getEditForm; -isa_ok($form, 'WebGUI::HTMLForm', 'getEditForm returns an HTMLForm object'); +isa_ok($form, 'WebGUI::FormBuilder', 'getEditForm returns an HTMLForm object'); -my $html = $form->print; +my $html = $form->toHtml; ##Any URL is fine, really my @forms = HTML::Form->parse($html, 'http://www.webgui.org'); is (scalar @forms, 1, 'getEditForm generates just 1 form'); my @inputs = $forms[0]->inputs; -is (scalar @inputs, 14, 'getEditForm: the form has 14 controls'); +is (scalar @inputs, 13, 'getEditForm: the form has 13 controls'); my @interestingFeatures; foreach my $input (@inputs) { @@ -186,17 +97,9 @@ cmp_deeply( \@interestingFeatures, [ { - name => 'webguiCsrfToken', - type => 'hidden', - }, - { - name => undef, + name => "send", type => 'submit', }, - { - name => 'driverId', - type => 'hidden', - }, { name => 'shop', type => 'hidden', @@ -209,6 +112,10 @@ cmp_deeply( name => 'do', type => 'hidden', }, + { + name => 'driverId', + type => 'hidden', + }, { name => 'label', type => 'text', @@ -252,13 +159,13 @@ cmp_deeply( # ####################################################################### -my $driverId = $driver->getId; -$driver->delete; +my $driverId = $driver2->getId; +$driver2->delete; my $count = $session->db->quickScalar('select count(*) from shipper where shipperId=?',[$driverId]); is($count, 0, 'delete deleted the object'); -undef $driver; +undef $driver2; ####################################################################### # @@ -266,7 +173,7 @@ undef $driver; # ####################################################################### -$car = WebGUI::Asset->getImportNode($session)->addChild({ +my $car = WebGUI::Test->asset->addChild({ className => 'WebGUI::Asset::Sku::Product', title => 'Automobiles', isShippingRequired => 1, @@ -298,13 +205,10 @@ my $reallyNiceCar = $car->setCollateral('variantsJSON', 'variantId', 'new', varSku => 'nice-car', price => 90_000, weight => 3000, - quantity => 3, + quantity => 4, } ); -$versionTag = WebGUI::VersionTag->getWorking($session); -$versionTag->commit; - $options = { label => 'flat rate, ship weight', enabled => 1, @@ -314,9 +218,11 @@ $options = { pricePerItem => 10, }; -$driver = WebGUI::Shop::ShipDriver::FlatRate->create($session, $options); +my $driver = WebGUI::Shop::ShipDriver::FlatRate->new($session, $options); +WebGUI::Test->addToCleanup($driver); -$cart = WebGUI::Shop::Cart->newBySession($session); +my $cart = WebGUI::Shop::Cart->newBySession($session); +WebGUI::Test->addToCleanup($cart); $car->addToCart($car->getCollateral('variantsJSON', 'variantId', $crappyCar)); is($driver->calculate($cart), 1511, 'calculate by weight, perItem and flat fee work'); @@ -345,7 +251,7 @@ $driver->update({ pricePerItem => 0, }); -$key = WebGUI::Asset->getImportNode($session)->addChild({ +my $key = WebGUI::Test->asset->addChild({ className => 'WebGUI::Asset::Sku::Product', title => 'Key', isShippingRequired => 1, @@ -388,25 +294,3 @@ is($driver->calculate($cart), 1, '... returns one, since all can be bundled toge $car->update({shipsSeparately => 1}); $key->update({shipsSeparately => 1}); is($driver->calculate($cart), 4, '... returns four, since all must be shipped separately now'); - -} - -#---------------------------------------------------------------------------- -# Cleanup -END { - if (defined $driver && ref $driver eq 'WebGUI::Shop::ShipDriver::FlatRate') { - $driver->delete; - } - if (defined $cart && ref $cart eq 'WebGUI::Shop::Cart') { - $cart->delete; - } - if (defined $car && (ref($car) eq 'WebGUI::Asset::Sku::Product')) { - $car->purge; - } - if (defined $key && (ref($key) eq 'WebGUI::Asset::Sku::Product')) { - $key->purge; - } - if (defined $versionTag) { - $versionTag->rollback; - } -} diff --git a/t/Shop/ShipDriver/UPS.t b/t/Shop/ShipDriver/UPS.t index ccc95c8ca..b537e11bb 100644 --- a/t/Shop/ShipDriver/UPS.t +++ b/t/Shop/ShipDriver/UPS.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use Test::More; use Test::Deep; use XML::Simple; @@ -39,16 +37,14 @@ $session->user({user => $user}); #---------------------------------------------------------------------------- # Tests -plan tests => 41; +plan tests => 38; #---------------------------------------------------------------------------- # put your tests here my $storage; my ($driver); -my $versionTag = WebGUI::VersionTag->getWorking($session); - -my $home = WebGUI::Asset->getDefault($session); +my $home = WebGUI::Test->asset; my $rockHammer = $home->addChild({ className => 'WebGUI::Asset::Sku::Product', @@ -108,36 +104,6 @@ my $blueFeather = $feather->setCollateral('variantsJSON', 'variantId', 'new', } ); -$versionTag->commit; -addToCleanup($versionTag); - -####################################################################### -# -# definition -# -####################################################################### - -my $definition; -my $e; ##Exception variable, used throughout the file - -eval { $definition = WebGUI::Shop::ShipDriver::UPS->definition(); }; -$e = Exception::Class->caught(); -isa_ok($e, 'WebGUI::Error::InvalidParam', 'definition takes an exception to not giving it a session variable'); -cmp_deeply( - $e, - methods( - error => 'Must provide a session variable', - ), - '... checking error message', -); - - -isa_ok( - $definition = WebGUI::Shop::ShipDriver::UPS->definition($session), - 'ARRAY' -); - - ####################################################################### # # create @@ -149,7 +115,7 @@ my $options = { enabled => 1, }; -$driver = WebGUI::Shop::ShipDriver::UPS->create($session, $options); +$driver = WebGUI::Shop::ShipDriver::UPS->new($session, $options); isa_ok($driver, 'WebGUI::Shop::ShipDriver::UPS'); isa_ok($driver, 'WebGUI::Shop::ShipDriver'); @@ -182,12 +148,14 @@ undef $driver; # ####################################################################### -$driver = WebGUI::Shop::ShipDriver::UPS->create($session, { +my $e; + +$driver = WebGUI::Shop::ShipDriver::UPS->new($session, { label => 'Shipping from Shawshank', enabled => 1, shipType => 'PARCEL', }); -addToCleanup($driver); +WebGUI::Test->addToCleanup($driver); eval { $driver->calculate() }; $e = Exception::Class->caught(); @@ -200,9 +168,8 @@ cmp_deeply( '... checking error message', ); -my $properties = $driver->get(); -$properties->{sourceZip} = '97123'; -$driver->update($properties); +$driver->sourceZip(97123); +$driver->sourceCountry(''); eval { $driver->calculate() }; $e = Exception::Class->caught(); isa_ok($e, 'WebGUI::Error::InvalidParam', 'calculate throws an exception when no source country'); @@ -214,9 +181,7 @@ cmp_deeply( '... checking error message', ); -$properties = $driver->get(); -$properties->{sourceCountry} = 'United States'; -$driver->update($properties); +$driver->sourceCountry('US'); eval { $driver->calculate() }; $e = WebGUI::Error->caught(); isa_ok($e, 'WebGUI::Error::InvalidParam', 'calculate throws an exception when no userId'); @@ -228,9 +193,7 @@ cmp_deeply( '... checking error message', ); -$properties = $driver->get(); -$properties->{userId} = 'Me'; -$driver->update($properties); +$driver->userId('Me'); eval { $driver->calculate() }; $e = Exception::Class->caught(); isa_ok($e, 'WebGUI::Error::InvalidParam', 'calculate throws an exception when no password'); @@ -242,9 +205,7 @@ cmp_deeply( '... checking error message', ); -$properties = $driver->get(); -$properties->{password} = 'knock knock'; -$driver->update($properties); +$driver->password('knock knock'); eval { $driver->calculate() }; $e = Exception::Class->caught(); isa_ok($e, 'WebGUI::Error::InvalidParam', 'calculate throws an exception when no license number'); @@ -257,7 +218,7 @@ cmp_deeply( ); my $cart = WebGUI::Shop::Cart->newBySession($session); -addToCleanup($cart); +WebGUI::Test->addToCleanup($cart); my $addressBook = $cart->getAddressBook; my $workAddress = $addressBook->addAddress({ label => 'work', @@ -352,19 +313,17 @@ if (! $license) { $license = "bogey"; } -$properties = $driver->get(); -$properties->{userId} = $userId; -$properties->{password} = $password; -$properties->{licenseNo} = $license; -$properties->{sourceZip} = '97123'; -$properties->{sourceCountry} = 'United States'; -$properties->{shipService} = '03'; -$properties->{pickupType} = '01'; -$properties->{customerClassification} = '04'; -$properties->{residentialIndicator} = 'residential'; -$driver->update($properties); +$driver->userId($userId); +$driver->password($password); +$driver->licenseNo($license); +$driver->sourceZip('97123'); +$driver->sourceCountry('United States'); +$driver->shipService('03'); +$driver->pickupType('01'); +$driver->customerClassification('04'); +$driver->residentialIndicator('residential'); -$driver->testMode(1); +#$driver->testMode(1); my $rockItem = $rockHammer->addToCart($rockHammer->getCollateral('variantsJSON', 'variantId', $smallHammer)); my @shippableUnits = $driver->_getShippableUnits($cart); diff --git a/t/Shop/ShipDriver/USPS.t b/t/Shop/ShipDriver/USPS.t index cbc1034ba..9335e0b8a 100644 --- a/t/Shop/ShipDriver/USPS.t +++ b/t/Shop/ShipDriver/USPS.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use Test::More; use Test::Deep; use XML::Simple; @@ -25,7 +23,7 @@ use WebGUI::Test; # Must use this before any other WebGUI modules use WebGUI::Session; use WebGUI::Shop::ShipDriver::USPS; -plan tests => 69; +plan tests => 66; #---------------------------------------------------------------------------- # Init @@ -51,9 +49,7 @@ my $insuranceTable = <<EOTABLE; 30:6.00 EOTABLE -my $versionTag = WebGUI::VersionTag->getWorking($session); - -my $home = WebGUI::Asset->getDefault($session); +my $home = WebGUI::Test->asset; my $rockHammer = $home->addChild({ className => 'WebGUI::Asset::Sku::Product', @@ -107,39 +103,9 @@ my $gospels = $bible->setCollateral('variantsJSON', 'variantId', 'new', } ); -$versionTag->commit; -addToCleanup($versionTag); - ####################################################################### # -# definition -# -####################################################################### - -my $definition; -my $e; ##Exception variable, used throughout the file - -eval { $definition = WebGUI::Shop::ShipDriver::USPS->definition(); }; -$e = Exception::Class->caught(); -isa_ok($e, 'WebGUI::Error::InvalidParam', 'definition takes an exception to not giving it a session variable'); -cmp_deeply( - $e, - methods( - error => 'Must provide a session variable', - ), - '... checking error message', -); - - -isa_ok( - $definition = WebGUI::Shop::ShipDriver::USPS->definition($session), - 'ARRAY' -); - - -####################################################################### -# -# create +# new # ####################################################################### @@ -148,8 +114,8 @@ my $options = { enabled => 1, }; -$driver2 = WebGUI::Shop::ShipDriver::USPS->create($session, $options); -addToCleanup($driver2); +$driver2 = WebGUI::Shop::ShipDriver::USPS->new($session, $options); +WebGUI::Test->addToCleanup($driver2); isa_ok($driver2, 'WebGUI::Shop::ShipDriver::USPS'); isa_ok($driver2, 'WebGUI::Shop::ShipDriver'); @@ -160,7 +126,7 @@ isa_ok($driver2, 'WebGUI::Shop::ShipDriver'); # ####################################################################### -is (WebGUI::Shop::ShipDriver::USPS->getName($session), 'U.S. Postal Service', 'getName returns the human readable name of this driver'); +is (WebGUI::Shop::ShipDriver::USPS->getName($session), 'United States Postal Service', 'getName returns the human readable name of this driver'); ####################################################################### # @@ -182,13 +148,14 @@ undef $driver2; # ####################################################################### -my $driver = WebGUI::Shop::ShipDriver::USPS->create($session, { +my $driver = WebGUI::Shop::ShipDriver::USPS->new($session, { label => 'Shipping from Shawshank', enabled => 1, shipType => 'PARCEL', }); -addToCleanup($driver); +WebGUI::Test->addToCleanup($driver); +my $e; eval { $driver->calculate() }; $e = Exception::Class->caught(); isa_ok($e, 'WebGUI::Error::InvalidParam', 'calculate throws an exception when no zipcode has been set'); @@ -216,7 +183,7 @@ cmp_deeply( ); $cart = WebGUI::Shop::Cart->newBySession($session); -addToCleanup($cart); +WebGUI::Test->addToCleanup($cart); my $addressBook = $cart->getAddressBook; my $workAddress = $addressBook->addAddress({ label => 'work', diff --git a/t/Shop/ShipDriver/USPSInternational.t b/t/Shop/ShipDriver/USPSInternational.t index 06f1fc07b..bf741de01 100644 --- a/t/Shop/ShipDriver/USPSInternational.t +++ b/t/Shop/ShipDriver/USPSInternational.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use Test::More; use Test::Deep; use XML::Simple; @@ -25,7 +23,7 @@ use WebGUI::Test; # Must use this before any other WebGUI modules use WebGUI::Session; use WebGUI::Shop::ShipDriver::USPSInternational; -plan tests => 40; +plan tests => 37; #---------------------------------------------------------------------------- # Init @@ -43,9 +41,7 @@ $session->user({user => $user}); my ($driver2, $cart); -my $versionTag = WebGUI::VersionTag->getWorking($session); - -my $home = WebGUI::Asset->getDefault($session); +my $home = WebGUI::Test->asset; my $rockHammer = $home->addChild({ className => 'WebGUI::Asset::Sku::Product', @@ -107,36 +103,6 @@ my $singlePage = $bible->setCollateral('variantsJSON', 'variantId', 'new', } ); -$versionTag->commit; -addToCleanup($versionTag); - -####################################################################### -# -# definition -# -####################################################################### - -my $definition; -my $e; ##Exception variable, used throughout the file - -eval { $definition = WebGUI::Shop::ShipDriver::USPSInternational->definition(); }; -$e = Exception::Class->caught(); -isa_ok($e, 'WebGUI::Error::InvalidParam', 'definition takes an exception to not giving it a session variable'); -cmp_deeply( - $e, - methods( - error => 'Must provide a session variable', - ), - '... checking error message', -); - - -isa_ok( - $definition = WebGUI::Shop::ShipDriver::USPSInternational->definition($session), - 'ARRAY' -); - - ####################################################################### # # create @@ -148,8 +114,8 @@ my $options = { enabled => 1, }; -$driver2 = WebGUI::Shop::ShipDriver::USPSInternational->create($session, $options); -addToCleanup($driver2); +$driver2 = WebGUI::Shop::ShipDriver::USPSInternational->new($session, $options); +WebGUI::Test->addToCleanup($driver2); isa_ok($driver2, 'WebGUI::Shop::ShipDriver::USPSInternational'); isa_ok($driver2, 'WebGUI::Shop::ShipDriver'); @@ -182,12 +148,13 @@ undef $driver2; # ####################################################################### -my $driver = WebGUI::Shop::ShipDriver::USPSInternational->create($session, { +my $driver = WebGUI::Shop::ShipDriver::USPSInternational->new($session, { label => 'Shipping from Shawshank', enabled => 1, }); -addToCleanup($driver); +WebGUI::Test->addToCleanup($driver); +my $e; eval { $driver->calculate() }; $e = Exception::Class->caught(); isa_ok($e, 'WebGUI::Error::InvalidParam', 'calculate throws an exception when no userId'); @@ -200,7 +167,7 @@ cmp_deeply( ); $cart = WebGUI::Shop::Cart->newBySession($session); -addToCleanup($cart); +WebGUI::Test->addToCleanup($cart); my $addressBook = $cart->getAddressBook; my $workAddress = $addressBook->addAddress({ label => 'work', diff --git a/t/Shop/Tax.t b/t/Shop/Tax.t index e5f1494b0..fda9896d6 100644 --- a/t/Shop/Tax.t +++ b/t/Shop/Tax.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,10 +13,9 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use Test::More; +use Test::Exception; use WebGUI::Test; # Must use this before any other WebGUI modules use WebGUI::Session; @@ -28,7 +27,7 @@ my $session = WebGUI::Test->session; #---------------------------------------------------------------------------- # Tests -my $tests = 10; +my $tests = 9; plan tests => $tests + 1; # Add initial use_ok test @@ -45,11 +44,7 @@ SKIP: { # ####################################################################### - eval { my $tax = WebGUI::Shop::Tax->new( ) }; - - my $e = Exception::Class->caught(); - isa_ok( $e, 'WebGUI::Error::InvalidParam', 'new: throws error when no session object is passed' ); - is( $e->error, 'Need a session.', 'add: correct message for ommitted session object' ); + dies_ok { my $tax = WebGUI::Shop::Tax->new( ) } 'new: throws error when no session object is passed'; my $tax = WebGUI::Shop::Tax->new( $session ); diff --git a/t/Shop/TaxDriver/EU.t b/t/Shop/TaxDriver/EU.t index 8ac141717..d90c82d22 100644 --- a/t/Shop/TaxDriver/EU.t +++ b/t/Shop/TaxDriver/EU.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use Test::More; use Test::Deep; use Test::MockObject::Extends; @@ -36,8 +34,8 @@ my $session = WebGUI::Test->session; # Test user my $taxUser = WebGUI::User->new( $session, 'new' ); $taxUser->username( 'Tex Evasion' ); -$session->user({userId => $taxUser->getId}); WebGUI::Test->addToCleanup($taxUser); +$session->user({userId => $taxUser->getId}); # Test VAT numbers my $testVAT_NL = 'NL123456789B12'; @@ -233,8 +231,9 @@ plan tests => $tests; 'addVATNumber returns the correct message when VIES is unavailable', ); - my $workflows = WebGUI::Workflow::Instance->getAllInstances( $session ); - my ($workflow) = grep { $_->get('parameters')->{ vatNumber } eq $noServiceVAT } @{ $workflows }; + my ($workflow) = grep { $_->get('parameters')->{ vatNumber } eq $noServiceVAT } + grep { ref $_->get('parameters') eq 'HASH' } + @{ WebGUI::Workflow::Instance->getAllInstances( $session ) }; ok( defined $workflow , 'addVATNumber fires a recheck workflow when VIES is down' ); #----- valid number diff --git a/t/Shop/TaxDriver/Generic.t b/t/Shop/TaxDriver/Generic.t index b280c4d26..34b9ebd42 100644 --- a/t/Shop/TaxDriver/Generic.t +++ b/t/Shop/TaxDriver/Generic.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use Test::More; use Test::Deep; use Exception::Class; @@ -38,16 +36,13 @@ $session->user({userId => 3}); my $addExceptions = getAddExceptions($session); -my $tests = 80 + 2*scalar(@{$addExceptions}); -plan tests => $tests; - -#WebGUI::Test->addToCleanup(SQL => 'delete from tax_generic_rates'); +WebGUI::Test->addToCleanup(SQL => 'delete from tax_generic_rates'); #---------------------------------------------------------------------------- # put your tests here -my ($taxableDonation, $taxFreeDonation); +my $storage; ####################################################################### # @@ -71,7 +66,7 @@ is($session->getId, $taxer->session->getId, 'session method returns OUR session my $taxIterator = $taxer->getItems; -isa_ok($taxIterator, 'WebGUI::SQL::ResultSet'); +isa_ok($taxIterator, 'WebGUI::SQL::st'); is($taxIterator->rows, 0, 'WebGUI ships with no predefined tax data'); @@ -534,23 +529,23 @@ cmp_deeply( 'importTaxData: error handling for file that does not exist in the filesystem', ); -cmp_deeply( +cmp_bag( $taxer->getTaxRates($taxingAddress), [0, 5, 0.5], 'getTaxRates: return correct data for a state with tax data' -); +) or diag Dumper $taxer->getTaxRates($taxingAddress); -cmp_deeply( +cmp_bag( $taxer->getTaxRates($taxFreeAddress), [0,0], 'getTaxRates: return correct data for a state with no tax data' -); +) or diag Dumper $taxer->getTaxRates($taxFreeAddress); -cmp_deeply( +cmp_bag( $taxer->getTaxRates($alternateAddress), [0.0, 8.25], #Hits USA and Los Angeles, California using the alternate spelling of the state 'getTaxRates: return correct data for a state when the address has alternations' -); +) or diag Dumper $taxer->getTaxRates($alternateAddress); my $capitalized = $taxer->add({ country => 'USA', @@ -558,11 +553,11 @@ my $capitalized = $taxer->add({ taxRate => '50', }); -cmp_deeply( +cmp_bag( $taxer->getTaxRates($taxingAddress), [0, 5, 0.5], '... multiple entries with different capitalization, first matches' -); +) or diag Dumper $taxer->getTaxRates($taxingAddress); $taxer->delete({ taxId => $capitalized }); @@ -591,60 +586,41 @@ $taxer->importTaxData( WebGUI::Test->getTestCollateralPath('taxTables/largeTaxTable.csv') ), -$taxableDonation = WebGUI::Asset->getRoot($session)->addChild({ +my $taxableDonation = WebGUI::Asset->getRoot($session)->addChild({ className => 'WebGUI::Asset::Sku::Donation', title => 'Taxable donation', defaultPrice => 100.00, }); -WebGUI::Test->addToCleanup($taxableDonation); + +my $tag1 = WebGUI::VersionTag->getWorking($session); +$tag1->commit; +WebGUI::Test->addToCleanup($tag1); +$taxableDonation = $taxableDonation->cloneFromDb; is($taxer->getTaxRate($taxableDonation), 0, 'calculate returns 0 if there is no shippingAddressId in the cart'); - -# $cart->addItem($taxableDonation); - -# foreach my $item (@{ $cart->getItems }) { -# $item->setQuantity(1); -# } - my $tax = $taxer->getTaxRate( $taxableDonation, $taxingAddress ); is($tax, 5.5, 'calculate: simple tax calculation on 1 item in the cart'); $cart->update({ shippingAddressId => $taxFreeAddress->getId}); is($taxer->getTaxRate( $taxableDonation, $taxFreeAddress ), 0, 'calculate: simple tax calculation on 1 item in the cart, tax free location'); -# foreach my $item (@{ $cart->getItems }) { -# $item->setQuantity(2); -# } -# -# $cart->update({ shippingAddressId => $taxingAddress->getId}); -# is($taxer->calculate($cart), 11, 'calculate: simple tax calculation on 1 item in the cart, qty 2'); - -$taxFreeDonation = WebGUI::Asset->getRoot($session)->addChild({ +my $taxFreeDonation = WebGUI::Asset->getRoot($session)->addChild({ className => 'WebGUI::Asset::Sku::Donation', title => 'Tax Free Donation', defaultPrice => 100.00, }); -WebGUI::Test->addToCleanup($taxFreeDonation); -$taxFreeDonation->setTaxConfiguration( 'WebGUI::Shop::TaxDriver::Generic', { - overrideTaxRate => 1, - taxRateOverride => 0, -}); -# $cart->addItem($taxFreeDonation); +my $tag2 = WebGUI::VersionTag->getWorking($session); +$tag2->commit; +WebGUI::Test->addToCleanup($tag2); +$taxFreeDonation = $taxFreeDonation->cloneFromDb; -# foreach my $item (@{ $cart->getItems }) { -# $item->setQuantity(1); -# } -is($taxer->getTaxRate( $taxFreeDonation, $taxingAddress), 0, 'getTaxRate: tax rate override should override tax derived from address'); +my $tax = $taxer->getTaxRate( $taxableDonation, $taxingAddress ); +is($tax, 5.5, 'calculate: simple tax calculation on 1 item in the cart'); -# my $remoteItem = $cart->addItem($taxableDonation); -# $remoteItem->update({shippingAddressId => $taxFreeAddress->getId}); -# -# foreach my $item (@{ $cart->getItems }) { -# $item->setQuantity(1); -# } -# is($taxer->calculate($cart), 5.5, 'calculate: simple tax calculation on 2 items in the cart, 1 without taxes, 1 shipped to a location with no taxes'); +$cart->update({ shippingAddressId => $taxFreeAddress->getId}); +is($taxer->getTaxRate( $taxableDonation, $taxFreeAddress ), 0, 'calculate: simple tax calculation on 1 item in the cart, tax free location'); ####################################################################### # @@ -655,7 +631,7 @@ is($taxer->getTaxRate( $taxFreeDonation, $taxingAddress), 0, 'getTaxRate: tax ra $session->user({userId=>3}); my $json = $taxer->www_getTaxesAsJson(); ok($json, 'www_getTaxesAsJson returned something'); -is($session->http->getMimeType, 'application/json', 'MIME type set to application/json'); +is($session->response->content_type, 'application/json', 'MIME type set to application/json'); my $jsonTax = JSON::from_json($json); cmp_deeply( $jsonTax, @@ -685,6 +661,11 @@ TODO: { ok(0, 'test keywords'); } +$cart->delete; +$book->delete; +$taxableDonation->purge; +$taxFreeDonation->purge; + sub getAddExceptions { my $session = shift; my $inputValidion = [ @@ -720,4 +701,6 @@ sub getAddExceptions { }, ]; } + +done_testing; #vim:ft=perl diff --git a/t/Shop/Transaction.t b/t/Shop/Transaction.t index df672392c..3ffe44180 100644 --- a/t/Shop/Transaction.t +++ b/t/Shop/Transaction.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,13 +13,12 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use Test::More; use Test::Deep; use Test::LongString; use WebGUI::Test; # Must use this before any other WebGUI modules +use WebGUI::Test::MockAsset; use WebGUI::Session; use WebGUI::Shop::Transaction; use WebGUI::Inbox; @@ -38,38 +37,38 @@ plan tests => 83; # Increment this number for each test you create #---------------------------------------------------------------------------- # put your tests here -my $transaction = WebGUI::Shop::Transaction->create($session,{ - amount => 40, - shippingAddressId => 'xxx1', - shippingAddressName => 'abc', +my $transaction = WebGUI::Shop::Transaction->new($session,{ + amount => 40, + shippingAddressId => 'xxx1', shippingOrganization => 'Ship To Us', - shippingAddress1 => 'def', - shippingAddress2 => 'hij', - shippingAddress3 => 'lmn', - shippingCity => 'opq', - shippingState => 'wxy', - shippingCountry => 'z', - shippingCode => '53333', - shippingPhoneNumber => '123456', - shippingDriverId => 'xxx2', - shippingDriverLabel => 'foo', - shippingPrice => 5, - paymentAddressId => 'xxx3', - paymentAddressName => 'abc1', + shippingAddressName => 'abc', + shippingAddress1 => 'def', + shippingAddress2 => 'hij', + shippingAddress3 => 'lmn', + shippingCity => 'opq', + shippingState => 'wxy', + shippingCountry => 'z', + shippingCode => '53333', + shippingPhoneNumber => '123456', + shippingDriverId => 'xxx2', + shippingDriverLabel => 'foo', + shippingPrice => 5, + paymentAddressId => 'xxx3', + paymentAddressName => 'abc1', paymentOrganization => 'Pay To Us', - paymentAddress1 => 'def1', - paymentAddress2 => 'hij1', - paymentAddress3 => 'lmn1', - paymentCity => 'opq1', - paymentState => 'wxy1', - paymentCountry => 'z1', - paymentCode => '66666', - paymentPhoneNumber => '908765', - paymentDriverId => 'xxx4', - paymentDriverLabel => 'kkk', - taxes => 7, + paymentAddress1 => 'def1', + paymentAddress2 => 'hij1', + paymentAddress3 => 'lmn1', + paymentCity => 'opq1', + paymentState => 'wxy1', + paymentCountry => 'z1', + paymentCode => '66666', + paymentPhoneNumber => '908765', + paymentDriverId => 'xxx4', + paymentDriverLabel => 'kkk', + taxes => 7, }); -addToCleanup($transaction); +WebGUI::Test->addToCleanup($transaction); # objects work isa_ok($transaction, "WebGUI::Shop::Transaction"); @@ -77,36 +76,35 @@ isa_ok($transaction->session, "WebGUI::Session"); # basic transaction properties -is($transaction->get("amount"), 40, "set and get amount"); -is($transaction->get("shippingAddressId"), 'xxx1', "set and get shipping address id"); -is($transaction->get("shippingOrganization"), 'Ship To Us', "set and get shipping organization"); -is($transaction->get("shippingAddressName"), 'abc', "set and get shipping address name"); -is($transaction->get("shippingAddress1"), 'def', "set and get shipping address 1"); -is($transaction->get("shippingAddress2"), 'hij', "set and get shipping address 2"); -is($transaction->get("shippingAddress3"), 'lmn', "set and get shipping address 3"); -is($transaction->get("shippingCity"), 'opq', "set and get shipping city"); -is($transaction->get("shippingState"), 'wxy', "set and get shipping state"); -is($transaction->get("shippingCountry"), 'z', "set and get shipping country"); -is($transaction->get("shippingCode"), '53333', "set and get shipping code"); -is($transaction->get("shippingPhoneNumber"), '123456', "set and get shipping phone number"); -is($transaction->get("shippingDriverId"), 'xxx2', "set and get shipping driver id"); -is($transaction->get("shippingDriverLabel"), 'foo', "set and get shipping driver label"); -is($transaction->get("shippingPrice"), 5, "set and get shipping price"); -is($transaction->get("paymentAddressId"), 'xxx3', "set and get payment address id"); -is($transaction->get("paymentAddressName"), 'abc1', "set and get payment address name"); -is($transaction->get("paymentOrganization"), 'Pay To Us', "set and get payment organization"); -is($transaction->get("paymentAddress1"), 'def1', "set and get payment address 1"); -is($transaction->get("paymentAddress2"), 'hij1', "set and get payment address 2"); -is($transaction->get("paymentAddress3"), 'lmn1', "set and get payment address 3"); -is($transaction->get("paymentCity"), 'opq1', "set and get payment city"); -is($transaction->get("paymentState"), 'wxy1', "set and get payment state"); -is($transaction->get("paymentCountry"), 'z1', "set and get payment country"); -is($transaction->get("paymentCode"), '66666', "set and get payment code"); -is($transaction->get("paymentPhoneNumber"), '908765', "set and get payment phone number"); -is($transaction->get("paymentDriverId"), 'xxx4', "set and get payment driver id"); -is($transaction->get("paymentDriverLabel"), 'kkk', "set and get payment driver label"); -is($transaction->get("taxes"), 7, "set and get taxes"); - +is($transaction->amount, 40, "set and get amount"); +is($transaction->shippingAddressId, 'xxx1', "set and get shipping address id"); +is($transaction->shippingAddressName, 'abc', "set and get shipping address name"); +is($transaction->shippingOrganization, 'Ship To Us', "set and get shipping organization"); +is($transaction->shippingAddress1, 'def', "set and get shipping address 1"); +is($transaction->shippingAddress2, 'hij', "set and get shipping address 2"); +is($transaction->shippingAddress3, 'lmn', "set and get shipping address 3"); +is($transaction->shippingCity, 'opq', "set and get shipping city"); +is($transaction->shippingState, 'wxy', "set and get shipping state"); +is($transaction->shippingCountry, 'z', "set and get shipping country"); +is($transaction->shippingCode, '53333', "set and get shipping code"); +is($transaction->shippingPhoneNumber, '123456', "set and get shipping phone number"); +is($transaction->shippingDriverId, 'xxx2', "set and get shipping driver id"); +is($transaction->shippingDriverLabel, 'foo', "set and get shipping driver label"); +is($transaction->shippingPrice, 5, "set and get shipping price"); +is($transaction->paymentAddressId, 'xxx3', "set and get payment address id"); +is($transaction->paymentAddressName, 'abc1', "set and get payment address name"); +is($transaction->paymentOrganization, 'Pay To Us', "set and get payment organization"); +is($transaction->paymentAddress1, 'def1', "set and get payment address 1"); +is($transaction->paymentAddress2, 'hij1', "set and get payment address 2"); +is($transaction->paymentAddress3, 'lmn1', "set and get payment address 3"); +is($transaction->paymentCity, 'opq1', "set and get payment city"); +is($transaction->paymentState, 'wxy1', "set and get payment state"); +is($transaction->paymentCountry, 'z1', "set and get payment country"); +is($transaction->paymentCode, '66666', "set and get payment code"); +is($transaction->paymentPhoneNumber, '908765', "set and get payment phone number"); +is($transaction->paymentDriverId, 'xxx4', "set and get payment driver id"); +is($transaction->paymentDriverLabel, 'kkk', "set and get payment driver label"); +is($transaction->taxes, 7, "set and get taxes"); $transaction->update({ isSuccessful => 1, @@ -115,11 +113,11 @@ $transaction->update({ statusMessage => 'was a success', }); -is($transaction->get("isSuccessful"), 1,"update and get isSuccessful"); -is($transaction->get("transactionCode"), 'yyy',"update and get transaction code"); -is($transaction->get("statusCode"), 'jd31',"update and get status code"); -is($transaction->get("statusMessage"), 'was a success',"update and get status message"); -is($transaction->get('taxes'), 7, 'update does not modify things it was not sent'); +is($transaction->isSuccessful, 1,"update and get isSuccessful"); +is($transaction->transactionCode, 'yyy',"update and get transaction code"); +is($transaction->statusCode, 'jd31',"update and get status code"); +is($transaction->statusMessage, 'was a success',"update and get status message"); +is($transaction->taxes, 7, 'update does not modify things it was not sent'); # make sure new() works my $tcopy = WebGUI::Shop::Transaction->new($session, $transaction->getId); @@ -168,7 +166,7 @@ is($item->get("shippingPhoneNumber"), 'l', "set and get shipping phone number"); is($item->get("quantity"), 5, "set and get quantity"); is($item->get("price"), 33, "set and get price"); is($item->get('taxRate'), 19, 'set and get taxRate' ); -is($item->get('shippingOrganization'), 'organized', 'set and get shipping organization' ); +is($item->shippingOrganization, 'organized', 'set and get shipping organization' ); $item->update({ shippingTrackingNumber => 'adfs', @@ -199,7 +197,7 @@ is(scalar @{$transaction->getItems}, 0, "can delete items"); $session->user({userId=>3}); my $json = WebGUI::Shop::Transaction->www_getTransactionsAsJson($session); ok($json, 'www_getTransactionsAsJson returned something'); -is($session->http->getMimeType, 'application/json', 'MIME type set to application/json'); +is($session->response->content_type, 'application/json', 'MIME type set to application/json'); my $jsonTransactions = JSON::from_json($json); cmp_deeply( $jsonTransactions, @@ -245,13 +243,13 @@ my $shopGroup = WebGUI::Group->new($session, 'new'); my $shopAdmin = WebGUI::User->create($session); $shopUser->username('shopAdmin'); $shopGroup->addUsers([$shopAdmin->getId]); -addToCleanup($shopUser, $shopAdmin, $shopGroup); +WebGUI::Test->addToCleanup($shopUser, $shopAdmin, $shopGroup); $session->setting->set('shopSaleNotificationGroupId', $shopGroup->getId); $session->user({userId => $shopUser->getId}); -my $trans = WebGUI::Shop::Transaction->create($session, {}); +my $trans = WebGUI::Shop::Transaction->new($session, {}); ok($trans->can('sendNotifications'), 'sendNotifications: valid method for transactions'); -addToCleanup($trans); +WebGUI::Test->addToCleanup($trans); ##Disable sending email my $sendmock = Test::MockObject->new( {} ); @@ -265,9 +263,8 @@ $sendmock->fake_module('WebGUI::Mail::Send', #1234567890123456789012# my $templateId = 'SHOP_NOTIFICATION_____'; -my $templateMock = Test::MockObject->new({}); -$templateMock->set_isa('WebGUI::Asset::Template'); -$templateMock->set_always('getId', $templateId); +my $templateMock = WebGUI::Test::MockAsset->new('WebGUI::Asset::Template'); +$templateMock->mock_id($templateId); my @templateVars; $templateMock->mock('process', sub { push @templateVars, clone $_[1]; } ); @@ -275,7 +272,6 @@ $session->setting->set('shopReceiptEmailTemplateId', $templateId); { WebGUI::Test->addToCleanup(sub { WebGUI::Test->cleanupAdminInbox(); }); - WebGUI::Test->mockAssetId($templateId, $templateMock); $trans->sendNotifications; is(@templateVars, 2, '... called template->process twice'); my $inbox = WebGUI::Inbox->new($session); @@ -287,7 +283,6 @@ $session->setting->set('shopReceiptEmailTemplateId', $templateId); like($adminMessages->[0]->get('subject'), qr/^A sale has been made/, '... subject for admin email okay'); like($templateVars[0]->{viewDetailUrl}, qr/shop=transaction;method=viewMy;/, '... viewDetailUrl okay for user'); like($templateVars[1]->{viewDetailUrl}, qr/shop=transaction;method=view;/ , '... viewDetailUrl okay for admin'); - WebGUI::Test->unmockAssetId($templateId); } ####################################################################### diff --git a/t/Shop/TransactionItem.t b/t/Shop/TransactionItem.t index 71bbe663f..fc187f5fe 100644 --- a/t/Shop/TransactionItem.t +++ b/t/Shop/TransactionItem.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2008 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -91,8 +91,9 @@ my $foreignHammer = $rockHammer->setCollateral('variantsJSON', 'variantId', 'new $versionTag->commit; +$rockHammer = $rockHammer->cloneFromDb; $cart->update({gatewayId => 'gzUxkEZJxREF9JpylOg2zw',}); ##Cash checkout -my $transaction = WebGUI::Shop::Transaction->create($session, { +my $transaction = WebGUI::Shop::Transaction->new($session, { cart => $cart, isRecurring => $cart->requiresRecurringPayment, }); diff --git a/t/Shop/Vendor.t b/t/Shop/Vendor.t index 5bc9ef7f9..dacd8017c 100644 --- a/t/Shop/Vendor.t +++ b/t/Shop/Vendor.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use Test::More; use Test::Deep; use JSON; @@ -31,14 +29,14 @@ my $session = WebGUI::Test->session; #---------------------------------------------------------------------------- # Tests -plan tests => 49; +plan tests => 55; #---------------------------------------------------------------------------- # put your tests here my $loaded = use_ok('WebGUI::Shop::Vendor'); -my ($vendor, $guard, $numberOfVendors); +my ($vendor); my ($fence, $fenceCopy); my $fenceUser = WebGUI::User->new($session, 'new'); $fenceUser->username('fence'); @@ -46,8 +44,6 @@ my $guardUser = WebGUI::User->new($session, 'new'); $guardUser->username('guard'); WebGUI::Test->addToCleanup($fenceUser, $guardUser); -$numberOfVendors = scalar @{ WebGUI::Shop::Vendor->getVendors($session) }; - ####################################################################### # # new @@ -69,6 +65,19 @@ cmp_deeply( 'new: requires a session variable', ); +eval { $vendor = WebGUI::Shop::Vendor->new({ userId => 3, }); }; +$e = Exception::Class->caught(); +isa_ok($e, 'WebGUI::Error::InvalidObject', 'new via property hash takes an exception to not giving it a session variable'); +cmp_deeply( + $e, + methods( + error => 'Need a session.', + got => '', + expected => 'WebGUI::Session', + ), + '... requires a session variable', +); + eval { $vendor = WebGUI::Shop::Vendor->new($session); }; $e = Exception::Class->caught(); isa_ok($e, 'WebGUI::Error::InvalidParam', 'new takes an exception to not giving it a vendor id to instanciate'); @@ -92,6 +101,13 @@ cmp_deeply( 'new: requires a valid vendorId', ); +my $test_vendor = eval { WebGUI::Shop::Vendor->new({ session => $session, }); }; +$e = Exception::Class->caught(); +ok(!$e, 'new via property hash with session'); +isa_ok($test_vendor, 'WebGUI::Shop::Vendor', '... returns correct type of object'); +WebGUI::Test->addToCleanup($test_vendor); +$test_vendor->delete; + eval { $vendor = WebGUI::Shop::Vendor->new($session, 'defaultvendor000000000'); }; $e = Exception::Class->caught(); ok(!$e, 'No exception thrown'); @@ -125,13 +141,16 @@ cmp_deeply( my $now = time(); eval { $fence = WebGUI::Shop::Vendor->create($session, { userId => $fenceUser->userId, }); }; -WebGUI::Test->addToCleanup($fence); $e = Exception::Class->caught(); -ok(!$e, 'No exception thrown by create'); +ok(!$e, 'No exception thrown by create') || + diag $@; isa_ok($vendor, 'WebGUI::Shop::Vendor', 'create returns correct type of object'); +WebGUI::Test->addToCleanup($fence); +is $fence->userId, $fenceUser->userId, 'object made with create has properties initialized correctly'; +$fence->write; ok($fence->get('dateCreated'), 'dateCreated is not null'); -my $deltaDC = $fence->get('dateCreated') - $now; +my $deltaDC = $fence->dateCreated - $now; cmp_ok( $deltaDC, '<=', 2, 'dateCreated is set properly'); ####################################################################### @@ -143,12 +162,15 @@ cmp_ok( $deltaDC, '<=', 2, 'dateCreated is set properly'); ok($session->id->valid($fence->get('vendorId')), 'get: vendorId is a valid guid'); is($fence->getId, $fence->get('vendorId'), 'get: getId is an alias for get vendorId'); is($fence->get('userId'), $fenceUser->userId, 'get: userId'); -is($fence->get('name'), undef, 'get: by default, no name is set'); +is($fence->get('name'), '', 'get: by default, no name is set'); $fence->update({name => 'Bogs Diamond'}); is($fence->get('name'), 'Bogs Diamond', 'get: get name'); is($fence->get('userId'), $fenceUser->userId, 'get: updating name did not affect userId'); +my $fence_fresh = WebGUI::Shop::Vendor->new($session, $fence->vendorId); +is($fence->name, 'Bogs Diamond', 'update wrote to the db'); + my $newProps = { name => 'Warden Norton', url => 'http://www.shawshank.com', @@ -169,7 +191,6 @@ cmp_deeply( paymentInformation => ignore(), vendorId => ignore(), preferredPaymentType => ignore(), - paymentAddressId => ignore(), dateCreated => ignore(), url => 'http://www.shawshank.com', userId => $fenceUser->userId, @@ -245,10 +266,11 @@ my $defaultVendor = WebGUI::Shop::Vendor->newByUserId($session, 3); # ####################################################################### -$guard = WebGUI::Shop::Vendor->create($session, { userId => $guardUser->userId, name => q|Warden Norton|}); +my $guard = WebGUI::Shop::Vendor->create($session, { userId => $guardUser->userId, name => q|Warden Norton|}); +$guard->write; WebGUI::Test->addToCleanup($guard); my $vendorsList = WebGUI::Shop::Vendor->getVendors($session); -cmp_deeply( +cmp_bag( $vendorsList, [ $guard, $fence, $defaultVendor, ], 'getVendors returns all 3 vendors as an array ref' diff --git a/t/Shop/loadProductAssets.pl b/t/Shop/loadProductAssets.pl index c662d013b..6f642983b 100644 --- a/t/Shop/loadProductAssets.pl +++ b/t/Shop/loadProductAssets.pl @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/Shop/loadProducts.pl b/t/Shop/loadProducts.pl index 5ee66c8fa..ae43569be 100644 --- a/t/Shop/loadProducts.pl +++ b/t/Shop/loadProducts.pl @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/Shop/loadTaxes.pl b/t/Shop/loadTaxes.pl index 241a0dcd5..516491a20 100644 --- a/t/Shop/loadTaxes.pl +++ b/t/Shop/loadTaxes.pl @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/Spectre/Cron.t b/t/Spectre/Cron.t index b9a1f824e..699c69a47 100644 --- a/t/Spectre/Cron.t +++ b/t/Spectre/Cron.t @@ -1,6 +1,6 @@ # vim: syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/Spectre/Workflow.t b/t/Spectre/Workflow.t index 013aa2670..fa84fef6f 100644 --- a/t/Spectre/Workflow.t +++ b/t/Spectre/Workflow.t @@ -1,6 +1,6 @@ # vim: syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -9,15 +9,14 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; use warnings; use Test::More; -use lib "$FindBin::Bin/../lib"; use WebGUI::Test; +use WebGUI::Paths; use WebGUI::Session; use Spectre::Admin; use WebGUI::Config; @@ -35,7 +34,7 @@ plan tests => 19; $|++; my $session = WebGUI::Test->session; -my $spectreConfigFile = WebGUI::Test->root . '/etc/spectre.conf'; +my $spectreConfigFile = WebGUI::Paths->spectreConfig; my $spectreConfig = Config::JSON->new($spectreConfigFile); my $ip = $spectreConfig->get('ip'); my $port = $spectreConfig->get('port'); diff --git a/t/Storage.t b/t/Storage.t index 01456a0a9..c928d7b49 100644 --- a/t/Storage.t +++ b/t/Storage.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/lib"; use WebGUI::Test; use WebGUI::Test::Event; @@ -32,7 +30,7 @@ my $cwd = Cwd::cwd(); my ($extensionTests, $fileIconTests, $block_extension_tests) = setupDataDrivenTests($session); -plan tests => 164 +plan tests => 161 + scalar @{ $extensionTests } + scalar @{ $fileIconTests } + scalar @{ $block_extension_tests } @@ -95,7 +93,6 @@ is($guidStorage->getDirectoryId, $newGuid, '... getDirectoryId'); # #################################################### -WebGUI::Test->originalConfig('cdn'); $session->config->delete('cdn'); # Note: the CDN configuration will be reverted after CDN tests below @@ -510,30 +507,35 @@ cmp_bag( # #################################################### -$session->http->setStatus(413); +$session->response->status(413); is($fileStore->addFileFromFormPost(), '', 'addFileFromFormPost returns empty string when HTTP status is 413'); -$session->http->setStatus(200); +$session->response->status(200); $session->request->upload('files', []); my $formStore = WebGUI::Storage->create($session); WebGUI::Test->addToCleanup($formStore); is($formStore->addFileFromFormPost('files'), undef, 'addFileFromFormPost returns empty string when asking for a form variable with no files attached'); -$session->request->uploadFiles( - 'oneFile', - [ WebGUI::Test->getTestCollateralPath('littleTextFile') ], -); -fired_ok { - is($formStore->addFileFromFormPost('oneFile'), 'littleTextFile', '... returns the name of the uploaded file') -} 'littleTextFile'; -cmp_bag($formStore->getFiles, [ qw/littleTextFile/ ], '... adds the file to the storage location'); +use HTTP::Request; +use HTTP::Request::Common; -$session->request->uploadFiles( - 'thumbFile', - [ WebGUI::Test->getTestCollateralPath('thumb-thumb.gif') ], -); -is($formStore->addFileFromFormPost('thumbFile'), 'thumb.gif', '... strips thumb- prefix from files'); -cmp_bag($formStore->getFiles, [ qw/littleTextFile thumb.gif/ ], '... adds the file to the storage location'); +{ + my $req = POST '/', Content_Type => 'form-data', Content => [ + oneFile => [ WebGUI::Test->getTestCollateralPath('littleTextFile') ], + ]; + local $session->{_request} = Plack::Request->new($req->to_psgi); + is($formStore->addFileFromFormPost('oneFile'), 'littleTextFile', '... returns the name of the uploaded file'); + cmp_bag($formStore->getFiles, [ qw/littleTextFile/ ], '... adds the file to the storage location'); +} + +{ + my $req = POST '/', Content_Type => 'form-data', Content => [ + thumbFile => [ WebGUI::Test->getTestCollateralPath('thumb-thumb.gif') ], + ]; + local $session->{_request} = Plack::Request->new($req->to_psgi); + is($formStore->addFileFromFormPost('thumbFile'), 'thumb.gif', '... strips thumb- prefix from files'); + cmp_bag($formStore->getFiles, [ qw/littleTextFile thumb.gif/ ], '... adds the file to the storage location'); +} #################################################### # @@ -667,9 +669,9 @@ $rotateTestStorage->rotate( $file, 90 ); # Test based on dimensions cmp_deeply( [ $rotateTestStorage->getSizeInPixels($file) ], [ 3, 2 ], "rotate: check if image was rotated by 90° CW (based on dimensions)" ); # Test based on single pixel -my $image = new Image::Magick; -$image->Read( $rotateTestStorage->getPath( $file ) ); -is( $image->GetPixel( x=>3, y=>1 ), 1, "rotate: check if image was rotated by 90° CW (based on pixels)"); +#my $image = new Image::Magick; +#$image->Read( $rotateTestStorage->getPath( $file ) ); +#is( $image->GetPixel( x=>3, y=>1 ), 1, "rotate: check if image was rotated by 90° CW (based on pixels)"); # Rotate image by 90° CCW $rotateTestStorage->rotate( $file, -90 ); @@ -677,9 +679,9 @@ $rotateTestStorage->rotate( $file, -90 ); # Test based on dimensions cmp_deeply( [ $rotateTestStorage->getSizeInPixels($file) ], [ 2, 3 ], "rotate: check if image was rotated by 90° CCW (based on dimensions)" ); # Test based on single pixel -my $image = new Image::Magick; -$image->Read( $rotateTestStorage->getPath( $file ) ); -is( $image->GetPixel( x=>1, y=>1 ), 1, "rotate: check if image was rotated by 90° CCW (based on pixels)"); +#my $image = new Image::Magick; +#$image->Read( $rotateTestStorage->getPath( $file ) ); +#is( $image->GetPixel( x=>1, y=>1 ), 1, "rotate: check if image was rotated by 90° CCW (based on pixels)"); #################################################### # @@ -751,10 +753,9 @@ is ($cdnStorage->getUrl, $locUrl, 'CDN: getUrl: URL for directory'); my $fileUrl = $locUrl . '/' . 'cdn-file'; is ($cdnStorage->getUrl('cdn-file'), $fileUrl, 'CDN: getUrl: URL for file'); # SSL -my %mockEnv = %ENV; -my $env = Test::MockObject::Extends->new($session->env); -$env->mock('get', sub { return $mockEnv{$_[1]} } ); -$mockEnv{HTTPS} = 'on'; +my $env = $session->request->env; +$env->{HTTPS} = 'on'; +$env->{'psgi.url_scheme'} = 'https'; $cdnCfg->{'sslAlt'} = 1; $session->config->set('cdn', $cdnCfg); is ($cdnStorage->getUrl, $initUrl, 'CDN: getUrl: URL with sslAlt flag'); @@ -762,7 +763,8 @@ $cdnCfg->{'sslUrl'} = 'https://ssl.example.com'; $session->config->set('cdn', $cdnCfg); my $sslUrl = $cdnCfg->{'sslUrl'} . '/' . $session->id->toHex($cdnStorage->getId); is ($cdnStorage->getUrl, $sslUrl, 'CDN: getUrl: sslUrl'); -$mockEnv{HTTPS} = undef; +$env->{HTTPS} = undef; +$env->{'psgi.url_scheme'} = 'http'; is ($cdnStorage->getUrl, $locUrl, 'CDN: getUrl: cleartext request to not use sslUrl'); # Copy my $cdnCopy = $cdnStorage->copy; diff --git a/t/Storage/Image.t b/t/Storage/Image.t index c1292d8e5..577ba1692 100644 --- a/t/Storage/Image.t +++ b/t/Storage/Image.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; our $todo; use WebGUI::Test; @@ -65,7 +63,7 @@ my $extensionTests = [ }, ]; -plan tests => 55 + scalar @{ $extensionTests }; # increment this value for each test you create +plan tests => 53 + scalar @{ $extensionTests }; # increment this value for each test you create my $session = WebGUI::Test->session; @@ -107,7 +105,8 @@ cmp_bag($imageStore->getFiles(1), $expectedFiles, '... even when the allFiles sw #################################################### foreach my $extTest ( @{ $extensionTests } ) { - is( $imageStore->isImage($extTest->{filename}), $extTest->{isImage}, $extTest->{comment} ); + my $isImage = $imageStore->isImage($extTest->{filename}) ? 1 : 0; + is( $isImage, $extTest->{isImage}, $extTest->{comment} ); } #################################################### @@ -116,7 +115,8 @@ foreach my $extTest ( @{ $extensionTests } ) { # #################################################### -WebGUI::Test->interceptLogging(); +WebGUI::Test->interceptLogging(sub { + my $log_data = shift; my $thumbStore = WebGUI::Storage->create($session); WebGUI::Test->addToCleanup($thumbStore); @@ -124,9 +124,9 @@ my $square = WebGUI::Image->new($session, 500, 500); $square->setBackgroundColor('#FF0000'); $square->saveToStorageLocation($thumbStore, 'square.png'); is($thumbStore->generateThumbnail(), 0, 'generateThumbnail returns 0 if no filename is supplied'); -is($WebGUI::Test::logger_error, q/Can't generate a thumbnail when you haven't specified a file./, 'generateThumbnail logs an error message for not sending a filename'); +is($log_data->{error}, q/Can't generate a thumbnail when you haven't specified a file./, 'generateThumbnail logs an error message for not sending a filename'); is($thumbStore->generateThumbnail('file.txt'), 0, 'generateThumbnail returns 0 if you try to thumbnail a non-image file'); -is($WebGUI::Test::logger_warns, q/Can't generate a thumbnail for something that's not an image./, 'generateThumbnail logs a warning message for thumbnailing a non-image file.'); +is($log_data->{warn}, q/Can't generate a thumbnail for something that's not an image./, 'generateThumbnail logs a warning message for thumbnailing a non-image file.'); chmod 0, $thumbStore->getPath('square.png'); SKIP: { @@ -135,7 +135,7 @@ SKIP: { ok(! -r $thumbStore->getPath('square.png'), 'Made square.png not readable'); is($thumbStore->generateThumbnail('square.png'), 0, 'generateThumbnail returns 0 if there are errors reading the file'); - like($WebGUI::Test::logger_error, qr/^Couldn't read image for thumbnail creation: (.+)$/, + like($log_data->{error}, qr/^Couldn't read image for thumbnail creation: (.+)$/, 'generateThumbnail when it cannot read the file for thumbnailing'); chmod oct(644), $thumbStore->getPath('square.png'); } @@ -155,13 +155,13 @@ cmp_bag([$thumbStore->getSizeInPixels('square.png')], [500,500], 'getSizeI cmp_bag([$thumbStore->getSizeInPixels('thumb-square.png')], [50,50], 'getSizeInPixels on thumb'); is($thumbStore->getSizeInPixels(), 0, 'getSizeInPixels returns only a zero if no file is sent'); -is($WebGUI::Test::logger_error, q/Can't check the size when you haven't specified a file./, 'getSizeInPixels logs an error message for not sending a filename'); +is($log_data->{error}, q/Can't check the size when you haven't specified a file./, 'getSizeInPixels logs an error message for not sending a filename'); is($thumbStore->getSizeInPixels('noImage.txt'), 0, 'getSizeInPixels returns only a zero if sent a non-image file'); -is($WebGUI::Test::logger_error, q/Can't check the size of something that's not an image./, 'getSizeInPixels logs an error message for sending a non-image filename'); +is($log_data->{error}, q/Can't check the size of something that's not an image./, 'getSizeInPixels logs an error message for sending a non-image filename'); is($thumbStore->getSizeInPixels('noImage.gif'), 0, 'getSizeInPixels returns only a zero if sent a file that does not exist'); -like($WebGUI::Test::logger_error, qr/^Couldn't read image to check the size of it./, 'getSizeInPixels logs an error message for reading a file that does not exist'); +like($log_data->{error}, qr/^Couldn't read image to check the size of it./, 'getSizeInPixels logs an error message for reading a file that does not exist'); #################################################### # @@ -203,10 +203,10 @@ is($imageCopy->deleteFile('../../'), undef, 'deleteFile in Storage::Image also r #################################################### is($thumbStore->getThumbnailUrl(), '', 'getThumbnailUrl returns undef if no file is sent'); -is($WebGUI::Test::logger_error, q/Can't find a thumbnail url without a filename./, 'getThumbnailUrl logs an error message for not sending a filename'); +is($log_data->{error}, q/Can't find a thumbnail url without a filename./, 'getThumbnailUrl logs an error message for not sending a filename'); is($thumbStore->getThumbnailUrl('round.png'), '', 'getThumbnailUrl returns undef if the requested file is not in the storage location'); -is($WebGUI::Test::logger_error, q/Can't find a thumbnail for a file named 'round.png' that is not in my storage location./, 'getThumbnailUrl logs an error message for not sending a filename'); +is($log_data->{error}, q/Can't find a thumbnail for a file named 'round.png' that is not in my storage location./, 'getThumbnailUrl logs an error message for not sending a filename'); is($thumbStore->getThumbnailUrl('square.png'), $thumbStore->getUrl('thumb-square.png'), 'getThumbnailUrl returns the correct url'); @@ -218,8 +218,6 @@ is($thumbStore->getThumbnailUrl('file.pdf'), '', '... return empty string for a # #################################################### -my $origMaxImageSize = $session->setting->get('maxImageSize'); - my $sizeTest = WebGUI::Storage->create($session); WebGUI::Test->addToCleanup($sizeTest); @@ -277,7 +275,7 @@ foreach my $testImage (@testImages) { ); } -$session->setting->set('maxImageSize', $origMaxImageSize ); +}); #################################################### # @@ -297,9 +295,9 @@ $rotateTest->rotate($file, 90); # Check dimensions cmp_bag( [$rotateTest->getSizeInPixels( $file )], [2,3], "Check size of photo after rotating 90° CW" ); # Check pixels -my $image = Image::Magick->new; -$image->Read( $rotateTest->getPath($file) ); -is( $image->GetPixel(x=>2, y=>0), 0, "Pixel at location [2,0] should be black" ); +#my $image = Image::Magick->new; +#$image->Read( $rotateTest->getPath($file) ); +#is( $image->GetPixel(x=>2, y=>0), 0, "Pixel at location [2,0] should be black" ); # Rotate test image by 90° CCW my $file = $rotateTest->getFiles->[0]; @@ -307,9 +305,9 @@ $rotateTest->rotate($file, -90); # Check dimensions cmp_bag( [$rotateTest->getSizeInPixels( $file )], [3,2], "Check size of photo after rotating 90° CCW" ); # Check pixels -$image = Image::Magick->new; -$image->Read( $rotateTest->getPath($file) ); -is( $image->GetPixel(x=>0, y=>0), 0, "Pixel at location [0,0] should be black" ); +#$image = Image::Magick->new; +#$image->Read( $rotateTest->getPath($file) ); +#is( $image->GetPixel(x=>0, y=>0), 0, "Pixel at location [0,0] should be black" ); diff --git a/t/Storage/utf8_filenames.t b/t/Storage/utf8_filenames.t index ad00d39f7..87f2b156b 100644 --- a/t/Storage/utf8_filenames.t +++ b/t/Storage/utf8_filenames.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/Template/Proxy.t b/t/Template/Proxy.t new file mode 100644 index 000000000..2756d25a7 --- /dev/null +++ b/t/Template/Proxy.t @@ -0,0 +1,31 @@ +use strict; +use warnings; + +use WebGUI::Test; +use Test::More 'no_plan'; + +use WebGUI::Asset; +use WebGUI::Asset::Template::TemplateToolkit; + +my $parser = WebGUI::Asset::Template::TemplateToolkit->new(WebGUI::Test->session); + +my $vars = { + _asset => WebGUI::Test->asset( + title => 'proxied asset' + ), +}; + +my $template = <<'END_TEMPLATE'; +[% USE Asset -%] +[%+ Asset.title +%] +[%+ Asset.title('new title') +%] +[%+ Asset.title +%] +END_TEMPLATE + +my $out = $parser->process($template, $vars); + +my @lines = split /\n/, $out; + +is $lines[0], 'proxied asset', 'title retrieved'; +is $lines[2], 'proxied asset', 'title not able to be changed'; + diff --git a/t/Template/downgrade.t b/t/Template/downgrade.t index 77979fedf..a7091ad95 100644 --- a/t/Template/downgrade.t +++ b/t/Template/downgrade.t @@ -75,7 +75,7 @@ sub processed_ok { template => $template, } ); - addToCleanup($tmpl); + WebGUI::Test->addToCleanup($tmpl); is( $tmpl->process( { his => { yes => 'yes', stop => 'stop' }, my => { yes => 'no', stop => 'go' } diff --git a/t/Text.t b/t/Text.t index f6cf59002..6607c7aa9 100644 --- a/t/Text.t +++ b/t/Text.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/lib"; use WebGUI::Test; use WebGUI::Text; use Test::More; diff --git a/t/Upgrade.t b/t/Upgrade.t new file mode 100644 index 000000000..6541d65a3 --- /dev/null +++ b/t/Upgrade.t @@ -0,0 +1,181 @@ +use strict; +use warnings; +no warnings 'redefine'; + +use strict; + +use WebGUI::Test import => [qw(collateral addToCleanup)]; +use Test::More; + +use Test::MockObject; +use Test::MockObject::Extends; +use File::Temp; +use File::Path qw(make_path); +use File::Basename qw(basename); + +use WebGUI::Paths; +use WebGUI::Upgrade; +use WebGUI::Session::Id; +use WebGUI::VersionTag; +use Try::Tiny; +use Capture::Tiny qw(capture); + +local *WebGUI::Paths::siteConfigs; +local *WebGUI::Paths::upgrades; + +our $configFile = WebGUI::Test->config->pathToFile; +{ + no warnings 'redefine'; + *WebGUI::Paths::siteConfigs = sub { $configFile }; +} + +my $upgrade = Test::MockObject::Extends->new( + WebGUI::Upgrade->new( + createBackups => 0, + useMaintenanceMode => 0, + ), +); +$upgrade->set_always('getCurrentVersion', '8.0.0'); +$upgrade->set_always('getCodeVersion', '8.4.3'); +$upgrade->set_true('markVersionUpgrade'); + +{ + no warnings 'redefine'; + *WebGUI::Paths::upgrades = sub { collateral('Upgrade', 'non-existant') } ; +} +ok ! try { $upgrade->calcUpgradePath('8.0.0', '8.4.3'); 1 }, "calcUpgradePath dies when upgrades path doesn't exist"; + +{ + no warnings 'redefine'; + *WebGUI::Paths::upgrades = sub { collateral('Upgrade', 'impossible') } ; +} +ok ! try { $upgrade->calcUpgradePath('8.0.0', '8.4.3'); 1 }, 'calcUpgradePath dies when unable to find a path'; + +{ + no warnings 'redefine'; + *WebGUI::Paths::upgrades = sub { collateral('Upgrade', 'backtrack') } ; +} +is_deeply + [ $upgrade->calcUpgradePath('8.0.0', '8.4.3') ], + [qw( 8.0.0-8.1.0 8.1.0-8.2.0 8.2.0-8.3.0 8.3.0-8.4.3 )], + 'calcUpgradePath finds correct path with backtracking'; + +{ + no warnings 'redefine'; + *WebGUI::Paths::upgrades = sub { collateral('Upgrade', 'valid') } ; +} +$upgrade->set_true('runUpgradeFile'); + +capture { + my $res = $upgrade->upgradeSites; + ok $res, 'upgradeSites runs'; +}; + +$upgrade->called_ok('getCurrentVersion', '... and checked current version'); +$upgrade->called_ok('getCodeVersion', '... and checked code version'); +SKIP: { + $upgrade->called_ok('runUpgradeFile', '... and checked code version') + or skip 'upgrade file not run', 1; + while ( my ($name, $args) = $upgrade->next_call ) { + if ($name eq 'runUpgradeFile') { + my $upgradeFile = $args->[3] && basename($args->[3]); + is $upgradeFile, '00_simple.pl', '... correct upgrade file'; + } + } +} + +$upgrade->clear; +$upgrade->unmock('runUpgradeFile'); + +$upgrade->mock(testUpgrade => sub { + my $self = shift; + my $file = shift; + $self->runUpgradeFile($configFile, '8.3.0', collateral('Upgrade', $file), @_); +}); + +{ + my $stdout = capture { eval { + $upgrade->testUpgrade('output.pl'); + } }; + ok $stdout =~ 'Simple Output', 'report command functions correctly'; + ok $stdout =~ 'Done', 'done command functions correctly'; +} + +{ + $upgrade->quiet(1); + my $stdout = capture { eval { $upgrade->testUpgrade('output.pl') } }; + ok $stdout !~ 'Simple Output', 'quiet flag silences report command'; + ok $stdout !~ 'Done', 'quiet flag silences done command'; +} + +ok !try { $upgrade->testUpgrade('die.pl'); 1 }, 'Error on failing upgrade'; +ok !try { $upgrade->testUpgrade('strict-failure.pl'); 1 }, 'strict enabled in upgrades'; + +my $session = WebGUI::Test->session; + +my $dbh = $upgrade->dbhForConfig(WebGUI::Test->config); +our $totalAssets = $dbh->selectrow_array('SELECT COUNT(*) FROM asset'); + +$upgrade->testUpgrade('dbh.pl'); + +$upgrade->testUpgrade('config.pl'); + +{ + my $sId = $upgrade->testUpgrade('session.pl'); + + ok +WebGUI::Session::Id->valid($sId), 'valid session id generated'; + my $hasSession = $dbh->selectrow_array('SELECT COUNT(*) FROM userSession WHERE sessionId = ?', {}, $sId); + ok !$hasSession, 'session properly closed'; +} + +$upgrade->testUpgrade('versiontag.pl'); +$upgrade->testUpgrade('collateral.pl'); +$upgrade->testUpgrade('package.pl'); + +{ + my $temp = File::Temp->newdir; + local @INC = @INC; + my @modules; + for (1..2) { + my $lib_dir = File::Spec->catdir($temp, 'lib' . $_); + unshift @INC, $lib_dir; + my $mod_dir = File::Spec->catdir($lib_dir, 'WebGUI', 'Upgrade', 'Test'); + my $module = File::Spec->catfile($mod_dir, 'Module.pm'); + push @modules, $module; + make_path($mod_dir); + open my $fh, '>', $module; + print {$fh} <<'END_PM'; +package WebGUI::Upgrade::Test::Module; + +1; +END_PM + close $fh; + } + + $upgrade->testUpgrade('rmlib.pl'); + + ok !(grep { -e } @modules), 'all libraries removed correctly'; +} + +{ + my $package = $upgrade->testUpgrade('test-template.wgpkg'); + isa_ok $package, 'WebGUI::Asset::Template'; + my $vtId = $package->get('tagId'); + my $vt = WebGUI::VersionTag->new($session, $vtId); + WebGUI::Test->addToCleanup($vt); + is $vt->get('name'), 'Upgrade to 8.3.0 - test-template', 'package import names version tag correctly'; +} + +{ + my $stdout = capture { eval { + $upgrade->testUpgrade('select.sql'); + } }; + my @lines = split /[\r\n]+/, $stdout; + my $dateApplied = $lines[1]; + + my $dbdateApplied = $dbh->selectrow_array('SELECT dateApplied FROM webguiVersion ORDER BY dateApplied DESC LIMIT 1'); + is $dateApplied, $dbdateApplied, 'SQL script run against database properly'; +} + +done_testing; + diff --git a/t/User.t b/t/User.t index b1d93359b..7ccf0a36d 100644 --- a/t/User.t +++ b/t/User.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,15 +8,12 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/lib"; use WebGUI::Test; use WebGUI::Session; -use WebGUI::Utility; -use WebGUI::Cache; #use Exception::Class; +use List::MoreUtils qw( uniq ); use WebGUI::User; use WebGUI::ProfileField; @@ -28,9 +25,8 @@ use Data::Dumper; my $session = WebGUI::Test->session; -my $testCache = WebGUI::Cache->new($session, 'myTestKey'); -$testCache->flush; -WebGUI::Test->addToCleanup(sub { $testCache->flush; }); +$session->cache->remove('myTestKey'); +WebGUI::Test->addToCleanup(sub { $session->cache->remove('myTestKey') }); my $user; my $lastUpdate; @@ -82,7 +78,7 @@ is($user->get('status'), "Selfdestructed", 'status("Selfdestructed") via get'); # Deactivation user deletes all sessions and scratches -my $newSession = WebGUI::Session->open( WebGUI::Test->root, WebGUI::Test->file ); +my $newSession = WebGUI::Session->open( WebGUI::Test->file ); $newSession->user({ user => $user }); $newSession->scratch->set("hasStapler" => "no"); @@ -158,7 +154,7 @@ is( ); is( - $session->db->quickScalar("SELECT firstName FROM userProfileData WHERE userId=?",[$user->getId]), + $session->db->quickScalar("SELECT firstName FROM users WHERE userId=?",[$user->getId]), "John", "update() updates profile firstName", ); @@ -169,7 +165,7 @@ is( ); is( - $session->db->quickScalar("SELECT lastName FROM userProfileData WHERE userId=?",[$user->getId]), + $session->db->quickScalar("SELECT lastName FROM users WHERE userId=?",[$user->getId]), "Lumbergh", "update() updates profile lastName", ); @@ -196,7 +192,7 @@ ok( $user->update({ lastName => "Lumberg" }), is( - $session->db->quickScalar("SELECT lastName FROM userProfileData WHERE userId=?",[$user->getId]), + $session->db->quickScalar("SELECT lastName FROM users WHERE userId=?",[$user->getId]), "Lumberg", "update() updates lastName again", ); @@ -218,7 +214,7 @@ my $expectValues = { }; # expects all user properties and all profile fields -my @expectFields = ( +my @expectFields = uniq( $session->db->buildArray('DESCRIBE users'), $session->db->buildArray('SELECT fieldName FROM userProfileField'), ); @@ -253,9 +249,9 @@ my $newProfileField = WebGUI::ProfileField->create($session, 'testField', {dataD WebGUI::Test->addToCleanup($newProfileField); is($user->profileField('testField'), 'this is a test', 'getting profile fields not cached in the user object returns the profile field default'); -ok(!$user->profileField('wg_privacySettings'), '... wg_privacySettings may not be retrieved'); -$user->profileField('wg_privacySettings', '{"email"=>"all"}'); -ok(!$user->profileField('wg_privacySettings'), '... wg_privacySettings may not be set'); +ok(!$user->profileField('privacyFields'), '... privacyFields may not be retrieved'); +$user->profileField('privacyFields', '{"email"=>"all"}'); +ok(!$user->profileField('privacyFields'), '... privacyFields may not be set'); ################################################################ # @@ -483,10 +479,8 @@ ok($dude->canUseAdminMode, 'canUseAdminMode: with no subnets set, user canUseAdm $dude->deleteFromGroups([12]); ##Spoof the IP address to test subnet level access control to adminMode -my $origEnvHash = $session->env->{_env}; -my %newEnv = ( REMOTE_ADDR => '194.168.0.2' ); -$session->env->{_env} = \%newEnv; -WebGUI::Test->originalConfig('adminModeSubnets'); +my $env = $session->request->env; +$env->{REMOTE_ADDR} = '194.168.0.2'; $session->config->set('adminModeSubnets', ['194.168.0.0/24']); ok(!$dude->isInGroup(12), 'user is not in group 12'); @@ -496,7 +490,7 @@ $dude->addToGroups([12]); ok($dude->canUseAdminMode, 'canUseAdminMode: with no subnets set, user canUseAdminMode'); -$newEnv{REMOTE_ADDR} = '10.0.0.2'; +$env->{REMOTE_ADDR} = '10.0.0.2'; ok(!$dude->canUseAdminMode, 'canUseAdminMode: even with the right group permission, user must be in subnet if subnet is set'); @@ -504,11 +498,10 @@ ok(!$dude->canUseAdminMode, 'canUseAdminMode: even with the right group permissi $session->config->set('adminModeSubnets', ['10.0.0.0/24', '192.168.0.0/24', ]); ok($dude->canUseAdminMode, 'canUseAdminMode: multiple IP settings, first IP range'); -$newEnv{REMOTE_ADDR} = '192.168.0.127'; +$env->{REMOTE_ADDR} = '192.168.0.127'; ok($dude->canUseAdminMode, 'canUseAdminMode: multiple IP settings, second IP range'); ##restore the original session variables -$session->env->{_env} = $origEnvHash; $session->config->delete('adminModeSubnets'); ################################################################ @@ -583,9 +576,12 @@ $profileField->set(\%copiedFieldData); is($profileField->get('dataDefault'), "'America/Hillsboro'", 'default timeZone set to America/Hillsboro'); # now let's make sure it has an extras field, and that we can get/set it. -$profileField->set( { extras => '<!-- hello world -->' } ); +# DID YOU KNOW? you have to set everything otherwise things get messed up! +$copiedFieldData{ 'extras' } = '<!-- hello world -->'; +$profileField->set( \%copiedFieldData ); is($profileField->getExtras, '<!-- hello world -->', 'extras field for profileField'); -$profileField->set( { extras => '' } ); +$copiedFieldData{ 'extras' } = ''; +$profileField->set( \%copiedFieldData ); my $busterCopy = WebGUI::User->new($session, $buster->userId); @@ -843,7 +839,6 @@ isa_ok( $newCreateUser, 'WebGUI::User', 'create() returns a WebGUI::User' ); ################################################################ $session->setting->set('preventProxyCache', 0); -WebGUI::Test->originalConfig('profileModuleIdentifier'); my $profileModuleId = $session->config->get('profileModuleIdentifier'); is( $newFish->getProfileUrl('cellblock'), @@ -949,8 +944,8 @@ is($neighbor->getProfileFieldPrivacySetting('email'), 'none', '...get and set 1 $neighbor->setProfileFieldPrivacySetting({email => 'only Tony'}); is($neighbor->getProfileFieldPrivacySetting('email'), 'none', '...set will not set invalid profile settings'); -is($admin->getProfileFieldPrivacySetting('publicEmail'), 'all', '...get on a user with existing settings'); -is($neighbor->getProfileFieldPrivacySetting('wg_privacySettings'), 'none', '...the privacy field always returns "none"'); +is($admin->getProfileFieldPrivacySetting('email'), 'all', '...get on a user with existing settings'); +is($neighbor->getProfileFieldPrivacySetting('privacyFields'), 'none', '...the privacy field always returns "none"'); my $recentProfileField = WebGUI::ProfileField->create($session, 'recentField', { fieldName => 'recentField', diff --git a/t/Utility.t b/t/Utility.t deleted file mode 100644 index 5d98bc9a4..000000000 --- a/t/Utility.t +++ /dev/null @@ -1,193 +0,0 @@ -#------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. -#------------------------------------------------------------------- -# Please read the legal notices (docs/legal.txt) and the license -# (docs/license.txt) that came with this distribution before using -# this software. -#------------------------------------------------------------------- -# http://www.plainblack.com info@plainblack.com -#------------------------------------------------------------------- - - -use FindBin; -use strict; -use lib "$FindBin::Bin/lib"; -use Tie::IxHash; - -use WebGUI::Test; -use WebGUI::Session; - -use Test::More tests => 57; # increment this value for each test you create -use Test::Deep; - -my $session = WebGUI::Test->session; - -# commify -is(WebGUI::Utility::commify(10), "10", 'commify() - no comma needed'); -is(WebGUI::Utility::commify(1000), "1,000", 'commify() - single comma'); -is(WebGUI::Utility::commify(10000000), "10,000,000", 'commify() - multiple commas'); - -# formatBytes -is(WebGUI::Utility::formatBytes(10), '10 B', 'formatBytes() - bytes'); -is(WebGUI::Utility::formatBytes(4300), '4 kB', 'formatBytes() - kilobytes'); -is(WebGUI::Utility::formatBytes(1700000), '2 MB', 'formatBytes() - megabytes'); - -# isBetween -ok(WebGUI::Utility::isBetween(0,-1,1), 'isBetween() - negative and positive range'); -ok(WebGUI::Utility::isBetween(0,1,-1), 'isBetween() - negative and positive range, reversed'); -ok(WebGUI::Utility::isBetween(11,1,15), 'isBetween() - positive range'); -ok(WebGUI::Utility::isBetween(-5,-10,-2), 'isBetween() - negative range'); -ok(!WebGUI::Utility::isBetween(+5,-10,-2), 'isBetween() - not in range on high side'); -ok(!WebGUI::Utility::isBetween(-15,-10,-2), 'isBetween() - not in range on low side'); - -# isIn -ok(WebGUI::Utility::isIn("webgui", qw(cars trucks webgui trains)), 'isIn()'); - -# makeArrayCommaSafe -my @commaFilledArray = ("this,that", "foo,bar", "x-y"); -WebGUI::Utility::makeArrayCommaSafe(\@commaFilledArray); -my $noCommaFound = 1; -foreach my $row (@commaFilledArray) { - $noCommaFound = 0 if ($row =~ m/,/); -} -ok($noCommaFound, 'makeArrayCommaSafe()'); - -# makeCommaSafe -unlike(WebGUI::Utility::makeCommaSafe("this,that,foo,,bar"), qr/,/, 'makeCommaSafe()'); -is( - WebGUI::Utility::makeCommaSafe("this,that,foo,,bar"), - 'this;that;foo;;bar', - 'makeCommaSafe()' -); -is( - WebGUI::Utility::makeCommaSafe("this,that\nfoo\rbar\r\n"), - 'this;that foo bar ', - 'makeCommaSafe()' -); - -# makeTabSafe -unlike(WebGUI::Utility::makeTabSafe("this\tthat\tfoo\tbar\t"), qr/\t/, 'makeTabSafe()'); -is( - WebGUI::Utility::makeTabSafe("this\tthat\tfoo\tbar\t"), - "this that foo bar ", - 'makeCommaSafe(): clearing tabs' -); -is( - WebGUI::Utility::makeTabSafe("this\nthat\tfoo\rbar\r\n"), - "this that foo bar ", - 'makeCommaSafe(): clearing tabs, newlines and carriage returns' -); - -# makeArrayTabSafe -- modifies an array in place -my $tabbedArray = ["this\tthat", "these\nthose"]; -WebGUI::Utility::makeArrayTabSafe($tabbedArray); -cmp_deeply( - $tabbedArray, - ["this that", "these those"], - 'makeArrayTabSafe' -); - -# randint -my $number = WebGUI::Utility::randint(50,75); -ok($number >= 50 && $number <= 75, 'randint()'); -$number = WebGUI::Utility::randint(); -ok($number >= 0 && $number <= 1, 'randint() with default params'); -my $number = WebGUI::Utility::randint(10,5); -ok($number >= 5 && $number <= 10, 'randint() auto reverses params if they are backwards'); - -# randomizeArray -SKIP: { - skip("Don't know how to test randomizeArray.",1); - ok(undef, 'randomizeArray()'); - } - -# randomizeHash -SKIP: { - skip("Don't know how to test randomizeHash.",1); - ok(undef, 'randomizeHash()'); - } - -# round -is(WebGUI::Utility::round(47.133984233, 0), 47, 'round() - 0 significant digits'); -is(WebGUI::Utility::round(47.133984233, 3), 47.134, 'round() - multiple significant digits'); -is(WebGUI::Utility::round(47.6, 0), 48, 'round() - rounds up, too'); - -{ - # Just some basic tests for now. - - my (%hash1, %hash2, %hash3); - my %hash1 = ('a' => 5, 'b' => 3, 'c' => 2, 'd' => 4, 'e' => 1); - tie my %hash2, 'Tie::IxHash'; - tie my %hash3, 'Tie::IxHash'; - %hash2 = WebGUI::Utility::sortHash(%hash1); - %hash3 = WebGUI::Utility::sortHashDescending(%hash1); - is_deeply([keys %hash2], [qw/e c b d a/], 'sortHash'); - is_deeply([keys %hash3], [qw/a d b c e/], 'sortHashDescending'); -} - -##################################################################### -# -# scalarEquals -# -##################################################################### -{ - my %eq = ( - 0 => 0, - "0" => "0", - 0.1 => 0.1, - "0.1" => "0.1", - "0 but true" => "0 but true", - "string" => "string", - ); - while (my($a, $b) = each %eq) { - ok(WebGUI::Utility::scalarEquals($a, $b), "scalarEquals($a, $b) truthy"); - } - - my %ne = ( - 0 => "0", - "0.0" => "0", - "0.1" => "0.10", - "0" => "0 but true", - "1" => "0 but true", - 0 => "0 but true", - 1 => "0 but true", - ); - while (my($a, $b) = each %ne) { - ok(!WebGUI::Utility::scalarEquals($a, $b), "scalarEquals($a, $b) falsy"); - } - ok(!WebGUI::Utility::scalarEquals(), "scalarEquals() falsy when no args"); - ok(!WebGUI::Utility::scalarEquals(1), "falsy for 1 arg"); - ok(!WebGUI::Utility::scalarEquals(1, undef, 1), "falsy for 3 args"); -} - -# isInSubnets -is(WebGUI::Utility::isInSubnet('192.168.0.1', []), 0, 'isInSubnet: comparing against an empty array ref'); -is(WebGUI::Utility::isInSubnet('192.168.0.1', ['192.168.0.1/32']), 1, 'isInSubnet: comparing against an exact match'); -is(WebGUI::Utility::isInSubnet('192.168.0.2', ['192.168.0.1/32']), 0, 'isInSubnet: comparing against a mismatch'); -is(WebGUI::Utility::isInSubnet('192.168.0.2', ['192.168.0.1/30']), 1, 'isInSubnet: comparing against a match with mask'); -is(WebGUI::Utility::isInSubnet('256.168.0.2', ['192.168.0.1/30']), 0, 'isInSubnet: ip is out of range'); -is(WebGUI::Utility::isInSubnet('192.168.0.1', ['192.168.0.1/33']), undef, 'isInSubnet: mask is out of range'); -is(WebGUI::Utility::isInSubnet('192.168.0.1', ['192.168.0.0.1/33']), undef, 'isInSubnet: ip has too many dots'); -is(WebGUI::Utility::isInSubnet('192.168.0.1', ['0.0.1/33']), undef, 'isInSubnet: ip has too few dots'); -is(WebGUI::Utility::isInSubnet('192.168.0.1', ['192.168.0.1']), undef, 'isInSubnet: ip is missing mask'); -is(WebGUI::Utility::isInSubnet('192.168.0.1', ['256.168.0.1/32']), undef, 'isInSubnet: ip has an out of range quad'); -is(WebGUI::Utility::isInSubnet('192.168.0.1', ['192.257.0.1/32']), undef, 'isInSubnet: ip has an out of range quad'); -is(WebGUI::Utility::isInSubnet('192.168.0.1', ['192.168.258.1/32']), undef, 'isInSubnet: ip has an out of range quad'); -is(WebGUI::Utility::isInSubnet('192.168.0.1', ['192.168.0.259/32']), undef, 'isInSubnet: ip has an out of range quad'); - -##################################################################### -# -# emailRegex -# -##################################################################### - -isa_ok(WebGUI::Utility::emailRegex, 'Regexp'); - -TODO: { - local $TODO = 'Things to do'; - ok(0, 'Move email validation tests out of Form/Email into here'); -} - -# Local variables: -# mode: cperl -# End: diff --git a/t/VersionTag.t b/t/VersionTag.t index ea7ee7aac..1c9050661 100644 --- a/t/VersionTag.t +++ b/t/VersionTag.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/lib"; use WebGUI::Test; use WebGUI::Session; use WebGUI::VersionTag; @@ -44,7 +42,7 @@ sub setSiteVersionTagMode { sub setUserVersionTagMode { my ($user, $newMode) = @_; - $user->profileField(q{versionTagMode}, $newMode); + $user->update(versionTagMode => $newMode); return; } #setUserVersionTagMode @@ -160,23 +158,29 @@ ok(!defined $tagAgain2, 'nonexistent tag cannot be instantiated'); $tag2->rollback; ($tag, $tagAgain1, $tag2, $tagAgain2) = (); +my $master_tag = WebGUI::VersionTag->getWorking($session); +my $node = WebGUI::Test->asset; +$master_tag->commit; +$node = $node->cloneFromDb; +WebGUI::Test->addToCleanup($master_tag); + my $tag3 = WebGUI::VersionTag->create($session, {}); $tag3->setWorking; -my $asset1 = WebGUI::Asset->getRoot($session)->addChild({ className => 'WebGUI::Asset::Snippet' }); -my $asset2 = WebGUI::Asset->getRoot($session)->addChild({ className => 'WebGUI::Asset::Snippet' }); +my $asset1 = $node->addChild({ className => 'WebGUI::Asset::Snippet', }); +my $asset2 = $node->addChild({ className => 'WebGUI::Asset::Snippet', }); is($tag3->getAssetCount, 2, 'tag with two assets'); is($tag3->getRevisionCount, 2, 'tag with two revisions'); -$asset1 = $asset1->addRevision({ title => 'revised once' }, time+10); -$asset1 = $asset1->addRevision({ title => 'revised twice' }, time+20); -$asset2 = $asset2->addRevision({ title => 'other revised once' }, time+30); +$asset1 = $asset1->addRevision({ title => 'revised once', }, time+10); +$asset1 = $asset1->addRevision({ title => 'revised twice', }, time+20); +$asset2 = $asset2->addRevision({ title => 'other revised once', }, time+30); is($tag3->getRevisionCount, 5, 'tag with five revisions'); my $tag4 = WebGUI::VersionTag->create($session, {}); $tag4->setWorking; -my $asset3 = WebGUI::Asset->getRoot($session)->addChild({ className => 'WebGUI::Asset::Snippet' }); +my $asset3 = $node->addChild({ className => 'WebGUI::Asset::Snippet', }); is($tag4->getAssetCount, 1, 'other tag with one asset'); is($tag4->getRevisionCount, 1, 'other tag with one revision'); -$asset3->addRevision({ title => 'again revised once' }, time+40); +$asset3->addRevision({ title => 'again revised once', }, time+40); is($tag4->getRevisionCount, 2, 'other tag still with one asset'); is($tag4->getRevisionCount, 2, 'other tag with two revisions'); is($tag3->getAssetCount, 2, 'original tag still with two assets'); @@ -188,7 +192,7 @@ $tag4->rollback; #Test commitAsUser my $tag5 = WebGUI::VersionTag->create($session, {}); $tag5->setWorking; -my $asset5 = WebGUI::Asset->getRoot($session)->addChild({ className => 'WebGUI::Asset::Snippet' }); +my $asset5 = $node->addChild({ className => 'WebGUI::Asset::Snippet', }); is($tag5->get("createdBy"),1,'tag created by visitor'); $tag5->commitAsUser(3); $tag5 = WebGUI::VersionTag->new($session, $tag5->getId); #Get the tag again - properties have changed @@ -199,11 +203,11 @@ $tag5->rollback; #Test commitAsUser with options my $tag6 = WebGUI::VersionTag->create($session, {}); $tag6->setWorking; -my $asset6 = WebGUI::Asset->getRoot($session)->addChild({ className => 'WebGUI::Asset::Snippet' }); +my $asset6 = $node->addChild({ className => 'WebGUI::Asset::Snippet', }); $tag6->commitAsUser(3, { commitNow => "yes" }); $tag6 = WebGUI::VersionTag->new($session, $tag6->getId); #Get the tag again - properties have changed is($tag6->get("committedBy"),3,'tag committed by admin again'); -$asset6 = WebGUI::Asset->newByDynamicClass($session,$asset6->getId); #Get the asset again - properties have changed +$asset6 = WebGUI::Asset->newById($session,$asset6->getId); #Get the asset again - properties have changed is($asset6->get("status"),"approved","asset status approved"); $tag6->clearWorking; $tag6->rollback; @@ -215,7 +219,8 @@ $tag6->rollback; setSiteVersionTagMode($session, q{singlePerUser}); setUserVersionTagMode($user, q{inherited}); -ok(!defined getWorking(1), 'versionTagMode singlePerUser: no working tag initially present'); +ok(!defined getWorking(1), 'versionTagMode singlePerUser: no working tag initially present') + or diag(getWorking(1)->getId); $tag = WebGUI::VersionTag->create($session, {}); isa_ok($tag, 'WebGUI::VersionTag', 'versionTagMode singlePerUser: empty tag'); @@ -229,13 +234,16 @@ my $siteWideTag; $tag->clearWorking(); -ok(defined ($userTag = getWorking(1)), 'versionTagMode singlePerUser: reclaim version tag after clearWorking'); -is ($userTag->getId(), $userTagId, q{versionTagMode singlePerUser: reclaimed version tag has same id}); +my $gotTag = ok(defined ($userTag = getWorking(1)), 'versionTagMode singlePerUser: reclaim version tag after clearWorking'); +SKIP: { + skip 'userTag not set', 1 unless $gotTag; + is ($userTag->getId(), $userTagId, q{versionTagMode singlePerUser: reclaimed version tag has same id}); + $userTag->clearWorking(); +} #switch to sitewide mode -$userTag->clearWorking(); setSiteVersionTagMode($session, q{siteWide}); @@ -251,7 +259,7 @@ ok($siteWideTag->getId() ne $userTagId, 'versionTagMode siteWide: siteWide tag h $siteWideTag->clearWorking(); -my $asset4 = WebGUI::Asset->getRoot($session)->addChild({ className => 'WebGUI::Asset::Snippet' }); +my $asset4 = $node->addChild({ className => 'WebGUI::Asset::Snippet' }); ok(defined ($siteWideTag = getWorking(1)), 'versionTagMode siteWide: reclaim version tag after clearWorking and addding new asset'); @@ -259,7 +267,7 @@ is($siteWideTag->getId(), $siteWideTagId, 'versionTagMode siteWide: reclaim site ## Through in a new session as different user -my $admin_session = WebGUI::Session->open($WebGUI::Test::WEBGUI_ROOT, $WebGUI::Test::CONFIG_FILE); +my $admin_session = WebGUI::Session->open(WebGUI::Test->file); $admin_session->user({'userId' => 3}); WebGUI::Test->addToCleanup($admin_session); @@ -285,7 +293,7 @@ ok($adminSiteWideTag->get(q{isSiteWide}), 'versionTagMode siteWide + admin inher ok($adminSiteWideTag->getId() eq $siteWideTagId, 'versionTagMode siteWide + admin inherited: empty has same ID as site wide'); -$admin_session->var()->end(); +$adminUserTag->rollback(); $admin_session->close(); # Check if get returns a safe copy @@ -310,7 +318,6 @@ isnt( $userTag->rollback(); $siteWideTag->rollback(); -$adminUserTag->rollback(); ## Additional VersionTagMode to make sure that auto commit happens only when user is tag creator and tag is not site wide. ## See bug #10689 (Version Tag Modes) @@ -320,12 +327,11 @@ $adminUserTag->rollback(); setUserVersionTagMode($user, q{singlePerUser}); my $tag = WebGUI::VersionTag->create($session, {}); $tag->setWorking; - my $asset = WebGUI::Asset->getRoot($session)->addChild({ className => 'WebGUI::Asset::Snippet' }); + my $asset = $node->addChild({ className => 'WebGUI::Asset::Snippet', }); is($tag->getAssetCount, 1, qq{$test_prefix [singlePerUser] tag with 1 asset}); # create admin session - my $admin_session = WebGUI::Session->open($WebGUI::Test::WEBGUI_ROOT, $WebGUI::Test::CONFIG_FILE); - WebGUI::Test->addToCleanup($admin_session); + my $admin_session = WebGUI::Test->newSession; $admin_session->user({'userId' => 3}); setUserVersionTagMode($admin_session->user(), q{autoCommit}); @@ -372,11 +378,12 @@ $adminUserTag->rollback(); setUserVersionTagMode($user, q{siteWide}); $tag = WebGUI::VersionTag->create($session, {}); $tag->setWorking; - $asset = WebGUI::Asset->getRoot($session)->addChild({ className => 'WebGUI::Asset::Snippet' }); + $asset = $node->addChild({ className => 'WebGUI::Asset::Snippet', }); is($tag->getAssetCount, 1, qq{$test_prefix [siteWide] tag with 1 asset}); # create admin session - $admin_session = WebGUI::Session->open($WebGUI::Test::WEBGUI_ROOT, $WebGUI::Test::CONFIG_FILE); + $admin_session = WebGUI::Test->newSession; + WebGUI::Test->addToCleanup($admin_session); WebGUI::Test->addToCleanup($admin_session); $admin_session->user({'userId' => 3}); @@ -429,10 +436,10 @@ my $redSession = WebGUI::Test->newSession(); my $andy = WebGUI::User->create($andySession); my $red = WebGUI::User->create($redSession); -addToCleanup($andy, $red); +WebGUI::Test->addToCleanup($andy, $red); my $andyTag = WebGUI::VersionTag->getWorking($andySession); -addToCleanup($andyTag); +WebGUI::Test->addToCleanup($andyTag); my $redTag = WebGUI::VersionTag->new($redSession, $andyTag->getId); $redTag->setWorking(); is($andyTag->getId, $redTag->getId, 'users share the same version tag'); @@ -452,7 +459,7 @@ $andyTag2->clearWorking; my $andyTagCheck = WebGUI::VersionTag->getWorking($andySession, 'nocreate'); is($andyTagCheck, undef, 'clearWorking: user andy does not have tag'); my $redSession2 = $redSession->duplicate; - addToCleanup($redSession2); + WebGUI::Test->addToCleanup($redSession2); my $redTagCheck = WebGUI::VersionTag->getWorking($redSession2, 'nocreate'); is($redTagCheck, undef, 'red does not either'); } diff --git a/t/WebGUI.t b/t/WebGUI.t new file mode 100644 index 000000000..4f43afd30 --- /dev/null +++ b/t/WebGUI.t @@ -0,0 +1,96 @@ +# vim:syntax=perl +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 +#------------------------------------------------------------------ + +# Test the WebGUI PSGI handler +# +# + +use FindBin; +use strict; +use lib "$FindBin::Bin/lib"; +use Test::More; +use WebGUI::Test; # Must use this before any other WebGUI modules +use WebGUI; +use WebGUI::Session; + +#---------------------------------------------------------------------------- +# Init +my $session = WebGUI::Test->session; + +# A template object to play with +my $template = WebGUI::Test->asset( + className => 'WebGUI::Asset::Template', + template => '<html><body>Template World</body></html>', +); + +# Create a fake content handler class to install in the config +BEGIN { + $INC{'WebGUI/Content/TestHandler.pm'} = __FILE__; + $INC{'WebGUI/Content/TestChunked.pm'} = __FILE__; + $INC{'WebGUI/Content/TestTemplate.pm'} = __FILE__; + +} + +package WebGUI::Content::TestHandler; +sub handler { '<html><body>Hello World</body></html>' } +package WebGUI::Content::TestChunked; +sub handler { "chunked" } +package WebGUI::Content::TestTemplate; +sub handler { $template } + +package main; + +#---------------------------------------------------------------------------- +# Test the various possibilities of content handlers +my ( $fh ); + +$session->config->set( 'contentHandlers', [ 'WebGUI::Content::TestHandler' ] ); +$fh = capture_output(); +WebGUI->handle( $session ); +is( + get_output( $fh ), + WebGUI::Content::TestHandler->handler, + 'handler that returns HTML is output directly', +); + +$session->config->set( 'contentHandlers', [ 'WebGUI::Content::TestChunked' ] ); +$fh = capture_output(); +WebGUI->handle( $session ); +isnt( + get_output( $fh ), + 'chunked', + 'chunked is not returned', +); + +$session->config->set( 'contentHandlers', [ 'WebGUI::Content::TestTemplate' ] ); +$fh = capture_output(); +WebGUI->handle( $session ); +is( + get_output( $fh ), + $template->process, + 'handler that returns template is processed', +); + +sub capture_output { + my $output_fh = undef; + open $fh, '+>', \$output_fh; + $session->output->setHandle( $fh ); + return $fh; +} + +sub get_output { + my ( $fh ) = @_; + seek $fh, 0, 0; + return join '', <$fh>; +} + +done_testing; +#vim:ft=perl diff --git a/t/WebGUI_conf.t b/t/WebGUI_conf.t index f9d13d7b6..a6f5b254e 100644 --- a/t/WebGUI_conf.t +++ b/t/WebGUI_conf.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -11,9 +11,7 @@ # Test the default WebGUI.conf file to make sure it is valid JSON. -use FindBin; use strict; -use lib "$FindBin::Bin/lib"; use Test::More; use WebGUI::Test; # Must use this before any other WebGUI modules use WebGUI::Session; @@ -33,7 +31,7 @@ plan tests => 3; # Increment this number for each test you create #---------------------------------------------------------------------------- # put your tests here -my $defaultConfigFile = Path::Class::File->new(WebGUI::Test->root, qw/etc WebGUI.conf.original/); +my $defaultConfigFile = Path::Class::File->new(WebGUI::Paths->configBase, 'WebGUI.conf.original'); ok (-e $defaultConfigFile->stringify, 'WebGUI.conf.original exists'); diff --git a/t/Whitespace.t b/t/Whitespace.t index 6191bc76e..8c42f9ed0 100644 --- a/t/Whitespace.t +++ b/t/Whitespace.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -9,8 +9,6 @@ #------------------------------------------------------------------- use strict; -use FindBin qw($Bin); -use lib "$FindBin::Bin/lib"; use File::Find; use Test::More; @@ -65,7 +63,7 @@ sub checkContent { my $content = shift; my @content = @{$content}; - my $podAllowed = 0; + my $podAllowed = 1; my $lineNumber = 1; foreach my $line (@content) { chomp $line; diff --git a/t/Wizard.t b/t/Wizard.t index bd94a779b..e0f81f7d8 100644 --- a/t/Wizard.t +++ b/t/Wizard.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/lib"; use Test::More; use Test::Deep; use WebGUI::Test; # Must use this before any other WebGUI modules @@ -52,12 +50,12 @@ is( $wizard->getCurrentStep, "one", "SetCurrentStep" ); # Form Start and End my $f = $wizard->getForm; -isa_ok( $f, 'WebGUI::HTMLForm' ); -my $html = $f->print; +isa_ok( $f, 'WebGUI::FormBuilder' ); +my $html = $f->toHtml; like( $html, qr/wizard_class.+WebGUI::Wizard/, 'getFormStart wizard_class' ); like( $html, qr/wizard_step.+one/, 'getFormStart wizard_step' ); -$html = $wizard->getForm( "two" )->print; +$html = $wizard->getForm( "two" )->toHtml; like( $html, qr/wizard_step.+two/, 'getFormStart wizard_step override step' ); #---------------------------------------------------------------------------- diff --git a/t/Workflow.t b/t/Workflow.t index 642ca05e7..7632b06ee 100644 --- a/t/Workflow.t +++ b/t/Workflow.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,14 +8,11 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/lib"; use WebGUI::Test; use WebGUI::Session; use WebGUI::Workflow; use WebGUI::Workflow::Cron; -use WebGUI::Utility qw/isIn/; use Test::More tests => 75; # increment this value for each test you create use Test::Deep; @@ -47,12 +44,12 @@ is_deeply($wf->getCrons, [], 'workflow has no crons'); isa_ok(WebGUI::Workflow->getList($session), 'HASH', 'getList returns a hashref'); -ok(!isIn($wfId, keys %{WebGUI::Workflow->getList($session)}), 'workflow not in enabled list'); -is(scalar keys %{WebGUI::Workflow->getList($session)}, 13, 'There are twelve enabled, default workflows, of all types, shipped with WebGUI'); +ok(! exists WebGUI::Workflow->getList($session)->{$wfId}, 'workflow not in enabled list'); +is(scalar keys %{WebGUI::Workflow->getList($session)}, 13, 'There are thirteen enabled, default workflows, of all types, shipped with WebGUI'); $wf->set({enabled => 1}); ok($wf->get('enabled'), 'workflow is enabled'); -ok(isIn($wfId, keys %{WebGUI::Workflow->getList($session)}), 'workflow in enabled list'); +ok(exists WebGUI::Workflow->getList($session)->{$wfId}, 'workflow in enabled list'); $wf->set({enabled => 0}); ok(!$wf->get('enabled'), 'workflow is disabled again'); diff --git a/t/Workflow/Activity/ArchiveOldStories.t b/t/Workflow/Activity/ArchiveOldStories.t index bdc7acd73..7f5ad96f0 100644 --- a/t/Workflow/Activity/ArchiveOldStories.t +++ b/t/Workflow/Activity/ArchiveOldStories.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use WebGUI::Test; use WebGUI::Asset; @@ -27,11 +25,13 @@ plan tests => 6; # increment this value for each test you create my $session = WebGUI::Test->session; $session->user({userId => 3}); -my $home = WebGUI::Asset->getDefault($session); +my $home = WebGUI::Test->asset; my $wgBday = WebGUI::Test->webguiBirthday; my $creationDateSth = $session->db->prepare('update asset set creationDate=? where assetId=?'); +my $tag = WebGUI::VersionTag->getWorking($session); + my $archive1 = $home->addChild({ className => 'WebGUI::Asset::Wobject::StoryArchive', title => '2001 Stories', @@ -59,13 +59,8 @@ my $weekFolder = $archive2->getFolder($weekAgo); my $weekStory = $weekFolder->addChild({className => 'WebGUI::Asset::Story',}); $creationDateSth->execute([$weekAgo, $weekFolder->getId]); $creationDateSth->execute([$weekAgo, $weekStory->getId]); - -my $versionTag = WebGUI::VersionTag->getWorking($session); -$versionTag->commit; -WebGUI::Test->addToCleanup($versionTag); -foreach my $asset ($archive1, $archive2) { - $asset = $asset->cloneFromDb; -} +$tag->commit; +WebGUI::Test->addToCleanup($tag); my $workflow = WebGUI::Workflow->create($session, { @@ -74,7 +69,7 @@ my $workflow = WebGUI::Workflow->create($session, mode => 'realtime', }, ); -addToCleanup($workflow); +WebGUI::Test->addToCleanup($workflow); my $activity = $workflow->addActivity('WebGUI::Workflow::Activity::ArchiveOldStories'); @@ -102,6 +97,7 @@ my $archivedAssets = $home->getLineage( cmp_bag( $archivedAssets, [ ], 'Nothing archived.'); +$archive2 = $archive2->cloneFromDb; $archive2->update({ archiveAfter => 5*24*3600, }); my $instance2 = WebGUI::Workflow::Instance->create($session, @@ -123,5 +119,5 @@ $archivedAssets = $home->getLineage( }, ); -cmp_bag( $archivedAssets, [ $weekStory->getId, $weekFolder->getId ], 'Nothing archived.'); +cmp_bag( $archivedAssets, [ $weekStory->getId, $weekFolder->getId ], 'archived two folders'); $creationDateSth->finish; diff --git a/t/Workflow/Activity/BucketPassiveAnalytics.t b/t/Workflow/Activity/BucketPassiveAnalytics.t index a0f728260..87865296c 100644 --- a/t/Workflow/Activity/BucketPassiveAnalytics.t +++ b/t/Workflow/Activity/BucketPassiveAnalytics.t @@ -1,18 +1,15 @@ -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; #use DB; use WebGUI::Test; -use WebGUI::Asset; use WebGUI::PassiveAnalytics::Rule; -use WebGUI::Workflow::Activity::BucketPassiveAnalytics; -use WebGUI::Text; use Test::More; +use Test::Deep; +use Data::Dumper; -plan tests => 1; # increment this value for each test you create +plan tests => 2; # increment this value for each test you create my $session = WebGUI::Test->session; $session->user({userId => 3}); @@ -21,6 +18,7 @@ WebGUI::Test->addToCleanup(SQL => 'delete from passiveLog'); WebGUI::Test->addToCleanup(SQL => 'delete from deltaLog'); WebGUI::Test->addToCleanup(SQL => 'delete from bucketLog'); WebGUI::Test->addToCleanup(SQL => 'delete from analyticRule'); +WebGUI::Test->addToCleanup(SQL => 'delete from PA_lastLog'); my $workflow = WebGUI::Workflow->new($session, 'PassiveAnalytics000001'); my $activities = $workflow->getActivities(); @@ -63,11 +61,12 @@ my @ruleSets = ( my @url2 = @ruleSets; while (my $spec = shift @url2) { my ($bucket, undef, $regexp) = @{ $spec }; - WebGUI::PassiveAnalytics::Rule->create($session, { bucketName => $bucket, regexp => $regexp }); + WebGUI::PassiveAnalytics::Rule->new($session, { bucketName => $bucket, regexp => $regexp }); } my @urls = map {$_->[1]} @ruleSets; -loadLogData($session, @urls); +#loadLogData($session, @urls); +repeatableLogData($session, 'passiveAnalyticsLog'); ##Build rulesets @@ -80,7 +79,28 @@ PAUSE: while (my $retval = $instance->run()) { } #DB::disable_profile(); -ok(1, 'One test'); +cmp_ok $counter, '<', 16, 'Successful completion of PA'; + +my $get_line = $session->db->read('select userId, Bucket, duration from bucketLog'); + +my @database_dump = (); +ROW: while ( 1 ) { + my @datum = $get_line->array(); + last ROW unless @datum; + push @database_dump, [ @datum ]; +} + +cmp_bag( + [ @database_dump ], + [ + ['user1', 'one', 10], + ['user1', 'two', 15], + ['user2', 'zero', 2], + ['user2', 'uno', 3], + ['user2', 'Other', 5], + ], + 'PA analysis completed, and calculated correctly' +) or diag Dumper(\@database_dump); sub loadLogData { my ($session, @urls) = @_; @@ -100,4 +120,24 @@ sub loadLogData { } } +sub repeatableLogData { + my ($session, $dataLogName) = @_; + $session->db->write('delete from passiveLog'); + my $insert = $session->db->prepare( + q!insert into passiveLog (userId, sessionId, timeStamp, url, assetId) VALUES (?,?,?,?,'assetId')! + ); + my $data_name = WebGUI::Test::collateral('passiveAnalyticsLog'); + open my $log_data, '<', $data_name or + die "Unable to open $data_name for reading: $!"; + local $_; + while (<$log_data>) { + next if /^\s*#/; + s/#\.*$//; + chomp; + my @data = split; + $insert->execute([@data]); + } + $insert->finish; +} + #vim:ft=perl diff --git a/t/Workflow/Activity/CalendarUpdateFeeds.t b/t/Workflow/Activity/CalendarUpdateFeeds.t index c8678ecc6..2a1c13499 100644 --- a/t/Workflow/Activity/CalendarUpdateFeeds.t +++ b/t/Workflow/Activity/CalendarUpdateFeeds.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,13 +8,10 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use WebGUI::Test; use WebGUI::Session; -use WebGUI::Utility; use WebGUI::Workflow::Activity::CalendarUpdateFeeds; use Test::More; diff --git a/t/Workflow/Activity/DeleteExpiredSessions.t b/t/Workflow/Activity/DeleteExpiredSessions.t index 6f0206128..89468637c 100644 --- a/t/Workflow/Activity/DeleteExpiredSessions.t +++ b/t/Workflow/Activity/DeleteExpiredSessions.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,13 +8,10 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use WebGUI::Test; use WebGUI::Session; -use WebGUI::Utility; use WebGUI::Workflow::Activity::DeleteExpiredSessions; use Test::More; @@ -46,7 +43,7 @@ $retVal = $instance1->run(); is($retVal, 'complete', 'cleanup: activity complete'); $retVal = $instance1->run(); is($retVal, 'done', 'cleanup: activity is done'); -$instance1->delete; +$instance1->delete('skipNotify'); my $origSessionTimeout = $session->setting->get('sessionTimeout'); @@ -56,14 +53,14 @@ my $scratchCount = $session->db->quickScalar('select count(*) from userSessionSc my @sessions; foreach (1..2) { - push @sessions, WebGUI::Session->open(WebGUI::Test->root, WebGUI::Test->file); + push @sessions, WebGUI::Session->open(WebGUI::Test->file); } ##Force automatic expiration of the sessions $session->setting->set('sessionTimeout', -500); foreach (1..2) { - push @sessions, WebGUI::Session->open(WebGUI::Test->root, WebGUI::Test->file); + push @sessions, WebGUI::Session->open(WebGUI::Test->file); } $session->setting->set('sessionTimeout', $origSessionTimeout ); @@ -80,6 +77,7 @@ my $instance2 = WebGUI::Workflow::Instance->create($session, skipSpectreNotification => 1, } ); +WebGUI::Test->addToCleanup($instance2); my $counter = 0; PAUSE: while ($retVal = $instance2->run()) { @@ -96,7 +94,7 @@ is ($newSessionCount, $sessionCount+2, 'two of the sessions were deleted'); is ($newScratchCount, $scratchCount+2, 'scratch from both sessions cleaned up'); foreach my $testSession (@sessions) { - $testSession->var->end; + $testSession->end; $testSession->close; } diff --git a/t/Workflow/Activity/ExpireIncompleteSurveyResponses.t b/t/Workflow/Activity/ExpireIncompleteSurveyResponses.t index 4df709ee2..8180fa216 100644 --- a/t/Workflow/Activity/ExpireIncompleteSurveyResponses.t +++ b/t/Workflow/Activity/ExpireIncompleteSurveyResponses.t @@ -2,8 +2,6 @@ use strict; use warnings; -use FindBin qw($Bin); -use lib "$FindBin::Bin/../../lib"; use WebGUI::Test; use Test::More; @@ -39,7 +37,7 @@ WebGUI::Test->addToCleanup($user); my $survey = WebGUI::Asset->getImportNode($session)->addChild( { className => 'WebGUI::Asset::Wobject::Survey', } ); WebGUI::Test->addToCleanup(WebGUI::VersionTag->getWorking($session)); WebGUI::Test->addToCleanup($survey); -my $sJSON = $survey->surveyJSON; +my $sJSON = $survey->getSurveyJSON; $sJSON->newObject([0]); # add a question to 0th section $sJSON->update([0,0], { questionType => 'Yes/No' }); $survey->persistSurveyJSON; diff --git a/t/Workflow/Activity/ExtendCalendarRecurrences.t b/t/Workflow/Activity/ExtendCalendarRecurrences.t index befc87a97..3f06eb88b 100644 --- a/t/Workflow/Activity/ExtendCalendarRecurrences.t +++ b/t/Workflow/Activity/ExtendCalendarRecurrences.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -9,10 +9,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------ -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; -use lib "$FindBin::Bin/../../t/lib"; use Test::More; use WebGUI::Test; use WebGUI::Session; @@ -21,10 +18,9 @@ use DateTime; use Data::Dumper; my $session = WebGUI::Test->session; -my $temp = WebGUI::Asset->getTempspace($session); +my $temp = WebGUI::Test->asset; my $tag = WebGUI::VersionTag->getWorking($session); -WebGUI::Test::addToCleanup($tag); my $calendar = $temp->addChild( { className => 'WebGUI::Asset::Wobject::Calendar' } @@ -57,11 +53,6 @@ my $clipped_event = $calendar->addChild( ); $clipped_event->cut; -$tag->commit; -foreach my $asset($calendar, $event, $clipped_event, $trashed_event) { - $asset = $asset->cloneFromDb; -} - my $recurId = $event->setRecurrence( { recurType => 'monthDay', every => 2, @@ -86,6 +77,9 @@ $clipped_event->setRecurrence( } ); +$tag->commit; +WebGUI::Test->addToCleanup($tag); + my $workflow = WebGUI::Workflow->create( $session, { enabled => 1, @@ -119,9 +113,11 @@ my $instance = WebGUI::Workflow::Instance->create( ); +my $count = 0; while (my $status = $instance->run ne 'complete') { note $status; $instance->run; + last if $count++ > 30; } #my $sql = q{ diff --git a/t/Workflow/Activity/GetCsMail.t b/t/Workflow/Activity/GetCsMail.t index 2bba5d725..b95495da3 100644 --- a/t/Workflow/Activity/GetCsMail.t +++ b/t/Workflow/Activity/GetCsMail.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -9,12 +9,12 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------ -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use Test::More; use WebGUI::Test; # Must use this before any other WebGUI modules +use WebGUI::Test::MockAsset; use WebGUI::Session; +use WebGUI::Exception; use Test::MockObject; use Test::MockObject::Extends; @@ -102,7 +102,7 @@ $post2mock->set_always('getId', $post2_id); { # simulate asset not found - WebGUI::Test->mockAssetId($post2_id, undef); + WebGUI::Test::MockAsset->mock_id($post2_id, sub { WebGUI::Error::ObjectNotFound->throw }); $getmock->set_series('getNextMessage', { from => 'admin@localhost', parts => ['parts'], @@ -112,11 +112,11 @@ $post2mock->set_always('getId', $post2_id); }); $activity->execute($csmock); is $parentAsset->getId, $cs_id, 'add as new thread to current cs if reply to nonexistant post'; - WebGUI::Test->unmockAssetId($post2_id); + WebGUI::Test::MockAsset->unmock_id($post2_id); } { - WebGUI::Test->mockAssetId($post2_id, $post2mock); + WebGUI::Test::MockAsset->mock_id($post2_id, $post2mock); $getmock->set_series('getNextMessage', { from => 'admin@localhost', parts => ['parts'], @@ -126,11 +126,11 @@ $post2mock->set_always('getId', $post2_id); }); $activity->execute($csmock); is $parentAsset->getId, $cs_id, 'add as new thread to current cs if reply to post in another CS'; - WebGUI::Test->unmockAssetId($post2_id); + WebGUI::Test::MockAsset->unmock_id($post2_id); } { - WebGUI::Test->mockAssetId($post_id, $postmock); + WebGUI::Test::MockAsset->mock_id($post_id, $postmock); $getmock->set_series('getNextMessage', { from => 'admin@localhost', parts => ['parts'], @@ -140,7 +140,7 @@ $post2mock->set_always('getId', $post2_id); }); $activity->execute($csmock); is $parentAsset->getId, $post_id, 'add as reply to post if reply to post in current CS'; - WebGUI::Test->unmockAssetId($post_id); + WebGUI::Test::MockAsset->unmock_id($post_id); } #vim:ft=perl diff --git a/t/Workflow/Activity/NotifyAboutLowStock.t b/t/Workflow/Activity/NotifyAboutLowStock.t index 01670da86..fbd1a0665 100644 --- a/t/Workflow/Activity/NotifyAboutLowStock.t +++ b/t/Workflow/Activity/NotifyAboutLowStock.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use WebGUI::Test; use WebGUI::Asset; @@ -32,7 +30,9 @@ WebGUI::Test->addToCleanup(sub { WebGUI::Test->cleanupAdminInbox; }); WebGUI::Test->addToCleanup(SQL => "delete from mailQueue where message like '%Threshold=15%'"); my $inbox = WebGUI::Inbox->new($session); -my $import = WebGUI::Asset->getImportNode($session); +my $import = WebGUI::Test->asset; + +my $tag = WebGUI::VersionTag->getWorking($session); my $posters = $import->addChild({ className => 'WebGUI::Asset::Sku::Product', @@ -40,10 +40,6 @@ my $posters = $import->addChild({ title => "Red's Posters", }, undef, time()-15, { skipAutoCommitWorkflows => 1, }); -my $versionTag = WebGUI::VersionTag->getWorking($session); -$versionTag->commit(); -addToCleanup($versionTag); - my $ritaVarId = $posters->setCollateral('variantsJSON', 'variantId', 'new', { shortdesc => 'Rita Hayworth', @@ -74,6 +70,9 @@ my $marilynVarId = $posters->setCollateral('variantsJSON', 'variantId', 'new', }, ); +$tag->commit; +WebGUI::Test->addToCleanup($tag); + my $workflow = WebGUI::Workflow->create($session, { enabled => 1, @@ -81,7 +80,7 @@ my $workflow = WebGUI::Workflow->create($session, mode => 'realtime', }, ); -addToCleanup($workflow); +WebGUI::Test->addToCleanup($workflow); my $threshold = $workflow->addActivity('WebGUI::Workflow::Activity::NotifyAboutLowStock'); $threshold->set('className' , 'WebGUI::Activity::NotifyAboutLowStock'); @@ -156,6 +155,7 @@ WebGUI::Test->addToCleanup(sub { $session->db->write("delete from Product where assetId=?",[$otherPosters->getId]); $session->db->write("delete from assetIndex where assetId=?",[$otherPosters->getId]); }); +my $otherTag = WebGUI::VersionTag->getWorking($session); my $movie_posters = $import->addChild({ className => 'WebGUI::Asset::Sku::Product', url => 'movie_posters', @@ -171,8 +171,7 @@ my $movieVarId = $movie_posters->setCollateral('variantsJSON', 'variantId', 'new quantity => 5, }, ); -my $otherTag = WebGUI::VersionTag->getWorking($session); -addToCleanup($otherTag); +WebGUI::Test->addToCleanup($otherTag); $otherTag->commit; $threshold->set('warningLimit' , 10); @@ -199,7 +198,8 @@ my $instance4 = WebGUI::Workflow::Instance->create($session, ); #break the asset $session->db->write('delete from asset where assetId=?', [$otherPosters->getId]); -is(WebGUI::Asset->new($session, $otherPosters->getId), undef, 'middle asset broken'); +$otherPosters->purgeCache; +dies_ok { WebGUI::Asset->newById($session, $otherPosters->getId); } 'middle asset broken'; $retVal = $instance4->run(); $retVal = $instance4->run(); diff --git a/t/Workflow/Activity/RecheckVATNumber.t b/t/Workflow/Activity/RecheckVATNumber.t index 7f73bf065..8e191e96d 100644 --- a/t/Workflow/Activity/RecheckVATNumber.t +++ b/t/Workflow/Activity/RecheckVATNumber.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -13,9 +13,7 @@ # # -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use Test::More; use Test::Deep; use WebGUI::Test; # Must use this before any other WebGUI modules @@ -48,7 +46,7 @@ plan tests => 9; # Increment this number for each test you create my $number = 'NL34567890'; my $user = WebGUI::User->new( $session, 'new' ); my $userId = $user->userId; - addToCleanup( $user ); + WebGUI::Test->addToCleanup( $user ); # --- valid number ---------------- $return = 'VALID'; @@ -96,7 +94,7 @@ sub createInstance { } ); my $activity = $workflow->addActivity( 'WebGUI::Workflow::Activity::RecheckVATNumber' ); - addToCleanup( $workflow ); + WebGUI::Test->addToCleanup( $workflow ); my $instance = WebGUI::Workflow::Instance->create( $session, { workflowId => $workflow->getId, diff --git a/t/Workflow/Activity/RemoveOldCarts.t b/t/Workflow/Activity/RemoveOldCarts.t index b6b946d31..d7ac2fac1 100644 --- a/t/Workflow/Activity/RemoveOldCarts.t +++ b/t/Workflow/Activity/RemoveOldCarts.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,46 +8,41 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use WebGUI::Test; use WebGUI::Session; -use WebGUI::Utility; use WebGUI::Workflow::Activity::RemoveOldCarts; use WebGUI::Shop::Cart; use Test::More; use Test::Deep; -plan tests => 6; # increment this value for each test you create +plan tests => 7; # increment this value for each test you create my $session = WebGUI::Test->session; $session->user({userId => 3}); -my $root = WebGUI::Asset->getRoot($session); +my $root = WebGUI::Test->asset; my $donation = $root->addChild({ className => 'WebGUI::Asset::Sku::Donation', title => 'test donation', }); -my $tag = WebGUI::VersionTag->getWorking($session); -$tag->commit; -WebGUI::Test->addToCleanup($tag); - my $cart1 = WebGUI::Shop::Cart->create($session); +WebGUI::Test->addToCleanup($cart1); -my $session2 = WebGUI::Session->open(WebGUI::Test->root, WebGUI::Test->file); +my $session2 = WebGUI::Session->open(WebGUI::Test->file); $session2->user({userId => 3}); WebGUI::Test->addToCleanup($session2); my $cart2 = WebGUI::Shop::Cart->create($session2); $cart2->update({creationDate => time()-10000}); +WebGUI::Test->addToCleanup($cart2); my @cartIds = $session->db->buildArray('select cartId from cart'); -cmp_bag( +cmp_deeply( \@cartIds, - [ $cart1->getId, $cart2->getId ], + superbagof( $cart1->getId, $cart2->getId ), 'Made two carts for testing' ); @@ -57,7 +52,10 @@ my $item1 = $cart1->addItem($donation); $donation->applyOptions({ price => 2222}); my $item2 = $cart2->addItem($donation); -my @itemIds = $session->db->buildArray('select itemId from cartItem'); +my @itemIds = $session->db->buildArray( + 'select itemId from cartItem where cartId IN ( ?,? )', + [ $cart1->getId, $cart2->getId ], +); cmp_bag( \@itemIds, [ $item1->getId, $item2->getId ], @@ -71,9 +69,7 @@ my $workflow = WebGUI::Workflow->create($session, mode => 'realtime', }, ); -my $guard0 = cleanupGuard($workflow); -my $guard1 = cleanupGuard($cart1); -my $guard2 = cleanupGuard($cart2); +WebGUI::Test->addToCleanup($workflow); my $cartNuker = $workflow->addActivity('WebGUI::Workflow::Activity::RemoveOldCarts'); $cartNuker->set('cartTimeout', 3600); @@ -94,13 +90,17 @@ is($retVal, 'done', 'cleanup: activity is done'); $instance1->delete('skipNotify'); @cartIds = $session->db->buildArray('select cartId from cart'); -cmp_bag( +cmp_deeply( \@cartIds, - [ $cart1->getId, ], - 'Deleted 1 cart, the correct one' + superbagof( $cart1->getId, ), + 'Cart 1 remains' ); +ok( !grep( { $_ eq $cart2->getId } @cartIds ), 'Cart 2 deleted' ); -@itemIds = $session->db->buildArray('select itemId from cartItem'); +@itemIds = $session->db->buildArray( + 'select itemId from cartItem where cartId IN ( ?,? )', + [ $cart1->getId, $cart2->getId ], +); cmp_bag( \@itemIds, [ $item1->getId, ], diff --git a/t/Workflow/Activity/SendNewsletters.t b/t/Workflow/Activity/SendNewsletters.t index 2ea37884e..999e0695a 100644 --- a/t/Workflow/Activity/SendNewsletters.t +++ b/t/Workflow/Activity/SendNewsletters.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -9,9 +9,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------ -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use Test::More; use Test::Deep; use Data::Dumper; @@ -19,6 +17,7 @@ use WebGUI::Test; # Must use this before any other WebGUI modules use WebGUI::Session; use Test::MockObject; use Test::MockObject::Extends; +use WebGUI::Test::MockAsset; #---------------------------------------------------------------------------- # Init @@ -40,15 +39,13 @@ $sendmock->fake_module('WebGUI::Mail::Send', ); ##Create Assets; -my $home = WebGUI::Asset->getDefault($session); -my $versionTag = WebGUI::VersionTag->getWorking($session); +my $home = WebGUI::Test->asset; #1234567890123456789012# my $templateId = 'NEWSLETTER_TEMPLATE___'; -my $templateMock = Test::MockObject->new({}); -$templateMock->set_isa('WebGUI::Asset::Template'); -$templateMock->set_always('getId', $templateId); +my $templateMock = WebGUI::Test::MockAsset->new('WebGUI::Asset::Template'); +$templateMock->mock_id($templateId); my $templateVars; $templateMock->mock('process', sub { $templateVars = $_[1]; } ); @@ -67,10 +64,9 @@ my $thread = $cs->addChild({ title => 'Test Thread', content => 'This is the content', synopsis => 'This is the synopsis', -}, undef, undef, {skipAutoCommitWorkflows => 1,}); - -$versionTag->commit; -WebGUI::Test->addToCleanup($versionTag); +},); +$thread->setSkipNotification; +$thread->commit; ##Setup metadata $session->setting->set('metaDataEnabled', 1); @@ -97,7 +93,6 @@ $activity->set_always('getTTL', 60); $activity->set_always('COMPLETE', 'complete'); { - WebGUI::Test->mockAssetId($templateId, $templateMock); $activity->execute(); cmp_deeply( $templateVars, @@ -116,7 +111,6 @@ $activity->set_always('COMPLETE', 'complete'); ], } ); - WebGUI::Test->unmockAssetId($templateId); } foreach my $metadataId (keys %{ $cs->getMetaDataFields }) { diff --git a/t/Workflow/Activity/TrashExpiredEvents.t b/t/Workflow/Activity/TrashExpiredEvents.t index a89534965..dfa432c9a 100644 --- a/t/Workflow/Activity/TrashExpiredEvents.t +++ b/t/Workflow/Activity/TrashExpiredEvents.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,13 +8,10 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/../../lib"; use WebGUI::Test; use WebGUI::Session; -use WebGUI::Utility; use WebGUI::Workflow::Activity::TrashExpiredEvents; use WebGUI::Asset; @@ -30,7 +27,7 @@ my $bday = WebGUI::DateTime->new($session, WebGUI::Test->webguiBirthday)->cl my $now = WebGUI::DateTime->new($session, time())->cloneToUserTimeZone; my $tz = $session->datetime->getTimeZone(); -my $root = WebGUI::Asset->getRoot($session); +my $root = WebGUI::Test->asset; my $calendar = $root->addChild({ className => 'WebGUI::Asset::Wobject::Calendar', title => 'Test Calendar', @@ -41,7 +38,7 @@ my $wgBday = $calendar->addChild({ startDate => $bday->toDatabaseDate, endDate => $bday->toDatabaseDate, timeZone => $tz, -}, undef, undef, {skipAutoCommitWorkflows => 1}); +}); my $wrongBday = $calendar->addChild({ className => 'WebGUI::Asset::Event', @@ -49,12 +46,12 @@ my $wrongBday = $calendar->addChild({ startDate => $bday->toDatabaseDate, endDate => $bday->toDatabaseDate, timeZone => $tz, -}, undef, time()-5, {skipAutoCommitWorkflows => 1}); +}, undef, time()-5); $wrongBday->addRevision({ startDate => $now->toDatabaseDate, endDate => $now->toDatabaseDate, -}, undef, undef, {skipAutoCommitWorkflows => 1}); +},); my $nowEvent = $calendar->addChild({ className => 'WebGUI::Asset::Event', @@ -62,11 +59,7 @@ my $nowEvent = $calendar->addChild({ startDate => $now->toDatabaseDate, endDate => $now->toDatabaseDate, timeZone => $tz, -}, undef, undef, {skipAutoCommitWorkflows => 1}); - -my $tag = WebGUI::VersionTag->getWorking($session); -$tag->commit; -WebGUI::Test->addToCleanup($tag); +}, ); my $workflow = WebGUI::Workflow->create($session, { diff --git a/t/Workflow/Activity/UpdateAssetSubscribers.t b/t/Workflow/Activity/UpdateAssetSubscribers.t index d8d8617eb..8b6b1a579 100644 --- a/t/Workflow/Activity/UpdateAssetSubscribers.t +++ b/t/Workflow/Activity/UpdateAssetSubscribers.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -14,7 +14,6 @@ use lib "$FindBin::Bin/../../lib"; use WebGUI::Test; use WebGUI::Session; -use WebGUI::Utility; use WebGUI::Workflow::Activity::UpdateAssetSubscribers; use WebGUI::Asset; @@ -32,16 +31,14 @@ my $betterGroup = WebGUI::Group->new($session, "new"); ##New group for grou my $oldUser = WebGUI::User->create($session); ##User who should be unsubscribed my $betterUser = WebGUI::User->create($session); ##User who should remain subscribed my $otherUser = WebGUI::User->create($session); ##Just a user, we should never see him -my $root = WebGUI::Asset->getRoot($session); +my $root = WebGUI::Test->asset; my $cs = $root->addChild({ className => 'WebGUI::Asset::Wobject::Collaboration', title => 'Test Calendar', subscriptionGroupId => $subscriberGroup->getId, groupIdView => $betterGroup->getId, }); -my $tag = WebGUI::VersionTag->getWorking($session); -$tag->commit; -WebGUI::Test->addToCleanup($tag, $oldGroup, $subscriberGroup, $betterGroup, $oldUser, $betterUser, $otherUser); +WebGUI::Test->addToCleanup($oldGroup, $subscriberGroup, $betterGroup, $oldUser, $betterUser, $otherUser); $subscriberGroup->addUsers([$oldUser->getId, $betterUser->getId, ]); $betterGroup->addUsers([$betterUser->getId, ]); @@ -63,7 +60,7 @@ my $instance1 = WebGUI::Workflow::Instance->create($session, workflowId => $workflow->getId, skipSpectreNotification => 1, className => 'WebGUI::Asset', - methodName => 'newByDynamicClass', + methodName => 'newById', parameters => $cs->getId, } ); diff --git a/t/Workflow/Instance.t b/t/Workflow/Instance.t index e4a2928b3..821e2b07c 100644 --- a/t/Workflow/Instance.t +++ b/t/Workflow/Instance.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 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,9 +12,7 @@ # Tests for WebGUI::Workflow::Instance # -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use Test::More; use Test::Deep; use Test::Exception; @@ -69,7 +67,7 @@ my $wf = WebGUI::Workflow->create( } ); isa_ok($wf, 'WebGUI::Workflow', 'workflow created for test'); -addToCleanup($wf); +WebGUI::Test->addToCleanup($wf); # create an instance of $wfId my $properties = { @@ -87,13 +85,14 @@ cmp_ok(abs ($instance->get('lastUpdate')-$dateUpdated), '<=', 3, 'Date updated f my $otherInstance = WebGUI::Workflow::Instance->create($session, $properties); is ($otherInstance, undef, 'create: only allows one instance of a singleton to be created'); -WebGUI::Test->interceptLogging; - -$instance->set({ 'parameters' => {session => 1}, }); -$otherInstance = WebGUI::Workflow::Instance->create($session, {workflowId => $wf->getId, parameters => { session => 1,} }); -is($otherInstance, undef, 'create: another singleton instance can not be created if it the same parameters as a currently existing instance'); -my $expectedId = $wf->getId; -like($WebGUI::Test::logger_info, qr/An instance of singleton workflow $expectedId already exists/, 'create: Warning logged for trying to make another singleton'); +WebGUI::Test->interceptLogging( sub { + my $log_data = shift; + $instance->set({ 'parameters' => {session => 1}, }); + $otherInstance = WebGUI::Workflow::Instance->create($session, {workflowId => $wf->getId, parameters => { session => 1,} }); + is($otherInstance, undef, 'create: another singleton instance can not be created if it the same parameters as a currently existing instance'); + my $expectedId = $wf->getId; + like($log_data->{info}, qr/An instance of singleton workflow $expectedId already exists/, 'create: Warning logged for trying to make another singleton'); +} ); $otherInstance = WebGUI::Workflow::Instance->create($session, {workflowId => $wf->getId, parameters => { session => 2,}}); isnt ($otherInstance, undef, 'create: another singleton instance can be created if it has different parameters'); @@ -180,7 +179,7 @@ my $wf2 = WebGUI::Workflow->create( type => 'None', } ); -addToCleanup($wf2); +WebGUI::Test->addToCleanup($wf2); my $wf2Instance = WebGUI::Workflow::Instance->create($session, {workflowId => $wf2->getId}); cmp_deeply($wf2Instance->get('parameters'), {}, 'get returns {} for parameters when there are no parameters stored'); diff --git a/t/_bug.skeleton b/t/_bug.skeleton index 90f129230..20989d798 100644 --- a/t/_bug.skeleton +++ b/t/_bug.skeleton @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/_test.skeleton b/t/_test.skeleton index 2741a3ab9..520f97830 100644 --- a/t/_test.skeleton +++ b/t/_test.skeleton @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/badExtrasMacros.t b/t/badExtrasMacros.t index c7434cc4b..c70850e4a 100644 --- a/t/badExtrasMacros.t +++ b/t/badExtrasMacros.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,10 +8,8 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; use warnings; -use lib "$FindBin::Bin/lib"; ##t/lib use WebGUI::Test; use WebGUI::Session; @@ -25,7 +23,6 @@ use Test::More; # increment this value for each test you create my $numTests = 0; my $session = WebGUI::Test->session; -my $lib = WebGUI::Test->lib; ##Find the name of the International macro in the user's config file. diff --git a/t/badGatewayMacros.t b/t/badGatewayMacros.t index 2d74ec74c..a8c6f235c 100644 --- a/t/badGatewayMacros.t +++ b/t/badGatewayMacros.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,10 +8,8 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; use warnings; -use lib "$FindBin::Bin/lib"; ##t/lib use WebGUI::Test; use WebGUI::Session; @@ -25,7 +23,6 @@ use Test::More; # increment this value for each test you create my $numTests = 0; my $session = WebGUI::Test->session; -my $lib = WebGUI::Test->lib; ##Find the name of the International macro in the user's config file. diff --git a/t/hardcodedExtras.t b/t/hardcodedExtras.t index ca30a269d..41b84ee72 100644 --- a/t/hardcodedExtras.t +++ b/t/hardcodedExtras.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,10 +8,8 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; use warnings; -use lib "$FindBin::Bin/lib"; ##t/lib use WebGUI::Test; use WebGUI::Session; @@ -25,7 +23,6 @@ use Test::More; # increment this value for each test you create my $numTests = 0; my $session = WebGUI::Test->session; -my $lib = WebGUI::Test->lib; my $hardcodedExtras = qr!(?:href|src)=.\^?/[(;]?extras/!; diff --git a/t/i18n/adminConsole.t b/t/i18n/adminConsole.t index d8d127df4..9879e2d9c 100644 --- a/t/i18n/adminConsole.t +++ b/t/i18n/adminConsole.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,10 +8,8 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; use warnings; -use lib "$FindBin::Bin/../lib"; ##t/lib use WebGUI::Test; use WebGUI::International; @@ -25,7 +23,6 @@ use Test::More; # increment this value for each test you create my $numTests = 0; my $session = WebGUI::Test->session; -my $lib = WebGUI::Test->lib; # put your tests here diff --git a/t/i18n/critic_labels.t b/t/i18n/critic_labels.t index 58c10bc7f..8e052b725 100644 --- a/t/i18n/critic_labels.t +++ b/t/i18n/critic_labels.t @@ -1,6 +1,6 @@ # vim:syntax=perl #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -14,9 +14,7 @@ # use Path::Class; -use FindBin; use strict; -use lib "$FindBin::Bin/../lib"; use Test::More; plan skip_all => 'set CODE_COP to enable this test' unless $ENV{CODE_COP}; @@ -33,6 +31,6 @@ if ($@) { # Init my $session = WebGUI::Test->session; -my $label_profile = Path::Class::File->new( WebGUI::Test->root , 't', 'i18n', 'perlcriticrc'); +my $label_profile = Path::Class->dir(WebGUI::Test->lib)->parent->subdir('t')->subdir('i18n')->file('perlcritic'); Test::Perl::Critic->import(-profile => $label_profile->stringify); all_critic_ok(WebGUI::Test->lib); diff --git a/t/i18n/help.t b/t/i18n/help.t index 0d2e6b57a..595932658 100644 --- a/t/i18n/help.t +++ b/t/i18n/help.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,15 +8,13 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; use warnings; -use lib "$FindBin::Bin/../lib"; ##t/lib use WebGUI::Test; use WebGUI::Operation::Help; use WebGUI::International; -use WebGUI::Session; +use WebGUI::Pluggable; use Data::Dumper; #The goal of this test is to verify all the i18n labels in @@ -28,14 +26,14 @@ my $numTests = 0; my $session = WebGUI::Test->session; -my @helpFileSet = WebGUI::Operation::Help::_getHelpFilesList($session); +my @helpFileSet = WebGUI::Pluggable::findAndLoad('WebGUI::Help'); my %helpTable; -foreach my $helpSet (@helpFileSet) { - my $helpName = $helpSet->[1]; - my $help = WebGUI::Operation::Help::_load($session, $helpName); - $helpTable{ $helpName } = $help; +foreach my $helpFile (@helpFileSet) { + my ($namespace) = $helpFile =~ m{WebGUI::Help::(.+$)}; + my $help = WebGUI::Operation::Help::_load($session, $namespace); + $helpTable{ $namespace } = $help; } ##Scan #1, find all labels in the help system. body, title, @fields diff --git a/t/i18n/template.t b/t/i18n/template.t index cc5c365c4..966110f07 100644 --- a/t/i18n/template.t +++ b/t/i18n/template.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,10 +8,8 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; use warnings; -use lib "$FindBin::Bin/../lib"; ##t/lib use WebGUI::Test; use WebGUI::Operation::Help; @@ -28,7 +26,6 @@ use Test::More; # increment this value for each test you create my $numTests = 0; my $session = WebGUI::Test->session; -my $lib = WebGUI::Test->lib; ## Remove all macros but International, and set them to call WebGUI::Macro::Callback WebGUI::Test->originalConfig('macros'); diff --git a/t/lib/WebGUI/Asset/JSONCollateralDummy.pm b/t/lib/WebGUI/Asset/JSONCollateralDummy.pm index 47eaabecd..cb52a8d54 100644 --- a/t/lib/WebGUI/Asset/JSONCollateralDummy.pm +++ b/t/lib/WebGUI/Asset/JSONCollateralDummy.pm @@ -3,7 +3,7 @@ package WebGUI::Asset::JSONCollateralDummy; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -19,6 +19,26 @@ use Tie::IxHash; use Class::C3; use base qw/WebGUI::JSONCollateral WebGUI::Asset/; +use strict; +use Moose; +use WebGUI::Definition::Asset; +extends 'WebGUI::Asset'; + +define assetName => 'JSON Collateral Dummy'; +define tableName => 'jsonCollateralDummy'; +define icon => 'assets.gif'; + +property jsonField => ( + fieldType => 'textarea', + noFormPost => 1, + default => sub { [] }, + traits => ['Array', 'WebGUI::Definition::Meta::Property::Serialize',], + isa => 'WebGUI::Type::JSONArray', + coerce => 1, + ); + +with 'WebGUI::Role::Asset::JSONCollateral'; + =head1 NAME Package WebGUI::Asset::JSONCollateral @@ -40,39 +60,7 @@ These methods are available from this class: =cut -#------------------------------------------------------------------- -=head2 definition ( ) - -=cut - -sub definition { - my $class = shift; - my $session = shift; - my $definition = shift || []; - my %properties; - tie %properties, 'Tie::IxHash'; - %properties = ( - jsonField => { - label => 'jsonField', - hoverHelp => 'Not really needed, it is for internal data in this test case', - fieldType => 'textarea', - serialize => 1, - defaultValue => [], - noFormPost => 1, - }, - ); - push(@{$definition}, { - assetName=>'JSON Collateral Dummy', - tableName=>'jsonCollateralDummy', - autoGenerateForms=>1, - className=>'WebGUI::Asset::JSONCollateralDummy', - icon=>'assets.gif', - properties=>\%properties - } - ); - return $class->next::method($session, $definition); -} 1; diff --git a/t/lib/WebGUI/Asset/RssAspectDummy.pm b/t/lib/WebGUI/Asset/RssAspectDummy.pm index dc685b211..7b327f1e9 100644 --- a/t/lib/WebGUI/Asset/RssAspectDummy.pm +++ b/t/lib/WebGUI/Asset/RssAspectDummy.pm @@ -3,7 +3,7 @@ package WebGUI::Asset::RssAspectDummy; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using @@ -15,9 +15,14 @@ package WebGUI::Asset::RssAspectDummy; =cut use strict; -use Tie::IxHash; -use Class::C3; -use base qw/WebGUI::AssetAspect::RssFeed WebGUI::Asset/; +use Moose; +use WebGUI::Definition::Asset; +extends 'WebGUI::Asset'; + +define assetName => 'RssAspectDummy'; +define icon => 'asset.gif'; + +with 'WebGUI::Role::Asset::RssFeed'; =head1 NAME @@ -25,7 +30,7 @@ Package WebGUI::Asset::RssAspectDummy =head1 DESCRIPTION -A dummy module for testing the RssAspect. The module really doesn't +A dummy module for testing the Rss Role. The module really doesn't do anything, except provide suport modules for testing. The module inherits directly from WebGUI::Asset. diff --git a/t/lib/WebGUI/Form/FormTest.pm b/t/lib/WebGUI/Form/FormTest.pm index c042a3e7e..4f47e7ad4 100644 --- a/t/lib/WebGUI/Form/FormTest.pm +++ b/t/lib/WebGUI/Form/FormTest.pm @@ -3,7 +3,7 @@ package WebGUI::Form::FormTest; =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using diff --git a/t/lib/WebGUI/Form_Checking.pm b/t/lib/WebGUI/Form_Checking.pm index e490ce390..d871b31db 100644 --- a/t/lib/WebGUI/Form_Checking.pm +++ b/t/lib/WebGUI/Form_Checking.pm @@ -1,34 +1,23 @@ package WebGUI::Form_Checking; -use Test::MockObject; use Test::More; use Test::Deep; +use Hash::MultiValue; sub auto_check { my ($session, $formType, $testBlock) = @_; - my $origSessionRequest = $session->{_request}; ##Create a by-name interface to the test to simplify the ##mocked request. my %tests = map { $_->{key} => $_ } @{ $testBlock }; is(scalar keys %tests, scalar @{ $testBlock }, 'no collisions in testBlock'); - my $request = Test::MockObject->new; - $request->mock('body', - sub { - my ($self, $value) = @_; - return unless exists $tests{$value}; - if (ref $tests{$value}->{testValue} eq "ARRAY") { - return @{ $tests{$value}->{testValue} } ; - } - else { - return $tests{$value}->{testValue}; - } - } - ); - $request->mock('param', sub {shift->body(@_)}); - - $session->{_request} = $request; + my $param_hash = Hash::MultiValue->from_mixed( + map { $_->{key} => $_->{testValue} } @{ $testBlock } + ); + local $session->request->env->{'plack.request.query'} = $param_hash; + local $session->request->env->{'plack.request.body'} = $param_hash; + local $session->request->env->{'plack.request.merged'} = $param_hash; foreach my $test ( @{ $testBlock } ) { $test->{dataType} ||= 'SCALAR'; @@ -42,8 +31,6 @@ sub auto_check { cmp_bag(\@value, $test->{expected}, $test->{comment}); } } - - $session->{_request} = $origSessionRequest; } @@ -74,7 +61,7 @@ Usage: # Reset the session back $session->{_request} = $old_session; - + =cut sub get_request diff --git a/t/lib/WebGUI/PseudoRequest.pm b/t/lib/WebGUI/PseudoRequest.pm deleted file mode 100644 index 2526ff2c5..000000000 --- a/t/lib/WebGUI/PseudoRequest.pm +++ /dev/null @@ -1,441 +0,0 @@ -package WebGUI::PseudoRequest; - -=head1 LEGAL - - ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. - ------------------------------------------------------------------- - Please read the legal notices (docs/legal.txt) and the license - (docs/license.txt) that came with this distribution before using - this software. - ------------------------------------------------------------------- - http://www.plainblack.com info@plainblack.com - ------------------------------------------------------------------- - -=cut - -use strict; - -use Test::MockObject; - -BEGIN { - Test::MockObject->fake_module( - 'Apache2::Cookie', - new => sub { - my $class = shift; - my $self = Test::MockObject->new; - $self->set_isa($class); - $self->set_true(qw(expires domain bake)); - }, - ); - - Test::MockObject->fake_module('APR::Request::Apache2', - handle => sub { - return $_[1]; - }, - ); -} - -use WebGUI::PseudoRequest::Headers; -use WebGUI::PseudoRequest::Upload; - -=head1 NAME - -Package WebGUI::PseudoRequest - -=head1 DESCRIPTION - -This is an almost complete imitation of Apache2::Request. You can use this package to -create a request object that will work with WebGUI, without actually being inside -the mod_perl environment. - -Why in the world would you want to do this? Well, when doing API testing sometimes -you run across things that require a request object, but you don't really want to -fire up Apache in order to do it. This will let you bypass that. - -=head2 new - -Construct a new PseudoRequest object. Creates a new Headers object as well and places -it inside the PseudoRequest object. - -=cut - -sub new { - my $this = shift; - my $class = ref($this) || $this; - my $headers = WebGUI::PseudoRequest::Headers->new(); - my $self = { headers_out => $headers, headers_in => {} }; - bless $self, $class; - return $self; -} - -#---------------------------------------------------------------------------- - -=head2 body ( [$value]) - -Compatibility method. Returns the requested form value, $value. If $value isn't passed in, returns -all form variables. - -=cut - - -sub body { - my $self = shift; - my $value = shift; - if ( !defined $value ) { - return if !$self->{body}; - return keys %{ $self->{body} } if wantarray; - return { %{ $self->{body} } }; - } - if (defined $self->{body}->{$value}) { - if (wantarray && ref $self->{body}->{$value} eq "ARRAY") { - return @{$self->{body}->{$value}}; - } - elsif (ref $self->{body}->{$value} eq "ARRAY") { - return $self->{body}->{$value}->[0]; - } - else { - return $self->{body}->{$value}; - } - } - else { - if (wantarray) { - return (); - } - else { - return undef; - } - } -} - -#---------------------------------------------------------------------------- - -=head2 setup_body ( $value ) - -Setup the object's body method so that it can be used. $value should be a hash ref of named -form variables and values. - -=cut - -sub setup_body { - my $self = shift; - my $value = shift; - $self->{body} = $value; -} - -#---------------------------------------------------------------------------- - -=head2 content_type ( [$value] ) - -Getter and setter for content_type. If $value is passed in, it will set the content_type of -the object to that. Returns the content_type stored in the object. - -=cut - -sub content_type { - my $self = shift; - my $value = shift; - if (defined $value) { - $self->{content_type} = $value; - } - return $self->{content_type}; -} - -#---------------------------------------------------------------------------- - -=head2 headers_in ( ) - -Mimics the behavior of Apache2::Request->headers_in. - -=cut - -sub headers_in { - my $self = shift; - return $self->{headers_in}; -} - -#---------------------------------------------------------------------------- - -=head2 headers_out ( ) - -Returns the PseudoRequst::Headers object stored in $self for access to the headers. - -=cut - -sub headers_out { - my $self = shift; - return $self->{headers_out}; ##return object for method chaining -} - -#---------------------------------------------------------------------------- - -=head2 no_cache ( [$value] ) - -Getter and setter for no_cache. If $value is passed in, it will set no_cache of -the object to that. Returns the no_cache value stored in the object. - -=cut - -sub no_cache { - my $self = shift; - my $value = shift; - if (defined $value) { - $self->{no_cache} = $value; - } - return $self->{no_cache}; -} - -#---------------------------------------------------------------------------- - -=head2 param ( [$value]) - -Compatibility method. Works exactly like the body method. - -=cut - -sub param { - my $self = shift; - $self->body(@_); -} - -#---------------------------------------------------------------------------- - -=head2 setup_param ( $value ) - -Setup the object's param method so that it can be used. $value should be a hash ref of named -form variables and values. - -=cut - -sub setup_param { - my $self = shift; - $self->setup_body(@_); -} - -#---------------------------------------------------------------------------- - -=head2 clear_output ( ) - -Clear the internally cached request output generated by calling the -C<print> method. - -=cut - -sub clear_output { - my $self = shift; - $self->{output} = ''; -} - -#---------------------------------------------------------------------------- - -=head2 get_output ( ) - -Get the internally cached request output generated by calling the -C<print> method. Returns it as a scalar. - -=cut - -sub get_output { - my $self = shift; - return $self->{output}; -} - -#---------------------------------------------------------------------------- - -=head2 method ( [ $method ] ) - -Getter/setter for the HTTP request method. - -=cut - -sub method { - my ($self, $newMethod) = @_; - my $method = $self->{method}; - if (defined $newMethod) { - $self->{method} = $newMethod; - } - return $method; -} - -#---------------------------------------------------------------------------- - -=head2 print ( @values ) - -Fake print method for the PseudoRequest object. It caches everything printed -to it by concatenating @values together, just like print would. Use clear_output -to clear the cached value, and get_output to access it. - -=cut - -sub print { - my $self = shift; - $self->{output} .= join '', @_; - return 1; -} - -#---------------------------------------------------------------------------- - -=head2 protocol ( $value ) - -Getter and setter for protocol. If $value is passed in, it will set the protocol of -the object to that. Returns the protocol value stored in the object. - -=cut - -sub protocol { - my $self = shift; - my $value = shift; - if (defined $value) { - $self->{protocol} = $value; - } - return $self->{protocol}; -} - -#---------------------------------------------------------------------------- - -=head2 status ( $value ) - -Getter and setter for status. If $value is passed in, it will set the status of -the object to that. Returns the status value stored in the object. - -=cut - -sub status { - my $self = shift; - my $value = shift; - if (defined $value) { - $self->{status} = $value; - } - return $self->{status}; -} - -#---------------------------------------------------------------------------- - -=head2 status_line ( $value ) - -Getter and setter for status_line. If $value is passed in, it will set the status_line of -the object to that. Returns the status_line value stored in the object. - -=cut - -sub status_line { - my $self = shift; - my $value = shift; - if (defined $value) { - $self->{status_line} = $value; - } - return $self->{status_line}; -} - -#---------------------------------------------------------------------------- - -=head2 upload ( $formName, [ $uploadFileHandler ] ) - -Getter and setter for upload objects, which are indexed in this object by $formName. -Returns what was stored in the slot referred to as $formName. If $formName is false, -it returns undef. - -=head3 $uploadFileHandle. - -$uploadFileHandle should be an array ref of WebGUI::PseudoRequest::Upload objects. If you -pass it $uploadFileHandle, it will set store the object under the name, $formName. - -=cut - -sub upload { - my $self = shift; - my $formName = shift; - my $uploadFileHandles = shift; - return unless $formName; - if (defined $uploadFileHandles) { - $self->{uploads}->{$formName} = $uploadFileHandles; - } - return @{ $self->{uploads}->{$formName} }; -} - -#---------------------------------------------------------------------------- - -=head2 uploadFiles ( $formName, $filesToUpload ) - -Convenience method for uploading several files at once into the PseudoRequest object, -all to be referenced off of $formName. If $formName is false, it returns undef. - -=head3 $fileToUpload - -$uploadFileHandle should be an array ref of complete paths to files. The method will -create one PseudoRequest::Upload object per file, then store the array ref -using the upload method. - -=cut - -sub uploadFiles { - my $self = shift; - my $formName = shift; - my $filesToUpload = shift; - return unless $formName; - return unless scalar $filesToUpload; - my @uploadObjects = (); - foreach my $file (@{ $filesToUpload }) { - my $upload = WebGUI::PseudoRequest::Upload->new($file); - push @uploadObjects, $upload; - } - $self->upload($formName, \@uploadObjects); -} - -#---------------------------------------------------------------------------- - -=head2 uri ( $value ) - -Getter and setter for uri. If $value is passed in, it will set the uri of -the object to that. Returns the uri value stored in the object. - -=cut - -sub uri { - my $self = shift; - my $value = shift; - if (defined $value) { - $self->{uri} = $value; - } - return $self->{uri}; -} - -#---------------------------------------------------------------------------- - -=head2 user ( $value ) - -Getter and setter for user. If $value is passed in, it will set the user of -the object to that. Returns the user value stored in the object. - -=cut - -sub user { - my $self = shift; - my $value = shift; - if (defined $value) { - $self->{user} = $value; - } - return $self->{user}; -} - -#---------------------------------------------------------------------------- - -=head2 jar ( $value ) - -Getter and setter for cookie jar. If $value is passed in, it will -set the cookie jar of the object to that. Returns the cookie jar -hash. - -=cut - -sub jar { - my $self = shift; - my $value = shift; - if (defined $value) { - $self->{jar} = $value; - } - return $self->{jar}; -} - -1; - diff --git a/t/lib/WebGUI/PseudoRequest/Headers.pm b/t/lib/WebGUI/PseudoRequest/Headers.pm deleted file mode 100644 index f6a68db92..000000000 --- a/t/lib/WebGUI/PseudoRequest/Headers.pm +++ /dev/null @@ -1,67 +0,0 @@ -package WebGUI::PseudoRequest::Headers; - -=head1 LEGAL - - ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. - ------------------------------------------------------------------- - Please read the legal notices (docs/legal.txt) and the license - (docs/license.txt) that came with this distribution before using - this software. - ------------------------------------------------------------------- - http://www.plainblack.com info@plainblack.com - ------------------------------------------------------------------- - -=cut - -use strict; - -=head1 NAME - -Package WebGUI::PseudoRequest::Headers - -=head2 new - -Construct a new PseudoRequest::Headers object. This is just for holding headers. -It doesn't do any magic. - -=cut - -sub new { - my $this = shift; - my $class = ref($this) || $this; - my $self = { headers => {} }; - bless $self, $class; - return $self; -} - -#---------------------------------------------------------------------------- - -=head2 set( $key, $value ) - -Set a key, value pair in the header object. - -=cut - -sub set { - my $self = shift; - my $key = shift; - my $value = shift; - $self->{headers}->{$key} = $value; -} - -#---------------------------------------------------------------------------- - -=head2 fetch - -Returns the entire internal hashref of headers. - -=cut - -sub fetch { - my $self = shift; - return $self->{headers}; -} - -1; - diff --git a/t/lib/WebGUI/PseudoRequest/Upload.pm b/t/lib/WebGUI/PseudoRequest/Upload.pm deleted file mode 100644 index 7a01d7f0b..000000000 --- a/t/lib/WebGUI/PseudoRequest/Upload.pm +++ /dev/null @@ -1,119 +0,0 @@ -package WebGUI::PseudoRequest::Upload; - -=head1 LEGAL - - ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. - ------------------------------------------------------------------- - Please read the legal notices (docs/legal.txt) and the license - (docs/license.txt) that came with this distribution before using - this software. - ------------------------------------------------------------------- - http://www.plainblack.com info@plainblack.com - ------------------------------------------------------------------- - -=cut - -use strict; -use File::Copy (); - -=head1 NAME - -Package WebGUI::PseudoRequest::Upload - -=head2 new ( [$file] ) - -Construct a new PseudoRequest::Upload object. This is just for holding headers. -It doesn't do any magic. - -=head3 $file - -The complete path to a file. If this is sent to new, it will go ahead and open -a filehandle to that file for you, saving you the need to call the fh, filename -and filesize methods. - -=cut - -sub new { - my $this = shift; - my $class = ref($this) || $this; - my $self = { - fh => undef, - size => 0, - filename => '', - output => '', - }; - my $file = shift; - if ($file and -e $file) { - $self->{filename} = $file; - $self->{size} = (stat $file)[7]; - open my $fh, '<' . $file or - die "Unable to open $file for reading and creating a filehandle: $!\n"; - $self->{fh} = $fh; - } - bless $self, $class; - return $self; -} - -#---------------------------------------------------------------------------- - -=head2 fh ( [$value] ) - -Getter and setter for fh. If $value is passed in, it will set the internal filehandle in -the object to that. Returns the filehandle stored in the object. - -=cut - -sub fh { - my $self = shift; - my $value = shift; - if (defined $value) { - $self->{fh} = $value; - } - return $self->{fh}; -} - -#---------------------------------------------------------------------------- - -=head2 filaname ( [$value] ) - -Getter and setter for filename. If $value is passed in, it will set the filename in -the object to that. Returns the filename in the object. - -=cut - -sub filename { - my $self = shift; - my $value = shift; - if (defined $value) { - $self->{filename} = $value; - } - return $self->{filename}; -} - -#---------------------------------------------------------------------------- - -=head2 size ( [$value] ) - -Getter and setter for size. If $value is passed in, it will set the internal size in -the object to that. Returns the size stored in the object. - -=cut - -sub size { - my $self = shift; - my $value = shift; - if (defined $value) { - $self->{size} = $value; - } - return $self->{size}; -} - -sub link { - my $self = shift; - my $dest = shift; - return File::Copy::copy($self->filename, $dest); -} - -1; - diff --git a/t/lib/WebGUI/Serialize.pm b/t/lib/WebGUI/Serialize.pm index e6cb4bc27..cfd637850 100644 --- a/t/lib/WebGUI/Serialize.pm +++ b/t/lib/WebGUI/Serialize.pm @@ -1,7 +1,28 @@ package WebGUI::Serialize; -use base qw/WebGUI::Crud/; -use WebGUI::Utility; +use Moose; +use WebGUI::Definition::Crud; +extends qw/WebGUI::Crud/; + +define tableName => 'crudSerialize'; +define tableKey => 'serializeId'; +has serializeId => ( + required => 1, + is => 'ro', +); +property someName => ( + label => 'someName', + fieldType => 'text', + default => 'someName', +); +property jsonField => ( + label => 'jsonField', + fieldType => 'textarea', + default => sub { return []; }, + isa => 'WebGUI::Type::JSONArray', + coerce => 1, + traits => ['Array', 'WebGUI::Definition::Meta::Property::Serialize',], +); #------------------------------------------------------------------- @@ -34,22 +55,9 @@ JSON blob text field. =cut sub crud_definition { - my ($class, $session) = @_; - my $definition = $class->SUPER::crud_definition($session); - $definition->{tableName} = 'crudSerialize'; - $definition->{tableKey} = 'serializeId'; - $definition->{sequenceKey} = ''; - my $properties = $definition->{properties}; - $properties->{someName} = { - fieldType => 'text', - defaultValue => 'someName', - }; - $properties->{jsonField} = { - fieldType => 'textarea', - defaultValue => [], - serialize => 1, - }; - return $definition; +my ($class, $session) = @_; +my $definition = $class->SUPER::crud_definition($session); +return $definition; } diff --git a/t/lib/WebGUI/SubClass.pm b/t/lib/WebGUI/SubClass.pm index 482edbf5b..b4c21fc14 100644 --- a/t/lib/WebGUI/SubClass.pm +++ b/t/lib/WebGUI/SubClass.pm @@ -2,20 +2,20 @@ package WebGUI::Crud::Subclass; use strict; -use base 'WebGUI::Crud'; +use Moose; +use WebGUI::Definition::Crud; +extends 'WebGUI::Crud'; +define tableName => 'crudSubclass'; +define tableKey => 'crudSubclassId'; +has crudSubclassId => ( + required => 1, + is => 'ro', +); -sub crud_definition { - my ($class, $session) = @_; - my $definition = $class->SUPER::crud_definition($session); - $definition->{tableName} = 'crudSubclass'; - $definition->{tableKey} = 'crudSubclassId'; - $definition->{sequenceKey} = ''; - my $properties = $definition->{properties}; - $properties->{field1} = { - fieldType => 'integer', - defaultValue => 5, - }; - return $definition; -} +property field1 => ( + label => 'field1', + fieldType => 'integer', + defaultValue => 5, +); 1; diff --git a/t/lib/WebGUI/Test/Activity.pm b/t/lib/WebGUI/Test/Activity.pm index 5bbe11422..4525e180a 100644 --- a/t/lib/WebGUI/Test/Activity.pm +++ b/t/lib/WebGUI/Test/Activity.pm @@ -3,16 +3,16 @@ package WebGUI::Test::Activity; use WebGUI::Workflow; use WebGUI::Test; -=head Name +=head1 Name package WebGUI::Test::Activity; -=head Description +=head1 Description This package encapsulates the code required to run an activity. -=head Usage +=head1 Usage use WebGUI::Test::Activity; @@ -27,17 +27,21 @@ is( $instance->run, 'complete', 'activity complete' ); is( $instance->run, 'done', 'activity done' ); $instance->delete; -=head methods +=head1 methods =head2 create -=params +=head3 session -session -- the session variable +the session variable -class -- the class for the activity to run +=head3 class -params -- params to set in the workflow +the class for the activity to run + +=head3 params + +params to set in the workflow =cut diff --git a/t/lib/WebGUI/Test/Event.pm b/t/lib/WebGUI/Test/Event.pm index 709de221b..7a86cbe0c 100644 --- a/t/lib/WebGUI/Test/Event.pm +++ b/t/lib/WebGUI/Test/Event.pm @@ -8,7 +8,7 @@ our @EXPORT = qw(trap); =head1 LEGAL ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. + WebGUI is Copyright 2001-2012 Plain Black Corporation. ------------------------------------------------------------------- Please read the legal notices (docs/legal.txt) and the license (docs/license.txt) that came with this distribution before using diff --git a/t/lib/WebGUI/TestException.pm b/t/lib/WebGUI/TestException.pm index affc8a99e..03ef43247 100644 --- a/t/lib/WebGUI/TestException.pm +++ b/t/lib/WebGUI/TestException.pm @@ -26,6 +26,7 @@ functions _quiet_caller and _try_as_caller are directly copied from Test::Except hocuspocus is being in that module however, since doing 'eval { uplevel 1, $codeRef }' seems to work too. On my platform at least =). For the time being, I leave those subs in here so that they may be used. They are commented out by default, though. + =cut #---------------------------------------------------------------------------- diff --git a/t/mandatory_template_vars.t b/t/mandatory_template_vars.t index cd85dbe59..5ded89400 100644 --- a/t/mandatory_template_vars.t +++ b/t/mandatory_template_vars.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,9 +8,7 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; -use lib "$FindBin::Bin/lib"; use WebGUI::Test; use WebGUI::Asset; @@ -165,7 +163,7 @@ plan tests => $numTests; foreach my $tmpl ( @tmplVarTable ) { my $tmplId = $tmpl->{id}; - my $tmplAsset = WebGUI::Asset->newByDynamicClass($session, $tmplId); + my $tmplAsset = eval { WebGUI::Asset->newById($session, $tmplId); }; my $tmplExists = is(ref($tmplAsset), 'WebGUI::Asset::Template', "$tmplId exists"); SKIP: { skip("$tmplId could not be found", $tmpl->{numTests} ) unless $tmplExists; diff --git a/t/rawHrefUrls.t b/t/rawHrefUrls.t index ec0dc6537..845396fcc 100644 --- a/t/rawHrefUrls.t +++ b/t/rawHrefUrls.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,10 +8,8 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; use warnings; -use lib "$FindBin::Bin/lib"; ##t/lib use WebGUI::Test; use WebGUI::Session; @@ -27,6 +25,10 @@ my $numTests = 0; my $session = WebGUI::Test->session; +##Find the name of the International macro in the user's config file. + +#note "International macro name = $international"; + ##Regexp setup for parsing out the Macro calls. my $macro = qr{ \^ diff --git a/t/run_account.t b/t/run_account.t new file mode 100644 index 000000000..9e29d7e37 --- /dev/null +++ b/t/run_account.t @@ -0,0 +1,26 @@ +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 +#------------------------------------------------------------------- + +BEGIN { + + use File::Spec::Functions qw( catdir rel2abs ); + use File::Basename; + use Test::More; + use Test::Class; + use Module::Find; + use lib rel2abs( catdir ( dirname( __FILE__ ), 'tests' ) ); + +# plan skip_all => "Extremely slow asset tests only run if WEBGUI_ASSET_TESTS set" +# unless $ENV{WEBGUI_ASSET_TESTS}; + useall('Test::WebGUI::Account'); +} + +Test::Class->runtests; + diff --git a/t/run_assets.t b/t/run_assets.t new file mode 100644 index 000000000..4f9fcf47c --- /dev/null +++ b/t/run_assets.t @@ -0,0 +1,24 @@ +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 File::Spec::Functions qw( catdir rel2abs ); +use File::Basename; +use Test::More; +use Test::Class; +use Module::Find; +use lib rel2abs( catdir ( dirname( __FILE__ ), 'tests' ) ); + +BEGIN { + plan skip_all => "Extremely slow asset tests only run if WEBGUI_ASSET_TESTS set" + unless $ENV{WEBGUI_ASSET_TESTS}; + useall('Test::WebGUI::Asset'); +} +Test::Class->runtests; + diff --git a/t/run_forms.t b/t/run_forms.t index beb24c100..ae2c11bb8 100644 --- a/t/run_forms.t +++ b/t/run_forms.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,7 +8,19 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use File::Spec::Functions qw( catdir rel2abs ); -use File::Basename qw( dirname ); -use Test::Class::Load rel2abs( catdir ( dirname( __FILE__ ), 'tests' ) ); +BEGIN { + + use File::Spec::Functions qw( catdir rel2abs ); + use File::Basename; + use Test::More; + use Test::Class; + use Module::Find; + use lib rel2abs( catdir ( dirname( __FILE__ ), 'tests' ) ); + +# plan skip_all => "Extremely slow asset tests only run if WEBGUI_ASSET_TESTS set" +# unless $ENV{WEBGUI_ASSET_TESTS}; + useall('Test::WebGUI::Form'); +} + Test::Class->runtests; + diff --git a/t/smtpd.pl b/t/smtpd.pl deleted file mode 100644 index 57469e004..000000000 --- a/t/smtpd.pl +++ /dev/null @@ -1,50 +0,0 @@ -use strict; -use warnings; - -use JSON qw( to_json ); -use Net::SMTP::Server; -use Net::SMTP::Server::Client; - -my ($HOST, $PORT) = @ARGV; - -die "HOST must be first argument" - unless $HOST; -die "PORT must be second argument" - unless $PORT; - -my $server = Net::SMTP::Server->new( $HOST, $PORT ); - -$| = 1; - -CONNECTION: while ( my $conn = $server->accept ) { - my $client = Net::SMTP::Server::Client->new( $conn ); - $client->process; - print to_json({ - to => $client->{TO}, - from => $client->{FROM}, - contents => $client->{MSG}, - }); - print "\n"; -} - -=head1 NAME - -t/smtpd.pl - A dumb SMTP server. - -=head1 USAGE - - perl smtpd.pl <hostname> <port> - -=head1 DESCRIPTION - -This program listens on the given hostname and port, then processes the -incoming SMTP client request. - -Then it prints a JSON object of the data recieved and exits. - -This program will only handle one request before exiting. - -=head1 CAVEATS - -You MUST C<sleep 1> after opening a pipe to this so that it can establish the -listening on the port. diff --git a/t/supporting_collateral/Help/HelpTest.pm b/t/supporting_collateral/Help-isa/lib/WebGUI/Help/HelpTest.pm similarity index 100% rename from t/supporting_collateral/Help/HelpTest.pm rename to t/supporting_collateral/Help-isa/lib/WebGUI/Help/HelpTest.pm diff --git a/t/supporting_collateral/PigLatin.pm b/t/supporting_collateral/International/lib/WebGUI/i18n/PigLatin.pm similarity index 100% rename from t/supporting_collateral/PigLatin.pm rename to t/supporting_collateral/International/lib/WebGUI/i18n/PigLatin.pm diff --git a/t/supporting_collateral/WebGUI.pm b/t/supporting_collateral/International/lib/WebGUI/i18n/PigLatin/WebGUI.pm similarity index 100% rename from t/supporting_collateral/WebGUI.pm rename to t/supporting_collateral/International/lib/WebGUI/i18n/PigLatin/WebGUI.pm diff --git a/t/supporting_collateral/Pluggable/lib/WebGUI/Test/Pluggable/First.pm b/t/supporting_collateral/Pluggable/lib/WebGUI/Test/Pluggable/First.pm new file mode 100644 index 000000000..edfe0fe32 --- /dev/null +++ b/t/supporting_collateral/Pluggable/lib/WebGUI/Test/Pluggable/First.pm @@ -0,0 +1,10 @@ +package WebGUI::Test::Pluggable::First; + +$VERSION = 1.0; + +sub first { + return 1; +} + +1; + diff --git a/t/supporting_collateral/Pluggable/lib/WebGUI/Test/Pluggable/FirstOne.pm b/t/supporting_collateral/Pluggable/lib/WebGUI/Test/Pluggable/FirstOne.pm new file mode 100644 index 000000000..da214b11a --- /dev/null +++ b/t/supporting_collateral/Pluggable/lib/WebGUI/Test/Pluggable/FirstOne.pm @@ -0,0 +1,10 @@ +package WebGUI::Test::Pluggable::FirstOne; + +$VERSION = 1.0; + +sub first { + return 1; +} + +1; + diff --git a/t/supporting_collateral/Pluggable/lib/WebGUI/Test/Pluggable/Second.pm b/t/supporting_collateral/Pluggable/lib/WebGUI/Test/Pluggable/Second.pm new file mode 100644 index 000000000..a0b1cdd22 --- /dev/null +++ b/t/supporting_collateral/Pluggable/lib/WebGUI/Test/Pluggable/Second.pm @@ -0,0 +1,10 @@ +package WebGUI::Test::Pluggable::Second; + +$VERSION = 1.0; + +sub second { + return 1; +} + +1; + diff --git a/t/supporting_collateral/Pluggable/lib/WebGUI/Test/Pluggable/Second/Child.pm b/t/supporting_collateral/Pluggable/lib/WebGUI/Test/Pluggable/Second/Child.pm new file mode 100644 index 000000000..0107e76c3 --- /dev/null +++ b/t/supporting_collateral/Pluggable/lib/WebGUI/Test/Pluggable/Second/Child.pm @@ -0,0 +1,10 @@ +package WebGUI::Test::Pluggable::Second::Sub; + +$VERSION = 1.0; + +sub child { + return 1; +} + +1; + diff --git a/t/supporting_collateral/BadLocale.pm b/t/supporting_collateral/Session-DateTime/lib/WebGUI/i18n/BadLocale.pm similarity index 100% rename from t/supporting_collateral/BadLocale.pm rename to t/supporting_collateral/Session-DateTime/lib/WebGUI/i18n/BadLocale.pm diff --git a/t/supporting_collateral/Upgrade/backtrack/8.0.0-8.1.0/.exists b/t/supporting_collateral/Upgrade/backtrack/8.0.0-8.1.0/.exists new file mode 100644 index 000000000..e69de29bb diff --git a/t/supporting_collateral/Upgrade/backtrack/8.1.0-8.2.0/.exists b/t/supporting_collateral/Upgrade/backtrack/8.1.0-8.2.0/.exists new file mode 100644 index 000000000..e69de29bb diff --git a/t/supporting_collateral/Upgrade/backtrack/8.1.0-8.3.0/.exists b/t/supporting_collateral/Upgrade/backtrack/8.1.0-8.3.0/.exists new file mode 100644 index 000000000..e69de29bb diff --git a/t/supporting_collateral/Upgrade/backtrack/8.2.0-8.2.1/.exists b/t/supporting_collateral/Upgrade/backtrack/8.2.0-8.2.1/.exists new file mode 100644 index 000000000..e69de29bb diff --git a/t/supporting_collateral/Upgrade/backtrack/8.2.0-8.3.0/.exists b/t/supporting_collateral/Upgrade/backtrack/8.2.0-8.3.0/.exists new file mode 100644 index 000000000..e69de29bb diff --git a/t/supporting_collateral/Upgrade/backtrack/8.3.0-8.4.3/.exists b/t/supporting_collateral/Upgrade/backtrack/8.3.0-8.4.3/.exists new file mode 100644 index 000000000..e69de29bb diff --git a/t/supporting_collateral/Upgrade/collateral.pl b/t/supporting_collateral/Upgrade/collateral.pl new file mode 100644 index 000000000..64fe4cbc8 --- /dev/null +++ b/t/supporting_collateral/Upgrade/collateral.pl @@ -0,0 +1,8 @@ +use WebGUI::Upgrade::Script; +my $c = collateral; + +::isa_ok $c, 'Path::Class::Dir'; + +::ok -e $c->file('collateral.txt'), 'correct collateral path used'; + + diff --git a/t/supporting_collateral/Upgrade/collateral/collateral.txt b/t/supporting_collateral/Upgrade/collateral/collateral.txt new file mode 100644 index 000000000..2f26b312b --- /dev/null +++ b/t/supporting_collateral/Upgrade/collateral/collateral.txt @@ -0,0 +1 @@ +collateral file diff --git a/t/supporting_collateral/Upgrade/config.pl b/t/supporting_collateral/Upgrade/config.pl new file mode 100644 index 000000000..0629f3905 --- /dev/null +++ b/t/supporting_collateral/Upgrade/config.pl @@ -0,0 +1,3 @@ +use WebGUI::Upgrade::Script; +::is config->pathToFile, $::configFile, 'config function works correctly'; + diff --git a/t/supporting_collateral/Upgrade/dbh.pl b/t/supporting_collateral/Upgrade/dbh.pl new file mode 100644 index 000000000..845c83d28 --- /dev/null +++ b/t/supporting_collateral/Upgrade/dbh.pl @@ -0,0 +1,4 @@ +use WebGUI::Upgrade::Script; +my $totalAssets = dbh->selectrow_array('SELECT COUNT(*) FROM asset'); +::is $totalAssets, $::totalAssets, 'dbh function working correctly'; + diff --git a/t/supporting_collateral/Upgrade/die.pl b/t/supporting_collateral/Upgrade/die.pl new file mode 100644 index 000000000..b80fa51c3 --- /dev/null +++ b/t/supporting_collateral/Upgrade/die.pl @@ -0,0 +1,3 @@ +use WebGUI::Upgrade::Script; +die "Upgrade failure\n"; + diff --git a/t/supporting_collateral/Upgrade/impossible/.exists b/t/supporting_collateral/Upgrade/impossible/.exists new file mode 100644 index 000000000..e69de29bb diff --git a/t/supporting_collateral/Upgrade/output.pl b/t/supporting_collateral/Upgrade/output.pl new file mode 100644 index 000000000..88e15a27c --- /dev/null +++ b/t/supporting_collateral/Upgrade/output.pl @@ -0,0 +1,5 @@ +use WebGUI::Upgrade::Script; +start_step 'Simple Output'; + +done; + diff --git a/t/supporting_collateral/Upgrade/package.pl b/t/supporting_collateral/Upgrade/package.pl new file mode 100644 index 000000000..fd9b00918 --- /dev/null +++ b/t/supporting_collateral/Upgrade/package.pl @@ -0,0 +1,12 @@ +use WebGUI::Upgrade::Script; +::addToCleanup('WebGUI::VersionTag', version_tag->getId); + +import_package('test-template.wgpkg'); + +my $assets = version_tag->getAssets; + +::is scalar @$assets, 1, 'imported one asset with package'; + +::isa_ok $assets->[0], 'WebGUI::Asset::Template'; + + diff --git a/t/supporting_collateral/Upgrade/package/test-template.wgpkg b/t/supporting_collateral/Upgrade/package/test-template.wgpkg new file mode 100644 index 000000000..4e2f8a442 Binary files /dev/null and b/t/supporting_collateral/Upgrade/package/test-template.wgpkg differ diff --git a/t/supporting_collateral/Upgrade/rmlib.pl b/t/supporting_collateral/Upgrade/rmlib.pl new file mode 100644 index 000000000..e01fa9bdb --- /dev/null +++ b/t/supporting_collateral/Upgrade/rmlib.pl @@ -0,0 +1,3 @@ +use WebGUI::Upgrade::Script; +rm_lib 'WebGUI::Upgrade::Test::Module'; + diff --git a/t/supporting_collateral/Upgrade/select.sql b/t/supporting_collateral/Upgrade/select.sql new file mode 100644 index 000000000..0cbaddaed --- /dev/null +++ b/t/supporting_collateral/Upgrade/select.sql @@ -0,0 +1 @@ +SELECT dateApplied FROM webguiVersion ORDER BY dateApplied DESC LIMIT 1 diff --git a/t/supporting_collateral/Upgrade/session.pl b/t/supporting_collateral/Upgrade/session.pl new file mode 100644 index 000000000..fc9bf6484 --- /dev/null +++ b/t/supporting_collateral/Upgrade/session.pl @@ -0,0 +1,8 @@ +use WebGUI::Upgrade::Script; +my $s = session; +::isa_ok $s, 'WebGUI::Session'; +::is $s, session, 'session properly cached'; +::is $s->user->getId, 3, 'admin user set for session'; + +$s->getId; + diff --git a/t/supporting_collateral/Upgrade/strict-failure.pl b/t/supporting_collateral/Upgrade/strict-failure.pl new file mode 100644 index 000000000..7081bb295 --- /dev/null +++ b/t/supporting_collateral/Upgrade/strict-failure.pl @@ -0,0 +1,3 @@ +use WebGUI::Upgrade::Script; +$variable = "value"; + diff --git a/t/supporting_collateral/Upgrade/test-template.wgpkg b/t/supporting_collateral/Upgrade/test-template.wgpkg new file mode 100644 index 000000000..95350bc5c Binary files /dev/null and b/t/supporting_collateral/Upgrade/test-template.wgpkg differ diff --git a/t/supporting_collateral/Upgrade/valid/8.0.0-8.4.3/00_simple.pl b/t/supporting_collateral/Upgrade/valid/8.0.0-8.4.3/00_simple.pl new file mode 100644 index 000000000..8a20e5538 --- /dev/null +++ b/t/supporting_collateral/Upgrade/valid/8.0.0-8.4.3/00_simple.pl @@ -0,0 +1,4 @@ +use WebGUI::Upgrade::Script; +report "Simple Upgrade Step"; +done; + diff --git a/t/supporting_collateral/Upgrade/versiontag.pl b/t/supporting_collateral/Upgrade/versiontag.pl new file mode 100644 index 000000000..8515213cd --- /dev/null +++ b/t/supporting_collateral/Upgrade/versiontag.pl @@ -0,0 +1,16 @@ +use WebGUI::Upgrade::Script; +my $vt = version_tag; +::addToCleanup('WebGUI::VersionTag', $vt->getId); + +::isa_ok $vt, 'WebGUI::VersionTag'; +::is $vt->get('name'), 'Upgrade to 8.3.0 - versiontag', 'auto-naming with short name works'; + +::is $vt, version_tag, 'second call gives same version tag'; +::ok ! $vt->get('isCommitted'), '... and doesn\'t commit version tag'; + +my $vt2 = version_tag 'Adding This Stuff'; +::addToCleanup('WebGUI::VersionTag', $vt2->getId); +::ok $vt->get('isCommitted'), 'Request for new version tag commits previous tag'; +::is $vt2->get('name'), 'Upgrade to 8.3.0 - Adding This Stuff', 'explicit name used correctly'; + + diff --git a/t/supporting_collateral/ems_events.csv b/t/supporting_collateral/ems_events.csv new file mode 100644 index 000000000..c44f26654 --- /dev/null +++ b/t/supporting_collateral/ems_events.csv @@ -0,0 +1,3 @@ +Title,Description,"Start Date",Duration,"Security Level" +One,Oneness,"2010-01-01 00:00:00",2,High +Two,Twoness,"2010-02-02 00:00:00",3,Low diff --git a/t/supporting_collateral/passiveAnalyticsLog b/t/supporting_collateral/passiveAnalyticsLog new file mode 100644 index 000000000..9da0ea61a --- /dev/null +++ b/t/supporting_collateral/passiveAnalyticsLog @@ -0,0 +1,9 @@ +#user session timestamp url +user1 session11 100 /one +user1 session11 110 /two +user1 session11 125 /three +user2 session21 200 /yelnats +user2 session21 202 /one/uno +user2 session21 205 /whatever +user2 session21 210 /something_else +user2 session21 610 /something_else diff --git a/t/supporting_collateral/thingy.csv b/t/supporting_collateral/thingy.csv new file mode 100644 index 000000000..615e1169d --- /dev/null +++ b/t/supporting_collateral/thingy.csv @@ -0,0 +1,2 @@ +"Andy Dufresne",42 +"Red Ellis",47 diff --git a/t/templateAttachments.t b/t/templateAttachments.t index e0961a2a8..eac119d4d 100644 --- a/t/templateAttachments.t +++ b/t/templateAttachments.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/templateSyntax.t b/t/templateSyntax.t index b64437b63..a29bb2817 100644 --- a/t/templateSyntax.t +++ b/t/templateSyntax.t @@ -1,5 +1,5 @@ #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -8,10 +8,8 @@ # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- -use FindBin; use strict; use warnings; -use lib "$FindBin::Bin/lib"; ##t/lib use WebGUI::Test; use WebGUI::Session; @@ -25,7 +23,6 @@ use Test::More; # increment this value for each test you create my $numTests = 0; my $session = WebGUI::Test->session; -my $lib = WebGUI::Test->lib; # put your tests here diff --git a/t/tests/My/Test/Class.pm b/t/tests/My/Test/Class.pm index b9c230caa..dcfabcc0b 100644 --- a/t/tests/My/Test/Class.pm +++ b/t/tests/My/Test/Class.pm @@ -1,7 +1,7 @@ package My::Test::Class; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Account.pm b/t/tests/Test/WebGUI/Account.pm new file mode 100644 index 000000000..b56b94d21 --- /dev/null +++ b/t/tests/Test/WebGUI/Account.pm @@ -0,0 +1,54 @@ +package Test::WebGUI::Account; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 strict; +use warnings; + +use base qw/My::Test::Class/; + +use Test::More; +use Test::Deep; +use Test::Exception; +use WebGUI::Test; +use Data::Dumper; +use List::MoreUtils; + +sub _constructor : Test(2) { + my $test = shift; + my $session = $test->session; + + my $obj = $test->class->new($session); + + note "new for ". $test->class; + isa_ok $obj, $test->class; + isa_ok $obj->session, 'WebGUI::Session'; +} + +sub t_00_method_check : Test(1) { + my $test = shift; + my $session = $test->session; + my $obj = $test->class->new($session); + + can_ok $obj, qw/session module uid bare store appendCommonVars callMethod displayContent canView + editSettingsForm editSettingsFormSave getLayoutTemplateId getStyleTemplateId getUrl + getUser processTemplate showError /; +} + +sub t_01_editSettingsForm : Tests { + my $test = shift; + my $session = $test->session; + my $obj = $test->class->new( $session ); + + my $fb = $obj->editSettingsForm; + isa_ok $fb, 'WebGUI::FormBuilder'; +} + +1; diff --git a/t/tests/Test/WebGUI/Account/Contributions.pm b/t/tests/Test/WebGUI/Account/Contributions.pm new file mode 100644 index 000000000..fbe16cdb6 --- /dev/null +++ b/t/tests/Test/WebGUI/Account/Contributions.pm @@ -0,0 +1,18 @@ +package Test::WebGUI::Account::Contributions; + +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 strict; +use warnings; + +use base qw/Test::WebGUI::Account/; + +1; diff --git a/t/tests/Test/WebGUI/Account/FriendManager.pm b/t/tests/Test/WebGUI/Account/FriendManager.pm new file mode 100644 index 000000000..88c140727 --- /dev/null +++ b/t/tests/Test/WebGUI/Account/FriendManager.pm @@ -0,0 +1,18 @@ +package Test::WebGUI::Account::FriendManager; + +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 strict; +use warnings; + +use base qw/Test::WebGUI::Account/; + +1; diff --git a/t/tests/Test/WebGUI/Account/Friends.pm b/t/tests/Test/WebGUI/Account/Friends.pm new file mode 100644 index 000000000..bf3023342 --- /dev/null +++ b/t/tests/Test/WebGUI/Account/Friends.pm @@ -0,0 +1,18 @@ +package Test::WebGUI::Account::Friends; + +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 strict; +use warnings; + +use base qw/Test::WebGUI::Account/; + +1; diff --git a/t/tests/Test/WebGUI/Account/Inbox.pm b/t/tests/Test/WebGUI/Account/Inbox.pm new file mode 100644 index 000000000..246e4a8b0 --- /dev/null +++ b/t/tests/Test/WebGUI/Account/Inbox.pm @@ -0,0 +1,18 @@ +package Test::WebGUI::Account::Inbox; + +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 strict; +use warnings; + +use base qw/Test::WebGUI::Account/; + +1; diff --git a/t/tests/Test/WebGUI/Account/Profile.pm b/t/tests/Test/WebGUI/Account/Profile.pm new file mode 100644 index 000000000..cbd5dfa4a --- /dev/null +++ b/t/tests/Test/WebGUI/Account/Profile.pm @@ -0,0 +1,18 @@ +package Test::WebGUI::Account::Profile; + +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 strict; +use warnings; + +use base qw/Test::WebGUI::Account/; + +1; diff --git a/t/tests/Test/WebGUI/Account/Shop.pm b/t/tests/Test/WebGUI/Account/Shop.pm new file mode 100644 index 000000000..d4450b206 --- /dev/null +++ b/t/tests/Test/WebGUI/Account/Shop.pm @@ -0,0 +1,18 @@ +package Test::WebGUI::Account::Shop; + +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 strict; +use warnings; + +use base qw/Test::WebGUI::Account/; + +1; diff --git a/t/tests/Test/WebGUI/Account/User.pm b/t/tests/Test/WebGUI/Account/User.pm new file mode 100644 index 000000000..e312af7ef --- /dev/null +++ b/t/tests/Test/WebGUI/Account/User.pm @@ -0,0 +1,18 @@ +package Test::WebGUI::Account::User; + +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 strict; +use warnings; + +use base qw/Test::WebGUI::Account/; + +1; diff --git a/t/tests/Test/WebGUI/Asset.pm b/t/tests/Test/WebGUI/Asset.pm new file mode 100644 index 000000000..ff92c67e8 --- /dev/null +++ b/t/tests/Test/WebGUI/Asset.pm @@ -0,0 +1,712 @@ +package Test::WebGUI::Asset; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 strict; +use warnings; + +use base qw/My::Test::Class/; + +use Test::More; +use Test::Deep; +use Test::Exception; +use WebGUI::Test; +use Data::Dumper; +use List::MoreUtils; +use WebGUI::Test::Mechanize; + +use UNIVERSAL::isa; +no warnings 'UNIVERSAL::isa'; + +# XXXX fix the Test(n) numbers to match reality + +sub dynamic_form_labels { return; }; # per-class form labels added at run time rather than through property blocks + +sub constructorExtras { + return; +} + +sub postProcessMergedProperties { + return; +} + +sub dump_assets { + my $session = shift; + # my $assets = WebGUI::Asset->getRoot($session)->getLineage(['descendants'], { returnObjects => 1, } ); + my $assets = WebGUI::Asset->getRoot($session)->getLineage(['descendants']); + warn "all assets: " . Dumper $assets; +} + +sub debug { + + # if the last eval { } caught something, give full diagnostics on that and stop the tests. + # while working through these bugs in here, it does no good to run the test suite until completion after something blows up. + + my $e = Exception::Class->caught() or return; + my $line = (caller)[2]; + + # XXX redundant with $SIG{__DIE__} handlers + #if( Scalar::Util::blessed( $e ) ) { + # note( $line . ': ' . $e->error . "\n" . $e->full_message . "\n" . $e->trace->as_string ); + #} else { + # note( $line . ': ' . "\n(non-object error:) $e" ); + #} + + # return; # XXX enable/disable aborting tests on failure + + # system '/home/scott/bin/perl', '/home/scott/plainblack/dumplineage.pl'; # XXX + warn "going to exit in ... a whole bunch... of seconds"; + # sleep 10; + system 'sleep 6000'; # sleep 10; # this way, we can control-c it! + exit; +} + +sub assetUiLevel { + return 1; +} + +sub list_of_tables { + return [qw/assetData/]; +} + +sub parent_list { + return []; +} + +sub flattenFormObjects { + my $arr = shift; + my @result; + my @no_arrays = map { (ref $_ eq 'ARRAY') ? flattenFormObjects($_) : $_ } @$arr; + for my $formob (@no_arrays) { + if($formob->get('buttons')) { + push @result, flattenFormObjects( $formob->get('buttons') ); + } else { + push @result, $formob; + } + } + @result; +} + +sub formProperties { + my $asset = shift; + my %properties = + map { ( $_ => $asset->get($_) ) } + # map { [ $_ => $asset->getFormProperties($_) ] } + grep { ! $asset->meta->find_attribute_by_name( $_ )->noFormPost } $asset->getProperties; + return %properties; +} + +sub getAnchoredAsset { + my $test = shift; + my $session = $test->session or die; + my $tag = WebGUI::VersionTag->getWorking($session); + my @parents = $test->getMyParents; + my $asset = $parents[-1]->addChild({ + className => $test->class, + $test->constructorExtras($session), + }, undef, (time-10), {skipNotification => 1}); + # warn "XXX getAnchoredAsset: created new asset of Id: " . $asset->getId . ' of type: ' . ref $asset; + $tag->commit; + foreach my $a ($asset, @parents) { + $a = $a->cloneFromDb; + } + WebGUI::Test->addToCleanup($tag); + $test->{_currentTag} = $tag; + return ($tag, $asset, @parents); +} + +sub deleteAssets : Test(teardown) { + my ( $test ) = shift; + if ( $test->{_currentTag} ) { + $test->{_currentTag}->rollback; + delete $test->{_currentTag}; + } +} + +sub getMyParents { + my $test = shift; + my $session = $test->session; + my $parent_classes = $test->parent_list; + my @parents = (); + my $default = WebGUI::Asset->getDefault($session); + push @parents, $default; + my $parent = $default; + my $tag = WebGUI::VersionTag->getWorking( $session ); + foreach my $parent_class (@{ $parent_classes }) { + my $new_parent = $parent->addChild( + { + className => $parent_class, + $test->constructorExtras($session), + }, + undef, + (time-10), + {skipNotification => 1,}, + ); + push @parents, $new_parent; + $parent = $new_parent; + WebGUI::Test->addToCleanup($new_parent); + } + return @parents; +} + +sub _constructor : Test(4) { + my $test = shift; + my $session = $test->session; + my $asset = $test->class->new({session => $session, $test->constructorExtras($session), }); + + note '=' x 80; + note "Constructor: CLASS " . $test->class; + note '=' x 80; + + isa_ok $asset, $test->class, "asset we created isa ``@{[ $test->class ]}''"; + isa_ok $asset->session, 'WebGUI::Session', "the session @{[ $test->class ]} we created isa WebGUI::Session"; + is $asset->session->getId, $session->getId, 'asset was assigned the correct session'; + + note "calling new with no assetId throws an exception"; + $asset = eval { WebGUI::Asset->new($session, ''); }; + my $e = Exception::Class->caught; + isa_ok $e, 'WebGUI::Error'; + undef $@; + +} + +sub t_00_class_dispatch : Test(2) { + # XXX this could be moved out of Test::Class into a linear test, such as in Asset.t + my $test = shift; + my $session = $test->session; + note "Class dispatch"; + # my $asset = $test->class->new({session => $session}); + + my $asset = WebGUI::Asset->new({ + session => $session, + title => 'testing snippet', + className => 'WebGUI::Asset::Snippet', + }); + + isa_ok $asset, 'WebGUI::Asset'; + is $asset->className, 'WebGUI::Asset', 'passing className is ignored'; + + debug($@); + undef $@; +} + +sub t_00_get_tables : Test(1) { + my $test = shift; + note "get_tables"; + my @tables = $test->class->meta->get_tables; + cmp_bag( + \@tables, + $test->list_of_tables, + 'Set of tables for properties is correct' + ); + + debug($@); + undef $@; +} + +sub t_00_getParent : Test(2) { + my $test = shift; + my $session = $test->session; + note "getParent"; + my $testId1 = 'wg8TestAsset0000000001'; + my $testId2 = 'wg8TestAsset0000000002'; + my $now = time(); + my $baseLineage = $session->db->quickScalar('select lineage from asset where assetId=?',['PBasset000000000000002']); + my $testLineage = $baseLineage. '909090'; + $session->db->write("insert into asset (assetId, className, lineage) VALUES (?,?,?)", [$testId1, 'WebGUI::Asset', $testLineage]); + $session->db->write("insert into assetData (assetId, revisionDate, status) VALUES (?,?,?)", [$testId1, $now, 'approved']); + my $testLineage2 = $testLineage . '000001'; + $session->db->write("insert into asset (assetId, className, parentId, lineage) VALUES (?,?,?,?)", [$testId2, 'WebGUI::Asset', $testId1, $testLineage2]); + $session->db->write("insert into assetData (assetId, revisionDate) VALUES (?,?)", [$testId2, $now]); + + my $testAsset = WebGUI::Asset->new($session, $testId2, $now); + is $testAsset->parentId, $testId1, 'parentId assigned correctly on db fetch in new'; + my $testParent = $testAsset->getParent(); + isa_ok $testParent, 'WebGUI::Asset'; + + $session->db->write("delete from asset where assetId like 'wg8TestAsset00000%'"); + $session->db->write("delete from assetData where assetId like 'wg8TestAsset00000%'"); + + debug($@); + undef $@; +} + +sub t_00_newByPropertyHashRef : Test(2) { + my $test = shift; + my $session = $test->session; + note "newByPropertyHashRef"; + my $asset; + $asset = WebGUI::Asset->newByPropertyHashRef($session, { + className => $test->class, + title => 'The Shawshank Snippet', + $test->constructorExtras($session), + }); + isa_ok $asset, $test->class; + is $asset->title, 'The Shawshank Snippet', 'title is assigned from the property hash'; + + debug($@); + undef $@; +} + +sub t_00_scan_properties : Test(1) { + note "scan properties for table definitions"; + my $test = shift; + my @properties = $test->class->meta->get_all_properties; + my @undefined_tables = (); + foreach my $prop (@properties) { + push @undefined_tables, $prop->name if (!$prop->tableName); + } + ok !@undefined_tables, "all properties have tables defined" + or diag "except these: ".join ", ", @undefined_tables; + + debug($@); + undef $@; +} + +sub t_01_assetId : Test(4) { + my $test = shift; + my $session = $test->session; + my $asset = $test->class->new({ + session => $session, + $test->constructorExtras($session), + }); + note "assetId, getId"; + can_ok $asset, qw/assetId getId/; + ok $session->id->valid( $asset->assetId), 'assetId generated by default is valid'; + is $asset->assetId, $asset->getId, '... getId is an alias for assetId'; + + $asset = $test->class->new({ session => $session, assetId => '', $test->constructorExtras($session), }); + ok !$session->id->valid($asset->assetId), 'blank assetId in constructor is okay??'; + + debug($@); + undef $@; +} + +sub t_01_title : Test(6) { + my $test = shift; + my $session = $test->session; + my $asset = $test->class->new({ + session => $session, + $test->constructorExtras($session), + }); + + note "title"; + can_ok $asset, 'title'; + is $asset->title, 'Untitled', 'title: default is untitled'; + + $asset->title('asset title'); + is $asset->title, 'asset title', '... set, get'; + $asset->title(''); + is $asset->title, 'Untitled', '... get default title when empty title set'; + $asset->title('<h1>Header</h1>text'); + is $asset->title, 'Headertext', '... HTML is filtered out'; + $asset->title('<h1></h1>'); + is $asset->title, 'Untitled', '... if HTML filters out all, returns default'; + + #is $asset->get('title'), $asset->title, '... get(title) works'; + + debug($@); + undef $@; +} + +sub t_01_menuTitle : Test(8) { + my $test = shift; + my $session = $test->session; + my $asset = $test->class->new({ + session => $session, + $test->constructorExtras($session), + }); + + note "menuTitle"; + + can_ok $asset, 'menuTitle'; + is $asset->menuTitle, 'Untitled', 'menuTitle: default is untitled'; + + $asset = $test->class->new({ + $test->constructorExtras($session), + session => $session, + title => 'asset title', + }); + + is $asset->menuTitle, 'asset title', 'menuTitle: default is title'; + + $asset->menuTitle('asset menuTitle'); + is $asset->menuTitle, 'asset menuTitle', '... set and get'; + + $asset->menuTitle(''); + is $asset->menuTitle, 'asset title', '... set to default when trying to clear the title'; + + $asset->menuTitle('<h1>Header</h1>text'); + is $asset->menuTitle, 'Headertext', '... HTML is filtered out'; + $asset->menuTitle('<h1></h1>'); + is $asset->menuTitle, 'asset title', '... if HTML filters out all, returns default'; + + $asset = $test->class->new({ + $test->constructorExtras($session), + session => $session, + title => 'asset title', + menuTitle => 'menuTitle asset', + }); + is $asset->menuTitle, 'menuTitle asset', '... set via constructor'; + + debug($@); + undef $@; +} + +sub t_01_uiLevel : Test(1) { + my $test = shift; + my $session = $test->session; + note "uiLevel"; + my $asset = $test->class->new({ + session => $session, + $test->constructorExtras($session), + }); + is $asset->uiLevel, $test->assetUiLevel, 'asset uiLevel check'; + + debug($@); + undef $@; +} + +sub t_01_write_update : Test(8) { + my $test = shift; + my $session = $test->session; + note "write, update"; + + my $testId = 'wg8TestAsset0000000001'; + my $revisionDate = time(); + $session->db->write("insert into asset (assetId) VALUES (?)", [$testId]); + $session->db->write("insert into assetData (assetId, revisionDate) VALUES (?,?)", [$testId, $revisionDate]); + + my $testAsset = WebGUI::Asset->new($session, $testId, $revisionDate); + $testAsset->title('wg8 test title'); + $testAsset->lastModified(0); + is $testAsset->assetSize, 0, 'assetSize is 0 by default'; + $testAsset->write(); + isnt $testAsset->lastModified, 0, 'lastModified updated on write'; + isnt $testAsset->assetSize, 0, 'assetSize updated on write'; + + my $testData = $session->db->quickHashRef('select * from assetData where assetId=? and revisionDate=?',[$testId, $revisionDate]); + is $testData->{title}, 'wg8 test title', 'data written correctly to db'; + + $testAsset->update({ + isHidden => 1, + encryptPage => 1, + }); + + is $testAsset->isHidden, 1, 'isHidden set via update'; + is $testAsset->encryptPage, 1, 'encryptPage set via update'; + + $testData = $session->db->quickHashRef('select * from assetData where assetId=? and revisionDate=?',[$testId, $revisionDate]); + is $testData->{isHidden}, 1, 'isHidden written correctly to db'; + is $testData->{encryptPage}, 1, 'encryptPage written correctly to db'; + + $session->db->write("delete from asset where assetId=?", [$testId]); + $session->db->write("delete from assetData where assetId=?", [$testId]); + + debug($@); + undef $@; +} + +sub t_05_cut_paste : Test(5) { + note "cut"; + my $test = shift; + my $session = $test->session; + my ($tag, $asset, @parents) = $test->getAnchoredAsset(); + ok $asset->cut, 'cut returns true if it was cut'; + is $asset->state, 'clipboard', 'asset state updated'; + my $session_asset = $session->asset(); + $session->asset($parents[-1]); + ok eval { $asset->canPaste }, 'canPaste: allowed to paste here'; + debug($@); + undef $@; + ok eval { $parents[-1]->paste($asset->assetId) }, 'paste returns true when it pastes'; + debug($@); + undef $@; + my $asset_prime = eval { $asset->cloneFromDb }; + debug($@); + undef $@; + is $asset_prime->state, 'published', 'asset state updated'; + $session->asset($session_asset); + debug($@); + undef $@; +} + +sub t_05_keywords : Test(3) { + my $test = shift; + my $session = $test->session; + my ($tag, $asset, @parents) = $test->getAnchoredAsset(); + can_ok $asset, 'keywords'; + $asset->keywords('chess set'); + is $asset->keywords, 'chess set', 'set and get of keywords via direct accessor'; + is $asset->get('keywords'), 'chess set', 'via get method'; + debug($@); + undef $@; +} + +sub t_05_purge : Test(3) { + note "purge"; + my $test = shift; + my $session = $test->session; + my ($tag, $asset, @parents) = $test->getAnchoredAsset(); + my @tables = $asset->meta->get_tables; + ok $asset->purge, 'purge returns true if it was purged'; + throws_ok { WebGUI::Asset->newById($session, $asset->assetId); } 'WebGUI::Error::InvalidParam', 'Unable to fetch asset by assetId now'; + undef $@; # or else Test::Class barfs + my $exists_in_table = 0; + foreach my $table (@tables) { + $exists_in_table ||= $session->db->quickScalar("select count(*) from `$table` where assetId=?",[$asset->assetId]); + } + ok ! $exists_in_table, 'assetId removed from all asset tables'; + debug($@); + undef $@; +} + +sub t_10_addRevision : Tests { + note "addRevision"; + my ( $test ) = @_; + my $session = $test->session; + my ( $tag, $asset, @parents ) = $test->getAnchoredAsset(); + $tag->setWorking; + + my $newRevision = $asset->addRevision( + { title => "Newly Revised Title" }, + $asset->revisionDate+2, + ); + isa_ok( $newRevision, Scalar::Util::blessed( $asset ), "addRevision returns new revision of asset object" ); + is( $newRevision->title, "Newly Revised Title", "properties set correctly" ); + is( $newRevision->revisionDate, $asset->revisionDate+2, 'revisionDate set correctly' ); + $newRevision->purgeRevision; + + debug($@); + undef $@; +} + +sub t_11_getEditForm : Tests { + note "getEditForm"; + my ( $test ) = @_; + my $session = $test->session; + my ( $tag, $asset, @parents ) = $test->getAnchoredAsset(); + + # local $SIG{__DIE__} = sub { use Carp; Carp::confess "@_"; }; + # local $SIG{__DIE__} = sub { use wth; wth::wth "@_"; }; # wth.pm is in a gist of scrottie's on github + + my $f = $asset->getEditForm; + + isa_ok( $f, 'WebGUI::FormBuilder' ); + + # assetId, className, keywords + isa_ok( $f->getTab('meta')->getField('assetId'), 'WebGUI::Form::Guid' ); + isa_ok( $f->getTab('meta')->getField('className'), 'WebGUI::Form::ClassName' ); + isa_ok( $f->getTab('meta')->getField('keywords'), 'WebGUI::Form::Keywords' ); + + # Tabs + isa_ok( $f->getTab('properties'), 'WebGUI::FormBuilder::Tab' ); + isa_ok( $f->getTab('display'), 'WebGUI::FormBuilder::Tab' ); + isa_ok( $f->getTab('security'), 'WebGUI::FormBuilder::Tab' ); + isa_ok( $f->getTab('meta'), 'WebGUI::FormBuilder::Tab' ); + + # Metadata + + # Property overrides + ok( !$f->getField('func'), 'form must not contain "func"' ); + + # Properties + use Data::Dumper; + + # compare $asset->getProperties to $asset->getEditForm->getFieldsRecursive + + my @properties = ( + List::MoreUtils::uniq # no dups, please + $test->dynamic_form_labels, # per-test hard-coded labels known to be added at runtime vs with property blocks + grep { ($_ ne 'Mobile Template') xor $session->setting->get('useMobileStyle') } + grep $_, # a rare few property blocks have niether noFormPost nor label? XXX TODO tests/fix + map { $asset->getFormProperties($_)->{label} } # getFormProperties returns a plain hash + grep { ! $asset->meta->find_attribute_by_name( $_ )->noFormPost } + $asset->getProperties + ); + + my @form = ( + List::MoreUtils::uniq + grep { $_ and $_ ne 'Keywords' and $_ ne 'Class Name' and $_ ne 'Asset ID' and $_ ne 'Approved' } + map $_->get('label'), + flattenFormObjects($f->getFieldsRecursive) # mixture of arrays of Form objects and arrays-of-arrays of them; flatten it out + ); + + my %superlist = map { ( $_ => 1 ) } @form, @properties; + # note "all labels: " . join ', ', keys %superlist; + + for my $label (keys %superlist) { + no warnings 'uninitialized'; + note "label ``$label'' not in properties" if ! grep { $_ eq $label } @properties; + note "label ``$label'' not in form" if ! grep { $_ eq $label } @form; + } + + note "properties: " . join ', ', sort { $a cmp $b } map { $_ } @properties; + note "form: " . join ', ', sort { $a cmp $b } map { $_ } @form; + + cmp_deeply( + \@properties, + subbagof( @form ), + 'getProperties are all in getEditForm->getFieldsRecursive', + ); + + debug($@); + undef $@; + +} + +sub t_20_www_editSave : Tests { + note "www_editSave"; + my ( $test ) = @_; + my $session = $test->session; + my ( $tag, $asset, @parents ) = $test->getAnchoredAsset(); + + # Alter permissions so www_editSave works + my $oldGroupId = $asset->groupIdEdit; + $asset->groupIdEdit( 7 ); # Everybody! Everybody! + + $asset->commit; + + my %mergedProperties = ( + formProperties($asset), + title => "Newly Saved Title", + ); + + $test->postProcessMergedProperties(\%mergedProperties); + + # local $SIG{__DIE__} = sub { use Carp; Carp::confess "@_"; }; + # local $SIG{__DIE__} = sub { use wth; wth::wth "@_"; }; # see note above about wth + + my $mech = WebGUI::Test::Mechanize->new( config => WebGUI::Test->file ); + $mech->get('/'); + $mech->session->user({ userId => 3 }); + $tag = WebGUI::VersionTag->getWorking( $mech->session ); + $tag->setWorking; + $mech->get_ok( $asset->getUrl('func=edit') ); + + my $form_content = $mech->content; + if ( $test->isa( 'Test::WebGUI::Asset::File::GalleryFile::Photo' ) + || $test->isa( 'Test::WebGUI::Asset::Wobject::GalleryAlbum' ) + || $test->isa( 'Test::WebGUI::Asset::Event' ) + ) { + $session->log->info( $form_content ); + } + $mech->submit_form_ok( { + fields => \%mergedProperties, + }, + "submit www_editSave form" + ); + + # Get the newly-created revision of the asset + ok( my $newRevision = eval { WebGUI::Asset->newPending( $mech->session, $asset->getId ); }, 'newPending returns true' ); + debug($@); + undef $@; + + ok( $newRevision->tagId, 'new revision has a tag' ); + if ( $asset->getAutoCommitWorkflowId ) { + isnt( $newRevision->tagId, $tag->getId, 'Not added to existing working tag' ); + ok( my $newTag = WebGUI::VersionTag->new( $session, $newRevision->tagId ), 'tag exists' ); + } + else { + is( $newRevision->tagId, $tag->getId, "Added to existing working tag" ); + } + is( $newRevision->title, $mergedProperties{title}, 'new revision has the corret title' ); + + # Alter permissions so it does not work + # XXX todo? + + # Set locked so it does not work + # XXX todo? + + eval { $asset->groupIdEdit( $oldGroupId ); }; + + debug($@); + undef $@; +} + +sub t_20_addSave : Tests { + note "www_addSave"; + my ( $test ) = @_; + my $session = $test->session; + my ( $tag, $asset, @parents ) = $test->getAnchoredAsset(); + + # Alter permissions so www_addSave works + my $oldGroupId = $asset->groupIdEdit; + $asset->groupIdEdit( 7 ); # Everybody! Everybody! + + $tag->setWorking; + + + debug( $@ ); + undef $@; +} + +#sub asserts : Test(shutdown) { +# # XXX Todo these should be moved into the appropriate Test::Class subclasses and be made more explicit, if they are to be kept +# # XXX debugging garbage to track down corruption of the asset tree +# my $test = shift; +# my $session = $test->session; +# my $assets = WebGUI::Asset->getRoot($session)->getLineage(['descendants'], {returnObjects=>1}); +# # local $SIG{__DIE__} = sub { use wth; wth::wth "@_"; }; # see note above about wth +# for my $asset (@$assets) { +# #if(ref($asset) eq 'WebGUI::Asset::Wobject::Layout') { +# # note "running view on Wobject::Layout of Id: " . $asset->getId; +# # # make sure any WG::A::Story objects created check out before testing gets any further along +# # $asset->view; +# #} +# if(ref($asset) eq 'WebGUI::Asset::Story') { +# note "running canEdit on Asset::Story of Id: " . $asset->getId; +# # make sure any WG::A::Story objects created check out before testing gets any further along +# $asset->canEdit; +# } +# } +#} + +1; + +__END__ + +{ + note "getClassById"; + my $class; + $class = WebGUI::Asset->getClassById($session, 'PBasset000000000000001'); + is $class, 'WebGUI::Asset', 'getClassById: retrieve a class'; + $class = WebGUI::Asset->getClassById($session, 'PBasset000000000000001'); + is $class, 'WebGUI::Asset', '... cache check'; + $class = WebGUI::Asset->getClassById($session, 'PBasset000000000000002'); + is $class, 'WebGUI::Asset::Wobject::Folder', '... retrieve another class'; +} + +{ + note "new, fetching from db"; + my $asset; + $asset = WebGUI::Asset->new($session, 'PBasset000000000000001'); + isa_ok $asset, 'WebGUI::Asset'; + is $asset->title, 'Root', 'got the right asset'; +} + +{ + note "getDefault"; + my $asset = WebGUI::Asset->getDefault($session); + isa_ok $asset, 'WebGUI::Asset::Wobject::Layout'; +} + +{ + note "get gets WebGUI::Definition properties, and standard attributes"; + my $asset = WebGUI::Asset->new({session => $session, parentId => 'I have a parent'}); + is $asset->get('className'), 'WebGUI::Asset', 'get(property) works on className'; + is $asset->get('assetId'), $asset->assetId, '... works on assetId'; + is $asset->get('parentId'), 'I have a parent', '... works on parentId'; + my $properties = $asset->get(); + is $properties->{className}, 'WebGUI::Asset', 'get() works on className'; + is $properties->{assetId}, $asset->assetId, '... works on assetId'; + is $properties->{parentId}, 'I have a parent', '... works on parentId'; +} + diff --git a/t/tests/Test/WebGUI/Asset/Event.pm b/t/tests/Test/WebGUI/Asset/Event.pm new file mode 100644 index 000000000..8468761cc --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Event.pm @@ -0,0 +1,33 @@ +package Test::WebGUI::Asset::Event; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset/; + +use Test::More; +use Test::Deep; +use Test::Exception; + +sub list_of_tables { + return [qw/assetData Event/]; +} + +sub parent_list { + return ['WebGUI::Asset::Wobject::Calendar']; +} + +sub postProcessMergedProperties { + my ( $test, $props ) = @_; + $props->{startDate} = "2010-01-01"; + $props->{endDate} = "2010-01-02"; +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/File.pm b/t/tests/Test/WebGUI/Asset/File.pm new file mode 100644 index 000000000..da7275713 --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/File.pm @@ -0,0 +1,26 @@ +package Test::WebGUI::Asset::File; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub list_of_tables { + return [qw/assetData FileAsset/]; +} + +sub dynamic_form_labels { return 'New file to upload' }; + +1; diff --git a/t/tests/Test/WebGUI/Asset/File/GalleryFile.pm b/t/tests/Test/WebGUI/Asset/File/GalleryFile.pm new file mode 100644 index 000000000..ca6f9e107 --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/File/GalleryFile.pm @@ -0,0 +1,30 @@ +package Test::WebGUI::Asset::File::GalleryFile; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset::File/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub list_of_tables { + return [qw/assetData FileAsset GalleryFile/]; +} + +sub parent_list { + return [qw/WebGUI::Asset::Wobject::Gallery WebGUI::Asset::Wobject::GalleryAlbum /]; +} + +sub dynamic_form_labels { return 'New file to upload' }; + +1; diff --git a/t/tests/Test/WebGUI/Asset/File/GalleryFile/Photo.pm b/t/tests/Test/WebGUI/Asset/File/GalleryFile/Photo.pm new file mode 100644 index 000000000..afd7db8cd --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/File/GalleryFile/Photo.pm @@ -0,0 +1,38 @@ +package Test::WebGUI::Asset::File::GalleryFile::Photo; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset::File::GalleryFile/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub list_of_tables { + return [qw/assetData FileAsset GalleryFile Photo/]; +} + +sub dynamic_form_labels { return 'New file to upload' }; + +sub constructorExtras { + my $test = shift; + my $session = shift or die; + my $storage = WebGUI::Storage->create($session); + WebGUI::Test->addToCleanup($storage); + my $filename = $storage->addFileFromFilesystem(WebGUI::Test->getTestCollateralPath('gooey.jpg')); + # return storageId => $storage->getId; + warn "XXX filename: $filename"; + # return filename => $filename; + return filename => $filename, storageId => $storage->getId; +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/File/Image.pm b/t/tests/Test/WebGUI/Asset/File/Image.pm new file mode 100644 index 000000000..ba550ca72 --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/File/Image.pm @@ -0,0 +1,44 @@ +package Test::WebGUI::Asset::File::Image; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub list_of_tables { + return [qw/assetData FileAsset ImageAsset/]; +} + +sub dynamic_form_labels { return 'New file to upload'; } + +sub t_11_getEditForm : Tests( 2 ) { + my $test = shift; + $test->SUPER::t_11_getEditForm( @_ ); + my $session = $test->session; + my ( $tag, $asset, @parents ) = $test->getAnchoredAsset(); + + $asset->filename('abc.jpg'); # the thumbnail and imageSize read-only form elements only get added if there is a filename + + # Test extra fields + my $f = $asset->getEditForm; +# do { local $Data::Dumper::Maxdepth = 7; use Data::Dumper; warn Dumper $f; }; + isa_ok( $f->getTab("properties")->getField("thumbnail"), "WebGUI::Form::ReadOnly" ); + isa_ok( $f->getTab("properties")->getField("imageSize"), "WebGUI::Form::ReadOnly" ); + + # TODO: Test overrides for extra fields + +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/File/ZipArchive.pm b/t/tests/Test/WebGUI/Asset/File/ZipArchive.pm new file mode 100644 index 000000000..e608b920b --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/File/ZipArchive.pm @@ -0,0 +1,26 @@ +package Test::WebGUI::Asset::File::ZipArchive; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub list_of_tables { + return [qw/assetData FileAsset ZipArchiveAsset/]; +} + +sub dynamic_form_labels { return 'New file to upload' }; + +1; diff --git a/t/tests/Test/WebGUI/Asset/MapPoint.pm b/t/tests/Test/WebGUI/Asset/MapPoint.pm new file mode 100644 index 000000000..1990b3f64 --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/MapPoint.pm @@ -0,0 +1,27 @@ +package Test::WebGUI::Asset::MapPoint; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset/; + +use Test::More; +use Test::Deep; +use Test::Exception; + +sub list_of_tables { + return [qw/assetData MapPoint/]; +} + +sub parent_list { + return ['WebGUI::Asset::Wobject::Map']; +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/MatrixListing.pm b/t/tests/Test/WebGUI/Asset/MatrixListing.pm new file mode 100644 index 000000000..d4e624c4e --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/MatrixListing.pm @@ -0,0 +1,32 @@ +package Test::WebGUI::Asset::MatrixListing; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset/; + +use Test::More; +use Test::Deep; +use Test::Exception; + +sub list_of_tables { + return [qw/assetData MatrixListing assetAspectComments/]; +} + +sub parent_list { + return ['WebGUI::Asset::Wobject::Matrix']; +} + +sub t_11_getEditForm : Tests { + ok(1); # TODO: Test MatrixListing getEditForm + # Do not extend other test +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/Post.pm b/t/tests/Test/WebGUI/Asset/Post.pm new file mode 100644 index 000000000..fcb3c58b8 --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Post.pm @@ -0,0 +1,33 @@ +package Test::WebGUI::Asset::Post; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub list_of_tables { + return [qw/assetData Post/]; +} + +sub parent_list { + return [ map { "WebGUI::Asset::$_"} qw/Wobject::Collaboration Post::Thread/ ]; +} + +sub postProcessMergedProperties { + my ( $test, $props ) = @_; + $props->{func} = "editSave"; # func defaults to preview mode +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/Post/Thread.pm b/t/tests/Test/WebGUI/Asset/Post/Thread.pm new file mode 100644 index 000000000..a3e01aa5d --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Post/Thread.pm @@ -0,0 +1,29 @@ +package Test::WebGUI::Asset::Post::Thread; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset::Post/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub list_of_tables { + return [qw/assetData Post Thread/]; +} + +sub parent_list { + return [ "WebGUI::Asset::Wobject::Collaboration" ]; +} + +1; + diff --git a/t/tests/Test/WebGUI/Asset/Redirect.pm b/t/tests/Test/WebGUI/Asset/Redirect.pm new file mode 100644 index 000000000..af874b341 --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Redirect.pm @@ -0,0 +1,28 @@ +package Test::WebGUI::Asset::Redirect; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub assetUiLevel { + return 9; +} + +sub list_of_tables { + return [qw/assetData redirect/]; +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/RichEdit.pm b/t/tests/Test/WebGUI/Asset/RichEdit.pm new file mode 100644 index 000000000..399fb68dc --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/RichEdit.pm @@ -0,0 +1,30 @@ +package Test::WebGUI::Asset::RichEdit; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub assetUiLevel { + return 5; +} + +sub list_of_tables { + return [qw/assetData RichEdit/]; +} + +sub dynamic_form_labels { return 'Toolbar Buttons' } + +1; diff --git a/t/tests/Test/WebGUI/Asset/Shortcut.pm b/t/tests/Test/WebGUI/Asset/Shortcut.pm new file mode 100644 index 000000000..a695175b7 --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Shortcut.pm @@ -0,0 +1,29 @@ +package Test::WebGUI::Asset::Shortcut; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset/; + +use Test::More; +use Test::Deep; +use Test::Exception; + +sub constructorExtras { + return shortcutToAssetId => 'PBasset000000000000001'; +} + +sub list_of_tables { + return [qw/assetData Shortcut/]; +} + +sub dynamic_form_labels { return 'Asset to Mirror' } + +1; diff --git a/t/tests/Test/WebGUI/Asset/Sku.pm b/t/tests/Test/WebGUI/Asset/Sku.pm new file mode 100644 index 000000000..e9a61240b --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Sku.pm @@ -0,0 +1,24 @@ +package Test::WebGUI::Asset::Sku; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub list_of_tables { + return [qw/assetData sku/]; +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/Sku/Donation.pm b/t/tests/Test/WebGUI/Asset/Sku/Donation.pm new file mode 100644 index 000000000..cd7045c1a --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Sku/Donation.pm @@ -0,0 +1,24 @@ +package Test::WebGUI::Asset::Sku::Donation; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub list_of_tables { + return [qw/assetData sku donation/]; +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/Sku/FlatDiscount.pm b/t/tests/Test/WebGUI/Asset/Sku/FlatDiscount.pm new file mode 100644 index 000000000..56f2b7952 --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Sku/FlatDiscount.pm @@ -0,0 +1,24 @@ +package Test::WebGUI::Asset::Sku::FlatDiscount; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub list_of_tables { + return [qw/assetData sku FlatDiscount/]; +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/Sku/Product.pm b/t/tests/Test/WebGUI/Asset/Sku/Product.pm new file mode 100644 index 000000000..db5abe9b4 --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Sku/Product.pm @@ -0,0 +1,24 @@ +package Test::WebGUI::Asset::Sku::Product; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub list_of_tables { + return [qw/assetData sku Product/]; +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/Sku/Subscription.pm b/t/tests/Test/WebGUI/Asset/Sku/Subscription.pm new file mode 100644 index 000000000..5bcd9aaee --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Sku/Subscription.pm @@ -0,0 +1,24 @@ +package Test::WebGUI::Asset::Sku::Subscription; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub list_of_tables { + return [qw/assetData sku Subscription/]; +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/Snippet.pm b/t/tests/Test/WebGUI/Asset/Snippet.pm new file mode 100644 index 000000000..88e2d81d8 --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Snippet.pm @@ -0,0 +1,33 @@ +package Test::WebGUI::Asset::Snippet; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub assetUiLevel { + return 5; +} + +sub list_of_tables { + return [qw/assetData snippet/]; +} + +sub postProcessMergedProperties { + my ( $test, $props ) = @_; + $props->{snippet} = "some text"; +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/Story.pm b/t/tests/Test/WebGUI/Asset/Story.pm new file mode 100644 index 000000000..e0a4cc43b --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Story.pm @@ -0,0 +1,32 @@ +package Test::WebGUI::Asset::Story; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset/; + +use Test::More; +use Test::Deep; +use Test::Exception; + +sub list_of_tables { + return [qw/assetData Story/]; +} + +sub parent_list { + return ['WebGUI::Asset::Wobject::StoryArchive', 'WebGUI::Asset::Wobject::Folder']; +} + +sub t_11_getEditForm : Tests { + # Override because getEditForm returns straight HTML + ok(1); +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/Template.pm b/t/tests/Test/WebGUI/Asset/Template.pm new file mode 100644 index 000000000..467a9d179 --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Template.pm @@ -0,0 +1,34 @@ +package Test::WebGUI::Asset::Template; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub list_of_tables { + return [qw/assetData template/]; +} + +sub postProcessMergedProperties { + my $test = shift; + my $properties = shift; + if( exists $properties->{attachmentsJson} and ! defined $properties->{attachmentsJson} ) { + $properties->{attachmentsJson} = '[{"url":"/webgui.css","type":"stylesheet"}]'; + } +} + +sub dynamic_form_labels { return 'Template Type' }; + +1; diff --git a/t/tests/Test/WebGUI/Asset/WikiPage.pm b/t/tests/Test/WebGUI/Asset/WikiPage.pm new file mode 100644 index 000000000..9e55bb669 --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/WikiPage.pm @@ -0,0 +1,32 @@ +package Test::WebGUI::Asset::WikiPage; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset/; + +use Test::More; +use Test::Deep; +use Test::Exception; + +sub list_of_tables { + return [qw/assetData WikiPage assetAspect_Subscribable assetAspectComments/]; +} + +sub parent_list { + return ['WebGUI::Asset::Wobject::WikiMaster']; +} + +sub t_11_getEditForm : Tests { + ok(1); + # Override, getEditForm returns HTML +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/Wobject.pm b/t/tests/Test/WebGUI/Asset/Wobject.pm new file mode 100644 index 000000000..da1b39b5e --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Wobject.pm @@ -0,0 +1,40 @@ +package Test::WebGUI::Asset::Wobject; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub list_of_tables { + return [qw/assetData wobject/]; +} + +sub t_15_getStyleTemplateId : Test(2) { + note "getStyleTemplateId"; + my ( $test ) = @_; + my $session = $test->session; + $session->style->setMobileStyle(0); + $session->setting->set('useMobileStyle', 1); + my ( $tag, $asset, @parents ) = $test->getAnchoredAsset(); + $asset->styleTemplateId('Style'); + $asset->mobileStyleTemplateId('Mobile'); + is $asset->getStyleTemplateId, 'Style', 'returns Style since mobile was not requested'; + $session->style->setMobileStyle(1); + is $asset->getStyleTemplateId, 'Mobile', 'returns Mobile since mobile was set'; + $session->style->setMobileStyle(0); + $session->setting->set('useMobileStyle', 0); +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/Wobject/Article.pm b/t/tests/Test/WebGUI/Asset/Wobject/Article.pm new file mode 100644 index 000000000..e809fe340 --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Wobject/Article.pm @@ -0,0 +1,34 @@ +package Test::WebGUI::Asset::Wobject::Article; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset::Wobject/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub list_of_tables { + return [qw/assetData wobject Article/]; +} + +sub getStorageLocation : Test(2) { + my $test = shift; + my $session = $test->session; + my $asset = $test->class->new({session => $session}); + my $storage = $asset->getStorageLocation(); + isa_ok $storage, 'WebGUI::Storage'; + is $asset->storageId, $storage->getId, 'asset updated with storageId'; + WebGUI::Test->addToCleanup($storage); +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/Wobject/Calendar.pm b/t/tests/Test/WebGUI/Asset/Wobject/Calendar.pm new file mode 100644 index 000000000..4e2a88278 --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Wobject/Calendar.pm @@ -0,0 +1,32 @@ +package Test::WebGUI::Asset::Wobject::Calendar; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 strict; +use warnings; + +use base qw/Test::WebGUI::Asset::Wobject/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub list_of_tables { + return [qw/assetData wobject Calendar/]; +} + +sub postProcessMergedProperties { + my $test = shift; + my $properties = shift; + $properties->{icalFeeds} = q{[]}; # XXX get some real data to stick in there +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/Wobject/Carousel.pm b/t/tests/Test/WebGUI/Asset/Wobject/Carousel.pm new file mode 100644 index 000000000..85841f7f9 --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Wobject/Carousel.pm @@ -0,0 +1,37 @@ +package Test::WebGUI::Asset::Wobject::Carousel; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset::Wobject/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub list_of_tables { + return [qw/assetData wobject Carousel/]; +} + +sub postProcessMergedProperties { + my ( $test, $props ) = @_; + $props->{something} = JSON->new->encode({ + items => [ + { + sequenceNumber => 1, + text => "Item 1", + }, + ], + }); + return $props; +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/Wobject/Collaboration b/t/tests/Test/WebGUI/Asset/Wobject/Collaboration new file mode 100644 index 000000000..ccb16208f --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Wobject/Collaboration @@ -0,0 +1,33 @@ +package Test::Asset::Wobject::HttpProxy; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2009 Plain Black Corporation. +#------------------------------------------------------------------- +# Please read the legal notices (docs/legal.txt) and the license +# (docs/license.txt) that came with this distribution before using +# this software. +#------------------------------------------------------------------- +# http://www.plainblack.com info@plainblack.com +#------------------------------------------------------------------- + +use FindBin; +use lib "$FindBin::Bin/lib"; + +use base qw/Test::AssetBase/; + +use Test::More; +use Test::Deep; +use Test::Exception; + +sub class { + return qw/WebGUI::Asset::Wobject::HttpProxy/; +} + +sub assetUiLevel { + return 5; +} + +sub list_of_tables { + return [qw/assetData wobject HttpProxy/]; +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/Wobject/Collaboration.pm b/t/tests/Test/WebGUI/Asset/Wobject/Collaboration.pm new file mode 100644 index 000000000..77f498a76 --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Wobject/Collaboration.pm @@ -0,0 +1,24 @@ +package Test::WebGUI::Asset::Wobject::Collaboration; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset::Wobject/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub list_of_tables { + return [qw/assetData wobject Collaboration assetAspectRssFeed/]; +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/Wobject/Dashboard.pm b/t/tests/Test/WebGUI/Asset/Wobject/Dashboard.pm new file mode 100644 index 000000000..3aa88c203 --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Wobject/Dashboard.pm @@ -0,0 +1,28 @@ +package Test::WebGUI::Asset::Wobject::HttpProxy; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset::Wobject/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub assetUiLevel { + return 5; +} + +sub list_of_tables { + return [qw/assetData wobject HttpProxy/]; +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/Wobject/DataForm.pm b/t/tests/Test/WebGUI/Asset/Wobject/DataForm.pm new file mode 100644 index 000000000..68a0d9986 --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Wobject/DataForm.pm @@ -0,0 +1,28 @@ +package Test::WebGUI::Asset::Wobject::DataForm; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset::Wobject/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub assetUiLevel { + return 5; +} + +sub list_of_tables { + return [qw/assetData wobject DataForm/]; +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/Wobject/DataTable.pm b/t/tests/Test/WebGUI/Asset/Wobject/DataTable.pm new file mode 100644 index 000000000..20bc251f3 --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Wobject/DataTable.pm @@ -0,0 +1,24 @@ +package Test::WebGUI::Asset::Wobject::DataTable; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset::Wobject/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub list_of_tables { + return [qw/assetData wobject DataTable/]; +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/Wobject/EventManagementSystem.pm b/t/tests/Test/WebGUI/Asset/Wobject/EventManagementSystem.pm new file mode 100644 index 000000000..e4e247b82 --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Wobject/EventManagementSystem.pm @@ -0,0 +1,24 @@ +package Test::WebGUI::Asset::Wobject::EventManagementSystem; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset::Wobject/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub list_of_tables { + return [qw/assetData wobject EventManagementSystem/]; +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/Wobject/Folder.pm b/t/tests/Test/WebGUI/Asset/Wobject/Folder.pm new file mode 100644 index 000000000..675dc8bc0 --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Wobject/Folder.pm @@ -0,0 +1,28 @@ +package Test::WebGUI::Asset::Wobject::Folder; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset::Wobject/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub assetUiLevel { + return 5; +} + +sub list_of_tables { + return [qw/assetData wobject Folder/]; +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/Wobject/Gallery.pm b/t/tests/Test/WebGUI/Asset/Wobject/Gallery.pm new file mode 100644 index 000000000..d33d859cd --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Wobject/Gallery.pm @@ -0,0 +1,24 @@ +package Test::WebGUI::Asset::Wobject::Gallery; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset::Wobject/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub list_of_tables { + return [qw/assetData wobject Gallery assetAspectRssFeed/]; +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/Wobject/GalleryAlbum.pm b/t/tests/Test/WebGUI/Asset/Wobject/GalleryAlbum.pm new file mode 100644 index 000000000..31f7f92d4 --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Wobject/GalleryAlbum.pm @@ -0,0 +1,33 @@ +package Test::WebGUI::Asset::Wobject::GalleryAlbum; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset::Wobject/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub list_of_tables { + return [qw/assetData wobject GalleryAlbum assetAspectRssFeed/]; +} + +sub parent_list { + return [qw/WebGUI::Asset::Wobject::Gallery/]; +} + +sub postProcessMergedProperties { + my ( $test, $props ) = @_; + $props->{save} = "save"; # GalleryAlbum www_edit checks for this to go to editSave +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/Wobject/HttpProxy.pm b/t/tests/Test/WebGUI/Asset/Wobject/HttpProxy.pm new file mode 100644 index 000000000..3aa88c203 --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Wobject/HttpProxy.pm @@ -0,0 +1,28 @@ +package Test::WebGUI::Asset::Wobject::HttpProxy; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset::Wobject/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub assetUiLevel { + return 5; +} + +sub list_of_tables { + return [qw/assetData wobject HttpProxy/]; +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/Wobject/InOutBoard.pm b/t/tests/Test/WebGUI/Asset/Wobject/InOutBoard.pm new file mode 100644 index 000000000..f00e61aaa --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Wobject/InOutBoard.pm @@ -0,0 +1,24 @@ +package Test::WebGUI::Asset::Wobject::InOutBoard; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset::Wobject/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub list_of_tables { + return [qw/assetData wobject InOutBoard/]; +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/Wobject/Layout.pm b/t/tests/Test/WebGUI/Asset/Wobject/Layout.pm new file mode 100644 index 000000000..9e42c81e6 --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Wobject/Layout.pm @@ -0,0 +1,24 @@ +package Test::WebGUI::Asset::Wobject::Layout; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset::Wobject/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub list_of_tables { + return [qw/assetData wobject Layout/]; +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/Wobject/Map.pm b/t/tests/Test/WebGUI/Asset/Wobject/Map.pm new file mode 100644 index 000000000..cc4d94376 --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Wobject/Map.pm @@ -0,0 +1,24 @@ +package Test::WebGUI::Asset::Wobject::Map; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset::Wobject/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub list_of_tables { + return [qw/assetData wobject Map/]; +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/Wobject/Matrix.pm b/t/tests/Test/WebGUI/Asset/Wobject/Matrix.pm new file mode 100644 index 000000000..1dab3ee5d --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Wobject/Matrix.pm @@ -0,0 +1,24 @@ +package Test::WebGUI::Asset::Wobject::Matrix; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset::Wobject/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub list_of_tables { + return [qw/assetData wobject Matrix/]; +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/Wobject/MessageBoard.pm b/t/tests/Test/WebGUI/Asset/Wobject/MessageBoard.pm new file mode 100644 index 000000000..2db8f0e49 --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Wobject/MessageBoard.pm @@ -0,0 +1,24 @@ +package Test::WebGUI::Asset::Wobject::MessageBoard; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset::Wobject/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub list_of_tables { + return [qw/assetData wobject MessageBoard/]; +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/Wobject/MultiSearch.pm b/t/tests/Test/WebGUI/Asset/Wobject/MultiSearch.pm new file mode 100644 index 000000000..636f1241f --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Wobject/MultiSearch.pm @@ -0,0 +1,24 @@ +package Test::WebGUI::Asset::Wobject::MultiSearch; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset::Wobject/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub list_of_tables { + return [qw/assetData wobject MultiSearch/]; +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/Wobject/Navigation.pm b/t/tests/Test/WebGUI/Asset/Wobject/Navigation.pm new file mode 100644 index 000000000..23644c2b6 --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Wobject/Navigation.pm @@ -0,0 +1,24 @@ +package Test::WebGUI::Asset::Wobject::Navigation; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset::Wobject/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub list_of_tables { + return [qw/assetData wobject Navigation/]; +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/Wobject/Poll.pm b/t/tests/Test/WebGUI/Asset/Wobject/Poll.pm new file mode 100644 index 000000000..dd6c66af2 --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Wobject/Poll.pm @@ -0,0 +1,28 @@ +package Test::WebGUI::Asset::Wobject::Poll; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset::Wobject/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub list_of_tables { + return [qw/assetData wobject Poll/]; +} + +sub dynamic_form_labels { + return 'Reset votes?', 'Answers', 'Generate image graph'; +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/Wobject/ProjectManager.pm b/t/tests/Test/WebGUI/Asset/Wobject/ProjectManager.pm new file mode 100644 index 000000000..da2c27e49 --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Wobject/ProjectManager.pm @@ -0,0 +1,24 @@ +package Test::WebGUI::Asset::Wobject::ProjectManager; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset::Wobject/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub list_of_tables { + return [qw/assetData wobject PM_wobject/]; +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/Wobject/SQLReport.pm b/t/tests/Test/WebGUI/Asset/Wobject/SQLReport.pm new file mode 100644 index 000000000..d01065271 --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Wobject/SQLReport.pm @@ -0,0 +1,33 @@ +package Test::WebGUI::Asset::Wobject::SQLReport; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset::Wobject/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub assetUiLevel { + return 5; +} + +sub list_of_tables { + return [qw/assetData wobject SQLReport/]; +} + +sub postProcessMergedProperties { + my ( $test, $props ) = @_; + $props->{dbQuery1} = "SELECT * FROM users"; +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/Wobject/Search.pm b/t/tests/Test/WebGUI/Asset/Wobject/Search.pm new file mode 100644 index 000000000..1d72e3c7d --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Wobject/Search.pm @@ -0,0 +1,24 @@ +package Test::WebGUI::Asset::Wobject::Search; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset::Wobject/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub list_of_tables { + return [qw/assetData wobject search/]; +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/Wobject/Shelf.pm b/t/tests/Test/WebGUI/Asset/Wobject/Shelf.pm new file mode 100644 index 000000000..9997ec281 --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Wobject/Shelf.pm @@ -0,0 +1,24 @@ +package Test::WebGUI::Asset::Wobject::Shelf; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset::Wobject/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub list_of_tables { + return [qw/assetData wobject Shelf/]; +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/Wobject/StockData.pm b/t/tests/Test/WebGUI/Asset/Wobject/StockData.pm new file mode 100644 index 000000000..f23185cf7 --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Wobject/StockData.pm @@ -0,0 +1,24 @@ +package Test::WebGUI::Asset::Wobject::StockData; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset::Wobject/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub list_of_tables { + return [qw/assetData wobject StockData/]; +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/Wobject/StoryArchive.pm b/t/tests/Test/WebGUI/Asset/Wobject/StoryArchive.pm new file mode 100644 index 000000000..6e5ad2cf2 --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Wobject/StoryArchive.pm @@ -0,0 +1,24 @@ +package Test::WebGUI::Asset::Wobject::StoryArchive; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset::Wobject/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub list_of_tables { + return [qw/assetData wobject StoryArchive assetAspectRssFeed/]; +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/Wobject/StoryTopic.pm b/t/tests/Test/WebGUI/Asset/Wobject/StoryTopic.pm new file mode 100644 index 000000000..c02e7d93d --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Wobject/StoryTopic.pm @@ -0,0 +1,24 @@ +package Test::WebGUI::Asset::Wobject::StoryTopic; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset::Wobject/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub list_of_tables { + return [qw/assetData wobject StoryTopic assetAspectRssFeed/]; +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/Wobject/Survey.pm b/t/tests/Test/WebGUI/Asset/Wobject/Survey.pm new file mode 100644 index 000000000..9ef728e08 --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Wobject/Survey.pm @@ -0,0 +1,24 @@ +package Test::WebGUI::Asset::Wobject::Survey; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset::Wobject/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub list_of_tables { + return [qw/assetData wobject Survey/]; +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/Wobject/SyndicatedContent.pm b/t/tests/Test/WebGUI/Asset/Wobject/SyndicatedContent.pm new file mode 100644 index 000000000..fc748f84e --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Wobject/SyndicatedContent.pm @@ -0,0 +1,28 @@ +package Test::WebGUI::Asset::Wobject::SyndicatedContent; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset::Wobject/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub assetUiLevel { + return 6; +} + +sub list_of_tables { + return [qw/assetData wobject SyndicatedContent assetAspectRssFeed/]; +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/Wobject/Thingy.pm b/t/tests/Test/WebGUI/Asset/Wobject/Thingy.pm new file mode 100644 index 000000000..c0d4774fc --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Wobject/Thingy.pm @@ -0,0 +1,24 @@ +package Test::WebGUI::Asset::Wobject::Thingy; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset::Wobject/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub list_of_tables { + return [qw/assetData wobject Thingy/]; +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/Wobject/TimeTracking.pm b/t/tests/Test/WebGUI/Asset/Wobject/TimeTracking.pm new file mode 100644 index 000000000..1a5cd7bc5 --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Wobject/TimeTracking.pm @@ -0,0 +1,24 @@ +package Test::WebGUI::Asset::Wobject::TimeTracking; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset::Wobject/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub list_of_tables { + return [qw/assetData wobject TT_wobject/]; +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/Wobject/UserList.pm b/t/tests/Test/WebGUI/Asset/Wobject/UserList.pm new file mode 100644 index 000000000..82431f7d4 --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Wobject/UserList.pm @@ -0,0 +1,24 @@ +package Test::WebGUI::Asset::Wobject::UserList; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset::Wobject/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub list_of_tables { + return [qw/assetData wobject UserList/]; +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/Wobject/WeatherData.pm b/t/tests/Test/WebGUI/Asset/Wobject/WeatherData.pm new file mode 100644 index 000000000..24ccaa996 --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Wobject/WeatherData.pm @@ -0,0 +1,24 @@ +package Test::WebGUI::Asset::Wobject::WeatherData; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset::Wobject/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub list_of_tables { + return [qw/assetData wobject WeatherData/]; +} + +1; diff --git a/t/tests/Test/WebGUI/Asset/Wobject/WikiMaster.pm b/t/tests/Test/WebGUI/Asset/Wobject/WikiMaster.pm new file mode 100644 index 000000000..52e593c87 --- /dev/null +++ b/t/tests/Test/WebGUI/Asset/Wobject/WikiMaster.pm @@ -0,0 +1,24 @@ +package Test::WebGUI::Asset::Wobject::WikiMaster; +#------------------------------------------------------------------- +# WebGUI is Copyright 2001-2012 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 base qw/Test::WebGUI::Asset::Wobject/; + +use Test::More; +use Test::Deep; +use Test::Exception; + + +sub list_of_tables { + return [qw/assetData wobject WikiMaster assetAspectRssFeed assetAspect_Subscribable/]; +} + +1; diff --git a/t/tests/Test/WebGUI/Form/AdSpace.pm b/t/tests/Test/WebGUI/Form/AdSpace.pm index 92b2092db..2b8fc9b69 100644 --- a/t/tests/Test/WebGUI/Form/AdSpace.pm +++ b/t/tests/Test/WebGUI/Form/AdSpace.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::AdSpace; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/Asset.pm b/t/tests/Test/WebGUI/Form/Asset.pm index e2fdcff33..6e094aa7f 100644 --- a/t/tests/Test/WebGUI/Form/Asset.pm +++ b/t/tests/Test/WebGUI/Form/Asset.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::Asset; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/AssetReportQuery.pm b/t/tests/Test/WebGUI/Form/AssetReportQuery.pm index 9e41a0b52..5976d4829 100644 --- a/t/tests/Test/WebGUI/Form/AssetReportQuery.pm +++ b/t/tests/Test/WebGUI/Form/AssetReportQuery.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::AssetReportQuery; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/Attachments.pm b/t/tests/Test/WebGUI/Form/Attachments.pm index 10ebd7ed6..ce72c68f1 100644 --- a/t/tests/Test/WebGUI/Form/Attachments.pm +++ b/t/tests/Test/WebGUI/Form/Attachments.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::Attachments; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/Button.pm b/t/tests/Test/WebGUI/Form/Button.pm index 45a89cda3..74d260047 100644 --- a/t/tests/Test/WebGUI/Form/Button.pm +++ b/t/tests/Test/WebGUI/Form/Button.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::Button; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/Captcha.pm b/t/tests/Test/WebGUI/Form/Captcha.pm index 5c177c673..560760ff4 100644 --- a/t/tests/Test/WebGUI/Form/Captcha.pm +++ b/t/tests/Test/WebGUI/Form/Captcha.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::Captcha; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/CheckList.pm b/t/tests/Test/WebGUI/Form/CheckList.pm index cbb74019b..014c9e1e1 100644 --- a/t/tests/Test/WebGUI/Form/CheckList.pm +++ b/t/tests/Test/WebGUI/Form/CheckList.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::CheckList; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/Checkbox.pm b/t/tests/Test/WebGUI/Form/Checkbox.pm index e7987eb93..ffe75b8a6 100644 --- a/t/tests/Test/WebGUI/Form/Checkbox.pm +++ b/t/tests/Test/WebGUI/Form/Checkbox.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::Checkbox; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/ClassName.pm b/t/tests/Test/WebGUI/Form/ClassName.pm index b1dcce66c..d60846c94 100644 --- a/t/tests/Test/WebGUI/Form/ClassName.pm +++ b/t/tests/Test/WebGUI/Form/ClassName.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::ClassName; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/Codearea.pm b/t/tests/Test/WebGUI/Form/Codearea.pm index 8053e56cc..9a906eeac 100644 --- a/t/tests/Test/WebGUI/Form/Codearea.pm +++ b/t/tests/Test/WebGUI/Form/Codearea.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::Codearea; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/Color.pm b/t/tests/Test/WebGUI/Form/Color.pm index d755e77e6..b49334431 100644 --- a/t/tests/Test/WebGUI/Form/Color.pm +++ b/t/tests/Test/WebGUI/Form/Color.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::Color; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/Combo.pm b/t/tests/Test/WebGUI/Form/Combo.pm index 30a829da5..ae466856c 100644 --- a/t/tests/Test/WebGUI/Form/Combo.pm +++ b/t/tests/Test/WebGUI/Form/Combo.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::Combo; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/CommentRating.pm b/t/tests/Test/WebGUI/Form/CommentRating.pm index 7b09148e7..80b272d39 100644 --- a/t/tests/Test/WebGUI/Form/CommentRating.pm +++ b/t/tests/Test/WebGUI/Form/CommentRating.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::CommentRating; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/ContentType.pm b/t/tests/Test/WebGUI/Form/ContentType.pm index 4d41c2424..d72156693 100644 --- a/t/tests/Test/WebGUI/Form/ContentType.pm +++ b/t/tests/Test/WebGUI/Form/ContentType.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::ContentType; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/Control.pm b/t/tests/Test/WebGUI/Form/Control.pm index b842ba68a..237eb0107 100644 --- a/t/tests/Test/WebGUI/Form/Control.pm +++ b/t/tests/Test/WebGUI/Form/Control.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::Control; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using @@ -40,8 +40,17 @@ sub t_00_method_check : Test(1) { can_ok $form, qw/get set headTags toHtml prepareWrapper toHtmlAsHidden toHtmlWithWrapper isInRequest isDynamicCompatible getName/; } +sub t_01_getPackageClassName : Test(1) { + my $test = shift; + my $session = $test->session; -sub t_01_get_set : Test(2) { + my $form = $test->class->new($session); + my $package = $test->class; + $package =~ s/WebGUI::Form:://; + is $form->getPackageClassName, 'wg-form-' . lcfirst $package; +} + +sub t_01_get_set : Test(3) { my $test = shift; my $session = $test->session; @@ -49,7 +58,7 @@ sub t_01_get_set : Test(2) { lives_ok { $form->set('name', 'form1'); } 'set name'; is $form->get('name'), 'form1', 'get name'; - + cmp_deeply $form->get, superhashof({ name => 'form1' }), 'get hashref'; } sub t_02_instanced : Test(1) { @@ -63,4 +72,22 @@ sub t_02_instanced : Test(1) { is $form->get('name'), 'form1', 'name set on instanciation'; } +sub t_03_toTemplateVars : Test(2) { + my $test = shift; + my $session = $test->session; + + my $form = $test->class->new($session, { + name => 'form1', + }); + + cmp_deeply $form->toTemplateVars, + superhashof({ + name => 'form1', + label => $form->getLabel, + label_nohover => $form->get('label'), + }), + 'toTemplateVars hashref'; + isnt $form->toTemplateVars, $form->get, 'toTemplateVars creates safe hashref'; +} + 1; diff --git a/t/tests/Test/WebGUI/Form/Country.pm b/t/tests/Test/WebGUI/Form/Country.pm index c5f62d1c5..8fcd53648 100644 --- a/t/tests/Test/WebGUI/Form/Country.pm +++ b/t/tests/Test/WebGUI/Form/Country.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::Country; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/CsrfToken.pm b/t/tests/Test/WebGUI/Form/CsrfToken.pm index 7330a8647..37164ef7d 100644 --- a/t/tests/Test/WebGUI/Form/CsrfToken.pm +++ b/t/tests/Test/WebGUI/Form/CsrfToken.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::CsrfToken; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/DataTable.pm b/t/tests/Test/WebGUI/Form/DataTable.pm index 287536029..6d0eb3aab 100644 --- a/t/tests/Test/WebGUI/Form/DataTable.pm +++ b/t/tests/Test/WebGUI/Form/DataTable.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::DataTable; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/DatabaseLink.pm b/t/tests/Test/WebGUI/Form/DatabaseLink.pm index d2f516377..f53300012 100644 --- a/t/tests/Test/WebGUI/Form/DatabaseLink.pm +++ b/t/tests/Test/WebGUI/Form/DatabaseLink.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::DatabaseLink; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/Date.pm b/t/tests/Test/WebGUI/Form/Date.pm index 980a84080..551e30992 100644 --- a/t/tests/Test/WebGUI/Form/Date.pm +++ b/t/tests/Test/WebGUI/Form/Date.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::Date; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/DateTime.pm b/t/tests/Test/WebGUI/Form/DateTime.pm index 8d8259a71..34bae3a06 100644 --- a/t/tests/Test/WebGUI/Form/DateTime.pm +++ b/t/tests/Test/WebGUI/Form/DateTime.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::DateTime; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/Div.pm b/t/tests/Test/WebGUI/Form/Div.pm index 936676f3e..2feb1bb2e 100644 --- a/t/tests/Test/WebGUI/Form/Div.pm +++ b/t/tests/Test/WebGUI/Form/Div.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::Div; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/Email.pm b/t/tests/Test/WebGUI/Form/Email.pm index 5a8b1dc97..6e34fc033 100644 --- a/t/tests/Test/WebGUI/Form/Email.pm +++ b/t/tests/Test/WebGUI/Form/Email.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::Email; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/FieldType.pm b/t/tests/Test/WebGUI/Form/FieldType.pm index a73dadc27..32dc532d0 100644 --- a/t/tests/Test/WebGUI/Form/FieldType.pm +++ b/t/tests/Test/WebGUI/Form/FieldType.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::FieldType; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/File.pm b/t/tests/Test/WebGUI/Form/File.pm index 42a15a69e..873631d29 100644 --- a/t/tests/Test/WebGUI/Form/File.pm +++ b/t/tests/Test/WebGUI/Form/File.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::File; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/FilterContent.pm b/t/tests/Test/WebGUI/Form/FilterContent.pm index f3d096ced..a8fe17b8f 100644 --- a/t/tests/Test/WebGUI/Form/FilterContent.pm +++ b/t/tests/Test/WebGUI/Form/FilterContent.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::FilterContent; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/Float.pm b/t/tests/Test/WebGUI/Form/Float.pm index 9c16b0f75..f34c8c289 100644 --- a/t/tests/Test/WebGUI/Form/Float.pm +++ b/t/tests/Test/WebGUI/Form/Float.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::Float; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/Group.pm b/t/tests/Test/WebGUI/Form/Group.pm index d23a72666..1ac746c2b 100644 --- a/t/tests/Test/WebGUI/Form/Group.pm +++ b/t/tests/Test/WebGUI/Form/Group.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::Group; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/Guid.pm b/t/tests/Test/WebGUI/Form/Guid.pm index 8975a500d..88b55c9eb 100644 --- a/t/tests/Test/WebGUI/Form/Guid.pm +++ b/t/tests/Test/WebGUI/Form/Guid.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::Guid; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/HTMLArea.pm b/t/tests/Test/WebGUI/Form/HTMLArea.pm index b9c3248a1..59737b3f2 100644 --- a/t/tests/Test/WebGUI/Form/HTMLArea.pm +++ b/t/tests/Test/WebGUI/Form/HTMLArea.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::HTMLArea; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/HexSlider.pm b/t/tests/Test/WebGUI/Form/HexSlider.pm index 9d4bc36b0..b38bc22af 100644 --- a/t/tests/Test/WebGUI/Form/HexSlider.pm +++ b/t/tests/Test/WebGUI/Form/HexSlider.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::HexSlider; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/Hexadecimal.pm b/t/tests/Test/WebGUI/Form/Hexadecimal.pm index 794119109..69af0abe0 100644 --- a/t/tests/Test/WebGUI/Form/Hexadecimal.pm +++ b/t/tests/Test/WebGUI/Form/Hexadecimal.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::Hexadecimal; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/Hidden.pm b/t/tests/Test/WebGUI/Form/Hidden.pm index ecf60e8f5..d9088a69e 100644 --- a/t/tests/Test/WebGUI/Form/Hidden.pm +++ b/t/tests/Test/WebGUI/Form/Hidden.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::Hidden; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/HiddenList.pm b/t/tests/Test/WebGUI/Form/HiddenList.pm index dd348e252..9368b17ab 100644 --- a/t/tests/Test/WebGUI/Form/HiddenList.pm +++ b/t/tests/Test/WebGUI/Form/HiddenList.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::HiddenList; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/Image.pm b/t/tests/Test/WebGUI/Form/Image.pm index fbbd298e0..79da99834 100644 --- a/t/tests/Test/WebGUI/Form/Image.pm +++ b/t/tests/Test/WebGUI/Form/Image.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::Image; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/IntSlider.pm b/t/tests/Test/WebGUI/Form/IntSlider.pm index 40941620f..15efe0af1 100644 --- a/t/tests/Test/WebGUI/Form/IntSlider.pm +++ b/t/tests/Test/WebGUI/Form/IntSlider.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::IntSlider; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/Integer.pm b/t/tests/Test/WebGUI/Form/Integer.pm index 6e0bb2cec..aea5f905d 100644 --- a/t/tests/Test/WebGUI/Form/Integer.pm +++ b/t/tests/Test/WebGUI/Form/Integer.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::Integer; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/Interval.pm b/t/tests/Test/WebGUI/Form/Interval.pm index 679b6ed1d..466fcf6a7 100644 --- a/t/tests/Test/WebGUI/Form/Interval.pm +++ b/t/tests/Test/WebGUI/Form/Interval.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::Interval; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/JsonTable.pm b/t/tests/Test/WebGUI/Form/JsonTable.pm index 4750dff6a..ef20530a1 100644 --- a/t/tests/Test/WebGUI/Form/JsonTable.pm +++ b/t/tests/Test/WebGUI/Form/JsonTable.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::JsonTable; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/Keywords.pm b/t/tests/Test/WebGUI/Form/Keywords.pm index 97969c069..4a02480be 100644 --- a/t/tests/Test/WebGUI/Form/Keywords.pm +++ b/t/tests/Test/WebGUI/Form/Keywords.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::Keywords; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/LdapLink.pm b/t/tests/Test/WebGUI/Form/LdapLink.pm index 37b4a56dd..42abcd03f 100644 --- a/t/tests/Test/WebGUI/Form/LdapLink.pm +++ b/t/tests/Test/WebGUI/Form/LdapLink.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::LdapLink; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/List.pm b/t/tests/Test/WebGUI/Form/List.pm index c147cc1b9..e7914c307 100644 --- a/t/tests/Test/WebGUI/Form/List.pm +++ b/t/tests/Test/WebGUI/Form/List.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::List; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/MatrixCompare.pm b/t/tests/Test/WebGUI/Form/MatrixCompare.pm index fc240a39e..bc7803da1 100644 --- a/t/tests/Test/WebGUI/Form/MatrixCompare.pm +++ b/t/tests/Test/WebGUI/Form/MatrixCompare.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::MatrixCompare; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/MatrixFieldType.pm b/t/tests/Test/WebGUI/Form/MatrixFieldType.pm index ef1f935b2..9192bde45 100644 --- a/t/tests/Test/WebGUI/Form/MatrixFieldType.pm +++ b/t/tests/Test/WebGUI/Form/MatrixFieldType.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::MatrixFieldType; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/MimeType.pm b/t/tests/Test/WebGUI/Form/MimeType.pm index 5b58be856..e58145905 100644 --- a/t/tests/Test/WebGUI/Form/MimeType.pm +++ b/t/tests/Test/WebGUI/Form/MimeType.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::MimeType; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/Password.pm b/t/tests/Test/WebGUI/Form/Password.pm index db74277e1..44f442cd2 100644 --- a/t/tests/Test/WebGUI/Form/Password.pm +++ b/t/tests/Test/WebGUI/Form/Password.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::Password; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/Phone.pm b/t/tests/Test/WebGUI/Form/Phone.pm index 5043f9fe0..de98f7d53 100644 --- a/t/tests/Test/WebGUI/Form/Phone.pm +++ b/t/tests/Test/WebGUI/Form/Phone.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::Phone; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/Radio.pm b/t/tests/Test/WebGUI/Form/Radio.pm index a27cf0836..d0f1f23a4 100644 --- a/t/tests/Test/WebGUI/Form/Radio.pm +++ b/t/tests/Test/WebGUI/Form/Radio.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::Radio; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/RadioList.pm b/t/tests/Test/WebGUI/Form/RadioList.pm index e112e875e..bfcea7b23 100644 --- a/t/tests/Test/WebGUI/Form/RadioList.pm +++ b/t/tests/Test/WebGUI/Form/RadioList.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::RadioList; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/ReadOnly.pm b/t/tests/Test/WebGUI/Form/ReadOnly.pm index 31b8a22f7..5abbb0fc0 100644 --- a/t/tests/Test/WebGUI/Form/ReadOnly.pm +++ b/t/tests/Test/WebGUI/Form/ReadOnly.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::ReadOnly; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/SelectBox.pm b/t/tests/Test/WebGUI/Form/SelectBox.pm index 091b95c16..1a1b765dc 100644 --- a/t/tests/Test/WebGUI/Form/SelectBox.pm +++ b/t/tests/Test/WebGUI/Form/SelectBox.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::SelectBox; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/SelectList.pm b/t/tests/Test/WebGUI/Form/SelectList.pm index 3f3ba3215..a6a9a1937 100644 --- a/t/tests/Test/WebGUI/Form/SelectList.pm +++ b/t/tests/Test/WebGUI/Form/SelectList.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::SelectList; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/SelectRichEditor.pm b/t/tests/Test/WebGUI/Form/SelectRichEditor.pm index 62a7e002f..1dacc018e 100644 --- a/t/tests/Test/WebGUI/Form/SelectRichEditor.pm +++ b/t/tests/Test/WebGUI/Form/SelectRichEditor.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::SelectRichEditor; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/SelectSlider.pm b/t/tests/Test/WebGUI/Form/SelectSlider.pm index f5558afa7..d31805706 100644 --- a/t/tests/Test/WebGUI/Form/SelectSlider.pm +++ b/t/tests/Test/WebGUI/Form/SelectSlider.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::SelectSlider; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/Slider.pm b/t/tests/Test/WebGUI/Form/Slider.pm index c4cf6a45d..b6728ceca 100644 --- a/t/tests/Test/WebGUI/Form/Slider.pm +++ b/t/tests/Test/WebGUI/Form/Slider.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::Slider; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/Submit.pm b/t/tests/Test/WebGUI/Form/Submit.pm index 87419c7b4..76a102f02 100644 --- a/t/tests/Test/WebGUI/Form/Submit.pm +++ b/t/tests/Test/WebGUI/Form/Submit.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::Submit; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/SubscriptionGroup.pm b/t/tests/Test/WebGUI/Form/SubscriptionGroup.pm index 63fa02ea4..4315ae7bb 100644 --- a/t/tests/Test/WebGUI/Form/SubscriptionGroup.pm +++ b/t/tests/Test/WebGUI/Form/SubscriptionGroup.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::SubscriptionGroup; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/Template.pm b/t/tests/Test/WebGUI/Form/Template.pm index 24de8ddb6..1661b5592 100644 --- a/t/tests/Test/WebGUI/Form/Template.pm +++ b/t/tests/Test/WebGUI/Form/Template.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::Template; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/Text.pm b/t/tests/Test/WebGUI/Form/Text.pm index aaba3e069..af7a6d651 100644 --- a/t/tests/Test/WebGUI/Form/Text.pm +++ b/t/tests/Test/WebGUI/Form/Text.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::Text; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/Textarea.pm b/t/tests/Test/WebGUI/Form/Textarea.pm index 18ac580e6..eeaccaddd 100644 --- a/t/tests/Test/WebGUI/Form/Textarea.pm +++ b/t/tests/Test/WebGUI/Form/Textarea.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::Textarea; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/ThingFieldsList.pm b/t/tests/Test/WebGUI/Form/ThingFieldsList.pm index 2c206f497..55a1171f2 100644 --- a/t/tests/Test/WebGUI/Form/ThingFieldsList.pm +++ b/t/tests/Test/WebGUI/Form/ThingFieldsList.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::ThingFieldsList; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/TimeField.pm b/t/tests/Test/WebGUI/Form/TimeField.pm index e5014d8ea..81ea48e62 100644 --- a/t/tests/Test/WebGUI/Form/TimeField.pm +++ b/t/tests/Test/WebGUI/Form/TimeField.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::TimeField; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/TimeZone.pm b/t/tests/Test/WebGUI/Form/TimeZone.pm index 4ae036147..3ffa5dc8b 100644 --- a/t/tests/Test/WebGUI/Form/TimeZone.pm +++ b/t/tests/Test/WebGUI/Form/TimeZone.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::TimeZone; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/Url.pm b/t/tests/Test/WebGUI/Form/Url.pm index 262dc4015..72166c664 100644 --- a/t/tests/Test/WebGUI/Form/Url.pm +++ b/t/tests/Test/WebGUI/Form/Url.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::Url; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/User.pm b/t/tests/Test/WebGUI/Form/User.pm index d785439e8..b77d73948 100644 --- a/t/tests/Test/WebGUI/Form/User.pm +++ b/t/tests/Test/WebGUI/Form/User.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::Username; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/Username.pm b/t/tests/Test/WebGUI/Form/Username.pm index d1cfc316d..0284be0e1 100644 --- a/t/tests/Test/WebGUI/Form/Username.pm +++ b/t/tests/Test/WebGUI/Form/Username.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::Username; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/Vendor.pm b/t/tests/Test/WebGUI/Form/Vendor.pm index 96a80e744..314ec0dd6 100644 --- a/t/tests/Test/WebGUI/Form/Vendor.pm +++ b/t/tests/Test/WebGUI/Form/Vendor.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::Vendor; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/WhatNext.pm b/t/tests/Test/WebGUI/Form/WhatNext.pm index df64b36a0..d31383629 100644 --- a/t/tests/Test/WebGUI/Form/WhatNext.pm +++ b/t/tests/Test/WebGUI/Form/WhatNext.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::WhatNext; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/Workflow.pm b/t/tests/Test/WebGUI/Form/Workflow.pm index fbf094bff..dc6bfcc3e 100644 --- a/t/tests/Test/WebGUI/Form/Workflow.pm +++ b/t/tests/Test/WebGUI/Form/Workflow.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::Workflow; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/YesNo.pm b/t/tests/Test/WebGUI/Form/YesNo.pm index 305cad1fb..ffd4e6879 100644 --- a/t/tests/Test/WebGUI/Form/YesNo.pm +++ b/t/tests/Test/WebGUI/Form/YesNo.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::YesNo; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/t/tests/Test/WebGUI/Form/Zipcode.pm b/t/tests/Test/WebGUI/Form/Zipcode.pm index 8514c01da..06709bb72 100644 --- a/t/tests/Test/WebGUI/Form/Zipcode.pm +++ b/t/tests/Test/WebGUI/Form/Zipcode.pm @@ -1,6 +1,6 @@ package Test::WebGUI::Form::Zipcode; #------------------------------------------------------------------- -# WebGUI is Copyright 2001-2009 Plain Black Corporation. +# WebGUI is Copyright 2001-2012 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using diff --git a/www/extras/FileUploadControl.js b/www/extras/FileUploadControl.js index 687254f73..38de29af4 100644 --- a/www/extras/FileUploadControl.js +++ b/www/extras/FileUploadControl.js @@ -4,6 +4,11 @@ function FileUploadControl(fieldName, imageArray, removeLabel, fileLimit, size) { + + // Remove the existing field + var replace = document.getElementById( fieldName ); + replace.parentNode.removeChild( replace ); + this.images = imageArray; this.fileLimit = fileLimit; this.fileCount = 1; diff --git a/www/extras/Fork/poll.js b/www/extras/Fork/poll.js index 5bb1a7761..6a86cb8c9 100644 --- a/www/extras/Fork/poll.js +++ b/www/extras/Fork/poll.js @@ -26,7 +26,7 @@ args.first(); } if (data.finished) { - args.finish(); + args.finish(data); } else { setTimeout(fetch, args.interval || 1000); diff --git a/www/extras/Fork/redirect.js b/www/extras/Fork/redirect.js index bf4c061e3..cfabed151 100644 --- a/www/extras/Fork/redirect.js +++ b/www/extras/Fork/redirect.js @@ -3,14 +3,24 @@ (function () { var ns = YAHOO.namespace('WebGUI.Fork'); - ns.redirect = function (redir, after) { - if (!redir) { - return; + ns.redirect = function (params, after) { + var redir, msg, admin, fn; + if (redir = params.redirect) { + fn = function () { + // The idea here is to only allow local redirects + var loc = window.location; + loc.href = loc.protocol + '//' + loc.host + redir; + }; + } + else if (msg = params.message) { + fn = function () { + admin = window.parent.admin; + admin.processPlugin({ message: msg }); + admin.closeModalDialog(); + }; + } + if (fn) { + setTimeout(fn, after || 1000); } - setTimeout(function() { - // The idea here is to only allow local redirects - var loc = window.location; - loc.href = loc.protocol + '//' + loc.host + redir; - }, after || 1000); }; }()); diff --git a/www/extras/accordion/accordion.css b/www/extras/accordion/accordion.css deleted file mode 100644 index 5943a6f9c..000000000 --- a/www/extras/accordion/accordion.css +++ /dev/null @@ -1,84 +0,0 @@ -dl.accordion-menu { - margin: 0; - padding: 0; - width: 15em; - background:white; - position:fixed; - _position:absolute; - top:0; - _top:expression(eval((document.documentElement && document.documentElement.scrollTop) ? document.documentElement.scrollTop : document.body.scrollTop)); - left:0; -} - -dl.accordion-menu dt.a-m-t { - margin: 0; - background: #aaaaaa; - padding: 0.3em 1em; - color: #444444; - border: solid 1px #222222; - border-left-color: #dfdfdf; - border-top-color: #dfdfdf; -} - -dl.accordion-menu dt.a-m-t-hover{ - background:#cdcdcd; -} - - -dl.accordion-menu dt.a-m-t-down{ - border: solid 1px #222222; - border-right-color: #dfdfdf; - border-bottom-color: #dfdfdf; -} - - -html.accordion-menu-js dt.a-m-t{ - cursor:pointer; - zoom:1; -} - -dl.accordion-menu dd.a-m-d { - margin: 0; - padding: 0; - padding:0; -} - -html.accordion-menu-js dd.a-m-d{ - display:none; -} - - -html.accordion-menu-js dd.a-m-d-expand { - display:block; -} - -html.accordion-menu-js dd.a-m-d-before-expand { - display:block; - position:relative; - z-index:-1; - opacity:0; - height:auto !important; - visibility:hidden; - overflow:visible; -} - - -html.accordion-menu-js dt.a-m-t-expand { - border-left-color:#222222; - color:black; - background:#c0c0c0; -} - -html.accordion-menu-js dd.a-m-d-anim { - overflow:hidden; - display:block; -} - -dl.accordion-menu dd.a-m-d .bd{ - padding:0.5em; -} - -dd.a-m-d { - overflow: auto; - border:Solid 1px #aaaaaa; -} diff --git a/www/extras/accordion/accordion.js b/www/extras/accordion/accordion.js deleted file mode 100644 index 58e76bf79..000000000 --- a/www/extras/accordion/accordion.js +++ /dev/null @@ -1,403 +0,0 @@ -var AccordionMenu = new function() -{ - var YUD = YAHOO.util.Dom; - var YUE = YAHOO.util.Event; - var oMenuSetting = {}; - var oMenuCache = {}; - var dLastHoverTitle ; - YUD.addClass(document.documentElement,'accordion-menu-js'); - - function getDT(e) - { - var dEl = e.srcElement || e.target; - - if( (e.tagName + '').toUpperCase()=='DD' ) - { - var dt = e.previousSibling ; - while(dt) - { - if(dt.tagName && dt.tagName.toUpperCase() == 'DT'){break;}; - dt = dt.previousSibling - }; - - if(!dt || dt.tagName.toUpperCase() != 'DT'){return;} - else{return dt}; - } - else if(e.clientX) - { - var found = false; - while( dEl.parentNode) - { - if(YUD.hasClass(dEl,'a-m-t')){ found = true ; break;}; - dEl = dEl.parentNode; - }; - if(!found){return null} - else{return dEl }; - }; - }; - - - - function getDD(dt) - { - if(!dt){return null;}; - var dd = dt.nextSibling ; - - while(dd) - { - if(dd.tagName && dd.tagName.toUpperCase() == 'DD'){break;}; - dd = dd.nextSibling; - - }; - if(!dd || dd.tagName.toUpperCase() != 'DD'){return;} - else{return dd}; - }; - - function expand(dl,dt,dd) - { - var bodyPanels = YUD.getElementsByClassName("a-m-d", "dd",dl); - var bodyPanelHeight = YUD.getViewportHeight() - (30 * bodyPanels.length); - - dl.hasAnimation +=1; - YUD.addClass(dd,'a-m-d-before-expand'); - var oAttr = {height:{from:0,to:bodyPanelHeight }}; - - YUD.removeClass(dd,'a-m-d-before-expand'); - - var onComplete = function() - { - oAnim.onComplete.unsubscribe(onComplete); - oAnim.stop(); - YUD.removeClass(dd,'a-m-d-anim'); - YUD.addClass(dd,'a-m-d-expand'); - onComplete = null; - dl.hasAnimation -=1; - var dt = getDT(dd); - YUD.addClass(dt,'a-m-t-expand'); - if( oMenuCache[ dl.id ] && oMenuCache[ dl.id ].onOpen && dd.style.height!=bodyPanelHeight + "px" ) - { - oMenuCache[ dl.id ].onOpen( {dl:dl,dt:dt,dd:dd} ); - }; - dd.style.height = bodyPanelHeight + "px"; - - }; - - var onTween = function() - { - if(dd.style.height) - { - YUD.addClass(dd,'a-m-d-anim'); - oAnim.onTween.unsubscribe(onTween); - onTween = null; - dd.oAnim = null; - }; - - }; - - if(dd.oAnim) - { - dd.oAnim.stop(); - dd.oAnim = null; - dl.hasAnimation -=1; - }; - var oEaseType = YAHOO.util.Easing.easeOut; - var seconds = 0.5; - if(oMenuCache[ dl.id ] ) - { - oEaseType = oMenuCache[ dl.id ]['easeOut']?oEaseType:YAHOO.util.Easing.easeIn; - seconds = oMenuCache[ dl.id ]['seconds']; - - if( !oMenuCache[ dl.id ]['animation'] ) - { - var oAnim = {onComplete:{unsubscribe:function(){}},stop:function(){}}; - onComplete(); - return; - }; - }; - - - var oAnim = new YAHOO.util.Anim(dd,oAttr,seconds ,oEaseType); - oAnim.onComplete.subscribe(onComplete); - oAnim.onTween.subscribe(onTween); - oAnim.animate(); - dd.oAnim = oAnim ; - - }; - - function collapse(dl,dt,dd) - { - dl.hasAnimation +=1; - YUD.addClass(dd,'a-m-d-anim'); - var oAttr = {height:{from:dd.offsetHeight,to:0}}; - - - var onComplete = function() - { - oAnim.onComplete.unsubscribe(onComplete); - YUD.removeClass(dd,'a-m-d-anim'); - YUD.removeClass(dd,'a-m-d-expand'); - dd.style.height = ''; - dd.oAnim = null; - onComplete = null; - dl.hasAnimation -=1; - var dt = getDT(dd); - YUD.removeClass(dt,'a-m-t-expand'); - if( oMenuCache[ dl.id ] && oMenuCache[ dl.id ].onOpen ) - { - oMenuCache[ dl.id ].onClose( {dl:dl,dt:dt,dd:dd} ); - }; - - }; - - if(dd.oAnim) - { - dd.oAnim.stop(); - dd.oAnim = null; - dl.hasAnimation -=1; - }; - - var oEaseType = YAHOO.util.Easing.easeOut; - var seconds = 0.5; - if(oMenuCache[ dl.id ] ) - { - oEaseType = oMenuCache[ dl.id ]['easeOut']?oEaseType:YAHOO.util.Easing.easeIn; - seconds = oMenuCache[ dl.id ]['seconds']; - if( !oMenuCache[ dl.id ]['animation'] ) - { - var oAnim = {onComplete:{unsubscribe:function(){}},stop:function(){}}; - onComplete(); - return; - }; - }; - - var oAnim = new YAHOO.util.Anim(dd,oAttr,seconds ,oEaseType); - oAnim.onComplete.subscribe(onComplete); - oAnim.animate(); - dd.oAnim = oAnim ; - }; - - function collapseAll(dl,dt,dd) - { - var aOtherDD = YUD.getElementsByClassName('a-m-d-expand','dd',dl); - for(var i=0;i<aOtherDD.length;i++) - { - var otherDD = aOtherDD[i] ; - if( otherDD !=dd ) - { - collapse(dl,null,otherDD); - }; - }; - } - - - var onMenuMouseover = function(e) - { - var dMenuTitle = getDT(e); - if(!dMenuTitle){return;}; - if(dLastHoverTitle) - { - YUD.removeClass(dLastHoverTitle,'a-m-t-hover'); - }; - YUD.addClass(dMenuTitle,'a-m-t-hover'); - dLastHoverTitle = dMenuTitle ; - YUE.stopEvent(e); - return false; - }; - - var onMenuMouseout = function(e) - { - var dMenuTitle = getDT(e); - if(!dMenuTitle){return;}; - if(dLastHoverTitle && dLastHoverTitle!=dMenuTitle) - { - YUD.removeClass(dLastHoverTitle,'a-m-t-hover'); - YUD.removeClass(dLastHoverTitle,'a-m-t-down'); - }; - YUD.removeClass(dMenuTitle,'a-m-t-down'); - YUD.removeClass(dMenuTitle,'a-m-t-hover'); - dLastHoverTitle = null ; - YUE.stopEvent(e); - return false; - }; - - var onMenuMousedown = function(e) - { - var dMenuTitle = getDT(e); - if(!dMenuTitle){return;}; - YUD.addClass(dMenuTitle,'a-m-t-down'); - YUE.stopEvent(e); - return false; - }; - - var onMenuClick = function(e) - { - var dt = getDT(e); - if(!dt){return;}; - var dd = getDD(dt); - - - - if(!dd){return;}; - var dl = dt.parentNode; - - if(dl.hasAnimation==null) - { - dl.hasAnimation = 0; - } - if(dl.hasAnimation > 0 ){return;}; - YUD.removeClass(dt,'a-m-t-down'); - - if(YUD.hasClass(dd,'a-m-d-expand')) - { - collapse(dl,dt,dd); - } - else - { - if( oMenuCache[ dl.id ] && oMenuCache[ dl.id ].dependent == false ){} - else{collapseAll(dl,dt,dd);} - expand(dl,dt,dd); - }; - YUE.stopEvent(e); - return false; - }; - - - YUE.addListener( document,'mouseover',onMenuMouseover); - YUE.addListener( document,'mouseout',onMenuMouseout); - YUE.addListener( document,'mousedown',onMenuMousedown); - YUE.addListener( document,'click',onMenuClick); - - this.openDtById = function(sId) - { - var dt = document.getElementById(sId); - if(!dt){return;}; - if(!YUD.hasClass(dt,'a-m-t')){return;}; - var dl = dt.parentNode; - var dd = getDD(dt); - if(dl.hasAnimation==null){dl.hasAnimation = 0;}; - - if(dl.hasAnimation > 0 ){return;}; - if(YUD.hasClass(dd,'a-m-d-expand')){return;}; - if( oMenuCache[ dl.id ] && oMenuCache[ dl.id ].dependent == false ){} - else{collapseAll(dl,dt,dd);} - expand(dl,dt,dd); - }; - - this.closeDtById = function(sId) - { - var dt = document.getElementById(sId); - if(!dt){return;}; - if(!YUD.hasClass(dt,'a-m-t')){return;}; - var dl = dt.parentNode; - var dd = getDD(dt); - if(dl.hasAnimation==null){dl.hasAnimation = 0;}; - if(dl.hasAnimation > 0 ){return;}; - if(!YUD.hasClass(dd,'a-m-d-expand')){return;}; - collapse(dl,dt,dd); - }; - - - this.setting = function(id,oOptions) - { - if( !oOptions ){return;}; - - if( typeof(id)!='string' ){return;}; - - var setMunu = function(dl) - { - dl = dl || this; - dl.hasAnimation = 0; - oMenuCache[ dl.id ] = - { - element:dl, - dependent:true, - onOpen:function(){}, - onClose:function(){}, - seconds:0.5, - easeOut:true, - openedIds:[], - animation:true - }; - oMenu = oMenuCache[ dl.id ] ; - - if(typeof(oOptions['animation'])=='boolean') - { - oMenu['animation'] = !!oOptions['animation']; - - }; - - - if(typeof(oOptions['dependent'])=='boolean') - { - oMenu['dependent'] = !!oOptions['dependent']; - }; - - if(typeof(oOptions['easeOut'])=='boolean') - { - oMenu['easeOut'] = !!oOptions['easeOut']; - }; - - if(typeof(oOptions['seconds'])=='number') - { - oMenu['seconds'] = Math.max(0 , oOptions['seconds'] ); - }; - - if(typeof(oOptions['onOpen'])=='function') - { - oMenu['onOpen'] = oOptions['onOpen']; - }; - - if(typeof(oOptions['onClose'])=='function') - { - oMenu['onClose'] = oOptions['onClose']; - }; - - if(oOptions['openedIds'].shift) - { - oMenu['openedIds'] = oOptions['openedIds']; - }; - - - for(var i=0;i<oMenu['openedIds'].length;i++) - { - var sId = oMenu['openedIds'][i]; - var dt = document.getElementById( sId ); - - if(dt && dt.tagName.toUpperCase() == 'DT') - { - var dl = dt.parentNode; - var dd = getDD(dt); - expand(dl,dt,dd); - } - else if(!dt) - { - function onDtAvailable() - { - var dt = this; - if(dt.tagName.toUpperCase() == 'DT') - { - var dl = dt.parentNode; - var dd = getDD(dt); - expand(dl,dt,dd); - }; - }; - - YUE.onAvailable(sId,onDtAvailable); - } - }; - - - }; - - if(document.getElementById(id)) - { - setMunu(document.getElementById(id)) - } - else - { - YUE.onAvailable(id,setMunu); - }; - }; - -}; - diff --git a/www/extras/accordion/example-nodoctype.html b/www/extras/accordion/example-nodoctype.html deleted file mode 100644 index 8b7d539e3..000000000 --- a/www/extras/accordion/example-nodoctype.html +++ /dev/null @@ -1,109 +0,0 @@ -<html> -<head> - <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> - <title>Accordion Example - - - - - - - - - - - - -

    Lorem ipsum dolor sit amet, consectetuer adipnia. Vestibulum pellentesque porta enim. Curabitur elementum -vulputate lacus. Donec quis ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos -hymenaeos. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam dignissim -sagittis purus. Nulla sollicitudin mauris sit amet purus.

    - -

    Lorem ipsum dolor sit amet, consectetuer adipnia. Vestibulum pellentesque porta enim. Curabitur elementum -vulputate lacus. Donec quis ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos -hymenaeos. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam dignissim -sagittis purus. Nulla sollicitudin mauris sit amet purus.

    - -

    Lorem ipsum dolor sit amet, consectetuer adipnia. Vestibulum pellentesque porta enim. Curabitur elementum -vulputate lacus. Donec quis ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos -hymenaeos. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam dignissim -sagittis purus. Nulla sollicitudin mauris sit amet purus.

    - -

    Lorem ipsum dolor sit amet, consectetuer adipnia. Vestibulum pellentesque porta enim. Curabitur elementum -vulputate lacus. Donec quis ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos -hymenaeos. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam dignissim -sagittis purus. Nulla sollicitudin mauris sit amet purus.

    - -

    Lorem ipsum dolor sit amet, consectetuer adipnia. Vestibulum pellentesque porta enim. Curabitur elementum -vulputate lacus. Donec quis ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos -hymenaeos. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam dignissim -sagittis purus. Nulla sollicitudin mauris sit amet purus.

    - -

    Lorem ipsum dolor sit amet, consectetuer adipnia. Vestibulum pellentesque porta enim. Curabitur elementum -vulputate lacus. Donec quis ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos -hymenaeos. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam dignissim -sagittis purus. Nulla sollicitudin mauris sit amet purus.

    - -

    Lorem ipsum dolor sit amet, consectetuer adipnia. Vestibulum pellentesque porta enim. Curabitur elementum -vulputate lacus. Donec quis ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos -hymenaeos. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam dignissim -sagittis purus. Nulla sollicitudin mauris sit amet purus.

    - -

    Lorem ipsum dolor sit amet, consectetuer adipnia. Vestibulum pellentesque porta enim. Curabitur elementum -vulputate lacus. Donec quis ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos -hymenaeos. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam dignissim -sagittis purus. Nulla sollicitudin mauris sit amet purus.

    - -

    Lorem ipsum dolor sit amet, consectetuer adipnia. Vestibulum pellentesque porta enim. Curabitur elementum -vulputate lacus. Donec quis ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos -hymenaeos. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam dignissim -sagittis purus. Nulla sollicitudin mauris sit amet purus.

    - -
    - - -
    title 1
    -
    - Lorem ipsum dolor sit amet, consectetuer adipnia. Vestibulum pellentesque porta enim. Curabitur elementum -vulputate lacus. Donec quis ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos -hymenaeos. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam dignissim -sagittis purus. Nulla sollicitudin mauris sit amet purus. -
    -
    - - - -
    title 2
    -
    - Lorem ipsum dolor sit amet, consectetuer adipnia. Vestibulum pellentesque porta enim. Curabitur elementum -vulputate lacus. Donec quis ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos -hymenaeos. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam dignissim -sagittis purus. Nulla sollicitudin mauris sit amet purus. - Lorem ipsum dolor sit amet, consectetuer adipnia. Vestibulum pellentesque porta enim. Curabitur elementum -vulputate lacus. Donec quis ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos -hymenaeos. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam dignissim -sagittis purus. Nulla sollicitudin mauris sit amet purus. - Lorem ipsum dolor sit amet, consectetuer adipnia. Vestibulum pellentesque porta enim. Curabitur elementum -vulputate lacus. Donec quis ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos -hymenaeos. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam dignissim -sagittis purus. Nulla sollicitudin mauris sit amet purus. -
    -
    - - - -
    title 3
    -
    - Lorem ipsum dolor sit amet, consectetuer adipnia. Vestibulum pellentesque porta enim. Curabitur elementum -vulputate lacus. -
    -
    - - -
    - - - - diff --git a/www/extras/accordion/example-strict.html b/www/extras/accordion/example-strict.html deleted file mode 100644 index ba8f5247c..000000000 --- a/www/extras/accordion/example-strict.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - Accordion Example - - - - - - - - - - - - -

    Lorem ipsum dolor sit amet, consectetuer adipnia. Vestibulum pellentesque porta enim. Curabitur elementum -vulputate lacus. Donec quis ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos -hymenaeos. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam dignissim -sagittis purus. Nulla sollicitudin mauris sit amet purus.

    - -

    Lorem ipsum dolor sit amet, consectetuer adipnia. Vestibulum pellentesque porta enim. Curabitur elementum -vulputate lacus. Donec quis ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos -hymenaeos. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam dignissim -sagittis purus. Nulla sollicitudin mauris sit amet purus.

    - -

    Lorem ipsum dolor sit amet, consectetuer adipnia. Vestibulum pellentesque porta enim. Curabitur elementum -vulputate lacus. Donec quis ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos -hymenaeos. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam dignissim -sagittis purus. Nulla sollicitudin mauris sit amet purus.

    - -

    Lorem ipsum dolor sit amet, consectetuer adipnia. Vestibulum pellentesque porta enim. Curabitur elementum -vulputate lacus. Donec quis ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos -hymenaeos. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam dignissim -sagittis purus. Nulla sollicitudin mauris sit amet purus.

    - -

    Lorem ipsum dolor sit amet, consectetuer adipnia. Vestibulum pellentesque porta enim. Curabitur elementum -vulputate lacus. Donec quis ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos -hymenaeos. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam dignissim -sagittis purus. Nulla sollicitudin mauris sit amet purus.

    - -

    Lorem ipsum dolor sit amet, consectetuer adipnia. Vestibulum pellentesque porta enim. Curabitur elementum -vulputate lacus. Donec quis ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos -hymenaeos. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam dignissim -sagittis purus. Nulla sollicitudin mauris sit amet purus.

    - -

    Lorem ipsum dolor sit amet, consectetuer adipnia. Vestibulum pellentesque porta enim. Curabitur elementum -vulputate lacus. Donec quis ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos -hymenaeos. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam dignissim -sagittis purus. Nulla sollicitudin mauris sit amet purus.

    - -

    Lorem ipsum dolor sit amet, consectetuer adipnia. Vestibulum pellentesque porta enim. Curabitur elementum -vulputate lacus. Donec quis ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos -hymenaeos. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam dignissim -sagittis purus. Nulla sollicitudin mauris sit amet purus.

    - -

    Lorem ipsum dolor sit amet, consectetuer adipnia. Vestibulum pellentesque porta enim. Curabitur elementum -vulputate lacus. Donec quis ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos -hymenaeos. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam dignissim -sagittis purus. Nulla sollicitudin mauris sit amet purus.

    - -
    - - -
    title 1
    -
    - Lorem ipsum dolor sit amet, consectetuer adipnia. Vestibulum pellentesque porta enim. Curabitur elementum -vulputate lacus. Donec quis ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos -hymenaeos. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam dignissim -sagittis purus. Nulla sollicitudin mauris sit amet purus. -
    -
    - - - -
    title 2
    -
    - Lorem ipsum dolor sit amet, consectetuer adipnia. Vestibulum pellentesque porta enim. Curabitur elementum -vulputate lacus. Donec quis ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos -hymenaeos. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam dignissim -sagittis purus. Nulla sollicitudin mauris sit amet purus. - Lorem ipsum dolor sit amet, consectetuer adipnia. Vestibulum pellentesque porta enim. Curabitur elementum -vulputate lacus. Donec quis ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos -hymenaeos. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam dignissim -sagittis purus. Nulla sollicitudin mauris sit amet purus. - Lorem ipsum dolor sit amet, consectetuer adipnia. Vestibulum pellentesque porta enim. Curabitur elementum -vulputate lacus. Donec quis ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos -hymenaeos. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam dignissim -sagittis purus. Nulla sollicitudin mauris sit amet purus. -
    -
    - - - -
    title 3
    -
    - Lorem ipsum dolor sit amet, consectetuer adipnia. Vestibulum pellentesque porta enim. Curabitur elementum -vulputate lacus. -
    -
    - - -
    - - - - diff --git a/www/extras/accordion/example-transitional.html b/www/extras/accordion/example-transitional.html deleted file mode 100644 index bef2bb7e3..000000000 --- a/www/extras/accordion/example-transitional.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - Accordion Example - - - - - - - - - - - - -

    Lorem ipsum dolor sit amet, consectetuer adipnia. Vestibulum pellentesque porta enim. Curabitur elementum -vulputate lacus. Donec quis ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos -hymenaeos. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam dignissim -sagittis purus. Nulla sollicitudin mauris sit amet purus.

    - -

    Lorem ipsum dolor sit amet, consectetuer adipnia. Vestibulum pellentesque porta enim. Curabitur elementum -vulputate lacus. Donec quis ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos -hymenaeos. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam dignissim -sagittis purus. Nulla sollicitudin mauris sit amet purus.

    - -

    Lorem ipsum dolor sit amet, consectetuer adipnia. Vestibulum pellentesque porta enim. Curabitur elementum -vulputate lacus. Donec quis ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos -hymenaeos. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam dignissim -sagittis purus. Nulla sollicitudin mauris sit amet purus.

    - -

    Lorem ipsum dolor sit amet, consectetuer adipnia. Vestibulum pellentesque porta enim. Curabitur elementum -vulputate lacus. Donec quis ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos -hymenaeos. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam dignissim -sagittis purus. Nulla sollicitudin mauris sit amet purus.

    - -

    Lorem ipsum dolor sit amet, consectetuer adipnia. Vestibulum pellentesque porta enim. Curabitur elementum -vulputate lacus. Donec quis ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos -hymenaeos. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam dignissim -sagittis purus. Nulla sollicitudin mauris sit amet purus.

    - -

    Lorem ipsum dolor sit amet, consectetuer adipnia. Vestibulum pellentesque porta enim. Curabitur elementum -vulputate lacus. Donec quis ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos -hymenaeos. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam dignissim -sagittis purus. Nulla sollicitudin mauris sit amet purus.

    - -

    Lorem ipsum dolor sit amet, consectetuer adipnia. Vestibulum pellentesque porta enim. Curabitur elementum -vulputate lacus. Donec quis ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos -hymenaeos. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam dignissim -sagittis purus. Nulla sollicitudin mauris sit amet purus.

    - -

    Lorem ipsum dolor sit amet, consectetuer adipnia. Vestibulum pellentesque porta enim. Curabitur elementum -vulputate lacus. Donec quis ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos -hymenaeos. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam dignissim -sagittis purus. Nulla sollicitudin mauris sit amet purus.

    - -

    Lorem ipsum dolor sit amet, consectetuer adipnia. Vestibulum pellentesque porta enim. Curabitur elementum -vulputate lacus. Donec quis ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos -hymenaeos. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam dignissim -sagittis purus. Nulla sollicitudin mauris sit amet purus.

    - -
    - - -
    title 1
    -
    - Lorem ipsum dolor sit amet, consectetuer adipnia. Vestibulum pellentesque porta enim. Curabitur elementum -vulputate lacus. Donec quis ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos -hymenaeos. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam dignissim -sagittis purus. Nulla sollicitudin mauris sit amet purus. -
    -
    - - - -
    title 2
    -
    - Lorem ipsum dolor sit amet, consectetuer adipnia. Vestibulum pellentesque porta enim. Curabitur elementum -vulputate lacus. Donec quis ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos -hymenaeos. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam dignissim -sagittis purus. Nulla sollicitudin mauris sit amet purus. - Lorem ipsum dolor sit amet, consectetuer adipnia. Vestibulum pellentesque porta enim. Curabitur elementum -vulputate lacus. Donec quis ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos -hymenaeos. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam dignissim -sagittis purus. Nulla sollicitudin mauris sit amet purus. - Lorem ipsum dolor sit amet, consectetuer adipnia. Vestibulum pellentesque porta enim. Curabitur elementum -vulputate lacus. Donec quis ipsum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos -hymenaeos. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam dignissim -sagittis purus. Nulla sollicitudin mauris sit amet purus. -
    -
    - - - -
    title 3
    -
    - Lorem ipsum dolor sit amet, consectetuer adipnia. Vestibulum pellentesque porta enim. Curabitur elementum -vulputate lacus. -
    -
    - - -
    - - - - diff --git a/www/extras/admin/admin.css b/www/extras/admin/admin.css new file mode 100644 index 000000000..3a5dc9a6e --- /dev/null +++ b/www/extras/admin/admin.css @@ -0,0 +1,395 @@ + +* { + font: 12pt Helvetica, sans-serif; +} + +html,body { margin: 0; padding: 0; height: 100% } + +input.disabled { + font-style: italic; + color: #555; +} + +.with_avatar { + background-position: 0 0; + background-repeat: no-repeat; + padding-left: 50px; + min-height: 50px; +} + +#wrapper { + position: relative; + margin-left: 165px; /* move out of the adminbar's way */ + min-width: 400px; /* min width for 1024x browsers */ + height: 100%; +} + +#tabBar { + position: absolute; + top: 28px; /* Below the versionTag and user boxes */ + bottom: 0px; + left: 0px; + right: 0px; +} + +#tabBar #tab_wrapper { + position: absolute; + top: 34px; /* Below the tabs. */ + bottom: 0px; + left: 0px; + right: 0px; + overflow: hidden; +} + +#tab_content_wrapper { + position: absolute; + top: 44px; /* below the location bar */ + bottom: 0px; + left: 0px; + right: 0px; +} + +#versionTag { + float: left; + width: 57%; + padding: 2px 1%; + margin: 2px; + border: 1px solid #339; + border-radius: 5px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + line-height: 16px; + height: 16px; +} + +#user { + float: right; + width: 38%; + padding: 2px 1%; + margin: 2px 2px 2px 0px; /* No margin for side next to version tag box */ + border: 1px solid #339; + border-radius: 5px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + line-height: 16px; + height: 16px; +} + +#locationBar { + position: absolute; + top: 0px; + left: 0px; + right: 0px; + z-index: 9000; + height: 34px; + padding: 5px 0; + background-color: white; /* masks what lies beneath! */ +} + +#locationBar .yui-button { + margin: auto 2px; +} + +#locationBar #left { + position: absolute; + width: 12%; + top: 5px; + left: 0; +} + +#locationBar #right { + position: absolute; + width: 10%; + top: 5px; + right: 0; +} + +#locationBar #location { + position: relative; + margin: auto 10% auto 12%; + width: 77%; + height: 80%; + border: 1px solid #333; + border-radius: 3px; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; +} + +#locationBar #locationInput { + width: 99%; + height: 90%; + border: none; + font-size: 14px; + font-family: Verdana, sans-serif; +} + +#locationBar #locationTitle { + display: block; + position: absolute; + top: 3px; + right: 0px; + height: 90%; + margin-right: 5px; + font: 14px Verdana, sans-serif; + text-align: right; +} + +.searchForm { + margin: 1em 8% 0; +} + +.searchResults table { + width: 100%; +} + +.searchKeywords { + display: block; + width: 90%; + height: 1.70em; + margin-bottom: 5px; +} + +.searchButton { + display: block; + float: right; + width: 7%; +} + +.searchButton-button { + display: block; + width: 100%; +} + +.searchFilters { + clear: both; + list-style-type: none; + margin: 0; + padding: 0; +} + +.searchFilters .deleteIcon { + display: block; +} + +.searchFilters li { height: 38px; } /* autocomplete is position: absolute, so pretend some height */ + +.searchFilters span.name { + display: block; + float: left; + width: 9%; + text-align: right; + padding-right: 1%; + line-height: 24px; +} + +.searchFilterAdd { + clear: both; +} + +.filter_title input, .filter_ownerUserId div.autocomplete { + display: block; + float: left; + width: 89%; +} + +.searchFilters .yui-ac-bd li { + height: 50px; +} + +.searchForm p { + margin: 0; + padding: 0; +} + +.autocomplete_value { + font-size: larger; + font-weight: bold; +} + +.autocomplete_subtext { + font-size: smaller; +} + +#wrapper .yui-content { + margin: 0; padding: 0; height: 100%; +} + +#viewTab { + height: 100%; +} + +#viewTab * { + margin: 0; padding: 0; +} + +#tab_content_wrapper iframe { + border: none; + width: 100%; + height: 100%; +} + +.clickable { + cursor: pointer; + color: blue; +} +.clickable:hover { + text-decoration: underline; +} + +.with_icon { + padding: 0 0 0 20px; + background: no-repeat 2px 50%; +} + +img.icon { + vertical-align: baseline; +} + +a:link { + text-decoration: none; +} + +#helper_asset_name { + font-size: 14pt; + margin-left: 5px; +} + +#assetHelpers_pane h2 { + font-size: 14pt; + margin-left: 5px; +} + +#infoMessageContainer { + position: absolute; + left: 30%; + top: 0px; + width: 35%; + overflow: hidden; +} + +#infoMessage { + width: 100%; + height: 100%; + background-color: #ccf; +} + +#infoMessage * { + margin: 0; + padding: 0; +} + +#clipboardItems a, #versionTagItems a { + display: block; + padding: 2px; +} + +#adminBar a:link, #adminBar a:visited, #adminBar a:active { + text-decoration: none; + color: black; +} + +#helper_list, #history_list, #admin_list, .new_content_list { + list-style-type: none; + margin: 0; + padding: 0; +} + +#helper_list li, #history_list li, #admin_list a, .new_content_list li { + color: black; + margin: 0; + line-height: 18px; + font-size: 10pt; + white-space: nowrap; +} + +#helper_list li.clickable:hover, #history_list li.clickable:hover, #admin_list li.clickable:hover, +.new_content_list li.clickable:hover, #adminBar a:hover, #adminBar li:hover a { + text-decoration: underline; + color: blue; +} + +#helper_list li, #history_list li { + margin-left: 10px; +} + +dl.accordion-menu dt.a-m-t { + color: black; + margin: 0; + padding: 0 0 0 0.5em; + background: #dddddd url(../yui/build/assets/skins/sam/sprite.png) repeat-x; + height: 20px; + border: 1px solid #ACACAC; +} + +dl.accordion-menu dl.accordion-menu dt.a-m-t { + padding: 0 0 0 1.5em; +} + +dl.accordion-menu dt.a-m-t:hover { + background: #dddddd url(../yui/build/assets/skins/sam/sprite.png) repeat-x 0% -1300px; +} + +dl.accordion-menu dt.a-m-t.selected { + color: white; + background: #ddd url(../yui/build/assets/skins/sam/sprite.png) repeat-x 0% -1400px; + border-color: black; +} + +dl#adminBar { + position:fixed; + _position:absolute; + top:0; + /* + _top:expression(eval((document.documentElement && document.documentElement.scrollTop) ? document.documentElement.scrollTop : document.body.scrollTop)); */ + left:0; + width: 160px; +} + +dl.accordion-menu { + margin: 0; + padding: 0; + background: #eeeeee; +} + +dl.accordion-menu dd.a-m-d { + margin: 0; + padding: 0; + overflow: auto; + background-color: #eeeeee; + background-image: url(panel_bg.jpg); + background-repeat: repeat-x; + font-weight: normal; + overflow-x: hidden; +} + +#treeTab { + height: 100%; + overflow: auto; + margin-bottom: 30px; +} + +#treeCrumbtrail { + margin: 5px; +} + +#treeDataTableContainer { + margin-bottom: 50px; /* Same as treeBottom height */ +} + +#treeBottom { + position: fixed; + bottom: 0px; + width: 100%; + background: white; + border-top: 2px outset gray; +} + +#treeButtons { + margin : 5px; + float: left; +} + +#treePagination { + margin: 5px; + float: left; +} diff --git a/www/extras/admin/admin.js b/www/extras/admin/admin.js new file mode 100644 index 000000000..f09c17bc9 --- /dev/null +++ b/www/extras/admin/admin.js @@ -0,0 +1,2715 @@ + + +/** + * WebGUI.Admin -- The WebGUI Admin Console + */ +bind = function ( scope, func ) { + return function() { func.apply( scope, arguments ) } +}; + +if ( typeof WebGUI == "undefined" ) { + WebGUI = {}; +} +WebGUI.Admin = function(cfg){ + var self = this; + // Public properties + this.cfg = cfg; + this.currentAssetDef = null; + this.currentAssetId = ""; + this.currentTab = "view"; // "view" or "tree" or other ID + this.treeDirty = true; + + // Default configuration + if ( !this.cfg.locationBarId ) { + this.cfg.locationBarId = "locationBar"; + } + if ( !this.cfg.tabBarId ) { + this.cfg.tabBarId = "tabBar"; + } + if ( !this.cfg.adminBarId ) { + this.cfg.adminBarId = "adminBar"; + } + + // TODO: This should be i18n + + // Custom events + this.afterNavigate = new YAHOO.util.CustomEvent( "afterNavigate", this ); + + // Keep track of the view iframe + var viewframe = document.getElementById('adminViewFrame'); + // If it already loaded, run the right function + if ( viewframe.hasLoaded && window.frames[viewframe.name].WG ) { + this.navigate( window.frames[viewframe.name].WG.currentAssetId ); + } + // Next and every subsequent time it loads, run the right function again + YAHOO.util.Event.on( viewframe, 'load', function(){ + if ( window.frames[viewframe.name].WG ) { + self.navigate( window.frames[viewframe.name].WG.currentAssetId ); + } + } ); + this.afterNavigate.subscribe( function(){ + // Create the toolbars + var viewframe = document.getElementById('adminViewFrame'); + var viewWin = window.frames[viewframe.name]; + // Inject some dependencies + YAHOO.util.Get.css( [ + getWebguiProperty( 'extrasURL' ) + 'yui/build/menu/assets/skins/sam/menu.css', + getWebguiProperty( 'extrasURL' ) + 'yui/build/button/assets/skins/sam/button.css' + ], + { + win : viewWin + } + ); + YAHOO.util.Get.script( [ + getWebguiProperty( 'extrasURL' ) + 'yui/build/yahoo-dom-event/yahoo-dom-event.js', + getWebguiProperty( 'extrasURL' ) + 'yui/build/utilities/utilities.js', + getWebguiProperty( 'extrasURL' ) + 'yui/build/element/element-min.js', + getWebguiProperty( 'extrasURL' ) + 'yui/build/container/container-min.js', + getWebguiProperty( 'extrasURL' ) + 'yui/build/animation/animation-min.js', + getWebguiProperty( 'extrasURL' ) + 'yui/build/menu/menu-min.js', + getWebguiProperty( 'extrasURL' ) + 'yui/build/json/json-min.js', + getWebguiProperty( 'extrasURL' ) + 'yui/build/button/button-min.js', + getWebguiProperty( 'extrasURL' ) + 'yui/build/selector/selector-min.js', + getWebguiProperty( 'extrasURL' ) + 'admin/admin.js', + getWebguiProperty( 'extrasURL' ) + 'admin/toolbar.js' + ], + { + win : viewWin, + onSuccess : function(data) { + // We have to create these menus within the correct window context + data.win.WebGUI.Toolbar.createAll(); + } + } + ); + + // For layout types, create draggable handlers + if ( this.currentAssetDef.className == "WebGUI::Asset::Wobject::Layout" ) { + YAHOO.util.Get.css( [ + getWebguiProperty( 'extrasURL' ) + 'draggable.css' + ], + { + win : viewWin + } + ); + YAHOO.util.Get.script( [ + getWebguiProperty( 'extrasURL' ) + 'yui/build/yahoo-dom-event/yahoo-dom-event.js', + getWebguiProperty( 'extrasURL' ) + 'yui/build/utilities/utilities.js', + getWebguiProperty( 'extrasURL' ) + 'yui/build/element/element-min.js', + getWebguiProperty( 'extrasURL' ) + 'yui/build/connection/connection-debug.js', + getWebguiProperty( 'extrasURL' ) + 'yui/build/selector/selector-min.js', + getWebguiProperty( 'extrasURL' ) + 'yui/build/animation/animation-min.js', + getWebguiProperty( 'extrasURL' ) + 'yui/build/dragdrop/dragdrop-min.js', + getWebguiProperty( 'extrasURL' ) + 'admin/layout.js' + ], + { + win : viewWin, + onSuccess : function(data) { + new data.win.WebGUI.Layout( + data.win.document.body, + { + url: self.currentAssetDef.url + '?func=setContentPositions;' + } + ); + } + } + ); + } + + }, this ); + + // Private methods + // Initialize these things AFTER the i18n is fetched + var _init = function () { + self.localeMonths = [ + self.i18n.get('DateTime', 'january'), + self.i18n.get('DateTime', 'february'), + self.i18n.get('DateTime', 'march'), + self.i18n.get('DateTime', 'april'), + self.i18n.get('DateTime', 'may'), + self.i18n.get('DateTime', 'june'), + self.i18n.get('DateTime', 'july'), + self.i18n.get('DateTime', 'august'), + self.i18n.get('DateTime', 'september'), + self.i18n.get('DateTime', 'october'), + self.i18n.get('DateTime', 'november'), + self.i18n.get('DateTime', 'december') + ]; + self.afterNavigate.subscribe( self.requestUpdateCurrentVersionTag, self ); + self.requestUpdateCurrentVersionTag(); + + self.tabBar = new YAHOO.widget.TabView( self.cfg.tabBarId ); + // Keep track of View and Tree tabs + self.tabBar.getTab(0).addListener('click',self.afterShowViewTab,self,true); + self.tabBar.getTab(1).addListener('click',self.afterShowTreeTab,self,true); + + self.tree = new WebGUI.Admin.Tree(self); + + self.adminBar = new WebGUI.Admin.AdminBar( self.cfg.adminBarId, { expandMax : true } ); + self.adminBar.afterShow.subscribe( self.updateAdminBar, self ); + YAHOO.util.Event.on( window, 'load', function(){ self.adminBar.show( self.adminBar.dt[0].id ) } ); + self.newContentBar = new WebGUI.Admin.AdminBar( "newContentBar", { expandMax : true } ); + + self.locationBar = new WebGUI.Admin.LocationBar( self.cfg.locationBarId, { + homeUrl : self.cfg.homeUrl + } ); + self.afterNavigate.subscribe( self.locationBar.afterNavigate, self.locationBar ); + }; + + // Get I18N + this.i18n = new WebGUI.i18n( { + namespaces : { + 'WebGUI' : [ '< prev', 'next >', 'locked by', '364', 'Loading...' ], + 'Asset' : [ 'rank', '99', 'type', 'revision date', 'size', 'locked', 'More', 'unlocked', 'edit', + 'update', 'delete', '43', 'cut', 'Copy', 'duplicate', 'create shortcut' + ], + 'DateTime' : [ 'january', 'february', 'march', 'april', 'may', 'june', + 'july', 'august', 'september', 'october', 'november', 'december' + ] + }, + onpreload : { + fn : _init + } + } ); + + +}; + +/** + * getRealHeight( elem ) + * Get the real height of the given element. + */ +WebGUI.Admin.getRealHeight += function ( elem ) { + var D = YAHOO.util.Dom; + var _pos = D.getStyle(elem, 'position'); + var _vis = D.getStyle(elem, 'visibility'); + var clipped = false; + // We don't want 0 height! + if ( parseInt( elem.style.height ) == 0 ) { + elem.style.display = "none"; + elem.style.height = "" + } + if (elem.style.display == 'none') { + clipped = true; + D.setStyle(elem, 'position', 'absolute'); + D.setStyle(elem, 'visibility', 'hidden'); + D.setStyle(elem, 'display', 'block'); + } + var height = elem.offsetHeight; + if (height == 'auto') { + //This is IE, let's fool it + D.setStyle(elem, 'zoom', '1'); + height = elem.clientHeight; + } + if (clipped) { + D.setStyle(elem, 'display', 'none'); + D.setStyle(elem, 'visibility', _vis); + D.setStyle(elem, 'position', _pos); + } + //Strip the px from the style + return parseInt(height); + +}; + +/** + * afterShowTreeTab() + * Fired after the Tree tab is shown. Refreshes if necessary. + */ +WebGUI.Admin.prototype.afterShowTreeTab += function () { + // Refresh if necessary + if ( this.treeDirty ) { + this.tree.goto( this.currentAssetDef.url ); + this.treeDirty = 0; + } + // Update last shown view/tree + this.currentTab = "tree"; +}; + +/** + * afterShowViewTab() + * Fired after the view tab is shown. Refreshes if necessary. + */ +WebGUI.Admin.prototype.afterShowViewTab += function () { + // Refresh if necessary + if ( this.viewDirty ) { + window.frames[ "view" ].location.href = this.currentAssetDef.url; + this.viewDirty = 0; + } + // Update last shown view/tree + this.currentTab = "view"; +}; + +/** + * appendToUrl( url, params ) + * Add URL components to a URL; + */ +appendToUrl += function ( url, params ) { + var components = [ url ]; + if (url.match(/\?/)) { + components.push(";"); + } + else { + components.push("?"); + } + components.push(params); + return components.join(''); +}; + +/** + * editAsset( url ) + * Show the edit form for the asset at the given URL + */ +WebGUI.Admin.prototype.editAsset += function ( url ) { + this.showView( appendToUrl( url, "func=edit" ) ); +}; + +/** + * gotoAsset( url ) + * Open the appropriate tab (View or Tree) and go to the given asset URL + */ +WebGUI.Admin.prototype.gotoAsset += function ( url ) { + if ( this.tabBar.get('activeIndex') > 1 ) { + this.tabBar.selectTab( 0 ); + this.currentTab = "view"; + } + if ( this.currentTab == "view" ) { + window.frames[ "view" ].location.href = url; + this.treeDirty = 1; + } + else if ( this.currentTab == "tree" ) { + // Make tree request + this.tree.goto( url ); + this.viewDirty = 1; + } +}; + +/** + * showView ( [url] ) + * Open the view tab, optionally navigating to the given URL + */ +WebGUI.Admin.prototype.showView += function (url) { + // Show the view tab + this.tabBar.selectTab( 0 ); + this.currentTab = "view"; + + if ( url ) { + // Open the URL + window.frames["view"].location.href = url; + + // Mark undirty, as we'll clean it ourselves + this.viewDirty = 0; + } +}; + +/** + * makeEditAsset( url ) + * Create a callback to edit an asset. Use when attaching to event listeners + */ +WebGUI.Admin.prototype.makeEditAsset += function (url) { + var self = this; + return function() { + self.editAsset( url ); + }; +}; + +/** + * makeGotoAsset( url ) + * Create a callback to view an asset. Use when attaching to event listeners + */ +WebGUI.Admin.prototype.makeGotoAsset += function ( url ) { + var self = this; + return function() { + self.gotoAsset( url ); + }; +}; + +/** + * navigate( assetDef ) + * We've navigated to a new asset. Called by the view iframe when a new + * page is reached + */ +WebGUI.Admin.prototype.navigate += function ( assetId ) { + // Don't do the same asset twice + if ( this.currentAssetId && this.currentAssetId == assetId ) { + // But still fire the event + this.afterNavigate.fire( this.currentAssetDef ); + return; + } + + if ( !this.currentAssetId || this.currentAssetId != assetId ) { + // request asset update + this.currentAssetId = assetId; + var self = this; + this.requestAssetDef( assetId, function( assetDef ) { + self.currentAssetDef = assetDef; + self.treeDirty = 1; + self.updateAssetHelpers( assetDef ); + self.updateAssetHistory( assetDef ); + + // Fire event + this.afterNavigate.fire( assetDef ); + } ); + } +}; + +/** + * requestAssetDef( assetId, callback ) + * Request more information about an asset. The callback takes a single + * argument which is an object containing the asset information and is + * called in the scope of the admin function + */ +WebGUI.Admin.prototype.requestAssetDef += function ( assetId, callback ) { + var connectCallback = { + success : function (o) { + var assetDef = YAHOO.lang.JSON.parse( o.responseText ); + callback.call( this, assetDef ); + }, + failure : function (o) { + + }, + scope: this + }; + + var url = '?op=admin;method=getAssetData;assetId=' + assetId; + var ajax = YAHOO.util.Connect.asyncRequest( 'GET', url, connectCallback ); +}; + +/** + * updateAdminBar( type, args, admin ) + * Update the AdminBar. args is an array containing the id of the AdminBar + * pane being shown. + */ +WebGUI.Admin.prototype.updateAdminBar += function ( type, args, admin ) { + // "this" is the AdminBar + var id = args[0]; + if ( id == "assetHelpers" ) { + + } + else if ( id == "clipboard" ) { + admin.requestUpdateClipboard.call( admin ); + } + else if ( id == "newContent" ) { + + } + else if ( id == "versionTags" ) { + admin.requestUpdateVersionTags.call( admin ); + } +}; + +/** + * requestUpdateClipboard( ) + * Request the new set of clipboard assets from the server + */ +WebGUI.Admin.prototype.requestUpdateClipboard += function ( ) { + var callback = { + success : function (o) { + var clipboard = YAHOO.lang.JSON.parse( o.responseText ); + this.updateClipboard( clipboard ); + }, + failure : function (o) { + + }, + scope: this + }; + + var showAll = document.getElementById( 'clipboardShowAll' ).checked ? ";all=1" : ";all=0"; + var ajax = YAHOO.util.Connect.asyncRequest( 'GET', '?op=admin;method=getClipboard' + showAll, callback ); +}; + +/** + * updateClipboard( assets ) + * Update the clipboard list with the given assets + */ +WebGUI.Admin.prototype.updateClipboard += function ( assets ) { + // Clear out the old clipboard + var div = document.getElementById( 'clipboardItems' ); + while ( div.childNodes.length > 0 ) { + div.removeChild( div.childNodes[0] ); + } + + for ( var i = 0; i < assets.length; i++ ) { + var asset = assets[i]; + var a = document.createElement('a'); + var icon = document.createElement('img'); + icon.src = asset.icon; + a.appendChild( icon ); + a.appendChild( document.createTextNode( asset.title ) ); + div.appendChild( a ); + this.addPasteHandler( a, asset.assetId ); + } +}; + +/** + * addPasteHandler( elem, assetId ) + * Add an onclick handler to paste an asset. + */ +WebGUI.Admin.prototype.addPasteHandler += function ( elem, assetId ) { + var self = this; + YAHOO.util.Event.on( elem, "click", function(){ + // Update clipboard after paste in case paste fails + var updateAfterPaste = function(){ + this.requestUpdateClipboard(); + this.afterNavigate.unsubscribe( updateAfterPaste ); + }; + self.afterNavigate.subscribe(updateAfterPaste, self ); + self.pasteAsset( assetId ); + }, self ); +}; + +/** + * pasteAsset( id ) + * Paste an asset and update the clipboard + */ +WebGUI.Admin.prototype.pasteAsset += function ( id ) { + var url = appendToUrl( this.currentAssetDef.url, 'func=pasteList&assetId=' + id ); + console.log(url); + this.gotoAsset( url ); +}; + +/** + * requestUpdateVersionTags( ) + * Request the new set of version tags from the server + */ +WebGUI.Admin.prototype.requestUpdateVersionTags += function ( ) { + var callback = { + success : function (o) { + var versionTags = YAHOO.lang.JSON.parse( o.responseText ); + this.updateVersionTags( versionTags ); + }, + failure : function (o) { + + }, + scope: this + }; + + var ajax = YAHOO.util.Connect.asyncRequest( 'GET', '?op=admin;method=getVersionTags', callback ); +}; + +/** + * updateVersionTags( tags ) + * Update the version tag list with the given tags + */ +WebGUI.Admin.prototype.updateVersionTags += function ( tags ) { + // Clear out the old tags + var div = document.getElementById( 'versionTagItems' ); + while ( div.childNodes.length > 0 ) { + div.removeChild( div.childNodes[0] ); + } + + for ( var i = 0; i < tags.length; i++ ) { + var tag = tags[i]; + var a = document.createElement('a'); + var icon = document.createElement('img'); + icon.src = tag.icon; + a.appendChild( icon ); + a.appendChild( document.createTextNode( tag.name ) ); + div.appendChild( a ); + this.addJoinTagHandler( a, tag.tagId ); + if ( tag.isCurrent ) { + this.updateCurrentVersionTag( tag ); + } + } +}; + +/** + * addJoinTagHandler( elem, tagId ) + * Add an onclick handler to join a version tag + */ +WebGUI.Admin.prototype.addJoinTagHandler += function ( elem, tagId ) { + var self = this; + YAHOO.util.Event.on( elem, "click", function(){ + // Update version tags after join in case paste fails + var updateAfterJoin = function(){ + this.requestUpdateVersionTags(); + this.afterNavigate.unsubscribe( updateAfterJoin ); + }; + self.afterNavigate.subscribe(updateAfterJoin, self ); + self.joinTag( tagId ); + }, self ); +}; + +/** + * joinTag( id ) + * Join a new version tag + */ +WebGUI.Admin.prototype.joinTag += function ( id ) { + var url = appendToUrl( this.currentAssetDef.url, 'op=setWorkingVersionTag;tagId=' + id ); + this.gotoAsset( url ); +}; + +/** + * updateAssetHelpers( assetDef ) + * Update the asset helpers. assetDef must contain: + * helper - An arrayref of hashrefs of helper definitions + * icon - The icon of the current asset + * type - The type of the current asset + */ +WebGUI.Admin.prototype.updateAssetHelpers += function ( assetDef ) { + var typeEl = document.getElementById( 'helper_asset_name' ); + typeEl.style.backgroundImage = 'url(' + assetDef.icon + ')'; + typeEl.innerHTML = assetDef.type; + + // Clear old helpers + var helperEl = document.getElementById( 'helper_list' ); + while ( helperEl.childNodes.length > 0 ) { + helperEl.removeChild( helperEl.childNodes[0] ); + } + + // Add new ones + for ( var helperId in assetDef.helpers ) { + var helper = assetDef.helpers[helperId]; + var li = document.createElement('li'); + li.className = "clickable with_icon"; + li.appendChild( document.createTextNode( helper.label ) ); + YAHOO.util.Event.on( li, "click", this.getHelperHandler( this.currentAssetId, helperId, helper ) ); + helperEl.appendChild( li ); + } +}; + +/** + * getHelperHandler( helperId, helper ) + * Get a function to handle the helper + */ +WebGUI.Admin.prototype.getHelperHandler += function ( assetId, helperId, helper ) { + if ( helper.url ) { + return bind( this, function(){ + // a confirmation dialog + if ( helper.confirm && !confirm( helper.confirm ) ) { + return; + } + this.gotoAsset( helper.url ) + } ); + } + + return bind( this, function(){ + // a confirmation dialog + if ( helper.confirm && !confirm( helper.confirm ) ) { + return; + } + this.requestHelper( helperId, assetId ) + } ); +}; + +/** + * updateCurrentVersionTag( tag ) + * Update the current version tag. tag is an object of data about the tag: + * tagId : the ID of the tag + * name : The name of the tag + * editUrl : A URL to edit the tag + * commitUrl : A URL to commit the tag + * leaveUrl : A URL to leave the tag + */ +WebGUI.Admin.prototype.updateCurrentVersionTag += function ( tag ) { + if ( !tag.tagId ) { + // hide tag area + document.getElementById( 'versionTag' ).style.display = "none"; + return; + } + + // Make sure tag is shown now + document.getElementById( 'versionTag' ).style.display = "block"; + + var editEl = document.getElementById( 'editTag' ); + editEl.innerHTML = tag.name; + editEl.href = tag.editUrl; + + var publishEl = document.getElementById( 'publishTag' ); + publishEl.href = tag.commitUrl; + + var leaveEl = document.getElementById( 'leaveTag' ); + leaveEl.href = tag.leaveUrl; +}; + +/** + * requestUpdateCurrentVersionTag( ) + * Request an update for the current version tag + */ +WebGUI.Admin.prototype.requestUpdateCurrentVersionTag += function ( ) { + var callback = { + success : function (o) { + var tag = YAHOO.lang.JSON.parse( o.responseText ); + this.updateCurrentVersionTag( tag ); + }, + failure : function (o) { + + }, + scope: this + }; + + var ajax = YAHOO.util.Connect.asyncRequest( 'GET', '?op=admin;method=getCurrentVersionTag', callback ); +}; + +/** + * requestHelper( helperId, assetId ) + * Request the Asset Helper for the given assetId + */ +WebGUI.Admin.prototype.requestHelper += function ( helperId, assetId ) { + var callback = { + success : function (o) { + var resp = YAHOO.lang.JSON.parse( o.responseText ); + this.processPlugin( resp ); + }, + failure : function (o) { + + }, + scope: this + }; + + var url = '?op=admin;method=processAssetHelper;helperId=' + helperId + ';assetId=' + assetId; + var ajax = YAHOO.util.Connect.asyncRequest( 'GET', url, callback ); +}; + +/** + * processPlugin( response ) + * Process the plugin response. Possible responses include: + * message : A message to the user + * error : An error message + * openDialog : Open a dialog with the given URL + * openTab : Open a tab with the given URL + * redirect : Redirect the View pane to the given URL + * forkId : The Helper forked a process, use the ID to get the status + * scriptFile : Load a JS file + * scriptFunc : Run a JS function. Used with scriptFile + * scriptArgs : Arguments to scriptFunc. Used with scriptFile + */ +WebGUI.Admin.prototype.processPlugin += function ( resp ) { + if ( resp.openTab ) { + this.openTab( resp.openTab ); + } + else if ( resp.openDialog ) { + this.openModalDialog( resp.openDialog, resp.width, resp.height ); + } + else if ( resp.scriptFile ) { + this.loadAndRun( resp.scriptFile, resp.scriptFunc, resp.scriptArgs ); + } + else if ( resp.message ) { + this.showInfoMessage( resp.message ); + } + else if ( resp.error ) { + this.showInfoMessage( resp.error ); + } + else if ( resp.forkId ) { + this.openForkDialog( resp.forkId ); + } + else if ( resp.redirect ) { + this.gotoAsset( resp.redirect ); + } + else { + alert( "Unknown plugin response: " + YAHOO.lang.JSON.stringify(resp) ); + } +}; + +/** + * openModalDialog( url, width, height ) + * Open a modal dialog with an iframe containing the given URL. + * The page inside the iframe must eventually close the dialog using: + * window.parent.admin.closeModalDialog(); + */ +WebGUI.Admin.prototype.openModalDialog += function ( url, width, height ) { + if ( this.modalDialog ) { + return; // Can't have more than one open + } + + if ( !width ) { + width = parseInt( YAHOO.util.Dom.getViewportWidth() * 0.6 ) + "px"; + } + if ( !height ) { + height = parseInt( YAHOO.util.Dom.getViewportHeight() * 0.6 ) + "px"; + } + + var dialog = new YAHOO.widget.Panel( 'adminModalDialog', { + "width" : width, + "height" : height, + fixedcenter : true, + constraintoviewport : true, + underlay : "shadow", + modal : true, + close : false, + visible : true, + draggable : false + } ); + dialog.setBody( '' ); + dialog.render( document.body ); + + this.modalDialog = dialog; +}; + +/** + * closeModalDialog( ) + * Close the current modal dialog + */ +WebGUI.Admin.prototype.closeModalDialog += function ( ) { + if ( !this.modalDialog ) { + return; // Can't close what isn't open + } + + this.modalDialog.destroy(); + this.modalDialog = null; +}; + +/** + * showInfoMessage( message ) + * Show an informative message that requires no response or interaction from + * the user. + */ +WebGUI.Admin.prototype.showInfoMessage += function ( message ) { + if ( this.infoMessageTimeout ) { + clearTimeout( this.infoMessageTimeout ); + } + + var info = document.getElementById( 'infoMessage' ); + info.innerHTML = message; + + var infoContainer = document.getElementById( 'infoMessageContainer' ); + var newHeight = WebGUI.Admin.getRealHeight( infoContainer ); + infoContainer.style.height = newHeight + 'px'; + infoContainer.style.top = -1 * newHeight + 'px'; + infoContainer.style.display = "block"; + + var anim = new YAHOO.util.Anim( infoContainer ); + anim.duration = 0.25; + anim.method = YAHOO.util.Easing.easeOut; + anim.attributes.top = { to: 0 }; + anim.animate(); + + this.infoMessageTimeout = setTimeout( this.hideInfoMessage, 3000 ); +}; + +/** + * hideInfoMessage( ) + * Hide the informative message from showInfoMessage() + */ +WebGUI.Admin.prototype.hideInfoMessage += function ( ) { + var infoContainer = document.getElementById( 'infoMessageContainer' ); + infoContainer.style.display = "none"; +}; + +/** + * openForkDialog( forkId ) + * Open a dialog to show a progress bar for the forked process + */ +WebGUI.Admin.prototype.openForkDialog += function ( forkId ) { + // Open the dialog with a progress bar + var dialog = new YAHOO.widget.Panel( 'forkModalDialog', { + "width" : '350px', + fixedcenter : true, + constraintoviewport : true, + underlay : "shadow", + close : true, + visible : true, + draggable : false + } ); + dialog.setBody( + '
    Starting...
    ' + ); + dialog.render( document.body ); + this.treeDialog = dialog; + + var pbTaskBar = new YAHOO.widget.ProgressBar({ + minValue : 0, + value : 0, + maxValue : 1, + width: '300px', + height: '30px', + anim: true + }); + pbTaskBar.render( 'pbTask' ); + pbTaskBar.get('anim').duration = 0.5; + pbTaskBar.get('anim').method = YAHOO.util.Easing.easeOut; + + YAHOO.WebGUI.Fork.poll({ + url : '?op=fork;pid=' + forkId, + draw : function(data) { + var status = YAHOO.lang.JSON.parse( data.status ); + if ( status ) { + pbTaskBar.set( 'maxValue', status.total ); + pbTaskBar.set( 'value', status.finished ); + document.getElementById( 'pbTaskStatus' ).innerHTML = status.message; + } + }, + finish : function(data){ + var status = YAHOO.lang.JSON.parse( data.status ); + if ( status.redirect ) { + alert("Dispensing product..."); + window.admin.gotoAsset( status.redirect ); + } + dialog.destroy(); + dialog = null; + // TODO: Handle the last request of the forked process + }, + error : function(e){ + alert("Error: " + e); + } + }); +}; + +/** + * addNewContent( urlFragment ) + * Add new content by visiting the given URL fragment + */ +WebGUI.Admin.prototype.addNewContent += function ( urlFragment ) { + this.gotoAsset( appendToUrl( this.currentAssetDef.url, urlFragment ) ); +}; + +/** + * updateAssetHistory( assetDef ) + * Update the history list of the current asset + */ +WebGUI.Admin.prototype.updateAssetHistory += function ( assetDef ) { + // Clear old revisions + var historyEl = document.getElementById( 'history_list' ); + while ( historyEl.childNodes.length > 0 ) { + historyEl.removeChild( historyEl.childNodes[0] ); + } + + var now = new Date(); + // Add new ones + for ( var i = 0; i < assetDef.revisions.length; i++ ) { + var revisionDate = assetDef.revisions[i]; + var li = document.createElement('li'); + li.className = "clickable with_icon"; + + // Create a descriptive date string + var rDate = new Date( revisionDate * 1000 ); // JS requires milliseconds + var minutes = rDate.getMinutes(); + minutes = minutes < 10 ? "0" + minutes : minutes; + + var dateString; + // Last year or older + if ( rDate.getFullYear() < now.getFullYear() ) { + dateString = this.localeMonths[rDate.getMonth()] + " " + rDate.getDate() + ", " + + rDate.getFullYear(); + } + // Earlier this year + else if ( rDate.getMonth() < now.getMonth() || rDate.getDate() < now.getDate() - 1 ) { + dateString = this.localeMonths[rDate.getMonth()] + " " + rDate.getDate() + " " + + rDate.getHours() + ":" + minutes; + } + // Yesterday + else if ( rDate.getDate() < now.getDate() ) { + dateString = "Yesterday " + rDate.getHours() + ":" + minutes; + } + // Today + else { + dateString = "Today " + rDate.getHours() + ":" + minutes; + } + + li.appendChild( document.createTextNode( dateString ) ); + this.addHistoryHandler( li, assetDef, revisionDate ); + historyEl.appendChild( li ); + } +}; + +/** + * addHistoryHandler( elem, revisionDate ) + * Add the click handler to view the desired revision + */ +WebGUI.Admin.prototype.addHistoryHandler += function ( elem, assetDef, revisionDate ) { + var self = this; + var url = appendToUrl( assetDef.url, 'func=view;revision=' + revisionDate ); + YAHOO.util.Event.on( elem, "click", function(){ self.gotoAsset( url ) }, self, true ); +}; + +/** + * openTab ( url ) + * Open a new tab with an iframe and the given URL + */ +WebGUI.Admin.prototype.openTab += function ( url ) { + // Prepare the iframe first + var iframe = document.createElement( 'iframe' ); + iframe.src = url; + YAHOO.util.Event.on( iframe, 'load', function(){ this.updateTabLabel(newTab); }, this, true ); + + // Prepare the tab + var newTab = new YAHOO.widget.Tab({ + label : window.admin.i18n.get('WebGUI','Loading...'), + content : '' + }); + newTab.get('contentEl').appendChild( iframe ); + + // Fire when ready, Gridley + this.tabBar.addTab( newTab ); + +}; + +/** + * updateTabLabel( tab ) + * Update the tab's label with the title from the iframe inside + */ +WebGUI.Admin.prototype.updateTabLabel += function ( tab ) { + // Find the iframe + var iframe = tab.get('contentEl').getElementsByTagName( 'iframe' )[0]; + var title = iframe.contentDocument.title; + tab.set( 'label', title ); +}; + +/** + * getHelperMenuItems( assetId, helpers ) + * Get the items to create a menu for the given helpers + */ +WebGUI.Admin.prototype.getHelperMenuItems += function ( assetId, helpers ) { + var items = []; + + // Add all the items with appropriate onclick handlers + for ( var i in helpers ) { + var helper = helpers[i]; + var item = { + onclick : { + fn : this.getHelperHandler( assetId, i, helper ) + }, + text : helper["label"], + icon : helper["icon"] + }; + items.push( item ); + } + + return items; +}; + +/** + * showHelperMenu( elem, assetId, helpers ) + * Show a pop-up Helper menu for the given assetId with the given helpers + */ +WebGUI.Admin.prototype.showHelperMenu += function ( elem, assetId, helpers ) { + if ( this.helperMenu ) { + // destroy the old helper menu! + this.helperMenu.destroy(); + } + this.helperMenu = new YAHOO.widget.Menu( "HelperMenu", { + position : "dynamic", + clicktohide : true, + constraintoviewport : true, + itemData : this.getHelperMenuItems( assetId, helpers ), + context : [ elem, 'tl', 'bl' ], + effect: { effect: YAHOO.widget.ContainerEffect.FADE, duration:0.25 } + } ); + this.helperMenu.render( elem.parentNode ); + this.helperMenu.show(); + this.helperMenu.focus(); +}; + +/**************************************************************************** + * WebGUI.Admin.LocationBar + */ +WebGUI.Admin.LocationBar += function (id, cfg) { + // Public properties + this.id = id; // ID of the element containing the location bar + this.cfg = cfg; // Configuration + this.currentAssetDef = null; // Object containing assetId, title, url, icon + this.backAssetDefs = [ ]; // Asset defs to go back to + this.forwardAssetDefs = [ ]; // Asset defs to go forward to + this.filters = [ ]; // search filters + + // Private members + var self = this; + var _element = document.getElementById( self.id ); + + // Create buttons + this.btnBack = new YAHOO.widget.Button( "backButton", { + type : "split", + label : '', + disabled : true, + lazyloadmenu : false, + onclick : { fn: this.goBack, scope: this }, + menu : [] + } ); + this.btnForward = new YAHOO.widget.Button( "forwardButton", { + type : "split", + label : '', + disabled : true, + lazyloadmenu : false, + onclick : { fn: this.goForward, scope: this }, + menu : [] + } ); + this.btnSearchDialog = new YAHOO.widget.Button( "searchDialogButton", { + label : '', + onclick : { fn: this.createSearchTab, scope: this } + } ); + this.btnHome = new YAHOO.widget.Button( "homeButton", { + type : "button", + label : '', + onclick : { fn: this.goHome, scope: this } + } ); + + // Take control of the location input + this.klInput = new YAHOO.util.KeyListener( "locationInput", { keys: 13 }, { + fn: this.doInputSearch, + scope: this, + correctScope: true + } ); + YAHOO.util.Event.addListener( "locationInput", "focus", this.inputFocus, this, true ); + YAHOO.util.Event.addListener( "locationInput", "blur", this.inputBlur, this, true ); + +}; + +/** + * addBackAsset( assetDef ) + * Update the back menu to include a new asset + */ +WebGUI.Admin.LocationBar.prototype.addBackAsset += function ( assetDef ) { + var b = this.btnBack; + + // Button is enabled + b.set("disabled", false); + + // Add the menu item + this.backAssetDefs.unshift( assetDef ); + b.getMenu().insertItem( { + text : this.getMenuItemLabel( assetDef ), + value : assetDef.url, + onclick : { fn: this.clickBackMenuItem, obj: assetDef, scope: this } + }, 0 ); + b.getMenu().render(); + + // Remove a menu item if necessary + // TODO +}; + +/** + * clickBackMenuItem( assetDef ) + * Click an item in the back menu + */ +WebGUI.Admin.LocationBar.prototype.clickBackMenuItem += function ( type, e, assetDef ) { + window.admin.gotoAsset( assetDef.url ); + this.swapBackToForward( assetDef ); +}; + +/** + * clickForwardMenuItem( assetDef ) + * Click an item in the forward menu + */ +WebGUI.Admin.LocationBar.prototype.clickForwardMenuItem += function ( type, e, assetDef ) { + window.admin.gotoAsset( assetDef.url ); + this.swapForwardToBack( assetDef ); +}; + +/** + * doInputSearch() + * Perform the search as described in the location bar + */ +WebGUI.Admin.LocationBar.prototype.doInputSearch += function ( ) { + var input = document.getElementById("locationInput").value; + // If input starts with a / it's a URL + if ( input.match(/^\//) ) { + // If it doesn't have a ?, just go to the asset + if ( !input.match(/\?/) ) { + window.admin.gotoAsset( input ); + } + // If does contain a ?, go to url + else { + window.admin.go( input ); + } + } + // Otherwise ask WebGUI what do + else { + this.requestSearch(); + } +}; + +/** + * getMenuItemLabel( assetDef ) + * Build a menu item label for the given assetDef + */ +WebGUI.Admin.LocationBar.prototype.getMenuItemLabel += function ( assetDef ) { + return ' ' + assetDef.title; +} + +/** + * goBack( e ) + * Called when the mouse clicks on the back button + */ +WebGUI.Admin.LocationBar.prototype.goBack += function ( e ) { + var assetDef = this.backAssetDefs[0]; + + // First, start the going + window.admin.gotoAsset( assetDef.url ); + + // Update the back and forward menus + this.swapBackToForward( assetDef ); +}; + +/** + * goForward( e ) + * Called when the mouse clicks down on the forward button + */ +WebGUI.Admin.LocationBar.prototype.goForward += function ( e ) { + var assetDef = this.forwardAssetDefs[0]; + + // First, start the going + window.admin.gotoAsset( assetDef.url ); + + // Update the back and forward menus + this.swapForwardToBack( assetDef ); +}; + +/** + * inputBlur( e ) + * Called after the URL input field loses focus + */ +WebGUI.Admin.LocationBar.prototype.inputBlur += function ( e ) { + if ( e.target.value.match(/^\s*$/) ) { + e.target.value = this.currentAssetDef.url; + } + this.klInput.disable(); +}; + +/** + * inputFocus( e ) + * Called after the URL input field gains focus. + */ +WebGUI.Admin.LocationBar.prototype.inputFocus += function ( e ) { + if ( e.target.value == this.currentAssetDef.url ) { + e.target.value = ""; + } + this.klInput.enable(); +}; + +/** + * afterNavigate( type, args, me ) + * Update our location if necessary + * Context is the WebGUI.Admin object. + * Args is array: + * assetDef - the new current asset + */ +WebGUI.Admin.LocationBar.prototype.afterNavigate += function ( type, args, me ) { + var assetDef = args[0]; + + // Always update location bar + me.setTitle( assetDef.title ); + me.setUrl( assetDef.url ); + + // Don't do the same asset twice + if ( me.currentAssetDef && me.currentAssetDef.assetId != assetDef.assetId ) { + me.addBackAsset( me.currentAssetDef ); + // We navigated, so destroy the forward queue + //this.forwardAssetDefs = []; + //this.btnForward.getMenu().clearItems(); + //this.btnForward.getMenu().render(); + //this.btnForward.set( "disabled", true ); + } + + // Current asset is now... + me.currentAssetDef = assetDef; + + return; +}; + +/** + * setTitle( title ) + * Set the title to the new title + */ +WebGUI.Admin.LocationBar.prototype.setTitle += function ( title ) { + var span = document.getElementById("locationTitle"); + while ( span.childNodes.length ) span.removeChild( span.childNodes[0] ); + span.appendChild( document.createTextNode( title ) ); +}; + +/** + * setUrl( url ) + * Set the URL to the new URL + */ +WebGUI.Admin.LocationBar.prototype.setUrl += function ( url ) { + var input = document.getElementById( "locationInput" ); + input.value = url; +}; + +/** + * swapBackToForward( assetDef ) + * Swap items from the back list to the forward list until assetDef is the + * current asset. + */ +WebGUI.Admin.LocationBar.prototype.swapBackToForward += function ( assetDef ) { + while ( this.backAssetDefs.length > 0 && this.currentAssetDef.assetId != assetDef.assetId ) { + var workingDef = this.currentAssetDef; + this.forwardAssetDefs.unshift( workingDef ); + this.btnForward.getMenu().insertItem( { + text : this.getMenuItemLabel( workingDef ), + value : workingDef.url, + onclick : { fn: this.clickForwardMenuItem, obj: workingDef, scope: this } + }, 0 ); + this.currentAssetDef = this.backAssetDefs.shift(); + this.btnBack.getMenu().removeItem(0); + } + this.btnForward.getMenu().render(); + this.btnForward.set("disabled", false); + this.btnBack.getMenu().render(); + if ( this.backAssetDefs.length == 0 ) { + this.btnBack.set( "disabled", true ); + } +}; + +/** + * swapForwardToBack( assetDef ) + * Swap items from the forward list to the back list until assetDef is the + * current asset. + */ +WebGUI.Admin.LocationBar.prototype.swapForwardToBack += function ( assetDef ) { + while ( this.forwardAssetDefs.length > 0 && this.currentAssetDef.assetId != assetDef.assetId ) { + var workingDef = this.currentAssetDef; + this.backAssetDefs.unshift( workingDef ); + this.btnBack.getMenu().insertItem( { + text : this.getMenuItemLabel( workingDef ), + value : workingDef.url, + onclick : { fn: this.clickBackMenuItem, obj: workingDef, scope : this } + }, 0 ); + this.currentAssetDef = this.forwardAssetDefs.shift(); + this.btnForward.getMenu().removeItem(0); + } + this.btnBack.getMenu().render(); + this.btnBack.set("disabled", false); + this.btnForward.getMenu().render(); + if ( this.forwardAssetDefs.length == 0 ) { + this.btnForward.set( "disabled", true ); + } +}; + +/** + * goHome ( ) + * Go to the correct home URL + */ +WebGUI.Admin.LocationBar.prototype.goHome += function ( ) { + window.admin.gotoAsset( this.cfg.homeUrl ); +}; + +/** + * createSearchTab ( ) + * Create a new search tab and clone the searchForm node into it + */ +WebGUI.Admin.LocationBar.prototype.createSearchTab += function ( ) { + new WebGUI.Admin.Search( window.admin, {} ); +}; + +/**************************************************************************** + * + * WebGUI.Admin.AssetTable + * Display a table of assets. Extend this to create your own display + * Used by AssetTable and Search + */ +WebGUI.Admin.AssetTable += function ( admin, cfg ) { + this.admin = admin; + this.cfg = cfg; + + var selectAllCheck = document.createElement( 'input' ); + YAHOO.util.Dom.generateId(selectAllCheck,"selectAllCheck"); + this.selectAllCheck = selectAllCheck.id; + selectAllCheck.type = "checkbox"; + // Add the event handler in onDataTableInitializeRows because innerHTML won't + // save event handlers + + // Create a span so we can get innerHTML to put in DataTable's label + var selectAllSpan = document.createElement( 'span' ); + selectAllSpan.appendChild( selectAllCheck ); + + this.defaultSortBy = { + "key" : "lineage", + "dir" : YAHOO.widget.DataTable.CLASS_ASC + }; + + this.paginator = new YAHOO.widget.Paginator({ + containers : this.cfg.paginatorIds, + pageLinks : 7, + rowsPerPage : 100, + previousPageLinkLabel : window.admin.i18n.get('WebGUI', '< prev'), + nextPageLinkLabel : window.admin.i18n.get('WebGUI', 'next >'), + template : "{PreviousPageLink} {CurrentPageReport} {NextPageLink}" + }); + + // initialize the data source + this.dataSource + = new YAHOO.util.DataSource( this.cfg.dataSourceUrl, {connTimeout:30000} ); + this.dataSource.responseType + = YAHOO.util.DataSource.TYPE_JSON; + this.dataSource.responseSchema + = { + resultsList: 'assets', + fields: [ + { key: 'assetId' }, + { key: 'lineage' }, + { key: 'canEdit' }, + { key: 'helpers' }, + { key: 'title' }, + { key: 'type' }, + { key: 'revisionDate' }, + { key: 'assetSize' }, + { key: 'lockedBy' }, + { key: 'icon' }, + { key: 'url' }, + { key: 'childCount' } + ], + metaFields: { + totalRecords: "totalAssets", // Access to value in the server response + crumbtrail : "crumbtrail", + currentAsset : "currentAsset" + } + }; + + this.columnDefs + = [ + { + key: 'assetId', + label: selectAllSpan.innerHTML, + formatter: bind( this, this.formatAssetIdCheckbox ) + }, + { + key: 'helpers', + label: "", + formatter: bind( this, this.formatHelpers ) + }, + { + key: 'title', + label: admin.i18n.get('Asset', '99'), + formatter: bind( this, this.formatTitle ), + sortable: true + }, + { + key: 'type', + label: admin.i18n.get('Asset','type'), + sortable: false, + formatter: bind( this, this.formatType ) + }, + { + key: 'revisionDate', + label: admin.i18n.get('Asset','revision date' ), + formatter: bind( this, this.formatRevisionDate ), + sortable: true + }, + { + key: 'assetSize', + label: admin.i18n.get('Asset','size' ), + formatter: bind( this, this.formatAssetSize ), + sortable: true + }, + { + key: 'lockedBy', + label: '', + formatter: bind( this, this.formatLockedBy ) + } + ]; +}; +YAHOO.lang.extend( WebGUI.Admin.AssetTable, WebGUI.Admin ); + +/** + * init ( ) + * Initialize the datatable with the columns we have. + * You must call this after all the columnDefs are situated + */ +WebGUI.Admin.AssetTable.prototype.init += function ( ) { + // Initialize the data table + this.dataTable + = new YAHOO.widget.ScrollingDataTable( this.cfg.dataTableId, + this.columnDefs, + this.dataSource, + { + initialLoad : false, + dynamicData : true, + paginator : this.paginator, + sortedBy : this.defaultSortedBy, + generateRequest : this.buildQueryString + } + ); + + this.dataTable.handleDataReturnPayload + = function(oRequest, oResponse, oPayload) { + oPayload.totalRecords = oResponse.meta.totalRecords; + return oPayload; + }; +} + +/** + * formatHelpers ( ) + * Format the Edit and More links for the row + */ +WebGUI.Admin.AssetTable.prototype.formatHelpers += function ( elCell, oRecord, oColumn, orderNumber ) { + if ( oRecord.getData( 'canEdit' ) ) { + var edit = document.createElement("span"); + edit.className = "clickable"; + YAHOO.util.Event.addListener( edit, "click", function(){ + window.admin.editAsset( oRecord.getData('url') ); + }, window.admin, true ); + edit.appendChild( document.createTextNode( window.admin.i18n.get('Asset', 'edit') ) ); + elCell.appendChild( edit ); + elCell.appendChild( document.createTextNode( " | " ) ); + } + + var more = document.createElement( 'span' ); + more.className = 'clickable'; + elCell.appendChild( more ); + more.appendChild( document.createTextNode( window.admin.i18n.get('Asset','More' ) ) ); + more.href = '#'; + + // Build onclick handler to show more menu + this.addMenuOpenHandler( more, oRecord.getData( 'assetId' ), oRecord.getData( 'helpers' ) ); +}; + +/** + * addMenuOpenHandler( elem, assetId, helpers ) + * Add a handler that will open a menu for the given assetId with the given + * helpers + */ +WebGUI.Admin.AssetTable.prototype.addMenuOpenHandler += function ( elem, assetId, helpers ) { + var self = this; + YAHOO.util.Event.addListener( elem, "click", function(){ + self.admin.showHelperMenu( elem, assetId, helpers ); + } ); +}; + +/** + * formatAssetIdCheckbox ( ) + * Format the checkbox for the asset ID. + */ +WebGUI.Admin.AssetTable.prototype.formatAssetIdCheckbox += function ( elCell, oRecord, oColumn, orderNumber ) { + elCell.innerHTML = ''; + // TODO: Add onchange handler to toggle checkbox +}; + +/** + * formatAssetSize ( ) + * Format the asset class name + */ +WebGUI.Admin.AssetTable.prototype.formatAssetSize += function ( elCell, oRecord, oColumn, orderNumber ) { + elCell.innerHTML = oRecord.getData( "assetSize" ); +}; + +/** + * formatType ( ) + * Format the asset class name + */ +WebGUI.Admin.AssetTable.prototype.formatType += function ( elCell, oRecord, oColumn, orderNumber ) { + elCell.innerHTML = ' ' + + oRecord.getData( "type" ); +}; + +/** + * formatLockedBy ( ) + * Format the locked icon + */ +WebGUI.Admin.AssetTable.prototype.formatLockedBy += function ( elCell, oRecord, oColumn, orderNumber ) { + var extras = getWebguiProperty('extrasURL'); + elCell.innerHTML + = oRecord.getData( 'lockedBy' ) + ? '' + + '' + window.admin.i18n.get('WebGUI', 'locked by') + ' ' + oRecord.getData( 'lockedBy' ) + '' + + '' + : '' + + '' + window.admin.i18n.get('Asset', 'unlocked') + '' + + '' + ; +}; + +/** + * formatRank ( ) + * Format the input for the rank box + */ +WebGUI.Admin.AssetTable.prototype.formatRank += function ( elCell, oRecord, oColumn, orderNumber ) { + var rank = oRecord.getData("lineage").match(/[1-9][0-9]{0,5}$/); + var input = document.createElement( 'input' ); + input.type = "text"; + input.id = oRecord.getData("assetId") + '_rank'; + input.name = input.id; + input.size = 3; + input.value = rank; + + YAHOO.util.Event.addListener( input, "change", function(){ this.selectRow(elCell); }, this, true ); + elCell.appendChild( input ); +}; + +/** + * formatRevisionDate ( ) + * Format the asset class name + */ +WebGUI.Admin.AssetTable.prototype.formatRevisionDate += function ( elCell, oRecord, oColumn, orderNumber ) { + var revisionDate = new Date( oRecord.getData( "revisionDate" ) * 1000 ); + var minutes = revisionDate.getMinutes(); + if (minutes < 10) { + minutes = "0" + minutes; + } + elCell.innerHTML + = revisionDate.getFullYear() + '-' + ( revisionDate.getMonth() + 1 ) + + '-' + revisionDate.getDate() + ' ' + ( revisionDate.getHours() ) + + ':' + minutes + ; +}; + +/** + * formatTitle ( ) + * Format the link for the title + */ +WebGUI.Admin.AssetTable.prototype.formatTitle += function ( elCell, oRecord, oColumn, orderNumber ) { + var hasChildren = document.createElement("span"); + hasChildren.className = "hasChildren"; + if ( oRecord.getData('childCount') > 0 ) { + hasChildren.appendChild( document.createTextNode( "+" ) ); + } + else { + hasChildren.appendChild( document.createTextNode( " " ) ); + } + elCell.appendChild( hasChildren ); + + var title = document.createElement("span"); + title.className = "clickable"; + title.appendChild( document.createTextNode( oRecord.getData('title') ) ); + YAHOO.util.Event.addListener( title, "click", function(){ window.admin.gotoAsset(oRecord.getData('url')) }, this, true ); + elCell.appendChild( title ); +}; + +/** + * onDataReturnInitializeTable( request, response, payload ) + * Initialize the datatable + */ +WebGUI.Admin.AssetTable.prototype.onDataReturnInitializeTable += function ( sRequest, oResponse, oPayload ) { + + this.dataTable.onDataReturnInitializeTable.call( this.dataTable, sRequest, oResponse, oPayload ); + + YAHOO.util.Event.addListener( this.selectAllCheck, "change", function() { this.toggleAllRows(); }, this, true ); +}; + +/** + * toggleAllRows( ) + * Toggle all the rows in the data table to the state of the Select All + * Checkbox + */ +WebGUI.Admin.AssetTable.prototype.toggleAllRows += function ( ) { + var selectAllCheck = YAHOO.util.Dom.get(this.selectAllCheck); + var state = selectAllCheck.checked ? true : false; + var row = this.dataTable.getFirstTrEl(); + while ( row ) { + if ( state ) { + this.selectRow( row ); + } + else { + this.deselectRow( row ); + } + row = this.dataTable.getNextTrEl( row ); + } +}; + + +/** + * removeHighlightFromRow ( child ) + * Remove the highlight from a row by removing the "highlight" class. + */ +WebGUI.Admin.AssetTable.prototype.removeHighlightFromRow += function ( child ) { + var row = this.findRow( child ); + if ( YAHOO.util.Dom.hasClass( row, "highlight" ) ) { + YAHOO.util.Dom.removeClass( row, "highlight" ); + } +}; + +/** + * selectRow ( child ) + * Check the assetId checkbox in the row that contains the given child. + * Used when something in the row changes. + */ +WebGUI.Admin.AssetTable.prototype.selectRow += function ( child ) { + this.addHighlightToRow( child ); + this.findCheckbox( this.findRow( child ) ).checked = true; +}; + +/** + * deselectRow( child ) + * Uncheck the checkbox and toggle the highlight + */ +WebGUI.Admin.AssetTable.prototype.deselectRow += function ( child ) { + this.removeHighlightFromRow( child ); + this.findCheckbox( this.findRow( child ) ).checked = false; +}; + +/** + * toggleHighlightForRow ( checkbox ) + * Toggle the highlight for the row based on the state of the checkbox + */ +WebGUI.Admin.AssetTable.prototype.toggleHighlightForRow += function ( checkbox ) { + if ( checkbox.checked ) { + this.addHighlightToRow( checkbox ); + } + else { + this.removeHighlightFromRow( checkbox ); + } +}; + +/** + * toggleRow ( child ) + * Toggles the entire row by finding the checkbox and doing what needs to be + * done. + */ +WebGUI.Admin.AssetTable.prototype.toggleRow = function ( child ) { + var row = this.findRow( child ); + + // Find the checkbox + var inputs = row.getElementsByTagName( "input" ); + for ( var i = 0; i < inputs.length; i++ ) { + if ( inputs[i].name == "assetId" ) { + inputs[i].checked = inputs[i].checked + ? false + : true + ; + this.toggleHighlightForRow( inputs[i] ); + break; + } + } +}; + +/** + * findRow ( child ) + * Find the row that contains this child element. + */ +WebGUI.Admin.AssetTable.prototype.findRow += function ( child ) { + var node = child; + while ( node ) { + if ( node.tagName == "TR" ) { + return node; + } + node = node.parentNode; + } +}; + +/** + * findCheckbox( row ) + * Find the checkbox in the row for the assetId field + */ +WebGUI.Admin.AssetTable.prototype.findCheckbox += function ( row ) { + var inputs = row.getElementsByTagName( "input" ); + for ( var i = 0; i < inputs.length; i++ ) { + if ( inputs[i].name == "assetId" ) { + return inputs[i]; + } + } +}; + +/** + * addHighlightToRow ( child ) + * Highlight the row containing this element by adding to it the "highlight" + * class + */ +WebGUI.Admin.AssetTable.prototype.addHighlightToRow += function ( child ) { + var row = this.findRow( child ); + if ( !YAHOO.util.Dom.hasClass( row, "highlight" ) ) { + YAHOO.util.Dom.addClass( row, "highlight" ); + } +}; + +/** + * buildQueryString( state, dt ) + * Build the query string for the datasource + */ +WebGUI.Admin.AssetTable.prototype.buildQueryString += function ( state, dt ) { + var recordOffset = state.pagination ? state.pagination.recordOffset : 0; + var rowsPerPage = state.pagination ? state.pagination.rowsPerPage : 0; + var orderByColumn = state.sortedBy ? state.sortedBy.key : "lineage"; + var orderByDir = state.sortedBy + ? ( (state.sortedBy.dir === YAHOO.widget.DataTable.CLASS_DESC) ? "DESC" : "ASC" ) + : "ASC" + ; + + var query = "recordOffset=" + recordOffset + + ';orderByDirection=' + orderByDir + + ';rowsPerPage=' + rowsPerPage + + ';orderByColumn=' + orderByColumn + ; + + return query; +}; + +/** + * getSelected( ) + * Return an array of the selected asset IDs + */ +WebGUI.Admin.AssetTable.prototype.getSelected += function ( ) { + var assetIds = []; + var row = this.dataTable.getFirstTrEl(); + while ( row ) { + var check = this.findCheckbox( row ); + if ( check.checked ) { + assetIds.push( check.value ); + } + row = this.dataTable.getNextTrEl( row ); + } + return assetIds; +}; + +/**************************************************************************** + * + * WebGUI.Admin.Tree + */ +WebGUI.Admin.Tree += function(admin) { + WebGUI.Admin.Tree.superclass.constructor.call( this, admin, { + dataSourceUrl : '?op=admin;method=getTreeData;', + dataTableId : 'treeDataTableContainer', + paginatorIds : [ 'treePagination' ] + } ); + + // Add Rank column for ordering + this.columnDefs.splice( 1, 0, { + key: 'lineage', + label: window.admin.i18n.get('Asset','rank'), + sortable: true, + formatter: bind( this, this.formatRank ) + } ); + + // Add button behaviors + this.btnUpdate = new YAHOO.widget.Button( "treeUpdate", { + type : "button", + label : window.admin.i18n.get('Asset','update'), + onclick : { fn: this.update, scope: this } + } ); + + this.btnDelete = new YAHOO.widget.Button( "treeDelete", { + type : "button", + label : window.admin.i18n.get('Asset','delete'), + onclick : { fn: this.delete, scope: this } + } ); + + this.btnCut = new YAHOO.widget.Button( "treeCut", { + type : "button", + label : window.admin.i18n.get('Asset','cut'), + onclick : { fn: this.cut, scope: this } + } ); + + this.btnCopy = new YAHOO.widget.Button( "treeCopy", { + type : "button", + label : window.admin.i18n.get('Asset','Copy'), + onclick : { fn: this.copy, scope: this } + } ); + + this.btnDuplicate = new YAHOO.widget.Button( "treeDuplicate", { + type : "button", + label : window.admin.i18n.get('Asset','duplicate'), + onclick : { fn: this.duplicate, scope: this } + } ); + + this.btnCreateShortcut = new YAHOO.widget.Button( "treeCreateShortcut", { + type : "button", + label : window.admin.i18n.get('Asset','create shortcut'), + onclick : { fn: this.shortcut, scope: this } + } ); + + this.init(); +}; +YAHOO.lang.extend( WebGUI.Admin.Tree, WebGUI.Admin.AssetTable ); + +/** + * runHelperForSelected( helperId ) + * Run the named asset helper for each selected asset + * Show the status of the task in a dialog box + */ +WebGUI.Admin.Tree.prototype.runHelperForSelected += function ( helperId, title ) { + var self = this; + var assetIds = this.getSelected(); + + // Open the dialog with two progress bars + var dialog = new YAHOO.widget.Panel( 'helperForkModalDialog', { + "width" : '350px', + fixedcenter : true, + constraintoviewport : true, + underlay : "shadow", + close : true, + visible : true, + draggable : false + } ); + dialog.setHeader( title ); + dialog.setBody( + '
    0 / ' + assetIds.length + '
    ' + + '
    ' + ); + dialog.render( document.body ); + this.treeDialog = dialog; + + var pbQueueBar = new YAHOO.widget.ProgressBar({ + minValue : 0, + value : 0, + maxValue : assetIds.length, + width: '300px', + height: '30px', + anim: true + }); + pbQueueBar.render( 'pbQueue' ); + pbQueueBar.get('anim').duration = 0.5; + pbQueueBar.get('anim').method = YAHOO.util.Easing.easeOut; + var pbQueueStatus = document.getElementById( 'pbQueueStatus' ); + + var pbTaskBar = new YAHOO.widget.ProgressBar({ + minValue : 0, + value : 0, + maxValue : 1, + width: '300px', + height: '30px', + anim: true + }); + pbTaskBar.render( 'pbTask' ); + pbTaskBar.get('anim').duration = 0.5; + pbTaskBar.get('anim').method = YAHOO.util.Easing.easeOut; + + // Clean up when we're done + var finish = function () { + dialog.destroy(); + dialog = null; + self.admin.requestUpdateClipboard(); + self.admin.requestUpdateCurrentVersionTag(); + self.goto( self.admin.currentAssetDef.url ); + }; + + // Build a function to call the helper for the next asset + var callHelper = function( assetIds ) { + var assetId = assetIds.shift(); + + var callback = { + success : function (o) { + var resp = YAHOO.lang.JSON.parse( o.responseText ); + + if ( resp.error ) { + this.admin.processPlugin( resp ); + finish(); + } + else if ( resp.forkId ) { + // Wait until the helper is done, then call the next + YAHOO.WebGUI.Fork.poll({ + url : '?op=fork;pid=' + resp.forkId, + draw : function(data) { + pbTaskBar.set( 'maxValue', data.total ); + pbTaskBar.set( 'value', data.finished ); + }, + finish : function(){ + pbQueueBar.set( 'value', pbQueueBar.get('value') + 1 ); + pbQueueStatus.innerHTML = pbQueueBar.get('value') + ' / ' + pbQueueBar.get('maxValue'); + if ( assetIds.length > 0 ) { + callHelper( assetIds ); + } + else { + // We're all done now! + finish(); + } + }, + }); + } + else { + // Just go to the next one + if ( assetIds.length > 0 ) { + callHelper( assetIds ); + } + else { + finish(); + } + } + }, + failure : function (o) { + + }, + scope: this + }; + + var url = '?op=admin;method=processAssetHelper;helperId=' + helperId + ';assetId=' + assetId; + var ajax = YAHOO.util.Connect.asyncRequest( 'GET', url, callback ); + }; + + // Start the queue + callHelper( assetIds ); +}; + +/** + * cut( e ) + * Run the cut assethelper for the selected assets + */ +WebGUI.Admin.Tree.prototype.cut += function ( e ) { + this.runHelperForSelected( "cut", "Cut" ); +}; + +/** + * copy( e ) + * Run the Copy assethelper for the selected assets + */ +WebGUI.Admin.Tree.prototype.copy += function ( e ) { + this.runHelperForSelected( "copy", "Copy" ); +}; + +/** + * shortcut( e ) + * Run the shortcut assethelper for the selected assets + */ +WebGUI.Admin.Tree.prototype.shortcut += function ( e ) { + this.runHelperForSelected( "shortcut", "Create Shortcut" ); +}; + +/** + * Run the duplicate assethelper for the selected assets + */ +WebGUI.Admin.Tree.prototype.duplicate += function ( e ) { + this.runHelperForSelected( "duplicate", "Duplicate" ); +}; + +/** + * Run the delete assetHelper for the selected assets + */ +WebGUI.Admin.Tree.prototype.delete += function ( e ) { + this.runHelperForSelected( "delete", "Delete" ); +}; + +/** + * Update the selected assets' ranks + */ +WebGUI.Admin.Tree.prototype.update += function ( e ) { + var self = this; + var assetIds = this.getSelected(); + + // Open the dialog with two progress bars + var dialog = new YAHOO.widget.Panel( 'adminModalDialog', { + "width" : '350px', + fixedcenter : true, + constraintoviewport : true, + underlay : "shadow", + close : true, + visible : true, + draggable : false + } ); + dialog.setHeader( "Updating" ); + dialog.setBody( + '
    0 / ' + assetIds.length + '
    ' + + '
    ' + ); + dialog.render( document.body ); + this.treeDialog = dialog; + + var pbQueueBar = new YAHOO.widget.ProgressBar({ + minValue : 0, + value : 0, + maxValue : assetIds.length, + width: '300px', + height: '30px', + anim: true + }); + pbQueueBar.render( 'pbQueue' ); + pbQueueBar.get('anim').duration = 0.5; + pbQueueBar.get('anim').method = YAHOO.util.Easing.easeOut; + var pbQueueStatus = document.getElementById( 'pbQueueStatus' ); + + var pbTaskBar = new YAHOO.widget.ProgressBar({ + minValue : 0, + value : 0, + maxValue : 1, + width: '300px', + height: '30px', + anim: true + }); + pbTaskBar.render( 'pbTask' ); + pbTaskBar.get('anim').duration = 0.5; + pbTaskBar.get('anim').method = YAHOO.util.Easing.easeOut; + + // Clean up when we're done + var finish = function () { + dialog.destroy(); + dialog = null; + self.admin.requestUpdateClipboard(); + self.admin.requestUpdateCurrentVersionTag(); + self.goto( self.admin.currentAssetDef.url ); + }; + + + // Build a function to call the helper for the next asset + var callUpdate = function( assetIds ) { + var assetId = assetIds.shift(); + + var callback = { + success : function (o) { + var resp = YAHOO.lang.JSON.parse( o.responseText ); + + if ( resp.error ) { + this.admin.processPlugin( resp ); + finish(); + } + else if ( resp.forkId ) { + // Wait until the helper is done, then call the next + YAHOO.WebGUI.Fork.poll({ + url : '?op=fork;pid=' + resp.forkId, + draw : function(data) { + pbTaskBar.set( 'maxValue', data.total ); + pbTaskBar.set( 'value', data.finished ); + }, + finish : function(){ + pbQueueBar.set( 'value', pbQueueBar.get('value') + 1 ); + pbQueueStatus.innerHTML = pbQueueBar.get('value') + ' / ' + pbQueueBar.get('maxValue'); + if ( assetIds.length > 0 ) { + callHelper( assetIds ); + } + else { + // We're all done now! + finish(); + } + }, + }); + } + else if ( assetIds.length > 0 ) { + callUpdate( assetIds ); + } + else { + finish(); + } + }, + failure : function (o) { + }, + scope : this + }; + + var payload = YAHOO.lang.JSON.stringify({ + "rank" : document.getElementById( assetId + "_rank" ).value + }); + + YAHOO.util.Connect.asyncRequest( "POST", "?op=admin;method=updateAsset;assetId=" + assetId, callback, payload ); + }; + + callUpdate( assetIds ); +}; + +/** + * buildQueryString ( ) + * Build a query string + */ +WebGUI.Admin.Tree.prototype.buildQueryString += function ( state, dt, newUrl ) { + var assetUrl; + if ( !newUrl ) { + assetUrl = window.admin.currentAssetDef.url; + } + else { + assetUrl = newUrl; + } + + var query = WebGUI.Admin.Tree.superclass.buildQueryString.call( this, state, dt ); + + return query + ';assetUrl=' + assetUrl; +}; + +/** + * Update the tree with a new asset + * Do not call this directly, use Admin.gotoAsset(url) + */ +WebGUI.Admin.Tree.prototype.goto += function ( assetUrl ) { + // TODO: Show loading screen + var callback = { + success : this.onDataReturnInitializeTable, + failure : this.onDataReturnInitializeTable, + scope : this, + argument: this.dataTable.getState() + }; + + this.dataSource.sendRequest( + this.buildQueryString( + this.dataTable.getState(), + this.dataTable, + assetUrl + ), + callback + ); +}; + +/** + * onDataReturnInitializeTable ( sRequest, oResponse, oPayload ) + * Initialize the table with a new response from the server + */ +WebGUI.Admin.Tree.prototype.onDataReturnInitializeTable += function ( sRequest, oResponse, oPayload ) { + WebGUI.Admin.Tree.superclass.onDataReturnInitializeTable.call( this, sRequest, oResponse, oPayload ); + + // Rebuild the crumbtrail + var crumb = oResponse.meta.crumbtrail; + var elCrumb = document.getElementById( "treeCrumbtrail" ); + elCrumb.innerHTML = ''; + for ( var i = 0; i < crumb.length; i++ ) { + var item = crumb[i]; + var elItem = document.createElement( "span" ); + elItem.className = "clickable"; + YAHOO.util.Event.addListener( elItem, "click", window.admin.makeGotoAsset(item.url) ); + elItem.appendChild( document.createTextNode( item.title ) ); + + elCrumb.appendChild( elItem ); + elCrumb.appendChild( document.createTextNode( " > " ) ); + } + + // Final crumb item has a menu + var currentAssetId = oResponse.meta.currentAsset.assetId; + var currentHelpers = oResponse.meta.currentAsset.helpers; + var elItem = document.createElement( "span" ); + elItem.className = "clickable"; + var self = this; + var crumbMenu = function () { + self.admin.showHelperMenu( elItem, currentAssetId, currentHelpers ); + }; + YAHOO.util.Event.addListener( elItem, "click", crumbMenu, this, true ); + elItem.appendChild( document.createTextNode( oResponse.meta.currentAsset.title ) ); + elCrumb.appendChild( elItem ); + + // TODO: Update current asset + window.admin.navigate( currentAssetId ); + + // TODO Hide loading screen +}; +/** + * showMoreMenu ( url, linkTextId ) + * Build a More menu for the last element of the Crumb trail + */ +WebGUI.Admin.Tree.prototype.showMoreMenu += function ( url, linkTextId, isNotLocked ) { + return; // TODO + var menu; + if ( typeof this.crumbMoreMenu == "undefined" ) { + var more = document.getElementById(linkTextId); + var options = this.buildMoreMenu(url, more, isNotLocked); + menu = new YAHOO.widget.Menu( "crumbMoreMenu", options ); + menu.render( document.getElementById( 'assetManager' ) ); + this.crumbMoreMenu = menu; + } + else { + menu = this.crumbMoreMenu; + } + menu.show(); + menu.focus(); +}; + +/**************************************************************************** + * WebGUI.Admin.AdminBar( id, cfg ) + * Initialize an adminBar with the given ID. + * + * Configuration: + * expandMax: If true, will always expand pane to maximum space + * + * Custom Events: + * afterShow: Fired after a new pane is shown. + * args: id - The ID of the new pane shown + */ +WebGUI.Admin.AdminBar += function ( id, cfg ) { + this.id = id; + this.cfg = cfg || {}; + this.animDuration = 0.25; + this.dl = document.getElementById( id ); + this.dt = []; + this.dd = []; + + // Get all the DT and DD + // -- Using childNodes so we can nest another accordion inside + for ( var i = 0; i < this.dl.childNodes.length; i++ ) { + var node = this.dl.childNodes[i]; + if ( node.nodeName == "DT" ) { + this.dt.push( node ); + } + else if ( node.nodeName == "DD" ) { + this.dd.push( node ); + } + } + + // Add click handlers to DT to open corresponding DD + this.dtById = {}; + this.ddById = {}; + for ( var i = 0; i < this.dt.length; i++ ) { + var dt = this.dt[i]; + var dd = this.dd[i]; + + // Make sure dd is hidden + dd.style.display = "none"; + + // Save references by ID + this.dtById[ dt.id ] = dt; + this.ddById[ dt.id ] = dd; + + this.addClickHandler( dt, dd ); + } + + // Add custom event when showing an AdminBar pane + this.afterShow = new YAHOO.util.CustomEvent("afterShow", this); +}; + +/** + * addClickHandler( dt, dd ) + * Add the correct click handler on the dt to show the dd. + */ +WebGUI.Admin.AdminBar.prototype.addClickHandler += function ( dt, dd ) { + var self = this; + YAHOO.util.Event.on( dt, "click", function(){ self.show.call( self, dt.id ) } ); +}; + +/** + * getAnim( elem ) + * Get an Animation object for the given element to use for the transition. + */ +WebGUI.Admin.AdminBar.prototype.getAnim += function ( elem ) { + var anim = new YAHOO.util.Anim( elem ); + anim.duration = this.animDuration; + anim.method = YAHOO.util.Easing.easeOut; + return anim; +}; + +/** + * getExpandHeight( elem ) + * Get the height to expand the element to. + */ +WebGUI.Admin.AdminBar.prototype.getExpandHeight += function ( elem ) { + var maxHeight = this.getMaxHeight(); + if ( this.cfg.expandMax ) { + return maxHeight; + } + + var height = WebGUI.Admin.getRealHeight( elem ); + + // Make sure not more than maxHeight + if ( height > maxHeight ) { + return maxHeight; + } + return height; +}; + +/** + * getMaxHeight( ) + * Get the maximum possible height for the DD + */ +WebGUI.Admin.AdminBar.prototype.getMaxHeight += function () { + var dtHeight = WebGUI.Admin.getRealHeight( this.dt[0] ) * this.dt.length; + return WebGUI.Admin.getRealHeight( this.dl.parentNode ) - dtHeight; +}; + +/** + * show( id ) + * Show the pane with the given ID. The ID is from the DT element. + */ +WebGUI.Admin.AdminBar.prototype.show += function ( id ) { + if ( this.currentId ) { + // Close the current + var old = this.ddById[ this.currentId ]; + old.style.overflowY = "hidden"; + YAHOO.util.Dom.removeClass( this.currentId, "selected" ); + var oldHeight = this.getExpandHeight( old ); + if ( !old.anim ) { + old.anim = this.getAnim(this.current); + } + var hideContent = function() { + // Hide old and restore height for next open + old.style.display = "none"; + old.style.height = oldHeight + 'px'; + old.anim.onComplete.unsubscribe( hideContent ); + }; + old.anim.onComplete.subscribe( hideContent, this, true ); + // Subtract a few px initially to avoid a scrollbar appearing in the + // parent due to race conditions with the opening bar + old.anim.attributes.height = { from: oldHeight - 5, to : 0 }; + old.anim.animate(); + + // Let user close by clicking again + if ( this.currentId == id ) { + this.currentId = null; + return; + } + } + + var dd = this.ddById[ id ]; + YAHOO.util.Dom.addClass( id, "selected" ); + + if ( !dd.anim ) { + dd.anim = this.getAnim(dd); + } + dd.anim.attributes.height = { from: 0, to : this.getExpandHeight( dd ) }; + dd.style.height = "0px"; + dd.style.display = "block"; + dd.style.overflow = "hidden"; + var showScrollbars = function () { + dd.style.overflowY = "auto"; + dd.anim.onComplete.unsubscribe( showScrollbars ); + } + dd.anim.onComplete.subscribe( showScrollbars, this, true ); + dd.anim.animate(); + this.currentId = id; + + this.afterShow.fire( id ); + + // TODO: If we're nested inside another accordion-menu, fix + // the parent's height as we fix our own to avoid having to set + // explicit height on parent +}; + + +/********************************************************************** + * WebGUI.Admin.Search( admin, cfg ) + * + * Search for assets + */ +WebGUI.Admin.Search += function (admin, cfg) { + this.admin = admin; + this.cfg = cfg; + + // Prepare the tab + var newForm = document.getElementById( 'searchForm' ).cloneNode( true ); + this.formContainer = newForm; + newForm.id = null; // Duplicate IDs are baaaad + newForm.style.display = "block"; + + var newTab = new YAHOO.widget.Tab({ + label : window.admin.i18n.get('WebGUI','364'), + content : '' + }); + this.tab = newTab; + newTab.get('contentEl').appendChild( newForm ); + + // Fire when ready, Gridley + this.admin.tabBar.addTab( newTab ); + this.admin.tabBar.selectTab( this.admin.tabBar.get('tabs').length - 1 ); + + var searchForm = newForm.getElementsByTagName('form')[0]; + this.form = searchForm; + this.form.className = "searchForm"; + var searchButton = searchForm.elements['searchButton']; + this.searchSubmitButton = new YAHOO.widget.Button( searchButton, { + onclick : { fn: this.requestSearch, scope: this } + } ); + this.searchSubmitButton.addClass( searchButton.className ); + + var searchFilterSelect = searchForm.elements['searchFilterSelect']; + this.searchFilterSelect = searchFilterSelect; + var searchFilterAdd = searchForm.elements['searchFilterAdd']; + this.searchFilterAdd = searchFilterAdd; + this.searchFilterButton + = new YAHOO.widget.Button( searchFilterAdd, { + type : "menu", + menu : searchFilterSelect + } ); + this.searchFilterButton.getMenu().subscribe( "click", this.addFilter, this, true ); + + var searchKeywords = searchForm.elements['searchKeywords']; + this.searchKeywords = searchKeywords; + YAHOO.util.Event.on( searchKeywords, 'keyup', this.updateLocationBarQuery, this, true ); + YAHOO.util.Event.on( searchKeywords, 'focus', this.focusKeywords, this, true ); + YAHOO.util.Event.on( searchKeywords, 'blur', this.blurKeywords, this, true ); + + var searchFiltersContainer = searchForm.getElementsByTagName('ul')[0]; + this.searchFiltersContainer = searchFiltersContainer; + + this.filters = []; + + // Create a container for the datatable + this.dataTableContainer = document.createElement('div'); + this.dataTableContainer.style.display = "none"; + this.dataTableContainer.className = "searchResults"; + this.dataTableContainer.id = YAHOO.util.Dom.generateId(); + this.formContainer.appendChild( this.dataTableContainer ); + + // Create a container for the paginator + // TODO + WebGUI.Admin.Search.superclass.constructor.call( this, admin, { + dataSourceUrl : '?op=admin;method=searchAssets;', + dataTableId : this.dataTableContainer.id, + paginatorIds : [ YAHOO.util.Dom.generateId() ] + } ); + + this.init(); +}; +YAHOO.lang.extend( WebGUI.Admin.Search, WebGUI.Admin.AssetTable ); + +/** + * addFilter ( eventType, args ) + * Add the selected filter into the filter list + */ +WebGUI.Admin.Search.prototype.addFilter += function ( eventType, args ) { + var self = this; + var ev = args[0]; + var menuitem = args[1]; + var keys = {}; // Listen for all keys + + // Keep track of our filters + var filter = { }; + this.filters.push( filter ); + + var li = document.createElement( 'li' ); + filter.li = li; + + var type = menuitem.value; + filter.type = type; + li.mlassName = "filter_" + filter.type; + + var ul = this.searchFiltersContainer; + ul.appendChild( li ); + + var delIcon = document.createElement('img'); + delIcon.className = "clickable"; + YAHOO.util.Event.on( delIcon, "click", function(){ + self.removeFilter( filter.li ); + } ); + + var name = menuitem.cfg.getProperty('text'); + var nameElem = document.createElement('span'); + nameElem.className = "name"; + nameElem.appendChild( document.createTextNode( name ) ); + li.appendChild( nameElem ); + + // Function to create an autocomplete field + var createAutocomplete = function ( li, filter ) { + var container = document.createElement( 'div' ); + container.className = "autocomplete"; + li.appendChild( container ); + + var inputElem = document.createElement('input'); + filter.inputElem = inputElem; + filter.getValue = function () { return inputElem.value; }; + inputElem.type = "text"; + container.appendChild( inputElem ); + + // Auto-complete container + var acDiv = document.createElement('div'); + filter.acDiv = acDiv; + container.appendChild( acDiv ); + + filter.autocomplete = new YAHOO.widget.AutoComplete( inputElem, acDiv, filter.dataSource ); + filter.autocomplete.queryQuestionMark = false; + filter.autocomplete.animVert = true; + filter.autocomplete.animSpeed = 0.1; + filter.autocomplete.minQueryLength = 1; + filter.autocomplete.queryDelay = 0.2; + filter.autocomplete.typeAhead = true; + filter.autocomplete.resultTypeList = false; + filter.autocomplete.applyLocalFilter = true; + }; + + if ( filter.type == "title" ) { + var inputElem = document.createElement('input'); + filter.inputElem = inputElem; + filter.getValue = function () { return inputElem.value; }; + inputElem.type = "text"; + li.appendChild( inputElem ); + YAHOO.util.Event.on( inputElem, 'keyup', this.updateLocationBarQuery, this, true ); + inputElem.focus(); + } + else if ( filter.type == "ownerUserId" ) { + filter.dataSource = new YAHOO.util.XHRDataSource( '?op=admin;method=findUser;' ); + filter.dataSource.responseType = YAHOO.util.XHRDataSource.TYPE_JSON; + filter.dataSource.responseSchema = { + resultsList : "results", + fields : [ 'username', 'name', 'userId', 'avatar', 'email' ] + }; + + createAutocomplete( li, filter ); + + filter.autocomplete.formatResult = function ( result, query, match ) { + var subtext = ( result.name ? result.name : "" ) + + ( result.email ? " <" + result.email + ">" : "" ) + ; + return '
    ' + + '
    ' + result.username + "
    " + + '
    ' + subtext + '
    '; + + }; + + filter.inputElem.focus(); + } + else if ( filter.type == 'lineage' ) { + // lineage has autocomplete box and pop-up dialog button + filter.dataSource = new YAHOO.util.XHRDataSource( '?op=admin;method=findAsset;' ); + filter.dataSource.responseType = YAHOO.util.XHRDataSource.TYPE_JSON; + filter.dataSource.responseSchema = { + resultsList : "results", + fields : [ 'type', 'title', 'icon' ] + }; + + createAutocomplete( li, filter ); + + filter.autocomplete.formatResult = function ( result, query, match ) { + return '
    ' + + '
    ' + result.name + "
    " + + '
    ' + result.type + '
    '; + + }; + + filter.inputElem.focus(); + } + else if ( filter.type == 'className' ) { + // Create a menu from the asset types + var container = document.createElement('div'); + filter.menu = new YAHOO.widget.Menu( container, { } ); + var onMenuItemClick = function (type, args, item) { + var text = item.cfg.getProperty("text"); + filter.button.set("label", text); + // Get the right span to add the background to + var button = filter.button.getElementsByClassName( "first-child" )[0]; + YAHOO.util.Dom.addClass( button, "with_icon" ); + button.style.backgroundImage = item.element.style.backgroundImage; + }; + + var items = []; + for ( className in this.admin.cfg['assetTypes'] ) { + var assetDef = this.admin.cfg.assetTypes[className]; + var menuItem = new YAHOO.widget.MenuItem( assetDef.title, { + onclick : { fn: onMenuItemClick } + } ); + menuItem.value = className; + + YAHOO.util.Dom.addClass( menuItem.element, 'with_icon' ); + menuItem.element.style.backgroundImage = 'url(' + assetDef.icon + ')'; + items.push( menuItem ); + } + + // Sort the items first + items = items.sort( function(a,b) { + var aText = a.cfg.getProperty('text'); + var bText = b.cfg.getProperty('text'); + if ( aText > bText ) { return 1; } + else if ( aText < bText ) { return -1; } + else { return 0; } + } ); + + filter.menu.addItems( items ); + filter.menu.render(document.body); + + filter.button = new YAHOO.widget.Button( { + name : "className", + type : "menu", + label : window.admin.i18n.get('WebGUI','Choose...'), + container : li, + menu : filter.menu + } ); + + filter.getValue = function () { return filter.button.value; }; + } +}; + +/** + * buildQueryString( state, dt, searchUrl ) + * Build the query URL based on the passed-in data + */ +WebGUI.Admin.Search.prototype.buildQueryString += function ( state, dt, searchUrl ) { + if ( searchUrl ) { + this.lastSearchUrl = searchUrl; + } + + var query = WebGUI.Admin.Search.superclass.buildQueryString.call( this, state, dt ); + return query + ';' + this.lastSearchUrl; +}; + +/** + * requestSearch( ) + * Perform the search + */ +WebGUI.Admin.Search.prototype.requestSearch += function ( ) { + // Build the new search URL + var query = 'query=' + encodeURIComponent( this.searchKeywords.value ); + for ( var i = 0; i < this.filters.length; i++ ) { + query += ' ' + encodeURIComponent( filter.type + ':' + filter.getValue() ); + } + + var callback = { + success : this.onDataReturnInitializeTable, + failure : this.onDataReturnInitializeTable, + scope : this, + argument: this.dataTable.getState() + }; + + this.dataSource.sendRequest( + this.buildQueryString( + this.dataTable.getState(), + this.dataTable, + query + ), + callback + ); +}; + +/** + * onDataReturnInitializeTable ( sRequest, oResponse, oPayload ) + * Initialize the table with a new response from the server + */ +WebGUI.Admin.Search.prototype.onDataReturnInitializeTable += function ( sRequest, oResponse, oPayload ) { + this.dataTableContainer.style.display = "block"; + WebGUI.Admin.Tree.superclass.onDataReturnInitializeTable.call( this, sRequest, oResponse, oPayload ); +}; + + diff --git a/www/extras/admin/layout.js b/www/extras/admin/layout.js new file mode 100644 index 000000000..e1b0b106c --- /dev/null +++ b/www/extras/admin/layout.js @@ -0,0 +1,365 @@ + + +/** + * WebGUI.Layout -- Handle drag/drop of assets inside of layouts + */ + +bind = function ( scope, func ) { + return function() { func.apply( scope, arguments ) } +}; + +if ( typeof WebGUI == "undefined" ) { + WebGUI = {}; +} +/** + * Initialize the layout positions and drag/drop inside the given element + * cfg is an object of configuration: + * url = the URL to save the layout to + * + */ +WebGUI.Layout = function (elem, cfg) { + this.elem = elem; + this.cfg = cfg; + + // Some special vars + this.scrollJump = 50; + this.blankCount = 0; + + // Init layout positions + var positions = this.getPositions(); + for ( var i = 0; i < positions.length; i++ ) { + var pos = positions[i]; + var children = this.getPositionElements( pos ); + if ( children.length == 0 ) { + // No child nodes, create an empty target + this.addBlankTarget(pos); + } + else { + // Check the child nodes for the right IDs to initialize dragdrop + for ( var x = 0; x < children.length; x++ ) { + var elem = children[x]; + if ( elem.id.match(/wg-content-asset-(.{22})/) ) { + new WebGUI.LayoutItem( elem, null, null, this ); + } + } + } + } +}; + +/** + * Get all the position wrapper elements + */ +WebGUI.Layout.prototype.getPositions += function () { + return YAHOO.util.Dom.getElementsByClassName( 'wg-content-position', '*', this.elem ); +}; + +/** + * Get all the elements inside of a given position + */ +WebGUI.Layout.prototype.getPositionElements += function ( pos ) { + var elems = []; + for ( var i = 0; i < pos.childNodes.length; i++ ) { + var child = pos.childNodes[i]; + if ( child.nodeType == 1 ) { // Only elements + elems.push(child); + } + } + return elems; +}; + +/** + * Adjust the scrollbars to keep the content visible + */ +WebGUI.Layout.prototype.adjustScroll += function (e) { + scrY=0; + scrX=0; + + // Y scroll + if (e.clientY > document.body.clientHeight-this.scrollJump) { + if (e.clientY + document.body.scrollTop < pageHeight - (this.scrollJump + 60)) { + scrY=this.scrollJump; + window.scroll(document.body.scrollLeft,document.body.scrollTop + scrY); + y-=scrY; + } + }else if (e.clientY < this.scrollJump) { + if (document.body.scrollTop < this.scrollJump) { + scrY = document.body.scrollTop; + }else { + scrY=this.scrollJump; + } + window.scroll(document.body.scrollLeft,document.body.scrollTop - scrY); + y+=scrY; + } + + // X scroll + if (e.clientX > document.body.clientWidth-this.scrollJump) { + if (e.clientX + document.body.scrollLeft < pageWidth - (this.scrollJump + 60)) { + scrX=this.scrollJump; + window.scroll(document.body.scrollLeft + scrX,document.body.scrollTop); + x-=scrX; + } + }else if (e.clientX < this.scrollJump) { + if (document.body.scrollLeft < this.scrollJump) { + scrX = document.body.scrollLeft; + }else { + scrX=this.scrollJump; + } + window.scroll(document.body.scrollLeft - scrX,document.body.scrollTop); + x+=scrX; + } +}; + +/** + * Add a blank drag target to an area. Used to provide a position with no children a + * a place to make babies + */ +WebGUI.Layout.prototype.addBlankTarget += function ( el ) { + var blank = document.createElement("div"); + blank.className="blank"; + blank.id = "blank" + new Date().getTime() + this.blankCount++; + el.appendChild(blank); + blank.style.top = 0+"px"; + blank.style.left = 0+"px"; + + // Add child for target + var empty = document.createElement("div"); + blank.appendChild( empty ); + empty.className = "empty"; + + return new YAHOO.util.DDTarget(blank); +}; + +/** + * Move the content + */ +WebGUI.Layout.prototype.move += function (from,to,position) { + if (from!=to && from && to) { + var fromParent = from.parentNode; + fromParent.removeChild(from); + + // If we've removed the last one, add a blank element + if ( this.getPositionElements(fromParent).length == 0) { + this.addBlankTarget(fromParent); + } + + var toParent = to.parentNode; + var toChildren = this.getPositionElements(toParent); + + if ( this.isBlank( toChildren[0] ) ) { + toParent.removeChild(toChildren[0]); + toParent.appendChild(from); + } + else if (position == "top") { + toParent.insertBefore( from, to ); + } + else { + children = this.getPositionElements(toParent); + i=0; + while (children[i] != to && i < children.length) { + i++; + } + + if (i == children.length - 1) { + toParent.appendChild(from); + } + else { + toParent.insertBefore(from,children[i+1]); + } + } + } +}; + +/** + * Check if a layout position is blank + */ +WebGUI.Layout.prototype.isBlank += function ( obj ) { + return obj.className.indexOf( "blank" ) != -1; +}; + +/** + * Save the new layout to the server, using the configured URL + */ +WebGUI.Layout.prototype.save += function () { + // Create the content map + contentMap = ""; + var positions = this.getPositions(); + for ( var i = 0; i < positions.length; i ++ ) { + var pos = positions[i]; + + // Seperator character + if ((contentMap != "") || ( i == 1 )) { // if first position is blank, still add a . + contentMap+="."; + } + + var children = this.getPositionElements( pos ); + for ( var j = 0; j < children.length; j++) { + if (contentMap != "" && (contentMap.lastIndexOf(".") != contentMap.length-1)) { + contentMap+=","; + } + + if ( !this.isBlank( children[j] ) ) { + contentMap+=children[j].id.replace(/^wg-content-asset-/,""); + } + } + } + + // Send it off! + YAHOO.util.Connect.asyncRequest( 'POST', this.cfg.url, { + success : function () {}, + failure : function () {} + }, "map=" + contentMap ); +}; + +/**************************************************************************** + * WebGUI.LayoutItem -- a single item in a layout + */ +WebGUI.LayoutItem += function(elem, sGroup, config, layout) { + this.elem = elem; + this.layout = layout; + + WebGUI.LayoutItem.superclass.constructor.call(this, elem, sGroup, config); + // Add a dragger control + var dragger = document.createElement( 'div' ); + dragger.className = "draggable"; + var dragTrigger = document.createElement( 'div' ); + dragTrigger.className = "dragTrigger dragTriggerWrap"; + dragTrigger.id = elem.id + "_handle"; + var icon = document.createElement( 'img' ); + icon.src = getWebguiProperty( 'extrasURL' ) + 'icon/arrow_out.png'; + dragTrigger.appendChild( icon ); + dragger.appendChild( dragTrigger ); + elem.insertBefore( dragger, elem.firstChild ); + + this.setHandleElId( dragTrigger.id ); +}; +YAHOO.extend(WebGUI.LayoutItem, YAHOO.util.DDProxy); + +/** + * Function called when starting a drag + */ +WebGUI.LayoutItem.prototype.startDrag += function(x, y) { + // make the proxy look like the source element + var dragEl = this.getDragEl(); + var clickEl = this.getEl(); + YAHOO.util.Dom.setStyle(clickEl, "visibility", "hidden"); + + dragEl.innerHTML = clickEl.innerHTML; + dragEl.className = "dragging"; + + YAHOO.util.Dom.setStyle(dragEl, "color", YAHOO.util.Dom.getStyle(clickEl, "color")); + YAHOO.util.Dom.setStyle(dragEl, "backgroundColor", YAHOO.util.Dom.getStyle(clickEl, "backgroundColor")); + YAHOO.util.Dom.setStyle(dragEl, "border", "2px solid gray"); +}; + + +/** + * Function called when stopping a drag outside of a dropzone + */ +WebGUI.LayoutItem.prototype.onDragOut += function (e, id) { + var obj = YAHOO.util.Dom.get(id); + if ( this.layout.isBlank(obj) ) { + document.getElementById(id).className="blank"; + }else if (obj.className == 'draggedOverTop' || obj.className == 'draggedOverBottom') { + document.getElementById(id).className="dragable"; + } +}; + +/** + * Called when the drag is over, either success or fail + */ +WebGUI.LayoutItem.prototype.endDrag += function (e) { + var srcEl = this.getEl(); + var proxy = this.getDragEl(); + + // Show the proxy element and animate it to the src element's location + YAHOO.util.Dom.setStyle(proxy, "visibility", ""); + var a = new YAHOO.util.Motion( + proxy, { + points: { + to: YAHOO.util.Dom.getXY(srcEl) + } + }, + 0.2, + YAHOO.util.Easing.easeOut + ) + var proxyid = proxy.id; + var thisid = this.id; + + // Hide the proxy and show the source element when finished with the animation + a.onComplete.subscribe(function() { + YAHOO.util.Dom.setStyle(proxyid, "visibility", "hidden"); + YAHOO.util.Dom.setStyle(thisid, "visibility", ""); + }); + a.animate(); +}; + +/** + * Called when the item is dropped on a drag target. + * Update the item and update the content positions + */ +WebGUI.LayoutItem.prototype.onDragDrop += function (e, id) { + var position; + if (this.goingUp) { + position = "top"; + } + else{ + position = "bottom"; + } + var target = this.getEl(); + var destination = YAHOO.util.Dom.get(id); + if ( !this.layout.isBlank( destination ) ){ + destination.className = "dragable"; + destination = YAHOO.util.Dom.get(id); + } + this.layout.move(target, destination, position); + this.layout.save(); +}; + +/** + * Called periodically while we are dragging an element + */ +WebGUI.LayoutItem.prototype.onDrag += function (e) { + // Keep track of the direction of the drag for use during onDragOver + var y = YAHOO.util.Event.getPageY(e); + if (y < this.lastY) { + this.goingUp = true; + } else if (y > this.lastY) { + this.goingUp = false; + } + this.lastY = y; + this.layout.adjustScroll(e); +}, + +/** + * Called when a dragging item is over a drag target + */ +WebGUI.LayoutItem.prototype.onDragOver += function (e, id) { + var srcEl = this.getEl(); + if(srcEl.id == id){return;} + + var obj = YAHOO.util.Dom.get(id); + // We are only concerned with list items, we ignore the dragover + // notifications for the list. + if ( this.layout.isBlank( obj ) ) { + document.getElementById(id).className="blankOver"; + }else if (this.goingUp) { + document.getElementById(id).className="draggedOverTop"; + }else { + document.getElementById(id).className="draggedOverBottom"; + } +} + diff --git a/www/extras/admin/toolbar.js b/www/extras/admin/toolbar.js new file mode 100644 index 000000000..72421a7e6 --- /dev/null +++ b/www/extras/admin/toolbar.js @@ -0,0 +1,124 @@ + +/** + * WebGUI.Toolbar - the asset toolbars + */ + +bind = function ( scope, func ) { + return function() { func.apply( scope, arguments ) } +}; + +if ( typeof WebGUI == "undefined" ) { + WebGUI = {}; +} + +/** + * WebGUI.Toolbar( assetId, cfg ) + * Create a toolbar for the given asset ID. + * cfg is an option of configuration values: + * parent : The parent element, can be an ID or an element + * assetData : The data containing the asset's URL and helpers + */ +WebGUI.Toolbar = function( assetId, cfg ) { + this.assetId = assetId; + this.cfg = cfg; + this.container = document.createElement('span'); +}; + +/** + * WebGUI.Toolbar.createAll( ) + * Create all the toolbars from placeholders found in the current document + */ +WebGUI.Toolbar.createAll = function( ) { + var holders = YAHOO.util.Selector.query( '.wg-admin-toolbar' ); + for ( var i = 0; i < holders.length; i++ ) { + var holder = holders[i]; + var assetId = holder.id.match( /wg-admin-toolbar-(.+)/ )[1]; + var toolbar = new WebGUI.Toolbar( assetId, { "parent" : holder } ); + toolbar.getAssetData( assetId, bind( toolbar, toolbar.render ) ); + } +}; + +/** + * getAssetData( assetId, callback ) + * Get the data for an asset. + */ +WebGUI.Toolbar.prototype.getAssetData += function ( assetId, callback ) { + var connectCallback = { + success : function (o) { + var assetDef = YAHOO.lang.JSON.parse( o.responseText ); + this.cfg.assetData = assetDef; + callback.call( this ); + }, + failure : function (o) { + + }, + scope: this + }; + + var url = '?op=admin;method=getAssetData;assetId=' + assetId; + var ajax = YAHOO.util.Connect.asyncRequest( 'GET', url, connectCallback ); +}; + +/** + * render( [parent] ) + * Render the toolbar on the given parent. If parent is not specified, + * will use the parent from the configuration. If that is not specified, we + * got problems. + * + * This should be called only AFTER the asset data has been populated. Otherwise + * I cannot be held responsible for what happens to the universe. + */ +WebGUI.Toolbar.prototype.render += function ( parent ) { + parent = parent ? parent : this.cfg.parent; + if ( typeof parent == "string" ) { + parent = document.getElementById( parent ); + } + + var assetData = this.cfg.assetData; + + // Create the buttons in our container + // Menu button + YAHOO.util.Dom.addClass( document.body, 'yui-skin-sam' ); + + var menu = new YAHOO.widget.Menu( document.createElement('div'), { + clicktohide : true, + constraintoviewport : true, + effect: { effect: YAHOO.widget.ContainerEffect.FADE, duration:0.25 } + }); + var items = window.parent.admin.getHelperMenuItems( this.assetId, assetData.helpers ); + menu.addItems( items ); + menu.render( document.body ); + + var menuButton = new YAHOO.widget.Button({ + "container" : this.container, + "type" : "menu", + "label" : '', + "menu" : menu + }); + + // Edit button + var editButton = new YAHOO.widget.Button({ + type : "link", + "container" : this.container, + label : assetData.helpers["edit"].label, + href : assetData.helpers["edit"].url, + onclick : { + fn: window.parent.admin.getHelperHandler( this.assetId, "edit", assetData.helpers["edit"] ) + } + }); + + // Add the container to our parent + parent.appendChild( this.container ); +}; + +/** + * destroy() + * Destroy this toolbar + */ +WebGUI.Toolbar.prototype.destroy += function () { + this.container.parentNode.removeChild( this.container ); +}; + diff --git a/www/extras/css/wg-formbuilder.css b/www/extras/css/wg-formbuilder.css new file mode 100644 index 000000000..ec7ffd646 --- /dev/null +++ b/www/extras/css/wg-formbuilder.css @@ -0,0 +1,22 @@ +/** + * wg-formbuilder.css + * CSS rules for all forms built with WebGUI::FormBuilder + */ + +.wg-formbuilder label.formDescription +{ + display: block; + margin-top: 1em; + font-weight: bold; +} + +.wg-formbuilder .wg-message { + +} + +.wg-formbuilder .wg-error { + border : 1px solid red; + background-color : #FF6666; + padding : 10px; + margin : 10px; +} diff --git a/www/extras/draggable.css b/www/extras/draggable.css index 5d5bd846f..2e10e24a3 100644 --- a/www/extras/draggable.css +++ b/www/extras/draggable.css @@ -12,21 +12,26 @@ div.dragable:hover { } .dragTriggerWrap{ width: 100%; - height: 18px; + height: 25px; font-size: 10px; color: #888888; background-color: #cccccc; border: 1px solid #888888; - opacity: 0.5; text-align: right; } +.dragTriggerWrap img { + border: none; + margin-top: 4px; + margin-right: 4px; +} + .dragging{ position: relative; opacity:0.6; -moz-opacity:0.6; filter:progid:DXImageTransform.Microsoft.Alpha(opacity=60); cursor: pointer; - z-index: 2000; + z-index: 2000; } .draggedOverTop{ position: relative; @@ -57,4 +62,20 @@ div.dragable:hover { width: 50px; height: 100px; } +.dragging, .empty { + background-image: url(opaque.gif); +} + +/* Make the buttons appear inside the drag toolbar */ +.wg-content-position > *, .dragging { + position: relative; +} +.wg-content-position .wg-admin-toolbar, +.dragging .wg-admin-toolbar { + position: absolute; + left: auto; + top: 0px; + margin-top: 2px; + margin-left: 2px; +} diff --git a/www/extras/icon/accept.png b/www/extras/icon/accept.png new file mode 100755 index 000000000..89c8129a4 Binary files /dev/null and b/www/extras/icon/accept.png differ diff --git a/www/extras/icon/add.png b/www/extras/icon/add.png new file mode 100755 index 000000000..6332fefea Binary files /dev/null and b/www/extras/icon/add.png differ diff --git a/www/extras/icon/anchor.png b/www/extras/icon/anchor.png new file mode 100755 index 000000000..9b3422c61 Binary files /dev/null and b/www/extras/icon/anchor.png differ diff --git a/www/extras/icon/application.png b/www/extras/icon/application.png new file mode 100755 index 000000000..1dee9e366 Binary files /dev/null and b/www/extras/icon/application.png differ diff --git a/www/extras/icon/application_add.png b/www/extras/icon/application_add.png new file mode 100755 index 000000000..2e945076c Binary files /dev/null and b/www/extras/icon/application_add.png differ diff --git a/www/extras/icon/application_cascade.png b/www/extras/icon/application_cascade.png new file mode 100755 index 000000000..da5c622ea Binary files /dev/null and b/www/extras/icon/application_cascade.png differ diff --git a/www/extras/icon/application_delete.png b/www/extras/icon/application_delete.png new file mode 100755 index 000000000..0a335acf6 Binary files /dev/null and b/www/extras/icon/application_delete.png differ diff --git a/www/extras/icon/application_double.png b/www/extras/icon/application_double.png new file mode 100755 index 000000000..647592f2e Binary files /dev/null and b/www/extras/icon/application_double.png differ diff --git a/www/extras/icon/application_edit.png b/www/extras/icon/application_edit.png new file mode 100755 index 000000000..fb2efb877 Binary files /dev/null and b/www/extras/icon/application_edit.png differ diff --git a/www/extras/icon/application_error.png b/www/extras/icon/application_error.png new file mode 100755 index 000000000..b35fa5717 Binary files /dev/null and b/www/extras/icon/application_error.png differ diff --git a/www/extras/icon/application_form.png b/www/extras/icon/application_form.png new file mode 100755 index 000000000..807b862cf Binary files /dev/null and b/www/extras/icon/application_form.png differ diff --git a/www/extras/icon/application_form_add.png b/www/extras/icon/application_form_add.png new file mode 100755 index 000000000..28c2175e6 Binary files /dev/null and b/www/extras/icon/application_form_add.png differ diff --git a/www/extras/icon/application_form_delete.png b/www/extras/icon/application_form_delete.png new file mode 100755 index 000000000..cd305ec83 Binary files /dev/null and b/www/extras/icon/application_form_delete.png differ diff --git a/www/extras/icon/application_form_edit.png b/www/extras/icon/application_form_edit.png new file mode 100755 index 000000000..af486c940 Binary files /dev/null and b/www/extras/icon/application_form_edit.png differ diff --git a/www/extras/icon/application_form_magnify.png b/www/extras/icon/application_form_magnify.png new file mode 100755 index 000000000..7b7fbd17e Binary files /dev/null and b/www/extras/icon/application_form_magnify.png differ diff --git a/www/extras/icon/application_get.png b/www/extras/icon/application_get.png new file mode 100755 index 000000000..28e41ea2b Binary files /dev/null and b/www/extras/icon/application_get.png differ diff --git a/www/extras/icon/application_go.png b/www/extras/icon/application_go.png new file mode 100755 index 000000000..5cc2b0dd3 Binary files /dev/null and b/www/extras/icon/application_go.png differ diff --git a/www/extras/icon/application_home.png b/www/extras/icon/application_home.png new file mode 100755 index 000000000..b60d0c85a Binary files /dev/null and b/www/extras/icon/application_home.png differ diff --git a/www/extras/icon/application_key.png b/www/extras/icon/application_key.png new file mode 100755 index 000000000..998d65c69 Binary files /dev/null and b/www/extras/icon/application_key.png differ diff --git a/www/extras/icon/application_lightning.png b/www/extras/icon/application_lightning.png new file mode 100755 index 000000000..7e91545c7 Binary files /dev/null and b/www/extras/icon/application_lightning.png differ diff --git a/www/extras/icon/application_link.png b/www/extras/icon/application_link.png new file mode 100755 index 000000000..f8fbb3ed9 Binary files /dev/null and b/www/extras/icon/application_link.png differ diff --git a/www/extras/icon/application_osx.png b/www/extras/icon/application_osx.png new file mode 100755 index 000000000..9f022ece8 Binary files /dev/null and b/www/extras/icon/application_osx.png differ diff --git a/www/extras/icon/application_osx_terminal.png b/www/extras/icon/application_osx_terminal.png new file mode 100755 index 000000000..b3d8ce01e Binary files /dev/null and b/www/extras/icon/application_osx_terminal.png differ diff --git a/www/extras/icon/application_put.png b/www/extras/icon/application_put.png new file mode 100755 index 000000000..c30cf5989 Binary files /dev/null and b/www/extras/icon/application_put.png differ diff --git a/www/extras/icon/application_side_boxes.png b/www/extras/icon/application_side_boxes.png new file mode 100755 index 000000000..efbf3c4f8 Binary files /dev/null and b/www/extras/icon/application_side_boxes.png differ diff --git a/www/extras/icon/application_side_contract.png b/www/extras/icon/application_side_contract.png new file mode 100755 index 000000000..3585f94d6 Binary files /dev/null and b/www/extras/icon/application_side_contract.png differ diff --git a/www/extras/icon/application_side_expand.png b/www/extras/icon/application_side_expand.png new file mode 100755 index 000000000..030cf7c37 Binary files /dev/null and b/www/extras/icon/application_side_expand.png differ diff --git a/www/extras/icon/application_side_list.png b/www/extras/icon/application_side_list.png new file mode 100755 index 000000000..248eaf1ac Binary files /dev/null and b/www/extras/icon/application_side_list.png differ diff --git a/www/extras/icon/application_side_tree.png b/www/extras/icon/application_side_tree.png new file mode 100755 index 000000000..f04a52b3d Binary files /dev/null and b/www/extras/icon/application_side_tree.png differ diff --git a/www/extras/icon/application_split.png b/www/extras/icon/application_split.png new file mode 100755 index 000000000..a91c78a5c Binary files /dev/null and b/www/extras/icon/application_split.png differ diff --git a/www/extras/icon/application_tile_horizontal.png b/www/extras/icon/application_tile_horizontal.png new file mode 100755 index 000000000..8a1191c38 Binary files /dev/null and b/www/extras/icon/application_tile_horizontal.png differ diff --git a/www/extras/icon/application_tile_vertical.png b/www/extras/icon/application_tile_vertical.png new file mode 100755 index 000000000..1d40383d3 Binary files /dev/null and b/www/extras/icon/application_tile_vertical.png differ diff --git a/www/extras/icon/application_view_columns.png b/www/extras/icon/application_view_columns.png new file mode 100755 index 000000000..dc2e9d5f5 Binary files /dev/null and b/www/extras/icon/application_view_columns.png differ diff --git a/www/extras/icon/application_view_detail.png b/www/extras/icon/application_view_detail.png new file mode 100755 index 000000000..aba044bbc Binary files /dev/null and b/www/extras/icon/application_view_detail.png differ diff --git a/www/extras/icon/application_view_gallery.png b/www/extras/icon/application_view_gallery.png new file mode 100755 index 000000000..851950db7 Binary files /dev/null and b/www/extras/icon/application_view_gallery.png differ diff --git a/www/extras/icon/application_view_icons.png b/www/extras/icon/application_view_icons.png new file mode 100755 index 000000000..6a93cdaa7 Binary files /dev/null and b/www/extras/icon/application_view_icons.png differ diff --git a/www/extras/icon/application_view_list.png b/www/extras/icon/application_view_list.png new file mode 100755 index 000000000..acc30b853 Binary files /dev/null and b/www/extras/icon/application_view_list.png differ diff --git a/www/extras/icon/application_view_tile.png b/www/extras/icon/application_view_tile.png new file mode 100755 index 000000000..3bc0bd32f Binary files /dev/null and b/www/extras/icon/application_view_tile.png differ diff --git a/www/extras/icon/application_xp.png b/www/extras/icon/application_xp.png new file mode 100755 index 000000000..d22860a31 Binary files /dev/null and b/www/extras/icon/application_xp.png differ diff --git a/www/extras/icon/application_xp_terminal.png b/www/extras/icon/application_xp_terminal.png new file mode 100755 index 000000000..c28dd6381 Binary files /dev/null and b/www/extras/icon/application_xp_terminal.png differ diff --git a/www/extras/icon/arrow_branch.png b/www/extras/icon/arrow_branch.png new file mode 100755 index 000000000..7542db1d1 Binary files /dev/null and b/www/extras/icon/arrow_branch.png differ diff --git a/www/extras/icon/arrow_divide.png b/www/extras/icon/arrow_divide.png new file mode 100755 index 000000000..61a7b1d99 Binary files /dev/null and b/www/extras/icon/arrow_divide.png differ diff --git a/www/extras/icon/arrow_down.png b/www/extras/icon/arrow_down.png new file mode 100755 index 000000000..2c4e27937 Binary files /dev/null and b/www/extras/icon/arrow_down.png differ diff --git a/www/extras/icon/arrow_in.png b/www/extras/icon/arrow_in.png new file mode 100755 index 000000000..745c65134 Binary files /dev/null and b/www/extras/icon/arrow_in.png differ diff --git a/www/extras/icon/arrow_inout.png b/www/extras/icon/arrow_inout.png new file mode 100755 index 000000000..1b763672a Binary files /dev/null and b/www/extras/icon/arrow_inout.png differ diff --git a/www/extras/icon/arrow_join.png b/www/extras/icon/arrow_join.png new file mode 100755 index 000000000..a128413d8 Binary files /dev/null and b/www/extras/icon/arrow_join.png differ diff --git a/www/extras/icon/arrow_left.png b/www/extras/icon/arrow_left.png new file mode 100755 index 000000000..5dc696781 Binary files /dev/null and b/www/extras/icon/arrow_left.png differ diff --git a/www/extras/icon/arrow_merge.png b/www/extras/icon/arrow_merge.png new file mode 100755 index 000000000..7502dbb33 Binary files /dev/null and b/www/extras/icon/arrow_merge.png differ diff --git a/www/extras/icon/arrow_out.png b/www/extras/icon/arrow_out.png new file mode 100755 index 000000000..2e9bc42be Binary files /dev/null and b/www/extras/icon/arrow_out.png differ diff --git a/www/extras/icon/arrow_redo.png b/www/extras/icon/arrow_redo.png new file mode 100755 index 000000000..fdc394c7c Binary files /dev/null and b/www/extras/icon/arrow_redo.png differ diff --git a/www/extras/icon/arrow_refresh.png b/www/extras/icon/arrow_refresh.png new file mode 100755 index 000000000..0de26566d Binary files /dev/null and b/www/extras/icon/arrow_refresh.png differ diff --git a/www/extras/icon/arrow_refresh_small.png b/www/extras/icon/arrow_refresh_small.png new file mode 100755 index 000000000..d3087dfc9 Binary files /dev/null and b/www/extras/icon/arrow_refresh_small.png differ diff --git a/www/extras/icon/arrow_right.png b/www/extras/icon/arrow_right.png new file mode 100755 index 000000000..b1a181923 Binary files /dev/null and b/www/extras/icon/arrow_right.png differ diff --git a/www/extras/icon/arrow_rotate_anticlockwise.png b/www/extras/icon/arrow_rotate_anticlockwise.png new file mode 100755 index 000000000..46c75aa85 Binary files /dev/null and b/www/extras/icon/arrow_rotate_anticlockwise.png differ diff --git a/www/extras/icon/arrow_rotate_clockwise.png b/www/extras/icon/arrow_rotate_clockwise.png new file mode 100755 index 000000000..aa65210eb Binary files /dev/null and b/www/extras/icon/arrow_rotate_clockwise.png differ diff --git a/www/extras/icon/arrow_switch.png b/www/extras/icon/arrow_switch.png new file mode 100755 index 000000000..258c16c63 Binary files /dev/null and b/www/extras/icon/arrow_switch.png differ diff --git a/www/extras/icon/arrow_turn_left.png b/www/extras/icon/arrow_turn_left.png new file mode 100755 index 000000000..a3d6c9e39 Binary files /dev/null and b/www/extras/icon/arrow_turn_left.png differ diff --git a/www/extras/icon/arrow_turn_right.png b/www/extras/icon/arrow_turn_right.png new file mode 100755 index 000000000..629f20d62 Binary files /dev/null and b/www/extras/icon/arrow_turn_right.png differ diff --git a/www/extras/icon/arrow_undo.png b/www/extras/icon/arrow_undo.png new file mode 100755 index 000000000..6972c5e59 Binary files /dev/null and b/www/extras/icon/arrow_undo.png differ diff --git a/www/extras/icon/arrow_up.png b/www/extras/icon/arrow_up.png new file mode 100755 index 000000000..1ebb19324 Binary files /dev/null and b/www/extras/icon/arrow_up.png differ diff --git a/www/extras/icon/asterisk_orange.png b/www/extras/icon/asterisk_orange.png new file mode 100755 index 000000000..1ebebde54 Binary files /dev/null and b/www/extras/icon/asterisk_orange.png differ diff --git a/www/extras/icon/asterisk_yellow.png b/www/extras/icon/asterisk_yellow.png new file mode 100755 index 000000000..bab7cc9bc Binary files /dev/null and b/www/extras/icon/asterisk_yellow.png differ diff --git a/www/extras/icon/attach.png b/www/extras/icon/attach.png new file mode 100755 index 000000000..ea897cc9f Binary files /dev/null and b/www/extras/icon/attach.png differ diff --git a/www/extras/icon/award_star_add.png b/www/extras/icon/award_star_add.png new file mode 100755 index 000000000..9c4be9be2 Binary files /dev/null and b/www/extras/icon/award_star_add.png differ diff --git a/www/extras/icon/award_star_bronze_1.png b/www/extras/icon/award_star_bronze_1.png new file mode 100755 index 000000000..658c7117b Binary files /dev/null and b/www/extras/icon/award_star_bronze_1.png differ diff --git a/www/extras/icon/award_star_bronze_2.png b/www/extras/icon/award_star_bronze_2.png new file mode 100755 index 000000000..e47babd7b Binary files /dev/null and b/www/extras/icon/award_star_bronze_2.png differ diff --git a/www/extras/icon/award_star_bronze_3.png b/www/extras/icon/award_star_bronze_3.png new file mode 100755 index 000000000..396e4b3a2 Binary files /dev/null and b/www/extras/icon/award_star_bronze_3.png differ diff --git a/www/extras/icon/award_star_delete.png b/www/extras/icon/award_star_delete.png new file mode 100755 index 000000000..4721b152a Binary files /dev/null and b/www/extras/icon/award_star_delete.png differ diff --git a/www/extras/icon/award_star_gold_1.png b/www/extras/icon/award_star_gold_1.png new file mode 100755 index 000000000..97a22b72e Binary files /dev/null and b/www/extras/icon/award_star_gold_1.png differ diff --git a/www/extras/icon/award_star_gold_2.png b/www/extras/icon/award_star_gold_2.png new file mode 100755 index 000000000..0eaa57175 Binary files /dev/null and b/www/extras/icon/award_star_gold_2.png differ diff --git a/www/extras/icon/award_star_gold_3.png b/www/extras/icon/award_star_gold_3.png new file mode 100755 index 000000000..124c9914f Binary files /dev/null and b/www/extras/icon/award_star_gold_3.png differ diff --git a/www/extras/icon/award_star_silver_1.png b/www/extras/icon/award_star_silver_1.png new file mode 100755 index 000000000..028a54626 Binary files /dev/null and b/www/extras/icon/award_star_silver_1.png differ diff --git a/www/extras/icon/award_star_silver_2.png b/www/extras/icon/award_star_silver_2.png new file mode 100755 index 000000000..e487c3a19 Binary files /dev/null and b/www/extras/icon/award_star_silver_2.png differ diff --git a/www/extras/icon/award_star_silver_3.png b/www/extras/icon/award_star_silver_3.png new file mode 100755 index 000000000..1d72d4724 Binary files /dev/null and b/www/extras/icon/award_star_silver_3.png differ diff --git a/www/extras/icon/basket.png b/www/extras/icon/basket.png new file mode 100755 index 000000000..b0686d787 Binary files /dev/null and b/www/extras/icon/basket.png differ diff --git a/www/extras/icon/basket_add.png b/www/extras/icon/basket_add.png new file mode 100755 index 000000000..355436823 Binary files /dev/null and b/www/extras/icon/basket_add.png differ diff --git a/www/extras/icon/basket_delete.png b/www/extras/icon/basket_delete.png new file mode 100755 index 000000000..1349974f6 Binary files /dev/null and b/www/extras/icon/basket_delete.png differ diff --git a/www/extras/icon/basket_edit.png b/www/extras/icon/basket_edit.png new file mode 100755 index 000000000..8138bbdf0 Binary files /dev/null and b/www/extras/icon/basket_edit.png differ diff --git a/www/extras/icon/basket_error.png b/www/extras/icon/basket_error.png new file mode 100755 index 000000000..3978b2923 Binary files /dev/null and b/www/extras/icon/basket_error.png differ diff --git a/www/extras/icon/basket_go.png b/www/extras/icon/basket_go.png new file mode 100755 index 000000000..ed8b9a576 Binary files /dev/null and b/www/extras/icon/basket_go.png differ diff --git a/www/extras/icon/basket_put.png b/www/extras/icon/basket_put.png new file mode 100755 index 000000000..be62faaaa Binary files /dev/null and b/www/extras/icon/basket_put.png differ diff --git a/www/extras/icon/basket_remove.png b/www/extras/icon/basket_remove.png new file mode 100755 index 000000000..04dd7fd3b Binary files /dev/null and b/www/extras/icon/basket_remove.png differ diff --git a/www/extras/icon/bell.png b/www/extras/icon/bell.png new file mode 100755 index 000000000..6e0015df4 Binary files /dev/null and b/www/extras/icon/bell.png differ diff --git a/www/extras/icon/bell_add.png b/www/extras/icon/bell_add.png new file mode 100755 index 000000000..7db01d627 Binary files /dev/null and b/www/extras/icon/bell_add.png differ diff --git a/www/extras/icon/bell_delete.png b/www/extras/icon/bell_delete.png new file mode 100755 index 000000000..23907bbba Binary files /dev/null and b/www/extras/icon/bell_delete.png differ diff --git a/www/extras/icon/bell_error.png b/www/extras/icon/bell_error.png new file mode 100755 index 000000000..a0ddc0028 Binary files /dev/null and b/www/extras/icon/bell_error.png differ diff --git a/www/extras/icon/bell_go.png b/www/extras/icon/bell_go.png new file mode 100755 index 000000000..b89bb3434 Binary files /dev/null and b/www/extras/icon/bell_go.png differ diff --git a/www/extras/icon/bell_link.png b/www/extras/icon/bell_link.png new file mode 100755 index 000000000..b8c64af1e Binary files /dev/null and b/www/extras/icon/bell_link.png differ diff --git a/www/extras/icon/bin.png b/www/extras/icon/bin.png new file mode 100755 index 000000000..ebad933c8 Binary files /dev/null and b/www/extras/icon/bin.png differ diff --git a/www/extras/icon/bin_closed.png b/www/extras/icon/bin_closed.png new file mode 100755 index 000000000..afe22ba99 Binary files /dev/null and b/www/extras/icon/bin_closed.png differ diff --git a/www/extras/icon/bin_empty.png b/www/extras/icon/bin_empty.png new file mode 100755 index 000000000..375b8bf6a Binary files /dev/null and b/www/extras/icon/bin_empty.png differ diff --git a/www/extras/icon/bomb.png b/www/extras/icon/bomb.png new file mode 100755 index 000000000..1be37974a Binary files /dev/null and b/www/extras/icon/bomb.png differ diff --git a/www/extras/icon/book.png b/www/extras/icon/book.png new file mode 100755 index 000000000..b0f4dd792 Binary files /dev/null and b/www/extras/icon/book.png differ diff --git a/www/extras/icon/book_add.png b/www/extras/icon/book_add.png new file mode 100755 index 000000000..e2f084727 Binary files /dev/null and b/www/extras/icon/book_add.png differ diff --git a/www/extras/icon/book_addresses.png b/www/extras/icon/book_addresses.png new file mode 100755 index 000000000..b73419ba8 Binary files /dev/null and b/www/extras/icon/book_addresses.png differ diff --git a/www/extras/icon/book_delete.png b/www/extras/icon/book_delete.png new file mode 100755 index 000000000..d9a6340d7 Binary files /dev/null and b/www/extras/icon/book_delete.png differ diff --git a/www/extras/icon/book_edit.png b/www/extras/icon/book_edit.png new file mode 100755 index 000000000..6e756cc85 Binary files /dev/null and b/www/extras/icon/book_edit.png differ diff --git a/www/extras/icon/book_error.png b/www/extras/icon/book_error.png new file mode 100755 index 000000000..f3fbed0dc Binary files /dev/null and b/www/extras/icon/book_error.png differ diff --git a/www/extras/icon/book_go.png b/www/extras/icon/book_go.png new file mode 100755 index 000000000..cd4e1964c Binary files /dev/null and b/www/extras/icon/book_go.png differ diff --git a/www/extras/icon/book_key.png b/www/extras/icon/book_key.png new file mode 100755 index 000000000..d8e23ec93 Binary files /dev/null and b/www/extras/icon/book_key.png differ diff --git a/www/extras/icon/book_link.png b/www/extras/icon/book_link.png new file mode 100755 index 000000000..dd0820e86 Binary files /dev/null and b/www/extras/icon/book_link.png differ diff --git a/www/extras/icon/book_next.png b/www/extras/icon/book_next.png new file mode 100755 index 000000000..ff2ea1ab9 Binary files /dev/null and b/www/extras/icon/book_next.png differ diff --git a/www/extras/icon/book_open.png b/www/extras/icon/book_open.png new file mode 100755 index 000000000..7d863f949 Binary files /dev/null and b/www/extras/icon/book_open.png differ diff --git a/www/extras/icon/book_previous.png b/www/extras/icon/book_previous.png new file mode 100755 index 000000000..2e53c6980 Binary files /dev/null and b/www/extras/icon/book_previous.png differ diff --git a/www/extras/icon/box.png b/www/extras/icon/box.png new file mode 100755 index 000000000..8443c23eb Binary files /dev/null and b/www/extras/icon/box.png differ diff --git a/www/extras/icon/brick.png b/www/extras/icon/brick.png new file mode 100755 index 000000000..7851cf34c Binary files /dev/null and b/www/extras/icon/brick.png differ diff --git a/www/extras/icon/brick_add.png b/www/extras/icon/brick_add.png new file mode 100755 index 000000000..fac186bfb Binary files /dev/null and b/www/extras/icon/brick_add.png differ diff --git a/www/extras/icon/brick_delete.png b/www/extras/icon/brick_delete.png new file mode 100755 index 000000000..3a8c37348 Binary files /dev/null and b/www/extras/icon/brick_delete.png differ diff --git a/www/extras/icon/brick_edit.png b/www/extras/icon/brick_edit.png new file mode 100755 index 000000000..eb06df3bb Binary files /dev/null and b/www/extras/icon/brick_edit.png differ diff --git a/www/extras/icon/brick_error.png b/www/extras/icon/brick_error.png new file mode 100755 index 000000000..18ab01eb2 Binary files /dev/null and b/www/extras/icon/brick_error.png differ diff --git a/www/extras/icon/brick_go.png b/www/extras/icon/brick_go.png new file mode 100755 index 000000000..fe0d33567 Binary files /dev/null and b/www/extras/icon/brick_go.png differ diff --git a/www/extras/icon/brick_link.png b/www/extras/icon/brick_link.png new file mode 100755 index 000000000..9ebf013a2 Binary files /dev/null and b/www/extras/icon/brick_link.png differ diff --git a/www/extras/icon/bricks.png b/www/extras/icon/bricks.png new file mode 100755 index 000000000..0905f933b Binary files /dev/null and b/www/extras/icon/bricks.png differ diff --git a/www/extras/icon/briefcase.png b/www/extras/icon/briefcase.png new file mode 100755 index 000000000..05c564912 Binary files /dev/null and b/www/extras/icon/briefcase.png differ diff --git a/www/extras/icon/bug.png b/www/extras/icon/bug.png new file mode 100755 index 000000000..2d5fb90ec Binary files /dev/null and b/www/extras/icon/bug.png differ diff --git a/www/extras/icon/bug_add.png b/www/extras/icon/bug_add.png new file mode 100755 index 000000000..ced781747 Binary files /dev/null and b/www/extras/icon/bug_add.png differ diff --git a/www/extras/icon/bug_delete.png b/www/extras/icon/bug_delete.png new file mode 100755 index 000000000..e81d7571a Binary files /dev/null and b/www/extras/icon/bug_delete.png differ diff --git a/www/extras/icon/bug_edit.png b/www/extras/icon/bug_edit.png new file mode 100755 index 000000000..e5c7dc057 Binary files /dev/null and b/www/extras/icon/bug_edit.png differ diff --git a/www/extras/icon/bug_error.png b/www/extras/icon/bug_error.png new file mode 100755 index 000000000..c4e8c2809 Binary files /dev/null and b/www/extras/icon/bug_error.png differ diff --git a/www/extras/icon/bug_go.png b/www/extras/icon/bug_go.png new file mode 100755 index 000000000..4e4ae99db Binary files /dev/null and b/www/extras/icon/bug_go.png differ diff --git a/www/extras/icon/bug_link.png b/www/extras/icon/bug_link.png new file mode 100755 index 000000000..30e25abac Binary files /dev/null and b/www/extras/icon/bug_link.png differ diff --git a/www/extras/icon/building.png b/www/extras/icon/building.png new file mode 100755 index 000000000..11a017cfa Binary files /dev/null and b/www/extras/icon/building.png differ diff --git a/www/extras/icon/building_add.png b/www/extras/icon/building_add.png new file mode 100755 index 000000000..d88e2b9ab Binary files /dev/null and b/www/extras/icon/building_add.png differ diff --git a/www/extras/icon/building_delete.png b/www/extras/icon/building_delete.png new file mode 100755 index 000000000..db6455d2d Binary files /dev/null and b/www/extras/icon/building_delete.png differ diff --git a/www/extras/icon/building_edit.png b/www/extras/icon/building_edit.png new file mode 100755 index 000000000..646db36bf Binary files /dev/null and b/www/extras/icon/building_edit.png differ diff --git a/www/extras/icon/building_error.png b/www/extras/icon/building_error.png new file mode 100755 index 000000000..a342eefc6 Binary files /dev/null and b/www/extras/icon/building_error.png differ diff --git a/www/extras/icon/building_go.png b/www/extras/icon/building_go.png new file mode 100755 index 000000000..cdcbcb381 Binary files /dev/null and b/www/extras/icon/building_go.png differ diff --git a/www/extras/icon/building_key.png b/www/extras/icon/building_key.png new file mode 100755 index 000000000..8b79e30ed Binary files /dev/null and b/www/extras/icon/building_key.png differ diff --git a/www/extras/icon/building_link.png b/www/extras/icon/building_link.png new file mode 100755 index 000000000..a340629ac Binary files /dev/null and b/www/extras/icon/building_link.png differ diff --git a/www/extras/icon/bullet_add.png b/www/extras/icon/bullet_add.png new file mode 100755 index 000000000..41ff8335b Binary files /dev/null and b/www/extras/icon/bullet_add.png differ diff --git a/www/extras/icon/bullet_arrow_bottom.png b/www/extras/icon/bullet_arrow_bottom.png new file mode 100755 index 000000000..1a28d8250 Binary files /dev/null and b/www/extras/icon/bullet_arrow_bottom.png differ diff --git a/www/extras/icon/bullet_arrow_down.png b/www/extras/icon/bullet_arrow_down.png new file mode 100755 index 000000000..9b23c06d7 Binary files /dev/null and b/www/extras/icon/bullet_arrow_down.png differ diff --git a/www/extras/icon/bullet_arrow_top.png b/www/extras/icon/bullet_arrow_top.png new file mode 100755 index 000000000..0ce86d2b2 Binary files /dev/null and b/www/extras/icon/bullet_arrow_top.png differ diff --git a/www/extras/icon/bullet_arrow_up.png b/www/extras/icon/bullet_arrow_up.png new file mode 100755 index 000000000..24df0f421 Binary files /dev/null and b/www/extras/icon/bullet_arrow_up.png differ diff --git a/www/extras/icon/bullet_black.png b/www/extras/icon/bullet_black.png new file mode 100755 index 000000000..57619706d Binary files /dev/null and b/www/extras/icon/bullet_black.png differ diff --git a/www/extras/icon/bullet_blue.png b/www/extras/icon/bullet_blue.png new file mode 100755 index 000000000..a7651ec8a Binary files /dev/null and b/www/extras/icon/bullet_blue.png differ diff --git a/www/extras/icon/bullet_delete.png b/www/extras/icon/bullet_delete.png new file mode 100755 index 000000000..bd6271b24 Binary files /dev/null and b/www/extras/icon/bullet_delete.png differ diff --git a/www/extras/icon/bullet_disk.png b/www/extras/icon/bullet_disk.png new file mode 100755 index 000000000..209c6a786 Binary files /dev/null and b/www/extras/icon/bullet_disk.png differ diff --git a/www/extras/icon/bullet_error.png b/www/extras/icon/bullet_error.png new file mode 100755 index 000000000..bca2b491f Binary files /dev/null and b/www/extras/icon/bullet_error.png differ diff --git a/www/extras/icon/bullet_feed.png b/www/extras/icon/bullet_feed.png new file mode 100755 index 000000000..1a0e0f18f Binary files /dev/null and b/www/extras/icon/bullet_feed.png differ diff --git a/www/extras/icon/bullet_go.png b/www/extras/icon/bullet_go.png new file mode 100755 index 000000000..bc4faa709 Binary files /dev/null and b/www/extras/icon/bullet_go.png differ diff --git a/www/extras/icon/bullet_green.png b/www/extras/icon/bullet_green.png new file mode 100755 index 000000000..058ad261f Binary files /dev/null and b/www/extras/icon/bullet_green.png differ diff --git a/www/extras/icon/bullet_key.png b/www/extras/icon/bullet_key.png new file mode 100755 index 000000000..3d37f2ea4 Binary files /dev/null and b/www/extras/icon/bullet_key.png differ diff --git a/www/extras/icon/bullet_orange.png b/www/extras/icon/bullet_orange.png new file mode 100755 index 000000000..fa63024e5 Binary files /dev/null and b/www/extras/icon/bullet_orange.png differ diff --git a/www/extras/icon/bullet_picture.png b/www/extras/icon/bullet_picture.png new file mode 100755 index 000000000..386cb302f Binary files /dev/null and b/www/extras/icon/bullet_picture.png differ diff --git a/www/extras/icon/bullet_pink.png b/www/extras/icon/bullet_pink.png new file mode 100755 index 000000000..0c9f73e3f Binary files /dev/null and b/www/extras/icon/bullet_pink.png differ diff --git a/www/extras/icon/bullet_purple.png b/www/extras/icon/bullet_purple.png new file mode 100755 index 000000000..52ba5036b Binary files /dev/null and b/www/extras/icon/bullet_purple.png differ diff --git a/www/extras/icon/bullet_red.png b/www/extras/icon/bullet_red.png new file mode 100755 index 000000000..0cd803115 Binary files /dev/null and b/www/extras/icon/bullet_red.png differ diff --git a/www/extras/icon/bullet_star.png b/www/extras/icon/bullet_star.png new file mode 100755 index 000000000..fab774a32 Binary files /dev/null and b/www/extras/icon/bullet_star.png differ diff --git a/www/extras/icon/bullet_toggle_minus.png b/www/extras/icon/bullet_toggle_minus.png new file mode 100755 index 000000000..b47ce55f6 Binary files /dev/null and b/www/extras/icon/bullet_toggle_minus.png differ diff --git a/www/extras/icon/bullet_toggle_plus.png b/www/extras/icon/bullet_toggle_plus.png new file mode 100755 index 000000000..9ab4a8966 Binary files /dev/null and b/www/extras/icon/bullet_toggle_plus.png differ diff --git a/www/extras/icon/bullet_white.png b/www/extras/icon/bullet_white.png new file mode 100755 index 000000000..a9af8d44b Binary files /dev/null and b/www/extras/icon/bullet_white.png differ diff --git a/www/extras/icon/bullet_wrench.png b/www/extras/icon/bullet_wrench.png new file mode 100755 index 000000000..67817e6e5 Binary files /dev/null and b/www/extras/icon/bullet_wrench.png differ diff --git a/www/extras/icon/bullet_yellow.png b/www/extras/icon/bullet_yellow.png new file mode 100755 index 000000000..6469cea7e Binary files /dev/null and b/www/extras/icon/bullet_yellow.png differ diff --git a/www/extras/icon/cake.png b/www/extras/icon/cake.png new file mode 100755 index 000000000..4ef151aee Binary files /dev/null and b/www/extras/icon/cake.png differ diff --git a/www/extras/icon/calculator.png b/www/extras/icon/calculator.png new file mode 100755 index 000000000..701a60a5a Binary files /dev/null and b/www/extras/icon/calculator.png differ diff --git a/www/extras/icon/calculator_add.png b/www/extras/icon/calculator_add.png new file mode 100755 index 000000000..fd377bde3 Binary files /dev/null and b/www/extras/icon/calculator_add.png differ diff --git a/www/extras/icon/calculator_delete.png b/www/extras/icon/calculator_delete.png new file mode 100755 index 000000000..ac96170ec Binary files /dev/null and b/www/extras/icon/calculator_delete.png differ diff --git a/www/extras/icon/calculator_edit.png b/www/extras/icon/calculator_edit.png new file mode 100755 index 000000000..63b06b987 Binary files /dev/null and b/www/extras/icon/calculator_edit.png differ diff --git a/www/extras/icon/calculator_error.png b/www/extras/icon/calculator_error.png new file mode 100755 index 000000000..0bc4288a4 Binary files /dev/null and b/www/extras/icon/calculator_error.png differ diff --git a/www/extras/icon/calculator_link.png b/www/extras/icon/calculator_link.png new file mode 100755 index 000000000..a2a8fe69f Binary files /dev/null and b/www/extras/icon/calculator_link.png differ diff --git a/www/extras/icon/calendar.png b/www/extras/icon/calendar.png new file mode 100755 index 000000000..658913852 Binary files /dev/null and b/www/extras/icon/calendar.png differ diff --git a/www/extras/icon/calendar_add.png b/www/extras/icon/calendar_add.png new file mode 100755 index 000000000..17679db6b Binary files /dev/null and b/www/extras/icon/calendar_add.png differ diff --git a/www/extras/icon/calendar_delete.png b/www/extras/icon/calendar_delete.png new file mode 100755 index 000000000..69a3b10ad Binary files /dev/null and b/www/extras/icon/calendar_delete.png differ diff --git a/www/extras/icon/calendar_edit.png b/www/extras/icon/calendar_edit.png new file mode 100755 index 000000000..d1d2d6e68 Binary files /dev/null and b/www/extras/icon/calendar_edit.png differ diff --git a/www/extras/icon/calendar_link.png b/www/extras/icon/calendar_link.png new file mode 100755 index 000000000..6b106b942 Binary files /dev/null and b/www/extras/icon/calendar_link.png differ diff --git a/www/extras/icon/calendar_view_day.png b/www/extras/icon/calendar_view_day.png new file mode 100755 index 000000000..9740f76ee Binary files /dev/null and b/www/extras/icon/calendar_view_day.png differ diff --git a/www/extras/icon/calendar_view_month.png b/www/extras/icon/calendar_view_month.png new file mode 100755 index 000000000..6cff76c1d Binary files /dev/null and b/www/extras/icon/calendar_view_month.png differ diff --git a/www/extras/icon/calendar_view_week.png b/www/extras/icon/calendar_view_week.png new file mode 100755 index 000000000..8fe695f51 Binary files /dev/null and b/www/extras/icon/calendar_view_week.png differ diff --git a/www/extras/icon/camera.png b/www/extras/icon/camera.png new file mode 100755 index 000000000..8536d1a79 Binary files /dev/null and b/www/extras/icon/camera.png differ diff --git a/www/extras/icon/camera_add.png b/www/extras/icon/camera_add.png new file mode 100755 index 000000000..08b5da989 Binary files /dev/null and b/www/extras/icon/camera_add.png differ diff --git a/www/extras/icon/camera_delete.png b/www/extras/icon/camera_delete.png new file mode 100755 index 000000000..3846d74cd Binary files /dev/null and b/www/extras/icon/camera_delete.png differ diff --git a/www/extras/icon/camera_edit.png b/www/extras/icon/camera_edit.png new file mode 100755 index 000000000..b5015b103 Binary files /dev/null and b/www/extras/icon/camera_edit.png differ diff --git a/www/extras/icon/camera_error.png b/www/extras/icon/camera_error.png new file mode 100755 index 000000000..3c1bc95c9 Binary files /dev/null and b/www/extras/icon/camera_error.png differ diff --git a/www/extras/icon/camera_go.png b/www/extras/icon/camera_go.png new file mode 100755 index 000000000..94ce2b255 Binary files /dev/null and b/www/extras/icon/camera_go.png differ diff --git a/www/extras/icon/camera_link.png b/www/extras/icon/camera_link.png new file mode 100755 index 000000000..d2ac9f935 Binary files /dev/null and b/www/extras/icon/camera_link.png differ diff --git a/www/extras/icon/camera_small.png b/www/extras/icon/camera_small.png new file mode 100755 index 000000000..454b0b019 Binary files /dev/null and b/www/extras/icon/camera_small.png differ diff --git a/www/extras/icon/cancel.png b/www/extras/icon/cancel.png new file mode 100755 index 000000000..c149c2bc0 Binary files /dev/null and b/www/extras/icon/cancel.png differ diff --git a/www/extras/icon/car.png b/www/extras/icon/car.png new file mode 100755 index 000000000..4f3a770f0 Binary files /dev/null and b/www/extras/icon/car.png differ diff --git a/www/extras/icon/car_add.png b/www/extras/icon/car_add.png new file mode 100755 index 000000000..1215a51a4 Binary files /dev/null and b/www/extras/icon/car_add.png differ diff --git a/www/extras/icon/car_delete.png b/www/extras/icon/car_delete.png new file mode 100755 index 000000000..2803b5678 Binary files /dev/null and b/www/extras/icon/car_delete.png differ diff --git a/www/extras/icon/cart.png b/www/extras/icon/cart.png new file mode 100755 index 000000000..1baf7b9fd Binary files /dev/null and b/www/extras/icon/cart.png differ diff --git a/www/extras/icon/cart_add.png b/www/extras/icon/cart_add.png new file mode 100755 index 000000000..45c290008 Binary files /dev/null and b/www/extras/icon/cart_add.png differ diff --git a/www/extras/icon/cart_delete.png b/www/extras/icon/cart_delete.png new file mode 100755 index 000000000..ac5bce5c8 Binary files /dev/null and b/www/extras/icon/cart_delete.png differ diff --git a/www/extras/icon/cart_edit.png b/www/extras/icon/cart_edit.png new file mode 100755 index 000000000..b94ff88e6 Binary files /dev/null and b/www/extras/icon/cart_edit.png differ diff --git a/www/extras/icon/cart_error.png b/www/extras/icon/cart_error.png new file mode 100755 index 000000000..144c8353a Binary files /dev/null and b/www/extras/icon/cart_error.png differ diff --git a/www/extras/icon/cart_go.png b/www/extras/icon/cart_go.png new file mode 100755 index 000000000..20ee0584f Binary files /dev/null and b/www/extras/icon/cart_go.png differ diff --git a/www/extras/icon/cart_put.png b/www/extras/icon/cart_put.png new file mode 100755 index 000000000..3aec353e0 Binary files /dev/null and b/www/extras/icon/cart_put.png differ diff --git a/www/extras/icon/cart_remove.png b/www/extras/icon/cart_remove.png new file mode 100755 index 000000000..360217b52 Binary files /dev/null and b/www/extras/icon/cart_remove.png differ diff --git a/www/extras/icon/cd.png b/www/extras/icon/cd.png new file mode 100755 index 000000000..ef4322357 Binary files /dev/null and b/www/extras/icon/cd.png differ diff --git a/www/extras/icon/cd_add.png b/www/extras/icon/cd_add.png new file mode 100755 index 000000000..b0254effa Binary files /dev/null and b/www/extras/icon/cd_add.png differ diff --git a/www/extras/icon/cd_burn.png b/www/extras/icon/cd_burn.png new file mode 100755 index 000000000..157cb0ba9 Binary files /dev/null and b/www/extras/icon/cd_burn.png differ diff --git a/www/extras/icon/cd_delete.png b/www/extras/icon/cd_delete.png new file mode 100755 index 000000000..7d7b3d525 Binary files /dev/null and b/www/extras/icon/cd_delete.png differ diff --git a/www/extras/icon/cd_edit.png b/www/extras/icon/cd_edit.png new file mode 100755 index 000000000..b0dc194b0 Binary files /dev/null and b/www/extras/icon/cd_edit.png differ diff --git a/www/extras/icon/cd_eject.png b/www/extras/icon/cd_eject.png new file mode 100755 index 000000000..762932f6b Binary files /dev/null and b/www/extras/icon/cd_eject.png differ diff --git a/www/extras/icon/cd_go.png b/www/extras/icon/cd_go.png new file mode 100755 index 000000000..13e04991c Binary files /dev/null and b/www/extras/icon/cd_go.png differ diff --git a/www/extras/icon/chart_bar.png b/www/extras/icon/chart_bar.png new file mode 100755 index 000000000..9051fbc60 Binary files /dev/null and b/www/extras/icon/chart_bar.png differ diff --git a/www/extras/icon/chart_bar_add.png b/www/extras/icon/chart_bar_add.png new file mode 100755 index 000000000..d283e846a Binary files /dev/null and b/www/extras/icon/chart_bar_add.png differ diff --git a/www/extras/icon/chart_bar_delete.png b/www/extras/icon/chart_bar_delete.png new file mode 100755 index 000000000..259f68687 Binary files /dev/null and b/www/extras/icon/chart_bar_delete.png differ diff --git a/www/extras/icon/chart_bar_edit.png b/www/extras/icon/chart_bar_edit.png new file mode 100755 index 000000000..df64d97e6 Binary files /dev/null and b/www/extras/icon/chart_bar_edit.png differ diff --git a/www/extras/icon/chart_bar_error.png b/www/extras/icon/chart_bar_error.png new file mode 100755 index 000000000..bdacea5e5 Binary files /dev/null and b/www/extras/icon/chart_bar_error.png differ diff --git a/www/extras/icon/chart_bar_link.png b/www/extras/icon/chart_bar_link.png new file mode 100755 index 000000000..bf18aed48 Binary files /dev/null and b/www/extras/icon/chart_bar_link.png differ diff --git a/www/extras/icon/chart_curve.png b/www/extras/icon/chart_curve.png new file mode 100755 index 000000000..01e933a61 Binary files /dev/null and b/www/extras/icon/chart_curve.png differ diff --git a/www/extras/icon/chart_curve_add.png b/www/extras/icon/chart_curve_add.png new file mode 100755 index 000000000..f9e205046 Binary files /dev/null and b/www/extras/icon/chart_curve_add.png differ diff --git a/www/extras/icon/chart_curve_delete.png b/www/extras/icon/chart_curve_delete.png new file mode 100755 index 000000000..b411391c4 Binary files /dev/null and b/www/extras/icon/chart_curve_delete.png differ diff --git a/www/extras/icon/chart_curve_edit.png b/www/extras/icon/chart_curve_edit.png new file mode 100755 index 000000000..bd07673b5 Binary files /dev/null and b/www/extras/icon/chart_curve_edit.png differ diff --git a/www/extras/icon/chart_curve_error.png b/www/extras/icon/chart_curve_error.png new file mode 100755 index 000000000..906dd0383 Binary files /dev/null and b/www/extras/icon/chart_curve_error.png differ diff --git a/www/extras/icon/chart_curve_go.png b/www/extras/icon/chart_curve_go.png new file mode 100755 index 000000000..ac9eda51a Binary files /dev/null and b/www/extras/icon/chart_curve_go.png differ diff --git a/www/extras/icon/chart_curve_link.png b/www/extras/icon/chart_curve_link.png new file mode 100755 index 000000000..144eafe08 Binary files /dev/null and b/www/extras/icon/chart_curve_link.png differ diff --git a/www/extras/icon/chart_line.png b/www/extras/icon/chart_line.png new file mode 100755 index 000000000..85020f320 Binary files /dev/null and b/www/extras/icon/chart_line.png differ diff --git a/www/extras/icon/chart_line_add.png b/www/extras/icon/chart_line_add.png new file mode 100755 index 000000000..5571a5ebc Binary files /dev/null and b/www/extras/icon/chart_line_add.png differ diff --git a/www/extras/icon/chart_line_delete.png b/www/extras/icon/chart_line_delete.png new file mode 100755 index 000000000..5b0aa9012 Binary files /dev/null and b/www/extras/icon/chart_line_delete.png differ diff --git a/www/extras/icon/chart_line_edit.png b/www/extras/icon/chart_line_edit.png new file mode 100755 index 000000000..9cf660733 Binary files /dev/null and b/www/extras/icon/chart_line_edit.png differ diff --git a/www/extras/icon/chart_line_error.png b/www/extras/icon/chart_line_error.png new file mode 100755 index 000000000..ff23c03a8 Binary files /dev/null and b/www/extras/icon/chart_line_error.png differ diff --git a/www/extras/icon/chart_line_link.png b/www/extras/icon/chart_line_link.png new file mode 100755 index 000000000..f3727d22e Binary files /dev/null and b/www/extras/icon/chart_line_link.png differ diff --git a/www/extras/icon/chart_organisation.png b/www/extras/icon/chart_organisation.png new file mode 100755 index 000000000..c32d25c16 Binary files /dev/null and b/www/extras/icon/chart_organisation.png differ diff --git a/www/extras/icon/chart_organisation_add.png b/www/extras/icon/chart_organisation_add.png new file mode 100755 index 000000000..f0dba4ac4 Binary files /dev/null and b/www/extras/icon/chart_organisation_add.png differ diff --git a/www/extras/icon/chart_organisation_delete.png b/www/extras/icon/chart_organisation_delete.png new file mode 100755 index 000000000..7dc8dcac2 Binary files /dev/null and b/www/extras/icon/chart_organisation_delete.png differ diff --git a/www/extras/icon/chart_pie.png b/www/extras/icon/chart_pie.png new file mode 100755 index 000000000..fe00fa050 Binary files /dev/null and b/www/extras/icon/chart_pie.png differ diff --git a/www/extras/icon/chart_pie_add.png b/www/extras/icon/chart_pie_add.png new file mode 100755 index 000000000..bf0822ee1 Binary files /dev/null and b/www/extras/icon/chart_pie_add.png differ diff --git a/www/extras/icon/chart_pie_delete.png b/www/extras/icon/chart_pie_delete.png new file mode 100755 index 000000000..5ab9efd55 Binary files /dev/null and b/www/extras/icon/chart_pie_delete.png differ diff --git a/www/extras/icon/chart_pie_edit.png b/www/extras/icon/chart_pie_edit.png new file mode 100755 index 000000000..3debc12d5 Binary files /dev/null and b/www/extras/icon/chart_pie_edit.png differ diff --git a/www/extras/icon/chart_pie_error.png b/www/extras/icon/chart_pie_error.png new file mode 100755 index 000000000..7344174fe Binary files /dev/null and b/www/extras/icon/chart_pie_error.png differ diff --git a/www/extras/icon/chart_pie_link.png b/www/extras/icon/chart_pie_link.png new file mode 100755 index 000000000..c072f8e05 Binary files /dev/null and b/www/extras/icon/chart_pie_link.png differ diff --git a/www/extras/icon/clock.png b/www/extras/icon/clock.png new file mode 100755 index 000000000..e2672c206 Binary files /dev/null and b/www/extras/icon/clock.png differ diff --git a/www/extras/icon/clock_add.png b/www/extras/icon/clock_add.png new file mode 100755 index 000000000..598b839b8 Binary files /dev/null and b/www/extras/icon/clock_add.png differ diff --git a/www/extras/icon/clock_delete.png b/www/extras/icon/clock_delete.png new file mode 100755 index 000000000..8bf9efe4b Binary files /dev/null and b/www/extras/icon/clock_delete.png differ diff --git a/www/extras/icon/clock_edit.png b/www/extras/icon/clock_edit.png new file mode 100755 index 000000000..7d3571887 Binary files /dev/null and b/www/extras/icon/clock_edit.png differ diff --git a/www/extras/icon/clock_error.png b/www/extras/icon/clock_error.png new file mode 100755 index 000000000..a7c461ba9 Binary files /dev/null and b/www/extras/icon/clock_error.png differ diff --git a/www/extras/icon/clock_go.png b/www/extras/icon/clock_go.png new file mode 100755 index 000000000..a1a24d3f3 Binary files /dev/null and b/www/extras/icon/clock_go.png differ diff --git a/www/extras/icon/clock_link.png b/www/extras/icon/clock_link.png new file mode 100755 index 000000000..481cf04c1 Binary files /dev/null and b/www/extras/icon/clock_link.png differ diff --git a/www/extras/icon/clock_pause.png b/www/extras/icon/clock_pause.png new file mode 100755 index 000000000..ba7472585 Binary files /dev/null and b/www/extras/icon/clock_pause.png differ diff --git a/www/extras/icon/clock_play.png b/www/extras/icon/clock_play.png new file mode 100755 index 000000000..fb4ebc850 Binary files /dev/null and b/www/extras/icon/clock_play.png differ diff --git a/www/extras/icon/clock_red.png b/www/extras/icon/clock_red.png new file mode 100755 index 000000000..2842cc338 Binary files /dev/null and b/www/extras/icon/clock_red.png differ diff --git a/www/extras/icon/clock_stop.png b/www/extras/icon/clock_stop.png new file mode 100755 index 000000000..6fe8a6f95 Binary files /dev/null and b/www/extras/icon/clock_stop.png differ diff --git a/www/extras/icon/cog.png b/www/extras/icon/cog.png new file mode 100755 index 000000000..67de2c6cc Binary files /dev/null and b/www/extras/icon/cog.png differ diff --git a/www/extras/icon/cog_add.png b/www/extras/icon/cog_add.png new file mode 100755 index 000000000..04f22badc Binary files /dev/null and b/www/extras/icon/cog_add.png differ diff --git a/www/extras/icon/cog_delete.png b/www/extras/icon/cog_delete.png new file mode 100755 index 000000000..8ce71c475 Binary files /dev/null and b/www/extras/icon/cog_delete.png differ diff --git a/www/extras/icon/cog_edit.png b/www/extras/icon/cog_edit.png new file mode 100755 index 000000000..47b75a456 Binary files /dev/null and b/www/extras/icon/cog_edit.png differ diff --git a/www/extras/icon/cog_error.png b/www/extras/icon/cog_error.png new file mode 100755 index 000000000..47667430a Binary files /dev/null and b/www/extras/icon/cog_error.png differ diff --git a/www/extras/icon/cog_go.png b/www/extras/icon/cog_go.png new file mode 100755 index 000000000..3262767cd Binary files /dev/null and b/www/extras/icon/cog_go.png differ diff --git a/www/extras/icon/coins.png b/www/extras/icon/coins.png new file mode 100755 index 000000000..0ca9074d6 Binary files /dev/null and b/www/extras/icon/coins.png differ diff --git a/www/extras/icon/coins_add.png b/www/extras/icon/coins_add.png new file mode 100755 index 000000000..cdff5d3d4 Binary files /dev/null and b/www/extras/icon/coins_add.png differ diff --git a/www/extras/icon/coins_delete.png b/www/extras/icon/coins_delete.png new file mode 100755 index 000000000..18e0c0fd9 Binary files /dev/null and b/www/extras/icon/coins_delete.png differ diff --git a/www/extras/icon/color_swatch.png b/www/extras/icon/color_swatch.png new file mode 100755 index 000000000..6e6e85212 Binary files /dev/null and b/www/extras/icon/color_swatch.png differ diff --git a/www/extras/icon/color_wheel.png b/www/extras/icon/color_wheel.png new file mode 100755 index 000000000..809fb00e5 Binary files /dev/null and b/www/extras/icon/color_wheel.png differ diff --git a/www/extras/icon/comment.png b/www/extras/icon/comment.png new file mode 100755 index 000000000..7bc9233ea Binary files /dev/null and b/www/extras/icon/comment.png differ diff --git a/www/extras/icon/comment_add.png b/www/extras/icon/comment_add.png new file mode 100755 index 000000000..75e78dede Binary files /dev/null and b/www/extras/icon/comment_add.png differ diff --git a/www/extras/icon/comment_delete.png b/www/extras/icon/comment_delete.png new file mode 100755 index 000000000..643fdbe8d Binary files /dev/null and b/www/extras/icon/comment_delete.png differ diff --git a/www/extras/icon/comment_edit.png b/www/extras/icon/comment_edit.png new file mode 100755 index 000000000..73db110df Binary files /dev/null and b/www/extras/icon/comment_edit.png differ diff --git a/www/extras/icon/comments.png b/www/extras/icon/comments.png new file mode 100755 index 000000000..39433cf78 Binary files /dev/null and b/www/extras/icon/comments.png differ diff --git a/www/extras/icon/comments_add.png b/www/extras/icon/comments_add.png new file mode 100755 index 000000000..b32563442 Binary files /dev/null and b/www/extras/icon/comments_add.png differ diff --git a/www/extras/icon/comments_delete.png b/www/extras/icon/comments_delete.png new file mode 100755 index 000000000..6df7376d0 Binary files /dev/null and b/www/extras/icon/comments_delete.png differ diff --git a/www/extras/icon/compress.png b/www/extras/icon/compress.png new file mode 100755 index 000000000..8606ff0fd Binary files /dev/null and b/www/extras/icon/compress.png differ diff --git a/www/extras/icon/computer.png b/www/extras/icon/computer.png new file mode 100755 index 000000000..9bc37dce3 Binary files /dev/null and b/www/extras/icon/computer.png differ diff --git a/www/extras/icon/computer_add.png b/www/extras/icon/computer_add.png new file mode 100755 index 000000000..db604ee3b Binary files /dev/null and b/www/extras/icon/computer_add.png differ diff --git a/www/extras/icon/computer_delete.png b/www/extras/icon/computer_delete.png new file mode 100755 index 000000000..5e9b26836 Binary files /dev/null and b/www/extras/icon/computer_delete.png differ diff --git a/www/extras/icon/computer_edit.png b/www/extras/icon/computer_edit.png new file mode 100755 index 000000000..34c72fe52 Binary files /dev/null and b/www/extras/icon/computer_edit.png differ diff --git a/www/extras/icon/computer_error.png b/www/extras/icon/computer_error.png new file mode 100755 index 000000000..b2c3ed578 Binary files /dev/null and b/www/extras/icon/computer_error.png differ diff --git a/www/extras/icon/computer_go.png b/www/extras/icon/computer_go.png new file mode 100755 index 000000000..0b26144d8 Binary files /dev/null and b/www/extras/icon/computer_go.png differ diff --git a/www/extras/icon/computer_key.png b/www/extras/icon/computer_key.png new file mode 100755 index 000000000..eca543017 Binary files /dev/null and b/www/extras/icon/computer_key.png differ diff --git a/www/extras/icon/computer_link.png b/www/extras/icon/computer_link.png new file mode 100755 index 000000000..3859db214 Binary files /dev/null and b/www/extras/icon/computer_link.png differ diff --git a/www/extras/icon/connect.png b/www/extras/icon/connect.png new file mode 100755 index 000000000..024138eb3 Binary files /dev/null and b/www/extras/icon/connect.png differ diff --git a/www/extras/icon/contrast.png b/www/extras/icon/contrast.png new file mode 100755 index 000000000..adcc0046f Binary files /dev/null and b/www/extras/icon/contrast.png differ diff --git a/www/extras/icon/contrast_decrease.png b/www/extras/icon/contrast_decrease.png new file mode 100755 index 000000000..0155bf5c0 Binary files /dev/null and b/www/extras/icon/contrast_decrease.png differ diff --git a/www/extras/icon/contrast_high.png b/www/extras/icon/contrast_high.png new file mode 100755 index 000000000..d87c8cbb7 Binary files /dev/null and b/www/extras/icon/contrast_high.png differ diff --git a/www/extras/icon/contrast_increase.png b/www/extras/icon/contrast_increase.png new file mode 100755 index 000000000..a3e7f5200 Binary files /dev/null and b/www/extras/icon/contrast_increase.png differ diff --git a/www/extras/icon/contrast_low.png b/www/extras/icon/contrast_low.png new file mode 100755 index 000000000..dc9f4b100 Binary files /dev/null and b/www/extras/icon/contrast_low.png differ diff --git a/www/extras/icon/control_eject.png b/www/extras/icon/control_eject.png new file mode 100755 index 000000000..924d817bb Binary files /dev/null and b/www/extras/icon/control_eject.png differ diff --git a/www/extras/icon/control_eject_blue.png b/www/extras/icon/control_eject_blue.png new file mode 100755 index 000000000..2bd496383 Binary files /dev/null and b/www/extras/icon/control_eject_blue.png differ diff --git a/www/extras/icon/control_end.png b/www/extras/icon/control_end.png new file mode 100755 index 000000000..036e04dcd Binary files /dev/null and b/www/extras/icon/control_end.png differ diff --git a/www/extras/icon/control_end_blue.png b/www/extras/icon/control_end_blue.png new file mode 100755 index 000000000..720793576 Binary files /dev/null and b/www/extras/icon/control_end_blue.png differ diff --git a/www/extras/icon/control_equalizer.png b/www/extras/icon/control_equalizer.png new file mode 100755 index 000000000..46060872c Binary files /dev/null and b/www/extras/icon/control_equalizer.png differ diff --git a/www/extras/icon/control_equalizer_blue.png b/www/extras/icon/control_equalizer_blue.png new file mode 100755 index 000000000..1b2e6a374 Binary files /dev/null and b/www/extras/icon/control_equalizer_blue.png differ diff --git a/www/extras/icon/control_fastforward.png b/www/extras/icon/control_fastforward.png new file mode 100755 index 000000000..31f7fd3ad Binary files /dev/null and b/www/extras/icon/control_fastforward.png differ diff --git a/www/extras/icon/control_fastforward_blue.png b/www/extras/icon/control_fastforward_blue.png new file mode 100755 index 000000000..4a2f9d4e4 Binary files /dev/null and b/www/extras/icon/control_fastforward_blue.png differ diff --git a/www/extras/icon/control_pause.png b/www/extras/icon/control_pause.png new file mode 100755 index 000000000..2d9ce9c4e Binary files /dev/null and b/www/extras/icon/control_pause.png differ diff --git a/www/extras/icon/control_pause_blue.png b/www/extras/icon/control_pause_blue.png new file mode 100755 index 000000000..ec61099b0 Binary files /dev/null and b/www/extras/icon/control_pause_blue.png differ diff --git a/www/extras/icon/control_play.png b/www/extras/icon/control_play.png new file mode 100755 index 000000000..0846555d0 Binary files /dev/null and b/www/extras/icon/control_play.png differ diff --git a/www/extras/icon/control_play_blue.png b/www/extras/icon/control_play_blue.png new file mode 100755 index 000000000..f8c8ec683 Binary files /dev/null and b/www/extras/icon/control_play_blue.png differ diff --git a/www/extras/icon/control_repeat.png b/www/extras/icon/control_repeat.png new file mode 100755 index 000000000..1c4f57a16 Binary files /dev/null and b/www/extras/icon/control_repeat.png differ diff --git a/www/extras/icon/control_repeat_blue.png b/www/extras/icon/control_repeat_blue.png new file mode 100755 index 000000000..406ec333b Binary files /dev/null and b/www/extras/icon/control_repeat_blue.png differ diff --git a/www/extras/icon/control_rewind.png b/www/extras/icon/control_rewind.png new file mode 100755 index 000000000..c02944771 Binary files /dev/null and b/www/extras/icon/control_rewind.png differ diff --git a/www/extras/icon/control_rewind_blue.png b/www/extras/icon/control_rewind_blue.png new file mode 100755 index 000000000..15d1584bd Binary files /dev/null and b/www/extras/icon/control_rewind_blue.png differ diff --git a/www/extras/icon/control_start.png b/www/extras/icon/control_start.png new file mode 100755 index 000000000..7dd1c07fb Binary files /dev/null and b/www/extras/icon/control_start.png differ diff --git a/www/extras/icon/control_start_blue.png b/www/extras/icon/control_start_blue.png new file mode 100755 index 000000000..6f11fcb08 Binary files /dev/null and b/www/extras/icon/control_start_blue.png differ diff --git a/www/extras/icon/control_stop.png b/www/extras/icon/control_stop.png new file mode 100755 index 000000000..893bb60e5 Binary files /dev/null and b/www/extras/icon/control_stop.png differ diff --git a/www/extras/icon/control_stop_blue.png b/www/extras/icon/control_stop_blue.png new file mode 100755 index 000000000..e6f75d232 Binary files /dev/null and b/www/extras/icon/control_stop_blue.png differ diff --git a/www/extras/icon/controller.png b/www/extras/icon/controller.png new file mode 100755 index 000000000..5cf76ed02 Binary files /dev/null and b/www/extras/icon/controller.png differ diff --git a/www/extras/icon/controller_add.png b/www/extras/icon/controller_add.png new file mode 100755 index 000000000..efecb3871 Binary files /dev/null and b/www/extras/icon/controller_add.png differ diff --git a/www/extras/icon/controller_delete.png b/www/extras/icon/controller_delete.png new file mode 100755 index 000000000..3d83bc7b9 Binary files /dev/null and b/www/extras/icon/controller_delete.png differ diff --git a/www/extras/icon/controller_error.png b/www/extras/icon/controller_error.png new file mode 100755 index 000000000..7f17c0cb7 Binary files /dev/null and b/www/extras/icon/controller_error.png differ diff --git a/www/extras/icon/creditcards.png b/www/extras/icon/creditcards.png new file mode 100755 index 000000000..4eae583e1 Binary files /dev/null and b/www/extras/icon/creditcards.png differ diff --git a/www/extras/icon/cross.png b/www/extras/icon/cross.png new file mode 100755 index 000000000..1514d51a3 Binary files /dev/null and b/www/extras/icon/cross.png differ diff --git a/www/extras/icon/css.png b/www/extras/icon/css.png new file mode 100755 index 000000000..23f310181 Binary files /dev/null and b/www/extras/icon/css.png differ diff --git a/www/extras/icon/css_add.png b/www/extras/icon/css_add.png new file mode 100755 index 000000000..e8ea10fcd Binary files /dev/null and b/www/extras/icon/css_add.png differ diff --git a/www/extras/icon/css_delete.png b/www/extras/icon/css_delete.png new file mode 100755 index 000000000..326aba440 Binary files /dev/null and b/www/extras/icon/css_delete.png differ diff --git a/www/extras/icon/css_go.png b/www/extras/icon/css_go.png new file mode 100755 index 000000000..6cdf38c36 Binary files /dev/null and b/www/extras/icon/css_go.png differ diff --git a/www/extras/icon/css_valid.png b/www/extras/icon/css_valid.png new file mode 100755 index 000000000..4c72ca5a4 Binary files /dev/null and b/www/extras/icon/css_valid.png differ diff --git a/www/extras/icon/cup.png b/www/extras/icon/cup.png new file mode 100755 index 000000000..b7bfcd15f Binary files /dev/null and b/www/extras/icon/cup.png differ diff --git a/www/extras/icon/cup_add.png b/www/extras/icon/cup_add.png new file mode 100755 index 000000000..4ecaece29 Binary files /dev/null and b/www/extras/icon/cup_add.png differ diff --git a/www/extras/icon/cup_delete.png b/www/extras/icon/cup_delete.png new file mode 100755 index 000000000..59a6d9c61 Binary files /dev/null and b/www/extras/icon/cup_delete.png differ diff --git a/www/extras/icon/cup_edit.png b/www/extras/icon/cup_edit.png new file mode 100755 index 000000000..0b8f1e1ef Binary files /dev/null and b/www/extras/icon/cup_edit.png differ diff --git a/www/extras/icon/cup_error.png b/www/extras/icon/cup_error.png new file mode 100755 index 000000000..68798748d Binary files /dev/null and b/www/extras/icon/cup_error.png differ diff --git a/www/extras/icon/cup_go.png b/www/extras/icon/cup_go.png new file mode 100755 index 000000000..9527efbe4 Binary files /dev/null and b/www/extras/icon/cup_go.png differ diff --git a/www/extras/icon/cup_key.png b/www/extras/icon/cup_key.png new file mode 100755 index 000000000..7ae160ce2 Binary files /dev/null and b/www/extras/icon/cup_key.png differ diff --git a/www/extras/icon/cup_link.png b/www/extras/icon/cup_link.png new file mode 100755 index 000000000..41d1ace1a Binary files /dev/null and b/www/extras/icon/cup_link.png differ diff --git a/www/extras/icon/cursor.png b/www/extras/icon/cursor.png new file mode 100755 index 000000000..532f532d8 Binary files /dev/null and b/www/extras/icon/cursor.png differ diff --git a/www/extras/icon/cut.png b/www/extras/icon/cut.png new file mode 100755 index 000000000..f215d6f6b Binary files /dev/null and b/www/extras/icon/cut.png differ diff --git a/www/extras/icon/cut_red.png b/www/extras/icon/cut_red.png new file mode 100755 index 000000000..85bb2f0fd Binary files /dev/null and b/www/extras/icon/cut_red.png differ diff --git a/www/extras/icon/database.png b/www/extras/icon/database.png new file mode 100755 index 000000000..3d09261a2 Binary files /dev/null and b/www/extras/icon/database.png differ diff --git a/www/extras/icon/database_add.png b/www/extras/icon/database_add.png new file mode 100755 index 000000000..802bd6cde Binary files /dev/null and b/www/extras/icon/database_add.png differ diff --git a/www/extras/icon/database_connect.png b/www/extras/icon/database_connect.png new file mode 100755 index 000000000..3a111977c Binary files /dev/null and b/www/extras/icon/database_connect.png differ diff --git a/www/extras/icon/database_delete.png b/www/extras/icon/database_delete.png new file mode 100755 index 000000000..cce652e84 Binary files /dev/null and b/www/extras/icon/database_delete.png differ diff --git a/www/extras/icon/database_edit.png b/www/extras/icon/database_edit.png new file mode 100755 index 000000000..e501b668c Binary files /dev/null and b/www/extras/icon/database_edit.png differ diff --git a/www/extras/icon/database_error.png b/www/extras/icon/database_error.png new file mode 100755 index 000000000..578221aaa Binary files /dev/null and b/www/extras/icon/database_error.png differ diff --git a/www/extras/icon/database_gear.png b/www/extras/icon/database_gear.png new file mode 100755 index 000000000..7c0ab2b4c Binary files /dev/null and b/www/extras/icon/database_gear.png differ diff --git a/www/extras/icon/database_go.png b/www/extras/icon/database_go.png new file mode 100755 index 000000000..61a8556c4 Binary files /dev/null and b/www/extras/icon/database_go.png differ diff --git a/www/extras/icon/database_key.png b/www/extras/icon/database_key.png new file mode 100755 index 000000000..333414767 Binary files /dev/null and b/www/extras/icon/database_key.png differ diff --git a/www/extras/icon/database_lightning.png b/www/extras/icon/database_lightning.png new file mode 100755 index 000000000..d9eefc225 Binary files /dev/null and b/www/extras/icon/database_lightning.png differ diff --git a/www/extras/icon/database_link.png b/www/extras/icon/database_link.png new file mode 100755 index 000000000..4c8204af1 Binary files /dev/null and b/www/extras/icon/database_link.png differ diff --git a/www/extras/icon/database_refresh.png b/www/extras/icon/database_refresh.png new file mode 100755 index 000000000..ff803be12 Binary files /dev/null and b/www/extras/icon/database_refresh.png differ diff --git a/www/extras/icon/database_save.png b/www/extras/icon/database_save.png new file mode 100755 index 000000000..44c06dddf Binary files /dev/null and b/www/extras/icon/database_save.png differ diff --git a/www/extras/icon/database_table.png b/www/extras/icon/database_table.png new file mode 100755 index 000000000..693709cbc Binary files /dev/null and b/www/extras/icon/database_table.png differ diff --git a/www/extras/icon/date.png b/www/extras/icon/date.png new file mode 100755 index 000000000..783c83357 Binary files /dev/null and b/www/extras/icon/date.png differ diff --git a/www/extras/icon/date_add.png b/www/extras/icon/date_add.png new file mode 100755 index 000000000..6a7ae025f Binary files /dev/null and b/www/extras/icon/date_add.png differ diff --git a/www/extras/icon/date_delete.png b/www/extras/icon/date_delete.png new file mode 100755 index 000000000..969a6b723 Binary files /dev/null and b/www/extras/icon/date_delete.png differ diff --git a/www/extras/icon/date_edit.png b/www/extras/icon/date_edit.png new file mode 100755 index 000000000..e68106503 Binary files /dev/null and b/www/extras/icon/date_edit.png differ diff --git a/www/extras/icon/date_error.png b/www/extras/icon/date_error.png new file mode 100755 index 000000000..442cd97d0 Binary files /dev/null and b/www/extras/icon/date_error.png differ diff --git a/www/extras/icon/date_go.png b/www/extras/icon/date_go.png new file mode 100755 index 000000000..52dd9f3ae Binary files /dev/null and b/www/extras/icon/date_go.png differ diff --git a/www/extras/icon/date_link.png b/www/extras/icon/date_link.png new file mode 100755 index 000000000..9f0aada71 Binary files /dev/null and b/www/extras/icon/date_link.png differ diff --git a/www/extras/icon/date_magnify.png b/www/extras/icon/date_magnify.png new file mode 100755 index 000000000..cd05f1906 Binary files /dev/null and b/www/extras/icon/date_magnify.png differ diff --git a/www/extras/icon/date_next.png b/www/extras/icon/date_next.png new file mode 100755 index 000000000..48d740abf Binary files /dev/null and b/www/extras/icon/date_next.png differ diff --git a/www/extras/icon/date_previous.png b/www/extras/icon/date_previous.png new file mode 100755 index 000000000..e117a8374 Binary files /dev/null and b/www/extras/icon/date_previous.png differ diff --git a/www/extras/icon/delete.png b/www/extras/icon/delete.png new file mode 100755 index 000000000..08f249365 Binary files /dev/null and b/www/extras/icon/delete.png differ diff --git a/www/extras/icon/disconnect.png b/www/extras/icon/disconnect.png new file mode 100755 index 000000000..b335cb11c Binary files /dev/null and b/www/extras/icon/disconnect.png differ diff --git a/www/extras/icon/disk.png b/www/extras/icon/disk.png new file mode 100755 index 000000000..99d532e8b Binary files /dev/null and b/www/extras/icon/disk.png differ diff --git a/www/extras/icon/disk_multiple.png b/www/extras/icon/disk_multiple.png new file mode 100755 index 000000000..fc5a52f5e Binary files /dev/null and b/www/extras/icon/disk_multiple.png differ diff --git a/www/extras/icon/door.png b/www/extras/icon/door.png new file mode 100755 index 000000000..369fc46ed Binary files /dev/null and b/www/extras/icon/door.png differ diff --git a/www/extras/icon/door_in.png b/www/extras/icon/door_in.png new file mode 100755 index 000000000..41676a0a5 Binary files /dev/null and b/www/extras/icon/door_in.png differ diff --git a/www/extras/icon/door_open.png b/www/extras/icon/door_open.png new file mode 100755 index 000000000..64bab57dd Binary files /dev/null and b/www/extras/icon/door_open.png differ diff --git a/www/extras/icon/door_out.png b/www/extras/icon/door_out.png new file mode 100755 index 000000000..2541d2bcb Binary files /dev/null and b/www/extras/icon/door_out.png differ diff --git a/www/extras/icon/drink.png b/www/extras/icon/drink.png new file mode 100755 index 000000000..d98359c2a Binary files /dev/null and b/www/extras/icon/drink.png differ diff --git a/www/extras/icon/drink_empty.png b/www/extras/icon/drink_empty.png new file mode 100755 index 000000000..a40211ed4 Binary files /dev/null and b/www/extras/icon/drink_empty.png differ diff --git a/www/extras/icon/drive.png b/www/extras/icon/drive.png new file mode 100755 index 000000000..37b7c9b27 Binary files /dev/null and b/www/extras/icon/drive.png differ diff --git a/www/extras/icon/drive_add.png b/www/extras/icon/drive_add.png new file mode 100755 index 000000000..29a35d5aa Binary files /dev/null and b/www/extras/icon/drive_add.png differ diff --git a/www/extras/icon/drive_burn.png b/www/extras/icon/drive_burn.png new file mode 100755 index 000000000..80fd79f98 Binary files /dev/null and b/www/extras/icon/drive_burn.png differ diff --git a/www/extras/icon/drive_cd.png b/www/extras/icon/drive_cd.png new file mode 100755 index 000000000..1850b701c Binary files /dev/null and b/www/extras/icon/drive_cd.png differ diff --git a/www/extras/icon/drive_cd_empty.png b/www/extras/icon/drive_cd_empty.png new file mode 100755 index 000000000..8df38d9e6 Binary files /dev/null and b/www/extras/icon/drive_cd_empty.png differ diff --git a/www/extras/icon/drive_delete.png b/www/extras/icon/drive_delete.png new file mode 100755 index 000000000..e6eb18665 Binary files /dev/null and b/www/extras/icon/drive_delete.png differ diff --git a/www/extras/icon/drive_disk.png b/www/extras/icon/drive_disk.png new file mode 100755 index 000000000..5a51e8198 Binary files /dev/null and b/www/extras/icon/drive_disk.png differ diff --git a/www/extras/icon/drive_edit.png b/www/extras/icon/drive_edit.png new file mode 100755 index 000000000..7923fada4 Binary files /dev/null and b/www/extras/icon/drive_edit.png differ diff --git a/www/extras/icon/drive_error.png b/www/extras/icon/drive_error.png new file mode 100755 index 000000000..309f63962 Binary files /dev/null and b/www/extras/icon/drive_error.png differ diff --git a/www/extras/icon/drive_go.png b/www/extras/icon/drive_go.png new file mode 100755 index 000000000..fc53379ef Binary files /dev/null and b/www/extras/icon/drive_go.png differ diff --git a/www/extras/icon/drive_key.png b/www/extras/icon/drive_key.png new file mode 100755 index 000000000..d0b3c673a Binary files /dev/null and b/www/extras/icon/drive_key.png differ diff --git a/www/extras/icon/drive_link.png b/www/extras/icon/drive_link.png new file mode 100755 index 000000000..8679c4b5c Binary files /dev/null and b/www/extras/icon/drive_link.png differ diff --git a/www/extras/icon/drive_magnify.png b/www/extras/icon/drive_magnify.png new file mode 100755 index 000000000..0f0f4446b Binary files /dev/null and b/www/extras/icon/drive_magnify.png differ diff --git a/www/extras/icon/drive_network.png b/www/extras/icon/drive_network.png new file mode 100755 index 000000000..63d2d5d5b Binary files /dev/null and b/www/extras/icon/drive_network.png differ diff --git a/www/extras/icon/drive_rename.png b/www/extras/icon/drive_rename.png new file mode 100755 index 000000000..2a9f38b44 Binary files /dev/null and b/www/extras/icon/drive_rename.png differ diff --git a/www/extras/icon/drive_user.png b/www/extras/icon/drive_user.png new file mode 100755 index 000000000..0b4751ce4 Binary files /dev/null and b/www/extras/icon/drive_user.png differ diff --git a/www/extras/icon/drive_web.png b/www/extras/icon/drive_web.png new file mode 100755 index 000000000..8850a8355 Binary files /dev/null and b/www/extras/icon/drive_web.png differ diff --git a/www/extras/icon/dvd.png b/www/extras/icon/dvd.png new file mode 100755 index 000000000..9d94de5df Binary files /dev/null and b/www/extras/icon/dvd.png differ diff --git a/www/extras/icon/dvd_add.png b/www/extras/icon/dvd_add.png new file mode 100755 index 000000000..517d11215 Binary files /dev/null and b/www/extras/icon/dvd_add.png differ diff --git a/www/extras/icon/dvd_delete.png b/www/extras/icon/dvd_delete.png new file mode 100755 index 000000000..87bed2219 Binary files /dev/null and b/www/extras/icon/dvd_delete.png differ diff --git a/www/extras/icon/dvd_edit.png b/www/extras/icon/dvd_edit.png new file mode 100755 index 000000000..d6330aa99 Binary files /dev/null and b/www/extras/icon/dvd_edit.png differ diff --git a/www/extras/icon/dvd_error.png b/www/extras/icon/dvd_error.png new file mode 100755 index 000000000..8f6d4bee3 Binary files /dev/null and b/www/extras/icon/dvd_error.png differ diff --git a/www/extras/icon/dvd_go.png b/www/extras/icon/dvd_go.png new file mode 100755 index 000000000..ef6959f7b Binary files /dev/null and b/www/extras/icon/dvd_go.png differ diff --git a/www/extras/icon/dvd_key.png b/www/extras/icon/dvd_key.png new file mode 100755 index 000000000..da9307f66 Binary files /dev/null and b/www/extras/icon/dvd_key.png differ diff --git a/www/extras/icon/dvd_link.png b/www/extras/icon/dvd_link.png new file mode 100755 index 000000000..caad7263a Binary files /dev/null and b/www/extras/icon/dvd_link.png differ diff --git a/www/extras/icon/email.png b/www/extras/icon/email.png new file mode 100755 index 000000000..7348aed77 Binary files /dev/null and b/www/extras/icon/email.png differ diff --git a/www/extras/icon/email_add.png b/www/extras/icon/email_add.png new file mode 100755 index 000000000..6c933681f Binary files /dev/null and b/www/extras/icon/email_add.png differ diff --git a/www/extras/icon/email_attach.png b/www/extras/icon/email_attach.png new file mode 100755 index 000000000..1f994851c Binary files /dev/null and b/www/extras/icon/email_attach.png differ diff --git a/www/extras/icon/email_delete.png b/www/extras/icon/email_delete.png new file mode 100755 index 000000000..a9932b1ad Binary files /dev/null and b/www/extras/icon/email_delete.png differ diff --git a/www/extras/icon/email_edit.png b/www/extras/icon/email_edit.png new file mode 100755 index 000000000..244f04ae1 Binary files /dev/null and b/www/extras/icon/email_edit.png differ diff --git a/www/extras/icon/email_error.png b/www/extras/icon/email_error.png new file mode 100755 index 000000000..8bdd3304d Binary files /dev/null and b/www/extras/icon/email_error.png differ diff --git a/www/extras/icon/email_go.png b/www/extras/icon/email_go.png new file mode 100755 index 000000000..4a6c5d396 Binary files /dev/null and b/www/extras/icon/email_go.png differ diff --git a/www/extras/icon/email_link.png b/www/extras/icon/email_link.png new file mode 100755 index 000000000..2c49f78a6 Binary files /dev/null and b/www/extras/icon/email_link.png differ diff --git a/www/extras/icon/email_open.png b/www/extras/icon/email_open.png new file mode 100755 index 000000000..7b6f9813d Binary files /dev/null and b/www/extras/icon/email_open.png differ diff --git a/www/extras/icon/email_open_image.png b/www/extras/icon/email_open_image.png new file mode 100755 index 000000000..e588e2fb2 Binary files /dev/null and b/www/extras/icon/email_open_image.png differ diff --git a/www/extras/icon/emoticon_evilgrin.png b/www/extras/icon/emoticon_evilgrin.png new file mode 100755 index 000000000..817bd509b Binary files /dev/null and b/www/extras/icon/emoticon_evilgrin.png differ diff --git a/www/extras/icon/emoticon_grin.png b/www/extras/icon/emoticon_grin.png new file mode 100755 index 000000000..fc60c5e1c Binary files /dev/null and b/www/extras/icon/emoticon_grin.png differ diff --git a/www/extras/icon/emoticon_happy.png b/www/extras/icon/emoticon_happy.png new file mode 100755 index 000000000..6b7336e17 Binary files /dev/null and b/www/extras/icon/emoticon_happy.png differ diff --git a/www/extras/icon/emoticon_smile.png b/www/extras/icon/emoticon_smile.png new file mode 100755 index 000000000..ade431851 Binary files /dev/null and b/www/extras/icon/emoticon_smile.png differ diff --git a/www/extras/icon/emoticon_surprised.png b/www/extras/icon/emoticon_surprised.png new file mode 100755 index 000000000..4520cfc55 Binary files /dev/null and b/www/extras/icon/emoticon_surprised.png differ diff --git a/www/extras/icon/emoticon_tongue.png b/www/extras/icon/emoticon_tongue.png new file mode 100755 index 000000000..ecafd2ffc Binary files /dev/null and b/www/extras/icon/emoticon_tongue.png differ diff --git a/www/extras/icon/emoticon_unhappy.png b/www/extras/icon/emoticon_unhappy.png new file mode 100755 index 000000000..fd5d030ef Binary files /dev/null and b/www/extras/icon/emoticon_unhappy.png differ diff --git a/www/extras/icon/emoticon_waii.png b/www/extras/icon/emoticon_waii.png new file mode 100755 index 000000000..458f93611 Binary files /dev/null and b/www/extras/icon/emoticon_waii.png differ diff --git a/www/extras/icon/emoticon_wink.png b/www/extras/icon/emoticon_wink.png new file mode 100755 index 000000000..a631949b5 Binary files /dev/null and b/www/extras/icon/emoticon_wink.png differ diff --git a/www/extras/icon/error.png b/www/extras/icon/error.png new file mode 100755 index 000000000..628cf2dae Binary files /dev/null and b/www/extras/icon/error.png differ diff --git a/www/extras/icon/error_add.png b/www/extras/icon/error_add.png new file mode 100755 index 000000000..4c974840e Binary files /dev/null and b/www/extras/icon/error_add.png differ diff --git a/www/extras/icon/error_delete.png b/www/extras/icon/error_delete.png new file mode 100755 index 000000000..7f78bcc8e Binary files /dev/null and b/www/extras/icon/error_delete.png differ diff --git a/www/extras/icon/error_go.png b/www/extras/icon/error_go.png new file mode 100755 index 000000000..caa1838d7 Binary files /dev/null and b/www/extras/icon/error_go.png differ diff --git a/www/extras/icon/exclamation.png b/www/extras/icon/exclamation.png new file mode 100755 index 000000000..c37bd062e Binary files /dev/null and b/www/extras/icon/exclamation.png differ diff --git a/www/extras/icon/eye.png b/www/extras/icon/eye.png new file mode 100755 index 000000000..564a1a971 Binary files /dev/null and b/www/extras/icon/eye.png differ diff --git a/www/extras/icon/feed.png b/www/extras/icon/feed.png new file mode 100755 index 000000000..315c4f4fa Binary files /dev/null and b/www/extras/icon/feed.png differ diff --git a/www/extras/icon/feed_add.png b/www/extras/icon/feed_add.png new file mode 100755 index 000000000..e77d46e8a Binary files /dev/null and b/www/extras/icon/feed_add.png differ diff --git a/www/extras/icon/feed_delete.png b/www/extras/icon/feed_delete.png new file mode 100755 index 000000000..5e332b4cc Binary files /dev/null and b/www/extras/icon/feed_delete.png differ diff --git a/www/extras/icon/feed_disk.png b/www/extras/icon/feed_disk.png new file mode 100755 index 000000000..a158c998d Binary files /dev/null and b/www/extras/icon/feed_disk.png differ diff --git a/www/extras/icon/feed_edit.png b/www/extras/icon/feed_edit.png new file mode 100755 index 000000000..f1fde7a9c Binary files /dev/null and b/www/extras/icon/feed_edit.png differ diff --git a/www/extras/icon/feed_error.png b/www/extras/icon/feed_error.png new file mode 100755 index 000000000..c0a801c7f Binary files /dev/null and b/www/extras/icon/feed_error.png differ diff --git a/www/extras/icon/feed_go.png b/www/extras/icon/feed_go.png new file mode 100755 index 000000000..f2eed1ecf Binary files /dev/null and b/www/extras/icon/feed_go.png differ diff --git a/www/extras/icon/feed_key.png b/www/extras/icon/feed_key.png new file mode 100755 index 000000000..156bfa971 Binary files /dev/null and b/www/extras/icon/feed_key.png differ diff --git a/www/extras/icon/feed_link.png b/www/extras/icon/feed_link.png new file mode 100755 index 000000000..c45a53459 Binary files /dev/null and b/www/extras/icon/feed_link.png differ diff --git a/www/extras/icon/feed_magnify.png b/www/extras/icon/feed_magnify.png new file mode 100755 index 000000000..3023695d8 Binary files /dev/null and b/www/extras/icon/feed_magnify.png differ diff --git a/www/extras/icon/female.png b/www/extras/icon/female.png new file mode 100755 index 000000000..f92958e6a Binary files /dev/null and b/www/extras/icon/female.png differ diff --git a/www/extras/icon/film.png b/www/extras/icon/film.png new file mode 100755 index 000000000..b0ce7bb19 Binary files /dev/null and b/www/extras/icon/film.png differ diff --git a/www/extras/icon/film_add.png b/www/extras/icon/film_add.png new file mode 100755 index 000000000..40d681feb Binary files /dev/null and b/www/extras/icon/film_add.png differ diff --git a/www/extras/icon/film_delete.png b/www/extras/icon/film_delete.png new file mode 100755 index 000000000..23a2508c5 Binary files /dev/null and b/www/extras/icon/film_delete.png differ diff --git a/www/extras/icon/film_edit.png b/www/extras/icon/film_edit.png new file mode 100755 index 000000000..af66b73f2 Binary files /dev/null and b/www/extras/icon/film_edit.png differ diff --git a/www/extras/icon/film_error.png b/www/extras/icon/film_error.png new file mode 100755 index 000000000..88f3d69bc Binary files /dev/null and b/www/extras/icon/film_error.png differ diff --git a/www/extras/icon/film_go.png b/www/extras/icon/film_go.png new file mode 100755 index 000000000..dd0168ea9 Binary files /dev/null and b/www/extras/icon/film_go.png differ diff --git a/www/extras/icon/film_key.png b/www/extras/icon/film_key.png new file mode 100755 index 000000000..58921624e Binary files /dev/null and b/www/extras/icon/film_key.png differ diff --git a/www/extras/icon/film_link.png b/www/extras/icon/film_link.png new file mode 100755 index 000000000..0f24e86e4 Binary files /dev/null and b/www/extras/icon/film_link.png differ diff --git a/www/extras/icon/film_save.png b/www/extras/icon/film_save.png new file mode 100755 index 000000000..bc8c0d353 Binary files /dev/null and b/www/extras/icon/film_save.png differ diff --git a/www/extras/icon/find.png b/www/extras/icon/find.png new file mode 100755 index 000000000..154747964 Binary files /dev/null and b/www/extras/icon/find.png differ diff --git a/www/extras/icon/flag_blue.png b/www/extras/icon/flag_blue.png new file mode 100755 index 000000000..003924f5e Binary files /dev/null and b/www/extras/icon/flag_blue.png differ diff --git a/www/extras/icon/flag_green.png b/www/extras/icon/flag_green.png new file mode 100755 index 000000000..e4bc611f8 Binary files /dev/null and b/www/extras/icon/flag_green.png differ diff --git a/www/extras/icon/flag_orange.png b/www/extras/icon/flag_orange.png new file mode 100755 index 000000000..e63202420 Binary files /dev/null and b/www/extras/icon/flag_orange.png differ diff --git a/www/extras/icon/flag_pink.png b/www/extras/icon/flag_pink.png new file mode 100755 index 000000000..5f15e526c Binary files /dev/null and b/www/extras/icon/flag_pink.png differ diff --git a/www/extras/icon/flag_purple.png b/www/extras/icon/flag_purple.png new file mode 100755 index 000000000..d06986644 Binary files /dev/null and b/www/extras/icon/flag_purple.png differ diff --git a/www/extras/icon/flag_red.png b/www/extras/icon/flag_red.png new file mode 100755 index 000000000..e8a602da7 Binary files /dev/null and b/www/extras/icon/flag_red.png differ diff --git a/www/extras/icon/flag_yellow.png b/www/extras/icon/flag_yellow.png new file mode 100755 index 000000000..14c89a543 Binary files /dev/null and b/www/extras/icon/flag_yellow.png differ diff --git a/www/extras/icon/folder.png b/www/extras/icon/folder.png new file mode 100755 index 000000000..784e8fa48 Binary files /dev/null and b/www/extras/icon/folder.png differ diff --git a/www/extras/icon/folder_add.png b/www/extras/icon/folder_add.png new file mode 100755 index 000000000..529fe8fe0 Binary files /dev/null and b/www/extras/icon/folder_add.png differ diff --git a/www/extras/icon/folder_bell.png b/www/extras/icon/folder_bell.png new file mode 100755 index 000000000..d04dd7f51 Binary files /dev/null and b/www/extras/icon/folder_bell.png differ diff --git a/www/extras/icon/folder_brick.png b/www/extras/icon/folder_brick.png new file mode 100755 index 000000000..5dea9769a Binary files /dev/null and b/www/extras/icon/folder_brick.png differ diff --git a/www/extras/icon/folder_bug.png b/www/extras/icon/folder_bug.png new file mode 100755 index 000000000..4f791b684 Binary files /dev/null and b/www/extras/icon/folder_bug.png differ diff --git a/www/extras/icon/folder_camera.png b/www/extras/icon/folder_camera.png new file mode 100755 index 000000000..c9519416d Binary files /dev/null and b/www/extras/icon/folder_camera.png differ diff --git a/www/extras/icon/folder_database.png b/www/extras/icon/folder_database.png new file mode 100755 index 000000000..5193e2eff Binary files /dev/null and b/www/extras/icon/folder_database.png differ diff --git a/www/extras/icon/folder_delete.png b/www/extras/icon/folder_delete.png new file mode 100755 index 000000000..112b01638 Binary files /dev/null and b/www/extras/icon/folder_delete.png differ diff --git a/www/extras/icon/folder_edit.png b/www/extras/icon/folder_edit.png new file mode 100755 index 000000000..ad669cc78 Binary files /dev/null and b/www/extras/icon/folder_edit.png differ diff --git a/www/extras/icon/folder_error.png b/www/extras/icon/folder_error.png new file mode 100755 index 000000000..1af880951 Binary files /dev/null and b/www/extras/icon/folder_error.png differ diff --git a/www/extras/icon/folder_explore.png b/www/extras/icon/folder_explore.png new file mode 100755 index 000000000..0ba939184 Binary files /dev/null and b/www/extras/icon/folder_explore.png differ diff --git a/www/extras/icon/folder_feed.png b/www/extras/icon/folder_feed.png new file mode 100755 index 000000000..d06ee51e4 Binary files /dev/null and b/www/extras/icon/folder_feed.png differ diff --git a/www/extras/icon/folder_find.png b/www/extras/icon/folder_find.png new file mode 100755 index 000000000..c64e2ee67 Binary files /dev/null and b/www/extras/icon/folder_find.png differ diff --git a/www/extras/icon/folder_go.png b/www/extras/icon/folder_go.png new file mode 100755 index 000000000..34a736f70 Binary files /dev/null and b/www/extras/icon/folder_go.png differ diff --git a/www/extras/icon/folder_heart.png b/www/extras/icon/folder_heart.png new file mode 100755 index 000000000..56d7da1d6 Binary files /dev/null and b/www/extras/icon/folder_heart.png differ diff --git a/www/extras/icon/folder_image.png b/www/extras/icon/folder_image.png new file mode 100755 index 000000000..d5df75bb6 Binary files /dev/null and b/www/extras/icon/folder_image.png differ diff --git a/www/extras/icon/folder_key.png b/www/extras/icon/folder_key.png new file mode 100755 index 000000000..fb9b4c2bb Binary files /dev/null and b/www/extras/icon/folder_key.png differ diff --git a/www/extras/icon/folder_lightbulb.png b/www/extras/icon/folder_lightbulb.png new file mode 100755 index 000000000..f367a5117 Binary files /dev/null and b/www/extras/icon/folder_lightbulb.png differ diff --git a/www/extras/icon/folder_link.png b/www/extras/icon/folder_link.png new file mode 100755 index 000000000..b9b75f6c3 Binary files /dev/null and b/www/extras/icon/folder_link.png differ diff --git a/www/extras/icon/folder_magnify.png b/www/extras/icon/folder_magnify.png new file mode 100755 index 000000000..0a3e7985c Binary files /dev/null and b/www/extras/icon/folder_magnify.png differ diff --git a/www/extras/icon/folder_page.png b/www/extras/icon/folder_page.png new file mode 100755 index 000000000..1ef6e1143 Binary files /dev/null and b/www/extras/icon/folder_page.png differ diff --git a/www/extras/icon/folder_page_white.png b/www/extras/icon/folder_page_white.png new file mode 100755 index 000000000..14d6b6181 Binary files /dev/null and b/www/extras/icon/folder_page_white.png differ diff --git a/www/extras/icon/folder_palette.png b/www/extras/icon/folder_palette.png new file mode 100755 index 000000000..ba12fe8ac Binary files /dev/null and b/www/extras/icon/folder_palette.png differ diff --git a/www/extras/icon/folder_picture.png b/www/extras/icon/folder_picture.png new file mode 100755 index 000000000..052b33638 Binary files /dev/null and b/www/extras/icon/folder_picture.png differ diff --git a/www/extras/icon/folder_star.png b/www/extras/icon/folder_star.png new file mode 100755 index 000000000..448e46fd5 Binary files /dev/null and b/www/extras/icon/folder_star.png differ diff --git a/www/extras/icon/folder_table.png b/www/extras/icon/folder_table.png new file mode 100755 index 000000000..473cee355 Binary files /dev/null and b/www/extras/icon/folder_table.png differ diff --git a/www/extras/icon/folder_user.png b/www/extras/icon/folder_user.png new file mode 100755 index 000000000..f021c3e12 Binary files /dev/null and b/www/extras/icon/folder_user.png differ diff --git a/www/extras/icon/folder_wrench.png b/www/extras/icon/folder_wrench.png new file mode 100755 index 000000000..ea3404e03 Binary files /dev/null and b/www/extras/icon/folder_wrench.png differ diff --git a/www/extras/icon/font.png b/www/extras/icon/font.png new file mode 100755 index 000000000..b7960db9d Binary files /dev/null and b/www/extras/icon/font.png differ diff --git a/www/extras/icon/font_add.png b/www/extras/icon/font_add.png new file mode 100755 index 000000000..b709ebaef Binary files /dev/null and b/www/extras/icon/font_add.png differ diff --git a/www/extras/icon/font_delete.png b/www/extras/icon/font_delete.png new file mode 100755 index 000000000..1d6124d6e Binary files /dev/null and b/www/extras/icon/font_delete.png differ diff --git a/www/extras/icon/font_go.png b/www/extras/icon/font_go.png new file mode 100755 index 000000000..75eba80d6 Binary files /dev/null and b/www/extras/icon/font_go.png differ diff --git a/www/extras/icon/group.png b/www/extras/icon/group.png new file mode 100755 index 000000000..7fb4e1f1e Binary files /dev/null and b/www/extras/icon/group.png differ diff --git a/www/extras/icon/group_add.png b/www/extras/icon/group_add.png new file mode 100755 index 000000000..06c5350cb Binary files /dev/null and b/www/extras/icon/group_add.png differ diff --git a/www/extras/icon/group_delete.png b/www/extras/icon/group_delete.png new file mode 100755 index 000000000..4489ca238 Binary files /dev/null and b/www/extras/icon/group_delete.png differ diff --git a/www/extras/icon/group_edit.png b/www/extras/icon/group_edit.png new file mode 100755 index 000000000..c88b945b0 Binary files /dev/null and b/www/extras/icon/group_edit.png differ diff --git a/www/extras/icon/group_error.png b/www/extras/icon/group_error.png new file mode 100755 index 000000000..7364a13cb Binary files /dev/null and b/www/extras/icon/group_error.png differ diff --git a/www/extras/icon/group_gear.png b/www/extras/icon/group_gear.png new file mode 100755 index 000000000..2544f2e63 Binary files /dev/null and b/www/extras/icon/group_gear.png differ diff --git a/www/extras/icon/group_go.png b/www/extras/icon/group_go.png new file mode 100755 index 000000000..1f5233308 Binary files /dev/null and b/www/extras/icon/group_go.png differ diff --git a/www/extras/icon/group_key.png b/www/extras/icon/group_key.png new file mode 100755 index 000000000..257f111ca Binary files /dev/null and b/www/extras/icon/group_key.png differ diff --git a/www/extras/icon/group_link.png b/www/extras/icon/group_link.png new file mode 100755 index 000000000..c77ed8812 Binary files /dev/null and b/www/extras/icon/group_link.png differ diff --git a/www/extras/icon/heart.png b/www/extras/icon/heart.png new file mode 100755 index 000000000..d9ee53e59 Binary files /dev/null and b/www/extras/icon/heart.png differ diff --git a/www/extras/icon/heart_add.png b/www/extras/icon/heart_add.png new file mode 100755 index 000000000..d4195ff80 Binary files /dev/null and b/www/extras/icon/heart_add.png differ diff --git a/www/extras/icon/heart_delete.png b/www/extras/icon/heart_delete.png new file mode 100755 index 000000000..ce523e343 Binary files /dev/null and b/www/extras/icon/heart_delete.png differ diff --git a/www/extras/icon/help.png b/www/extras/icon/help.png new file mode 100755 index 000000000..5c870176d Binary files /dev/null and b/www/extras/icon/help.png differ diff --git a/www/extras/icon/hourglass.png b/www/extras/icon/hourglass.png new file mode 100755 index 000000000..57b03ce7a Binary files /dev/null and b/www/extras/icon/hourglass.png differ diff --git a/www/extras/icon/hourglass_add.png b/www/extras/icon/hourglass_add.png new file mode 100755 index 000000000..170dfff1e Binary files /dev/null and b/www/extras/icon/hourglass_add.png differ diff --git a/www/extras/icon/hourglass_delete.png b/www/extras/icon/hourglass_delete.png new file mode 100755 index 000000000..4b1337be8 Binary files /dev/null and b/www/extras/icon/hourglass_delete.png differ diff --git a/www/extras/icon/hourglass_go.png b/www/extras/icon/hourglass_go.png new file mode 100755 index 000000000..b2d3a98bc Binary files /dev/null and b/www/extras/icon/hourglass_go.png differ diff --git a/www/extras/icon/hourglass_link.png b/www/extras/icon/hourglass_link.png new file mode 100755 index 000000000..ecc59b0ab Binary files /dev/null and b/www/extras/icon/hourglass_link.png differ diff --git a/www/extras/icon/house.png b/www/extras/icon/house.png new file mode 100755 index 000000000..fed62219f Binary files /dev/null and b/www/extras/icon/house.png differ diff --git a/www/extras/icon/house_go.png b/www/extras/icon/house_go.png new file mode 100755 index 000000000..5457dbd3c Binary files /dev/null and b/www/extras/icon/house_go.png differ diff --git a/www/extras/icon/house_link.png b/www/extras/icon/house_link.png new file mode 100755 index 000000000..be2c2719e Binary files /dev/null and b/www/extras/icon/house_link.png differ diff --git a/www/extras/icon/html.png b/www/extras/icon/html.png new file mode 100755 index 000000000..55d1072ea Binary files /dev/null and b/www/extras/icon/html.png differ diff --git a/www/extras/icon/html_add.png b/www/extras/icon/html_add.png new file mode 100755 index 000000000..f1c08b7d6 Binary files /dev/null and b/www/extras/icon/html_add.png differ diff --git a/www/extras/icon/html_delete.png b/www/extras/icon/html_delete.png new file mode 100755 index 000000000..1bd28489e Binary files /dev/null and b/www/extras/icon/html_delete.png differ diff --git a/www/extras/icon/html_go.png b/www/extras/icon/html_go.png new file mode 100755 index 000000000..a95cede1e Binary files /dev/null and b/www/extras/icon/html_go.png differ diff --git a/www/extras/icon/html_valid.png b/www/extras/icon/html_valid.png new file mode 100755 index 000000000..71cec9249 Binary files /dev/null and b/www/extras/icon/html_valid.png differ diff --git a/www/extras/icon/image.png b/www/extras/icon/image.png new file mode 100755 index 000000000..fc3c393ca Binary files /dev/null and b/www/extras/icon/image.png differ diff --git a/www/extras/icon/image_add.png b/www/extras/icon/image_add.png new file mode 100755 index 000000000..fc5d6139e Binary files /dev/null and b/www/extras/icon/image_add.png differ diff --git a/www/extras/icon/image_delete.png b/www/extras/icon/image_delete.png new file mode 100755 index 000000000..c260e1d96 Binary files /dev/null and b/www/extras/icon/image_delete.png differ diff --git a/www/extras/icon/image_edit.png b/www/extras/icon/image_edit.png new file mode 100755 index 000000000..0aa4cc651 Binary files /dev/null and b/www/extras/icon/image_edit.png differ diff --git a/www/extras/icon/image_link.png b/www/extras/icon/image_link.png new file mode 100755 index 000000000..4bdb3541e Binary files /dev/null and b/www/extras/icon/image_link.png differ diff --git a/www/extras/icon/images.png b/www/extras/icon/images.png new file mode 100755 index 000000000..184860d1e Binary files /dev/null and b/www/extras/icon/images.png differ diff --git a/www/extras/icon/information.png b/www/extras/icon/information.png new file mode 100755 index 000000000..12cd1aef9 Binary files /dev/null and b/www/extras/icon/information.png differ diff --git a/www/extras/icon/ipod.png b/www/extras/icon/ipod.png new file mode 100755 index 000000000..3f768da50 Binary files /dev/null and b/www/extras/icon/ipod.png differ diff --git a/www/extras/icon/ipod_cast.png b/www/extras/icon/ipod_cast.png new file mode 100755 index 000000000..6f6d3406c Binary files /dev/null and b/www/extras/icon/ipod_cast.png differ diff --git a/www/extras/icon/ipod_cast_add.png b/www/extras/icon/ipod_cast_add.png new file mode 100755 index 000000000..c3257f5f1 Binary files /dev/null and b/www/extras/icon/ipod_cast_add.png differ diff --git a/www/extras/icon/ipod_cast_delete.png b/www/extras/icon/ipod_cast_delete.png new file mode 100755 index 000000000..377ab6950 Binary files /dev/null and b/www/extras/icon/ipod_cast_delete.png differ diff --git a/www/extras/icon/ipod_sound.png b/www/extras/icon/ipod_sound.png new file mode 100755 index 000000000..fef6e8bad Binary files /dev/null and b/www/extras/icon/ipod_sound.png differ diff --git a/www/extras/icon/joystick.png b/www/extras/icon/joystick.png new file mode 100755 index 000000000..62168f56f Binary files /dev/null and b/www/extras/icon/joystick.png differ diff --git a/www/extras/icon/joystick_add.png b/www/extras/icon/joystick_add.png new file mode 100755 index 000000000..77e710772 Binary files /dev/null and b/www/extras/icon/joystick_add.png differ diff --git a/www/extras/icon/joystick_delete.png b/www/extras/icon/joystick_delete.png new file mode 100755 index 000000000..5d44b5925 Binary files /dev/null and b/www/extras/icon/joystick_delete.png differ diff --git a/www/extras/icon/joystick_error.png b/www/extras/icon/joystick_error.png new file mode 100755 index 000000000..b32149e27 Binary files /dev/null and b/www/extras/icon/joystick_error.png differ diff --git a/www/extras/icon/key.png b/www/extras/icon/key.png new file mode 100755 index 000000000..4ec1a9281 Binary files /dev/null and b/www/extras/icon/key.png differ diff --git a/www/extras/icon/key_add.png b/www/extras/icon/key_add.png new file mode 100755 index 000000000..d40740396 Binary files /dev/null and b/www/extras/icon/key_add.png differ diff --git a/www/extras/icon/key_delete.png b/www/extras/icon/key_delete.png new file mode 100755 index 000000000..00dec80d8 Binary files /dev/null and b/www/extras/icon/key_delete.png differ diff --git a/www/extras/icon/key_go.png b/www/extras/icon/key_go.png new file mode 100755 index 000000000..30b0dc316 Binary files /dev/null and b/www/extras/icon/key_go.png differ diff --git a/www/extras/icon/keyboard.png b/www/extras/icon/keyboard.png new file mode 100755 index 000000000..898d402d7 Binary files /dev/null and b/www/extras/icon/keyboard.png differ diff --git a/www/extras/icon/keyboard_add.png b/www/extras/icon/keyboard_add.png new file mode 100755 index 000000000..26938dd0c Binary files /dev/null and b/www/extras/icon/keyboard_add.png differ diff --git a/www/extras/icon/keyboard_delete.png b/www/extras/icon/keyboard_delete.png new file mode 100755 index 000000000..1786ed5be Binary files /dev/null and b/www/extras/icon/keyboard_delete.png differ diff --git a/www/extras/icon/keyboard_magnify.png b/www/extras/icon/keyboard_magnify.png new file mode 100755 index 000000000..928fc17b4 Binary files /dev/null and b/www/extras/icon/keyboard_magnify.png differ diff --git a/www/extras/icon/layers.png b/www/extras/icon/layers.png new file mode 100755 index 000000000..00818f636 Binary files /dev/null and b/www/extras/icon/layers.png differ diff --git a/www/extras/icon/layout.png b/www/extras/icon/layout.png new file mode 100755 index 000000000..ea086b042 Binary files /dev/null and b/www/extras/icon/layout.png differ diff --git a/www/extras/icon/layout_add.png b/www/extras/icon/layout_add.png new file mode 100755 index 000000000..62037221c Binary files /dev/null and b/www/extras/icon/layout_add.png differ diff --git a/www/extras/icon/layout_content.png b/www/extras/icon/layout_content.png new file mode 100755 index 000000000..b4aaad9a4 Binary files /dev/null and b/www/extras/icon/layout_content.png differ diff --git a/www/extras/icon/layout_delete.png b/www/extras/icon/layout_delete.png new file mode 100755 index 000000000..4bd45f131 Binary files /dev/null and b/www/extras/icon/layout_delete.png differ diff --git a/www/extras/icon/layout_edit.png b/www/extras/icon/layout_edit.png new file mode 100755 index 000000000..ab3100b5c Binary files /dev/null and b/www/extras/icon/layout_edit.png differ diff --git a/www/extras/icon/layout_error.png b/www/extras/icon/layout_error.png new file mode 100755 index 000000000..5b5acea92 Binary files /dev/null and b/www/extras/icon/layout_error.png differ diff --git a/www/extras/icon/layout_header.png b/www/extras/icon/layout_header.png new file mode 100755 index 000000000..c6ea7f230 Binary files /dev/null and b/www/extras/icon/layout_header.png differ diff --git a/www/extras/icon/layout_link.png b/www/extras/icon/layout_link.png new file mode 100755 index 000000000..3445d4206 Binary files /dev/null and b/www/extras/icon/layout_link.png differ diff --git a/www/extras/icon/layout_sidebar.png b/www/extras/icon/layout_sidebar.png new file mode 100755 index 000000000..3be27bb9b Binary files /dev/null and b/www/extras/icon/layout_sidebar.png differ diff --git a/www/extras/icon/lightbulb.png b/www/extras/icon/lightbulb.png new file mode 100755 index 000000000..d22fde8ba Binary files /dev/null and b/www/extras/icon/lightbulb.png differ diff --git a/www/extras/icon/lightbulb_add.png b/www/extras/icon/lightbulb_add.png new file mode 100755 index 000000000..0dd848bd6 Binary files /dev/null and b/www/extras/icon/lightbulb_add.png differ diff --git a/www/extras/icon/lightbulb_delete.png b/www/extras/icon/lightbulb_delete.png new file mode 100755 index 000000000..f4781daa8 Binary files /dev/null and b/www/extras/icon/lightbulb_delete.png differ diff --git a/www/extras/icon/lightbulb_off.png b/www/extras/icon/lightbulb_off.png new file mode 100755 index 000000000..e95b8c5b1 Binary files /dev/null and b/www/extras/icon/lightbulb_off.png differ diff --git a/www/extras/icon/lightning.png b/www/extras/icon/lightning.png new file mode 100755 index 000000000..9680afd12 Binary files /dev/null and b/www/extras/icon/lightning.png differ diff --git a/www/extras/icon/lightning_add.png b/www/extras/icon/lightning_add.png new file mode 100755 index 000000000..dac3c9050 Binary files /dev/null and b/www/extras/icon/lightning_add.png differ diff --git a/www/extras/icon/lightning_delete.png b/www/extras/icon/lightning_delete.png new file mode 100755 index 000000000..dfe277050 Binary files /dev/null and b/www/extras/icon/lightning_delete.png differ diff --git a/www/extras/icon/lightning_go.png b/www/extras/icon/lightning_go.png new file mode 100755 index 000000000..29039e6a8 Binary files /dev/null and b/www/extras/icon/lightning_go.png differ diff --git a/www/extras/icon/link.png b/www/extras/icon/link.png new file mode 100755 index 000000000..25eacb7c2 Binary files /dev/null and b/www/extras/icon/link.png differ diff --git a/www/extras/icon/link_add.png b/www/extras/icon/link_add.png new file mode 100755 index 000000000..00be352c5 Binary files /dev/null and b/www/extras/icon/link_add.png differ diff --git a/www/extras/icon/link_break.png b/www/extras/icon/link_break.png new file mode 100755 index 000000000..523575306 Binary files /dev/null and b/www/extras/icon/link_break.png differ diff --git a/www/extras/icon/link_delete.png b/www/extras/icon/link_delete.png new file mode 100755 index 000000000..f66e2974e Binary files /dev/null and b/www/extras/icon/link_delete.png differ diff --git a/www/extras/icon/link_edit.png b/www/extras/icon/link_edit.png new file mode 100755 index 000000000..5b3aed090 Binary files /dev/null and b/www/extras/icon/link_edit.png differ diff --git a/www/extras/icon/link_error.png b/www/extras/icon/link_error.png new file mode 100755 index 000000000..ab694b1ac Binary files /dev/null and b/www/extras/icon/link_error.png differ diff --git a/www/extras/icon/link_go.png b/www/extras/icon/link_go.png new file mode 100755 index 000000000..ae8cae806 Binary files /dev/null and b/www/extras/icon/link_go.png differ diff --git a/www/extras/icon/lock.png b/www/extras/icon/lock.png new file mode 100755 index 000000000..2ebc4f6f9 Binary files /dev/null and b/www/extras/icon/lock.png differ diff --git a/www/extras/icon/lock_add.png b/www/extras/icon/lock_add.png new file mode 100755 index 000000000..a7b566b1f Binary files /dev/null and b/www/extras/icon/lock_add.png differ diff --git a/www/extras/icon/lock_break.png b/www/extras/icon/lock_break.png new file mode 100755 index 000000000..13578ab5a Binary files /dev/null and b/www/extras/icon/lock_break.png differ diff --git a/www/extras/icon/lock_delete.png b/www/extras/icon/lock_delete.png new file mode 100755 index 000000000..ecb50a93f Binary files /dev/null and b/www/extras/icon/lock_delete.png differ diff --git a/www/extras/icon/lock_edit.png b/www/extras/icon/lock_edit.png new file mode 100755 index 000000000..116aa5b7f Binary files /dev/null and b/www/extras/icon/lock_edit.png differ diff --git a/www/extras/icon/lock_go.png b/www/extras/icon/lock_go.png new file mode 100755 index 000000000..8c7c89b26 Binary files /dev/null and b/www/extras/icon/lock_go.png differ diff --git a/www/extras/icon/lock_open.png b/www/extras/icon/lock_open.png new file mode 100755 index 000000000..a471765ff Binary files /dev/null and b/www/extras/icon/lock_open.png differ diff --git a/www/extras/icon/lorry.png b/www/extras/icon/lorry.png new file mode 100755 index 000000000..8f95f5a5d Binary files /dev/null and b/www/extras/icon/lorry.png differ diff --git a/www/extras/icon/lorry_add.png b/www/extras/icon/lorry_add.png new file mode 100755 index 000000000..a2c512499 Binary files /dev/null and b/www/extras/icon/lorry_add.png differ diff --git a/www/extras/icon/lorry_delete.png b/www/extras/icon/lorry_delete.png new file mode 100755 index 000000000..66217f526 Binary files /dev/null and b/www/extras/icon/lorry_delete.png differ diff --git a/www/extras/icon/lorry_error.png b/www/extras/icon/lorry_error.png new file mode 100755 index 000000000..3619ead96 Binary files /dev/null and b/www/extras/icon/lorry_error.png differ diff --git a/www/extras/icon/lorry_flatbed.png b/www/extras/icon/lorry_flatbed.png new file mode 100755 index 000000000..8b20f5503 Binary files /dev/null and b/www/extras/icon/lorry_flatbed.png differ diff --git a/www/extras/icon/lorry_go.png b/www/extras/icon/lorry_go.png new file mode 100755 index 000000000..1c296a6aa Binary files /dev/null and b/www/extras/icon/lorry_go.png differ diff --git a/www/extras/icon/lorry_link.png b/www/extras/icon/lorry_link.png new file mode 100755 index 000000000..5e6663e5c Binary files /dev/null and b/www/extras/icon/lorry_link.png differ diff --git a/www/extras/icon/magifier_zoom_out.png b/www/extras/icon/magifier_zoom_out.png new file mode 100755 index 000000000..81f28199a Binary files /dev/null and b/www/extras/icon/magifier_zoom_out.png differ diff --git a/www/extras/icon/magnifier.png b/www/extras/icon/magnifier.png new file mode 100755 index 000000000..cf3d97f75 Binary files /dev/null and b/www/extras/icon/magnifier.png differ diff --git a/www/extras/icon/magnifier_zoom_in.png b/www/extras/icon/magnifier_zoom_in.png new file mode 100755 index 000000000..af4fe0747 Binary files /dev/null and b/www/extras/icon/magnifier_zoom_in.png differ diff --git a/www/extras/icon/male.png b/www/extras/icon/male.png new file mode 100755 index 000000000..25d6ea91d Binary files /dev/null and b/www/extras/icon/male.png differ diff --git a/www/extras/icon/map.png b/www/extras/icon/map.png new file mode 100755 index 000000000..f90ef25ec Binary files /dev/null and b/www/extras/icon/map.png differ diff --git a/www/extras/icon/map_add.png b/www/extras/icon/map_add.png new file mode 100755 index 000000000..2b72da06a Binary files /dev/null and b/www/extras/icon/map_add.png differ diff --git a/www/extras/icon/map_delete.png b/www/extras/icon/map_delete.png new file mode 100755 index 000000000..e74402f9c Binary files /dev/null and b/www/extras/icon/map_delete.png differ diff --git a/www/extras/icon/map_edit.png b/www/extras/icon/map_edit.png new file mode 100755 index 000000000..93d4d7e5f Binary files /dev/null and b/www/extras/icon/map_edit.png differ diff --git a/www/extras/icon/map_go.png b/www/extras/icon/map_go.png new file mode 100755 index 000000000..11eab26db Binary files /dev/null and b/www/extras/icon/map_go.png differ diff --git a/www/extras/icon/map_magnify.png b/www/extras/icon/map_magnify.png new file mode 100755 index 000000000..7184c9ddf Binary files /dev/null and b/www/extras/icon/map_magnify.png differ diff --git a/www/extras/icon/medal_bronze_1.png b/www/extras/icon/medal_bronze_1.png new file mode 100755 index 000000000..5f8a6d65d Binary files /dev/null and b/www/extras/icon/medal_bronze_1.png differ diff --git a/www/extras/icon/medal_bronze_2.png b/www/extras/icon/medal_bronze_2.png new file mode 100755 index 000000000..623d68c5d Binary files /dev/null and b/www/extras/icon/medal_bronze_2.png differ diff --git a/www/extras/icon/medal_bronze_3.png b/www/extras/icon/medal_bronze_3.png new file mode 100755 index 000000000..ed3f43eb0 Binary files /dev/null and b/www/extras/icon/medal_bronze_3.png differ diff --git a/www/extras/icon/medal_bronze_add.png b/www/extras/icon/medal_bronze_add.png new file mode 100755 index 000000000..8487b2c19 Binary files /dev/null and b/www/extras/icon/medal_bronze_add.png differ diff --git a/www/extras/icon/medal_bronze_delete.png b/www/extras/icon/medal_bronze_delete.png new file mode 100755 index 000000000..d32aed727 Binary files /dev/null and b/www/extras/icon/medal_bronze_delete.png differ diff --git a/www/extras/icon/medal_gold_1.png b/www/extras/icon/medal_gold_1.png new file mode 100755 index 000000000..87584dc95 Binary files /dev/null and b/www/extras/icon/medal_gold_1.png differ diff --git a/www/extras/icon/medal_gold_2.png b/www/extras/icon/medal_gold_2.png new file mode 100755 index 000000000..fa3a15dd6 Binary files /dev/null and b/www/extras/icon/medal_gold_2.png differ diff --git a/www/extras/icon/medal_gold_3.png b/www/extras/icon/medal_gold_3.png new file mode 100755 index 000000000..ef1b08b92 Binary files /dev/null and b/www/extras/icon/medal_gold_3.png differ diff --git a/www/extras/icon/medal_gold_add.png b/www/extras/icon/medal_gold_add.png new file mode 100755 index 000000000..dcade0d8d Binary files /dev/null and b/www/extras/icon/medal_gold_add.png differ diff --git a/www/extras/icon/medal_gold_delete.png b/www/extras/icon/medal_gold_delete.png new file mode 100755 index 000000000..84b06d5bf Binary files /dev/null and b/www/extras/icon/medal_gold_delete.png differ diff --git a/www/extras/icon/medal_silver_1.png b/www/extras/icon/medal_silver_1.png new file mode 100755 index 000000000..75a64da32 Binary files /dev/null and b/www/extras/icon/medal_silver_1.png differ diff --git a/www/extras/icon/medal_silver_2.png b/www/extras/icon/medal_silver_2.png new file mode 100755 index 000000000..2e0fe75c9 Binary files /dev/null and b/www/extras/icon/medal_silver_2.png differ diff --git a/www/extras/icon/medal_silver_3.png b/www/extras/icon/medal_silver_3.png new file mode 100755 index 000000000..e385b5467 Binary files /dev/null and b/www/extras/icon/medal_silver_3.png differ diff --git a/www/extras/icon/medal_silver_add.png b/www/extras/icon/medal_silver_add.png new file mode 100755 index 000000000..b0633fa0e Binary files /dev/null and b/www/extras/icon/medal_silver_add.png differ diff --git a/www/extras/icon/medal_silver_delete.png b/www/extras/icon/medal_silver_delete.png new file mode 100755 index 000000000..06cab4679 Binary files /dev/null and b/www/extras/icon/medal_silver_delete.png differ diff --git a/www/extras/icon/money.png b/www/extras/icon/money.png new file mode 100755 index 000000000..42c52d05f Binary files /dev/null and b/www/extras/icon/money.png differ diff --git a/www/extras/icon/money_add.png b/www/extras/icon/money_add.png new file mode 100755 index 000000000..588fa9d07 Binary files /dev/null and b/www/extras/icon/money_add.png differ diff --git a/www/extras/icon/money_delete.png b/www/extras/icon/money_delete.png new file mode 100755 index 000000000..eae2c524b Binary files /dev/null and b/www/extras/icon/money_delete.png differ diff --git a/www/extras/icon/money_dollar.png b/www/extras/icon/money_dollar.png new file mode 100755 index 000000000..59af16382 Binary files /dev/null and b/www/extras/icon/money_dollar.png differ diff --git a/www/extras/icon/money_euro.png b/www/extras/icon/money_euro.png new file mode 100755 index 000000000..b322ba929 Binary files /dev/null and b/www/extras/icon/money_euro.png differ diff --git a/www/extras/icon/money_pound.png b/www/extras/icon/money_pound.png new file mode 100755 index 000000000..b71136463 Binary files /dev/null and b/www/extras/icon/money_pound.png differ diff --git a/www/extras/icon/money_yen.png b/www/extras/icon/money_yen.png new file mode 100755 index 000000000..228a6778b Binary files /dev/null and b/www/extras/icon/money_yen.png differ diff --git a/www/extras/icon/monitor.png b/www/extras/icon/monitor.png new file mode 100755 index 000000000..d040bd022 Binary files /dev/null and b/www/extras/icon/monitor.png differ diff --git a/www/extras/icon/monitor_add.png b/www/extras/icon/monitor_add.png new file mode 100755 index 000000000..a81806640 Binary files /dev/null and b/www/extras/icon/monitor_add.png differ diff --git a/www/extras/icon/monitor_delete.png b/www/extras/icon/monitor_delete.png new file mode 100755 index 000000000..37332563f Binary files /dev/null and b/www/extras/icon/monitor_delete.png differ diff --git a/www/extras/icon/monitor_edit.png b/www/extras/icon/monitor_edit.png new file mode 100755 index 000000000..f772c562f Binary files /dev/null and b/www/extras/icon/monitor_edit.png differ diff --git a/www/extras/icon/monitor_error.png b/www/extras/icon/monitor_error.png new file mode 100755 index 000000000..270c5018d Binary files /dev/null and b/www/extras/icon/monitor_error.png differ diff --git a/www/extras/icon/monitor_go.png b/www/extras/icon/monitor_go.png new file mode 100755 index 000000000..8af3eda9f Binary files /dev/null and b/www/extras/icon/monitor_go.png differ diff --git a/www/extras/icon/monitor_lightning.png b/www/extras/icon/monitor_lightning.png new file mode 100755 index 000000000..06e53a9d1 Binary files /dev/null and b/www/extras/icon/monitor_lightning.png differ diff --git a/www/extras/icon/monitor_link.png b/www/extras/icon/monitor_link.png new file mode 100755 index 000000000..a014b025a Binary files /dev/null and b/www/extras/icon/monitor_link.png differ diff --git a/www/extras/icon/mouse.png b/www/extras/icon/mouse.png new file mode 100755 index 000000000..63a92fa91 Binary files /dev/null and b/www/extras/icon/mouse.png differ diff --git a/www/extras/icon/mouse_add.png b/www/extras/icon/mouse_add.png new file mode 100755 index 000000000..65bcab520 Binary files /dev/null and b/www/extras/icon/mouse_add.png differ diff --git a/www/extras/icon/mouse_delete.png b/www/extras/icon/mouse_delete.png new file mode 100755 index 000000000..72865668c Binary files /dev/null and b/www/extras/icon/mouse_delete.png differ diff --git a/www/extras/icon/mouse_error.png b/www/extras/icon/mouse_error.png new file mode 100755 index 000000000..bcc156238 Binary files /dev/null and b/www/extras/icon/mouse_error.png differ diff --git a/www/extras/icon/music.png b/www/extras/icon/music.png new file mode 100755 index 000000000..a8b3ede3d Binary files /dev/null and b/www/extras/icon/music.png differ diff --git a/www/extras/icon/new.png b/www/extras/icon/new.png new file mode 100755 index 000000000..6a9bf0370 Binary files /dev/null and b/www/extras/icon/new.png differ diff --git a/www/extras/icon/newspaper.png b/www/extras/icon/newspaper.png new file mode 100755 index 000000000..6a2ecce1b Binary files /dev/null and b/www/extras/icon/newspaper.png differ diff --git a/www/extras/icon/newspaper_add.png b/www/extras/icon/newspaper_add.png new file mode 100755 index 000000000..8140e8c10 Binary files /dev/null and b/www/extras/icon/newspaper_add.png differ diff --git a/www/extras/icon/newspaper_delete.png b/www/extras/icon/newspaper_delete.png new file mode 100755 index 000000000..bde96ce19 Binary files /dev/null and b/www/extras/icon/newspaper_delete.png differ diff --git a/www/extras/icon/newspaper_go.png b/www/extras/icon/newspaper_go.png new file mode 100755 index 000000000..fd6142871 Binary files /dev/null and b/www/extras/icon/newspaper_go.png differ diff --git a/www/extras/icon/newspaper_link.png b/www/extras/icon/newspaper_link.png new file mode 100755 index 000000000..99e57cba8 Binary files /dev/null and b/www/extras/icon/newspaper_link.png differ diff --git a/www/extras/icon/note.png b/www/extras/icon/note.png new file mode 100755 index 000000000..244e6ca04 Binary files /dev/null and b/www/extras/icon/note.png differ diff --git a/www/extras/icon/note_add.png b/www/extras/icon/note_add.png new file mode 100755 index 000000000..abdad91eb Binary files /dev/null and b/www/extras/icon/note_add.png differ diff --git a/www/extras/icon/note_delete.png b/www/extras/icon/note_delete.png new file mode 100755 index 000000000..8a1f0ff56 Binary files /dev/null and b/www/extras/icon/note_delete.png differ diff --git a/www/extras/icon/note_edit.png b/www/extras/icon/note_edit.png new file mode 100755 index 000000000..291bfc764 Binary files /dev/null and b/www/extras/icon/note_edit.png differ diff --git a/www/extras/icon/note_error.png b/www/extras/icon/note_error.png new file mode 100755 index 000000000..896dadfd1 Binary files /dev/null and b/www/extras/icon/note_error.png differ diff --git a/www/extras/icon/note_go.png b/www/extras/icon/note_go.png new file mode 100755 index 000000000..49e54fd87 Binary files /dev/null and b/www/extras/icon/note_go.png differ diff --git a/www/extras/icon/overlays.png b/www/extras/icon/overlays.png new file mode 100755 index 000000000..ab3100b5c Binary files /dev/null and b/www/extras/icon/overlays.png differ diff --git a/www/extras/icon/package.png b/www/extras/icon/package.png new file mode 100755 index 000000000..da3c2a2d7 Binary files /dev/null and b/www/extras/icon/package.png differ diff --git a/www/extras/icon/package_add.png b/www/extras/icon/package_add.png new file mode 100755 index 000000000..9c8a9da4a Binary files /dev/null and b/www/extras/icon/package_add.png differ diff --git a/www/extras/icon/package_delete.png b/www/extras/icon/package_delete.png new file mode 100755 index 000000000..86f7fbc29 Binary files /dev/null and b/www/extras/icon/package_delete.png differ diff --git a/www/extras/icon/package_go.png b/www/extras/icon/package_go.png new file mode 100755 index 000000000..aace63ad6 Binary files /dev/null and b/www/extras/icon/package_go.png differ diff --git a/www/extras/icon/package_green.png b/www/extras/icon/package_green.png new file mode 100755 index 000000000..25b28bb6a Binary files /dev/null and b/www/extras/icon/package_green.png differ diff --git a/www/extras/icon/package_link.png b/www/extras/icon/package_link.png new file mode 100755 index 000000000..48e7ab55f Binary files /dev/null and b/www/extras/icon/package_link.png differ diff --git a/www/extras/icon/page.png b/www/extras/icon/page.png new file mode 100755 index 000000000..03ddd799f Binary files /dev/null and b/www/extras/icon/page.png differ diff --git a/www/extras/icon/page_add.png b/www/extras/icon/page_add.png new file mode 100755 index 000000000..d5bfa0719 Binary files /dev/null and b/www/extras/icon/page_add.png differ diff --git a/www/extras/icon/page_attach.png b/www/extras/icon/page_attach.png new file mode 100755 index 000000000..89ee2da07 Binary files /dev/null and b/www/extras/icon/page_attach.png differ diff --git a/www/extras/icon/page_code.png b/www/extras/icon/page_code.png new file mode 100755 index 000000000..f7ea90419 Binary files /dev/null and b/www/extras/icon/page_code.png differ diff --git a/www/extras/icon/page_copy.png b/www/extras/icon/page_copy.png new file mode 100755 index 000000000..195dc6d6c Binary files /dev/null and b/www/extras/icon/page_copy.png differ diff --git a/www/extras/icon/page_delete.png b/www/extras/icon/page_delete.png new file mode 100755 index 000000000..3141467c6 Binary files /dev/null and b/www/extras/icon/page_delete.png differ diff --git a/www/extras/icon/page_edit.png b/www/extras/icon/page_edit.png new file mode 100755 index 000000000..046811ed7 Binary files /dev/null and b/www/extras/icon/page_edit.png differ diff --git a/www/extras/icon/page_error.png b/www/extras/icon/page_error.png new file mode 100755 index 000000000..f07f449a4 Binary files /dev/null and b/www/extras/icon/page_error.png differ diff --git a/www/extras/icon/page_excel.png b/www/extras/icon/page_excel.png new file mode 100755 index 000000000..eb6158eb5 Binary files /dev/null and b/www/extras/icon/page_excel.png differ diff --git a/www/extras/icon/page_find.png b/www/extras/icon/page_find.png new file mode 100755 index 000000000..2f193889f Binary files /dev/null and b/www/extras/icon/page_find.png differ diff --git a/www/extras/icon/page_gear.png b/www/extras/icon/page_gear.png new file mode 100755 index 000000000..8e83281c5 Binary files /dev/null and b/www/extras/icon/page_gear.png differ diff --git a/www/extras/icon/page_go.png b/www/extras/icon/page_go.png new file mode 100755 index 000000000..80fe1ed0c Binary files /dev/null and b/www/extras/icon/page_go.png differ diff --git a/www/extras/icon/page_green.png b/www/extras/icon/page_green.png new file mode 100755 index 000000000..de8e003f9 Binary files /dev/null and b/www/extras/icon/page_green.png differ diff --git a/www/extras/icon/page_key.png b/www/extras/icon/page_key.png new file mode 100755 index 000000000..d6626cb09 Binary files /dev/null and b/www/extras/icon/page_key.png differ diff --git a/www/extras/icon/page_lightning.png b/www/extras/icon/page_lightning.png new file mode 100755 index 000000000..7e568703d Binary files /dev/null and b/www/extras/icon/page_lightning.png differ diff --git a/www/extras/icon/page_link.png b/www/extras/icon/page_link.png new file mode 100755 index 000000000..312eab091 Binary files /dev/null and b/www/extras/icon/page_link.png differ diff --git a/www/extras/icon/page_paintbrush.png b/www/extras/icon/page_paintbrush.png new file mode 100755 index 000000000..246a2f0b4 Binary files /dev/null and b/www/extras/icon/page_paintbrush.png differ diff --git a/www/extras/icon/page_paste.png b/www/extras/icon/page_paste.png new file mode 100755 index 000000000..968f073fd Binary files /dev/null and b/www/extras/icon/page_paste.png differ diff --git a/www/extras/icon/page_red.png b/www/extras/icon/page_red.png new file mode 100755 index 000000000..0b18247da Binary files /dev/null and b/www/extras/icon/page_red.png differ diff --git a/www/extras/icon/page_refresh.png b/www/extras/icon/page_refresh.png new file mode 100755 index 000000000..cf347c7d4 Binary files /dev/null and b/www/extras/icon/page_refresh.png differ diff --git a/www/extras/icon/page_save.png b/www/extras/icon/page_save.png new file mode 100755 index 000000000..caea546af Binary files /dev/null and b/www/extras/icon/page_save.png differ diff --git a/www/extras/icon/page_white.png b/www/extras/icon/page_white.png new file mode 100755 index 000000000..8b8b1ca00 Binary files /dev/null and b/www/extras/icon/page_white.png differ diff --git a/www/extras/icon/page_white_acrobat.png b/www/extras/icon/page_white_acrobat.png new file mode 100755 index 000000000..8f8095e46 Binary files /dev/null and b/www/extras/icon/page_white_acrobat.png differ diff --git a/www/extras/icon/page_white_actionscript.png b/www/extras/icon/page_white_actionscript.png new file mode 100755 index 000000000..159b24075 Binary files /dev/null and b/www/extras/icon/page_white_actionscript.png differ diff --git a/www/extras/icon/page_white_add.png b/www/extras/icon/page_white_add.png new file mode 100755 index 000000000..aa23dde37 Binary files /dev/null and b/www/extras/icon/page_white_add.png differ diff --git a/www/extras/icon/page_white_c.png b/www/extras/icon/page_white_c.png new file mode 100755 index 000000000..34a05cccf Binary files /dev/null and b/www/extras/icon/page_white_c.png differ diff --git a/www/extras/icon/page_white_camera.png b/www/extras/icon/page_white_camera.png new file mode 100755 index 000000000..f501a593a Binary files /dev/null and b/www/extras/icon/page_white_camera.png differ diff --git a/www/extras/icon/page_white_cd.png b/www/extras/icon/page_white_cd.png new file mode 100755 index 000000000..848bdaf3f Binary files /dev/null and b/www/extras/icon/page_white_cd.png differ diff --git a/www/extras/icon/page_white_code.png b/www/extras/icon/page_white_code.png new file mode 100755 index 000000000..0c76bd129 Binary files /dev/null and b/www/extras/icon/page_white_code.png differ diff --git a/www/extras/icon/page_white_code_red.png b/www/extras/icon/page_white_code_red.png new file mode 100755 index 000000000..87a691450 Binary files /dev/null and b/www/extras/icon/page_white_code_red.png differ diff --git a/www/extras/icon/page_white_coldfusion.png b/www/extras/icon/page_white_coldfusion.png new file mode 100755 index 000000000..c66011fb0 Binary files /dev/null and b/www/extras/icon/page_white_coldfusion.png differ diff --git a/www/extras/icon/page_white_compressed.png b/www/extras/icon/page_white_compressed.png new file mode 100755 index 000000000..2b6b1007f Binary files /dev/null and b/www/extras/icon/page_white_compressed.png differ diff --git a/www/extras/icon/page_white_copy.png b/www/extras/icon/page_white_copy.png new file mode 100755 index 000000000..a9f31a278 Binary files /dev/null and b/www/extras/icon/page_white_copy.png differ diff --git a/www/extras/icon/page_white_cplusplus.png b/www/extras/icon/page_white_cplusplus.png new file mode 100755 index 000000000..a87cf847c Binary files /dev/null and b/www/extras/icon/page_white_cplusplus.png differ diff --git a/www/extras/icon/page_white_csharp.png b/www/extras/icon/page_white_csharp.png new file mode 100755 index 000000000..ffb8fc932 Binary files /dev/null and b/www/extras/icon/page_white_csharp.png differ diff --git a/www/extras/icon/page_white_cup.png b/www/extras/icon/page_white_cup.png new file mode 100755 index 000000000..0a7d6f4a6 Binary files /dev/null and b/www/extras/icon/page_white_cup.png differ diff --git a/www/extras/icon/page_white_database.png b/www/extras/icon/page_white_database.png new file mode 100755 index 000000000..bddba1f98 Binary files /dev/null and b/www/extras/icon/page_white_database.png differ diff --git a/www/extras/icon/page_white_delete.png b/www/extras/icon/page_white_delete.png new file mode 100755 index 000000000..af1ecaf29 Binary files /dev/null and b/www/extras/icon/page_white_delete.png differ diff --git a/www/extras/icon/page_white_dvd.png b/www/extras/icon/page_white_dvd.png new file mode 100755 index 000000000..4cc537af0 Binary files /dev/null and b/www/extras/icon/page_white_dvd.png differ diff --git a/www/extras/icon/page_white_edit.png b/www/extras/icon/page_white_edit.png new file mode 100755 index 000000000..b93e77600 Binary files /dev/null and b/www/extras/icon/page_white_edit.png differ diff --git a/www/extras/icon/page_white_error.png b/www/extras/icon/page_white_error.png new file mode 100755 index 000000000..9fc5a0a10 Binary files /dev/null and b/www/extras/icon/page_white_error.png differ diff --git a/www/extras/icon/page_white_excel.png b/www/extras/icon/page_white_excel.png new file mode 100755 index 000000000..b977d7e52 Binary files /dev/null and b/www/extras/icon/page_white_excel.png differ diff --git a/www/extras/icon/page_white_find.png b/www/extras/icon/page_white_find.png new file mode 100755 index 000000000..581843637 Binary files /dev/null and b/www/extras/icon/page_white_find.png differ diff --git a/www/extras/icon/page_white_flash.png b/www/extras/icon/page_white_flash.png new file mode 100755 index 000000000..5769120b1 Binary files /dev/null and b/www/extras/icon/page_white_flash.png differ diff --git a/www/extras/icon/page_white_freehand.png b/www/extras/icon/page_white_freehand.png new file mode 100755 index 000000000..8d719df52 Binary files /dev/null and b/www/extras/icon/page_white_freehand.png differ diff --git a/www/extras/icon/page_white_gear.png b/www/extras/icon/page_white_gear.png new file mode 100755 index 000000000..106f5aa36 Binary files /dev/null and b/www/extras/icon/page_white_gear.png differ diff --git a/www/extras/icon/page_white_get.png b/www/extras/icon/page_white_get.png new file mode 100755 index 000000000..e4a1ecba1 Binary files /dev/null and b/www/extras/icon/page_white_get.png differ diff --git a/www/extras/icon/page_white_go.png b/www/extras/icon/page_white_go.png new file mode 100755 index 000000000..7e62a924b Binary files /dev/null and b/www/extras/icon/page_white_go.png differ diff --git a/www/extras/icon/page_white_h.png b/www/extras/icon/page_white_h.png new file mode 100755 index 000000000..e902abb07 Binary files /dev/null and b/www/extras/icon/page_white_h.png differ diff --git a/www/extras/icon/page_white_horizontal.png b/www/extras/icon/page_white_horizontal.png new file mode 100755 index 000000000..1d2d0a498 Binary files /dev/null and b/www/extras/icon/page_white_horizontal.png differ diff --git a/www/extras/icon/page_white_key.png b/www/extras/icon/page_white_key.png new file mode 100755 index 000000000..d61648452 Binary files /dev/null and b/www/extras/icon/page_white_key.png differ diff --git a/www/extras/icon/page_white_lightning.png b/www/extras/icon/page_white_lightning.png new file mode 100755 index 000000000..7215d1e8b Binary files /dev/null and b/www/extras/icon/page_white_lightning.png differ diff --git a/www/extras/icon/page_white_link.png b/www/extras/icon/page_white_link.png new file mode 100755 index 000000000..bf7bd1c9b Binary files /dev/null and b/www/extras/icon/page_white_link.png differ diff --git a/www/extras/icon/page_white_magnify.png b/www/extras/icon/page_white_magnify.png new file mode 100755 index 000000000..f6b74cc40 Binary files /dev/null and b/www/extras/icon/page_white_magnify.png differ diff --git a/www/extras/icon/page_white_medal.png b/www/extras/icon/page_white_medal.png new file mode 100755 index 000000000..d3fffb6d9 Binary files /dev/null and b/www/extras/icon/page_white_medal.png differ diff --git a/www/extras/icon/page_white_office.png b/www/extras/icon/page_white_office.png new file mode 100755 index 000000000..a65bcb3e1 Binary files /dev/null and b/www/extras/icon/page_white_office.png differ diff --git a/www/extras/icon/page_white_paint.png b/www/extras/icon/page_white_paint.png new file mode 100755 index 000000000..23a37b891 Binary files /dev/null and b/www/extras/icon/page_white_paint.png differ diff --git a/www/extras/icon/page_white_paintbrush.png b/www/extras/icon/page_white_paintbrush.png new file mode 100755 index 000000000..f907e44b3 Binary files /dev/null and b/www/extras/icon/page_white_paintbrush.png differ diff --git a/www/extras/icon/page_white_paste.png b/www/extras/icon/page_white_paste.png new file mode 100755 index 000000000..5b2cbb3fd Binary files /dev/null and b/www/extras/icon/page_white_paste.png differ diff --git a/www/extras/icon/page_white_php.png b/www/extras/icon/page_white_php.png new file mode 100755 index 000000000..7868a2594 Binary files /dev/null and b/www/extras/icon/page_white_php.png differ diff --git a/www/extras/icon/page_white_picture.png b/www/extras/icon/page_white_picture.png new file mode 100755 index 000000000..134b66936 Binary files /dev/null and b/www/extras/icon/page_white_picture.png differ diff --git a/www/extras/icon/page_white_powerpoint.png b/www/extras/icon/page_white_powerpoint.png new file mode 100755 index 000000000..c4eff0387 Binary files /dev/null and b/www/extras/icon/page_white_powerpoint.png differ diff --git a/www/extras/icon/page_white_put.png b/www/extras/icon/page_white_put.png new file mode 100755 index 000000000..884ffd6f0 Binary files /dev/null and b/www/extras/icon/page_white_put.png differ diff --git a/www/extras/icon/page_white_ruby.png b/www/extras/icon/page_white_ruby.png new file mode 100755 index 000000000..f59b7c436 Binary files /dev/null and b/www/extras/icon/page_white_ruby.png differ diff --git a/www/extras/icon/page_white_stack.png b/www/extras/icon/page_white_stack.png new file mode 100755 index 000000000..44084add7 Binary files /dev/null and b/www/extras/icon/page_white_stack.png differ diff --git a/www/extras/icon/page_white_star.png b/www/extras/icon/page_white_star.png new file mode 100755 index 000000000..3a1441c9a Binary files /dev/null and b/www/extras/icon/page_white_star.png differ diff --git a/www/extras/icon/page_white_swoosh.png b/www/extras/icon/page_white_swoosh.png new file mode 100755 index 000000000..e7708292a Binary files /dev/null and b/www/extras/icon/page_white_swoosh.png differ diff --git a/www/extras/icon/page_white_text.png b/www/extras/icon/page_white_text.png new file mode 100755 index 000000000..813f712f7 Binary files /dev/null and b/www/extras/icon/page_white_text.png differ diff --git a/www/extras/icon/page_white_text_width.png b/www/extras/icon/page_white_text_width.png new file mode 100755 index 000000000..d9cf13256 Binary files /dev/null and b/www/extras/icon/page_white_text_width.png differ diff --git a/www/extras/icon/page_white_tux.png b/www/extras/icon/page_white_tux.png new file mode 100755 index 000000000..52699bfee Binary files /dev/null and b/www/extras/icon/page_white_tux.png differ diff --git a/www/extras/icon/page_white_vector.png b/www/extras/icon/page_white_vector.png new file mode 100755 index 000000000..4a05955b3 Binary files /dev/null and b/www/extras/icon/page_white_vector.png differ diff --git a/www/extras/icon/page_white_visualstudio.png b/www/extras/icon/page_white_visualstudio.png new file mode 100755 index 000000000..a0a433dfb Binary files /dev/null and b/www/extras/icon/page_white_visualstudio.png differ diff --git a/www/extras/icon/page_white_width.png b/www/extras/icon/page_white_width.png new file mode 100755 index 000000000..1eb880947 Binary files /dev/null and b/www/extras/icon/page_white_width.png differ diff --git a/www/extras/icon/page_white_word.png b/www/extras/icon/page_white_word.png new file mode 100755 index 000000000..ae8ecbf47 Binary files /dev/null and b/www/extras/icon/page_white_word.png differ diff --git a/www/extras/icon/page_white_world.png b/www/extras/icon/page_white_world.png new file mode 100755 index 000000000..6ed2490ed Binary files /dev/null and b/www/extras/icon/page_white_world.png differ diff --git a/www/extras/icon/page_white_wrench.png b/www/extras/icon/page_white_wrench.png new file mode 100755 index 000000000..fecadd08a Binary files /dev/null and b/www/extras/icon/page_white_wrench.png differ diff --git a/www/extras/icon/page_white_zip.png b/www/extras/icon/page_white_zip.png new file mode 100755 index 000000000..fd4bbccdf Binary files /dev/null and b/www/extras/icon/page_white_zip.png differ diff --git a/www/extras/icon/page_word.png b/www/extras/icon/page_word.png new file mode 100755 index 000000000..834cdfaf4 Binary files /dev/null and b/www/extras/icon/page_word.png differ diff --git a/www/extras/icon/page_world.png b/www/extras/icon/page_world.png new file mode 100755 index 000000000..b8895ddec Binary files /dev/null and b/www/extras/icon/page_world.png differ diff --git a/www/extras/icon/paintbrush.png b/www/extras/icon/paintbrush.png new file mode 100755 index 000000000..a3ecf8778 Binary files /dev/null and b/www/extras/icon/paintbrush.png differ diff --git a/www/extras/icon/paintcan.png b/www/extras/icon/paintcan.png new file mode 100755 index 000000000..f82a8865a Binary files /dev/null and b/www/extras/icon/paintcan.png differ diff --git a/www/extras/icon/palette.png b/www/extras/icon/palette.png new file mode 100755 index 000000000..73c5b3f24 Binary files /dev/null and b/www/extras/icon/palette.png differ diff --git a/www/extras/icon/paste_plain.png b/www/extras/icon/paste_plain.png new file mode 100755 index 000000000..c0490eb79 Binary files /dev/null and b/www/extras/icon/paste_plain.png differ diff --git a/www/extras/icon/paste_word.png b/www/extras/icon/paste_word.png new file mode 100755 index 000000000..f6b87f82c Binary files /dev/null and b/www/extras/icon/paste_word.png differ diff --git a/www/extras/icon/pencil.png b/www/extras/icon/pencil.png new file mode 100755 index 000000000..0bfecd50e Binary files /dev/null and b/www/extras/icon/pencil.png differ diff --git a/www/extras/icon/pencil_add.png b/www/extras/icon/pencil_add.png new file mode 100755 index 000000000..902bbe61b Binary files /dev/null and b/www/extras/icon/pencil_add.png differ diff --git a/www/extras/icon/pencil_delete.png b/www/extras/icon/pencil_delete.png new file mode 100755 index 000000000..d8944e6ea Binary files /dev/null and b/www/extras/icon/pencil_delete.png differ diff --git a/www/extras/icon/pencil_go.png b/www/extras/icon/pencil_go.png new file mode 100755 index 000000000..937bded9d Binary files /dev/null and b/www/extras/icon/pencil_go.png differ diff --git a/www/extras/icon/phone.png b/www/extras/icon/phone.png new file mode 100755 index 000000000..c39f162f8 Binary files /dev/null and b/www/extras/icon/phone.png differ diff --git a/www/extras/icon/phone_add.png b/www/extras/icon/phone_add.png new file mode 100755 index 000000000..d3555e024 Binary files /dev/null and b/www/extras/icon/phone_add.png differ diff --git a/www/extras/icon/phone_delete.png b/www/extras/icon/phone_delete.png new file mode 100755 index 000000000..bbe4f8aba Binary files /dev/null and b/www/extras/icon/phone_delete.png differ diff --git a/www/extras/icon/phone_sound.png b/www/extras/icon/phone_sound.png new file mode 100755 index 000000000..7fdf1c58c Binary files /dev/null and b/www/extras/icon/phone_sound.png differ diff --git a/www/extras/icon/photo.png b/www/extras/icon/photo.png new file mode 100755 index 000000000..6c2aaaaaf Binary files /dev/null and b/www/extras/icon/photo.png differ diff --git a/www/extras/icon/photo_add.png b/www/extras/icon/photo_add.png new file mode 100755 index 000000000..63cc355cb Binary files /dev/null and b/www/extras/icon/photo_add.png differ diff --git a/www/extras/icon/photo_delete.png b/www/extras/icon/photo_delete.png new file mode 100755 index 000000000..18b67df43 Binary files /dev/null and b/www/extras/icon/photo_delete.png differ diff --git a/www/extras/icon/photo_link.png b/www/extras/icon/photo_link.png new file mode 100755 index 000000000..e6bb35fbf Binary files /dev/null and b/www/extras/icon/photo_link.png differ diff --git a/www/extras/icon/photos.png b/www/extras/icon/photos.png new file mode 100755 index 000000000..8836fe6c0 Binary files /dev/null and b/www/extras/icon/photos.png differ diff --git a/www/extras/icon/picture.png b/www/extras/icon/picture.png new file mode 100755 index 000000000..4a158fef7 Binary files /dev/null and b/www/extras/icon/picture.png differ diff --git a/www/extras/icon/picture_add.png b/www/extras/icon/picture_add.png new file mode 100755 index 000000000..d6d3f8564 Binary files /dev/null and b/www/extras/icon/picture_add.png differ diff --git a/www/extras/icon/picture_delete.png b/www/extras/icon/picture_delete.png new file mode 100755 index 000000000..cca9f535d Binary files /dev/null and b/www/extras/icon/picture_delete.png differ diff --git a/www/extras/icon/picture_edit.png b/www/extras/icon/picture_edit.png new file mode 100755 index 000000000..9a70c3499 Binary files /dev/null and b/www/extras/icon/picture_edit.png differ diff --git a/www/extras/icon/picture_empty.png b/www/extras/icon/picture_empty.png new file mode 100755 index 000000000..abd2b9bb4 Binary files /dev/null and b/www/extras/icon/picture_empty.png differ diff --git a/www/extras/icon/picture_error.png b/www/extras/icon/picture_error.png new file mode 100755 index 000000000..d41d90d64 Binary files /dev/null and b/www/extras/icon/picture_error.png differ diff --git a/www/extras/icon/picture_go.png b/www/extras/icon/picture_go.png new file mode 100755 index 000000000..27c63c5af Binary files /dev/null and b/www/extras/icon/picture_go.png differ diff --git a/www/extras/icon/picture_key.png b/www/extras/icon/picture_key.png new file mode 100755 index 000000000..667086c0d Binary files /dev/null and b/www/extras/icon/picture_key.png differ diff --git a/www/extras/icon/picture_link.png b/www/extras/icon/picture_link.png new file mode 100755 index 000000000..42dca7440 Binary files /dev/null and b/www/extras/icon/picture_link.png differ diff --git a/www/extras/icon/picture_save.png b/www/extras/icon/picture_save.png new file mode 100755 index 000000000..777fb5d2e Binary files /dev/null and b/www/extras/icon/picture_save.png differ diff --git a/www/extras/icon/pictures.png b/www/extras/icon/pictures.png new file mode 100755 index 000000000..d9591c13f Binary files /dev/null and b/www/extras/icon/pictures.png differ diff --git a/www/extras/icon/pilcrow.png b/www/extras/icon/pilcrow.png new file mode 100755 index 000000000..95704fbab Binary files /dev/null and b/www/extras/icon/pilcrow.png differ diff --git a/www/extras/icon/pill.png b/www/extras/icon/pill.png new file mode 100755 index 000000000..f2bdef6be Binary files /dev/null and b/www/extras/icon/pill.png differ diff --git a/www/extras/icon/pill_add.png b/www/extras/icon/pill_add.png new file mode 100755 index 000000000..ac9c2df6a Binary files /dev/null and b/www/extras/icon/pill_add.png differ diff --git a/www/extras/icon/pill_delete.png b/www/extras/icon/pill_delete.png new file mode 100755 index 000000000..c61592e8d Binary files /dev/null and b/www/extras/icon/pill_delete.png differ diff --git a/www/extras/icon/pill_go.png b/www/extras/icon/pill_go.png new file mode 100755 index 000000000..e5c07d415 Binary files /dev/null and b/www/extras/icon/pill_go.png differ diff --git a/www/extras/icon/plugin.png b/www/extras/icon/plugin.png new file mode 100755 index 000000000..6187b15ae Binary files /dev/null and b/www/extras/icon/plugin.png differ diff --git a/www/extras/icon/plugin_add.png b/www/extras/icon/plugin_add.png new file mode 100755 index 000000000..ae43690ec Binary files /dev/null and b/www/extras/icon/plugin_add.png differ diff --git a/www/extras/icon/plugin_delete.png b/www/extras/icon/plugin_delete.png new file mode 100755 index 000000000..d9c3376d4 Binary files /dev/null and b/www/extras/icon/plugin_delete.png differ diff --git a/www/extras/icon/plugin_disabled.png b/www/extras/icon/plugin_disabled.png new file mode 100755 index 000000000..f4f6be59c Binary files /dev/null and b/www/extras/icon/plugin_disabled.png differ diff --git a/www/extras/icon/plugin_edit.png b/www/extras/icon/plugin_edit.png new file mode 100755 index 000000000..b6cb0ecf7 Binary files /dev/null and b/www/extras/icon/plugin_edit.png differ diff --git a/www/extras/icon/plugin_error.png b/www/extras/icon/plugin_error.png new file mode 100755 index 000000000..cff65d7fe Binary files /dev/null and b/www/extras/icon/plugin_error.png differ diff --git a/www/extras/icon/plugin_go.png b/www/extras/icon/plugin_go.png new file mode 100755 index 000000000..41da9913d Binary files /dev/null and b/www/extras/icon/plugin_go.png differ diff --git a/www/extras/icon/plugin_link.png b/www/extras/icon/plugin_link.png new file mode 100755 index 000000000..445c18868 Binary files /dev/null and b/www/extras/icon/plugin_link.png differ diff --git a/www/extras/icon/printer.png b/www/extras/icon/printer.png new file mode 100755 index 000000000..a350d1871 Binary files /dev/null and b/www/extras/icon/printer.png differ diff --git a/www/extras/icon/printer_add.png b/www/extras/icon/printer_add.png new file mode 100755 index 000000000..d228d0580 Binary files /dev/null and b/www/extras/icon/printer_add.png differ diff --git a/www/extras/icon/printer_delete.png b/www/extras/icon/printer_delete.png new file mode 100755 index 000000000..1d8605f2f Binary files /dev/null and b/www/extras/icon/printer_delete.png differ diff --git a/www/extras/icon/printer_empty.png b/www/extras/icon/printer_empty.png new file mode 100755 index 000000000..94e8c1618 Binary files /dev/null and b/www/extras/icon/printer_empty.png differ diff --git a/www/extras/icon/printer_error.png b/www/extras/icon/printer_error.png new file mode 100755 index 000000000..279ebb0e5 Binary files /dev/null and b/www/extras/icon/printer_error.png differ diff --git a/www/extras/icon/rainbow.png b/www/extras/icon/rainbow.png new file mode 100755 index 000000000..5ede989a4 Binary files /dev/null and b/www/extras/icon/rainbow.png differ diff --git a/www/extras/icon/report.png b/www/extras/icon/report.png new file mode 100755 index 000000000..779ad58ef Binary files /dev/null and b/www/extras/icon/report.png differ diff --git a/www/extras/icon/report_add.png b/www/extras/icon/report_add.png new file mode 100755 index 000000000..d5eac9bcc Binary files /dev/null and b/www/extras/icon/report_add.png differ diff --git a/www/extras/icon/report_delete.png b/www/extras/icon/report_delete.png new file mode 100755 index 000000000..dcce0b64d Binary files /dev/null and b/www/extras/icon/report_delete.png differ diff --git a/www/extras/icon/report_disk.png b/www/extras/icon/report_disk.png new file mode 100755 index 000000000..1c856cd61 Binary files /dev/null and b/www/extras/icon/report_disk.png differ diff --git a/www/extras/icon/report_edit.png b/www/extras/icon/report_edit.png new file mode 100755 index 000000000..c61a6d847 Binary files /dev/null and b/www/extras/icon/report_edit.png differ diff --git a/www/extras/icon/report_go.png b/www/extras/icon/report_go.png new file mode 100755 index 000000000..f35a97938 Binary files /dev/null and b/www/extras/icon/report_go.png differ diff --git a/www/extras/icon/report_key.png b/www/extras/icon/report_key.png new file mode 100755 index 000000000..90b758e8f Binary files /dev/null and b/www/extras/icon/report_key.png differ diff --git a/www/extras/icon/report_link.png b/www/extras/icon/report_link.png new file mode 100755 index 000000000..23f2611e9 Binary files /dev/null and b/www/extras/icon/report_link.png differ diff --git a/www/extras/icon/report_magnify.png b/www/extras/icon/report_magnify.png new file mode 100755 index 000000000..aeaa88953 Binary files /dev/null and b/www/extras/icon/report_magnify.png differ diff --git a/www/extras/icon/report_picture.png b/www/extras/icon/report_picture.png new file mode 100755 index 000000000..3a9a7e5eb Binary files /dev/null and b/www/extras/icon/report_picture.png differ diff --git a/www/extras/icon/report_user.png b/www/extras/icon/report_user.png new file mode 100755 index 000000000..7766edd74 Binary files /dev/null and b/www/extras/icon/report_user.png differ diff --git a/www/extras/icon/report_word.png b/www/extras/icon/report_word.png new file mode 100755 index 000000000..995134248 Binary files /dev/null and b/www/extras/icon/report_word.png differ diff --git a/www/extras/icon/resultset_first.png b/www/extras/icon/resultset_first.png new file mode 100755 index 000000000..b03eaf8b5 Binary files /dev/null and b/www/extras/icon/resultset_first.png differ diff --git a/www/extras/icon/resultset_last.png b/www/extras/icon/resultset_last.png new file mode 100755 index 000000000..8ec894784 Binary files /dev/null and b/www/extras/icon/resultset_last.png differ diff --git a/www/extras/icon/resultset_next.png b/www/extras/icon/resultset_next.png new file mode 100755 index 000000000..e252606d3 Binary files /dev/null and b/www/extras/icon/resultset_next.png differ diff --git a/www/extras/icon/resultset_previous.png b/www/extras/icon/resultset_previous.png new file mode 100755 index 000000000..18f9cc109 Binary files /dev/null and b/www/extras/icon/resultset_previous.png differ diff --git a/www/extras/icon/rosette.png b/www/extras/icon/rosette.png new file mode 100755 index 000000000..f233bc770 Binary files /dev/null and b/www/extras/icon/rosette.png differ diff --git a/www/extras/icon/rss.png b/www/extras/icon/rss.png new file mode 100755 index 000000000..1dc6ff30b Binary files /dev/null and b/www/extras/icon/rss.png differ diff --git a/www/extras/icon/rss_add.png b/www/extras/icon/rss_add.png new file mode 100755 index 000000000..b590beb73 Binary files /dev/null and b/www/extras/icon/rss_add.png differ diff --git a/www/extras/icon/rss_delete.png b/www/extras/icon/rss_delete.png new file mode 100755 index 000000000..9deb738de Binary files /dev/null and b/www/extras/icon/rss_delete.png differ diff --git a/www/extras/icon/rss_go.png b/www/extras/icon/rss_go.png new file mode 100755 index 000000000..43a86bff6 Binary files /dev/null and b/www/extras/icon/rss_go.png differ diff --git a/www/extras/icon/rss_valid.png b/www/extras/icon/rss_valid.png new file mode 100755 index 000000000..a6d0b0e87 Binary files /dev/null and b/www/extras/icon/rss_valid.png differ diff --git a/www/extras/icon/ruby.png b/www/extras/icon/ruby.png new file mode 100755 index 000000000..f763a1688 Binary files /dev/null and b/www/extras/icon/ruby.png differ diff --git a/www/extras/icon/ruby_add.png b/www/extras/icon/ruby_add.png new file mode 100755 index 000000000..a2cd648f6 Binary files /dev/null and b/www/extras/icon/ruby_add.png differ diff --git a/www/extras/icon/ruby_delete.png b/www/extras/icon/ruby_delete.png new file mode 100755 index 000000000..30022630d Binary files /dev/null and b/www/extras/icon/ruby_delete.png differ diff --git a/www/extras/icon/ruby_gear.png b/www/extras/icon/ruby_gear.png new file mode 100755 index 000000000..4a10590b4 Binary files /dev/null and b/www/extras/icon/ruby_gear.png differ diff --git a/www/extras/icon/ruby_get.png b/www/extras/icon/ruby_get.png new file mode 100755 index 000000000..f5203c7e9 Binary files /dev/null and b/www/extras/icon/ruby_get.png differ diff --git a/www/extras/icon/ruby_go.png b/www/extras/icon/ruby_go.png new file mode 100755 index 000000000..d8d276e3c Binary files /dev/null and b/www/extras/icon/ruby_go.png differ diff --git a/www/extras/icon/ruby_key.png b/www/extras/icon/ruby_key.png new file mode 100755 index 000000000..451cfebe2 Binary files /dev/null and b/www/extras/icon/ruby_key.png differ diff --git a/www/extras/icon/ruby_link.png b/www/extras/icon/ruby_link.png new file mode 100755 index 000000000..bf4be526f Binary files /dev/null and b/www/extras/icon/ruby_link.png differ diff --git a/www/extras/icon/ruby_put.png b/www/extras/icon/ruby_put.png new file mode 100755 index 000000000..e026323c2 Binary files /dev/null and b/www/extras/icon/ruby_put.png differ diff --git a/www/extras/icon/script.png b/www/extras/icon/script.png new file mode 100755 index 000000000..0f9ed4d48 Binary files /dev/null and b/www/extras/icon/script.png differ diff --git a/www/extras/icon/script_add.png b/www/extras/icon/script_add.png new file mode 100755 index 000000000..d650552d9 Binary files /dev/null and b/www/extras/icon/script_add.png differ diff --git a/www/extras/icon/script_code.png b/www/extras/icon/script_code.png new file mode 100755 index 000000000..63fe6ceff Binary files /dev/null and b/www/extras/icon/script_code.png differ diff --git a/www/extras/icon/script_code_red.png b/www/extras/icon/script_code_red.png new file mode 100755 index 000000000..8fcf0f09a Binary files /dev/null and b/www/extras/icon/script_code_red.png differ diff --git a/www/extras/icon/script_delete.png b/www/extras/icon/script_delete.png new file mode 100755 index 000000000..e6500ced7 Binary files /dev/null and b/www/extras/icon/script_delete.png differ diff --git a/www/extras/icon/script_edit.png b/www/extras/icon/script_edit.png new file mode 100755 index 000000000..b4d31ce28 Binary files /dev/null and b/www/extras/icon/script_edit.png differ diff --git a/www/extras/icon/script_error.png b/www/extras/icon/script_error.png new file mode 100755 index 000000000..04919548e Binary files /dev/null and b/www/extras/icon/script_error.png differ diff --git a/www/extras/icon/script_gear.png b/www/extras/icon/script_gear.png new file mode 100755 index 000000000..56fcf84a8 Binary files /dev/null and b/www/extras/icon/script_gear.png differ diff --git a/www/extras/icon/script_go.png b/www/extras/icon/script_go.png new file mode 100755 index 000000000..8e154e231 Binary files /dev/null and b/www/extras/icon/script_go.png differ diff --git a/www/extras/icon/script_key.png b/www/extras/icon/script_key.png new file mode 100755 index 000000000..49bb24d71 Binary files /dev/null and b/www/extras/icon/script_key.png differ diff --git a/www/extras/icon/script_lightning.png b/www/extras/icon/script_lightning.png new file mode 100755 index 000000000..b3fa18ce2 Binary files /dev/null and b/www/extras/icon/script_lightning.png differ diff --git a/www/extras/icon/script_link.png b/www/extras/icon/script_link.png new file mode 100755 index 000000000..bdeb9852b Binary files /dev/null and b/www/extras/icon/script_link.png differ diff --git a/www/extras/icon/script_palette.png b/www/extras/icon/script_palette.png new file mode 100755 index 000000000..6d46962dc Binary files /dev/null and b/www/extras/icon/script_palette.png differ diff --git a/www/extras/icon/script_save.png b/www/extras/icon/script_save.png new file mode 100755 index 000000000..36216d827 Binary files /dev/null and b/www/extras/icon/script_save.png differ diff --git a/www/extras/icon/server.png b/www/extras/icon/server.png new file mode 100755 index 000000000..720a237c7 Binary files /dev/null and b/www/extras/icon/server.png differ diff --git a/www/extras/icon/server_add.png b/www/extras/icon/server_add.png new file mode 100755 index 000000000..3f10a3a9f Binary files /dev/null and b/www/extras/icon/server_add.png differ diff --git a/www/extras/icon/server_chart.png b/www/extras/icon/server_chart.png new file mode 100755 index 000000000..1128d3f33 Binary files /dev/null and b/www/extras/icon/server_chart.png differ diff --git a/www/extras/icon/server_compressed.png b/www/extras/icon/server_compressed.png new file mode 100755 index 000000000..bf49fad9d Binary files /dev/null and b/www/extras/icon/server_compressed.png differ diff --git a/www/extras/icon/server_connect.png b/www/extras/icon/server_connect.png new file mode 100755 index 000000000..49b269145 Binary files /dev/null and b/www/extras/icon/server_connect.png differ diff --git a/www/extras/icon/server_database.png b/www/extras/icon/server_database.png new file mode 100755 index 000000000..b24e826c7 Binary files /dev/null and b/www/extras/icon/server_database.png differ diff --git a/www/extras/icon/server_delete.png b/www/extras/icon/server_delete.png new file mode 100755 index 000000000..61e740fe1 Binary files /dev/null and b/www/extras/icon/server_delete.png differ diff --git a/www/extras/icon/server_edit.png b/www/extras/icon/server_edit.png new file mode 100755 index 000000000..dc7625371 Binary files /dev/null and b/www/extras/icon/server_edit.png differ diff --git a/www/extras/icon/server_error.png b/www/extras/icon/server_error.png new file mode 100755 index 000000000..f64025639 Binary files /dev/null and b/www/extras/icon/server_error.png differ diff --git a/www/extras/icon/server_go.png b/www/extras/icon/server_go.png new file mode 100755 index 000000000..540c8e268 Binary files /dev/null and b/www/extras/icon/server_go.png differ diff --git a/www/extras/icon/server_key.png b/www/extras/icon/server_key.png new file mode 100755 index 000000000..ecd517425 Binary files /dev/null and b/www/extras/icon/server_key.png differ diff --git a/www/extras/icon/server_lightning.png b/www/extras/icon/server_lightning.png new file mode 100755 index 000000000..b0f4e46cd Binary files /dev/null and b/www/extras/icon/server_lightning.png differ diff --git a/www/extras/icon/server_link.png b/www/extras/icon/server_link.png new file mode 100755 index 000000000..e8821dfd8 Binary files /dev/null and b/www/extras/icon/server_link.png differ diff --git a/www/extras/icon/server_uncompressed.png b/www/extras/icon/server_uncompressed.png new file mode 100755 index 000000000..86e8325b9 Binary files /dev/null and b/www/extras/icon/server_uncompressed.png differ diff --git a/www/extras/icon/shading.png b/www/extras/icon/shading.png new file mode 100755 index 000000000..09275f9c0 Binary files /dev/null and b/www/extras/icon/shading.png differ diff --git a/www/extras/icon/shape_align_bottom.png b/www/extras/icon/shape_align_bottom.png new file mode 100755 index 000000000..55d269400 Binary files /dev/null and b/www/extras/icon/shape_align_bottom.png differ diff --git a/www/extras/icon/shape_align_center.png b/www/extras/icon/shape_align_center.png new file mode 100755 index 000000000..efe9a98e5 Binary files /dev/null and b/www/extras/icon/shape_align_center.png differ diff --git a/www/extras/icon/shape_align_left.png b/www/extras/icon/shape_align_left.png new file mode 100755 index 000000000..aaedc41b5 Binary files /dev/null and b/www/extras/icon/shape_align_left.png differ diff --git a/www/extras/icon/shape_align_middle.png b/www/extras/icon/shape_align_middle.png new file mode 100755 index 000000000..d350dd88f Binary files /dev/null and b/www/extras/icon/shape_align_middle.png differ diff --git a/www/extras/icon/shape_align_right.png b/www/extras/icon/shape_align_right.png new file mode 100755 index 000000000..ff556b6a9 Binary files /dev/null and b/www/extras/icon/shape_align_right.png differ diff --git a/www/extras/icon/shape_align_top.png b/www/extras/icon/shape_align_top.png new file mode 100755 index 000000000..1181b43fb Binary files /dev/null and b/www/extras/icon/shape_align_top.png differ diff --git a/www/extras/icon/shape_flip_horizontal.png b/www/extras/icon/shape_flip_horizontal.png new file mode 100755 index 000000000..8667c81f8 Binary files /dev/null and b/www/extras/icon/shape_flip_horizontal.png differ diff --git a/www/extras/icon/shape_flip_vertical.png b/www/extras/icon/shape_flip_vertical.png new file mode 100755 index 000000000..0bd66d19b Binary files /dev/null and b/www/extras/icon/shape_flip_vertical.png differ diff --git a/www/extras/icon/shape_group.png b/www/extras/icon/shape_group.png new file mode 100755 index 000000000..bb2ff516d Binary files /dev/null and b/www/extras/icon/shape_group.png differ diff --git a/www/extras/icon/shape_handles.png b/www/extras/icon/shape_handles.png new file mode 100755 index 000000000..ce27fe3a0 Binary files /dev/null and b/www/extras/icon/shape_handles.png differ diff --git a/www/extras/icon/shape_move_back.png b/www/extras/icon/shape_move_back.png new file mode 100755 index 000000000..a216ffd36 Binary files /dev/null and b/www/extras/icon/shape_move_back.png differ diff --git a/www/extras/icon/shape_move_backwards.png b/www/extras/icon/shape_move_backwards.png new file mode 100755 index 000000000..ee3f9b27a Binary files /dev/null and b/www/extras/icon/shape_move_backwards.png differ diff --git a/www/extras/icon/shape_move_forwards.png b/www/extras/icon/shape_move_forwards.png new file mode 100755 index 000000000..cfe44932c Binary files /dev/null and b/www/extras/icon/shape_move_forwards.png differ diff --git a/www/extras/icon/shape_move_front.png b/www/extras/icon/shape_move_front.png new file mode 100755 index 000000000..b4a4e3b78 Binary files /dev/null and b/www/extras/icon/shape_move_front.png differ diff --git a/www/extras/icon/shape_rotate_anticlockwise.png b/www/extras/icon/shape_rotate_anticlockwise.png new file mode 100755 index 000000000..07a30206c Binary files /dev/null and b/www/extras/icon/shape_rotate_anticlockwise.png differ diff --git a/www/extras/icon/shape_rotate_clockwise.png b/www/extras/icon/shape_rotate_clockwise.png new file mode 100755 index 000000000..b99db7d70 Binary files /dev/null and b/www/extras/icon/shape_rotate_clockwise.png differ diff --git a/www/extras/icon/shape_square.png b/www/extras/icon/shape_square.png new file mode 100755 index 000000000..33af04609 Binary files /dev/null and b/www/extras/icon/shape_square.png differ diff --git a/www/extras/icon/shape_square_add.png b/www/extras/icon/shape_square_add.png new file mode 100755 index 000000000..31edfce59 Binary files /dev/null and b/www/extras/icon/shape_square_add.png differ diff --git a/www/extras/icon/shape_square_delete.png b/www/extras/icon/shape_square_delete.png new file mode 100755 index 000000000..ede912de0 Binary files /dev/null and b/www/extras/icon/shape_square_delete.png differ diff --git a/www/extras/icon/shape_square_edit.png b/www/extras/icon/shape_square_edit.png new file mode 100755 index 000000000..d28dc6b1a Binary files /dev/null and b/www/extras/icon/shape_square_edit.png differ diff --git a/www/extras/icon/shape_square_error.png b/www/extras/icon/shape_square_error.png new file mode 100755 index 000000000..0d0dcfa9a Binary files /dev/null and b/www/extras/icon/shape_square_error.png differ diff --git a/www/extras/icon/shape_square_go.png b/www/extras/icon/shape_square_go.png new file mode 100755 index 000000000..5a2ad9019 Binary files /dev/null and b/www/extras/icon/shape_square_go.png differ diff --git a/www/extras/icon/shape_square_key.png b/www/extras/icon/shape_square_key.png new file mode 100755 index 000000000..c34b982a0 Binary files /dev/null and b/www/extras/icon/shape_square_key.png differ diff --git a/www/extras/icon/shape_square_link.png b/www/extras/icon/shape_square_link.png new file mode 100755 index 000000000..b885fcc60 Binary files /dev/null and b/www/extras/icon/shape_square_link.png differ diff --git a/www/extras/icon/shape_ungroup.png b/www/extras/icon/shape_ungroup.png new file mode 100755 index 000000000..3a6f369a5 Binary files /dev/null and b/www/extras/icon/shape_ungroup.png differ diff --git a/www/extras/icon/shield.png b/www/extras/icon/shield.png new file mode 100755 index 000000000..3cb4e2578 Binary files /dev/null and b/www/extras/icon/shield.png differ diff --git a/www/extras/icon/shield_add.png b/www/extras/icon/shield_add.png new file mode 100755 index 000000000..e20a1b4ab Binary files /dev/null and b/www/extras/icon/shield_add.png differ diff --git a/www/extras/icon/shield_delete.png b/www/extras/icon/shield_delete.png new file mode 100755 index 000000000..22823a70d Binary files /dev/null and b/www/extras/icon/shield_delete.png differ diff --git a/www/extras/icon/shield_go.png b/www/extras/icon/shield_go.png new file mode 100755 index 000000000..e9bd85224 Binary files /dev/null and b/www/extras/icon/shield_go.png differ diff --git a/www/extras/icon/sitemap.png b/www/extras/icon/sitemap.png new file mode 100755 index 000000000..ca779f323 Binary files /dev/null and b/www/extras/icon/sitemap.png differ diff --git a/www/extras/icon/sitemap_color.png b/www/extras/icon/sitemap_color.png new file mode 100755 index 000000000..c64582bcd Binary files /dev/null and b/www/extras/icon/sitemap_color.png differ diff --git a/www/extras/icon/sound.png b/www/extras/icon/sound.png new file mode 100755 index 000000000..6056d234a Binary files /dev/null and b/www/extras/icon/sound.png differ diff --git a/www/extras/icon/sound_add.png b/www/extras/icon/sound_add.png new file mode 100755 index 000000000..965c503c6 Binary files /dev/null and b/www/extras/icon/sound_add.png differ diff --git a/www/extras/icon/sound_delete.png b/www/extras/icon/sound_delete.png new file mode 100755 index 000000000..ab9577aa1 Binary files /dev/null and b/www/extras/icon/sound_delete.png differ diff --git a/www/extras/icon/sound_low.png b/www/extras/icon/sound_low.png new file mode 100755 index 000000000..4d918633f Binary files /dev/null and b/www/extras/icon/sound_low.png differ diff --git a/www/extras/icon/sound_mute.png b/www/extras/icon/sound_mute.png new file mode 100755 index 000000000..b652d2a71 Binary files /dev/null and b/www/extras/icon/sound_mute.png differ diff --git a/www/extras/icon/sound_none.png b/www/extras/icon/sound_none.png new file mode 100755 index 000000000..b497ebd54 Binary files /dev/null and b/www/extras/icon/sound_none.png differ diff --git a/www/extras/icon/spellcheck.png b/www/extras/icon/spellcheck.png new file mode 100755 index 000000000..ebc632d9b Binary files /dev/null and b/www/extras/icon/spellcheck.png differ diff --git a/www/extras/icon/sport_8ball.png b/www/extras/icon/sport_8ball.png new file mode 100755 index 000000000..4f627b768 Binary files /dev/null and b/www/extras/icon/sport_8ball.png differ diff --git a/www/extras/icon/sport_basketball.png b/www/extras/icon/sport_basketball.png new file mode 100755 index 000000000..f7a000b9a Binary files /dev/null and b/www/extras/icon/sport_basketball.png differ diff --git a/www/extras/icon/sport_football.png b/www/extras/icon/sport_football.png new file mode 100755 index 000000000..199f0f7f1 Binary files /dev/null and b/www/extras/icon/sport_football.png differ diff --git a/www/extras/icon/sport_golf.png b/www/extras/icon/sport_golf.png new file mode 100755 index 000000000..e21fa44c5 Binary files /dev/null and b/www/extras/icon/sport_golf.png differ diff --git a/www/extras/icon/sport_raquet.png b/www/extras/icon/sport_raquet.png new file mode 100755 index 000000000..f5e0f0c2c Binary files /dev/null and b/www/extras/icon/sport_raquet.png differ diff --git a/www/extras/icon/sport_shuttlecock.png b/www/extras/icon/sport_shuttlecock.png new file mode 100755 index 000000000..917287fa0 Binary files /dev/null and b/www/extras/icon/sport_shuttlecock.png differ diff --git a/www/extras/icon/sport_soccer.png b/www/extras/icon/sport_soccer.png new file mode 100755 index 000000000..3eb1828b1 Binary files /dev/null and b/www/extras/icon/sport_soccer.png differ diff --git a/www/extras/icon/sport_tennis.png b/www/extras/icon/sport_tennis.png new file mode 100755 index 000000000..e88a6efa1 Binary files /dev/null and b/www/extras/icon/sport_tennis.png differ diff --git a/www/extras/icon/star.png b/www/extras/icon/star.png new file mode 100755 index 000000000..b88c85789 Binary files /dev/null and b/www/extras/icon/star.png differ diff --git a/www/extras/icon/status_away.png b/www/extras/icon/status_away.png new file mode 100755 index 000000000..70bcbccaa Binary files /dev/null and b/www/extras/icon/status_away.png differ diff --git a/www/extras/icon/status_busy.png b/www/extras/icon/status_busy.png new file mode 100755 index 000000000..987c806ff Binary files /dev/null and b/www/extras/icon/status_busy.png differ diff --git a/www/extras/icon/status_offline.png b/www/extras/icon/status_offline.png new file mode 100755 index 000000000..a88261a65 Binary files /dev/null and b/www/extras/icon/status_offline.png differ diff --git a/www/extras/icon/status_online.png b/www/extras/icon/status_online.png new file mode 100755 index 000000000..947bd4b62 Binary files /dev/null and b/www/extras/icon/status_online.png differ diff --git a/www/extras/icon/stop.png b/www/extras/icon/stop.png new file mode 100755 index 000000000..0cfd58596 Binary files /dev/null and b/www/extras/icon/stop.png differ diff --git a/www/extras/icon/style.png b/www/extras/icon/style.png new file mode 100755 index 000000000..81e41de7d Binary files /dev/null and b/www/extras/icon/style.png differ diff --git a/www/extras/icon/style_add.png b/www/extras/icon/style_add.png new file mode 100755 index 000000000..e0369c6be Binary files /dev/null and b/www/extras/icon/style_add.png differ diff --git a/www/extras/icon/style_delete.png b/www/extras/icon/style_delete.png new file mode 100755 index 000000000..640f187ec Binary files /dev/null and b/www/extras/icon/style_delete.png differ diff --git a/www/extras/icon/style_edit.png b/www/extras/icon/style_edit.png new file mode 100755 index 000000000..25bb5b677 Binary files /dev/null and b/www/extras/icon/style_edit.png differ diff --git a/www/extras/icon/style_go.png b/www/extras/icon/style_go.png new file mode 100755 index 000000000..25d6181ac Binary files /dev/null and b/www/extras/icon/style_go.png differ diff --git a/www/extras/icon/sum.png b/www/extras/icon/sum.png new file mode 100755 index 000000000..fd7b32e43 Binary files /dev/null and b/www/extras/icon/sum.png differ diff --git a/www/extras/icon/tab.png b/www/extras/icon/tab.png new file mode 100755 index 000000000..3d8207fd7 Binary files /dev/null and b/www/extras/icon/tab.png differ diff --git a/www/extras/icon/tab_add.png b/www/extras/icon/tab_add.png new file mode 100755 index 000000000..d3b99364a Binary files /dev/null and b/www/extras/icon/tab_add.png differ diff --git a/www/extras/icon/tab_delete.png b/www/extras/icon/tab_delete.png new file mode 100755 index 000000000..100da2f1a Binary files /dev/null and b/www/extras/icon/tab_delete.png differ diff --git a/www/extras/icon/tab_edit.png b/www/extras/icon/tab_edit.png new file mode 100755 index 000000000..4c09c0fd7 Binary files /dev/null and b/www/extras/icon/tab_edit.png differ diff --git a/www/extras/icon/tab_go.png b/www/extras/icon/tab_go.png new file mode 100755 index 000000000..844ce04bd Binary files /dev/null and b/www/extras/icon/tab_go.png differ diff --git a/www/extras/icon/table.png b/www/extras/icon/table.png new file mode 100755 index 000000000..abcd93689 Binary files /dev/null and b/www/extras/icon/table.png differ diff --git a/www/extras/icon/table_add.png b/www/extras/icon/table_add.png new file mode 100755 index 000000000..2a3e5c4df Binary files /dev/null and b/www/extras/icon/table_add.png differ diff --git a/www/extras/icon/table_delete.png b/www/extras/icon/table_delete.png new file mode 100755 index 000000000..b85916d92 Binary files /dev/null and b/www/extras/icon/table_delete.png differ diff --git a/www/extras/icon/table_edit.png b/www/extras/icon/table_edit.png new file mode 100755 index 000000000..bfcb0249a Binary files /dev/null and b/www/extras/icon/table_edit.png differ diff --git a/www/extras/icon/table_error.png b/www/extras/icon/table_error.png new file mode 100755 index 000000000..589e92b55 Binary files /dev/null and b/www/extras/icon/table_error.png differ diff --git a/www/extras/icon/table_gear.png b/www/extras/icon/table_gear.png new file mode 100755 index 000000000..cfc2702ac Binary files /dev/null and b/www/extras/icon/table_gear.png differ diff --git a/www/extras/icon/table_go.png b/www/extras/icon/table_go.png new file mode 100755 index 000000000..0528dfa24 Binary files /dev/null and b/www/extras/icon/table_go.png differ diff --git a/www/extras/icon/table_key.png b/www/extras/icon/table_key.png new file mode 100755 index 000000000..34e23e24e Binary files /dev/null and b/www/extras/icon/table_key.png differ diff --git a/www/extras/icon/table_lightning.png b/www/extras/icon/table_lightning.png new file mode 100755 index 000000000..612612b5e Binary files /dev/null and b/www/extras/icon/table_lightning.png differ diff --git a/www/extras/icon/table_link.png b/www/extras/icon/table_link.png new file mode 100755 index 000000000..decac8a62 Binary files /dev/null and b/www/extras/icon/table_link.png differ diff --git a/www/extras/icon/table_multiple.png b/www/extras/icon/table_multiple.png new file mode 100755 index 000000000..d76448e34 Binary files /dev/null and b/www/extras/icon/table_multiple.png differ diff --git a/www/extras/icon/table_refresh.png b/www/extras/icon/table_refresh.png new file mode 100755 index 000000000..ab92010c2 Binary files /dev/null and b/www/extras/icon/table_refresh.png differ diff --git a/www/extras/icon/table_relationship.png b/www/extras/icon/table_relationship.png new file mode 100755 index 000000000..28b8505c0 Binary files /dev/null and b/www/extras/icon/table_relationship.png differ diff --git a/www/extras/icon/table_row_delete.png b/www/extras/icon/table_row_delete.png new file mode 100755 index 000000000..54c69691e Binary files /dev/null and b/www/extras/icon/table_row_delete.png differ diff --git a/www/extras/icon/table_row_insert.png b/www/extras/icon/table_row_insert.png new file mode 100755 index 000000000..ff5925efd Binary files /dev/null and b/www/extras/icon/table_row_insert.png differ diff --git a/www/extras/icon/table_save.png b/www/extras/icon/table_save.png new file mode 100755 index 000000000..25b74d18f Binary files /dev/null and b/www/extras/icon/table_save.png differ diff --git a/www/extras/icon/table_sort.png b/www/extras/icon/table_sort.png new file mode 100755 index 000000000..ed6785a6a Binary files /dev/null and b/www/extras/icon/table_sort.png differ diff --git a/www/extras/icon/tag.png b/www/extras/icon/tag.png new file mode 100755 index 000000000..e093032a7 Binary files /dev/null and b/www/extras/icon/tag.png differ diff --git a/www/extras/icon/tag_blue.png b/www/extras/icon/tag_blue.png new file mode 100755 index 000000000..9757fc6ed Binary files /dev/null and b/www/extras/icon/tag_blue.png differ diff --git a/www/extras/icon/tag_blue_add.png b/www/extras/icon/tag_blue_add.png new file mode 100755 index 000000000..f135248f8 Binary files /dev/null and b/www/extras/icon/tag_blue_add.png differ diff --git a/www/extras/icon/tag_blue_delete.png b/www/extras/icon/tag_blue_delete.png new file mode 100755 index 000000000..9fbae6725 Binary files /dev/null and b/www/extras/icon/tag_blue_delete.png differ diff --git a/www/extras/icon/tag_blue_edit.png b/www/extras/icon/tag_blue_edit.png new file mode 100755 index 000000000..2a9f6266e Binary files /dev/null and b/www/extras/icon/tag_blue_edit.png differ diff --git a/www/extras/icon/tag_green.png b/www/extras/icon/tag_green.png new file mode 100755 index 000000000..83ec984bd Binary files /dev/null and b/www/extras/icon/tag_green.png differ diff --git a/www/extras/icon/tag_orange.png b/www/extras/icon/tag_orange.png new file mode 100755 index 000000000..454a59f30 Binary files /dev/null and b/www/extras/icon/tag_orange.png differ diff --git a/www/extras/icon/tag_pink.png b/www/extras/icon/tag_pink.png new file mode 100755 index 000000000..76e2296cc Binary files /dev/null and b/www/extras/icon/tag_pink.png differ diff --git a/www/extras/icon/tag_purple.png b/www/extras/icon/tag_purple.png new file mode 100755 index 000000000..ebaf0e874 Binary files /dev/null and b/www/extras/icon/tag_purple.png differ diff --git a/www/extras/icon/tag_red.png b/www/extras/icon/tag_red.png new file mode 100755 index 000000000..6ebb37d25 Binary files /dev/null and b/www/extras/icon/tag_red.png differ diff --git a/www/extras/icon/tag_yellow.png b/www/extras/icon/tag_yellow.png new file mode 100755 index 000000000..83d12924f Binary files /dev/null and b/www/extras/icon/tag_yellow.png differ diff --git a/www/extras/icon/telephone.png b/www/extras/icon/telephone.png new file mode 100755 index 000000000..cecc436fb Binary files /dev/null and b/www/extras/icon/telephone.png differ diff --git a/www/extras/icon/telephone_add.png b/www/extras/icon/telephone_add.png new file mode 100755 index 000000000..5591cfc4a Binary files /dev/null and b/www/extras/icon/telephone_add.png differ diff --git a/www/extras/icon/telephone_delete.png b/www/extras/icon/telephone_delete.png new file mode 100755 index 000000000..0013268e9 Binary files /dev/null and b/www/extras/icon/telephone_delete.png differ diff --git a/www/extras/icon/telephone_edit.png b/www/extras/icon/telephone_edit.png new file mode 100755 index 000000000..bcf6d7ec1 Binary files /dev/null and b/www/extras/icon/telephone_edit.png differ diff --git a/www/extras/icon/telephone_error.png b/www/extras/icon/telephone_error.png new file mode 100755 index 000000000..d3ec3a110 Binary files /dev/null and b/www/extras/icon/telephone_error.png differ diff --git a/www/extras/icon/telephone_go.png b/www/extras/icon/telephone_go.png new file mode 100755 index 000000000..395c8fbf5 Binary files /dev/null and b/www/extras/icon/telephone_go.png differ diff --git a/www/extras/icon/telephone_key.png b/www/extras/icon/telephone_key.png new file mode 100755 index 000000000..cef5dec4e Binary files /dev/null and b/www/extras/icon/telephone_key.png differ diff --git a/www/extras/icon/telephone_link.png b/www/extras/icon/telephone_link.png new file mode 100755 index 000000000..ef1ee5dd7 Binary files /dev/null and b/www/extras/icon/telephone_link.png differ diff --git a/www/extras/icon/television.png b/www/extras/icon/television.png new file mode 100755 index 000000000..1738a4f10 Binary files /dev/null and b/www/extras/icon/television.png differ diff --git a/www/extras/icon/television_add.png b/www/extras/icon/television_add.png new file mode 100755 index 000000000..2baaad99e Binary files /dev/null and b/www/extras/icon/television_add.png differ diff --git a/www/extras/icon/television_delete.png b/www/extras/icon/television_delete.png new file mode 100755 index 000000000..b9a586025 Binary files /dev/null and b/www/extras/icon/television_delete.png differ diff --git a/www/extras/icon/text_align_center.png b/www/extras/icon/text_align_center.png new file mode 100755 index 000000000..57beb3813 Binary files /dev/null and b/www/extras/icon/text_align_center.png differ diff --git a/www/extras/icon/text_align_justify.png b/www/extras/icon/text_align_justify.png new file mode 100755 index 000000000..2fbdd6920 Binary files /dev/null and b/www/extras/icon/text_align_justify.png differ diff --git a/www/extras/icon/text_align_left.png b/www/extras/icon/text_align_left.png new file mode 100755 index 000000000..6c8fcc116 Binary files /dev/null and b/www/extras/icon/text_align_left.png differ diff --git a/www/extras/icon/text_align_right.png b/www/extras/icon/text_align_right.png new file mode 100755 index 000000000..a1502571c Binary files /dev/null and b/www/extras/icon/text_align_right.png differ diff --git a/www/extras/icon/text_allcaps.png b/www/extras/icon/text_allcaps.png new file mode 100755 index 000000000..280fd442b Binary files /dev/null and b/www/extras/icon/text_allcaps.png differ diff --git a/www/extras/icon/text_bold.png b/www/extras/icon/text_bold.png new file mode 100755 index 000000000..889ae80e3 Binary files /dev/null and b/www/extras/icon/text_bold.png differ diff --git a/www/extras/icon/text_columns.png b/www/extras/icon/text_columns.png new file mode 100755 index 000000000..97b2e0353 Binary files /dev/null and b/www/extras/icon/text_columns.png differ diff --git a/www/extras/icon/text_dropcaps.png b/www/extras/icon/text_dropcaps.png new file mode 100755 index 000000000..dd65786a7 Binary files /dev/null and b/www/extras/icon/text_dropcaps.png differ diff --git a/www/extras/icon/text_heading_1.png b/www/extras/icon/text_heading_1.png new file mode 100755 index 000000000..9c122e91e Binary files /dev/null and b/www/extras/icon/text_heading_1.png differ diff --git a/www/extras/icon/text_heading_2.png b/www/extras/icon/text_heading_2.png new file mode 100755 index 000000000..fbd87657f Binary files /dev/null and b/www/extras/icon/text_heading_2.png differ diff --git a/www/extras/icon/text_heading_3.png b/www/extras/icon/text_heading_3.png new file mode 100755 index 000000000..c7836cf09 Binary files /dev/null and b/www/extras/icon/text_heading_3.png differ diff --git a/www/extras/icon/text_heading_4.png b/www/extras/icon/text_heading_4.png new file mode 100755 index 000000000..4e929eaf5 Binary files /dev/null and b/www/extras/icon/text_heading_4.png differ diff --git a/www/extras/icon/text_heading_5.png b/www/extras/icon/text_heading_5.png new file mode 100755 index 000000000..30cabebf7 Binary files /dev/null and b/www/extras/icon/text_heading_5.png differ diff --git a/www/extras/icon/text_heading_6.png b/www/extras/icon/text_heading_6.png new file mode 100755 index 000000000..058170a20 Binary files /dev/null and b/www/extras/icon/text_heading_6.png differ diff --git a/www/extras/icon/text_horizontalrule.png b/www/extras/icon/text_horizontalrule.png new file mode 100755 index 000000000..8dd1da1c1 Binary files /dev/null and b/www/extras/icon/text_horizontalrule.png differ diff --git a/www/extras/icon/text_indent.png b/www/extras/icon/text_indent.png new file mode 100755 index 000000000..936453234 Binary files /dev/null and b/www/extras/icon/text_indent.png differ diff --git a/www/extras/icon/text_indent_remove.png b/www/extras/icon/text_indent_remove.png new file mode 100755 index 000000000..1651b074e Binary files /dev/null and b/www/extras/icon/text_indent_remove.png differ diff --git a/www/extras/icon/text_italic.png b/www/extras/icon/text_italic.png new file mode 100755 index 000000000..8482ac8cb Binary files /dev/null and b/www/extras/icon/text_italic.png differ diff --git a/www/extras/icon/text_kerning.png b/www/extras/icon/text_kerning.png new file mode 100755 index 000000000..377def645 Binary files /dev/null and b/www/extras/icon/text_kerning.png differ diff --git a/www/extras/icon/text_letter_omega.png b/www/extras/icon/text_letter_omega.png new file mode 100755 index 000000000..5075ec6b8 Binary files /dev/null and b/www/extras/icon/text_letter_omega.png differ diff --git a/www/extras/icon/text_letterspacing.png b/www/extras/icon/text_letterspacing.png new file mode 100755 index 000000000..41390f549 Binary files /dev/null and b/www/extras/icon/text_letterspacing.png differ diff --git a/www/extras/icon/text_linespacing.png b/www/extras/icon/text_linespacing.png new file mode 100755 index 000000000..1a91cbdd5 Binary files /dev/null and b/www/extras/icon/text_linespacing.png differ diff --git a/www/extras/icon/text_list_bullets.png b/www/extras/icon/text_list_bullets.png new file mode 100755 index 000000000..4a8672bde Binary files /dev/null and b/www/extras/icon/text_list_bullets.png differ diff --git a/www/extras/icon/text_list_numbers.png b/www/extras/icon/text_list_numbers.png new file mode 100755 index 000000000..33b0b8df3 Binary files /dev/null and b/www/extras/icon/text_list_numbers.png differ diff --git a/www/extras/icon/text_lowercase.png b/www/extras/icon/text_lowercase.png new file mode 100755 index 000000000..382a102e3 Binary files /dev/null and b/www/extras/icon/text_lowercase.png differ diff --git a/www/extras/icon/text_padding_bottom.png b/www/extras/icon/text_padding_bottom.png new file mode 100755 index 000000000..4880c43a1 Binary files /dev/null and b/www/extras/icon/text_padding_bottom.png differ diff --git a/www/extras/icon/text_padding_left.png b/www/extras/icon/text_padding_left.png new file mode 100755 index 000000000..b55482eee Binary files /dev/null and b/www/extras/icon/text_padding_left.png differ diff --git a/www/extras/icon/text_padding_right.png b/www/extras/icon/text_padding_right.png new file mode 100755 index 000000000..106edae52 Binary files /dev/null and b/www/extras/icon/text_padding_right.png differ diff --git a/www/extras/icon/text_padding_top.png b/www/extras/icon/text_padding_top.png new file mode 100755 index 000000000..c5c45b2d6 Binary files /dev/null and b/www/extras/icon/text_padding_top.png differ diff --git a/www/extras/icon/text_replace.png b/www/extras/icon/text_replace.png new file mode 100755 index 000000000..877f82fea Binary files /dev/null and b/www/extras/icon/text_replace.png differ diff --git a/www/extras/icon/text_signature.png b/www/extras/icon/text_signature.png new file mode 100755 index 000000000..c72fd8088 Binary files /dev/null and b/www/extras/icon/text_signature.png differ diff --git a/www/extras/icon/text_smallcaps.png b/www/extras/icon/text_smallcaps.png new file mode 100755 index 000000000..5b98a6e13 Binary files /dev/null and b/www/extras/icon/text_smallcaps.png differ diff --git a/www/extras/icon/text_strikethrough.png b/www/extras/icon/text_strikethrough.png new file mode 100755 index 000000000..612058a78 Binary files /dev/null and b/www/extras/icon/text_strikethrough.png differ diff --git a/www/extras/icon/text_subscript.png b/www/extras/icon/text_subscript.png new file mode 100755 index 000000000..1a2b01017 Binary files /dev/null and b/www/extras/icon/text_subscript.png differ diff --git a/www/extras/icon/text_superscript.png b/www/extras/icon/text_superscript.png new file mode 100755 index 000000000..2fb2a7c74 Binary files /dev/null and b/www/extras/icon/text_superscript.png differ diff --git a/www/extras/icon/text_underline.png b/www/extras/icon/text_underline.png new file mode 100755 index 000000000..90d0df286 Binary files /dev/null and b/www/extras/icon/text_underline.png differ diff --git a/www/extras/icon/text_uppercase.png b/www/extras/icon/text_uppercase.png new file mode 100755 index 000000000..8dcc2dbbb Binary files /dev/null and b/www/extras/icon/text_uppercase.png differ diff --git a/www/extras/icon/textfield.png b/www/extras/icon/textfield.png new file mode 100755 index 000000000..d37e7304e Binary files /dev/null and b/www/extras/icon/textfield.png differ diff --git a/www/extras/icon/textfield_add.png b/www/extras/icon/textfield_add.png new file mode 100755 index 000000000..204de7231 Binary files /dev/null and b/www/extras/icon/textfield_add.png differ diff --git a/www/extras/icon/textfield_delete.png b/www/extras/icon/textfield_delete.png new file mode 100755 index 000000000..c7bd58b21 Binary files /dev/null and b/www/extras/icon/textfield_delete.png differ diff --git a/www/extras/icon/textfield_key.png b/www/extras/icon/textfield_key.png new file mode 100755 index 000000000..a9d5e4f8c Binary files /dev/null and b/www/extras/icon/textfield_key.png differ diff --git a/www/extras/icon/textfield_rename.png b/www/extras/icon/textfield_rename.png new file mode 100755 index 000000000..4e3688edc Binary files /dev/null and b/www/extras/icon/textfield_rename.png differ diff --git a/www/extras/icon/thumb_down.png b/www/extras/icon/thumb_down.png new file mode 100755 index 000000000..3c832d4c8 Binary files /dev/null and b/www/extras/icon/thumb_down.png differ diff --git a/www/extras/icon/thumb_up.png b/www/extras/icon/thumb_up.png new file mode 100755 index 000000000..2bd16ccf2 Binary files /dev/null and b/www/extras/icon/thumb_up.png differ diff --git a/www/extras/icon/tick.png b/www/extras/icon/tick.png new file mode 100755 index 000000000..a9925a06a Binary files /dev/null and b/www/extras/icon/tick.png differ diff --git a/www/extras/icon/time.png b/www/extras/icon/time.png new file mode 100755 index 000000000..911da3f1d Binary files /dev/null and b/www/extras/icon/time.png differ diff --git a/www/extras/icon/time_add.png b/www/extras/icon/time_add.png new file mode 100755 index 000000000..dcc45cb22 Binary files /dev/null and b/www/extras/icon/time_add.png differ diff --git a/www/extras/icon/time_delete.png b/www/extras/icon/time_delete.png new file mode 100755 index 000000000..5bf8313c6 Binary files /dev/null and b/www/extras/icon/time_delete.png differ diff --git a/www/extras/icon/time_go.png b/www/extras/icon/time_go.png new file mode 100755 index 000000000..d451ee061 Binary files /dev/null and b/www/extras/icon/time_go.png differ diff --git a/www/extras/icon/timeline_marker.png b/www/extras/icon/timeline_marker.png new file mode 100755 index 000000000..a3fbddf88 Binary files /dev/null and b/www/extras/icon/timeline_marker.png differ diff --git a/www/extras/icon/transmit.png b/www/extras/icon/transmit.png new file mode 100755 index 000000000..f54bf736c Binary files /dev/null and b/www/extras/icon/transmit.png differ diff --git a/www/extras/icon/transmit_add.png b/www/extras/icon/transmit_add.png new file mode 100755 index 000000000..b7fd4e685 Binary files /dev/null and b/www/extras/icon/transmit_add.png differ diff --git a/www/extras/icon/transmit_blue.png b/www/extras/icon/transmit_blue.png new file mode 100755 index 000000000..7b1142fc7 Binary files /dev/null and b/www/extras/icon/transmit_blue.png differ diff --git a/www/extras/icon/transmit_delete.png b/www/extras/icon/transmit_delete.png new file mode 100755 index 000000000..3d72be2a3 Binary files /dev/null and b/www/extras/icon/transmit_delete.png differ diff --git a/www/extras/icon/transmit_edit.png b/www/extras/icon/transmit_edit.png new file mode 100755 index 000000000..eb9a3dd59 Binary files /dev/null and b/www/extras/icon/transmit_edit.png differ diff --git a/www/extras/icon/transmit_error.png b/www/extras/icon/transmit_error.png new file mode 100755 index 000000000..fd1d4499a Binary files /dev/null and b/www/extras/icon/transmit_error.png differ diff --git a/www/extras/icon/transmit_go.png b/www/extras/icon/transmit_go.png new file mode 100755 index 000000000..10137e55c Binary files /dev/null and b/www/extras/icon/transmit_go.png differ diff --git a/www/extras/icon/tux.png b/www/extras/icon/tux.png new file mode 100755 index 000000000..bbefe2ec4 Binary files /dev/null and b/www/extras/icon/tux.png differ diff --git a/www/extras/icon/user.png b/www/extras/icon/user.png new file mode 100755 index 000000000..79f35ccbd Binary files /dev/null and b/www/extras/icon/user.png differ diff --git a/www/extras/icon/user_add.png b/www/extras/icon/user_add.png new file mode 100755 index 000000000..deae99bcf Binary files /dev/null and b/www/extras/icon/user_add.png differ diff --git a/www/extras/icon/user_comment.png b/www/extras/icon/user_comment.png new file mode 100755 index 000000000..e54ebebaf Binary files /dev/null and b/www/extras/icon/user_comment.png differ diff --git a/www/extras/icon/user_delete.png b/www/extras/icon/user_delete.png new file mode 100755 index 000000000..acbb5630e Binary files /dev/null and b/www/extras/icon/user_delete.png differ diff --git a/www/extras/icon/user_edit.png b/www/extras/icon/user_edit.png new file mode 100755 index 000000000..c1974cda7 Binary files /dev/null and b/www/extras/icon/user_edit.png differ diff --git a/www/extras/icon/user_female.png b/www/extras/icon/user_female.png new file mode 100755 index 000000000..7c71de03b Binary files /dev/null and b/www/extras/icon/user_female.png differ diff --git a/www/extras/icon/user_go.png b/www/extras/icon/user_go.png new file mode 100755 index 000000000..0468cf08f Binary files /dev/null and b/www/extras/icon/user_go.png differ diff --git a/www/extras/icon/user_gray.png b/www/extras/icon/user_gray.png new file mode 100755 index 000000000..8fd539e9c Binary files /dev/null and b/www/extras/icon/user_gray.png differ diff --git a/www/extras/icon/user_green.png b/www/extras/icon/user_green.png new file mode 100755 index 000000000..30383c2de Binary files /dev/null and b/www/extras/icon/user_green.png differ diff --git a/www/extras/icon/user_orange.png b/www/extras/icon/user_orange.png new file mode 100755 index 000000000..b818127df Binary files /dev/null and b/www/extras/icon/user_orange.png differ diff --git a/www/extras/icon/user_red.png b/www/extras/icon/user_red.png new file mode 100755 index 000000000..c6f66e8b3 Binary files /dev/null and b/www/extras/icon/user_red.png differ diff --git a/www/extras/icon/user_suit.png b/www/extras/icon/user_suit.png new file mode 100755 index 000000000..b3454e15f Binary files /dev/null and b/www/extras/icon/user_suit.png differ diff --git a/www/extras/icon/vcard.png b/www/extras/icon/vcard.png new file mode 100755 index 000000000..c02f315d2 Binary files /dev/null and b/www/extras/icon/vcard.png differ diff --git a/www/extras/icon/vcard_add.png b/www/extras/icon/vcard_add.png new file mode 100755 index 000000000..2a6845381 Binary files /dev/null and b/www/extras/icon/vcard_add.png differ diff --git a/www/extras/icon/vcard_delete.png b/www/extras/icon/vcard_delete.png new file mode 100755 index 000000000..b194b971b Binary files /dev/null and b/www/extras/icon/vcard_delete.png differ diff --git a/www/extras/icon/vcard_edit.png b/www/extras/icon/vcard_edit.png new file mode 100755 index 000000000..ab0f6e73d Binary files /dev/null and b/www/extras/icon/vcard_edit.png differ diff --git a/www/extras/icon/vector.png b/www/extras/icon/vector.png new file mode 100755 index 000000000..a1291c2df Binary files /dev/null and b/www/extras/icon/vector.png differ diff --git a/www/extras/icon/vector_add.png b/www/extras/icon/vector_add.png new file mode 100755 index 000000000..988770f40 Binary files /dev/null and b/www/extras/icon/vector_add.png differ diff --git a/www/extras/icon/vector_delete.png b/www/extras/icon/vector_delete.png new file mode 100755 index 000000000..ca139e0f3 Binary files /dev/null and b/www/extras/icon/vector_delete.png differ diff --git a/www/extras/icon/wand.png b/www/extras/icon/wand.png new file mode 100755 index 000000000..44ccbf812 Binary files /dev/null and b/www/extras/icon/wand.png differ diff --git a/www/extras/icon/weather_clouds.png b/www/extras/icon/weather_clouds.png new file mode 100755 index 000000000..3f73eaa14 Binary files /dev/null and b/www/extras/icon/weather_clouds.png differ diff --git a/www/extras/icon/weather_cloudy.png b/www/extras/icon/weather_cloudy.png new file mode 100755 index 000000000..5856e1d05 Binary files /dev/null and b/www/extras/icon/weather_cloudy.png differ diff --git a/www/extras/icon/weather_lightning.png b/www/extras/icon/weather_lightning.png new file mode 100755 index 000000000..1d42b3673 Binary files /dev/null and b/www/extras/icon/weather_lightning.png differ diff --git a/www/extras/icon/weather_rain.png b/www/extras/icon/weather_rain.png new file mode 100755 index 000000000..cb3d54d06 Binary files /dev/null and b/www/extras/icon/weather_rain.png differ diff --git a/www/extras/icon/weather_snow.png b/www/extras/icon/weather_snow.png new file mode 100755 index 000000000..45bbdf19c Binary files /dev/null and b/www/extras/icon/weather_snow.png differ diff --git a/www/extras/icon/weather_sun.png b/www/extras/icon/weather_sun.png new file mode 100755 index 000000000..0156c266e Binary files /dev/null and b/www/extras/icon/weather_sun.png differ diff --git a/www/extras/icon/webcam.png b/www/extras/icon/webcam.png new file mode 100755 index 000000000..af71c3061 Binary files /dev/null and b/www/extras/icon/webcam.png differ diff --git a/www/extras/icon/webcam_add.png b/www/extras/icon/webcam_add.png new file mode 100755 index 000000000..f02fcfa99 Binary files /dev/null and b/www/extras/icon/webcam_add.png differ diff --git a/www/extras/icon/webcam_delete.png b/www/extras/icon/webcam_delete.png new file mode 100755 index 000000000..bd6277f51 Binary files /dev/null and b/www/extras/icon/webcam_delete.png differ diff --git a/www/extras/icon/webcam_error.png b/www/extras/icon/webcam_error.png new file mode 100755 index 000000000..2faa70679 Binary files /dev/null and b/www/extras/icon/webcam_error.png differ diff --git a/www/extras/icon/world.png b/www/extras/icon/world.png new file mode 100755 index 000000000..68f21d301 Binary files /dev/null and b/www/extras/icon/world.png differ diff --git a/www/extras/icon/world_add.png b/www/extras/icon/world_add.png new file mode 100755 index 000000000..6d0d7f74c Binary files /dev/null and b/www/extras/icon/world_add.png differ diff --git a/www/extras/icon/world_delete.png b/www/extras/icon/world_delete.png new file mode 100755 index 000000000..ffcd1156f Binary files /dev/null and b/www/extras/icon/world_delete.png differ diff --git a/www/extras/icon/world_edit.png b/www/extras/icon/world_edit.png new file mode 100755 index 000000000..00794d408 Binary files /dev/null and b/www/extras/icon/world_edit.png differ diff --git a/www/extras/icon/world_go.png b/www/extras/icon/world_go.png new file mode 100755 index 000000000..aee9c97f8 Binary files /dev/null and b/www/extras/icon/world_go.png differ diff --git a/www/extras/icon/world_link.png b/www/extras/icon/world_link.png new file mode 100755 index 000000000..b8edc1265 Binary files /dev/null and b/www/extras/icon/world_link.png differ diff --git a/www/extras/icon/wrench.png b/www/extras/icon/wrench.png new file mode 100755 index 000000000..5c8213fef Binary files /dev/null and b/www/extras/icon/wrench.png differ diff --git a/www/extras/icon/wrench_orange.png b/www/extras/icon/wrench_orange.png new file mode 100755 index 000000000..565a9330e Binary files /dev/null and b/www/extras/icon/wrench_orange.png differ diff --git a/www/extras/icon/xhtml.png b/www/extras/icon/xhtml.png new file mode 100755 index 000000000..da5dbf200 Binary files /dev/null and b/www/extras/icon/xhtml.png differ diff --git a/www/extras/icon/xhtml_add.png b/www/extras/icon/xhtml_add.png new file mode 100755 index 000000000..bbaf784f2 Binary files /dev/null and b/www/extras/icon/xhtml_add.png differ diff --git a/www/extras/icon/xhtml_delete.png b/www/extras/icon/xhtml_delete.png new file mode 100755 index 000000000..157b5201d Binary files /dev/null and b/www/extras/icon/xhtml_delete.png differ diff --git a/www/extras/icon/xhtml_go.png b/www/extras/icon/xhtml_go.png new file mode 100755 index 000000000..43cf81448 Binary files /dev/null and b/www/extras/icon/xhtml_go.png differ diff --git a/www/extras/icon/xhtml_valid.png b/www/extras/icon/xhtml_valid.png new file mode 100755 index 000000000..d2e1cfbe3 Binary files /dev/null and b/www/extras/icon/xhtml_valid.png differ diff --git a/www/extras/icon/zoom.png b/www/extras/icon/zoom.png new file mode 100755 index 000000000..908612e39 Binary files /dev/null and b/www/extras/icon/zoom.png differ diff --git a/www/extras/icon/zoom_in.png b/www/extras/icon/zoom_in.png new file mode 100755 index 000000000..cdf0a52fe Binary files /dev/null and b/www/extras/icon/zoom_in.png differ diff --git a/www/extras/icon/zoom_out.png b/www/extras/icon/zoom_out.png new file mode 100755 index 000000000..07bf98a79 Binary files /dev/null and b/www/extras/icon/zoom_out.png differ diff --git a/www/extras/macro/AdminBar/btn_bg.jpg b/www/extras/macro/AdminBar/btn_bg.jpg deleted file mode 100644 index 380e38992..000000000 Binary files a/www/extras/macro/AdminBar/btn_bg.jpg and /dev/null differ diff --git a/www/extras/macro/AdminBar/panel_bg.jpg b/www/extras/macro/AdminBar/panel_bg.jpg deleted file mode 100644 index 8da764bb2..000000000 Binary files a/www/extras/macro/AdminBar/panel_bg.jpg and /dev/null differ diff --git a/www/extras/macro/AdminBar/slidePanel.css b/www/extras/macro/AdminBar/slidePanel.css deleted file mode 100644 index 9279bd996..000000000 --- a/www/extras/macro/AdminBar/slidePanel.css +++ /dev/null @@ -1,161 +0,0 @@ -dl.accordion-menu dd.a-m-d div.ncmct { - width: 140px; - border-bottom: 1px solid #bbbbbb; - color: black; - font-weight: bold; - font-size: 12px; - margin-bottom: 5px; - font-family: sans-serif; -} - -dl.accordion-menu { - margin: 0; - padding: 0; - width: 160px; - background: #eeeeee; - position:fixed; - _position:absolute; - top:0; - - /* - _top:expression(eval((document.documentElement && document.documentElement.scrollTop) ? document.documentElement.scrollTop : document.body.scrollTop)); */ - left:0; - z-index: 100; -} - -dl.accordion-menu dt.a-m-t { - margin: 0; - padding: 0; - background-color:#dddddd; - background-image: url(btn_bg.jpg); - font-weight: bold; - height: 20px; - color: #444444; - border: 1px solid #ACACAC; - line-height: 20px; - font-size: 12px; - text-align:center; - font-family: sans-serif; -} - -dl.accordion-menu dt.a-m-t-hover{ - margin: 0; - padding: 0; - background:#cdcdcd; -} - - -dl.accordion-menu dt.a-m-t-down{ - margin: 0; - padding: 0; - border: solid 1px #222222; - border-right-color: #dfdfdf; - border-bottom-color: #dfdfdf; -} - - -html.accordion-menu-js dt.a-m-t{ - margin: 0; - padding: 0; - cursor:pointer; - zoom:1; -} - -dl.accordion-menu dd.a-m-d { - margin: 0; - padding: 0; - overflow: auto; - background-color: #eeeeee; - background-image: url(panel_bg.jpg); - background-repeat: repeat-x; - font-weight: normal; -} - -dl.accordion-menu dd.a-m-d .link, -dl.accordion-menu dd.a-m-d .wgButton { - margin: 0; - padding: 0; - display: block; - width: 118px; - text-align:left; - padding-left:20px; - text-decoration: none; - color: black; - font-family: sans-serif; - cursor: pointer; - font-weight: normal; - font-size: 12px; - margin-bottom:5px; - margin-left:2px; - letter-spacing:0px; - text-transform:none; - font-variant:normal; - line-height:12px; -} - -dl.accordion-menu dd.a-m-d .wgButton { - background-color: transparent; - border: none; - display: inline; - margin-left: 0px; - padding-left: 0px; - width: auto; - -moz-user-select: text; -} - -dl.accordion-menu dd.a-m-d .link img { -margin-left:-20px; -} - -dl.accordion-menu dd.a-m-d .link:hover, -dl.accordion-menu dd.a-m-d button.wgButton:hover span { - color: blue; - background-color: #F5F5F5; -} - -html.accordion-menu-js dd.a-m-d{ - margin: 0; - padding: 0; - display:none; -} - - -html.accordion-menu-js dd.a-m-d-expand { - margin: 0; - padding: 0; - display:block; -} - -html.accordion-menu-js dd.a-m-d-before-expand { - margin: 0; - padding: 0; - display:block; - position:relative; - z-index:-1; - opacity:0; - height:auto !important; - visibility:hidden; - overflow:visible; -} - - -html.accordion-menu-js dt.a-m-t-expand { - margin: 0; - padding: 0; - border-left-color:#222222; - color:black; - background:#c0c0c0; -} - -html.accordion-menu-js dd.a-m-d-anim { - margin: 0; - padding: 0; - overflow:hidden; - display:block; -} - - - - - - diff --git a/www/extras/macro/FacebookLogin/login-button.png b/www/extras/macro/FacebookLogin/login-button.png new file mode 100644 index 000000000..4e7766bca Binary files /dev/null and b/www/extras/macro/FacebookLogin/login-button.png differ diff --git a/www/extras/tinymce-webgui/plugins/wgspellchecker/add-word.diff b/www/extras/tinymce-webgui/plugins/wgspellchecker/add-word.diff deleted file mode 100644 index aea3a1c33..000000000 --- a/www/extras/tinymce-webgui/plugins/wgspellchecker/add-word.diff +++ /dev/null @@ -1,48 +0,0 @@ -diff --git a/editor_plugin_src.js b/editor_plugin_src.js -index 4e9ba99..a96e310 100644 ---- a/editor_plugin_src.js -+++ b/editor_plugin_src.js -@@ -7,6 +7,7 @@ - - (function() { - var JSONRequest = tinymce.util.JSONRequest, each = tinymce.each, DOM = tinymce.DOM; -+ tinymce.PluginManager.requireLangPack('wgspellchecker'); - - tinymce.create('tinymce.plugins.SpellcheckerPlugin', { - getInfo : function() { -@@ -269,6 +270,16 @@ - } - }); - -+ m.add({ -+ title : 'spellchecker.add_word', -+ onclick : function() { -+ t._sendRPC('addWord', [t.selectedLang, dom.decode(e.target.innerHTML)], function(r) { -+ t._removeWords(dom.decode(e.target.innerHTML)); -+ t._checkDone(); -+ }); -+ } -+ }); -+ - m.update(); - }); - -@@ -333,5 +344,5 @@ - }); - - // Register plugin -- tinymce.PluginManager.add('spellchecker', tinymce.plugins.SpellcheckerPlugin); --})(); -\ No newline at end of file -+ tinymce.PluginManager.add('wgspellchecker', tinymce.plugins.SpellcheckerPlugin); -+})(); -diff --git a/dev/null b/langs/en.js -new file mode 100644 -index 0000000..602b23c ---- /dev/null -+++ b/langs/en.js -@@ -0,0 +1,4 @@ -+tinyMCE.addI18n('en.spellchecker',{ -+ add_word : 'Add word to dictionary' -+}); -+ diff --git a/www/extras/tinymce-webgui/plugins/wgspellchecker/css/content.css b/www/extras/tinymce-webgui/plugins/wgspellchecker/css/content.css deleted file mode 100644 index 24efa0217..000000000 --- a/www/extras/tinymce-webgui/plugins/wgspellchecker/css/content.css +++ /dev/null @@ -1 +0,0 @@ -.mceItemHiddenSpellWord {background:url(../img/wline.gif) repeat-x bottom left; cursor:default;} diff --git a/www/extras/tinymce-webgui/plugins/wgspellchecker/editor_plugin.js b/www/extras/tinymce-webgui/plugins/wgspellchecker/editor_plugin.js deleted file mode 100644 index b57bba602..000000000 --- a/www/extras/tinymce-webgui/plugins/wgspellchecker/editor_plugin.js +++ /dev/null @@ -1 +0,0 @@ -(function(){var JSONRequest=tinymce.util.JSONRequest,each=tinymce.each,DOM=tinymce.DOM;tinymce.PluginManager.requireLangPack('wgspellchecker');tinymce.create('tinymce.plugins.SpellcheckerPlugin',{getInfo:function(){return{longname:'Spellchecker',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker',version:tinymce.majorVersion+"."+tinymce.minorVersion}},init:function(ed,url){var t=this,cm;t.url=url;t.editor=ed;ed.addCommand('mceSpellCheck',function(){if(!t.active){ed.setProgressState(1);t._sendRPC('checkWords',[t.selectedLang,t._getWords()],function(r){if(r.length>0){t.active=1;t._markWords(r);ed.setProgressState(0);ed.nodeChanged()}else{ed.setProgressState(0);ed.windowManager.alert('spellchecker.no_mpell')}})}else t._done()});ed.onInit.add(function(){ed.dom.loadCSS(url+'/css/content.css')});ed.onClick.add(t._showMenu,t);ed.onContextMenu.add(t._showMenu,t);ed.onBeforeGetContent.add(function(){if(t.active)t._removeWords()});ed.onNodeChange.add(function(ed,cm){cm.setActive('spellchecker',t.active)});ed.onSetContent.add(function(){t._done()});ed.onBeforeGetContent.add(function(){t._done()});ed.onBeforeExecCommand.add(function(ed,cmd){if(cmd=='mceFullScreen')t._done()});t.languages={};each(ed.getParam('spellchecker_languages','+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv','hash'),function(v,k){if(k.indexOf('+')===0){k=k.substring(1);t.selectedLang=v}t.languages[k]=v})},createControl:function(n,cm){var t=this,c,ed=t.editor;if(n=='spellchecker'){c=cm.createSplitButton(n,{title:'spellchecker.desc',cmd:'mceSpellCheck',scope:t});c.onRenderMenu.add(function(c,m){m.add({title:'spellchecker.langs','class':'mceMenuItemTitle'}).setDisabled(1);each(t.languages,function(v,k){var o={icon:1},mi;o.onclick=function(){mi.setSelected(1);t.selectedItem.setSelected(0);t.selectedItem=mi;t.selectedLang=v};o.title=k;mi=m.add(o);mi.setSelected(v==t.selectedLang);if(v==t.selectedLang)t.selectedItem=mi})});return c}},_walk:function(n,f){var d=this.editor.getDoc(),w;if(d.createTreeWalker){w=d.createTreeWalker(n,NodeFilter.SHOW_TEXT,null,false);while((n=w.nextNode())!=null)f.call(this,n)}else tinymce.walk(n,f,'childNodes')},_getSeparators:function(){var re='',i,str=this.editor.getParam('spellchecker_word_separator_chars','\\s!"#$%&()*+,-./:;<=>?@[\]^_{|}§©«®±¶·¸»¼½¾¿×÷¤\u201d\u201c');for(i=0;i$1$2');v=v.replace(r3,'$1$2');dom.replace(dom.create('span',{'class':'mceItemHidden'},v),n)}}});se.moveToBookmark(b)},_showMenu:function(ed,e){var t=this,ed=t.editor,m=t._menu,p1,dom=ed.dom,vp=dom.getViewPort(ed.getWin());if(!m){p1=DOM.getPos(ed.getContentAreaContainer());m=ed.controlManager.createDropMenu('spellcheckermenu',{offset_x:p1.x,offset_y:p1.y,'class':'noIcons'});t._menu=m}if(dom.hasClass(e.target,'mceItemHiddenSpellWord')){m.removeAll();m.add({title:'spellchecker.wait','class':'mceMenuItemTitle'}).setDisabled(1);t._sendRPC('getSuggestions',[t.selectedLang,dom.decode(e.target.innerHTML)],function(r){m.removeAll();if(r.length>0){m.add({title:'spellchecker.sug','class':'mceMenuItemTitle'}).setDisabled(1);each(r,function(v){m.add({title:v,onclick:function(){dom.replace(ed.getDoc().createTextNode(v),e.target);t._checkDone()}})});m.addSeparator()}else m.add({title:'spellchecker.no_sug','class':'mceMenuItemTitle'}).setDisabled(1);m.add({title:'spellchecker.ignore_word',onclick:function(){dom.remove(e.target,1);t._checkDone()}});m.add({title:'spellchecker.ignore_words',onclick:function(){t._removeWords(dom.decode(e.target.innerHTML));t._checkDone()}});m.add({title:'spellchecker.add_word',onclick:function(){t._sendRPC('addWord',[t.selectedLang,dom.decode(e.target.innerHTML)],function(r){t._removeWords(dom.decode(e.target.innerHTML));t._checkDone()})}});m.update()});ed.selection.select(e.target);p1=dom.getPos(e.target);m.showMenu(p1.x,p1.y+e.target.offsetHeight-vp.y);return tinymce.dom.Event.cancel(e)}else m.hideMenu()},_checkDone:function(){var t=this,ed=t.editor,dom=ed.dom,o;each(dom.select('span'),function(n){if(n&&dom.hasClass(n,'mceItemHiddenSpellWord')){o=true;return false}});if(!o)t._done()},_done:function(){var t=this,la=t.active;if(t.active){t.active=0;t._removeWords();if(t._menu)t._menu.hideMenu();if(la)t.editor.nodeChanged()}},_sendRPC:function(m,p,cb){var t=this,url=t.editor.getParam("spellchecker_rpc_url","{backend}");if(url=='{backend}'){t.editor.setProgressState(0);alert('Please specify: spellchecker_rpc_url');return}JSONRequest.sendRPC({url:url,method:m,params:p,success:cb,error:function(e,x){t.editor.setProgressState(0);t.editor.windowManager.alert(e.errstr||('Error response: '+x.responseText))}})}});tinymce.PluginManager.add('wgspellchecker',tinymce.plugins.SpellcheckerPlugin)})(); \ No newline at end of file diff --git a/www/extras/tinymce-webgui/plugins/wgspellchecker/editor_plugin_src.js b/www/extras/tinymce-webgui/plugins/wgspellchecker/editor_plugin_src.js deleted file mode 100644 index a96e310ab..000000000 --- a/www/extras/tinymce-webgui/plugins/wgspellchecker/editor_plugin_src.js +++ /dev/null @@ -1,348 +0,0 @@ -/** - * $Id: editor_plugin_src.js 425 2007-11-21 15:17:39Z spocke $ - * - * @author Moxiecode - * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. - */ - -(function() { - var JSONRequest = tinymce.util.JSONRequest, each = tinymce.each, DOM = tinymce.DOM; - tinymce.PluginManager.requireLangPack('wgspellchecker'); - - tinymce.create('tinymce.plugins.SpellcheckerPlugin', { - getInfo : function() { - return { - longname : 'Spellchecker', - author : 'Moxiecode Systems AB', - authorurl : 'http://tinymce.moxiecode.com', - infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker', - version : tinymce.majorVersion + "." + tinymce.minorVersion - }; - }, - - init : function(ed, url) { - var t = this, cm; - - t.url = url; - t.editor = ed; - - // Register commands - ed.addCommand('mceSpellCheck', function() { - if (!t.active) { - ed.setProgressState(1); - t._sendRPC('checkWords', [t.selectedLang, t._getWords()], function(r) { - if (r.length > 0) { - t.active = 1; - t._markWords(r); - ed.setProgressState(0); - ed.nodeChanged(); - } else { - ed.setProgressState(0); - ed.windowManager.alert('spellchecker.no_mpell'); - } - }); - } else - t._done(); - }); - - ed.onInit.add(function() { - ed.dom.loadCSS(url + '/css/content.css'); - }); - - ed.onClick.add(t._showMenu, t); - ed.onContextMenu.add(t._showMenu, t); - ed.onBeforeGetContent.add(function() { - if (t.active) - t._removeWords(); - }); - - ed.onNodeChange.add(function(ed, cm) { - cm.setActive('spellchecker', t.active); - }); - - ed.onSetContent.add(function() { - t._done(); - }); - - ed.onBeforeGetContent.add(function() { - t._done(); - }); - - ed.onBeforeExecCommand.add(function(ed, cmd) { - if (cmd == 'mceFullScreen') - t._done(); - }); - - // Find selected language - t.languages = {}; - each(ed.getParam('spellchecker_languages', '+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv', 'hash'), function(v, k) { - if (k.indexOf('+') === 0) { - k = k.substring(1); - t.selectedLang = v; - } - - t.languages[k] = v; - }); - }, - - createControl : function(n, cm) { - var t = this, c, ed = t.editor; - - if (n == 'spellchecker') { - c = cm.createSplitButton(n, {title : 'spellchecker.desc', cmd : 'mceSpellCheck', scope : t}); - - c.onRenderMenu.add(function(c, m) { - m.add({title : 'spellchecker.langs', 'class' : 'mceMenuItemTitle'}).setDisabled(1); - each(t.languages, function(v, k) { - var o = {icon : 1}, mi; - - o.onclick = function() { - mi.setSelected(1); - t.selectedItem.setSelected(0); - t.selectedItem = mi; - t.selectedLang = v; - }; - - o.title = k; - mi = m.add(o); - mi.setSelected(v == t.selectedLang); - - if (v == t.selectedLang) - t.selectedItem = mi; - }) - }); - - return c; - } - }, - - // Internal functions - - _walk : function(n, f) { - var d = this.editor.getDoc(), w; - - if (d.createTreeWalker) { - w = d.createTreeWalker(n, NodeFilter.SHOW_TEXT, null, false); - - while ((n = w.nextNode()) != null) - f.call(this, n); - } else - tinymce.walk(n, f, 'childNodes'); - }, - - _getSeparators : function() { - var re = '', i, str = this.editor.getParam('spellchecker_word_separator_chars', '\\s!"#$%&()*+,-./:;<=>?@[\]^_{|}§©«®±¶·¸»¼½¾¿×÷¤\u201d\u201c'); - - // Build word separator regexp - for (i=0; i$1$2'); - v = v.replace(r3, '$1$2'); - - dom.replace(dom.create('span', {'class' : 'mceItemHidden'}, v), n); - } - } - }); - - se.moveToBookmark(b); - }, - - _showMenu : function(ed, e) { - var t = this, ed = t.editor, m = t._menu, p1, dom = ed.dom, vp = dom.getViewPort(ed.getWin()); - - if (!m) { - p1 = DOM.getPos(ed.getContentAreaContainer()); - //p2 = DOM.getPos(ed.getContainer()); - - m = ed.controlManager.createDropMenu('spellcheckermenu', { - offset_x : p1.x, - offset_y : p1.y, - 'class' : 'noIcons' - }); - - t._menu = m; - } - - if (dom.hasClass(e.target, 'mceItemHiddenSpellWord')) { - m.removeAll(); - m.add({title : 'spellchecker.wait', 'class' : 'mceMenuItemTitle'}).setDisabled(1); - - t._sendRPC('getSuggestions', [t.selectedLang, dom.decode(e.target.innerHTML)], function(r) { - m.removeAll(); - - if (r.length > 0) { - m.add({title : 'spellchecker.sug', 'class' : 'mceMenuItemTitle'}).setDisabled(1); - each(r, function(v) { - m.add({title : v, onclick : function() { - dom.replace(ed.getDoc().createTextNode(v), e.target); - t._checkDone(); - }}); - }); - - m.addSeparator(); - } else - m.add({title : 'spellchecker.no_sug', 'class' : 'mceMenuItemTitle'}).setDisabled(1); - - m.add({ - title : 'spellchecker.ignore_word', - onclick : function() { - dom.remove(e.target, 1); - t._checkDone(); - } - }); - - m.add({ - title : 'spellchecker.ignore_words', - onclick : function() { - t._removeWords(dom.decode(e.target.innerHTML)); - t._checkDone(); - } - }); - - m.add({ - title : 'spellchecker.add_word', - onclick : function() { - t._sendRPC('addWord', [t.selectedLang, dom.decode(e.target.innerHTML)], function(r) { - t._removeWords(dom.decode(e.target.innerHTML)); - t._checkDone(); - }); - } - }); - - m.update(); - }); - - ed.selection.select(e.target); - p1 = dom.getPos(e.target); - m.showMenu(p1.x, p1.y + e.target.offsetHeight - vp.y); - - return tinymce.dom.Event.cancel(e); - } else - m.hideMenu(); - }, - - _checkDone : function() { - var t = this, ed = t.editor, dom = ed.dom, o; - - each(dom.select('span'), function(n) { - if (n && dom.hasClass(n, 'mceItemHiddenSpellWord')) { - o = true; - return false; - } - }); - - if (!o) - t._done(); - }, - - _done : function() { - var t = this, la = t.active; - - if (t.active) { - t.active = 0; - t._removeWords(); - - if (t._menu) - t._menu.hideMenu(); - - if (la) - t.editor.nodeChanged(); - } - }, - - _sendRPC : function(m, p, cb) { - var t = this, url = t.editor.getParam("spellchecker_rpc_url", "{backend}"); - - if (url == '{backend}') { - t.editor.setProgressState(0); - alert('Please specify: spellchecker_rpc_url'); - return; - } - - JSONRequest.sendRPC({ - url : url, - method : m, - params : p, - success : cb, - error : function(e, x) { - t.editor.setProgressState(0); - t.editor.windowManager.alert(e.errstr || ('Error response: ' + x.responseText)); - } - }); - } - }); - - // Register plugin - tinymce.PluginManager.add('wgspellchecker', tinymce.plugins.SpellcheckerPlugin); -})(); diff --git a/www/extras/tinymce-webgui/plugins/wgspellchecker/img/wline.gif b/www/extras/tinymce-webgui/plugins/wgspellchecker/img/wline.gif deleted file mode 100644 index 7d0a4dbca..000000000 Binary files a/www/extras/tinymce-webgui/plugins/wgspellchecker/img/wline.gif and /dev/null differ diff --git a/www/extras/tinymce-webgui/plugins/wgspellchecker/langs/en.js b/www/extras/tinymce-webgui/plugins/wgspellchecker/langs/en.js deleted file mode 100644 index 602b23c24..000000000 --- a/www/extras/tinymce-webgui/plugins/wgspellchecker/langs/en.js +++ /dev/null @@ -1,4 +0,0 @@ -tinyMCE.addI18n('en.spellchecker',{ - add_word : 'Add word to dictionary' -}); - diff --git a/www/extras/ukplayer/config.xml b/www/extras/ukplayer/config.xml deleted file mode 100644 index 77409fb8c..000000000 --- a/www/extras/ukplayer/config.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - content.xml - - 400 - 300 - 0xE0E0E0 - 5 - 400 - 300 - - Verdana - 12 - 0xFFFFFF - - 0x888888 - 0x000000 - true - over - 0 - - 0xFFFFFF - 0x888888 - 0x000000 - true - - 20 - 200 - - 60 - 45 - 0x888888 - false - true - 100 - 8 - - off - false - true - false - true - - - - rounded - diff --git a/www/extras/ukplayer/content.xml b/www/extras/ukplayer/content.xml deleted file mode 100644 index 0c2ed2d14..000000000 --- a/www/extras/ukplayer/content.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - 400 - 300 - <![CDATA[Slide One]]> - - dummycontent/explain.jpg - 5 - dummycontent/explain.jpg - - - - 400 - 300 - <![CDATA[Slide Two]]> - - dummycontent/united-knowledge-logo.jpg - 5 - dummycontent/united-knowledge-logo.jpg - - - - diff --git a/www/extras/ukplayer/dummycontent/transporter.mp3 b/www/extras/ukplayer/dummycontent/transporter.mp3 deleted file mode 100644 index d148a80a5..000000000 Binary files a/www/extras/ukplayer/dummycontent/transporter.mp3 and /dev/null differ diff --git a/www/extras/ukplayer/dummycontent/united-knowledge-logo.jpg b/www/extras/ukplayer/dummycontent/united-knowledge-logo.jpg deleted file mode 100644 index 358b34411..000000000 Binary files a/www/extras/ukplayer/dummycontent/united-knowledge-logo.jpg and /dev/null differ diff --git a/www/extras/ukplayer/expressInstall.swf b/www/extras/ukplayer/expressInstall.swf deleted file mode 100644 index 86958bf3a..000000000 Binary files a/www/extras/ukplayer/expressInstall.swf and /dev/null differ diff --git a/www/extras/ukplayer/slideShow.swf b/www/extras/ukplayer/slideShow.swf deleted file mode 100644 index 9fca5bf8c..000000000 Binary files a/www/extras/ukplayer/slideShow.swf and /dev/null differ diff --git a/www/extras/ukplayer/swfobject.js b/www/extras/ukplayer/swfobject.js deleted file mode 100644 index 08fb27000..000000000 --- a/www/extras/ukplayer/swfobject.js +++ /dev/null @@ -1,5 +0,0 @@ -/* SWFObject v2.1 - Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis - This software is released under the MIT License -*/ -var swfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7")}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always"}catch(t){if(AC[0]==6){AB=true}}if(!AB){try{y=new ActiveXObject(p)}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)]}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w}}();var L=function(){if(!h.w3cdom){return }f(H);if(h.ie&&h.win){try{K.write(" - - - - - - - - - - - - -
    -
    foo
    -
    bar
    -
    - - diff --git a/www/extras/yui/tests/autocomplete/tests/autocomplete.html b/www/extras/yui/tests/autocomplete/tests/autocomplete.html deleted file mode 100644 index ae20cc74f..000000000 --- a/www/extras/yui/tests/autocomplete/tests/autocomplete.html +++ /dev/null @@ -1,283 +0,0 @@ - - -YUI AutoComplete Tests - - - - - - - - - - - - - -

    AutoComplete Tests

    -

    - - - - diff --git a/www/extras/yui/tests/button/tests/button-activeelement-test.html b/www/extras/yui/tests/button/tests/button-activeelement-test.html deleted file mode 100644 index 7ea17b8c4..000000000 --- a/www/extras/yui/tests/button/tests/button-activeelement-test.html +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - Button activeElement Test - - - - - - - - - - - - - - - - - - - - - - -

    Button activeElement Test

    -

    Test case for bug 2528245.

    -

    -Clicking on the text box when the Button's Menu is open should result in the Menu closing, -the Button blurring and the text box being focused and becoming the activeElement. -After mousing down on the text box, it should have a black outline and -should fire key events. -

    - -
    - - - - - - -
    - - - \ No newline at end of file diff --git a/www/extras/yui/tests/button/tests/label-click-test.html b/www/extras/yui/tests/button/tests/label-click-test.html deleted file mode 100644 index 9fe68b7c7..000000000 --- a/www/extras/yui/tests/button/tests/label-click-test.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - Button Click Label Test - - - - - - - - - - - - - - -

    Button Click Label Test

    -

    Test case for bug 2527640.

    -

    Clicking on the <label> for each Button instance should both focus and check or uncheck the Button.

    - -
    - -
    - Checkboxes - - - - - - - - -
    - -
    - Radio Buttons - - - - - - - - - - -
    -
    - -
    - -
    - - - diff --git a/www/extras/yui/tests/button/tests/label-replace-test.html b/www/extras/yui/tests/button/tests/label-replace-test.html deleted file mode 100644 index 6a4fa85b1..000000000 --- a/www/extras/yui/tests/button/tests/label-replace-test.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - Button Label Replace Test - - - - - - - - - - - - - - -

    Button Label Replace Test

    -

    Test case for bug 1897085.

    -

    The text label for each Button should be the text of its corresponding <label<.

    - -
    - -
    - Checkboxes - - - - - - - - -
    - -
    - Radio Buttons - - - - - - - - -
    - - - -
    - - - diff --git a/www/extras/yui/tests/button/tests/preventoverlap.html b/www/extras/yui/tests/button/tests/preventoverlap.html deleted file mode 100644 index a6c719ab1..000000000 --- a/www/extras/yui/tests/button/tests/preventoverlap.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - - Button - - - - - - - - - - - - - - - - - - -
    -
    - Menu Alignment Controls - - - - - - - - -
    - - - \ No newline at end of file diff --git a/www/extras/yui/tests/button/tests/selected-menuitem-change-test.html b/www/extras/yui/tests/button/tests/selected-menuitem-change-test.html deleted file mode 100644 index 0d1e0891b..000000000 --- a/www/extras/yui/tests/button/tests/selected-menuitem-change-test.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - YUI Button Test Case - - - - - - - - - - - - - - -

    YUI Button Test Case

    - -

    Test case for Bug 2527968. Clicking on the Menu Button below should NOT result in an alert popping up when the Menu is made visible.

    - - - - - - - - \ No newline at end of file diff --git a/www/extras/yui/tests/button/tests/submit-twice-test.html b/www/extras/yui/tests/button/tests/submit-twice-test.html deleted file mode 100644 index 6936df833..000000000 --- a/www/extras/yui/tests/button/tests/submit-twice-test.html +++ /dev/null @@ -1,130 +0,0 @@ - - - - - YUI Button + Connection Manager Test Page - - - - - - - - - - - - - - - - - - - - -
    - - - - - - - -
    - -
    - -
    - - - -
    -

    Form Data

    - -
    - - - \ No newline at end of file diff --git a/www/extras/yui/tests/button/tests/yui-prefix-test.html b/www/extras/yui/tests/button/tests/yui-prefix-test.html deleted file mode 100644 index bcc93d53d..000000000 --- a/www/extras/yui/tests/button/tests/yui-prefix-test.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - Button YUI Prefix Test - - - - - - - - - - - - - - - - - - - - - -Yahoo! - - - - - - - -
    - - - - - - - - - - - - - - - - - - - - -
    - - - - - - - - - diff --git a/www/extras/yui/tests/calendar/tests/calendar.html b/www/extras/yui/tests/calendar/tests/calendar.html deleted file mode 100644 index 3fd243405..000000000 --- a/www/extras/yui/tests/calendar/tests/calendar.html +++ /dev/null @@ -1,1336 +0,0 @@ - - - - YUI Calendar Tests - - - - - - - - - - - - - - - - -

    Calendar Tests

    -

    The YUI Calendar Suite is split into 6 test cases:

    - -
    -
      -
    1. API Tests: These tests are intended to test the API, without going through the DOM Element or Event layers -
        -
      • Calendar API (CALENDAR_API)
      • -
      • CalendarGroup API (CALENDARGROUP_API)
      • -
      -
    2. -
    3. DOM Tests: These tests are intended to test the DOM Element and Event layers -
        -
      • Calendar DOM (CALENDAR_DOM)
      • -
      • CalendarGroup DOM (CALENDARGROUP_DOM)
      • -
      -
    4. -
    5. CFG Tests: These tests are intended to test the set of Calendar configuration properties -
        -
      • Calendar Config (CALENDAR_CFG)
      • -
      • CalendarGroup Config (CALENDARGROUP_CFG)
      • -
      -
    6. -
    -
    - -

    (runs default suite [API, CFG] if none selected)

    - - diff --git a/www/extras/yui/tests/carousel/tests/AllTests.html b/www/extras/yui/tests/carousel/tests/AllTests.html deleted file mode 100644 index 8ddfd25f6..000000000 --- a/www/extras/yui/tests/carousel/tests/AllTests.html +++ /dev/null @@ -1,80 +0,0 @@ - - - - YUI Carousel Unit Tests - - - - - - - - - - - - - - - - - - - -
    - -
    -
    -
    -
      -
    • Test
    • -
    -
    -
    -
    - - diff --git a/www/extras/yui/tests/carousel/tests/markupTests.js b/www/extras/yui/tests/carousel/tests/markupTests.js deleted file mode 100644 index 9bbf64193..000000000 --- a/www/extras/yui/tests/carousel/tests/markupTests.js +++ /dev/null @@ -1,242 +0,0 @@ -(function () { - var ArrayAssert = YAHOO.util.ArrayAssert, - Assert = YAHOO.util.Assert, - carousel, carousel3, - carouselEl, carouselEl3, - Dom = YAHOO.util.Dom, - initFromMarkupTest, - ObjectAssert = YAHOO.util.ObjectAssert; - - YAHOO.namespace("CarouselTests"); - - initFromMarkupTest = new YAHOO.tool.TestCase({ - name: "Initialize from markup test", - - testCreation: function () { - return Assert.areEqual(true, - Dom.hasClass(carouselEl, "yui-carousel-element")); - }, - - testCreationFromUl: function () { - return Assert.areEqual(true, - Dom.hasClass(carouselEl3, "yui-carousel-element")); - }, - - testNumItems: function () { - return Assert.areEqual(5, carousel.get("numItems")); - }, - - testNumItemsInTable: function () { - return Assert.areEqual(5, carousel._itemsTable.numItems); - }, - - testitemsInTable: function () { - return Assert.areEqual(5, carousel._itemsTable.items.length); - }, - - testgetElementForItem: function () { - var actual = [], expected = [], i; - - for (i = 0; i < 5; i++) { - expected.push(Dom.get("item" + (i+1))); - actual.push(carousel.getElementForItem(i)); - } - return ArrayAssert.itemsAreEqual(expected, actual); - }, - - testgetElementForItems: function () { - var expected = [], i; - - for (i = 0; i < 5; i++) { - expected.push(Dom.get("item" + (i+1))); - } - return ArrayAssert.itemsAreEqual(expected, - carousel.getElementForItems()); - }, - - testgetVisibleItems: function () { - var expected = [], i; - - for (i = 0; i < 3; i++) { - expected.push(Dom.get("item" + (i+1))); - } - return ArrayAssert.itemsAreEqual(expected, - carousel.getVisibleItems()); - }, - - testClearItems: function () { - carousel.clearItems(); - return Assert.areEqual(0, carousel.get("numItems")) && - Assert.areEqual(0, carousel._itemsTable.numItems) && - ArrayAssert.itemsAreEqual([], - carousel._itemsTable.items); - }, - - testAddItem: function () { - carousel.addItem("Six"); - carousel.addItem("Seven", 0); - return Assert.areEqual("Six", carousel.getItem(1).item) && - Assert.areEqual("Seven", carousel.getItem(0).item); - }, - - testAddItems: function () { - carousel.addItems([["Eight",0],["Nine",0]]); - return Assert.areEqual("Six", carousel.getItem(3).item) && - Assert.areEqual("Seven", carousel.getItem(2).item) && - Assert.areEqual("Eight", carousel.getItem(1).item) && - Assert.areEqual("Nine", carousel.getItem(0).item); - }, - - testgetItem: function () { - var children = Dom.getChildrenBy(carouselEl, - function (node) { - return node.nodeName.toUpperCase() == "LI"; - }), - els = [], i; - - for (i in children) { - els.push(children[i]); - } - - return ObjectAssert.propertiesAreEqual({ className: "", - id: els[2].id, - item: "Seven" }, - carousel.getItem(2)); - }, - - testgetItems: function () { - var children = Dom.getChildrenBy(carouselEl, - function (node) { - return node.nodeName.toUpperCase() == "LI"; - }), - expected = [], i; - - function compareItems(a, b) { - return a.className === b.className && - a.id === b.id && a.item === b.item; - } - - for (i in children) { - expected.push({ className: "", id: children[i].id, - item: children[i].innerHTML }); - } - - return ArrayAssert.itemsAreEquivalent(expected, - carousel.getItems(), - compareItems); - }, - - testgetItemPositionById: function () { - var children = Dom.getChildrenBy(carouselEl, - function (node) { - return node.nodeName.toUpperCase() == "LI"; - }); - - return Assert.areEqual(2, - carousel.getItemPositionById(children[2].id)); - }, - - testremoveItem: function () { - var children = Dom.getChildrenBy(carouselEl, - function (node) { - return node.nodeName.toUpperCase() == "LI"; - }), - item; - - item = children[2]; - carousel.removeItem(2); - return Assert.areEqual(null, Dom.get(item.id)) && - Assert.areEqual(3, carousel.get("numItems")) && - Assert.areEqual(3, carousel._itemsTable.numItems); - }, - - testScrollForward: function () { - carousel.set("firstVisible", 0); - carousel.addItems([["Ten",0],["Eleven",0],["Twelve",0]]); - carousel.scrollForward(); - Assert.areEqual("-100px", carouselEl.style.left); - }, - - testScrollPageForward: function () { - carousel.set("firstVisible", 0); - carousel.scrollPageForward(); - Assert.areEqual("-300px", carouselEl.style.left); - }, - - testScrollBackward: function () { - carousel.set("firstVisible", 3); - carousel.scrollBackward(); - Assert.areEqual("-200px", carouselEl.style.left); - }, - - testScrollPageBackward: function () { - carousel.set("firstVisible", 3); - carousel.scrollPageBackward(); - Assert.areEqual("0px", carouselEl.style.left); - }, - - testScrollTo: function () { - Dom.setStyle(carouselEl, "left", ""); - carousel.scrollTo(3); - Assert.areEqual("-300px", carouselEl.style.left); - }, - - testSetNumVisible: function () { - var contentEl = carouselEl.parentNode, - num = carousel.get("numItems"); - - function isSameWidth(el, w) { - return parseInt(el.offsetWidth, 10) == w; - } - - if (carousel.get("numVisible") != 3 || - !isSameWidth(contentEl, 300)) { - return Assert.fail("numVisible should be 3 by default"); - } - carousel.set("numVisible", 1); - if (carousel.get("numVisible") != 1 || - !isSameWidth(contentEl, 100)) { - return Assert.fail("numVisible should be 1 by default"); - } - carousel.set("numVisible", num); - if (carousel.get("numVisible") != num || - !isSameWidth(contentEl, num * 100)) { - return Assert.fail("numVisible should have been " + num); - } - carousel.set("numVisible", 1); - if (carousel.get("numVisible") != 1 || - !isSameWidth(contentEl, 100)) { - return Assert.fail("numVisible should have been 1"); - } - carousel.set("numVisible", 3); - return Assert.areEqual(3, carousel.get("numVisible")) && - Assert.areEqual(true, areSameWidth(contentEl, 300)); - } - }); - - YAHOO.CarouselTests.markupTests = new YAHOO.tool.TestSuite({ - name: "Carousel (from Markup) Tests", - - setUp: function () { - carousel = new YAHOO.widget.Carousel("container"); - carouselEl = Dom.get("carousel"); - carousel.render(); - carousel3 = new YAHOO.widget.Carousel("container3", { - carouselEl: "UL" }); - carouselEl3 = Dom.get("carousel3"); - carousel3.render(); - }, - - tearDown : function () { - delete carousel; - } - }); - - YAHOO.CarouselTests.markupTests.add(initFromMarkupTest); -})(); -/* -;; Local variables: ** -;; mode: js2 ** -;; indent-tabs-mode: nil ** -;; End: ** -*/ diff --git a/www/extras/yui/tests/carousel/tests/protectedMethodTests.js b/www/extras/yui/tests/carousel/tests/protectedMethodTests.js deleted file mode 100644 index 5e41f435e..000000000 --- a/www/extras/yui/tests/carousel/tests/protectedMethodTests.js +++ /dev/null @@ -1,63 +0,0 @@ -(function () { - var ArrayAssert = YAHOO.util.ArrayAssert, - Assert = YAHOO.util.Assert, - carousel, - protectedMethods, - ObjectAssert = YAHOO.util.ObjectAssert; - - YAHOO.namespace("CarouselTests"); - - protectedMethods = new YAHOO.tool.TestCase({ - testGetValidIndex: function () { - carousel.set("numItems", 9); - Assert.areEqual(0, carousel._getValidIndex(0), - "_getValidIndex(0) should have returned 0"); - Assert.areEqual(3, carousel._getValidIndex(3), - "_getValidIndex(3) should have returned 3"); - Assert.areEqual(6, carousel._getValidIndex(6), - "_getValidIndex(6) should have returned 6"); - Assert.areEqual(8, carousel._getValidIndex(9), - "_getValidIndex(9) should have returned 8"); - Assert.areEqual(0, carousel._getValidIndex(-3), - "_getValidIndex(-3) should have returned 0"); - - carousel.set("numItems", 8); - carousel.set("isCircular", true); - }, - - testGetValidIndexForCircularCarousel: function () { - carousel.set("numItems", 8); - carousel.set("isCircular", true); - Assert.areEqual(0, carousel._getValidIndex(0), - "_getValidIndex(0) should have returned 0"); - Assert.areEqual(3, carousel._getValidIndex(3), - "_getValidIndex(3) should have returned 3"); - Assert.areEqual(6, carousel._getValidIndex(6), - "_getValidIndex(6) should have returned 6"); - Assert.areEqual(0, carousel._getValidIndex(9), - "_getValidIndex(9) should have returned 0"); - Assert.areEqual(6, carousel._getValidIndex(-3), - "_getValidIndex(-3) should have returned 6"); - } - }); - - YAHOO.CarouselTests.protectedMethodTests = new YAHOO.tool.TestSuite({ - name: "Carousel (protected methods) Tests", - - setUp: function () { - carousel = new YAHOO.widget.Carousel("container5"); - }, - - tearDown : function () { - delete carousel; - } - }); - - YAHOO.CarouselTests.protectedMethodTests.add(protectedMethods); -})(); -/* -;; Local variables: ** -;; mode: js2 ** -;; indent-tabs-mode: nil ** -;; End: ** -*/ diff --git a/www/extras/yui/tests/carousel/tests/scriptTests.js b/www/extras/yui/tests/carousel/tests/scriptTests.js deleted file mode 100644 index 0ec211503..000000000 --- a/www/extras/yui/tests/carousel/tests/scriptTests.js +++ /dev/null @@ -1,285 +0,0 @@ -(function () { - var ArrayAssert = YAHOO.util.ArrayAssert, - Assert = YAHOO.util.Assert, - carousel, carousel4, - carouselEl, carouselEl4, - Dom = YAHOO.util.Dom, - initFromScriptTest, - ObjectAssert = YAHOO.util.ObjectAssert; - - YAHOO.namespace("CarouselTests"); - - initFromScriptTest = new YAHOO.tool.TestCase({ - name: "Initialize from script test", - - testCreation: function () { - return Assert.areEqual(true, - Dom.hasClass(carouselEl, "yui-carousel-element")); - }, - - testCreationFromUl: function () { - return Assert.areEqual(true, - Dom.hasClass(carouselEl4, "yui-carousel-element")); - }, - - testNumItems: function () { - return Assert.areEqual(4, carousel.get("numItems")); - }, - - testNumItemsInTable: function () { - return Assert.areEqual(4, carousel._itemsTable.numItems); - }, - - testitemsInTable: function () { - return Assert.areEqual(4, carousel._itemsTable.items.length); - }, - - testgetElementForItem: function () { - var actual = [], expected = [], i, items; - - items = Dom.getChildrenBy(carouselEl, function (node) { - return node.nodeName.toUpperCase() == "LI"; - }); - if (!items || items.length != 4) { - Assert.fail(); - } - - for (i = 0; i < items.length; i++) { - actual.push(carousel.getElementForItem(i)); - expected.push(items[i]); - } - - return ArrayAssert.itemsAreEqual(expected, actual); - }, - - testgetElementForItems: function () { - var expected = [], i, items; - - items = Dom.getChildrenBy(carouselEl, function (node) { - return node.nodeName.toUpperCase() == "LI"; - }); - if (!items || items.length != 4) { - Assert.fail(); - } - - for (i in items) { - if (items.hasOwnProperty(i)) { - expected.push(items[i]); - } - } - - return ArrayAssert.itemsAreEqual(expected, - carousel.getElementForItems()); - }, - - testgetVisibleItems: function () { - var expected = [], i, j, items; - - items = Dom.getChildrenBy(carouselEl, function (node) { - return node.nodeName.toUpperCase() == "LI"; - }); - if (!items || items.length != 4) { - Assert.fail(); - } - - j = 0; - for (i in items) { - j++; - if (j > 3) { - break; - } - if (items.hasOwnProperty(i)) { - expected.push(items[i]); - } - } - - return ArrayAssert.itemsAreEqual(expected, - carousel.getVisibleItems()); - }, - - testClearItems: function () { - carousel.clearItems(); - return Assert.areEqual(0, carousel.get("numItems")) && - Assert.areEqual(0, carousel._itemsTable.numItems) && - ArrayAssert.itemsAreEqual([], - carousel._itemsTable.items); - }, - - testAddItem: function () { - carousel.addItem("Six"); - carousel.addItem("Seven", 0); - return Assert.areEqual("Six", carousel.getItem(1).item) && - Assert.areEqual("Seven", carousel.getItem(0).item); - }, - - testAddItems: function () { - carousel.addItems([["Eight",0],["Nine",0]]); - return Assert.areEqual("Six", carousel.getItem(3).item) && - Assert.areEqual("Seven", carousel.getItem(2).item) && - Assert.areEqual("Eight", carousel.getItem(1).item) && - Assert.areEqual("Nine", carousel.getItem(0).item); - }, - - testgetItem: function () { - var children = Dom.getChildrenBy(carouselEl, - function (node) { - return node.nodeName.toUpperCase() == "LI"; - }), - els = [], i; - - for (i in children) { - els.push(children[i]); - } - - return ObjectAssert.propertiesAreEqual({ className: "", - id: els[2].id, - item: "Seven" }, - carousel.getItem(2)); - }, - - testgetItems: function () { - var children = Dom.getChildrenBy(carouselEl, - function (node) { - return node.nodeName.toUpperCase() == "LI"; - }), - expected = [], i; - - function compareItems(a, b) { - return a.className === b.className && - a.id === b.id && a.item === b.item; - } - - for (i in children) { - expected.push({ className: "", id: children[i].id, - item: children[i].innerHTML }); - } - - return ArrayAssert.itemsAreEquivalent(expected, - carousel.getItems(), - compareItems); - }, - - testgetItemPositionById: function () { - var children = Dom.getChildrenBy(carouselEl, - function (node) { - return node.nodeName.toUpperCase() == "LI"; - }); - - return Assert.areEqual(2, - carousel.getItemPositionById(children[2].id)); - }, - - testremoveItem: function () { - var children = Dom.getChildrenBy(carouselEl, - function (node) { - return node.nodeName.toUpperCase() == "LI"; - }), - item; - - item = children[2]; - carousel.removeItem(2); - return Assert.areEqual(null, Dom.get(item.id)) && - Assert.areEqual(3, carousel.get("numItems")) && - Assert.areEqual(3, carousel._itemsTable.numItems); - }, - - testScrollForward: function () { - carousel.addItems([["Ten",0],["Eleven",0],["Twelve",0]]); - carousel.scrollForward(); - Assert.areEqual("-100px", carouselEl.style.left); - }, - - testScrollPageForward: function () { - carousel.set("firstVisible", 0); - carousel.scrollPageForward(); - Assert.areEqual("-300px", carouselEl.style.left); - }, - - testScrollBackward: function () { - carousel.set("firstVisible", 3); - carousel.scrollBackward(); - Assert.areEqual("-200px", carouselEl.style.left); - }, - - testScrollPageBackward: function () { - carousel.set("firstVisible", 3); - carousel.scrollPageBackward(); - Assert.areEqual("0px", carouselEl.style.left); - }, - - testScrollTo: function () { - Dom.setStyle(carouselEl, "left", ""); - carousel.scrollTo(3); - Assert.areEqual("-300px", carouselEl.style.left); - }, - - testSetNumVisible: function () { - var contentEl = carouselEl.parentNode, - num = carousel.get("numItems"); - - function isSameWidth(el, w) { - return parseInt(Dom.getStyle(el, "width"), 10) == w; - } - - if (carousel.get("numVisible") != 3 || - !isSameWidth(contentEl, 300)) { - return Assert.fail("numVisible should be 3 by default"); - } - carousel.set("numVisible", 1); - if (carousel.get("numVisible") != 1 || - !isSameWidth(contentEl, 100)) { - return Assert.fail("numVisible should be 1 by default"); - } - carousel.set("numVisible", num); - if (carousel.get("numVisible") != num || - !isSameWidth(contentEl, num * 100)) { - return Assert.fail("numVisible should have been " + num); - } - carousel.set("numVisible", 1); - if (carousel.get("numVisible") != 1 || - !isSameWidth(contentEl, 100)) { - return Assert.fail("numVisible should have been 1"); - } - carousel.set("numVisible", 3); - return Assert.areEqual(3, carousel.get("numVisible")) && - Assert.areEqual(true, areSameWidth(carouselEl, 300)); - } - }); - - YAHOO.CarouselTests.scriptTests = new YAHOO.tool.TestSuite({ - name: "Carousel (from Script) Tests", - - setUp: function () { - var items; - - carousel = new YAHOO.widget.Carousel("container2"); - carousel.addItems([["One"], ["Two"], ["Three"], ["Four"]]); - carousel.render(); - items = Dom.getElementsByClassName("yui-carousel-element", - "OL", carousel.get("element")); - if (YAHOO.lang.isArray(items) && items.length == 1) { - carouselEl = items[0]; - } - carousel4 = new YAHOO.widget.Carousel("container4", { - carouselEl: "UL" }); - carousel4.render(); - items = Dom.getElementsByClassName("yui-carousel-element", - "UL", carousel4.get("element")); - if (YAHOO.lang.isArray(items) && items.length == 1) { - carouselEl4 = items[0]; - } - }, - - tearDown : function () { - delete carousel; - } - }); - - YAHOO.CarouselTests.scriptTests.add(initFromScriptTest); -})(); -/* -;; Local variables: ** -;; mode: js2 ** -;; indent-tabs-mode: nil ** -;; End: ** -*/ diff --git a/www/extras/yui/tests/colorpicker/tests/colorpicker.html b/www/extras/yui/tests/colorpicker/tests/colorpicker.html deleted file mode 100644 index 350d5ea71..000000000 --- a/www/extras/yui/tests/colorpicker/tests/colorpicker.html +++ /dev/null @@ -1,167 +0,0 @@ - - - -Slider/ColorPicker Test Suite - - - - - - - - - -
    -
    picker
    -
    picker #2
    -
    - - - - - - - - - - - - - - - diff --git a/www/extras/yui/tests/common/tests/YUI.html b/www/extras/yui/tests/common/tests/YUI.html deleted file mode 100644 index 08b43f4e0..000000000 --- a/www/extras/yui/tests/common/tests/YUI.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - YUI Library Master Test Page - - - - - - - - - - - - - - - -

    YUI Library Master Test Page

    - - -
    - - - diff --git a/www/extras/yui/tests/connection/tests/setForm.html b/www/extras/yui/tests/connection/tests/setForm.html deleted file mode 100644 index 3eeffdf4f..000000000 --- a/www/extras/yui/tests/connection/tests/setForm.html +++ /dev/null @@ -1,635 +0,0 @@ - - - - Test Page - - - - - - - -

    Tests

    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - - - - - - - - - - diff --git a/www/extras/yui/tests/connection/tests/submitReporter.php b/www/extras/yui/tests/connection/tests/submitReporter.php deleted file mode 100644 index f884cbe14..000000000 --- a/www/extras/yui/tests/connection/tests/submitReporter.php +++ /dev/null @@ -1,8 +0,0 @@ - $_POST, - GET => $_GET -))); -?> diff --git a/www/extras/yui/tests/container/tests/config.html b/www/extras/yui/tests/container/tests/config.html deleted file mode 100644 index 44b67ebeb..000000000 --- a/www/extras/yui/tests/container/tests/config.html +++ /dev/null @@ -1,243 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/www/extras/yui/tests/container/tests/module.html b/www/extras/yui/tests/container/tests/module.html deleted file mode 100644 index 3e2d4067e..000000000 --- a/www/extras/yui/tests/container/tests/module.html +++ /dev/null @@ -1,443 +0,0 @@ - - - - - YAHOO.widget.Module Tests - - - - - - - - - - - - - - - - - - - - -
    -
    The body of the module1
    -
    - - - diff --git a/www/extras/yui/tests/cookie/tests/cookie.html b/www/extras/yui/tests/cookie/tests/cookie.html deleted file mode 100644 index 3891cd6fa..000000000 --- a/www/extras/yui/tests/cookie/tests/cookie.html +++ /dev/null @@ -1,1701 +0,0 @@ - - -cookie tests - - - - - - - - - - -

    cookie tests

    -

    - - - diff --git a/www/extras/yui/tests/datasource/tests/datasource.html b/www/extras/yui/tests/datasource/tests/datasource.html deleted file mode 100644 index 7becdb573..000000000 --- a/www/extras/yui/tests/datasource/tests/datasource.html +++ /dev/null @@ -1,687 +0,0 @@ - - -YUI DataSource Tests - - - - - - -

    DataSource Tests

    -

    - - - - - - - - - - - - - - - - - diff --git a/www/extras/yui/tests/datasource/tests/date.php b/www/extras/yui/tests/datasource/tests/date.php deleted file mode 100644 index bfebf0228..000000000 --- a/www/extras/yui/tests/datasource/tests/date.php +++ /dev/null @@ -1,306 +0,0 @@ - - - - - - - - - - - -

    Testing: ( - -)

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    format US English UK English French Canadian French Swiss French German Swiss German Hindi Hangul
    PHP Javascript PHP Javascript PHP Javascript PHP Javascript PHP Javascript PHP Javascript PHP Javascript PHP Javascript PHP Javascript
    - - - - - - - - - - - - - - - - - - - -
    - - - - array(), - "A" => array(), - "b" => array(), - "B" => array(), - "c" => "%Y %m %d (%a) %r", - "p" => array(), - "P" => array(), - "r" => "%p %I %M %S %p %Z", - "x" => "%Y %m %d", - "X" => "%H %M %S" -); -$lc['c'] = strftime("%c"); -$lc['r'] = strftime("%r"); -$lc['x'] = strftime("%X"); -$lc['X'] = strftime("%X"); -for($i=6; $i<13; $i++) -{ - $d = strtotime("2008/01/$i"); - $lc['a'][] = strftime("%a", $d); - $lc['A'][] = strftime("%A", $d); -} -for($i=1; $i<13; $i++) -{ - $d = strtotime("2008/$i/1"); - $lc['b'][] = strftime("%b", $d); - $lc['B'][] = strftime("%B", $d); -} - -$d = strtotime("2008/01/01 10:00:00"); -$lc['p'][] = strftime("%p", $d); -$lc['P'][] = strftime("%p", $d); -$d = strtotime("2008/01/01 22:00:00"); -$lc['p'][] = strftime("%p", $d); -$lc['P'][] = strftime("%p", $d); - -echo ""; -?> - - diff --git a/www/extras/yui/tests/datasource/tests/php/proxy_ylocal.php b/www/extras/yui/tests/datasource/tests/php/proxy_ylocal.php deleted file mode 100644 index c80bb8aaf..000000000 --- a/www/extras/yui/tests/datasource/tests/php/proxy_ylocal.php +++ /dev/null @@ -1,45 +0,0 @@ - $value) { - if(($key == "output") && ($value == "json")) { - $type = "application/json"; - } - $query .= urlencode($key)."=".urlencode($value)."&"; -} - -foreach ($_POST as $key => $value) { - if(($key == "output") && ($value == "json")) { - $type = "application/json"; - } - $query .= $key."=".$value."&"; -} -$query .= "appid=YahooDemo"; -$url = PATH.$query; - - -// Open the Curl session -$session = curl_init($url); - -// Don't return HTTP headers. Do return the contents of the call -curl_setopt($session, CURLOPT_HEADER, false); -curl_setopt($session, CURLOPT_RETURNTRANSFER, true); - -// Make the call -$response = curl_exec($session); - -header("Content-Type: ".$type); -echo $response; -curl_close($session); - -?> diff --git a/www/extras/yui/tests/datasource/tests/php/xhr_table.php b/www/extras/yui/tests/datasource/tests/php/xhr_table.php deleted file mode 100644 index 160983e0a..000000000 --- a/www/extras/yui/tests/datasource/tests/php/xhr_table.php +++ /dev/null @@ -1,49 +0,0 @@ - 0) { - $rows = $_GET['rows']; -} - -// How many columns -if(strlen($_GET['cols']) > 0) { - $cols = $_GET['cols']; -} - -// Return the data -returnMarkup($rows, $cols); - -function returnMarkup($rows, $cols) { - // start the table - $markup = ""; - - // build the thead - for($i=0; $i<$cols; $i++) { - $markup = $markup.""; - } - $markup = $markup.""; - - // build the tbody - for($j=0; $j<$rows; $j++) { - $markup = $markup.""; - for($i=0; $i<$cols; $i++) { - $markup = $markup.""; - } - $markup = $markup.""; - } - // end the table - $markup = $markup."
    header ".$i."
    data cell ".$j."-".$i."
    "; - - echo $markup; -} -?> diff --git a/www/extras/yui/tests/datasource/tests/xmlparsing.html b/www/extras/yui/tests/datasource/tests/xmlparsing.html deleted file mode 100644 index 9286173c4..000000000 --- a/www/extras/yui/tests/datasource/tests/xmlparsing.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - -Test - - - - - - - - - - - - - - - - - - - - -
    - -
    - -
    - - - - - - - - - - diff --git a/www/extras/yui/tests/datatable/tests/2099844.html b/www/extras/yui/tests/datatable/tests/2099844.html deleted file mode 100644 index 26c5f3ddd..000000000 --- a/www/extras/yui/tests/datatable/tests/2099844.html +++ /dev/null @@ -1,151 +0,0 @@ - - - - Test Page - - - - - - - -

    Tests

    -
    - - - - - - - - - - - - diff --git a/www/extras/yui/tests/datatable/tests/datatable.html b/www/extras/yui/tests/datatable/tests/datatable.html deleted file mode 100644 index 72807c6b6..000000000 --- a/www/extras/yui/tests/datatable/tests/datatable.html +++ /dev/null @@ -1,56 +0,0 @@ - - -YUI DataTable Tests - - - - - - - - - - - - - - - - - - - - - -

    DataTable Tests

    -

    - - - - diff --git a/www/extras/yui/tests/datatable/tests/datatable/ColumnSet.js b/www/extras/yui/tests/datatable/tests/datatable/ColumnSet.js deleted file mode 100644 index 16d92bf6b..000000000 --- a/www/extras/yui/tests/datatable/tests/datatable/ColumnSet.js +++ /dev/null @@ -1,152 +0,0 @@ -(function() { - var gCount = -1; - - var Dom=YAHOO.util.Dom, - Assert=YAHOO.util.Assert, - ObjectAssert=YAHOO.util.ObjectAssert, - ArrayAssert=YAHOO.util.ArrayAssert, - DateAssert=YAHOO.util.DateAssert, - UserAction=YAHOO.util.UserAction, - TestCase = YAHOO.tool.TestCase, - TestLogger = YAHOO.tool.TestLogger, - TestRunner = YAHOO.tool.TestRunner, - TestSuite = YAHOO.tool.TestSuite, - - DataSource = YAHOO.util.DataSource, - DataTable = YAHOO.widget.DataTable, - ColumnSet = YAHOO.widget.ColumnSet, - RecordSet = YAHOO.widget.RecordSet; - - /** - * - * - * Base DataTable test template. Sets up values for a DataTable instance. - * - * - */ - var dtBaseTemplate = { - name: "DataTable Base Tests", - - dsData: [ - {a:"0a",b:"0b",c:"0c"}, - {a:"1a",b:"1b",c:"1c"}, - {a:"2a",b:"2b",c:"2c"}, - {a:"3a",b:"3b",c:"3c"} - ], - - dsConfig: { - responseType:YAHOO.util.DataSource.TYPE_JSARRAY, - responseSchema:{fields:["a","b","c"]} - }, - - columns: [{key:"a"},{key:"b"},{key:"c"}] - }; - - /** - * - * - * Base DataTable test case. - * - * - */ - function DataTableTestCase(template) { - DataTableTestCase.superclass.constructor.call(this, template); - }; - YAHOO.lang.extend(DataTableTestCase, TestCase); - - DataTableTestCase.prototype.setUp = function() { - // Create container anew - this.container = document.createElement("div"); - ///this.container.id = "testDTContainer"; // Is this necessary? - document.body.appendChild(this.container); - - // Create DataSource anew - this.datasource = new YAHOO.util.DataSource(this.dsData, this.dsConfig); - }; - - DataTableTestCase.prototype.tearDown = function() { - // Destroy DataTable - this.datatable.destroy(); - this.datatable = null; - - // Destroy container - if(this.container !== null) { - YAHOO.util.Event.purgeElement(this.container, true); - document.body.removeChild(this.container); - this.container = null; - } - - // TODO: need a destroy method - this.datasource = null; - }; - - DataTableTestCase.prototype.createInstance = function(oDT, oConfig) { - oDT = oDT || DataTable; - this.datatable = new oDT(this.container, this.columns, this.datasource, oConfig); - gCount++; - return this.datatable; - }; - - /** - * - * - * Tests ColumnSet APIs. - * - * - */ - var csColumnSetTemplate = YAHOO.lang.merge(dtBaseTemplate, { - name: "DataTable ColumnSet Tests", - - testGetColumnSet: function() { - var dt = this.createInstance(); - var cs = dt.getColumnSet(); - - Assert.isInstanceOf(ColumnSet, cs, "Expected a ColumnSet"); - }, - - testGetColumn: function() { - var dt = this.createInstance(); - //dt.subscribe("initEvent", function() { - var cs = dt.getColumnSet(); - var oColumn = cs.keys[0]; - var sColId = oColumn.getId(); - - var el = dt.getTheadEl().rows[0].cells[0]; - var oTestColumn = dt.getColumn(el); - Assert.areSame(oColumn, oTestColumn, "Expected to get Column by el reference"); - - //TODO: get column by el reference child - - // Removed col elements - //el = Dom.get(dt.getId()+"-col"+sColId); - //oTestColumn = dt.getColumn(el); - //Assert.areSame(oColumn, oTestColumn, "Expected to get Column by DOM ID"); - - oTestColumn = dt.getColumn(0); - Assert.areSame(oColumn, oTestColumn, "Expected to get Column by key index"); - - oTestColumn = cs.getColumn("a"); - Assert.areSame(oColumn, oTestColumn, "Expected to get Column by key (ColumnSet method)"); - - oTestColumn = cs.getColumnById(sColId); - Assert.areSame(oColumn, oTestColumn, "Expected to get Column by Column ID (ColumnSet method)"); - //}); - } - - //TODO: More ColumnSet APIs - }); - var csColumnSetTest = new DataTableTestCase(csColumnSetTemplate); - /** - * - * - * Runs tests. - * - * - */ - YAHOO.util.Event.addListener(window, "load", function() { - var columnsetsuite = new TestSuite("ColumnSet Test Suite"); - columnsetsuite.add(csColumnSetTest); - - TestRunner.add(columnsetsuite); - }); -})(); diff --git a/www/extras/yui/tests/datatable/tests/datatable/DataTable.js b/www/extras/yui/tests/datatable/tests/datatable/DataTable.js deleted file mode 100644 index 0df8ad8ee..000000000 --- a/www/extras/yui/tests/datatable/tests/datatable/DataTable.js +++ /dev/null @@ -1,1930 +0,0 @@ -(function() { - - var gCount = -1; - - var Dom=YAHOO.util.Dom, - Assert=YAHOO.util.Assert, - ObjectAssert=YAHOO.util.ObjectAssert, - ArrayAssert=YAHOO.util.ArrayAssert, - DateAssert=YAHOO.util.DateAssert, - UserAction=YAHOO.util.UserAction, - TestCase = YAHOO.tool.TestCase, - TestLogger = YAHOO.tool.TestLogger, - TestRunner = YAHOO.tool.TestRunner, - TestSuite = YAHOO.tool.TestSuite, - - DataSource = YAHOO.util.DataSource, - DataTable = YAHOO.widget.DataTable, - ColumnSet = YAHOO.widget.ColumnSet, - RecordSet = YAHOO.widget.RecordSet; - - /** - * - * - * DataTable assertions. - * - * - */ - var DataTableAssert = { - areSameRow: function(elTr, oRecord, dt, msg) { - Assert.areSame("tr", elTr.tagName.toLowerCase(), "Expected a TR element: " + msg); - Assert.areSame(elTr.id, oRecord.getId(), "TR ID and Record IDs don't match: " + msg); - }, - - areSameCell: function(elTd, oRecord, oColumn, dt, msg) { - Assert.areSame("td", elTd.tagName.toLowerCase(), "Expected a TD element: " + msg); - Assert.areSame(elTd.cellIndex, oColumn.getKeyIndex(), "TR index and Column key index don't match: " + msg); - this.areSameRow(elTd.parentNode, oRecord, dt, msg); - } - }; - - /** - * - * - * Base DataTable test case. - * - * - */ - function DataTableTestCase(template) { - DataTableTestCase.superclass.constructor.call(this, template); - }; - YAHOO.lang.extend(DataTableTestCase, TestCase); - - DataTableTestCase.prototype.setUp = function() { - // Create container anew - this.container = document.createElement("div"); - document.body.appendChild(this.container); - - // Create DataSource anew - this.datasource = new YAHOO.util.DataSource(this.dsData, this.dsConfig); - }; - - DataTableTestCase.prototype.tearDown = function() { - // Destroy DataTable - this.datatable.destroy(); - this.datatable = null; - - // Destroy container - if(this.container !== null) { - YAHOO.util.Event.purgeElement(this.container, true); - document.body.removeChild(this.container); - this.container = null; - } - - // TODO: need a destroy method - this.datasource = null; - }; - - DataTableTestCase.prototype.createInstance = function(oDT, oConfig) { - oDT = oDT || DataTable; - this.datatable = new oDT(this.container, this.columns, this.datasource, oConfig); - gCount++; - return this.datatable; - }; - - /** - * - * - * Base DataTable test template. Sets up values for a DataTable instance. - * - * - */ - var dtBaseTemplate = { - name: "DataTable Base Tests", - - dsData: [ - {a:"0a",b:"0b",c:"0c"}, - {a:"1a",b:"1b",c:"1c"}, - {a:"2a",b:"2b",c:"2c"}, - {a:"3a",b:"3b",c:"3c"} - ], - - dsConfig: { - responseType:YAHOO.util.DataSource.TYPE_JSARRAY, - responseSchema:{fields:["a","b","c"]} - }, - - columns: [{key:"a"},{key:"b"},{key:"c"}] - }; - - /** - * - * - * Tests various construction use cases. - * - * - */ - var dtConstructionTemplate = YAHOO.lang.merge(dtBaseTemplate, { - name: "DataTable Construction Tests", - - testConstruction: function() { - var dt = this.createInstance(); - - Assert.isInstanceOf(DataTable, this.datatable, "Failed to create DataTable instance"); - Assert.isInstanceOf(ColumnSet, this.datatable.getColumnSet(), "Failed to create ColumnSet instance"); - Assert.isInstanceOf(RecordSet, this.datatable.getRecordSet(), "Failed to create RecordSet instance"); - Assert.areSame(this.dsData.length, this.datatable.getRecordSet().getLength(), "Unexpected RecordSet length"); - - }, - - testNestedHeaders: function() { - //TODO - var dt = this.createInstance(); - }, - - testMultipleInstances: function() { - var multiple = 3; // Set how many instances (total) to create for this test case - - // Create first instance - var dt = this.createInstance(); - var cs = dt.getColumnSet(); - var oColumn = cs.keys[0]; - - // Create more instances - for(var i=1; i - - YUI DateMath Tests - - - - - - - - - - - - - -

    YAHOO.widget.DateMath Tests

    -

    - - - diff --git a/www/extras/yui/tests/dom/tests/dom.html b/www/extras/yui/tests/dom/tests/dom.html deleted file mode 100644 index e92a2a63e..000000000 --- a/www/extras/yui/tests/dom/tests/dom.html +++ /dev/null @@ -1,594 +0,0 @@ - - - -DOM Test Suite - - - - - - - - - - - - - - - - lorem - ipsum - dolor -
    -
    test computed style
    -
    -
    -
    -

    Page Header

    -
    -
    -
    -

    Section Header

    - lorem ipsum -
    -
    -

    Module Header

    -
    -
    -

    Fusce feugiat diam. Vestibulum elementum dui in augue. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Mauris pulvinar.

    -
    - -
    -
    -
    -

    Module Header

    -
    -
    - -
    - -
    -
    -
    -
    -

    In hac habitasse platea dictumst. Sed sit amet ligula vitae justo consequat facilisis. Integer tortor. Integer erat. In hac habitasse platea dictumst. Phasellus convallis quam vitae turpis aliquam lobortis. Aliquam scelerisque condimentum lectus. Proin semper adipiscing leo. Nulla facilisi.

    -
    -
    - - - diff --git a/www/extras/yui/tests/dragdrop/tests/index.html b/www/extras/yui/tests/dragdrop/tests/index.html deleted file mode 100644 index 142bd5ca0..000000000 --- a/www/extras/yui/tests/dragdrop/tests/index.html +++ /dev/null @@ -1,274 +0,0 @@ - - - -YUI Tests - - - - - - - - - - - - - - -
    -
    dd1
    -
    dd2
    -
    way down
    -
    -
    way down
    - -

    Drag and Drop Test Page

    - - - diff --git a/www/extras/yui/tests/editor/tests/index.html b/www/extras/yui/tests/editor/tests/index.html deleted file mode 100644 index 5b15bbde2..000000000 --- a/www/extras/yui/tests/editor/tests/index.html +++ /dev/null @@ -1,45 +0,0 @@ - - - -Editor Test Suite - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - -
    This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test.

    This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test.
    -
    This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test.

    This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test.
    -
    - - diff --git a/www/extras/yui/tests/editor/tests/tests.js b/www/extras/yui/tests/editor/tests/tests.js deleted file mode 100644 index ac289b906..000000000 --- a/www/extras/yui/tests/editor/tests/tests.js +++ /dev/null @@ -1,403 +0,0 @@ -var editor = null; -(function() { - var Dom = YAHOO.util.Dom, - Event = YAHOO.util.Event, - Tool = YAHOO.tool, - Suite = new Tool.TestSuite('yuisuite'), - Assert = YAHOO.util.Assert, - eFocus = null; - - - - Event.onDOMReady(function() { - editor = new YAHOO.widget.Editor('editor', { - dompath: true, - nodeChangeDelay: false, - removeLineBreaks: true, - animate: true, - width: '700px', - resize: true, - drag: true - }); - editor.render(); - - var logger = new Tool.TestLogger(null, { height: '80%' }); - editor.on('windowRender', function() { //We have to wait until the all windows render before we can start testing it.. - Suite.add( new Tool.TestCase({ - name: 'YAHOO.widget.Editor', - test_render: function() { - Assert.areEqual(Dom.get('editor_container'), editor.get('element_cont').get('element'), 'Could not find Editors container'); - Assert.areEqual(Dom.get('editor_toolbar'), editor.toolbar.get('element'), 'Could not find Editors Toolbar'); - Assert.isInstanceOf(YAHOO.widget.Toolbar, editor.toolbar, 'Could not find Toolbars Instance'); - Assert.areEqual(Dom.getStyle('editor', 'display'), editor.getStyle('display'), 'Textarea is visible..'); - Assert.isInstanceOf(YAHOO.widget.Overlay, editor.get('panel'), 'Could not find Overlay Instance'); - }, - test_content: function() { - var t_data = Dom.get('editor').value; - var e_data = editor.getEditorHTML(); - Assert.areEqual(t_data, e_data, 'Editor data is different than text area'); - }, - test_window: function() { - Assert.areEqual(document.getElementById('editor_editor').contentWindow, editor._getWindow(), 'Window object is not right'); - }, - test_doc: function() { - Assert.areEqual(document.getElementById('editor_editor').contentWindow.document, editor._getDoc(), 'Document object is not right'); - }, - test_focus: function() { - YAHOO.util.UserAction.click(document); - - editor.on('editorWindowFocus', function() { - eFocus = true; - }); - editor.focus(); - editor.afterElement.focus(); - - Assert.areEqual(true, eFocus, 'Editor focus event FAILED'); - }, - test_ol_list_create_inline: function() { - var html = 'Item1
    Item2
    Item3
    Item4
    '; - editor.setEditorHTML(html); - editor.execCommand('selectall'); - editor.execCommand('insertorderedlist', ''); - var ol = editor._getDoc().getElementsByTagName('ol'); - Assert.areEqual(ol.length, 1, 'Failed to create list from source'); - var lis = editor._getDoc().getElementsByTagName('li'); - Assert.areEqual(lis.length, 4, 'Failed to create list items from source'); - editor.execCommand('selectall'); - editor.execCommand('insertorderedlist', ''); - var lis = editor._getDoc().getElementsByTagName('li'); - Assert.areEqual(lis.length, 0, 'Failed to remove list items from source'); - }, - test_ul_list_create_inline: function() { - var html = 'Item1
    Item2
    Item3
    Item4
    Item5
    Item6
    Item7'; - editor.setEditorHTML(html); - editor.execCommand('selectall'); - editor.execCommand('insertunorderedlist', ''); - var ul = editor._getDoc().getElementsByTagName('ul'); - Assert.areEqual(ul.length, 1, 'Failed to create list from source'); - var lis = editor._getDoc().getElementsByTagName('li'); - Assert.areEqual(lis.length, 7, 'Failed to create list items from source'); - editor.execCommand('selectall'); - editor.execCommand('insertunorderedlist', ''); - var lis = editor._getDoc().getElementsByTagName('li'); - Assert.areEqual(lis.length, 0, 'Failed to remove list items from source'); - }, - test_regex: function() { - editor.setEditorHTML(Dom.get('testRegEx').innerHTML); - //editor._getDoc().body.innerHTML = Dom.get('testRegEx').innerHTML; - var e_data = (editor.cleanHTML()).toLowerCase().replace(/;"/g, '"'); - var real_data = editor.filter_all_rgb(Dom.get('testRegEx2').innerHTML.toLowerCase()).replace(/;"/g, '"'); - Assert.areEqual(real_data, e_data, 'Regex save routine failed'); - }, - - test_blank_image: function() { - editor.toolbar.resetAllButtons(); - var picURL = editor.get('blankimage'); - editor._focusWindow(); - editor.toolbar.getButtonByValue('insertimage').fireEvent('mousedown', { ev: 'mousedown' }); - var pic = editor._getDoc().getElementsByTagName('img')[0]; - - Assert.areEqual(picURL, pic.getAttribute('src', 2), 'Image source and string do not match'); - Assert.isInstanceOf(YAHOO.widget.EditorWindow, editor.currentWindow, 'Editor Window Failed to Open'); - editor.closeWindow(); - Assert.areEqual(null, editor.currentWindow, 'Editor Window Failed to Close'); - editor.toolbar.resetAllButtons(); - Assert.areEqual(null, pic.parentNode, 'Image is still inside the editor'); - - }, - test_selected_element: function() { - - editor.setEditorHTML('This is a test element'); - var em = editor._getDoc().getElementById('test'); - editor._selectNode(em); - - Assert.areEqual(editor._getDoc().getElementById('test'), editor._getSelectedElement(), 'Selected Element is not em#test'); - Assert.areEqual(true, editor.toolbar.getButtonByValue('italic').hasClass('yui-button-selected'), 'Italic button is not selected'); - editor.toolbar.resetAllButtons(); - - }, - test_dom_path: function() { - editor.setEditorHTML('

    This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test.

    This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test.

    This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test.

    '); - var em = editor._getDoc().getElementById('test'); - editor._selectNode(em); - //Editor timing is out here, force a DomPath write.. - editor._writeDomPath(); - Assert.areEqual('body < p < em < strong#tes...', editor.dompath.innerHTML.toLowerCase().replace(/"/g, ''), 'Dom path is not correct..'); - Assert.areEqual(true, editor.toolbar.getButtonByValue('bold').hasClass('yui-button-selected'), 'Bold button is not selected'); - Assert.areEqual(true, editor.toolbar.getButtonByValue('italic').hasClass('yui-button-selected'), 'Italic button is not selected'); - editor.toolbar.resetAllButtons(); - }, - test_insertimage: function() { - var picURL = 'http:/'+'/farm1.static.flickr.com/171/379031784_e4ba36a375_t_d.jpg'; - editor._focusWindow(); - editor.execCommand('insertimage', picURL); - var pic = editor._getDoc().getElementsByTagName('img')[0]; - - Assert.areEqual(picURL, pic.getAttribute('src', 2)); - }, - test_image_props: function() { - var pic = editor._getDoc().getElementsByTagName('img')[0]; - YAHOO.util.UserAction.dblclick(pic); - Assert.isInstanceOf(YAHOO.widget.EditorWindow, editor.currentWindow, 'Editor Window Failed to Open'); - }, - test_close_window: function() { - editor.closeWindow(); - Assert.areEqual(null, editor.currentWindow, 'Editor Window Failed to Close'); - editor.toolbar.resetAllButtons(); - }, - test_hidden_elements: function() { - editor.toolbar.getButtonByValue('hiddenelements').fireEvent('mousedown', { ev: 'mousedown' }); - Assert.areEqual(true, Dom.hasClass(editor._getDoc().body, 'yui-hidden'), 'hidden class is not on the body'); - editor.toolbar.getButtonByValue('hiddenelements').fireEvent('mousedown', { ev: 'mousedown' }); - Assert.areEqual(false, Dom.hasClass(editor._getDoc().body, 'yui-hidden'), 'hidden class is on the body'); - }, - test_event_before_mouseup: function() { - var event = false; - editor.on('beforeEditorMouseUp', function() { - event = true; - }); - YAHOO.util.UserAction.mouseup(editor._getDoc().body); - Assert.areEqual(true, event, 'BeforeMouseUP Event failed to Fired'); - }, - test_event_mouseup: function() { - var event = false; - editor.on('editorMouseUp', function() { - event = true; - }); - YAHOO.util.UserAction.mouseup(editor._getDoc().body); - Assert.areEqual(true, event, 'MouseUP Event failed to Fired'); - }, - test_event_before_mousedown: function() { - var event = false; - editor.on('beforeEditorMouseDown', function() { - event = true; - }); - YAHOO.util.UserAction.mousedown(editor._getDoc().body); - Assert.areEqual(true, event, 'BeforeMouseDsaveown Event failed to Fired'); - }, - test_event_mousedown: function() { - var event = false; - editor.on('editorMouseDown', function() { - event = true; - }); - YAHOO.util.UserAction.mousedown(editor._getDoc().body); - Assert.areEqual(true, event, 'MouseDown Event failed to Fired'); - }, - test_event_before_click: function() { - var event = false; - editor.on('beforeEditorClick', function() { - event = true; - }); - YAHOO.util.UserAction.click(editor._getDoc().body); - Assert.areEqual(true, event, 'BeforeClick Event failed to Fired'); - }, - test_event_click: function() { - var event = false; - editor.on('editorClick', function() { - event = true; - }); - YAHOO.util.UserAction.click(editor._getDoc().body); - Assert.areEqual(true, event, 'Click Event failed to Fired'); - }, - test_event_before_double_click: function() { - var event = false; - editor.on('beforeEditorDoubleClick', function() { - event = true; - }); - YAHOO.util.UserAction.dblclick(editor._getDoc().body); - Assert.areEqual(true, event, 'BeforeDoubleClick Event failed to Fired'); - }, - test_event_double_click: function() { - var event = false; - editor.on('editorDoubleClick', function() { - event = true; - }); - YAHOO.util.UserAction.dblclick(editor._getDoc().body); - Assert.areEqual(true, event, 'DoubleClick Event failed to Fired'); - }, - test_event_before_keyup: function() { - var event = false; - editor.on('beforeEditorKeyUp', function() { - event = true; - }); - YAHOO.util.UserAction.keyup(editor._getDoc().body); - Assert.areEqual(true, event, 'beforeKeyUp Event failed to Fired'); - }, - test_event_keyup: function() { - var event = false; - editor.on('editorKeyUp', function() { - event = true; - }); - YAHOO.util.UserAction.keyup(editor._getDoc().body); - Assert.areEqual(true, event, 'KeyUp Event failed to Fired'); - }, - test_event_before_keydown: function() { - var event = false; - editor.on('beforeEditorKeyDown', function() { - event = true; - }); - YAHOO.util.UserAction.keydown(editor._getDoc().body); - Assert.areEqual(true, event, 'BeforeKeyDown Event failed to Fired'); - }, - test_event_keydown: function() { - var event = false; - editor.on('editorKeyDown', function() { - event = true; - }); - YAHOO.util.UserAction.keydown(editor._getDoc().body); - Assert.areEqual(true, event, 'KeyDown Event failed to Fired'); - }, - test_event_before_keypress: function() { - var event = false; - editor.on('beforeEditorKeyPress', function() { - event = true; - }); - YAHOO.util.UserAction.keypress(editor._getDoc().body); - Assert.areEqual(true, event, 'BeforeKeyPress Event failed to Fired'); - }, - test_event_keypress: function() { - var event = false; - editor.on('editorKeyPress', function() { - event = true; - }); - YAHOO.util.UserAction.keypress(editor._getDoc().body); - Assert.areEqual(true, event, 'KeyPress Event failed to Fired'); - }, - test_createlink: function() { - editor.toolbar.resetAllButtons(); - editor.setEditorHTML('test'); - var e_data = editor.getEditorHTML(); - Assert.areEqual('test', e_data, 'Editor data is different than what was injected'); - editor.execCommand('selectall', ''); //FF 3.5 doesn't like this when contentEditable is used - editor.toolbar.getButtonByValue('createlink').fireEvent('mousedown', { ev: 'mousedown' }); - - Assert.isInstanceOf(YAHOO.widget.EditorWindow, editor.currentWindow, 'Editor Window Failed to Open'); - Dom.get(editor.get('id') + '_createlink_url').value = 'http:/'+'/www.yahoo.com'; - - editor.closeWindow(); - Assert.areEqual(null, editor.currentWindow, 'Editor Window Failed to Close'); - - var link = editor._getDoc().getElementsByTagName('a')[0]; - var linkURL = link.getAttribute('href', 2); - - Assert.areEqual('http:/'+'/www.yahoo.com', linkURL, 'Link url does not match what was set'); - editor.toolbar.resetAllButtons(); - }, - test_content_after: function() { - var t_data = Dom.get('editor').value; - editor.setEditorHTML(t_data); - var e_data = editor.getEditorHTML(); - Assert.areEqual(t_data, e_data, 'Editor data is different than text area'); - }, - test_dd: function() { - Assert.isInstanceOf(YAHOO.util.DD, editor.dd, 'DD not instantiated'); - }, - test_resize: function() { - Assert.isInstanceOf(YAHOO.util.Resize, editor.resize, 'Resize not instantiated'); - }, - test_headers: function() { - for (var i = 1; i < 6; i++) { - editor.setEditorHTML('This is a test header #' + i); - editor.execCommand('selectall', ''); - editor.execCommand('heading', 'h' + i); - var h1 = editor._getDoc().body.getElementsByTagName('h' + i); - Assert.areEqual(h1.length, 1, 'Did not find one H' + i + ' tag'); - } - }, - test_forecolor: function() { - editor.setEditorHTML('TEST'); - editor.execCommand('selectall', ''); - editor.execCommand('forecolor', '#bebebe'); - var el = editor._getDoc().body.firstChild; - var color = editor.filter_rgb(el.style.color); - Assert.areEqual(color, '#bebebe', 'Fore Colors do not match'); - }, - test_backcolor: function() { - editor.setEditorHTML('TEST'); - editor.execCommand('selectall', ''); - editor.execCommand('backcolor', '#bebebe'); - var el = editor._getDoc().body.firstChild; - var color = editor.filter_rgb(el.style.backgroundColor); - Assert.areEqual(color, '#bebebe', 'Back Colors do not match'); - }, - test_forecolor_font: function() { - editor.setEditorHTML('TEST'); - editor.execCommand('selectall', ''); - editor.execCommand('fontname', 'Verdana'); - editor.execCommand('selectall', ''); - editor.execCommand('forecolor', '#bebebe'); - var el = editor._getDoc().body.firstChild; - var color = editor.filter_rgb(el.style.color); - Assert.areEqual(color, '#bebebe', 'Fore Colors do not match'); - Assert.areEqual(el.style.fontFamily, 'Verdana', 'Font Names do not match'); - }, - test_forecolor_font_el: function() { - editor.setEditorHTML('TEST'); - editor.execCommand('selectall', ''); - editor.execCommand('fontname', 'Verdana'); - editor.execCommand('selectall', ''); - editor.execCommand('forecolor', '#bebebe'); - var el = editor._getDoc().body.firstChild, - testel = el; - - if (Dom.getFirstChild(el)) { - testel = el.firstChild; - } - var color = editor.filter_rgb(testel.style.color); - Assert.areEqual(color, '#bebebe', 'Fore Colors do not match'); - Assert.areEqual(testel.style.fontFamily, 'Verdana', 'Font Names do not match'); - Assert.areEqual(el.tagName.toLowerCase(), 'b', 'Elements do not match'); - }, - test_disable: function() { - editor.set('disabled', true); - Assert.isInstanceOf(YAHOO.util.Element, editor.get('disabled_iframe'), 'No Disabled Iframe'); - Assert.isInstanceOf(YAHOO.util.Element, editor._orgIframe, 'No Org Iframe'); - Assert.areEqual(editor.get('iframe'), editor.get('disabled_iframe'), 'Current iframe and disabled iframe are not the same'); - Assert.isNotNull(editor._mask, 'Mask is null'); - editor.set('disabled', false); - Assert.areEqual(editor.get('iframe'), editor._orgIframe, 'Current iframe and orginal iframe are not the same'); - Assert.isNull(editor._mask, 'Mask is not null'); - - }, - test_destroy: function() { - //More Tests Here - var panel = editor.get('panel').element; - editor.destroy(); - Assert.isNull(panel.offsetParent, 'Panel offsetParent is not null') - }, - test_render_node: function() { - var el = document.getElementById('editor'); - editor = new YAHOO.widget.SimpleEditor(el); - editor.render(); - Assert.areEqual(true, editor._rendered, 'Editor failed to render with HTML element passed to constructor'); - window.setTimeout(function() { - editor.destroy(); - }, 2000); - }, - test_no_textarea: function() { - var div = document.createElement('div'); - div.id = 'editor_div'; - div.style.height = '300px'; - div.style.width = '700px'; - div.innerHTML = 'This is a new div'; - document.body.appendChild(div); - - editor2 = new YAHOO.widget.SimpleEditor('editor_div'); - editor2.render(); - window.setTimeout(function() { - editor2.destroy(); - }, 3000); - Assert.areEqual('div', editor2._configs.element.value.tagName.toLowerCase(), 'Editor failed to render with HTML element (non TEXTAREA) passed to constructor'); - } - })); - Tool.TestRunner.add(Suite); - - if (parent && parent != window) { - YAHOO.tool.TestManager.load(); - } else { - YAHOO.tool.TestRunner.run(); - } - }); - }); -})(); - diff --git a/www/extras/yui/tests/element/tests/element.html b/www/extras/yui/tests/element/tests/element.html deleted file mode 100644 index ef0441577..000000000 --- a/www/extras/yui/tests/element/tests/element.html +++ /dev/null @@ -1,230 +0,0 @@ - - - -Element Test Suite - - - - - - - - - - - - - - - - - - -
    -
    foo
    - foo -
    - - - diff --git a/www/extras/yui/tests/element/tests/mouseenter.html b/www/extras/yui/tests/element/tests/mouseenter.html deleted file mode 100644 index 710a68c70..000000000 --- a/www/extras/yui/tests/element/tests/mouseenter.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - MouseEnter and MouseLeave Event Tests - - - - - - - - - - - - - - - - - - -

    MouseEnter and MouseLeave Event Tests

    - -
      -
    • The background color of the div element should turn - orange and have a red outline when you move the mouse over it.
    • -
    • The background color of each li should change to yellow - when you mouse over it and have a red outline.
    • -
    - -
    -
      -
    • Item Type One
    • -
    • Item Type Two
    • -
    • Item Type Three
    • -
    -
    - - - - - - - diff --git a/www/extras/yui/tests/event-delegate/tests/delegation.html b/www/extras/yui/tests/event-delegate/tests/delegation.html deleted file mode 100644 index 2dd5163cd..000000000 --- a/www/extras/yui/tests/event-delegate/tests/delegation.html +++ /dev/null @@ -1,342 +0,0 @@ - - - - YUI Event Delegate Tests - - - - - - - - - - - - - - - - - -
    - -
    -

    H3 - Title

    -
    -

    simple paragraph with a link simple link

    -

    another paragraph with a complex link strong within linkfake image - complex link

    -
    -
    - -
    - - - -` \ No newline at end of file diff --git a/www/extras/yui/tests/event-delegate/tests/delegation2.html b/www/extras/yui/tests/event-delegate/tests/delegation2.html deleted file mode 100644 index f57f4b274..000000000 --- a/www/extras/yui/tests/event-delegate/tests/delegation2.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - Event Delegation Test - - - - - - - - - diff --git a/www/extras/yui/tests/event-mouseenter/tests/mouseenter.html b/www/extras/yui/tests/event-mouseenter/tests/mouseenter.html deleted file mode 100644 index 5697f35d6..000000000 --- a/www/extras/yui/tests/event-mouseenter/tests/mouseenter.html +++ /dev/null @@ -1,229 +0,0 @@ - - - - - - MouseEnter and MouseLeave Event Tests - - - - - - - - - - - - - - - - - - -

    MouseEnter and MouseLeave Event Tests

    - -
      -
    • The background color of the div element should turn - orange and have a red outline when you move the mouse over it.
    • -
    • The background color of each li should change to yellow - when you mouse over it and have a red outline.
    • -
    - -
    -
      -
    • Item Type One
    • -
    • Item Type Two
    • -
    • Item Type Three
    • -
    -
    - - - - - diff --git a/www/extras/yui/tests/event-mouseenter/tests/mouseenter2.html b/www/extras/yui/tests/event-mouseenter/tests/mouseenter2.html deleted file mode 100644 index d782e7cc5..000000000 --- a/www/extras/yui/tests/event-mouseenter/tests/mouseenter2.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - MouseEnter Event Test - - - - - - - - - diff --git a/www/extras/yui/tests/event-mouseenter/tests/mouseenter3.html b/www/extras/yui/tests/event-mouseenter/tests/mouseenter3.html deleted file mode 100644 index 02cb2a22f..000000000 --- a/www/extras/yui/tests/event-mouseenter/tests/mouseenter3.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - MouseEnter and MouseLeave Event Tests - - - - - - - - - - - - - - - - - -

    MouseEnter and MouseLeave Event Tests

    - -

    Using this test:

    - -
      -
    • Purging mouseover and mouseout listeners shouldn't stop mouseenter and mouseleave events from firing.
    • -
    • Purging mouseenter and mouseleave listeners shouldn't stop mouseover and mouseout events from firing.
    • -
    - -

    Event listeners are added to the following list:

    - -
    -
      -
    • Item Type One
    • -
    • Item Type Two
    • -
    • Item Type Three
    • -
    -
    - - - - - - - - diff --git a/www/extras/yui/tests/event/tests/focusblur.html b/www/extras/yui/tests/event/tests/focusblur.html deleted file mode 100644 index 6615b6686..000000000 --- a/www/extras/yui/tests/event/tests/focusblur.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - Focus and Blur Test - - - - - - - - - - - - - - -

    Focus and Blur Test

    - -
      -
    • Test subscribing to the capture mode-based focus and blur event - using the built-in onAvailable (this didn't work in YUI 2.7 and - versions prior)
    • -
    • For Opera: Test being able to use capture mode-based focus and - blur event handlers to listen for focus and blur events on a single - element (this didn't work in YUI 2.7 and versions prior)
    • -
    - -
    - -
    - - - diff --git a/www/extras/yui/tests/event/tests/focusin-focusout.html b/www/extras/yui/tests/event/tests/focusin-focusout.html deleted file mode 100644 index 7b37aa9ae..000000000 --- a/www/extras/yui/tests/event/tests/focusin-focusout.html +++ /dev/null @@ -1,254 +0,0 @@ - - - - YUI Event Delegate Tests - - - - - - - - - - - - - - - - -
    - - Click Me! - -
    - - - -` \ No newline at end of file diff --git a/www/extras/yui/tests/imageloader/tests/imageloader.html b/www/extras/yui/tests/imageloader/tests/imageloader.html deleted file mode 100644 index 18b90f23d..000000000 --- a/www/extras/yui/tests/imageloader/tests/imageloader.html +++ /dev/null @@ -1,310 +0,0 @@ - - - - - - - - - - - - -
    -
    -
    -
    - -
    -
    - -
    -
    -
    - -
    -
    -
    -
    - -
    -
    - -
    -
    -
    - - - - - - - - - - - - - - diff --git a/www/extras/yui/tests/json/tests/json.html b/www/extras/yui/tests/json/tests/json.html deleted file mode 100644 index fa1bedd64..000000000 --- a/www/extras/yui/tests/json/tests/json.html +++ /dev/null @@ -1,989 +0,0 @@ - - - - Test Page - - - - - - -

    Tests

    -
    -
    -

    Form used for field value extraction, stringification

    - - - - - - - - - - - - - - - - - -
    - - - - - - - - - - - - diff --git a/www/extras/yui/tests/logger/tests/logger.html b/www/extras/yui/tests/logger/tests/logger.html deleted file mode 100644 index 24d616624..000000000 --- a/www/extras/yui/tests/logger/tests/logger.html +++ /dev/null @@ -1,189 +0,0 @@ - - -YUI Logger Tests - - - - - - - - - - -

    Logger Tests

    -

    - - - - diff --git a/www/extras/yui/tests/menu/tests/keep-open-fix.html b/www/extras/yui/tests/menu/tests/keep-open-fix.html deleted file mode 100644 index 11dd9fe12..000000000 --- a/www/extras/yui/tests/menu/tests/keep-open-fix.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - Menu keepopen Configuration Property Test - - - - - - - - - - - - - - -

    Menu keepopen Configuration Property Test

    -

    Test case to demonstrate fix for bug 2512349.

    - - - -
    - - - diff --git a/www/extras/yui/tests/menu/tests/keep-open-repo.html b/www/extras/yui/tests/menu/tests/keep-open-repo.html deleted file mode 100644 index d8060a400..000000000 --- a/www/extras/yui/tests/menu/tests/keep-open-repo.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - Menu keepopen Configuration Property Test - - - - - - - - - - - - - - -

    Menu keepopen Configuration Property Test

    -

    Test case to reproduce bug 2512349.

    - - - -
    - - - diff --git a/www/extras/yui/tests/menu/tests/menu-activeelement-test.html b/www/extras/yui/tests/menu/tests/menu-activeelement-test.html deleted file mode 100644 index d6923a49c..000000000 --- a/www/extras/yui/tests/menu/tests/menu-activeelement-test.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - Button activeElement Test - - - - - - - - - - - - - - - - - - - - - - -

    Button activeElement Test

    -

    Test case for bug 2528245.

    -

    -Clicking on the text box when the Button's Menu is open should result in the Menu closing, -the Button blurring and the text box being focused and becoming the activeElement. -After mousing down on the text box, it should have a black outline and -should fire key events. -

    - -
    - - - -
    - - - \ No newline at end of file diff --git a/www/extras/yui/tests/menu/tests/menu-right-click-test.html b/www/extras/yui/tests/menu/tests/menu-right-click-test.html deleted file mode 100644 index dbd0f60ab..000000000 --- a/www/extras/yui/tests/menu/tests/menu-right-click-test.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - Menu Right Click Test - - - - - - - - - - - - - - - - -

    Menu Right Click Test

    - -

    - This is a test case for bug 2527869. -

    -

    - Right click on the Menu using Firefox for Windows. - The Menu should remain visible, and the browser's context menu should - appear. If an alert pops up, the bug is not fixed. -

    - - - - - - - \ No newline at end of file diff --git a/www/extras/yui/tests/menu/tests/menu-unsubscribe.html b/www/extras/yui/tests/menu/tests/menu-unsubscribe.html deleted file mode 100644 index 7441cec00..000000000 --- a/www/extras/yui/tests/menu/tests/menu-unsubscribe.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - YUI MenuBar test - - - - -
    -
    - -
    -
    - -
    -

    - -

    - -

    - - - -

    -
    - - - - - - - - - \ No newline at end of file diff --git a/www/extras/yui/tests/menu/tests/menu.html b/www/extras/yui/tests/menu/tests/menu.html deleted file mode 100644 index 1b2a1ba9a..000000000 --- a/www/extras/yui/tests/menu/tests/menu.html +++ /dev/null @@ -1,1752 +0,0 @@ -' - - - - YAHOO.widget.Menu Tests - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/www/extras/yui/tests/menu/tests/visited-link-test.html b/www/extras/yui/tests/menu/tests/visited-link-test.html deleted file mode 100644 index f4f1a5f64..000000000 --- a/www/extras/yui/tests/menu/tests/visited-link-test.html +++ /dev/null @@ -1,242 +0,0 @@ - - - - - Example: Website Top Nav With Submenus Built From Markup (YUI Library) - - - - - - - - - - - - - - - -
    -
    - - -

    Example: Website Top Nav With Submenus Built From Markup (YUI Library)

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

    NOTE: This example demonstrates how to add submenus to a menu bar using existing markup.

    - -
    - -
    - -

    Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas sit amet metus. Nunc quam elit, posuere nec, auctor in, rhoncus quis, dui. Aliquam erat volutpat. Ut dignissim, massa sit amet dignissim cursus, quam lacus feugiat dolor, id aliquam leo tortor eget odio. Pellentesque orci arcu, eleifend at, iaculis sit amet, posuere eu, lorem. Aliquam erat volutpat. Phasellus vulputate. Vivamus id erat. Nulla facilisi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Nunc gravida. Ut euismod, tortor eget convallis ullamcorper, arcu odio egestas pede, ut ornare urna elit vitae mauris. Aenean ullamcorper eros a lacus. Curabitur egestas tempus lectus. Donec et lectus et purus dapibus feugiat. Sed sit amet diam. Etiam ipsum leo, facilisis ac, rutrum nec, dignissim quis, tellus. Sed eleifend.

    -

    Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas sit amet metus. Nunc quam elit, posuere nec, auctor in, rhoncus quis, dui. Aliquam erat volutpat. Ut dignissim, massa sit amet dignissim cursus, quam lacus feugiat dolor, id aliquam leo tortor eget odio. Pellentesque orci arcu, eleifend at, iaculis sit amet, posuere eu, lorem. Aliquam erat volutpat. Phasellus vulputate. Vivamus id erat. Nulla facilisi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Nunc gravida. Ut euismod, tortor eget convallis ullamcorper, arcu odio egestas pede, ut ornare urna elit vitae mauris. Aenean ullamcorper eros a lacus. Curabitur egestas tempus lectus. Donec et lectus et purus dapibus feugiat. Sed sit amet diam. Etiam ipsum leo, facilisis ac, rutrum nec, dignissim quis, tellus. Sed eleifend.

    - - -
    -
    - - - -
    - -

    Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas sit amet metus. Nunc quam elit, posuere nec, auctor in, rhoncus quis, dui. Aliquam erat volutpat. Ut dignissim, massa sit amet dignissim cursus, quam lacus feugiat dolor, id aliquam leo tortor eget odio. Pellentesque orci arcu, eleifend at, iaculis sit amet, posuere eu, lorem. Aliquam erat volutpat. Phasellus vulputate. Vivamus id erat. Nulla facilisi. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Nunc gravida. Ut euismod, tortor eget convallis ullamcorper, arcu odio egestas pede, ut ornare urna elit vitae mauris. Aenean ullamcorper eros a lacus. Curabitur egestas tempus lectus. Donec et lectus et purus dapibus feugiat. Sed sit amet diam. Etiam ipsum leo, facilisis ac, rutrum nec, dignissim quis, tellus. Sed eleifend.

    - -
    - -
    -
    - -

    FOOTER: Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas sit amet metus. Nunc quam elit, posuere nec, auctor in, rhoncus quis, dui. Aliquam erat volutpat. Ut dignissim, massa sit amet dignissim cursus, quam lacus feugiat.

    - -
    -
    - - - \ No newline at end of file diff --git a/www/extras/yui/tests/paginator/tests/basic.html b/www/extras/yui/tests/paginator/tests/basic.html deleted file mode 100644 index f045f0354..000000000 --- a/www/extras/yui/tests/paginator/tests/basic.html +++ /dev/null @@ -1,206 +0,0 @@ - - - - Paginator Test Page - - - - - - - -

    Paginator Tests

    - - - -
    -
    -
    - - - - - - - - - - - - - diff --git a/www/extras/yui/tests/paginator/tests/example.html b/www/extras/yui/tests/paginator/tests/example.html deleted file mode 100644 index 2a5711b0b..000000000 --- a/www/extras/yui/tests/paginator/tests/example.html +++ /dev/null @@ -1,143 +0,0 @@ - - - - Paginator Test Page - - - - - -

    Paginator Examples

    -

    rpp:10, tot:93

    -
    - -

    rpp:10, tot:3

    -
    - -

    rpp:10, tot:93, pageLinks: 5

    -
    - -

    rpp:10, tot:93, recOff: 20, template: RPP

    -
    - -

    rpp:10, tot:133, template: (custom)

    -
    - -

    rpp:10, tot:93, ui.* manual render only

    -
    - -

    rpp:10, tot:93, render() + ui.* manual render

    -
    -
    - -

    rpp:10, tot:93, progressive enhance container and specific el

    -
    - - - - - - - - - - - - diff --git a/www/extras/yui/tests/profiler/tests/profiler.html b/www/extras/yui/tests/profiler/tests/profiler.html deleted file mode 100644 index f4e708f14..000000000 --- a/www/extras/yui/tests/profiler/tests/profiler.html +++ /dev/null @@ -1,513 +0,0 @@ - - -profiler tests - - - - - - - - - - - - -

    profile tests

    -

    - - - diff --git a/www/extras/yui/tests/progressbar/tests/index.html b/www/extras/yui/tests/progressbar/tests/index.html deleted file mode 100644 index 1b2ebe4b2..000000000 --- a/www/extras/yui/tests/progressbar/tests/index.html +++ /dev/null @@ -1,920 +0,0 @@ - - - -Progress Bar Tests - - - - - - - - - - - - - - - - - - - -
    -
    - - - - \ No newline at end of file diff --git a/www/extras/yui/tests/selector/tests/selector.html b/www/extras/yui/tests/selector/tests/selector.html deleted file mode 100644 index 360bf3055..000000000 --- a/www/extras/yui/tests/selector/tests/selector.html +++ /dev/null @@ -1,329 +0,0 @@ - - - -Selector Test Suite - - - - - - - - - - - - - - - - - -
    -

    lorem ipsum

    -

    lorem ipsum

    -

    lorem ipsum

    -
    - -
    -
    child of demo2
    -
    - -
    -
    -

    grandchild of demo3

    -
    -
    - - -
    - -
    -
      -
    1. foo
    2. -
    3. foo
    4. -
    5. foo
    6. -
    7. foo
    8. -
    9. foo
    10. -
    11. foo
    12. -
    13. foo
    14. -
    15. foo
    16. -
    17. foo
    18. -
    19. foo
    20. -
    -
    - foo - foo - foo -
    - - - - - - -
    -
    - - diff --git a/www/extras/yui/tests/slider/tests/background.html b/www/extras/yui/tests/slider/tests/background.html deleted file mode 100644 index 332699848..000000000 --- a/www/extras/yui/tests/slider/tests/background.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - Test Page - - - - - - -
    -
    -
    -
    slider thumb
    -
    -
    - - - - - - - - - - - - - diff --git a/www/extras/yui/tests/slider/tests/base.html b/www/extras/yui/tests/slider/tests/base.html deleted file mode 100644 index 3b94fec59..000000000 --- a/www/extras/yui/tests/slider/tests/base.html +++ /dev/null @@ -1,231 +0,0 @@ - - - - Test Page - - - - - - -
    -
    - -
    -

    Horizontal

    -

    - - - - - - 0 -

    -
    -
    - slider thumb -
    -
    -
    - -
    -

    Graduated Horizontal

    -

    - - - - - - 0 -

    -
    -
    - slider thumb -
    -
    -
    - -
    -

    Vertical

    -

    - - - - - - 0 -

    -
    -
    - slider thumb -
    -
    -
    - -
    -

    Graduated Vertical

    -

    - - - - - - 0 -

    -
    -
    - slider thumb -
    -
    -
    - -
    -

    Region

    -

    - - - - - - 0,0 -

    -
    -
    - slider thumb -
    -
    -
    - -
    -

    Graduated Region

    -

    - - - - - - 0,0 -

    -
    -
    - slider thumb -
    -
    -
    -
    - - - - - - - - - - - - - - diff --git a/www/extras/yui/tests/slider/tests/base_animated.html b/www/extras/yui/tests/slider/tests/base_animated.html deleted file mode 100644 index 5f481d265..000000000 --- a/www/extras/yui/tests/slider/tests/base_animated.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - Test Page - - - - - - -
    -
    -
    -
    - slider thumb -
    -
    -
    - - - - - - - - - - - - - diff --git a/www/extras/yui/tests/slider/tests/base_dual.html b/www/extras/yui/tests/slider/tests/base_dual.html deleted file mode 100644 index 0820c069d..000000000 --- a/www/extras/yui/tests/slider/tests/base_dual.html +++ /dev/null @@ -1,79 +0,0 @@ - - - - Test Page - - - - - - -
    -

    MIN: 0 MAX: 0

    -
    -
    -
    - slider thumb -
    -
    - slider thumb -
    -
    -
    - - - - - - - - - - - - - diff --git a/www/extras/yui/tests/slider/tests/base_graduated.html b/www/extras/yui/tests/slider/tests/base_graduated.html deleted file mode 100644 index ecd533e3f..000000000 --- a/www/extras/yui/tests/slider/tests/base_graduated.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - Test Page - - - - - - -
    -
    -
    -
    - slider thumb -
    -
    -
    - - - - - - - - - - - - diff --git a/www/extras/yui/tests/slider/tests/base_graduated_region.html b/www/extras/yui/tests/slider/tests/base_graduated_region.html deleted file mode 100644 index 3b22d5b82..000000000 --- a/www/extras/yui/tests/slider/tests/base_graduated_region.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - Test Page - - - - - - -
    -
    -
    -
    - slider thumb -
    -
    -
    - - - - - - - - - - - - - diff --git a/www/extras/yui/tests/slider/tests/base_region.html b/www/extras/yui/tests/slider/tests/base_region.html deleted file mode 100644 index f528f5de7..000000000 --- a/www/extras/yui/tests/slider/tests/base_region.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - Test Page - - - - - - -
    -
    -
    -
    - slider thumb -
    -
    -
    - - - - - - - - - - - - - diff --git a/www/extras/yui/tests/slider/tests/grad_win_resize.html b/www/extras/yui/tests/slider/tests/grad_win_resize.html deleted file mode 100644 index 0d7e0b7b6..000000000 --- a/www/extras/yui/tests/slider/tests/grad_win_resize.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - Test Page - - - - - - -
    -
    -
    -
    - slider thumb -
    -
    -
    -
    - - - - - - - - - - - - - diff --git a/www/extras/yui/tests/slider/tests/move_setval.html b/www/extras/yui/tests/slider/tests/move_setval.html deleted file mode 100644 index 0bfd0fbef..000000000 --- a/www/extras/yui/tests/slider/tests/move_setval.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - Test Page - - - - - - -
    -
    -
    -
    -
    - slider thumb -
    -
    - -
    - -
    - - - - - - - - - - - - - diff --git a/www/extras/yui/tests/slider/tests/offscreen.html b/www/extras/yui/tests/slider/tests/offscreen.html deleted file mode 100644 index 574d1e7b3..000000000 --- a/www/extras/yui/tests/slider/tests/offscreen.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - Test Page - - - - - - -
    -
    -
    -
    -
    - slider thumb -
    -
    -
    - -
    - - - - - - - - - - - - - diff --git a/www/extras/yui/tests/storage/tests/storage.html b/www/extras/yui/tests/storage/tests/storage.html deleted file mode 100644 index 9cb6e7c11..000000000 --- a/www/extras/yui/tests/storage/tests/storage.html +++ /dev/null @@ -1,218 +0,0 @@ - - - -Selector Test Suite - - - - - - - - - - - - - - - - - -
    - - - - - \ No newline at end of file diff --git a/www/extras/yui/tests/storage/tests/testvalues.js b/www/extras/yui/tests/storage/tests/testvalues.js deleted file mode 100644 index e16d69156..000000000 --- a/www/extras/yui/tests/storage/tests/testvalues.js +++ /dev/null @@ -1,7318 +0,0 @@ -var textShort = 'short text', - textMedium = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam ultrices sem tincidunt ligula fringilla vestibulum. Proin fringilla iaculis orci, et pellentesque odio cursus et. Nam laoreet venenatis lorem, id pharetra arcu lacinia et. Sed vulputate odio vel sapien mollis a bibendum magna lacinia. Phasellus posuere velit et purus porttitor ac bibendum metus viverra. Cras at magna massa, non pretium metus. Aliquam erat tortor, aliquet feugiat dapibus vitae, adipiscing ac nibh. Etiam non erat nec purus iaculis pulvinar. Suspendisse eu nulla a tortor convallis egestas. Nullam tellus mi, dignissim et accumsan nec, gravida hendrerit orci. Integer convallis tempus diam, quis imperdiet mauris bibendum nec. Integer adipiscing metus dolor, et porttitor eros. Aliquam ac ipsum ipsum. Nullam congue nulla sit amet ligula fringilla accumsan venenatis ipsum tempor.\ -\ -Donec quis est et nisi rutrum posuere eget commodo justo. Vestibulum neque neque, suscipit elementum placerat in, tempus ut sapien. Nulla blandit, enim convallis semper facilisis, orci augue vehicula nisi, id elementum lectus dui a nunc. Nam mollis tempus lobortis. Duis non metus id enim euismod luctus. Praesent non velit sed nunc egestas aliquam id et velit. Proin porttitor convallis dapibus. Nullam id orci at neque tempus sagittis sed eu purus. Aenean venenatis tortor vel ipsum gravida ultricies. Phasellus interdum, neque non consequat malesuada, augue neque scelerisque mi, a imperdiet nibh augue posuere nunc. Nullam lobortis massa vel neque volutpat a ultrices ipsum volutpat. Duis non purus nisi, nec fringilla massa.\ -\ -In et ante ipsum. Nam a lectus libero, quis condimentum orci. Mauris volutpat consectetur feugiat. Praesent non leo tellus. Donec luctus tempus ultrices. Nunc vitae ante metus, a commodo nibh. Maecenas eget lacus massa, dapibus venenatis felis. Ut sit amet turpis a lectus tristique placerat et sed lectus. Aenean in diam vitae orci molestie malesuada. Nam vel leo purus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed sit amet tellus lacus. Nulla congue egestas libero, vel tristique purus molestie vel.\ -\ -Mauris adipiscing, ligula quis dignissim sodales, dui massa laoreet ipsum, sit amet interdum sem dui et nunc. In at cursus velit. Mauris ut turpis tortor, at bibendum enim. Phasellus posuere lectus orci, id dignissim diam. Sed commodo, purus venenatis malesuada euismod, dolor augue semper diam, quis feugiat orci est tempor sem. Morbi quis lobortis orci. Nullam non arcu nec magna volutpat vulputate sit amet non lectus. Nullam gravida dictum quam, quis ultricies odio tempus quis. Sed sed elit ante. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Mauris fermentum, neque a eleifend molestie, mauris eros convallis libero, sit amet mollis orci urna in velit. Integer ac est dui. Nunc ac suscipit lorem. Nunc nec erat sed nibh adipiscing posuere.\ -\ -Proin semper dui at turpis volutpat eget varius ante porta. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed congue justo tellus. Aenean eleifend, risus vel imperdiet hendrerit, massa erat convallis lacus, ac condimentum augue eros at massa. Nam libero felis, consequat sit amet suscipit ut, consequat sed nunc. Mauris in nulla tellus. Mauris vulputate velit in elit congue vehicula. Donec eget nibh quam. Curabitur quam nunc, tristique ac egestas nec, lobortis et metus. Aliquam lobortis malesuada erat, vitae pharetra nisi congue non. Mauris lacus turpis, vestibulum eu fermentum non, porttitor sed leo. Mauris egestas blandit sem non blandit. Nam laoreet orci vel metus varius luctus. Suspendisse fermentum, nisl sit amet fermentum porta, dolor eros rutrum mi, id aliquam nulla orci at lorem. Aliquam erat volutpat. Nullam tristique elementum purus eget euismod. Sed lectus purus, mattis eu fermentum sed, laoreet in metus. Maecenas volutpat sagittis eros eu laoreet. ", - textLong = "The Project Gutenberg EBook of Faust, by Goethe\ -\ -This eBook is for the use of anyone anywhere at no cost and with\ -almost no restrictions whatsoever. You may copy it, give it away or\ -re-use it under the terms of the Project Gutenberg License included\ -with this eBook or online at www.gutenberg.net\ -\ -\ -Title: Faust\ -\ -Author: Goethe\ -\ -Release Date: December 25, 2004 [EBook #14460]\ -\ -Language: English\ -\ -Character set encoding: ISO-8859-1\ -\ -*** START OF THIS PROJECT GUTENBERG EBOOK FAUST ***\ -\ -\ -\ -\ -Produced by Juliet Sutherland, Charles Bidwell and the PG Online\ -Distributed Proofreading Team\ -\ -\ -\ -\ -\ -\ -FAUST\ -\ -\ -A TRAGEDY\ -\ -TRANSLATED FROM THE GERMAN\ -\ -OF\ -\ -GOETHE\ -\ -\ -WITH NOTES\ -\ -BY\ -\ -CHARLES T BROOKS\ -\ -\ -SEVENTH EDITION.\ -\ -BOSTON\ -TICKNOR AND FIELDS\ -\ -MDCCCLXVIII.\ -\ -\ -\ -Entered according to Act of Congress, in the year 1856,\ -by CHARLES T. BROOKS,\ -In the Clerk's Office of the District Court\ -of the District of Rhode Island.\ -\ -UNIVERSITY PRESS:\ -WELCH, BIGELOW, AND COMPANY,\ -CAMBRIDGE.\ -\ -\ -\ -\ -TRANSLATOR'S PREFACE.\ -\ -\ -Perhaps some apology ought to be given to English scholars, that is, those\ -who do not know German, (to those, at least, who do not know what sort of\ -a thing Faust is in the original,) for offering another translation to the\ -public, of a poem which has been already translated, not only in a literal\ -prose form, but also, twenty or thirty times, in metre, and sometimes with\ -great spirit, beauty, and power.\ -\ -The author of the present version, then, has no knowledge that a rendering\ -of this wonderful poem into the exact and ever-changing metre of the\ -original has, until now, been so much as attempted. To name only one\ -defect, the very best versions which he has seen neglect to follow the\ -exquisite artist in the evidently planned and orderly intermixing of\ -_male_ and _female_ rhymes, _i.e._ rhymes which fall on the last syllable\ -and those which fall on the last but one. Now, every careful student of\ -the versification of Faust must feel and see that Goethe did not\ -intersperse the one kind of rhyme with the other, at random, as those\ -translators do; who, also, give the female rhyme (on which the vivacity of\ -dialogue and description often so much depends,) in so small a proportion.\ -\ -A similar criticism might be made of their liberty in neglecting Goethe's\ -method of alternating different measures with each other.\ -\ -It seems as if, in respect to metre, at least, they had asked themselves,\ -how would Goethe have written or shaped this in English, had that been his\ -native language, instead of seeking _con amore_ (and _con fidelità_) as\ -they should have done, to reproduce, both in spirit and in form, the\ -movement, so free and yet orderly, of the singularly endowed and\ -accomplished poet whom they undertook to represent.\ -\ -As to the objections which Hayward and some of his reviewers have\ -instituted in advance against the possibility of a good and faithful\ -metrical translation of a poem like Faust, they seem to the present\ -translator full of paradox and sophistry. For instance, take this\ -assertion of one of the reviewers: \"The sacred and mysterious union of\ -thought with verse, twin-born and immortally wedded from the moment of\ -their common birth, can never be understood by those who desire verse\ -translations of good poetry.\" If the last part of this statement had read\ -\"by those who can be contented with _prose_ translations of good poetry,\"\ -the position would have been nearer the truth. This much we might well\ -admit, that, if the alternative were either to have a poem like Faust in a\ -metre different and glaringly different from the original, or to have it\ -in simple and strong prose, then the latter alternative would be the one\ -every tasteful and feeling scholar would prefer; but surely to every one\ -who can read the original or wants to know how this great song _sung\ -itself_ (as Carlyle says) out of Goethe's soul, a mere prose rendering\ -must be, comparatively, a _corpus mortuum._\ -\ -The translator most heartily dissents from Hayward's assertion that a\ -translator of Faust \"must sacrifice either metre or meaning.\" At least he\ -flatters himself that he has made, in the main, (not a compromise between\ -meaning and melody, though in certain instances he may have fallen into\ -that, but) a combination of the meaning with the melody, which latter is\ -so important, so vital a part of the lyric poem's meaning, in any worthy\ -sense. \"No poetic translation,\" says Hayward's reviewer, already quoted,\ -\"can give the rhythm and rhyme of the original; it can only substitute the\ -rhythm and rhyme of the translator.\" One might just as well say \"no\ -_prose_ translation can give the _sense and spirit_ of the original; it\ -can only substitute the _sense and spirit of the words and phrases of the\ -translator's language_;\" and then, these two assertions balancing each\ -other, there will remain in the metrical translator's favor, that he may\ -come as near to giving both the letter and the spirit, as the effects of\ -the Babel dispersion will allow.\ -\ -As to the original creation, which he has attempted here to reproduce, the\ -translator might say something, but prefers leaving his readers to the\ -poet himself, as revealed in the poem, and to the various commentaries of\ -which we have some accounts, at least, in English. A French translator of\ -the poem speaks in his introduction as follows: \"This Faust, conceived by\ -him in his youth, completed in ripe age, the idea of which he carried with\ -him through all the commotions of his life, as Camoens bore his poem with\ -him through the waves, this Faust contains him entire. The thirst for\ -knowledge and the martyrdom of doubt, had they not tormented his early\ -years? Whence came to him the thought of taking refuge in a supernatural\ -realm, of appealing to invisible powers, which plunged him, for a\ -considerable time, into the dreams of Illuminati and made him even invent\ -a religion? This irony of Mephistopheles, who carries on so audacious a\ -game with the weakness and the desires of man, is it not the mocking,\ -scornful side of the poet's spirit, a leaning to sullenness, which can be\ -traced even into the earliest years of his life, a bitter leaven thrown\ -into a strong soul forever by early satiety? The character of Faust\ -especially, the man whose burning, untiring heart can neither enjoy\ -fortune nor do without it, who gives himself unconditionally and watches\ -himself with mistrust, who unites the enthusiasm of passion and the\ -dejectedness of despair, is not this an eloquent opening up of the most\ -secret and tumultuous part of the poet's soul? And now, to complete the\ -image of his inner life, he has added the transcendingly sweet person of\ -Margaret, an exalted reminiscence of a young girl, by whom, at the age of\ -fourteen, he thought himself beloved, whose image ever floated round him,\ -and has contributed some traits to each of his heroines. This heavenly\ -surrender of a simple, good, and tender heart contrasts wonderfully with\ -the sensual and gloomy passion of the lover, who, in the midst of his\ -love-dreams, is persecuted by the phantoms of his imagination and by the\ -nightmares of thought, with those sorrows of a soul, which is crushed, but\ -not extinguished, which is tormented by the invincible want of happiness\ -and the bitter feeling, how hard a thing it is to receive or to bestow.\"\ -\ -\ -\ -\ -DEDICATION.[1]\ -\ -Once more ye waver dreamily before me,\ -Forms that so early cheered my troubled eyes!\ -To hold you fast doth still my heart implore me?\ -Still bid me clutch the charm that lures and flies?\ -Ye crowd around! come, then, hold empire o'er me,\ -As from the mist and haze of thought ye rise;\ -The magic atmosphere, your train enwreathing,\ -Through my thrilled bosom youthful bliss is breathing.\ -\ -Ye bring with you the forms of hours Elysian,\ -And shades of dear ones rise to meet my gaze;\ -First Love and Friendship steal upon my vision\ -Like an old tale of legendary days;\ -Sorrow renewed, in mournful repetition,\ -Runs through life's devious, labyrinthine ways;\ -And, sighing, names the good (by Fortune cheated\ -Of blissful hours!) who have before me fleeted.\ -\ -These later songs of mine, alas! will never\ -Sound in their ears to whom the first were sung!\ -Scattered like dust, the friendly throng forever!\ -Mute the first echo that so grateful rung!\ -To the strange crowd I sing, whose very favor\ -Like chilling sadness on my heart is flung;\ -And all that kindled at those earlier numbers\ -Roams the wide earth or in its bosom slumbers.\ -\ -And now I feel a long-unwonted yearning\ -For that calm, pensive spirit-realm, to-day;\ -Like an Aeolian lyre, (the breeze returning,)\ -Floats in uncertain tones my lisping lay;\ -Strange awe comes o'er me, tear on tear falls burning,\ -The rigid heart to milder mood gives way!\ -What I possess I see afar off lying,\ -And what I lost is real and undying.\ -\ -\ -\ -\ -PRELUDE\ -\ -IN THE THEATRE.\ -\ -\ - Manager. Dramatic Poet. Merry Person.\ -\ -_Manager_. You who in trouble and distress\ -Have both held fast your old allegiance,\ -What think ye? here in German regions\ -Our enterprise may hope success?\ -To please the crowd my purpose has been steady,\ -Because they live and let one live at least.\ -The posts are set, the boards are laid already,\ -And every one is looking for a feast.\ -They sit, with lifted brows, composed looks wearing,\ -Expecting something that shall set them staring.\ -I know the public palate, that's confest;\ -Yet never pined so for a sound suggestion;\ -True, they are not accustomed to the best,\ -But they have read a dreadful deal, past question.\ -How shall we work to make all fresh and new,\ -Acceptable and profitable, too?\ -For sure I love to see the torrent boiling,\ -When towards our booth they crowd to find a place,\ -Now rolling on a space and then recoiling,\ -Then squeezing through the narrow door of grace:\ -Long before dark each one his hard-fought station\ -In sight of the box-office window takes,\ -And as, round bakers' doors men crowd to escape starvation,\ -For tickets here they almost break their necks.\ -This wonder, on so mixed a mass, the Poet\ -Alone can work; to-day, my friend, O, show it!\ -\ -_Poet_. Oh speak not to me of that motley ocean,\ -Whose roar and greed the shuddering spirit chill!\ -Hide from my sight that billowy commotion\ -That draws us down the whirlpool 'gainst our will.\ -No, lead me to that nook of calm devotion,\ -Where blooms pure joy upon the Muses' hill;\ -Where love and friendship aye create and cherish,\ -With hand divine, heart-joys that never perish.\ -Ah! what, from feeling's deepest fountain springing,\ -Scarce from the stammering lips had faintly passed,\ -Now, hopeful, venturing forth, now shyly clinging,\ -To the wild moment's cry a prey is cast.\ -Oft when for years the brain had heard it ringing\ -It comes in full and rounded shape at last.\ -What shines, is born but for the moment's pleasure;\ -The genuine leaves posterity a treasure.\ -\ -_Merry Person_. Posterity! I'm sick of hearing of it;\ -Supposing I the future age would profit,\ -Who then would furnish ours with fun?\ -For it must have it, ripe and mellow;\ -The presence of a fine young fellow,\ -Is cheering, too, methinks, to any one.\ -Whoso can pleasantly communicate,\ -Will not make war with popular caprices,\ -For, as the circle waxes great,\ -The power his word shall wield increases.\ -Come, then, and let us now a model see,\ -Let Phantasy with all her various choir,\ -Sense, reason, passion, sensibility,\ -But, mark me, folly too! the scene inspire.\ -\ -_Manager_. But the great point is action! Every one\ -Comes as spectator, and the show's the fun.\ -Let but the plot be spun off fast and thickly,\ -So that the crowd shall gape in broad surprise,\ -Then have you made a wide impression quickly,\ -You are the man they'll idolize.\ -The mass can only be impressed by masses;\ -Then each at last picks out his proper part.\ -Give much, and then to each one something passes,\ -And each one leaves the house with happy heart.\ -Have you a piece, give it at once in pieces!\ -Such a ragout your fame increases;\ -It costs as little pains to play as to invent.\ -But what is gained, if you a whole present?\ -Your public picks it presently to pieces.\ -\ -_Poet_. You do not feel how mean a trade like that must be!\ -In the true Artist's eyes how false and hollow!\ -Our genteel botchers, well I see,\ -Have given the maxims that you follow.\ -\ -_Manager_. Such charges pass me like the idle wind;\ -A man who has right work in mind\ -Must choose the instruments most fitting.\ -Consider what soft wood you have for splitting,\ -And keep in view for whom you write!\ -If this one from _ennui_ seeks flight,\ -That other comes full from the groaning table,\ -Or, the worst case of all to cite,\ -From reading journals is for thought unable.\ -Vacant and giddy, all agog for wonder,\ -As to a masquerade they wing their way;\ -The ladies give themselves and all their precious plunder\ -And without wages help us play.\ -On your poetic heights what dream comes o'er you?\ -What glads a crowded house? Behold\ -Your patrons in array before you!\ -One half are raw, the other cold.\ -One, after this play, hopes to play at cards,\ -One a wild night to spend beside his doxy chooses,\ -Poor fools, why court ye the regards,\ -For such a set, of the chaste muses?\ -I tell you, give them more and ever more and more,\ -And then your mark you'll hardly stray from ever;\ -To mystify be your endeavor,\ -To satisfy is labor sore....\ -What ails you? Are you pleased or pained? What notion----\ -\ -_Poet_. Go to, and find thyself another slave!\ -What! and the lofty birthright Nature gave,\ -The noblest talent Heaven to man has lent,\ -Thou bid'st the Poet fling to folly's ocean!\ -How does he stir each deep emotion?\ -How does he conquer every element?\ -But by the tide of song that from his bosom springs,\ -And draws into his heart all living things?\ -When Nature's hand, in endless iteration,\ -The thread across the whizzing spindle flings,\ -When the complex, monotonous creation\ -Jangles with all its million strings:\ -Who, then, the long, dull series animating,\ -Breaks into rhythmic march the soulless round?\ -And, to the law of All each member consecrating,\ -Bids one majestic harmony resound?\ -Who bids the tempest rage with passion's power?\ -The earnest soul with evening-redness glow?\ -Who scatters vernal bud and summer flower\ -Along the path where loved ones go?\ -Who weaves each green leaf in the wind that trembles\ -To form the wreath that merit's brow shall crown?\ -Who makes Olympus fast? the gods assembles?\ -The power of manhood in the Poet shown.\ -\ -_Merry Person_. Come, then, put forth these noble powers,\ -And, Poet, let thy path of flowers\ -Follow a love-adventure's winding ways.\ -One comes and sees by chance, one burns, one stays,\ -And feels the gradual, sweet entangling!\ -The pleasure grows, then comes a sudden jangling,\ -Then rapture, then distress an arrow plants,\ -And ere one dreams of it, lo! _there_ is a romance.\ -Give us a drama in this fashion!\ -Plunge into human life's full sea of passion!\ -Each lives it, few its meaning ever guessed,\ -Touch where you will, 'tis full of interest.\ -Bright shadows fleeting o'er a mirror,\ -A spark of truth and clouds of error,\ -By means like these a drink is brewed\ -To cheer and edify the multitude.\ -The fairest flower of the youth sit listening\ -Before your play, and wait the revelation;\ -Each melancholy heart, with soft eyes glistening,\ -Draws sad, sweet nourishment from your creation;\ -This passion now, now that is stirred, by turns,\ -And each one sees what in his bosom burns.\ -Open alike, as yet, to weeping and to laughter,\ -They still admire the flights, they still enjoy the show;\ -Him who is formed, can nothing suit thereafter;\ -The yet unformed with thanks will ever glow.\ -\ -_Poet_. Ay, give me back the joyous hours,\ -When I myself was ripening, too,\ -When song, the fount, flung up its showers\ -Of beauty ever fresh and new.\ -When a soft haze the world was veiling,\ -Each bud a miracle bespoke,\ -And from their stems a thousand flowers I broke,\ -Their fragrance through the vales exhaling.\ -I nothing and yet all possessed,\ -Yearning for truth and in illusion blest.\ -Give me the freedom of that hour,\ -The tear of joy, the pleasing pain,\ -Of hate and love the thrilling power,\ -Oh, give me back my youth again!\ -\ -_Merry Person_. Youth, my good friend, thou needest certainly\ -When ambushed foes are on thee springing,\ -When loveliest maidens witchingly\ -Their white arms round thy neck are flinging,\ -When the far garland meets thy glance,\ -High on the race-ground's goal suspended,\ -When after many a mazy dance\ -In drink and song the night is ended.\ -But with a free and graceful soul\ -To strike the old familiar lyre,\ -And to a self-appointed goal\ -Sweep lightly o'er the trembling wire,\ -There lies, old gentlemen, to-day\ -Your task; fear not, no vulgar error blinds us.\ -Age does not make us childish, as they say,\ -But we are still true children when it finds us.\ -\ -_Manager_. Come, words enough you two have bandied,\ -Now let us see some deeds at last;\ -While you toss compliments full-handed,\ -The time for useful work flies fast.\ -Why talk of being in the humor?\ -Who hesitates will never be.\ -If you are poets (so says rumor)\ -Now then command your poetry.\ -You know full well our need and pleasure,\ -We want strong drink in brimming measure;\ -Brew at it now without delay!\ -To-morrow will not do what is not done to-day.\ -Let not a day be lost in dallying,\ -But seize the possibility\ -Right by the forelock, courage rallying,\ -And forth with fearless spirit sallying,--\ -Once in the yoke and you are free.\ - Upon our German boards, you know it,\ -What any one would try, he may;\ -Then stint me not, I beg, to-day,\ -In scenery or machinery, Poet.\ -With great and lesser heavenly lights make free,\ -Spend starlight just as you desire;\ -No want of water, rocks or fire\ -Or birds or beasts to you shall be.\ -So, in this narrow wooden house's bound,\ -Stride through the whole creation's round,\ -And with considerate swiftness wander\ -From heaven, through this world, to the world down yonder.\ -\ -\ -\ -\ - PROLOGUE\ -\ -\ - IN HEAVEN.\ -\ -\ -[THE LORD. THE HEAVENLY HOSTS _afterward_ MEPHISTOPHELES.\ -_The three archangels_, RAPHAEL, GABRIEL, _and_ MICHAEL, _come forward_.]\ -\ -_Raphael_. The sun, in ancient wise, is sounding,\ - With brother-spheres, in rival song;\ -And, his appointed journey rounding,\ - With thunderous movement rolls along.\ -His look, new strength to angels lending,\ - No creature fathom can for aye;\ -The lofty works, past comprehending,\ - Stand lordly, as on time's first day.\ -\ -_Gabriel_. And swift, with wondrous swiftness fleeting,\ - The pomp of earth turns round and round,\ -The glow of Eden alternating\ - With shuddering midnight's gloom profound;\ -Up o'er the rocks the foaming ocean\ - Heaves from its old, primeval bed,\ -And rocks and seas, with endless motion,\ - On in the spheral sweep are sped.\ -\ -_Michael_. And tempests roar, glad warfare waging,\ - From sea to land, from land to sea,\ -And bind round all, amidst their raging,\ - A chain of giant energy.\ -There, lurid desolation, blazing,\ - Foreruns the volleyed thunder's way:\ -Yet, Lord, thy messengers[2] are praising\ - The mild procession of thy day.\ -\ -_All Three_. The sight new strength to angels lendeth,\ - For none thy being fathom may,\ -The works, no angel comprehendeth,\ - Stand lordly as on time's first day.\ -\ -_Mephistopheles_. Since, Lord, thou drawest near us once again,\ -And how we do, dost graciously inquire,\ -And to be pleased to see me once didst deign,\ -I too among thy household venture nigher.\ -Pardon, high words I cannot labor after,\ -Though the whole court should look on me with scorn;\ -My pathos certainly would stir thy laughter,\ -Hadst thou not laughter long since quite forsworn.\ -Of sun and worlds I've nought to tell worth mention,\ -How men torment themselves takes my attention.\ -The little God o' the world jogs on the same old way\ -And is as singular as on the world's first day.\ -A pity 'tis thou shouldst have given\ -The fool, to make him worse, a gleam of light from heaven;\ -He calls it reason, using it\ -To be more beast than ever beast was yet.\ -He seems to me, (your grace the word will pardon,)\ -Like a long-legg'd grasshopper in the garden,\ -Forever on the wing, and hops and sings\ -The same old song, as in the grass he springs;\ -Would he but stay there! no; he needs must muddle\ -His prying nose in every puddle.\ -\ -_The Lord_. Hast nothing for our edification?\ -Still thy old work of accusation?\ -Will things on earth be never right for thee?\ -\ -_Mephistopheles_. No, Lord! I find them still as bad as bad can be.\ -Poor souls! their miseries seem so much to please 'em,\ -I scarce can find it in my heart to tease 'em.\ -\ -_The Lord_. Knowest thou Faust?\ -\ -_Mephistopheles_. The Doctor?\ -\ -_The Lord_. Ay, my servant!\ -\ -_Mephistopheles_. He!\ -Forsooth! he serves you in a famous fashion;\ -No earthly meat or drink can feed his passion;\ -Its grasping greed no space can measure;\ -Half-conscious and half-crazed, he finds no rest;\ -The fairest stars of heaven must swell his treasure.\ -Each highest joy of earth must yield its zest,\ -Not all the world--the boundless azure--\ -Can fill the void within his craving breast.\ -\ -_The Lord_. He serves me somewhat darkly, now, I grant,\ -Yet will he soon attain the light of reason.\ -Sees not the gardener, in the green young plant,\ -That bloom and fruit shall deck its coming season?\ -\ -_Mephistopheles_. What will you bet? You'll surely lose your wager!\ -If you will give me leave henceforth,\ -To lead him softly on, like an old stager.\ -\ -_The Lord_. So long as he shall live on earth,\ -Do with him all that you desire.\ -Man errs and staggers from his birth.\ -\ -_Mephistopheles_. Thank you; I never did aspire\ -To have with dead folk much transaction.\ -In full fresh cheeks I take the greatest satisfaction.\ -A corpse will never find me in the house;\ -I love to play as puss does with the mouse.\ -\ -_The Lord_. All right, I give thee full permission!\ -Draw down this spirit from its source,\ -And, canst thou catch him, to perdition\ -Carry him with thee in thy course,\ -But stand abashed, if thou must needs confess,\ -That a good man, though passion blur his vision,\ -Has of the right way still a consciousness.\ -\ -_Mephistopheles_. Good! but I'll make it a short story.\ -About my wager I'm by no means sorry.\ -And if I gain my end with glory\ -Allow me to exult from a full breast.\ -Dust shall he eat and that with zest,\ -Like my old aunt, the snake, whose fame is hoary.\ -\ -_The Lord_. Well, go and come, and make thy trial;\ -The like of thee I never yet did hate.\ -Of all the spirits of denial\ -The scamp is he I best can tolerate.\ -Man is too prone, at best, to seek the way that's easy,\ -He soon grows fond of unconditioned rest;\ -And therefore such a comrade suits him best,\ -Who spurs and works, true devil, always busy.\ -But you, true sons of God, in growing measure,\ -Enjoy rich beauty's living stores of pleasure!\ -The Word[3] divine that lives and works for aye,\ -Fold you in boundless love's embrace alluring,\ -And what in floating vision glides away,\ -That seize ye and make fast with thoughts enduring.\ -\ -[_Heaven closes, the archangels disperse._]\ -\ -_Mephistopheles. [Alone.]_ I like at times to exchange with him a word,\ -And take care not to break with him. 'Tis civil\ -In the old fellow[4] and so great a Lord\ -To talk so kindly with the very devil.\ -\ -\ -\ -\ - FAUST.\ -\ -\ - _Night. In a narrow high-arched Gothic room_,\ - FAUST _sitting uneasy at his desk_.\ -\ -_Faust_. Have now, alas! quite studied through\ -Philosophy and Medicine,\ -And Law, and ah! Theology, too,\ -With hot desire the truth to win!\ -And here, at last, I stand, poor fool!\ -As wise as when I entered school;\ -Am called Magister, Doctor, indeed,--\ -Ten livelong years cease not to lead\ -Backward and forward, to and fro,\ -My scholars by the nose--and lo!\ -Just nothing, I see, is the sum of our learning,\ -To the very core of my heart 'tis burning.\ -'Tis true I'm more clever than all the foplings,\ -Doctors, Magisters, Authors, and Popelings;\ -Am plagued by no scruple, nor doubt, nor cavil,\ -Nor lingering fear of hell or devil--\ -What then? all pleasure is fled forever;\ -To know one thing I vainly endeavor,\ -There's nothing wherein one fellow-creature\ -Could be mended or bettered with me for a teacher.\ -And then, too, nor goods nor gold have I,\ -Nor fame nor worldly dignity,--\ -A condition no dog could longer live in!\ -And so to magic my soul I've given,\ -If, haply, by spirits' mouth and might,\ -Some mysteries may not be brought to light;\ -That to teach, no longer may be my lot,\ -With bitter sweat, what I need to be taught;\ -That I may know what the world contains\ -In its innermost heart and finer veins,\ -See all its energies and seeds\ -And deal no more in words but in deeds.\ - O full, round Moon, didst thou but thine\ -For the last time on this woe of mine!\ -Thou whom so many a midnight I\ -Have watched, at this desk, come up the sky:\ -O'er books and papers, a dreary pile,\ -Then, mournful friend! uprose thy smile!\ -Oh that I might on the mountain-height,\ -Walk in the noon of thy blessed light,\ -Round mountain-caverns with spirits hover,\ -Float in thy gleamings the meadows over,\ -And freed from the fumes of a lore-crammed brain,\ -Bathe in thy dew and be well again!\ - Woe! and these walls still prison me?\ -Dull, dismal hole! my curse on thee!\ -Where heaven's own light, with its blessed beams,\ -Through painted panes all sickly gleams!\ -Hemmed in by these old book-piles tall,\ -Which, gnawed by worms and deep in must,\ -Rise to the roof against a wall\ -Of smoke-stained paper, thick with dust;\ -'Mid glasses, boxes, where eye can see,\ -Filled with old, obsolete instruments,\ -Stuffed with old heirlooms of implements--\ -That is thy world! There's a world for thee!\ - And still dost ask what stifles so\ -The fluttering heart within thy breast?\ -By what inexplicable woe\ -The springs of life are all oppressed?\ -Instead of living nature, where\ -God made and planted men, his sons,\ -Through smoke and mould, around thee stare\ -Grim skeletons and dead men's bones.\ - Up! Fly! Far out into the land!\ -And this mysterious volume, see!\ -By Nostradamus's[5] own hand,\ -Is it not guide enough for thee?\ -Then shalt thou thread the starry skies,\ -And, taught by nature in her walks,\ -The spirit's might shall o'er thee rise,\ -As ghost to ghost familiar talks.\ -Vain hope that mere dry sense should here\ -Explain the holy signs to thee.\ -I feel you, spirits, hovering near;\ -Oh, if you hear me, answer me!\ - [_He opens the book and beholds the sign of the Macrocosm.[_6]]\ -Ha! as I gaze, what ecstasy is this,\ -In one full tide through all my senses flowing!\ -I feel a new-born life, a holy bliss\ -Through nerves and veins mysteriously glowing.\ -Was it a God who wrote each sign?\ -Which, all my inner tumult stilling,\ -And this poor heart with rapture filling,\ -Reveals to me, by force divine,\ -Great Nature's energies around and through me thrilling?\ -Am I a God? It grows so bright to me!\ -Each character on which my eye reposes\ -Nature in act before my soul discloses.\ -The sage's word was truth, at last I see:\ -\"The spirit-world, unbarred, is waiting;\ -Thy sense is locked, thy heart is dead!\ -Up, scholar, bathe, unhesitating,\ -The earthly breast in morning-red!\"\ - [_He contemplates the sign._]\ -How all one whole harmonious weaves,\ -Each in the other works and lives!\ -See heavenly powers ascending and descending,\ -The golden buckets, one long line, extending!\ -See them with bliss-exhaling pinions winging\ -Their way from heaven through earth--their singing\ -Harmonious through the universe is ringing!\ - Majestic show! but ah! a show alone!\ -Nature! where find I thee, immense, unknown?\ -Where you, ye breasts? Ye founts all life sustaining,\ -On which hang heaven and earth, and where\ -Men's withered hearts their waste repair--\ -Ye gush, ye nurse, and I must sit complaining?\ - [_He opens reluctantly the book and sees the sign of the earth-spirit._]\ -How differently works on me this sign!\ -Thou, spirit of the earth, art to me nearer;\ -I feel my powers already higher, clearer,\ -I glow already as with new-pressed wine,\ -I feel the mood to brave life's ceaseless clashing,\ -To bear its frowning woes, its raptures flashing,\ -To mingle in the tempest's dashing,\ -And not to tremble in the shipwreck's crashing;\ -Clouds gather o'er my head--\ -Them moon conceals her light--\ -The lamp goes out!\ -It smokes!--Red rays are darting, quivering\ -Around my head--comes down\ -A horror from the vaulted roof\ -And seizes me!\ -Spirit that I invoked, thou near me art,\ -Unveil thyself!\ -Ha! what a tearing in my heart!\ -Upheaved like an ocean\ -My senses toss with strange emotion!\ -I feel my heart to thee entirely given!\ -Thou must! and though the price were life--were heaven!\ - [_He seizes the book and pronounces mysteriously the sign of the spirit.\ - A ruddy flame darts out, the spirit appears in the flame._]\ -\ -_Spirit_. Who calls upon me?\ -\ -_Faust. [Turning away.]_ Horrid sight!\ -\ -_Spirit_. Long have I felt the mighty action,\ -Upon my sphere, of thy attraction,\ -And now--\ -\ -_Faust_. Away, intolerable sprite!\ -\ -_Spirit_. Thou breath'st a panting supplication\ -To hear my voice, my face to see;\ -Thy mighty prayer prevails on me,\ -I come!--what miserable agitation\ -Seizes this demigod! Where is the cry of thought?\ -Where is the breast? that in itself a world begot,\ -And bore and cherished, that with joy did tremble\ -And fondly dream us spirits to resemble.\ -Where art thou, Faust? whose voice rang through my ear,\ -Whose mighty yearning drew me from my sphere?\ -Is this thing thou? that, blasted by my breath,\ -Through all life's windings shuddereth,\ -A shrinking, cringing, writhing worm!\ -\ -_Faust_. Thee, flame-born creature, shall I fear?\ -'Tis I, 'tis Faust, behold thy peer!\ -\ -_Spirit_. In life's tide currents, in action's storm,\ -Up and down, like a wave,\ -Like the wind I sweep!\ -Cradle and grave--\ -A limitless deep---\ -An endless weaving\ -To and fro,\ -A restless heaving\ -Of life and glow,--\ -So shape I, on Destiny's thundering loom,\ -The Godhead's live garment, eternal in bloom.\ -\ -_Faust_. Spirit that sweep'st the world from end to end,\ -How near, this hour, I feel myself to thee!\ -\ -_Spirit_. Thou'rt like the spirit thou canst comprehend,\ -Not me! [_Vanishes._]\ -\ -_Faust_. [_Collapsing_.] Not thee?\ - Whom then?\ - I, image of the Godhead,\ - And no peer for thee!\ - [_A knocking_.]\ -O Death! I know it!--'tis my Famulus--\ -Good-bye, ye dreams of bliss Elysian!\ -Shame! that so many a glowing vision\ -This dried-up sneak must scatter thus!\ -\ - [WAGNER, _in sleeping-gown and night-cap, a lamp in his hand._\ - FAUST _turns round with an annoyed look_.]\ -\ -_Wagner_. Excuse me! you're engaged in declamation;\ -'Twas a Greek tragedy no doubt you read?\ -I in this art should like initiation,\ -For nowadays it stands one well instead.\ -I've often heard them boast, a preacher\ -Might profit with a player for his teacher.\ -\ -_Faust_. Yes, when the preacher is a player, granted:\ -As often happens in our modern ways.\ -\ -_Wagner_. Ah! when one with such love of study's haunted,\ -And scarcely sees the world on holidays,\ -And takes a spy-glass, as it were, to read it,\ -How can one by persuasion hope to lead it?\ -\ -_Faust_. What you don't feel, you'll never catch by hunting,\ -It must gush out spontaneous from the soul,\ -And with a fresh delight enchanting\ -The hearts of all that hear control.\ -Sit there forever! Thaw your glue-pot,--\ -Blow up your ash-heap to a flame, and brew,\ -With a dull fire, in your stew-pot,\ -Of other men's leavings a ragout!\ -Children and apes will gaze delighted,\ -If their critiques can pleasure impart;\ -But never a heart will be ignited,\ -Comes not the spark from the speaker's heart.\ -\ -_Wagner_. Delivery makes the orator's success;\ -There I'm still far behindhand, I confess.\ -\ -_Faust_. Seek honest gains, without pretence!\ -Be not a cymbal-tinkling fool!\ -Sound understanding and good sense\ -Speak out with little art or rule;\ -And when you've something earnest to utter,\ -Why hunt for words in such a flutter?\ -Yes, your discourses, that are so refined'\ -In which humanity's poor shreds you frizzle,\ -Are unrefreshing as the mist and wind\ -That through the withered leaves of autumn whistle!\ -\ -_Wagner_. Ah God! well, art is long!\ -And life is short and fleeting.\ -What headaches have I felt and what heart-beating,\ -When critical desire was strong.\ -How hard it is the ways and means to master\ -By which one gains each fountain-head!\ -\ -And ere one yet has half the journey sped,\ -The poor fool dies--O sad disaster!\ -\ -_Faust_. Is parchment, then, the holy well-spring, thinkest,\ -A draught from which thy thirst forever slakes?\ -No quickening element thou drinkest,\ -Till up from thine own soul the fountain breaks.\ -\ -_Wagner_. Excuse me! in these olden pages\ -We catch the spirit of the by-gone ages,\ -We see what wisest men before our day have thought,\ -And to what glorious heights we their bequests have brought.\ -\ -_Faust_. O yes, we've reached the stars at last!\ -My friend, it is to us,--the buried past,--\ -A book with seven seals protected;\ -Your spirit of the times is, then,\ -At bottom, your own spirit, gentlemen,\ -In which the times are seen reflected.\ -And often such a mess that none can bear it;\ -At the first sight of it they run away.\ -A dust-bin and a lumber-garret,\ -At most a mock-heroic play[8]\ -With fine, pragmatic maxims teeming,\ -The mouths of puppets well-beseeming!\ -\ -_Wagner_. But then the world! the heart and mind of man!\ -To know of these who would not pay attention?\ -\ -_Faust_. To know them, yes, as weaklings can!\ -Who dares the child's true name outright to mention?\ -The few who any thing thereof have learned,\ -Who out of their heart's fulness needs must gabble,\ -And show their thoughts and feelings to the rabble,\ -Have evermore been crucified and burned.\ -I pray you, friend, 'tis wearing into night,\ -Let us adjourn here, for the present.\ -\ -_Wagner_. I had been glad to stay till morning light,\ -This learned talk with you has been so pleasant,\ -But the first day of Easter comes to-morrow.\ -And then an hour or two I'll borrow.\ -With zeal have I applied myself to learning,\ -True, I know much, yet to know all am burning.\ - [_Exit_.]\ -\ -_Faust_. [_Alone_.] See how in _his_ head only, hope still lingers,\ -Who evermore to empty rubbish clings,\ -With greedy hand grubs after precious things,\ -And leaps for joy when some poor worm he fingers!\ - That such a human voice should dare intrude,\ -Where all was full of ghostly tones and features!\ -Yet ah! this once, my gratitude\ -Is due to thee, most wretched of earth's creatures.\ -Thou snatchedst me from the despairing state\ -In which my senses, well nigh crazed, were sunken.\ -The apparition was so giant-great,\ -That to a very dwarf my soul had shrunken.\ - I, godlike, who in fancy saw but now\ -Eternal truth's fair glass in wondrous nearness,\ -Rejoiced in heavenly radiance and clearness,\ -Leaving the earthly man below;\ -I, more than cherub, whose free force\ -Dreamed, through the veins of nature penetrating,\ -To taste the life of Gods, like them creating,\ -Behold me this presumption expiating!\ -A word of thunder sweeps me from my course.\ - Myself with thee no longer dare I measure;\ -Had I the power to draw thee down at pleasure;\ -To hold thee here I still had not the force.\ -Oh, in that blest, ecstatic hour,\ -I felt myself so small, so great;\ -Thou drovest me with cruel power\ -Back upon man's uncertain fate\ -What shall I do? what slum, thus lonely?\ -That impulse must I, then, obey?\ -Alas! our very deeds, and not our sufferings only,\ -How do they hem and choke life's way!\ - To all the mind conceives of great and glorious\ -A strange and baser mixture still adheres;\ -Striving for earthly good are we victorious?\ -A dream and cheat the better part appears.\ -The feelings that could once such noble life inspire\ -Are quenched and trampled out in passion's mire.\ - Where Fantasy, erewhile, with daring flight\ -Out to the infinite her wings expanded,\ -A little space can now suffice her quite,\ -When hope on hope time's gulf has wrecked and stranded.\ -Care builds her nest far down the heart's recesses,\ -There broods o'er dark, untold distresses,\ -Restless she sits, and scares thy joy and peace away;\ -She puts on some new mask with each new day,\ -Herself as house and home, as wife and child presenting,\ -As fire and water, bane and blade;\ -What never hits makes thee afraid,\ -And what is never lost she keeps thee still lamenting.\ - Not like the Gods am I! Too deep that truth is thrust!\ -But like the worm, that wriggles through the dust;\ -Who, as along the dust for food he feels,\ -Is crushed and buried by the traveller's heels.\ - Is it not dust that makes this lofty wall\ -Groan with its hundred shelves and cases;\ -The rubbish and the thousand trifles all\ -That crowd these dark, moth-peopled places?\ -Here shall my craving heart find rest?\ -Must I perchance a thousand books turn over,\ -To find that men are everywhere distrest,\ -And here and there one happy one discover?\ -Why grin'st thou down upon me, hollow skull?\ -But that thy brain, like mine, once trembling, hoping,\ -Sought the light day, yet ever sorrowful,\ -Burned for the truth in vain, in twilight groping?\ -Ye, instruments, of course, are mocking me;\ -Its wheels, cogs, bands, and barrels each one praises.\ -I waited at the door; you were the key;\ -Your ward is nicely turned, and yet no bolt it raises.\ -Unlifted in the broadest day,\ -Doth Nature's veil from prying eyes defend her,\ -And what (he chooses not before thee to display,\ -Not all thy screws and levers can force her to surrender.\ -Old trumpery! not that I e'er used thee, but\ -Because my father used thee, hang'st thou o'er me,\ -Old scroll! thou hast been stained with smoke and smut\ -Since, on this desk, the lamp first dimly gleamed before me.\ -Better have squandered, far, I now can clearly see,\ -My little all, than melt beneath it, in this Tophet!\ -That which thy fathers have bequeathed to thee,\ -Earn and become possessor of it!\ -What profits not a weary load will be;\ -What it brings forth alone can yield the moment profit.\ - Why do I gaze as if a spell had bound me\ -Up yonder? Is that flask a magnet to the eyes?\ -What lovely light, so sudden, blooms around me?\ -As when in nightly woods we hail the full-moon-rise.\ - I greet thee, rarest phial, precious potion!\ -As now I take thee down with deep devotion,\ -In thee I venerate man's wit and art.\ -Quintessence of all soporific flowers,\ -Extract of all the finest deadly powers,\ -Thy favor to thy master now impart!\ -I look on thee, the sight my pain appeases,\ -I handle thee, the strife of longing ceases,\ -The flood-tide of the spirit ebbs away.\ -Far out to sea I'm drawn, sweet voices listening,\ -The glassy waters at my feet are glistening,\ -To new shores beckons me a new-born day.\ - A fiery chariot floats, on airy pinions,\ -To where I sit! Willing, it beareth me,\ -On a new path, through ether's blue dominions,\ -To untried spheres of pure activity.\ -This lofty life, this bliss elysian,\ -Worm that thou waft erewhile, deservest thou?\ -Ay, on this earthly sun, this charming vision,\ -Turn thy back resolutely now!\ -Boldly draw near and rend the gates asunder,\ -By which each cowering mortal gladly steals.\ -Now is the time to show by deeds of wonder\ -That manly greatness not to godlike glory yields;\ -Before that gloomy pit to stand, unfearing,\ -Where Fantasy self-damned in its own torment lies,\ -Still onward to that pass-way steering,\ -Around whose narrow mouth hell-flames forever rise;\ -Calmly to dare the step, serene, unshrinking,\ -Though into nothingness the hour should see thee sinking.\ - Now, then, come down from thy old case, I bid thee,\ -Where thou, forgotten, many a year hast hid thee,\ -Into thy master's hand, pure, crystal glass!\ -The joy-feasts of the fathers thou hast brightened,\ -The hearts of gravest guests were lightened,\ -When, pledged, from hand to hand they saw thee pass.\ -Thy sides, with many a curious type bedight,\ -Which each, as with one draught he quaffed the liquor\ -Must read in rhyme from off the wondrous beaker,\ -Remind me, ah! of many a youthful night.\ -I shall not hand thee now to any neighbor,\ -Not now to show my wit upon thy carvings labor;\ -Here is a juice of quick-intoxicating might.\ -The rich brown flood adown thy sides is streaming,\ -With my own choice ingredients teeming;\ -Be this last draught, as morning now is gleaming,\ -Drained as a lofty pledge to greet the festal light!\ - [_He puts the goblet to his lips_.\ -\ -_Ringing of bells and choral song_.\ -\ -_Chorus of Angels_. Christ hath arisen!\ - Joy to humanity!\ - No more shall vanity,\ - Death and inanity\ - Hold thee in prison!\ -\ -_Faust_. What hum of music, what a radiant tone,\ -Thrills through me, from my lips the goblet stealing!\ -Ye murmuring bells, already make ye known\ -The Easter morn's first hour, with solemn pealing?\ -Sing you, ye choirs, e'en now, the glad, consoling song,\ -That once, from angel-lips, through gloom sepulchral rung,\ -A new immortal covenant sealing?\ -\ -_Chorus of Women_. Spices we carried,\ - Laid them upon his breast;\ - Tenderly buried\ - Him whom we loved the best;\ -\ - Cleanly to bind him\ - Took we the fondest care,\ - Ah! and we find him\ - Now no more there.\ -\ -_Chorus of Angels_. Christ hath ascended!\ - Reign in benignity!\ - Pain and indignity,\ - Scorn and malignity,\ - _Their_ work have ended.\ -\ -_Faust_. Why seek ye me in dust, forlorn,\ -Ye heavenly tones, with soft enchanting?\ -Go, greet pure-hearted men this holy morn!\ -Your message well I hear, but faith to me is wanting;\ -Wonder, its dearest child, of Faith is born.\ -To yonder spheres I dare no more aspire,\ -Whence the sweet tidings downward float;\ -And yet, from childhood heard, the old, familiar note\ -Calls back e'en now to life my warm desire.\ -Ah! once how sweetly fell on me the kiss\ -Of heavenly love in the still Sabbath stealing!\ -Prophetically rang the bells with solemn pealing;\ -A prayer was then the ecstasy of bliss;\ -A blessed and mysterious yearning\ -Drew me to roam through meadows, woods, and skies;\ -And, midst a thousand tear-drops burning,\ -I felt a world within me rise\ -That strain, oh, how it speaks youth's gleesome plays and feelings,\ -Joys of spring-festivals long past;\ -Remembrance holds me now, with childhood's fond appealings,\ -Back from the fatal step, the last.\ -Sound on, ye heavenly strains, that bliss restore me!\ -Tears gush, once more the spell of earth is o'er me\ -\ -_Chorus of Disciples_. Has the grave's lowly one\ - Risen victorious?\ - Sits he, God's Holy One,\ - High-throned and glorious?\ - He, in this blest new birth,\ - Rapture creative knows;[9]\ - Ah! on the breast of earth\ - Taste we still nature's woes.\ - Left here to languish\ - Lone in a world like this,\ - Fills us with anguish\ - Master, thy bliss!\ -\ -_Chorus of Angels_. Christ has arisen\ - Out of corruption's gloom.\ - Break from your prison,\ - Burst every tomb!\ - Livingly owning him,\ - Lovingly throning him,\ - Feasting fraternally,\ - Praying diurnally,\ - Bearing his messages,\ - Sharing his promises,\ - Find ye your master near,\ - Find ye him here![10]\ -\ -\ -\ -\ - BEFORE THE GATE.\ -\ - _Pedestrians of all descriptions stroll forth_.\ -\ -_Mechanics' Apprentices_. Where are you going to carouse?\ -\ -_Others_. We're all going out to the Hunter's House.\ -\ -_The First_. We're going, ourselves, out to the Mill-House, brothers.\ -\ -_An Apprentice_. The Fountain-House I rather recommend.\ -\ -_Second_. 'Tis not a pleasant road, my friend.\ -\ -_The second group_. What will you do, then?\ -\ -_A Third_. I go with the others.\ -\ -_Fourth_. Come up to Burgdorf, there you're sure to find good cheer,\ -The handsomest of girls and best of beer,\ -And rows, too, of the very first water.\ -\ -_Fifth_. You monstrous madcap, does your skin\ -Itch for the third time to try that inn?\ -I've had enough for _my_ taste in that quarter.\ -\ -_Servant-girl_. No! I'm going back again to town for one.\ -\ -_Others_. Under those poplars we are sure to meet him.\ -\ -_First Girl_. But that for me is no great fun;\ -For you are always sure to get him,\ -He never dances with any but you.\ -Great good to me your luck will do!\ -\ -_Others_. He's not alone, I heard him say,\ -The curly-head would be with him to-day.\ -\ -_Scholar_. Stars! how the buxom wenches stride there!\ -Quick, brother! we must fasten alongside there.\ -Strong beer, good smart tobacco, and the waist\ -Of a right handsome gall, well rigg'd, now that's my taste.\ -\ -_Citizen's Daughter_. Do see those fine, young fellows yonder!\ -'Tis, I declare, a great disgrace;\ -When they might have the very best, I wonder,\ -After these galls they needs must race!\ -\ -_Second scholar_ [_to the first_].\ -Stop! not so fast! there come two more behind,\ -My eyes! but ain't they dressed up neatly?\ -One is my neighbor, or I'm blind;\ -I love the girl, she looks so sweetly.\ -Alone all quietly they go,\ -You'll find they'll take us, by and bye, in tow.\ -\ -_First_. No, brother! I don't like these starched up ways.\ -Make haste! before the game slips through our fingers.\ -The hand that swings the broom o' Saturdays\ -On Sundays round thy neck most sweetly lingers.\ -\ -_Citizen_. No, I don't like at all this new-made burgomaster!\ -His insolence grows daily ever faster.\ -No good from him the town will get!\ -Will things grow better with him? Never!\ -We're under more constraint than ever,\ -And pay more tax than ever yet.\ -\ -_Beggar_. [_Sings_.] Good gentlemen, and you, fair ladies,\ - With such red cheeks and handsome dress,\ - Think what my melancholy trade is,\ - And see and pity my distress!\ - Help the poor harper, sisters, brothers!\ - Who loves to give, alone is gay.\ - This day, a holiday to others,\ - Make it for me a harvest day.\ -\ -_Another citizen_.\ -Sundays and holidays, I like, of all things, a good prattle\ -Of war and fighting, and the whole array,\ -When back in Turkey, far away,\ -The peoples give each other battle.\ -One stands before the window, drinks his glass,\ -And sees the ships with flags glide slowly down the river;\ -Comes home at night, when out of sight they pass,\ -And sings with joy, \"Oh, peace forever!\"\ -\ -_Third citizen_. So I say, neighbor! let them have their way,\ -Crack skulls and in their crazy riot\ -Turn all things upside down they may,\ -But leave us here in peace and quiet.\ -\ -_Old Woman_ [_to the citizen's daughter_].\ -Heyday, brave prinking this! the fine young blood!\ -Who is not smitten that has met you?--\ -But not so proud! All very good!\ -And what you want I'll promise soon to get you.\ -\ -_Citizen's Daughter_. Come, Agatha! I dread in public sight\ -To prattle with such hags; don't stay, O, Luddy!\ -'Tis true she showed me, on St. Andrew's night,\ -My future sweetheart in the body.\ -\ -_The other_. She showed me mine, too, in a glass,\ -Right soldierlike, with daring comrades round him.\ -I look all round, I study all that pass,\ -But to this hour I have not found him.\ -\ -_Soldiers_. Castles with lowering\ - Bulwarks and towers,\ - Maidens with towering\ - Passions and powers,\ - Both shall be ours!\ - Daring the venture,\ - Glorious the pay!\ -\ - When the brass trumpet\ - Summons us loudly,\ - Joy-ward or death-ward,\ - On we march proudly.\ - That is a storming!\ -\ - Life in its splendor!\ - Castles and maidens\ - Both must surrender.\ - Daring the venture,\ - Glorious the pay.\ - There go the soldiers\ - Marching away!\ -\ -\ - FAUST _and_ WAGNER.\ -\ -_Faust_. Spring's warm look has unfettered the fountains,\ -Brooks go tinkling with silvery feet;\ -Hope's bright blossoms the valley greet;\ -Weakly and sickly up the rough mountains\ -Pale old Winter has made his retreat.\ -Thence he launches, in sheer despite,\ -Sleet and hail in impotent showers,\ -O'er the green lawn as he takes his flight;\ -But the sun will suffer no white,\ -Everywhere waking the formative powers,\ -Living colors he yearns to spread;\ -Yet, as he finds it too early for flowers,\ -Gayly dressed people he takes instead.\ -Look from this height whereon we find us\ -Back to the town we have left behind us,\ -Where from the dark and narrow door\ -Forth a motley multitude pour.\ -They sun themselves gladly and all are gay,\ -They celebrate Christ's resurrection to-day.\ -For have not they themselves arisen?\ -From smoky huts and hovels and stables,\ -From labor's bonds and traffic's prison,\ -From the confinement of roofs and gables,\ -From many a cramping street and alley,\ -From churches full of the old world's night,\ -All have come out to the day's broad light.\ -See, only see! how the masses sally\ -Streaming and swarming through gardens and fields\ -How the broad stream that bathes the valley\ -Is everywhere cut with pleasure boats' keels,\ -And that last skiff, so heavily laden,\ -Almost to sinking, puts off in the stream;\ -Ribbons and jewels of youngster and maiden\ -From the far paths of the mountain gleam.\ -How it hums o'er the fields and clangs from the steeple!\ -This is the real heaven of the people,\ -Both great and little are merry and gay,\ -I am a man, too, I can be, to-day.\ -\ -_Wagner_. With you, Sir Doctor, to go out walking\ -Is at all times honor and gain enough;\ -But to trust myself here alone would be shocking,\ -For I am a foe to all that is rough.\ -Fiddling and bowling and screams and laughter\ -To me are the hatefullest noises on earth;\ -They yell as if Satan himself were after,\ -And call it music and call it mirth.\ -\ - [_Peasants (under the linden). Dance and song._]\ -\ -The shepherd prinked him for the dance,\ -With jacket gay and spangle's glance,\ -And all his finest quiddle.\ -And round the linden lass and lad\ -They wheeled and whirled and danced like mad.\ -Huzza! huzza!\ -Huzza! Ha, ha, ha!\ -And tweedle-dee went the fiddle.\ -\ -And in he bounded through the whirl,\ -And with his elbow punched a girl,\ -Heigh diddle, diddle!\ -The buxom wench she turned round quick,\ -\"Now that I call a scurvy trick!\"\ -Huzza! huzza!\ -Huzza! ha, ha, ha!\ -Tweedle-dee, tweedle-dee went the fiddle.\ -\ -And petticoats and coat-tails flew\ -As up and down they went, and through,\ -Across and down the middle.\ -They all grew red, they all grew warm,\ -And rested, panting, arm in arm,\ -Huzza! huzza!\ -Ta-ra-la!\ -Tweedle-dee went the fiddle!\ -\ -\"And don't be so familiar there!\ -How many a one, with speeches fair,\ -His trusting maid will diddle!\"\ -But still he flattered her aside--\ -And from the linden sounded wide:\ -Huzza! huzza!\ -Huzza! huzza! ha! ha! ha!\ -And tweedle-dee the fiddle.\ -\ -_Old Peasant._ Sir Doctor, this is kind of you,\ -That with us here you deign to talk,\ -And through the crowd of folk to-day\ -A man so highly larned, walk.\ -So take the fairest pitcher here,\ -Which we with freshest drink have filled,\ -I pledge it to you, praying aloud\ -That, while your thirst thereby is stilled,\ -So many days as the drops it contains\ -May fill out the life that to you remains.\ -\ -_Faust._ I take the quickening draught and call\ -For heaven's best blessing on one and all.\ -\ - [_The people form a circle round him._]\ -\ -_Old Peasant._ Your presence with us, this glad day,\ -We take it very kind, indeed!\ -In truth we've found you long ere this\ -In evil days a friend in need!\ -Full many a one stands living here,\ -Whom, at death's door already laid,\ -Your father snatched from fever's rage,\ -When, by his skill, the plague he stayed.\ -You, a young man, we daily saw\ -Go with him to the pest-house then,\ -And many a corpse was carried forth,\ -But you came out alive again.\ -With a charmed life you passed before us,\ -Helped by the Helper watching o'er us.\ -\ -_All._ The well-tried man, and may he live,\ -Long years a helping hand to give!\ -\ -_Faust._ Bow down to Him on high who sends\ -His heavenly help and helping friends!\ - [_He goes on with_ WAGNER.]\ -\ -_Wagner._ What feelings, O great man, thy heart must swell\ -Thus to receive a people's veneration!\ -O worthy all congratulation,\ -Whose gifts to such advantage tell.\ -The father to his son shows thee with exultation,\ -All run and crowd and ask, the circle closer draws,\ -The fiddle stops, the dancers pause,\ -Thou goest--the lines fall back for thee.\ -They fling their gay-decked caps on high;\ -A little more and they would bow the knee\ -As if the blessed Host came by.\ -\ -_Faust._ A few steps further on, until we reach that stone;\ -There will we rest us from our wandering.\ -How oft in prayer and penance there alone,\ -Fasting, I sate, on holy mysteries pondering.\ -There, rich in hope, in faith still firm,\ -I've wept, sighed, wrung my hands and striven\ -This plague's removal to extort (poor worm!)\ -From the almighty Lord of Heaven.\ -The crowd's applause has now a scornful tone;\ -O couldst thou hear my conscience tell its story,\ -How little either sire or son\ -Has done to merit such a glory!\ -My father was a worthy man, confused\ -And darkened with his narrow lucubrations,\ -Who with a whimsical, though well-meant patience,\ -On Nature's holy circles mused.\ -Shut up in his black laboratory,\ -Experimenting without end,\ -'Midst his adepts, till he grew hoary,\ -He sought the opposing powers to blend.\ -Thus, a red lion,[11] a bold suitor, married\ -The silver lily, in the lukewarm bath,\ -And, from one bride-bed to another harried,\ -The two were seen to fly before the flaming wrath.\ -If then, with colors gay and splendid,\ -The glass the youthful queen revealed,\ -Here was the physic, death the patients' sufferings ended,\ -And no one asked, who then was healed?\ -Thus, with electuaries so satanic,\ -Worse than the plague with all its panic,\ -We rioted through hill and vale;\ -Myself, with my own hands, the drug to thousands giving,\ -They passed away, and I am living\ -To hear men's thanks the murderers hail!\ -\ -_Wagner._ Forbear! far other name that service merits!\ -Can a brave man do more or less\ -Than with nice conscientiousness\ -To exercise the calling he inherits?\ -If thou, as youth, thy father honorest,\ -To learn from him thou wilt desire;\ -If thou, as man, men with new light hast blest,\ -Then may thy son to loftier heights aspire.\ -\ -_Faust._ O blest! who hopes to find repose,\ -Up from this mighty sea of error diving!\ -Man cannot use what he already knows,\ -To use the unknown ever striving.\ -But let not such dark thoughts a shadow throw\ -O'er the bright joy this hour inspires!\ -See how the setting sun, with ruddy glow,\ -The green-embosomed hamlet fires!\ -He sinks and fades, the day is lived and gone,\ -He hastens forth new scenes of life to waken.\ -O for a wing to lift and bear me on,\ -And on, to where his last rays beckon!\ -Then should I see the world's calm breast\ -In everlasting sunset glowing,\ -The summits all on fire, each valley steeped in rest,\ -The silver brook to golden rivers flowing.\ -No savage mountain climbing to the skies\ -Should stay the godlike course with wild abysses;\ -And now the sea, with sheltering, warm recesses\ -Spreads out before the astonished eyes.\ -At last it seems as if the God were sinking;\ -But a new impulse fires the mind,\ -Onward I speed, his endless glory drinking,\ -The day before me and the night behind,\ -The heavens above my head and under me the ocean.\ -A lovely dream,--meanwhile he's gone from sight.\ -Ah! sure, no earthly wing, in swiftest flight,\ -May with the spirit's wings hold equal motion.\ -Yet has each soul an inborn feeling\ -Impelling it to mount and soar away,\ -When, lost in heaven's blue depths, the lark is pealing\ -High overhead her airy lay;\ -When o'er the mountain pine's black shadow,\ -With outspread wing the eagle sweeps,\ -And, steering on o'er lake and meadow,\ -The crane his homeward journey keeps.\ -\ -_Wagner._ I've had myself full many a wayward hour,\ -But never yet felt such a passion's power.\ -One soon grows tired of field and wood and brook,\ -I envy not the fowl of heaven his pinions.\ -Far nobler joy to soar through thought's dominions\ -From page to page, from book to book!\ -Ah! winter nights, so dear to mind and soul!\ -Warm, blissful life through all the limbs is thrilling,\ -And when thy hands unfold a genuine ancient scroll,\ -It seems as if all heaven the room were filling.\ -\ -_Faust_. One passion only has thy heart possessed;\ -The other, friend, O, learn it never!\ -Two souls, alas! are lodged in my wild breast,\ -Which evermore opposing ways endeavor,\ -The one lives only on the joys of time,\ -Still to the world with clamp-like organs clinging;\ -The other leaves this earthly dust and slime,\ -To fields of sainted sires up-springing.\ -O, are there spirits in the air,\ -That empire hold 'twixt earth's and heaven's dominions,\ -Down from your realm of golden haze repair,\ -Waft me to new, rich life, upon your rosy pinions!\ -Ay! were a magic mantle only mine,\ -To soar o'er earth's wide wildernesses,\ -I would not sell it for the costliest dresses,\ -Not for a royal robe the gift resign.\ -\ -_Wagner_. O, call them not, the well known powers of air,\ -That swarm through all the middle kingdom, weaving\ -Their fairy webs, with many a fatal snare\ -The feeble race of men deceiving.\ -First, the sharp spirit-tooth, from out the North,\ -And arrowy tongues and fangs come thickly flying;\ -Then from the East they greedily dart forth,\ -Sucking thy lungs, thy life-juice drying;\ -If from the South they come with fever thirst,\ -Upon thy head noon's fiery splendors heaping;\ -The Westwind brings a swarm, refreshing first,\ -Then all thy world with thee in stupor steeping.\ -They listen gladly, aye on mischief bent,\ -Gladly draw near, each weak point to espy,\ -They make believe that they from heaven are sent,\ -Whispering like angels, while they lie.\ -But let us go! The earth looks gray, my friend,\ -The air grows cool, the mists ascend!\ -At night we learn our homes to prize.--\ -Why dost thou stop and stare with all thy eyes?\ -What can so chain thy sight there, in the gloaming?\ -\ -_Faust_. Seest thou that black dog through stalks and stubble roaming?\ -\ -_Wagner_. I saw him some time since, he seemed not strange to me.\ -\ -_Faust_. Look sharply! What dost take the beast to be?\ -\ -_Wagner_. For some poor poodle who has lost his master,\ -And, dog-like, scents him o'er the ground.\ -\ -_Faust_. Markst thou how, ever nearer, ever faster,\ -Towards us his spiral track wheels round and round?\ -And if my senses suffer no confusion,\ -Behind him trails a fiery glare.\ -\ -_Wagner_. 'Tis probably an optical illusion;\ -I still see only a black poodle there.\ -\ -_Faust_. He seems to me as he were tracing slyly\ -His magic rings our feet at last to snare.\ -\ -_Wagner_. To me he seems to dart around our steps so shyly,\ -As if he said: is one of them my master there?\ -\ -_Faust_. The circle narrows, he is near!\ -\ -_Wagner_. Thou seest! a dog we have, no spectre, here!\ -He growls and stops, crawls on his belly, too,\ -And wags his tail,--as all dogs do.\ -\ -_Faust_. Come here, sir! come, our comrade be!\ -\ -_Wagner_. He has a poodle's drollery.\ -Stand still, and he, too, waits to see;\ -Speak to him, and he jumps on thee;\ -Lose something, drop thy cane or sling it\ -Into the stream, he'll run and bring it.\ -\ -_Faust_. I think you're right; I trace no spirit here,\ -'Tis all the fruit of training, that is clear.\ -\ -_Wagner_. A well-trained dog is a great treasure,\ -Wise men in such will oft take pleasure.\ -And he deserves your favor and a collar,\ -He, of the students the accomplished scholar.\ -\ - [_They go in through the town gate._]\ -\ -\ -\ -\ - STUDY-CHAMBER.\ -\ - _Enter_ FAUST _with the_ POODLE.\ -\ -\ -I leave behind me field and meadow\ -Veiled in the dusk of holy night,\ -Whose ominous and awful shadow\ -Awakes the better soul to light.\ -To sleep are lulled the wild desires,\ -The hand of passion lies at rest;\ -The love of man the bosom fires,\ -The love of God stirs up the breast.\ -\ -Be quiet, poodle! what worrisome fiend hath possest thee,\ -Nosing and snuffling so round the door?\ -Go behind the stove there and rest thee,\ -There's my best pillow--what wouldst thou more?\ -As, out on the mountain-paths, frisking and leaping,\ -Thou, to amuse us, hast done thy best,\ -So now in return lie still in my keeping,\ -A quiet, contented, and welcome guest.\ -\ -When, in our narrow chamber, nightly,\ -The friendly lamp begins to burn,\ -Then in the bosom thought beams brightly,\ -Homeward the heart will then return.\ -Reason once more bids passion ponder,\ -Hope blooms again and smiles on man;\ -Back to life's rills he yearns to wander,\ -Ah! to the source where life began.\ -\ -Stop growling, poodle! In the music Elysian\ -That laps my soul at this holy hour,\ -These bestial noises have jarring power.\ -We know that men will treat with derision\ -Whatever they cannot understand,\ -At goodness and truth and beauty's vision\ -Will shut their eyes and murmur and howl at it;\ -And must the dog, too, snarl and growl at it?\ -\ -But ah, with the best will, I feel already,\ -No peace will well up in me, clear and steady.\ -But why must hope so soon deceive us,\ -And the dried-up stream in fever leave us?\ -For in this I have had a full probation.\ -And yet for this want a supply is provided,\ -To a higher than earth the soul is guided,\ -We are ready and yearn for revelation:\ -And where are its light and warmth so blent\ -As here in the New Testament?\ -I feel, this moment, a mighty yearning\ -To expound for once the ground text of all,\ -The venerable original\ -Into my own loved German honestly turning.\ - [_He opens the volume, and applies himself to the task_.]\ -\"In the beginning was the _Word_.\" I read.\ -But here I stick! Who helps me to proceed?\ -The _Word_--so high I cannot--dare not, rate it,\ -I must, then, otherwise translate it,\ -If by the spirit I am rightly taught.\ -It reads: \"In the beginning was the _thought_.\"\ -But study well this first line's lesson,\ -Nor let thy pen to error overhasten!\ -Is it the _thought_ does all from time's first hour?\ -\"In the beginning,\" read then, \"was the _power_.\"\ -Yet even while I write it down, my finger\ -Is checked, a voice forbids me there to linger.\ -The spirit helps! At once I dare to read\ -And write: \"In the beginning was the _deed_.\"\ -\ -If I with thee must share my chamber,\ -Poodle, now, remember,\ -No more howling,\ -No more growling!\ -I had as lief a bull should bellow,\ -As have for a chum such a noisy fellow.\ -Stop that yell, now,\ -One of us must quit this cell now!\ -'Tis hard to retract hospitality,\ -But the door is open, thy way is free.\ -But what ails the creature?\ -Is this in the course of nature?\ -Is it real? or one of Fancy's shows?\ -\ -How long and broad my poodle grows!\ -He rises from the ground;\ -That is no longer the form of a hound!\ -Heaven avert the curse from us!\ -He looks like a hippopotamus,\ -With his fiery eyes and the terrible white\ -Of his grinning teeth! oh what a fright\ -Have I brought with me into the house! Ah now,\ -No mystery art thou!\ -Methinks for such half hellish brood\ -The key of Solomon were good.\ -\ -_Spirits_ [_in the passage_]. Softly! a fellow is caught there!\ - Keep back, all of you, follow him not there!\ - Like the fox in the trap,\ - Mourns the old hell-lynx his mishap.\ - But give ye good heed!\ - This way hover, that way hover,\ - Over and over,\ - And he shall right soon be freed.\ - Help can you give him,\ - O do not leave him!\ - Many good turns he's done us,\ - Many a fortune won us.\ -\ -_Faust_. First, to encounter the creature\ -By the spell of the Four, says the teacher:\ - Salamander shall glisten,[12]\ - Undina lapse lightly,\ - Sylph vanish brightly,\ - Kobold quick listen.\ -\ -He to whom Nature\ -Shows not, as teacher,\ -Every force\ -And secret source,\ -Over the spirits\ -No power inherits.\ -\ - Vanish in glowing\ - Flame, Salamander!\ - Inward, spirally flowing,\ - Gurgle, Undine!\ - Gleam in meteoric splendor,\ - Airy Queen!\ - Thy homely help render,\ - Incubus! Incubus!\ - Forth and end the charm for us!\ -\ -No kingdom of Nature\ -Resides in the creature.\ -He lies there grinning--'tis clear, my charm\ -Has done the monster no mite of harm.\ -I'll try, for thy curing,\ -Stronger adjuring.\ -\ - Art thou a jail-bird,\ - A runaway hell-bird?\ - This sign,[13] then--adore it!\ - They tremble before it\ - All through the dark dwelling.\ -\ -His hair is bristling--his body swelling.\ -\ - Reprobate creature!\ - Canst read his nature?\ - The Uncreated,\ - Ineffably Holy,\ - With Deity mated,\ - Sin's victim lowly?\ -\ -Driven behind the stove by my spells,\ -Like an elephant he swells;\ -He fills the whole room, so huge he's grown,\ -He waxes shadowy faster and faster.\ -Rise not up to the ceiling--down!\ -Lay thyself at the feet of thy master!\ -Thou seest, there's reason to dread my ire.\ -I'll scorch thee with the holy fire!\ -Wait not for the sight\ -Of the thrice-glowing light!\ -Wait not to feel the might\ -Of the potentest spell in all my treasure!\ -\ -\ - MEPHISTOPHELES.\ - [_As the mist sinks, steps forth from behind the stove,\ - dressed as a travelling scholasticus_.]\ -Why all this noise? What is your worship's pleasure?\ -\ -_Faust_. This was the poodle's essence then!\ -A travelling clark? Ha! ha! The casus is too funny.\ -\ -_Mephistopheles_. I bow to the most learned among men!\ -'Faith you did sweat me without ceremony.\ -\ -_Faust_. What is thy name?\ -\ -_Mephistopheles_. The question seems too small\ -For one who holds the _word_ so very cheaply,\ -Who, far removed from shadows all,\ -For substances alone seeks deeply.\ -\ -_Faust_. With gentlemen like him in my presence,\ -The name is apt to express the essence,\ -Especially if, when you inquire,\ -You find it God of flies,[14] Destroyer, Slanderer, Liar.\ -Well now, who art thou then?\ -\ -_Mephistopheles_. A portion of that power,\ -Which wills the bad and works the good at every hour.\ -\ -_Faust_. Beneath thy riddle-word what meaning lies?\ -\ -_Mephistopheles_. I am the spirit that denies!\ -And justly so; for all that time creates,\ -He does well who annihilates!\ -Better, it ne'er had had beginning;\ -And so, then, all that you call sinning,\ -Destruction,--all you pronounce ill-meant,--\ -Is my original element.\ -\ -_Faust_. Thou call'st thyself a part, yet lookst complete to me.\ -\ -_Mephistopheles_. I speak the modest truth to thee.\ -A world of folly in one little soul,\ -_Man_ loves to think himself a whole;\ -Part of the part am I, which once was all, the Gloom\ -That brought forth Light itself from out her mighty womb,\ -The upstart proud, that now with mother Night\ -Disputes her ancient rank and space and right,\ -Yet never shall prevail, since, do whate'er he will,\ -He cleaves, a slave, to bodies still;\ -From bodies flows, makes bodies fair to sight;\ -A body in his course can check him,\ -His doom, I therefore hope, will soon o'ertake him,\ -With bodies merged in nothingness and night.\ -\ -_Faust_. Ah, now I see thy high vocation!\ -In gross thou canst not harm creation,\ -And so in small hast now begun.\ -\ -_Mephistopheles_. And, truth to tell, e'en here, not much have done.\ -That which at nothing the gauntlet has hurled,\ -This, what's its name? this clumsy world,\ -So far as I have undertaken,\ -I have to own, remains unshaken\ -By wave, storm, earthquake, fiery brand.\ -Calm, after all, remain both sea and land.\ -And the damn'd living fluff, of man and beast the brood,\ -It laughs to scorn my utmost power.\ -I've buried myriads by the hour,\ -And still there circulates each hour a new, fresh blood.\ -It were enough to drive one to distraction!\ -Earth, water, air, in constant action,\ -Through moist and dry, through warm and cold,\ -Going forth in endless germination!\ -Had I not claimed of fire a reservation,\ -Not one thing I alone should hold.\ -\ -_Faust_. Thus, with the ever-working power\ -Of good dost thou in strife persist,\ -And in vain malice, to this hour,\ -Clenchest thy cold and devilish fist!\ -Go try some other occupation,\ -Singular son of Chaos, thou!\ -\ -_Mephistopheles_. We'll give the thing consideration,\ -When next we meet again! But now\ -Might I for once, with leave retire?\ -\ -_Faust_. Why thou shouldst ask I do not see.\ -Now that I know thee, when desire\ -Shall prompt thee, freely visit me.\ -Window and door give free admission.\ -At least there's left the chimney flue.\ -\ -_Mephistopheles_. Let me confess there's one small prohibition\ -\ -Lies on thy threshold, 'gainst my walking through,\ -The wizard-foot--[15]\ -\ -_Faust_. Does that delay thee?\ -The Pentagram disturbs thee? Now,\ -Come tell me, son of hell, I pray thee,\ -If that spell-binds thee, then how enteredst thou?\ -_Thou_ shouldst proceed more circumspectly!\ -\ -_Mephistopheles_. Mark well! the figure is not drawn correctly;\ -One of the angles, 'tis the outer one,\ -Is somewhat open, dost perceive it?\ -\ -_Faust_. That was a lucky hit, believe it!\ -And I have caught thee then? Well done!\ -'Twas wholly chance--I'm quite astounded!\ -\ -_Mephistopheles_. The _poodle_ took no heed,\ -as through the door he bounded;\ -The case looks differently now;\ -The _devil_ can leave the house no-how.\ -\ -_Faust_. The window offers free emission.\ -\ -_Mephistopheles_. Devils and ghosts are bound by this condition:\ -\ -The way they entered in, they must come out. Allow\ -In the first clause we're free, yet not so in the second.\ -\ -_Faust_. In hell itself, then, laws are reckoned?\ -Now that I like; so then, one may, in fact,\ -Conclude a binding compact with you gentry?\ -\ -_Mephistopheles_. Whatever promise on our books finds entry,\ -We strictly carry into act.\ -But hereby hangs a grave condition,\ -Of this we'll talk when next we meet;\ -But for the present I entreat\ -Most urgently your kind dismission.\ -\ -_Faust_. Do stay but just one moment longer, then,\ -Tell me good news and I'll release thee.\ -\ -_Mephistopheles_. Let me go now! I'll soon come back again,\ -Then may'st thou ask whate'er shall please thee.\ -\ -_Faust_. I laid no snare for thee, old chap!\ -Thou shouldst have watched and saved thy bacon.\ -Who has the devil in his trap\ -Must hold him fast, next time he'll not so soon be taken.\ -\ -_Mephistopheles_. Well, if it please thee, I'm content to stay\ -For company, on one condition,\ -That I, for thy amusement, may\ -To exercise my arts have free permission.\ -\ -_Faust_. I gladly grant it, if they be\ -Not disagreeable to me.\ -\ -_Mephistopheles_. Thy senses, friend, in this one hour\ -Shall grasp the world with clearer power\ -Than in a year's monotony.\ -The songs the tender spirits sing thee,\ -The lovely images they bring thee\ -Are not an idle magic play.\ -Thou shalt enjoy the daintiest savor,\ -Then feast thy taste on richest flavor,\ -Then thy charmed heart shall melt away.\ -Come, all are here, and all have been\ -Well trained and practised, now begin!\ -\ -_Spirits_. Vanish, ye gloomy\ - Vaulted abysses!\ - Tenderer, clearer,\ - Friendlier, nearer,\ - Ether, look through!\ - O that the darkling\ - Cloud-piles were riven!\ - Starlight is sparkling,\ - Purer is heaven,\ - Holier sunshine\ - Softens the blue.\ - Graces, adorning\ - Sons of the morning--\ - Shadowy wavings--\ - Float along over;\ - Yearnings and cravings\ - After them hover.\ - Garments ethereal,\ - Tresses aerial,\ - Float o'er the flowers,\ - Float o'er the bowers,\ - Where, with deep feeling,\ - Thoughtful and tender,\ - Lovers, embracing,\ - Life-vows are sealing.\ - Bowers on bowers!\ - Graceful and slender\ - Vines interlacing!\ - Purple and blushing,\ - Under the crushing\ - Wine-presses gushing,\ - Grape-blood, o'erflowing,\ - Down over gleaming\ - Precious stones streaming,\ - Leaves the bright glowing\ - Tops of the mountains,\ - Leaves the red fountains,\ - Widening and rushing,\ - Till it encloses\ - Green hills all flushing,\ - Laden with roses.\ - Happy ones, swarming,\ - Ply their swift pinions,\ - Glide through the charming\ - Airy dominions,\ - Sunward still fleering,\ - Onward, where peering\ - Far o'er the ocean,\ - Islets are dancing\ - With an entrancing,\ - Magical motion;\ - Hear them, in chorus,\ - Singing high o'er us;\ - Over the meadows\ - Flit the bright shadows;\ - Glad eyes are glancing,\ - Tiny feet dancing.\ - Up the high ridges\ - Some of them clamber,\ - Others are skimming\ - Sky-lakes of amber,\ - Others are swimming\ - Over the ocean;--\ - All are in motion,\ - Life-ward all yearning,\ - Longingly turning\ - To the far-burning\ - Star-light of bliss.\ -\ -_Mephistopheles_. He sleeps! Ye airy, tender youths, your numbers\ -Have sung him into sweetest slumbers!\ -You put me greatly in your debt by this.\ -Thou art not yet the man that shall hold fast the devil!\ -Still cheat his senses with your magic revel,\ -Drown him in dreams of endless youth;\ -But this charm-mountain on the sill to level,\ -I need, O rat, thy pointed tooth!\ -Nor need I conjure long, they're near me,\ -E'en now comes scampering one, who presently will hear me.\ -\ -The sovereign lord of rats and mice,\ -Of flies and frogs and bugs and lice,\ -Commands thee to come forth this hour,\ -And gnaw this threshold with great power,\ -As he with oil the same shall smear--\ -Ha! with a skip e'en now thou'rt here!\ -But brisk to work! The point by which I'm cowered,\ -Is on the ledge, the farthest forward.\ -Yet one more bite, the deed is done.--\ -Now, Faust, until we meet again, dream on!\ -\ -_Faust_. [_Waking_.] Again has witchcraft triumphed o'er me?\ -Was it a ghostly show, so soon withdrawn?\ -I dream, the devil stands himself before me--wake, to find a poodle gone!\ -\ -\ -\ -\ - STUDY-CHAMBER.\ -\ - FAUST. MEPHISTOPHELES.\ -\ -\ -_Faust_. A knock? Walk in! Who comes again to tease me?\ -\ -_Mephistopheles_. 'Tis I.\ -\ -_Faust_. Come in!\ -\ -_Mephistopheles_. Must say it thrice, to please me.\ -\ -_Faust_. Come in then!\ -\ -_Mephistopheles_. That I like to hear.\ -We shall, I hope, bear with each other;\ -For to dispel thy crotchets, brother,\ -As a young lord, I now appear,\ -In scarlet dress, trimmed with gold lacing,\ -A stiff silk cloak with stylish facing,\ -A tall cock's feather in my hat,\ -A long, sharp rapier to defend me,\ -And I advise thee, short and flat,\ -In the same costume to attend me;\ -If thou wouldst, unembarrassed, see\ -What sort of thing this life may be.\ -\ -_Faust_. In every dress I well may feel the sore\ -Of this low earth-life's melancholy.\ -I am too old to live for folly,\ -Too young, to wish for nothing more.\ -Am I content with all creation?\ -Renounce! renounce! Renunciation--\ -Such is the everlasting song\ -That in the ears of all men rings,\ -Which every hour, our whole life long,\ -With brazen accents hoarsely sings.\ -With terror I behold each morning's light,\ -With bitter tears my eyes are filling,\ -To see the day that shall not in its flight\ -Fulfil for me one wish, not one, but killing\ -Every presentiment of zest\ -With wayward skepticism, chases\ -The fair creations from my breast\ -With all life's thousand cold grimaces.\ -And when at night I stretch me on my bed\ -And darkness spreads its shadow o'er me;\ -No rest comes then anigh my weary head,\ -Wild dreams and spectres dance before me.\ -The God who dwells within my soul\ -Can heave its depths at any hour;\ -Who holds o'er all my faculties control\ -Has o'er the outer world no power;\ -Existence lies a load upon my breast,\ -Life is a curse and death a long'd-for rest.\ -\ -_Mephistopheles_. And yet death never proves a wholly welcome guest.\ -\ -_Faust_. O blest! for whom, when victory's joy fire blazes,\ -Death round his brow the bloody laurel windeth,\ -Whom, weary with the dance's mazes,\ -He on a maiden's bosom findeth.\ -O that, beneath the exalted spirit's power,\ -I had expired, in rapture sinking!\ -\ -_Mephistopheles_. And yet I knew one, in a midnight hour,\ -Who a brown liquid shrank from drinking.\ -\ -_Faust_. Eaves-dropping seems a favorite game with thee.\ -\ -_Mephistopheles_. Omniscient am I not; yet much is known to me.\ -\ -_Faust_. Since that sweet tone, with fond appealing,\ -Drew me from witchcraft's horrid maze,\ -And woke the lingering childlike feeling\ -With harmonies of happier days;\ -My curse on all the mock-creations\ -That weave their spell around the soul,\ -And bind it with their incantations\ -And orgies to this wretched hole!\ -Accursed be the high opinion\ -Hugged by the self-exalting mind!\ -Accursed all the dream-dominion\ -That makes the dazzled senses blind!\ -Curs'd be each vision that befools us,\ -Of fame, outlasting earthly life!\ -Curs'd all that, as possession, rules us,\ -As house and barn, as child and wife!\ -Accurs'd be mammon, when with treasure\ -He fires our hearts for deeds of might,\ -When, for a dream of idle pleasure,\ -He makes our pillow smooth and light!\ -Curs'd be the grape-vine's balsam-juices!\ -On love's high grace my curses fall!\ -On faith! On hope that man seduces,\ -On patience last, not least, of all!\ -\ -_Choir of spirits_. [_Invisible_.] Woe! Woe!\ - Thou hast ground it to dust,\ - The beautiful world,\ - With mighty fist;\ - To ruins 'tis hurled;\ - A demi-god's blow hath done it!\ - A moment we look upon it,\ - Then carry (sad duty!)\ - The fragments over into nothingness,\ - With tears unavailing\ - Bewailing\ - All the departed beauty.\ - Lordlier\ - Than all sons of men,\ - Proudlier\ - Build it again,\ - Build it up in thy breast anew!\ - A fresh career pursue,\ - Before thee\ - A clearer view,\ - And, from the Empyréan,\ - A new-born Paean\ - Shall greet thee, too!\ -\ -_Mephistopheles_. Be pleased to admire\ - My juvenile choir!\ - Hear how they counsel in manly measure\ - Action and pleasure!\ - Out into life,\ - Its joy and strife,\ - Away from this lonely hole,\ - Where senses and soul\ - Rot in stagnation,\ - Calls thee their high invitation.\ -\ -Give over toying with thy sorrow\ -Which like a vulture feeds upon thy heart;\ -Thou shalt, in the worst company, to-morrow\ -Feel that with men a man thou art.\ -Yet I do not exactly intend\ -Among the canaille to plant thee.\ -I'm none of your magnates, I grant thee;\ -Yet if thou art willing, my friend,\ -Through life to jog on beside me,\ -Thy pleasure in all things shall guide me,\ -To thee will I bind me,\ -A friend thou shalt find me,\ -And, e'en to the grave,\ -Shalt make me thy servant, make me thy slave!\ -\ -_Faust_. And in return what service shall I render?\ -\ -_Mephistopheles_. There's ample grace--no hurry, not the least.\ -\ -_Faust_. No, no, the devil is an egotist,\ -And does not easily \"for God's sake\" tender\ -That which a neighbor may assist.\ -Speak plainly the conditions, come!\ -'Tis dangerous taking such a servant home.\ -\ -_Mephistopheles_. I to thy service _here_ agree to bind me,\ -To run and never rest at call of thee;\ -When _over yonder_ thou shalt find me,\ -Then thou shalt do as much for me.\ -\ -_Faust_. I care not much what's over yonder:\ -When thou hast knocked this world asunder,\ -Come if it will the other may!\ -Up from this earth my pleasures all are streaming,\ -Down on my woes this earthly sun is beaming;\ -Let me but end this fit of dreaming,\ -Then come what will, I've nought to say.\ -I'll hear no more of barren wonder\ -If in that world they hate and love,\ -And whether in that future yonder\ -There's a Below and an Above.\ -\ -_Mephistopheles._ In such a mood thou well mayst venture.\ -Bind thyself to me, and by this indenture\ -Thou shalt enjoy with relish keen\ -Fruits of my arts that man had never seen.\ -\ -_Faust_. And what hast thou to give, poor devil?\ -Was e'er a human mind, upon its lofty level,\ -Conceived of by the like of thee?\ -Yet hast thou food that brings satiety,\ -Not satisfaction; gold that reftlessly,\ -Like quicksilver, melts down within\ -The hands; a game in which men never win;\ -A maid that, hanging on my breast,\ -Ogles a neighbor with her wanton glances;\ -Of fame the glorious godlike zest,\ -That like a short-lived meteor dances--\ -Show me the fruit that, ere it's plucked, will rot,\ -And trees from which new green is daily peeping!\ -\ -_Mephistopheles_. Such a requirement scares me not;\ -Such treasures have I in my keeping.\ -Yet shall there also come a time, good friend,\ -When we may feast on good things at our leisure.\ -\ -_Faust_. If e'er I lie content upon a lounge of pleasure--\ -Then let there be of me an end!\ -When thou with flattery canst cajole me,\ -Till I self-satisfied shall be,\ -When thou with pleasure canst befool me,\ -Be that the last of days for me!\ -I lay the wager!\ -\ -_Mephistopheles_. Done!\ -\ -_Faust_. And heartily!\ -Whenever to the passing hour\ -I cry: O stay! thou art so fair!\ -To chain me down I give thee power\ -To the black bottom of despair!\ -Then let my knell no longer linger,\ -Then from my service thou art free,\ -Fall from the clock the index-finger,\ -Be time all over, then, for me!\ -\ -_Mephistopheles_. Think well, for we shall hold you to the letter.\ -\ -_Faust_. Full right to that just now I gave;\ -I spoke not as an idle braggart better.\ -Henceforward I remain a slave,\ -What care I who puts on the setter?\ -\ -_Mephistopheles_. I shall this very day, at Doctor's-feast,[16]\ -My bounden service duly pay thee.\ -But one thing!--For insurance' sake, I pray thee,\ -Grant me a line or two, at least.\ -\ -_Faust_. Pedant! will writing gain thy faith, alone?\ -In all thy life, no man, nor man's word hast thou known?\ -Is't not enough that I the fatal word\ -That passes on my future days have spoken?\ -The world-stream raves and rushes (hast not heard?)\ -And shall a promise hold, unbroken?\ -Yet this delusion haunts the human breast,\ -Who from his soul its roots would sever?\ -Thrice happy in whose heart pure truth finds rest.\ -No sacrifice shall he repent of ever!\ -But from a formal, written, sealed attest,\ -As from a spectre, all men shrink forever.\ -The word and spirit die together,\ -Killed by the sight of wax and leather.\ -What wilt thou, evil sprite, from me?\ -Brass, marble, parchment, paper, shall it be?\ -Shall I subscribe with pencil, pen or graver?\ -Among them all thy choice is free.\ -\ -_Mephistopheles_. This rhetoric of thine to me\ -Hath a somewhat bombastic savor.\ -Any small scrap of paper's good.\ -Thy signature will need a single drop of blood.[17]\ -\ -_Faust_. If this will satisfy thy mood,\ -I will consent thy whim to favor.\ -\ -_Mephistopheles._ Quite a peculiar juice is blood.\ -\ -_Faust_. Fear not that I shall break this bond; O, never!\ -My promise, rightly understood,\ -Fulfils my nature's whole endeavor.\ -I've puffed myself too high, I see;\ -To _thy_ rank only I belong.\ -The Lord of Spirits scorneth me,\ -Nature, shut up, resents the wrong.\ -The thread of thought is snapt asunder,\ -All science to me is a stupid blunder.\ -Let us in sensuality's deep\ -Quench the passions within us blazing!\ -And, the veil of sorcery raising,\ -Wake each miracle from its long sleep!\ -Plunge we into the billowy dance,\ -The rush and roll of time and chance!\ -Then may pleasure and distress,\ -Disappointment and success,\ -Follow each other as fast as they will;\ -Man's restless activity flourishes still.\ -\ -_Mephistopheles_. No bound or goal is set to you;\ -Where'er you like to wander sipping,\ -And catch a tit-bit in your skipping,\ -Eschew all coyness, just fall to,\ -And may you find a good digestion!\ -\ -_Faust_. Now, once for all, pleasure is not the question.\ -I'm sworn to passion's whirl, the agony of bliss,\ -The lover's hate, the sweets of bitterness.\ -My heart, no more by pride of science driven,\ -Shall open wide to let each sorrow enter,\ -And all the good that to man's race is given,\ -I will enjoy it to my being's centre,\ -Through life's whole range, upward and downward sweeping,\ -Their weal and woe upon my bosom heaping,\ -Thus in my single self their selves all comprehending\ -And with them in a common shipwreck ending.\ -\ -_Mephistopheles_. O trust me, who since first I fell from heaven,\ -Have chewed this tough meat many a thousand year,\ -No man digests the ancient leaven,\ -No mortal, from the cradle to the bier.\ -Trust one of _us_--the _whole_ creation\ -To God alone belongs by right;\ -_He_ has in endless day his habitation,\ -_Us_ He hath made for utter night,\ -_You_ for alternate dark and light.\ -\ -_Faust_. But then I _will!\ -\ -_Mephistopheles_. Now that's worth hearing!\ -But one thing haunts me, the old song,\ -That time is short and art is long.\ -You need some slight advice, I'm fearing.\ -Take to you one of the poet-feather,\ -Let the gentleman's thought, far-sweeping,\ -Bring all the noblest traits together,\ -On your one crown their honors heaping,\ -The lion's mood\ -The stag's rapidity,\ -The fiery blood of Italy,\ -The Northman's hardihood.\ -Bid him teach thee the art of combining\ -Greatness of soul with fly designing,\ -And how, with warm and youthful passion,\ -To fall in love by plan and fashion.\ -Should like, myself, to come across 'm,\ -Would name him Mr. Microcosm.\ -\ -_Faust_. What am I then? if that for which my heart\ -Yearns with invincible endeavor,\ -The crown of man, must hang unreached forever?\ -\ -_Mephistopheles_. Thou art at last--just what thou art.\ -Pile perukes on thy head whose curls cannot be counted,\ -On yard-high buskins let thy feet be mounted,\ -Still thou art only what thou art.\ -\ -_Faust_. Yes, I have vainly, let me not deny it,\ -Of human learning ransacked all the stores,\ -And when, at last, I set me down in quiet,\ -There gushes up within no new-born force;\ -I am not by a hair's-breadth higher,\ -Am to the Infinite no nigher.\ -\ -_Mephistopheles_. My worthy sir, you see the matter\ -As people generally see;\ -But we must learn to take things better,\ -Before life pleasures wholly flee.\ -The deuce! thy head and all that's in it,\ -Hands, feet and ------ are thine;\ -What I enjoy with zest each minute,\ -Is surely not the less mine?\ -If I've six horses in my span,\ -Is it not mine, their every power?\ -I fly along as an undoubted man,\ -On four and twenty legs the road I scour.\ -Cheer up, then! let all thinking be,\ -And out into the world with me!\ -I tell thee, friend, a speculating churl\ -Is like a beast, some evil spirit chases\ -Along a barren heath in one perpetual whirl,\ -While round about lie fair, green pasturing places.\ -\ -_Faust_. But how shall we begin?\ -\ -_Mephistopheles_. We sally forth e'en now.\ -What martyrdom endurest thou!\ -What kind of life is this to be living,\ -Ennui to thyself and youngsters giving?\ -Let Neighbor Belly that way go!\ -To stay here threshing straw why car'st thou?\ -The best that thou canst think and know\ -To tell the boys not for the whole world dar'st thou.\ -E'en now I hear one in the entry.\ -\ -_Faust_. I have no heart the youth to see.\ -\ -_Mephistopheles_. The poor boy waits there like a sentry,\ -He shall not want a word from me.\ -Come, give me, now, thy robe and bonnet;\ -This mask will suit me charmingly.\ - [_He puts them on_.]\ -Now for my wit--rely upon it!\ -'Twill take but fifteen minutes, I am sure.\ -Meanwhile prepare thyself to make the pleasant tour!\ -\ - [_Exit_ FAUST.]\ -\ -_Mephistopheles [in_ FAUST'S _long gown_].\ -Only despise all human wit and lore,\ -The highest flights that thought can soar--\ -Let but the lying spirit blind thee,\ -And with his spells of witchcraft bind thee,\ -Into my snare the victim creeps.--\ -To him has destiny a spirit given,\ -That unrestrainedly still onward sweeps,\ -To scale the skies long since hath striven,\ -And all earth's pleasures overleaps.\ -He shall through life's wild scenes be driven,\ -And through its flat unmeaningness,\ -I'll make him writhe and stare and stiffen,\ -And midst all sensual excess,\ -His fevered lips, with thirst all parched and riven,\ -Insatiably shall haunt refreshment's brink;\ -And had he not, himself, his soul to Satan given,\ -Still must he to perdition sink!\ -\ - [_Enter_ A SCHOLAR.]\ -\ -_Scholar_. I have but lately left my home,\ -And with profound submission come,\ -To hold with one some conversation\ -Whom all men name with veneration.\ -\ -_Mephistopheles._ Your courtesy greatly flatters me\ -A man like many another you see.\ -Have you made any applications elsewhere?\ -\ -_Scholar_. Let me, I pray, your teachings share!\ -With all good dispositions I come,\ -A fresh young blood and money some;\ -My mother would hardly hear of my going;\ -But I long to learn here something worth knowing.\ -\ -_Mephistopheles_. You've come to the very place for it, then.\ -\ -_Scholar_. Sincerely, could wish I were off again:\ -My soul already has grown quite weary\ -Of walls and halls, so dark and dreary,\ -The narrowness oppresses me.\ -One sees no green thing, not a tree.\ -On the lecture-seats, I know not what ails me,\ -Sight, hearing, thinking, every thing fails me.\ -\ -_Mephistopheles_. 'Tis all in use, we daily see.\ -The child takes not the mother's breast\ -In the first instance willingly,\ -But soon it feeds itself with zest.\ -So you at wisdom's breast your pleasure\ -Will daily find in growing measure.\ -\ -_Scholar_. I'll hang upon her neck, a raptured wooer,\ -But only tell me, who shall lead me to her?\ -\ -_Mephistopheles_. Ere you go further, give your views\ -As to which faculty you choose?\ -\ -_Scholar_. To be right learn'd I've long desired,\ -And of the natural world aspired\ -To have a perfect comprehension\ -In this and in the heavenly sphere.\ -\ -_Mephistopheles_. I see you're on the right track here;\ -But you'll have to give undivided attention.\ -\ -_Scholar_. My heart and soul in the work'll be found;\ -Only, of course, it would give me pleasure,\ -When summer holidays come round,\ -To have for amusement a little leisure.\ -\ -_Mephistopheles_. Use well the precious time, it flips away so,\ -Yet method gains you time, if I may say so.\ -I counsel you therefore, my worthy friend,\ -The logical leisures first to attend.\ -Then is your mind well trained and cased\ -In Spanish boots,[18] all snugly laced,\ -So that henceforth it can creep ahead\ -On the road of thought with a cautious tread.\ -And not at random shoot and strike,\ -Zig-zagging Jack-o'-lanthorn-like.\ -Then will you many a day be taught\ -That what you once to do had thought\ -Like eating and drinking, extempore,\ -Requires the rule of one, two, three.\ -It is, to be sure, with the fabric of thought,\ -As with the _chef d'œuvre_ by weavers wrought,\ -Where a thousand threads one treadle plies,\ -Backward and forward the shuttles keep going,\ -Invisibly the threads keep flowing,\ -One stroke a thousand fastenings ties:\ -Comes the philosopher and cries:\ -I'll show you, it could not be otherwise:\ -The first being so, the second so,\ -The third and fourth must of course be so;\ -And were not the first and second, you see,\ -The third and fourth could never be.\ -The scholars everywhere call this clever,\ -But none have yet become weavers ever.\ -Whoever will know a live thing and expound it,\ -First kills out the spirit it had when he found it,\ -And then the parts are all in his hand,\ -Minus only the spiritual band!\ -Encheiresin naturæ's[19] the chemical name,\ -By which dunces themselves unwittingly shame.\ -\ -_Scholar_. Cannot entirely comprehend you.\ -\ -_Mephistopheles_. Better success will shortly attend you,\ -When you learn to analyze all creation\ -And give it a proper classification.\ -\ -_Scholar_. I feel as confused by all you've said,\ -As if 'twere a mill-wheel going round in my head!\ -\ -_Mephistopheles_. The next thing most important to mention,\ -Metaphysics will claim your attention!\ -There see that you can clearly explain\ -What fits not into the human brain:\ -For that which will not go into the head,\ -A pompous word will stand you in stead.\ -But, this half-year, at least, observe\ -From regularity never to swerve.\ -You'll have five lectures every day;\ -Be in at the stroke of the bell I pray!\ -And well prepared in every part;\ -Study each paragraph by heart,\ -So that you scarce may need to look\ -To see that he says no more than's in the book;\ -And when he dictates, be at your post,\ -As if you wrote for the Holy Ghost!\ -\ -_Scholar_. That caution is unnecessary!\ -I know it profits one to write,\ -For what one has in black and white,\ -He to his home can safely carry.\ -\ -_Mephistopheles_. But choose some faculty, I pray!\ -\ -_Scholar_. I feel a strong dislike to try the legal college.\ -\ -_Mephistopheles_. I cannot blame you much, I must acknowledge.\ -I know how this profession stands to-day.\ -Statutes and laws through all the ages\ -Like a transmitted malady you trace;\ -In every generation still it rages\ -And softly creeps from place to place.\ -Reason is nonsense, right an impudent suggestion;\ -Alas for thee, that thou a grandson art!\ -Of inborn law in which each man has part,\ -Of that, unfortunately, there's no question.\ -\ -_Scholar_. My loathing grows beneath your speech.\ -O happy he whom you shall teach!\ -To try theology I'm almost minded.\ -\ -_Mephistopheles_. I must not let you by zeal be blinded.\ -This is a science through whose field\ -Nine out of ten in the wrong road will blunder,\ -And in it so much poison lies concealed,\ -That mould you this mistake for physic, no great wonder.\ -Here also it were best, if only one you heard\ -And swore to that one master's word.\ -Upon the whole--words only heed you!\ -These through the temple door will lead you\ -Safe to the shrine of certainty.\ -\ -_Scholar_. Yet in the word a thought must surely be.\ -\ -_Mephistopheles_. All right! But one must not perplex himself about it;\ -For just where one must go without it,\ -The word comes in, a friend in need, to thee.\ -With words can one dispute most featly,\ -With words build up a system neatly,\ -In words thy faith may stand unshaken,\ -From words there can be no iota taken.\ -\ -_Scholar_. Forgive my keeping you with many questions,\ -Yet must I trouble you once more,\ -Will you not give me, on the score\ -Of medicine, some brief suggestions?\ -Three years are a short time, O God!\ -And then the field is quite too broad.\ -If one had only before his nose\ -Something else as a hint to follow!--\ -\ -_Mephistopheles_ [_aside_]. I'm heartily tired of this dry prose,\ -Must play the devil again out hollow.\ - [_Aloud_.]\ -The healing art is quickly comprehended;\ -Through great and little world you look abroad,\ -And let it wag, when all is ended,\ -As pleases God.\ -Vain is it that your science sweeps the skies,\ -Each, after all, learns only what he can;\ -Who grasps the moment as it flies\ -He is the real man.\ -Your person somewhat takes the eye,\ -Boldness you'll find an easy science,\ -And if you on yourself rely,\ -Others on you will place reliance.\ -In the women's good graces seek first to be seated;\ -Their oh's and ah's, well known of old,\ -So thousand-fold,\ -Are all from a single point to be treated;\ -Be decently modest and then with ease\ -You may get the blind side of them when you please.\ -A title, first, their confidence must waken,\ -That _your_ art many another art transcends,\ -Then may you, lucky man, on all those trifles reckon\ -For which another years of groping spends:\ -Know how to press the little pulse that dances,\ -And fearlessly, with sly and fiery glances,\ -Clasp the dear creatures round the waist\ -To see how tightly they are laced.\ -\ -_Scholar_. This promises! One loves the How and Where to see!\ -\ -_Mephistopheles_. Gray, worthy friend, is all your theory\ -And green the golden tree of life.\ -\ -_Scholar_. I seem,\ -I swear to you, like one who walks in dream.\ -Might I another time, without encroaching,\ -Hear you the deepest things of wisdom broaching?\ -\ -_Mephistopheles_. So far as I have power, you may.\ -\ -_Scholar_. I cannot tear myself away,\ -Till I to you my album have presented.\ -Grant me one line and I'm contented!\ -\ -_Mephistopheles_. With pleasure.\ - [_Writes and returns it_.]\ -\ -_Scholar [reads]._ Eritis sicut Deus, scientes bonum et malum.\ - [_Shuts it reverently, and bows himself out_.]\ -\ -_Mephistopheles_.\ -Let but the brave old saw and my aunt, the serpent, guide thee,\ -And, with thy likeness to God, shall woe one day betide thee!\ -\ -_Faust [enters_]. Which way now shall we go?\ -\ -_Mephistopheles_. Which way it pleases thee.\ -The little world and then the great we see.\ -O with what gain, as well as pleasure,\ -Wilt thou the rollicking cursus measure!\ -\ -_Faust_. I fear the easy life and free\ -With my long beard will scarce agree.\ -'Tis vain for me to think of succeeding,\ -I never could learn what is called good-breeding.\ -In the presence of others I feel so small;\ -I never can be at my ease at all.\ -\ -_Mephistopheles_. Dear friend, vain trouble to yourself you're giving;\ -Whence once you trust yourself, you know the art of living.\ -\ -_Faust_. But how are we to start, I pray?\ -Where are thy servants, coach and horses?\ -\ -_Mephistopheles_. We spread the mantle, and away\ -It bears us on our airy courses.\ -But, on this bold excursion, thou\ -Must take no great portmanteau now.\ -A little oxygen, which I will soon make ready,\ -From earth uplifts us, quick and steady.\ -And if we're light, we'll soon surmount the sphere;\ -I give thee hearty joy in this thy new career.\ -\ -\ -\ -\ - AUERBACH'S CELLAR IN LEIPSIC.[20]\ -\ - _Carousal of Jolly Companions_.\ -\ -\ -_Frosch_.[21] Will nobody drink? Stop those grimaces!\ -I'll teach you how to be cutting your faces!\ -Laugh out! You're like wet straw to-day,\ -And blaze, at other times, like dry hay.\ -\ -_Brander_. 'Tis all your fault; no food for fun you bring,\ -Not a nonsensical nor nasty thing.\ -\ -_Frosch [dashes a glass of wine over his bead_]. There you have both!\ -\ -_Brander_. You hog twice o'er!\ -\ -_Frosch_. You wanted it, what would you more?\ -\ -_Siebel_ Out of the door with them that brawl!\ -Strike up a round; swill, shout there, one and all!\ -Wake up! Hurra!\ -\ -_Altmayer_. Woe's me, I'm lost! Bring cotton!\ -The rascal splits my ear-drum.\ -\ -_Siebel_. Only shout on!\ -When all the arches ring and yell,\ -Then does the base make felt its true ground-swell.\ -\ -_Frosch_. That's right, just throw him out, who undertakes to fret!\ -A! tara! lara da!\ -\ -_Altmayer_. A! tara! lara da!\ -\ -_Frosch_. Our whistles all are wet.\ - [_Sings_.]\ - The dear old holy Romish realm,\ - What holds it still together?\ -\ -_Brander_. A sorry song! Fie! a political song!\ -A tiresome song! Thank God each morning therefor,\ -That you have not the Romish realm to care for!\ -At least I count it a great gain that He\ -Kaiser nor chancellor has made of me.\ -E'en we can't do without a head, however;\ -To choose a pope let us endeavour.\ -You know what qualification throws\ -The casting vote and the true man shows.\ -\ -_Frosch [sings_].\ - Lady Nightingale, upward soar,\ - Greet me my darling ten thousand times o'er.\ -\ -_Siebel_. No greetings to that girl! Who does so, I resent it!\ -\ -_Frosch_. A greeting and a kiss! And you will not prevent it!\ - [_Sings.]_\ - Draw the bolts! the night is clear.\ - Draw the bolts! Love watches near.\ - Close the bolts! the dawn is here.\ -\ -_Siebel_. Ay, sing away and praise and glorify your dear!\ -Soon I shall have my time for laughter.\ -The jade has jilted me, and will you too hereafter;\ -May Kobold, for a lover, be her luck!\ -At night may he upon the cross-way meet her;\ -Or, coming from the Blocksberg, some old buck\ -May, as he gallops by, a good-night bleat her!\ -A fellow fine of real flesh and blood\ -Is for the wench a deal too good.\ -She'll get from me but one love-token,\ -That is to have her window broken!\ -\ -_Brander [striking on the table_]. Attend! attend! To me give ear!\ -I know what's life, ye gents, confess it:\ -We've lovesick people sitting near,\ -And it is proper they should hear\ -A good-night strain as well as I can dress it.\ -Give heed! And hear a bran-new song!\ -Join in the chorus loud and strong!\ - [_He sings_.]\ - A rat in the cellar had built his nest,\ - He daily grew sleeker and smoother,\ - He lined his paunch from larder and chest,\ - And was portly as Doctor Luther.\ - The cook had set him poison one day;\ - From that time forward he pined away\ - As if he had love in his body.\ -\ -_Chorus [flouting_]. As if he had love in his body.\ -\ -_Brander_. He raced about with a terrible touse,\ - From all the puddles went swilling,\ - He gnawed and he scratched all over the house,\ - His pain there was no stilling;\ - He made full many a jump of distress,\ - And soon the poor beast got enough, I guess,\ - As if he had love in his body.\ -\ -_Chorus_. As if he had love in his body.\ -\ -_Brander_. With pain he ran, in open day,\ - Right up into the kitchen;\ - He fell on the hearth and there he lay\ - Gasping and moaning and twitchin'.\ - Then laughed the poisoner: \"He! he! he!\ - He's piping on the last hole,\" said she,\ - \"As if he had love in his body.\"\ -\ -_Chorus_. As if he had love in his body.\ -\ -_Siebel_. Just hear now how the ninnies giggle!\ -That's what I call a genuine art,\ -To make poor rats with poison wriggle!\ -\ -_Brander_. You take their case so much to heart?\ -\ -_Altmayer_. The bald pate and the butter-belly!\ -The sad tale makes him mild and tame;\ -He sees in the swollen rat, poor fellow!\ -His own true likeness set in a frame.\ -\ -\ - FAUST _and_ MEPHISTOPHELES.\ -\ -_Mephistopheles_. Now, first of all, 'tis necessary\ -To show you people making merry,\ -That you may see how lightly life can run.\ -Each day to this small folk's a feast of fun;\ -Not over-witty, self-contented,\ -Still round and round in circle-dance they whirl,\ -As with their tails young kittens twirl.\ -If with no headache they're tormented,\ -Nor dunned by landlord for his pay,\ -They're careless, unconcerned, and gay.\ -\ -_Brander_. They're fresh from travel, one might know it,\ -Their air and manner plainly show it;\ -They came here not an hour ago.\ -\ -_Frosch_. Thou verily art right! My Leipsic well I know!\ -Paris in small it is, and cultivates its people.\ -\ -_Siebel_. What do the strangers seem to thee?\ -\ -_Frosch_. Just let me go! When wine our friendship mellows,\ -Easy as drawing a child's tooth 'twill be\ -To worm their secrets out of these two fellows.\ -They're of a noble house, I dare to swear,\ -They have a proud and discontented air.\ -\ -_Brander_. They're mountebanks, I'll bet a dollar!\ -\ -_Altmayer_. Perhaps.\ -\ -_Frosch_. I'll smoke them, mark you that!\ -\ -_Mephistopheles_ [_to Faust_]. These people never smell the old rat,\ -E'en when he has them by the collar.\ -\ -_Faust_. Fair greeting to you, sirs!\ -\ -_Siebel_. The same, and thanks to boot.\ - [_In a low tone, faking a side look at MEPHISTOPHELES_.]\ -Why has the churl one halting foot?\ -\ -_Mephistopheles_. With your permission, shall we make one party?\ -Instead of a good drink, which get here no one can,\ -Good company must make us hearty.\ -\ -_Altmayer_. You seem a very fastidious man.\ -\ -_Frosch_. I think you spent some time at Rippach[22] lately?\ -You supped with Mister Hans not long since, I dare say?\ -\ -_Mephistopheles_. We passed him on the road today!\ -Fine man! it grieved us parting with him, greatly.\ -He'd much to say to us about his cousins,\ -And sent to each, through us, his compliments by dozens.\ - [_He bows to_ FROSCH.]\ -\ -_Altmayer_ [_softly_]. You've got it there! he takes!\ -\ -_Siebel_. The chap don't want for wit!\ -\ -_Frosch_. I'll have him next time, wait a bit!\ -\ -_Mephistopheles_. If I mistook not, didn't we hear\ -Some well-trained voices chorus singing?\ -'Faith, music must sound finely here.\ -From all these echoing arches ringing!\ -\ -_Frosch_. You are perhaps a connoisseur?\ -\ -_Mephistopheles_. O no! my powers are small, I'm but an amateur.\ -\ -_Altmayer_. Give us a song!\ -\ -_Mephistopheles_. As many's you desire.\ -\ -_Siebel_. But let it be a bran-new strain!\ -\ -_Mephistopheles_. No fear of that! We've just come back from Spain,\ -The lovely land of wine and song and lyre.\ - [_Sings_.]\ - There was a king, right stately,\ - Who had a great, big flea,--\ -\ -_Frosch_. Hear him! A flea! D'ye take there, boys? A flea!\ -I call that genteel company.\ -\ -_Mephistopheles_ [_resumes_]. There was a king, right stately,\ - Who had a great, big flea,\ - And loved him very greatly,\ - As if his own son were he.\ - He called the knight of stitches;\ - The tailor came straightway:\ - Ho! measure the youngster for breeches,\ - And make him a coat to-day!\ -\ -_Brander_. But don't forget to charge the knight of stitches,\ -The measure carefully to take,\ -And, as he loves his precious neck,\ -To leave no wrinkles in the breeches.\ -\ -_Mephistopheles_. In silk and velvet splendid\ - The creature now was drest,\ - To his coat were ribbons appended,\ - A cross was on his breast.\ - He had a great star on his collar,\ - Was a minister, in short;\ - And his relatives, greater and smaller,\ - Became great people at court.\ -\ - The lords and ladies of honor\ - Fared worse than if they were hung,\ - The queen, she got them upon her,\ - And all were bitten and stung,\ - And did not dare to attack them,\ - Nor scratch, but let them stick.\ - We choke them and we crack them\ - The moment we feel one prick.\ -\ -_Chorus_ [_loud_]. We choke 'em and we crack 'em\ -The moment we feel one prick.\ -\ -_Frosch_. Bravo! Bravo! That was fine!\ -\ -_Siebel_. So shall each flea his life resign!\ -\ -_Brander_. Point your fingers and nip them fine!\ -\ -_Altmayer_. Hurra for Liberty! Hurra for Wine!\ -\ -_Mephistopheles_. I'd pledge the goddess, too, to show how high I set her,\ -Right gladly, if your wines were just a trifle better.\ -\ -_Siebel_. Don't say that thing again, you fretter!\ -\ -_Mephistopheles_. Did I not fear the landlord to affront;\ -I'd show these worthy guests this minute\ -What kind of stuff our stock has in it.\ -\ -_Siebel_. Just bring it on! I'll bear the brunt.\ -\ -_Frosch_. Give us a brimming glass, our praise shall then be ample,\ -But don't dole out too small a sample;\ -For if I'm to judge and criticize,\ -I need a good mouthful to make me wise.\ -\ -_Altmayer_ [_softly_]. They're from the Rhine, as near as I can make it.\ -\ -_Mephistopheles_. Bring us a gimlet here!\ -\ -_Brander_. What shall be done with that?\ -You've not the casks before the door, I take it?\ -\ -_Altmayer_. The landlord's tool-chest there is easily got at.\ -\ -_Mephistopheles_ [_takes the gimlet_] (_to Frosch_).\ -What will you have? It costs but speaking.\ -\ -_Frosch_. How do you mean? Have you so many kinds?\ -\ -_Mephistopheles_. Enough to suit all sorts of minds.\ -\ -_Altmayer_. Aha! old sot, your lips already licking!\ -\ -_Frosch_. Well, then! if I must choose, let Rhine-wine fill my beaker,\ -Our fatherland supplies the noblest liquor.\ -\ - MEPHISTOPHELES\ - [_boring a hole in the rim of the table near the place\ - where_ FROSCH _sits_].\ -Get us a little wax right off to make the stoppers!\ -\ -_Altmayer_. Ah, these are jugglers' tricks, and whappers!\ -\ -_Mephistopheles_ [_to Brander_]. And you?\ -\ -_Brander_. Champaigne's the wine for me,\ -But then right sparkling it must be!\ -\ - [MEPHISTOPHELES _bores; meanwhile one of them has made\ - the wax-stoppers and stopped the holes_.]\ -\ -_Brander_. Hankerings for foreign things will sometimes haunt you,\ -The good so far one often finds;\ -Your real German man can't bear the French, I grant you,\ -And yet will gladly drink their wines.\ -\ -_Siebel_ [_while Mephistopheles approaches his seat_].\ -I don't like sour, it sets my mouth awry,\ -Let mine have real sweetness in it!\ -\ -_Mephistopheles_ [_bores_]. Well, you shall have Tokay this minute.\ -\ -_Altmayer_. No, sirs, just look me in the eye!\ -I see through this, 'tis what the chaps call smoking.\ -\ -_Mephistopheles_. Come now! That would be serious joking,\ -To make so free with worthy men.\ -But quickly now! Speak out again!\ -With what description can I serve you?\ -\ -_Altmayer_. Wait not to ask; with any, then.\ -\ - [_After all the holes are bored and stopped_.]\ -\ -_Mephistopheles_ [_with singular gestures_].\ -From the vine-stock grapes we pluck;\ -Horns grow on the buck;\ -Wine is juicy, the wooden table,\ -Like wooden vines, to give wine is able.\ -An eye for nature's depths receive!\ -Here is a miracle, only believe!\ -Now draw the plugs and drink your fill!\ -\ - ALL\ - [_drawing the stoppers, and catching each in his glass\ - the wine he had desired_].\ -Sweet spring, that yields us what we will!\ -\ -_Mephistopheles_. Only be careful not a drop to spill!\ - [_They drink repeatedly_.]\ -\ -_All_ [_sing_]. We're happy all as cannibals,\ - Five hundred hogs together.\ -\ -_Mephistopheles_. Look at them now, they're happy as can be!\ -\ -_Faust_. To go would suit my inclination.\ -\ -_Mephistopheles_. But first give heed, their bestiality\ -Will make a glorious demonstration.\ -\ - SIEBEL\ - [_drinks carelessly; the wine is spilt upon the ground\ - and turns to flame_].\ -Help! fire! Ho! Help! The flames of hell!\ -\ -_Mephistopheles [_conjuring the flame_].\ -Peace, friendly element, be still!\ - [_To the Toper_.]\ -This time 'twas but a drop of fire from purgatory.\ -\ -_Siebel_. What does this mean? Wait there, or you'll be sorry!\ -It seems you do not know us well.\ -\ -_Frosch_. Not twice, in this way, will it do to joke us!\ -\ -_Altmayer_. I vote, we give him leave himself here _scarce_ to make.\ -\ -_Siebel_. What, sir! How dare you undertake\ -To carry on here your old hocus-pocus?\ -\ -_Mephistopheles_. Be still, old wine-cask!\ -\ -_Siebel_. Broomstick, you!\ -Insult to injury add? Confound you!\ -\ -_Brander_. Stop there! Or blows shall rain down round you!\ -\ - ALTMAYER\ - [_draws a stopper out of the table; fire flies at him_].\ -I burn! I burn!\ -\ -_Siebel_. Foul sorcery! Shame!\ -Lay on! the rascal is fair game!\ -\ - [_They draw their knives and rush at_ MEPHISTOPHELES.]\ -\ -_Mephistopheles_ [_with a serious mien_].\ -Word and shape of air!\ -Change place, new meaning wear!\ -Be here--and there!\ -\ - [_They stand astounded and look at each other_.]\ -\ -_Altmayer_. Where am I? What a charming land!\ -\ -_Frosch_. Vine hills! My eyes! Is't true?\ -\ -_Siebel_. And grapes, too, close at hand!\ -\ -_Brander_. Beneath this green see what a stem is growing!\ -See what a bunch of grapes is glowing!\ - [_He seizes_ SIEBEL _by the nose. The rest do the same to each\ - other and raise their knives._]\ -\ -_Mephistopheles_ [_as above_]. Loose, Error, from their eyes the band!\ -How Satan plays his tricks, you need not now be told of.\ - [_He vanishes with_ FAUST, _the companions start back from each\ - other_.]\ -\ -_Siebel_. What ails me?\ -\ -_Altmayer_. How?\ -\ -_Frosch_. Was that thy nose, friend, I had hold of?\ -\ -_Brander_ [_to Siebel_]. And I have thine, too, in my hand!\ -\ -_Altmayer_. O what a shock! through all my limbs 'tis crawling!\ -Get me a chair, be quick, I'm falling!\ -\ -_Frosch_. No, say what was the real case?\ -\ -_Siebel_. O show me where the churl is hiding!\ -Alive he shall not leave the place!\ -\ -_Altmayer_. Out through the cellar-door I saw him riding--\ -Upon a cask--he went full chase.--\ -Heavy as lead my feet are growing.\ -\ - [_Turning towards the table_.]\ -\ -My! If the wine should yet be flowing.\ -\ -_Siebel_. 'Twas all deception and moonshine.\ -\ -_Frosch_. Yet I was sure I did drink wine.\ -\ -_Brander_. But how about the bunches, brother?\ -\ -_Altmayer_. After such miracles, I'll doubt no other!\ -\ -\ -\ -\ - WITCHES' KITCHEN.\ -\ - [_On a low hearth stands a great kettle over the fire. In the smoke,\ -which rises from it, are seen various forms. A female monkey[28] sits by\ -the kettle and skims it, and takes care that it does not run over. The\ -male monkey with the young ones sits close by, warming himself. Walls and\ -ceiling are adorned 'with the most singular witch-household stuff_.]\ -\ -\ - FAUST. MEPHISTOPHELES.\ -\ -_Faust_. Would that this vile witch-business were well over!\ -Dost promise me I shall recover\ -In this hodge-podge of craziness?\ -From an old hag do I advice require?\ -And will this filthy cooked-up mess\ -My youth by thirty years bring nigher?\ -Woe's me, if that's the best you know!\ -Already hope is from my bosom banished.\ -Has not a noble mind found long ago\ -Some balsam to restore a youth that's vanished?\ -\ -_Mephistopheles_. My friend, again thou speakest a wise thought!\ -I know a natural way to make thee young,--none apter!\ -But in another book it must be sought,\ -And is a quite peculiar chapter.\ -\ -_Faust_. I beg to know it.\ -\ -_Mephistopheles_. Well! here's one that needs no pay,\ -No help of physic, nor enchanting.\ -Out to the fields without delay,\ -And take to hacking, digging, planting;\ -Run the same round from day to day,\ -A treadmill-life, contented, leading,\ -With simple fare both mind and body feeding,\ -Live with the beast as beast, nor count it robbery\ -Shouldst thou manure, thyself, the field thou reapest;\ -Follow this course and, trust to me,\ -For eighty years thy youth thou keepest!\ -\ -_Faust_. I am not used to that, I ne'er could bring me to it,\ -To wield the spade, I could not do it.\ -The narrow life befits me not at all.\ -\ -_Mephistopheles_. So must we on the witch, then, call.\ -\ -_Faust_. But why just that old hag? Canst thou\ -Not brew thyself the needful liquor?\ -\ -_Mephistopheles_. That were a pretty pastime now\ -I'd build about a thousand bridges quicker.\ -Science and art alone won't do,\ -The work will call for patience, too;\ -Costs a still spirit years of occupation:\ -Time, only, strengthens the fine fermentation.\ -To tell each thing that forms a part\ -Would sound to thee like wildest fable!\ -The devil indeed has taught the art;\ -To make it not the devil is able.\ - [_Espying the animals_.]\ -See, what a genteel breed we here parade!\ -This is the house-boy! that's the maid!\ - [_To the animals_.]\ -Where's the old lady gone a mousing?\ -\ -_The animals_. Carousing;\ -Out she went\ -By the chimney-vent!\ -\ -_Mephistopheles_. How long does she spend in gadding and storming?\ -\ -_The animals_. While we are giving our paws a warming.\ -\ -_Mephistopheles_ [_to Faust_]. How do you find the dainty creatures?\ -\ -_Faust_. Disgusting as I ever chanced to see!\ -\ -_Mephistopheles_. No! a discourse like this to me,\ -I own, is one of life's most pleasant features;\ - [_To the animals_.]\ -Say, cursed dolls, that sweat, there, toiling!\ -What are you twirling with the spoon?\ -\ -_Animals_. A common beggar-soup we're boiling.\ -\ -_Mephistopheles_. You'll have a run of custom soon.\ -\ - THE HE-MONKEY\ - [_Comes along and fawns on_ MEPHISTOPHELES].\ - O fling up the dice,\ - Make me rich in a trice,\ - Turn fortune's wheel over!\ - My lot is right bad,\ - If money I had,\ - My wits would recover.\ -\ -_Mephistopheles_. The monkey'd be as merry as a cricket,\ -Would somebody give him a lottery-ticket!\ -\ - [_Meanwhile the young monkeys have been playing with a great\ - ball, which they roll backward and forward_.]\ -\ -_The monkey_. 'The world's the ball;\ - See't rise and fall,\ - Its roll you follow;\ - Like glass it rings:\ - Both, brittle things!\ - Within 'tis hollow.\ - There it shines clear,\ - And brighter here,--\ - I live--by 'Pollo!--\ - Dear son, I pray,\ - Keep hands away!\ - _Thou_ shalt fall so!\ - 'Tis made of clay,\ - Pots are, also.\ -\ -_Mephistopheles_. What means the sieve?\ -\ -_The monkey [takes it down_]. Wert thou a thief,\ - 'Twould show the thief and shame him.\ - [_Runs to his mate and makes her look through_.]\ - Look through the sieve!\ - Discern'st thou the thief,\ - And darest not name him?\ -\ -_Mephistopheles [approaching the fire_]. And what's this pot?\ -\ -_The monkeys_. The dunce! I'll be shot!\ - He knows not the pot,\ - He knows not the kettle!\ -\ -_Mephistopheles_. Impertinence! Hush!\ -\ -_The monkey_. Here, take you the brush,\ - And sit on the settle!\ - [_He forces_ MEPHISTOPHELES _to sit down_.]\ -\ - FAUST\ - [_who all this time has been standing before a looking-glass,\ - now approaching and now receding from it_].\ -\ -What do I see? What heavenly face\ -Doth, in this magic glass, enchant me!\ -O love, in mercy, now, thy swiftest pinions grant me!\ -And bear me to her field of space!\ -Ah, if I seek to approach what doth so haunt me,\ -If from this spot I dare to stir,\ -Dimly as through a mist I gaze on her!--\ -The loveliest vision of a woman!\ -Such lovely woman can there be?\ -Must I in these reposing limbs naught human.\ -But of all heavens the finest essence see?\ -Was such a thing on earth seen ever?\ -\ -_Mephistopheles_. Why, when you see a God six days in hard work spend,\ -And then cry bravo at the end,\ -Of course you look for something clever.\ -Look now thy fill; I have for thee\ -Just such a jewel, and will lead thee to her;\ -And happy, whose good fortune it shall be,\ -To bear her home, a prospered wooer!\ -\ -[FAUST _keeps on looking into the mirror_. MEPHISTOPHELES\ -_stretching himself out on the settle and playing with the brush,\ -continues speaking_.]\ -Here sit I like a king upon his throne,\ -The sceptre in my hand,--I want the crown alone.\ -\ - THE ANIMALS\ - [_who up to this time have been going through all sorts of queer antics\ - with each other, bring_ MEPHISTOPHELES _a crown with a loud cry_].\ - O do be so good,--\ - With sweat and with blood,\ - To take it and lime it;\ - [_They go about clumsily with the crown and break it into two pieces,\ - with which they jump round_.]\ - 'Tis done now! We're free!\ - We speak and we see,\ - We hear and we rhyme it;\ -\ -_Faust [facing the mirror_]. Woe's me! I've almost lost my wits.\ -\ -_Mephistopheles [pointing to the animals_].\ -My head, too, I confess, is very near to spinning.\ -\ -_The animals_. And then if it hits\ - And every thing fits,\ - We've thoughts for our winning.\ -\ -_Faust [as before_]. Up to my heart the flame is flying!\ -Let us begone--there's danger near!\ -\ -_Mephistopheles [in the former position_].\ -Well, this, at least, there's no denying,\ -That we have undissembled poets here.\ -\ -[The kettle, which the she-monkey has hitherto left unmatched, begins to\ -run over; a great flame breaks out, which roars up the chimney. The_ WITCH\ -_comes riding down through the flame with a terrible outcry_.]\ -\ -_Witch_. Ow! Ow! Ow! Ow!\ - The damned beast! The cursed sow!\ - Neglected the kettle, scorched the Frau!\ - The cursed crew!\ - [_Seeing_ FAUST _and_ MEPHISTOPHELES.]\ - And who are you?\ - And what d'ye do?\ - And what d'ye want?\ - And who sneaked in?\ - The fire-plague grim\ - Shall light on him\ - In every limb!\ -\ - [_She makes a dive at the kettle with the skimmer and spatters flames\ - at _FAUST, MEPHISTOPHELES_, and the creatures. These last whimper_.]\ -\ - MEPHISTOPHELES\ - [_inverting the brush which he holds in his hand, and striking\ - among the glasses and pots_].\ -\ - In two! In two!\ - There lies the brew!\ - There lies the glass!\ - This joke must pass;\ - For time-beat, ass!\ - To thy melody, 'twill do.\ - [_While the_ WITCH _starts back full of wrath and horror.]\ -Skeleton! Scarcecrow! Spectre! Know'st thou me,\ -Thy lord and master? What prevents my dashing\ -Right in among thy cursed company,\ -Thyself and all thy monkey spirits smashing?\ -Has the red waistcoat thy respect no more?\ -Has the cock's-feather, too, escaped attention?\ -Hast never seen this face before?\ -My name, perchance, wouldst have me mention?\ -\ -_The witch_. Pardon the rudeness, sir, in me!\ -But sure no cloven foot I see.\ -Nor find I your two ravens either.\ -\ -_Mephistopheles_. I'll let thee off for this once so;\ -For a long while has passed, full well I know,\ -Since the last time we met together.\ -The culture, too, which licks the world to shape,\ -The devil himself cannot escape;\ -The phantom of the North men's thoughts have left behind them,\ -Horns, tail, and claws, where now d'ye find them?\ -And for the foot, with which dispense I nowise can,\ -'Twould with good circles hurt my standing;\ -And so I've worn, some years, like many a fine young man,\ -False calves to make me more commanding.\ -\ -_The witch [dancing_]. O I shall lose my wits, I fear,\ -Do I, again, see Squire Satan here!\ -\ -_Mephistopheles_. Woman, the name offends my ear!\ -\ -_The witch_. Why so? What has it done to you?\ -\ -_Mephistopheles_. It has long since to fable-books been banished;\ -But men are none the better for it; true,\ -The wicked _one_, but not the wicked _ones_, has vanished.\ -Herr Baron callst thou me, then all is right and good;\ -I am a cavalier, like others. Doubt me?\ -Doubt for a moment of my noble blood?\ -See here the family arms I bear about me!\ - [_He makes an indecent gesture.]\ -\ -The witch [laughs immoderately_]. Ha! ha! full well I know you, sir!\ -You are the same old rogue you always were!\ -\ -_Mephistopheles [to Faust_]. I pray you, carefully attend,\ -This is the way to deal with witches, friend.\ -\ -_The witch_. Now, gentles, what shall I produce?\ -\ -_Mephistopheles_. A right good glassful of the well-known juice!\ -And pray you, let it be the oldest;\ -Age makes it doubly strong for use.\ -\ -_The witch_. Right gladly! Here I have a bottle,\ -From which, at times, I wet my throttle;\ -Which now, not in the slightest, stinks;\ -A glass to you I don't mind giving;\ - [_Softly_.]\ -But if this man, without preparing, drinks,\ -He has not, well you know, another hour for living.\ -\ -_Mephistopheles_.\ -'Tis a good friend of mine, whom it shall straight cheer up;\ -Thy kitchen's best to give him don't delay thee.\ -Thy ring--thy spell, now, quick, I pray thee,\ -And give him then a good full cup.\ -\ -[_The_ WITCH, _with strange gestures, draws a circle, and places singular\ -things in it; mean-while the glasses begin to ring, the kettle to sound\ -and make music. Finally, she brings a great book and places the monkeys in\ -the circle, whom she uses as a reading-desk and to hold the torches. She\ -beckons_ FAUST _to come to her_.]\ -\ -_Faust [to Mephistopheles_].\ -Hold! what will come of this? These creatures,\ -These frantic gestures and distorted features,\ -And all the crazy, juggling fluff,\ -I've known and loathed it long enough!\ -\ -_Mephistopheles_. Pugh! that is only done to smoke us;\ -Don't be so serious, my man!\ -She must, as Doctor, play her hocus-pocus\ -To make the dose work better, that's the plan.\ - [_He constrains_ FAUST _to step into the circle_.]\ -\ - THE WITCH\ - [_beginning with great emphasis to declaim out of the book_]\ -\ - Remember then!\ - Of One make Ten,\ - The Two let be,\ - Make even Three,\ - There's wealth for thee.\ - The Four pass o'er!\ - Of Five and Six,\ - (The witch so speaks,)\ - Make Seven and Eight,\ - The thing is straight:\ - And Nine is One\ - And Ten is none--\ - This is the witch's one-time-one![24]\ -\ -_Faust_. The old hag talks like one delirious.\ -\ -_Mephistopheles_. There's much more still, no less mysterious,\ -I know it well, the whole book sounds just so!\ -I've lost full many a year in poring o'er it,\ -For perfect contradiction, you must know,\ -A mystery stands, and fools and wise men bow before it,\ -The art is old and new, my son.\ -Men, in all times, by craft and terror,\ -With One and Three, and Three and One,\ -For truth have propagated error.\ -They've gone on gabbling so a thousand years;\ -Who on the fools would waste a minute?\ -Man generally thinks, if words he only hears,\ -Articulated noise must have some meaning in it.\ -\ -_The witch [goes on_]. Deep wisdom's power\ - Has, to this hour,\ - From all the world been hidden!\ - Whoso thinks not,\ - To him 'tis brought,\ - To him it comes unbidden.\ -\ -_Faust_. What nonsense is she talking here?\ -My heart is on the point of cracking.\ -In one great choir I seem to hear\ -A hundred thousand ninnies clacking.\ -\ -_Mephistopheles_. Enough, enough, rare Sibyl, sing us\ -These runes no more, thy beverage bring us,\ -And quickly fill the goblet to the brim;\ -This drink may by my friend be safely taken:\ -Full many grades the man can reckon,\ -Many good swigs have entered him.\ -\ - [_The_ WITCH, _with many ceremonies, pours the drink into a cup;\ - as she puts it to_ FAUST'S _lips, there rises a light flame_.]\ -\ -_Mephistopheles_. Down with it! Gulp it down! 'Twill prove\ -All that thy heart's wild wants desire.\ -Thou, with the devil, hand and glove,[25]\ -And yet wilt be afraid of fire?\ -\ - [_The_ WITCH _breaks the circle_; FAUST _steps out_.]\ -\ -_Mephistopheles_. Now briskly forth! No rest for thee!\ -\ -_The witch_. Much comfort may the drink afford you!\ -\ -_Mephistopheles [to the witch_]. And any favor you may ask of me,\ -I'll gladly on Walpurgis' night accord you.\ -\ -_The witch_. Here is a song, which if you sometimes sing,\ -'Twill stir up in your heart a special fire.\ -\ -_Mephistopheles [to Faust_]. Only make haste; and even shouldst thou tire,\ -Still follow me; one must perspire,\ -That it may set his nerves all quivering.\ -I'll teach thee by and bye to prize a noble leisure,\ -And soon, too, shalt thou feel with hearty pleasure,\ -How busy Cupid stirs, and shakes his nimble wing.\ -\ -_Faust_. But first one look in yonder glass, I pray thee!\ -Such beauty I no more may find!\ -\ -_Mephistopheles_. Nay! in the flesh thine eyes shall soon display thee\ -The model of all woman-kind.\ - [_Softly_.]\ -Soon will, when once this drink shall heat thee,\ -In every girl a Helen meet thee!\ -\ -\ -\ -\ - A STREET.\ -\ - FAUST. MARGARET [_passing over_].\ -\ -_Faust_. My fair young lady, will it offend her\ -If I offer my arm and escort to lend her?\ -\ -_Margaret_. Am neither lady, nor yet am fair!\ -Can find my way home without any one's care.\ - [_Disengages herself and exit_.]\ -\ -_Faust_. By heavens, but then the child _is_ fair!\ -I've never seen the like, I swear.\ -So modest is she and so pure,\ -And somewhat saucy, too, to be sure.\ -The light of the cheek, the lip's red bloom,\ -I shall never forget to the day of doom!\ -How me cast down her lovely eyes,\ -Deep in my soul imprinted lies;\ -How she spoke up, so curt and tart,\ -Ah, that went right to my ravished heart!\ - [_Enter_ MEPHISTOPHELES.]\ -\ -_Faust_. Hark, thou shalt find me a way to address her!\ -\ -_Mephistopheles_. Which one?\ -\ -_Faust_. She just went by.\ -\ -_Mephistopheles_. What! She?\ -She came just now from her father confessor,\ -Who from all sins pronounced her free;\ -I stole behind her noiselessly,\ -'Tis an innocent thing, who, for nothing at all,\ -Must go to the confessional;\ -O'er such as she no power I hold!\ -\ -_Faust_. But then she's over fourteen years old.\ -\ -_Mephistopheles_. Thou speak'st exactly like Jack Rake,\ -Who every fair flower his own would make.\ -And thinks there can be no favor nor fame,\ -But one may straightway pluck the same.\ -But 'twill not always do, we see.\ -\ -_Faust_. My worthy Master Gravity,\ -Let not a word of the Law be spoken!\ -One thing be clearly understood,--\ -Unless I clasp the sweet, young blood\ -This night in my arms--then, well and good:\ -When midnight strikes, our bond is broken.\ -\ -_Mephistopheles_. Reflect on all that lies in the way!\ -I need a fortnight, at least, to a day,\ -For finding so much as a way to reach her.\ -\ -_Faust_. Had I seven hours, to call my own,\ -Without the devil's aid, alone\ -I'd snare with ease so young a creature.\ -\ -_Mephistopheles_. You talk quite Frenchman-like to-day;\ -But don't be vexed beyond all measure.\ -What boots it thus to snatch at pleasure?\ -'Tis not so great, by a long way,\ -As if you first, with tender twaddle,\ -And every sort of fiddle-faddle,\ -Your little doll should mould and knead,\ -As one in French romances may read.\ -\ -_Faust_. My appetite needs no such spur.\ -\ -_Mephistopheles_. Now, then, without a jest or slur,\ -I tell you, once for all, such speed\ -With the fair creature won't succeed.\ -Nothing will here by storm be taken;\ -We must perforce on intrigue reckon.\ -\ -_Faust_. Get me some trinket the angel has blest!\ -Lead me to her chamber of rest!\ -Get me a 'kerchief from her neck,\ -A garter get me for love's sweet sake!\ -\ -_Mephistopheles_. To prove to you my willingness\ -To aid and serve you in this distress;\ -You shall visit her chamber, by me attended,\ -Before the passing day is ended.\ -\ -_Faust_. And see her, too? and have her?\ -\ -_Mephistopheles_. Nay!\ -She will to a neighbor's have gone away.\ -Meanwhile alone by yourself you may,\ -There in her atmosphere, feast at leisure\ -And revel in dreams of future pleasure.\ -\ -_Faust_. Shall we start at once?\ -\ -_Mephistopheles_. 'Tis too early yet.\ -\ -_Faust_. Some present to take her for me you must get.\ -\ - [_Exit_.]\ -\ -_Mephistopheles_. Presents already! Brave! He's on the right foundation!\ -Full many a noble place I know,\ -And treasure buried long ago;\ -Must make a bit of exploration.\ -\ - [_Exit_.]\ -\ -\ -\ -\ - EVENING.\ -\ - _A little cleanly Chamber_.\ -\ -MARGARET [_braiding and tying up her hair_.]\ -I'd give a penny just to say\ -What gentleman that was to-day!\ -How very gallant he seemed to be,\ -He's of a noble family;\ -That I could read from his brow and bearing--\ -And he would not have otherwise been so daring.\ - [_Exit_.]\ -\ - FAUST. MEPHISTOPHELES.\ -\ -_Mephistopheles_. Come in, step softly, do not fear!\ -\ -_Faust [after a pause_]. Leave me alone, I prithee, here!\ -\ -_Mephistopheles [peering round_]. Not every maiden keeps so neat.\ - [_Exit_.]\ -\ -_Faust [gazing round_]. Welcome this hallowed still retreat!\ -Where twilight weaves its magic glow.\ -Seize on my heart, love-longing, sad and sweet,\ -That on the dew of hope dost feed thy woe!\ -How breathes around the sense of stillness,\ -Of quiet, order, and content!\ -In all this poverty what fulness!\ -What blessedness within this prison pent!\ - [_He throws himself into a leathern chair by the bed_.]\ -Take me, too! as thou hast, in years long flown,\ -In joy and grief, so many a generation!\ -Ah me! how oft, on this ancestral throne,\ -Have troops of children climbed with exultation!\ -Perhaps, when Christmas brought the Holy Guest,\ -My love has here, in grateful veneration\ -The grandsire's withered hand with child-lips prest.\ -I feel, O maiden, circling me,\ -Thy spirit of grace and fulness hover,\ -Which daily like a mother teaches thee\ -The table-cloth to spread in snowy purity,\ -And even, with crinkled sand the floor to cover.\ -Dear, godlike hand! a touch of thine\ -Makes this low house a heavenly kingdom slime!\ -And here!\ - [_He lifts a bed-curtain_.]\ -What blissful awe my heart thrills through!\ -Here for long hours could I linger.\ -Here, Nature! in light dreams, thy airy finger\ -The inborn angel's features drew!\ -Here lay the child, when life's fresh heavings\ -Its tender bosom first made warm,\ -And here with pure, mysterious weavings\ -The spirit wrought its godlike form!\ - And thou! What brought thee here? what power\ -Stirs in my deepest soul this hour?\ -What wouldst thou here? What makes thy heart so sore?\ -Unhappy Faust! I know thee thus no more.\ - Breathe I a magic atmosphere?\ -The will to enjoy how strong I felt it,--\ -And in a dream of love am now all melted!\ -Are we the sport of every puff of air?\ - And if she suddenly should enter now,\ -How would she thy presumptuous folly humble!\ -Big John-o'dreams! ah, how wouldst thou\ -Sink at her feet, collapse and crumble!\ -\ -_Mephistopheles_. Quick, now! She comes! I'm looking at her.\ -\ -_Faust_. Away! Away! O cruel fate!\ -\ -_Mephistopheles_. Here is a box of moderate weight;\ -I got it somewhere else--no matter!\ -Just shut it up, here, in the press,\ -I swear to you, 'twill turn her senses;\ -I meant the trifles, I confess,\ -To scale another fair one's fences.\ -True, child is child and play is play.\ -\ -_Faust_. Shall I? I know not.\ -\ -_Mephistopheles_. Why delay?\ -You mean perhaps to keep the bauble?\ -If so, I counsel you to spare\ -From idle passion hours so fair,\ -And me, henceforth, all further trouble.\ -I hope you are not avaricious!\ -I rub my hands, I scratch my head--\ - [_He places the casket in the press and locks it up again_.]\ - (Quick! Time we sped!)--\ -That the dear creature may be led\ -And moulded by your will and wishes;\ -And you stand here as glum,\ -As one at the door of the auditorium,\ -As if before your eyes you saw\ -In bodily shape, with breathless awe,\ -Metaphysics and physics, grim and gray!\ -Away!\ - [_Exit_.]\ -\ -_Margaret [with a lamp_]. It seems so close, so sultry here.\ - [_She opens the window_.]\ -Yet it isn't so very warm out there,\ -I feel--I know not how--oh dear!\ -I wish my mother 'ld come home, I declare!\ -I feel a shudder all over me crawl--\ -I'm a silly, timid thing, that's all!\ - [_She begins to sing, while undressing_.]\ - There was a king in Thulè,\ - To whom, when near her grave,\ - The mistress he loved so truly\ - A golden goblet gave.\ -\ - He cherished it as a lover,\ - He drained it, every bout;\ - His eyes with tears ran over,\ - As oft as he drank thereout.\ -\ - And when he found himself dying,\ - His towns and cities he told;\ - Naught else to his heir denying\ - Save only the goblet of gold.\ -\ - His knights he straightway gathers\ - And in the midst sate he,\ - In the banquet hall of the fathers\ - In the castle over the sea.\ -\ - There stood th' old knight of liquor,\ - And drank the last life-glow,\ - Then flung the holy beaker\ - Into the flood below.\ -\ - He saw it plunging, drinking\ - And sinking in the roar,\ - His eyes in death were sinking,\ - He never drank one drop more.\ - [_She opens the press, to put away her clothes,\ - and discovers the casket_.]\ -\ -How in the world came this fine casket here?\ -I locked the press, I'm very clear.\ -I wonder what's inside! Dear me! it's very queer!\ -Perhaps 'twas brought here as a pawn,\ -In place of something mother lent.\ -Here is a little key hung on,\ -A single peep I shan't repent!\ -What's here? Good gracious! only see!\ -I never saw the like in my born days!\ -On some chief festival such finery\ -Might on some noble lady blaze.\ -How would this chain become my neck!\ -Whose may this splendor be, so lonely?\ - [_She arrays herself in it, and steps before the glass_.]\ -Could I but claim the ear-rings only!\ -A different figure one would make.\ -What's beauty worth to thee, young blood!\ -May all be very well and good;\ -What then? 'Tis half for pity's sake\ -They praise your pretty features.\ -Each burns for gold,\ -All turns on gold,--\ -Alas for us! poor creatures!\ -\ -\ -\ -\ - PROMENADE.\ -\ -\ - FAUST [_going up and down in thought_.] MEPHISTOPHELES _to him_.\ -\ -_Mephistopheles_. By all that ever was jilted! By all the infernal fires!\ -I wish I knew something worse, to curse as my heart desires!\ -\ -_Faust_. What griping pain has hold of thee?\ -Such grins ne'er saw I in the worst stage-ranter!\ -\ -_Mephistopheles_. Oh, to the devil I'd give myself instanter,\ -If I were not already he!\ -\ -_Faust_. Some pin's loose in your head, old fellow!\ -That fits you, like a madman thus to bellow!\ -\ -_Mephistopheles_. Just think, the pretty toy we got for Peg,\ -A priest has hooked, the cursed plague I--\ -The thing came under the eye of the mother,\ -And caused her a dreadful internal pother:\ -The woman's scent is fine and strong;\ -Snuffles over her prayer-book all day long,\ -And knows, by the smell of an article, plain,\ -Whether the thing is holy or profane;\ -And as to the box she was soon aware\ -There could not be much blessing there.\ -\"My child,\" she cried, \"unrighteous gains\ -Ensnare the soul, dry up the veins.\ -We'll consecrate it to God's mother,\ -She'll give us some heavenly manna or other!\"\ -Little Margaret made a wry face; \"I see\ -'Tis, after all, a gift horse,\" said she;\ -\"And sure, no godless one is he\ -Who brought it here so handsomely.\"\ -The mother sent for a priest (they're cunning);\ -Who scarce had found what game was running,\ -When he rolled his greedy eyes like a lizard,\ -And, \"all is rightly disposed,\" said he,\ -\"Who conquers wins, for a certainty.\ -The church has of old a famous gizzard,\ -She calls it little whole lands to devour,\ -Yet never a surfeit got to this hour;\ -The church alone, dear ladies; _sans_ question,\ -Can give unrighteous gains digestion.\"\ -\ -_Faust_. That is a general pratice, too,\ -Common alike with king and Jew.\ -\ -_Mephistopheles_. Then pocketed bracelets and chains and rings\ -As if they were mushrooms or some such things,\ -With no more thanks, (the greedy-guts!)\ -Than if it had been a basket of nuts,\ -Promised them all sorts of heavenly pay--\ -And greatly edified were they.\ -\ -_Faust_. And Margery?\ -\ -_Mephistopheles_. Sits there in distress,\ -And what to do she cannot guess,\ -The jewels her daily and nightly thought,\ -And he still more by whom they were brought.\ -\ -_Faust._ My heart is troubled for my pet.\ -Get her at once another set!\ -The first were no great things in their way.\ -\ -_Mephistopheles._ O yes, my gentleman finds all child's play!\ -\ -_Faust._ And what I wish, that mind and do!\ -Stick closely to her neighbor, too.\ -Don't be a devil soft as pap,\ -And fetch me some new jewels, old chap!\ -\ -_Mephistopheles._ Yes, gracious Sir, I will with pleasure.\ - [_Exit_ FAUST.]\ -Such love-sick fools will puff away\ -Sun, moon, and stars, and all in the azure,\ -To please a maiden's whimsies, any day.\ - [_Exit._]\ -\ -\ -\ -\ - THE NEIGHBOR'S HOUSE.\ -\ -\ - MARTHA [_alone]._\ -My dear good man--whom God forgive!\ -He has not treated me well, as I live!\ -Right off into the world he's gone\ -And left me on the straw alone.\ -I never did vex him, I say it sincerely,\ -I always loved him, God knows how dearly.\ - [_She weeps_.]\ -Perhaps he's dead!--O cruel fate!--\ -If I only had a certificate!\ -\ - _Enter_ MARGARET.\ -Dame Martha!\ -\ -_Martha_. What now, Margery?\ -\ -_Margaret_. I scarce can keep my knees from sinking!\ -Within my press, again, not thinking,\ -I find a box of ebony,\ -With things--can't tell how grand they are,--\ -More splendid than the first by far.\ -\ -_Martha_. You must not tell it to your mother,\ -She'd serve it as she did the other.\ -\ -_Margaret_. Ah, only look! Behold and see!\ -\ -_Martha [puts them on her_]. Fortunate thing! I envy thee!\ -\ -_Margaret._ Alas, in the street or at church I never\ -Could be seen on any account whatever.\ -\ -_Martha._ Come here as often as you've leisure,\ -And prink yourself quite privately;\ -Before the looking-glass walk up and down at pleasure,\ -Fine times for both us 'twill be;\ -Then, on occasions, say at some great feast,\ -Can show them to the world, one at a time, at least.\ -A chain, and then an ear-pearl comes to view;\ -Your mother may not see, we'll make some pretext, too.\ -\ -_Margaret._ Who could have brought both caskets in succession?\ -There's something here for just suspicion!\ - [_A knock._ ]\ -Ah, God! If that's my mother--then!\ -\ -_Martha_ [_peeping through the blind_].\ -'Tis a strange gentleman--come in!\ -\ - [_Enter_ MEPHISTOPHELES.]\ -Must, ladies, on your kindness reckon\ -To excuse the freedom I have taken;\ - [_Steps back with profound respect at seeing_ MARGARET.]\ -I would for Dame Martha Schwerdtlein inquire!\ -\ -_Martha._ I'm she, what, sir, is your desire?\ -\ -_Mephistopheles_ [_aside to her_]. I know your face, for now 'twill do;\ -A distinguished lady is visiting you.\ -For a call so abrupt be pardon meted,\ -This afternoon it shall be repeated.\ -\ -_Martha [aloud]._ For all the world, think, child! my sakes!\ -The gentleman you for a lady takes.\ -\ -_Margaret_. Ah, God! I am a poor young blood;\ -The gentleman is quite too good;\ -The jewels and trinkets are none of my own.\ -\ -_Mephistopheles_. Ah, 'tis not the jewels and trinkets alone;\ -Her look is so piercing, so _distinguè_!\ -How glad I am to be suffered to stay.\ -\ -_Martha_. What bring you, sir? I long to hear--\ -\ -_Mephistopheles_. Would I'd a happier tale for your ear!\ -I hope you'll forgive me this one for repeating:\ -Your husband is dead and sends you a greeting.\ -\ -_Martha_. Is dead? the faithful heart! Woe! Woe!\ -My husband dead! I, too, shall go!\ -\ -_Margaret_. Ah, dearest Dame, despair not thou!\ -\ -_Mephistopheles_ Then, hear the mournful story now!\ -\ -_Margaret_. Ah, keep me free from love forever,\ -I should never survive such a loss, no, never!\ -\ -_Mephistopheles_. Joy and woe, woe and joy, must have each other.\ -\ -_Martha_. Describe his closing hours to me!\ -\ -_Mephistopheles_. In Padua lies our departed brother,\ -In the churchyard of St. Anthony,\ -In a cool and quiet bed lies sleeping,\ -In a sacred spot's eternal keeping.\ -\ -_Martha_. And this was all you had to bring me?\ -\ -_Mephistopheles_. All but one weighty, grave request!\ -\"Bid her, when I am dead, three hundred masses sing me!\"\ -With this I have made a clean pocket and breast.\ -\ -_Martha_. What! not a medal, pin nor stone?\ -Such as, for memory's sake, no journeyman will lack,\ -Saved in the bottom of his sack,\ -And sooner would hunger, be a pauper--\ -\ -_Mephistopheles_. Madam, your case is hard, I own!\ -But blame him not, he squandered ne'er a copper.\ -He too bewailed his faults with penance sore,\ -Ay, and his wretched luck bemoaned a great deal more.\ -\ -_Margaret_. Alas! that mortals so unhappy prove!\ -I surely will for him pray many a requiem duly.\ -\ -_Mephistopheles_. You're worthy of a spouse this moment; truly\ -You are a child a man might love.\ -\ -_Margaret_. It's not yet time for that, ah no!\ -\ -_Mephistopheles_. If not a husband, say, meanwhile a beau.\ -It is a choice and heavenly blessing,\ -Such a dear thing to one's bosom pressing.\ -\ -_Margaret_. With us the custom is not so.\ -\ -_Mephistopheles_. Custom or not! It happens, though.\ -\ -_Martha_. Tell on!\ -\ -_Mephistopheles_. I slood beside his bed, as he lay dying,\ -Better than dung it was somewhat,--\ -Half-rotten straw; but then, he died as Christian ought,\ -And found an unpaid score, on Heaven's account-book lying.\ -\"How must I hate myself,\" he cried, \"inhuman!\ -So to forsake my business and my woman!\ -Oh! the remembrance murders me!\ -Would she might still forgive me this side heaven!\"\ -\ -_Martha_ [_weeping_]. The dear good man! he has been long forgiven.\ -\ -_Mephistopheles_. \"But God knows, I was less to blame than she.\"\ -\ -_Martha_. A lie! And at death's door! abominable!\ -\ -_Mephistopheles_. If I to judge of men half-way am able,\ -He surely fibbed while passing hence.\ -\"Ways to kill time, (he said)--be sure, I did not need them;\ -First to get children--and then bread to feed them,\ -And bread, too, in the widest sense,\ -And even to eat my bit in peace could not be thought on.\"\ -\ -_Martha_. Has he all faithfulness, all love, so far forgotten,\ -The drudgery by day and night!\ -\ -_Mephistopheles_. Not so, he thought of you with all his might.\ -He said: \"When I from Malta went away,\ -For wife and children my warm prayers ascended;\ -And Heaven so far our cause befriended,\ -Our ship a Turkish cruiser took one day,\ -Which for the mighty Sultan bore a treasure.\ -Then valor got its well-earned pay,\ -And I too, who received but my just measure,\ -A goodly portion bore away.\"\ -\ -_Martha_. How? Where? And he has left it somewhere buried?\ -\ -_Mephistopheles_. Who knows which way by the four winds 'twas carried?\ -He chanced to take a pretty damsel's eye,\ -As, a strange sailor, he through Naples jaunted;\ -All that she did for him so tenderly,\ -E'en to his blessed end the poor man haunted.\ -\ -_Martha_. The scamp! his children thus to plunder!\ -And could not all his troubles sore\ -Arrest his vile career, I wonder?\ -\ -_Mephistopheles_. But mark! his death wipes off the score.\ -Were I in your place now, good lady;\ -One year I'd mourn him piously\ -And look about, meanwhiles, for a new flame already.\ -\ -_Martha_. Ah, God! another such as he\ -I may not find with ease on this side heaven!\ -Few such kind fools as this dear spouse of mine.\ -Only to roving he was too much given,\ -And foreign women and foreign wine,\ -And that accursed game of dice.\ -\ -_Mephistopheles_. Mere trifles these; you need not heed 'em,\ -If he, on his part, not o'er-nice,\ -Winked at, in you, an occasional freedom.\ -I swear, on that condition, too,\ -I would, myself, 'change rings with you!\ -\ -_Martha_. The gentleman is pleased to jest now!\ -\ -_Mephistopheles [aside_]. I see it's now high time I stirred!\ -She'd take the very devil at his word.\ - [_To_ MARGERY.]\ -How is it with your heart, my best, now?\ -\ -_Margaret_. What means the gentleman?\ -\ -_Mephistopheles. [aside_]. Thou innocent young heart!\ - [_Aloud_.]\ -Ladies, farewell!\ -\ -_Margaret_. Farewell!\ -\ -_Martha_. But quick, before we part!--\ -I'd like some witness, vouching truly\ -Where, how and when my love died and was buried duly.\ -I've always paid to order great attention,\ -Would of his death read some newspaper mention.\ -\ -_Mephistopheles_. Ay, my dear lady, in the mouths of two\ -Good witnesses each word is true;\ -I've a friend, a fine fellow, who, when you desire,\ -Will render on oath what you require.\ -I'll bring him here.\ -\ -_Martha_. O pray, sir, do!\ -\ -_Mephistopheles_. And this young lady 'll be there too?\ -Fine boy! has travelled everywhere,\ -And all politeness to the fair.\ -\ -_Margaret_. Before him shame my face must cover.\ -\ -_Mephistopheles_. Before no king the wide world over!\ -\ -_Martha_. Behind the house, in my garden, at leisure,\ -We'll wait this eve the gentlemen's pleasure.\ -\ -\ -\ -\ - STREET.\ -\ - FAUST. MEPHISTOPHELES.\ -\ -_Faust_. How now? What progress? Will 't come right?\ -\ -_Mephistopheles_. Ha, bravo? So you're all on fire?\ -Full soon you'll see whom you desire.\ -In neighbor Martha's grounds we are to meet tonight.\ -That woman's one of nature's picking\ -For pandering and gipsy-tricking!\ -\ -_Faust_. So far, so good!\ -\ -_Mephistopheles_. But one thing we must do.\ -\ -_Faust_. Well, one good turn deserves another, true.\ -\ -_Mephistopheles_. We simply make a solemn deposition\ -That her lord's bones are laid in good condition\ -In holy ground at Padua, hid from view.\ -\ -_Faust_. That's wise! But then we first must make the journey thither?\ -\ -_Mephistopheles. Sancta simplicitas_! no need of such to-do;\ -Just swear, and ask not why or whether.\ -\ -_Faust_. If that's the best you have, the plan's not worth a feather.\ -\ -_Mephistopheles_. O holy man! now that's just you!\ -In all thy life hast never, to this hour,\ -To give false witness taken pains?\ -Have you of God, the world, and all that it contains,\ -Of man, and all that stirs within his heart and brains,\ -Not given definitions with great power,\ -Unscrupulous breast, unblushing brow?\ -And if you search the matter clearly,\ -Knew you as much thereof, to speak sincerely,\ -As of Herr Schwerdtlein's death? Confess it now!\ -\ -_Faust_. Thou always wast a sophist and a liar.\ -\ -_Mephistopheles_. Ay, if one did not look a little nigher.\ -For will you not, in honor, to-morrow\ -Befool poor Margery to her sorrow,\ -And all the oaths of true love borrow?\ -\ -_Faust_. And from the heart, too.\ -\ -_Mephistopheles_. Well and fair!\ -Then there'll be talk of truth unending,\ -Of love o'ermastering, all transcending--\ -Will every word be heart-born there?\ -\ -_Faust_. Enough! It will!--If, for the passion\ -That fills and thrills my being's frame,\ -I find no name, no fit expression,\ -Then, through the world, with all my senses, ranging,\ -Seek what most strongly speaks the unchanging.\ -And call this glow, within me burning,\ -Infinite--endless--endless yearning,\ -Is that a devilish lying game?\ -\ -_Mephistopheles_. I'm right, nathless!\ -\ -_Faust_. Now, hark to me--\ -This once, I pray, and spare my lungs, old fellow--\ -Whoever _will_ be right, and has a tongue to bellow,\ -Is sure to be.\ -But come, enough of swaggering, let's be quit,\ -For thou art right, because I must submit.\ -\ -\ -\ -\ - GARDEN.\ -\ - MARGARET _on_ FAUST'S _arm_. MARTHA _with_ MEPHISTOPHELES.\ - [_Promenading up and down_.]\ -\ -_Margaret_. The gentleman but makes me more confused\ -\ -With all his condescending goodness.\ -Men who have travelled wide are used\ -To bear with much from dread of rudeness;\ -I know too well, a man of so much mind\ -In my poor talk can little pleasure find.\ -\ -_Faust_. One look from thee, one word, delights me more\ -Than this world's wisdom o'er and o'er.\ - [_Kisses her hand_.]\ -\ -_Margaret_. Don't take that trouble, sir! How could you bear to kiss it?\ -A hand so ugly, coarse, and rough!\ -How much I've had to do! must I confess it--\ -Mother is more than close enough.\ - [_They pass on_.]\ -\ -_Martha_. And you, sir, are you always travelling so?\ -\ -_Mephistopheles_. Alas, that business forces us to do it!\ -With what regret from many a place we go,\ -Though tenderest bonds may bind us to it!\ -\ -_Martha_. 'Twill do in youth's tumultuous maze\ -To wander round the world, a careless rover;\ -But soon will come the evil days,\ -And then, a lone dry stick, on the grave's brink to hover,\ -For that nobody ever prays.\ -\ -_Mephistopheles_. The distant prospect shakes my reason.\ -\ -_Martha_. Then, worthy sir, bethink yourself in season.\ - [_They pass on_.]\ -\ -_Margaret_. Yes, out of sight and out of mind!\ -Politeness you find no hard matter;\ -But you have friends in plenty, better\ -Than I, more sensible, more refined.\ -\ -_Faust_. Dear girl, what one calls sensible on earth,\ -Is often vanity and nonsense.\ -\ -_Margaret_. How?\ -\ -_Faust_. Ah, that the pure and simple never know\ -Aught of themselves and all their holy worth!\ -That meekness, lowliness, the highest measure\ -Of gifts by nature lavished, full and free--\ -\ -_Margaret_. One little moment, only, think of me,\ -I shall to think of you have ample time and leisure.\ -\ -_Faust_. You're, may be, much alone?\ -\ -_Margaret_. Our household is but small, I own,\ -And yet needs care, if truth were known.\ -We have no maid; so I attend to cooking, sweeping,\ -Knit, sew, do every thing, in fact;\ -And mother, in all branches of housekeeping,\ -Is so exact!\ -Not that she need be tied so very closely down;\ -We might stand higher than some others, rather;\ -A nice estate was left us by my father,\ -A house and garden not far out of town.\ -Yet, after all, my life runs pretty quiet;\ -My brother is a soldier,\ -My little sister's dead;\ -With the dear child indeed a wearing life I led;\ -And yet with all its plagues again would gladly try it,\ -The child was such a pet.\ -\ -_Faust_. An angel, if like thee!\ -\ -_Margaret_. I reared her and she heartily loved me.\ -She and my father never saw each other,\ -He died before her birth, and mother\ -Was given up, so low she lay,\ -But me, by slow degrees, recovered, day by day.\ -Of course she now, long time so feeble,\ -To nurse the poor little worm was unable,\ -And so I reared it all alone,\ -With milk and water; 'twas my own.\ -Upon my bosom all day long\ -It smiled and sprawled and so grew strong.\ -\ -_Faust_. Ah! thou hast truly known joy's fairest flower.\ -\ -_Margaret_. But no less truly many a heavy hour.\ -The wee thing's cradle stood at night\ -Close to my bed; did the least thing awake her,\ -My sleep took flight;\ -'Twas now to nurse her, now in bed to take her,\ -Then, if she was not still, to rise,\ -Walk up and down the room, and dance away her cries,\ -And at the wash-tub stand, when morning streaked the skies;\ -Then came the marketing and kitchen-tending,\ -Day in, day out, work never-ending.\ -One cannot always, sir, good temper keep;\ -But then it sweetens food and sweetens sleep.\ - [_They pass on_.]\ -\ -_Martha_. But the poor women suffer, you must own:\ -A bachelor is hard of reformation.\ -\ -_Mephistopheles_. Madam, it rests with such as you, alone,\ -To help me mend my situation.\ -\ -_Martha_. Speak plainly, sir, has none your fancy taken?\ -Has none made out a tender flame to waken?\ -\ -_Mephistopheles_. The proverb says: A man's own hearth,\ -And a brave wife, all gold and pearls are worth.\ -\ -_Martha_. I mean, has ne'er your heart been smitten slightly?\ -\ -_Mephistopheles_. I have, on every hand, been entertained politely.\ -\ -_Martha_. Have you not felt, I mean, a serious intention?\ -\ -_Mephistopheles_.\ -Jesting with women, that's a thing one ne'er should mention.\ -\ -_Martha_. Ah, you misunderstand!\ -\ -_Mephistopheles_. It grieves me that I should!\ -But this I understand--that you are good.\ - [_They pass on_.]\ -\ -_Faust_. So then, my little angel recognized me,\ -As I came through the garden gate?\ -\ -_Margaret_. Did not my downcast eyes show you surprised me?\ -\ -_Faust_. And thou forgav'st that liberty, of late?\ -That impudence of mine, so daring,\ -As thou wast home from church repairing?\ -\ -_Margaret_. I was confused, the like was new to me;\ -No one could say a word to my dishonor.\ -Ah, thought I, has he, haply, in thy manner\ -Seen any boldness--impropriety?\ -It seemed as if the feeling seized him,\ -That he might treat this girl just as it pleased him.\ -Let me confess! I knew not from what cause,\ -Some flight relentings here began to threaten danger;\ -I know, right angry with myself I was,\ -That I could not be angrier with the stranger.\ -\ -_Faust_. Sweet darling!\ -\ -_Margaret_. Let me once!\ -\ - [_She plucks a china-aster and picks off the leaves one after another_.]\ -\ -_Faust_. What's that for? A bouquet?\ -\ -_Margaret_. No, just for sport.\ -\ -_Faust_. How?\ -\ -_Margaret_. Go! you'll laugh at me; away!\ - [_She picks and murmurs to herself_.]\ -\ -_Faust_. What murmurest thou?\ -\ -_Margaret [half aloud_]. He loves me--loves me not.\ -\ -_Faust_. Sweet face! from heaven that look was caught!\ -\ -_Margaret [goes on_]. Loves me--not--loves me--not--\ - [_picking off the last leaf with tender joy_]\ -He loves me!\ -\ -_Faust_. Yes, my child! And be this floral word\ -An oracle to thee. He loves thee!\ -Knowest thou all it mean? He loves thee!\ - [_Clasping both her hands_.]\ -\ -_Margaret_. What thrill is this!\ -\ -_Faust_. O, shudder not! This look of mine.\ -This pressure of the hand shall tell thee\ -What cannot be expressed:\ -Give thyself up at once and feel a rapture,\ -An ecstasy never to end!\ -Never!--It's end were nothing but blank despair.\ -No, unending! unending!\ -\ - [MARGARET _presses his hands, extricates herself, and runs away.\ - He stands a moment in thought, then follows her_].\ -\ -_Martha [coming_]. The night falls fast.\ -\ -_Mephistopheles_. Ay, and we must away.\ -\ -_Martha_. If it were not for one vexation,\ -I would insist upon your longer stay.\ -Nobody seems to have no occupation,\ -No care nor labor,\ -Except to play the spy upon his neighbor;\ -And one becomes town-talk, do whatsoe'er they may.\ -But where's our pair of doves?\ -\ -_Mephistopheles_. Flown up the alley yonder.\ -Light summer-birds!\ -\ -_Martha_. He seems attached to her.\ -\ -_Mephistopheles_. No wonder.\ -And she to him. So goes the world, they say.\ -\ -\ -\ -\ - A SUMMER-HOUSE.\ -\ - MARGARET [_darts in, hides behind the door, presses the tip of\ - her finger to her lips, and peeps through the crack_].\ -\ -_Margaret_. He comes!\ -\ - _Enter_ FAUST.\ -\ -_Faust_. Ah rogue, how sly thou art!\ -I've caught thee!\ - [_Kisses her_.]\ -\ -_Margaret [embracing him and returning the kiss_].\ -Dear good man! I love thee from my heart!\ -\ - [MEPHISTOPHELES _knocks_.]\ -\ -_Faust [stamping_]. Who's there?\ -\ -_Mephistopheles_. A friend!\ -\ -_Faust_. A beast!\ -\ -_Mephistopheles_. Time flies, I don't offend you?\ -\ -_Martha [entering_]. Yes, sir, 'tis growing late.\ -\ -_Faust_. May I not now attend you?\ -\ -_Margaret_. Mother would--Fare thee well!\ -\ -_Faust_. And must I leave thee then? Farewell!\ -\ -_Martha_. Adé!\ -\ -_Margaret_. Till, soon, we meet again!\ -\ - [_Exeunt_ FAUST _and_ MEPHISTOPHELES.]\ -\ -_Margaret_. Good heavens! what such a man's one brain\ -Can in itself alone contain!\ -I blush my rudeness to confess,\ -And answer all he says with yes.\ -Am a poor, ignorant child, don't see\ -What he can possibly find in me.\ -\ - [_Exit_.]\ -\ -\ -\ -\ - WOODS AND CAVERN.\ -\ -_Faust_ [_alone_]. Spirit sublime, thou gav'st me, gav'st me all\ -For which I prayed. Thou didst not lift in vain\ -Thy face upon me in a flame of fire.\ -Gav'st me majestic nature for a realm,\ -The power to feel, enjoy her. Not alone\ -A freezing, formal visit didst thou grant;\ -Deep down into her breast invitedst me\ -To look, as if she were a bosom-friend.\ -The series of animated things\ -Thou bidst pass by me, teaching me to know\ -My brothers in the waters, woods, and air.\ -And when the storm-swept forest creaks and groans,\ -The giant pine-tree crashes, rending off\ -The neighboring boughs and limbs, and with deep roar\ -The thundering mountain echoes to its fall,\ -To a safe cavern then thou leadest me,\ -Showst me myself; and my own bosom's deep\ -Mysterious wonders open on my view.\ -And when before my sight the moon comes up\ -With soft effulgence; from the walls of rock,\ -From the damp thicket, slowly float around\ -The silvery shadows of a world gone by,\ -And temper meditation's sterner joy.\ - O! nothing perfect is vouchsafed to man:\ -I feel it now! Attendant on this bliss,\ -Which brings me ever nearer to the Gods,\ -Thou gav'st me the companion, whom I now\ -No more can spare, though cold and insolent;\ -He makes me hate, despise myself, and turns\ -Thy gifts to nothing with a word--a breath.\ -He kindles up a wild-fire in my breast,\ -Of restless longing for that lovely form.\ -Thus from desire I hurry to enjoyment,\ -And in enjoyment languish for desire.\ -\ - _Enter_ MEPHISTOPHELES.\ -\ -_Mephistopheles_. Will not this life have tired you by and bye?\ -I wonder it so long delights you?\ -'Tis well enough for once the thing to try;\ -Then off to where a new invites you!\ -\ -_Faust_. Would thou hadst something else to do,\ -That thus to spoil my joy thou burnest.\ -\ -_Mephistopheles_. Well! well! I'll leave thee, gladly too!--\ -Thou dar'st not tell me that in earnest!\ -'Twere no great loss, a fellow such as you,\ -So crazy, snappish, and uncivil.\ -One has, all day, his hands full, and more too;\ -To worm out from him what he'd have one do,\ -Or not do, puzzles e'en the very devil.\ -\ -_Faust_. Now, that I like! That's just the tone!\ -Wants thanks for boring me till I'm half dead!\ -\ -_Mephistopheles_. Poor son of earth, if left alone,\ -What sort of life wouldst thou have led?\ -How oft, by methods all my own,\ -I've chased the cobweb fancies from thy head!\ -And but for me, to parts unknown\ -Thou from this earth hadst long since fled.\ -What dost thou here through cave and crevice groping?\ -Why like a hornèd owl sit moping?\ -And why from dripping stone, damp moss, and rotten wood\ -Here, like a toad, suck in thy food?\ -Delicious pastime! Ah, I see,\ -Somewhat of Doctor sticks to thee.\ -\ -_Faust_. What new life-power it gives me, canst thou guess--\ -This conversation with the wilderness?\ -Ay, couldst thou dream how sweet the employment,\ -Thou wouldst be devil enough to grudge me my enjoyment.\ -\ -_Mephistopheles_. Ay, joy from super-earthly fountains!\ -By night and day to lie upon the mountains,\ -To clasp in ecstasy both earth and heaven,\ -Swelled to a deity by fancy's leaven,\ -Pierce, like a nervous thrill, earth's very marrow,\ -Feel the whole six days' work for thee too narrow,\ -To enjoy, I know not what, in blest elation,\ -Then with thy lavish love o'erflow the whole creation.\ -Below thy sight the mortal cast,\ -And to the glorious vision give at last--\ - [_with a gesture_]\ -I must not say what termination!\ -\ -_Faust_. Shame on thee!\ -\ -_Mephistopheles_. This displeases thee; well, surely,\ -Thou hast a right to say \"for shame\" demurely.\ -One must not mention that to chaste ears--never,\ -Which chaste hearts cannot do without, however.\ -And, in one word, I grudge you not the pleasure\ -Of lying to yourself in moderate measure;\ -But 'twill not hold out long, I know;\ -Already thou art fast recoiling,\ -And soon, at this rate, wilt be boiling\ -With madness or despair and woe.\ -Enough of this! Thy sweetheart sits there lonely,\ -And all to her is close and drear.\ -Her thoughts are on thy image only,\ -She holds thee, past all utterance, dear.\ -At first thy passion came bounding and rushing\ -Like a brooklet o'erflowing with melted snow and rain;\ -Into her heart thou hast poured it gushing:\ -And now thy brooklet's dry again.\ -Methinks, thy woodland throne resigning,\ -'Twould better suit so great a lord\ -The poor young monkey to reward\ -For all the love with which she's pining.\ -She finds the time dismally long;\ -Stands at the window, sees the clouds on high\ -Over the old town-wall go by.\ -\"Were I a little bird!\"[26] so runneth her song\ -All the day, half the night long.\ -At times she'll be laughing, seldom smile,\ -At times wept-out she'll seem,\ -Then again tranquil, you'd deem,--\ -Lovesick all the while.\ -\ -_Faust_. Viper! Viper!\ -\ -_Mephistopheles_ [_aside_]. Ay! and the prey grows riper!\ -\ -_Faust_. Reprobate! take thee far behind me!\ -No more that lovely woman name!\ -Bid not desire for her sweet person flame\ -Through each half-maddened sense, again to blind me!\ -\ -_Mephistopheles_. What then's to do? She fancies thou hast flown,\ -And more than half she's right, I own.\ -\ -_Faust_. I'm near her, and, though far away, my word,\ -I'd not forget her, lose her; never fear it!\ -I envy e'en the body of the Lord,\ -Oft as those precious lips of hers draw near it.\ -\ -_Mephistopheles_. No doubt; and oft my envious thought reposes\ -On the twin-pair that feed among the roses.\ -\ -_Faust_. Out, pimp!\ -\ -_Mephistopheles_. Well done! Your jeers I find fair game for laughter.\ -The God, who made both lad and lass,\ -Unwilling for a bungling hand to pass,\ -Made opportunity right after.\ -But come! fine cause for lamentation!\ -Her chamber is your destination,\ -And not the grave, I guess.\ -\ -_Faust_. What are the joys of heaven while her fond arms enfold me?\ -O let her kindling bosom hold me!\ -Feel I not always her distress?\ -The houseless am I not? the unbefriended?\ -The monster without aim or rest?\ -That, like a cataract, from rock to rock descended\ -To the abyss, with maddening greed possest:\ -She, on its brink, with childlike thoughts and lowly,--\ -Perched on the little Alpine field her cot,--\ -This narrow world, so still and holy\ -Ensphering, like a heaven, her lot.\ -And I, God's hatred daring,\ -Could not be content\ -The rocks all headlong bearing,\ -By me to ruins rent,--\ -Her, yea her peace, must I o'erwhelm and bury!\ -This victim, hell, to thee was necessary!\ -Help me, thou fiend, the pang soon ending!\ -What must be, let it quickly be!\ -And let her fate upon my head descending,\ -Crush, at one blow, both her and me.\ -\ -_Mephistopheles_. Ha! how it seethes again and glows!\ -Go in and comfort her, thou dunce!\ -Where such a dolt no outlet sees or knows,\ -He thinks he's reached the end at once.\ -None but the brave deserve the fair!\ -Thou _hast_ had devil enough to make a decent show of.\ -For all the world a devil in despair\ -Is just the insipidest thing I know of.\ -\ -\ -\ -\ - MARGERY'S ROOM.\ -\ - MARGERY [_at the spinning-wheel alone_].\ - My heart is heavy,\ - My peace is o'er;\ - I never--ah! never--\ - Shall find it more.\ - While him I crave,\ - Each place is the grave,\ - The world is all\ - Turned into gall.\ - My wretched brain\ - Has lost its wits,\ - My wretched sense\ - Is all in bits.\ - My heart is heavy,\ - My peace is o'er;\ - I never--ah! never--\ - Shall find it more.\ - Him only to greet, I\ - The street look down,\ - Him only to meet, I\ - Roam through town.\ - His lofty step,\ - His noble height,\ - His smile of sweetness,\ - His eye of might,\ - His words of magic,\ - Breathing bliss,\ - His hand's warm pressure\ - And ah! his kiss.\ - My heart is heavy,\ - My peace is o'er,\ - I never--ah! never--\ - Shall find it more.\ - My bosom yearns\ - To behold him again.\ - Ah, could I find him\ - That best of men!\ - I'd tell him then\ - How I did miss him,\ - And kiss him\ - As much as I could,\ - Die on his kisses\ - I surely should!\ -\ -\ -\ -\ - MARTHA'S GARDEN.\ -\ - MARGARET. FAUST.\ -\ -_Margaret_. Promise me, Henry.\ -\ -_Faust_. What I can.\ -\ -_Margaret_. How is it now with thy religion, say?\ -I know thou art a dear good man,\ -But fear thy thoughts do not run much that way.\ -\ -_Faust_. Leave that, my child! Enough, thou hast my heart;\ -For those I love with life I'd freely part;\ -I would not harm a soul, nor of its faith bereave it.\ -\ -_Margaret_. That's wrong, there's one true faith--one must believe it?\ -\ -_Faust_. Must one?\ -\ -_Margaret_. Ah, could I influence thee, dearest!\ -The holy sacraments thou scarce reverest.\ -\ -_Faust_. I honor them.\ -\ -_Margaret_. But yet without desire.\ -Of mass and confession both thou'st long begun to tire.\ -Believest thou in God?\ -\ -_Faust_. My. darling, who engages\ -To say, I do believe in God?\ -The question put to priests or sages:\ -Their answer seems as if it sought\ -To mock the asker.\ -\ -_Margaret_. Then believ'st thou not?\ -\ -_Faust_. Sweet face, do not misunderstand my thought!\ -Who dares express him?\ -And who confess him,\ -Saying, I do believe?\ -A man's heart bearing,\ -What man has the daring\ -To say: I acknowledge him not?\ -The All-enfolder,\ -The All-upholder,\ -Enfolds, upholds He not\ -Thee, me, Himself?\ -Upsprings not Heaven's blue arch high o'er thee?\ -Underneath thee does not earth stand fast?\ -See'st thou not, nightly climbing,\ -Tenderly glancing eternal stars?\ -Am I not gazing eye to eye on thee?\ -Through brain and bosom\ -Throngs not all life to thee,\ -Weaving in everlasting mystery\ -Obscurely, clearly, on all sides of thee?\ -Fill with it, to its utmost stretch, thy breast,\ -And in the consciousness when thou art wholly blest,\ -Then call it what thou wilt,\ -Joy! Heart! Love! God!\ -I have no name to give it!\ -All comes at last to feeling;\ -Name is but sound and smoke,\ -Beclouding Heaven's warm glow.\ -\ -_Margaret_. That is all fine and good, I know;\ -And just as the priest has often spoke,\ -Only with somewhat different phrases.\ -\ -_Faust_. All hearts, too, in all places,\ -Wherever Heaven pours down the day's broad blessing,\ -Each in its way the truth is confessing;\ -And why not I in mine, too?\ -\ -_Margaret_. Well, all have a way that they incline to,\ -But still there is something wrong with thee;\ -Thou hast no Christianity.\ -\ -_Faust_. Dear child!\ -\ -_Margaret_. It long has troubled me\ -That thou shouldst keep such company.\ -\ -_Faust_. How so?\ -\ -_Margaret_. The man whom thou for crony hast,\ -Is one whom I with all my soul detest.\ -Nothing in all my life has ever\ -Stirred up in my heart such a deep disfavor\ -As the ugly face that man has got.\ -\ -_Faust_. Sweet plaything; fear him not!\ -\ -_Margaret_. His presence stirs my blood, I own.\ -I can love almost all men I've ever known;\ -But much as thy presence with pleasure thrills me,\ -That man with a secret horror fills me.\ -And then for a knave I've suspected him long!\ -God pardon me, if I do him wrong!\ -\ -_Faust_. To make up a world such odd sticks are needed.\ -\ -_Margaret_. Shouldn't like to live in the house where he did!\ -Whenever I see him coming in,\ -He always wears such a mocking grin.\ -Half cold, half grim;\ -One sees, that naught has interest for him;\ -'Tis writ on his brow and can't be mistaken,\ -No soul in him can love awaken.\ -I feel in thy arms so happy, so free,\ -I yield myself up so blissfully,\ -He comes, and all in me is closed and frozen now.\ -\ -_Faust_. Ah, thou mistrustful angel, thou!\ -\ -_Margaret_. This weighs on me so sore,\ -That when we meet, and he is by me,\ -I feel, as if I loved thee now no more.\ -Nor could I ever pray, if he were nigh me,\ -That eats the very heart in me;\ -Henry, it must be so with thee.\ -\ -_Faust_. 'Tis an antipathy of thine!\ -\ -_Margaret_. Farewell!\ -\ -_Faust_. Ah, can I ne'er recline\ -One little hour upon thy bosom, pressing\ -My heart to thine and all my soul confessing?\ -\ -_Margaret_. Ah, if my chamber were alone,\ -This night the bolt should give thee free admission;\ -But mother wakes at every tone,\ -And if she had the least suspicion,\ -Heavens! I should die upon the spot!\ -\ -_Faust_. Thou angel, need of that there's not.\ -Here is a flask! Three drops alone\ -Mix with her drink, and nature\ -Into a deep and pleasant sleep is thrown.\ -\ -_Margaret_. Refuse thee, what can I, poor creature?\ -I hope, of course, it will not harm her!\ -\ -_Faust_. Would I advise it then, my charmer?\ -\ -_Margaret_. Best man, when thou dost look at me,\ -I know not what, moves me to do thy will;\ -I have already done so much for thee,\ -Scarce any thing seems left me to fulfil.\ - [_Exit_.]\ -\ - Enter_ MEPHISTOPHELES.\ -\ -_Mephtftopheles_. The monkey! is she gone?\ -\ -_Faust_. Hast played the spy again?\ -\ -_Mephistopheles_. I overheard it all quite fully.\ -The Doctor has been well catechized then?\ -Hope it will sit well on him truly.\ -The maidens won't rest till they know if the men\ -Believe as good old custom bids them do.\ -They think: if there he yields, he'll follow our will too.\ -\ -_Faust_. Monster, thou wilt not, canst not see,\ -How this true soul that loves so dearly,\ -Yet hugs, at every cost,\ -The faith which she\ -Counts Heaven itself, is horror-struck sincerely\ -To think of giving up her dearest man for lost.\ -\ -_Mephistopheles_. Thou supersensual, sensual wooer,\ -A girl by the nose is leading thee.\ -\ -_Faust_. Abortion vile of fire and sewer!\ -\ -_Mephistopheles_. In physiognomy, too, her skill is masterly.\ -When I am near she feels she knows not how,\ -My little mask some secret meaning shows;\ -She thinks, I'm certainly a genius, now,\ -Perhaps the very devil--who knows?\ -To-night then?--\ -\ -_Faust_. Well, what's that to you?\ -\ -_Mephistopheles_. I find my pleasure in it, too!\ -\ -\ -\ -\ - AT THE WELL.\ -\ - MARGERY _and_ LIZZY _with Pitchers.\ -\ -_Lizzy_. Hast heard no news of Barbara to-day?\ -\ -_Margery_. No, not a word. I've not been out much lately.\ -\ -_Lizzy_. It came to me through Sybill very straightly.\ -She's made a fool of herself at last, they say.\ -That comes of taking airs!\ -\ -_Margery_. What meanst thou?\ -\ -_Lizzy_. Pah!\ -She daily eats and drinks for two now.\ -\ -_Margery_. Ah!\ -\ -_Lizzy_. It serves the jade right for being so callow.\ -How long she's been hanging upon the fellow!\ -Such a promenading!\ -To fair and dance parading!\ -Everywhere as first she must shine,\ -He was treating her always with tarts and wine;\ -She began to think herself something fine,\ -And let her vanity so degrade her\ -That she even accepted the presents he made her.\ -There was hugging and smacking, and so it went on--\ -And lo! and behold! the flower is gone!\ -\ -_Margery_. Poor thing!\ -\ -_Lizzy_. Canst any pity for her feel!\ -When such as we spun at the wheel,\ -Our mothers kept us in-doors after dark;\ -While she stood cozy with her spark,\ -Or sate on the door-bench, or sauntered round,\ -And never an hour too long they found.\ -But now her pride may let itself down,\ -To do penance at church in the sinner's gown!\ -\ -_Margery_. He'll certainly take her for his wife.\ -\ -_Lizzy_. He'd be a fool! A spruce young blade\ -Has room enough to ply his trade.\ -Besides, he's gone.\ -\ -_Margery_. Now, that's not fair!\ -\ -_Lizzy_. If she gets him, her lot'll be hard to bear.\ -The boys will tear up her wreath, and what's more,\ -We'll strew chopped straw before her door.\ -\ - [_Exit._]\ -\ -_Margery [going home]_. Time was when I, too, instead of bewailing,\ -Could boldly jeer at a poor girl's failing!\ -When my scorn could scarcely find expression\ -At hearing of another's transgression!\ -How black it seemed! though black as could be,\ -It never was black enough for me.\ -I blessed my soul, and felt so high,\ -And now, myself, in sin I lie!\ -Yet--all that led me to it, sure,\ -O God! it was so dear, so pure!\ -\ -\ -\ -\ - DONJON.[27]\ -\ - [_In a niche a devotional image of the Mater Dolorosa,\ - before it pots of flowers._]\ -\ -MARGERY [_puts fresh flowers into the pots_].\ - Ah, hear me,\ - Draw kindly near me,\ - Mother of sorrows, heal my woe!\ -\ - Sword-pierced, and stricken\ - With pangs that sicken,\ - Thou seest thy son's last life-blood flow!\ -\ - Thy look--thy sighing---\ - To God are crying,\ - Charged with a son's and mother's woe!\ -\ - Sad mother!\ - What other\ - Knows the pangs that eat me to the bone?\ - What within my poor heart burneth,\ - How it trembleth, how it yearneth,\ - Thou canst feel and thou alone!\ -\ - Go where I will, I never\ - Find peace or hope--forever\ - Woe, woe and misery!\ -\ - Alone, when all are sleeping,\ - I'm weeping, weeping, weeping,\ - My heart is crushed in me.\ -\ - The pots before my window,\ - In the early morning-hours,\ - Alas, my tears bedewed them,\ - As I plucked for thee these flowers,\ -\ - When the bright sun good morrow\ - In at my window said,\ - Already, in my anguish,\ - I sate there in my bed.\ -\ - From shame and death redeem me, oh!\ - Draw near me,\ - And, pitying, hear me,\ - Mother of sorrows, heal my woe!\ -\ -\ -\ -\ - NIGHT.\ -\ - _Street before_ MARGERY'S _Door._\ -\ -\ - VALENTINE [_soldier,_ MARGERY'S _brother_].\ -\ -When at the mess I used to sit,\ -Where many a one will show his wit,\ -And heard my comrades one and all\ -The flower of the sex extol,\ -Drowning their praise with bumpers high,\ -Leaning upon my elbows, I\ -Would hear the braggadocios through,\ -And then, when it came my turn, too,\ -Would stroke my beard and, smiling, say,\ -A brimming bumper in my hand:\ -All very decent in their way!\ -But is there one, in all the land,\ -With my sweet Margy to compare,\ -A candle to hold to my sister fair?\ -Bravo! Kling! Klang! it echoed round!\ -One party cried: 'tis truth he speaks,\ -She is the jewel of the sex!\ -And the braggarts all in silence were bound.\ -And now!--one could pull out his hair with vexation,\ -And run up the walls for mortification!--\ -Every two-legged creature that goes in breeches\ -Can mock me with sneers and stinging speeches!\ -And I like a guilty debtor sitting,\ -For fear of each casual word am sweating!\ -And though I could smash them in my ire,\ -I dare not call a soul of them liar.\ -\ -What's that comes yonder, sneaking along?\ -There are two of them there, if I see not wrong.\ -Is't he, I'll give him a dose that'll cure him,\ -He'll not leave the spot alive, I assure him!\ -\ -\ - FAUST. MEPHISTOPHELES.\ -\ -_Faust_. How from yon window of the sacristy\ -The ever-burning lamp sends up its glimmer,\ -And round the edge grows ever dimmer,\ -Till in the gloom its flickerings die!\ -So in my bosom all is nightlike.\ -\ -_Mephistopheles_. A starving tom-cat I feel quite like,\ -That o'er the fire ladders crawls\ -Then softly creeps, ground the walls.\ -My aim's quite virtuous ne'ertheless,\ -A bit of thievish lust, a bit of wantonness.\ -I feel it all my members haunting--\ -The glorious Walpurgis night.\ -One day--then comes the feast enchanting\ -That shall all pinings well requite.\ -\ -_Faust_. Meanwhile can that the casket be, I wonder,\ -I see behind rise glittering yonder.[28]\ -\ -_Mephistopheles_. Yes, and thou soon shalt have the pleasure\ -Of lifting out the precious treasure.\ -I lately 'neath the lid did squint,\ -Has piles of lion-dollars[29] in't.\ -\ -_Faust_. But not a jewel? Not a ring?\ -To deck my mistress not a trinket?\ -\ -_Mephistopheles_. I caught a glimpse of some such thing,\ -Sort of pearl bracelet I should think it.\ -\ -_Faust_. That's well! I always like to bear\ -Some present when I visit my fair.\ -\ -_Mephistopheles_. You should not murmur if your fate is,\ -To have a bit of pleasure gratis.\ -Now, as the stars fill heaven with their bright throng,\ -List a fine piece, artistic purely:\ -I sing her here a moral song,\ -To make a fool of her more surely.\ - [_Sings to the guitar_.][30]\ - What dost thou here,\ - Katrina dear,\ - At daybreak drear,\ - Before thy lover's chamber?\ - Give o'er, give o'er!\ - The maid his door\ - Lets in, no more\ - Goes out a maid--remember!\ -\ - Take heed! take heed!\ - Once done, the deed\ - Ye'll rue with speed--\ - And then--good night--poor thing--a!\ - Though ne'er so fair\ - His speech, beware,\ - Until you bear\ - His ring upon your finger.\ -\ -_Valentine_ [_comes forward_].\ -Whom lur'ft thou here? what prey dost scent?\ -Rat-catching[81] offspring of perdition!\ -To hell goes first the instrument!\ -To hell then follows the musician!\ -\ -_Mephistopheles_. He 's broken the guitar! to music, then, good-bye, now.\ -\ -_Valentine_. A game of cracking skulls we'll try now!\ -\ -_Mephistopbeles_ [_to Faust_]. Never you flinch, Sir Doctor! Brisk!\ -Mind every word I say---be wary!\ -Stand close by me, out with your whisk!\ -Thrust home upon the churl! I'll parry.\ -\ -_Valentine_. Then parry that!\ -\ -_Mephistopheles_. Be sure. Why not?\ -\ -_Valentine_. And that!\ -\ -_Mephistopheles_. With ease!\ -\ -_Valentine_. The devil's aid he's got!\ -But what is this? My hand's already lame.\ -\ -_Mephistopheles_ [_to Faust_]. Thrust home!\ -\ -_Valentine_ [_falls_]. O woe!\ -\ -_Mephistopheles_. Now is the lubber tame!\ -But come! We must be off. I hear a clatter;\ -And cries of murder, too, that fast increase.\ -I'm an old hand to manage the police,\ -But then the penal court's another matter.\ -\ -_Martha_. Come out! Come out!\ -\ -_Margery_ [_at the window_]. Bring on a light!\ -\ -_Martha_ [_as above_]. They swear and scuffle, scream and fight.\ -\ -_People_. There's one, has got's death-blow!\ -\ -_Martha_ [_coming out_]. Where are the murderers, have they flown?\ -\ -_Margery_ [_coming out_]. Who's lying here?\ -\ -_People_. Thy mother's son.\ -\ -_Margery_. Almighty God! What woe!\ -\ -_Valentine_. I'm dying! that is quickly said,\ -And even quicklier done.\ -Women! Why howl, as if half-dead?\ -Come, hear me, every one!\ - [_All gather round him_.]\ -My Margery, look! Young art thou still,\ -But managest thy matters ill,\ -Hast not learned out yet quite.\ -I say in confidence--think it o'er:\ -Thou art just once for all a whore;\ -Why, be one, then, outright.\ -\ -_Margery_. My brother! God! What words to me!\ -\ -_Valentine_. In this game let our Lord God be!\ -That which is done, alas! is done.\ -And every thing its course will run.\ -With one you secretly begin,\ -Presently more of them come in,\ -And when a dozen share in thee,\ -Thou art the whole town's property.\ -\ -When shame is born to this world of sorrow,\ -The birth is carefully hid from sight,\ -And the mysterious veil of night\ -To cover her head they borrow;\ -Yes, they would gladly stifle the wearer;\ -But as she grows and holds herself high,\ -She walks uncovered in day's broad eye,\ -Though she has not become a whit fairer.\ -The uglier her face to sight,\ -The more she courts the noonday light.\ -\ -Already I the time can see\ -When all good souls shall shrink from thee,\ -Thou prostitute, when thou go'st by them,\ -As if a tainted corpse were nigh them.\ -Thy heart within thy breast shall quake then,\ -When they look thee in the face.\ -Shalt wear no gold chain more on thy neck then!\ -Shalt stand no more in the holy place!\ -No pleasure in point-lace collars take then,\ -Nor for the dance thy person deck then!\ -But into some dark corner gliding,\ -'Mong beggars and cripples wilt be hiding;\ -And even should God thy sin forgive,\ -Wilt be curs'd on earth while thou shalt live!\ -\ -_Martha_. Your soul to the mercy of God surrender!\ -Will you add to your load the sin of slander?\ -\ -_Valentine_. Could I get at thy dried-up frame,\ -Vile bawd, so lost to all sense of shame!\ -Then might I hope, e'en this side Heaven,\ -Richly to find my sins forgiven.\ -\ -_Margery_. My brother! This is hell to me!\ -\ -_Valentine_. I tell thee, let these weak tears be!\ -When thy last hold of honor broke,\ -Thou gav'st my heart the heaviest stroke.\ -I'm going home now through the grave\ -To God, a soldier and a brave.\ - [_Dies_.]\ -\ -\ -\ -\ - CATHEDRAL.\ -\ - _Service, Organ, and Singing._\ -\ -\ - [MARGERY _amidst a crowd of people._ EVIL SPIRIT _behind_ MARGERY.]\ -\ -_Evil Spirit_. How different was it with thee, Margy,\ -When, innocent and artless,\ -Thou cam'st here to the altar,\ -From the well-thumbed little prayer-book,\ -Petitions lisping,\ -Half full of child's play,\ -Half full of Heaven!\ -Margy!\ -Where are thy thoughts?\ -What crime is buried\ -Deep within thy heart?\ -Prayest thou haply for thy mother, who\ -Slept over into long, long pain, on thy account?\ -Whose blood upon thy threshold lies?\ ---And stirs there not, already\ -Beneath thy heart a life\ -Tormenting itself and thee\ -With bodings of its coming hour?\ -\ -_Margery_. Woe! Woe!\ -Could I rid me of the thoughts,\ -Still through my brain backward and forward flitting,\ -Against my will!\ -\ -_Chorus_. Dies irae, dies illa\ -Solvet saeclum in favillâ.\ -\ - [_Organ plays_.]\ -\ -_Evil Spirit_. Wrath smites thee!\ -Hark! the trumpet sounds!\ -The graves are trembling!\ -And thy heart,\ -Made o'er again\ -For fiery torments,\ -Waking from its ashes\ -Starts up!\ -\ -_Margery_. Would I were hence!\ -I feel as if the organ's peal\ -My breath were stifling,\ -The choral chant\ -My heart were melting.\ -\ -_Chorus_. Judex ergo cum sedebit,\ -Quidquid latet apparebit.\ -Nil inultum remanebit.\ -\ -_Margery_. How cramped it feels!\ -The walls and pillars\ -Imprison me!\ -And the arches\ -Crush me!--Air!\ -\ -_Evil Spirit_. What! hide thee! sin and shame\ -Will not be hidden!\ -Air? Light?\ -Woe's thee!\ -\ -_Chorus_. Quid sum miser tunc dicturus?\ -Quem patronum rogaturus?\ -Cum vix justus sit securus.\ -\ -_Evil Spirit_. They turn their faces,\ -The glorified, from thee.\ -To take thy hand, the pure ones\ -Shudder with horror.\ -Woe!\ -\ -_Chorus_. Quid sum miser tunc dicturus?\ -\ -_Margery_. Neighbor! your phial!--\ - [_She swoons._]\ -\ -\ -\ -\ - WALPURGIS NIGHT.[32]\ -\ - _Harz Mountains._\ -\ - _District of Schirke and Elend._\ -\ -\ - FAUST. MEPHISTOPHELES.\ -\ -_Mephistopheles_. Wouldst thou not like a broomstick, now, to ride on?\ -At this rate we are, still, a long way off;\ -I'd rather have a good tough goat, by half,\ -Than the best legs a man e'er set his pride on.\ -\ -_Faust_. So long as I've a pair of good fresh legs to stride on,\ -Enough for me this knotty staff.\ -What use of shortening the way!\ -Following the valley's labyrinthine winding,\ -Then up this rock a pathway finding,\ -From which the spring leaps down in bubbling play,\ -That is what spices such a walk, I say!\ -Spring through the birch-tree's veins is flowing,\ -The very pine is feeling it;\ -Should not its influence set our limbs a-glowing?\ -\ -_Mephistopheles_. I do not feel it, not a bit!\ -My wintry blood runs very slowly;\ -I wish my path were filled with frost and snow.\ -The moon's imperfect disk, how melancholy\ -It rises there with red, belated glow,\ -And shines so badly, turn where'er one can turn,\ -At every step he hits a rock or tree!\ -With leave I'll beg a Jack-o'lantern!\ -I see one yonder burning merrily.\ -Heigh, there! my friend! May I thy aid desire?\ -Why waste at such a rate thy fire?\ -Come, light us up yon path, good fellow, pray!\ -\ -_Jack-o'lantern_. Out of respect, I hope I shall be able\ -To rein a nature quite unstable;\ -We usually take a zigzag way.\ -\ -_Mephistopheles_. Heigh! heigh! He thinks man's crooked course to travel.\ -Go straight ahead, or, by the devil,\ -I'll blow your flickering life out with a puff.\ -\ -_Jack-o'lantern_. You're master of the house, that's plain enough,\ -So I'll comply with your desire.\ -But see! The mountain's magic-mad to-night,\ -And if your guide's to be a Jack-o'lantern's light,\ -Strict rectitude you'll scarce require.\ -\ -FAUST, MEPHISTOPHELES, JACK-O'LANTERN, _in alternate song_.\ -\ - Spheres of magic, dream, and vision,\ - Now, it seems, are opening o'er us.\ - For thy credit, use precision!\ - Let the way be plain before us\ - Through the lengthening desert regions.\ -\ - See how trees on trees, in legions,\ - Hurrying by us, change their places,\ - And the bowing crags make faces,\ - And the rocks, long noses showing,\ - Hear them snoring, hear them blowing![33]\ -\ - Down through stones, through mosses flowing,\ - See the brook and brooklet springing.\ - Hear I rustling? hear I singing?\ - Love-plaints, sweet and melancholy,\ - Voices of those days so holy?\ - All our loving, longing, yearning?\ - Echo, like a strain returning\ - From the olden times, is ringing.\ -\ - Uhu! Schuhu! Tu-whit! Tu-whit!\ - Are the jay, and owl, and pewit\ - All awake and loudly calling?\ - What goes through the bushes yonder?\ - Can it be the Salamander--\ - Belly thick and legs a-sprawling?\ - Roots and fibres, snake-like, crawling,\ - Out from rocky, sandy places,\ - Wheresoe'er we turn our faces,\ - Stretch enormous fingers round us,\ - Here to catch us, there confound us;\ - Thick, black knars to life are starting,\ - Polypusses'-feelers darting\ - At the traveller. Field-mice, swarming,\ - Thousand-colored armies forming,\ - Scamper on through moss and heather!\ - And the glow-worms, in the darkling,\ - With their crowded escort sparkling,\ - Would confound us altogether.\ -\ - But to guess I'm vainly trying--\ - Are we stopping? are we hieing?\ - Round and round us all seems flying,\ - Rocks and trees, that make grimaces,\ - And the mist-lights of the places\ - Ever swelling, multiplying.\ -\ -_Mephistopheles_. Here's my coat-tail--tightly thumb it!\ -We have reached a middle summit,\ -Whence one stares to see how shines\ -Mammon in the mountain-mines.\ -\ -_Faust_. How strangely through the dim recesses\ -A dreary dawning seems to glow!\ -And even down the deep abysses\ -Its melancholy quiverings throw!\ -Here smoke is boiling, mist exhaling;\ -Here from a vapory veil it gleams,\ -Then, a fine thread of light, goes trailing,\ -Then gushes up in fiery streams.\ -The valley, here, you see it follow,\ -One mighty flood, with hundred rills,\ -And here, pent up in some deep hollow,\ -It breaks on all sides down the hills.\ -Here, spark-showers, darting up before us,\ -Like golden sand-clouds rise and fall.\ -But yonder see how blazes o'er us,\ -All up and down, the rocky wall!\ -\ -_Mephistopheles_. Has not Sir Mammon gloriously lighted\ -His palace for this festive night?\ -Count thyself lucky for the sight:\ -I catch e'en now a glimpse of noisy guests invited.\ -\ -_Faust_. How the mad tempest[34] sweeps the air!\ -On cheek and neck the wind-gusts how they flout me.\ -\ -_Mephistopheles_. Must seize the rock's old ribs and hold on stoutly!\ -Else will they hurl thee down the dark abysses there.\ -A mist-rain thickens the gloom.\ -Hark, how the forests crash and boom!\ -Out fly the owls in dread and wonder;\ -Splitting their columns asunder,\ -Hear it, the evergreen palaces shaking!\ -Boughs are twisting and breaking!\ -Of stems what a grinding and moaning!\ -Of roots what a creaking and groaning!\ -In frightful confusion, headlong tumbling,\ -They fall, with a sound of thunder rumbling,\ -And, through the wreck-piled ravines and abysses,\ -The tempest howls and hisses.\ -Hearst thou voices high up o'er us?\ -Close around us--far before us?\ -Through the mountain, all along,\ -Swells a torrent of magic song.\ -\ -_Witches_ [_in chorus_]. The witches go to the Brocken's top,\ - The stubble is yellow, and green the crop.\ - They gather there at the well-known call,\ - Sir Urian[85] sits at the head of all.\ - Then on we go o'er stone and stock:\ - The witch, she--and--the buck.\ -\ -_Voice_. Old Baubo comes along, I vow!\ -She rides upon a farrow-sow.\ -\ -_Chorus_. Then honor to whom honor's due!\ - Ma'am Baubo ahead! and lead the crew!\ - A good fat sow, and ma'am on her back,\ - Then follow the witches all in a pack.\ -\ -_Voice_. Which way didst thou come?\ -\ -_Voice_. By the Ilsenstein!\ -Peeped into an owl's nest, mother of mine!\ -What a pair of eyes!\ -\ -_Voice_. To hell with your flurry!\ -Why ride in such hurry!\ -\ -_Voice_. The hag be confounded!\ -My skin flie has wounded!\ -\ -_Witches_ [_chorus]._ The way is broad, the way is long,\ - What means this noisy, crazy throng?\ - The broom it scratches, the fork it flicks,\ - The child is stifled, the mother breaks.\ -\ -_Wizards_ [_semi-chorus_]. Like housed-up snails we're creeping on,\ -The women all ahead are gone.\ -When to the Bad One's house we go,\ -She gains a thousand steps, you know.\ -\ -_The other half_. We take it not precisely so;\ -What she in thousand steps can go,\ -Make all the haste she ever can,\ -'Tis done in just one leap by man.\ -\ -_Voice_ [_above_]. Come on, come on, from Felsensee!\ -\ -_Voices_ [_from below_]. We'd gladly join your airy way.\ -For wash and clean us as much as we will,\ -We always prove unfruitful still.\ -\ -_Both chorusses_. The wind is hushed, the star shoots by,\ - The moon she hides her sickly eye.\ - The whirling, whizzing magic-choir\ - Darts forth ten thousand sparks of fire.\ -\ -_Voice_ [_from below_]. Ho, there! whoa, there!\ -\ -_Voice_ [_from above_]. Who calls from the rocky cleft below there?\ -\ -_Voice_ [_below_]. Take me too! take me too!\ -Three hundred years I've climbed to you,\ -Seeking in vain my mates to come at,\ -For I can never reach the summit.\ -\ -_Both chorusses_. Can ride the besom, the stick can ride,\ - Can stride the pitchfork, the goat can stride;\ - Who neither will ride to-night, nor can,\ - Must be forever a ruined man.\ -\ -_Half-witch_ [_below_]. I hobble on--I'm out of wind--\ -And still they leave me far behind!\ -To find peace here in vain I come,\ -I get no more than I left at home.\ -\ -_Chorus of witches_. The witch's salve can never fail,\ - A rag will answer for a sail,\ - Any trough will do for a ship, that's tight;\ - He'll never fly who flies not to-night.\ -\ -_Both chorusses_. And when the highest peak we round,\ - Then lightly graze along the ground,\ - And cover the heath, where eye can see,\ - With the flower of witch-errantry.\ - [_They alight_.]\ -\ -_Mephistopheles._ What squeezing and pushing, what rustling and hustling!\ -What hissing and twirling, what chattering and bustling!\ -How it shines and sparkles and burns and stinks!\ -A true witch-element, methinks!\ -Keep close! or we are parted in two winks.\ -Where art thou?\ -\ -_Faust_ [_in the distance_]. Here!\ -\ -_Mephistopheles_. What! carried off already?\ -Then I must use my house-right.--Steady!\ -Room! Squire Voland[36] comes. Sweet people, Clear the ground!\ -Here, Doctor, grasp my arm! and, at a single bound;\ -Let us escape, while yet 'tis easy;\ -E'en for the like of me they're far too crazy.\ -See! yonder, something shines with quite peculiar glare,\ -And draws me to those bushes mazy.\ -Come! come! and let us slip in there.\ -\ -_Faust_. All-contradicting sprite! To follow thee I'm fated.\ -But I must say, thy plan was very bright!\ -We seek the Brocken here, on the Walpurgis night,\ -Then hold ourselves, when here, completely isolated!\ -\ -_Mephistopheles_. What motley flames light up the heather!\ -A merry club is met together,\ -In a small group one's not alone.\ -\ -_Faust_. I'd rather be up there, I own!\ -See! curling smoke and flames right blue!\ -To see the Evil One they travel;\ -There many a riddle to unravel.\ -\ -_Mephistopheles_. And tie up many another, too.\ -Let the great world there rave and riot,\ -We here will house ourselves in quiet.\ -The saying has been long well known:\ -In the great world one makes a small one of his own.\ -I see young witches there quite naked all,\ -And old ones who, more prudent, cover.\ -For my sake some flight things look over;\ -The fun is great, the trouble small.\ -I hear them tuning instruments! Curs'd jangle!\ -Well! one must learn with such things not to wrangle.\ -Come on! Come on! For so it needs must be,\ -Thou shalt at once be introduced by me.\ -And I new thanks from thee be earning.\ -That is no scanty space; what sayst thou, friend?\ -Just take a look! thou scarce canst see the end.\ -There, in a row, a hundred fires are burning;\ -They dance, chat, cook, drink, love; where can be found\ -Any thing better, now, the wide world round?\ -\ -_Faust_. Wilt thou, as things are now in this condition,\ -Present thyself for devil, or magician?\ -\ -_Mephistopheles_. I've been much used, indeed, to going incognito;\ -\ -But then, on gala-day, one will his order show.\ -No garter makes my rank appear,\ -But then the cloven foot stands high in honor here.\ -Seest thou the snail? Look there! where she comes creeping yonder!\ -Had she already smelt the rat,\ -I should not very greatly wonder.\ -Disguise is useless now, depend on that.\ -Come, then! we will from fire to fire wander,\ -Thou shalt the wooer be and I the pander.\ - [_To a party who sit round expiring embers_.]\ -Old gentlemen, you scarce can hear the fiddle!\ -You'd gain more praise from me, ensconced there in the middle,\ -'Mongst that young rousing, tousing set.\ -One can, at home, enough retirement get.\ -\ -_General_. Trust not the people's fickle favor!\ -However much thou mayst for them have done.\ -Nations, as well as women, ever,\ -Worship the rising, not the setting sun.\ -\ -_Minister_. From the right path we've drifted far away,\ -The good old past my heart engages;\ -Those were the real golden ages,\ -When such as we held all the sway.\ -\ -_Parvenu_. We were no simpletons, I trow,\ -And often did the thing we should not;\ -But all is turning topsy-turvy now,\ -And if we tried to stem the wave, we could not.\ -\ -_Author_. Who on the whole will read a work today,\ -Of moderate sense, with any pleasure?\ -And as regards the dear young people, they\ -Pert and precocious are beyond all measure.\ -\ -_Mephistopheles_ [_who all at once appears very old_].\ -The race is ripened for the judgment day:\ -So I, for the last time, climb the witch-mountain, thinking,\ -And, as my cask runs thick, I say,\ -The world, too, on its lees is sinking.\ -\ -_Witch-broker_. Good gentlemen, don't hurry by!\ -The opportunity's a rare one!\ -My stock is an uncommon fair one,\ -Please give it an attentive eye.\ -There's nothing in my shop, whatever,\ -But on the earth its mate is found;\ -That has not proved itself right clever\ -To deal mankind some fatal wound.\ -No dagger here, but blood has some time stained it;\ -No cup, that has not held some hot and poisonous juice,\ -And stung to death the throat that drained it;\ -No trinket, but did once a maid seduce;\ -No sword, but hath some tie of sacred honor riven,\ -Or haply from behind through foeman's neck been driven.\ -\ -_Mephistopheles_. You're quite behind the times, I tell you, Aunty!\ -By-gones be by-gones! done is done!\ -Get us up something new and jaunty!\ -For new things now the people run.\ -\ -_Faust_. To keep my wits I must endeavor!\ -Call this a fair! I swear, I never--!\ -\ -_Mephistopheles_. Upward the billowy mass is moving;\ -You're shoved along and think, meanwhile, you're shoving.\ -\ -_Faust_. What woman's that?\ -\ -_Mephistopheles_. Mark her attentively.\ -That's Lilith.[37]\ -\ -_Faust_. Who?\ -\ -_Mephistopbeles_. Adam's first wife is she.\ -Beware of her one charm, those lovely tresses,\ -In which she shines preeminently fair.\ -When those soft meshes once a young man snare,\ -How hard 'twill be to escape he little guesses.\ -\ -_Faust_. There sit an old one and a young together;\ -They've skipped it well along the heather!\ -\ -_Mephistopheles_. No rest from that till night is through.\ -Another dance is up; come on! let us fall to.\ -\ -_Faust_ [_dancing with the young one_]. A lovely dream once came to me;\ -In it I saw an apple-tree;\ -Two beauteous apples beckoned there,\ -I climbed to pluck the fruit so fair.\ -\ -_The Fair one_. Apples you greatly seem to prize,\ -And did so even in Paradise.\ -I feel myself delighted much\ -That in my garden I have such.\ -\ -_Mephistopheles_ [_with the old hag_]. A dismal dream once came to me;\ -In it I saw a cloven tree,\ -It had a ------ but still,\ -I looked on it with right good-will.\ -\ -_The Hog_. With best respect I here salute\ -The noble knight of the cloven foot!\ -Let him hold a ------ near,\ -If a ------ he does not fear.\ -\ -_Proctophantasmist_.[38] What's this ye undertake? Confounded crew!\ -Have we not giv'n you demonstration?\ -No spirit stands on legs in all creation,\ -And here you dance just as we mortals do!\ -\ -_The Fair one_ [_dancing_]. What does that fellow at our ball?\ -\ -_Faust_ [_dancing_]. Eh! he must have a hand in all.\ -What others dance that he appraises.\ -Unless each step he criticizes,\ -The step as good as no step he will call.\ -But when we move ahead, that plagues him more than all.\ -If in a circle you would still keep turning,\ -As he himself in his old mill goes round,\ -He would be sure to call that sound!\ -And most so, if you went by his superior learning.\ -\ -_Proctophantasmist_. What, and you still are here! Unheard off obstinates!\ -Begone! We've cleared it up! You shallow pates!\ -The devilish pack from rules deliverance boasts.\ -We've grown so wise, and Tegel[39] still sees ghosts.\ -How long I've toiled to sweep these cobwebs from the brain,\ -And yet--unheard of folly! all in vain.\ -\ -_The Fair one_. And yet on us the stupid bore still tries it!\ -\ -_Proctophantasmist_. I tell you spirits, to the face,\ -I give to spirit-tyranny no place,\ -My spirit cannot exercise it.\ - [_They dance on_.]\ -I can't succeed to-day, I know it;\ -Still, there's the journey, which I like to make,\ -And hope, before the final step I take,\ -To rid the world of devil and of poet.\ -\ -_Mephistopheles_. You'll see him shortly sit into a puddle,\ -In that way his heart is reassured;\ -When on his rump the leeches well shall fuddle,\ -Of spirits and of spirit he'll be cured.\ - [_To_ FAUST, _who has left the dance_.]\ -Why let the lovely girl slip through thy fingers,\ -Who to thy dance so sweetly sang?\ -\ -_Faust_. Ah, right amidst her singing, sprang\ -A wee red mouse from her mouth and made me cower.\ -\ -_Mephistopheles_. That's nothing wrong! You're in a dainty way;\ -Enough, the mouse at least wan't gray.\ -Who minds such thing in happy amorous hour?\ -\ -_Faust_. Then saw I--\ -\ -_Mephistopheles_. What?\ -\ -_Faust_. Mephisto, seest thou not\ -Yon pale, fair child afar, who stands so sad and lonely,\ -And moves so slowly from the spot,\ -Her feet seem locked, and she drags them only.\ -I must confess, she seems to me\ -To look like my own good Margery.\ -\ -_Mephistopheles_. Leave that alone! The sight no health can bring.\ -it is a magic shape, an idol, no live thing.\ -To meet it never can be good!\ -Its haggard look congeals a mortal's blood,\ -And almost turns him into stone;\ -The story of Medusa thou hast known.\ -\ -_Faust_. Yes, 'tis a dead one's eyes that stare upon me,\ -Eyes that no loving hand e'er closed;\ -That is the angel form of her who won me,\ -Tis the dear breast on which I once reposed.\ -\ -_Mephistopheles_. 'Tis sorcery all, thou fool, misled by passion's dreams!\ -For she to every one his own love seems.\ -\ -_Faust_. What bliss! what woe! Methinks I never\ -My sight from that sweet form can sever.\ -Seeft thou, not thicker than a knife-blade's back,\ -A small red ribbon, fitting sweetly\ -The lovely neck it clasps so neatly?\ -\ -_Mephistopheles_. I see the streak around her neck.\ -Her head beneath her arm, you'll next behold her;\ -Perseus has lopped it from her shoulder,--\ -But let thy crazy passion rest!\ -Come, climb with me yon hillock's breast,\ -Was e'er the Prater[40] merrier then?\ -And if no sorcerer's charm is o'er me,\ -That is a theatre before me.\ -What's doing there?\ -\ -_Servibilis_. They'll straight begin again.\ -A bran-new piece, the very last of seven;\ -To have so much, the fashion here thinks fit.\ -By Dilettantes it is given;\ -'Twas by a Dilettante writ.\ -Excuse me, sirs, I go to greet you;\ -I am the curtain-raising Dilettant.\ -\ -_Mephistopheles_. When I upon the Blocksberg meet you,\ -That I approve; for there's your place, I grant.\ -\ -\ -\ -\ - WALPURGIS-NIGHT'S DREAM, OR OBERON AND TITANIA'S GOLDEN NUPTIALS.\ -\ - _Intermezzo_.\ -\ -\ -_Theatre manager_. Here, for once, we rest, to-day,\ -Heirs of Mieding's[41] glory.\ -All the scenery we display--\ -Damp vale and mountain hoary!\ -\ -_Herald_. To make the wedding a golden one,\ -Must fifty years expire;\ -But when once the strife is done,\ -I prize the _gold_ the higher.\ -\ -_Oberon_. Spirits, if my good ye mean,\ -Now let all wrongs be righted;\ -For to-day your king and queen\ -Are once again united.\ -\ -_Puck_. Once let Puck coming whirling round,\ -And set his foot to whisking,\ -Hundreds with him throng the ground,\ -Frolicking and frisking.\ -\ -_Ariel_. Ariel awakes the song\ -With many a heavenly measure;\ -Fools not few he draws along,\ -But fair ones hear with pleasure.\ -\ -_Oberon_. Spouses who your feuds would smother,\ -Take from us a moral!\ -Two who wish to love each other,\ -Need only first to quarrel.\ -\ -_Titania_. If she pouts and he looks grim,\ -Take them both together,\ -To the north pole carry him,\ -And off with her to t'other.\ -\ - _Orchestra Tutti_.\ -\ -_Fortissimo_. Fly-snouts and gnats'-noses, these,\ -And kin in all conditions,\ -Grass-hid crickets, frogs in trees,\ -We take for our musicians!\ -\ -_Solo_. See, the Bagpipe comes! fall back!\ -Soap-bubble's name he owneth.\ -How the _Schnecke-schnicke-schnack_\ -Through his snub-nose droneth!\ -_Spirit that is just shaping itself_. Spider-foot, toad's-belly, too,\ -Give the child, and winglet!\ -'Tis no animalcule, true,\ -But a poetic thinglet.\ -\ -_A pair of lovers_. Little step and lofty bound\ -Through honey-dew and flowers;\ -Well thou trippest o'er the ground,\ -But soarst not o'er the bowers.\ -\ -_Curious traveller_. This must be masquerade!\ -How odd!\ -My very eyes believe I?\ -Oberon, the beauteous God\ -Here, to-night perceive I!\ -\ -_Orthodox_. Neither claws, nor tail I see!\ -And yet, without a cavil,\ -Just as \"the Gods of Greece\"[42] were, he\ -Must also be a devil.\ -\ -_Northern artist_. What here I catch is, to be sure,\ -But sketchy recreation;\ -And yet for my Italian tour\ -'Tis timely preparation.\ -\ -_Purist_. Bad luck has brought me here, I see!\ -The rioting grows louder.\ -And of the whole witch company,\ -There are but two, wear powder.\ -\ -_Young witch_. Powder becomes, like petticoat,\ -Your little, gray old woman:\ -Naked I sit upon my goat,\ -And show the untrimmed human.\ -\ -_Matron_. To stand here jawing[43] with you, we\ -Too much good-breeding cherish;\ -But young and tender though you be,\ -I hope you'll rot and perish.\ -\ -_Leader of the music_. Fly-snouts and gnat-noses, please,\ -Swarm not so round the naked!\ -Grass-hid crickets, frogs in trees,\ -Keep time and don't forsake it!\ -\ -_Weathercock_ [_towards one side_]. Find better company, who can!\ -Here, brides attended duly!\ -There, bachelors, ranged man by man,\ -Most hopeful people truly!\ -\ -_Weathercock [towards the other side_].\ -And if the ground don't open straight,\ -The crazy crew to swallow,\ -You'll see me, at a furious rate,\ -Jump down to hell's black hollow.\ -\ -_Xenia[_44] We are here as insects, ah!\ -Small, sharp nippers wielding,\ -Satan, as our _cher papa_,\ -Worthy honor yielding.\ -\ -_Hennings_. See how naïvely, there, the throng\ -Among themselves are jesting,\ -You'll hear them, I've no doubt, ere long,\ -Their good kind hearts protesting.\ -\ -_Musagetes_. Apollo in this witches' group\ -Himself right gladly loses;\ -For truly I could lead this troop\ -Much easier than the muses.\ -\ -_Ci-devant genius of the age_. Right company will raise man up.\ -Come, grasp my skirt, Lord bless us!\ -The Blocksberg has a good broad top,\ -Like Germany's Parnassus.\ -\ -_Curious traveller_. Tell me who is that stiff man?\ -With what stiff step he travels!\ -He noses out whate'er he can.\ -\"He scents the Jesuit devils.\"\ -\ -_Crane_. In clear, and muddy water, too,\ -The long-billed gentleman fishes;\ -Our pious gentlemen we view\ -Fingering in devils' dishes.\ -\ -_Child of this world_. Yes, with the pious ones, 'tis clear,\ -\"All's grist that comes to their mill;\"\ -They build their tabernacles here,\ -On Blocksberg, as on Carmel.\ -\ -_Dancer_. Hark! a new choir salutes my ear!\ -I hear a distant drumming.\ -\"Be not disturbed! 'mong reeds you hear\ -The one-toned bitterns bumming.\"\ -\ -_Dancing-master._ How each his legs kicks up and flings,\ -Pulls foot as best he's able!\ -The clumsy hops, the crooked springs,\ -'Tis quite disreputable!\ -\ -_Fiddler_. The scurvy pack, they hate, 'tis clear,\ -Like cats and dogs, each other.\ -Like Orpheus' lute, the bagpipe here\ -Binds beast to beast as brother.\ -\ -_Dogmatist_. You'll not scream down my reason, though,\ -By criticism's cavils.\ -The devil's something, that I know,\ -Else how could there be devils?\ -\ -_Idealist_. Ah, phantasy, for once thy sway\ -Is guilty of high treason.\ -If all I see is I, to-day,\ -'Tis plain I've lost my reason.\ -\ -_Realist_. To me, of all life's woes and plagues,\ -Substance is most provoking,\ -For the first time I feel my legs\ -Beneath me almost rocking.\ -\ -_Supernaturalist_. I'm overjoyed at being here,\ -And even among these rude ones;\ -For if bad spirits are, 'tis clear,\ -There also must be good ones.\ -\ -_Skeptic_. Where'er they spy the flame they roam,\ -And think rich stores to rifle,\ -Here such as I are quite at home,\ -For _Zweifel_ rhymes with _Teufel_.[45]\ -\ -_Leader of the music_. Grass-hid cricket, frogs in trees,\ -You cursed dilettanti!\ -Fly-snouts and gnats'-noses, peace!\ -Musicians you, right jaunty!\ -\ -_The Clever ones_. Sans-souci we call this band\ -Of merry ones that skip it;\ -Unable on our feet to stand,\ -Upon our heads we trip it.\ -\ -_The Bunglers_. Time was, we caught our tit-bits, too,\ -God help us now! that's done with!\ -We've danced our leathers entirely through,\ -And have only bare soles to run with.\ -\ -_Jack-o'lanterns_. From the dirty bog we come,\ -Whence we've just arisen:\ -Soon in the dance here, quite at home,\ -As gay young _sparks_ we'll glisten.\ -\ -_Shooting star_. Trailing from the sky I shot,\ -Not a star there missed me:\ -Crooked up in this grassy spot,\ -Who to my legs will assist me?\ -\ -_The solid men_. Room there! room there! clear the ground!\ -Grass-blades well may fall so;\ -Spirits are we, but 'tis found\ -They have plump limbs also.\ -\ -_Puck_. Heavy men! do not, I say,\ -Like elephants' calves go stumping:\ -Let the plumpest one to-day\ -Be Puck, the ever-jumping.\ -\ -_Ariel_. If the spirit gave, indeed,\ -If nature gave you, pinions,\ -Follow up my airy lead\ -To the rose-dominions!\ -\ -_Orchestra_ [_pianissimo_]. Gauzy mist and fleecy cloud\ -Sun and wind have banished.\ -Foliage rustles, reeds pipe loud,\ -All the show has vanished.\ -\ -\ -\ -\ - DREARY DAY.[46]\ -\ - _Field_.\ -\ -\ - FAUST. MEPHISTOPHELES.\ -\ -_Faust_. In wretchedness! In despair! Long hunted up and down the earth, a\ -miserable fugitive, and caught at last! Locked up as a malefactor in\ -prison, to converse with horrible torments--the sweet, unhappy creature!\ -Even to this pass! even to this!--Treacherous, worthless spirit, and this\ -thou hast hidden from me!--Stand up here--stand up! Roll thy devilish eyes\ -round grimly in thy head! Stand and defy me with thy intolerable presence!\ -Imprisoned! In irretrievable misery! Given over to evil spirits and to the\ -judgment of unfeeling humanity, and me meanwhile thou lullest in insipid\ -dissipations, concealest from me her growing anguish, and leavest her\ -without help to perish!\ -\ -_Mephistopheles_. She is not the first!\ -\ -_Faust_. Dog! abominable monster! Change him, thou Infinite Spirit! change\ -the worm back into his canine form, as he was often pleased in the night\ -to trot before me, to roll before the feet of the harmless wanderer, and,\ -when he fell, to hang on his shoulders. Change him again into his favorite\ -shape, that he may crawl before me on his belly in the sand, and that I\ -may tread him under foot, the reprobate!--Not the first! Misery! Misery!\ -inconceivable by any human soul! that more than one creature ever sank\ -into the depth of this wretchedness, that the first in its writhing\ -death-agony did not atone for the guilt of all the rest before the eyes of\ -the eternally Forgiving! My very marrow and life are consumed by the\ -misery of this single one; thou grinnest away composedly at the fate of\ -thousands!\ -\ -_Mephistopheles_. Here we are again at our wits' ends already, where the\ -thread of sense, with you mortals, snaps short. Why make a partnership\ -with us, if thou canst not carry it through? Wilt fly, and art not proof\ -against dizziness? Did we thrust ourselves on thee, or thou on us?\ -\ -_Faust_. Gnash not so thy greedy teeth against me! It disgusts me!--Great\ -and glorious spirit, thou that deignedst to appear to me, who knowest my\ -heart and soul, why yoke me to this shame-fellow, who feeds on mischief\ -and feasts on ruin?\ -\ -_Mephistopheles_. Hast thou done?\ -\ -_Faust_. Rescue her! O woe be unto thee! The most horrible curse on thee\ -for thousands of years!\ -\ -_Mephistopheles_. I cannot loose the bonds of the avenger, nor open his\ -bolts.--Rescue her!--Who was it that plunged her into ruin? I or thou?\ - [FAUST _looks wildly round_.]\ -Grasp'st thou after the thunder? Well that it was not given to you\ -miserable mortals! To crush an innocent respondent, that is a sort of\ -tyrant's-way of getting room to breathe in embarrassment.\ -\ -_Faust_. Lead me to her! She shall be free!\ -\ -_Mephistopheles_. And the danger which thou incurrest? Know that the guilt\ -of blood at thy hand still lies upon the town. Over the place of the\ -slain, avenging spirits hover and lurk for the returning murderer.\ -\ -_Faust_. That, too, from thee? Murder and death of a world upon thee,\ -monster! Lead me thither, I say, and free her!\ -\ -_Mephistopheles_. I will lead thee, and hear what I can do! Have I all\ -power in heaven and on earth? I will becloud the turnkey's senses; possess\ -thyself of the keys, and bear her out with human hand. I will watch! The\ -magic horses shall be ready, and I will bear you away. So much I can do.\ -\ -_Faust_. Up and away!\ -\ -\ -\ -\ - NIGHT. OPEN FIELD.\ -\ - FAUST. MEPHISTOPHELES.\ - _Scudding along on black horses_.\ -\ -_Faust_. What's doing, off there, round the gallows-tree?[47]\ -\ -_Mephistopheles_. Know not what they are doing and brewing.\ -\ -_Faust_. Up they go--down they go--wheel about, reel about.\ -\ -_Mephistopheles_. A witches'-crew.\ -\ -_Faust_. They're strewing and vowing.\ -\ -_Mephistopheles_. Pass on! Pass on!\ -\ -\ -\ -\ - PRISON.\ -\ - FAUST [_with a bunch of keys and a lamp, before an iron door_]\ -A long unwonted chill comes o'er me,\ -I feel the whole great load of human woe.\ -Within this clammy wall that frowns before me\ -Lies one whom blinded love, not guilt, brought low!\ -Thou lingerest, in hope to grow bolder!\ -Thou fearest again to behold her!\ -On! Thy shrinking slowly hastens the blow!\ - [_He grasps the key. Singing from within_.]\ -My mother, the harlot,\ -That strung me up!\ -My father, the varlet,\ -That ate me up!\ -My sister small,\ -She gathered up all\ -The bones that day,\ -And in a cool place did lay;\ -Then I woke, a sweet bird, at a magic call;\ -Fly away, fly away!\ -\ -_Faust [unlocking_]. She little dreams, her lover is so near,\ -The clanking chains, the rustling straw can hear;\ - [_He enters_.]\ -\ -_Margaret [burying herself in the bed_]. Woe! woe!\ -They come. O death of bitterness!\ -\ -_Faust_ [_softly_]. Hush! hush! I come to free thee; thou art dreaming.\ -\ -_Margaret_ [_prostrating herself before him_].\ -Art thou a man, then feel for my distress.\ -\ -_Faust_. Thou'lt wake the guards with thy loud screaming!\ - [_He seizes the chains to tin lock them._]\ -\ -_Margaret_ [_on her knees_]. Headsman, who's given thee this right\ -O'er me, this power!\ -Thou com'st for me at dead of night;\ -In pity spare me, one short hour!\ -Wilt't not be time when Matin bell has rung?\ - [_She stands up._]\ -Ah, I am yet so young, so young!\ -And death pursuing!\ -Fair was I too, and that was my undoing.\ -My love was near, far is he now!\ -Tom is the wreath, the scattered flowers lie low.\ -Take not such violent hold of me!\ -Spare me! what harm have I done to thee?\ -Let me not in vain implore thee.\ -Thou ne'er till now sawft her who lies before thee!\ -\ -_Faust_. O sorrow worse than death is o'er me!\ -\ -_Margaret_. Now I am wholly in thy power.\ -But first I'd nurse my child--do not prevent me.\ -I hugged it through the black night hour;\ -They took it from me to torment me,\ -And now they say I killed the pretty flower.\ -I shall never be happy again, I know.\ -They sing vile songs at me! 'Tis bad in them to do it!\ -There's an old tale that ends just so,\ -Who gave that meaning to it?\ -\ -_Faust [prostrates himself_]. A lover at thy feet is bending,\ -Thy bonds of misery would be rending.\ -\ -_Margaret [flings herself beside him_].\ -O let us kneel, the saints for aid invoking!\ -See! 'neath the threshold smoking,\ -Fire-breathing,\ -Hell is seething!\ -There prowling,\ -And grim under cover,\ -Satan is howling!\ -\ -_Faust [aloud_]. Margery! Margery!\ -\ -_Margaret [listening_]. That was the voice of my lover!\ - [_She springs up. The chains fall off_.]\ -\ -Where is he? Where? He calls. I hear him.\ -I'm free! Who hinders? I will be near him.\ -I'll fly to his neck! I'll hold him!\ -To my bosom I'll enfold him!\ -He stood on the threshold--called Margery plainly!\ -Hell's howling and clattering to drown it sought vainly,--\ -Through the devilish, grim scoffs, that might turn one to stone,\ -I caught the sweet, loving, enrapturing tone.\ -\ -_Faust_. 'Tis I!\ -\ -_Margaret_. 'Tis thou! O say it once again.\ - [_Clasping again._]\ -'Tis he! 'tis he! Where now is all my pain?\ -And where the dungeon's anguish? Joy-giver!\ -'Tis thou! And come to deliver!\ -I am delivered!\ -Again before me lies the street,\ -Where for the first time thou and I did meet.\ -And the garden-bower,\ -Where we spent that evening hour.\ -\ -_Faust_ [_trying to draw her away_]. Come! Come with me!\ -\ -_Margaret_. O tarry!\ -I tarry so gladly where thou tarriest.\ - [_Caressing him._]\ -\ -_Faust_. Hurry!\ -Unless thou hurriest,\ -Bitterly we both must rue it.\ -\ -_Margaret_. Kiss me! Canst no more do it?\ -So short an absence, love, as this,\ -And forgot how to kiss?\ -What saddens me so as I hang about thy neck?\ -When once, in thy words, thy looks, such a heaven of blisses\ -Came o'er me, I thought my heart would break,\ -And it seemed as if thou wouldst smother me with kisses.\ -Kiss thou me!\ -Else I kiss thee!\ - [_She embraces him._]\ -Woe! woe! thy lips are cold,\ -Stone-dumb.\ -Where's thy love left?\ -Oh! I'm bereft!\ -Who robbed me?\ - [_She turns from him_]\ -\ -_Faust_. O come!\ -Take courage, my darling! Let us go;\ -I clasp-thee with unutterable glow;\ -But follow me! For this alone I plead!\ -\ -_Margaret [turning to him_]. Is it, then, thou?\ -And is it thou indeed?\ -\ -_Faust_. 'Tis I! Come, follow me!\ -\ -_Margaret_. Thou break'st my chain,\ -And tak'st me to thy breast again!\ -How comes it, then, that thou art not afraid of me?\ -And dost thou know, my friend, who 'tis thou settest free?\ -\ -_Faust_. Come! come! The night is on the wane.\ -\ -_Margaret_. Woe! woe! My mother I've slain!\ -Have drowned the babe of mine!\ -Was it not sent to be mine and thine?\ -Thine, too--'tis thou! Scarce true doth it seem.\ -Give me thy hand! 'Tis not a dream!\ -Thy blessed hand!--But ah! there's dampness here!\ -Go, wipe it off! I fear\ -There's blood thereon.\ -Ah God! what hast thou done!\ -Put up thy sword again;\ -I pray thee, do!\ -\ -_Faust_. The past is past--there leave it then,\ -Thou kill'st me too!\ -\ -_Margaret_. No, thou must longer tarry!\ -I'll tell thee how each thou shalt bury;\ -The places of sorrow\ -Make ready to-morrow;\ -Must give the best place to my mother,\ -The very next to my brother,\ -Me a little aside,\ -But make not the space too wide!\ -And on my right breast let the little one lie.\ -No one else will be sleeping by me.\ -Once, to feel _thy_ heart beat nigh me,\ -Oh, 'twas a precious, a tender joy!\ -But I shall have it no more--no, never;\ -I seem to be forcing myself on thee ever,\ -And thou repelling me freezingly;\ -And 'tis thou, the same good soul, I see.\ -\ -_Faust_. If thou feelest 'tis I, then come with me\ -\ -_Margaret_. Out yonder?\ -\ -_Faust_. Into the open air.\ -\ -_Margaret_. If the grave is there,\ -If death is lurking; then come!\ -From here to the endless resting-place,\ -And not another pace--Thou\ -go'st e'en now? O, Henry, might I too.\ -\ -_Faust_. Thou canst! 'Tis but to will! The door stands open.\ -\ -_Margaret_. I dare not go; for me there's no more hoping.\ -What use to fly? They lie in wait for me.\ -So wretched the lot to go round begging,\ -With an evil conscience thy spirit plaguing!\ -So wretched the lot, an exile roaming--And\ -then on my heels they are ever coming!\ -\ -_Faust_. I shall be with thee.\ -\ -_Margaret_. Make haste! make haste!\ -No time to waste!\ -Save thy poor child!\ -Quick! follow the edge\ -Of the rushing rill,\ -Over the bridge\ -And by the mill,\ -Then into the woods beyond\ -On the left where lies the plank\ -Over the pond.\ -Seize hold of it quick!\ -To rise 'tis trying,\ -It struggles still!\ -Rescue! rescue!\ -\ -_Faust_. Bethink thyself, pray!\ -A single step and thou art free!\ -\ -_Margaret_. Would we were by the mountain. See!\ -There sits my mother on a stone,\ -The sight on my brain is preying!\ -There sits my mother on a stone,\ -And her head is constantly swaying;\ -She beckons not, nods not, her head falls o'er,\ -So long she's been sleeping, she'll wake no more.\ -She slept that we might take pleasure.\ -O that was bliss without measure!\ -\ -_Faust_. Since neither reason nor prayer thou hearest;\ -I must venture by force to take thee, dearest.\ -\ -_Margaret_. Let go! No violence will I bear!\ -Take not such a murderous hold of me!\ -I once did all I could to gratify thee.\ -\ -_Faust_. The day is breaking! Dearest! dearest!\ -\ -_Margaret_. Day! Ay, it is day! the last great day breaks in!\ -My wedding-day it should have been!\ -Tell no one thou hast been with Margery!\ -Alas for my garland! The hour's advancing!\ -Retreat is in vain!\ -We meet again,\ -But not at the dancing.\ -The multitude presses, no word is spoke.\ -Square, streets, all places--\ -sea of faces--\ -The bell is tolling, the staff is broke.\ -How they seize me and bind me!\ -They hurry me off to the bloody block.[48]\ -The blade that quivers behind me,\ -Quivers at every neck with convulsive shock;\ -Dumb lies the world as the grave!\ -\ -_Faust_. O had I ne'er been born!\ -\ -_Mephistopheles [appears without_]. Up! or thou'rt lost! The morn\ -Flushes the sky.\ -Idle delaying! Praying and playing!\ -My horses are neighing,\ -They shudder and snort for the bound.\ -\ -_Margaret_. What's that, comes up from the ground?\ -He! He! Avaunt! that face!\ -What will he in the sacred place?\ -He seeks me!\ -\ -_Faust_. Thou shalt live!\ -\ -_Margaret_. Great God in heaven!\ -Unto thy judgment my soul have I given!\ -\ -_Mephistopheles [to Faust_].\ -Come! come! or in the lurch I leave both her and thee!\ -\ -_Margaret_. Thine am I, Father! Rescue me!\ -Ye angels, holy bands, attend me!\ -And camp around me to defend me I\ -Henry! I dread to look on thee.\ -\ -_Mephistopheles_. She's judged!\ -\ -_Voice [from above_]. She's saved!\ -\ -_Mephistopheles [to Faust_]. Come thou to me!\ - [_Vanishes with_ FAUST.]\ -\ -_Voice [from within, dying away_]. Henry! Henry!\ -\ -\ -\ -\ -NOTES.\ -\ -\ -[Footnote 1: Dedication. The idea of Faust had early entered into Goethe's\ -mind. He probably began the work when he was about twenty years old. It\ -was first published, as a fragment, in 1790, and did not appear in its\ -present form till 1808, when its author's age was nearly sixty. By the\ -\"forms\" are meant, of course, the shadowy personages and scenes of the\ -drama.]\ -\ -[Footnote 2: --\"Thy messengers\"--\ - \"He maketh the winds his-messengers,\ - The flaming lightnings his ministers.\"\ - _Noyes's Psalms_, c. iv. 4.]\ -\ -[Footnote 3: \"The Word Divine.\" In translating the German \"Werdende\"\ -(literally, the _becoming, developing_, or _growing_) by the term _word_,\ -I mean the _word_ in the largest sense: \"In the beginning was the Word,\ -&c.\" Perhaps \"nature\" would be a pretty good rendering, but \"word,\" being\ -derived from \"werden,\" and expressing philosophically and scripturally the\ -going forth or manifestation of mind, seemed to me as appropriate a\ -translation as any.]\ -\ -[Footnote 4: \"The old fellow.\" The commentators do not seem quite agreed\ -whether \"den Alten\" (the old one) is an entirely reverential phrase here,\ -like the \"ancient of days,\" or savors a little of profane pleasantry, like\ -the title \"old man\" given by boys to their schoolmaster or of \"the old\ -gentleman\" to their fathers. Considering who the speaker is, I have\ -naturally inclined to the latter alternative.]\ -\ -[Footnote 5: \"Nostradamus\" (properly named Michel Notre Dame) lived\ -through the first half of the sixteenth century. He was born in the south\ -of France and was of Jewish extraction. As physician and astrologer, he\ -was held in high honor by the French nobility and kings.]\ -\ -[Footnote 6: The \"Macrocosm\" is the great world of outward things, in\ -contrast with its epitome, the little world in man, called the microcosm\ -(or world in miniature).]\ -\ -[Footnote 7: \"Famulus\" seems to mean a cross between a servant and a\ -scholar. The Dominie Sampson called Wagner, is appended to Faust for the\ -time somewhat as Sancho is to Don Quixote. The Doctor Faust of the legend\ -has a servant by that name, who seems to have been more of a _Sancho_, in\ -the sense given to the word by the old New England mothers when upbraiding\ -bad boys (you Sanch'!). Curiously enough, Goethe had in early life a\ -(treacherous) friend named Wagner, who plagiarized part of Faust and made\ -a tragedy of it.]\ -\ -[Footnote 8: \"Mock-heroic play.\" We have Schlegel's authority for thus\ -rendering the phrase \"Haupt- und Staats-Action,\" (literally, \"head and\ -State-action,\") who says that this title was given to dramas designed for\ -puppets, when they treated of heroic and historical subjects.]\ -\ -[Footnote 9: The literal sense of this couplet in the original is:--\ - \"Is he, in the bliss of becoming,\ - To creative joy near--\"\ -\"Werde-lust\" presents the same difficulty that we found in note 3. This\ -same word, \"Werden,\" is also used by the poet in the introductory theatre\ -scene (page 7), where he longs for the time when he himself was\ -_ripening_, growing, becoming, or _forming_, (as Hayward renders it.) I\ -agree with Hayward, \"the meaning probably is, that our Saviour enjoys, in\ -coming to life again,\" (I should say, in being born into the upper life,)\ -\"a happiness nearly equal to that of the Creator in creating.\"]\ -\ -[Footnote 10: The Angel-chorusses in this scene present the only instances\ -in which the translator, for the sake of retaining the ring and swing of\ -the melody, has felt himself obliged to give a transfusion of the spirit\ -of the thought, instead of its exact form.\ -\ -The literal meaning of the first chorus is:--\ -\ - Christ is arisen!\ - Joy to the Mortal,\ - Whom the ruinous,\ - Creeping, hereditary\ - Infirmities wound round.\ -\ -Dr. Hedge has come nearer than any one to reconciling meaning and melody\ -thus:--\ -\ - \"Christ has arisen!\ - Joy to our buried Head!\ - Whom the unmerited,\ - Trailing, inherited\ - Woes did imprison.\"\ -\ -The present translator, without losing sight of the fact that \"the Mortal\"\ -means Christ, has taken the liberty (constrained by rhyme,--which is\ -sometimes more than the _rudder_ of verse,) of making the congratulation\ -include Humanity, as incarnated in Christ, \"the second Adam.\"\ -\ -In the closing Chorus of Angels, the translator found that he could best\ -preserve the spirit of the five-fold rhyme:--\ -\ - \"Thätig ihn preisenden,\ - Liebe beweisenden,\ - Brüderlich speisenden,\ - Predigend reisenden,\ - Wonne verheissenden,\"\ -\ -by running it into three couplets.]\ -\ -[Footnote 11: The prose account of the alchymical process is as follows:--\ -\ -\"There was red mercury, a powerfully acting body, united with the tincture\ -of antimony, at a gentle heat of the water-bath. Then, being exposed to\ -the heat of open fire in an aludel, (or alembic,) a sublimate filled its\ -heads in succession, which, if it appeared with various hues, was the\ -desired medicine.\"]\ -\ -[Footnote 12: \"Salamander, &c.\" The four represent the spirits of the\ -four elements, fire, water, air, and earth, which Faust successively\ -conjures, so that, if the monster belongs in any respect to this mundane\ -sphere, he may be exorcized. But it turns out that he is beyond and\ -beneath all.]\ -\ -[Footnote 13: Here, of course, Faust makes the sign of the cross, or holds\ -out a crucifix.]\ -\ -[Footnote 14: \"Fly-God,\" _i.e._ Beelzebub.]\ -\ -[Footnote 15: The \"Drudenfuss,\" or pentagram, was a pentagonal figure\ -composed of three triangles, thus:\ -[Illustration]\ -\ -[Footnote 16: Doctor's Feast. The inaugural feast given at taking a\ -degree.]\ -\ -[Footnote 17: \"Blood.\" When at the first invention of printing, the art\ -was ascribed to the devil, the illuminated red ink parts were said by the\ -people to be done in blood.]\ -\ -[Footnote 18: \"The Spanish boot\" was an instrument of torture, like the\ -Scottish boot mentioned in Old Mortality.]\ -\ -[Footnote 19: \"Encheiresin Naturæ.\" Literally, a handling of nature.]\ -\ -[Footnote 20: Still a famous place of public resort and entertainment. On\ -the wall are two old paintings of Faust's carousal and his ride out of the\ -door on a cask. One is accompanied by the following inscription, being two\ -lines (Hexameter and Pentameter) broken into halves:--\ -\ - \"Vive, bibe, obgregare, memor\ - Fausti hujus et hujus\ - Pœnæ. Aderat clauda haec,\ - Ast erat ampla gradû. 1525.\"\ -\ - \"Live, drink, be merry, remembering\ - This Faust and his\ - Punishment. It came slowly\ - But was in ample measure.\"]\ -\ -[Footnote 21:_Frosch, Brander_, &c. These names seem to be chosen with an\ -eye to adaptation, Frosch meaning frog, and Brander fireship. \"Frog\"\ -happens also to be the nickname the students give to a pupil of the\ -gymnasium, or school preparatory to the university.]\ -\ -[Footnote 22: Rippach is a village near Leipsic, and Mr. Hans was a\ -fictitious personage about whom the students used to quiz greenhorns.]\ -\ -[Footnote 23: The original means literally _sea-cat_. Retzsch says, it is\ -the little ring-tailed monkey.]\ -\ -[Footnote 24: One-time-one, _i.e._ multiplication-table.]\ -\ -[Footnote 25: \"Hand and glove.\" The translator's coincidence with Miss\ -Swanwick here was entirely accidental. The German is \"thou and thou,\"\ -alluding to the fact that intimate friends among the Germans, like the\ -sect of Friends, call each other _thou_.]\ -\ -[Footnote 26: The following is a literal translation of the song referred\ -to:--\ -\ - Were I a little bird,\ - Had I two wings of mine,\ - I'd fly to my dear;\ - But that can never be,\ - So I stay here.\ -\ - Though I am far from thee,\ - Sleeping I'm near to thee,\ - Talk with my dear;\ - When I awake again,\ - I am alone.\ -\ - Scarce is there an hour in the night,\ - When sleep does not take its flight,\ - And I think of thee,\ - How many thousand times\ - Thou gav'st thy heart to me.]\ -\ -[Footnote 27: Donjon. The original is _Zwinger_, which Hayward says is\ -untranslatable. It probably means an old tower, such as is often found in\ -the free cities, where, in a dark passage-way, a lamp is sometimes placed,\ -and a devotional image near it.]\ -\ -[Footnote 28: It was a superstitious belief that the presence of buried\ -treasure was indicated by a blue flame.]\ -\ -[Footnote 29: Lion-dollars--a Bohemian coin, first minted three centuries\ -ago, by Count Schlick, from the mines of Joachim's-Thal. The one side\ -bears a lion, the other a full length image of St. John.]\ -\ -[Footnote 30: An imitation of Ophelia's song: _Hamlet_, act 14, scene 5.]\ -\ -[Footnote 31: The Rat-catcher was supposed to have the art of drawing rats\ -after him by his whistle, like a sort of Orpheus.]\ -\ -[Footnote 32: Walpurgis Night. May-night. Walpurgis is the female saint\ -who converted the Saxons to Christianity.--The Brocken or Blocksberg is\ -the highest peak of the Harz mountains, which comprise about 1350 square\ -miles.--Schirke and Elend are two villages in the neighborhood.]\ -\ -[Footnote 33: Shelley's translation of this couplet is very fine:\ -(\"_O si sic omnia!_\")\ -\ - \"The giant-snouted crags, ho! ho!\ - How they snort and how they blow!\"]\ -\ -[Footnote 34: The original is _Windsbraut_, (wind's-bride,) the word used\ -in Luther's Bible to translate Paul's _Euroclydon_.]\ -\ -[Footnote 35: One of the names of the devil in Germany.]\ -\ -[Footnote 36: One of the names of Beelzebub.]\ -\ -[Footnote 37: \"The Talmudists say that Adam had a wife called Lilis before\ -he married Eve, and of her he begat nothing but devils.\"\ - _Burton's Anatomy of Melancholy_.\ -\ -A learned writer says that _Lullaby_ is derived from \"Lilla, abi!\" \"Begone\ -Lilleth!\" she having been supposed to lie in wait for children to kill\ -them.]\ -\ -[Footnote 38: This name, derived from two Greek words meaning _rump_ and\ -_fancy_, was meant for Nicolai of Berlin, a great hater of Goethe's\ -writings, and is explained by the fact that the man had for a long time a\ -violent affection of the nerves, and by the application he made of leeches\ -as a remedy, (alluded to by Mephistopheles.)]\ -\ -[Footnote 39: Tegel (mistranslated _pond_ by Shelley) is a small place a\ -few miles from Berlin, whose inhabitants were, in 1799, hoaxed by a ghost\ -story, of which the scene was laid in the former place.]\ -\ -[Footnote 40: The park in Vienna.]\ -\ -[Footnote 41: He was scene-painter to the Weimar theatre.]\ -\ -[Footnote 42: A poem of Schiller's, which gave great offence to the\ -religious people of his day.]\ -\ -[Footnote 43: A literal translation of _Maulen_, but a slang-term in\ -Yankee land.]\ -\ -[Footnote 44: Epigrams, published from time to time by Goethe and Schiller\ -jointly. Hennings (whose name heads the next quatrain) was editor of the\ -_Musaget_, (a title of Apollo, \"leader of the muses,\") and also of the\ -_Genius of the Age_. The other satirical allusions to classes of\ -notabilities will, without difficulty, be guessed out by the readers.]\ -\ -[Footnote 45: \"_Doubt_ is the only rhyme for devil,\" in German.]\ -\ -[Footnote 46: The French translator, Stapfer, assigns as the probable\ -reason why this scene alone, of the whole drama, should have been left in\ -prose, \"that it might not be said that Faust wanted any one of the\ -possible forms of style.\"]\ -\ -[Footnote 47: Literally the _raven-stone_.]\ -\ -[Footnote 48: The _blood-seat_, in allusion to the old German custom of\ -tying a woman, who was to be beheaded, into a wooden chair.]\ -\ - * * * * *\ -\ -P. S. There is a passage on page 84, the speech of Faust, ending with the\ -lines:--\ -\ - Show me the fruit that, ere it's plucked, will rot,\ - And trees from which new green is daily peeping,\ -\ -which seems to have puzzled or misled so much, not only English\ -translators, but even German critics, that the present translator has\ -concluded, for once, to depart from his usual course, and play the\ -commentator, by giving his idea of Goethe's meaning, which is this: Faust\ -admits that the devil has all the different kinds of Sodom-apples which he\ -has just enumerated, gold that melts away in the hand, glory that vanishes\ -like a meteor, and pleasure that perishes in the possession. But all these\ -torments are too insipid for Faust's morbid and mad hankering after the\ -luxury of spiritual pain. Show me, he says, the fruit that rots _before_\ -one can pluck it, and [a still stronger expression of his diseased craving\ -for agony] trees that fade so quickly as to be every day just putting\ -forth new green, only to tantalize one with perpetual promise and\ -perpetual disappointment.\ -\ -\ -\ -\ -\ -End of the Project Gutenberg EBook of Faust, by Goethe\ -\ -*** END OF THIS PROJECT GUTENBERG EBOOK FAUST ***\ -\ -***** This file should be named 14460-8.txt or 14460-8.zip *****\ -This and all associated files of various formats will be found in:\ - http://www.gutenberg.net/1/4/4/6/14460/\ -\ -Produced by Juliet Sutherland, Charles Bidwell and the PG Online\ -Distributed Proofreading Team\ -\ -\ -Updated editions will replace the previous one--the old editions\ -will be renamed.\ -\ -Creating the works from public domain print editions means that no\ -one owns a United States copyright in these works, so the Foundation\ -(and you!) can copy and distribute it in the United States without\ -permission and without paying copyright royalties. Special rules,\ -set forth in the General Terms of Use part of this license, apply to\ -copying and distributing Project Gutenberg-tm electronic works to\ -protect the PROJECT GUTENBERG-tm concept and trademark. Project\ -Gutenberg is a registered trademark, and may not be used if you\ -charge for the eBooks, unless you receive specific permission. If you\ -do not charge anything for copies of this eBook, complying with the\ -rules is very easy. You may use this eBook for nearly any purpose\ -such as creation of derivative works, reports, performances and\ -research. They may be modified and printed and given away--you may do\ -practically ANYTHING with public domain eBooks. Redistribution is\ -subject to the trademark license, especially commercial\ -redistribution.\ -\ -\ -\ -*** START: FULL LICENSE ***\ -\ -THE FULL PROJECT GUTENBERG LICENSE\ -PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK\ -\ -To protect the Project Gutenberg-tm mission of promoting the free\ -distribution of electronic works, by using or distributing this work\ -(or any other work associated in any way with the phrase \"Project\ -Gutenberg\"), you agree to comply with all the terms of the Full Project\ -Gutenberg-tm License (available with this file or online at\ -http://gutenberg.net/license).\ -\ -\ -Section 1. General Terms of Use and Redistributing Project Gutenberg-tm\ -electronic works\ -\ -1.A. By reading or using any part of this Project Gutenberg-tm\ -electronic work, you indicate that you have read, understand, agree to\ -and accept all the terms of this license and intellectual property\ -(trademark/copyright) agreement. If you do not agree to abide by all\ -the terms of this agreement, you must cease using and return or destroy\ -all copies of Project Gutenberg-tm electronic works in your possession.\ -If you paid a fee for obtaining a copy of or access to a Project\ -Gutenberg-tm electronic work and you do not agree to be bound by the\ -terms of this agreement, you may obtain a refund from the person or\ -entity to whom you paid the fee as set forth in paragraph 1.E.8.\ -\ -1.B. \"Project Gutenberg\" is a registered trademark. It may only be\ -used on or associated in any way with an electronic work by people who\ -agree to be bound by the terms of this agreement. There are a few\ -things that you can do with most Project Gutenberg-tm electronic works\ -even without complying with the full terms of this agreement. See\ -paragraph 1.C below. There are a lot of things you can do with Project\ -Gutenberg-tm electronic works if you follow the terms of this agreement\ -and help preserve free future access to Project Gutenberg-tm electronic\ -works. See paragraph 1.E below.\ -\ -1.C. The Project Gutenberg Literary Archive Foundation (\"the Foundation\"\ -or PGLAF), owns a compilation copyright in the collection of Project\ -Gutenberg-tm electronic works. Nearly all the individual works in the\ -collection are in the public domain in the United States. If an\ -individual work is in the public domain in the United States and you are\ -located in the United States, we do not claim a right to prevent you from\ -copying, distributing, performing, displaying or creating derivative\ -works based on the work as long as all references to Project Gutenberg\ -are removed. Of course, we hope that you will support the Project\ -Gutenberg-tm mission of promoting free access to electronic works by\ -freely sharing Project Gutenberg-tm works in compliance with the terms of\ -this agreement for keeping the Project Gutenberg-tm name associated with\ -the work. You can easily comply with the terms of this agreement by\ -keeping this work in the same format with its attached full Project\ -Gutenberg-tm License when you share it without charge with others.\ -\ -1.D. The copyright laws of the place where you are located also govern\ -what you can do with this work. Copyright laws in most countries are in\ -a constant state of change. If you are outside the United States, check\ -the laws of your country in addition to the terms of this agreement\ -before downloading, copying, displaying, performing, distributing or\ -creating derivative works based on this work or any other Project\ -Gutenberg-tm work. The Foundation makes no representations concerning\ -the copyright status of any work in any country outside the United\ -States.\ -\ -1.E. Unless you have removed all references to Project Gutenberg:\ -\ -1.E.1. The following sentence, with active links to, or other immediate\ -access to, the full Project Gutenberg-tm License must appear prominently\ -whenever any copy of a Project Gutenberg-tm work (any work on which the\ -phrase \"Project Gutenberg\" appears, or with which the phrase \"Project\ -Gutenberg\" is associated) is accessed, displayed, performed, viewed,\ -copied or distributed:\ -\ -This eBook is for the use of anyone anywhere at no cost and with\ -almost no restrictions whatsoever. You may copy it, give it away or\ -re-use it under the terms of the Project Gutenberg License included\ -with this eBook or online at www.gutenberg.net\ -\ -1.E.2. If an individual Project Gutenberg-tm electronic work is derived\ -from the public domain (does not contain a notice indicating that it is\ -posted with permission of the copyright holder), the work can be copied\ -and distributed to anyone in the United States without paying any fees\ -or charges. If you are redistributing or providing access to a work\ -with the phrase \"Project Gutenberg\" associated with or appearing on the\ -work, you must comply either with the requirements of paragraphs 1.E.1\ -through 1.E.7 or obtain permission for the use of the work and the\ -Project Gutenberg-tm trademark as set forth in paragraphs 1.E.8 or\ -1.E.9.\ -\ -1.E.3. If an individual Project Gutenberg-tm electronic work is posted\ -with the permission of the copyright holder, your use and distribution\ -must comply with both paragraphs 1.E.1 through 1.E.7 and any additional\ -terms imposed by the copyright holder. Additional terms will be linked\ -to the Project Gutenberg-tm License for all works posted with the\ -permission of the copyright holder found at the beginning of this work.\ -\ -1.E.4. Do not unlink or detach or remove the full Project Gutenberg-tm\ -License terms from this work, or any files containing a part of this\ -work or any other work associated with Project Gutenberg-tm.\ -\ -1.E.5. Do not copy, display, perform, distribute or redistribute this\ -electronic work, or any part of this electronic work, without\ -prominently displaying the sentence set forth in paragraph 1.E.1 with\ -active links or immediate access to the full terms of the Project\ -Gutenberg-tm License.\ -\ -1.E.6. You may convert to and distribute this work in any binary,\ -compressed, marked up, nonproprietary or proprietary form, including any\ -word processing or hypertext form. However, if you provide access to or\ -distribute copies of a Project Gutenberg-tm work in a format other than\ -\"Plain Vanilla ASCII\" or other format used in the official version\ -posted on the official Project Gutenberg-tm web site (www.gutenberg.net),\ -you must, at no additional cost, fee or expense to the user, provide a\ -copy, a means of exporting a copy, or a means of obtaining a copy upon\ -request, of the work in its original \"Plain Vanilla ASCII\" or other\ -form. Any alternate format must include the full Project Gutenberg-tm\ -License as specified in paragraph 1.E.1.\ -\ -1.E.7. Do not charge a fee for access to, viewing, displaying,\ -performing, copying or distributing any Project Gutenberg-tm works\ -unless you comply with paragraph 1.E.8 or 1.E.9.\ -\ -1.E.8. You may charge a reasonable fee for copies of or providing\ -access to or distributing Project Gutenberg-tm electronic works provided\ -that\ -\ -- You pay a royalty fee of 20% of the gross profits you derive from\ - the use of Project Gutenberg-tm works calculated using the method\ - you already use to calculate your applicable taxes. The fee is\ - owed to the owner of the Project Gutenberg-tm trademark, but he\ - has agreed to donate royalties under this paragraph to the\ - Project Gutenberg Literary Archive Foundation. Royalty payments\ - must be paid within 60 days following each date on which you\ - prepare (or are legally required to prepare) your periodic tax\ - returns. Royalty payments should be clearly marked as such and\ - sent to the Project Gutenberg Literary Archive Foundation at the\ - address specified in Section 4, \"Information about donations to\ - the Project Gutenberg Literary Archive Foundation.\"\ -\ -- You provide a full refund of any money paid by a user who notifies\ - you in writing (or by e-mail) within 30 days of receipt that s/he\ - does not agree to the terms of the full Project Gutenberg-tm\ - License. You must require such a user to return or\ - destroy all copies of the works possessed in a physical medium\ - and discontinue all use of and all access to other copies of\ - Project Gutenberg-tm works.\ -\ -- You provide, in accordance with paragraph 1.F.3, a full refund of any\ - money paid for a work or a replacement copy, if a defect in the\ - electronic work is discovered and reported to you within 90 days\ - of receipt of the work.\ -\ -- You comply with all other terms of this agreement for free\ - distribution of Project Gutenberg-tm works.\ -\ -1.E.9. If you wish to charge a fee or distribute a Project Gutenberg-tm\ -electronic work or group of works on different terms than are set\ -forth in this agreement, you must obtain permission in writing from\ -both the Project Gutenberg Literary Archive Foundation and Michael\ -Hart, the owner of the Project Gutenberg-tm trademark. Contact the\ -Foundation as set forth in Section 3 below.\ -\ -1.F.\ -\ -1.F.1. Project Gutenberg volunteers and employees expend considerable\ -effort to identify, do copyright research on, transcribe and proofread\ -public domain works in creating the Project Gutenberg-tm\ -collection. Despite these efforts, Project Gutenberg-tm electronic\ -works, and the medium on which they may be stored, may contain\ -\"Defects,\" such as, but not limited to, incomplete, inaccurate or\ -corrupt data, transcription errors, a copyright or other intellectual\ -property infringement, a defective or damaged disk or other medium, a\ -computer virus, or computer codes that damage or cannot be read by\ -your equipment.\ -\ -1.F.2. LIMITED WARRANTY, DISCLAIMER OF DAMAGES - Except for the \"Right\ -of Replacement or Refund\" described in paragraph 1.F.3, the Project\ -Gutenberg Literary Archive Foundation, the owner of the Project\ -Gutenberg-tm trademark, and any other party distributing a Project\ -Gutenberg-tm electronic work under this agreement, disclaim all\ -liability to you for damages, costs and expenses, including legal\ -fees. YOU AGREE THAT YOU HAVE NO REMEDIES FOR NEGLIGENCE, STRICT\ -LIABILITY, BREACH OF WARRANTY OR BREACH OF CONTRACT EXCEPT THOSE\ -PROVIDED IN PARAGRAPH F3. YOU AGREE THAT THE FOUNDATION, THE\ -TRADEMARK OWNER, AND ANY DISTRIBUTOR UNDER THIS AGREEMENT WILL NOT BE\ -LIABLE TO YOU FOR ACTUAL, DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE OR\ -INCIDENTAL DAMAGES EVEN IF YOU GIVE NOTICE OF THE POSSIBILITY OF SUCH\ -DAMAGE.\ -\ -1.F.3. LIMITED RIGHT OF REPLACEMENT OR REFUND - If you discover a\ -defect in this electronic work within 90 days of receiving it, you can\ -receive a refund of the money (if any) you paid for it by sending a\ -written explanation to the person you received the work from. If you\ -received the work on a physical medium, you must return the medium with\ -your written explanation. The person or entity that provided you with\ -the defective work may elect to provide a replacement copy in lieu of a\ -refund. If you received the work electronically, the person or entity\ -providing it to you may choose to give you a second opportunity to\ -receive the work electronically in lieu of a refund. If the second copy\ -is also defective, you may demand a refund in writing without further\ -opportunities to fix the problem.\ -\ -1.F.4. Except for the limited right of replacement or refund set forth\ -in paragraph 1.F.3, this work is provided to you 'AS-IS' WITH NO OTHER\ -WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO\ -WARRANTIES OF MERCHANTIBILITY OR FITNESS FOR ANY PURPOSE.\ -\ -1.F.5. Some states do not allow disclaimers of certain implied\ -warranties or the exclusion or limitation of certain types of damages.\ -If any disclaimer or limitation set forth in this agreement violates the\ -law of the state applicable to this agreement, the agreement shall be\ -interpreted to make the maximum disclaimer or limitation permitted by\ -the applicable state law. The invalidity or unenforceability of any\ -provision of this agreement shall not void the remaining provisions.\ -\ -1.F.6. INDEMNITY - You agree to indemnify and hold the Foundation, the\ -trademark owner, any agent or employee of the Foundation, anyone\ -providing copies of Project Gutenberg-tm electronic works in accordance\ -with this agreement, and any volunteers associated with the production,\ -promotion and distribution of Project Gutenberg-tm electronic works,\ -harmless from all liability, costs and expenses, including legal fees,\ -that arise directly or indirectly from any of the following which you do\ -or cause to occur: (a) distribution of this or any Project Gutenberg-tm\ -work, (b) alteration, modification, or additions or deletions to any\ -Project Gutenberg-tm work, and (c) any Defect you cause.\ -\ -\ -Section 2. Information about the Mission of Project Gutenberg-tm\ -\ -Project Gutenberg-tm is synonymous with the free distribution of\ -electronic works in formats readable by the widest variety of computers\ -including obsolete, old, middle-aged and new computers. It exists\ -because of the efforts of hundreds of volunteers and donations from\ -people in all walks of life.\ -\ -Volunteers and financial support to provide volunteers with the\ -assistance they need, is critical to reaching Project Gutenberg-tm's\ -goals and ensuring that the Project Gutenberg-tm collection will\ -remain freely available for generations to come. In 2001, the Project\ -Gutenberg Literary Archive Foundation was created to provide a secure\ -and permanent future for Project Gutenberg-tm and future generations.\ -To learn more about the Project Gutenberg Literary Archive Foundation\ -and how your efforts and donations can help, see Sections 3 and 4\ -and the Foundation web page at http://www.pglaf.org.\ -\ -\ -Section 3. Information about the Project Gutenberg Literary Archive\ -Foundation\ -\ -The Project Gutenberg Literary Archive Foundation is a non profit\ -501(c)(3) educational corporation organized under the laws of the\ -state of Mississippi and granted tax exempt status by the Internal\ -Revenue Service. The Foundation's EIN or federal tax identification\ -number is 64-6221541. Its 501(c)(3) letter is posted at\ -http://pglaf.org/fundraising. Contributions to the Project Gutenberg\ -Literary Archive Foundation are tax deductible to the full extent\ -permitted by U.S. federal laws and your state's laws.\ -\ -The Foundation's principal office is located at 4557 Melan Dr. S.\ -Fairbanks, AK, 99712., but its volunteers and employees are scattered\ -throughout numerous locations. Its business office is located at\ -809 North 1500 West, Salt Lake City, UT 84116, (801) 596-1887, email\ -business@pglaf.org. Email contact links and up to date contact\ -information can be found at the Foundation's web site and official\ -page at http://pglaf.org\ -\ -For additional contact information:\ - Dr. Gregory B. Newby\ - Chief Executive and Director\ - gbnewby@pglaf.org\ -\ -\ -Section 4. Information about Donations to the Project Gutenberg\ -Literary Archive Foundation\ -\ -Project Gutenberg-tm depends upon and cannot survive without wide\ -spread public support and donations to carry out its mission of\ -increasing the number of public domain and licensed works that can be\ -freely distributed in machine readable form accessible by the widest\ -array of equipment including outdated equipment. Many small donations\ -($1 to $5,000) are particularly important to maintaining tax exempt\ -status with the IRS.\ -\ -The Foundation is committed to complying with the laws regulating\ -charities and charitable donations in all 50 states of the United\ -States. Compliance requirements are not uniform and it takes a\ -considerable effort, much paperwork and many fees to meet and keep up\ -with these requirements. We do not solicit donations in locations\ -where we have not received written confirmation of compliance. To\ -SEND DONATIONS or determine the status of compliance for any\ -particular state visit http://pglaf.org\ -\ -While we cannot and do not solicit contributions from states where we\ -have not met the solicitation requirements, we know of no prohibition\ -against accepting unsolicited donations from donors in such states who\ -approach us with offers to donate.\ -\ -International donations are gratefully accepted, but we cannot make\ -any statements concerning tax treatment of donations received from\ -outside the United States. U.S. laws alone swamp our small staff.\ -\ -Please check the Project Gutenberg Web pages for current donation\ -methods and addresses. Donations are accepted in a number of other\ -ways including including checks, online payments and credit card\ -donations. To donate, please visit: http://pglaf.org/donate\ -\ -\ -Section 5. General Information About Project Gutenberg-tm electronic\ -works.\ -\ -Professor Michael S. Hart is the originator of the Project Gutenberg-tm\ -concept of a library of electronic works that could be freely shared\ -with anyone. For thirty years, he produced and distributed Project\ -Gutenberg-tm eBooks with only a loose network of volunteer support.\ -\ -\ -Project Gutenberg-tm eBooks are often created from several printed\ -editions, all of which are confirmed as Public Domain in the U.S.\ -unless a copyright notice is included. Thus, we do not necessarily\ -keep eBooks in compliance with any particular paper edition.\ -\ -\ -Most people start at our Web site which has the main PG search facility:\ -\ - http://www.gutenberg.net\ -\ -This Web site includes information about Project Gutenberg-tm,\ -including how to make donations to the Project Gutenberg Literary\ -Archive Foundation, how to help produce our new eBooks, and how to\ -subscribe to our email newsletter to hear about new eBooks.", - textXML = "\ -\ -\ -\ -Coding In Paradise\ -Brad Neuberg's thoughts, feelings, and experiences.\ -\ -tag:blogger.com,1999:blog-3191291\ -2006-01-26T01:37:22Z\ -Blogger\ -\ -
    This is an Atom formatted XML site feed. It is intended to be viewed in a Newsreader or syndicated to another site. Please visit the Blogger Help for more info.
    \ -
    \ -true\ -\ -\ -\ -Brad GNUberg\ -\ -2006-01-25T17:36:00-08:00\ -2006-01-26T01:37:21Z\ -2006-01-26T01:37:21Z\ -\ -tag:blogger.com,1999:blog-3191291.post-113823944195262179\ -Resume\ -\ -
    I just finished and put up my resume. Resumes are hard :)
    \ -
    \ -false\ -
    \ -\ -\ -\ -Brad GNUberg\ -\ -2006-01-18T12:33:00-08:00\ -2006-01-18T20:34:10Z\ -2006-01-18T20:34:10Z\ -\ -tag:blogger.com,1999:blog-3191291.post-113761645059106145\ -AJAXian Site Comparison with Alexa\ -\ -
    Joe Walker has created an interesting AJAX mashup using Alexa data, making Alexa a bit more useful.
    \ -
    \ -false\ -
    \ -\ -\ -\ -Brad GNUberg\ -\ -2006-01-18T12:16:00-08:00\ -2006-01-18T21:43:11Z\ -2006-01-18T20:26:36Z\ -\ -tag:blogger.com,1999:blog-3191291.post-113761599631873348\ -Civil Engines Released\ -\ -
    My old cohorts with BaseSystem and OpenPortal, Christoper Tse, Paolo de Dios, and Ken Rossi of Liquid Orb Media have just shipped their software and announced their company. The company is named Civil Engines, and the software is called Civil Netizen:\ -\ -Civil Netizen provides a useful, secure way to easily transfer large files and groups of files between people on the Internet, getting past FTP
    \ -
    \ -false\ -
    \ -\ -\ -\ -Brad GNUberg\ -\ -2006-01-17T23:06:00-08:00\ -2006-01-18T07:13:56Z\ -2006-01-18T07:06:40Z\ -\ -tag:blogger.com,1999:blog-3191291.post-113756800036562086\ -Photos of Mash Pit\ -\ -
    Photos of Flash Pit are up on Flickr now:\ -\ -\ -\ -\ -\ -\ -\ -\ -\ -
    \ -
    \ -false\ -
    \ -\ -\ -\ -Brad GNUberg\ -\ -2006-01-17T22:56:00-08:00\ -2006-01-18T19:45:28Z\ -2006-01-18T06:57:11Z\ -\ -tag:blogger.com,1999:blog-3191291.post-113756743174780868\ -Offline Access in AJAX Applications\ -\ -
    Update: Julien reports that he's not actually using AMASS in his offline work, but was inspired by it. He rolled his own access to Flash's storage capabilities using ExternalInterface, but he should be aware of the reliability and performance issues with ExternalInterface (I tried to paste 250K of text into the Wiki and the browser locked up for a long period of time as it tried to pass the data
    \ -
    \ -false\ -
    \ -\ -\ -\ -Brad GNUberg\ -\ -2006-01-17T22:15:00-08:00\ -2006-01-18T06:29:05Z\ -2006-01-18T06:29:05Z\ -\ -tag:blogger.com,1999:blog-3191291.post-113756574524170757\ -Mash Pit Synopses\ -\ -
    Man, what an amazing event! We had a post-Mash Pit dinner and party at Lonely Palm.\ -\ -Here's some more info about the three projects that were produced at the end of the day.\ -\ -The first one was called Whuffie Tracker; the idea there was to produce a single site that could take your list of blogs and online sites, query other remote sites like Technorati and Flickr, and tell you who is talking about
    \ -
    \ -false\ -
    \ -\ -\ -\ -Brad GNUberg\ -\ -2006-01-17T17:19:00-08:00\ -2006-01-18T01:19:30Z\ -2006-01-18T01:19:30Z\ -\ -tag:blogger.com,1999:blog-3191291.post-113754717012597001\ -Mash Pit 4\ -\ -
    It's demo time at Mash Pit. Everyone is furiously coding, but the clock is almost over. We'll have three demos. I'll try to blog them as people give them.
    \ -
    \ -false\ -
    \ -\ -\ -\ -Brad GNUberg\ -\ -2006-01-17T16:39:00-08:00\ -2006-01-18T00:40:20Z\ -2006-01-18T00:40:20Z\ -\ -tag:blogger.com,1999:blog-3191291.post-113754482097808410\ -Mash Pit 3\ -\ -
    We're hacking away, very intensely! No time to post! Just 30 more minutes till we have to be done, at 5:15 PM. Nothing like a hard deadline to force you to make hard decisions.
    \ -
    \ -false\ -
    \ -\ -\ -\ -Brad GNUberg\ -\ -2006-01-17T10:43:00-08:00\ -2006-01-17T21:18:01Z\ -2006-01-17T21:18:01Z\ -\ -tag:blogger.com,1999:blog-3191291.post-113753268191434316\ -Mash Pit 2\ -\ -
    People are doing intros, saying what their skills are and what they are interested in.\ -\ -We had a big brainstorming session in the morning. The goal was to focus on ideas independent of technology, to force us to focus on whether something is relevant rather than just technologically interesting.\ -\ -We broke for lunch, sponsored by Ning.\ -\ -We've formed three groups that are working independently now.
    \ -
    \ -false\ -
    \ -\ -\ -\ -Brad GNUberg\ -\ -2006-01-17T10:36:00-08:00\ -2006-01-17T18:42:49Z\ -2006-01-17T18:42:49Z\ -\ -tag:blogger.com,1999:blog-3191291.post-113752336910726653\ -Mash Pit Starts\ -\ -
    Mash Pit is starting now, Chris is talking. We've got a full house of hackers, programmers, thinkers, and open source folks.\ -\ -The goal today is to somehow make the work people have been doing with Web 2.0 relevant for normal folks.\ -\ -We're doing introductions and introducing people to the coworking space. Thanks to Chris for setting up Mash Pit.\ -\ -We should be lazy today, try to reuse as much
    \ -
    \ -false\ -
    \ -
    ", - testNumber = 4, - testBoolean = false; \ No newline at end of file diff --git a/www/extras/yui/tests/stylesheet/tests/stylesheet.html b/www/extras/yui/tests/stylesheet/tests/stylesheet.html deleted file mode 100644 index a0b383d4c..000000000 --- a/www/extras/yui/tests/stylesheet/tests/stylesheet.html +++ /dev/null @@ -1,644 +0,0 @@ - - - - Test Page - - - - - - -

    Tests

    -
    - - - - - - - - - - - - diff --git a/www/extras/yui/tests/swf/tests/YUIBridgeProject.swf b/www/extras/yui/tests/swf/tests/YUIBridgeProject.swf deleted file mode 100644 index cf3db72ec..000000000 Binary files a/www/extras/yui/tests/swf/tests/YUIBridgeProject.swf and /dev/null differ diff --git a/www/extras/yui/tests/swf/tests/basic.html b/www/extras/yui/tests/swf/tests/basic.html deleted file mode 100644 index 3fd999282..000000000 --- a/www/extras/yui/tests/swf/tests/basic.html +++ /dev/null @@ -1,46 +0,0 @@ - - - SWFDetect & SWF Test Page - - -

    SWFDetect Tests

    - - - - - -

    SWF Test

    -
    -one two three -
    - - - - diff --git a/www/extras/yui/tests/tabview/tests/tabview.html b/www/extras/yui/tests/tabview/tests/tabview.html deleted file mode 100644 index 4b6049e7d..000000000 --- a/www/extras/yui/tests/tabview/tests/tabview.html +++ /dev/null @@ -1,136 +0,0 @@ - - - -TabView Test Suite - - - - - - - - - - - - - - - - - -
    -
    - -
    -
    foo content
    -
    bar content
    -
    baz content
    -
    -
    - alternate label -
    alternate content
    -
    - - diff --git a/www/extras/yui/tests/yahoo/tests/assets/xframe.html b/www/extras/yui/tests/yahoo/tests/assets/xframe.html deleted file mode 100644 index b2e3db2c5..000000000 --- a/www/extras/yui/tests/yahoo/tests/assets/xframe.html +++ /dev/null @@ -1,31 +0,0 @@ - - -xframe tester - - - -

    - - diff --git a/www/extras/yui/tests/yahoo/tests/yahoo.html b/www/extras/yui/tests/yahoo/tests/yahoo.html deleted file mode 100644 index 271799f96..000000000 --- a/www/extras/yui/tests/yahoo/tests/yahoo.html +++ /dev/null @@ -1,445 +0,0 @@ - - -YUI Tests - - - - - - - - - - - - - - - -

    YAHOO test page

    -

    This page contains tests being run by yuitest, the results of which
    -are output in the logger to the right.
    View the source to see how it's done.

    -

    - - - diff --git a/www/extras/yui/tests/yuiloader/tests/yuiloader.html b/www/extras/yui/tests/yuiloader/tests/yuiloader.html deleted file mode 100644 index de3cd0345..000000000 --- a/www/extras/yui/tests/yuiloader/tests/yuiloader.html +++ /dev/null @@ -1,118 +0,0 @@ - - -YUI Tests - - - - - - - - - - - - - -

    YUILoader test page

    -

    - - - diff --git a/www/extras/yui/tests/yuiloader/tests/yuiloader_config.html b/www/extras/yui/tests/yuiloader/tests/yuiloader_config.html deleted file mode 100644 index b4daa8d57..000000000 --- a/www/extras/yui/tests/yuiloader/tests/yuiloader_config.html +++ /dev/null @@ -1,82 +0,0 @@ - - - -yuiloader test - - - - - - - -

    YUI Loader

    -

    yuiloader is loading the test library, so if it fails the test probably won't run at all

    - - diff --git a/www/extras/yui/tests/yuiloader/tests/yuiloader_rollup.html b/www/extras/yui/tests/yuiloader/tests/yuiloader_rollup.html deleted file mode 100644 index 4a2ed3fee..000000000 --- a/www/extras/yui/tests/yuiloader/tests/yuiloader_rollup.html +++ /dev/null @@ -1,85 +0,0 @@ - - - -yuiloader test - - - - - - - -

    YUI Loader

    -

    yuiloader is loading the test library, so if it fails the test probably won't run at all

    -

    Testing rollups (yahoo-dom-event) which is verified in the test.

    - - diff --git a/www/extras/yui/tests/yuitest/tests/yuitest.html b/www/extras/yui/tests/yuitest/tests/yuitest.html deleted file mode 100644 index 73f826cb7..000000000 --- a/www/extras/yui/tests/yuitest/tests/yuitest.html +++ /dev/null @@ -1,1492 +0,0 @@ - - -yuitest tests - - - - - - - - - - - - - -

    yuitest tests

    -

    - - - diff --git a/docs/maintenance.html b/www/maintenance.html similarity index 100% rename from docs/maintenance.html rename to www/maintenance.html diff --git a/www/uploads/48/d9/48d94a1f46e6369767982bde8e4ff194/thumb-top-right.jpg b/www/uploads/12/6c/126c123b9de9c957770d943dfa93f542/thumb-top-right.jpg similarity index 100% rename from www/uploads/48/d9/48d94a1f46e6369767982bde8e4ff194/thumb-top-right.jpg rename to www/uploads/12/6c/126c123b9de9c957770d943dfa93f542/thumb-top-right.jpg diff --git a/www/uploads/48/d9/48d94a1f46e6369767982bde8e4ff194/top-right.jpg b/www/uploads/12/6c/126c123b9de9c957770d943dfa93f542/top-right.jpg similarity index 100% rename from www/uploads/48/d9/48d94a1f46e6369767982bde8e4ff194/top-right.jpg rename to www/uploads/12/6c/126c123b9de9c957770d943dfa93f542/top-right.jpg diff --git a/www/uploads/3c/e1/3ce1c9490aa981a19c9228f47be0eeda/input_bg.jpg b/www/uploads/1e/03/1e036e4dd875763e679038c53a802a8c/input_bg.jpg similarity index 100% rename from www/uploads/3c/e1/3ce1c9490aa981a19c9228f47be0eeda/input_bg.jpg rename to www/uploads/1e/03/1e036e4dd875763e679038c53a802a8c/input_bg.jpg diff --git a/www/uploads/3c/e1/3ce1c9490aa981a19c9228f47be0eeda/thumb-input_bg.jpg b/www/uploads/1e/03/1e036e4dd875763e679038c53a802a8c/thumb-input_bg.jpg similarity index 100% rename from www/uploads/3c/e1/3ce1c9490aa981a19c9228f47be0eeda/thumb-input_bg.jpg rename to www/uploads/1e/03/1e036e4dd875763e679038c53a802a8c/thumb-input_bg.jpg diff --git a/www/uploads/56/6a/566a9ad05defc721d369ccf5a230b8f5/bottom-right.jpg b/www/uploads/21/fc/21fc9dbb68b6249e8e7f72936ecb0b2f/bottom-right.jpg similarity index 100% rename from www/uploads/56/6a/566a9ad05defc721d369ccf5a230b8f5/bottom-right.jpg rename to www/uploads/21/fc/21fc9dbb68b6249e8e7f72936ecb0b2f/bottom-right.jpg diff --git a/www/uploads/56/6a/566a9ad05defc721d369ccf5a230b8f5/thumb-bottom-right.jpg b/www/uploads/21/fc/21fc9dbb68b6249e8e7f72936ecb0b2f/thumb-bottom-right.jpg similarity index 100% rename from www/uploads/56/6a/566a9ad05defc721d369ccf5a230b8f5/thumb-bottom-right.jpg rename to www/uploads/21/fc/21fc9dbb68b6249e8e7f72936ecb0b2f/thumb-bottom-right.jpg diff --git a/www/uploads/38/93/389319e91b251464dc3ccf559de5c691/thumb-top-left.jpg b/www/uploads/41/8d/418d7ad6590c974f4c50284060178039/thumb-top-left.jpg similarity index 100% rename from www/uploads/38/93/389319e91b251464dc3ccf559de5c691/thumb-top-left.jpg rename to www/uploads/41/8d/418d7ad6590c974f4c50284060178039/thumb-top-left.jpg diff --git a/www/uploads/38/93/389319e91b251464dc3ccf559de5c691/top-left.jpg b/www/uploads/41/8d/418d7ad6590c974f4c50284060178039/top-left.jpg similarity index 100% rename from www/uploads/38/93/389319e91b251464dc3ccf559de5c691/top-left.jpg rename to www/uploads/41/8d/418d7ad6590c974f4c50284060178039/top-left.jpg diff --git a/www/uploads/7a/37/7a37d34156e8e11a579f3926cbc2ab12/bottom-left.jpg b/www/uploads/77/93/779351e19745d87662438e6be3ae36aa/bottom-left.jpg similarity index 100% rename from www/uploads/7a/37/7a37d34156e8e11a579f3926cbc2ab12/bottom-left.jpg rename to www/uploads/77/93/779351e19745d87662438e6be3ae36aa/bottom-left.jpg diff --git a/www/uploads/7a/37/7a37d34156e8e11a579f3926cbc2ab12/thumb-bottom-left.jpg b/www/uploads/77/93/779351e19745d87662438e6be3ae36aa/thumb-bottom-left.jpg similarity index 100% rename from www/uploads/7a/37/7a37d34156e8e11a579f3926cbc2ab12/thumb-bottom-left.jpg rename to www/uploads/77/93/779351e19745d87662438e6be3ae36aa/thumb-bottom-left.jpg diff --git a/www/uploads/a6/48/a648b8354e35425e94b74ff5e24daae0/thumb-top-right.jpg b/www/uploads/a6/48/a648b8354e35425e94b74ff5e24daae0/thumb-top-right.jpg new file mode 100644 index 000000000..be9a25566 Binary files /dev/null and b/www/uploads/a6/48/a648b8354e35425e94b74ff5e24daae0/thumb-top-right.jpg differ diff --git a/www/uploads/a6/48/a648b8354e35425e94b74ff5e24daae0/top-right.jpg b/www/uploads/a6/48/a648b8354e35425e94b74ff5e24daae0/top-right.jpg new file mode 100644 index 000000000..1ebd6fec4 Binary files /dev/null and b/www/uploads/a6/48/a648b8354e35425e94b74ff5e24daae0/top-right.jpg differ diff --git a/www/uploads/b2/7d/b27d1f0a521671747fcec8938ae72fc6/input_bg.jpg b/www/uploads/b2/7d/b27d1f0a521671747fcec8938ae72fc6/input_bg.jpg new file mode 100644 index 000000000..3f9b6c394 Binary files /dev/null and b/www/uploads/b2/7d/b27d1f0a521671747fcec8938ae72fc6/input_bg.jpg differ diff --git a/www/uploads/b2/7d/b27d1f0a521671747fcec8938ae72fc6/thumb-input_bg.jpg b/www/uploads/b2/7d/b27d1f0a521671747fcec8938ae72fc6/thumb-input_bg.jpg new file mode 100644 index 000000000..14411c5e5 Binary files /dev/null and b/www/uploads/b2/7d/b27d1f0a521671747fcec8938ae72fc6/thumb-input_bg.jpg differ diff --git a/www/uploads/b7/3d/b73db582e589a6116f55ba680b4766c1/bottom-right.jpg b/www/uploads/b7/3d/b73db582e589a6116f55ba680b4766c1/bottom-right.jpg new file mode 100644 index 000000000..e6d1cf5fa Binary files /dev/null and b/www/uploads/b7/3d/b73db582e589a6116f55ba680b4766c1/bottom-right.jpg differ diff --git a/www/uploads/b7/3d/b73db582e589a6116f55ba680b4766c1/thumb-bottom-right.jpg b/www/uploads/b7/3d/b73db582e589a6116f55ba680b4766c1/thumb-bottom-right.jpg new file mode 100644 index 000000000..eb294b484 Binary files /dev/null and b/www/uploads/b7/3d/b73db582e589a6116f55ba680b4766c1/thumb-bottom-right.jpg differ diff --git a/www/uploads/c2/f1/c2f1e149fe26a04efd66cd7eb7b00f5d/thumb-top-left.jpg b/www/uploads/c2/f1/c2f1e149fe26a04efd66cd7eb7b00f5d/thumb-top-left.jpg new file mode 100644 index 000000000..8cbfc4cdd Binary files /dev/null and b/www/uploads/c2/f1/c2f1e149fe26a04efd66cd7eb7b00f5d/thumb-top-left.jpg differ diff --git a/www/uploads/c2/f1/c2f1e149fe26a04efd66cd7eb7b00f5d/top-left.jpg b/www/uploads/c2/f1/c2f1e149fe26a04efd66cd7eb7b00f5d/top-left.jpg new file mode 100644 index 000000000..bb47a75ac Binary files /dev/null and b/www/uploads/c2/f1/c2f1e149fe26a04efd66cd7eb7b00f5d/top-left.jpg differ diff --git a/www/uploads/d2/68/d26878bb45b2b836379dc7be9115dc89/bottom-left.jpg b/www/uploads/d2/68/d26878bb45b2b836379dc7be9115dc89/bottom-left.jpg new file mode 100644 index 000000000..2d890edb3 Binary files /dev/null and b/www/uploads/d2/68/d26878bb45b2b836379dc7be9115dc89/bottom-left.jpg differ diff --git a/www/uploads/d2/68/d26878bb45b2b836379dc7be9115dc89/thumb-bottom-left.jpg b/www/uploads/d2/68/d26878bb45b2b836379dc7be9115dc89/thumb-bottom-left.jpg new file mode 100644 index 000000000..e2776d2f3 Binary files /dev/null and b/www/uploads/d2/68/d26878bb45b2b836379dc7be9115dc89/thumb-bottom-left.jpg differ