- fix [ 1163407 ] Ampersand XHTML 1.0 Non-Compliant
This commit is contained in:
parent
789263864a
commit
ed161ce282
61 changed files with 244 additions and 456 deletions
|
|
@ -1,4 +1,5 @@
|
|||
6.7.2
|
||||
- fix [ 1163407 ] Ampersand XHTML 1.0 Non-Compliant
|
||||
- fix [ 1243559 ] profile field security vulnerability (Len Kranendonk)
|
||||
- fix [ 1271490 ] uncommitted version appears in Navigation (midellaq)
|
||||
- fix [ 1268605 ] field type selection broken (midellaq)
|
||||
|
|
|
|||
|
|
@ -451,3 +451,18 @@ introduce errors to the database when modifying it directly rather than using
|
|||
the APIs.
|
||||
|
||||
|
||||
5.20 Use ; instead of & in URLs
|
||||
|
||||
In our effort to achieve full XHTML strict compliance we have switched
|
||||
WebGUI's internals to expect a ; instead of a & as the URL query parameter
|
||||
delimiter in 6.7.2. You must update your WebGUI plugins to reflect this new
|
||||
URL style.
|
||||
|
||||
|
||||
5.21 WebGUI::Search Removed
|
||||
|
||||
The old WebGUI::Search package has been removed in 6.7.2. It hasn't been used
|
||||
by any WebGUI core package since 6.3 and wasn't really used much prior to that.
|
||||
If you were using it, just copy it's subs into your app.
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -15,9 +15,15 @@ fixTimeFields();
|
|||
fixSpelling();
|
||||
fixCSTemplate();
|
||||
speedUpAdminConsole();
|
||||
removeOldFiles();
|
||||
|
||||
finish();
|
||||
|
||||
#-------------------------------------------------
|
||||
sub removeOldFiles {
|
||||
print "\tRemoving files that are no longer needed.\n" unless ($quiet);
|
||||
unlink("../../lib/WebGUI/Search.pm");
|
||||
}
|
||||
|
||||
#-------------------------------------------------
|
||||
sub speedUpAdminConsole {
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ sub _processOperations {
|
|||
$opNumber++;
|
||||
if ($output eq "" && exists $session{form}{"op".$opNumber}) {
|
||||
my $urlString = WebGUI::URL::unescape($session{form}{"op".$opNumber});
|
||||
my @pairs = split(/\&/,$urlString);
|
||||
my @pairs = split(/\;/,$urlString);
|
||||
my %form;
|
||||
foreach my $pair (@pairs) {
|
||||
my @param = split(/\=/,$pair);
|
||||
|
|
|
|||
|
|
@ -441,7 +441,7 @@ sub setHelp {
|
|||
my $self = shift;
|
||||
my $id = shift;
|
||||
my $namespace = shift || "WebGUI";
|
||||
$self->{_helpUrl} = WebGUI::URL::page('op=viewHelp&hid='.$id.'&namespace='.$namespace) if ($id);
|
||||
$self->{_helpUrl} = WebGUI::URL::page('op=viewHelp;hid='.$id.';namespace='.$namespace) if ($id);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -352,7 +352,7 @@ Returns an arrayref that contains a label (name of the class of Asset) and url (
|
|||
|
||||
=head3 addToUrl
|
||||
|
||||
Any text to append to the getAssetAdderLinks URL. Usually name/variable pairs to pass in the url. If addToURL is specified, the character "&" and the text in addToUrl is appended to the returned url.
|
||||
Any text to append to the getAssetAdderLinks URL. Usually name/variable pairs to pass in the url. If addToURL is specified, the character ";" and the text in addToUrl is appended to the returned url.
|
||||
|
||||
=head3 type
|
||||
|
||||
|
|
@ -388,7 +388,7 @@ sub getAssetAdderLinks {
|
|||
if ($@) {
|
||||
WebGUI::ErrorHandler::error("Couldn't get the name of ".$class." because ".$@);
|
||||
} else {
|
||||
my $url = $self->getUrl("func=add&class=".$class);
|
||||
my $url = $self->getUrl("func=add;class=".$class);
|
||||
$url = WebGUI::URL::append($url,$addToUrl) if ($addToUrl);
|
||||
$links{$label}{url} = $url;
|
||||
$links{$label}{icon} = $class->getIcon;
|
||||
|
|
@ -408,7 +408,7 @@ sub getAssetAdderLinks {
|
|||
while (my ($class,$id,$date) = $sth->array) {
|
||||
my $asset = WebGUI::Asset->new($id,$class,$date);
|
||||
next unless ($asset->canView && $asset->canAdd && $asset->getUiLevel <= $session{user}{uiLevel});
|
||||
my $url = $self->getUrl("func=add&class=".$class."&prototype=".$id);
|
||||
my $url = $self->getUrl("func=add;class=".$class.";prototype=".$id);
|
||||
$url = WebGUI::URL::append($url,$addToUrl) if ($addToUrl);
|
||||
$links{$asset->getTitle}{url} = $url;
|
||||
$links{$asset->getTitle}{icon} = $asset->getIcon;
|
||||
|
|
@ -650,7 +650,7 @@ sub getEditForm {
|
|||
if (WebGUI::Grouping::isInGroup(3)) {
|
||||
# Add a quick link to add field
|
||||
$tabform->getTab("meta")->readOnly(
|
||||
-value=>'<p><a href="'.WebGUI::URL::page("func=editMetaDataField&fid=new").'">'.
|
||||
-value=>'<p><a href="'.WebGUI::URL::page("func=editMetaDataField;fid=new").'">'.
|
||||
WebGUI::International::get('Add new field','Asset').
|
||||
'</a></p>',
|
||||
-hoverHelp=>WebGUI::International::get('make prototype description',"Asset"),
|
||||
|
|
@ -871,7 +871,7 @@ Returns a URL of Asset based upon WebGUI's gateway script.
|
|||
|
||||
Name value pairs to add to the URL in the form of:
|
||||
|
||||
name1=value1&name2=value2&name3=value3
|
||||
name1=value1;name2=value2;name3=value3
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -1447,7 +1447,7 @@ sub www_manageAssets {
|
|||
foreach my $child (@{$self->getLineage(["children"],{returnObjects=>1})}) {
|
||||
$output .= 'var contextMenu = new contextMenu_createWithLink("'.$child->getId.'","More");
|
||||
contextMenu.addLink("'.$child->getUrl("func=editBranch").'","'.$i18n->get("edit branch").'");
|
||||
contextMenu.addLink("'.$child->getUrl("func=createShortcut&proceed=manageAssets").'","'.$i18n->get("create shortcut").'");
|
||||
contextMenu.addLink("'.$child->getUrl("func=createShortcut;proceed=manageAssets").'","'.$i18n->get("create shortcut").'");
|
||||
contextMenu.addLink("'.$child->getUrl("func=manageRevisions").'","'.$i18n->get("revisions").'");
|
||||
contextMenu.addLink("'.$child->getUrl.'","'.$i18n->get("view").'"); '."\n";
|
||||
my $title = $child->getTitle;
|
||||
|
|
@ -1456,9 +1456,9 @@ sub www_manageAssets {
|
|||
my $edit;
|
||||
if ($child->isLocked) {
|
||||
$locked = '<img src="'.$session{config}{extrasURL}.'/assetManager/locked.gif" alt="locked" border="0" />';
|
||||
$edit = "'<a href=\"".$child->getUrl("func=edit&proceed=manageAssets")."\">Edit</a> | '+" if ($child->get("isLockedBy") eq $session{user}{userId});
|
||||
$edit = "'<a href=\"".$child->getUrl("func=edit;proceed=manageAssets")."\">Edit</a> | '+" if ($child->get("isLockedBy") eq $session{user}{userId});
|
||||
} else {
|
||||
$edit = "'<a href=\"".$child->getUrl("func=edit&proceed=manageAssets")."\">Edit</a> | '+";
|
||||
$edit = "'<a href=\"".$child->getUrl("func=edit;proceed=manageAssets")."\">Edit</a> | '+";
|
||||
$locked = '<img src="'.$session{config}{extrasURL}.'/assetManager/unlocked.gif" alt="unlocked" border="0" />';
|
||||
}
|
||||
$output .= "assetManager.AddLine('"
|
||||
|
|
@ -1495,21 +1495,21 @@ sub www_manageAssets {
|
|||
foreach my $link (@{$self->getAssetAdderLinks("proceed=manageAssets","assetContainers")}) {
|
||||
$output .= '<img src="'.$link->{'icon.small'}.'" align="middle" alt="'.$link->{label}.'" border="0" />
|
||||
<a href="'.$link->{url}.'">'.$link->{label}.'</a> ';
|
||||
$output .= editIcon("func=edit&proceed=manageAssets",$link->{asset}->get("url")) if ($link->{isPrototype});
|
||||
$output .= editIcon("func=edit;proceed=manageAssets",$link->{asset}->get("url")) if ($link->{isPrototype});
|
||||
$output .= '<br />';
|
||||
}
|
||||
$output .= '<hr />';
|
||||
foreach my $link (@{$self->getAssetAdderLinks("proceed=manageAssets")}) {
|
||||
$output .= '<img src="'.$link->{'icon.small'}.'" align="middle" alt="'.$link->{label}.'" border="0" />
|
||||
<a href="'.$link->{url}.'">'.$link->{label}.'</a> ';
|
||||
$output .= editIcon("func=edit&proceed=manageAssets",$link->{asset}->get("url")) if ($link->{isPrototype});
|
||||
$output .= editIcon("func=edit;proceed=manageAssets",$link->{asset}->get("url")) if ($link->{isPrototype});
|
||||
$output .= '<br />';
|
||||
}
|
||||
$output .= '<hr />';
|
||||
foreach my $link (@{$self->getAssetAdderLinks("proceed=manageAssets","utilityAssets")}) {
|
||||
$output .= '<img src="'.$link->{'icon.small'}.'" align="middle" alt="'.$link->{label}.'" border="0" />
|
||||
<a href="'.$link->{url}.'">'.$link->{label}.'</a> ';
|
||||
$output .= editIcon("func=edit&proceed=manageAssets",$link->{asset}->get("url")) if ($link->{isPrototype});
|
||||
$output .= editIcon("func=edit;proceed=manageAssets",$link->{asset}->get("url")) if ($link->{isPrototype});
|
||||
$output .= '<br />';
|
||||
}
|
||||
$output .= '</fieldset></div>';
|
||||
|
|
@ -1544,8 +1544,8 @@ sub www_manageAssets {
|
|||
my $packages;
|
||||
foreach my $asset (@{$self->getPackageList}) {
|
||||
$packages .= '<img src="'.$asset->getIcon(1).'" align="middle" alt="'.$asset->getName.'" border="0" />
|
||||
<a href="'.$self->getUrl("func=deployPackage&assetId=".$asset->getId).'">'.$asset->getTitle.'</a> '
|
||||
.editIcon("func=edit&proceed=manageAssets",$asset->get("url"))
|
||||
<a href="'.$self->getUrl("func=deployPackage;assetId=".$asset->getId).'">'.$asset->getTitle.'</a> '
|
||||
.editIcon("func=edit;proceed=manageAssets",$asset->get("url"))
|
||||
.'<br />';
|
||||
$hasPackages = 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -292,21 +292,21 @@ sub getEditForm {
|
|||
-namespace=>"EventsCalendar/Event",
|
||||
-label=>WebGUI::International::get(530,"Asset_Event"),
|
||||
-hoverHelp=>WebGUI::International::get('530 description',"Asset_Event"),
|
||||
-afterEdit=>'func=edit&wid='.$self->get("wobjectId")
|
||||
-afterEdit=>'func=edit;wid='.$self->get("wobjectId")
|
||||
);
|
||||
# $tabform->getTab("display")->template(
|
||||
# -name=>"regNotifyTemplateId",
|
||||
# -value=>$self->getValue("regNotifyTemplateId"),
|
||||
# -namespace=>"EventsCalendar/Event",
|
||||
# -label=>WebGUI::International::get(531,"Asset_Event"),
|
||||
# -afterEdit=>'func=edit&wid='.$self->get("wobjectId")
|
||||
# -afterEdit=>'func=edit;wid='.$self->get("wobjectId")
|
||||
# );
|
||||
# $tabform->getTab("display")->template(
|
||||
# -name=>"reminderTemplateId",
|
||||
# -value=>$self->getValue("reminderTemplateId"),
|
||||
# -namespace=>"EventsCalendar/Event",
|
||||
# -label=>WebGUI::International::get(532,"Asset_Event"),
|
||||
# -afterEdit=>'func=edit&wid='.$self->get("wobjectId")
|
||||
# -afterEdit=>'func=edit;wid='.$self->get("wobjectId")
|
||||
# );
|
||||
# $tabform->getTab("security")->group(
|
||||
# -name=>"groupCanRegister", -label=>WebGUI::International::get(533,"Asset_Event"),
|
||||
|
|
@ -402,7 +402,7 @@ sub view {
|
|||
$var{canEdit} = $self->canEdit;
|
||||
$var{"edit.url"} = WebGUI::URL::page('func=edit');
|
||||
$var{"edit.label"} = WebGUI::International::get(575,"Asset_Event");
|
||||
$var{"delete.url"} = WebGUI::URL::page('func=deleteEvent&rid='.$self->getValue("EventsCalendar_recurringId"));
|
||||
$var{"delete.url"} = WebGUI::URL::page('func=deleteEvent;rid='.$self->getValue("EventsCalendar_recurringId"));
|
||||
$var{"delete.label"} = WebGUI::International::get(576,"Asset_Event");
|
||||
my $vars = \%var;
|
||||
#get parent so we can get the parent's style. Hopefully the parent is an EventsCalendar. If not, oh well.
|
||||
|
|
@ -419,7 +419,7 @@ sub www_deleteEvent {
|
|||
$output = '<h1>'.WebGUI::International::get(42,"Asset_Event").'</h1>';
|
||||
$output .= WebGUI::International::get(75,"Asset_Event").'<p><blockquote>';
|
||||
$output .= '<a href="'.WebGUI::URL::page('func=deleteEventConfirm').'">'.WebGUI::International::get(76,"Asset_Event").'</a><p>';
|
||||
$output .= '<a href="'.WebGUI::URL::page('func=deleteEventConfirm&rid='.$session{form}{rid}).'">'
|
||||
$output .= '<a href="'.WebGUI::URL::page('func=deleteEventConfirm;rid='.$session{form}{rid}).'">'
|
||||
.WebGUI::International::get(77,"Asset_Event").'</a><p>' if (($session{form}{rid} ne "") and ($session{form}{rid} ne "0"));
|
||||
$output .= '<a href="'.$self->getUrl.'">'.WebGUI::International::get(78,"Asset_Event").'</a>';
|
||||
$output .= '</blockquote>';
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@ Formats the URL to approve a post.
|
|||
|
||||
sub getApproveUrl {
|
||||
my $self = shift;
|
||||
return $self->getUrl("func=approve&mlog=".$session{form}{mlog});
|
||||
return $self->getUrl("func=approve;mlog=".$session{form}{mlog});
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -255,7 +255,7 @@ Formats the url to deny a post.
|
|||
|
||||
sub getDenyUrl {
|
||||
my $self = shift;
|
||||
return $self->getUrl("func=deny&mlog=".$session{form}{mlog});
|
||||
return $self->getUrl("func=deny;mlog=".$session{form}{mlog});
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -298,7 +298,7 @@ Formats the url to view a users profile.
|
|||
|
||||
sub getPosterProfileUrl {
|
||||
my $self = shift;
|
||||
return $self->getUrl("op=viewProfile&uid=".$self->get("ownerUserId"));
|
||||
return $self->getUrl("op=viewProfile;uid=".$self->get("ownerUserId"));
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -316,7 +316,7 @@ An integer between 1 and 5 (5 = best).
|
|||
sub getRateUrl {
|
||||
my $self = shift;
|
||||
my $rating = shift;
|
||||
return $self->getUrl("func=rate&rating=".$rating."#".$self->getId);
|
||||
return $self->getUrl("func=rate;rating=".$rating."#".$self->getId);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -334,7 +334,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;class=WebGUI::Asset::Post;withQuote=".$withQuote);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -386,7 +386,7 @@ sub getTemplateVars {
|
|||
my %var = %{$self->get};
|
||||
$var{"userId"} = $self->get("ownerUserId");
|
||||
$var{"user.isPoster"} = $self->isPoster;
|
||||
$var{"userProfile.url"} = $self->getUrl("op=viewProfile&uid=".$self->get("ownerUserId"));
|
||||
$var{"userProfile.url"} = $self->getUrl("op=viewProfile;uid=".$self->get("ownerUserId"));
|
||||
$var{"dateSubmitted.human"} = epochToHuman($self->get("dateSubmitted"));
|
||||
$var{"dateUpdated.human"} = epochToHuman($self->get("dateUpdated"));
|
||||
$var{'title.short'} = $self->chopTitle;
|
||||
|
|
@ -471,7 +471,7 @@ sub getUploadControl {
|
|||
if ($self->get("storageId")) {
|
||||
my $i;
|
||||
foreach my $filename (@{$self->getStorageLocation->getFiles}) {
|
||||
$uploadControl .= deleteIcon("func=deleteFile&filename=".$filename,$self->get("url"),WebGUI::International::get("delete file warning","Asset_Collaboration"))
|
||||
$uploadControl .= deleteIcon("func=deleteFile;filename=".$filename,$self->get("url"),WebGUI::International::get("delete file warning","Asset_Collaboration"))
|
||||
.' <a href="'.$self->getStorageLocation->getUrl($filename).'">'.$filename.'</a>'
|
||||
.'<br />';
|
||||
$i++;
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ sub definition {
|
|||
label=>WebGUI::International::get(1073,'Wobject'),
|
||||
hoverHelp=>WebGUI::International::get('1073 description','Wobject'),
|
||||
namespace=>'style',
|
||||
afterEdit=>'op=editPage&npp='.$session{form}{npp}
|
||||
afterEdit=>'op=editPage;npp='.$session{form}{npp}
|
||||
},
|
||||
printableStyleTemplateId=>{
|
||||
fieldType=>'template',
|
||||
|
|
@ -118,7 +118,7 @@ sub definition {
|
|||
label=>WebGUI::International::get(1079,'Wobject'),
|
||||
hoverHelp=>WebGUI::International::get('1079 description','Wobject'),
|
||||
namespace=>'style',
|
||||
afterEdit=>'op=editPage&npp='.$session{form}{npp}
|
||||
afterEdit=>'op=editPage;npp='.$session{form}{npp}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ sub view {
|
|||
if ($self->get("convertCarriageReturns")) {
|
||||
$var{description} =~ s/\n/\<br\>\n/g;
|
||||
}
|
||||
$var{"new.template"} = $self->getUrl."&overrideTemplateId=";
|
||||
$var{"new.template"} = $self->getUrl.";overrideTemplateId=";
|
||||
$var{"description.full"} = $var{description};
|
||||
$var{"description.full"} =~ s/\^\-\;//g;
|
||||
$var{"description.first.100words"} = $var{"description.full"};
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ use WebGUI::Icon;
|
|||
use WebGUI::International;
|
||||
use WebGUI::Paginator;
|
||||
use WebGUI::Privilege;
|
||||
use WebGUI::Search;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::SQL;
|
||||
use WebGUI::Style;
|
||||
|
|
@ -619,7 +618,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;class=WebGUI::Asset::Post::Thread");
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -1052,7 +1051,7 @@ sub www_search {
|
|||
$sql .= " and " if ($sql ne "" && $without ne "");
|
||||
$sql .= " ($without) " if ($without ne "");
|
||||
$sql .= " group by assetData.assetId order by Post.dateSubmitted desc";
|
||||
my $p = WebGUI::Paginator->new($self->getUrl("func=search&doit=1"),$numResults);
|
||||
my $p = WebGUI::Paginator->new($self->getUrl("func=search;doit=1"),$numResults);
|
||||
$self->appendPostListTemplateVars(\%var, $sql, $p);
|
||||
}
|
||||
return $self->processStyle($self->processTemplate(\%var, $self->get("searchTemplateId")));
|
||||
|
|
|
|||
|
|
@ -89,10 +89,10 @@ sub _fieldAdminIcons {
|
|||
my $tid = shift;
|
||||
my $cantDelete = shift;
|
||||
my $output;
|
||||
$output = deleteIcon('func=deleteFieldConfirm&fid='.$fid.'&tid='.$tid,$self->get("url"),WebGUI::International::get(19,"Asset_DataForm")) unless ($cantDelete);
|
||||
$output .= editIcon('func=editField&fid='.$fid.'&tid='.$tid,$self->get("url"))
|
||||
.moveUpIcon('func=moveFieldUp&fid='.$fid.'&tid='.$tid,$self->get("url"))
|
||||
.moveDownIcon('func=moveFieldDown&fid='.$fid.'&tid='.$tid,$self->get("url"));
|
||||
$output = deleteIcon('func=deleteFieldConfirm;fid='.$fid.';tid='.$tid,$self->get("url"),WebGUI::International::get(19,"Asset_DataForm")) unless ($cantDelete);
|
||||
$output .= editIcon('func=editField;fid='.$fid.';tid='.$tid,$self->get("url"))
|
||||
.moveUpIcon('func=moveFieldUp;fid='.$fid.';tid='.$tid,$self->get("url"))
|
||||
.moveDownIcon('func=moveFieldDown;fid='.$fid.';tid='.$tid,$self->get("url"));
|
||||
return $output;
|
||||
}
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -101,10 +101,10 @@ sub _tabAdminIcons {
|
|||
my $tid = shift;
|
||||
my $cantDelete = shift;
|
||||
my $output;
|
||||
$output = deleteIcon('func=deleteTabConfirm&tid='.$tid,$self->get("url"),WebGUI::International::get(100,"Asset_DataForm")) unless ($cantDelete);
|
||||
$output .= editIcon('func=editTab&tid='.$tid,$self->get("url"))
|
||||
.moveLeftIcon('func=moveTabLeft&tid='.$tid,$self->get("url"))
|
||||
.moveRightIcon('func=moveTabRight&tid='.$tid,$self->get("url"));
|
||||
$output = deleteIcon('func=deleteTabConfirm;tid='.$tid,$self->get("url"),WebGUI::International::get(100,"Asset_DataForm")) unless ($cantDelete);
|
||||
$output .= editIcon('func=editTab;tid='.$tid,$self->get("url"))
|
||||
.moveLeftIcon('func=moveTabLeft;tid='.$tid,$self->get("url"))
|
||||
.moveRightIcon('func=moveTabRight;tid='.$tid,$self->get("url"));
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
@ -325,7 +325,7 @@ sub getListTemplateVars {
|
|||
$var->{"back.url"} = $self->getFormUrl;
|
||||
$var->{"back.label"} = WebGUI::International::get('go to form',"Asset_DataForm");
|
||||
#$var->{"entryId"} = $self->getId;
|
||||
#$var->{"delete.url"} = $self->getUrl."&func=deleteAllEntries";
|
||||
#$var->{"delete.url"} = $self->getUrl.";func=deleteAllEntries";
|
||||
#$var->{"delete.label"} = WebGUI::International::get(91,"Asset_DataForm");
|
||||
my $a = WebGUI::SQL->read("select DataForm_fieldId,name,label,isMailField,type from DataForm_field
|
||||
where assetId=".quote($self->getId)." order by sequenceNumber");
|
||||
|
|
@ -359,10 +359,10 @@ sub getListTemplateVars {
|
|||
$b->finish;
|
||||
push(@recordLoop,{
|
||||
"record.ipAddress"=>$record->{ipAddress},
|
||||
"record.edit.url"=>$self->getUrl("func=view&entryId=".$record->{DataForm_entryId}),
|
||||
"record.edit.icon"=>editIcon("func=view&entryId=".$record->{DataForm_entryId}, $self->getUrl),
|
||||
"record.delete.url"=>$self->getUrl("func=deleteEntry&entryId=".$record->{DataForm_entryId}),
|
||||
"record.delete.icon"=>deleteIcon("func=deleteEntry&entryId=".$record->{Asset_DataForm_entryId}, $self->getUrl, WebGUI::International::get('Delete entry confirmation',"Asset_DataForm")),
|
||||
"record.edit.url"=>$self->getUrl("func=view;entryId=".$record->{DataForm_entryId}),
|
||||
"record.edit.icon"=>editIcon("func=view;entryId=".$record->{DataForm_entryId}, $self->getUrl),
|
||||
"record.delete.url"=>$self->getUrl("func=deleteEntry;entryId=".$record->{DataForm_entryId}),
|
||||
"record.delete.icon"=>deleteIcon("func=deleteEntry;entryId=".$record->{Asset_DataForm_entryId}, $self->getUrl, WebGUI::International::get('Delete entry confirmation',"Asset_DataForm")),
|
||||
"record.username"=>$record->{username},
|
||||
"record.userId"=>$record->{userId},
|
||||
"record.submissionDate.epoch"=>$record->{submissionDate},
|
||||
|
|
@ -412,12 +412,12 @@ sub getRecordTemplateVars {
|
|||
my $var = shift;
|
||||
$var->{error_loop} = [] unless (exists $var->{error_loop});
|
||||
$var->{canEdit} = ($self->canEdit);
|
||||
#$var->{"entryList.url"} = $self->getUrl('func=view&entryId=list');
|
||||
#$var->{"entryList.url"} = $self->getUrl('func=view;entryId=list');
|
||||
$var->{"entryList.url"} = $self->getListUrl;
|
||||
$var->{"entryList.label"} = WebGUI::International::get(86,"Asset_DataForm");
|
||||
$var->{"export.tab.url"} = $self->getUrl('func=exportTab');
|
||||
$var->{"export.tab.label"} = WebGUI::International::get(84,"Asset_DataForm");
|
||||
$var->{"delete.url"} = $self->getUrl('func=deleteEntry&entryId='.$var->{entryId});
|
||||
$var->{"delete.url"} = $self->getUrl('func=deleteEntry;entryId='.$var->{entryId});
|
||||
$var->{"delete.label"} = WebGUI::International::get(90,"Asset_DataForm");
|
||||
$var->{"back.url"} = $self->getUrl;
|
||||
$var->{"back.label"} = WebGUI::International::get(18,"Asset_DataForm");
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ sub getEditForm {
|
|||
-label=>WebGUI::International::get(80,"Asset_EventsCalendar"),
|
||||
-value=>$self->getValue('eventTemplateId'),
|
||||
-namespace=>"EventsCalendar/Event",
|
||||
-afterEdit=>'func=edit&wid='.$self->get("wobjectId")
|
||||
-afterEdit=>'func=edit;wid='.$self->get("wobjectId")
|
||||
);
|
||||
$tabform->getTab("display")->selectList(
|
||||
-name=>"startMonth",
|
||||
|
|
@ -421,7 +421,7 @@ sub view {
|
|||
my %var;
|
||||
$var{month_loop} = \@$monthloop;
|
||||
# $var{"canManage"} = $self->canManage;
|
||||
$var{"addevent.url"} = $self->getUrl().'?func=addStyledEvent&class=WebGUI::Asset::Event';
|
||||
$var{"addevent.url"} = $self->getUrl().'?func=addStyledEvent;class=WebGUI::Asset::Event';
|
||||
$var{"addevent.label"} = WebGUI::International::get(20,"Asset_EventsCalendar");
|
||||
$var{'sunday.label'} = WebGUI::DateTime::getDayName(7);
|
||||
$var{'monday.label'} = WebGUI::DateTime::getDayName(1);
|
||||
|
|
@ -451,12 +451,12 @@ sub view {
|
|||
}
|
||||
$var{'pagination.previousPage'} = '<form method="GET" style="inline;" action="'.
|
||||
$self->getUrl.'?calMonthStart='.$calMonthStart.
|
||||
'&reload='.WebGUI::Id::generate().'"><a href="'.$self->getUrl.
|
||||
'?calMonthStart='.$prevCalMonthStart.'&calMonthEnd='.$prevCalMonthEnd.'">'.
|
||||
';reload='.WebGUI::Id::generate().'"><a href="'.$self->getUrl.
|
||||
'?calMonthStart='.$prevCalMonthStart.';calMonthEnd='.$prevCalMonthEnd.'">'.
|
||||
WebGUI::International::get(558,"Asset_EventsCalendar")." ".$monthRangeLength." ".
|
||||
$monthLabel.'</a>';
|
||||
$var{'pagination.nextPage'} = '<a href="'.$self->getUrl.
|
||||
'?calMonthStart='.$nextCalMonthStart.'&calMonthEnd='.$nextCalMonthEnd.'">'.
|
||||
'?calMonthStart='.$nextCalMonthStart.';calMonthEnd='.$nextCalMonthEnd.'">'.
|
||||
WebGUI::International::get(559,"Asset_EventsCalendar")." ".$monthRangeLength." ".
|
||||
$monthLabel.'</a></form>';
|
||||
$var{'pagination.pageList.upTo20'} = '<select size="1" name="calMonthEnd">
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ sub start {
|
|||
$val = $self->{assetUrl}; # Form Action returns to us
|
||||
} else {
|
||||
$val =~ s/\n//g; # Bugfix 757068
|
||||
$val = WebGUI::URL::append($self->{assetUrl},'proxiedUrl='.WebGUI::URL::escape($val).'&func=view'); # return to us
|
||||
$val = WebGUI::URL::append($self->{assetUrl},'proxiedUrl='.WebGUI::URL::escape($val).';func=view'); # return to us
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ sub view {
|
|||
$vars{"dragger.init"} = '
|
||||
<iframe id="dragSubmitter" style="display: none;" src="'.$session{config}{extrasURL}.'/spacer.gif"></iframe>
|
||||
<script>
|
||||
dragable_init("'.$self->getUrl("func=setContentPositions&map=").'");
|
||||
dragable_init("'.$self->getUrl("func=setContentPositions;map=").'");
|
||||
</script>
|
||||
<style>
|
||||
.dragging, .empty {
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ sub view {
|
|||
});
|
||||
}
|
||||
$var{'default.listing'} = $first->view if ($count == 1 && defined $first);
|
||||
$var{'forum.add.url'} = $self->getUrl("func=add&class=WebGUI::Asset::Wobject::Collaboration");
|
||||
$var{'forum.add.url'} = $self->getUrl("func=add;class=WebGUI::Asset::Wobject::Collaboration");
|
||||
$var{'forum.add.label'} = WebGUI::International::get(75,"Asset_MessageBoard");
|
||||
$var{'title.label'} = WebGUI::International::get('title','Asset_MessageBoard');
|
||||
$var{'views.label'} = WebGUI::International::get('views',,'Asset_MessageBoard');
|
||||
|
|
|
|||
|
|
@ -281,7 +281,7 @@ sub getToolbar {
|
|||
if ($self->getToolbarState) {
|
||||
my $returnUrl;
|
||||
if (exists $session{asset}) {
|
||||
$returnUrl = "&proceed=goBackToPage&returnUrl=".WebGUI::URL::escape($session{asset}->getUrl);
|
||||
$returnUrl = ";proceed=goBackToPage;returnUrl=".WebGUI::URL::escape($session{asset}->getUrl);
|
||||
}
|
||||
my $toolbar;
|
||||
if (!$self->isLocked || $self->get("isLockedBy") eq $session{user}{userId}) {
|
||||
|
|
|
|||
|
|
@ -627,9 +627,9 @@ sub view {
|
|||
my $self = shift;
|
||||
$self->logView() if ($session{setting}{passiveProfilingEnabled});
|
||||
my $var = $self->getMenuVars;
|
||||
$var->{'question.add.url'} = $self->getUrl('func=editQuestion&qid=new');
|
||||
$var->{'question.add.url'} = $self->getUrl('func=editQuestion;qid=new');
|
||||
$var->{'question.add.label'} = WebGUI::International::get(30,'Asset_Survey');
|
||||
$var->{'section.add.url'} = $self->getUrl('func=editSection&sid=new');
|
||||
$var->{'section.add.url'} = $self->getUrl('func=editSection;sid=new');
|
||||
$var->{'section.add.label'} = WebGUI::International::get(104,'Asset_Survey');
|
||||
my @sectionEdit;
|
||||
|
||||
|
|
@ -645,10 +645,10 @@ sub view {
|
|||
while (my %data = $sth2->hash) {
|
||||
push(@edit,{
|
||||
'question.edit.controls'=>
|
||||
deleteIcon('func=deleteQuestionConfirm&qid='.$data{Survey_questionId}, $self->get("url"), WebGUI::International::get(44,'Asset_Survey')).
|
||||
editIcon('func=editQuestion&qid='.$data{Survey_questionId}, $self->get("url")).
|
||||
moveUpIcon('func=moveQuestionUp&qid='.$data{Survey_questionId}, $self->get("url")).
|
||||
moveDownIcon('func=moveQuestionDown&qid='.$data{Survey_questionId}, $self->get("url")),
|
||||
deleteIcon('func=deleteQuestionConfirm;qid='.$data{Survey_questionId}, $self->get("url"), WebGUI::International::get(44,'Asset_Survey')).
|
||||
editIcon('func=editQuestion;qid='.$data{Survey_questionId}, $self->get("url")).
|
||||
moveUpIcon('func=moveQuestionUp;qid='.$data{Survey_questionId}, $self->get("url")).
|
||||
moveDownIcon('func=moveQuestionDown;qid='.$data{Survey_questionId}, $self->get("url")),
|
||||
'question.edit.question'=>$data{question},
|
||||
'question.edit.id'=>$data{Survey_questionId}
|
||||
});
|
||||
|
|
@ -657,10 +657,10 @@ sub view {
|
|||
|
||||
push(@sectionEdit,{
|
||||
'section.edit.controls'=>
|
||||
deleteIcon('func=deleteSectionConfirm&sid='.$sectionData{Survey_sectionId}, $self->get("url"), WebGUI::International::get(105,'Asset_Survey')).
|
||||
editIcon('func=editSection&sid='.$sectionData{Survey_sectionId}, $self->get("url")).
|
||||
moveUpIcon('func=moveSectionUp&sid='.$sectionData{Survey_sectionId}, $self->get("url")).
|
||||
moveDownIcon('func=moveSectionDown&sid='.$sectionData{Survey_sectionId}, $self->get("url")),
|
||||
deleteIcon('func=deleteSectionConfirm;sid='.$sectionData{Survey_sectionId}, $self->get("url"), WebGUI::International::get(105,'Asset_Survey')).
|
||||
editIcon('func=editSection;sid='.$sectionData{Survey_sectionId}, $self->get("url")).
|
||||
moveUpIcon('func=moveSectionUp;sid='.$sectionData{Survey_sectionId}, $self->get("url")).
|
||||
moveDownIcon('func=moveSectionDown;sid='.$sectionData{Survey_sectionId}, $self->get("url")),
|
||||
'section.edit.sectionName'=>$sectionData{sectionName},
|
||||
'section.edit.id'=>$sectionData{Survey_sectionId},
|
||||
'section.questions_loop'=>\@edit
|
||||
|
|
@ -701,7 +701,7 @@ sub view {
|
|||
});
|
||||
$var->{'questions.sofar.label'} = WebGUI::International::get(86,'Asset_Survey');
|
||||
$var->{'start.newResponse.label'} = WebGUI::International::get(87,'Asset_Survey');
|
||||
$var->{'start.newResponse.url'} = $self->getUrl("func=view&startNew=1");
|
||||
$var->{'start.newResponse.url'} = $self->getUrl("func=view;startNew=1");
|
||||
$var->{'thanks.survey.label'} = WebGUI::International::get(46,'Asset_Survey');
|
||||
$var->{'thanks.quiz.label'} = WebGUI::International::get(47,'Asset_Survey');
|
||||
$var->{'questions.total'} = $self->getQuestionCount;
|
||||
|
|
@ -754,7 +754,7 @@ sub www_deleteSectionConfirm {
|
|||
sub www_deleteResponse {
|
||||
return "" unless (WebGUI::Grouping::isInGroup($_[0]->get("groupToViewReports")));
|
||||
return $_[0]->confirm(WebGUI::International::get(72,'Asset_Survey'),
|
||||
$_[0]->getUrl('func=deleteResponseConfirm&responseId='.$session{form}{responseId}));
|
||||
$_[0]->getUrl('func=deleteResponseConfirm;responseId='.$session{form}{responseId}));
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -997,17 +997,17 @@ sub www_editQuestion {
|
|||
&& $question->{answerFieldType} ne "HTMLArea"
|
||||
&& $question->{answerFieldType} ne "textArea"
|
||||
) {
|
||||
$output .= '<a href="'.$self->getUrl('func=editAnswer&aid=new&qid='
|
||||
$output .= '<a href="'.$self->getUrl('func=editAnswer;aid=new;qid='
|
||||
.$question->{Survey_questionId}).'">'.WebGUI::International::get(23,'Asset_Survey').'</a><p />';
|
||||
$sth = WebGUI::SQL->read("select Survey_answerId,answer from Survey_answer
|
||||
where Survey_questionId=".quote($question->{Survey_questionId})." order by sequenceNumber");
|
||||
while (%data = $sth->hash) {
|
||||
$output .=
|
||||
deleteIcon('func=deleteAnswerConfirm&qid='.$question->{Survey_questionId}.'&aid='.$data{Survey_answerId},
|
||||
deleteIcon('func=deleteAnswerConfirm;qid='.$question->{Survey_questionId}.';aid='.$data{Survey_answerId},
|
||||
$self->get("url"),WebGUI::International::get(45,'Asset_Survey')).
|
||||
editIcon('func=editAnswer&qid='.$question->{Survey_questionId}.'&aid='.$data{Survey_answerId}, $self->get("url")).
|
||||
moveUpIcon('func=moveAnswerUp'.'&qid='.$question->{Survey_questionId}.'&aid='.$data{Survey_answerId}, $self->get("url")).
|
||||
moveDownIcon('func=moveAnswerDown&qid='.$question->{Survey_questionId}.'&aid='.$data{Survey_answerId}, $self->get("url")).
|
||||
editIcon('func=editAnswer;qid='.$question->{Survey_questionId}.';aid='.$data{Survey_answerId}, $self->get("url")).
|
||||
moveUpIcon('func=moveAnswerUp'.';qid='.$question->{Survey_questionId}.';aid='.$data{Survey_answerId}, $self->get("url")).
|
||||
moveDownIcon('func=moveAnswerDown;qid='.$question->{Survey_questionId}.';aid='.$data{Survey_answerId}, $self->get("url")).
|
||||
' '.$data{answer}.'<br>';
|
||||
}
|
||||
$sth->finish;
|
||||
|
|
@ -1243,7 +1243,7 @@ sub www_viewGradebook {
|
|||
Survey_answer b on a.Survey_answerId=b.Survey_answerId where a.Survey_responseId=".quote($user->{Survey_responseId})
|
||||
." and b.isCorrect=1");
|
||||
push(@responseloop, {
|
||||
'response.url'=>$self->getUrl('func=viewIndividualSurvey&responseId='.$user->{Survey_responseId}),
|
||||
'response.url'=>$self->getUrl('func=viewIndividualSurvey;responseId='.$user->{Survey_responseId}),
|
||||
'response.user.name'=>($user->{userId} eq '1') ? $user->{ipAddress} : $user->{username},
|
||||
'response.count.correct' => $correctCount,
|
||||
'response.percent' => round(($correctCount/$var->{'question.count'})*100)
|
||||
|
|
@ -1263,7 +1263,7 @@ sub www_viewIndividualSurvey {
|
|||
$self->logView() if ($session{setting}{passiveProfilingEnabled});
|
||||
my $var = $self->getMenuVars;
|
||||
$var->{'title'} = WebGUI::International::get(70,'Asset_Survey');
|
||||
$var->{'delete.url'} = $self->getUrl('func=deleteResponse&responseId='.$session{form}{responseId});
|
||||
$var->{'delete.url'} = $self->getUrl('func=deleteResponse;responseId='.$session{form}{responseId});
|
||||
$var->{'delete.label'} = WebGUI::International::get(69,'Asset_Survey');
|
||||
my $response = WebGUI::SQL->getRow("Survey_response","Survey_responseId",$session{form}{responseId});
|
||||
$var->{'start.date.label'} = WebGUI::International::get(76,'Asset_Survey');
|
||||
|
|
|
|||
|
|
@ -290,7 +290,7 @@ sub view {
|
|||
for (keys %{$session{'form'}}) {
|
||||
unless (exists $seen{$_}) {
|
||||
$query_string .= WebGUI::URL::escape($_) . '='
|
||||
. WebGUI::URL::escape($session{'form'}{$_}) . '&';
|
||||
. WebGUI::URL::escape($session{'form'}{$_}) . ';';
|
||||
}
|
||||
}
|
||||
$url = WebGUI::URL::page($query_string);
|
||||
|
|
@ -503,7 +503,7 @@ sub view {
|
|||
$p->appendTemplateVars(\%var);
|
||||
for ('pagination.firstPage','pagination.lastPage','pagination.nextPage','pagination.pageList',
|
||||
'pagination.previousPage', 'pagination.pageList.upTo20', 'pagination.pageList.upTo10') {
|
||||
$var{$_} =~ s/\?/\?cache=$cache_key\&/g;
|
||||
$var{$_} =~ s/\?/\?cache=$cache_key\;/g;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ sub www_editBranch {
|
|||
-label=>WebGUI::International::get(1073,"Asset"),
|
||||
-value=>$self->getValue("styleTemplateId"),
|
||||
-namespace=>'style',
|
||||
-afterEdit=>'op=editPage&npp='.$session{form}{npp},
|
||||
-afterEdit=>'op=editPage;npp='.$session{form}{npp},
|
||||
-subtext=>'<br />'.WebGUI::International::get("change","Asset").' '.WebGUI::Form::yesNo({name=>"change_styleTemplateId"})
|
||||
);
|
||||
$tabform->getTab("display")->template(
|
||||
|
|
@ -167,7 +167,7 @@ sub www_editBranch {
|
|||
-label=>WebGUI::International::get(1079,"Asset"),
|
||||
-value=>$self->getValue("printableStyleTemplateId"),
|
||||
-namespace=>'style',
|
||||
-afterEdit=>'op=editPage&npp='.$session{form}{npp},
|
||||
-afterEdit=>'op=editPage;npp='.$session{form}{npp},
|
||||
-subtext=>'<br />'.WebGUI::International::get("change","Asset").' '.WebGUI::Form::yesNo({name=>"change_printableStyleTemplateId"})
|
||||
);
|
||||
$tabform->getTab("display")->interval(
|
||||
|
|
|
|||
|
|
@ -306,10 +306,10 @@ sub www_manageClipboard {
|
|||
if ($session{form}{systemClipboard} && WebGUI::Grouping::isInGroup(3)) {
|
||||
$header = WebGUI::International::get(966,"Asset");
|
||||
$ac->addSubmenuItem($self->getUrl('func=manageClipboard'), WebGUI::International::get(949),"Asset");
|
||||
$ac->addSubmenuItem($self->getUrl('func=emptyClipboard&systemClipboard=1'), WebGUI::International::get(959,"Asset"),
|
||||
$ac->addSubmenuItem($self->getUrl('func=emptyClipboard;systemClipboard=1'), WebGUI::International::get(959,"Asset"),
|
||||
'onclick="return window.confirm(\''.WebGUI::International::get(951).'\')"',"Asset");
|
||||
} else {
|
||||
$ac->addSubmenuItem($self->getUrl('func=manageClipboard&systemClipboard=1'), WebGUI::International::get(954),"Asset");
|
||||
$ac->addSubmenuItem($self->getUrl('func=manageClipboard;systemClipboard=1'), WebGUI::International::get(954),"Asset");
|
||||
$ac->addSubmenuItem($self->getUrl('func=emptyClipboard'), WebGUI::International::get(950,"Asset"),
|
||||
'onclick="return window.confirm(\''.WebGUI::International::get(951).'\')"',"Asset");
|
||||
$limit = 1;
|
||||
|
|
|
|||
|
|
@ -270,8 +270,8 @@ sub www_manageMetaData {
|
|||
my $output;
|
||||
my $fields = $self->getMetaDataFields();
|
||||
foreach my $fieldId (keys %{$fields}) {
|
||||
$output .= deleteIcon("func=deleteMetaDataField&fid=".$fieldId,$self->get("url"),WebGUI::International::get('deleteConfirm','Asset'));
|
||||
$output .= editIcon("func=editMetaDataField&fid=".$fieldId,$self->get("url"));
|
||||
$output .= deleteIcon("func=deleteMetaDataField;fid=".$fieldId,$self->get("url"),WebGUI::International::get('deleteConfirm','Asset'));
|
||||
$output .= editIcon("func=editMetaDataField;fid=".$fieldId,$self->get("url"));
|
||||
$output .= " <b>".$fields->{$fieldId}{fieldName}."</b><br />";
|
||||
}
|
||||
$ac->setHelp("metadata manage","Asset");
|
||||
|
|
|
|||
|
|
@ -211,7 +211,7 @@ sub www_manageTrash {
|
|||
$header = WebGUI::International::get(965,"Asset");
|
||||
$ac->addSubmenuItem($self->getUrl('func=manageTrash'), WebGUI::International::get(10),"Asset");
|
||||
} else {
|
||||
$ac->addSubmenuItem($self->getUrl('func=manageTrash&systemTrash=1'), WebGUI::International::get(964),"Asset");
|
||||
$ac->addSubmenuItem($self->getUrl('func=manageTrash;systemTrash=1'), WebGUI::International::get(964),"Asset");
|
||||
$limit = 1;
|
||||
}
|
||||
WebGUI::Style::setLink($session{config}{extrasURL}.'/assetManager/assetManager.css', {rel=>"stylesheet",type=>"text/css"});
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ sub createAccount {
|
|||
$vars->{'create.form.submit'} = WebGUI::Form::submit({});
|
||||
$vars->{'create.form.footer'} = WebGUI::Form::formFooter();
|
||||
|
||||
$vars->{'login.url'} = WebGUI::URL::page('op=auth&method=init');
|
||||
$vars->{'login.url'} = WebGUI::URL::page('op=auth;method=init');
|
||||
$vars->{'login.label'} = WebGUI::International::get(58);
|
||||
|
||||
return WebGUI::Asset::Template->new($self->getCreateAccountTemplateId)->process($vars);
|
||||
|
|
@ -286,7 +286,7 @@ sub deactivateAccount {
|
|||
my %var;
|
||||
$var{title} = WebGUI::International::get(42);
|
||||
$var{question} = WebGUI::International::get(60);
|
||||
$var{'yes.url'} = WebGUI::URL::page('op=auth&method='.$method);
|
||||
$var{'yes.url'} = WebGUI::URL::page('op=auth;method='.$method);
|
||||
$var{'yes.label'} = WebGUI::International::get(44);
|
||||
$var{'no.url'} = WebGUI::URL::page();
|
||||
$var{'no.label'} = WebGUI::International::get(45);
|
||||
|
|
@ -399,7 +399,7 @@ sub displayLogin {
|
|||
$vars->{'login.form.submit'} = WebGUI::Form::submit({"value"=>WebGUI::International::get(52)});
|
||||
$vars->{'login.form.footer'} = WebGUI::Form::formFooter();
|
||||
$vars->{'anonymousRegistration.isAllowed'} = ($session{setting}{anonymousRegistration});
|
||||
$vars->{'createAccount.url'} = WebGUI::URL::page('op=auth&method=createAccount');
|
||||
$vars->{'createAccount.url'} = WebGUI::URL::page('op=auth;method=createAccount');
|
||||
$vars->{'createAccount.label'} = WebGUI::International::get(67);
|
||||
return WebGUI::Asset::Template->new($self->getLoginTemplateId)->process($vars);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -215,7 +215,7 @@ sub createAccount {
|
|||
$vars->{'create.message'} = $_[0] if ($_[0]);
|
||||
$vars->{'create.form.ldapConnection.label'} = WebGUI::International::get("ldapConnection","AuthLDAP");
|
||||
|
||||
my $url = WebGUI::URL::page("op=auth&method=createAccount&connection=");
|
||||
my $url = WebGUI::URL::page("op=auth;method=createAccount;connection=");
|
||||
$vars->{'create.form.ldapConnection'} = WebGUI::Form::selectList({
|
||||
name=>"ldapConnection",
|
||||
options=>WebGUI::LDAPLink::getList(),
|
||||
|
|
@ -368,9 +368,9 @@ sub editUserSettingsForm {
|
|||
my $ldapConnectionLabel = WebGUI::International::get("ldapConnection",'AuthLDAP');
|
||||
my $buttons = "";
|
||||
if($session{setting}{ldapConnection}) {
|
||||
$buttons = editIcon("op=editLDAPLink&returnUrl=".WebGUI::URL::escape(WebGUI::URL::page("op=editSettings"))."&llid=".$session{setting}{ldapConnection});
|
||||
$buttons = editIcon("op=editLDAPLink;returnUrl=".WebGUI::URL::escape(WebGUI::URL::page("op=editSettings")).";llid=".$session{setting}{ldapConnection});
|
||||
}
|
||||
$buttons .= manageIcon("op=listLDAPLinks&returnUrl=".WebGUI::URL::escape(WebGUI::URL::page("op=editSettings")));
|
||||
$buttons .= manageIcon("op=listLDAPLinks;returnUrl=".WebGUI::URL::escape(WebGUI::URL::page("op=editSettings")));
|
||||
$f->raw(qq|<tr><td class="formDescription" valign="top" style="width: 25%;">$ldapConnectionLabel</td><td class="tableData" style="width: 75%;">$ldapConnection $buttons</td></tr>|);
|
||||
return $f->printRowsOnly;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ sub createAccount {
|
|||
$vars->{'create.form.passwordConfirm.label'} = WebGUI::International::get(2,'AuthWebGUI');
|
||||
$vars->{'create.form.hidden'} = WebGUI::Form::hidden({"name"=>"confirm","value"=>$session{form}{confirm}});
|
||||
$vars->{'recoverPassword.isAllowed'} = $self->getSetting("passwordRecovery");
|
||||
$vars->{'recoverPassword.url'} = WebGUI::URL::page('op=auth&method=recoverPassword');
|
||||
$vars->{'recoverPassword.url'} = WebGUI::URL::page('op=auth;method=recoverPassword');
|
||||
$vars->{'recoverPassword.label'} = WebGUI::International::get(59);
|
||||
return $self->SUPER::createAccount("createAccountSave",$vars);
|
||||
}
|
||||
|
|
@ -226,7 +226,7 @@ sub createAccountSave {
|
|||
WebGUI::Mail::send(
|
||||
$profile->{email},
|
||||
WebGUI::International::get('email address validation email subject','AuthWebGUI'),
|
||||
WebGUI::International::get('email address validation email body','AuthWebGUI')."\n\n".WebGUI::URL::getSiteURL().WebGUI::URL::page("op=auth&method=validateEmail&key=".$key),
|
||||
WebGUI::International::get('email address validation email body','AuthWebGUI')."\n\n".WebGUI::URL::getSiteURL().WebGUI::URL::page("op=auth;method=validateEmail;key=".$key),
|
||||
);
|
||||
$self->user->status("Deactivated");
|
||||
WebGUI::Session::end($session{var}{sessionId});
|
||||
|
|
@ -291,7 +291,7 @@ sub displayLogin {
|
|||
return $self->displayAccount($_[0]) if ($self->userId ne "1");
|
||||
$vars->{'login.message'} = $_[0] if ($_[0]);
|
||||
$vars->{'recoverPassword.isAllowed'} = $self->getSetting("passwordRecovery");
|
||||
$vars->{'recoverPassword.url'} = WebGUI::URL::page('op=auth&method=recoverPassword');
|
||||
$vars->{'recoverPassword.url'} = WebGUI::URL::page('op=auth;method=recoverPassword');
|
||||
$vars->{'recoverPassword.label'} = WebGUI::International::get(59);
|
||||
return $self->SUPER::displayLogin("login",$vars);
|
||||
}
|
||||
|
|
@ -506,11 +506,11 @@ sub recoverPassword {
|
|||
|
||||
$vars->{'recover.form.submit'} = WebGUI::Form::submit({});
|
||||
$vars->{'recover.form.footer'} = WebGUI::Form::formFooter();
|
||||
$vars->{'login.url'} = WebGUI::URL::page('op=auth&method=init');
|
||||
$vars->{'login.url'} = WebGUI::URL::page('op=auth;method=init');
|
||||
$vars->{'login.label'} = WebGUI::International::get(58);
|
||||
|
||||
$vars->{'anonymousRegistration.isAllowed'} = ($session{setting}{anonymousRegistration});
|
||||
$vars->{'createAccount.url'} = WebGUI::URL::page('op=auth=&method=createAccount');
|
||||
$vars->{'createAccount.url'} = WebGUI::URL::page('op=auth=;method=createAccount');
|
||||
$vars->{'createAccount.label'} = WebGUI::International::get(67);
|
||||
$vars->{'recover.message'} = $_[0] if ($_[0]);
|
||||
$vars->{'recover.form.email'} = WebGUI::Form::text({"name"=>"email"});
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ sub cancelRecurringPayment {
|
|||
# Login to iTransact
|
||||
$request = HTTP::Request->new(POST => 'https://secure.paymentclearing.com/cgi-bin/rc/sess.cgi');
|
||||
$request->content_type('application/x-www-form-urlencoded');
|
||||
$request->content('mid='.$self->get('vendorId').'&pwd='.$self->get('password').'&cookie_precheck=0');
|
||||
$request->content('mid='.$self->get('vendorId').';pwd='.$self->get('password').';cookie_precheck=0');
|
||||
|
||||
$response = $userAgent->request($request);
|
||||
|
||||
|
|
@ -73,8 +73,8 @@ sub cancelRecurringPayment {
|
|||
my $request = HTTP::Request->new(POST => 'https://secure.paymentclearing.com/cgi-bin/rc/recur/update/update.cgi');
|
||||
$request->content_type('application/x-www-form-urlencoded');
|
||||
$request->content(
|
||||
'reps=0&'. # Set number of remaining repetition to zero in order to cancel
|
||||
'recipe_code='.$recipe.'&'.
|
||||
'reps=0;'. # Set number of remaining repetition to zero in order to cancel
|
||||
'recipe_code='.$recipe.';'.
|
||||
'xid='.$recurring->{id});
|
||||
|
||||
my $response = $userAgent->request($request);
|
||||
|
|
@ -468,7 +468,7 @@ sub configurationForm {
|
|||
-value => '<br />'
|
||||
);
|
||||
$f->readOnly(
|
||||
-value => $i18n->get('extra info').'<br /><b>https://'.$session{config}{defaultSitename}.WebGUI::URL::getScriptURL().'?op=confirmRecurringTransaction&gateway='.$self->namespace
|
||||
-value => $i18n->get('extra info').'<br /><b>https://'.$session{config}{defaultSitename}.WebGUI::URL::getScriptURL().'?op=confirmRecurringTransaction;gateway='.$self->namespace
|
||||
);
|
||||
|
||||
return $self->SUPER::configurationForm($f->printRowsOnly);
|
||||
|
|
|
|||
|
|
@ -202,7 +202,7 @@ sub formHeader {
|
|||
if ($action =~ /\?/) {
|
||||
my ($path,$query) = split(/\?/,$action);
|
||||
$action = $path;
|
||||
my @params = split(/\&/,$query);
|
||||
my @params = split(/\;/,$query);
|
||||
foreach my $param (@params) {
|
||||
$param =~ s/amp;(.*)/$1/;
|
||||
my ($name,$value) = split(/\=/,$param);
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ sub toHtml {
|
|||
)->toHtml
|
||||
.WebGUI::Form::Button->new(
|
||||
value=>"...",
|
||||
extras=>'onclick="window.open(\''.$asset->getUrl("op=formAssetTree&classLimiter=".$self->{class}."&formId=".$self->{id}).'\',\'assetPicker\',\'toolbar=no, location=no, status=no, directories=no, width=400, height=400\');"'
|
||||
extras=>'onclick="window.open(\''.$asset->getUrl("op=formAssetTree;classLimiter=".$self->{class}.";formId=".$self->{id}).'\',\'assetPicker\',\'toolbar=no, location=no, status=no, directories=no, width=400, height=400\');"'
|
||||
)->toHtml;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ sub toHtmlWithWrapper {
|
|||
if (WebGUI::Grouping::isInGroup(3)) {
|
||||
my $subtext;
|
||||
if ($self->{afterEdit}) {
|
||||
$subtext = editIcon("op=editDatabaseLink&lid=".$self->{value}."&afterEdit=".WebGUI::URL::escape($self->{afterEdit}));
|
||||
$subtext = editIcon("op=editDatabaseLink;lid=".$self->{value}.";afterEdit=".WebGUI::URL::escape($self->{afterEdit}));
|
||||
}
|
||||
$subtext .= manageIcon("op=listDatabaseLinks");
|
||||
$self->{subtext} = $subtext . $self->{subtext};
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ sub toHtmlWithWrapper {
|
|||
if (WebGUI::Grouping::isInGroup(3)) {
|
||||
my $subtext;
|
||||
if ($self->{afterEdit}) {
|
||||
$subtext = editIcon("op=editLDAPLink&llid=".$self->{value}."&afterEdit=".WebGUI::URL::escape($self->{afterEdit}));
|
||||
$subtext = editIcon("op=editLDAPLink;llid=".$self->{value}.";afterEdit=".WebGUI::URL::escape($self->{afterEdit}));
|
||||
}
|
||||
$subtext .= manageIcon("op=listLDAPLinks");
|
||||
$self->{subtext} = $subtext . $self->{subtext};
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ sub toHtmlWithWrapper {
|
|||
if (defined $template && $template->canEdit) {
|
||||
my $returnUrl;
|
||||
if (exists $session{asset}) {
|
||||
$returnUrl = "&proceed=goBackToPage&returnUrl=".WebGUI::URL::escape($session{asset}->getUrl);
|
||||
$returnUrl = ";proceed=goBackToPage;returnUrl=".WebGUI::URL::escape($session{asset}->getUrl);
|
||||
}
|
||||
my $buttons = editIcon("func=edit".$returnUrl,$template->get("url"));
|
||||
$buttons .= manageIcon("func=manageAssets",$template->getParent->get("url"));
|
||||
|
|
|
|||
|
|
@ -269,7 +269,7 @@ If your help documentation is not in the WebGUI namespace, then you must specify
|
|||
sub helpIcon {
|
||||
my ($output, $namespace);
|
||||
$namespace = $_[1] || "WebGUI";
|
||||
$output = '<a href="'.WebGUI::URL::page('op=viewHelp&hid='.$_[0].'&namespace='.$namespace).
|
||||
$output = '<a href="'.WebGUI::URL::page('op=viewHelp;hid='.$_[0].';namespace='.$namespace).
|
||||
'" target="_blank"><img src="'._getBaseURL().'help.gif" border="0" align="right" title="'.WebGUI::International::get('Help','Icon').'" Alt="'.WebGUI::International::get('Help','Icon').'"></a>';
|
||||
return $output;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ sub process {
|
|||
my $title = $package->getTitle;
|
||||
$title =~ s/'//g; # stops it from breaking the javascript menus
|
||||
push(@{$var{'package_loop'}},{
|
||||
'url'=>$session{asset}->getUrl("func=deployPackage&assetId=".$package->getId),
|
||||
'url'=>$session{asset}->getUrl("func=deployPackage;assetId=".$package->getId),
|
||||
'label'=>$title,
|
||||
'icon.small'=>$package->getIcon(1),
|
||||
'icon'=>$package->getIcon()
|
||||
|
|
@ -56,7 +56,7 @@ sub process {
|
|||
$title =~ s/'//g; # stops it from breaking the javascript menus
|
||||
push(@{$var{clipboard_loop}}, {
|
||||
'label'=>$title,
|
||||
'url'=>$session{asset}->getUrl("func=paste&assetId=".$asset->getId),
|
||||
'url'=>$session{asset}->getUrl("func=paste;assetId=".$asset->getId),
|
||||
'icon.small'=>$asset->getIcon(1),
|
||||
'icon'=>$asset->getIcon()
|
||||
});
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ sub process {
|
|||
return "" unless ($g->autoAdd);
|
||||
return "" if (WebGUI::Grouping::isInGroup($g->groupId));
|
||||
my %var = ();
|
||||
$var{'group.url'} = WebGUI::URL::page("op=autoAddToGroup&groupId=".$g->groupId);
|
||||
$var{'group.url'} = WebGUI::URL::page("op=autoAddToGroup;groupId=".$g->groupId);
|
||||
$var{'group.text'} = $param[1];
|
||||
if ($param[2]) {
|
||||
return WebGUI::Asset::Template->newByUrl($param[2])->process(\%var);
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ sub process {
|
|||
return "" unless ($g->autoDelete);
|
||||
return "" unless (WebGUI::Grouping::isInGroup($g->groupId));
|
||||
my %var = ();
|
||||
$var{'group.url'} = WebGUI::URL::page("op=autoDeleteFromGroup&groupId=".$g->groupId);
|
||||
$var{'group.url'} = WebGUI::URL::page("op=autoDeleteFromGroup;groupId=".$g->groupId);
|
||||
$var{'group.text'} = $param[1];
|
||||
if ($param[2]) {
|
||||
return WebGUI::Asset::Template->newByUrl($param[2])->process(\%var);
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ use WebGUI::URL;
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub _createURL {
|
||||
return '<a href="'.WebGUI::URL::page("op=auth&method=logout").'">'.$_[0].'</a>';
|
||||
return '<a href="'.WebGUI::URL::page("op=auth;method=logout").'">'.$_[0].'</a>';
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -32,8 +32,8 @@ sub process {
|
|||
$var{'customText'} = $param[1];
|
||||
$var{'customText'} =~ s/%(.*?)%/_createURL($1)/ge;
|
||||
$var{'hello.label'} = WebGUI::International::get(48,'Macro_L_loginBox');
|
||||
$var{'logout.url'} = WebGUI::URL::page("op=auth&method=logout");
|
||||
$var{'account.display.url'} = WebGUI::URL::page('op=auth&method=displayAccount');
|
||||
$var{'logout.url'} = WebGUI::URL::page("op=auth;method=logout");
|
||||
$var{'account.display.url'} = WebGUI::URL::page('op=auth;method=displayAccount');
|
||||
$var{'logout.label'} = WebGUI::International::get(49,'Macro_L_loginBox');
|
||||
my $boxSize = $param[0];
|
||||
$boxSize = 12 unless ($boxSize);
|
||||
|
|
@ -70,7 +70,7 @@ sub process {
|
|||
value=>WebGUI::International::get(52),
|
||||
extras=>'class="loginBoxButton"'
|
||||
});
|
||||
$var{'account.create.url'} = WebGUI::URL::page('op=auth&method=createAccount');
|
||||
$var{'account.create.url'} = WebGUI::URL::page('op=auth;method=createAccount');
|
||||
$var{'account.create.label'} = WebGUI::International::get(407);
|
||||
$var{'form.footer'} = WebGUI::Form::formFooter();
|
||||
return WebGUI::Asset::Template->new($templateId)->process(\%var);
|
||||
|
|
|
|||
|
|
@ -24,12 +24,12 @@ sub process {
|
|||
my $logout = $param[1] || WebGUI::International::get(717,'Macro_LoginToggle');
|
||||
my %var;
|
||||
if ($session{user}{userId} eq '1') {
|
||||
return WebGUI::URL::page("op=auth&method=init") if ($param[0] eq "linkonly");
|
||||
$var{'toggle.url'} = WebGUI::URL::page('op=auth&method=init');
|
||||
return WebGUI::URL::page("op=auth;method=init") if ($param[0] eq "linkonly");
|
||||
$var{'toggle.url'} = WebGUI::URL::page('op=auth;method=init');
|
||||
$var{'toggle.text'} = $login;
|
||||
} else {
|
||||
return WebGUI::URL::page("op=auth&method=logout") if ($param[0] eq "linkonly");
|
||||
$var{'toggle.url'} = WebGUI::URL::page('op=auth&method=logout');
|
||||
return WebGUI::URL::page("op=auth;method=logout") if ($param[0] eq "linkonly");
|
||||
$var{'toggle.url'} = WebGUI::URL::page('op=auth;method=logout');
|
||||
$var{'toggle.text'} = $logout;
|
||||
}
|
||||
if ($param[2]) {
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ sub process {
|
|||
'variant.weight' => $_->{weight},
|
||||
'variant.sku' => $_->{sku},
|
||||
'variant.compositionLoop' => \@compositionLoop,
|
||||
'variant.addToCart.url' => WebGUI::URL::page('op=addToCart&itemType=Product&itemId='.$_->{variantId}),
|
||||
'variant.addToCart.url' => WebGUI::URL::page('op=addToCart;itemType=Product;itemId='.$_->{variantId}),
|
||||
'variant.addToCart.label' => WebGUI::International::get('add to cart', 'Macro_Product'),
|
||||
}) if ($_->{available});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ sub process {
|
|||
my ($subscriptionId, $templateId, %var);
|
||||
($subscriptionId, $templateId) = WebGUI::Macro::getParams(@_);
|
||||
%var = WebGUI::SQL->quickHash('select * from subscription where subscriptionId='.quote($subscriptionId));
|
||||
$var{url} = WebGUI::URL::page('op=purchaseSubscription&sid='.$subscriptionId);
|
||||
$var{url} = WebGUI::URL::page('op=purchaseSubscription;sid='.$subscriptionId);
|
||||
return WebGUI::Asset::Template->new($templateId || "PBtmpl0000000000000046")->process(\%var);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ use WebGUI::URL;
|
|||
|
||||
sub process {
|
||||
my ($subscriptionId) = WebGUI::Macro::getParams(@_);
|
||||
return WebGUI::URL::page('op=purchaseSubscription&sid='.$subscriptionId);
|
||||
return WebGUI::URL::page('op=purchaseSubscription;sid='.$subscriptionId);
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ use WebGUI::URL;
|
|||
sub process {
|
||||
my %var;
|
||||
my @param = WebGUI::Macro::getParams(shift);
|
||||
return WebGUI::URL::page("op=auth&method=init") if ($param[0] eq "linkonly");
|
||||
$var{'account.url'} = WebGUI::URL::page('op=auth&method=init');
|
||||
return WebGUI::URL::page("op=auth;method=init") if ($param[0] eq "linkonly");
|
||||
$var{'account.url'} = WebGUI::URL::page('op=auth;method=init');
|
||||
$var{'account.text'} = $param[0] || WebGUI::International::get(46,'Macro_a_account');
|
||||
if ($param[1]) {
|
||||
return WebGUI::Asset::Template->newByUrl($param[1])->process(\%var);
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ sub www_viewActiveSessions {
|
|||
$row[$i] .= '<td>'.epochToHuman($data{expires}).'</td>';
|
||||
$row[$i] .= '<td>'.epochToHuman($data{lastPageView}).'</td>';
|
||||
$row[$i] .= '<td>'.$data{lastIP}.'</td>';
|
||||
$row[$i] .= '<td align="center">'.deleteIcon("op=killSession&sid=$data{sessionId}").'</td></tr>';
|
||||
$row[$i] .= '<td align="center">'.deleteIcon("op=killSession;sid=$data{sessionId}").'</td></tr>';
|
||||
$i++;
|
||||
}
|
||||
$sth->finish;
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ sub www_checkoutConfirm {
|
|||
($normal, $recurring) = $shoppingCart->getItems;
|
||||
|
||||
foreach (@$normal) {
|
||||
$_->{deleteIcon} = deleteIcon('op=deleteCartItem&itemId='.$_->{item}->id.'&itemType='.$_->{item}->type);
|
||||
$_->{deleteIcon} = deleteIcon('op=deleteCartItem;itemId='.$_->{item}->id.';itemType='.$_->{item}->type);
|
||||
$_->{'quantity.form'} = WebGUI::Form::integer({
|
||||
name => 'quantity~'.$_->{item}->type.'~'.$_->{item}->id,
|
||||
value => $_->{quantity},
|
||||
|
|
@ -142,7 +142,7 @@ sub www_checkoutConfirm {
|
|||
$total += $_->{totalPrice};
|
||||
}
|
||||
foreach (@$recurring) {
|
||||
$_->{deleteIcon} = deleteIcon('op=deleteCartItem&itemId='.$_->{item}->id.'&itemType='.$_->{item}->type);
|
||||
$_->{deleteIcon} = deleteIcon('op=deleteCartItem;itemId='.$_->{item}->id.';itemType='.$_->{item}->type);
|
||||
$_->{'quantity.form'} = WebGUI::Form::integer({
|
||||
name => 'quantity~'.$_->{item}->type.'~'.$_->{item}->id,
|
||||
value => $_->{quantity},
|
||||
|
|
@ -548,7 +548,7 @@ sub www_listPendingTransactions {
|
|||
$output .= '<td>'.$properties->{gatewayId}.'</td>';
|
||||
$output .= '<td>'.$properties->{gateway}.'</td>';
|
||||
$output .= '<td>'.WebGUI::DateTime::epochToHuman($properties->{initDate}).'</td>';
|
||||
$output .= '<td><a href="'.WebGUI::URL::page('op=completePendingTransaction&tid='.$properties->{transactionId}).'">'.$i18n->get('complete pending transaction').'</a></td>';
|
||||
$output .= '<td><a href="'.WebGUI::URL::page('op=completePendingTransaction;tid='.$properties->{transactionId}).'">'.$i18n->get('complete pending transaction').'</a></td>';
|
||||
$output .= '</tr>';
|
||||
}
|
||||
$output .= '</table>';
|
||||
|
|
@ -625,7 +625,7 @@ sub www_listTransactions {
|
|||
$output .= '<tr><th></th><th>Init Date</th><th>Completion Date</th><th>Amount</th><th>Shipping Cost</th><th>Status</th><th>Shipping Status</th></tr>';
|
||||
foreach $transaction (@transactions) {
|
||||
$output .= '<tr bgcolor="#ddd">';
|
||||
$output .= '<td>'.deleteIcon('op=deleteTransaction&tid='.$transaction->get('transactionId')).'</td>';
|
||||
$output .= '<td>'.deleteIcon('op=deleteTransaction;tid='.$transaction->get('transactionId')).'</td>';
|
||||
$output .= '<td>'.WebGUI::DateTime::epochToHuman($transaction->get('initDate')).'</td>';
|
||||
$output .= '<td>'.WebGUI::DateTime::epochToHuman($transaction->get('completionDate')).'</td>';
|
||||
$output .= '<td>'.$transaction->get('amount').'</td>';
|
||||
|
|
@ -639,7 +639,7 @@ sub www_listTransactions {
|
|||
$output .= '<tr>';
|
||||
$output .= '<td></td>';
|
||||
$output .= '<td colspan="3">'.
|
||||
deleteIcon('op=deleteTransactionItem&tid='.$transaction->get('transactionId').'&iid='.$_->{itemId}.'&itype='.$_->{itemType}).
|
||||
deleteIcon('op=deleteTransactionItem;tid='.$transaction->get('transactionId').';iid='.$_->{itemId}.';itype='.$_->{itemType}).
|
||||
$_->{itemName}.'</td>';
|
||||
$output .= '<td>'.$_->{quantity}.'</td>';
|
||||
$output .= '<td> x </td>';
|
||||
|
|
@ -774,7 +774,7 @@ sub www_viewCart {
|
|||
($normal, $recurring) = $shoppingCart->getItems;
|
||||
|
||||
foreach (@$normal) {
|
||||
$_->{deleteIcon} = deleteIcon('op=deleteCartItem&itemId='.$_->{item}->id.'&itemType='.$_->{item}->type);
|
||||
$_->{deleteIcon} = deleteIcon('op=deleteCartItem;itemId='.$_->{item}->id.';itemType='.$_->{item}->type);
|
||||
$_->{'quantity.form'} = WebGUI::Form::integer({
|
||||
name => 'quantity~'.$_->{item}->type.'~'.$_->{item}->id,
|
||||
value => $_->{quantity},
|
||||
|
|
@ -783,7 +783,7 @@ sub www_viewCart {
|
|||
$total += $_->{totalPrice};
|
||||
}
|
||||
foreach (@$recurring) {
|
||||
$_->{deleteIcon} = deleteIcon('op=deleteCartItem&itemId='.$_->{item}->id.'&itemType='.$_->{item}->type);
|
||||
$_->{deleteIcon} = deleteIcon('op=deleteCartItem;itemId='.$_->{item}->id.';itemType='.$_->{item}->type);
|
||||
$_->{'quantity.form'} = WebGUI::Form::integer({
|
||||
name => 'quantity~'.$_->{item}->type.'~'.$_->{item}->id,
|
||||
value => $_->{quantity},
|
||||
|
|
|
|||
|
|
@ -34,11 +34,11 @@ sub _submenu {
|
|||
if ($help) {
|
||||
$ac->setHelp($help);
|
||||
}
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=editDatabaseLink&dlid=new'), WebGUI::International::get(982));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=editDatabaseLink;dlid=new'), WebGUI::International::get(982));
|
||||
if (($session{form}{op} eq "editDatabaseLink" && $session{form}{dlid} ne "new") || $session{form}{op} eq "deleteDatabaseLink") {
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=editDatabaseLink&dlid='.$session{form}{dlid}), WebGUI::International::get(983));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=copyDatabaseLink&dlid='.$session{form}{dlid}), WebGUI::International::get(984));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=deleteDatabaseLink&dlid='.$session{form}{dlid}), WebGUI::International::get(985));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=editDatabaseLink;dlid='.$session{form}{dlid}), WebGUI::International::get(983));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=copyDatabaseLink;dlid='.$session{form}{dlid}), WebGUI::International::get(984));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=deleteDatabaseLink;dlid='.$session{form}{dlid}), WebGUI::International::get(985));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=listDatabaseLinks'), WebGUI::International::get(986));
|
||||
}
|
||||
return $ac->render($workarea, $title);
|
||||
|
|
@ -61,7 +61,7 @@ sub www_deleteDatabaseLink {
|
|||
my ($output);
|
||||
$output .= WebGUI::International::get(988).'<p>';
|
||||
$output .= '<p><div align="center"><a href="'.
|
||||
WebGUI::URL::page('op=deleteDatabaseLinkConfirm&dlid='.$session{form}{dlid})
|
||||
WebGUI::URL::page('op=deleteDatabaseLinkConfirm;dlid='.$session{form}{dlid})
|
||||
.'">'.WebGUI::International::get(44).'</a>';
|
||||
$output .= ' <a href="'.WebGUI::URL::page('op=listDatabaseLinks').
|
||||
'">'.WebGUI::International::get(45).'</a></div>';
|
||||
|
|
@ -151,9 +151,9 @@ sub www_listDatabaseLinks {
|
|||
$i++;
|
||||
while (%data = $sth->hash) {
|
||||
$row[$i] = '<tr><td valign="top" class="tableData">'
|
||||
.deleteIcon('op=deleteDatabaseLink&dlid='.$data{databaseLinkId})
|
||||
.editIcon('op=editDatabaseLink&dlid='.$data{databaseLinkId})
|
||||
.copyIcon('op=copyDatabaseLink&dlid='.$data{databaseLinkId})
|
||||
.deleteIcon('op=deleteDatabaseLink;dlid='.$data{databaseLinkId})
|
||||
.editIcon('op=editDatabaseLink;dlid='.$data{databaseLinkId})
|
||||
.copyIcon('op=copyDatabaseLink;dlid='.$data{databaseLinkId})
|
||||
.'</td>';
|
||||
$row[$i] .= '<td valign="top" class="tableData">'.$data{title}.'</td></tr>';
|
||||
$i++;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ sub www_formAssetTree {
|
|||
my @crumb;
|
||||
my $ancestors = $base->getLineage(["self","ancestors"],{returnObjects=>1});
|
||||
foreach my $ancestor (@{$ancestors}) {
|
||||
push(@crumb,'<a href="'.$ancestor->getUrl("op=formAssetTree&classLimiter=".$session{form}{classLimiter}."&formId="
|
||||
push(@crumb,'<a href="'.$ancestor->getUrl("op=formAssetTree;classLimiter=".$session{form}{classLimiter}.";formId="
|
||||
.$session{form}{formId}).'">'.$ancestor->get("menuTitle").'</a>');
|
||||
}
|
||||
my $output = '<p>'.join(" > ", @crumb)."</p>\n";
|
||||
|
|
@ -36,7 +36,7 @@ sub www_formAssetTree {
|
|||
} else {
|
||||
$output .= "(•) ";
|
||||
}
|
||||
$output .= '<a href="'.$child->getUrl("op=formAssetTree&classLimiter=".$session{form}{classLimiter}."&formId="
|
||||
$output .= '<a href="'.$child->getUrl("op=formAssetTree;classLimiter=".$session{form}{classLimiter}.";formId="
|
||||
.$session{form}{formId}).'">'.$child->get("menuTitle").'</a>'."<br />\n";
|
||||
}
|
||||
$session{page}{useEmptyStyle} = 1;
|
||||
|
|
|
|||
|
|
@ -49,17 +49,17 @@ sub _submenu {
|
|||
$ac->setHelp($help);
|
||||
}
|
||||
if (WebGUI::Grouping::isInGroup(3)) {
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=editGroup&gid=new'), WebGUI::International::get(90));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=editGroup;gid=new'), WebGUI::International::get(90));
|
||||
}
|
||||
if (WebGUI::Grouping::isInGroup(11)) {
|
||||
unless ($session{form}{op} eq "listGroups"
|
||||
|| $session{form}{gid} eq "new"
|
||||
|| $session{form}{op} eq "deleteGroupConfirm") {
|
||||
$ac->addSubmenuItem(WebGUI::URL::page("op=editGroup&gid=".$session{form}{gid}), WebGUI::International::get(753));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page("op=manageUsersInGroup&gid=".$session{form}{gid}), WebGUI::International::get(754));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page("op=manageGroupsInGroup&gid=".$session{form}{gid}), WebGUI::International::get(807));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page("op=emailGroup&gid=".$session{form}{gid}), WebGUI::International::get(808));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page("op=deleteGroup&gid=".$session{form}{gid}), WebGUI::International::get(806));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page("op=editGroup;gid=".$session{form}{gid}), WebGUI::International::get(753));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page("op=manageUsersInGroup;gid=".$session{form}{gid}), WebGUI::International::get(754));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page("op=manageGroupsInGroup;gid=".$session{form}{gid}), WebGUI::International::get(807));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page("op=emailGroup;gid=".$session{form}{gid}), WebGUI::International::get(808));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page("op=deleteGroup;gid=".$session{form}{gid}), WebGUI::International::get(806));
|
||||
}
|
||||
$ac->addSubmenuItem(WebGUI::URL::page("op=listGroups"), WebGUI::International::get(756));
|
||||
}
|
||||
|
|
@ -146,8 +146,8 @@ sub walkGroups {
|
|||
my $sth = WebGUI::SQL->read("select groups.groupId, groups.groupName from groupGroupings left join groups on groups.groupId=groupGroupings.groupId where groupGroupings.inGroup=".quote($parentId));
|
||||
while (my ($id, $name) = $sth->array) {
|
||||
$output .= $indent
|
||||
.deleteIcon('op=deleteGroupGrouping&gid='.$parentId.'&delete='.$id)
|
||||
.editIcon('op=editGroup&gid='.$id)
|
||||
.deleteIcon('op=deleteGroupGrouping;gid='.$parentId.';delete='.$id)
|
||||
.editIcon('op=editGroup;gid='.$id)
|
||||
.' '.$name.'<br />';
|
||||
$output .= walkGroups($id,$indent." ");
|
||||
}
|
||||
|
|
@ -197,7 +197,7 @@ sub www_deleteGroup {
|
|||
return WebGUI::Privilege::vitalComponent() if (isIn($session{form}{gid}, qw(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17)));
|
||||
my ($output);
|
||||
$output .= WebGUI::International::get(86).'<p>';
|
||||
$output .= '<div align="center"><a href="'.WebGUI::URL::page('op=deleteGroupConfirm&gid='.$session{form}{gid}).
|
||||
$output .= '<div align="center"><a href="'.WebGUI::URL::page('op=deleteGroupConfirm;gid='.$session{form}{gid}).
|
||||
'">'.WebGUI::International::get(44).'</a>';
|
||||
$output .= ' <a href="'.WebGUI::URL::page('op=listGroups').'">'
|
||||
.WebGUI::International::get(45).'</a></div>';
|
||||
|
|
@ -524,7 +524,7 @@ sub www_listGroups {
|
|||
my ($userCount) = WebGUI::SQL->quickArray("select count(*) from groupings where groupId=".quote($row->{groupId}));
|
||||
$output .= '
|
||||
<tr>
|
||||
<td valign="top" class="tableData"><a href="'.WebGUI::URL::page("op=editGroup&gid=".$row->{groupId}).'">'.$row->{groupName}.'</a></td>
|
||||
<td valign="top" class="tableData"><a href="'.WebGUI::URL::page("op=editGroup;gid=".$row->{groupId}).'">'.$row->{groupName}.'</a></td>
|
||||
<td valign="top" class="tableData">'.$row->{description}.'</td>
|
||||
<td valign="top" class="tableData">'.$userCount.'</td>
|
||||
</tr>
|
||||
|
|
@ -542,7 +542,7 @@ sub www_listGroups {
|
|||
while (@data = $sth->array) {
|
||||
$row[$i] = '<tr>';
|
||||
$row[$i] .= '<td valign="top" class="tableData"><a href="'
|
||||
.WebGUI::URL::page('op=manageUsersInGroup&gid='.$data[0]).'">'.$data[1].'</td>';
|
||||
.WebGUI::URL::page('op=manageUsersInGroup;gid='.$data[0]).'">'.$data[1].'</td>';
|
||||
$row[$i] .= '<td valign="top" class="tableData">'.$data[2].'</td>';
|
||||
($userCount) = WebGUI::SQL->quickArray("select count(*) from groupings where groupId=".quote($data[0]));
|
||||
$row[$i] .= '<td valign="top" class="tableData">'.$userCount.'</td></tr>';
|
||||
|
|
@ -591,21 +591,6 @@ sub www_manageGroupsInGroup {
|
|||
$output .= $f->print;
|
||||
$output .= '<p />';
|
||||
$output .= walkGroups($session{form}{gid});
|
||||
#<table class="tableData" align="center">';
|
||||
# $output .= '<tr class="tableHeader"><td></td><td>'.WebGUI::International::get(84).'</td></tr>';
|
||||
# $p = WebGUI::Paginator->new(WebGUI::URL::page('op=manageGroupsInGroup&gid='.$session{form}{gid}));
|
||||
# $p->setDataByQuery("select a.groupName as name,a.groupId as id from groups a
|
||||
# left join groupGroupings b on a.groupId=b.groupId
|
||||
# where b.inGroup=".quote($session{form}{gid})." order by a.groupName");
|
||||
# $groups = $p->getPageData;
|
||||
# foreach $group (@$groups) {
|
||||
# $output .= '<tr><td>'
|
||||
# .deleteIcon('op=deleteGroupGrouping&gid='.$session{form}{gid}.'&delete='.$group->{id})
|
||||
# .'</td><td><a href="'.WebGUI::URL::page('op=editGroup&gid='.$group->{id}).'">'
|
||||
# .$group->{name}.'</a></td></tr>';
|
||||
# }
|
||||
# $output .= '</table>';
|
||||
# $output .= $p->getBarTraditional;
|
||||
return _submenu($output,'813');
|
||||
}
|
||||
|
||||
|
|
@ -625,7 +610,7 @@ sub www_manageUsersInGroup {
|
|||
.WebGUI::Icon::_getBaseURL().'delete.gif" border="0"></td>
|
||||
<td class="tableHeader">'.WebGUI::International::get(50).'</td>
|
||||
<td class="tableHeader">'.WebGUI::International::get(369).'</td></tr>';
|
||||
my $p = WebGUI::Paginator->new(WebGUI::URL::page("op=manageUsersInGroup&gid=".$session{form}{gid}));
|
||||
my $p = WebGUI::Paginator->new(WebGUI::URL::page("op=manageUsersInGroup;gid=".$session{form}{gid}));
|
||||
$p->setDataByQuery("select users.username,users.userId,groupings.expireDate
|
||||
from groupings,users where groupings.groupId=".quote($session{form}{gid})." and groupings.userId=users.userId
|
||||
order by users.username");
|
||||
|
|
@ -635,10 +620,10 @@ sub www_manageUsersInGroup {
|
|||
name=>"uid",
|
||||
value=>$row->{userId}
|
||||
})
|
||||
.deleteIcon('op=deleteGrouping&uid='.$row->{userId}.'&gid='.$session{form}{gid})
|
||||
.editIcon('op=editGrouping&uid='.$row->{userId}.'&gid='.$session{form}{gid})
|
||||
.deleteIcon('op=deleteGrouping;uid='.$row->{userId}.';gid='.$session{form}{gid})
|
||||
.editIcon('op=editGrouping;uid='.$row->{userId}.';gid='.$session{form}{gid})
|
||||
.'</td>';
|
||||
$output .= '<td class="tableData"><a href="'.WebGUI::URL::page('op=editUser&uid='.$row->{userId}).'">'.$row->{username}.'</a></td>';
|
||||
$output .= '<td class="tableData"><a href="'.WebGUI::URL::page('op=editUser;uid='.$row->{userId}).'">'.$row->{username}.'</a></td>';
|
||||
$output .= '<td class="tableData">'.epochToHuman($row->{expireDate},"%z").'</td></tr>';
|
||||
}
|
||||
$output .= '</table>'.WebGUI::Form::formFooter();
|
||||
|
|
@ -660,7 +645,7 @@ sub www_manageUsersInGroup {
|
|||
push(@{$existingUsers},"1");
|
||||
my %users;
|
||||
tie %users, "Tie::IxHash";
|
||||
my $sth = WebGUI::Operation::User::doUserSearch("op=manageUsersInGroup&gid=".$session{form}{gid},0,$existingUsers);
|
||||
my $sth = WebGUI::Operation::User::doUserSearch("op=manageUsersInGroup;gid=".$session{form}{gid},0,$existingUsers);
|
||||
while (my $data = $sth->hashRef) {
|
||||
$users{$data->{userId}} = $data->{username};
|
||||
$users{$data->{userId}} .= " (".$data->{email}.")" if ($data->{email});
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ sub _get {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub _link {
|
||||
return WebGUI::URL::page('op=viewHelp&hid='.WebGUI::URL::escape($_[0]).'&namespace='.$_[1]);
|
||||
return WebGUI::URL::page('op=viewHelp;hid='.WebGUI::URL::escape($_[0]).';namespace='.$_[1]);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -36,13 +36,13 @@ sub _submenu {
|
|||
}
|
||||
my $returnUrl = "";
|
||||
if($session{form}{returnUrl}) {
|
||||
$returnUrl = "&returnUrl=".WebGUI::URL::escape($session{form}{returnUrl});
|
||||
$returnUrl = ";returnUrl=".WebGUI::URL::escape($session{form}{returnUrl});
|
||||
}
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=editLDAPLink&llid=new'.$returnUrl), WebGUI::International::get("LDAPLink_982","AuthLDAP"));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=editLDAPLink;llid=new'.$returnUrl), WebGUI::International::get("LDAPLink_982","AuthLDAP"));
|
||||
if ($session{form}{op} eq "editLDAPLink" && $session{form}{llid} ne "new") {
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=editLDAPLink&llid='.$session{form}{llid}.$returnUrl), WebGUI::International::get("LDAPLink_983","AuthLDAP"));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=copyLDAPLink&llid='.$session{form}{llid}.$returnUrl), WebGUI::International::get("LDAPLink_984","AuthLDAP"));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=deleteLDAPLink&llid='.$session{form}{llid}), WebGUI::International::get("LDAPLink_985","AuthLDAP"));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=editLDAPLink;llid='.$session{form}{llid}.$returnUrl), WebGUI::International::get("LDAPLink_983","AuthLDAP"));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=copyLDAPLink;llid='.$session{form}{llid}.$returnUrl), WebGUI::International::get("LDAPLink_984","AuthLDAP"));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=deleteLDAPLink;llid='.$session{form}{llid}), WebGUI::International::get("LDAPLink_985","AuthLDAP"));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=listLDAPLinks'.$returnUrl), WebGUI::International::get("LDAPLink_986","AuthLDAP"));
|
||||
}
|
||||
return $ac->render($workarea, $title);
|
||||
|
|
@ -212,16 +212,16 @@ sub www_listLDAPLinks {
|
|||
my ($output, $p, $sth, $data, @row, $i);
|
||||
my $returnUrl = "";
|
||||
if($session{form}{returnUrl}) {
|
||||
$returnUrl = "&returnUrl=".WebGUI::URL::escape($session{form}{returnUrl});
|
||||
$returnUrl = ";returnUrl=".WebGUI::URL::escape($session{form}{returnUrl});
|
||||
}
|
||||
$sth = WebGUI::SQL->read("select * from ldapLink order by ldapLinkName");
|
||||
$row[$i] = '<tr><td valign="top" class="tableData"> </td><td valign="top" class="tableData">'.WebGUI::International::get("LDAPLink_1076","AuthLDAP").'</td><td>'.WebGUI::International::get("LDAPLink_1077","AuthLDAP").'</td></tr>';
|
||||
$i++;
|
||||
while ($data = $sth->hashRef) {
|
||||
$row[$i] = '<tr><td valign="top" class="tableData">'
|
||||
.deleteIcon('op=deleteLDAPLink&llid='.$data->{ldapLinkId},WebGUI::URL::page(),WebGUI::International::get("LDAPLink_988","AuthLDAP"))
|
||||
.editIcon('op=editLDAPLink&llid='.$data->{ldapLinkId}.$returnUrl)
|
||||
.copyIcon('op=copyLDAPLink&llid='.$data->{ldapLinkId}.$returnUrl)
|
||||
.deleteIcon('op=deleteLDAPLink;llid='.$data->{ldapLinkId},WebGUI::URL::page(),WebGUI::International::get("LDAPLink_988","AuthLDAP"))
|
||||
.editIcon('op=editLDAPLink;llid='.$data->{ldapLinkId}.$returnUrl)
|
||||
.copyIcon('op=copyLDAPLink;llid='.$data->{ldapLinkId}.$returnUrl)
|
||||
.'</td>';
|
||||
$row[$i] .= '<td valign="top" class="tableData">'.$data->{ldapLinkName}.'</td>';
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ sub www_viewMessageLog {
|
|||
my $messages = $p->getPageData;
|
||||
foreach my $message (@$messages) {
|
||||
my $hash;
|
||||
$hash->{'message.subject'} = '<a href="'.WebGUI::URL::page('op=viewMessageLogMessage&mlog='.$message->{messageLogId}).'">'.$message->{subject}.'</a>';
|
||||
$hash->{'message.subject'} = '<a href="'.WebGUI::URL::page('op=viewMessageLogMessage;mlog='.$message->{messageLogId}).'">'.$message->{subject}.'</a>';
|
||||
my $status = _status->{$message->{status}};
|
||||
$status = '<a href="'.WebGUI::URL::append($message->{url},'mlog='.$message->{messageLogId}).'">'.$status.'</a>' if ($message->{url} ne "");
|
||||
$hash->{'message.status'} = $status;
|
||||
|
|
|
|||
|
|
@ -30,10 +30,10 @@ sub _submenu {
|
|||
|
||||
my $productId = $session{form}{productId} || WebGUI::Session::getScratch('managingProduct');
|
||||
undef $productId if ($productId eq 'new');
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=editProduct&productId=new'), $i18n->get('add product'));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=editProduct;productId=new'), $i18n->get('add product'));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=listProducts'), $i18n->get('list products'));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=manageProduct&productId='.$productId), $i18n->get('manage product')) if ($productId);
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=listProductVariants&productId='.$productId), $i18n->get('list variants')) if ($productId);
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=manageProduct;productId='.$productId), $i18n->get('manage product')) if ($productId);
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=listProductVariants;productId='.$productId), $i18n->get('list variants')) if ($productId);
|
||||
|
||||
return $ac->render($workarea, $title);
|
||||
}
|
||||
|
|
@ -482,8 +482,8 @@ sub www_listProducts {
|
|||
while ($row = $sth->hashRef) {
|
||||
$output .= '<tr>';
|
||||
$output .= '<td>';
|
||||
$output .= deleteIcon('op=deleteProduct&productId='.$row->{productId});
|
||||
$output .= editIcon('op=manageProduct&productId='.$row->{productId});
|
||||
$output .= deleteIcon('op=deleteProduct;productId='.$row->{productId});
|
||||
$output .= editIcon('op=manageProduct;productId='.$row->{productId});
|
||||
$output .= '</td>';
|
||||
$output .= '<td>'.$row->{title}.'</td>';
|
||||
$output .= '</tr>';
|
||||
|
|
@ -545,7 +545,7 @@ sub www_listProductVariants {
|
|||
name => 'available',
|
||||
value => $_->{variantId},
|
||||
checked => $_->{available},
|
||||
}).editIcon('op=editProductVariant&variantId='.$_->{variantId})."</td>";
|
||||
}).editIcon('op=editProductVariant;variantId='.$_->{variantId})."</td>";
|
||||
$output .= "</tr>";
|
||||
}
|
||||
$output .= "</table>";
|
||||
|
|
@ -588,7 +588,7 @@ sub www_manageProduct {
|
|||
$product = WebGUI::Product->new($productId);
|
||||
|
||||
$output .= "<h1>".$product->get('title')."</h1>";
|
||||
$output .= "<h2>".$i18n->get('properties').editIcon('op=editProduct&productId='.$productId)."</h2>";
|
||||
$output .= "<h2>".$i18n->get('properties').editIcon('op=editProduct;productId='.$productId)."</h2>";
|
||||
$output .= "<table>";
|
||||
$output .= "<tr><td>".$i18n->get('price')."</td><td>".$product->get('price')."</td></tr>";
|
||||
$output .= "<tr><td>".$i18n->get('weight')."</td><td>".$product->get('weight')."</td></tr>";
|
||||
|
|
@ -598,20 +598,20 @@ sub www_manageProduct {
|
|||
$output .= "</table>";
|
||||
|
||||
$output .= "<h2>Parameters</h2>";
|
||||
$output .= '<a href="'.WebGUI::URL::page('op=editProductParameter¶meterId=new&productId='.$product->get('productId')).'">'.
|
||||
$output .= '<a href="'.WebGUI::URL::page('op=editProductParameter;parameterId=new;productId='.$product->get('productId')).'">'.
|
||||
$i18n->get('add parameter').'</a><br>';
|
||||
foreach $parameter (@{$product->getParameter}) {
|
||||
$output .= deleteIcon('op=deleteProductParameter¶meterId='.$parameter->{parameterId}).
|
||||
editIcon('op=editProductParameter¶meterId='.$parameter->{parameterId});
|
||||
$output .= deleteIcon('op=deleteProductParameter;parameterId='.$parameter->{parameterId}).
|
||||
editIcon('op=editProductParameter;parameterId='.$parameter->{parameterId});
|
||||
$output .= '<span style="margin-left: 10px"><b>'.$parameter->{name}.'</b></span><br>';
|
||||
$output .= '<a style="margin-left: 20px" href="'.
|
||||
WebGUI::URL::page('op=editProductParameterOption&optionId=new¶meterId='.$parameter->{parameterId}).'">'.
|
||||
WebGUI::URL::page('op=editProductParameterOption;optionId=new;parameterId='.$parameter->{parameterId}).'">'.
|
||||
$i18n->get('add option').'</a><br>';
|
||||
foreach $optionId (@{$parameter->{options}}) {
|
||||
$option = $product->getOption($optionId);
|
||||
$output .= '<span style="margin-left: 20px">'.
|
||||
deleteIcon('op=deleteProductParameterOption&optionId='.$option->{optionId}).
|
||||
editIcon('op=editProductParameterOption¶meterId='.$parameter->{parameterId}.'&optionId='.$option->{optionId}).$option->{value}.'</span><br>';
|
||||
deleteIcon('op=deleteProductParameterOption;optionId='.$option->{optionId}).
|
||||
editIcon('op=editProductParameterOption;parameterId='.$parameter->{parameterId}.';optionId='.$option->{optionId}).$option->{value}.'</span><br>';
|
||||
}
|
||||
$output .= '<br>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,15 +56,15 @@ sub _submenu {
|
|||
if ($help) {
|
||||
$ac->setHelp($help,"WebGUIProfile");
|
||||
}
|
||||
$ac->addSubmenuItem(WebGUI::URL::page("op=editProfileCategory&cid=new"), WebGUI::International::get(490,"WebGUIProfile"));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page("op=editProfileField&fid=new"), WebGUI::International::get(491,"WebGUIProfile"));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page("op=editProfileCategory;cid=new"), WebGUI::International::get(490,"WebGUIProfile"));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page("op=editProfileField;fid=new"), WebGUI::International::get(491,"WebGUIProfile"));
|
||||
if ((($session{form}{op} eq "editProfileField" && $session{form}{fid} ne "new") || $session{form}{op} eq "deleteProfileField") && $session{form}{cid} eq "") {
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=editProfileField&fid='.$session{form}{fid}), WebGUI::International::get(787,"WebGUIProfile"));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=deleteProfileField&fid='.$session{form}{fid}), WebGUI::International::get(788,"WebGUIProfile"));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=editProfileField;fid='.$session{form}{fid}), WebGUI::International::get(787,"WebGUIProfile"));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=deleteProfileField;fid='.$session{form}{fid}), WebGUI::International::get(788,"WebGUIProfile"));
|
||||
}
|
||||
if ((($session{form}{op} eq "editProfileCategory" && $session{form}{cid} ne "new") || $session{form}{op} eq "deleteProfileCategory") && $session{form}{fid} eq "") {
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=editProfileCategory&cid='.$session{form}{cid}), WebGUI::International::get(789,"WebGUIProfile"));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=deleteProfileCategory&cid='.$session{form}{cid}), WebGUI::International::get(790,"WebGUIProfile"));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=editProfileCategory;cid='.$session{form}{cid}), WebGUI::International::get(789,"WebGUIProfile"));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=deleteProfileCategory;cid='.$session{form}{cid}), WebGUI::International::get(790,"WebGUIProfile"));
|
||||
}
|
||||
$ac->addSubmenuItem(WebGUI::URL::page("op=editProfileSettings"), WebGUI::International::get(492,"WebGUIProfile"));
|
||||
return $ac->render($workarea, $title);
|
||||
|
|
@ -295,10 +295,10 @@ sub www_editProfileSettings {
|
|||
tie %field, 'Tie::CPHash';
|
||||
$a = WebGUI::SQL->read("select * from userProfileCategory order by sequenceNumber");
|
||||
while (%category = $a->hash) {
|
||||
$output .= deleteIcon('op=deleteProfileCategoryConfirm&cid='.$category{profileCategoryId},'',WebGUI::International::get(466,"WebGUIProfile"));
|
||||
$output .= editIcon('op=editProfileCategory&cid='.$category{profileCategoryId});
|
||||
$output .= moveUpIcon('op=moveProfileCategoryUp&cid='.$category{profileCategoryId});
|
||||
$output .= moveDownIcon('op=moveProfileCategoryDown&cid='.$category{profileCategoryId});
|
||||
$output .= deleteIcon('op=deleteProfileCategoryConfirm;cid='.$category{profileCategoryId},'',WebGUI::International::get(466,"WebGUIProfile"));
|
||||
$output .= editIcon('op=editProfileCategory;cid='.$category{profileCategoryId});
|
||||
$output .= moveUpIcon('op=moveProfileCategoryUp;cid='.$category{profileCategoryId});
|
||||
$output .= moveDownIcon('op=moveProfileCategoryDown;cid='.$category{profileCategoryId});
|
||||
$output .= ' <b>';
|
||||
$output .= WebGUI::Operation::Shared::secureEval($category{categoryName});
|
||||
$output .= '</b><br>';
|
||||
|
|
@ -306,10 +306,10 @@ sub www_editProfileSettings {
|
|||
profileCategoryId=".quote($category{profileCategoryId})." order by sequenceNumber");
|
||||
while (%field = $b->hash) {
|
||||
$output .= ' ';
|
||||
$output .= deleteIcon('op=deleteProfileFieldConfirm&fid='.$field{fieldName},'',WebGUI::International::get(467,"WebGUIProfile"));
|
||||
$output .= editIcon('op=editProfileField&fid='.$field{fieldName});
|
||||
$output .= moveUpIcon('op=moveProfileFieldUp&fid='.$field{fieldName});
|
||||
$output .= moveDownIcon('op=moveProfileFieldDown&fid='.$field{fieldName});
|
||||
$output .= deleteIcon('op=deleteProfileFieldConfirm;fid='.$field{fieldName},'',WebGUI::International::get(467,"WebGUIProfile"));
|
||||
$output .= editIcon('op=editProfileField;fid='.$field{fieldName});
|
||||
$output .= moveUpIcon('op=moveProfileFieldUp;fid='.$field{fieldName});
|
||||
$output .= moveDownIcon('op=moveProfileFieldDown;fid='.$field{fieldName});
|
||||
$output .= ' ';
|
||||
$output .= WebGUI::Operation::Shared::secureEval($field{fieldLabel});
|
||||
$output .= '<br>';
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ sub _submenu {
|
|||
if ($help) {
|
||||
$ac->setHelp($help);
|
||||
}
|
||||
$ac->addSubmenuItem(WebGUI::URL::page("op=editReplacement&replacementId=new"), WebGUI::International::get(1047));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page("op=editReplacement;replacementId=new"), WebGUI::International::get(1047));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page("op=listReplacements"), WebGUI::International::get("content filters"));
|
||||
return $ac->render($workarea, $title);
|
||||
}
|
||||
|
|
@ -94,8 +94,8 @@ sub www_listReplacements {
|
|||
$output .= '<tr><td></td><td class="tableHeader">'.WebGUI::International::get(1050).'</td><td class="tableHeader">'.WebGUI::International::get(1051).'</td></tr>';
|
||||
my $sth = WebGUI::SQL->read("select replacementId,searchFor,replaceWith from replacements order by searchFor");
|
||||
while (my $data = $sth->hashRef) {
|
||||
$output .= '<tr><td>'.deleteIcon("op=deleteReplacement&replacementId=".$data->{replacementId})
|
||||
.editIcon("op=editReplacement&replacementId=".$data->{replacementId}).'</td>';
|
||||
$output .= '<tr><td>'.deleteIcon("op=deleteReplacement;replacementId=".$data->{replacementId})
|
||||
.editIcon("op=editReplacement;replacementId=".$data->{replacementId}).'</td>';
|
||||
$data->{replaceWith} =~ s/\&/\&\;/g;
|
||||
$data->{replaceWith} =~ s/\</\<\;/g;
|
||||
$data->{replaceWith} =~ s/\>/\>\;/g;
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ our @EXPORT = qw(&menuWrapper);
|
|||
}
|
||||
unless ($session{form}{op} eq "displayAccount"){
|
||||
my %hash;
|
||||
$hash{'options.display'} = '<a href="'.WebGUI::URL::page('op=auth&method=init').'">'.WebGUI::International::get(342).'</a>';
|
||||
$hash{'options.display'} = '<a href="'.WebGUI::URL::page('op=auth;method=init').'">'.WebGUI::International::get(342).'</a>';
|
||||
push(@array,\%hash);
|
||||
}
|
||||
unless ($session{form}{op} eq "editProfile"){
|
||||
|
|
@ -47,7 +47,7 @@ our @EXPORT = qw(&menuWrapper);
|
|||
}
|
||||
unless ($session{form}{op} eq "viewProfile"){
|
||||
my %hash;
|
||||
$hash{'options.display'} = '<a href="'.WebGUI::URL::page('op=viewProfile&uid='.$session{user}{userId}).'">'.WebGUI::International::get(343).'</a>';
|
||||
$hash{'options.display'} = '<a href="'.WebGUI::URL::page('op=viewProfile;uid='.$session{user}{userId}).'">'.WebGUI::International::get(343).'</a>';
|
||||
push(@array,\%hash);
|
||||
}
|
||||
unless ($session{form}{op} eq "viewMessageLog"){
|
||||
|
|
@ -60,11 +60,11 @@ our @EXPORT = qw(&menuWrapper);
|
|||
}
|
||||
|
||||
my %logout;
|
||||
$logout{'options.display'} = '<a href="'.WebGUI::URL::page('op=auth&method=logout').'">'.WebGUI::International::get(64).'</a>';
|
||||
$logout{'options.display'} = '<a href="'.WebGUI::URL::page('op=auth;method=logout').'">'.WebGUI::International::get(64).'</a>';
|
||||
push(@array,\%logout);
|
||||
if ($session{setting}{selfDeactivation} && !WebGUI::Grouping::isInGroup(3)){
|
||||
my %hash;
|
||||
$hash{'options.display'} = '<a href="'.WebGUI::URL::page('op=auth&method=deactivateAccount').'">'.WebGUI::International::get(65).'</a>';
|
||||
$hash{'options.display'} = '<a href="'.WebGUI::URL::page('op=auth;method=deactivateAccount').'">'.WebGUI::International::get(65).'</a>';
|
||||
push(@array,\%hash);
|
||||
}
|
||||
return \@array;
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ sub _submenu {
|
|||
if ($help) {
|
||||
$ac->setHelp($help, 'Subscription');
|
||||
}
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=editSubscription&sid=new'), $i18n->get('add subscription'));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=editSubscription;sid=new'), $i18n->get('add subscription'));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=createSubscriptionCodeBatch'), $i18n->get('generate batch'));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=listSubscriptionCodes'), $i18n->get('manage codes'));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=listSubscriptionCodeBatches'), $i18n->get('manage batches'));
|
||||
|
|
@ -282,9 +282,9 @@ sub www_listSubscriptionCodeBatches {
|
|||
$output .= '<table border="1" cellpadding="5" cellspacing="0" align="center">';
|
||||
foreach (@{$batches}) {
|
||||
$output .= '<tr><td>';
|
||||
$output .= deleteIcon('op=deleteSubscriptionCodeBatch&bid='.$_->{batchId}, undef, $i18n->get('delete batch confirm'));
|
||||
$output .= deleteIcon('op=deleteSubscriptionCodeBatch;bid='.$_->{batchId}, undef, $i18n->get('delete batch confirm'));
|
||||
$output .= '<td>'.$_->{description}.'</td>';
|
||||
$output .= '<td><a href="'.WebGUI::URL::page('op=listSubscriptionCodes&selection=b&bid='.$_->{batchId}).'">'.$i18n->get('list codes in batch').'</a></td>';
|
||||
$output .= '<td><a href="'.WebGUI::URL::page('op=listSubscriptionCodes;selection=b;bid='.$_->{batchId}).'">'.$i18n->get('list codes in batch').'</a></td>';
|
||||
$output .= '</tr>';
|
||||
}
|
||||
$output .= '</table>';
|
||||
|
|
@ -333,15 +333,15 @@ sub www_listSubscriptionCodes {
|
|||
|
||||
if ($session{form}{selection} eq 'du') {
|
||||
$where = " and dateUsed >= ".quote($duStart)." and dateUsed <= ".quote($duStop);
|
||||
$ops = '&duStart='.$duStart.'&duStop='.$duStop.'&selection=du';
|
||||
$ops = ';duStart='.$duStart.';duStop='.$duStop.';selection=du';
|
||||
$delete = '<a href="'.WebGUI::URL::page('op=deleteSubscriptionCodes'.$ops).'">'.$i18n->get('delete codes').'</a>';
|
||||
} elsif ($session{form}{selection} eq 'dc') {
|
||||
$where = " and dateCreated >= ".quote($dcStart)." and dateCreated <= ".quote($dcStop);
|
||||
$ops = '&dcStart='.$dcStart.'&dcStop='.$dcStop.'&selection=dc';
|
||||
$ops = ';dcStart='.$dcStart.';dcStop='.$dcStop.';selection=dc';
|
||||
$delete = '<a href="'.WebGUI::URL::page('op=deleteSubscriptionCodes'.$ops).'">'.$i18n->get('delete codes').'</a>';
|
||||
} elsif ($session{form}{selection} eq 'b') {
|
||||
$where = " and t1.batchId=".quote($session{form}{bid});
|
||||
$ops = '&bid='.$session{form}{bid}.'&selection=b';
|
||||
$ops = ';bid='.$session{form}{bid}.';selection=b';
|
||||
$delete = '<a href="'.WebGUI::URL::page('op=deleteSubscriptionCodeBatch'.$ops).'">'.$i18n->get('delete codes').'</a>';
|
||||
} else {
|
||||
return _submenu($output, 'listSubscriptionCodes title', 'subscription codes manage');
|
||||
|
|
@ -391,8 +391,8 @@ sub www_listSubscriptions {
|
|||
$output .= '<table border="1" cellpadding="5" cellspacing="0" align="center">';
|
||||
foreach (@{$subscriptions}) {
|
||||
$output .= '<tr>';
|
||||
$output .= '<td>'.editIcon('op=editSubscription&sid='.$_->{subscriptionId});
|
||||
$output .= deleteIcon('op=deleteSubscription&sid='.$_->{subscriptionId}, undef, $i18n->get('delete subscription confirm')).'</td>';
|
||||
$output .= '<td>'.editIcon('op=editSubscription;sid='.$_->{subscriptionId});
|
||||
$output .= deleteIcon('op=deleteSubscription;sid='.$_->{subscriptionId}, undef, $i18n->get('delete subscription confirm')).'</td>';
|
||||
$output .= '<td>'.$_->{name}.'</td>';
|
||||
$output .= '</tr>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ sub www_viewPurchaseHistory {
|
|||
push(@historyLoop, {
|
||||
(%properties),
|
||||
itemLoop => $_->getItems,
|
||||
cancelUrl => WebGUI::URL::page('op=cancelRecurringTransaction&tid='.$properties{transactionId}),
|
||||
cancelUrl => WebGUI::URL::page('op=cancelRecurringTransaction;tid='.$properties{transactionId}),
|
||||
canCancel => ($properties{recurring} && ($properties{status} eq 'Completed')),
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,16 +44,16 @@ sub _submenu {
|
|||
$ac->setHelp($help);
|
||||
}
|
||||
if (WebGUI::Grouping::isInGroup(11)) {
|
||||
$ac->addSubmenuItem(WebGUI::URL::page("op=editUser&uid=new"), WebGUI::International::get(169));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page("op=editUser;uid=new"), WebGUI::International::get(169));
|
||||
}
|
||||
if (WebGUI::Grouping::isInGroup(3)) {
|
||||
unless ($session{form}{op} eq "listUsers"
|
||||
|| $session{form}{op} eq "deleteUserConfirm") {
|
||||
$ac->addSubmenuItem(WebGUI::URL::page("op=editUser&uid=".$session{form}{uid}), WebGUI::International::get(457));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=becomeUser&uid='.$session{form}{uid}), WebGUI::International::get(751));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=deleteUser&uid='.$session{form}{uid}), WebGUI::International::get(750));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page("op=editUser;uid=".$session{form}{uid}), WebGUI::International::get(457));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=becomeUser;uid='.$session{form}{uid}), WebGUI::International::get(751));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page('op=deleteUser;uid='.$session{form}{uid}), WebGUI::International::get(750));
|
||||
if ($session{setting}{useKarma}) {
|
||||
$ac->addSubmenuItem(WebGUI::URL::page("op=editUserKarma&uid=".$session{form}{uid}), WebGUI::International::get(555));
|
||||
$ac->addSubmenuItem(WebGUI::URL::page("op=editUserKarma;uid=".$session{form}{uid}), WebGUI::International::get(555));
|
||||
}
|
||||
}
|
||||
$ac->addSubmenuItem(WebGUI::URL::page("op=listUsers"), WebGUI::International::get(456));
|
||||
|
|
@ -186,7 +186,7 @@ sub www_deleteUser {
|
|||
return _submenu(WebGUI::Privilege::vitalComponent());
|
||||
} else {
|
||||
$output .= WebGUI::International::get(167).'<p>';
|
||||
$output .= '<div align="center"><a href="'.WebGUI::URL::page('op=deleteUserConfirm&uid='.$session{form}{uid}).
|
||||
$output .= '<div align="center"><a href="'.WebGUI::URL::page('op=deleteUserConfirm;uid='.$session{form}{uid}).
|
||||
'">'.WebGUI::International::get(44).'</a>';
|
||||
$output .= ' <a href="'.WebGUI::URL::page('op=listUsers').'">'.
|
||||
WebGUI::International::get(45).'</a></div>';
|
||||
|
|
@ -470,7 +470,7 @@ sub www_listUsers {
|
|||
foreach my $data (@{$p->getPageData}) {
|
||||
$output .= '<tr class="tableData">';
|
||||
$output .= '<td>'.$status{$data->{status}}.'</td>';
|
||||
$output .= '<td><a href="'.WebGUI::URL::page('op=editUser&uid='.$data->{userId})
|
||||
$output .= '<td><a href="'.WebGUI::URL::page('op=editUser;uid='.$data->{userId})
|
||||
.'">'.$data->{username}.'</a></td>';
|
||||
$output .= '<td class="tableData">'.$data->{email}.'</td>';
|
||||
$output .= '<td class="tableData">'.epochToHuman($data->{dateCreated},"%z").'</td>';
|
||||
|
|
|
|||
|
|
@ -1,218 +0,0 @@
|
|||
package WebGUI::Search;
|
||||
|
||||
=head1 LEGAL
|
||||
|
||||
-------------------------------------------------------------------
|
||||
WebGUI is Copyright 2001-2005 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 Tie::IxHash;
|
||||
use WebGUI::HTMLForm;
|
||||
use WebGUI::International;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::SQL;
|
||||
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Package WebGUI::Search
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
A package built to take the hassle out of creating advanced search functionality in WebGUI applications.
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use WebGUI::Search;
|
||||
$sql = WebGUI::Search::buildConstraints(\@fields);
|
||||
$html = WebGUI::Search::form(\%hidden);
|
||||
|
||||
=head1 METHODS
|
||||
|
||||
These methods are available from this package:
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 buildConstraints ( fieldList ) { [ all, atLeastOne, exactPhrase, without ] }
|
||||
|
||||
Generates and returns the constraints to an SQL where clause based upon input from the user.
|
||||
|
||||
=head3 fieldList
|
||||
|
||||
An array reference that contains a list of the fields (table columns) to be considered when searching.
|
||||
|
||||
=head3 all
|
||||
|
||||
A form param with a comma or space separated list of key words to search for in the fields of the fieldList. All the words listed here must be found to be true.
|
||||
|
||||
=head3 atLeastOne
|
||||
|
||||
A form param with a comma or space separated list of key words to search for in the fields of the fieldList. Any of the words may match in any of the fields for this to be true.
|
||||
|
||||
=head3 exactPhrase
|
||||
|
||||
A form param with a phrase to search for in the fields of the fieldList. The exact phrase must be found in one of the fields to be true.
|
||||
|
||||
=head3 without
|
||||
|
||||
A form param with a comma or space separated list of key words to search for in the fields of the fieldList. None of the words may be found in any of the fields for this to be true.
|
||||
|
||||
=cut
|
||||
|
||||
sub buildConstraints {
|
||||
my ($field, $all, $allSub, $exactPhrase, $atLeastOne, $without, @words, $word, $sql);
|
||||
if ($session{scratch}{all} ne "") {
|
||||
$session{scratch}{all} =~ s/,/ /g;
|
||||
$session{scratch}{all} =~ s/\s+/ /g;
|
||||
@words = split(/ /,$session{scratch}{all});
|
||||
foreach $word (@words) {
|
||||
$all .= " and " if ($all ne "");
|
||||
$all .= "(";
|
||||
foreach $field (@{$_[0]}) {
|
||||
$allSub .= " or " if ($allSub ne "");
|
||||
$allSub .= " $field like ".quote("%".$word."%");
|
||||
}
|
||||
$all .= $allSub;
|
||||
$allSub = "";
|
||||
$all .= ")";
|
||||
}
|
||||
}
|
||||
if ($session{scratch}{exactPhrase} ne "") {
|
||||
foreach $field (@{$_[0]}) {
|
||||
$exactPhrase .= " or " if ($exactPhrase ne "");
|
||||
$exactPhrase .= " $field like ".quote("%".$session{scratch}{exactPhrase}."%");
|
||||
}
|
||||
}
|
||||
if ($session{scratch}{atLeastOne} ne "") {
|
||||
$session{scratch}{atLeastOne} =~ s/,/ /g;
|
||||
$session{scratch}{atLeastOne} =~ s/\s+/ /g;
|
||||
@words = split(/ /,$session{scratch}{atLeastOne});
|
||||
foreach $word (@words) {
|
||||
foreach $field (@{$_[0]}) {
|
||||
$atLeastOne .= " or " if ($atLeastOne ne "");
|
||||
$atLeastOne .= " $field like ".quote("%".$word."%");
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($session{scratch}{without} ne "") {
|
||||
$session{scratch}{without} =~ s/,/ /g;
|
||||
$session{scratch}{without} =~ s/\s+/ /g;
|
||||
@words = split(/ /,$session{scratch}{without});
|
||||
foreach $word (@words) {
|
||||
foreach $field (@{$_[0]}) {
|
||||
$without .= " and " if ($without ne "");
|
||||
$without .= " $field not like ".quote("%".$word."%");
|
||||
}
|
||||
}
|
||||
}
|
||||
$sql = "($all) " if ($all ne "");
|
||||
$sql .= " and " if ($sql ne "" && $exactPhrase ne "");
|
||||
$sql .= " ($exactPhrase) " if ($exactPhrase ne "");
|
||||
$sql .= " and " if ($sql ne "" && $atLeastOne ne "");
|
||||
$sql .= " ($atLeastOne) " if ($atLeastOne ne "");
|
||||
$sql .= " and " if ($sql ne "" && $without ne "");
|
||||
$sql .= " ($without) " if ($without ne "");
|
||||
return $sql;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 form ( hiddenFields ) { [ numResults ] }
|
||||
|
||||
Generates and returns the advanced search form.
|
||||
|
||||
=head3 hiddenFields
|
||||
|
||||
A hash reference that contains any name/value pairs that should be included as hidden fields in the search form.
|
||||
|
||||
=head3 numResults
|
||||
|
||||
A form param that can optionally specify the number of results to display. Defaults to 25.
|
||||
|
||||
=cut
|
||||
|
||||
sub form {
|
||||
WebGUI::Session::setScratch("all",$session{form}{all});
|
||||
WebGUI::Session::setScratch("atLeastOne",$session{form}{atLeastOne});
|
||||
WebGUI::Session::setScratch("exactPhrase",$session{form}{exactPhrase});
|
||||
WebGUI::Session::setScratch("without",$session{form}{without});
|
||||
WebGUI::Session::setScratch("numResults",$session{form}{numResults});
|
||||
my ($key, $numResults, $output, $f, $resultsText, %results);
|
||||
tie %results, 'Tie::IxHash';
|
||||
$numResults = $session{scratch}{numResults} || 25;
|
||||
$resultsText = WebGUI::International::get(529);
|
||||
%results = (10=>'10 '.$resultsText, 25=>'25 '.$resultsText, 50=>'50 '.$resultsText, 100=>'100 '.$resultsText);
|
||||
$f = WebGUI::HTMLForm->new(1);
|
||||
foreach $key (keys %{$_[0]}) {
|
||||
$f->hidden($key,${$_[0]}{$key});
|
||||
}
|
||||
$output = '<table width="100%" class="tableMenu"><tr><td align="right" width="15%">';
|
||||
$output .= '<h1>'.WebGUI::International::get(364).'</h1>';
|
||||
$output .= '</td>';
|
||||
$f->raw('<td valign="top" width="70%" align="center">');
|
||||
$f->raw('<table>');
|
||||
$f->raw('<tr><td class="tableData">'.WebGUI::International::get(530).'</td><td class="tableData">');
|
||||
$f->text('all','',$session{scratch}{all},'','','',($session{setting}{textBoxSize}-5));
|
||||
$f->raw('</td></tr>');
|
||||
$f->raw('<tr><td class="tableData">'.WebGUI::International::get(531).'</td><td class="tableData">');
|
||||
$f->text('exactPhrase','',$session{scratch}{exactPhrase},'','','',($session{setting}{textBoxSize}-5));
|
||||
$f->raw('</td></tr>');
|
||||
$f->raw('<tr><td class="tableData">'.WebGUI::International::get(532).'</td><td class="tableData">');
|
||||
$f->text('atLeastOne','',$session{scratch}{atLeastOne},'','','',($session{setting}{textBoxSize}-5));
|
||||
$f->raw('</td></td>');
|
||||
$f->raw('<tr><td class="tableData">'.WebGUI::International::get(533).'</td><td class="tableData">');
|
||||
$f->text('without','',$session{scratch}{without},'','','',($session{setting}{textBoxSize}-5));
|
||||
$f->raw('</td></tr>');
|
||||
$f->raw('</table>');
|
||||
$f->raw('</td><td width="15%">');
|
||||
$f->selectList("numResults",\%results,'',[$numResults]);
|
||||
$f->raw('<p/>');
|
||||
$f->submit(value=>WebGUI::International::get(170));
|
||||
$f->raw('</td>');
|
||||
$output .= $f->print;
|
||||
$output .= '</tr></table>';
|
||||
return $output;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 toggleURL ( [ pairs ] )
|
||||
|
||||
Returns a URL that toggles the value "search" in the user's scratch
|
||||
variables on and off.
|
||||
|
||||
=head3 pairs
|
||||
|
||||
URL name value pairs (this=that&foo=bar) to be passed with this toggle.
|
||||
|
||||
=cut
|
||||
|
||||
sub toggleURL {
|
||||
my $pairs = shift;
|
||||
my $url = shift || $session{page}{urlizedTitle};
|
||||
WebGUI::Session::setScratch("search",$session{form}{search});
|
||||
if ($session{scratch}{search}) {
|
||||
$url = WebGUI::URL::gateway($url,"search=0");
|
||||
} else {
|
||||
$url = WebGUI::URL::gateway($url,"search=1");
|
||||
}
|
||||
$url = WebGUI::URL::append($url,$pairs) if ($pairs);
|
||||
return $url;
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
|
||||
|
|
@ -67,7 +67,7 @@ The URL to append information to.
|
|||
|
||||
Name value pairs to add to the URL in the form of:
|
||||
|
||||
name1=value1&name2=value2&name3=value3
|
||||
name1=value1;name2=value2;name3=value3
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -75,7 +75,7 @@ sub append {
|
|||
my ($url);
|
||||
$url = $_[0];
|
||||
if ($url =~ /\?/) {
|
||||
$url .= '&'.$_[1];
|
||||
$url .= ';'.$_[1];
|
||||
} else {
|
||||
$url .= '?'.$_[1];
|
||||
}
|
||||
|
|
@ -115,7 +115,7 @@ The urlized title of a page that you wish to create a URL for.
|
|||
|
||||
Name value pairs to add to the URL in the form of:
|
||||
|
||||
name1=value1&name2=value2&name3=value3
|
||||
name1=value1;name2=value2;name3=value3
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -242,7 +242,7 @@ Returns the URL of the current page.
|
|||
|
||||
Name value pairs to add to the URL in the form of:
|
||||
|
||||
name1=value1&name2=value2&name3=value3
|
||||
name1=value1;name2=value2;name3=value3
|
||||
|
||||
=head3 useSiteUrl
|
||||
|
||||
|
|
|
|||
|
|
@ -100,7 +100,6 @@ use WebGUI::MessageLog ();
|
|||
use WebGUI::Operation ();
|
||||
use WebGUI::Paginator ();
|
||||
use WebGUI::Privilege ();
|
||||
use WebGUI::Search ();
|
||||
use WebGUI::Session ();
|
||||
use WebGUI::SQL ();
|
||||
use WebGUI::Storage ();
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ body{
|
|||
background-repeat: repeat-x;
|
||||
border: 5px #4E8AAB solid;
|
||||
margin:0px;
|
||||
min-height: 700px;
|
||||
}
|
||||
|
||||
th {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue