[geeklog-cvs] geeklog-1.3/public_html/admin moderation.php,1.43,1.44

geeklog-cvs-admin at lists.geeklog.net geeklog-cvs-admin at lists.geeklog.net
Tue Sep 9 10:06:26 EDT 2003


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

Modified Files:
	moderation.php 
Log Message:
Forgot to change mail() to COM_mail().


Index: moderation.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-1.3/public_html/admin/moderation.php,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -d -r1.43 -r1.44
*** moderation.php	1 Sep 2003 19:01:06 -0000	1.43
--- moderation.php	9 Sep 2003 14:06:24 -0000	1.44
***************
*** 37,41 ****
  require_once('../lib-common.php');
  require_once('auth.inc.php');
- require_once($_CONF['path_system'] . 'classes/plugin.class.php');
  
  // Uncomment the line below if you need to debug the HTTP variables being passed
--- 37,40 ----
***************
*** 50,54 ****
  function commandcontrol() 
  {
!     global $_CONF,$_TABLES,$LANG01,$LANG29;
  
      $retval = '';
--- 49,53 ----
  function commandcontrol() 
  {
!     global $_CONF, $_TABLES, $LANG01, $LANG29;
  
      $retval = '';
***************
*** 138,142 ****
  
      $retval .= COM_endBlock (COM_getBlockTemplate ('_admin_block', 'footer'));
! 		
      if (SEC_hasRights('story.moderate')) {
          $retval .= itemlist('story');
--- 137,141 ----
  
      $retval .= COM_endBlock (COM_getBlockTemplate ('_admin_block', 'footer'));
! 
      if (SEC_hasRights('story.moderate')) {
          $retval .= itemlist('story');
***************
*** 159,163 ****
  
      $retval .= PLG_showModerationList();
! 	
      return $retval;
  }
--- 158,162 ----
  
      $retval .= PLG_showModerationList();
! 
      return $retval;
  }
***************
*** 325,329 ****
  function userlist ()
  {
!     global $_TABLES, $_CONF, $LANG29;
  
      $retval .= COM_startBlock ($LANG29[40], '',
--- 324,328 ----
  function userlist ()
  {
!     global $_CONF, $_TABLES, $LANG29;
  
      $retval .= COM_startBlock ($LANG29[40], '',
***************
*** 380,384 ****
  function draftlist ()
  {
!     global $_TABLES, $_CONF, $LANG24, $LANG29;
  
      $retval = COM_startBlock ($LANG29[35] . ' (' . $LANG24[34] . ')', '',
--- 379,383 ----
  function draftlist ()
  {
!     global $_CONF, $_TABLES, $LANG24, $LANG29;
  
      $retval = COM_startBlock ($LANG29[35] . ' (' . $LANG24[34] . ')', '',
***************
*** 485,489 ****
  function moderation($mid,$action,$type,$count) 
  {
!     global $_TABLES, $_CONF;
  
      $retval = '';
--- 484,488 ----
  function moderation($mid,$action,$type,$count) 
  {
!     global $_CONF, $_TABLES;
  
      $retval = '';
***************
*** 579,586 ****
  * Note: The code for sending the password is coped&pasted from users.php
  *
  */
  function moderateusers ($uid, $action, $count)
  {
!     global $_TABLES, $_CONF, $LANG_CHARSET, $LANG04;
  
      for ($i = 1; $i <= $count; $i++) {
--- 578,592 ----
  * Note: The code for sending the password is coped&pasted from users.php
  *
+ * @param    uid      int      array of items
+ * @param    action   string   action to perform ('delete', 'approve')
+ * @param    count    int      number of items
+ * @return            string   HTML for "command and control" page
+ *
  */
  function moderateusers ($uid, $action, $count)
  {
!     global $_CONF, $_TABLES, $LANG04;
! 
!     $retval = '';
  
      for ($i = 1; $i <= $count; $i++) {
***************
*** 607,611 ****
                      $passwd = substr($passwd,1,8);
                      $passwd2 = md5($passwd);
!                     DB_change($_TABLES['users'],'passwd',"$passwd2",'username',$A['username']);
  
                      $mailtext = "{$LANG04[15]}\n\n";
--- 613,620 ----
                      $passwd = substr($passwd,1,8);
                      $passwd2 = md5($passwd);
!                     DB_change ($_TABLES['users'], 'passwd', "$passwd2",
!                                'username', $A['username']);
!                     DB_change ($_TABLES['users'], 'pwrequestid', "NULL",
!                                'username', $A['username']);
  
                      $mailtext = "{$LANG04[15]}\n\n";
***************
*** 615,630 ****
                      $mailtext .= "{$_CONF["site_name"]}\n";
                      $mailtext .= "{$_CONF['site_url']}\n";
!                     if (empty ($LANG_CHARSET)) {
!                         $charset = $_CONF['default_charset'];
!                         if (empty ($charset)) {
!                             $charset = "iso-8859-1";
!                         }
!                     }
!                     else {
!                         $charset = $LANG_CHARSET;
!                     }
!                     mail($A["email"], "{$_CONF["site_name"]}: {$LANG04[16]}",
!                         $mailtext,
!                         "From: {$_CONF["site_name"]} <{$_CONF["site_mail"]}>\r\nReturn-Path: <{$_CONF["site_mail"]}>\r\nX-Mailer: GeekLog " . VERSION . "\r\nContent-Type: text/plain; charset={$charset}");
                  }
                  break;
--- 624,630 ----
                      $mailtext .= "{$_CONF["site_name"]}\n";
                      $mailtext .= "{$_CONF['site_url']}\n";
! 
!                     $subject = $_CONF['site_name'] . ': ' . $LANG04[16];
!                     COM_mail ($A['email'], $subject, $mailtext);
                  }
                  break;
***************
*** 642,654 ****
  $display = '';
  $display .= COM_siteHeader();
! if (isset ($msg)) {
!     $display .= COM_showMessage($msg);
  }
  
  if (isset ($HTTP_POST_VARS['mode']) && ($HTTP_POST_VARS['mode'] == 'moderation')) {
!     if ($type == 'user') {
!         $display .= moderateusers($id,$action,$count);
      } else {
!         $display .= moderation($id,$action,$type,$count);
      }
  } else {
--- 642,657 ----
  $display = '';
  $display .= COM_siteHeader();
! if (isset ($HTTP_GET_VARS['msg'])) {
!     $display .= COM_showMessage ($HTTP_GET_VARS['msg']);
  }
  
  if (isset ($HTTP_POST_VARS['mode']) && ($HTTP_POST_VARS['mode'] == 'moderation')) {
!     if ($HTTP_POST_VARS['type'] == 'user') {
!         $display .= moderateusers ($HTTP_POST_VARS['id'],
!                 $HTTP_POST_VARS['action'], $HTTP_POST_VARS['count']);
      } else {
!         $display .= moderation ($HTTP_POST_VARS['id'],
!                 $HTTP_POST_VARS['action'], $HTTP_POST_VARS['type'],
!                 $HTTP_POST_VARS['count']);
      }
  } else {





More information about the geeklog-cvs mailing list