[geeklog-cvs] geeklog-1.3/public_html lib-common.php,1.249,1.250

geeklog-cvs-admin at lists.geeklog.net geeklog-cvs-admin at lists.geeklog.net
Mon Sep 1 15:11:59 EDT 2003


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

Modified Files:
	lib-common.php 
Log Message:
Added missing description of COM_mail() function,
fixed warnings.


Index: lib-common.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/lib-common.php,v
retrieving revision 1.249
retrieving revision 1.250
diff -C2 -d -r1.249 -r1.250
*** lib-common.php	1 Sep 2003 12:53:06 -0000	1.249
--- lib-common.php	1 Sep 2003 19:11:57 -0000	1.250
***************
*** 1100,1103 ****
--- 1100,1105 ----
  function COM_optionList( $table, $selection, $selected='', $sortcol=1 )
  {
+     $retval = '';
+ 
      $tmp = str_replace( 'DISTINCT ', '', $selection );
      $select_set = explode( ',', $tmp );
***************
*** 1141,1144 ****
--- 1143,1148 ----
      global $_TABLES;
  
+     $retval = '';
+ 
      $tmp = str_replace( 'DISTINCT ', '', $selection );
      $select_set = explode( ',',$tmp );
***************
*** 1182,1185 ****
--- 1186,1191 ----
      global $_TABLES, $_COM_VERBOSE;
  
+     $retval = '';
+ 
      $sql = "SELECT $selection FROM $table";
  
***************
*** 1207,1210 ****
--- 1213,1218 ----
              COM_errorLog( 'selected string was empty COM_checkList', 1 );
          }
+ 
+         $S = array();
      }
  
***************
*** 1231,1235 ****
              }
  
!             if( $A[2] < 10 && $A[2] > 0 )
              {
                  $retval .= '><b>' . stripslashes( $A[1] ) . '</b><br>' . LB;
--- 1239,1243 ----
              }
  
!             if( isset( $A[2] ) && ( $A[2] < 10 && $A[2] > 0 ))
              {
                  $retval .= '><b>' . stripslashes( $A[1] ) . '</b><br>' . LB;
***************
*** 1376,1380 ****
                  $logfile = $_CONF['path_log'] . 'error.log';
  
!                 if( !$file = fopen( $logfile, a ))
                  {
                      $retval .= $LANG01[33] . ' ' . $logfile . ' (' . $timestamp . ')<br>' . LB;
--- 1384,1388 ----
                  $logfile = $_CONF['path_log'] . 'error.log';
  
!                 if( !$file = fopen( $logfile, 'a' ))
                  {
                      $retval .= $LANG01[33] . ' ' . $logfile . ' (' . $timestamp . ')<br>' . LB;
***************
*** 1397,1401 ****
                  $logfile = $_CONF['path_log'] . 'error.log';
  
!                 if( !$file = fopen( $logfile, a ))
                  {
                      $retval .= $LANG01[33] . ' ' . $logfile . ' (' . $timestamp . ')<br>' . LB;
--- 1405,1409 ----
                  $logfile = $_CONF['path_log'] . 'error.log';
  
!                 if( !$file = fopen( $logfile, 'a' ))
                  {
                      $retval .= $LANG01[33] . ' ' . $logfile . ' (' . $timestamp . ')<br>' . LB;
***************
*** 1435,1439 ****
      $logfile = $_CONF['path_log'] . 'access.log';
  
!     if( !$file = fopen( $logfile, a ))
      {
          $retval .= $LANG01[33] . $logfile . ' (' . $timestamp . ')<br>' . LB;
--- 1443,1447 ----
      $logfile = $_CONF['path_log'] . 'access.log';
  
!     if( !$file = fopen( $logfile, 'a' ))
      {
          $retval .= $LANG01[33] . $logfile . ' (' . $timestamp . ')<br>' . LB;
***************
*** 1874,1877 ****
--- 1882,1887 ----
      global $_TABLES, $_USER, $_CONF, $LANG01, $HTTP_SERVER_VARS;
  
+     $retval = '';
+ 
      if( $_USER['uid'] > 1 )
      {
***************
*** 2939,2942 ****
--- 2949,2966 ----
  }
  
+ /**
+ * Send an email.
+ *
+ * All emails sent by Geeklog are sent through this function now.
+ *
+ * @param    to         string   recipients name and email address
+ * @param    subject    string   subject of the email
+ * @param    message    string   the text of the email
+ * @param    from       string   (optional) sender of the the email
+ * @param    html       bool     true if to be sent as an HTML email
+ * @param    priority   int      add X-Priority header, if > 0
+ * @return   boolean             true if successful,  otherwise false
+ *
+ */
  function COM_mail( $to, $subject, $message, $from = '', $html = false, $priority = 0 )
  {
***************
*** 3074,3077 ****
--- 3098,3103 ----
      global $_CONF, $topic, $_TABLES, $_USER;
  
+     $retval = '';
+ 
      if( !empty( $_USER['uid'] ))
      {
***************
*** 3139,3142 ****
--- 3165,3170 ----
      global $_TABLES, $_CONF, $_USER, $LANG21, $HTTP_SERVER_VARS, $topic, $page, $newstories;
  
+     $retval = '';
+ 
      // Get user preferences on blocks
  
***************
*** 3538,3542 ****
      }
  
!     $retval .= COM_startBlock( $title, '',
                         COM_getBlockTemplate( 'events_block', 'header' ));
  
--- 3566,3570 ----
      }
  
!     $retval = COM_startBlock( $title, '',
                         COM_getBlockTemplate( 'events_block', 'header' ));
  
***************
*** 3836,3840 ****
      global $_TABLES, $_CONF, $LANG01, $_USER, $_GROUPS, $page, $newstories;
  
!     $retval .= COM_startBlock( $title, $help,
                         COM_getBlockTemplate( 'whats_new_block', 'header' ));
  
--- 3864,3868 ----
      global $_TABLES, $_CONF, $LANG01, $_USER, $_GROUPS, $page, $newstories;
  
!     $retval = COM_startBlock( $title, $help,
                         COM_getBlockTemplate( 'whats_new_block', 'header' ));
  





More information about the geeklog-cvs mailing list