|
From: FlorinCB <ory...@us...> - 2008-09-10 06:54:57
|
Update of /cvsroot/mxbb/mx_music/phpbb2/admin In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv17215/phpbb2/admin Modified Files: admin_music_auth.php Log Message: fix for phpBB3 backend Index: admin_music_auth.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/phpbb2/admin/admin_music_auth.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** admin_music_auth.php 7 Sep 2008 18:06:56 -0000 1.4 --- admin_music_auth.php 10 Sep 2008 06:54:23 -0000 1.5 *************** *** 166,170 **** if( !$result = $db->sql_query($sql) ) { ! message_die(GENERAL_ERROR, 'Could not get Category list', '', __LINE__, __FILE__, $sql); } --- 166,170 ---- if( !$result = $db->sql_query($sql) ) { ! mx_message_die(GENERAL_ERROR, 'Could not get Category list', '', __LINE__, __FILE__, $sql); } *************** *** 227,239 **** ) ); // Get the list of phpBB usergroups $sql = "SELECT group_id, group_name FROM " . GROUPS_TABLE . " ! WHERE group_single_user <> " . TRUE ." ORDER BY group_name ASC"; if ( !($result = $db->sql_query($sql)) ) { ! message_die(GENERAL_ERROR, 'Could not get group list', '', __LINE__, __FILE__, $sql); } --- 227,250 ---- ) ); + + switch (PORTAL_BACKEND) + { + case 'internal': + case 'phpbb2': + $sql_where = 'group_single_user <> " . true . "'; + break; + case 'phpbb3': + $sql_where = 'group_id <> " . true . "'; + break; + } // Get the list of phpBB usergroups $sql = "SELECT group_id, group_name FROM " . GROUPS_TABLE . " ! WHERE " . $sql_where . " ORDER BY group_name ASC"; if ( !($result = $db->sql_query($sql)) ) { ! mx_message_die(GENERAL_ERROR, 'Could not get group list', '', __LINE__, __FILE__, $sql); } *************** *** 249,253 **** if( !$result = $db->sql_query($sql) ) { ! message_die(GENERAL_ERROR, 'Could not get Category information', '', __LINE__, __FILE__, $sql); } --- 260,264 ---- if( !$result = $db->sql_query($sql) ) { ! mx_message_die(GENERAL_ERROR, 'Could not get Category information', '', __LINE__, __FILE__, $sql); } *************** *** 307,311 **** if ( !$result = $db->sql_query($sql) ) { ! message_die(GENERAL_ERROR, 'Could not update music config table', '', __LINE__, __FILE__, $sql); } --- 318,322 ---- if ( !$result = $db->sql_query($sql) ) { ! mx_message_die(GENERAL_ERROR, 'Could not update music config table', '', __LINE__, __FILE__, $sql); } *************** *** 313,317 **** $message = $lang['Music_Auth_successfully'] . '<br /><br />' . sprintf($lang['Click_return_music_auth'], '<a href="' . append_sid("admin_music_auth.$phpEx") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . append_sid("index.$phpEx?pane=right") . '">', '</a>'); ! message_die(GENERAL_MESSAGE, $message); } } --- 324,328 ---- $message = $lang['Music_Auth_successfully'] . '<br /><br />' . sprintf($lang['Click_return_music_auth'], '<a href="' . append_sid("admin_music_auth.$phpEx") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . append_sid("index.$phpEx?pane=right") . '">', '</a>'); ! mx_message_die(GENERAL_MESSAGE, $message); } } |