[geeklog-cvs] geeklog-1.3/public_html calendar.php,1.27,1.27.4.1

dhaun at geeklog.net dhaun at geeklog.net
Fri Jan 23 16:15:28 EST 2004


Update of /usr/cvs/geeklog/geeklog-1.3/public_html
In directory geeklog_prod:/tmp/cvs-serv20021

Modified Files:
      Tag: geeklog_1_3_7sr2_1
	calendar.php 
Log Message:
Added parameter checking


Index: calendar.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/calendar.php,v
retrieving revision 1.27
retrieving revision 1.27.4.1
diff -C2 -d -r1.27 -r1.27.4.1
*** calendar.php	6 Jan 2003 18:20:24 -0000	1.27
--- calendar.php	23 Jan 2004 21:15:26 -0000	1.27.4.1
***************
*** 6,17 ****
  // +---------------------------------------------------------------------------+
  // | lib-common.php                                                            |
- // | Geeklog common library.                                                   |
  // |                                                                           |
  // +---------------------------------------------------------------------------+
! // | Copyright (C) 2000,2001 by the following authors:                         |
  // |                                                                           |
! // | Authors: Tony Bibbs       - tony at tonybibbs.com                            |
! // |          Mark Limburg     - mlimburg at users.sourceforge.net                |
! // |          Jason Wittenburg - jwhitten at securitygeeks.com                    |
  // +---------------------------------------------------------------------------+
  // |                                                                           |
--- 6,17 ----
  // +---------------------------------------------------------------------------+
  // | lib-common.php                                                            |
  // |                                                                           |
+ // | Geeklog calendar.                                                         |
  // +---------------------------------------------------------------------------+
! // | Copyright (C) 2000-2004 by the following authors:                         |
  // |                                                                           |
! // | Authors: Tony Bibbs        - tony at tonybibbs.com                           |
! // |          Mark Limburg      - mlimburg at users.sourceforge.net               |
! // |          Jason Whittenburg - jwhitten at securitygeeks.com                   |
  // +---------------------------------------------------------------------------+
  // |                                                                           |
***************
*** 288,293 ****
  $display .= COM_siteHeader('');
  
  // Set mode back to master if user refreshes screen after their session expires
! if (empty($_USER['uid']) AND $mode == 'personal') {
      $mode = '';
  }
--- 288,297 ----
  $display .= COM_siteHeader('');
  
+ if ($mode != 'personal') {
+     $mode = '';
+ }
+ 
  // Set mode back to master if user refreshes screen after their session expires
! if (($_USER['uid'] <= 1) AND $mode == 'personal') {
      $mode = '';
  }
***************
*** 302,307 ****
--- 306,331 ----
  }
  
+ if (!empty ($msg)) {
+     if (is_numeric ($msg) && ($msg > 0)) {
+         $display .= COM_showMessage ($msg);
+     }
+ }
+ 
+ if (!in_array ($view, array ('month', 'week', 'day'))) {
+     $view = '';
+ }
+ 
  // Create new calendar object
  $cal = new Calendar();
+ 
+ if (!empty ($month) && !is_numeric ($month)) {
+     $month = '';
+ }
+ if (!empty ($week) && !is_numeric ($week)) {
+     $week = '';
+ }
+ if (!empty ($day) && !is_numeric ($day)) {
+     $day = '';
+ }
  
  if ($view == 'week' AND (empty($month) AND empty($day) AND empty($year))) {





More information about the geeklog-cvs mailing list