aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/ucp/ucp_zebra.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2007-10-05 14:36:34 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2007-10-05 14:36:34 +0000
commit7de5bb349890d84827d385670c76cd58c40e5b8f (patch)
tree8cf95d27809f5abc61054237d74569e818769a1f /phpBB/includes/ucp/ucp_zebra.php
parente6c79242e6a7debfccc643a09dfab4a4d7746a8a (diff)
downloadforums-7de5bb349890d84827d385670c76cd58c40e5b8f.tar
forums-7de5bb349890d84827d385670c76cd58c40e5b8f.tar.gz
forums-7de5bb349890d84827d385670c76cd58c40e5b8f.tar.bz2
forums-7de5bb349890d84827d385670c76cd58c40e5b8f.tar.xz
forums-7de5bb349890d84827d385670c76cd58c40e5b8f.zip
dumdidum... sorry. ;)
git-svn-id: file:///svn/phpbb/trunk@8147 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/ucp/ucp_zebra.php')
-rw-r--r--phpBB/includes/ucp/ucp_zebra.php34
1 files changed, 21 insertions, 13 deletions
diff --git a/phpBB/includes/ucp/ucp_zebra.php b/phpBB/includes/ucp/ucp_zebra.php
index aa2dcb15b7..fb5df9394b 100644
--- a/phpBB/includes/ucp/ucp_zebra.php
+++ b/phpBB/includes/ucp/ucp_zebra.php
@@ -1,14 +1,22 @@
<?php
-/**
+/**
*
* @package ucp
* @version $Id$
-* @copyright (c) 2005 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @copyright (c) 2005 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
* ucp_zebra
* @package ucp
*/
@@ -49,11 +57,11 @@ class ucp_zebra
$data['add'] = array_map('trim', array_map('utf8_clean_string', explode("\n", $data['add'])));
// Do these name/s exist on a list already? If so, ignore ... we could be
- // 'nice' and automatically handle names added to one list present on
+ // 'nice' and automatically handle names added to one list present on
// the other (by removing the existing one) ... but I have a feeling this
// may lead to complaints
- $sql = 'SELECT z.*, u.username, u.username_clean
- FROM ' . ZEBRA_TABLE . ' z, ' . USERS_TABLE . ' u
+ $sql = 'SELECT z.*, u.username, u.username_clean
+ FROM ' . ZEBRA_TABLE . ' z, ' . USERS_TABLE . ' u
WHERE z.user_id = ' . $user->data['user_id'] . '
AND u.user_id = z.zebra_id';
$result = $db->sql_query($sql);
@@ -104,7 +112,7 @@ class ucp_zebra
if (sizeof($data['add']))
{
$sql = 'SELECT user_id, user_type
- FROM ' . USERS_TABLE . '
+ FROM ' . USERS_TABLE . '
WHERE ' . $db->sql_in_set('username_clean', $data['add']) . '
AND user_type <> ' . USER_INACTIVE;
$result = $db->sql_query($sql);
@@ -180,8 +188,8 @@ class ucp_zebra
// Force integer values
$data['usernames'] = array_map('intval', $data['usernames']);
- $sql = 'DELETE FROM ' . ZEBRA_TABLE . '
- WHERE user_id = ' . $user->data['user_id'] . '
+ $sql = 'DELETE FROM ' . ZEBRA_TABLE . '
+ WHERE user_id = ' . $user->data['user_id'] . '
AND ' . $db->sql_in_set('zebra_id', $data['usernames']);
$db->sql_query($sql);
@@ -212,10 +220,10 @@ class ucp_zebra
}
$sql_and = ($mode == 'friends') ? 'z.friend = 1' : 'z.foe = 1';
- $sql = 'SELECT z.*, u.username, u.username_clean
- FROM ' . ZEBRA_TABLE . ' z, ' . USERS_TABLE . ' u
+ $sql = 'SELECT z.*, u.username, u.username_clean
+ FROM ' . ZEBRA_TABLE . ' z, ' . USERS_TABLE . ' u
WHERE z.user_id = ' . $user->data['user_id'] . "
- AND $sql_and
+ AND $sql_and
AND u.user_id = z.zebra_id
ORDER BY u.username_clean ASC";
$result = $db->sql_query($sql);
@@ -227,7 +235,7 @@ class ucp_zebra
}
$db->sql_freeresult($result);
- $template->assign_vars(array(
+ $template->assign_vars(array(
'L_TITLE' => $user->lang['UCP_ZEBRA_' . $l_mode],
'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&amp;form=ucp&amp;field=add'),