diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index 265553a7b..30bdeb24f 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -14,6 +14,10 @@ - Added duplicate button in asset manager as discussed in Community IRC. - fix - WebGUI::Form::File doesn't use WebGUI::Form::Hidden - fixed various bugs in the time tracking app + - fixed a few bugs in the graphic system + - fix - Link to a page in the Webgui Page Tree + - better HTML compliancy + - fixed a lot of POD 6.99.1 - Bugfixes on dashboard to fix template errors. diff --git a/lib/WebGUI/AdminConsole.pm b/lib/WebGUI/AdminConsole.pm index 2677f91e8..5486bee78 100644 --- a/lib/WebGUI/AdminConsole.pm +++ b/lib/WebGUI/AdminConsole.pm @@ -39,7 +39,7 @@ The admin console is a menuing system to manage webgui's administrative function render setHelp setIcon - + =head1 METHODS These methods are available from this class: @@ -527,7 +527,7 @@ A string representing the location of the icon. sub setIcon { my $self = shift; my $icon = shift; - if ($icon) { + if ($icon) { $self->{_function}{icon} = $icon; } } diff --git a/lib/WebGUI/Asset/Wobject/Article.pm b/lib/WebGUI/Asset/Wobject/Article.pm index 686287c99..6645e6505 100644 --- a/lib/WebGUI/Asset/Wobject/Article.pm +++ b/lib/WebGUI/Asset/Wobject/Article.pm @@ -62,9 +62,9 @@ The text displayed to the user as a hyperlink to the linkURL. =cut #------------------------------------------------------------------- - + =head2 addRevision - + Override the default method in order to deal with attachments. =cut @@ -77,7 +77,7 @@ sub addRevision { $newSelf->update({storageId=>$newStorage->getId}); } return $newSelf; -} +} #------------------------------------------------------------------- sub definition { @@ -185,7 +185,7 @@ sub getStorageLocation { =head2 indexContent ( ) -Indexing the content of attachments and user defined fields. See WebGUI::Asset::indexContent() for additonal details. +Indexing the content of attachments and user defined fields. See WebGUI::Asset::indexContent() for additonal details. =cut @@ -236,7 +236,7 @@ sub purge { #------------------------------------------------------------------- -=head2 purgeCache () +=head2 purgeCache ( ) See WebGUI::Asset::purgeCache() for details. @@ -273,7 +273,7 @@ sub view { } my %var; if ($self->get("storageId")) { - my $storage = $self->getStorageLocation; + my $storage = $self->getStorageLocation; my @loop = (); foreach my $file (@{$storage->getFiles}) { if ($storage->isImage($file)) { @@ -356,7 +356,7 @@ sub www_deleteFile { #------------------------------------------------------------------- -=head2 www_view () +=head2 www_view ( ) See WebGUI::Asset::Wobject::www_view() for details. diff --git a/lib/WebGUI/AssetVersioning.pm b/lib/WebGUI/AssetVersioning.pm index 6cbe4d045..8c4df8033 100644 --- a/lib/WebGUI/AssetVersioning.pm +++ b/lib/WebGUI/AssetVersioning.pm @@ -46,27 +46,27 @@ Adds a revision of an existing asset. Note that programmers should almost never =head3 properties -A hash reference containing a list of properties to associate with the child. - +A hash reference containing a list of properties to associate with the child. + =head3 revisionDate An epoch date representing the date/time stamp that this revision was created. Defaults to$self->session->datetime->time(). - -=cut - + +=cut + sub addRevision { my $self = shift; my $properties = shift; my $now = shift ||$self->session->datetime->time(); my $workingTag = WebGUI::VersionTag->getWorking($self->session); - $self->session->db->write("insert into assetData (assetId, revisionDate, revisedBy, tagId, status, url, - ownerUserId, groupIdEdit, groupIdView) values (?, ?, ?, ?, 'pending', ?, '3','3','7')", + $self->session->db->write("insert into assetData (assetId, revisionDate, revisedBy, tagId, status, url, + ownerUserId, groupIdEdit, groupIdView) values (?, ?, ?, ?, 'pending', ?, '3','3','7')", [$self->getId, $now, $self->session->user->userId, $workingTag->getId, $self->getId] ); foreach my $definition (@{$self->definition($self->session)}) { unless ($definition->{tableName} eq "assetData") { $self->session->db->write("insert into ".$definition->{tableName}." (assetId,revisionDate) values (?,?)", [$self->getId, $now]); } - } + } my $newVersion = WebGUI::Asset->new($self->session,$self->getId, $self->get("className"), $now); $newVersion->updateHistory("created revision"); $newVersion->update($self->get); @@ -157,7 +157,7 @@ sub purgeRevision { my $self = shift; if ($self->getRevisionCount > 1) { $self->session->db->beginTransaction; - foreach my $definition (@{$self->definition($self->session)}) { + foreach my $definition (@{$self->definition($self->session)}) { $self->session->db->write("delete from ".$definition->{tableName}." where assetId=? and revisionDate=?",[$self->getId, $self->get("revisionDate")]); } my ($count) = $self->session->db->quickArray("select count(*) from assetData where assetId=? and status='pending'",[$self->getId]); @@ -175,7 +175,7 @@ sub purgeRevision { #------------------------------------------------------------------- -=head2 setVersionLock ( ) +=head2 setVersionLock ( ) Sets the versioning lock to "on" so that this piece of content may not be edited by anyone else now that it has been edited. @@ -191,7 +191,7 @@ sub setVersionLock { #------------------------------------------------------------------- -=head2 unsetVersionLock ( ) +=head2 unsetVersionLock ( ) Sets the versioning lock to "off" so that this piece of content may be edited once again. @@ -232,7 +232,7 @@ sub updateHistory { #------------------------------------------------------------------- -=head2 www_lock () +=head2 www_lock () This is the same as doing an www_editSave without changing anything. It's here so that users can lock assets if they're planning on working on them, or they're working on some of the content offline. @@ -267,7 +267,7 @@ sub www_manageRevisions { my $output = sprintf ' ', $i18n->get('revision date'), $i18n->get('revised by'), $i18n->get('tag name'); - my $sth = $self->session->db->read("select assetData.revisionDate, users.username, assetVersionTag.name,assetData.tagId from assetData + my $sth = $self->session->db->read("select assetData.revisionDate, users.username, assetVersionTag.name,assetData.tagId from assetData left join assetVersionTag on assetData.tagId=assetVersionTag.tagId left join users on assetData.revisedBy=users.userId where assetData.assetId=".$self->session->db->quote($self->getId)); while (my ($date,$by,$tag,$tagId) = $sth->array) { diff --git a/lib/WebGUI/Form/Template.pm b/lib/WebGUI/Form/Template.pm index 66af5678a..32f70f728 100644 --- a/lib/WebGUI/Form/Template.pm +++ b/lib/WebGUI/Form/Template.pm @@ -31,7 +31,7 @@ Creates a template chooser control. This is a subclass of WebGUI::Form::SelectBox. -=head1 METHODS +=head1 METHODS The following methods are specifically available from this class. Check the superclass for additional methods. @@ -51,10 +51,10 @@ The following additional parameters have been added via this sub class. The identifier for this field. Defaults to "templateId". -=head4 namespace - +=head4 namespace + The namespace for the list of templates to return. If this is omitted, all templates will be displayed. - + =head4 label A text label that will be displayed if toHtmlWithWrapper() is called. Defaults to getName(). diff --git a/lib/WebGUI/Form/Workflow.pm b/lib/WebGUI/Form/Workflow.pm index 060a954c5..1772be144 100644 --- a/lib/WebGUI/Form/Workflow.pm +++ b/lib/WebGUI/Form/Workflow.pm @@ -31,7 +31,7 @@ Creates a workflow chooser control. This is a subclass of WebGUI::Form::SelectBox. -=head1 METHODS +=head1 METHODS The following methods are specifically available from this class. Check the superclass for additional methods. @@ -52,9 +52,9 @@ The following additional parameters have been added via this sub class. The identifier for this field. Defaults to "workflowId". =head4 type - + The type of workflows to list based upon the object type that will be passed to them "none", "WebGUI::VersionTag", etc. If this is omitted, the entire list of workflows will be returned. - + =head4 label A text label that will be displayed if toHtmlWithWrapper() is called. Defaults to getName(). diff --git a/lib/WebGUI/HTML.pm b/lib/WebGUI/HTML.pm index e5326a9b0..fe40475b3 100644 --- a/lib/WebGUI/HTML.pm +++ b/lib/WebGUI/HTML.pm @@ -68,15 +68,15 @@ sub cleanSegment { $html =~ s/\//ixsg; # remove link tags $html =~ s/\//ixsg; - # remove title tags + # remove title tags $html =~ s/\.*?\<\/title\>//ixsg; - # remove head tags + # remove head tags $html =~ s/\//ixsg; $html =~ s/\<\/head>//ixsg; - # remove body tags + # remove body tags $html =~ s/\//ixsg; $html =~ s/\<\/body>//ixsg; - # remove html tags + # remove html tags $html =~ s/\//ixsg; $html =~ s/\<\/html>//ixsg; return $html; @@ -220,31 +220,31 @@ sub html2text { } #------------------------------------------------------------------- - + =head2 makeAbsolute ( session, html , [ baseURL ] ) - + Returns html with all relative links converted to absolute. =head3 session A reference to the current session. - + =head3 html - + The html to be made absolute. - + =head3 baseURL -The base URL to use. Defaults to current page's url. +The base URL to use. Defaults to current page's url. =cut my $absolute = ""; - + sub makeAbsolute { my $session = shift; my $html = shift; - my $baseURL = shift; + my $baseURL = shift; $absolute = ""; @@ -306,7 +306,7 @@ sub makeAbsolute { #------------------------------------------------------------------- -=head2 processReplacements ( session, content ) +=head2 processReplacements ( session, content ) Processes text using the WebGUI replacements system. diff --git a/lib/WebGUI/PassiveProfiling.pm b/lib/WebGUI/PassiveProfiling.pm index 1723076fa..a7a6cd236 100644 --- a/lib/WebGUI/PassiveProfiling.pm +++ b/lib/WebGUI/PassiveProfiling.pm @@ -68,19 +68,19 @@ sub add { } #------------------------------------------------------------------- - + =head2 addPage ( session, assetId ) - -Adds all wobjects on current page to the passive profile log. + +Adds all wobjects on current page to the passive profile log. =head3 session A reference to the current session. - + =head3 assetId - + The assetId of the page you want to log. - + =cut sub addPage { @@ -101,7 +101,7 @@ sub addPage { Summarizes passive profile log data using the metadata attributes. An entry is logged in the passiveProfileAOI table. -=head3 session +=head3 session A reference to the session. @@ -115,18 +115,18 @@ sub summarizeAOI { my $session = shift; my $data = shift; my $sql = " - select f.fieldName, - f.fieldType, - d.fieldId, - d.assetId, - d.value - from metaData_values d , metaData_properties f - where f.fieldId = d.fieldId + select f.fieldName, + f.fieldType, + d.fieldId, + d.assetId, + d.value + from metaData_values d , metaData_properties f + where f.fieldId = d.fieldId and d.assetId = ".$session->db->quote($data->{assetId}); my $sth = $session->db->read($sql); while (my $field = $sth->hashRef) { - my $aoi = $session->db->quickHashRef("select * from passiveProfileAOI + my $aoi = $session->db->quickHashRef("select * from passiveProfileAOI where userId=".$session->db->quote($data->{userId})." and fieldId=".$session->db->quote($field->{fieldId})." and value=".$session->db->quote($field->{value})); @@ -142,7 +142,7 @@ sub summarizeAOI { $session->db->write("update passiveProfileAOI set count=".$session->db->quote($count)." where userId=".$session->db->quote($data->{userId})." and fieldId=".$session->db->quote($field->{fieldId})." and - value=".$session->db->quote($field->{value})); + value=".$session->db->quote($field->{value})); } $sth->finish; } diff --git a/lib/WebGUI/ProfileField.pm b/lib/WebGUI/ProfileField.pm index dcbbe623c..cbbed8642 100644 --- a/lib/WebGUI/ProfileField.pm +++ b/lib/WebGUI/ProfileField.pm @@ -48,15 +48,15 @@ sub _reorderFields { my ($sth, $i, $id); $sth = $self->session->db->read("select fieldName from userProfileField where profileCategoryId=".$self->session->db->quote($category)." order by sequenceNumber"); while (($id) = $sth->array) { - $i++; + $i++; $self->session->db->write("update userProfileField set sequenceNumber='$i' where fieldName=".$self->session->db->quote($id)); - } - $sth->finish; -} + } + $sth->finish; +} #------------------------------------------------------------------- -=head2 create ( session, fieldName [, properties, categoryId] ) +=head2 create ( session, fieldName [, properties, categoryId] ) Add a new field to the system. Returns a WebGUI::ProfileField object if created successfully, otherwise returns undef. @@ -261,12 +261,12 @@ sub getFields { =head2 getId () -Returns the unique fieldName for this field. +Returns the unique fieldName for this field. B This method is named getId for consistency amongst other packages even though technically profile fields have field names rather than ids. - -=cut - + +=cut + sub getId { my $self = shift; return $self->get("fieldName"); @@ -278,8 +278,8 @@ sub getId { Returns the eval'd label for this field. -=cut - +=cut + sub getLabel { my $self = shift; return WebGUI::Operation::Shared::secureEval($self->session,$self->get("label")); @@ -498,7 +498,7 @@ A scalar containing a hash reference declaration of possible values. Only used f =head4 dataDefault -A scalar containing an array reference or scalar declaration of defaultly selected value(s). +A scalar containing an array reference or scalar declaration of defaultly selected value(s). =cut diff --git a/lib/WebGUI/Session/Url.pm b/lib/WebGUI/Session/Url.pm index 05d704bca..dc207c4f3 100644 --- a/lib/WebGUI/Session/Url.pm +++ b/lib/WebGUI/Session/Url.pm @@ -46,11 +46,10 @@ This package provides URL writing functionality. It is important that all WebGUI $string = $url->makeAbsolute($string); $string = $url->page($string, $pairs); $string = $url->unescape($string); - $string = $url->urlize($string); + $string = $url->urlize($string); $url->setSiteURL($string); - =head1 METHODS These subroutines are available from this package: @@ -61,7 +60,7 @@ These subroutines are available from this package: #------------------------------------------------------------------- -=head2 append ( url, pairs ) +=head2 append ( url, pairs ) Returns a URL after adding some information to the end of it. @@ -182,7 +181,7 @@ sub gateway { Returns the URL of the page this request was refered from (no gateway, no query params, just the page url). Returns undef if there was no referer. -=cut +=cut sub getRefererUrl { my $self = shift; @@ -205,7 +204,7 @@ sub getRefererUrl { Returns the URL of the page requested (no gateway, no query params, just the page url). -=cut +=cut sub getRequestedUrl { my $self = shift; @@ -227,7 +226,7 @@ Returns a constructed site url. The returned value can be overridden using the s =cut -sub getSiteURL { +sub getSiteURL { my $self = shift; unless ($self->{_siteUrl}) { my $site = ""; @@ -248,21 +247,21 @@ sub getSiteURL { #------------------------------------------------------------------- - + =head2 makeAbsolute ( url , [ baseURL ] ) - + Returns an absolute url. - + =head3 url - + The url to make absolute. - + =head3 baseURL The base URL to use. This defaults to current page url. - + =cut - + sub makeAbsolute { my $self = shift; my $url = shift; @@ -280,7 +279,7 @@ Returns a string that has made into a WebGUI compliant URL based upon the langua The string to make compliant. This is usually a page title or a filename. -=cut +=cut sub makeCompliant { my $self = shift; @@ -291,7 +290,7 @@ sub makeCompliant { #------------------------------------------------------------------- -=head2 new ( session ) +=head2 new ( session ) Constructor. @@ -366,7 +365,7 @@ sub session { =head2 setSiteURL ( ) -Sets an alternate site url. +Sets an alternate site url. =cut diff --git a/lib/WebGUI/Session/Var.pm b/lib/WebGUI/Session/Var.pm index 3d64618c3..a20da819a 100644 --- a/lib/WebGUI/Session/Var.pm +++ b/lib/WebGUI/Session/Var.pm @@ -61,8 +61,8 @@ sub DESTROY { #------------------------------------------------------------------- - -=head2 end ( ) + +=head2 end ( ) Removes the specified user session from memory and database. @@ -78,7 +78,7 @@ sub end { #------------------------------------------------------------------- -=head2 get( varName ) +=head2 get ( varName ) Retrieves the current value of a session variable. @@ -133,9 +133,9 @@ sub getId { #------------------------------------------------------------------- - + =head2 isAdminOn ( ) - + Returns a boolean indicating whether admin mode is on or not. =cut @@ -208,9 +208,9 @@ sub session { #------------------------------------------------------------------- - + =head2 start ( [ userId, sessionId ] ) - + Start a new user session. Returns the session id. =head3 userId @@ -270,5 +270,4 @@ sub switchAdminOn { } - 1; diff --git a/lib/WebGUI/Workflow/Activity.pm b/lib/WebGUI/Workflow/Activity.pm index 1525e0d95..dbe719e39 100644 --- a/lib/WebGUI/Workflow/Activity.pm +++ b/lib/WebGUI/Workflow/Activity.pm @@ -66,7 +66,7 @@ These methods are available from this class: #------------------------------------------------------------------- -=head2 create ( session, workflowId [, id, classname ] ) +=head2 create ( session, workflowId [, id, classname ] ) Creates a new instance of this activity in a workflow. @@ -97,9 +97,9 @@ sub create { my ($sequenceNumber) = $session->db->quickArray("select count(*) from WorkflowActivity where workflowId=?", [$workflowId]); $sequenceNumber++; my $activityId = $session->db->setRow("WorkflowActivity","activityId", { - sequenceNumber=>$sequenceNumber, - activityId=>"new", - className=>$classname || $class, + sequenceNumber=>$sequenceNumber, + activityId=>"new", + className=>$classname || $class, workflowId=>$workflowId }, $id); return $class->new($session, $activityId, $classname); @@ -188,7 +188,7 @@ A reference to some object that will be passed in to this activity for an action =head2 instance -A reference to the workflow instance object. +A reference to the workflow instance object. =cut @@ -202,7 +202,7 @@ sub execute { #------------------------------------------------------------------- -=head2 get ( name ) +=head2 get ( name ) Returns the value for a given property. @@ -215,13 +215,13 @@ sub get { } #------------------------------------------------------------------- - + =head2 getEditForm () - + Returns the form that will be used to edit the properties of an activity. - -=cut - + +=cut + sub getEditForm { my $self = shift; my $form = WebGUI::HTMLForm->new($self->session); @@ -264,7 +264,7 @@ sub getId { =head2 getName ( ) -Returns the name of the activity. +Returns the name of the activity. =cut @@ -284,7 +284,7 @@ Constructor. A reference to the current session. -=head3 activityId +=head3 activityId A unique id refering to an instance of an activity. @@ -300,10 +300,10 @@ sub new { my $cmd = "use ".$class; eval ($cmd); if ($@) { - $session->errorHandler->error("Couldn't compile workflow activity package: ".$class.". Root cause: ".$@); - return undef; + $session->errorHandler->error("Couldn't compile workflow activity package: ".$class.". Root cause: ".$@); + return undef; } - my $sub = $session->db->buildHashRef("select name,value from WorkflowActivityData where activityId=?",[$activityId]); + my $sub = $session->db->buildHashRef("select name,value from WorkflowActivityData where activityId=?",[$activityId]); my %data = (%{$main}, %{$sub}); bless {_session=>$session, _id=>$activityId, _data=>\%data}, $class; } @@ -312,18 +312,18 @@ sub new { =head2 newByPropertyHashRef ( session, properties ) -Constructor. +Constructor. =head3 session - + A reference to the current session. - + =head3 properties - + A properties hash reference. The className of the properties hash must be valid. - -=cut - + +=cut + sub newByPropertyHashRef { my $class = shift; my $session = shift; @@ -332,13 +332,13 @@ sub newByPropertyHashRef { return undef unless exists $properties->{className}; my $className = $properties->{className}; my $cmd = "use ".$className; - eval ($cmd); + eval ($cmd); if ($@) { $session->errorHandler->warn("Couldn't compile activity package: ".$className.". Root cause: ".$@); return undef; - } + } bless {_session=>$session, _id=>$properties->{activityId}, _data => $properties}, $className; -} +} #------------------------------------------------------------------- @@ -369,7 +369,7 @@ sub processPropertiesFromFormPost { #------------------------------------------------------------------- -=head2 session ( ) +=head2 session ( ) Returns a reference to the current session.
%s%s%s