|
From: FlorinCB <ory...@us...> - 2008-09-10 06:55:00
|
Update of /cvsroot/mxbb/mx_music/music_box/modules In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv17215/music_box/modules Modified Files: music_cat.php music_media_cat.php music_pic_cat.php Log Message: fix for phpBB3 backend Index: music_media_cat.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/music_box/modules/music_media_cat.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** music_media_cat.php 10 Sep 2008 06:05:24 -0000 1.9 --- music_media_cat.php 10 Sep 2008 06:54:22 -0000 1.10 *************** *** 160,167 **** if ($thiscat['cat_moderator_groups'] != '') { // Get the namelist of moderator usergroups ! $sql = "SELECT group_id, group_name, group_type, group_single_user FROM " . GROUPS_TABLE . " ! WHERE group_single_user <> 1 AND group_type <> ". GROUP_HIDDEN ." AND group_id IN (". $thiscat['cat_moderator_groups'] .") --- 160,178 ---- if ($thiscat['cat_moderator_groups'] != '') { + switch (PORTAL_BACKEND) + { + case 'internal': + case 'phpbb2': + $sql_where = 'group_single_user <> " . true . "'; + break; + + case 'phpbb3': + $sql_where = 'group_id <> " . true . "'; + break; + } // Get the namelist of moderator usergroups ! $sql = "SELECT * FROM " . GROUPS_TABLE . " ! WHERE " . $sql_where . " AND group_type <> ". GROUP_HIDDEN ." AND group_id IN (". $thiscat['cat_moderator_groups'] .") Index: music_pic_cat.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/music_box/modules/music_pic_cat.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** music_pic_cat.php 9 Sep 2008 07:04:33 -0000 1.8 --- music_pic_cat.php 10 Sep 2008 06:54:22 -0000 1.9 *************** *** 158,166 **** if ($thiscat['cat_moderator_groups'] != '') { // Get the namelist of moderator usergroups ! $sql = "SELECT group_id, group_name, group_type, group_single_user FROM " . GROUPS_TABLE . " ! WHERE group_single_user <> 1 ! AND group_type <> ". GROUP_HIDDEN ." AND group_id IN (". $thiscat['cat_moderator_groups'] .") ORDER BY group_name ASC"; --- 158,176 ---- if ($thiscat['cat_moderator_groups'] != '') { + switch (PORTAL_BACKEND) + { + case 'internal': + case 'phpbb2': + $sql_where = 'group_single_user <> " . true . " AND group_type <> ". GROUP_HIDDEN ."'; + break; + + case 'phpbb3': + $sql_where = 'group_id <> " . true . " AND group_id <> ". GROUP_HIDDEN ."'; + break; + } // Get the namelist of moderator usergroups ! $sql = "SELECT * FROM " . GROUPS_TABLE . " ! WHERE " . $sql_where . " AND group_id IN (". $thiscat['cat_moderator_groups'] .") ORDER BY group_name ASC"; Index: music_cat.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/music_box/modules/music_cat.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** music_cat.php 10 Sep 2008 06:05:22 -0000 1.11 --- music_cat.php 10 Sep 2008 06:54:22 -0000 1.12 *************** *** 106,113 **** if( $catrows[$i]['cat_moderator_groups'] != '') { // We have usergroup_ID, now we need usergroup name $sql = "SELECT group_id, group_name FROM " . GROUPS_TABLE . " ! WHERE group_single_user <> 1 AND group_type <> ". GROUP_HIDDEN ." AND group_id IN (". $catrows[$i]['cat_moderator_groups'] .") --- 106,124 ---- if( $catrows[$i]['cat_moderator_groups'] != '') { + switch (PORTAL_BACKEND) + { + case 'internal': + case 'phpbb2': + $sql_where = 'group_single_user <> " . true . "'; + break; + + case 'phpbb3': + $sql_where = 'group_id <> " . true . "'; + break; + } // We have usergroup_ID, now we need usergroup name $sql = "SELECT group_id, group_name FROM " . GROUPS_TABLE . " ! WHERE " . $sql_where . " AND group_type <> ". GROUP_HIDDEN ." AND group_id IN (". $catrows[$i]['cat_moderator_groups'] .") *************** *** 499,506 **** if ($thiscat['cat_moderator_groups'] != '') { // Get the namelist of moderator usergroups ! $sql = "SELECT group_id, group_name, group_type, group_single_user FROM " . GROUPS_TABLE . " ! WHERE group_single_user <> 1 AND group_type <> ". GROUP_HIDDEN ." AND group_id IN (". $thiscat['cat_moderator_groups'] .") --- 510,528 ---- if ($thiscat['cat_moderator_groups'] != '') { + switch (PORTAL_BACKEND) + { + case 'internal': + case 'phpbb2': + $sql_where = 'group_single_user <> " . true . "'; + break; + + case 'phpbb3': + $sql_where = 'group_id <> " . true . "'; + break; + } // Get the namelist of moderator usergroups ! $sql = "SELECT * FROM " . GROUPS_TABLE . " ! WHERE " . $sql_where . " AND group_type <> ". GROUP_HIDDEN ." AND group_id IN (". $thiscat['cat_moderator_groups'] .") |