bunch of bug fixes
This commit is contained in:
parent
62fdfa2e3f
commit
021f5c38fb
8 changed files with 50 additions and 13 deletions
|
|
@ -1,6 +1,11 @@
|
|||
6.5.3
|
||||
- fix [ 1161457 ] Data fomr - list all entries: Logfile Error
|
||||
- fix [ 1161461 ] Data form - Add field - wrong destination
|
||||
- fix [ 1164382 ] User Profiling WebGUI::International::get(304,"WebGUI");
|
||||
- fix [ 1164251 ] message preview
|
||||
- fix [ 1164208 ] Unable to move freely between pages of a forum
|
||||
- fix [ 1160034 ] 6.5.0 - newly added posts do not appear
|
||||
- fix [ 1027992 ] pagination in forum doesn't take you to correct page
|
||||
- fix [ 1149585 ] visitor as admin
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
insert into webguiVersion values ('6.5.3','upgrade',unix_timestamp());
|
||||
update template set template='<a name=\"<tmpl_var assetId>\"></a>\n<tmpl_if session.var.adminOn>\n<p><tmpl_var controls></p>\n</tmpl_if>\n<tmpl_if displayTitle>\n <h1><tmpl_var title></h1>\n</tmpl_if>\n\n<tmpl_if error_loop>\n<ul>\n<tmpl_loop error_loop>\n<li><b><tmpl_var error.message></b>\n</tmpl_loop>\n</ul>\n</tmpl_if>\n\n<tmpl_if description>\n<tmpl_var description><p />\n</tmpl_if>\n\n<tmpl_if canEdit>\n<a href=\"<tmpl_var entryList.url>\"><tmpl_var entryList.label></a>\n· <a href=\"<tmpl_var export.tab.url>\"><tmpl_var export.tab.label></a>\n<tmpl_if entryId>\n· <a href=\"<tmpl_var delete.url>\"><tmpl_var delete.label></a>\n</tmpl_if>\n<tmpl_if session.var.adminOn>\n· <a href=\"<tmpl_var addField.url>\"><tmpl_var addField.label></a>\n· <a href=\"<tmpl_var addTab.url>\"><tmpl_var addTab.label></a>\n</tmpl_if>\n<p />\n</tmpl_if>\n<tmpl_var form.start>\n<table>\n <tmpl_loop field_loop>\n <tmpl_unless field.isHidden>\n <tr>\n <td class=\"formDescription\" valign=\"top\">\n <tmpl_if session.var.adminOn>\n <tmpl_if canEdit>\n <tmpl_var field.controls>\n </tmpl_if>\n </tmpl_if>\n <tmpl_var field.label>\n </td>\n <td class=\"tableData\" valign=\"top\">\n <tmpl_if field.isDisplayed>\n <tmpl_var field.value>\n <tmpl_else>\n <tmpl_var field.form>\n </tmpl_if>\n <tmpl_if field.isRequired>*</tmpl_if>\n <span class=\"formSubtext\">\n <br />\n <tmpl_var field.subtext>\n </span>\n </td>\n </tr>\n </tmpl_unless>\n </tmpl_loop>\n</table>\n<br>\n<tmpl_var form.save>\n<tmpl_var form.end>\n' where assetId='PBtmpl0000000000000141';
|
||||
update template set assetId='<a name=\"<tmpl_var assetId>\"></a>\n<tmpl_if session.var.adminOn>\n <p><tmpl_var controls></p>\n</tmpl_if> \n <tmpl_if displayTitle>\r\n <h1><tmpl_var title></h1>\r\n</tmpl_if>\r\n\r\n<tmpl_if error_loop>\r\n <ul>\r\n <tmpl_loop error_loop>\r\n <li><b><tmpl_var error.message></b>\r\n </tmpl_loop>\r\n </ul>\r\n</tmpl_if>\r\n\r\n<tmpl_if description>\r\n <tmpl_var description><p />\r\n</tmpl_if>\r\n\r\n<tmpl_if canEdit>\r\n <a href=\"<tmpl_var entryList.url>\"><tmpl_var entryList.label></a>\r\n · <a href=\"<tmpl_var export.tab.url>\"><tmpl_var export.tab.label></a>\r\n <tmpl_if entryId>\r\n · <a href=\"<tmpl_var delete.url>\"><tmpl_var delete.label></a>\r\n </tmpl_if>\r\n <tmpl_if session.var.adminOn>\r\n · <a href=\"<tmpl_var addField.url>\"><tmpl_var addField.label></a>\r\n · <a href=\"<tmpl_var addTab.url>\"><tmpl_var addTab.label></a>\r\n </tmpl_if>\r\n<p /> \r\n</tmpl_if>\r\n<tmpl_var form.start>\r\n<link href=\"/extras/tabs/tabs.css\" rel=\"stylesheet\" rev=\"stylesheet\" type=\"text/css\">\r\n<div class=\"tabs\">\r\n <tmpl_loop tab_loop>\r\n <span onclick=\"toggleTab(<tmpl_var tab.sequence>)\" id=\"tab<tmpl_var tab.sequence>\" class=\"tab\"><tmpl_var tab.label>\r\n <tmpl_if session.var.adminOn>\r\n <tmpl_if canEdit>\r\n <tmpl_var tab.controls>\r\n </tmpl_if>\r\n </tmpl_if>\r\n </span>\r\n </tmpl_loop>\r\n</div>\r\n<tmpl_loop tab_loop>\r\n <tmpl_var tab.start>\r\n <table>\r\n <tmpl_loop tab.field_loop>\r\n <tmpl_unless tab.field.isHidden>\r\n <tr>\r\n <td class=\"formDescription\" valign=\"top\">\r\n <tmpl_if session.var.adminOn>\r\n <tmpl_if canEdit>\r\n <tmpl_var tab.field.controls>\r\n </tmpl_if>\r\n </tmpl_if>\r\n <tmpl_var tab.field.label>\r\n </td>\r\n <td class=\"tableData\" valign=\"top\">\r\n <tmpl_if tab.field.isDisplayed>\r\n <tmpl_var tab.field.value>\r\n <tmpl_else>\r\n <tmpl_var tab.field.form>\r\n </tmpl_if>\r\n <tmpl_if tab.field.isRequired>*</tmpl_if>\r\n <span class=\"formSubtext\">\r\n <br />\r\n <tmpl_var tab.field.subtext>\r\n </span>\r\n </td>\r\n </tr>\r\n </tmpl_unless>\r\n </tmpl_loop>\r\n <tr>\r\n <td colspan=\"2\">\r\n <span class=\"tabSubtext\"><tmpl_var tab.subtext></span>\r\n </td>\r\n </tr>\r\n </table>\r\n <br>\r\n <tmpl_var form.save>\r\n <tmpl_var tab.end>\r\n</tmpl_loop>\r\n<tmpl_var tab.init>\r\n<tmpl_var form.end>\r\n' where assetId='PBtmpl0000000000000116';
|
||||
update template set template = '<a name=\"<tmpl_var assetId>\"></a> <h1><tmpl_var message.header.label></h1>\r\n<tmpl_if preview.title><p><b><tmpl_var preview.title></b></p></tmpl_if>\n<tmpl_if preview.content><p><tmpl_var preview.content></p></tmpl_if>\r\n<tmpl_var form.header>\r\n<table>\r\n\r\n<tmpl_if user.isVisitor>\r\n <tr><td><tmpl_var visitorName.label></td><td><tmpl_var visitorName.form></td></tr>\r\n</tmpl_if>\r\n\r\n<tr><td><tmpl_var subject.label></td><td><tmpl_var title.form></td></tr>\r\n<tr><td><tmpl_var message.label></td><td><tmpl_var content.form>\n<tmpl_if attachment.form>\n<p><tmpl_var attachment.form></p></tmpl_if>\n</td></tr>\r\n\r\n<tmpl_if newisNewMessage>\r\n <tmpl_unless user.isVisitor>\r\n <tr><td><tmpl_var subscribe.label></td><td><tmpl_var subscribe.form></td></tr>\r\n </tmpl_unless>\r\n <tmpl_if user.isModerator>\r\n <tr><td><tmpl_var lock.label></td><td><tmpl_var lock.form></td></tr>\r\n <tr><td><tmpl_var sticky.label></td><td><tmpl_var sticky.form></td></tr>\r\n </tmpl_if>\r\n</tmpl_if>\r\n\r\n<tr><td><tmpl_var contentType.label></td><td><tmpl_var contentType.form></td></tr>\r\n<tr><td></td><td><tmpl_if usePreview><tmpl_var form.preview></tmpl_if><tmpl_var form.submit></td></tr>\r\n\r\n</table>\r\n<tmpl_var form.footer>\r\n\r\n<tmpl_if isReply>\n<p><b><tmpl_var reply.title></b></p>\n<tmpl_var reply.content>\n</tmpl_if>' where assetId='PBtmpl0000000000000029';
|
||||
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ use Tie::CPHash;
|
|||
use WebGUI::Asset;
|
||||
use WebGUI::Asset::Template;
|
||||
use WebGUI::Asset::Post::Thread;
|
||||
use WebGUI::Cache;
|
||||
use WebGUI::DateTime;
|
||||
use WebGUI::Grouping;
|
||||
use WebGUI::HTML;
|
||||
|
|
@ -665,6 +666,9 @@ sub processPropertiesFromFormPost {
|
|||
$storage->generateThumbnail($filename);
|
||||
}
|
||||
$session{form}{proceed} = "redirectToParent";
|
||||
# clear some cache
|
||||
WebGUI::Cache->new("wobject_".$self->getThread->getParent->getId."_".$session{user}{userId})->delete;
|
||||
WebGUI::Cache->new("cspost_".($self->getParent->getId)."_".$session{user}{userId}."_".$session{scratch}{discussionLayout}."_1")->delete;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -840,6 +844,9 @@ sub www_edit {
|
|||
$self->{_thread} = $self->getParent->getThread;
|
||||
return WebGUI::Privilege::insufficient() unless ($self->getThread->canReply);
|
||||
$var{isReply} = 1;
|
||||
$var{'reply.title'} = $self->getParent->get("title");
|
||||
$var{'reply.synopsis'} = $self->getParent->get("synopsis");
|
||||
$var{'reply.content'} = $self->getParent->formatContent;
|
||||
unless ($session{form}{content} || $session{form}{title}) {
|
||||
$content = "[quote]".$self->getParent->get("content")."[/quote]" if ($session{form}{withQuote});
|
||||
$title = $self->getParent->get("title");
|
||||
|
|
|
|||
|
|
@ -608,12 +608,14 @@ sub view {
|
|||
} else {
|
||||
$sql .= "asset.lineage";
|
||||
}
|
||||
$p->setDataByQuery($sql);
|
||||
my $currentPageUrl = $session{env}{PATH_INFO};
|
||||
$currentPageUrl =~ s/^\///;
|
||||
$p->setDataByQuery($sql, undef, undef, undef, "url", $currentPageUrl);
|
||||
foreach my $dataSet (@{$p->getPageData()}) {
|
||||
my $reply = WebGUI::Asset::Post->newByPropertyHashRef($dataSet);
|
||||
$reply->{_thread} = $self; # caching thread for better performance
|
||||
my %replyVars = %{$reply->getTemplateVars};
|
||||
$replyVars{isCurrent} = ('/'.$reply->get("url") eq $session{env}{PATH_INFO});
|
||||
$replyVars{isCurrent} = ($reply->get("url") eq $currentPageUrl);
|
||||
$replyVars{isThreadRoot} = $self->getId eq $reply->getId;
|
||||
$replyVars{depth} = $reply->getLineageLength - $self->getLineageLength;
|
||||
$replyVars{depthX10} = $replyVars{depth}*10;
|
||||
|
|
|
|||
|
|
@ -569,7 +569,7 @@ sub www_view {
|
|||
my $cache;
|
||||
my $output;
|
||||
my $useCache = (
|
||||
$session{form}{op} eq "" &&
|
||||
$session{form}{op} eq "" && $session{form}{pn} eq "" &&
|
||||
(
|
||||
( $self->get("cacheTimeout") > 10 && $session{user}{userId} ne '1') ||
|
||||
( $self->get("cacheTimeoutVisitor") > 10 && $session{user}{userId} eq '1')
|
||||
|
|
|
|||
|
|
@ -346,23 +346,23 @@ sub definition {
|
|||
},
|
||||
notificationTemplateId =>{
|
||||
fieldType=>"template",
|
||||
defaultValue=>undef
|
||||
defaultValue=>'PBtmpl0000000000000027'
|
||||
},
|
||||
searchTemplateId =>{
|
||||
fieldType=>"template",
|
||||
defaultValue=>undef
|
||||
defaultValue=>'PBtmpl0000000000000031'
|
||||
},
|
||||
postFormTemplateId =>{
|
||||
fieldType=>"template",
|
||||
defaultValue=>undef
|
||||
defaultValue=>'PBtmpl0000000000000029'
|
||||
},
|
||||
threadTemplateId =>{
|
||||
fieldType=>"template",
|
||||
defaultValue=>undef
|
||||
defaultValue=>'PBtmpl0000000000000032'
|
||||
},
|
||||
collaborationTemplateId =>{
|
||||
fieldType=>"template",
|
||||
defaultValue=>undef
|
||||
defaultValue=>'PBtmpl0000000000000026'
|
||||
},
|
||||
karmaPerPost =>{
|
||||
fieldType=>"integer",
|
||||
|
|
|
|||
|
|
@ -476,7 +476,7 @@ sub setDataByArrayRef {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 setDataByQuery ( query [, dbh, unconditional, placeholders ] )
|
||||
=head2 setDataByQuery ( query [, dbh, unconditional, placeholders, dynamicPageNumberKey, dynamicPageNumberValue ] )
|
||||
|
||||
Retrieves a data set from a database and replaces whatever data set was passed in through the constructor.
|
||||
|
||||
|
|
@ -498,11 +498,19 @@ A boolean indicating that the query should be read unconditionally. Defaults to
|
|||
|
||||
An array reference containing a list of values to be used in the placeholders defined in the SQL statement.
|
||||
|
||||
=head3 dynamicPageNumberKey
|
||||
|
||||
One of the field names being returned from this query. If this is set, the paginator will dynamically assign a page number based upon this key matching the dynamicPageNumberValue. Note that this only applies if the default page number is 1.
|
||||
|
||||
=head3 dynamicPageNumberValue
|
||||
|
||||
A value to match the dynamicPageNumberKey.
|
||||
|
||||
=cut
|
||||
|
||||
sub setDataByQuery {
|
||||
my ($sth, $rowCount, @row);
|
||||
my ($self, $sql, $dbh, $unconditional, $placeholders) = @_;
|
||||
my ($self, $sql, $dbh, $unconditional, $placeholders, $dynamicPageNumberKey, $dynamicPageNumberValue) = @_;
|
||||
$dbh ||= WebGUI::SQL->getSlave;
|
||||
if ($unconditional) {
|
||||
$sth = WebGUI::SQL->unconditionalRead($sql,$dbh,$placeholders);
|
||||
|
|
@ -510,6 +518,7 @@ sub setDataByQuery {
|
|||
} else {
|
||||
$sth = WebGUI::SQL->read($sql,$dbh,$placeholders);
|
||||
}
|
||||
my $defaultPageNumber = $self->getPageNumber;
|
||||
$self->{_totalRows} = $sth->rows;
|
||||
$self->{_columnNames} = [ $sth->getColumnNames ];
|
||||
my $pageCount = 1;
|
||||
|
|
@ -518,10 +527,18 @@ sub setDataByQuery {
|
|||
if ($rowCount/$self->{_rpp} > $pageCount) {
|
||||
$pageCount++;
|
||||
}
|
||||
if ($pageCount == $self->getPageNumber) {
|
||||
push(@row,$data);
|
||||
if (defined $dynamicPageNumberKey && $defaultPageNumber == 1) {
|
||||
if ($data->{$dynamicPageNumberKey} eq $dynamicPageNumberValue) {
|
||||
$self->{_pn} = $pageCount;
|
||||
$dynamicPageNumberKey = undef;
|
||||
}
|
||||
push(@row,$data);
|
||||
} else {
|
||||
push(@row,{});
|
||||
if ($pageCount == $self->getPageNumber) {
|
||||
push(@row,$data);
|
||||
} else {
|
||||
push(@row,{});
|
||||
}
|
||||
}
|
||||
}
|
||||
$sth->finish;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,11 @@
|
|||
package WebGUI::i18n::English::WebGUI;
|
||||
|
||||
our $I18N = {
|
||||
'304' => {
|
||||
message => q|Language|,
|
||||
lastUpdated => 1031514049
|
||||
},
|
||||
|
||||
'559' => {
|
||||
message => q|Run On Registration|,
|
||||
lastUpdated => 1031514049
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue