bunch of bug fixes
This commit is contained in:
parent
c7b19a74bb
commit
01c0802c22
11 changed files with 40 additions and 25 deletions
|
|
@ -2,6 +2,17 @@
|
|||
- fix [ 1160953 ] JavaScript Errors in admin console - IE
|
||||
- Fixed a drag and drop problem.
|
||||
- fix [ 1168195 ] Asset manager: Space between Size and unit
|
||||
- Fixed a bug where sticky threads were not acting sticky in the CS.
|
||||
- fix [ 1169116 ] AdminToggle macro doesn't display correct linktext
|
||||
- fix [ 1168189 ] Asset Manager: Double Title entries
|
||||
- fix [ 1168181 ] Edit in Asset manager -> wrong folder
|
||||
- fix [ 1167971 ] attachment loop code for Asset::Post::getTemplateVariables
|
||||
- fix [ 1168867 ] WebGUI Script XHTML 1.0 Non-Compliant
|
||||
- Fixed a fatal crash bug caused by calling the old authentication urls.
|
||||
- fix [ 1168318 ] Rating often not working
|
||||
- fix [ 1167937 ] Asset Manager and No-Cache Imcompatible
|
||||
- fix [ 1167917 ] Link to Page Tree and No-Cache Imcompatible
|
||||
- fix [ 1168084 ] file uploads don't work.
|
||||
|
||||
|
||||
6.5.3
|
||||
|
|
|
|||
|
|
@ -2315,6 +2315,7 @@ sub www_copy {
|
|||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
my $newAsset = $self->duplicate;
|
||||
$newAsset->update({ title=>$newAsset->get("title").' (copy)'});
|
||||
$newAsset->cut;
|
||||
return $self->getContainer->www_view;
|
||||
}
|
||||
|
|
@ -2334,6 +2335,7 @@ sub www_copyList {
|
|||
my $asset = WebGUI::Asset->newByDynamicClass($assetId);
|
||||
if ($asset->canEdit) {
|
||||
my $newAsset = $asset->duplicate;
|
||||
$newAsset->update({ title=>$newAsset->get("title").' (copy)'});
|
||||
$newAsset->cut;
|
||||
}
|
||||
}
|
||||
|
|
@ -2529,12 +2531,16 @@ sub www_editSave {
|
|||
}
|
||||
$object->processPropertiesFromFormPost;
|
||||
$object->updateHistory("edited");
|
||||
return $self->www_manageAssets if ($session{form}{proceed} eq "manageAssets" && $session{form}{assetId} eq "new");
|
||||
if ($session{form}{proceed} eq "manageAssets") {
|
||||
$session{asset} = $object->getParent;
|
||||
return $object->getParent->www_manageAssets;
|
||||
}
|
||||
if ($session{form}{proceed} ne "") {
|
||||
my $method = "www_".$session{form}{proceed};
|
||||
$session{asset} = $object;
|
||||
return $object->$method();
|
||||
}
|
||||
$session{asset} = $object->getContainer;
|
||||
return $self->getContainer->www_view;
|
||||
}
|
||||
|
||||
|
|
@ -3035,7 +3041,7 @@ Main page to manage assets. Renders an AdminConsole with a list of assets. If ca
|
|||
sub www_manageAssets {
|
||||
my $self = shift;
|
||||
return WebGUI::Privilege::insufficient() unless $self->canEdit;
|
||||
my $children = $self->getLineage(["children"],{returnQuickReadObjects=>1});
|
||||
my $children = $self->getLineage(["children"],{returnObjects=>1});
|
||||
my $output = $self->getAssetManagerControl($children);
|
||||
$output .= ' <div class="adminConsoleSpacer">
|
||||
|
||||
|
|
|
|||
|
|
@ -194,14 +194,13 @@ sub getStorageLocation {
|
|||
sub processPropertiesFromFormPost {
|
||||
my $self = shift;
|
||||
$self->SUPER::processPropertiesFromFormPost;
|
||||
my $storage = $self->getStorageLocation->create;
|
||||
# might have to create a new storage location for versioning
|
||||
my $storage = ($self->get("storageId") eq "") ? $self->getStorageLocation : $self->getStorageLocation->create;
|
||||
my $filename = $storage->addFileFromFormPost("file");
|
||||
if (defined $filename) {
|
||||
my $oldVersions;
|
||||
my $oldVersions = $self->get("olderVersions");
|
||||
if ($self->get("filename")) { # do file versioning
|
||||
my @old = split("\n",$self->get("olderVersions"));
|
||||
push(@old,$self->get("storageId")."|".$self->get("filename"));
|
||||
$oldVersions = join("\n",@old);
|
||||
$oldVersions .= "\n".$self->get("storageId")."|".$self->get("filename");
|
||||
}
|
||||
my %data;
|
||||
$data{filename} = $filename;
|
||||
|
|
|
|||
|
|
@ -418,6 +418,7 @@ sub getTemplateVars {
|
|||
$var{"attachment.url"} = $storage->getUrl($filename);
|
||||
$var{"attachment.icon"} = $storage->getFileIconUrl($filename);
|
||||
$var{"attachment.name"} = $filename;
|
||||
$gotAttachment = 1;
|
||||
}
|
||||
push(@{$var{"attachment_loop"}}, {
|
||||
url=>$storage->getUrl($filename),
|
||||
|
|
@ -691,11 +692,11 @@ An integer between 1 and 5 (5 being best) to rate this post with.
|
|||
|
||||
sub rate {
|
||||
my $self = shift;
|
||||
my $rating = shift;
|
||||
my $rating = shift || 3;
|
||||
unless ($self->hasRated) {
|
||||
WebGUI::SQL->write("insert into Post_rating (assetId,userId,ipAddress,dateOfRating,rating) values ("
|
||||
.quote($self->getId).", ".quote($session{user}{userId}).", ".quote($session{env}{REMOTE_ADDR}).",
|
||||
".WebGUI::DateTime::time().", $rating)");
|
||||
".WebGUI::DateTime::time().", ".quote($rating).")");
|
||||
my ($count) = WebGUI::SQL->quickArray("select count(*) from Post_rating where assetId=".quote($self->getId));
|
||||
$count = $count || 1;
|
||||
my ($sum) = WebGUI::SQL->quickArray("select sum(rating) from Post_rating where assetId=".quote($self->getId));
|
||||
|
|
|
|||
|
|
@ -854,7 +854,7 @@ sub view {
|
|||
left join asset on Thread.assetId=asset.assetId
|
||||
left join Post on Post.assetId=asset.assetId
|
||||
where asset.parentId=".quote($self->getId)." and asset.state='published' and asset.className='WebGUI::Asset::Post::Thread' and $constraints
|
||||
order by ".$sortBy." ".$sortOrder;
|
||||
order by Thread.isLocked desc, ".$sortBy." ".$sortOrder;
|
||||
my $p = WebGUI::Paginator->new($self->getUrl,$self->get("threadsPerPage"));
|
||||
$self->appendPostListTemplateVars(\%var, $sql, $p);
|
||||
$self->appendTemplateLabels(\%var);
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ sub process {
|
|||
if (WebGUI::Grouping::isInGroup(12)) {
|
||||
my %var;
|
||||
my ($turnOn,$turnOff,$templateName) = WebGUI::Macro::getParams($_[0]);
|
||||
$turnOn |= WebGUI::International::get(516);
|
||||
$turnOff |= WebGUI::International::get(517);
|
||||
$turnOn ||= WebGUI::International::get(516);
|
||||
$turnOff ||= WebGUI::International::get(517);
|
||||
if (WebGUI::Session::isAdminOn()) {
|
||||
$var{'toggle.url'} = WebGUI::URL::page('op=switchOffAdmin');
|
||||
$var{'toggle.text'} = $turnOff;
|
||||
|
|
|
|||
|
|
@ -81,13 +81,6 @@ sub getOperations {
|
|||
'switchOffAdmin' => 'WebGUI::Operation::Admin',
|
||||
'switchOnAdmin' => 'WebGUI::Operation::Admin',
|
||||
'auth' => 'WebGUI::Operation::Auth',
|
||||
'displayLogin' => 'WebGUI::Operation::Auth',
|
||||
'login' => 'WebGUI::Operation::Auth',
|
||||
'displayAccount' => 'WebGUI::Operation::Auth',
|
||||
'createAccount' => 'WebGUI::Operation::Auth',
|
||||
'deactivateAccount' => 'WebGUI::Operation::Auth',
|
||||
'logout' => 'WebGUI::Operation::Auth',
|
||||
'recoverPassword' => 'WebGUI::Operation::Auth',
|
||||
'init' => 'WebGUI::Operation::Auth',
|
||||
'copyDatabaseLink' => 'WebGUI::Operation::DatabaseLink',
|
||||
'deleteDatabaseLink' => 'WebGUI::Operation::DatabaseLink',
|
||||
|
|
|
|||
|
|
@ -169,7 +169,7 @@ sub getSizeInPixels {
|
|||
my $image = Image::Magick->new;
|
||||
my $error = $image->Read($self->getPath($filename));
|
||||
if ($error) {
|
||||
WebGUI::ErrorHandler::warn("Couldn't read image for resizing: ".$error);
|
||||
WebGUI::ErrorHandler::warn("Couldn't read image to check the size of it: ".$error);
|
||||
return 0;
|
||||
}
|
||||
return $image->Get('width','height');
|
||||
|
|
|
|||
|
|
@ -119,11 +119,11 @@ sub process {
|
|||
$var{'head.tags'} = '
|
||||
<meta name="generator" content="WebGUI '.$WebGUI::VERSION.'" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<script>
|
||||
<script type="text/javascript">
|
||||
function getWebguiProperty (propName) {
|
||||
var props = new Array();
|
||||
props["extrasURL"] = "'.$session{config}{extrasURL}.'";
|
||||
props["pageURL"] = "'.WebGUI::URL::page().'";
|
||||
props["pageURL"] = "'.WebGUI::URL::page(undef, undef, 1).'";
|
||||
return props[propName];
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -234,7 +234,7 @@ sub makeCompliant {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 page ( [ pairs, useSiteUrl ] )
|
||||
=head2 page ( [ pairs, useSiteUrl, skipPreventProxyCache ] )
|
||||
|
||||
Returns the URL of the current page.
|
||||
|
||||
|
|
@ -248,11 +248,16 @@ Name value pairs to add to the URL in the form of:
|
|||
|
||||
If set to "1" we'll use the full site URL rather than the script (gateway) URL.
|
||||
|
||||
=head3 skipPreventProxyCache
|
||||
|
||||
If set to "1" we'll skip adding the prevent proxy cache code to the url.
|
||||
|
||||
=cut
|
||||
|
||||
sub page {
|
||||
my $pairs = shift;
|
||||
my $useFullUrl = shift;
|
||||
my $skipPreventProxyCache = shift;
|
||||
my $url;
|
||||
if ($useFullUrl) {
|
||||
$url = getSiteURL();
|
||||
|
|
@ -261,7 +266,7 @@ sub page {
|
|||
my $pathinfo = $session{env}{PATH_INFO};
|
||||
$pathinfo =~ s/^\/(.*)/$1/;
|
||||
$url .= $pathinfo;
|
||||
if ($session{setting}{preventProxyCache} == 1) {
|
||||
if ($session{setting}{preventProxyCache} == 1 && !$skipPreventProxyCache) {
|
||||
$url = append($url,"noCache=".randint(0,1000).';'.time());
|
||||
}
|
||||
if ($pairs) {
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ this.getWrappedURL = function() {
|
|||
if (this.url.indexOf("?") == -1) {
|
||||
return "http://" + AssetManager_getManager().tools.getHostName(location.href) + this.url + "?";
|
||||
}else {
|
||||
return "http://" + AssetManager_getManager().tools.getHostName(location.href) + url + "&";
|
||||
return "http://" + AssetManager_getManager().tools.getHostName(location.href) + this.url + "&";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue