various bug fixes
This commit is contained in:
parent
577554b904
commit
bd7ccaf29d
21 changed files with 68 additions and 30 deletions
|
|
@ -5,6 +5,16 @@
|
|||
- Fixed a possible counting problem when looking for an infinite loop in
|
||||
groups of groups.
|
||||
- Fixed a bug in the LDAP module that required the RDN to be a URL.
|
||||
- bugfix [962196] addHTTP problem.
|
||||
- bugfix [962224] WebGUI::Operation::Statistics
|
||||
- bugfix [966470] WebGUI::User. Session not properly killed when deleting user.
|
||||
- bugfix [966466] WebGUI::Session. System crash when user language missing.
|
||||
- bugfix [ 981059 ] WebGUI vs perl 5.8.4
|
||||
- bugfix [ 975609 ] The form field for phone and email do not support maxlength
|
||||
(Thanks to Junying Du).
|
||||
- bugfix [ 938266 ] Fix: 5.5.4 Synopsis ignores hideFromNav (Thanks to
|
||||
Nicklous Roberts.)
|
||||
- bugfix [ 961056 ] pages erroneously owned by visitor
|
||||
|
||||
|
||||
5.5.6
|
||||
|
|
|
|||
|
|
@ -68,6 +68,13 @@
|
|||
database replication.
|
||||
- Templated the EditableToggle, a, and AdminToggle macros. Thanks to Colin
|
||||
Kuskie.
|
||||
- bugfix [ 933881 ] Forms not compliant (solution). Thanks to Nicklous
|
||||
Roberts.
|
||||
- bugfix [ 934410 ] non-compliant HTML (solution). Thanks to Nicklous
|
||||
Roberts.
|
||||
- bugfix [ 963316 ] Field without title in Content Settings
|
||||
|
||||
|
||||
|
||||
6.0.3
|
||||
- Fixed a recursive style change bug.
|
||||
|
|
|
|||
|
|
@ -214,7 +214,7 @@ sub createAccount {
|
|||
$vars->{'create.form.profile'} = WebGUI::Operation::Profile::getRequiredProfileFields();
|
||||
|
||||
$vars->{'create.form.submit'} = WebGUI::Form::submit({});
|
||||
$vars->{'create.form.footer'} = "</form>";
|
||||
$vars->{'create.form.footer'} = WebGUI::Form::formFooter();
|
||||
|
||||
$vars->{'login.url'} = WebGUI::URL::page('op=auth&method=init');
|
||||
$vars->{'login.label'} = WebGUI::International::get(58);
|
||||
|
|
@ -377,7 +377,7 @@ sub displayAccount {
|
|||
$vars->{'account.form.karma.label'} = WebGUI::International::get(537);
|
||||
}
|
||||
$vars->{'account.form.submit'} = WebGUI::Form::submit({});
|
||||
$vars->{'account.form.footer'} = "</form>";
|
||||
$vars->{'account.form.footer'} = WebGUI::Form::formFooter();
|
||||
|
||||
$vars->{'account.options'} = WebGUI::Operation::Shared::accountOptions();
|
||||
return WebGUI::Template::process(1,$template, $vars);
|
||||
|
|
@ -427,7 +427,7 @@ sub displayLogin {
|
|||
$vars->{'login.form.password'} = WebGUI::Form::password({"name"=>"identifier"});
|
||||
$vars->{'login.form.password.label'} = WebGUI::International::get(51);
|
||||
$vars->{'login.form.submit'} = WebGUI::Form::submit({"value"=>WebGUI::International::get(52)});
|
||||
$vars->{'login.form.footer'} = "</form>";
|
||||
$vars->{'login.form.footer'} = WebGUI::Form::formFooter();
|
||||
$vars->{'anonymousRegistration.isAllowed'} = ($session{setting}{anonymousRegistration});
|
||||
$vars->{'createAccount.url'} = WebGUI::URL::page('op=createAccount');
|
||||
$vars->{'createAccount.label'} = WebGUI::International::get(67);
|
||||
|
|
|
|||
|
|
@ -390,7 +390,7 @@ sub recoverPassword {
|
|||
$vars->{'recover.form.hidden'} .= WebGUI::Form::hidden({"name"=>"method","value"=>"recoverPasswordFinish"});
|
||||
|
||||
$vars->{'recover.form.submit'} = WebGUI::Form::submit({});
|
||||
$vars->{'recover.form.footer'} = "</form>";
|
||||
$vars->{'recover.form.footer'} = WebGUI::Form::formFooter();
|
||||
$vars->{'login.url'} = WebGUI::URL::page('op=auth&method=init');
|
||||
$vars->{'login.label'} = WebGUI::International::get(58);
|
||||
|
||||
|
|
@ -457,7 +457,7 @@ sub resetExpiredPassword {
|
|||
$vars->{'expired.form.passwordConfirm'} = WebGUI::Form::password({"name"=>"identifierConfirm"});
|
||||
$vars->{'expired.form.passwordConfirm.label'} = WebGUI::International::get(2,'AuthWebGUI');
|
||||
$vars->{'expired.form.submit'} = WebGUI::Form::submit({});
|
||||
$vars->{'expired.form.footer'} = "</form>";
|
||||
$vars->{'expired.form.footer'} = WebGUI::Form::formFooter();
|
||||
|
||||
return WebGUI::Template::process(1,'AuthWebGUI/Expired', $vars);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -147,6 +147,8 @@ sub readConfig {
|
|||
} else {
|
||||
$data{defaultSitename} = $data{sitename};
|
||||
}
|
||||
$data{webguiRoot} = $webguiPath;
|
||||
$data{configFile} = $filename;
|
||||
return \%data;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ Base forms package. Eliminates some of the normal code work that goes along with
|
|||
$html = WebGUI::Form::email({name=>"emailAddress"});
|
||||
$html = WebGUI::Form::fieldType({name=>"fieldType");
|
||||
$html = WebGUI::Form::file({name=>"image"});
|
||||
$html = WebGUI::Form::formFooter();
|
||||
$html = WebGUI::Form::formHeader();
|
||||
$html = WebGUI::Form::filterContent({value=>"javascript"});
|
||||
$html = WebGUI::Form::float({name=>"distance"});
|
||||
|
|
@ -675,6 +676,19 @@ sub filterContent {
|
|||
});
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 formFooter ( )
|
||||
|
||||
Returns a form footer.
|
||||
|
||||
=cut
|
||||
|
||||
sub formFooter {
|
||||
return "</div></form>\n\n";
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 formHeader ( hashRef )
|
||||
|
|
@ -718,7 +732,7 @@ sub formHeader {
|
|||
}
|
||||
my $method = $_[0]->{method} || "POST";
|
||||
my $enctype = $_[0]->{enctype} || "multipart/form-data";
|
||||
return '<form action="'.$action.'" enctype="'.$enctype.'" method="'.$method.'" '.$_[0]->{extras}.'>'.$hidden;
|
||||
return '<form action="'.$action.'" enctype="'.$enctype.'" method="'.$method.'" '.$_[0]->{extras}.'><div class="formContents">'.$hidden;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1164,7 +1178,7 @@ The number of characters wide this form element should be. There should be no re
|
|||
|
||||
sub phone {
|
||||
WebGUI::Style::setScript($session{config}{extrasURL}.'/inputCheck.js',{ language=>'javascript' });
|
||||
my $maxLength = $_[0]->{maxLength} || 30;
|
||||
my $maxLength = $_[0]->{maxlength} || 30;
|
||||
return text({
|
||||
name=>$_[0]->{name},
|
||||
maxlength=>$maxLength,
|
||||
|
|
@ -1714,7 +1728,7 @@ The number of characters wide this form element should be. There should be no re
|
|||
|
||||
sub zipcode {
|
||||
WebGUI::Style::setScript($session{config}{extrasURL}.'/inputCheck.js',{ language=>'javascript' });
|
||||
my $maxLength = $_[0]->{maxLength} || 10;
|
||||
my $maxLength = $_[0]->{maxlength} || 10;
|
||||
return text({
|
||||
name=>$_[0]->{name},
|
||||
maxlength=>$maxLength,
|
||||
|
|
|
|||
|
|
@ -1886,7 +1886,7 @@ sub www_post {
|
|||
name=>'subject',
|
||||
value=>$subject
|
||||
});
|
||||
$var->{'form.end'} = '</form>';
|
||||
$var->{'form.end'} = WebGUI::Form::formFooter();
|
||||
return WebGUI::Template::process($forum->get("postformTemplateId"),"Forum/PostForm", $var);
|
||||
}
|
||||
|
||||
|
|
@ -2083,7 +2083,7 @@ sub www_search {
|
|||
value=>[$numResults]
|
||||
});
|
||||
$var{'form.search'} = WebGUI::Form::submit({value=>WebGUI::International::get(170)});
|
||||
$var{'form.end'} = '</form>';
|
||||
$var{'form.end'} = WebGUI::Form::formFooter();
|
||||
$var{'thread.list.url'} = formatForumURL($caller->{callback},$forum->get("forumId"));
|
||||
$var{'thread.list.label'} = WebGUI::International::get(1019);
|
||||
$var{doit} = $session{form}{doit};
|
||||
|
|
|
|||
|
|
@ -1408,7 +1408,7 @@ sub new {
|
|||
});
|
||||
$header .= "\n<table ".$tableExtras.'>' unless ($noTable);
|
||||
$footer = "</table>\n" unless ($noTable);
|
||||
$footer .= "</form>\n\n";
|
||||
$footer .= WebGUI::Form::formFooter();
|
||||
bless {_noTable => $noTable, _header => $header, _footer => $footer, _data => ''}, $self;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ Returns a hash reference to the languages (languageId/lanugage) installed on thi
|
|||
sub getLanguages {
|
||||
my ($hashRef);
|
||||
my $dir = $session{config}{webguiRoot}.$session{os}{slash}."lib".$session{os}{slash}."WebGUI".$session{os}{slash}."i18n";
|
||||
opendir (DIR,$dir) or WebGUI::ErrorHandler::fatalError("Can't open I18N directory!");
|
||||
opendir (DIR,$dir) or WebGUI::ErrorHandler::fatalError("Can't open I18N directory! ".$dir);
|
||||
my @files = readdir(DIR);
|
||||
closedir(DIR);
|
||||
foreach my $file (@files) {
|
||||
|
|
|
|||
|
|
@ -45,7 +45,14 @@ These functions are available from this package:
|
|||
=cut
|
||||
|
||||
|
||||
our $parenthesis;
|
||||
our $parenthesis = qr /\( # Start with '(',
|
||||
(?: # Followed by
|
||||
(?>[^()]+) # Non-parenthesis
|
||||
|(??{ $parenthesis }) # Or a balanced parenthesis block
|
||||
)* # zero or more times
|
||||
\)/x; # Ending with ')'
|
||||
|
||||
|
||||
our $nestedMacro = qr /(\^ # Start with carat
|
||||
([^\^;()]+) # And one or more none-macro characters -tagged-
|
||||
((?: # Followed by
|
||||
|
|
@ -57,12 +64,6 @@ our $nestedMacro = qr /(\^ # Start with carat
|
|||
|
||||
|
||||
|
||||
$parenthesis = qr /\( # Start with '(',
|
||||
(?: # Followed by
|
||||
(?>[^()]+) # Non-parenthesis
|
||||
|(??{ $parenthesis }) # Or a balanced parenthesis block
|
||||
)* # zero or more times
|
||||
\)/x; # Ending with ')'
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,12 @@ use WebGUI::Session;
|
|||
sub process {
|
||||
my @param = WebGUI::Macro::getParams($_[0]);
|
||||
if (my $collateral = WebGUI::Collateral->find($param[0])) {
|
||||
return '<img src="'.$collateral->getURL.'" '.$collateral->get("parameters").' />';
|
||||
my $tag = '<img src="'.$collateral->getURL.'" '.$collateral->get("parameters");
|
||||
unless ($tag =~ /alt\=/i) {
|
||||
$tag .= ' alt="'.$collateral->get("name").'"';
|
||||
}
|
||||
$tag .= ' />';
|
||||
return $tag;
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ sub process {
|
|||
});
|
||||
$var{'account.create.url'} = WebGUI::URL::page('op=createAccount');
|
||||
$var{'account.create.label'} = WebGUI::International::get(407);
|
||||
$var{'form.footer'} = '</form>';
|
||||
$var{'form.footer'} = WebGUI::Form::formFooter();
|
||||
return WebGUI::Template::process($templateId,"Macro/L_loginBox",\%var);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -532,7 +532,7 @@ sub www_manageUsersInGroup {
|
|||
$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></form>';
|
||||
$output .= '</table>'.WebGUI::Form::formFooter();
|
||||
$output .= '<p><h1>'.WebGUI::International::get(976).'</h1>';
|
||||
$output .= WebGUI::Operation::User::getUserSearchForm("manageUsersInGroup",{gid=>$session{form}{gid}});
|
||||
my ($userCount) = WebGUI::SQL->quickArray("select count(*) from users");
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ sub www_editProfile {
|
|||
|
||||
$vars->{'profile.message'} = $_[0] if($_[0]);
|
||||
$vars->{'profile.form.header'} = "\n\n".WebGUI::Form::formHeader({});
|
||||
$vars->{'profile.form.footer'} = "</form>";
|
||||
$vars->{'profile.form.footer'} = WebGUI::Form::formFooter();
|
||||
|
||||
$vars->{'profile.form.hidden'} = WebGUI::Form::hidden({"name"=>"op","value"=>"editProfileSave"});
|
||||
$vars->{'profile.form.hidden'} .= WebGUI::Form::hidden({"name"=>"uid","value"=>$session{user}{userId}});
|
||||
|
|
|
|||
|
|
@ -65,7 +65,6 @@ sub www_editContentSettings {
|
|||
$f->hidden("op","saveSettings");
|
||||
$f->select("defaultPage",$pages,WebGUI::International::get(527),[$session{setting}{defaultPage}]);
|
||||
$f->select("notFoundPage",$pages,WebGUI::International::get(141),[$session{setting}{notFoundPage}]);
|
||||
$f->text("docTypeDec",WebGUI::International::get(398),$session{setting}{docTypeDec});
|
||||
$f->text(
|
||||
-name=>"favicon",
|
||||
-label=>WebGUI::International::get(897),
|
||||
|
|
|
|||
|
|
@ -438,7 +438,7 @@ sub www_editUserGroup {
|
|||
$output .= '<td class="tableData">'.$row->{groupName}.'</td>';
|
||||
$output .= '<td class="tableData">'.epochToHuman($row->{expireDate},"%z").'</td></tr>';
|
||||
}
|
||||
$output .= '</table></form>';
|
||||
$output .= '</table>'.WebGUI::Form::formFooter();
|
||||
$output .= '<p><h1>'.WebGUI::International::get(605).'</h1>';
|
||||
$output .= WebGUI::Operation::Group::getGroupSearchForm("editUserGroup",{uid=>$session{form}{uid}});
|
||||
my ($groupCount) = WebGUI::SQL->quickArray("select count(*) from users");
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ sub print {
|
|||
}
|
||||
$output .= '<div class="tabs">'.$tabs.$_[0]->{_submit}.'</div>';
|
||||
$output .= $form;
|
||||
$output .= '</form>';
|
||||
$output .= WebGUI::Form::formFooter();
|
||||
$output .= '<script>var numberOfTabs = '.($i-1).'; initTabs();</script>';
|
||||
return $output;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -359,7 +359,7 @@ sub getRecordTemplateVars {
|
|||
$var->{tab_loop} = \@tabs;
|
||||
$var->{"form.send"} = WebGUI::Form::submit({value=>WebGUI::International::get(73, $self->get("namespace"))});
|
||||
$var->{"form.save"} = WebGUI::Form::submit();
|
||||
$var->{"form.end"} = "</form>";
|
||||
$var->{"form.end"} = WebGUI::Form::formFooter();
|
||||
return $var;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -253,7 +253,7 @@ sub www_view {
|
|||
$var{"form.start"} .= WebGUI::Form::hidden({name=>'wid',value=>$_[0]->get("wobjectId")});
|
||||
$var{"form.start"} .= WebGUI::Form::hidden({name=>'func',value=>'vote'});
|
||||
$var{"form.submit"} = WebGUI::Form::submit({value=>WebGUI::International::get(11,$_[0]->get("namespace"))});
|
||||
$var{"form.end"} = "</form>";
|
||||
$var{"form.end"} = WebGUI::Form::formFooter();
|
||||
$totalResponses = 1 if ($totalResponses < 1);
|
||||
for (my $i=1; $i<=20; $i++) {
|
||||
if ($_[0]->get('a'.$i) =~ /\C/) {
|
||||
|
|
|
|||
|
|
@ -917,7 +917,7 @@ sub www_view {
|
|||
name=>'func',
|
||||
value=>'respond'
|
||||
});
|
||||
$var->{'form.footer'} = '</form>';
|
||||
$var->{'form.footer'} = WebGUI::Form::formFooter();
|
||||
$var->{'form.submit'} = WebGUI::Form::submit({
|
||||
value=>WebGUI::International::get(50,$self->get("namespace"))
|
||||
});
|
||||
|
|
|
|||
|
|
@ -564,7 +564,7 @@ sub www_editSubmission {
|
|||
value=>[$submission->{contentType}]
|
||||
});
|
||||
$var{'form.submit'} = WebGUI::Form::submit();
|
||||
$var{'form.footer'} = '</form>';
|
||||
$var{'form.footer'} = WebGUI::Form::formFooter();
|
||||
return $_[0]->processTemplate($_[0]->get("submissionFormTemplateId"),\%var,"USS/SubmissionForm");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue