Fixes from the 5.2.5 bugfix cycle.
This commit is contained in:
parent
6949f42a2c
commit
afbcfc7d56
17 changed files with 2422 additions and 36 deletions
|
|
@ -38,6 +38,7 @@ Contributing Translators.............AGOFER Ltda.
|
|||
Andreas Graf
|
||||
Emiliano Grilli / Webopen
|
||||
Ehab Heikal
|
||||
Markus Hynna
|
||||
Bart Jol / ProcoliX
|
||||
Mattias Kunkel / WERU AG
|
||||
Nils-Magne Kvammen
|
||||
|
|
@ -47,6 +48,7 @@ Contributing Translators.............AGOFER Ltda.
|
|||
orosor@yahoo.com.tw
|
||||
Paolo Pigati / Webopen
|
||||
Michael Ugilt
|
||||
Michael Westlund
|
||||
Zhou Xiaopeng
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,12 @@ upgrading from one version to the next, or even between multiple
|
|||
versions. Be sure to heed the warnings contained herein as they will
|
||||
save you many hours of grief.
|
||||
|
||||
|
||||
5.2.5
|
||||
--------------------------------------------------------------------
|
||||
* You'll need to upgrade HTML::Parser to at least version 3.27.
|
||||
|
||||
|
||||
5.2.0
|
||||
--------------------------------------------------------------------
|
||||
* You'll need to add a section to the style sheet of each one of
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ QnD INSTALL INSTRUCTIONS:
|
|||
DBD::mysql
|
||||
Digest::MD5
|
||||
Date::Calc
|
||||
HTML::Parser (3.27+)
|
||||
Image::Magick (optional)
|
||||
Cache::FileCache (optional)
|
||||
|
||||
|
|
|
|||
2367
docs/upgrades/upgrade_5.2.4-5.2.5.sql
Normal file
2367
docs/upgrades/upgrade_5.2.4-5.2.5.sql
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -261,7 +261,7 @@ sub getIcon {
|
|||
$icon .= "xls.gif";
|
||||
} elsif (isIn($extension, qw(zip arj cab))) {
|
||||
$icon .= "zip.gif";
|
||||
} elsif (isIn($extension, qw(mpeg mpg wav mp3 avi))) {
|
||||
} elsif (isIn($extension, qw(mpeg mpg wav mp3 avi m3u))) {
|
||||
$icon .= "wav.gif";
|
||||
} elsif (isIn($extension, qw(html htm xml))) {
|
||||
$icon .= "html.gif";
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ sub registrationFormSave {
|
|||
$ldap->bind;
|
||||
my $search = $ldap->search (base => $uri->dn, filter => $session{setting}{ldapId}."=".$session{form}{'authLDAP.ldapId'});
|
||||
if (defined $search->entry(0)) {
|
||||
$connectDN = "cn=".$search->entry(0)->get_value("cn");
|
||||
$connectDN = $search->entry(0)->get_value("cn");
|
||||
}
|
||||
$ldap->unbind;
|
||||
WebGUI::Authentication::saveParams($uid,'LDAP',
|
||||
|
|
@ -129,7 +129,7 @@ sub registrationFormValidate {
|
|||
if ($ldap->bind) {
|
||||
$search = $ldap->search (base=>$uri->dn,filter=>$session{setting}{ldapId}."=".$session{form}{'authLDAP.ldapId'});
|
||||
if (defined $search->entry(0)) {
|
||||
$connectDN = "cn=".$search->entry(0)->get_value("cn");
|
||||
$connectDN = $search->entry(0)->get_value("cn");
|
||||
$ldap->unbind;
|
||||
$ldap = Net::LDAP->new($uri->host, (port=>$uri->port)) or $error .= WebGUI::International::get(2,'Auth/LDAP');
|
||||
$auth = $ldap->bind(dn=>$connectDN, password=>$session{form}{'authLDAP.ldapPassword'});
|
||||
|
|
|
|||
|
|
@ -347,7 +347,7 @@ sub karmaThreshold {
|
|||
WebGUI::SQL->write("update groups set karmaThreshold=".quote($value).",
|
||||
lastUpdated=".time()." where groupId=$class->{_groupId}");
|
||||
}
|
||||
return $class->{_group}{"karamThreshold"};
|
||||
return $class->{_group}{"karmaThreshold"};
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -283,7 +283,7 @@ sub getUsersInGroup {
|
|||
if ($_[1]) {
|
||||
my $groups = getGroupsInGroup($_[0],1);
|
||||
if ($#$groups >= 0) {
|
||||
$clause = "groupId in (".join(",",@$groups).")";
|
||||
$clause .= " or groupId in (".join(",",@$groups).")";
|
||||
}
|
||||
}
|
||||
return WebGUI::SQL->buildArrayRef("select userId from groupings where $clause");
|
||||
|
|
|
|||
|
|
@ -20,8 +20,10 @@ sub process {
|
|||
my ($output, @data, $rownum, $temp);
|
||||
my ($statement, $format) = WebGUI::Macro::getParams(shift);
|
||||
$format = '^0;' if ($format eq "");
|
||||
my $result = eval {
|
||||
my $sth = WebGUI::SQL->new($statement,$session{dbh});
|
||||
my $sth = WebGUI::SQL->unconditionalRead($statement);
|
||||
unless ($sth->errorCode < 1) {
|
||||
return '<p><b>SQL Macro Failed:</b> '.$sth->errorMessage.'<p>';
|
||||
} else {
|
||||
while (@data = $sth->array) {
|
||||
$temp = $format;
|
||||
$temp =~ s/\^(\d+)\;/$data[$1]/g;
|
||||
|
|
@ -30,10 +32,6 @@ sub process {
|
|||
$output .= $temp;
|
||||
}
|
||||
$sth->finish;
|
||||
};
|
||||
if ($@) {
|
||||
return '<p><b>SQL Macro Failed:</b> '.$@.'<p>';
|
||||
} else {
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,6 +90,7 @@ sub _validateProfileData {
|
|||
while (%field = $a->hash) {
|
||||
if ($field{dataType} eq "date") {
|
||||
$data{$field{fieldName}} = WebGUI::DateTime::setToEpoch($session{form}{$field{fieldName}});
|
||||
$session{form}{$field{fieldName}} = $data{$field{fieldName}};
|
||||
} elsif (exists $session{form}{$field{fieldName}}) {
|
||||
$data{$field{fieldName}} = $session{form}{$field{fieldName}};
|
||||
}
|
||||
|
|
@ -582,6 +583,9 @@ sub www_viewProfile {
|
|||
} else {
|
||||
$value = $u->profileField($data{fieldName});
|
||||
}
|
||||
if ($data{dataType} eq "date") {
|
||||
$value = WebGUI::DateTime::epochToHuman($value,"%z");
|
||||
}
|
||||
unless ($data{fieldName} eq "email" and $u->profileField("publicEmail") < 1) {
|
||||
$output .= '<tr><td class="tableHeader">'.$label.'</td><td class="tableData">'.$value.'</td></tr>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -130,7 +130,11 @@ sub www_editGroup {
|
|||
-label=>WebGUI::International::get(863)
|
||||
);
|
||||
if ($session{setting}{useKarma}) {
|
||||
$f->integer("karmaThreshold",WebGUI::International::get(538),$g->karmaThreshold);
|
||||
$f->integer(
|
||||
-name=>"karmaThreshold",
|
||||
-label=>WebGUI::International::get(538),
|
||||
-value=>$g->karmaThreshold
|
||||
);
|
||||
}
|
||||
$f->textarea(
|
||||
-name=>"ipFilter",
|
||||
|
|
|
|||
|
|
@ -246,7 +246,6 @@ sub www_editPage {
|
|||
} else {
|
||||
%page = %{$session{page}};
|
||||
($childCount) = WebGUI::SQL->quickArray("select count(*) from page where parentId=$page{pageId}");
|
||||
$page{hideFromNavigation} = 0;
|
||||
}
|
||||
$page{endDate} = (addToDate(time(),10)) if ($page{endDate} < 0);
|
||||
$output = helpIcon(1);
|
||||
|
|
|
|||
|
|
@ -235,6 +235,14 @@ sub www_editProfileFieldSave {
|
|||
$session{form}{fieldLabel} = 'Unamed' if ($session{form}{fieldLabel} eq "" || $session{form}{fieldLabel} eq "''");
|
||||
$test = eval($session{form}{fieldLabel});
|
||||
$session{form}{fieldLabel} = "'".$session{form}{fieldLabel}."'" if ($test eq "");
|
||||
if ($session{form}{dataDefault} ne "") {
|
||||
unless ($session{form}{dataDefault} =~ /^\[/) {
|
||||
$session{form}{dataDefault} = "[".$session{form}{dataDefault};
|
||||
}
|
||||
unless ($session{form}{dataDefault} =~ /\]$/) {
|
||||
$session{form}{dataDefault} .= "]";
|
||||
}
|
||||
}
|
||||
if ($session{form}{new}) {
|
||||
($fieldName) = WebGUI::SQL->quickArray("select count(*) from userProfileField
|
||||
where fieldName=".quote($session{form}{fid}));
|
||||
|
|
|
|||
|
|
@ -114,19 +114,13 @@ A comparison expression to be used when checking whether the action should be al
|
|||
=cut
|
||||
|
||||
sub confirm {
|
||||
my ($output, $noURL);
|
||||
if ($_[4]) {
|
||||
return WebGUI::Privilege::vitalComponent();
|
||||
} elsif (WebGUI::Privilege::canEditPage()) {
|
||||
$noURL = $_[3] || WebGUI::URL::page();
|
||||
$output = '<h1>'.WebGUI::International::get(42).'</h1>';
|
||||
$output .= $_[1].'<p>';
|
||||
$output .= '<div align="center"><a href="'.$_[2].'">'.WebGUI::International::get(44).'</a>';
|
||||
$output .= ' <a href="'.$noURL.'">'.WebGUI::International::get(45).'</a></div>';
|
||||
return $output;
|
||||
} else {
|
||||
return WebGUI::Privilege::insufficient();
|
||||
}
|
||||
return WebGUI::Privilege::vitalComponent() if ($_[4]);
|
||||
my $noURL = $_[3] || WebGUI::URL::page();
|
||||
my $output = '<h1>'.WebGUI::International::get(42).'</h1>';
|
||||
$output .= $_[1].'<p>';
|
||||
$output .= '<div align="center"><a href="'.$_[2].'">'.WebGUI::International::get(44).'</a>';
|
||||
$output .= ' <a href="'.$noURL.'">'.WebGUI::International::get(45).'</a></div>';
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -189,6 +189,7 @@ sub www_addRelatedSave {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_deleteAccessory {
|
||||
return WebGUI::Privilege::insufficient() unless (WebGUI::Privilege::canEditPage());
|
||||
return $_[0]->confirm(
|
||||
WebGUI::International::get(2,$_[0]->get("namespace")),
|
||||
WebGUI::URL::page('func=deleteAccessoryConfirm&wid='.$_[0]->get("wobjectId").'&aid='.$session{form}{aid})
|
||||
|
|
@ -205,6 +206,7 @@ sub www_deleteAccessoryConfirm {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_deleteBenefit {
|
||||
return WebGUI::Privilege::insufficient() unless (WebGUI::Privilege::canEditPage());
|
||||
return $_[0]->confirm(
|
||||
WebGUI::International::get(48,$_[0]->get("namespace")),
|
||||
WebGUI::URL::page('func=deleteBenefitConfirm&wid='.$_[0]->get("wobjectId").'&bid='.$session{form}{bid})
|
||||
|
|
@ -221,6 +223,7 @@ sub www_deleteBenefitConfirm {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_deleteFeature {
|
||||
return WebGUI::Privilege::insufficient() unless (WebGUI::Privilege::canEditPage());
|
||||
return $_[0]->confirm(
|
||||
WebGUI::International::get(3,$_[0]->get("namespace")),
|
||||
WebGUI::URL::page('func=deleteFeatureConfirm&wid='.$_[0]->get("wobjectId").'&fid='.$session{form}{fid})
|
||||
|
|
@ -237,6 +240,7 @@ sub www_deleteFeatureConfirm {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_deleteRelated {
|
||||
return WebGUI::Privilege::insufficient() unless (WebGUI::Privilege::canEditPage());
|
||||
return $_[0]->confirm(
|
||||
WebGUI::International::get(4,$_[0]->get("namespace")),
|
||||
WebGUI::URL::page('func=deleteRelatedConfirm&wid='.$_[0]->get("wobjectId").'&rid='.$session{form}{rid})
|
||||
|
|
@ -253,6 +257,7 @@ sub www_deleteRelatedConfirm {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_deleteSpecification {
|
||||
return WebGUI::Privilege::insufficient() unless (WebGUI::Privilege::canEditPage());
|
||||
return $_[0]->confirm(
|
||||
WebGUI::International::get(5,$_[0]->get("namespace")),
|
||||
WebGUI::URL::page('func=deleteSpecificationConfirm&wid='.$_[0]->get("wobjectId").'&sid='.$session{form}{sid})
|
||||
|
|
|
|||
|
|
@ -86,16 +86,16 @@ sub www_view {
|
|||
unless (defined $rssFile) {
|
||||
$rssFile = $cache->setByHTTP($_[0]->get("rssUrl"),3600);
|
||||
}
|
||||
$rssFile =~ s#(<title>)(.*?)(</title>)#$1.encode_entities(decode_entities($2)).$3#ges;
|
||||
$rssFile =~ s#(<description>)(.*?)(</description>)#$1.encode_entities(decode_entities($2)).$3#ges;
|
||||
$rssFile =~ s#(<title>)(.*?)(</title>)#$1.encode_entities_numeric(decode_entities($2)).$3#ges;
|
||||
$rssFile =~ s#(<description>)(.*?)(</description>)#$1.encode_entities_numeric(decode_entities($2)).$3#ges;
|
||||
eval{parseRSS(\%rss, \$rssFile)};
|
||||
if ($@) {
|
||||
WebGUI::ErrorHandler::warn($_[0]->get("rssUrl")." ".$@);
|
||||
}
|
||||
my %var;
|
||||
$var{"channel.title"} = $rss{title};
|
||||
$var{"channel.link"} = $rss{link};
|
||||
$var{"channel.description"} = $rss{description};
|
||||
$var{"channel.title"} = $rss{title} || $rss{channel}{title};
|
||||
$var{"channel.link"} = $rss{link} || $rss{channel}{link};
|
||||
$var{"channel.description"} = $rss{description} || $rss{channel}{description};
|
||||
my @items;
|
||||
foreach my $item (@{$rss{item}}) {
|
||||
push (@items,{
|
||||
|
|
|
|||
|
|
@ -144,8 +144,7 @@ sub www_deleteFile {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_deleteSubmission {
|
||||
my ($owner);
|
||||
($owner) = WebGUI::SQL->quickArray("select userId from USS_submission where USS_submissionId=$session{form}{sid}");
|
||||
my ($owner) = WebGUI::SQL->quickArray("select userId from USS_submission where USS_submissionId=$session{form}{sid}");
|
||||
if ($owner == $session{user}{userId} || WebGUI::Privilege::isInGroup($_[0]->get("groupToApprove"))) {
|
||||
return $_[0]->confirm(WebGUI::International::get(17,$_[0]->get("namespace")),
|
||||
WebGUI::URL::page('func=deleteSubmissionConfirm&wid='.$session{form}{wid}.'&sid='.$session{form}{sid}));
|
||||
|
|
@ -156,11 +155,10 @@ sub www_deleteSubmission {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_deleteSubmissionConfirm {
|
||||
my ($output, $owner, $file);
|
||||
($owner) = WebGUI::SQL->quickArray("select userId from USS_submission where USS_submissionId=$session{form}{sid}");
|
||||
my ($owner) = WebGUI::SQL->quickArray("select userId from USS_submission where USS_submissionId=$session{form}{sid}");
|
||||
if ($owner == $session{user}{userId} || WebGUI::Privilege::isInGroup($_[0]->get("groupToApprove"))) {
|
||||
$_[0]->deleteCollateral("USS_submission","USS_submissionId",$session{form}{sid});
|
||||
$file = WebGUI::Attachment->new("",$session{form}{wid},$session{form}{sid});
|
||||
my $file = WebGUI::Attachment->new("",$session{form}{wid},$session{form}{sid});
|
||||
$file->deleteNode;
|
||||
return "";
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue