[geeklog-cvs] geeklog-1.3/public_html calendar.php,1.45,1.46 calendar_event.php,1.32,1.33 comment.php,1.71,1.72 pollbooth.php,1.25,1.26 profiles.php,1.35,1.36 stats.php,1.28,1.29 submit.php,1.71,1.72 users.php,1.82,1.83

dhaun at iowaoutdoors.org dhaun at iowaoutdoors.org
Mon Aug 9 14:36:32 EDT 2004


Update of /var/cvs/geeklog-1.3/public_html
In directory www:/tmp/cvs-serv24822

Modified Files:
	calendar.php calendar_event.php comment.php pollbooth.php 
	profiles.php stats.php submit.php users.php 
Log Message:
Fixed a few warnings (undefined variables, etc.)


Index: submit.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/submit.php,v
retrieving revision 1.71
retrieving revision 1.72
diff -C2 -d -r1.71 -r1.72
*** submit.php	7 Aug 2004 15:21:18 -0000	1.71
--- submit.php	9 Aug 2004 18:36:29 -0000	1.72
***************
*** 127,135 ****
      $eventform->set_var('site_url', $_CONF['site_url']);
      $eventform->set_var('lang_title', $LANG12[10]); 
!     $types = explode(',',$_CONF['event_types']);
!     reset($types);
!     for ($i = 1; $i <= count($types); $i++) {
!         $catdd .= '<option value="' . current($types) . '">' . current($types) . '</option>';
!         next($types);
      }
      $eventform->set_var('lang_eventtype', $LANG12[49]);
--- 127,135 ----
      $eventform->set_var('site_url', $_CONF['site_url']);
      $eventform->set_var('lang_title', $LANG12[10]); 
!     $types = explode (',', $_CONF['event_types']);
!     $catdd = '';
!     foreach ($types as $event_type) {
!         $catdd .= '<option value="' . $event_type . '">' . $event_type
!                . '</option>';
      }
      $eventform->set_var('lang_eventtype', $LANG12[49]);
***************
*** 191,204 ****
      $eventform->set_var('lang_addressline2',$LANG12[45]);
      $eventform->set_var('lang_city',$LANG12[46]);
-     reset($_STATES);
      $eventform->set_var('lang_state',$LANG12[47]);
      $state_options = '';
!     for ($i = 1; $i <= count($_STATES); $i++) {
!         $state_options .= '<option value="' . key($_STATES) . '" ';
!         if (key($_STATES) == $cur_state) {
!             $state_options .= 'selected="selected"';
!         }
!         $state_options .= '>' . current($_STATES) . '</option>';
!         next($_STATES);
      }
      $eventform->set_var('state_options',$state_options);
--- 191,199 ----
      $eventform->set_var('lang_addressline2',$LANG12[45]);
      $eventform->set_var('lang_city',$LANG12[46]);
      $eventform->set_var('lang_state',$LANG12[47]);
      $state_options = '';
!     foreach ($_STATES as $statekey => $state) {
!         $state_options .= '<option value="' . $statekey . '">'
!                        . $state . '</option>';
      }
      $eventform->set_var('state_options',$state_options);
***************
*** 223,227 ****
      global $_CONF, $_TABLES, $LANG12;
  
!     $retval .= COM_startBlock($LANG12[5],'submitlink.html');
  
      $linkform = new Template($_CONF['path_layout'] . 'submit');
--- 218,222 ----
      global $_CONF, $_TABLES, $LANG12;
  
!     $retval = COM_startBlock ($LANG12[5], 'submitlink.html');
  
      $linkform = new Template($_CONF['path_layout'] . 'submit');
***************
*** 253,256 ****
--- 248,253 ----
      global $_CONF, $_TABLES, $_USER, $HTTP_POST_VARS, $LANG12;
  
+     $retval = '';
+ 
      if ($HTTP_POST_VARS['mode'] == $LANG12[32]) { // preview
          $A = $HTTP_POST_VARS;
***************
*** 269,272 ****
--- 266,272 ----
      }
  
