merging 6.5.6 bugfixes
This commit is contained in:
parent
cd83598f7c
commit
a58f2786f7
15 changed files with 207 additions and 88 deletions
|
|
@ -19,6 +19,39 @@
|
|||
- Fixed bugs in correctly setting default values in forms with anonymous arrays.
|
||||
|
||||
|
||||
6.5.6
|
||||
- Fixed a bunch of mostly cosmetic issues with the commerce system.
|
||||
- Fixed a bug in the navigation system that would cause it not to work in
|
||||
operations using the user style.
|
||||
- fix [ 1171109 ] crumbtrail showing
|
||||
- fix [ 1176383 ] Commerce for International customers
|
||||
- fix [ 1175400 ] Shortcut.pm - refers to WebGUI::metadata
|
||||
- fix [ 1172769 ] htmlform.pm template -> manage button
|
||||
- fix [ 1173970 ] Redirects in trash still function
|
||||
- fix [ 1173720 ] recursive encrypt content doesn't work
|
||||
- fix [ 1176573 ] runHourly.pl - DeleteExpiredEvents
|
||||
- fix [ 1175455 ] posts can be viewed by users who are not in groupIdView
|
||||
- fix [ 1182381 ] Package deployed to self infinitely recurses
|
||||
- fix [ 1177456 ] metadata fields do not show up in getEditForms for any
|
||||
asset
|
||||
- fix [ 1182302 ] getAssetAdderLinks gets prototypes that are deleted.
|
||||
- fix [ 1182285 ] "bold" when highlighted - really messy
|
||||
- fix [ 1177536 ] redundancy - thread.pm 6.5.5 line 559
|
||||
- fix [ 1177336 ] DatabaseLink::whatIsUsing is out of date
|
||||
- fix [ 1177450 ] Layout's view method does not exclude subclasses of Layouts
|
||||
- fix [ 1176724 ] edit existing database link - wrong username/password
|
||||
- fix [ 1176663 ] fixUrl needs to remove slashes from end of URLs
|
||||
- fix [ 1173560 ] copyList doesn't copyList
|
||||
- fix [ 1183014 ] deletion of post does not update lastPostId for CS
|
||||
- fix [ 1185507 ] gotcha.txt SetPerlVar , uploadAccessHandler wrong
|
||||
- fix [ 1185279 ] IE/SSL "Admin mode" prompts for download of port 80
|
||||
material
|
||||
- Fixed a bug in navigation where ancestors would become checked whenever
|
||||
self was also checked.
|
||||
- fix [ 1181266 ] Navigation - relative to root fails at third level
|
||||
- fix [ 1173779 ] editSave metadata property doesn't save type
|
||||
|
||||
|
||||
6.5.5
|
||||
- fix [ 1171569 ] add/edit sql report help link has wrong namespace
|
||||
- Fixed a bug in the collaboration system that caused replies to fail.
|
||||
|
|
|
|||
|
|
@ -35,6 +35,16 @@ save you many hours of grief.
|
|||
http://log4perl.sourceforge.net/releases/Log-Log4perl/docs/html/Log/Log4perl/Config.html
|
||||
|
||||
|
||||
6.5.6
|
||||
--------------------------------------------------------------------
|
||||
* The uploadsAccessHandler.perl script has specific issues with
|
||||
various versions of mod_perl and Perl CGI due to the many recent
|
||||
changes in mod_perl and Perl CGI. For this reason it may not work
|
||||
on your platform. We're working to make a script that will work
|
||||
everywhere. Until then, using the latest versions of mod_perl and
|
||||
Perl CGI should produce working results.
|
||||
|
||||
|
||||
6.5.0
|
||||
--------------------------------------------------------------------
|
||||
* The International Macro must be enabled in all WebGUI configuration
|
||||
|
|
@ -119,12 +129,12 @@ save you many hours of grief.
|
|||
before sending them to the browser. To enable this you must use
|
||||
these directives:
|
||||
|
||||
SetPerlVar WebguiRoot /data/WebGUI
|
||||
PerlRequire /data/WebGUI/sbin/uploadAccessHandler.perl
|
||||
PerlSetVar WebguiRoot /data/WebGUI
|
||||
PerlRequire /data/WebGUI/sbin/uploadsAccessHandler.perl
|
||||
|
||||
And then add this to each virtual host you wish to protect:
|
||||
|
||||
PerlSetEnv WebguiConfig www.example.com.conf
|
||||
PerlSetVar WebguiConfig www.example.com.conf
|
||||
<Location /uploads>
|
||||
PerlAccessHandler WebGUI::UploadsAccessHandler
|
||||
</Location>
|
||||
|
|
|
|||
4
docs/upgrades/upgrade_6.5.5-6.5.6.sql
Normal file
4
docs/upgrades/upgrade_6.5.5-6.5.6.sql
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
insert into webguiVersion values ('6.5.6','upgrade',unix_timestamp());
|
||||
alter table metaData_values drop primary key;
|
||||
alter table metaData_values add primary key (fieldId,assetId);
|
||||
|
||||
|
|
@ -419,6 +419,7 @@ The fieldId to be deleted.
|
|||
=cut
|
||||
|
||||
sub deleteMetaDataField {
|
||||
my $self = shift;
|
||||
my $fieldId = shift;
|
||||
WebGUI::SQL->beginTransaction;
|
||||
WebGUI::SQL->write("delete from metaData_properties where fieldId = ".quote($fieldId));
|
||||
|
|
@ -721,7 +722,7 @@ sub getAssetAdderLinks {
|
|||
} else {
|
||||
$constraint = quoteAndJoin($session{config}{assets});
|
||||
}
|
||||
my $sth = WebGUI::SQL->read("select className,assetId from asset where isPrototype=1 and className in ($constraint)");
|
||||
my $sth = WebGUI::SQL->read("select className,assetId from asset where isPrototype=1 and state='published' and className in ($constraint)");
|
||||
while (my ($class,$id) = $sth->array) {
|
||||
my $asset = WebGUI::Asset->newByDynamicClass($id,$class);
|
||||
my $url = $self->getUrl("func=add&class=".$class."&prototype=".$id);
|
||||
|
|
@ -1072,6 +1073,33 @@ sub getEditForm {
|
|||
-value=>$self->getValue("isPrototype"),
|
||||
-uiLevel=>9
|
||||
);
|
||||
if ($session{setting}{metaDataEnabled}) {
|
||||
my $meta = $self->getMetaDataFields();
|
||||
foreach my $field (keys %$meta) {
|
||||
my $fieldType = $meta->{$field}{fieldType} || "text";
|
||||
my $options;
|
||||
# Add a "Select..." option on top of a select list to prevent from
|
||||
# saving the value on top of the list when no choice is made.
|
||||
if($fieldType eq "selectList") {
|
||||
$options = {"", WebGUI::International::get("Select...","Asset")};
|
||||
}
|
||||
$tabform->getTab("meta")->dynamicField($fieldType,
|
||||
-name=>"metadata_".$meta->{$field}{fieldId},
|
||||
-label=>$meta->{$field}{fieldName},
|
||||
-uiLevel=>5,
|
||||
-value=>$meta->{$field}{value},
|
||||
-extras=>qq/title="$meta->{$field}{description}"/,
|
||||
-possibleValues=>$meta->{$field}{possibleValues},
|
||||
-options=>$options
|
||||
);
|
||||
}
|
||||
# Add a quick link to add field
|
||||
$tabform->getTab("meta")->readOnly(
|
||||
-value=>'<p><a href="'.WebGUI::URL::page("func=editMetaDataField&fid=new").'">'.
|
||||
WebGUI::International::get('Add new field','Asset').
|
||||
'</a></p>'
|
||||
);
|
||||
}
|
||||
return $tabform;
|
||||
}
|
||||
|
||||
|
|
@ -1287,7 +1315,7 @@ sub getLineage {
|
|||
if (exists $rules->{excludeClasses}) { # deal with exclusions
|
||||
my @set;
|
||||
foreach my $className (@{$rules->{excludeClasses}}) {
|
||||
push(@set,"asset.className <> ".quote($className));
|
||||
push(@set,"asset.className not like ".quote($className.'%'));
|
||||
}
|
||||
$where .= ' and ('.join(" and ",@set).')';
|
||||
}
|
||||
|
|
@ -2352,7 +2380,7 @@ sub www_copy {
|
|||
|
||||
Copies to clipboard assets in a list, then returns self calling method www_manageAssets(), if canEdit. Otherwise returns AdminConsole rendered insufficient privilege.
|
||||
|
||||
cut
|
||||
=cut
|
||||
|
||||
sub www_copyList {
|
||||
my $self = shift;
|
||||
|
|
@ -2478,7 +2506,6 @@ Deletes a MetaDataField and returns www_manageMetaData on self, if user isInGrou
|
|||
|
||||
sub www_deleteMetaDataField {
|
||||
my $self = shift;
|
||||
my $ac = WebGUI::AdminConsole->new("content profiling");
|
||||
return WebGUI::Privilege::insufficient() unless (WebGUI::Grouping::isInGroup(4));
|
||||
$self->deleteMetaDataField($session{form}{fid});
|
||||
return $self->www_manageMetaData;
|
||||
|
|
@ -2513,7 +2540,8 @@ sub www_deployPackage {
|
|||
my $packageMasterAssetId = $session{form}{assetId};
|
||||
if (defined $packageMasterAssetId) {
|
||||
my $packageMasterAsset = WebGUI::Asset->newByDynamicClass($packageMasterAssetId);
|
||||
if (defined $packageMasterAsset && $packageMasterAsset->canView) {
|
||||
my $masterLineage = $packageMasterAsset->get("lineage");
|
||||
if (defined $packageMasterAsset && $packageMasterAsset->canView && $self->get("lineage") !~ /^$masterLineage/) {
|
||||
my $deployedTreeMaster = $self->duplicateTree($packageMasterAsset);
|
||||
$deployedTreeMaster->update({isPackage=>0});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,15 +59,16 @@ Returns a boolean indicating whether the user can view the current post.
|
|||
|
||||
sub canView {
|
||||
my $self = shift;
|
||||
if ($self->get("status") eq "approved" || $self->get("status") eq "archived") {
|
||||
return 1;
|
||||
} elsif ($self->get("status") eq "denied" && $self->canEdit) {
|
||||
return 1;
|
||||
} else {
|
||||
return $self->SUPER::canView;
|
||||
}
|
||||
if (($self->get("status") eq "approved" || $self->get("status") eq "archived") && $self->getThread->getParent->canView) {
|
||||
return 1;
|
||||
} elsif ($self->get("status") eq "denied" && $self->canEdit) {
|
||||
return 1;
|
||||
} else {
|
||||
$self->getThread->getParent->canEdit;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 chopTitle ( )
|
||||
|
|
@ -429,7 +430,6 @@ sub getTemplateVars {
|
|||
});
|
||||
}
|
||||
}
|
||||
$self->getThread->getParent->appendTemplateLabels(\%var);
|
||||
return \%var;
|
||||
}
|
||||
|
||||
|
|
@ -608,6 +608,7 @@ sub notifySubscribers {
|
|||
my $u = WebGUI::User->new($userId);
|
||||
if ($lang{$u->profileField("language")}{message} eq "") {
|
||||
$lang{$u->profileField("language")}{var} = $self->getTemplateVars($lang{$u->profileField("language")}{var});
|
||||
$self->getThread->getParent->appendTemplateLabels($lang{$u->profileField("language")}{var});
|
||||
$lang{$u->profileField("language")}{var}{url} = WebGUI::URL::getSiteURL().$self->getUrl;
|
||||
$lang{$u->profileField("language")}{var}{'notify.subscription.message'} =
|
||||
WebGUI::International::get(875,"Asset_Post",$u->profileField("language"));
|
||||
|
|
@ -708,6 +709,30 @@ sub rate {
|
|||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 setLastPost ( id, date )
|
||||
|
||||
Sets the last reply of this thread.
|
||||
|
||||
=head3 id
|
||||
|
||||
The assetId of the most recent post.
|
||||
|
||||
=head3 date
|
||||
|
||||
The date of the most recent post.
|
||||
|
||||
=cut
|
||||
|
||||
sub setLastPost {
|
||||
my $self = shift;
|
||||
my $id = shift;
|
||||
my $date = shift;
|
||||
$self->update(lastPostId=>$id, lastPostDate=>$date);
|
||||
$self->getParent->setLastPost($id,$date);
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
|
|
@ -778,6 +803,25 @@ sub setStatusPending {
|
|||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 trash
|
||||
|
||||
Moves post to the trash and decrements reply counter on thread.
|
||||
|
||||
=cut
|
||||
|
||||
sub trash {
|
||||
my $self = shift;
|
||||
$self->SUPER::trash;
|
||||
$self->getThread->decrementReplies if ($self->isReply);
|
||||
if ($self->getThread->get("lastPostId") eq $self->getId) {
|
||||
my $threadLineage = $self->getThread->get("lineage");
|
||||
my ($id, $date) = WebGUI::SQL->quickArray("select assetId, dateSubmitted from Post where lineage like ".quote($threadLineage.'%')." and assetId<>".quote($self->getId)." order by dateSubmitted desc");
|
||||
$self->getThread->setLastPost($id,$date);
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 unmarkRead ( )
|
||||
|
|
|
|||
|
|
@ -509,6 +509,27 @@ sub subscribe {
|
|||
WebGUI::Grouping::addUsersToGroups([$session{user}{userId}],[$self->get("subscriptionGroupId")]);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 trash
|
||||
|
||||
Moves thread to the trash and decrements reply counter on thread.
|
||||
|
||||
=cut
|
||||
|
||||
sub trash {
|
||||
my $self = shift;
|
||||
$self->SUPER::trash;
|
||||
$self->getParent->decrementThreads;
|
||||
if ($self->getParent->get("lastPostId") eq $self->getId) {
|
||||
my $parentLineage = $self->getThread->get("lineage");
|
||||
my ($id, $date) = WebGUI::SQL->quickArray("select assetId, dateSubmitted from Post where lineage like ".quote($parentLineage.'%')." and assetId<>".quote($self->getId)." order by dateSubmitted desc");
|
||||
$self->getParent->setLastPost($id,$date);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 unlock ( )
|
||||
|
|
|
|||
|
|
@ -755,6 +755,29 @@ sub recalculateRating {
|
|||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 setLastPost ( id, date )
|
||||
|
||||
Sets the most recent post in this collaboration system.
|
||||
|
||||
=head3 id
|
||||
|
||||
The assetId of the most recent post.
|
||||
|
||||
=head3 date
|
||||
|
||||
The date of the most recent post.
|
||||
|
||||
=cut
|
||||
|
||||
sub setLastPost {
|
||||
my $self = shift;
|
||||
my $id = shift;
|
||||
my $date = shift;
|
||||
$self->update(lastPostId=>$id, lastPostDate=>$date);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 subscribe ( )
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ sub view {
|
|||
WebGUI::Style::setLink($session{config}{extrasURL}."/draggable.css",{ type=>"text/css", rel=>"stylesheet", media=>"all" });
|
||||
$vars{"dragger.icon"} = WebGUI::Icon::dragIcon();
|
||||
$vars{"dragger.init"} = '
|
||||
<iframe id="dragSubmitter" style="display: none;"></iframe>
|
||||
<iframe id="dragSubmitter" style="display: none;" src="'.$session{config}{extrasURL}.'/spacer.gif"></iframe>
|
||||
<script>
|
||||
dragable_init("'.$self->getUrl("func=setContentPositions&map=").'");
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ sub getEditForm {
|
|||
name=>"returnUrl",
|
||||
value=>$session{form}{returnUrl}
|
||||
});
|
||||
my ($descendantsChecked, $selfChecked, $pedigreeChecked, $siblingsChecked);
|
||||
my ($descendantsChecked, $ancestorsChecked, $selfChecked, $pedigreeChecked, $siblingsChecked);
|
||||
my @assetsToInclude = split("\n",$self->getValue("assetsToInclude"));
|
||||
my $afterScript;
|
||||
foreach my $item (@assetsToInclude) {
|
||||
|
|
@ -94,6 +94,8 @@ sub getEditForm {
|
|||
} elsif ($item eq "descendants") {
|
||||
$descendantsChecked = 1;
|
||||
$afterScript = "displayNavEndPoint = false;";
|
||||
} elsif ($item eq "ancestors") {
|
||||
$ancestorsChecked = 1;
|
||||
} elsif ($item eq "siblings") {
|
||||
$siblingsChecked = 1;
|
||||
} elsif ($item eq "pedigree") {
|
||||
|
|
@ -118,7 +120,7 @@ sub getEditForm {
|
|||
$tabform->getTab("properties")->readOnly(
|
||||
-label=>"Relatives to Include",
|
||||
-value=>WebGUI::Form::checkbox({
|
||||
checked=>$selfChecked,
|
||||
checked=>$ancestorsChecked,
|
||||
name=>"assetsToInclude",
|
||||
value=>"ancestors"
|
||||
}).'Ancestors<br />'
|
||||
|
|
@ -265,16 +267,16 @@ sub view {
|
|||
if ($self->get("startType") eq "specificUrl") {
|
||||
$start = WebGUI::Asset->newByUrl($self->get("startPoint"));
|
||||
} elsif ($self->get("startType") eq "relativeToRoot") {
|
||||
unless (($self->get("startPoint")+1) >= $self->getLineageLength) {
|
||||
$start = WebGUI::Asset->newByLineage(substr($session{asset}->get("lineage"),0, ($self->get("startPoint") + 1) * 6));
|
||||
unless (($self->get("startPoint")+1) >= $current->getLineageLength) {
|
||||
$start = WebGUI::Asset->newByLineage(substr($current->get("lineage"),0, ($self->get("startPoint") + 1) * 6));
|
||||
}
|
||||
} elsif ($self->get("startType") eq "relativeToCurrentUrl") {
|
||||
if ($self->get("startPoint") < 0) {
|
||||
$start = WebGUI::Asset->newByLineage(substr($session{asset}->get("lineage"),0,
|
||||
($session{asset}->getLineageLength - $self->get("startPoint") + 1) * 6
|
||||
$start = WebGUI::Asset->newByLineage(substr($current->get("lineage"),0,
|
||||
($current->getLineageLength - $self->get("startPoint") + 1) * 6
|
||||
));
|
||||
} elsif ($self->get("startPoint") > 0) {
|
||||
my $lineage = $session{asset}->getLineage;
|
||||
my $lineage = $current->getLineage;
|
||||
for (1..$self->get("startPoint")) {
|
||||
$lineage .= $self->formatRank(1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ This package contains utility methods for WebGUI's database link system.
|
|||
use WebGUI::DatabaseLink;
|
||||
$hashRef = WebGUI::DatabaseLink::getList();
|
||||
%databaseLink = WebGUI::DatabaseLink::get($databaseLinkId);
|
||||
%using = WebGUI::Databaselink::whatIsUsing($databaseLinkId);
|
||||
|
||||
$dbLink = WebGUI::DatabaseLink->new($databaseLinkId);
|
||||
$dbh = $dbLink->dbh;
|
||||
|
|
@ -75,41 +74,6 @@ sub get {
|
|||
return WebGUI::SQL->quickHash("select * from databaseLink where databaseLinkId=".quote($_[0]));
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
=head2 whatIsUsing ( databaseLinkId )
|
||||
|
||||
Returns an array of hashrefs containing items which use a database link. This method will
|
||||
need to be updated any time a new item starts using Database Links.
|
||||
|
||||
=head3 databaseLinkId
|
||||
|
||||
A valid databaseLinkId
|
||||
|
||||
=cut
|
||||
|
||||
sub whatIsUsing {
|
||||
# get list of SQLReports
|
||||
my $sql = 'select wobject.wobjectId, wobject.title, page.menuTitle, page.urlizedTitle from wobject, SQLReport, page '.
|
||||
'where SQLReport.databaseLinkId = '.quote($_[0]).' and SQLReport.wobjectId = wobject.wobjectId '.
|
||||
'and wobject.pageId = page.pageId';
|
||||
my $sth = WebGUI::SQL->read($sql);
|
||||
my @using;
|
||||
while (my $data = $sth->hashRef()) {
|
||||
push @using, $data;
|
||||
}
|
||||
$sth->finish;
|
||||
|
||||
# get list of groups
|
||||
$sql = 'select groupId, groupName from groups where databaseLinkId = '.quote($_[0]);
|
||||
$sth = WebGUI::SQL->read($sql);
|
||||
while (my $data = $sth->hashRef()) {
|
||||
push @using, $data;
|
||||
}
|
||||
$sth->finish;
|
||||
|
||||
return @using;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
=head2 disconnect ( )
|
||||
|
||||
|
|
|
|||
|
|
@ -60,14 +60,6 @@ sub www_deleteDatabaseLink {
|
|||
return WebGUI::Privilege::insufficient unless (WebGUI::Grouping::isInGroup(3));
|
||||
my ($output);
|
||||
$output .= WebGUI::International::get(988).'<p>';
|
||||
foreach my $using (WebGUI::DatabaseLink::whatIsUsing($session{form}{dlid})) {
|
||||
if ($using->{title}) {
|
||||
$output .= '<li>'.WebGUI::International::get(1,'SQLReport').' <a href="'.WebGUI::URL::page('func=edit&wid='.$using->{wobjectId},$using->{urlizedTitle}).'">'
|
||||
.$using->{title}.'</a> '.WebGUI::International::get(989).' <a href="'.WebGUI::URL::gateway($using->{urlizedTitle}).'">'.$using->{menuTitle}.'</a>.</li>';
|
||||
} else {
|
||||
$output .= '<li>'.'Group'.' <a href="'.WebGUI::URL::page('op=editGroup&gid='.$using->{groupId}).'">'.$using->{groupName}.'</a>.</li>';
|
||||
}
|
||||
}
|
||||
$output .= '<p><div align="center"><a href="'.
|
||||
WebGUI::URL::page('op=deleteDatabaseLinkConfirm&dlid='.$session{form}{dlid})
|
||||
.'">'.WebGUI::International::get(44).'</a>';
|
||||
|
|
@ -93,7 +85,9 @@ sub www_editDatabaseLink {
|
|||
} else {
|
||||
%db = WebGUI::SQL->quickHash("select * from databaseLink where databaseLinkId=".quote($session{form}{dlid}));
|
||||
}
|
||||
$f = WebGUI::HTMLForm->new;
|
||||
$f = WebGUI::HTMLForm->new(
|
||||
-extras=>'autocomplete="off"'
|
||||
);
|
||||
$f->hidden("op","editDatabaseLinkSave");
|
||||
$f->hidden("dlid",$session{form}{dlid});
|
||||
$f->readOnly($session{form}{dlid},WebGUI::International::get(991));
|
||||
|
|
|
|||
|
|
@ -12,11 +12,11 @@ sub makeUrlCompliant {
|
|||
my $value = shift;
|
||||
$value =~ s/\s+$//; #removes trailing whitespace
|
||||
$value =~ s/^\s+//; #removes leading whitespace
|
||||
$value =~ s/^\\//; #removes leading slash
|
||||
$value =~ s/ /-/g; #replaces whitespace with hyphens
|
||||
$value =~ s/\.$//; #removes trailing period
|
||||
$value =~ s/[^A-Za-z0-9\-\.\_\/]//g; #removes all funky characters
|
||||
$value =~ s/^\///; #removes a preceeding /
|
||||
$value =~ s/^\///; #removes a leading /
|
||||
$value =~ s/\/$//; #removes a trailing /
|
||||
$value =~ s/\/\//\//g; #removes double /
|
||||
return $value;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1945,8 +1945,8 @@ You also cannot import a theme from a version of WebGUI that is newer than the o
|
|||
},
|
||||
|
||||
'988' => {
|
||||
message => q|Are you certain you wish to delete this database link? The following items are using this link and will no longer work if you delete it:|,
|
||||
lastUpdated => 1056151382
|
||||
message => q|Are you certain you wish to delete this database link?|,
|
||||
lastUpdated => 1116151382
|
||||
},
|
||||
|
||||
'35' => {
|
||||
|
|
@ -3289,11 +3289,6 @@ You can search users based on username and email address. You can do partial sea
|
|||
lastUpdated => 1052850265
|
||||
},
|
||||
|
||||
'989' => {
|
||||
message => q|on page|,
|
||||
lastUpdated => 1056151382
|
||||
},
|
||||
|
||||
'1071' => {
|
||||
message => q|Env HTTP Host|,
|
||||
lastUpdated => 1066641511
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ package WebGUI::UploadsAccessHandler;
|
|||
our $webguiRoot;
|
||||
|
||||
BEGIN {
|
||||
use Apache;
|
||||
use Apache::ServerUtil;
|
||||
my $s = Apache->server;
|
||||
$webguiRoot = $s->dir_config('WebguiRoot');
|
||||
unshift (@INC, $webguiRoot."/lib");
|
||||
|
|
@ -21,15 +21,15 @@ BEGIN {
|
|||
|
||||
print "Starting WebGUI Uploads Access Handler\n";
|
||||
|
||||
use Apache::RequestUtil;
|
||||
use strict;
|
||||
use Apache::Constants qw(:common);
|
||||
use CGI::Util qw/escape/;
|
||||
use WebGUI::Grouping;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::URL;
|
||||
|
||||
sub handler {
|
||||
my $r = shift;
|
||||
my $r = Apache->request;
|
||||
if (-e $r->filename) {
|
||||
my $path = $r->filename;
|
||||
$path =~ s/^(\/.*\/).*$/$1/;
|
||||
|
|
@ -43,18 +43,18 @@ sub handler {
|
|||
my @privs = split("\n",$fileContents);
|
||||
unless ($privs[1] eq "7" || $privs[1] eq "1") {
|
||||
WebGUI::Session::open($webguiRoot, $r->dir_config('WebguiConfig'));
|
||||
my $cookie = $r->header_in('Cookie');
|
||||
my $cookie = $r->headers_in->{Cookie} || '';
|
||||
$cookie =~ s/wgSession\=(.*)/$1/;
|
||||
$cookie = WebGUI::URL::unescape($cookie);
|
||||
WebGUI::Session::refreshSessionVars($cookie);
|
||||
return OK if ($session{user}{userId} eq $privs[0] || WebGUI::Grouping::isInGroup($privs[1]) || WebGUI::Grouping::isInGroup($privs[2]));
|
||||
return Apache::OK if ($session{user}{userId} eq $privs[0] || WebGUI::Grouping::isInGroup($privs[1]) || WebGUI::Grouping::isInGroup($privs[2]));
|
||||
WebGUI::Session::close();
|
||||
return 401;
|
||||
}
|
||||
}
|
||||
return OK;
|
||||
return Apache::OK;
|
||||
} else {
|
||||
return NOT_FOUND;
|
||||
return Apache::NOT_FOUND;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -118,12 +118,11 @@
|
|||
}
|
||||
|
||||
.am-grid-row {
|
||||
color: #000;
|
||||
color: #000000;
|
||||
}
|
||||
.am-grid-row-over {
|
||||
background-color: #C0D2DA;
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.am-grid-col-0 {
|
||||
|
|
@ -161,6 +160,7 @@
|
|||
color: #3E697E;
|
||||
font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, Arial, sans-serif;
|
||||
cursor: pointer;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.am-crumbtrail-over {
|
||||
|
|
@ -168,6 +168,7 @@
|
|||
font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, Arial, sans-serif;
|
||||
cursor: pointer;
|
||||
text-decoration: underline;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.contextMenu{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue