[ 1186440 ] Asset/Post.pm content type only checked if editStamp set

This commit is contained in:
Matthew Wilson 2005-05-16 22:36:27 +00:00
parent b4ec8dde87
commit 564c67fe60
2 changed files with 17 additions and 7 deletions

View file

@ -653,12 +653,12 @@ sub processPropertiesFromFormPost {
$data{startDate} = $self->getThread->getParent->get("startDate") unless ($session{form}{startDate});
$data{endDate} = $self->getThread->getParent->get("endDate") unless ($session{form}{endDate});
($data{synopsis}, $data{content}) = $self->getSynopsisAndContentFromFormPost;
if ($self->getThread->getParent->get("addEditStampToPosts")) {
$data{content} .= "\n\n --- (Edited on ".WebGUI::DateTime::epochToHuman(undef,"%z %Z [GMT%O]")." by ".$session{user}{alias}.") --- \n";
if ($self->getValue("contentType") eq "mixed" || $self->getValue("contentType") eq "html") {
$data{content} = '<p>'.$data{content}.'</p>';
}
}
if ($self->getThread->getParent->get("addEditStampToPosts")) {
$data{content} .= "\n\n --- (".WebGUI::International::get('Edited_on','Asset_Post')." ".WebGUI::DateTime::epochToHuman(undef,"%z %Z [GMT%O]").WebGUI::International::get('By','Asset_Post').$session{user}{alias}.") --- \n";
}
if ($self->getValue("contentType") eq "mixed" || $self->getValue("contentType") eq "html") {
$data{content} = '<p>'.$data{content}.'</p>';
}
$self->update(\%data);
$self->getThread->subscribe if ($session{form}{subscribe});
if ($self->getThread->getParent->get("moderatePosts")) {
@ -680,7 +680,7 @@ sub processPropertiesFromFormPost {
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;
}
#-------------------------------------------------------------------

View file

@ -396,6 +396,16 @@ A conditional indicating whether this Post should be opened in a new window.
lastUpdated => 1111464988,
},
'Edited_on' => {
message => q|Edited on|,
lastUpdated => 1116259200
},
'By' => {
message => q| by |,
lastUpdated => 1116259200,
},
'notification template title' => {
message => q|Notification Template|,
lastUpdated => 1111253044,