many bug fixes
This commit is contained in:
parent
c3273e1d53
commit
b84ae38958
15 changed files with 88 additions and 97 deletions
|
|
@ -13,6 +13,12 @@
|
|||
- 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.
|
||||
- fix [ 1169239 ] Manage subscription codes -> Delete Selected -> Empty page
|
||||
- fix [ 1169246 ] Manage subscription codes -> Cannot select single day
|
||||
- fix [ 1169271 ] Last Post incorrect
|
||||
- The items listed under new content are now in alphabetical order as they
|
||||
should be.
|
||||
- Fixed some template problems with the folder asset and the failsafe style.
|
||||
- fix [ 1167720 ] Folder::view() subfolder_loop - missing.. [mwilson]
|
||||
- fix [ 1169379 ] eventscalendar wobjects have wrong scope after upgrade
|
||||
- fix [ 1168812 ] navigation sometimes fails to use correct... [mwilson]
|
||||
|
|
|
|||
|
|
@ -1,26 +0,0 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
use lib "../../lib";
|
||||
use Getopt::Long;
|
||||
use strict;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::SQL;
|
||||
use WebGUI::Asset;
|
||||
|
||||
my $configFile;
|
||||
my $quiet;
|
||||
|
||||
GetOptions(
|
||||
'configFile=s'=>\$configFile,
|
||||
'quiet'=>\$quiet
|
||||
);
|
||||
|
||||
WebGUI::Session::open("../..",$configFile);
|
||||
|
||||
#--------------------------------------------
|
||||
print "\tdo something.\n" unless ($quiet);
|
||||
|
||||
|
||||
WebGUI::Session::close();
|
||||
|
||||
|
||||
|
|
@ -1,2 +1,4 @@
|
|||
insert into webguiVersion values ('6.5.4','upgrade',unix_timestamp());
|
||||
update template set template='<a name=\"<tmpl_var assetId>\"></a><tmpl_if session.var.adminOn>\r\n <p><tmpl_var controls></p>\r\n</tmpl_if>\r\n\r\n<tmpl_if displayTitle>\r\n <h1><tmpl_var title></h1>\r\n</tmpl_if>\r\n\r\n<tmpl_if description>\r\n <tmpl_var description>\r\n</tmpl_if>\r\n\r\n<table width=\"100%\" cellpadding=\"3\" cellspacing=\"0\" class=\"content\">\r\n<tmpl_loop subfolder_loop>\r\n<tr>\r\n <td class=\"tableData\" valign=\"top\">\r\n <a href=\"<tmpl_var url>\"><img src=\"<tmpl_var icon.small>\" border=\"0\" alt=\"<tmpl_var title>\"></a> <a href=\"<tmpl_var url>\"><tmpl_var title></a>\r\n </td>\r\n\r\n <td class=\"tableData\" valign=\"top\" colspan=\"3\">\r\n <tmpl_var synopsis>\r\n </td>\r\n</tr>\r\n</tmpl_loop>\r\n\r\n\r\n<tmpl_loop file_loop>\r\n<tr>\r\n\r\n <td valign=\"top\" class=\"tableData\">\r\n <tmpl_if session.var.adminOn>\r\n <tmpl_if canEdit>\r\n <tmpl_var controls>\r\n </tmpl_if>\r\n </tmpl_if>\r\n <a href=\"<tmpl_var url>\"><img src=\"<tmpl_var icon.small>\" border=\"0\" alt=\"<tmpl_var title>\"></a> <a href=\"<tmpl_var url>\"><tmpl_var title>\r\n </td>\r\n <td class=\"tableData\" valign=\"top\">\r\n <tmpl_var synopsis>\r\n </td>\r\n <td class=\"tableData\" valign=\"top\">\r\n ^D(\"%z %Z\",<tmpl_var date.epoch>);\r\n </td>\r\n <td class=\"tableData\" valign=\"top\">\r\n <tmpl_var size>\r\n </td>\r\n</tr>\r\n</tmpl_loop>\r\n\r\n</table>' where assetId='PBtmpl0000000000000078';
|
||||
update template set template='<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\r\n \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n <head>\r\n <title>^Page(\"title\"); - WebGUI</title>\r\n <tmpl_var head.tags>\r\n <style type=\"text/css\">\r\n .menu {\r\n position: absolute;\r\n top: 25px;\r\n left: 10px;\r\n width: 180px;\r\n font-family: helvetica, arial;\r\n font-size: 12px;\r\n }\r\n.contentArea {\r\n border: 1px solid #cccccc;\r\n margin: 25px 10px 10px 190px;\r\n padding: 5px;\r\n font-family: helvetica, arial;\r\n min-height: 400px;\r\n}\r\n/* Hides from non-ie: the holly hack \\*/\r\n* html .adminConsoleWorkArea {\r\n zoom: 1.00;\r\n display: inline;\r\n }\r\n/* End hide from non-ie */\r\n\r\n\r\n </style>\r\n </head>\r\n <body> \r\n ^AdminBar;\r\n <div class=\"menu\">\r\n ^AssetProxy(flexmenu);\r\n </div>\r\n <div class=\"contentArea\">\r\n <tmpl_var body.content>\r\n <br /><br /><hr />\r\n ^LoginToggle; \r\n ^a(^@;); \r\n ^H;\r\n ^AdminToggle;\r\n </div>\r\n</body>\r\n</html>\r\n' where assetId='PBtmpl0000000000000060';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package WebGUI;
|
||||
our $VERSION = "6.5.4";
|
||||
our $STATUS = "beta";
|
||||
our $STATUS = "gamma";
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2005 Plain Black Corporation.
|
||||
|
|
|
|||
|
|
@ -369,11 +369,11 @@ sub definition {
|
|||
},
|
||||
startDate=>{
|
||||
fieldType=>'dateTime',
|
||||
defaultValue=>undef
|
||||
defaultValue=>997995720
|
||||
},
|
||||
endDate=>{
|
||||
fieldType=>'dateTime',
|
||||
defaultValue=>undef
|
||||
defaultValue=>32472169200
|
||||
},
|
||||
assetSize=>{
|
||||
noFormPost=>1,
|
||||
|
|
@ -684,7 +684,7 @@ sub getAssetAdderLinks {
|
|||
my $getContainerLinks = shift;
|
||||
my $type = "assets";
|
||||
$type = "assetContainers" if ($getContainerLinks);
|
||||
my @links;
|
||||
my %links;
|
||||
foreach my $class (@{$session{config}{$type}}) {
|
||||
my $load = "use ".$class;
|
||||
eval ($load);
|
||||
|
|
@ -703,10 +703,7 @@ sub getAssetAdderLinks {
|
|||
} else {
|
||||
my $url = $self->getUrl("func=add&class=".$class);
|
||||
$url = WebGUI::URL::append($url,$addToUrl) if ($addToUrl);
|
||||
push(@links, {
|
||||
label=>$label,
|
||||
url=>$url
|
||||
});
|
||||
$links{$label} = $url;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -721,12 +718,16 @@ sub getAssetAdderLinks {
|
|||
my $asset = WebGUI::Asset->newByDynamicClass($id,$class);
|
||||
my $url = $self->getUrl("func=add&class=".$class."&prototype=".$id);
|
||||
$url = WebGUI::URL::append($url,$addToUrl) if ($addToUrl);
|
||||
push(@links,{
|
||||
label=>$asset->get("title"),
|
||||
url=>$url
|
||||
});
|
||||
$links{$asset->get("title")} = $url;
|
||||
}
|
||||
return \@links;
|
||||
my @sortedLinks;
|
||||
foreach my $label (sort keys %links) {
|
||||
push(@sortedLinks,{
|
||||
label=>$label,
|
||||
url=>$links{$label}
|
||||
});
|
||||
}
|
||||
return \@sortedLinks;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -163,6 +163,8 @@ sub editSave {
|
|||
$data{className} = $className;
|
||||
$data{storageId} = $storage->getId;
|
||||
$data{filename} = $data{title} = $data{menuTitle} = $filename;
|
||||
$data{templateId} = 'PBtmpl0000000000000024';
|
||||
$data{templateId} = 'PBtmpl0000000000000088' if ($className eq "WebGUI::Asset::File::Image");
|
||||
$data{url} = $class->getParent->getUrl.'/'.$filename;
|
||||
my $newAsset = $class->getParent->addChild(\%data);
|
||||
$newAsset->setSize($storage->getFileSize($filename));
|
||||
|
|
|
|||
|
|
@ -469,27 +469,16 @@ sub rate {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 setLastPost ( lastPostDate, lastPostId )
|
||||
=head2 setStatusApproved ( )
|
||||
|
||||
Sets the pertinent details for the last post. Can also be done directly using the set method.
|
||||
|
||||
=head3 lastPostDate
|
||||
|
||||
The epoch date of the post.
|
||||
|
||||
=head3 lastPostId
|
||||
|
||||
The unique id of the post.
|
||||
Sets the post to approved and sends any necessary notifications.
|
||||
|
||||
=cut
|
||||
|
||||
sub setLastPost {
|
||||
my ($self, $postDate, $postId) = @_;
|
||||
$self->update({
|
||||
lastPostId=>$postId,
|
||||
lastPostDate=>$postDate
|
||||
});
|
||||
$self->getParent->setLastPost($postDate, $postId);
|
||||
sub setStatusApproved {
|
||||
my $self = shift;
|
||||
$self->SUPER::setStatusApproved;
|
||||
$self->getParent->incrementThreads($self->get("dateUpdated"),$self->getId) unless ($self->isReply);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -137,7 +137,10 @@ Returns the TabForm object that will be used in generating the edit page for thi
|
|||
sub getEditForm {
|
||||
my $self = shift;
|
||||
my $tabform = $self->SUPER::getEditForm();
|
||||
# $tabform->getTab("properties")->raw('<input type="hidden" name="op2" value="'.$session{form}{afterEdit}.'" />');
|
||||
$tabform->hidden({
|
||||
name=>"returnUrl",
|
||||
value=>$session{form}{returnUrl}
|
||||
});
|
||||
if ($self->getValue("namespace") eq "") {
|
||||
my $namespaces = WebGUI::SQL->buildHashRef("select distinct(namespace),namespace
|
||||
from template order by namespace");
|
||||
|
|
@ -334,6 +337,14 @@ sub www_edit {
|
|||
return $self->getAdminConsole->render($self->getEditForm->print,WebGUI::International::get('edit template', 'Template'));
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_goBackToPage {
|
||||
my $self = shift;
|
||||
WebGUI::HTTP::setRedirect($session{form}{returnUrl}) if ($session{form}{returnUrl});
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_manage {
|
||||
my $self = shift;
|
||||
|
|
|
|||
|
|
@ -755,31 +755,6 @@ sub recalculateRating {
|
|||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 setLastPost ( lastPostDate, lastPostId )
|
||||
|
||||
Sets the pertinent details for the last post. Can also be done directly using the set method.
|
||||
|
||||
=head3 lastPostDate
|
||||
|
||||
The epoch date of the post.
|
||||
|
||||
=head3 lastPostId
|
||||
|
||||
The asset id of the post.
|
||||
|
||||
=cut
|
||||
|
||||
sub setLastPost {
|
||||
my ($self, $postDate, $postId) = @_;
|
||||
$self->update({
|
||||
lastPostId=>$postId,
|
||||
lastPostDate=>$postDate
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 subscribe ( )
|
||||
|
|
|
|||
|
|
@ -165,6 +165,8 @@ sub view {
|
|||
type=>$child->getName,
|
||||
url=>$child->getUrl,
|
||||
isImage=>$isImage,
|
||||
canEdit=>$child->canEdit,
|
||||
controls=>$child->getToolbar,
|
||||
isFile=>$isFile,
|
||||
"thumbnail.url"=>$thumbnail,
|
||||
"file.url"=>$file
|
||||
|
|
|
|||
|
|
@ -81,6 +81,10 @@ sub getEditForm {
|
|||
-value=>$self->getValue('templateId'),
|
||||
-namespace=>"Navigation"
|
||||
);
|
||||
$tabform->hidden({
|
||||
name=>"returnUrl",
|
||||
value=>$session{form}{returnUrl}
|
||||
});
|
||||
my ($descendantsChecked, $selfChecked, $pedigreeChecked, $siblingsChecked);
|
||||
my @assetsToInclude = split("\n",$self->getValue("assetsToInclude"));
|
||||
my $afterScript;
|
||||
|
|
@ -239,7 +243,11 @@ Returns a toolbar with a set of icons that hyperlink to functions that delete, e
|
|||
sub getToolbar {
|
||||
my $self = shift;
|
||||
if ($self->getToolbarState) {
|
||||
my $toolbar = editIcon('func=edit',$self->get("url"));
|
||||
my $returnUrl;
|
||||
if (exists $session{asset}) {
|
||||
$returnUrl = "&proceed=goBackToPage&returnUrl=".WebGUI::URL::escape($session{asset}->getUrl);
|
||||
}
|
||||
my $toolbar = editIcon('func=edit'.$returnUrl,$self->get("url"));
|
||||
return '<img src="'.$self->getIcon(1).'" border="0" title="'.$self->getName.'" alt="'.$self->getName.'" align="absmiddle">'.$toolbar;
|
||||
}
|
||||
return $self->SUPER::getToolbar();
|
||||
|
|
@ -388,6 +396,14 @@ sub www_edit {
|
|||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_goBackToPage {
|
||||
my $self = shift;
|
||||
WebGUI::HTTP::setRedirect($session{form}{returnUrl}) if ($session{form}{returnUrl});
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# we eventually should reaadd this
|
||||
sub www_preview {
|
||||
|
|
|
|||
|
|
@ -2138,10 +2138,6 @@ The left column label for this form row.
|
|||
|
||||
The namespace (or type) of templates to show in this list.
|
||||
|
||||
=head3 afterEdit
|
||||
|
||||
A URL that will be acted upon after editing a template. Typically there is a link next to the select list that reads "Edit this template" and this is the URL to go to after editing is complete.
|
||||
|
||||
=head3 extras
|
||||
|
||||
If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows:
|
||||
|
|
@ -2171,11 +2167,12 @@ sub template {
|
|||
$label = $label || WebGUI::International::get(356);
|
||||
my $template = WebGUI::Asset->newByDynamicClass($value);
|
||||
if (defined $template && $template->canEdit) {
|
||||
# if ($afterEdit) {
|
||||
$buttons = editIcon("func=edit",$template->get("url"));
|
||||
#"&namespace=".$namespace."&afterEdit=".WebGUI::URL::escape($afterEdit));
|
||||
# }
|
||||
$buttons .= manageIcon("func=manage",$template->get("url"));
|
||||
my $returnUrl;
|
||||
if (exists $session{asset}) {
|
||||
$returnUrl = "&proceed=goBackToPage&returnUrl=".WebGUI::URL::escape($session{asset}->getUrl);
|
||||
}
|
||||
$buttons = editIcon("func=edit".$returnUrl,$template->get("url"));
|
||||
$buttons .= manageIcon("",$template->getParent->get("url"));
|
||||
}
|
||||
$output = WebGUI::Form::template({
|
||||
"name"=>$name,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package WebGUI::Operation::Subscription;
|
||||
|
||||
use strict;
|
||||
use WebGUI::DateTime;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::SQL;
|
||||
use WebGUI::HTMLForm;
|
||||
|
|
@ -268,6 +269,8 @@ sub www_listSubscriptionCodeBatches {
|
|||
$output .= '</table>';
|
||||
$output .= $p->getBarTraditional($session{form}{pn});
|
||||
|
||||
$output = $i18n->get('no subscription code batches') unless (@{$batches});
|
||||
|
||||
return _submenu($output, 'Manage subscription code batches', 'manage batch');
|
||||
}
|
||||
|
||||
|
|
@ -279,9 +282,9 @@ sub www_listSubscriptionCodes {
|
|||
my $i18n = WebGUI::International->new("Subscription");
|
||||
|
||||
my $dcStart = WebGUI::FormProcessor::date('dcStart');
|
||||
my $dcStop = WebGUI::FormProcessor::date('dcStop');
|
||||
my $dcStop = WebGUI::DateTime::addToTime(WebGUI::FormProcessor::date('dcStop'),23,59);
|
||||
my $duStart = WebGUI::FormProcessor::date('duStart');
|
||||
my $duStop = WebGUI::FormProcessor::date('duStop');
|
||||
my $duStop = WebGUI::DateTime::addToTime(WebGUI::FormProcessor::date('duStop'),23,59);
|
||||
my $batches = WebGUI::SQL->buildHashRef("select batchId, description from subscriptionCodeBatch");
|
||||
|
||||
$output .= $i18n->get('selection message');
|
||||
|
|
|
|||
|
|
@ -1,6 +1,12 @@
|
|||
package WebGUI::i18n::English::Subscription;
|
||||
|
||||
our $I18N = {
|
||||
'no subscription code batches' => {
|
||||
message => q|No subscription code batches have been created yet. Use the submenu on the right to generate a batch.|,
|
||||
lastUpdated => 1101228391,
|
||||
context => q|Displayed if no subscription code batches have been created|
|
||||
},
|
||||
|
||||
'listSubscriptionCodes title' => {
|
||||
message => q|Manage Subscription Codes|,
|
||||
lastUpdated => 1101228391,
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ my $override;
|
|||
my $quiet;
|
||||
my $webUser = 'apache';
|
||||
my $assetId;
|
||||
my $parentAssetId;
|
||||
|
||||
GetOptions(
|
||||
'configFile=s'=>\$configFile,
|
||||
|
|
@ -57,7 +58,7 @@ GetOptions(
|
|||
'pathToFiles=s'=>\$pathToFiles,
|
||||
'quiet'=>\$quiet,
|
||||
'webUser=s'=>\$webUser,
|
||||
'parentAssetId=s'=>\$parrentAssetId
|
||||
'parentAssetId=s'=>\$parentAssetId
|
||||
);
|
||||
|
||||
|
||||
|
|
@ -138,7 +139,11 @@ sub addFiles {
|
|||
foreach my $file (@{$filelist}) {
|
||||
print "\tAdding ".$file->{filename}." to the database.\n" unless ($quiet);
|
||||
my $class = 'WebGUI::Asset::File';
|
||||
$class = 'WebGUI::Asset::File::Image' if (isIn($file->{ext},@nailable));
|
||||
my $templateId = 'PBtmpl0000000000000024';
|
||||
if (isIn($file->{ext},@nailable)) {
|
||||
$class = 'WebGUI::Asset::File::Image';
|
||||
$templateId = 'PBtmpl0000000000000088'
|
||||
}
|
||||
my $url = $parent->getUrl.'/'.$file->{filename};
|
||||
my $storage = WebGUI::Storage->create;
|
||||
my $filename = $storage->addFileFromFilesystem($pathToFiles.$session{os}{slash}.$file->{filename});
|
||||
|
|
@ -148,9 +153,12 @@ sub addFiles {
|
|||
menuTitle=>$filename,
|
||||
filename=>$filename,
|
||||
storageId=>$storage->getId,
|
||||
isHidden=>1,
|
||||
url=>$url,
|
||||
groupIdView=>$groupToView,
|
||||
groupIdEdit=>$groupToEdit,
|
||||
templateId=>$templateId,
|
||||
endDate=>32472169200,
|
||||
ownerUserId=>$owner
|
||||
});
|
||||
$newAsset->generateThumbnail if ($class eq 'WebGUI::Asset::File::Image');
|
||||
|
|
@ -192,7 +200,6 @@ sub buildFileList {
|
|||
$filename = $1;
|
||||
$ext = $2;
|
||||
push(@filelist,{ext=>$ext, filename=>$file});
|
||||
$filelist{$filename}{$ext} = $file;
|
||||
print "Found file $file.\n" unless ($quiet);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue