|
From: Jonathan H. <the...@us...> - 2002-01-03 15:12:13
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv22506
Modified Files:
functions.php
Log Message:
Ok that was stupid.. Better version of a fix for 497077... Somebody hand me a beer.
Index: functions.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/functions.php,v
retrieving revision 1.101
retrieving revision 1.102
diff -C2 -r1.101 -r1.102
*** functions.php 2002/01/03 15:09:22 1.101
--- functions.php 2002/01/03 15:12:10 1.102
***************
*** 503,506 ****
--- 503,507 ----
{
case 'mysql':
+ case 'mysql4':
$sql_users = "SELECT u.username, g.group_name
FROM " . USERS_TABLE . " u, " . GROUPS_TABLE . " g, " . USER_GROUP_TABLE . " ug
***************
*** 527,555 ****
}
break;
- case 'mysql4':
- $sql_users = "SELECT u.username, g.group_name
- FROM " . USERS_TABLE . " u, " . GROUPS_TABLE . " g, " . USER_GROUP_TABLE . " ug
- WHERE ug.user_id = u.user_id
- AND g.group_id = ug.group_id
- AND ( LOWER(u.username) = '" . strtolower(str_replace("\'", "''", $username)) . "'
- OR LOWER(g.group_name) = '" . strtolower(str_replace("\'", "''", $username)) . "' )";
- $sql_disallow = "SELECT disallow_username
- FROM " . DISALLOW_TABLE . "
- WHERE '" . str_replace("\'", "''", $username) . "' LIKE disallow_username";
- if($result = $db->sql_query($sql_users))
- {
- if($db->sql_numrows($result) > 0)
- {
- return(FALSE);
- }
- }
- if($result = $db->sql_query($sql_disallow))
- {
- if($db->sql_numrows($result) > 0)
- {
- return(FALSE);
- }
- }
- break;
default:
--- 528,531 ----
|