Sophie

Sophie

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

WebCalendar-1.2.1-1.fc13.src.rpm

diff -Naur WebCalendar-1.2.0.orig/includes/access.php WebCalendar-1.2.0.new/includes/access.php
--- WebCalendar-1.2.0.orig/includes/access.php	2008-07-02 02:49:02.000000000 +0200
+++ WebCalendar-1.2.0.new/includes/access.php	2009-10-16 11:24:07.000000000 +0200
@@ -478,7 +478,7 @@
 
 function access_user_calendar ( $cal_can_xxx = '', $other_user, $cur_user = '',
   $type = '', $access = '' ) {
-  global $access_other_cals, $access_users, $login, $ADMIN_OVERRIDE_UAC, $is_admin;
+  global $access_other_cals, $access_users, $login, $ADMIN_OVERRIDE_UAC, $is_admin, $ALLOW_VIEW_OTHER;
 
   $admin_override = ( $is_admin && !
     empty ( $ADMIN_OVERRIDE_UAC ) && $ADMIN_OVERRIDE_UAC == 'Y' );
@@ -502,6 +502,14 @@
 
   assert ( '! empty ( $other_user )' );
   assert ( '! empty ( $cur_user )' );
+ 
+  if (!access_is_enabled()) {
+    if (!empty($ALLOW_VIEW_OTHER) && $cur_user != '__public__' &&
+     $cal_can_xxx == 'view' && $ALLOW_VIEW_OTHER == 'Y')
+      return 'Y';
+
+    return 'N';
+  }
 
   if ( empty ( $access_other_cals ) )
     access_load_user_permissions ();