Sophie

Sophie

distrib > Fedora > 13 > i386 > by-pkgid > 7d0d48e7990cef72b180bd549a3aa9dc > files > 4

WebCalendar-1.2.1-1.fc13.src.rpm

diff -Naur WebCalendar-1.2.0.orig/view_entry.php WebCalendar-1.2.0.new/view_entry.php
--- WebCalendar-1.2.0.orig/view_entry.php	2008-07-04 16:01:57.000000000 +0200
+++ WebCalendar-1.2.0.new/view_entry.php	2009-06-19 16:05:49.000000000 +0200
@@ -935,18 +935,25 @@
   echo $printerStr;
 
 if ( ( $is_my_event || $is_nonuser_admin || $is_assistant || $can_approve ) &&
-    $event_status == 'W' && $readonly == 'N' && $login != '__public__') {
-  $approveStr = translate ( 'Approve/Confirm entry' );
-  $rejectStr = translate ( 'Reject entry' );
-  echo '
-      <li><a title="' . $approveStr . '" class="nav" href="approve_entry.php?id='
-   . $id . $u_url . '&amp;type=E" onclick="return confirm( \''
-   . translate ( 'Approve this entry?', true ) . '\' );">' . $approveStr
-   . '</a></li>
-      <li><a title="' . $rejectStr . '"  class="nav" href="reject_entry.php?id='
-   . $id . $u_url . '&amp;type=E" onclick="return confirm( \''
-   . translate ( 'Reject this entry?', true ) . '\' );">' . $rejectStr
-   . '</a></li>';
+    $readonly == 'N' && $login != '__public__') {
+  if ($event_status != 'A') {
+    $approveStr = translate ( 'Approve/Confirm entry' );
+    echo '
+        <li><a title="' . $approveStr . '" class="nav" ' .
+        'href="approve_entry.php?id=' . $id . $u_url .
+        '&amp;type=E" onclick="return confirm( \'' .
+        translate ( 'Approve this entry?', true ) . '\' );">' . $approveStr .
+        '</a></li>';
+  }
+  if ($event_status != 'R') {
+    $rejectStr = translate ( 'Reject entry' );
+    echo '
+        <li><a title="' . $rejectStr . '" class="nav" ' .
+        'href="reject_entry.php?id=' . $id . $u_url .
+        '&amp;type=E" onclick="return confirm( \'' .
+        translate ( 'Reject this entry?', true ) . '\' );">' . $rejectStr .
+        '</a></li>';
+  }
 }
 // TODO add these permissions to the UAC list
 $can_add_attach = ( Doc::attachmentsEnabled () && $login != '__public__'