+     $title = '';
+     $introtext = '';
+ 
      if (!empty($A['title'])) {
          $introtext = stripslashes ($A['introtext']);
***************
*** 304,308 ****
  
      $storyform = new Template($_CONF['path_layout'] . 'submit');
!     if (($_CONF['advanced_editor'] == 1) && file_exists ($_CONF['path_layout'] . 'submit/submitstory_advanced.thtml')) { 
          $storyform->set_file('storyform','submitstory_advanced.thtml');
      } else {
--- 304,309 ----
  
      $storyform = new Template($_CONF['path_layout'] . 'submit');
!     if (isset ($_CONF['advanced_editor']) && ($_CONF['advanced_editor'] == 1) &&
!         file_exists ($_CONF['path_layout'] . 'submit/submitstory_advanced.thtml')) { 
          $storyform->set_file('storyform','submitstory_advanced.thtml');
      } else {

Index: calendar_event.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/calendar_event.php,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** calendar_event.php	6 Aug 2004 08:55:35 -0000	1.32
--- calendar_event.php	9 Aug 2004 18:36:29 -0000	1.33
***************
*** 6,11 ****
  // +---------------------------------------------------------------------------+
  // | calendar_event.php                                                        |
- // | Shows details of an event or events                                       |
  // |                                                                           |
  // +---------------------------------------------------------------------------+
  // | Copyright (C) 2000-2004 by the following authors:                         |
--- 6,11 ----
  // +---------------------------------------------------------------------------+
  // | calendar_event.php                                                        |
  // |                                                                           |
+ // | Shows details of an event or events                                       |
  // +---------------------------------------------------------------------------+
  // | Copyright (C) 2000-2004 by the following authors:                         |
***************
*** 380,385 ****
  if (isset ($HTTP_POST_VARS['action'])) {
      $action = COM_applyFilter ($HTTP_POST_VARS['action']);
! } else {
      $action = COM_applyFilter ($HTTP_GET_VARS['action']);
  }
  
--- 380,387 ----
  if (isset ($HTTP_POST_VARS['action'])) {
      $action = COM_applyFilter ($HTTP_POST_VARS['action']);
! } else if (isset ($HTTP_GET_VARS['action'])) {
      $action = COM_applyFilter ($HTTP_GET_VARS['action']);
+ } else {
+     $action = '';
  }
  
***************
*** 489,492 ****
--- 491,495 ----
          setCalendarLanguage ($cal);
  
+         $currentmonth = '';
          for ($i = 1; $i <= $nrows; $i++) {
              $A = DB_fetchArray($result);

Index: users.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/users.php,v
retrieving revision 1.82
retrieving revision 1.83
diff -C2 -d -r1.82 -r1.83
*** users.php	6 Aug 2004 08:55:36 -0000	1.82
--- users.php	9 Aug 2004 18:36:29 -0000	1.83
***************
*** 812,816 ****
          $display .= custom_userform('new');
      } else {
!         $display .= newuserform($msg);
      }	
      $display .= COM_siteFooter();
--- 812,816 ----
          $display .= custom_userform('new');
      } else {
!         $display .= newuserform();
      }	
      $display .= COM_siteFooter();
***************
*** 898,902 ****
          $display .= COM_siteHeader('menu');
  
!         $display .= COM_showMessage($msg);
  
          switch ($mode) {
--- 898,911 ----
          $display .= COM_siteHeader('menu');
  
!         if (isset ($HTTP_POST_VARS['msg'])) {
!             $msg = $HTTP_POST_VARS['msg'];
!         } else if (isset ($HTTP_GET_VARS['msg'])) {
!             $msg = $HTTP_GET_VARS['msg'];
!         } else {
!             $msg = 0;
!         }
!         if ($msg > 0) {
!             $display .= COM_showMessage($msg);
!         }
  
          switch ($mode) {

Index: profiles.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/profiles.php,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -d -r1.35 -r1.36
*** profiles.php	8 Aug 2004 19:59:45 -0000	1.35
--- profiles.php	9 Aug 2004 18:36:29 -0000	1.36
***************
*** 334,342 ****
  
  // MAIN
  if (isset ($HTTP_POST_VARS['what'])) {
      $what = COM_applyFilter ($HTTP_POST_VARS['what']);
! } else {
      $what = COM_applyFilter ($HTTP_GET_VARS['what']);
  }
  switch ($what) {
      case 'contact':
--- 334,347 ----
  
  // MAIN
+ $display = '';
+ 
  if (isset ($HTTP_POST_VARS['what'])) {
      $what = COM_applyFilter ($HTTP_POST_VARS['what']);
! } else if (isset ($HTTP_GET_VARS['what'])) {
      $what = COM_applyFilter ($HTTP_GET_VARS['what']);
+ } else {
+     $what = '';
  }
+ 
  switch ($what) {
      case 'contact':
***************
*** 377,381 ****
  
      default:
!         $uid = COM_applyFilter ($HTTP_GET_VARS['uid'], true);
          if ($uid > 1) {
              $display .= COM_siteHeader ('menu', $LANG04[81])
--- 382,390 ----
  
      default:
!         if (isset ($HTTP_GET_VARS['uid'])) {
!             $uid = COM_applyFilter ($HTTP_GET_VARS['uid'], true);
!         } else {
!             $uid = 0;
!         }
          if ($uid > 1) {
              $display .= COM_siteHeader ('menu', $LANG04[81])

Index: stats.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/stats.php,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** stats.php	6 Aug 2004 08:55:36 -0000	1.28
--- stats.php	9 Aug 2004 18:36:29 -0000	1.29
***************
*** 36,39 ****
--- 36,41 ----
  require_once('lib-common.php');
  
+ $display = '';
+ 
  if (empty ($_USER['username']) &&
      (($_CONF['loginrequired'] == 1) || ($_CONF['statsloginrequired'] == 1))) {

Index: comment.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/comment.php,v
retrieving revision 1.71
retrieving revision 1.72
diff -C2 -d -r1.71 -r1.72
*** comment.php	6 Aug 2004 08:55:35 -0000	1.71
--- comment.php	9 Aug 2004 18:36:29 -0000	1.72
***************
*** 656,660 ****
  
  // MAIN
! if ( isset($_REQUEST['reply']) ) {
      $_REQUEST['mode'] = '';
  }
--- 656,662 ----
  
  // MAIN
! $display = '';
! 
! if (isset ($_REQUEST['reply'])) {
      $_REQUEST['mode'] = '';
  }

Index: calendar.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/calendar.php,v
retrieving revision 1.45
retrieving revision 1.46
diff -C2 -d -r1.45 -r1.46
*** calendar.php	7 Aug 2004 15:32:12 -0000	1.45
--- calendar.php	9 Aug 2004 18:36:29 -0000	1.46
***************
*** 34,43 ****
  // $Id$
  
! include('lib-common.php');
! include($_CONF['path_system'] . 'classes/calendar.class.php');
  
  if (empty ($_USER['username']) &&
      (($_CONF['loginrequired'] == 1) || ($_CONF['calendarloginrequired'] == 1))) {
!     $display = COM_siteHeader('');
      $display .= COM_startBlock ($LANG_LOGIN[1], '',
                                  COM_getBlockTemplate ('_msg_block', 'header'));
--- 34,45 ----
  // $Id$
  
! require_once ('lib-common.php');
! require_once ($_CONF['path_system'] . 'classes/calendar.class.php');
! 
! $display = '';
  
  if (empty ($_USER['username']) &&
      (($_CONF['loginrequired'] == 1) || ($_CONF['calendarloginrequired'] == 1))) {
!     $display .= COM_siteHeader('');
      $display .= COM_startBlock ($LANG_LOGIN[1], '',
                                  COM_getBlockTemplate ('_msg_block', 'header'));
***************
*** 309,314 ****
  if (isset ($HTTP_POST_VARS['msg'])) {
      $msg = COM_applyFilter ($HTTP_POST_VARS['msg'], true);
! } else {
      $msg = COM_applyFilter ($HTTP_GET_VARS['msg'], true);
  }
  if ($msg > 0) {
--- 311,318 ----
  if (isset ($HTTP_POST_VARS['msg'])) {
      $msg = COM_applyFilter ($HTTP_POST_VARS['msg'], true);
! } else if (isset ($HTTP_GET_VARS['msg'])) {
      $msg = COM_applyFilter ($HTTP_GET_VARS['msg'], true);
+ } else {
+     $msg = 0;
  }
  if ($msg > 0) {
***************
*** 597,601 ****
          $cal_templates->set_var('langlink_addevent'.$i, '<a href="' . $_CONF['site_url'] . "/submit.php?type=event&mode=$mode&day=$daynum&month=$monthnum&year=$yearnum" . '">' . $LANG30[8] . '</a>');
          if ($mode == 'personal') {
!             $calsql = "SELECT * FROM {$_TABLES['personal_events']} WHERE (uid = {$_USER["uid"]}) AND ((allday=1 AND datestart = \"$yearnum-$monthnum-$daynum\") OR (datestart >= \"$yearnum-$monthnum-$daynum 00:00:00\" AND datestart <= \"$yearnum-$monthnum-$daynum 23:59:59\") OR (dateend >= \"$yearnum-$monthnum-$daynum 00:00:00\" AND dateend <= \"$yearnum-$monthnum-$daynum 23:59:59\") OR (\"$yearnum-$monthnum-$daynum\" between datestart and dateend)) ORDER BY datestart,timestart";
          } else {
              $calsql = "SELECT * FROM {$_TABLES['events']} WHERE ((allday=1 AND datestart = \"$yearnum-$monthnum-$daynum\") OR (datestart >= \"$yearnum-$monthnum-$daynum 00:00:00\" AND datestart <= \"$yearnum-$monthnum-$daynum 23:59:59\") OR (dateend >= \"$yearnum-$monthnum-$daynum 00:00:00\" AND dateend <= \"$yearnum-$monthnum-$daynum 23:59:59\") OR (\"$yearnum-$monthnum-$daynum\" between datestart and dateend)) ORDER BY datestart,timestart";
--- 601,605 ----
          $cal_templates->set_var('langlink_addevent'.$i, '<a href="' . $_CONF['site_url'] . "/submit.php?type=event&mode=$mode&day=$daynum&month=$monthnum&year=$yearnum" . '">' . $LANG30[8] . '</a>');
          if ($mode == 'personal') {
!             $calsql = "SELECT * FROM {$_TABLES['personal_events']} WHERE (uid = {$_USER['uid']}) AND ((allday=1 AND datestart = \"$yearnum-$monthnum-$daynum\") OR (datestart >= \"$yearnum-$monthnum-$daynum 00:00:00\" AND datestart <= \"$yearnum-$monthnum-$daynum 23:59:59\") OR (dateend >= \"$yearnum-$monthnum-$daynum 00:00:00\" AND dateend <= \"$yearnum-$monthnum-$daynum 23:59:59\") OR (\"$yearnum-$monthnum-$daynum\" between datestart and dateend)) ORDER BY datestart,timestart";
          } else {
              $calsql = "SELECT * FROM {$_TABLES['events']} WHERE ((allday=1 AND datestart = \"$yearnum-$monthnum-$daynum\") OR (datestart >= \"$yearnum-$monthnum-$daynum 00:00:00\" AND datestart <= \"$yearnum-$monthnum-$daynum 23:59:59\") OR (dateend >= \"$yearnum-$monthnum-$daynum 00:00:00\" AND dateend <= \"$yearnum-$monthnum-$daynum 23:59:59\") OR (\"$yearnum-$monthnum-$daynum\" between datestart and dateend)) ORDER BY datestart,timestart";
***************
*** 746,753 ****
  }
  
  for ($y = $currentyear - 5; $y <= $currentyear + 5; $y++) {
!     $yroptions .= '<option value="' . $y . '" ';
      if ($y == $year) {
!         $yroptions .= 'selected="selected"';
      }
      $yroptions .= '>' . $y . '</option>'.LB;
--- 750,758 ----
  }
  
+ $yroptions = '';
  for ($y = $currentyear - 5; $y <= $currentyear + 5; $y++) {
!     $yroptions .= '<option value="' . $y . '"';
      if ($y == $year) {
!         $yroptions .= ' selected="selected"';
      }
      $yroptions .= '>' . $y . '</option>'.LB;
***************
*** 787,791 ****
                      $month = '0' . $month;
                  }
!                 $calsql = "SELECT * FROM {$_TABLES['personal_events']} WHERE (uid = {$_USER["uid"]}) AND ((datestart >= \"$year-$month-$curday->daynumber 00:00:00\" AND datestart <= \"$year-$month-$curday->daynumber 23:59:59\") OR (dateend >= \"$year-$month-$curday->daynumber 00:00:00\" AND dateend <= \"$year-$month-$curday->daynumber 23:59:59\") OR (\"$year-$month-$curday->daynumber\" between datestart and dateend)) ORDER BY datestart,timestart";
              } else {
                  if (strlen($month) == 1) {
--- 792,796 ----
                      $month = '0' . $month;
                  }
!                 $calsql = "SELECT * FROM {$_TABLES['personal_events']} WHERE (uid = {$_USER['uid']}) AND ((datestart >= \"$year-$month-$curday->daynumber 00:00:00\" AND datestart <= \"$year-$month-$curday->daynumber 23:59:59\") OR (dateend >= \"$year-$month-$curday->daynumber 00:00:00\" AND dateend <= \"$year-$month-$curday->daynumber 23:59:59\") OR (\"$year-$month-$curday->daynumber\" between datestart and dateend)) ORDER BY datestart,timestart";
              } else {
                  if (strlen($month) == 1) {

Index: pollbooth.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/pollbooth.php,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** pollbooth.php	6 Aug 2004 08:55:36 -0000	1.25
--- pollbooth.php	9 Aug 2004 18:36:29 -0000	1.26
***************
*** 142,147 ****
  // an aid of -1 will display the select poll
  
! if ($reply == $LANG01[25]) {
!     $display .= COM_refresh($_CONF['site_url'] . "/comment.php?sid=$qid&pid=$pid&type=$type");
      echo $display;
      exit;			
--- 142,152 ----
  // an aid of -1 will display the select poll
  
! $display = '';
! 
! if (isset ($HTTP_POST_VARS['reply'])
!         && ($HTTP_POST_VARS['reply'] == $LANG01[25])) {
!     $display .= COM_refresh ($_CONF['site_url'] . '/comment.php?sid='
!              . $HTTP_POST_VARS['qid'] . '&pid=' . $HTTP_POST_VARS['pid']
!              . '&type=' . $HTTP_POST_VARS['type']);
      echo $display;
      exit;			




More information about the geeklog-cvs mailing list