[geeklog-cvs] Geeklog-1.x/public_html/admin mail.php,1.36,1.37

Dirk Haun dhaun at qs1489.pair.com
Tue May 27 16:53:12 EDT 2008


Update of /cvsroot/geeklog/Geeklog-1.x/public_html/admin
In directory qs1489.pair.com:/tmp/cvs-serv71745/public_html/admin

Modified Files:
	mail.php 
Log Message:
Fixed SQL error when using the option to override user settings (reported by Michael Brusletten)


Index: mail.php
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/admin/mail.php,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -d -r1.36 -r1.37
*** mail.php	18 May 2008 16:58:51 -0000	1.36
--- mail.php	27 May 2008 20:53:10 -0000	1.37
***************
*** 161,170 ****
          $sql = "SELECT DISTINCT username,fullname,email FROM {$_TABLES['users']},{$_TABLES['group_assignments']} WHERE uid > 1";
          $sql .= " AND {$_TABLES['users']}.status = 3 AND ((email is not null) and (email != ''))";
!         $sql .= " AND {$_TABLES['users']}.uid = ug_uid AND ug_main_grp_id in  IN ({$groupList})";
      } else {
          $sql = "SELECT DISTINCT username,fullname,email,emailfromadmin FROM {$_TABLES['users']},{$_TABLES['userprefs']},{$_TABLES['group_assignments']} WHERE {$_TABLES['users']}.uid > 1";
          $sql .= " AND {$_TABLES['users']}.status = 3 AND ((email is not null) and (email != ''))";
          $sql .= " AND {$_TABLES['users']}.uid = {$_TABLES['userprefs']}.uid AND emailfromadmin = 1";
!         $sql .= " AND ug_uid = {$_TABLES['users']}.uid AND ug_main_grp_id  IN ({$groupList})";
      }
  
--- 161,170 ----
          $sql = "SELECT DISTINCT username,fullname,email FROM {$_TABLES['users']},{$_TABLES['group_assignments']} WHERE uid > 1";
          $sql .= " AND {$_TABLES['users']}.status = 3 AND ((email is not null) and (email != ''))";
!         $sql .= " AND {$_TABLES['users']}.uid = ug_uid AND ug_main_grp_id IN ({$groupList})";
      } else {
          $sql = "SELECT DISTINCT username,fullname,email,emailfromadmin FROM {$_TABLES['users']},{$_TABLES['userprefs']},{$_TABLES['group_assignments']} WHERE {$_TABLES['users']}.uid > 1";
          $sql .= " AND {$_TABLES['users']}.status = 3 AND ((email is not null) and (email != ''))";
          $sql .= " AND {$_TABLES['users']}.uid = {$_TABLES['userprefs']}.uid AND emailfromadmin = 1";
!         $sql .= " AND ug_uid = {$_TABLES['users']}.uid AND ug_main_grp_id IN ({$groupList})";
      }
  




More information about the geeklog-cvs mailing list