--- dokuwiki-2011-05-25a/lib/plugins/publish/action.php 2011-10-16 03:55:40.000000000 +1300 +++ dokuwiki/lib/plugins/publish/action.php 2012-01-24 10:34:18.115128733 +1300 @@ -147,10 +147,14 @@ if($approver && !$most_recent_approved) { $strings[] = 'yes'; } else { $strings[] = 'no'; } $strings[] = '">'; + # [jmt12] We may not display the message at all + $display_message = false; + if($most_recent_draft) { $strings[] = ''; $strings[] = sprintf($this->getLang('apr_recent_draft'), wl($ID, 'force_rev=1')); $strings[] = $this->difflink($ID, null, $REV) . ''; + $display_message = true; } if($most_recent_approved) { @@ -160,6 +164,7 @@ $strings[] = ''; $strings[] = sprintf($this->getLang('apr_outdated'), wl($ID, 'rev=' . $userrev)); $strings[] = $this->difflink($ID, $userrev, $REV) . ''; + $display_message = true; } if(!$approver) { @@ -168,28 +173,27 @@ $strings[] = sprintf($this->getLang('apr_draft'), '' . $longdate . ''); $strings[] = ''; + $display_message = true; } - if($approver) { + // [jmt12] Only display this notice to editors + if($approver && $INFO['perm'] >= AUTH_EDIT) { # Approved $strings[] = ''; $strings[] = sprintf($this->getLang('apr_approved'), '' . $longdate . '', editorinfo($approver)); $strings[] = ''; - } - - if($previous_approved) { - $strings[] = ''; - $strings[] = sprintf($this->getLang('apr_previous'), - wl($ID, 'rev=' . $previous_approved), - dformat($previous_approved)); - $strings[] = $this->difflink($ID, $previous_approved, $REV) . ''; + $display_message = true; } $strings[] = ''; - ptln(implode($strings)); + // [jmt12] if there is no message content, hide empty div + if ($display_message) + { + ptln(implode($strings)); + } return true; }