Update of /cvsroot/phpbb-php5mod/phpbb-php5/admin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28399/admin
Modified Files:
admin_forums.php admin_smilies.php admin_ug_auth.php
page_header_admin.php pagestart.php
Log Message:
- phpBB 2.0.15
- some bug fixes courtesy of astute users
- a few long arrays turned to short ones
Index: pagestart.php
===================================================================
RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/admin/pagestart.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** pagestart.php 30 Jul 2004 02:12:37 -0000 1.2
--- pagestart.php 8 May 2005 02:12:43 -0000 1.3
***************
*** 60,63 ****
--- 60,68 ----
}
+ if (!$userdata['session_admin'])
+ {
+ redirect(append_sid("login.$phpEx?redirect=admin/&admin=1", true));
+ }
+
if (empty($no_page_header))
{
Index: page_header_admin.php
===================================================================
RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/admin/page_header_admin.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** page_header_admin.php 16 Apr 2005 21:02:22 -0000 1.3
--- page_header_admin.php 8 May 2005 02:12:43 -0000 1.4
***************
*** 36,40 ****
$phpver = phpversion();
! $useragent = (isset($HTTP_SERVER_VARS['HTTP_USER_AGENT'])) ? $HTTP_SERVER_VARS['HTTP_USER_AGENT'] : getenv('HTTP_USER_AGENT');
if ( $phpver >= '4.0.4pl1' && ( strstr($useragent,'compatible') || strstr($useragent,'Gecko') ) )
--- 36,40 ----
$phpver = phpversion();
! $useragent = (isset($_SERVER['HTTP_USER_AGENT'])) ? $_SERVER['HTTP_USER_AGENT'] : getenv('HTTP_USER_AGENT');
if ( $phpver >= '4.0.4pl1' && ( strstr($useragent,'compatible') || strstr($useragent,'Gecko') ) )
Index: admin_ug_auth.php
===================================================================
RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/admin/admin_ug_auth.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** admin_ug_auth.php 21 Feb 2005 02:50:25 -0000 1.5
--- admin_ug_auth.php 8 May 2005 02:12:43 -0000 1.6
***************
*** 554,557 ****
--- 554,599 ----
$forum_auth_level[$forum_id] = AUTH_ALL;
+ $sql = 'SELECT user_id FROM ' . USER_GROUP_TABLE . "
+ WHERE group_id = $group_id";
+ $result = $db->sql_query($sql);
+
+ $group_user = array();
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $group_user[$row['user_id']] = $row['user_id'];
+ }
+ $db->sql_freeresult($result);
+
+ $sql = "SELECT ug.user_id, COUNT(auth_mod) AS is_auth_mod
+ FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug
+ WHERE ug.user_id IN (" . implode(', ', $group_user) . ")
+ AND aa.group_id = ug.group_id
+ AND aa.auth_mod = 1
+ GROUP BY ug.user_id";
+ if ( !($result = $db->sql_query($sql)) )
+ {
+ message_die(GENERAL_ERROR, 'Could not obtain moderator status', '', __LINE__, __FILE__, $sql);
+ }
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ if ($row['is_auth_mod'])
+ {
+ unset($group_user[$row['user_id']]);
+ }
+ }
+ $db->sql_freeresult($result);
+
+ if (sizeof($group_user))
+ {
+ $sql = "UPDATE " . USERS_TABLE . "
+ SET user_level = " . USER . "
+ WHERE user_id IN (" . implode(', ', $group_user) . ")";
+ if ( !($result = $db->sql_query($sql)) )
+ {
+ message_die(GENERAL_ERROR, 'Could not update user level', '', __LINE__, __FILE__, $sql);
+ }
+ }
for($j = 0; $j < count($forum_auth_fields); $j++)
{
Index: admin_forums.php
===================================================================
RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/admin/admin_forums.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** admin_forums.php 30 Jul 2004 02:12:37 -0000 1.2
--- admin_forums.php 8 May 2005 02:12:43 -0000 1.3
***************
*** 234,237 ****
--- 234,238 ----
{
list($cat_id) = each($_POST['addforum']);
+ $cat_id = intval($cat_id);
//
// stripslashes needs to be run on this because slashes are added when the forum name is posted
Index: admin_smilies.php
===================================================================
RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/admin/admin_smilies.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** admin_smilies.php 30 Jul 2004 02:12:37 -0000 1.2
--- admin_smilies.php 8 May 2005 02:12:43 -0000 1.3
***************
*** 448,451 ****
--- 448,454 ----
$smile_url = ( isset($_POST['smile_url']) ) ? $_POST['smile_url'] : $_GET['smile_url'];
$smile_emotion = ( isset($_POST['smile_emotion']) ) ? $_POST['smile_emotion'] : $_GET['smile_emotion'];
+ $smile_code = trim($smile_code);
+ $smile_url = trim($smile_url);
+ $smile_emotion = trim($smile_emotion);
// If no code was entered complain ...
|