[geeklog-cvs] geeklog-1.3/public_html calendar.php,1.34,1.35

dhaun at geeklog.net dhaun at geeklog.net
Fri Jan 23 07:38:41 EST 2004


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

Modified Files:
	calendar.php 
Log Message:
More parameter checking


Index: calendar.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/calendar.php,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** calendar.php	23 Jan 2004 12:13:58 -0000	1.34
--- calendar.php	23 Jan 2004 12:38:39 -0000	1.35
***************
*** 299,302 ****
--- 299,306 ----
  }
  
+ if ($mode != 'personal') {
+     $mode = '';
+ }
+ 
  // Set mode back to master if user refreshes screen after their session expires
  if (empty ($_USER['uid']) AND $mode == 'personal') {
***************
*** 329,332 ****
--- 333,340 ----
  }
  
+ if (!in_array ($view, array ('month', 'week', 'day'))) {
+     $view = '';
+ }
+ 
  if (isset ($HTTP_POST_VARS['year']) || isset ($HTTP_POST_VARS['month']) ||
          isset ($HTTP_POST_VARS['day'])) {
***************
*** 417,421 ****
      if ($mode == 'personal') {
          $cal_templates->set_var('calendar_title', $LANG30[28] . ' ' . $_USER['username']);
!         $cal_templates->set_var('calendar_toggle', '[<a href="' . $_CONF['site_url'] . "/calendar.php?mode=&view=day&month=$month&day=$day&year=$year\">" . $LANG30[11] . '</a>]');
      } else {
          $cal_templates->set_var('calendar_title', $_CONF['site_name'] . ' ' . $LANG30[29]);
--- 425,429 ----
      if ($mode == 'personal') {
          $cal_templates->set_var('calendar_title', $LANG30[28] . ' ' . $_USER['username']);
!         $cal_templates->set_var('calendar_toggle', '[<a href="' . $_CONF['site_url'] . "/calendar.php?view=day&month=$month&day=$day&year=$year\">" . $LANG30[11] . '</a>]');
      } else {
          $cal_templates->set_var('calendar_title', $_CONF['site_name'] . ' ' . $LANG30[29]);
***************
*** 519,523 ****
      if ($mode == 'personal') {
          $cal_templates->set_var('calendar_title', $LANG30[28] . ' ' . $_USER['username']);
!         $cal_templates->set_var('calendar_toggle', '[<a href="' . $_CONF['site_url'] . "/calendar.php?mode=&view=week&month=$month&day=$day&year=$year\">" . $LANG30[11] . '</a>]');
      } else {
          $cal_templates->set_var('calendar_title', $_CONF['site_name'] . ' ' . $LANG30[29]);
--- 527,531 ----
      if ($mode == 'personal') {
          $cal_templates->set_var('calendar_title', $LANG30[28] . ' ' . $_USER['username']);
!         $cal_templates->set_var('calendar_toggle', '[<a href="' . $_CONF['site_url'] . "/calendar.php?view=week&month=$month&day=$day&year=$year\">" . $LANG30[11] . '</a>]');
      } else {
          $cal_templates->set_var('calendar_title', $_CONF['site_name'] . ' ' . $LANG30[29]);





More information about the geeklog-cvs mailing list