bunch of bug fixes
This commit is contained in:
parent
62fdfa2e3f
commit
021f5c38fb
8 changed files with 50 additions and 13 deletions
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue