fixed [ 1306912 ] CMS Matrix - Unable to approve article's
This commit is contained in:
parent
e4c2bc9969
commit
7576dbfa78
6 changed files with 22 additions and 9 deletions
|
|
@ -595,7 +595,7 @@ sub notifySubscribers {
|
|||
foreach my $userId (keys %subscribers) {
|
||||
my $u = WebGUI::User->new($userId);
|
||||
if ($lang{$u->profileField("language")}{message} eq "") {
|
||||
$lang{$u->profileField("language")}{var} = $self->getTemplateVars($lang{$u->profileField("language")}{var});
|
||||
$lang{$u->profileField("language")}{var} = $self->getTemplateVars();
|
||||
$self->getThread->getParent->appendTemplateLabels($lang{$u->profileField("language")}{var});
|
||||
$lang{$u->profileField("language")}{var}{url} = WebGUI::URL::getSiteURL().$self->getUrl;
|
||||
$lang{$u->profileField("language")}{var}{'notify.subscription.message'} =
|
||||
|
|
@ -810,7 +810,7 @@ sub setStatusPending {
|
|||
} else {
|
||||
$self->update({status=>'pending'});
|
||||
WebGUI::MessageLog::addInternationalizedEntry('',$self->getThread->getParent->get("moderateGroupId"),
|
||||
$self->getUrl,578,'WebGUI','pending');
|
||||
$self->getUrl("revision=".$self->get("revisionDate")),578,'WebGUI','pending');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -76,10 +76,16 @@ sub appendPostListTemplateVars {
|
|||
);
|
||||
}
|
||||
}
|
||||
my $url;
|
||||
if ($post->get("status") eq "pending" || $post->get("status") eq "denied") {
|
||||
$url = $post->getUrl("revision=".$post->get("revisionDate"))."#".$post->getId;
|
||||
} else {
|
||||
$url = $post->getUrl."#".$post->getId;
|
||||
}
|
||||
push(@{$var->{post_loop}}, {
|
||||
%{$post->get},
|
||||
"id"=>$post->getId,
|
||||
"url"=>$post->getUrl.'#'.$post->getId,
|
||||
"url"=>$url,
|
||||
rating_loop=>\@rating_loop,
|
||||
"content"=>$post->formatContent,
|
||||
"status"=>$post->getStatus,
|
||||
|
|
@ -898,7 +904,7 @@ sub view {
|
|||
$var{"subscribe.url"} = $self->getSubscribeUrl;
|
||||
$var{"unsubscribe.url"} = $self->getUnsubscribeUrl;
|
||||
my $constraints = "(assetData.status='approved' or (assetData.ownerUserId=".quote($session{user}{userId})." and assetData.ownerUserId<>'1') or assetData.tagId=".quote($session{scratch}{versionTag});
|
||||
if ($var{canModerate}) {
|
||||
if ($var{'user.isModerator'}) {
|
||||
$constraints .= " or assetData.status='pending'";
|
||||
}
|
||||
$constraints .= ")";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue