Description
Hi,
When a "previous approved version" is shown, the banner shows a second line with the "showApproved() message", which is in a sense a true statement, but, contradictary to the message in the next line, stating, "This is an old revision of the document!" (lang/showrev.txt). Also it is flagged green, which is misleading, since this document should not be used anymore.
The bug is a missing condition in the header (if condition) of the "showApproved() function". I think, the condition:
if (!$this->hlp->isCurrentRevisionApproved()) {
return;
}
is too weak and causes the undesired conflicting message in the banner of the "previous approved version".
If I replace it by the following stronger condition in the header of the "showApproved() function":
global $ID;
$revision = $this->hlp->getRevision();
$latestApprovedRevision = $this->hlp->getLatestApprovedRevision();
if ($latestApprovedRevision != $revision) {
return;
}
(which was taken (and modified) from the "showLatestApprovedVersion() function"), I get the desired behaviour, which is:
- the "showApproved() message" is STILL shown for the "latest approved version"
- the "showApproved() message" is NOT shown for the "previous approved version"
That was my bug report for the publish plugin, which I think is great!
Thank you alot for maintaining it! Thumbs up! Christian