diff --git a/acronyms.php b/acronyms.php index db360a3f..f203ece6 100644 --- a/acronyms.php +++ b/acronyms.php @@ -23,7 +23,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/adm/admin_bbcodes.php b/adm/admin_bbcodes.php index 5757c99c..c6bc79ed 100644 --- a/adm/admin_bbcodes.php +++ b/adm/admin_bbcodes.php @@ -102,7 +102,7 @@ if($data['bbcode_tag'] == '') { - trigger_error($lang['BBCODES_NO_BBCODES_INPUT'] . adm_back_link($page_action), E_USER_WARNING); + trigger_error($lang['BBCODES_NO_BBCODES_INPUT'] . page_back_link($page_action), E_USER_WARNING); } if (substr($data['bbcode_tag'], -1) === '=') @@ -116,22 +116,22 @@ if (!preg_match('%\\[' . $test . '[^]]*].*?\\[/' . $test . ']%s', $data['bbcode_match'])) { - trigger_error($lang['BBCODE_OPEN_ENDED_TAG'] . adm_back_link($page_action), E_USER_WARNING); + trigger_error($lang['BBCODE_OPEN_ENDED_TAG'] . page_back_link($page_action), E_USER_WARNING); } if (strlen($data['bbcode_tag']) > 16) { - trigger_error($lang['BBCODE_TAG_TOO_LONG'] . adm_back_link($page_action), E_USER_WARNING); + trigger_error($lang['BBCODE_TAG_TOO_LONG'] . page_back_link($page_action), E_USER_WARNING); } if (strlen($data['bbcode_match']) > 4000) { - trigger_error($lang['BBCODE_TAG_DEF_TOO_LONG'] . adm_back_link($page_action), E_USER_WARNING); + trigger_error($lang['BBCODE_TAG_DEF_TOO_LONG'] . page_back_link($page_action), E_USER_WARNING); } if (strlen($data['bbcode_helpline']) > 255) { - trigger_error($lang['BBCODE_HELPLINE_TOO_LONG'] . adm_back_link($page_action), E_USER_WARNING); + trigger_error($lang['BBCODE_HELPLINE_TOO_LONG'] . page_back_link($page_action), E_USER_WARNING); } if(($data['bbcode_match'] == '') && ($data['bbcode_tpl'] == '')) diff --git a/adm/admin_board_clearcache.php b/adm/admin_board_clearcache.php index 68b90752..911c9dfe 100644 --- a/adm/admin_board_clearcache.php +++ b/adm/admin_board_clearcache.php @@ -36,6 +36,13 @@ message_die(GENERAL_MESSAGE, $meta_tag . $message); } + // Clean also data in global cache + $cache_data = array('config', 'config_plugins', 'config_plugins_config', 'config_style', 'newest_user'); + foreach ($cache_data as $cache_data_section) + { + $cache->destroy($cache_data_section); + } + // Make sure cron is unlocked... just to make sure that it didn't hang somewhere in time... :-) set_config('cron_lock', '0'); set_config('cron_lock_hour', 0); diff --git a/adm/admin_cms_auth.php b/adm/admin_cms_auth.php index 5dc5d56e..21cd32b6 100644 --- a/adm/admin_cms_auth.php +++ b/adm/admin_cms_auth.php @@ -120,7 +120,6 @@ $template->set_filenames(array('body' => ADM_TPL . 'user_select_body.tpl')); $template->assign_vars(array( - 'L_FIND_USERNAME' => $lang['Find_username'], 'U_SEARCH_USER' => append_sid('../' . CMS_PAGE_SEARCH . '?mode=searchuser') ) ); diff --git a/adm/admin_groups.php b/adm/admin_groups.php index 7b861751..b17a5a14 100644 --- a/adm/admin_groups.php +++ b/adm/admin_groups.php @@ -148,7 +148,6 @@ 'L_GROUP_RANK' => $lang['group_rank'], 'L_GROUP_COLOR' => $lang['group_color'], 'L_GROUP_LEGEND' => $lang['group_legend'], - 'L_FIND_USERNAME' => $lang['Find_username'], 'L_GROUP_STATUS' => $lang['group_status'], 'L_GROUP_OPEN' => $lang['group_open'], 'L_GROUP_CLOSED' => $lang['group_closed'], diff --git a/adm/admin_pa_ug_auth.php b/adm/admin_pa_ug_auth.php index aea71232..41d15eb9 100644 --- a/adm/admin_pa_ug_auth.php +++ b/adm/admin_pa_ug_auth.php @@ -803,7 +803,6 @@ if ($mode == 'user' || $mode == 'glob_user') { $template->assign_vars(array( - 'L_FIND_USERNAME' => $lang['Find_username'], 'U_SEARCH_USER' => append_sid('../' . CMS_PAGE_SEARCH . '?mode=searchuser') ) diff --git a/adm/admin_plugins.php b/adm/admin_plugins.php index 4489e2fb..c4ae8f86 100644 --- a/adm/admin_plugins.php +++ b/adm/admin_plugins.php @@ -23,19 +23,6 @@ define('THIS_PAGE', 'admin_plugins.' . PHP_EXT); -// NEW AUTH - BEGIN -// To be removed when auth integration has been completed! -if (!class_exists('auth')) -{ - @include(IP_ROOT_PATH . 'includes/class_auth.' . PHP_EXT); -} -if (empty($auth)) -{ - $auth = new auth(); - $auth->acl($user->data); -} -// NEW AUTH - END - // FORM CLASS - BEGIN include(IP_ROOT_PATH . 'includes/class_form.' . PHP_EXT); $class_form = new class_form(); diff --git a/adm/admin_postcount.php b/adm/admin_postcount.php index 6eb1a86c..3a0c7422 100644 --- a/adm/admin_postcount.php +++ b/adm/admin_postcount.php @@ -82,7 +82,6 @@ 'L_USER_EXPLAIN' => $lang['Post_count_explain'], 'L_USER_SELECT' => $lang['Select_a_User'], 'L_LOOK_UP' => $lang['Look_up_user'], - 'L_FIND_USERNAME' => $lang['Find_username'], 'U_SEARCH_USER' => append_sid('./../' . CMS_PAGE_SEARCH . '?mode=searchuser'), diff --git a/adm/admin_prune_users_loop.php b/adm/admin_prune_users_loop.php index d4984a92..31cc2631 100644 --- a/adm/admin_prune_users_loop.php +++ b/adm/admin_prune_users_loop.php @@ -30,12 +30,6 @@ @set_time_limit(180); -// Start session management -$user->session_begin(); -//$auth->acl($user->data); -$user->setup(); -// End session management - if ($user->data['user_level'] != ADMIN) { message_die(GENERAL_ERROR, $lang['Not_Authorized']); diff --git a/adm/admin_ug_auth.php b/adm/admin_ug_auth.php index 3bce9405..3b6d73a2 100644 --- a/adm/admin_ug_auth.php +++ b/adm/admin_ug_auth.php @@ -970,7 +970,6 @@ function check_auth($type, $key, $u_access, $is_admin) if ($mode == 'user') { $template->assign_vars(array( - 'L_FIND_USERNAME' => $lang['Find_username'], 'U_SEARCH_USER' => append_sid('../' . CMS_PAGE_SEARCH . '?mode=searchuser') ) ); diff --git a/adm/admin_user_ban.php b/adm/admin_user_ban.php index ae9fc66f..1556f7f7 100644 --- a/adm/admin_user_ban.php +++ b/adm/admin_user_ban.php @@ -375,7 +375,6 @@ 'L_UNBAN_EMAIL_EXPLAIN' => $lang['Unban_email_explain'], 'L_USERNAME' => $lang['Username'], 'L_LOOK_UP' => $lang['Look_up_User'], - 'L_FIND_USERNAME' => $lang['Find_username'], 'U_SEARCH_USER' => append_sid(IP_ROOT_PATH . CMS_PAGE_SEARCH . '?mode=searchuser'), 'S_UNBAN_USERLIST_SELECT' => $select_userlist, diff --git a/adm/admin_user_bantron.php b/adm/admin_user_bantron.php index a34e39ef..ecd965f1 100644 --- a/adm/admin_user_bantron.php +++ b/adm/admin_user_bantron.php @@ -382,7 +382,6 @@ { $template->assign_block_vars('username_row', array( 'L_USERNAME' => $lang['Username'], - 'L_FIND_USERNAME' => $lang['Find_username'], 'U_SEARCH_USER' => append_sid(IP_ROOT_PATH . CMS_PAGE_SEARCH . '?mode=searchuser'), 'USERNAME' => $row['username'] ) @@ -465,7 +464,6 @@ $template->assign_block_vars('username_row', array( 'L_USERNAME' => $lang['Username'], - 'L_FIND_USERNAME' => $lang['Find_username'], 'U_SEARCH_USER' => append_sid(IP_ROOT_PATH . CMS_PAGE_SEARCH . '?mode=searchuser') ) ); diff --git a/adm/admin_userlist.php b/adm/admin_userlist.php index 674f1169..178dd3d3 100644 --- a/adm/admin_userlist.php +++ b/adm/admin_userlist.php @@ -338,7 +338,7 @@ $group_name = $group_name_row['group_name']; $script_name = preg_replace('/^\/?(.*?)\/?$/', "\\1", trim($config['script_path'])); - $script_name = ($script_name != '') ? $script_name . '/groupcp.' . PHP_EXT : 'groupcp.' . PHP_EXT; + $script_name = (($script_name != '') ? $script_name . '/' : '') . CMS_PAGE_GROUP_CP; $server_name = trim($config['server_name']); $server_protocol = ($config['cookie_secure']) ? 'https://' : 'http://'; $server_port = ($config['server_port'] <> 80) ? ':' . trim($config['server_port']) . '/' : '/'; @@ -594,7 +594,7 @@ 'GROUP_NAME' => $group_row['group_name'], 'GROUP_COLOR' => 'style="font-weight: bold; text-decoration: none;' . (($group_row['group_color'] != '') ? ('color: ' . $group_row['group_color'] . ';') : '') . '"', 'GROUP_STATUS' => $group_status, - 'U_GROUP' => append_sid(IP_ROOT_PATH . 'groupcp.' . PHP_EXT . '?' . POST_GROUPS_URL . '=' . $group_row['group_id']) + 'U_GROUP' => append_sid(IP_ROOT_PATH . CMS_PAGE_GROUP_CP . '?' . POST_GROUPS_URL . '=' . $group_row['group_id']) ) ); $g++; diff --git a/adm/admin_users.php b/adm/admin_users.php index 5fc07e3a..63dc9a9f 100644 --- a/adm/admin_users.php +++ b/adm/admin_users.php @@ -1881,7 +1881,6 @@ 'L_USER_EXPLAIN' => $lang['User_admin_explain'], 'L_USER_SELECT' => $lang['Select_a_User'], 'L_LOOK_UP' => $lang['Look_up_user'], - 'L_FIND_USERNAME' => $lang['Find_username'], 'U_SEARCH_USER' => append_sid('../' . CMS_PAGE_SEARCH . '?mode=searchuser'), diff --git a/adm/cookie.php b/adm/cookie.php index 6c72e6c5..0c22b5c2 100644 --- a/adm/cookie.php +++ b/adm/cookie.php @@ -26,7 +26,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/adm/ip_header.php b/adm/ip_header.php index dc8ca464..f4f97e46 100644 --- a/adm/ip_header.php +++ b/adm/ip_header.php @@ -19,7 +19,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/adm/pagestart.php b/adm/pagestart.php index b133d7e3..735bec26 100644 --- a/adm/pagestart.php +++ b/adm/pagestart.php @@ -34,7 +34,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/ajax.php b/ajax.php index 46184d03..17778629 100644 --- a/ajax.php +++ b/ajax.php @@ -26,7 +26,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/ajax_chat.php b/ajax_chat.php index 8c41681b..830d0ab3 100644 --- a/ajax_chat.php +++ b/ajax_chat.php @@ -22,7 +22,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/ajax_shoutbox.php b/ajax_shoutbox.php index 825ecb39..50de27bd 100644 --- a/ajax_shoutbox.php +++ b/ajax_shoutbox.php @@ -23,7 +23,7 @@ // Start session management $user->session_begin(false); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/ajax_upload.php b/ajax_upload.php index e0047ce8..4f361e3a 100644 --- a/ajax_upload.php +++ b/ajax_upload.php @@ -15,7 +15,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/album.php b/album.php index f5d82f29..47a2550b 100644 --- a/album.php +++ b/album.php @@ -22,7 +22,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/album_allpics.php b/album_allpics.php index 6c38631c..aae0bab0 100644 --- a/album_allpics.php +++ b/album_allpics.php @@ -15,7 +15,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/album_avatar.php b/album_avatar.php index a669664b..56095dfe 100644 --- a/album_avatar.php +++ b/album_avatar.php @@ -23,7 +23,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/album_cat.php b/album_cat.php index 82dd2f2d..2589db4c 100644 --- a/album_cat.php +++ b/album_cat.php @@ -22,7 +22,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management @@ -193,7 +193,7 @@ { for ($j = 0; $j < sizeof($grouprows); $j++) { - $group_link = '' . $grouprows[$j]['group_name'] . ''; + $group_link = '' . $grouprows[$j]['group_name'] . ''; $moderators_list .= ($moderators_list == '') ? $group_link : ', ' . $group_link; } diff --git a/album_comment_delete.php b/album_comment_delete.php index a47d2653..01d0b315 100644 --- a/album_comment_delete.php +++ b/album_comment_delete.php @@ -22,7 +22,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/album_comment_edit.php b/album_comment_edit.php index d426c2ff..c64d0a7c 100644 --- a/album_comment_edit.php +++ b/album_comment_edit.php @@ -22,7 +22,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/album_delete.php b/album_delete.php index 31c71f17..81f9872b 100644 --- a/album_delete.php +++ b/album_delete.php @@ -22,7 +22,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/album_download.php b/album_download.php index b5ef9d16..36298b73 100644 --- a/album_download.php +++ b/album_download.php @@ -23,7 +23,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/album_edit.php b/album_edit.php index d0982e83..3c38da63 100644 --- a/album_edit.php +++ b/album_edit.php @@ -22,7 +22,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/album_hotornot.php b/album_hotornot.php index 37b3c8f1..eae31874 100644 --- a/album_hotornot.php +++ b/album_hotornot.php @@ -22,7 +22,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/album_modcp.php b/album_modcp.php index 98df111e..b63b8d93 100644 --- a/album_modcp.php +++ b/album_modcp.php @@ -22,7 +22,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/album_nuffload_pbar.php b/album_nuffload_pbar.php index 7ae01b2a..5c1a1cc0 100644 --- a/album_nuffload_pbar.php +++ b/album_nuffload_pbar.php @@ -22,7 +22,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/album_otf.php b/album_otf.php index 681e8bfc..b6e50fb2 100644 --- a/album_otf.php +++ b/album_otf.php @@ -15,7 +15,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/album_otf_thumbnail.php b/album_otf_thumbnail.php index abe0dff4..a0fde4f0 100644 --- a/album_otf_thumbnail.php +++ b/album_otf_thumbnail.php @@ -15,7 +15,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/album_personal_cat_admin.php b/album_personal_cat_admin.php index e79a1a80..14fe25fb 100644 --- a/album_personal_cat_admin.php +++ b/album_personal_cat_admin.php @@ -23,7 +23,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/album_personal_index.php b/album_personal_index.php index 35855c50..2545cf67 100644 --- a/album_personal_index.php +++ b/album_personal_index.php @@ -22,7 +22,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/album_pic.php b/album_pic.php index b92fae0b..ca79053e 100644 --- a/album_pic.php +++ b/album_pic.php @@ -22,7 +22,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/album_pic_nuffed.php b/album_pic_nuffed.php index 4d9b16ff..8d87c1ad 100644 --- a/album_pic_nuffed.php +++ b/album_pic_nuffed.php @@ -15,7 +15,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/album_picm.php b/album_picm.php index 56bfdd37..8b71b5de 100644 --- a/album_picm.php +++ b/album_picm.php @@ -23,7 +23,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/album_rdf.php b/album_rdf.php index d83dd9e4..f3253ff3 100644 --- a/album_rdf.php +++ b/album_rdf.php @@ -23,7 +23,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/album_rss.php b/album_rss.php index 63113b61..b8f1ab8d 100644 --- a/album_rss.php +++ b/album_rss.php @@ -23,7 +23,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/album_search.php b/album_search.php index 6623eeaf..e0bc47b1 100644 --- a/album_search.php +++ b/album_search.php @@ -22,7 +22,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/album_showpage.php b/album_showpage.php index 54747cc0..0f5f47b8 100644 --- a/album_showpage.php +++ b/album_showpage.php @@ -24,7 +24,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/album_thumbnail.php b/album_thumbnail.php index a5ea7a14..17b485c1 100644 --- a/album_thumbnail.php +++ b/album_thumbnail.php @@ -22,7 +22,7 @@ // Start session management $user->session_begin(false); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/album_upload.php b/album_upload.php index cc7cf452..5b0dbb39 100644 --- a/album_upload.php +++ b/album_upload.php @@ -25,7 +25,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/attach_rules.php b/attach_rules.php index 82d548d6..dae72ad0 100644 --- a/attach_rules.php +++ b/attach_rules.php @@ -22,7 +22,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/attachments.php b/attachments.php index 2e52288b..eeecdbbd 100644 --- a/attachments.php +++ b/attachments.php @@ -22,7 +22,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/bbcb_mg_cp.php b/bbcb_mg_cp.php index b9b525b0..ea16f725 100644 --- a/bbcb_mg_cp.php +++ b/bbcb_mg_cp.php @@ -15,7 +15,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/bin.php b/bin.php index 927e57ac..f39de19b 100644 --- a/bin.php +++ b/bin.php @@ -87,14 +87,14 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management // session id check if ($sid == '' || ($sid != $user->data['session_id'])) { - message_die(GENERAL_ERROR, 'Invalid_session'); + message_die(GENERAL_ERROR, 'INVALID_SESSION'); } // Start auth check diff --git a/birthday_popup.php b/birthday_popup.php index 1bc44327..697af2b5 100644 --- a/birthday_popup.php +++ b/birthday_popup.php @@ -15,7 +15,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/calendar.php b/calendar.php index 51826c3d..9031d1aa 100644 --- a/calendar.php +++ b/calendar.php @@ -29,7 +29,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/calendar_scheduler.php b/calendar_scheduler.php index a697cb5b..720b609a 100644 --- a/calendar_scheduler.php +++ b/calendar_scheduler.php @@ -26,7 +26,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/card.php b/card.php index 88df9505..5e10827e 100644 --- a/card.php +++ b/card.php @@ -83,7 +83,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/cms.php b/cms.php index 863fa925..4a283f2e 100644 --- a/cms.php +++ b/cms.php @@ -24,7 +24,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management @@ -68,6 +68,8 @@ setup_extra_lang(array('lang_admin', 'lang_cms', 'lang_blocks', 'lang_permissions')); +$page_title = $lang['CMS_TITLE']; + $cms_type = 'cms_standard'; $preview_block = isset($_POST['preview']) ? true : false; @@ -450,308 +452,80 @@ //if (($cms_admin->mode == 'auth') && ($cms_auth->acl_get('cms_edit', $cms_admin->cms_id))) if ($cms_admin->mode == 'auth') { - $template_to_parse = CMS_TPL . 'cms_auth_body.tpl'; - $cms_role_langs = cms_role_langs(); - - if($cms_admin->user_id) - { - $cms_admin->s_hidden_fields .= ''; - } - - switch ($cms_admin->action) - { - case 'addrole': - case 'editrole': - $cms_admin->s_hidden_fields .= ''; - break; - default: - $cms_admin->s_hidden_fields .= ''; - break; - } - - if($cms_admin->action == 'save') - { - $class_db->main_db_table = ACL_USERS_TABLE; - - $s_in_role = request_var('in_role', 0) ? true : false; - - if(($cms_admin->user_id) || isset($_POST['username'])) - { - $sql_where = $s_in_role ? ' AND auth_role_id <> 0' : ' AND auth_role_id = 0'; + $css_temp = array('cms_auth.css'); + $template->css_include = array_merge($template->css_include, $css_temp); + unset($css_temp); - if ($cms_admin->user_id) - { - $sql = "DELETE FROM " . ACL_USERS_TABLE . " WHERE user_id = '" . $cms_admin->user_id . "' AND forum_id = '" . $cms_admin->cms_id . "' " . $sql_where . ""; - $result = $db->sql_query($sql); - } - else - { - $this_userdata = get_userdata(request_var('username', ''), true); - - if (!is_array($this_userdata)) - { - if (!defined('STATUS_404')) define('STATUS_404', true); - message_die(GENERAL_MESSAGE, 'NO_USER'); - } - - if ($this_userdata['user_id'] == $user->data['user_id']) - { - redirect(append_sid($cms_admin->root . '?mode=auth')); - } - $cms_admin->user_id = $this_userdata['user_id']; - } - - $data = array( - 'user_id' => $cms_admin->user_id, - 'forum_id' => $cms_admin->cms_id, - ); - - if($s_in_role) - { - $sql = "SELECT * FROM " . ACL_USERS_TABLE . " WHERE user_id = '" . $cms_admin->user_id . "' AND forum_id = '" . $cms_admin->cms_id . "' AND auth_role_id <> 0"; - $result = $db->sql_query($sql); - $row = $db->sql_fetchrow($result); - $db->sql_freeresult($result); - - if(empty($row)) - { - $new_role = isset($_POST['role']) ? request_var('role', 0) : false; - if($new_role) - { - $data['auth_role_id'] = $new_role; - $class_db->insert_item($data); - } - } - } - else - { - $auth_array = array(); - //$auth_array = $_POST['auth']; - $auth_array = request_var('auth', array(0)); - //die(print_r($auth_array)); - $data['auth_setting'] = '1'; - - if (!empty($auth_array)) - { - foreach($auth_array as $k => $update_data) - { - $data['auth_option_id'] = $k; - $class_db->insert_item($data); - } - } - } - } - redirect(append_sid($cms_admin->root . '?mode=auth')); - } - - if(($cms_admin->action == 'delete') && ($cms_admin->user_id) && ($user->data['user_id'] != $cms_admin->user_id)) - { - if(!isset($_POST['confirm'])) - { - $template->assign_vars(array( - 'L_YES' => $lang['YES'], - 'L_NO' => $lang['NO'], - - 'MESSAGE_TITLE' => $lang['Confirm'], - 'MESSAGE_TEXT' => $lang['Confirm_delete_item'], - - 'S_CONFIRM_ACTION' => append_sid($cms_admin->root . $cms_admin->s_append_url), - 'S_HIDDEN_FIELDS' => $cms_admin->s_hidden_fields - ) - ); - full_page_generation(CMS_TPL . 'confirm_body.tpl', $lang['Confirm'], '', ''); - } - else - { - if($cms_admin->user_id != 0) - { - $sql = "DELETE FROM " . ACL_USERS_TABLE . " WHERE user_id = '" . $cms_admin->user_id . "' AND forum_id = '" . $cms_admin->cms_id . "' AND auth_role_id <>0"; - $result = $db->sql_query($sql); - } - redirect(append_sid($cms_admin->root . '?mode=auth')); - } - } - - $template->assign_vars(array( - 'U_AUTH_ADD' => append_sid($cms_admin->root . '?mode=auth&action=add'), - 'U_AUTH_ADDROLE' => append_sid($cms_admin->root . '?mode=auth&action=addrole'), - 'S_AUTH_ACTION' => append_sid($cms_admin->root . $cms_admin->s_append_url), - 'S_HIDDEN_FIELDS' => $cms_admin->s_hidden_fields - ) - ); - - if ($cms_admin->action == 'addrole') - { - $row_class = ($row_class == $theme['td_class1']) ? $theme['td_class2'] : $theme['td_class1']; - $input = ''; - $input .= '' . $lang['Find_username'] . ''; - - $cms_roles_select = $class_form->build_select_box('role', false, $cms_role_langs['ID'], $cms_role_langs['NAME']); - - $template->assign_block_vars('roles', array( - 'ROW_CLASS' => $row_class, - 'USERNAME' => $input, - 'CMS_ROLES' => $cms_roles_select, - 'BUTTON' => '', - ) - ); - } + include_once(IP_ROOT_PATH . 'includes/functions_admin_phpbb3.' . PHP_EXT); - $sql = "SELECT au.* - FROM " . ACL_USERS_TABLE . " au, " . ACL_ROLES_TABLE . " ar - WHERE au.forum_id = '" . $cms_admin->cms_id . "' - AND au.auth_role_id = ar.role_id - AND au.auth_role_id <> 0 - AND ar.role_type LIKE 'cms_%'"; - $result = $db->sql_query($sql); - $rows = $db->sql_fetchrowset($result); - $db->sql_freeresult($result); + $roles_admin = request_var('roles_admin', 0); - if (!empty($rows)) + if (empty($roles_admin)) { - foreach($rows as $data) - { - $row_class = ($row_class == $theme['td_class1']) ? $theme['td_class2'] : $theme['td_class1']; + include_once(IP_ROOT_PATH . 'includes/class_cms_permissions.' . PHP_EXT); + $cms_permissions = new cms_permissions(); - if (($cms_admin->action == 'editrole') && ($data['user_id'] == $cms_admin->user_id) && ($user->data['user_id'] != $cms_admin->user_id)) - { - $cms_role = $class_form->build_select_box('role', $data['auth_role_id'], $cms_role_langs['ID'], $cms_role_langs['NAME']); - $button = ''; - } - else - { - $cms_role = '
' . $cms_role_langs['NAME_ARRAY'][$data['auth_role_id']] . '
'; - $button_link_edit = append_sid($cms_admin->root . '?mode=auth&action=editrole&user_id=' . $data['user_id']); - $button_link_delete = append_sid($cms_admin->root . '?mode=auth&action=delete&user_id=' . $data['user_id']); - if ($data['user_id'] == $user->data['user_id']) - { - $button = ''; - } - else - { - $button = '' . strtoupper($lang['B_EDIT']) . ''; - $button .= '' . strtoupper($lang['B_DELETE']) . ''; - } - } + $pmode = request_var('pmode', ''); + $pmode_array = array('intro', 'setting_cms_user_global', 'setting_cms_group_global', 'setting_plugins_user_global', 'setting_plugins_group_global', 'setting_user_global', 'setting_group_global', 'setting_user_local', 'setting_group_local', 'setting_admin_global', 'setting_mod_global', 'view_admin_global', 'view_user_global', 'view_mod_global'); + $pmode = in_array($pmode, $pmode_array) ? $pmode : $pmode_array[0]; + $cms_permissions->main(0, $pmode); - $template->assign_block_vars('roles', array( - 'ROW_CLASS' => $row_class, - 'USERNAME' => colorize_username($data['user_id']), - 'CMS_ROLES' => $cms_role, - 'BUTTON' => $button, - ) - ); - } + $template_to_parse = CMS_TPL . $cms_permissions->tpl_name; + $page_title = $lang[$cms_permissions->page_title]; } - elseif ($cms_admin->action != 'addrole') - { - $template->assign_var('NO_ROLE', true); - } - - $cms_auth_langs_array = $cms_auth->auth_langs('cms_'); - - $row_class = $theme['td_class1']; - - if ($cms_admin->action == 'add') + else { - $button = ''; - $input = ''; - $input .= '' . $lang['Find_username'] . ''; - - $template->assign_block_vars('users', array( - 'ROW_CLASS' => $row_class, - 'USERNAME' => $input, - 'BUTTON' => $button, - ) - ); + include_once(IP_ROOT_PATH . 'includes/class_cms_permissions_roles.' . PHP_EXT); + $cms_permissions_roles = new cms_permissions_roles(); - foreach($cms_auth_langs_array as $k => $data) - { - $auth_checkbox = ''; - - $template->assign_block_vars('users.auth', array( - 'AUTH_CHECKBOX' => $auth_checkbox, - 'AUTH_CLASS' => '', - 'AUTH_NAME' => $cms_auth_langs_array[$k], - ) - ); - } - } + $rmode = request_var('rmode', ''); + $rmode_array = array('admin_roles', 'cms_roles', 'mod_roles', 'plugins_roles', 'user_roles'); + $rmode = in_array($rmode, $rmode_array) ? $rmode : $rmode_array[0]; + $cms_permissions_roles->main(0, $rmode); - $sql = "SELECT * FROM " . ACL_USERS_TABLE . " WHERE forum_id = '" . $cms_admin->cms_id . "' AND auth_role_id = 0 ORDER BY user_id"; - $result = $db->sql_query($sql); - while($row = $db->sql_fetchrow($result)) - { - $user_auth_array[$row['user_id']][$row['auth_option_id']] = $row['auth_setting']; + $template_to_parse = CMS_TPL . $cms_permissions_roles->tpl_name; + $page_title = $lang[$cms_permissions_roles->page_title]; } - $db->sql_freeresult($result); - if(!empty($user_auth_array)) - { - foreach($user_auth_array as $id => $auth_data) - { - $row_class = ($row_class == $theme['td_class1']) ? $theme['td_class2'] : $theme['td_class1']; - if(($cms_admin->action == 'edit') && ($cms_admin->user_id == $id) && ($user->data['user_id'] != $cms_admin->user_id)) - { - $button = ''; - } - else - { - $button_link = append_sid($cms_admin->root . '?mode=auth&action=edit&user_id=' . $id); - $button = '' . strtoupper($lang['B_EDIT']) . ''; - } - - $template->assign_block_vars('users', array( - 'ROW_CLASS' => $row_class, - 'USERNAME' => colorize_username($id), - 'BUTTON' => $button, - ) - ); - - foreach($cms_auth_langs_array as $k => $data) - { - if (($cms_admin->action == 'edit') && $cms_admin->user_id == $id) - { - $is_checked = $auth_data[$k] ? 'checked="checked"' : ''; - $auth_checkbox = ''; - $auth_class = ''; - } - else - { - $auth_checkbox = ''; - $auth_class = $auth_data[$k] ? 'auth_yes' : 'auth_no'; - } - - $template->assign_block_vars('users.auth', array( - 'AUTH_CHECKBOX' => $auth_checkbox, - 'AUTH_CLASS' => $auth_class, - 'AUTH_NAME' => $cms_auth_langs_array[$k], - ) - ); - } - } - } - elseif ($cms_admin->action != 'add') - { - $template->assign_var('NO_AUTH', true); - } + $template->assign_vars(array( + 'S_CMS_ACTION' => append_sid($cms_admin->root . '?mode=auth&pmode=' . $pmode), + 'U_CMS_BASE_URL' => append_sid($cms_admin->root . '?mode=auth'), + +/* + 'ICON_MOVE_UP' => '' . $lang['MOVE_UP'] . '', + 'ICON_MOVE_UP_DISABLED' => '' . $lang['MOVE_UP'] . '', + 'ICON_MOVE_DOWN' => '' . $lang['MOVE_DOWN'] . '', + 'ICON_MOVE_DOWN_DISABLED' => '' . $lang['MOVE_DOWN'] . '', + 'ICON_EDIT' => '' . $lang['EDIT'] . '', + 'ICON_EDIT_DISABLED' => '' . $lang['EDIT'] . '', + 'ICON_DELETE' => '' . $lang['DELETE'] . '', + 'ICON_DELETE_DISABLED' => '' . $lang['DELETE'] . '', + 'ICON_SYNC' => '' . $lang['RESYNC'] . '', + 'ICON_SYNC_DISABLED' => '' . $lang['RESYNC'] . '', +*/ - foreach ($cms_role_langs['ID'] as $id_data) - { - $template->assign_block_vars('roles_desc', array( - 'ROLE_NAME' => $cms_role_langs['NAME_ARRAY'][$id_data], - 'ROLE_DESC' => $cms_role_langs['DESC_ARRAY'][$id_data], - ) - ); - } + 'ICON_MOVE_UP' => '' . $lang['MOVE_UP'] . '', + 'ICON_MOVE_UP_DISABLED' => '' . $lang['MOVE_UP'] . '', + 'ICON_MOVE_DOWN' => '' . $lang['MOVE_DOWN'] . '', + 'ICON_MOVE_DOWN_DISABLED' => '' . $lang['MOVE_DOWN'] . '', + 'ICON_EDIT' => '' . $lang['EDIT'] . '', + 'ICON_EDIT_DISABLED' => '' . $lang['EDIT'] . '', + 'ICON_DELETE' => '' . $lang['DELETE'] . '', + 'ICON_DELETE_DISABLED' => '' . $lang['DELETE'] . '', + 'ICON_SYNC' => '' . $lang['RESYNC'] . '', + 'ICON_SYNC_DISABLED' => '' . $lang['RESYNC'] . '', + + 'IMG_USER_SEARCH' => $images['cms_icon_search'], + ) + ); } -if (($cms_admin->mode == false)) +if (empty($cms_admin->mode)) { $template_to_parse = CMS_TPL . 'cms_index_body.tpl'; $template->assign_var('CMS_PAGE_TITLE', false); } -full_page_generation($template_to_parse, $lang['CMS_TITLE'], '', ''); +full_page_generation($template_to_parse, $page_title, '', ''); ?> \ No newline at end of file diff --git a/cms_ads.php b/cms_ads.php index d60bbd28..d6033e20 100644 --- a/cms_ads.php +++ b/cms_ads.php @@ -25,7 +25,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/cms_ajax.php b/cms_ajax.php index fd92e94b..08722a7a 100644 --- a/cms_ajax.php +++ b/cms_ajax.php @@ -21,7 +21,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/cms_db_update.php b/cms_db_update.php index 15c45f28..6f9f338b 100644 --- a/cms_db_update.php +++ b/cms_db_update.php @@ -21,7 +21,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/cms_menu.php b/cms_menu.php index 43f6f637..ebcb499e 100644 --- a/cms_menu.php +++ b/cms_menu.php @@ -27,7 +27,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/common.php b/common.php index d8c05459..51bad977 100644 --- a/common.php +++ b/common.php @@ -181,6 +181,7 @@ function deregister_globals() require(IP_ROOT_PATH . 'includes/template.' . PHP_EXT); require(IP_ROOT_PATH . 'includes/sessions.' . PHP_EXT); require(IP_ROOT_PATH . 'includes/auth.' . PHP_EXT); +require(IP_ROOT_PATH . 'includes/class_auth.' . PHP_EXT); require(IP_ROOT_PATH . 'includes/class_cache.' . PHP_EXT); require(IP_ROOT_PATH . 'includes/class_cache_extends.' . PHP_EXT); require(IP_ROOT_PATH . 'includes/functions.' . PHP_EXT); @@ -197,6 +198,7 @@ function deregister_globals() $cache = new ip_cache(); $class_settings = new class_settings(); $user = new user(); +$auth = new auth(); $ip_cms = new ip_cms(); $ip_cms->init_vars(); diff --git a/contact_us.php b/contact_us.php index c55b72ae..649d77f9 100644 --- a/contact_us.php +++ b/contact_us.php @@ -20,7 +20,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/credits.php b/credits.php index f487a759..3995b0c9 100644 --- a/credits.php +++ b/credits.php @@ -22,7 +22,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/cron.php b/cron.php index 4f1aecf0..18bf6682 100644 --- a/cron.php +++ b/cron.php @@ -29,7 +29,7 @@ // Do not update users last page entry // Start session management $user->session_begin(false); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/ct_login_history.php b/ct_login_history.php index deb17fb1..a6d7dd9d 100644 --- a/ct_login_history.php +++ b/ct_login_history.php @@ -27,7 +27,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/delete_users.php b/delete_users.php index fee4e970..5af56514 100644 --- a/delete_users.php +++ b/delete_users.php @@ -60,7 +60,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/digests.php b/digests.php index 8b3f2d20..4f85353b 100644 --- a/digests.php +++ b/digests.php @@ -31,7 +31,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/dload.php b/dload.php index 492be180..21ccb8cf 100644 --- a/dload.php +++ b/dload.php @@ -18,7 +18,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/download.php b/download.php index 554a3251..41418417 100644 --- a/download.php +++ b/download.php @@ -243,7 +243,7 @@ function send_file_to_browser($attachment, $upload_dir) // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/download_post.php b/download_post.php index e195d0ca..afb39fb8 100644 --- a/download_post.php +++ b/download_post.php @@ -16,7 +16,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/drafts.php b/drafts.php index e5eb59a9..001cb8ae 100644 --- a/drafts.php +++ b/drafts.php @@ -15,7 +15,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/edit_post_details.php b/edit_post_details.php index 9558d90f..3c4b520d 100644 --- a/edit_post_details.php +++ b/edit_post_details.php @@ -16,7 +16,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management @@ -254,7 +254,6 @@ 'L_TIME' => ($topic_post_time == 'topic') ? $lang['Topic_time_xs'] : $lang['Post_time'], 'L_SUBMIT' => $lang['Submit'], 'L_RESET' => $lang['Reset'], - 'L_FIND_USERNAME' => $lang['Find_username'], 'U_SEARCH_USER' => append_sid(CMS_PAGE_SEARCH . '?mode=searchuser'), diff --git a/errors.php b/errors.php index b60e7e69..94dd38f6 100644 --- a/errors.php +++ b/errors.php @@ -20,7 +20,7 @@ // Start session management $user->session_begin(false); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/faq.php b/faq.php index e86f99a1..d6b63b84 100644 --- a/faq.php +++ b/faq.php @@ -22,7 +22,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/features.php b/features.php index b4f99e56..021adbad 100644 --- a/features.php +++ b/features.php @@ -15,7 +15,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/forum.php b/forum.php index 5310727b..fe53520f 100644 --- a/forum.php +++ b/forum.php @@ -23,7 +23,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/groupcp.php b/groupcp.php index c1bfd9a5..30699308 100644 --- a/groupcp.php +++ b/groupcp.php @@ -24,7 +24,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management @@ -860,7 +860,6 @@ 'L_SELECT' => $lang['Select'], 'L_REMOVE_SELECTED' => $lang['Remove_selected'], 'L_ADD_MEMBER' => $lang['Add_member'], - 'L_FIND_USERNAME' => $lang['Find_username'], 'L_COLORIZE_ALL' => $lang['Colorize_All'], 'L_COLORIZE_SELECTED' => $lang['Colorize_Selected'], diff --git a/gsearch.php b/gsearch.php index 8a3fc46c..7acc73e8 100644 --- a/gsearch.php +++ b/gsearch.php @@ -23,7 +23,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/includes/album_mod/album_hierarchy_sql.php b/includes/album_mod/album_hierarchy_sql.php index 1fe8e681..8991bfad 100644 --- a/includes/album_mod/album_hierarchy_sql.php +++ b/includes/album_mod/album_hierarchy_sql.php @@ -881,7 +881,7 @@ function album_get_moderator_info($cat) { for ($j = 0; $j < sizeof($grouprows); $j++) { - $group_link = '' . $grouprows[$j]['group_name'] . ''; + $group_link = '' . $grouprows[$j]['group_name'] . ''; $moderators .= ($moderators == '') ? $group_link : ', ' . $group_link; } } diff --git a/includes/bb_usage_stats_coldesc.php b/includes/bb_usage_stats_coldesc.php index dd38f6f3..5b47794f 100644 --- a/includes/bb_usage_stats_coldesc.php +++ b/includes/bb_usage_stats_coldesc.php @@ -23,7 +23,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/includes/captcha/plugins/phpbb_captcha_gd_plugin.php b/includes/captcha/plugins/phpbb_captcha_gd_plugin.php index 10c6c645..2d3b8fa0 100644 --- a/includes/captcha/plugins/phpbb_captcha_gd_plugin.php +++ b/includes/captcha/plugins/phpbb_captcha_gd_plugin.php @@ -124,11 +124,11 @@ function acp_page($id, &$module) } //add_log('admin', 'LOG_CONFIG_VISUAL'); - trigger_error($lang['CONFIG_UPDATED'] . adm_back_link($module->u_action)); + trigger_error($lang['CONFIG_UPDATED'] . page_back_link($module->u_action)); } else if ($submit) { - trigger_error($lang['FORM_INVALID'] . adm_back_link($module->u_action)); + trigger_error($lang['FORM_INVALID'] . page_back_link($module->u_action)); } else { diff --git a/includes/captcha/plugins/phpbb_captcha_gd_wave_plugin.php b/includes/captcha/plugins/phpbb_captcha_gd_wave_plugin.php index 4251dcca..24282390 100644 --- a/includes/captcha/plugins/phpbb_captcha_gd_wave_plugin.php +++ b/includes/captcha/plugins/phpbb_captcha_gd_wave_plugin.php @@ -76,7 +76,7 @@ function acp_page($id, &$module) { global $config, $db, $template, $lang; - trigger_error($lang['CAPTCHA_NO_OPTIONS'] . adm_back_link($module->u_action)); + trigger_error($lang['CAPTCHA_NO_OPTIONS'] . page_back_link($module->u_action)); } } diff --git a/includes/captcha/plugins/phpbb_captcha_nogd_plugin.php b/includes/captcha/plugins/phpbb_captcha_nogd_plugin.php index 366f3cc6..950f5489 100644 --- a/includes/captcha/plugins/phpbb_captcha_nogd_plugin.php +++ b/includes/captcha/plugins/phpbb_captcha_nogd_plugin.php @@ -67,7 +67,7 @@ function acp_page($id, &$module) { global $lang; - trigger_error($lang['CAPTCHA_NO_OPTIONS'] . adm_back_link($module->u_action)); + trigger_error($lang['CAPTCHA_NO_OPTIONS'] . page_back_link($module->u_action)); } } diff --git a/includes/captcha/plugins/phpbb_captcha_qa_plugin.php b/includes/captcha/plugins/phpbb_captcha_qa_plugin.php index dca1b2d7..7d06c334 100644 --- a/includes/captcha/plugins/phpbb_captcha_qa_plugin.php +++ b/includes/captcha/plugins/phpbb_captcha_qa_plugin.php @@ -627,7 +627,7 @@ function acp_page($id, &$module) { $this->acp_delete_question($question_id); - trigger_error($lang['QUESTION_DELETED'] . adm_back_link($list_url)); + trigger_error($lang['QUESTION_DELETED'] . page_back_link($list_url)); } else { @@ -680,7 +680,7 @@ function acp_page($id, &$module) } else { - trigger_error($lang['FORM_INVALID'] . adm_back_link($list_url)); + trigger_error($lang['FORM_INVALID'] . page_back_link($list_url)); } } else @@ -715,12 +715,12 @@ function acp_page($id, &$module) } add_log('admin', 'LOG_CONFIG_VISUAL'); - trigger_error($lang['CONFIG_UPDATED'] . adm_back_link($list_url)); + trigger_error($lang['CONFIG_UPDATED'] . page_back_link($list_url)); } } else if ($submit) { - trigger_error($lang['FORM_INVALID'] . adm_back_link($list_url)); + trigger_error($lang['FORM_INVALID'] . page_back_link($list_url)); } } } diff --git a/includes/captcha/plugins/phpbb_recaptcha_plugin.php b/includes/captcha/plugins/phpbb_recaptcha_plugin.php index 9a5c1b5a..0b92618c 100644 --- a/includes/captcha/plugins/phpbb_recaptcha_plugin.php +++ b/includes/captcha/plugins/phpbb_recaptcha_plugin.php @@ -106,11 +106,11 @@ function acp_page($id, &$module) } add_log('admin', 'LOG_CONFIG_VISUAL'); - trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($module->u_action)); + trigger_error($user->lang['CONFIG_UPDATED'] . page_back_link($module->u_action)); } elseif ($submit) { - trigger_error($user->lang['FORM_INVALID'] . adm_back_link($module->u_action)); + trigger_error($user->lang['FORM_INVALID'] . page_back_link($module->u_action)); } else { diff --git a/includes/class_auth_admin.php b/includes/class_auth_admin.php index 7fc20cb7..5420b5c5 100644 --- a/includes/class_auth_admin.php +++ b/includes/class_auth_admin.php @@ -645,7 +645,7 @@ function display_role_mask(&$hold_ary) if (isset($auth_ary['users']) && sizeof($auth_ary['users'])) { - $sql = 'SELECT user_id, username + $sql = 'SELECT user_id, username, user_color, user_active FROM ' . USERS_TABLE . ' WHERE ' . $db->sql_in_set('user_id', $auth_ary['users']) . ' ORDER BY username_clean ASC'; @@ -656,7 +656,8 @@ function display_role_mask(&$hold_ary) $template->assign_block_vars('role_mask.users', array( 'USER_ID' => $row['user_id'], 'USERNAME' => $row['username'], - 'U_PROFILE' => append_sid(IP_ROOT_PATH . CMS_PAGE_PROFILE . '?mode=viewprofile&' . POST_USERS_URL . '=' . $row['user_id']) + 'U_PROFILE' => append_sid(IP_ROOT_PATH . CMS_PAGE_PROFILE . '?mode=viewprofile&' . POST_USERS_URL . '=' . $row['user_id']), + 'USERNAME_FULL' => colorize_username($row['user_id'], $row['username'], $row['user_color'], $row['user_active']), ) ); } @@ -665,7 +666,7 @@ function display_role_mask(&$hold_ary) if (isset($auth_ary['groups']) && sizeof($auth_ary['groups'])) { - $sql = 'SELECT group_id, group_name, group_type + $sql = 'SELECT group_id, group_name, group_color FROM ' . GROUPS_TABLE . ' WHERE ' . $db->sql_in_set('group_id', $auth_ary['groups']) . ' ORDER BY group_type ASC, group_name'; @@ -675,7 +676,10 @@ function display_role_mask(&$hold_ary) { $template->assign_block_vars('role_mask.groups', array( 'GROUP_ID' => $row['group_id'], - 'GROUP_NAME' => ($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name'], + 'GROUP_NAME' => $row['group_name'], + 'GROUP_COLOR' => $row['group_color'], + 'GROUP_FULL' => '' . $row['group_name'] . '', + 'U_PROFILE' => append_sid(IP_ROOT_PATH . CMS_PAGE_GROUP_CP . '?' . POST_GROUPS_URL . '=' . $row['group_id']) ) ); diff --git a/includes/class_cms_admin.php b/includes/class_cms_admin.php index bbbb3656..8e0d5bd7 100644 --- a/includes/class_cms_admin.php +++ b/includes/class_cms_admin.php @@ -40,49 +40,11 @@ function cms_admin() $this->root = CMS_PAGE_CMS; } - /* - * Check CMS version - */ - function check_version() - { - global $db, $cache, $config, $user, $lang, $template, $table_prefix; - - if ($config['cms_rev'] != '2') - { - if(!isset($_POST['confirm'])) - { - $template->assign_vars(array( - 'L_YES' => $lang['YES'], - 'L_NO' => $lang['NO'], - - 'MESSAGE_TITLE' => $lang['Confirm'], - 'MESSAGE_TEXT' => 'Aggiornare CMS?', - - 'S_CONFIRM_ACTION' => append_sid($this->root . $this->s_append_url), - 'S_HIDDEN_FIELDS' => $this->s_hidden_fields - ) - ); - full_page_generation(CMS_TPL . 'confirm_body.tpl', $lang['Confirm'], '', ''); - } - else - { - include(IP_ROOT_PATH . 'includes/cms_updates.' . PHP_EXT); - foreach($sql as $sql_data) - { - $result = $db->sql_query($sql_data); - } - } - } - - return true; - } - /* * Init CMS vars */ function init_vars($mode_array, $action_array) { - //$this->check_version(); if (defined('IN_CMS_USERS')) { $this->tables = array( diff --git a/includes/class_cms_permissions.php b/includes/class_cms_permissions.php new file mode 100644 index 00000000..f64f6bac --- /dev/null +++ b/includes/class_cms_permissions.php @@ -0,0 +1,822 @@ + 0)); + $action = key($action); + $action = (isset($_POST['psubmit'])) ? 'apply_permissions' : $action; + + $username = request_var('username', array(''), true); + $usernames = request_var('usernames', '', true); + $user_id = request_var('user_id', array(0)); + + $group_id = request_var('group_id', array(0)); + $select_all_groups = request_var('select_all_groups', 0); + + $form_name = 'acp_permissions'; + add_form_key($form_name); + + $this->tpl_name = 'cms_permissions.tpl'; + $this->u_action = append_sid($cms_admin->root . '?mode=auth&pmode=' . $mode); + + // If select all groups is set, we pre-build the group id array (this option is used for other screens to link to the permission settings screen) + if ($select_all_groups) + { + $sql = 'SELECT group_id + FROM ' . GROUPS_TABLE . ' + WHERE group_single_user = 0'; + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + $group_id[] = $row['group_id']; + } + $db->sql_freeresult($result); + } + + // Map usernames to ids and vice versa + if ($usernames) + { + $username = explode("\n", $usernames); + } + unset($usernames); + + if (sizeof($username) && !sizeof($user_id)) + { + user_get_id_name($user_id, $username); + + if (!sizeof($user_id)) + { + trigger_error($user->lang['SELECTED_USER_NOT_EXIST'] . page_back_link($this->u_action), E_USER_WARNING); + } + } + unset($username); + + // Define some common variables for every mode + $error = array(); + + $permission_scope = (strpos($mode, '_global') !== false) ? 'global' : 'local'; + + // Showing introductionary page? + if ($mode == 'intro') + { + $this->page_title = 'CMS_PERMISSIONS'; + $template->assign_vars(array( + 'S_INTRO' => true + ) + ); + return; + } + + switch ($mode) + { + case 'setting_cms_user_global': + case 'setting_cms_group_global': + $this->permission_dropdown = array('cms_'); + $permission_victim = ($mode == 'setting_cms_user_global') ? array('user') : array('group'); + $this->page_title = ($mode == 'setting_cms_user_global') ? 'CMS_PERMISSIONS_CMS_USERS' : 'CMS_PERMISSIONS_CMS_GROUPS'; + break; + + case 'setting_plugins_user_global': + case 'setting_plugins_group_global': + $this->permission_dropdown = array('pl_'); + $permission_victim = ($mode == 'setting_plugins_user_global') ? array('user') : array('group'); + $this->page_title = ($mode == 'setting_plugins_user_global') ? 'CMS_PERMISSIONS_PLUGINS_USERS' : 'CMS_PERMISSIONS_PLUGINS_GROUPS'; + break; + + case 'setting_user_global': + case 'setting_group_global': + $this->permission_dropdown = array('u_'); + $permission_victim = ($mode == 'setting_user_global') ? array('user') : array('group'); + $this->page_title = ($mode == 'setting_user_global') ? 'CMS_PERMISSIONS_USERS' : 'CMS_PERMISSIONS_GROUPS'; + break; + + case 'setting_admin_global': + case 'setting_mod_global': + $this->permission_dropdown = (strpos($mode, '_admin_') !== false) ? array('a_') : array('m_'); + $permission_victim = array('usergroup'); + $this->page_title = ($mode == 'setting_admin_global') ? 'CMS_PERMISSIONS_ADMINS' : 'CMS_PERMISSIONS_MODS'; + break; + + case 'view_admin_global': + case 'view_user_global': + case 'view_mod_global': + $this->permission_dropdown = ($mode == 'view_admin_global') ? array('a_') : (($mode == 'view_user_global') ? array('u_') : array('m_')); + $permission_victim = array('usergroup_view'); + $this->page_title = ($mode == 'view_admin_global') ? 'CMS_PERMISSIONS_ADMINS' : (($mode == 'view_user_global') ? 'CMS_PERMISSIONS_USERS' : 'CMS_PERMISSIONS_MODS'); + break; + + default: + trigger_error('NO_MODE', E_USER_ERROR); + break; + } + + $template->assign_vars(array( + 'L_TITLE' => $lang[$this->page_title], + 'L_EXPLAIN' => $lang[$this->page_title . '_EXPLAIN'] + ) + ); + + // Get permission type + $permission_type = request_var('type', $this->permission_dropdown[0]); + + if (!in_array($permission_type, $this->permission_dropdown)) + { + trigger_error($user->lang['WRONG_PERMISSION_TYPE'] . page_back_link($this->u_action), E_USER_WARNING); + } + + // Handle actions + if ((strpos($mode, 'setting_') === 0) && $action) + { + switch ($action) + { + case 'delete': + if (confirm_box(true)) + { + // All users/groups selected? + $all_users = (isset($_POST['all_users'])) ? true : false; + $all_groups = (isset($_POST['all_groups'])) ? true : false; + + if ($all_users || $all_groups) + { + $items = $this->retrieve_defined_user_groups($permission_scope, $permission_type); + + if ($all_users && sizeof($items['user_ids'])) + { + $user_id = $items['user_ids']; + } + elseif ($all_groups && sizeof($items['group_ids'])) + { + $group_id = $items['group_ids']; + } + } + + if (sizeof($user_id) || sizeof($group_id)) + { + $this->remove_permissions($mode, $permission_type, $auth_admin, $user_id, $group_id); + } + else + { + trigger_error($user->lang['NO_USER_GROUP_SELECTED'] . page_back_link($this->u_action), E_USER_WARNING); + } + } + else + { + if (isset($_POST['cancel'])) + { + $u_redirect = $this->u_action . '&type=' . $permission_type; + redirect($u_redirect); + } + + $s_hidden_fields = array( + 'i' => $id, + 'pmode' => $mode, + 'paction' => array($action => 1), + 'user_id' => $user_id, + 'group_id' => $group_id, + 'type' => $permission_type, + ); + if (isset($_POST['all_users'])) + { + $s_hidden_fields['all_users'] = 1; + } + if (isset($_POST['all_groups'])) + { + $s_hidden_fields['all_groups'] = 1; + } + confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields($s_hidden_fields)); + } + break; + + case 'apply_permissions': + if (!isset($_POST['setting'])) + { + trigger_error($user->lang['NO_AUTH_SETTING_FOUND'] . page_back_link($this->u_action), E_USER_WARNING); + } + if (!check_form_key($form_name)) + { + trigger_error($user->lang['FORM_INVALID'] . page_back_link($this->u_action), E_USER_WARNING); + } + + $this->set_permissions($mode, $permission_type, $auth_admin, $user_id, $group_id); + break; + + case 'apply_all_permissions': + if (!isset($_POST['setting'])) + { + trigger_error($user->lang['NO_AUTH_SETTING_FOUND'] . page_back_link($this->u_action), E_USER_WARNING); + } + if (!check_form_key($form_name)) + { + trigger_error($user->lang['FORM_INVALID'] . page_back_link($this->u_action), E_USER_WARNING); + } + + $this->set_all_permissions($mode, $permission_type, $auth_admin, $user_id, $group_id); + break; + } + } + + + // Setting permissions screen + $s_hidden_fields = build_hidden_fields(array( + 'user_id' => $user_id, + 'group_id' => $group_id, + 'type' => $permission_type + ) + ); + + // Go through the screens/options needed and present them in correct order + foreach ($permission_victim as $victim) + { + switch ($victim) + { + case 'user': + case 'group': + + if (sizeof($user_id)) + { + $this->check_existence('user', $user_id); + continue 2; + } + + if (sizeof($group_id)) + { + $this->check_existence('group', $group_id); + continue 2; + } + + $template->assign_vars(array( + 'S_SELECT_USER' => true, + 'S_SELECT_GROUP' => true, + 'U_FIND_USERNAME' => append_sid(IP_ROOT_PATH . CMS_PAGE_SEARCH . '?mode=searchuser'), + 'S_GROUP_OPTIONS' => group_select_options(false, false, false), // Show all groups + ) + ); + + break; + + case 'usergroup': + case 'usergroup_view': + + $all_users = (isset($_POST['all_users'])) ? true : false; + $all_groups = (isset($_POST['all_groups'])) ? true : false; + + if ((sizeof($user_id) && !$all_users) || (sizeof($group_id) && !$all_groups)) + { + if (sizeof($user_id)) + { + $this->check_existence('user', $user_id); + } + + if (sizeof($group_id)) + { + $this->check_existence('group', $group_id); + } + + continue 2; + } + + // Now we check the users... because the "all"-selection is different here (all defined users/groups) + $items = $this->retrieve_defined_user_groups($permission_scope, $permission_type); + + if ($all_users && sizeof($items['user_ids'])) + { + $user_id = $items['user_ids']; + continue 2; + } + + if ($all_groups && sizeof($items['group_ids'])) + { + $group_id = $items['group_ids']; + continue 2; + } + + $template->assign_vars(array( + 'S_SELECT_USERGROUP' => ($victim == 'usergroup') ? true : false, + 'S_SELECT_USERGROUP_VIEW' => ($victim == 'usergroup_view') ? true : false, + 'S_DEFINED_USER_OPTIONS' => $items['user_ids_options'], + 'S_DEFINED_GROUP_OPTIONS' => $items['group_ids_options'], + 'S_ADD_GROUP_OPTIONS' => group_select_options(false, $items['group_ids'], false), // Show all groups + 'U_FIND_USERNAME' => append_sid(IP_ROOT_PATH . CMS_PAGE_SEARCH . '?mode=searchuser'), + ) + ); + + break; + } + + // The S_ALLOW_SELECT parameter below is a measure to lower memory usage. + // If there are more than 5 forums selected the admin is not able to select all users/groups too. + // We need to see if the number of forums can be increased or need to be decreased. + + $template->assign_vars(array( + 'U_ACTION' => $this->u_action, + 'U_ACTION_USERS' => str_replace('_group_global', '_user_global', $this->u_action), + 'U_ACTION_GROUPS' => str_replace('_user_global', '_group_global', $this->u_action), + 'ANONYMOUS_USER_ID' => ANONYMOUS, + + 'S_SELECT_VICTIM' => true, + 'S_ALLOW_ALL_SELECT' => false, + /* + 'S_CAN_SELECT_USER' => ($auth->acl_get('a_authusers')) ? true : false, + 'S_CAN_SELECT_GROUP' => ($auth->acl_get('a_authgroups')) ? true : false, + */ + 'S_CAN_SELECT_USER' => true, + 'S_CAN_SELECT_GROUP' => true, + + 'S_HIDDEN_FIELDS' => $s_hidden_fields + ) + ); + + return; + } + + $template->assign_vars(array( + 'S_PERMISSION_DROPDOWN' => (sizeof($this->permission_dropdown) > 1) ? $this->build_permission_dropdown($this->permission_dropdown, $permission_type, $permission_scope) : false, + 'L_PERMISSION_TYPE' => $user->lang['ACL_TYPE_' . strtoupper($permission_type)], + + 'U_ACTION' => $this->u_action, + 'S_HIDDEN_FIELDS' => $s_hidden_fields + ) + ); + + if (strpos($mode, 'setting_') === 0) + { + $template->assign_vars(array( + 'S_SETTING_PERMISSIONS' => true + ) + ); + + $hold_ary = $auth_admin->get_mask('set', (sizeof($user_id)) ? $user_id : false, (sizeof($group_id)) ? $group_id : false, false, $permission_type, $permission_scope, ACL_NO); + $auth_admin->display_mask('set', $permission_type, $hold_ary, ((sizeof($user_id)) ? 'user' : 'group'), (($permission_scope == 'local') ? true : false)); + } + else + { + $template->assign_vars(array( + 'S_VIEWING_PERMISSIONS' => true + ) + ); + + $hold_ary = $auth_admin->get_mask('view', (sizeof($user_id)) ? $user_id : false, (sizeof($group_id)) ? $group_id : false, false, $permission_type, $permission_scope, ACL_NEVER); + $auth_admin->display_mask('view', $permission_type, $hold_ary, ((sizeof($user_id)) ? 'user' : 'group'), (($permission_scope == 'local') ? true : false)); + } + } + + /** + * Build dropdown field for changing permission types + */ + function build_permission_dropdown($options, $default_option, $permission_scope) + { + global $user, $auth; + + $s_dropdown_options = ''; + foreach ($options as $setting) + { + if (!$auth->acl_get('a_' . str_replace('_', '', $setting) . 'auth')) + { + continue; + } + + $selected = ($setting == $default_option) ? ' selected="selected"' : ''; + $l_setting = (isset($user->lang['permission_type'][$permission_scope][$setting])) ? $user->lang['permission_type'][$permission_scope][$setting] : $user->lang['permission_type'][$setting]; + $s_dropdown_options .= ''; + } + + return $s_dropdown_options; + } + + /** + * Check if selected items exist. Remove not found ids and if empty return error. + */ + function check_existence($mode, &$ids) + { + global $db, $user; + + switch ($mode) + { + case 'user': + $table = USERS_TABLE; + $sql_id = 'user_id'; + break; + + case 'group': + $table = GROUPS_TABLE; + $sql_id = 'group_id'; + break; + + case 'forum': + $table = FORUMS_TABLE; + $sql_id = 'forum_id'; + break; + } + + if (sizeof($ids)) + { + $sql = "SELECT $sql_id + FROM $table + WHERE " . $db->sql_in_set($sql_id, $ids); + $result = $db->sql_query($sql); + + $ids = array(); + while ($row = $db->sql_fetchrow($result)) + { + $ids[] = (int) $row[$sql_id]; + } + $db->sql_freeresult($result); + } + + if (!sizeof($ids)) + { + trigger_error($user->lang['SELECTED_' . strtoupper($mode) . '_NOT_EXIST'] . page_back_link($this->u_action), E_USER_WARNING); + } + } + + /** + * Apply permissions + */ + function set_permissions($mode, $permission_type, &$auth_admin, &$user_id, &$group_id) + { + global $user, $auth; + + $psubmit = request_var('psubmit', array(0 => array(0 => 0))); + + // User or group to be set? + $ug_type = (sizeof($user_id)) ? 'user' : 'group'; + + // Mighty Gorgon: we need to decide if we wish to leave this check upon specific permissions in settings permissions + /* + // Check the permission setting again + if (!$auth->acl_get('a_' . str_replace('_', '', $permission_type) . 'auth') || !$auth->acl_get('a_auth' . $ug_type . 's')) + { + trigger_error($user->lang['NO_AUTH_OPERATION'] . page_back_link($this->u_action), E_USER_WARNING); + } + */ + + $ug_id = $forum_id = 0; + + // We loop through the auth settings defined in our submit + list($ug_id, ) = each($psubmit); + list($forum_id, ) = each($psubmit[$ug_id]); + + if (empty($_POST['setting']) || empty($_POST['setting'][$ug_id]) || empty($_POST['setting'][$ug_id][$forum_id]) || !is_array($_POST['setting'][$ug_id][$forum_id])) + { + trigger_error('WRONG_PERMISSION_SETTING_FORMAT' . page_back_link($this->u_action), E_USER_WARNING); + } + + // We obtain and check $_POST['setting'][$ug_id][$forum_id] directly and not using request_var() because request_var() + // currently does not support the amount of dimensions required. ;) + // $auth_settings = request_var('setting', array(0 => array(0 => array('' => 0)))); + $auth_settings = array_map('intval', $_POST['setting'][$ug_id][$forum_id]); + + // Do we have a role we want to set? + $assigned_role = (isset($_POST['role'][$ug_id][$forum_id])) ? (int) $_POST['role'][$ug_id][$forum_id] : 0; + + // Do the admin want to set these permissions to other items too? + $inherit = request_var('inherit', array(0 => array(0))); + + $ug_id = array($ug_id); + $forum_id = array($forum_id); + + if (sizeof($inherit)) + { + foreach ($inherit as $_ug_id => $forum_id_ary) + { + // Inherit users/groups? + if (!in_array($_ug_id, $ug_id)) + { + $ug_id[] = $_ug_id; + } + + // Inherit forums? + $forum_id = array_merge($forum_id, array_keys($forum_id_ary)); + } + } + + $forum_id = array_unique($forum_id); + + // If the auth settings differ from the assigned role, then do not set a role... + if ($assigned_role) + { + if (!$this->check_assigned_role($assigned_role, $auth_settings)) + { + $assigned_role = 0; + } + } + + // Update the permission set... + $auth_admin->acl_set($ug_type, $forum_id, $ug_id, $auth_settings, $assigned_role); + + // Do we need to recache the moderator lists? + if ($permission_type == 'm_') + { + cache_moderators(); + } + + // Do we need to recache the moderator lists? + if ($permission_type == 'm_') + { + cache_moderators(); + } + + // Remove users who are now moderators or admins from everyones foes list + if ($permission_type == 'm_' || $permission_type == 'a_') + { + // MIGHTY GORGON: We don't use foes... + //update_foes($group_id, $user_id); + } + + $this->log_action($mode, 'add', $permission_type, $ug_type, $ug_id, $forum_id); + + $redirect_url = $this->u_action; + meta_refresh(3, $redirect_url); + + trigger_error($user->lang['AUTH_UPDATED'] . page_back_link($this->u_action)); + } + + /** + * Apply all permissions + */ + function set_all_permissions($mode, $permission_type, &$auth_admin, &$user_id, &$group_id) + { + global $user, $auth; + + // User or group to be set? + $ug_type = (sizeof($user_id)) ? 'user' : 'group'; + + // Mighty Gorgon: we need to decide if we wish to leave this check upon specific permissions in settings permissions + /* + // Check the permission setting again + if (!$auth->acl_get('a_' . str_replace('_', '', $permission_type) . 'auth') || !$auth->acl_get('a_auth' . $ug_type . 's')) + { + trigger_error($user->lang['NO_AUTH_OPERATION'] . page_back_link($this->u_action), E_USER_WARNING); + } + */ + + $auth_settings = (isset($_POST['setting'])) ? $_POST['setting'] : array(); + $auth_roles = (isset($_POST['role'])) ? $_POST['role'] : array(); + $ug_ids = $forum_ids = array(); + + // We need to go through the auth settings + foreach ($auth_settings as $ug_id => $forum_auth_row) + { + $ug_id = (int) $ug_id; + $ug_ids[] = $ug_id; + + foreach ($forum_auth_row as $forum_id => $auth_options) + { + $forum_id = (int) $forum_id; + $forum_ids[] = $forum_id; + + // Check role... + $assigned_role = (isset($auth_roles[$ug_id][$forum_id])) ? (int) $auth_roles[$ug_id][$forum_id] : 0; + + // If the auth settings differ from the assigned role, then do not set a role... + if ($assigned_role) + { + if (!$this->check_assigned_role($assigned_role, $auth_options)) + { + $assigned_role = 0; + } + } + + // Update the permission set... + $auth_admin->acl_set($ug_type, $forum_id, $ug_id, $auth_options, $assigned_role, false); + } + } + + $auth_admin->acl_clear_prefetch(); + + // Do we need to recache the moderator lists? + if ($permission_type == 'm_') + { + cache_moderators(); + } + + $this->log_action($mode, 'add', $permission_type, $ug_type, $ug_ids, $forum_ids); + + $redirect_url = $this->u_action; + meta_refresh(3, $redirect_url); + + trigger_error($user->lang['AUTH_UPDATED'] . page_back_link($this->u_action)); + } + + /** + * Compare auth settings with auth settings from role + * returns false if they differ, true if they are equal + */ + function check_assigned_role($role_id, &$auth_settings) + { + global $db; + + $sql = 'SELECT o.auth_option, r.auth_setting + FROM ' . ACL_OPTIONS_TABLE . ' o, ' . ACL_ROLES_DATA_TABLE . ' r + WHERE o.auth_option_id = r.auth_option_id + AND r.role_id = ' . $role_id; + $result = $db->sql_query($sql); + + $test_auth_settings = array(); + while ($row = $db->sql_fetchrow($result)) + { + $test_auth_settings[$row['auth_option']] = $row['auth_setting']; + } + $db->sql_freeresult($result); + + // We need to add any ACL_NO setting from auth_settings to compare correctly + foreach ($auth_settings as $option => $setting) + { + if ($setting == ACL_NO) + { + $test_auth_settings[$option] = $setting; + } + } + + if (sizeof(array_diff_assoc($auth_settings, $test_auth_settings))) + { + return false; + } + + return true; + } + + /** + * Remove permissions + */ + function remove_permissions($mode, $permission_type, &$auth_admin, &$user_id, &$group_id) + { + global $db, $user, $auth; + + // User or group to be set? + $ug_type = (sizeof($user_id)) ? 'user' : 'group'; + + // Check the permission setting again + if (!$auth->acl_get('a_' . str_replace('_', '', $permission_type) . 'auth') || !$auth->acl_get('a_auth' . $ug_type . 's')) + { + trigger_error($user->lang['NO_AUTH_OPERATION'] . page_back_link($this->u_action), E_USER_WARNING); + } + + $auth_admin->acl_delete($ug_type, (($ug_type == 'user') ? $user_id : $group_id), (sizeof($forum_id) ? $forum_id : false), $permission_type); + + // Do we need to recache the moderator lists? + if ($permission_type == 'm_') + { + cache_moderators(); + } + + $this->log_action($mode, 'del', $permission_type, $ug_type, (($ug_type == 'user') ? $user_id : $group_id), array(0 => 0)); + + trigger_error($user->lang['AUTH_UPDATED'] . page_back_link($this->u_action)); + } + + /** + * Log permission changes + */ + function log_action($mode, $action, $permission_type, $ug_type, $ug_id, $forum_id) + { + global $db, $user; + + if (!is_array($ug_id)) + { + $ug_id = array($ug_id); + } + + if (!is_array($forum_id)) + { + $forum_id = array($forum_id); + } + + // Logging ... first grab user or groupnames ... + $sql = ($ug_type == 'group') ? 'SELECT group_name as name, group_type FROM ' . GROUPS_TABLE . ' WHERE ' : 'SELECT username as name FROM ' . USERS_TABLE . ' WHERE '; + $sql .= $db->sql_in_set(($ug_type == 'group') ? 'group_id' : 'user_id', array_map('intval', $ug_id)); + $sql .= ($ug_type == 'group') ? ' AND group_single_user = 0' : ''; + $result = $db->sql_query($sql); + + $l_ug_list = ''; + while ($row = $db->sql_fetchrow($result)) + { + $l_ug_list .= (($l_ug_list != '') ? ', ' : '') . ((isset($row['group_type']) && $row['group_type'] == GROUP_SPECIAL) ? '' . $user->lang['G_' . $row['name']] . '' : $row['name']); + } + $db->sql_freeresult($result); + + $mode = str_replace('setting_', '', $mode); + + add_log('admin', 'LOG_ACL_' . strtoupper($action) . '_' . strtoupper($mode) . '_' . strtoupper($permission_type), $l_ug_list); + } + + /** + * Get already assigned users/groups + */ + function retrieve_defined_user_groups($permission_scope, $permission_type) + { + global $db, $user; + + // Permission options are only able to be a permission set... therefore we will pre-fetch the possible options and also the possible roles + $option_ids = $role_ids = array(); + + $sql = 'SELECT auth_option_id + FROM ' . ACL_OPTIONS_TABLE . ' + WHERE auth_option ' . $db->sql_like_expression($permission_type . $db->any_char); + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + $option_ids[] = (int) $row['auth_option_id']; + } + $db->sql_freeresult($result); + + if (sizeof($option_ids)) + { + $sql = 'SELECT DISTINCT role_id + FROM ' . ACL_ROLES_DATA_TABLE . ' + WHERE ' . $db->sql_in_set('auth_option_id', $option_ids); + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + $role_ids[] = (int) $row['role_id']; + } + $db->sql_freeresult($result); + } + + if (sizeof($option_ids) && sizeof($role_ids)) + { + $sql_where = 'AND (' . $db->sql_in_set('a.auth_option_id', $option_ids) . ' OR ' . $db->sql_in_set('a.auth_role_id', $role_ids) . ')'; + } + elseif (sizeof($role_ids)) + { + $sql_where = 'AND ' . $db->sql_in_set('a.auth_role_id', $role_ids); + } + elseif (sizeof($option_ids)) + { + $sql_where = 'AND ' . $db->sql_in_set('a.auth_option_id', $option_ids); + } + + // Not ideal, due to the filesort, non-use of indexes, etc. + $sql = 'SELECT DISTINCT u.user_id, u.username, u.username_clean, u.user_regdate + FROM ' . USERS_TABLE . ' u, ' . ACL_USERS_TABLE . " a + WHERE u.user_id = a.user_id + $sql_where + ORDER BY u.username_clean, u.user_regdate ASC"; + $result = $db->sql_query($sql); + + $s_defined_user_options = ''; + $defined_user_ids = array(); + while ($row = $db->sql_fetchrow($result)) + { + $s_defined_user_options .= ''; + $defined_user_ids[] = $row['user_id']; + } + $db->sql_freeresult($result); + + $sql = 'SELECT DISTINCT g.group_type, g.group_name, g.group_id + FROM ' . GROUPS_TABLE . ' g, ' . ACL_GROUPS_TABLE . " a + WHERE g.group_id = a.group_id + AND g.group_single_user = 0 + $sql_where + ORDER BY g.group_name ASC"; + $result = $db->sql_query($sql); + + $s_defined_group_options = ''; + $defined_group_ids = array(); + while ($row = $db->sql_fetchrow($result)) + { + $s_defined_group_options .= ''; + $defined_group_ids[] = $row['group_id']; + } + $db->sql_freeresult($result); + + return array( + 'group_ids' => $defined_group_ids, + 'group_ids_options' => $s_defined_group_options, + 'user_ids' => $defined_user_ids, + 'user_ids_options' => $s_defined_user_options + ); + } + +} + +?> \ No newline at end of file diff --git a/includes/class_cms_permissions_roles.php b/includes/class_cms_permissions_roles.php new file mode 100644 index 00000000..34089469 --- /dev/null +++ b/includes/class_cms_permissions_roles.php @@ -0,0 +1,589 @@ +tpl_name = 'cms_permissions_roles.tpl'; + $this->u_action = append_sid($cms_admin->root . '?mode=auth&rmode=' . $mode . '&roles_admin=1'); + + switch ($mode) + { + case 'admin_roles': + $permission_type = 'a_'; + $this->page_title = 'ACP_ADMIN_ROLES'; + break; + + case 'cms_roles': + $permission_type = 'cms_'; + $this->page_title = 'ACP_CMS_ROLES'; + break; + + case 'forum_roles': + $permission_type = 'f_'; + $this->page_title = 'ACP_FORUM_ROLES'; + break; + + case 'mod_roles': + $permission_type = 'm_'; + $this->page_title = 'ACP_MOD_ROLES'; + break; + + case 'plugins_roles': + $permission_type = 'pl_'; + $this->page_title = 'ACP_PLUGINS_ROLES'; + break; + + case 'user_roles': + $permission_type = 'u_'; + $this->page_title = 'ACP_USER_ROLES'; + break; + + default: + trigger_error('NO_MODE', E_USER_ERROR); + break; + } + + $template->assign_vars(array( + 'L_TITLE' => $user->lang[$this->page_title], + 'L_EXPLAIN' => $user->lang[$this->page_title . '_EXPLAIN'] + ) + ); + + // Take action... admin submitted something + if ($submit || ($action == 'remove')) + { + switch ($action) + { + case 'remove': + + if (!$role_id) + { + trigger_error($user->lang['NO_ROLE_SELECTED'] . page_back_link($this->u_action), E_USER_WARNING); + } + + $sql = 'SELECT * + FROM ' . ACL_ROLES_TABLE . ' + WHERE role_id = ' . $role_id; + $result = $db->sql_query($sql); + $role_row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + if (!$role_row) + { + trigger_error($user->lang['NO_ROLE_SELECTED'] . page_back_link($this->u_action), E_USER_WARNING); + } + + if (confirm_box(true)) + { + $this->remove_role($role_id, $permission_type); + + $role_name = (!empty($user->lang[$role_row['role_name']])) ? $user->lang[$role_row['role_name']] : $role_row['role_name']; + add_log('admin', 'LOG_' . strtoupper($permission_type) . 'ROLE_REMOVED', $role_name); + trigger_error($user->lang['ROLE_DELETED'] . page_back_link($this->u_action)); + } + else + { + $s_hidden_fields = array( + 'i' => $id, + 'pmode' => $mode, + 'role_id' => $role_id, + 'paction' => $action, + ); + + confirm_box(false, 'DELETE_ROLE', build_hidden_fields($s_hidden_fields)); + } + + break; + + case 'edit': + if (!$role_id) + { + trigger_error($user->lang['NO_ROLE_SELECTED'] . page_back_link($this->u_action), E_USER_WARNING); + } + + // Get role we edit + $sql = 'SELECT * + FROM ' . ACL_ROLES_TABLE . ' + WHERE role_id = ' . $role_id; + $result = $db->sql_query($sql); + $role_row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + if (!$role_row) + { + trigger_error($user->lang['NO_ROLE_SELECTED'] . page_back_link($this->u_action), E_USER_WARNING); + } + + // no break; + + case 'add': + + if (!check_form_key($form_name)) + { + trigger_error($user->lang['FORM_INVALID']. page_back_link($this->u_action), E_USER_WARNING); + } + + $role_name = utf8_normalize_nfc(request_var('role_name', '', true)); + $role_description = utf8_normalize_nfc(request_var('role_description', '', true)); + $auth_settings = request_var('setting', array('' => 0)); + + if (!$role_name) + { + trigger_error($user->lang['NO_ROLE_NAME_SPECIFIED'] . page_back_link($this->u_action), E_USER_WARNING); + } + + if (utf8_strlen($role_description) > 4000) + { + trigger_error($user->lang['ROLE_DESCRIPTION_LONG'] . page_back_link($this->u_action), E_USER_WARNING); + } + + // if we add/edit a role we check the name to be unique among the settings... + $sql = 'SELECT role_id + FROM ' . ACL_ROLES_TABLE . " + WHERE role_type = '" . $db->sql_escape($permission_type) . "' + AND role_name = '" . $db->sql_escape($role_name) . "'"; + $result = $db->sql_query($sql); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + // Make sure we only print out the error if we add the role or change it's name + if ($row && ($mode == 'add' || ($mode == 'edit' && $role_row['role_name'] != $role_name))) + { + trigger_error(sprintf($user->lang['ROLE_NAME_ALREADY_EXIST'], $role_name) . page_back_link($this->u_action), E_USER_WARNING); + } + + $sql_ary = array( + 'role_name' => (string) $role_name, + 'role_description' => (string) $role_description, + 'role_type' => (string) $permission_type, + ); + + if ($action == 'edit') + { + $sql = 'UPDATE ' . ACL_ROLES_TABLE . ' + SET ' . $db->sql_build_array('UPDATE', $sql_ary) . ' + WHERE role_id = ' . $role_id; + $db->sql_query($sql); + } + else + { + // Get maximum role order for inserting a new role... + $sql = 'SELECT MAX(role_order) as max_order + FROM ' . ACL_ROLES_TABLE . " + WHERE role_type = '" . $db->sql_escape($permission_type) . "'"; + $result = $db->sql_query($sql); + $max_order = (int) $db->sql_fetchfield('max_order'); + $db->sql_freeresult($result); + + $sql_ary['role_order'] = $max_order + 1; + + $sql = 'INSERT INTO ' . ACL_ROLES_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary); + $db->sql_query($sql); + + $role_id = $db->sql_nextid(); + } + + // Now add the auth settings + $auth_admin->acl_set_role($role_id, $auth_settings); + + $role_name = (!empty($user->lang[$role_name])) ? $user->lang[$role_name] : $role_name; + add_log('admin', 'LOG_' . strtoupper($permission_type) . 'ROLE_' . strtoupper($action), $role_name); + + trigger_error($user->lang['ROLE_' . strtoupper($action) . '_SUCCESS'] . page_back_link($this->u_action)); + + break; + } + } + + // Display screens + switch ($action) + { + case 'add': + + $options_from = request_var('options_from', 0); + + $role_row = array( + 'role_name' => utf8_normalize_nfc(request_var('role_name', '', true)), + 'role_description' => utf8_normalize_nfc(request_var('role_description', '', true)), + 'role_type' => $permission_type, + ); + + if ($options_from) + { + $sql = 'SELECT p.auth_option_id, p.auth_setting, o.auth_option + FROM ' . ACL_ROLES_DATA_TABLE . ' p, ' . ACL_OPTIONS_TABLE . ' o + WHERE o.auth_option_id = p.auth_option_id + AND p.role_id = ' . $options_from . ' + ORDER BY p.auth_option_id'; + $result = $db->sql_query($sql); + + $auth_options = array(); + while ($row = $db->sql_fetchrow($result)) + { + $auth_options[$row['auth_option']] = $row['auth_setting']; + } + $db->sql_freeresult($result); + } + else + { + $sql = 'SELECT auth_option_id, auth_option + FROM ' . ACL_OPTIONS_TABLE . " + WHERE auth_option " . $db->sql_like_expression($permission_type . $db->any_char) . " + AND auth_option <> '{$permission_type}' + ORDER BY auth_option_id"; + $result = $db->sql_query($sql); + + $auth_options = array(); + while ($row = $db->sql_fetchrow($result)) + { + $auth_options[$row['auth_option']] = ACL_NO; + } + $db->sql_freeresult($result); + } + + // no break; + + case 'edit': + + if ($action == 'edit') + { + if (!$role_id) + { + trigger_error($user->lang['NO_ROLE_SELECTED'] . page_back_link($this->u_action), E_USER_WARNING); + } + + $sql = 'SELECT * + FROM ' . ACL_ROLES_TABLE . ' + WHERE role_id = ' . $role_id; + $result = $db->sql_query($sql); + $role_row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + $sql = 'SELECT p.auth_option_id, p.auth_setting, o.auth_option + FROM ' . ACL_ROLES_DATA_TABLE . ' p, ' . ACL_OPTIONS_TABLE . ' o + WHERE o.auth_option_id = p.auth_option_id + AND p.role_id = ' . $role_id . ' + ORDER BY p.auth_option_id'; + $result = $db->sql_query($sql); + + $auth_options = array(); + while ($row = $db->sql_fetchrow($result)) + { + $auth_options[$row['auth_option']] = $row['auth_setting']; + } + $db->sql_freeresult($result); + } + + if (!$role_row) + { + trigger_error($user->lang['NO_ROLE_SELECTED'] . page_back_link($this->u_action), E_USER_WARNING); + } + + $template->assign_vars(array( + 'S_EDIT' => true, + + 'U_ACTION' => $this->u_action . "&paction={$action}&role_id={$role_id}", + 'U_BACK' => $this->u_action, + + 'ROLE_NAME' => $role_row['role_name'], + 'ROLE_DESCRIPTION' => $role_row['role_description'], + 'L_ACL_TYPE' => $user->lang['ACL_TYPE_' . strtoupper($permission_type)], + ) + ); + + // We need to fill the auth options array with ACL_NO options ;) + $sql = 'SELECT auth_option_id, auth_option + FROM ' . ACL_OPTIONS_TABLE . " + WHERE auth_option " . $db->sql_like_expression($permission_type . $db->any_char) . " + AND auth_option <> '{$permission_type}' + ORDER BY auth_option_id"; + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + if (!isset($auth_options[$row['auth_option']])) + { + $auth_options[$row['auth_option']] = ACL_NO; + } + } + $db->sql_freeresult($result); + + // Unset global permission option + unset($auth_options[$permission_type]); + + // Display auth options + $this->display_auth_options($auth_options); + + // Get users/groups/forums using this preset... + if ($action == 'edit') + { + $hold_ary = $auth_admin->get_role_mask($role_id); + + if (sizeof($hold_ary)) + { + $role_name = (!empty($user->lang[$role_row['role_name']])) ? $user->lang[$role_row['role_name']] : $role_row['role_name']; + + $template->assign_vars(array( + 'S_DISPLAY_ROLE_MASK' => true, + 'L_ROLE_ASSIGNED_TO' => sprintf($user->lang['ROLE_ASSIGNED_TO'], $role_name)) + ); + + $auth_admin->display_role_mask($hold_ary); + } + } + + return; + break; + + case 'move_up': + case 'move_down': + + $order = request_var('order', 0); + $order_total = $order * 2 + (($action == 'move_up') ? -1 : 1); + + $sql = 'UPDATE ' . ACL_ROLES_TABLE . ' + SET role_order = ' . $order_total . " - role_order + WHERE role_type = '" . $db->sql_escape($permission_type) . "' + AND role_order IN ($order, " . (($action == 'move_up') ? $order - 1 : $order + 1) . ')'; + $db->sql_query($sql); + + break; + } + + // By default, check that role_order is valid and fix it if necessary + $sql = 'SELECT role_id, role_order + FROM ' . ACL_ROLES_TABLE . " + WHERE role_type = '" . $db->sql_escape($permission_type) . "' + ORDER BY role_order ASC"; + $result = $db->sql_query($sql); + + if ($row = $db->sql_fetchrow($result)) + { + $order = 0; + do + { + $order++; + if ($row['role_order'] != $order) + { + $db->sql_query('UPDATE ' . ACL_ROLES_TABLE . " SET role_order = $order WHERE role_id = {$row['role_id']}"); + } + } + while ($row = $db->sql_fetchrow($result)); + } + $db->sql_freeresult($result); + + // Display assigned items? + $display_item = request_var('display_item', 0); + + // Select existing roles + $sql = 'SELECT * + FROM ' . ACL_ROLES_TABLE . " + WHERE role_type = '" . $db->sql_escape($permission_type) . "' + ORDER BY role_order ASC"; + $result = $db->sql_query($sql); + + $s_role_options = ''; + while ($row = $db->sql_fetchrow($result)) + { + $role_name = (!empty($user->lang[$row['role_name']])) ? $user->lang[$row['role_name']] : $row['role_name']; + + $template->assign_block_vars('roles', array( + 'ROLE_NAME' => $role_name, + 'ROLE_DESCRIPTION' => (!empty($user->lang[$row['role_description']])) ? $user->lang[$row['role_description']] : nl2br($row['role_description']), + + 'U_EDIT' => $this->u_action . '&paction=edit&role_id=' . $row['role_id'], + 'U_REMOVE' => $this->u_action . '&paction=remove&role_id=' . $row['role_id'], + 'U_MOVE_UP' => $this->u_action . '&paction=move_up&order=' . $row['role_order'], + 'U_MOVE_DOWN' => $this->u_action . '&paction=move_down&order=' . $row['role_order'], + 'U_DISPLAY_ITEMS' => ($row['role_id'] == $display_item) ? '' : $this->u_action . '&display_item=' . $row['role_id'] . '#assigned_to' + ) + ); + + $s_role_options .= ''; + + if ($display_item == $row['role_id']) + { + $template->assign_vars(array( + 'L_ROLE_ASSIGNED_TO' => sprintf($user->lang['ROLE_ASSIGNED_TO'], $role_name)) + ); + } + } + $db->sql_freeresult($result); + + $template->assign_vars(array( + 'S_ROLE_OPTIONS' => $s_role_options) + ); + + if ($display_item) + { + $template->assign_vars(array( + 'S_DISPLAY_ROLE_MASK' => true + ) + ); + + $hold_ary = $auth_admin->get_role_mask($display_item); + $auth_admin->display_role_mask($hold_ary); + } + } + + /** + * Display permission settings able to be set + */ + function display_auth_options($auth_options) + { + global $template, $user; + + $content_array = $categories = array(); + $key_sort_array = array(0); + $auth_options = array(0 => $auth_options); + + // Making use of auth_admin method here (we do not really want to change two similar code fragments) + auth_admin::build_permission_array($auth_options, $content_array, $categories, $key_sort_array); + + $content_array = $content_array[0]; + + $template->assign_var('S_NUM_PERM_COLS', sizeof($categories)); + + // Assign to template + foreach ($content_array as $cat => $cat_array) + { + $template->assign_block_vars('auth', array( + 'CAT_NAME' => $user->lang['permission_cat'][$cat], + + 'S_YES' => ($cat_array['S_YES'] && !$cat_array['S_NEVER'] && !$cat_array['S_NO']) ? true : false, + 'S_NEVER' => ($cat_array['S_NEVER'] && !$cat_array['S_YES'] && !$cat_array['S_NO']) ? true : false, + 'S_NO' => ($cat_array['S_NO'] && !$cat_array['S_NEVER'] && !$cat_array['S_YES']) ? true : false + ) + ); + + foreach ($cat_array['permissions'] as $permission => $allowed) + { + $template->assign_block_vars('auth.mask', array( + 'S_YES' => ($allowed == ACL_YES) ? true : false, + 'S_NEVER' => ($allowed == ACL_NEVER) ? true : false, + 'S_NO' => ($allowed == ACL_NO) ? true : false, + + 'FIELD_NAME' => $permission, + 'PERMISSION' => $user->lang['acl_' . $permission]['lang'] + ) + ); + } + } + } + + /** + * Remove role + */ + function remove_role($role_id, $permission_type) + { + global $db; + + $auth_admin = new auth_admin(); + + // Get complete auth array + $sql = 'SELECT auth_option, auth_option_id + FROM ' . ACL_OPTIONS_TABLE . " + WHERE auth_option " . $db->sql_like_expression($permission_type . $db->any_char); + $result = $db->sql_query($sql); + + $auth_settings = array(); + while ($row = $db->sql_fetchrow($result)) + { + $auth_settings[$row['auth_option']] = ACL_NO; + } + $db->sql_freeresult($result); + + // Get the role auth settings we need to re-set... + $sql = 'SELECT o.auth_option, r.auth_setting + FROM ' . ACL_ROLES_DATA_TABLE . ' r, ' . ACL_OPTIONS_TABLE . ' o + WHERE o.auth_option_id = r.auth_option_id + AND r.role_id = ' . $role_id; + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + $auth_settings[$row['auth_option']] = $row['auth_setting']; + } + $db->sql_freeresult($result); + + // Get role assignments + $hold_ary = $auth_admin->get_role_mask($role_id); + + // Re-assign permissions + foreach ($hold_ary as $forum_id => $forum_ary) + { + if (isset($forum_ary['users'])) + { + $auth_admin->acl_set('user', $forum_id, $forum_ary['users'], $auth_settings, 0, false); + } + + if (isset($forum_ary['groups'])) + { + $auth_admin->acl_set('group', $forum_id, $forum_ary['groups'], $auth_settings, 0, false); + } + } + + // Remove role from users and groups just to be sure (happens through acl_set) + $sql = 'DELETE FROM ' . ACL_USERS_TABLE . ' + WHERE auth_role_id = ' . $role_id; + $db->sql_query($sql); + + $sql = 'DELETE FROM ' . ACL_GROUPS_TABLE . ' + WHERE auth_role_id = ' . $role_id; + $db->sql_query($sql); + + // Remove role data and role + $sql = 'DELETE FROM ' . ACL_ROLES_DATA_TABLE . ' + WHERE role_id = ' . $role_id; + $db->sql_query($sql); + + $sql = 'DELETE FROM ' . ACL_ROLES_TABLE . ' + WHERE role_id = ' . $role_id; + $db->sql_query($sql); + + $auth_admin->acl_clear_prefetch(); + } +} + +?> \ No newline at end of file diff --git a/includes/class_form.php b/includes/class_form.php index 9a5e02a5..a731e930 100644 --- a/includes/class_form.php +++ b/includes/class_form.php @@ -138,7 +138,7 @@ function create_input($name, $properties) case 'USERNAME_INPUT': $input = ''; - $input .= ''; + $input .= ''; break; case 'USERNAME_INPUT_JQUI': diff --git a/includes/class_module.php b/includes/class_module.php index 6ccd322b..c80fb713 100644 --- a/includes/class_module.php +++ b/includes/class_module.php @@ -435,6 +435,13 @@ function load_active($mode = false, $module_url = false, $execute_module = true) $module_path = $this->include_path . $this->p_class; $icat = request_var('icat', ''); + // MIGHTY GORGON - DEBUG - BEGIN + /* + print_r($this); + die('
'); + */ + // MIGHTY GORGON - DEBUG - END + if ($this->active_module === false) { trigger_error('Module not accessible', E_USER_ERROR); diff --git a/includes/class_plugins.php b/includes/class_plugins.php index df8b5658..cdcd7869 100644 --- a/includes/class_plugins.php +++ b/includes/class_plugins.php @@ -231,6 +231,43 @@ function uninstall($plugin_data, $clear_cache = true) return $sql_results; } + /* + * Setup plugin lang + */ + function setup_lang($plugin_dir, $lang_type = '') + { + global $user, $lang; + + $files_to_include = array(); + $plugin_lang_path = $this->plugins_path . $plugin_dir . 'language/'; + + switch ($lang_type) + { + case 'permissions': + $filenames = array('lang_permissions'); + break; + + default: + $filenames = array('lang_plugin', 'lang_permissions'); + break; + } + + foreach ($filenames as $filename) + { + if (is_dir($plugin_lang_path)) + { + $files_to_include[] = $filename; + } + } + + if (!empty($files_to_include)) + { + setup_extra_lang($files_to_include, $plugin_lang_path); + } + + return true; + } + /* * Get plugin info */ diff --git a/includes/constants.php b/includes/constants.php index da4aa4b7..cecd504d 100644 --- a/includes/constants.php +++ b/includes/constants.php @@ -20,7 +20,7 @@ die('Hacking attempt'); } -define('ICYPHOENIX_VERSION', '1.3.20.73'); +define('ICYPHOENIX_VERSION', '1.3.21.74'); // FOUNDER ID, this is the ID of the main admin of the site, only this user canc access special features of the site and this ID is also used to send Welcome and Birthday PM define('FOUNDER_ID', '2'); @@ -291,6 +291,8 @@ define('GROUP_OPEN', 0); define('GROUP_CLOSED', 1); define('GROUP_HIDDEN', 2); +define('GROUP_SPECIAL', 3); +define('GROUP_FREE', 4); // Forum types define('FORUM_CAT', 0); diff --git a/includes/functions.php b/includes/functions.php index d19e9475..20852411 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -133,6 +133,24 @@ function append_sid($url, $non_html_amp = false, $char_conversion = false, $para } +/** +* Re-Apply session id after page reloads +*/ +function reapply_sid($url) +{ + // Remove previously added sid + if (strpos($url, 'sid=') !== false) + { + $phpEx = PHP_EXT; + // All kind of links + $url = preg_replace('/(\?)?(&|&)?sid=[a-z0-9]+/', '', $url); + // if the sid was the first param, make the old second as first ones + $url = preg_replace("/$phpEx(&|&)+?/", "$phpEx?", $url); + } + + return append_sid($url); +} + /* * extract_current_page * function backported from phpBB3 - Olympus @@ -1436,6 +1454,89 @@ function utf_cyr_to_latin($string, $reverse = false) return $string; } +/** +* Generate back link +*/ +function page_back_link($u_action) +{ + global $lang; + return '

« ' . $lang['BACK_TO_PREV'] . ''; +} + +/** +* Build Confirm box +* @param boolean $check True for checking if confirmed (without any additional parameters) and false for displaying the confirm box +* @param string $title Title/Message used for confirm box. +* message text is _CONFIRM appended to title. +* If title cannot be found in user->lang a default one is displayed +* If title_CONFIRM cannot be found in user->lang the text given is used. +* @param string $hidden Hidden variables +* @param string $html_body Template used for confirm box +* @param string $u_action Custom form action +*/ +function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_body.tpl', $u_action = '') +{ + global $db, $user, $lang, $template; + + if (isset($_POST['cancel'])) + { + return false; + } + + $confirm = false; + if (isset($_POST['confirm'])) + { + // language frontier + if ($_POST['confirm'] === $lang['YES']) + { + $confirm = true; + } + } + + if ($check && $confirm) + { + $user_id = request_var('confirm_uid', 0); + $session_id = request_var('sess', ''); + + if (($user_id != $user->data['user_id']) || ($session_id != $user->session_id)) + { + return false; + } + + return true; + } + elseif ($check) + { + return false; + } + + $s_hidden_fields = build_hidden_fields(array( + 'confirm_uid' => $user->data['user_id'], + 'sess' => $user->session_id, + 'sid' => $user->session_id, + ) + ); + + // re-add sid / transform & to & for user->page (user->page is always using &) + $use_page = ($u_action) ? IP_ROOT_PATH . $u_action : IP_ROOT_PATH . str_replace('&', '&', $user->page['page']); + $u_action = reapply_sid($use_page); + $u_action .= ((strpos($u_action, '?') === false) ? '?' : '&'); + + $confirm_title = (!isset($lang[$title])) ? $lang['Confirm'] : $lang[$title]; + + $template->assign_vars(array( + 'MESSAGE_TITLE' => $confirm_title, + 'MESSAGE_TEXT' => (!isset($lang[$title . '_CONFIRM'])) ? $title : $lang[$title . '_CONFIRM'], + + 'YES_VALUE' => $lang['YES'], + 'S_CONFIRM_ACTION' => $u_action, + 'S_HIDDEN_FIELDS' => $hidden . $s_hidden_fields + ) + ); + + full_page_generation($html_body, $confirm_title, '', ''); +} + /* * jumpbox() : replace the original phpBB make_jumpbox() */ @@ -2146,11 +2247,11 @@ function setup_extra_lang($lang_files_array, $lang_base_path = '', $lang_overrid $default_lang_file = $lang_base_path . 'lang_english/' . $lang_files_array[$i] . '.' . PHP_EXT; if (@file_exists($user_lang_file)) { - @include_once($user_lang_file); + @include($user_lang_file); } elseif (@file_exists($default_lang_file)) { - @include_once($default_lang_file); + @include($default_lang_file); } } @@ -5891,7 +5992,7 @@ function message_die($msg_code, $msg_text = '', $msg_title = '', $err_line = '', { // Start session management $user->session_begin(); - //$auth->acl($user->data); + $auth->acl($user->data); $user->setup(); // End session management } diff --git a/includes/functions_admin.php b/includes/functions_admin.php index 0842979c..c0699744 100644 --- a/includes/functions_admin.php +++ b/includes/functions_admin.php @@ -20,15 +20,6 @@ die('Hacking attempt'); } -/** -* Generate back link for acp pages -*/ -function adm_back_link($u_action) -{ - global $lang; - return '

« ' . $lang['BACK_TO_PREV'] . ''; -} - /** * Function needed to fix config values before passing them to DB */ diff --git a/includes/functions_admin_phpbb3.php b/includes/functions_admin_phpbb3.php index f1c3743d..b686c521 100644 --- a/includes/functions_admin_phpbb3.php +++ b/includes/functions_admin_phpbb3.php @@ -687,6 +687,75 @@ function size_select_options($size_compare) return $s_size_options; } +/** +* Obtain either the members of a specified group, the groups the specified user is subscribed to +* or checking if a specified user is in a specified group. This function does not return pending memberships. +* +* Note: Never use this more than once... first group your users/groups +*/ +function group_memberships($group_id_ary = false, $user_id_ary = false, $return_bool = false) +{ + global $db; + + if (!$group_id_ary && !$user_id_ary) + { + return true; + } + + if ($user_id_ary) + { + $user_id_ary = (!is_array($user_id_ary)) ? array($user_id_ary) : $user_id_ary; + } + + if ($group_id_ary) + { + $group_id_ary = (!is_array($group_id_ary)) ? array($group_id_ary) : $group_id_ary; + } + + $sql = 'SELECT ug.*, u.username, u.username_clean, u.user_email + FROM ' . USER_GROUP_TABLE . ' ug, ' . USERS_TABLE . ' u + WHERE ug.user_id = u.user_id + AND ug.user_pending = 0 AND '; + + if ($group_id_ary) + { + $sql .= ' ' . $db->sql_in_set('ug.group_id', $group_id_ary); + } + + if ($user_id_ary) + { + $sql .= ($group_id_ary) ? ' AND ' : ' '; + $sql .= $db->sql_in_set('ug.user_id', $user_id_ary); + } + + $result = ($return_bool) ? $db->sql_query_limit($sql, 1) : $db->sql_query($sql); + + $row = $db->sql_fetchrow($result); + + if ($return_bool) + { + $db->sql_freeresult($result); + return ($row) ? true : false; + } + + if (!$row) + { + return false; + } + + $return = array(); + + do + { + $return[] = $row; + } + while ($row = $db->sql_fetchrow($result)); + + $db->sql_freeresult($result); + + return $return; +} + /** * Generate list of groups (option fields without select) * @@ -698,25 +767,25 @@ function size_select_options($size_compare) */ function group_select_options($group_id, $exclude_ids = false, $manage_founder = false) { - global $db, $user, $config; + global $db, $config, $user; $exclude_sql = ($exclude_ids !== false && sizeof($exclude_ids)) ? 'WHERE ' . $db->sql_in_set('group_id', array_map('intval', $exclude_ids), true) : ''; - $sql_and = (!$config['coppa_enable']) ? (($exclude_sql) ? ' AND ' : ' WHERE ') . "group_name <> 'REGISTERED_COPPA'" : ''; - $sql_founder = ($manage_founder !== false) ? (($exclude_sql || $sql_and) ? ' AND ' : ' WHERE ') . 'group_founder_manage = ' . (int) $manage_founder : ''; + $sql_and = (($exclude_sql || $sql_and) ? ' AND ' : ' WHERE ') . ' group_single_user = 0 '; + $sql_founder = ''; - $sql = 'SELECT group_id, group_name, group_type + $sql = 'SELECT group_id, group_name FROM ' . GROUPS_TABLE . " $exclude_sql $sql_and $sql_founder - ORDER BY group_type DESC, group_name ASC"; + ORDER BY group_name ASC"; $result = $db->sql_query($sql); $s_group_options = ''; while ($row = $db->sql_fetchrow($result)) { $selected = ($row['group_id'] == $group_id) ? ' selected="selected"' : ''; - $s_group_options .= '' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . ''; + $s_group_options .= ''; } $db->sql_freeresult($result); @@ -1336,8 +1405,37 @@ function add_permission_language() global $user; // First of all, our own file. We need to include it as the first file because it presets all relevant variables. - $user->add_lang('acp/permissions_phpbb'); + // MIGHTY GORGON - LANG - BEGIN + global $class_plugins; + global $db, $cache, $lang; + + setup_extra_lang(array('lang_cms_permissions', 'lang_permissions')); + // Add Plugins Lang! + if (!class_exists('class_plugins')) + { + @include(IP_ROOT_PATH . 'includes/class_plugins.' . PHP_EXT); + } + + if (empty($class_plugins)) + { + $class_plugins = new class_plugins(); + } + + foreach ($cache->obtain_plugins_config() as $k => $plugin) + { + if (!empty($plugin['plugin_enabled'])) + { + $class_plugins->setup_lang($plugin['plugin_dir'] . '/', 'permissions'); + } + } + + // Merge $lang with $user->lang + merge_user_lang(); + // MIGHTY GORGON - LANG - END + + // CODE REMOVED + /* $files_to_add = array(); // Now search in acp and mods folder for permissions_ files. @@ -1349,7 +1447,7 @@ function add_permission_language() { while (($file = readdir($dh)) !== false) { - if ($file !== 'permissions_phpbb.' . PHP_EXT && strpos($file, 'permissions_') === 0 && substr($file, -(strlen($phpEx) + 1)) === '.' . PHP_EXT) + if (($file !== 'permissions_phpbb.' . PHP_EXT) && (strpos($file, 'permissions_') === 0) && (substr($file, -(strlen(PHP_EXT) + 1)) === '.' . PHP_EXT)) { $files_to_add[] = $path . substr($file, 0, -(strlen(PHP_EXT) + 1)); } @@ -1364,7 +1462,10 @@ function add_permission_language() } $user->add_lang($files_to_add); + */ + return true; + } /** diff --git a/includes/functions_categories_hierarchy.php b/includes/functions_categories_hierarchy.php index 8362df69..5dede39e 100644 --- a/includes/functions_categories_hierarchy.php +++ b/includes/functions_categories_hierarchy.php @@ -1428,7 +1428,7 @@ function display_index($cur = 'Root') } for ($i = 0; $i < sizeof($data['group_id']); $i++) { - $forum_moderators[ $tree['id'][$idx] ][] = '' . $data['group_name'][$i] . ''; + $forum_moderators[ $tree['id'][$idx] ][] = '' . $data['group_name'][$i] . ''; } } } diff --git a/includes/functions_groups.php b/includes/functions_groups.php index 3daa183f..8c23985e 100644 --- a/includes/functions_groups.php +++ b/includes/functions_groups.php @@ -297,7 +297,7 @@ function build_groups_list_array() $i++; $groups_list[$i]['group_id'] = $row['group_id']; $groups_list[$i]['group_name'] = $row['group_name']; - $groups_list[$i]['group_url'] = append_sid('groupcp.' . PHP_EXT . '?' . POST_GROUPS_URL . '=' . $row['group_id']); + $groups_list[$i]['group_url'] = append_sid(CMS_PAGE_GROUP_CP . '?' . POST_GROUPS_URL . '=' . $row['group_id']); $groups_list[$i]['group_color'] = check_valid_color($row['group_color']); $groups_list[$i]['group_color_style'] = ($groups_list[$i]['group_color'] ? ' style="color:' . $row['group_color'] . ';font-weight:bold;"' : ' style="font-weight:bold;"'); } @@ -332,7 +332,7 @@ function build_groups_list_template() $groups_list = ''; while ($row = $db->sql_fetchrow($result)) { - $groups_list .= ' ' . $row['group_name'] . ','; + $groups_list .= ' ' . $row['group_name'] . ','; } $db->sql_freeresult($result); if ($config['active_users_legend'] == true) diff --git a/includes/functions_mg_log_admin.php b/includes/functions_mg_log_admin.php index a0a9aa04..1bc291f9 100644 --- a/includes/functions_mg_log_admin.php +++ b/includes/functions_mg_log_admin.php @@ -90,19 +90,19 @@ function parse_logs_action($log_id, $log_action_type, $log_desc, $log_username, break; case 'GROUP_JOIN': $group_name = get_group_name($log_action_array[0]); - $log_action['desc'] = $log_username . ' ' . $lang['LOGS_GROUP_JOIN'] . ' ' . htmlspecialchars($group_name) . ''; + $log_action['desc'] = $log_username . ' ' . $lang['LOGS_GROUP_JOIN'] . ' ' . htmlspecialchars($group_name) . ''; break; case 'GROUP_EDIT': $group_name = get_group_name($log_action_array[0]); - $log_action['desc'] = $log_username . ' ' . sprintf($lang['LOGS_GROUP_EDIT'], $log_target) . ' ' . htmlspecialchars($group_name) . ''; + $log_action['desc'] = $log_username . ' ' . sprintf($lang['LOGS_GROUP_EDIT'], $log_target) . ' ' . htmlspecialchars($group_name) . ''; break; case 'GROUP_ADD': $group_name = get_group_name($log_action_array[0]); - $log_action['desc'] = $log_username . ' ' . sprintf($lang['LOGS_GROUP_ADD'], $log_target) . ' ' . htmlspecialchars($group_name) . ''; + $log_action['desc'] = $log_username . ' ' . sprintf($lang['LOGS_GROUP_ADD'], $log_target) . ' ' . htmlspecialchars($group_name) . ''; break; case 'GROUP_TYPE': $group_name = get_group_name($log_action_array[0]); - $log_action['desc'] = $log_username . ' ' . sprintf($lang['LOGS_GROUP_TYPE'], ' ' . htmlspecialchars($group_name) . '', $lang['LOGS_GROUP_TYPE_' . $log_action_array[1]]); + $log_action['desc'] = $log_username . ' ' . sprintf($lang['LOGS_GROUP_TYPE'], ' ' . htmlspecialchars($group_name) . '', $lang['LOGS_GROUP_TYPE_' . $log_action_array[1]]); break; case 'MESSAGE': $log_action['desc'] = sprintf($lang['LOGS_MESSAGE'], $log_action_array[0]); @@ -183,7 +183,7 @@ function parse_logs_action($log_id, $log_action_type, $log_desc, $log_username, break; case 'ADMIN_GROUP_AUTH': $group_name = get_group_name($log_action_array[0]); - $log_action['desc'] = $log_username . ' ' . $lang['LOGS_ADMIN_GROUP_AUTH'] . ' ' . htmlspecialchars($group_name) . ''; + $log_action['desc'] = $log_username . ' ' . $lang['LOGS_ADMIN_GROUP_AUTH'] . ' ' . htmlspecialchars($group_name) . ''; break; case 'ADMIN_USER_BAN': $log_action['desc'] = $log_username . ' ' . $lang['LOGS_ADMIN_USER_BAN'] . ' => ' . $log_action_array[0] . ' (' . $log_target . ')'; diff --git a/includes/functions_post.php b/includes/functions_post.php index 0ca462e7..e3cca3f5 100644 --- a/includes/functions_post.php +++ b/includes/functions_post.php @@ -1013,7 +1013,7 @@ function generate_smilies($mode) { // Start session management $user->session_begin(); - //$auth->acl($user->data); + $auth->acl($user->data); $user->setup(); // End session management diff --git a/includes/functions_search.php b/includes/functions_search.php index ee78de5e..7c1c1c51 100644 --- a/includes/functions_search.php +++ b/includes/functions_search.php @@ -376,7 +376,7 @@ function username_search($search_match, $ajax_search = false) 'USERNAME' => (!empty($search_match)) ? phpbb_clean_username($search_match) : '', 'L_CLOSE_WINDOW' => $lang['Close_window'], - 'L_SEARCH_USERNAME' => $lang['Find_username'], + 'L_SEARCH_USERNAME' => $lang['FIND_USERNAME'], 'L_UPDATE_USERNAME' => $lang['Select_username'], 'L_SELECT' => $lang['Select'], 'L_SEARCH' => $lang['Search'], diff --git a/includes/log_http_cmd.php b/includes/log_http_cmd.php index f1648019..13759305 100644 --- a/includes/log_http_cmd.php +++ b/includes/log_http_cmd.php @@ -429,7 +429,7 @@ $update_log = true; } break; - case 'groupcp.' . PHP_EXT: + case CMS_PAGE_GROUP_CP: if((isset($_GET[POST_GROUPS_URL]) || isset($_POST[POST_GROUPS_URL]))) { // both the POST and the GET POST_GROUPS_URL var should be set diff --git a/includes/new_page_common.php b/includes/new_page_common.php index a958f450..89b39945 100644 --- a/includes/new_page_common.php +++ b/includes/new_page_common.php @@ -41,7 +41,7 @@ { // Start session management $user->session_begin(); - //$auth->acl($user->data); + $auth->acl($user->data); $user->setup(); // End session management } diff --git a/includes/pafiledb/modules/pa_email.php b/includes/pafiledb/modules/pa_email.php index 50f00737..f5472b41 100644 --- a/includes/pafiledb/modules/pa_email.php +++ b/includes/pafiledb/modules/pa_email.php @@ -57,7 +57,7 @@ function main($action) $sid = request_post_var('sid', ''); if (empty($sid) || ($sid != $user->data['session_id'])) { - message_die(GENERAL_ERROR, 'Invalid_session'); + message_die(GENERAL_ERROR, 'INVALID_SESSION'); } $error = false; diff --git a/includes/template.php b/includes/template.php index d8c4a151..3297c77f 100644 --- a/includes/template.php +++ b/includes/template.php @@ -744,6 +744,7 @@ function add_css_js() define('CSS_JS_PARSED', true); } + // Include custom CSS from templates/CURRENT_TPL folder if(is_array($this->css_style_include) && !empty($this->css_style_include)) { for ($i = 0; $i < sizeof($this->css_style_include); $i++) @@ -755,6 +756,7 @@ function add_css_js() } } + // Include custom CSS from templates/common folder if(is_array($this->css_include) && !empty($this->css_include)) { for ($i = 0; $i < sizeof($this->css_include); $i++) @@ -766,6 +768,7 @@ function add_css_js() } } + // Include custom JS from templates/common folder if(is_array($this->js_include) && !empty($this->js_include)) { for ($i = 0; $i < sizeof($this->js_include); $i++) diff --git a/includes/topic_review.php b/includes/topic_review.php index 70e243d4..c548a8c6 100644 --- a/includes/topic_review.php +++ b/includes/topic_review.php @@ -57,7 +57,7 @@ function topic_review($forum_id, $topic_id, $is_inline_review) // Start session management $user->session_begin(); - //$auth->acl($user->data); + $auth->acl($user->data); $user->setup(); // End session management diff --git a/includes/usercp_viewprofile.php b/includes/usercp_viewprofile.php index 6c638936..184da10f 100644 --- a/includes/usercp_viewprofile.php +++ b/includes/usercp_viewprofile.php @@ -908,7 +908,7 @@ // groupe visible : afficher if ($is_ok) { - $u_group_name = append_sid('groupcp.' . PHP_EXT . '?g=' . $groups[$i]['group_id']); + $u_group_name = append_sid(CMS_PAGE_GROUP_CP . '?g=' . $groups[$i]['group_id']); $l_group_name = $groups[$i]['group_name']; $l_group_desc = $groups[$i]['group_description']; $template->assign_block_vars('groups', array( diff --git a/includes/usercp_zebra.php b/includes/usercp_zebra.php index 1793ce56..24d55122 100644 --- a/includes/usercp_zebra.php +++ b/includes/usercp_zebra.php @@ -211,7 +211,6 @@ 'L_SELECT' => $lang['Select'], 'L_REMOVE_SELECTED' => $lang['Remove_selected'], 'L_ADD_MEMBER' => $lang['Add_member'], - 'L_FIND_USERNAME' => $lang['Find_username'], 'L_ADD_FOES' => $lang['ADD_FOES'], 'L_ADD_FOES_EXPLAIN' => $lang['ADD_FOES_EXPLAIN'], diff --git a/install/database_update.php b/install/database_update.php index dda28aca..fc057639 100644 --- a/install/database_update.php +++ b/install/database_update.php @@ -48,7 +48,7 @@ // Start session management $user->session_begin(false); - //$auth->acl($user->data); + $auth->acl($user->data); $user->setup(); // End session management diff --git a/install/includes/functions.php b/install/includes/functions.php index 3128e24c..772f621c 100644 --- a/install/includes/functions.php +++ b/install/includes/functions.php @@ -709,7 +709,7 @@ function message_die($msg_code, $msg_text = '', $msg_title = '', $err_line = '', { // Start session management $user->session_begin(); - //$auth->acl($user->data); + $auth->acl($user->data); $user->setup(); // End session management } diff --git a/install/install.php b/install/install.php index 966d1063..f412c302 100644 --- a/install/install.php +++ b/install/install.php @@ -65,7 +65,7 @@ // Start session management $user->session_begin(false); - //$auth->acl($user->data); + $auth->acl($user->data); $user->setup(); // End session management diff --git a/install/phpbb3_to_ip.php b/install/phpbb3_to_ip.php index dc142634..7ddcc16e 100644 --- a/install/phpbb3_to_ip.php +++ b/install/phpbb3_to_ip.php @@ -19,7 +19,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/install/schemas/db_update_054.sql b/install/schemas/db_update_054.sql index 5f880ca9..190318c7 100644 --- a/install/schemas/db_update_054.sql +++ b/install/schemas/db_update_054.sql @@ -766,6 +766,67 @@ CREATE TABLE `phpbb_modules` ( KEY `class_left_id` (`module_class`, `left_id`) ); +UPDATE phpbb_cms_blocks SET active = 0 WHERE bposition IN ('hh', 'hl', 'hc', 'fc', 'fr', 'ff'); + + + +######################################## +## BUILD 071 ## +######################################## +ALTER TABLE `phpbb_logs` CHANGE `log_desc` `log_desc` mediumtext NOT NULL; + +ALTER TABLE `phpbb_forums` CHANGE `forum_rules` `forum_rules_switch` tinyint(1) unsigned NOT NULL DEFAULT '0'; +ALTER TABLE `phpbb_forums` ADD `forum_rules_in_posting` tinyint(1) unsigned NOT NULL DEFAULT '0' AFTER `forum_rules_switch`; +ALTER TABLE `phpbb_forums` ADD `forum_rules_in_viewtopic` tinyint(1) unsigned NOT NULL DEFAULT '0' AFTER `forum_rules_switch`; +ALTER TABLE `phpbb_forums` ADD `forum_rules_in_viewforum` tinyint(1) unsigned NOT NULL DEFAULT '0' AFTER `forum_rules_switch`; +ALTER TABLE `phpbb_forums` ADD `forum_rules_custom_title` varchar(80) NOT NULL DEFAULT '' AFTER `forum_rules_switch`; +ALTER TABLE `phpbb_forums` ADD `forum_rules_display_title` tinyint(1) NOT NULL DEFAULT '1' AFTER `forum_rules_switch`; +ALTER TABLE `phpbb_forums` ADD `forum_rules` text NOT NULL AFTER `forum_rules_switch`; + +UPDATE phpbb_forums f, phpbb_forums_rules fr +SET f.forum_rules = fr.rules, f.forum_rules_display_title = fr.rules_display_title, f.forum_rules_custom_title = fr.rules_custom_title, f.forum_rules_in_viewforum = fr.rules_in_viewforum, f.forum_rules_in_viewtopic = fr.rules_in_viewtopic, f.forum_rules_in_posting = fr.rules_in_posting +WHERE f.forum_id = fr.forum_id; + +DROP TABLE `phpbb_forums_rules`; + + + +######################################## +## BUILD 072 ## +######################################## +DELETE FROM `phpbb_config` WHERE config_name = "cms_dock"; +DELETE FROM `phpbb_config` WHERE config_name = "cms_style"; + +ALTER TABLE `phpbb_users` ADD `user_flickr` varchar(255) DEFAULT '' NOT NULL AFTER `user_twitter`; +ALTER TABLE `phpbb_users` ADD `user_googleplus` varchar(255) DEFAULT '' NOT NULL AFTER `user_flickr`; +ALTER TABLE `phpbb_users` ADD `user_youtube` varchar(255) DEFAULT '' NOT NULL AFTER `user_googleplus`; +ALTER TABLE `phpbb_users` ADD `user_linkedin` varchar(255) DEFAULT '' NOT NULL AFTER `user_youtube`; + +ALTER TABLE `phpbb_users` CHANGE `user_style` `user_style` MEDIUMINT(8) NULL DEFAULT NULL; + +INSERT INTO `phpbb_config` (`config_name`, `config_value`) VALUES ('site_meta_keywords', 'your keywords, comma, separated'); +INSERT INTO `phpbb_config` (`config_name`, `config_value`) VALUES ('site_meta_keywords_switch', '1'); +INSERT INTO `phpbb_config` (`config_name`, `config_value`) VALUES ('site_meta_description', 'Your Site Description'); +INSERT INTO `phpbb_config` (`config_name`, `config_value`) VALUES ('site_meta_description_switch', '1'); +INSERT INTO `phpbb_config` (`config_name`, `config_value`) VALUES ('site_meta_author', 'Author'); +INSERT INTO `phpbb_config` (`config_name`, `config_value`) VALUES ('site_meta_author_switch', '1'); +INSERT INTO `phpbb_config` (`config_name`, `config_value`) VALUES ('site_meta_copyright', 'Copyright'); +INSERT INTO `phpbb_config` (`config_name`, `config_value`) VALUES ('site_meta_copyright_switch', '1'); + +ALTER TABLE `phpbb_posts` CHANGE `post_text` `post_text` MEDIUMTEXT NOT NULL; +ALTER TABLE `phpbb_posts` CHANGE `post_text_compiled` `post_text_compiled` MEDIUMTEXT NOT NULL; + + + +######################################## +## BUILD 073 ## +######################################## + + + +######################################## +## BUILD 074 ## +######################################## ## AUTH SYSTEM - BEGIN TRUNCATE TABLE `phpbb_acl_groups`; TRUNCATE TABLE `phpbb_acl_options`; @@ -774,15 +835,15 @@ TRUNCATE TABLE `phpbb_acl_roles_data`; TRUNCATE TABLE `phpbb_acl_users`; # -- CMS related auth options -INSERT INTO phpbb_acl_options (auth_option_id, auth_option, is_global, is_local, founder_only) VALUES (1, 'cms_', 1, 0, 0); -INSERT INTO phpbb_acl_options (auth_option_id, auth_option, is_global, is_local, founder_only) VALUES (2, 'cms_view', 1, 0, 0); -INSERT INTO phpbb_acl_options (auth_option_id, auth_option, is_global, is_local, founder_only) VALUES (3, 'cms_edit', 1, 0, 0); -INSERT INTO phpbb_acl_options (auth_option_id, auth_option, is_global, is_local, founder_only) VALUES (4, 'cms_l_add', 1, 0, 0); -INSERT INTO phpbb_acl_options (auth_option_id, auth_option, is_global, is_local, founder_only) VALUES (5, 'cms_l_edit', 1, 0, 0); -INSERT INTO phpbb_acl_options (auth_option_id, auth_option, is_global, is_local, founder_only) VALUES (6, 'cms_l_delete', 1, 0, 0); -INSERT INTO phpbb_acl_options (auth_option_id, auth_option, is_global, is_local, founder_only) VALUES (7, 'cms_b_add', 1, 0, 0); -INSERT INTO phpbb_acl_options (auth_option_id, auth_option, is_global, is_local, founder_only) VALUES (8, 'cms_b_edit', 1, 0, 0); -INSERT INTO phpbb_acl_options (auth_option_id, auth_option, is_global, is_local, founder_only) VALUES (9, 'cms_b_delete', 1, 0, 0); +INSERT INTO phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES ('cms_', 1, 0, 0); +INSERT INTO phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES ('cms_view', 1, 0, 0); +INSERT INTO phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES ('cms_edit', 1, 0, 0); +INSERT INTO phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES ('cms_l_add', 1, 0, 0); +INSERT INTO phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES ('cms_l_edit', 1, 0, 0); +INSERT INTO phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES ('cms_l_delete', 1, 0, 0); +INSERT INTO phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES ('cms_b_add', 1, 0, 0); +INSERT INTO phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES ('cms_b_edit', 1, 0, 0); +INSERT INTO phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES ('cms_b_delete', 1, 0, 0); # -- Admin related auth options INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_', 1); @@ -813,6 +874,12 @@ INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_', 1); INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_html', 1); INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_topicdelete', 1); +# -- Plugins related auth options +INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('pl_', 1); +INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('pl_input', 1); +INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('pl_edit', 1); +INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('pl_delete', 1); + # -- Standard auth roles INSERT INTO phpbb_acl_roles (role_id, role_name, role_description, role_type, role_order) VALUES (1, 'ROLE_CMS_CONTENT_MANAGER', 'ROLE_CMS_CONTENT_MANAGER_DESCRIPTION', 'cms_', 1); INSERT INTO phpbb_acl_roles (role_id, role_name, role_description, role_type, role_order) VALUES (2, 'ROLE_CMS_REVIEWER', 'ROLE_CMS_REVIEWER_DESCRIPTION', 'cms_', 2); @@ -830,6 +897,9 @@ INSERT INTO phpbb_acl_roles (role_id, role_name, role_description, role_type, ro INSERT INTO phpbb_acl_roles (role_id, role_name, role_description, role_type, role_order) VALUES (14, 'ROLE_FORUM_FULL', 'ROLE_FORUM_FULL_DESCRIPTION', 'f_', 1); INSERT INTO phpbb_acl_roles (role_id, role_name, role_description, role_type, role_order) VALUES (15, 'ROLE_FORUM_STANDARD', 'ROLE_FORUM_STANDARD_DESCRIPTION', 'f_', 2); INSERT INTO phpbb_acl_roles (role_id, role_name, role_description, role_type, role_order) VALUES (16, 'ROLE_FORUM_NOACCESS', 'ROLE_FORUM_NOACCES_DESCRIPTIONS', 'f_', 3); +INSERT INTO phpbb_acl_roles (role_id, role_name, role_description, role_type, role_order) VALUES (17, 'ROLE_PLUGINS_FULL', 'ROLE_PLUGINS_FULL_DESCRIPTION', 'pl_', 1); +INSERT INTO phpbb_acl_roles (role_id, role_name, role_description, role_type, role_order) VALUES (18, 'ROLE_PLUGINS_STANDARD', 'ROLE_PLUGINS_STANDARD_DESCRIPTION', 'pl_', 2); +INSERT INTO phpbb_acl_roles (role_id, role_name, role_description, role_type, role_order) VALUES (19, 'ROLE_PLUGINS_NOACCESS', 'ROLE_PLUGINS_NOACCES_DESCRIPTIONS', 'pl_', 3); # -- Roles data @@ -881,67 +951,21 @@ INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT # No Access (f_) INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 16, auth_option_id, 0 FROM phpbb_acl_options WHERE auth_option = 'f_'; +# Full Access (pl_) +INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 17, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'pl_%'; + +# Standard Access (pl_) +INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 18, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'pl_%' AND auth_option NOT IN ('pl_delete'); + +# No Access (pl_) +INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 19, auth_option_id, 0 FROM phpbb_acl_options WHERE auth_option = 'pl_'; + # Permissions # Admin user - full features for ACP INSERT INTO phpbb_acl_users (user_id, forum_id, auth_option_id, auth_role_id, auth_setting) SELECT user_id, 0, 0, 6, 0 FROM phpbb_users WHERE user_level = 1; ## AUTH SYSTEM - END -UPDATE phpbb_cms_blocks SET active = 0 WHERE bposition IN ('hh', 'hl', 'hc', 'fc', 'fr', 'ff'); - - - -######################################## -## BUILD 071 ## -######################################## -ALTER TABLE `phpbb_logs` CHANGE `log_desc` `log_desc` mediumtext NOT NULL; - -ALTER TABLE `phpbb_forums` CHANGE `forum_rules` `forum_rules_switch` tinyint(1) unsigned NOT NULL DEFAULT '0'; -ALTER TABLE `phpbb_forums` ADD `forum_rules_in_posting` tinyint(1) unsigned NOT NULL DEFAULT '0' AFTER `forum_rules_switch`; -ALTER TABLE `phpbb_forums` ADD `forum_rules_in_viewtopic` tinyint(1) unsigned NOT NULL DEFAULT '0' AFTER `forum_rules_switch`; -ALTER TABLE `phpbb_forums` ADD `forum_rules_in_viewforum` tinyint(1) unsigned NOT NULL DEFAULT '0' AFTER `forum_rules_switch`; -ALTER TABLE `phpbb_forums` ADD `forum_rules_custom_title` varchar(80) NOT NULL DEFAULT '' AFTER `forum_rules_switch`; -ALTER TABLE `phpbb_forums` ADD `forum_rules_display_title` tinyint(1) NOT NULL DEFAULT '1' AFTER `forum_rules_switch`; -ALTER TABLE `phpbb_forums` ADD `forum_rules` text NOT NULL AFTER `forum_rules_switch`; - -UPDATE phpbb_forums f, phpbb_forums_rules fr -SET f.forum_rules = fr.rules, f.forum_rules_display_title = fr.rules_display_title, f.forum_rules_custom_title = fr.rules_custom_title, f.forum_rules_in_viewforum = fr.rules_in_viewforum, f.forum_rules_in_viewtopic = fr.rules_in_viewtopic, f.forum_rules_in_posting = fr.rules_in_posting -WHERE f.forum_id = fr.forum_id; - -DROP TABLE `phpbb_forums_rules`; - - - -######################################## -## BUILD 072 ## -######################################## -DELETE FROM `phpbb_config` WHERE config_name = "cms_dock"; -DELETE FROM `phpbb_config` WHERE config_name = "cms_style"; - -ALTER TABLE `phpbb_users` ADD `user_flickr` varchar(255) DEFAULT '' NOT NULL AFTER `user_twitter`; -ALTER TABLE `phpbb_users` ADD `user_googleplus` varchar(255) DEFAULT '' NOT NULL AFTER `user_flickr`; -ALTER TABLE `phpbb_users` ADD `user_youtube` varchar(255) DEFAULT '' NOT NULL AFTER `user_googleplus`; -ALTER TABLE `phpbb_users` ADD `user_linkedin` varchar(255) DEFAULT '' NOT NULL AFTER `user_youtube`; - -ALTER TABLE `phpbb_users` CHANGE `user_style` `user_style` MEDIUMINT(8) NULL DEFAULT NULL; - -INSERT INTO `phpbb_config` (`config_name`, `config_value`) VALUES ('site_meta_keywords', 'your keywords, comma, separated'); -INSERT INTO `phpbb_config` (`config_name`, `config_value`) VALUES ('site_meta_keywords_switch', '1'); -INSERT INTO `phpbb_config` (`config_name`, `config_value`) VALUES ('site_meta_description', 'Your Site Description'); -INSERT INTO `phpbb_config` (`config_name`, `config_value`) VALUES ('site_meta_description_switch', '1'); -INSERT INTO `phpbb_config` (`config_name`, `config_value`) VALUES ('site_meta_author', 'Author'); -INSERT INTO `phpbb_config` (`config_name`, `config_value`) VALUES ('site_meta_author_switch', '1'); -INSERT INTO `phpbb_config` (`config_name`, `config_value`) VALUES ('site_meta_copyright', 'Copyright'); -INSERT INTO `phpbb_config` (`config_name`, `config_value`) VALUES ('site_meta_copyright_switch', '1'); - -ALTER TABLE `phpbb_posts` CHANGE `post_text` `post_text` MEDIUMTEXT NOT NULL; -ALTER TABLE `phpbb_posts` CHANGE `post_text_compiled` `post_text_compiled` MEDIUMTEXT NOT NULL; - - - -######################################## -## BUILD 073 ## -######################################## UPDATE phpbb_acl_options SET is_global = 1, is_local = 0 WHERE auth_option LIKE 'cms_%'; @@ -951,7 +975,7 @@ UPDATE phpbb_acl_options SET is_global = 1, is_local = 0 WHERE auth_option LIKE ##UPDATE phpbb_config SET config_value = '2' WHERE config_name = 'main_admin_id'; #-- DB CHANGES FOR VERSIONING -UPDATE phpbb_config SET config_value = '1.3.20.73' WHERE config_name = 'ip_version'; +UPDATE phpbb_config SET config_value = '1.3.21.74' WHERE config_name = 'ip_version'; UPDATE phpbb_config SET config_value = '.0.23' WHERE config_name = 'version'; UPDATE phpbb_config SET config_value = '2.0.0' WHERE config_name = 'cms_version'; UPDATE phpbb_album_config SET config_value = '1.5.0' WHERE config_name = 'fap_version'; diff --git a/install/schemas/mysql_basic.sql b/install/schemas/mysql_basic.sql index 0be06471..a412a920 100644 --- a/install/schemas/mysql_basic.sql +++ b/install/schemas/mysql_basic.sql @@ -1,7 +1,7 @@ ## Better leaving these input at the beginning... so they will be inserted as first values into tables ## Roll on version INSERT INTO `phpbb_config` (`config_name`, `config_value`) VALUES ('version', '.0.23'); -INSERT INTO `phpbb_config` (`config_name`, `config_value`) VALUES ('ip_version', '1.3.20.73'); +INSERT INTO `phpbb_config` (`config_name`, `config_value`) VALUES ('ip_version', '1.3.21.74'); INSERT INTO `phpbb_config` (`config_name`, `config_value`) VALUES ('cms_version', '2.0.0'); INSERT INTO `phpbb_album_config` (`config_name`, `config_value`) VALUES ('fap_version', '1.5.0'); ## INSERT INTO phpbb_link_config (config_name, config_value) VALUES ('site_logo', 'http://www.mightygorgon.com/images/banners/banner_mightygorgon.gif'); @@ -1815,15 +1815,15 @@ INSERT INTO phpbb_dl_ext_blacklist (extention) VALUES ## AUTH SYSTEM - BEGIN # -- CMS related auth options -INSERT INTO phpbb_acl_options (auth_option_id, auth_option, is_global, is_local, founder_only) VALUES (1, 'cms_', 1, 0, 0); -INSERT INTO phpbb_acl_options (auth_option_id, auth_option, is_global, is_local, founder_only) VALUES (2, 'cms_view', 1, 0, 0); -INSERT INTO phpbb_acl_options (auth_option_id, auth_option, is_global, is_local, founder_only) VALUES (3, 'cms_edit', 1, 0, 0); -INSERT INTO phpbb_acl_options (auth_option_id, auth_option, is_global, is_local, founder_only) VALUES (4, 'cms_l_add', 1, 0, 0); -INSERT INTO phpbb_acl_options (auth_option_id, auth_option, is_global, is_local, founder_only) VALUES (5, 'cms_l_edit', 1, 0, 0); -INSERT INTO phpbb_acl_options (auth_option_id, auth_option, is_global, is_local, founder_only) VALUES (6, 'cms_l_delete', 1, 0, 0); -INSERT INTO phpbb_acl_options (auth_option_id, auth_option, is_global, is_local, founder_only) VALUES (7, 'cms_b_add', 1, 0, 0); -INSERT INTO phpbb_acl_options (auth_option_id, auth_option, is_global, is_local, founder_only) VALUES (8, 'cms_b_edit', 1, 0, 0); -INSERT INTO phpbb_acl_options (auth_option_id, auth_option, is_global, is_local, founder_only) VALUES (9, 'cms_b_delete', 1, 0, 0); +INSERT INTO phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES ('cms_', 1, 0, 0); +INSERT INTO phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES ('cms_view', 1, 0, 0); +INSERT INTO phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES ('cms_edit', 1, 0, 0); +INSERT INTO phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES ('cms_l_add', 1, 0, 0); +INSERT INTO phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES ('cms_l_edit', 1, 0, 0); +INSERT INTO phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES ('cms_l_delete', 1, 0, 0); +INSERT INTO phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES ('cms_b_add', 1, 0, 0); +INSERT INTO phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES ('cms_b_edit', 1, 0, 0); +INSERT INTO phpbb_acl_options (auth_option, is_global, is_local, founder_only) VALUES ('cms_b_delete', 1, 0, 0); # -- Admin related auth options INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('a_', 1); @@ -1854,6 +1854,12 @@ INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_', 1); INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_html', 1); INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_topicdelete', 1); +# -- Plugins related auth options +INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('pl_', 1); +INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('pl_input', 1); +INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('pl_edit', 1); +INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('pl_delete', 1); + # -- Standard auth roles INSERT INTO phpbb_acl_roles (role_id, role_name, role_description, role_type, role_order) VALUES (1, 'ROLE_CMS_CONTENT_MANAGER', 'ROLE_CMS_CONTENT_MANAGER_DESCRIPTION', 'cms_', 1); INSERT INTO phpbb_acl_roles (role_id, role_name, role_description, role_type, role_order) VALUES (2, 'ROLE_CMS_REVIEWER', 'ROLE_CMS_REVIEWER_DESCRIPTION', 'cms_', 2); @@ -1871,6 +1877,9 @@ INSERT INTO phpbb_acl_roles (role_id, role_name, role_description, role_type, ro INSERT INTO phpbb_acl_roles (role_id, role_name, role_description, role_type, role_order) VALUES (14, 'ROLE_FORUM_FULL', 'ROLE_FORUM_FULL_DESCRIPTION', 'f_', 1); INSERT INTO phpbb_acl_roles (role_id, role_name, role_description, role_type, role_order) VALUES (15, 'ROLE_FORUM_STANDARD', 'ROLE_FORUM_STANDARD_DESCRIPTION', 'f_', 2); INSERT INTO phpbb_acl_roles (role_id, role_name, role_description, role_type, role_order) VALUES (16, 'ROLE_FORUM_NOACCESS', 'ROLE_FORUM_NOACCES_DESCRIPTIONS', 'f_', 3); +INSERT INTO phpbb_acl_roles (role_id, role_name, role_description, role_type, role_order) VALUES (17, 'ROLE_PLUGINS_FULL', 'ROLE_PLUGINS_FULL_DESCRIPTION', 'pl_', 1); +INSERT INTO phpbb_acl_roles (role_id, role_name, role_description, role_type, role_order) VALUES (18, 'ROLE_PLUGINS_STANDARD', 'ROLE_PLUGINS_STANDARD_DESCRIPTION', 'pl_', 2); +INSERT INTO phpbb_acl_roles (role_id, role_name, role_description, role_type, role_order) VALUES (19, 'ROLE_PLUGINS_NOACCESS', 'ROLE_PLUGINS_NOACCES_DESCRIPTIONS', 'pl_', 3); # -- Roles data @@ -1922,6 +1931,15 @@ INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT # No Access (f_) INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 16, auth_option_id, 0 FROM phpbb_acl_options WHERE auth_option = 'f_'; +# Full Access (pl_) +INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 17, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'pl_%'; + +# Standard Access (pl_) +INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 18, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'pl_%' AND auth_option NOT IN ('pl_delete'); + +# No Access (pl_) +INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 19, auth_option_id, 0 FROM phpbb_acl_options WHERE auth_option = 'pl_'; + # Permissions # Admin user - full features for ACP diff --git a/install/schemas/sql_update_ip.php b/install/schemas/sql_update_ip.php index e24fcab2..f07fe5a6 100644 --- a/install/schemas/sql_update_ip.php +++ b/install/schemas/sql_update_ip.php @@ -75,6 +75,7 @@ case '131871': $current_ip_version = '1.3.18.71'; break; case '131972': $current_ip_version = '1.3.19.72'; break; case '132073': $current_ip_version = '1.3.20.73'; break; + case '132174': $current_ip_version = '1.3.21.74'; break; } // We need to force this because in MySQL 5.5.5 the new default DB Engine is InnoDB, not MyISAM any more @@ -4192,6 +4193,55 @@ KEY `class_left_id` (`module_class`, `left_id`) )"; + $sql[] = "UPDATE " . $table_prefix . "cms_blocks SET active = 0 WHERE bposition IN ('hh', 'hl', 'hc', 'fc', 'fr', 'ff')"; + + /* Updating from IP 1.3.17.70 */ + case '1.3.17.70': + $sql[] = "ALTER TABLE `" . $table_prefix . "logs` CHANGE `log_desc` `log_desc` mediumtext NOT NULL"; + + $sql[] = "ALTER TABLE `" . $table_prefix . "forums` CHANGE `forum_rules` `forum_rules_switch` tinyint(1) unsigned NOT NULL DEFAULT '0'"; + $sql[] = "ALTER TABLE `" . $table_prefix . "forums` ADD `forum_rules_in_posting` tinyint(1) unsigned NOT NULL DEFAULT '0' AFTER `forum_rules_switch`"; + $sql[] = "ALTER TABLE `" . $table_prefix . "forums` ADD `forum_rules_in_viewtopic` tinyint(1) unsigned NOT NULL DEFAULT '0' AFTER `forum_rules_switch`"; + $sql[] = "ALTER TABLE `" . $table_prefix . "forums` ADD `forum_rules_in_viewforum` tinyint(1) unsigned NOT NULL DEFAULT '0' AFTER `forum_rules_switch`"; + $sql[] = "ALTER TABLE `" . $table_prefix . "forums` ADD `forum_rules_custom_title` varchar(80) NOT NULL DEFAULT '' AFTER `forum_rules_switch`"; + $sql[] = "ALTER TABLE `" . $table_prefix . "forums` ADD `forum_rules_display_title` tinyint(1) NOT NULL DEFAULT '1' AFTER `forum_rules_switch`"; + $sql[] = "ALTER TABLE `" . $table_prefix . "forums` ADD `forum_rules` text NOT NULL AFTER `forum_rules_switch`"; + + $sql[] = "UPDATE " . $table_prefix . "forums f, " . $table_prefix . "forums_rules fr + SET f.forum_rules = fr.rules, f.forum_rules_display_title = fr.rules_display_title, f.forum_rules_custom_title = fr.rules_custom_title, f.forum_rules_in_viewforum = fr.rules_in_viewforum, f.forum_rules_in_viewtopic = fr.rules_in_viewtopic, f.forum_rules_in_posting = fr.rules_in_posting + WHERE f.forum_id = fr.forum_id"; + + $sql[] = "DROP TABLE `" . $table_prefix . "forums_rules`"; + + /* Updating from IP 1.3.18.71 */ + case '1.3.18.71': + $sql[] = "DELETE FROM `" . $table_prefix . "config` WHERE config_name = 'cms_dock'"; + $sql[] = "DELETE FROM `" . $table_prefix . "config` WHERE config_name = 'cms_style'"; + + $sql[] = "ALTER TABLE `" . $table_prefix . "users` ADD `user_flickr` varchar(255) DEFAULT '' NOT NULL AFTER `user_twitter`"; + $sql[] = "ALTER TABLE `" . $table_prefix . "users` ADD `user_googleplus` varchar(255) DEFAULT '' NOT NULL AFTER `user_flickr`"; + $sql[] = "ALTER TABLE `" . $table_prefix . "users` ADD `user_youtube` varchar(255) DEFAULT '' NOT NULL AFTER `user_googleplus`"; + $sql[] = "ALTER TABLE `" . $table_prefix . "users` ADD `user_linkedin` varchar(255) DEFAULT '' NOT NULL AFTER `user_youtube`"; + + $sql[] = "ALTER TABLE `" . $table_prefix . "users` CHANGE `user_style` `user_style` MEDIUMINT(8) NULL DEFAULT NULL"; + + $sql[] = "INSERT INTO `" . $table_prefix . "config` (`config_name`, `config_value`) VALUES ('site_meta_keywords', 'your keywords, comma, separated')"; + $sql[] = "INSERT INTO `" . $table_prefix . "config` (`config_name`, `config_value`) VALUES ('site_meta_keywords_switch', '1')"; + $sql[] = "INSERT INTO `" . $table_prefix . "config` (`config_name`, `config_value`) VALUES ('site_meta_description', 'Your Site Description')"; + $sql[] = "INSERT INTO `" . $table_prefix . "config` (`config_name`, `config_value`) VALUES ('site_meta_description_switch', '1')"; + $sql[] = "INSERT INTO `" . $table_prefix . "config` (`config_name`, `config_value`) VALUES ('site_meta_author', 'Author')"; + $sql[] = "INSERT INTO `" . $table_prefix . "config` (`config_name`, `config_value`) VALUES ('site_meta_author_switch', '1')"; + $sql[] = "INSERT INTO `" . $table_prefix . "config` (`config_name`, `config_value`) VALUES ('site_meta_copyright', 'Copyright')"; + $sql[] = "INSERT INTO `" . $table_prefix . "config` (`config_name`, `config_value`) VALUES ('site_meta_copyright_switch', '1')"; + + $sql[] = "ALTER TABLE `" . $table_prefix . "posts` CHANGE `post_text` `post_text` MEDIUMTEXT NOT NULL"; + $sql[] = "ALTER TABLE `" . $table_prefix . "posts` CHANGE `post_text_compiled` `post_text_compiled` MEDIUMTEXT NOT NULL"; + + /* Updating from IP 1.3.19.72 */ + case '1.3.19.72': + + /* Updating from IP 1.3.20.73 */ + case '1.3.20.73': // AUTH SYSTEM - BEGIN $sql[] = "TRUNCATE TABLE `" . $table_prefix . "acl_groups`"; $sql[] = "TRUNCATE TABLE `" . $table_prefix . "acl_options`"; @@ -4200,15 +4250,15 @@ $sql[] = "TRUNCATE TABLE `" . $table_prefix . "acl_users`"; // CMS related auth options - $sql[] = "INSERT INTO " . $table_prefix . "acl_options (auth_option_id, auth_option, is_global, is_local, founder_only) VALUES (1, 'cms_', 1, 0, 0)"; - $sql[] = "INSERT INTO " . $table_prefix . "acl_options (auth_option_id, auth_option, is_global, is_local, founder_only) VALUES (2, 'cms_view', 1, 0, 0)"; - $sql[] = "INSERT INTO " . $table_prefix . "acl_options (auth_option_id, auth_option, is_global, is_local, founder_only) VALUES (3, 'cms_edit', 1, 0, 0)"; - $sql[] = "INSERT INTO " . $table_prefix . "acl_options (auth_option_id, auth_option, is_global, is_local, founder_only) VALUES (4, 'cms_l_add', 1, 0, 0)"; - $sql[] = "INSERT INTO " . $table_prefix . "acl_options (auth_option_id, auth_option, is_global, is_local, founder_only) VALUES (5, 'cms_l_edit', 1, 0, 0)"; - $sql[] = "INSERT INTO " . $table_prefix . "acl_options (auth_option_id, auth_option, is_global, is_local, founder_only) VALUES (6, 'cms_l_delete', 1, 0, 0)"; - $sql[] = "INSERT INTO " . $table_prefix . "acl_options (auth_option_id, auth_option, is_global, is_local, founder_only) VALUES (7, 'cms_b_add', 1, 0, 0)"; - $sql[] = "INSERT INTO " . $table_prefix . "acl_options (auth_option_id, auth_option, is_global, is_local, founder_only) VALUES (8, 'cms_b_edit', 1, 0, 0)"; - $sql[] = "INSERT INTO " . $table_prefix . "acl_options (auth_option_id, auth_option, is_global, is_local, founder_only) VALUES (9, 'cms_b_delete', 1, 0, 0)"; + $sql[] = "INSERT INTO " . $table_prefix . "acl_options (auth_option, is_global, is_local, founder_only) VALUES ('cms_', 1, 0, 0)"; + $sql[] = "INSERT INTO " . $table_prefix . "acl_options (auth_option, is_global, is_local, founder_only) VALUES ('cms_view', 1, 0, 0)"; + $sql[] = "INSERT INTO " . $table_prefix . "acl_options (auth_option, is_global, is_local, founder_only) VALUES ('cms_edit', 1, 0, 0)"; + $sql[] = "INSERT INTO " . $table_prefix . "acl_options (auth_option, is_global, is_local, founder_only) VALUES ('cms_l_add', 1, 0, 0)"; + $sql[] = "INSERT INTO " . $table_prefix . "acl_options (auth_option, is_global, is_local, founder_only) VALUES ('cms_l_edit', 1, 0, 0)"; + $sql[] = "INSERT INTO " . $table_prefix . "acl_options (auth_option, is_global, is_local, founder_only) VALUES ('cms_l_delete', 1, 0, 0)"; + $sql[] = "INSERT INTO " . $table_prefix . "acl_options (auth_option, is_global, is_local, founder_only) VALUES ('cms_b_add', 1, 0, 0)"; + $sql[] = "INSERT INTO " . $table_prefix . "acl_options (auth_option, is_global, is_local, founder_only) VALUES ('cms_b_edit', 1, 0, 0)"; + $sql[] = "INSERT INTO " . $table_prefix . "acl_options (auth_option, is_global, is_local, founder_only) VALUES ('cms_b_delete', 1, 0, 0)"; // Admin related auth options $sql[] = "INSERT INTO " . $table_prefix . "acl_options (auth_option, is_global) VALUES ('a_', 1)"; @@ -4239,6 +4289,12 @@ $sql[] = "INSERT INTO " . $table_prefix . "acl_options (auth_option, is_local) VALUES ('f_html', 1)"; $sql[] = "INSERT INTO " . $table_prefix . "acl_options (auth_option, is_local) VALUES ('f_topicdelete', 1)"; + // Plugins related auth options + $sql[] = "INSERT INTO " . $table_prefix . "acl_options (auth_option, is_global) VALUES ('pl_', 1)"; + $sql[] = "INSERT INTO " . $table_prefix . "acl_options (auth_option, is_global) VALUES ('pl_input', 1)"; + $sql[] = "INSERT INTO " . $table_prefix . "acl_options (auth_option, is_global) VALUES ('pl_edit', 1)"; + $sql[] = "INSERT INTO " . $table_prefix . "acl_options (auth_option, is_global) VALUES ('pl_delete', 1)"; + // Standard auth roles $sql[] = "INSERT INTO " . $table_prefix . "acl_roles (role_id, role_name, role_description, role_type, role_order) VALUES (1, 'ROLE_CMS_CONTENT_MANAGER', 'ROLE_CMS_CONTENT_MANAGER_DESCRIPTION', 'cms_', 1)"; $sql[] = "INSERT INTO " . $table_prefix . "acl_roles (role_id, role_name, role_description, role_type, role_order) VALUES (2, 'ROLE_CMS_REVIEWER', 'ROLE_CMS_REVIEWER_DESCRIPTION', 'cms_', 2)"; @@ -4256,6 +4312,9 @@ $sql[] = "INSERT INTO " . $table_prefix . "acl_roles (role_id, role_name, role_description, role_type, role_order) VALUES (14, 'ROLE_FORUM_FULL', 'ROLE_FORUM_FULL_DESCRIPTION', 'f_', 1)"; $sql[] = "INSERT INTO " . $table_prefix . "acl_roles (role_id, role_name, role_description, role_type, role_order) VALUES (15, 'ROLE_FORUM_STANDARD', 'ROLE_FORUM_STANDARD_DESCRIPTION', 'f_', 2)"; $sql[] = "INSERT INTO " . $table_prefix . "acl_roles (role_id, role_name, role_description, role_type, role_order) VALUES (16, 'ROLE_FORUM_NOACCESS', 'ROLE_FORUM_NOACCES_DESCRIPTIONS', 'f_', 3)"; + $sql[] = "INSERT INTO " . $table_prefix . "acl_roles (role_id, role_name, role_description, role_type, role_order) VALUES (17, 'ROLE_PLUGINS_FULL', 'ROLE_PLUGINS_FULL_DESCRIPTION', 'f_', 1)"; + $sql[] = "INSERT INTO " . $table_prefix . "acl_roles (role_id, role_name, role_description, role_type, role_order) VALUES (18, 'ROLE_PLUGINS_STANDARD', 'ROLE_PLUGINS_STANDARD_DESCRIPTION', 'f_', 2)"; + $sql[] = "INSERT INTO " . $table_prefix . "acl_roles (role_id, role_name, role_description, role_type, role_order) VALUES (19, 'ROLE_PLUGINS_NOACCESS', 'ROLE_PLUGINS_NOACCES_DESCRIPTIONS', 'f_', 3)"; // Roles data @@ -4307,62 +4366,25 @@ // No Access (f_) $sql[] = "INSERT INTO " . $table_prefix . "acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 16, auth_option_id, 0 FROM " . $table_prefix . "acl_options WHERE auth_option = 'f_'"; + // Full Access (pl_) + $sql[] = "INSERT INTO " . $table_prefix . "acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 17, auth_option_id, 1 FROM " . $table_prefix . "acl_options WHERE auth_option LIKE 'pl_%'"; + + // Standard Access (pl_) + $sql[] = "INSERT INTO " . $table_prefix . "acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 18, auth_option_id, 1 FROM " . $table_prefix . "acl_options WHERE auth_option LIKE 'pl_%' AND auth_option NOT IN ('pl_delete')"; + + // No Access (pl_) + $sql[] = "INSERT INTO " . $table_prefix . "acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 19, auth_option_id, 0 FROM " . $table_prefix . "acl_options WHERE auth_option = 'pl_'"; + // Permissions // Admin user - full features for ACP $sql[] = "INSERT INTO " . $table_prefix . "acl_users (user_id, forum_id, auth_option_id, auth_role_id, auth_setting) SELECT user_id, 0, 0, 6, 0 FROM " . $table_prefix . "users WHERE user_level = 1"; // AUTH SYSTEM - END - $sql[] = "UPDATE " . $table_prefix . "cms_blocks SET active = 0 WHERE bposition IN ('hh', 'hl', 'hc', 'fc', 'fr', 'ff')"; - - /* Updating from IP 1.3.17.70 */ - case '1.3.17.70': - $sql[] = "ALTER TABLE `" . $table_prefix . "logs` CHANGE `log_desc` `log_desc` mediumtext NOT NULL"; - - $sql[] = "ALTER TABLE `" . $table_prefix . "forums` CHANGE `forum_rules` `forum_rules_switch` tinyint(1) unsigned NOT NULL DEFAULT '0'"; - $sql[] = "ALTER TABLE `" . $table_prefix . "forums` ADD `forum_rules_in_posting` tinyint(1) unsigned NOT NULL DEFAULT '0' AFTER `forum_rules_switch`"; - $sql[] = "ALTER TABLE `" . $table_prefix . "forums` ADD `forum_rules_in_viewtopic` tinyint(1) unsigned NOT NULL DEFAULT '0' AFTER `forum_rules_switch`"; - $sql[] = "ALTER TABLE `" . $table_prefix . "forums` ADD `forum_rules_in_viewforum` tinyint(1) unsigned NOT NULL DEFAULT '0' AFTER `forum_rules_switch`"; - $sql[] = "ALTER TABLE `" . $table_prefix . "forums` ADD `forum_rules_custom_title` varchar(80) NOT NULL DEFAULT '' AFTER `forum_rules_switch`"; - $sql[] = "ALTER TABLE `" . $table_prefix . "forums` ADD `forum_rules_display_title` tinyint(1) NOT NULL DEFAULT '1' AFTER `forum_rules_switch`"; - $sql[] = "ALTER TABLE `" . $table_prefix . "forums` ADD `forum_rules` text NOT NULL AFTER `forum_rules_switch`"; - - $sql[] = "UPDATE " . $table_prefix . "forums f, " . $table_prefix . "forums_rules fr - SET f.forum_rules = fr.rules, f.forum_rules_display_title = fr.rules_display_title, f.forum_rules_custom_title = fr.rules_custom_title, f.forum_rules_in_viewforum = fr.rules_in_viewforum, f.forum_rules_in_viewtopic = fr.rules_in_viewtopic, f.forum_rules_in_posting = fr.rules_in_posting - WHERE f.forum_id = fr.forum_id"; - - $sql[] = "DROP TABLE `" . $table_prefix . "forums_rules`"; - - /* Updating from IP 1.3.18.71 */ - case '1.3.18.71': - $sql[] = "DELETE FROM `" . $table_prefix . "config` WHERE config_name = 'cms_dock'"; - $sql[] = "DELETE FROM `" . $table_prefix . "config` WHERE config_name = 'cms_style'"; - - $sql[] = "ALTER TABLE `" . $table_prefix . "users` ADD `user_flickr` varchar(255) DEFAULT '' NOT NULL AFTER `user_twitter`"; - $sql[] = "ALTER TABLE `" . $table_prefix . "users` ADD `user_googleplus` varchar(255) DEFAULT '' NOT NULL AFTER `user_flickr`"; - $sql[] = "ALTER TABLE `" . $table_prefix . "users` ADD `user_youtube` varchar(255) DEFAULT '' NOT NULL AFTER `user_googleplus`"; - $sql[] = "ALTER TABLE `" . $table_prefix . "users` ADD `user_linkedin` varchar(255) DEFAULT '' NOT NULL AFTER `user_youtube`"; - - $sql[] = "ALTER TABLE `" . $table_prefix . "users` CHANGE `user_style` `user_style` MEDIUMINT(8) NULL DEFAULT NULL"; - - $sql[] = "INSERT INTO `" . $table_prefix . "config` (`config_name`, `config_value`) VALUES ('site_meta_keywords', 'your keywords, comma, separated')"; - $sql[] = "INSERT INTO `" . $table_prefix . "config` (`config_name`, `config_value`) VALUES ('site_meta_keywords_switch', '1')"; - $sql[] = "INSERT INTO `" . $table_prefix . "config` (`config_name`, `config_value`) VALUES ('site_meta_description', 'Your Site Description')"; - $sql[] = "INSERT INTO `" . $table_prefix . "config` (`config_name`, `config_value`) VALUES ('site_meta_description_switch', '1')"; - $sql[] = "INSERT INTO `" . $table_prefix . "config` (`config_name`, `config_value`) VALUES ('site_meta_author', 'Author')"; - $sql[] = "INSERT INTO `" . $table_prefix . "config` (`config_name`, `config_value`) VALUES ('site_meta_author_switch', '1')"; - $sql[] = "INSERT INTO `" . $table_prefix . "config` (`config_name`, `config_value`) VALUES ('site_meta_copyright', 'Copyright')"; - $sql[] = "INSERT INTO `" . $table_prefix . "config` (`config_name`, `config_value`) VALUES ('site_meta_copyright_switch', '1')"; - - $sql[] = "ALTER TABLE `" . $table_prefix . "posts` CHANGE `post_text` `post_text` MEDIUMTEXT NOT NULL"; - $sql[] = "ALTER TABLE `" . $table_prefix . "posts` CHANGE `post_text_compiled` `post_text_compiled` MEDIUMTEXT NOT NULL"; - - /* Updating from IP 1.3.19.72 */ - case '1.3.19.72': $sql[] = "UPDATE `" . $table_prefix . "acl_options` SET is_global = 1, is_local = 0 WHERE auth_option LIKE 'cms_%'"; - /* Updating from IP 1.3.20.73 */ - case '1.3.20.73': + /* Updating from IP 1.3.21.74 */ + case '1.3.21.74': } diff --git a/install/schemas/versions.php b/install/schemas/versions.php index 87d583c4..320b9885 100644 --- a/install/schemas/versions.php +++ b/install/schemas/versions.php @@ -23,7 +23,7 @@ // Versioning $fap_version = '1.5.0'; $phpbb_version = '.0.23'; -$ip_version = '1.3.20.73'; +$ip_version = '1.3.21.74'; // CHMOD $chmod_777 = array(); diff --git a/language/lang_english/lang_admin.php b/language/lang_english/lang_admin.php index 858e4b27..10782ef2 100644 --- a/language/lang_english/lang_admin.php +++ b/language/lang_english/lang_admin.php @@ -1090,7 +1090,7 @@ 'IcyPhoenix_Code_Changes' => 'Code Changes Mod', 'IcyPhoenix_Updates' => 'Icy Phoenix Updates', 'PhpBB_Upgrade' => 'phpBB Upgrade', - 'Header_Welcome' => 'Welcome on Icy Phoenix Administration Control Panel', + 'Header_Welcome' => 'Welcome to Icy Phoenix Administration Control Panel', 'Prune_users' => 'Prune users', 'Prune_Overview' => 'Pruning Overview', @@ -1968,9 +1968,6 @@ 'FORUM_LIMIT_EDIT_TIME' => 'Limit User Post Edit Time', 'FORUM_LIMIT_EDIT_TIME_EXPLAIN' => 'By enabling this option users will be allowed to edit own messages only within the limit set in Posts configuration of Icy Phoenix (ACP » Configuration » Main Settings » Posting And Messages)', - 'BACK_TO_TOP' => 'Top', - 'BACK_TO_PREV' => 'Back to previous page', - // Custom BBCodes - BEGIN 'BBCODES_CUSTOM_BBCODES' => 'Custom BBCodes', 'BBCODES_CUSTOM_BBCODES_EXPLAIN' => 'BBCode is a special implementation of HTML offering greater control over what and how something is displayed. From this page you can add, remove and edit custom BBCodes. To be able to use these Custom BBCodes you need to enable Enable Custom BBCodes in ACP » Configuration » Main Settings » Posting And Messages section.', diff --git a/language/lang_english/lang_cms.php b/language/lang_english/lang_cms.php index 106e869b..3e4a43df 100644 --- a/language/lang_english/lang_cms.php +++ b/language/lang_english/lang_cms.php @@ -311,6 +311,7 @@ 'CMS_FileCreationError' => 'The file cannot be automatically created.', 'CMS_FileCreationManual' => 'Please create a copy of index_empty.php, assign it the name you have inserted in the page creation form and upload it in your site root.', 'CMS_PERMISSIONS' => 'Permissions', + 'CMS_PERMISSIONS_ROLES' => 'Permissions Roles', 'CMS_Global_Header' => 'Global Header', 'CMS_GLOBAL_BLOCKS' => 'Global Blocks', 'CMS_BREADCRUMBS' => 'Breadcrumbs', @@ -419,8 +420,8 @@ 'CMS_TIP_STANDARD_PAGES' => 'Standard pages: default pages in Icy Phoenix.
These pages already have a defined content, but you can customize them by adding blocks or content in one of the allowed positions.
You can also add new pages, but these must already exists on your server.
In this section you can also customize permissions and global page settings like breadcrumbs and global blocks.', 'CMS_TIP_BLOCK_SETTINGS' => 'A block is a section or widget you can add to any page.
Before being able to add a block to a page, you need to create it in this section.
Once block content has been defined and saved, you can then add the block on any page.
After you have created a new block, you can also add the same block on multiple pages without having to duplicate its content again.', 'CMS_TIP_GLOBAL_BLOCKS' => 'Global blocks are blocks that could be used on any page without the needs to add them on any page.
To be able to display global blocks you need to make sure that the target page has Global Blocks enabled in its settings.', - 'CMS_TIP_AUTH' => 'Auth management for CMS pages and blocks.', - 'CMS_TIP_CONFIG' => 'CMS configuration: in this page you can set some basics settings of the CMS.', + 'CMS_TIP_AUTH' => 'Permissions system for CMS and plugins.', + 'CMS_TIP_CONFIG' => 'CMS configuration: some basics settings for the CMS.', 'CMS_TIP_MENU' => 'This section allows you to create and manage navigations menu.
You can create several navigations menu and then you will be able to add them on any page through the "Dynamic Menu" block (remember to add the right Menu ID).
You are also able to set special images and permissions on any link and links categories.', 'CMS_TIP_ADS' => 'The advertising section is intended to manage common kind of advertising in all pages and in some common sections (like forums, topics and menu).
In this section you will be able to create several ads and then you can decide how to be displayed (if more than one ad is set for the same position, then ads will be displayed randomly).', // CMS - TIPS - END @@ -444,7 +445,7 @@ 'CMS_USER' => 'Username', 'CMS_AUTH' => 'Permissions', - 'CMS_AUTH_TEXT' => 'In this page you have full permissions', + 'CMS_AUTH_TEXT' => 'In this page you can view and set permissions for administrators, moderators, users and groups. Permissions are based on a simple YES/NO system. Setting an option to NEVER for a user or usergroup overrides any other value assigned to it. If you do not wish to assign a value for an option for this user or group select NO. If values are assigned for this option elsewhere they will be used in preference, else NEVER is assumed.', 'CMS_AUTH_XP' => 'Special permissions', 'CMS_ROLE' => 'Role', 'CMS_ROLES' => 'Roles', @@ -453,6 +454,47 @@ 'CMS_NO_AUTH' => 'You didn\'t set any special permission', 'CMS_NO_ROLE' => 'You didn\'t set any role', + 'CMS_PERMISSIONS_ADMINS' => 'Administrators Permissions', + 'CMS_PERMISSIONS_ADMINS_EXPLAIN' => 'View Administrators Permissions', + 'CMS_PERMISSIONS_MODS' => 'Moderators Permissions', + 'CMS_PERMISSIONS_MODS_EXPLAIN' => 'View Moderators Permissions', + 'CMS_PERMISSIONS_CMS_USERS' => 'Users CMS Permissions', + 'CMS_PERMISSIONS_CMS_USERS_EXPLAIN' => 'View Users CMS Permissions', + 'CMS_PERMISSIONS_CMS_GROUPS' => 'Groups CMS Permissions', + 'CMS_PERMISSIONS_CMS_GROUPS_EXPLAIN' => 'View Groups CMS Permissions', + 'CMS_PERMISSIONS_PLUGINS_USERS' => 'Users Plugins Permissions', + 'CMS_PERMISSIONS_PLUGINS_USERS_EXPLAIN' => 'View Users Plugins Permissions', + 'CMS_PERMISSIONS_PLUGINS_GROUPS' => 'Groups Plugins Permissions', + 'CMS_PERMISSIONS_PLUGINS_GROUPS_EXPLAIN' => 'View Groups Plugins Permissions', + 'CMS_PERMISSIONS_USERS' => 'Users Permissions', + 'CMS_PERMISSIONS_USERS_EXPLAIN' => 'View Users Permissions', + 'CMS_PERMISSIONS_GROUPS' => 'Groups Permissions', + 'CMS_PERMISSIONS_GROUPS_EXPLAIN' => 'View Groups Permissions', + + 'CMS_AUTH_ADMINS' => 'Administrators', + 'CMS_AUTH_ADMINS_EXPLAIN' => 'Permissions for users with administration levels', + 'CMS_AUTH_MODS' => 'Moderators', + 'CMS_AUTH_MODS_EXPLAIN' => 'Permissions for moderators', + 'CMS_AUTH_CMS_USERS' => 'CMS Users', + 'CMS_AUTH_CMS_USERS_EXPLAIN' => 'Global CMS permissions for users', + 'CMS_AUTH_CMS_GROUPS' => 'CMS Groups', + 'CMS_AUTH_CMS_GROUPS_EXPLAIN' => 'Global CMS permissions for groups', + 'CMS_AUTH_PLUGINS_USERS' => 'Plugins Users', + 'CMS_AUTH_PLUGINS_USERS_EXPLAIN' => 'Global Plugins permissions for users', + 'CMS_AUTH_PLUGINS_GROUPS' => 'Plugins Groups', + 'CMS_AUTH_PLUGINS_GROUPS_EXPLAIN' => 'Global Plugins permissions for groups', + 'CMS_AUTH_USERS' => 'Users', + 'CMS_AUTH_USERS_EXPLAIN' => 'Global permissions for users', + 'CMS_AUTH_GROUPS' => 'Groups', + 'CMS_AUTH_GROUPS_EXPLAIN' => 'Global permissions for groups', + + 'CMS_AUTH_CMS_USERS_GROUPS' => 'CMS', + 'CMS_AUTH_CMS_USERS_GROUPS_EXPLAIN' => 'CMS permissions for users and groups', + 'CMS_AUTH_PLUGINS_USERS_GROUPS' => 'Plugins', + 'CMS_AUTH_PLUGINS_USERS_GROUPS_EXPLAIN' => 'Plugins permissions for users and groups', + 'CMS_AUTH_USERS_GROUPS' => 'Global', + 'CMS_AUTH_USERS_GROUPS_EXPLAIN' => 'Global permissions for users and groups', + 'CMS_USERS_CMS_NEW' => 'Create your site', 'CMS_USERS_CMS_EDIT' => 'Edit settings', diff --git a/language/lang_english/lang_cms_permissions.php b/language/lang_english/lang_cms_permissions.php new file mode 100644 index 00000000..0d4d248c --- /dev/null +++ b/language/lang_english/lang_cms_permissions.php @@ -0,0 +1,305 @@ + ' +

Permissions are highly granular and grouped into four major sections, which are:

+ +

Global Permissions

+

These are used to control access on a global level and apply to the entire bulletin board. They are further divided into Users’ Permissions, Groups’ Permissions, Administrators and Global Moderators.

+ +

Forum Based Permissions

+

These are used to control access on a per forum basis. They are further divided into Forum Permissions, Forum Moderators, Users’ Forum Permissions and Groups’ Forum Permissions.

+ +

Permission Roles

+

These are used to create different sets of permissions for the different permission types later being able to be assigned on a role-based basis. The default roles should cover the administration of bulletin boards large and small, though within each of the four divisions, you can add/edit/delete roles as you see fit.

+ +

Permission Masks

+

These are used to view the effective permissions assigned to Users, Moderators (Local and Global), Administrators or Forums.

+ +
+ +

For further information on setting up and managing permissions on your phpBB3 board, please see Chapter 1.5 of our Quick Start Guide.

+ ', + + 'ACL_NEVER' => 'Never', + 'ACL_SET' => 'Setting permissions', + 'ACL_SET_EXPLAIN' => 'Permissions are based on a simple YES/NO system. Setting an option to NEVER for a user or usergroup overrides any other value assigned to it. If you do not wish to assign a value for an option for this user or group select NO. If values are assigned for this option elsewhere they will be used in preference, else NEVER is assumed. All objects marked (with the checkbox in front of them) will copy the permission set you defined.', + 'ACL_SETTING' => 'Setting', + + 'ACL_TYPE_A_' => 'Administrative permissions', + 'ACL_TYPE_CMS_' => 'CMS permissions', + 'ACL_TYPE_F_' => 'Forum permissions', + 'ACL_TYPE_M_' => 'Moderative permissions', + 'ACL_TYPE_PL_' => 'Plugins permissions', + 'ACL_TYPE_U_' => 'User permissions', + + 'ACL_TYPE_GLOBAL_A_' => 'Administrative permissions', + 'ACL_TYPE_GLOBAL_CMS_' => 'CMS permissions', + 'ACL_TYPE_GLOBAL_M_' => 'Global Moderator permissions', + 'ACL_TYPE_GLOBAL_PL_' => 'Plugins permissions', + 'ACL_TYPE_GLOBAL_U_' => 'User permissions', + 'ACL_TYPE_LOCAL_F_' => 'Forum permissions', + 'ACL_TYPE_LOCAL_M_' => 'Forum Moderator permissions', + + 'ACL_NO' => 'No', + 'ACL_VIEW' => 'Viewing permissions', + 'ACL_VIEW_EXPLAIN' => 'Here you can see the effective permissions the user/group is having. A red square indicates that the user/group does not have the permission, a green square indicates that the user/group does have the permission.', + 'ACL_YES' => 'Yes', + + 'ACP_ADMIN_ROLES' => 'Admin Roles', + 'ACP_CMS_ROLES' => 'CMS Roles', + 'ACP_FORUM_ROLES' => 'Forum Roles', + 'ACP_MOD_ROLES' => 'Moderator Roles', + 'ACP_PLUGINS_ROLES' => 'Plugins Roles', + 'ACP_USER_ROLES' => 'Global Roles', + + 'ACP_ADMINISTRATORS_EXPLAIN' => 'Here you can assign administrator permissions to users or groups. All users with administrator permissions can view the administration control panel.', + 'ACP_FORUM_MODERATORS_EXPLAIN' => 'Here you can assign users and groups as forum moderators. To assign users access to forums, to define global moderative permissions or administrators please use the appropriate page.', + 'ACP_FORUM_PERMISSIONS_EXPLAIN' => 'Here you can alter which users and groups can access which forums. To assign moderators or define administrators please use the appropriate page.', + 'ACP_FORUM_PERMISSIONS_COPY_EXPLAIN' => 'Here you can copy forum permissions from one forum to one or more other forums.', + 'ACP_GLOBAL_MODERATORS_EXPLAIN' => 'Here you can assign global moderator permissions to users or groups. These moderators are like ordinary moderators except they have access to every forum on your board.', + 'ACP_GROUPS_FORUM_PERMISSIONS_EXPLAIN' => 'Here you can assign forum permissions to groups.', + 'ACP_GROUPS_PERMISSIONS_EXPLAIN' => 'Here you can assign global permissions to groups - user permissions, global moderator permissions and administrator permissions. User permissions include capabilities such as the use of avatars, sending private messages, et cetera; global moderator permissions such as approving posts, manage topics, manage bans, et cetera and lastly administrator permissions such as altering permissions, define custom BBCodes, manage forums, et cetera. Individual users permissions should only be changed in rare occasions, the preferred method is putting users in groups and assigning the group’s permissions.', + 'ACP_ADMIN_ROLES_EXPLAIN' => 'Roles for administrative permissions. Roles are effective permissions, if you change a role the items having this role assigned will change its permissions too.', + 'ACP_CMS_ROLES_EXPLAIN' => 'Roles for CMS permissions. Roles are effective permissions, if you change a role the items having this role assigned will change its permissions too.', + 'ACP_FORUM_ROLES_EXPLAIN' => 'Roles for forum permissions. Roles are effective permissions, if you change a role the items having this role assigned will change its permissions too.', + 'ACP_MOD_ROLES_EXPLAIN' => 'Roles for moderative permissions. Roles are effective permissions, if you change a role the items having this role assigned will change its permissions too.', + 'ACP_PLUGINS_ROLES_EXPLAIN' => 'Roles for Plugins permissions. Roles are effective permissions, if you change a role the items having this role assigned will change its permissions too.', + 'ACP_USER_ROLES_EXPLAIN' => 'Roles for user permissions. Roles are effective permissions, if you change a role the items having this role assigned will change its permissions too.', + 'ACP_USERS_FORUM_PERMISSIONS_EXPLAIN' => 'Here you can assign forum permissions to users.', + 'ACP_USERS_PERMISSIONS_EXPLAIN' => 'Here you can assign global permissions to users - user permissions, global moderator permissions and administrator permissions. User permissions include capabilities such as the use of avatars, sending private messages, et cetera; global moderator permissions such as approving posts, manage topics, manage bans, et cetera and lastly administrator permissions such as altering permissions, define custom BBCodes, manage forums, et cetera. To alter these settings for large numbers of users the Group permissions system is the preferred method. User’s permissions should only be changed in rare occasions, the preferred method is putting users in groups and assigning the group’s permissions.', + 'ACP_VIEW_ADMIN_PERMISSIONS_EXPLAIN' => 'Here you can view the effective administrative permissions assigned to the selected users/groups.', + 'ACP_VIEW_GLOBAL_MOD_PERMISSIONS_EXPLAIN' => 'Here you can view the global moderative permissions assigned to the selected users/groups.', + 'ACP_VIEW_FORUM_PERMISSIONS_EXPLAIN' => 'Here you can view the forum permissions assigned to the selected users/groups and forums.', + 'ACP_VIEW_FORUM_MOD_PERMISSIONS_EXPLAIN' => 'Here you can view the forum moderator permissions assigned to the selected users/groups and forums.', + 'ACP_VIEW_USER_PERMISSIONS_EXPLAIN' => 'Here you can view the effective user permissions assigned to the selected users/groups.', + + 'ADD_GROUPS' => 'Add groups', + 'ADD_PERMISSIONS' => 'Add permissions', + 'ADD_USERS' => 'Add users', + 'ADVANCED_PERMISSIONS' => 'Advanced Permissions', + 'ALL_GROUPS' => 'Select all groups', + 'ALL_NEVER' => 'All NEVER', + 'ALL_NO' => 'All NO', + 'ALL_USERS' => 'Select all users', + 'ALL_YES' => 'All YES', + 'APPLY_ALL_PERMISSIONS' => 'Apply all permissions', + 'APPLY_PERMISSIONS' => 'Apply permissions', + 'APPLY_PERMISSIONS_EXPLAIN' => 'The permissions and role defined for this item will only be applied to this item and all checked items.', + 'AUTH_UPDATED' => 'Permissions have been updated.', + + 'COPY_PERMISSIONS_CONFIRM' => 'Are you sure you wish to carry out this operation? Please be aware that this will overwrite any existing permissions on the selected targets.', + 'COPY_PERMISSIONS_FORUM_FROM_EXPLAIN' => 'The source forum you want to copy permissions from.', + 'COPY_PERMISSIONS_FORUM_TO_EXPLAIN' => 'The destination forums you want the copied permissions applied to.', + 'COPY_PERMISSIONS_FROM' => 'Copy permissions from', + 'COPY_PERMISSIONS_TO' => 'Apply permissions to', + + 'CREATE_ROLE' => 'Create role', + 'CREATE_ROLE_FROM' => 'Use settings from…', + 'CUSTOM' => 'Custom…', + + 'DEFAULT' => 'Default', + 'DELETE_ROLE' => 'Delete role', + 'DELETE_ROLE_CONFIRM' => 'Are you sure you want to remove this role? Items having this role assigned will not lose their permission settings.', + 'DISPLAY_ROLE_ITEMS' => 'View items using this role', + + 'EDIT_PERMISSIONS' => 'Edit permissions', + 'EDIT_ROLE' => 'Edit role', + + 'GROUPS_NOT_ASSIGNED' => 'No group assigned to this role', + + 'LOOK_UP_GROUP' => 'Look up usergroup', + 'LOOK_UP_USER' => 'Look up user', + + 'MANAGE_GROUPS' => 'Manage groups', + 'MANAGE_USERS' => 'Manage users', + + 'NO_AUTH_SETTING_FOUND' => 'Permission settings not defined.', + 'NO_ROLE_ASSIGNED' => 'No role assigned…', + 'NO_ROLE_ASSIGNED_EXPLAIN' => 'Setting to this role does not change permissions on the right. If you want to unset/remove all permissions you should use the “All NO” link.', + 'NO_ROLE_AVAILABLE' => 'No role available', + 'NO_ROLE_NAME_SPECIFIED' => 'Please give the role a name.', + 'NO_ROLE_SELECTED' => 'Role could not be found.', + 'NO_USER_GROUP_SELECTED' => 'You haven’t selected any user or group.', + + 'ONLY_FORUM_DEFINED' => 'You only defined forums in your selection. Please also select at least one user or one group.', + + 'PERMISSION_APPLIED_TO_ALL' => 'Permissions and role will also be applied to all checked objects', + 'PLUS_SUBFORUMS' => '+Subforums', + + 'REMOVE_PERMISSIONS' => 'Remove permissions', + 'REMOVE_ROLE' => 'Remove role', + 'RESULTING_PERMISSION' => 'Resulting permission', + 'ROLE' => 'Role', + 'ROLE_ADD_SUCCESS' => 'Role successfully added.', + 'ROLE_ASSIGNED_TO' => 'Users/Groups assigned to %s', + 'ROLE_DELETED' => 'Role successfully removed.', + 'ROLE_DESCRIPTION' => 'Role description', + + 'ROLE_ADMIN_FORUM' => 'Forum Admin', + 'ROLE_ADMIN_FULL' => 'Full Admin', + 'ROLE_ADMIN_STANDARD' => 'Standard Admin', + 'ROLE_ADMIN_USERGROUP' => 'User and Groups Admin', + 'ROLE_FORUM_BOT' => 'Bot Access', + 'ROLE_FORUM_FULL' => 'Full Access', + 'ROLE_FORUM_LIMITED' => 'Limited Access', + 'ROLE_FORUM_LIMITED_POLLS' => 'Limited Access + Polls', + 'ROLE_FORUM_NOACCESS' => 'No Access', + 'ROLE_FORUM_ONQUEUE' => 'On Moderation Queue', + 'ROLE_FORUM_POLLS' => 'Standard Access + Polls', + 'ROLE_FORUM_READONLY' => 'Read Only Access', + 'ROLE_FORUM_STANDARD' => 'Standard Access', + 'ROLE_FORUM_NEW_MEMBER' => 'Newly registered User', + 'ROLE_MOD_FULL' => 'Full Moderator', + 'ROLE_MOD_QUEUE' => 'Queue Moderator', + 'ROLE_MOD_SIMPLE' => 'Simple Moderator', + 'ROLE_MOD_STANDARD' => 'Standard Moderator', + 'ROLE_USER_FULL' => 'All Features', + 'ROLE_USER_LIMITED' => 'Limited Features', + 'ROLE_USER_NOAVATAR' => 'No Avatar', + 'ROLE_USER_NOPM' => 'No Private Messages', + 'ROLE_USER_STANDARD' => 'Standard Features', + 'ROLE_USER_NEW_MEMBER' => 'Newly registered User', + + + 'ROLE_DESCRIPTION_ADMIN_FORUM' => 'Can access the forum management and forum permission settings.', + 'ROLE_DESCRIPTION_ADMIN_FULL' => 'Has access to all administrative functions of this board.
Not recommended.', + 'ROLE_DESCRIPTION_ADMIN_STANDARD' => 'Has access to most administrative features but is not allowed to use server or system related tools.', + 'ROLE_DESCRIPTION_ADMIN_USERGROUP' => 'Can manage groups and users: Able to change permissions, settings, manage bans, and manage ranks.', + 'ROLE_DESCRIPTION_FORUM_BOT' => 'This role is recommended for bots and search spiders.', + 'ROLE_DESCRIPTION_FORUM_FULL' => 'Can use all forum features, including posting of announcements and stickies. Can also ignore the flood limit.
Not recommended for normal users.', + 'ROLE_DESCRIPTION_FORUM_LIMITED' => 'Can use some forum features, but cannot attach files or use post icons.', + 'ROLE_DESCRIPTION_FORUM_LIMITED_POLLS' => 'As per Limited Access but can also create polls.', + 'ROLE_DESCRIPTION_FORUM_NOACCESS' => 'Can neither see nor access the forum.', + 'ROLE_DESCRIPTION_FORUM_ONQUEUE' => 'Can use most forum features including attachments, but posts and topics need to be approved by a moderator.', + 'ROLE_DESCRIPTION_FORUM_POLLS' => 'Like Standard Access but can also create polls.', + 'ROLE_DESCRIPTION_FORUM_READONLY' => 'Can read the forum, but cannot create new topics or reply to posts.', + 'ROLE_DESCRIPTION_FORUM_STANDARD' => 'Can use most forum features including attachments and deleting own topics, but cannot lock own topics, and cannot create polls.', + 'ROLE_DESCRIPTION_FORUM_NEW_MEMBER' => 'A role for members of the special newly registered users group; contains NEVER permissions to lock features for new users.', + 'ROLE_DESCRIPTION_MOD_FULL' => 'Can use all moderating features, including banning.', + 'ROLE_DESCRIPTION_MOD_QUEUE' => 'Can use the Moderation Queue to validate and edit posts, but nothing else.', + 'ROLE_DESCRIPTION_MOD_SIMPLE' => 'Can only use basic topic actions. Cannot send warnings or use moderation queue.', + 'ROLE_DESCRIPTION_MOD_STANDARD' => 'Can use most moderating tools, but cannot ban users or change the post author.', + 'ROLE_DESCRIPTION_USER_FULL' => 'Can use all available forum features for users, including changing the user name or ignoring the flood limit.
Not recommended.', + 'ROLE_DESCRIPTION_USER_LIMITED' => 'Can access some of the user features. Attachments, e-mails, or instant messages are not allowed.', + 'ROLE_DESCRIPTION_USER_NOAVATAR' => 'Has a limited feature set and is not allowed to use the Avatar feature.', + 'ROLE_DESCRIPTION_USER_NOPM' => 'Has a limited feature set, and is not allowed to use Private Messages.', + 'ROLE_DESCRIPTION_USER_STANDARD' => 'Can access most but not all user features. Cannot change user name or ignore the flood limit, for instance.', + 'ROLE_DESCRIPTION_USER_NEW_MEMBER' => 'A role for members of the special newly registered users group; contains NEVER permissions to lock features for new users.', + + 'ROLE_DESCRIPTION_EXPLAIN' => 'You are able to enter a short explanation of what the role is doing or for what it is meant for. The text you enter here will be displayed within the permissions screens too.', + 'ROLE_DESCRIPTION_LONG' => 'The role description is too long, please limit it to 4000 characters.', + 'ROLE_DETAILS' => 'Role details', + 'ROLE_EDIT_SUCCESS' => 'Role successfully edited.', + 'ROLE_NAME' => 'Role name', + 'ROLE_NAME_ALREADY_EXIST' => 'A role named %s already exist for the specified permission type.', + 'ROLE_NOT_ASSIGNED' => 'Role has not been assigned yet.', + + 'SELECTED_FORUM_NOT_EXIST' => 'The selected forum(s) do not exist.', + 'SELECTED_GROUP_NOT_EXIST' => 'The selected group(s) do not exist.', + 'SELECTED_USER_NOT_EXIST' => 'The selected user(s) do not exist.', + 'SELECT_FORUM_SUBFORUM_EXPLAIN' => 'The forum you select here will include all subforums into the selection.', + 'SELECT_ROLE' => 'Select role…', + 'SELECT_TYPE' => 'Select type', + 'SET_PERMISSIONS' => 'Set permissions', + 'SET_ROLE_PERMISSIONS' => 'Set role permissions', + 'SET_USERS_PERMISSIONS' => 'Set users permissions', + 'SET_USERS_FORUM_PERMISSIONS' => 'Set users forum permissions', + + 'TRACE_DEFAULT' => 'By default every permission is NO (unset). So the permission can be overwritten by other settings.', + 'TRACE_FOR' => 'Trace for', + 'TRACE_GLOBAL_SETTING' => '%s (global)', + 'TRACE_GROUP_NEVER_TOTAL_NEVER' => 'This group’s permission is set to NEVER like the total result so the old result is kept.', + 'TRACE_GROUP_NEVER_TOTAL_NEVER_LOCAL' => 'This group’s permission for this forum is set to NEVER like the total result so the old result is kept.', + 'TRACE_GROUP_NEVER_TOTAL_NO' => 'This group’s permission is set to NEVER which becomes the new total value because it wasn’t set yet (set to NO).', + 'TRACE_GROUP_NEVER_TOTAL_NO_LOCAL' => 'This group’s permission for this forum is set to NEVER which becomes the new total value because it wasn’t set yet (set to NO).', + 'TRACE_GROUP_NEVER_TOTAL_YES' => 'This group’s permission is set to NEVER which overwrites the total YES to a NEVER for this user.', + 'TRACE_GROUP_NEVER_TOTAL_YES_LOCAL' => 'This group’s permission for this forum is set to NEVER which overwrites the total YES to a NEVER for this user.', + 'TRACE_GROUP_NO' => 'The permission is NO for this group so the old total value is kept.', + 'TRACE_GROUP_NO_LOCAL' => 'The permission is NO for this group within this forum so the old total value is kept.', + 'TRACE_GROUP_YES_TOTAL_NEVER' => 'This group’s permission is set to YES but the total NEVER cannot be overwritten.', + 'TRACE_GROUP_YES_TOTAL_NEVER_LOCAL' => 'This group’s permission for this forum is set to YES but the total NEVER cannot be overwritten.', + 'TRACE_GROUP_YES_TOTAL_NO' => 'This group’s permission is set to YES which becomes the new total value because it wasn’t set yet (set to NO).', + 'TRACE_GROUP_YES_TOTAL_NO_LOCAL' => 'This group’s permission for this forum is set to YES which becomes the new total value because it wasn’t set yet (set to NO).', + 'TRACE_GROUP_YES_TOTAL_YES' => 'This group’s permission is set to YES and the total permission is already set to YES, so the total result is kept.', + 'TRACE_GROUP_YES_TOTAL_YES_LOCAL' => 'This group’s permission for this forum is set to YES and the total permission is already set to YES, so the total result is kept.', + 'TRACE_PERMISSION' => 'Trace permission - %s', + 'TRACE_RESULT' => 'Trace result', + 'TRACE_SETTING' => 'Trace setting', + + 'TRACE_USER_GLOBAL_YES_TOTAL_YES' => 'The forum independent user permission evaluates to YES but the total permission is already set to YES, so the total result is kept. %sTrace global permission%s', + 'TRACE_USER_GLOBAL_YES_TOTAL_NEVER' => 'The forum independent user permission evaluates to YES which overwrites the current local result NEVER. %sTrace global permission%s', + 'TRACE_USER_GLOBAL_NEVER_TOTAL_KEPT' => 'The forum independent user permission evaluates to NEVER which doesn’t influence the local permission. %sTrace global permission%s', + + 'TRACE_USER_FOUNDER' => 'The user is a founder, therefore admin permissions are always set to YES.', + 'TRACE_USER_KEPT' => 'The user’s permission is NO so the old total value is kept.', + 'TRACE_USER_KEPT_LOCAL' => 'The user’s permission for this forum is NO so the old total value is kept.', + 'TRACE_USER_NEVER_TOTAL_NEVER' => 'The user’s permission is set to NEVER and the total value is set to NEVER, so nothing is changed.', + 'TRACE_USER_NEVER_TOTAL_NEVER_LOCAL' => 'The user’s permission for this forum is set to NEVER and the total value is set to NEVER, so nothing is changed.', + 'TRACE_USER_NEVER_TOTAL_NO' => 'The user’s permission is set to NEVER which becomes the total value because it was set to NO.', + 'TRACE_USER_NEVER_TOTAL_NO_LOCAL' => 'The user’s permission for this forum is set to NEVER which becomes the total value because it was set to NO.', + 'TRACE_USER_NEVER_TOTAL_YES' => 'The user’s permission is set to NEVER and overwrites the previous YES.', + 'TRACE_USER_NEVER_TOTAL_YES_LOCAL' => 'The user’s permission for this forum is set to NEVER and overwrites the previous YES.', + 'TRACE_USER_NO_TOTAL_NO' => 'The user’s permission is NO and the total value was set to NO so it defaults to NEVER.', + 'TRACE_USER_NO_TOTAL_NO_LOCAL' => 'The user’s permission for this forum is NO and the total value was set to NO so it defaults to NEVER.', + 'TRACE_USER_YES_TOTAL_NEVER' => 'The user’s permission is set to YES but the total NEVER cannot be overwritten.', + 'TRACE_USER_YES_TOTAL_NEVER_LOCAL' => 'The user’s permission for this forum is set to YES but the total NEVER cannot be overwritten.', + 'TRACE_USER_YES_TOTAL_NO' => 'The user’s permission is set to YES which becomes the total value because it was set to NO.', + 'TRACE_USER_YES_TOTAL_NO_LOCAL' => 'The user’s permission for this forum is set to YES which becomes the total value because it was set to NO.', + 'TRACE_USER_YES_TOTAL_YES' => 'The user’s permission is set to YES and the total value is set to YES, so nothing is changed.', + 'TRACE_USER_YES_TOTAL_YES_LOCAL' => 'The user’s permission for this forum is set to YES and the total value is set to YES, so nothing is changed.', + 'TRACE_WHO' => 'Who', + 'TRACE_TOTAL' => 'Total', + + 'USERS_NOT_ASSIGNED' => 'No user assigned to this role', + 'USER_IS_MEMBER_OF_DEFAULT' => 'is a member of the following pre-defined groups', + 'USER_IS_MEMBER_OF_CUSTOM' => 'is a member of the following user defined groups', + + 'VIEW_ASSIGNED_ITEMS' => 'View assigned items', + 'VIEW_LOCAL_PERMS' => 'Local permissions', + 'VIEW_GLOBAL_PERMS' => 'Global permissions', + 'VIEW_PERMISSIONS' => 'View permissions', + + 'WRONG_PERMISSION_TYPE' => 'Wrong permission type selected.', + 'WRONG_PERMISSION_SETTING_FORMAT' => 'The permission settings are in a wrong format, phpBB is not able to process them correctly.', + ) +); + +?> \ No newline at end of file diff --git a/language/lang_english/lang_main.php b/language/lang_english/lang_main.php index 4657ee21..61ff744b 100644 --- a/language/lang_english/lang_main.php +++ b/language/lang_english/lang_main.php @@ -531,7 +531,7 @@ 'Notification_subject' => 'New Private Message has arrived!', - 'Find_username' => 'Find a username', + 'FIND_USERNAME' => 'Find a username', 'Find' => 'Find', 'No_match' => 'No matches found.', @@ -2415,6 +2415,11 @@ 'MOBILE_STYLE_ENABLE' => 'Enable Mobile Friendly Style', 'MOBILE_STYLE_DISABLE' => 'Disable Mobile Friendly Style', + 'INVALID_SESSION' => 'Invalid session. If the problem persist, please contact an administrator.', + + 'BACK_TO_TOP' => 'Top', + 'BACK_TO_PREV' => 'Back to previous page', + ) ); diff --git a/language/lang_english/lang_permissions.php b/language/lang_english/lang_permissions.php index 9a419cf8..1fbd81bc 100644 --- a/language/lang_english/lang_permissions.php +++ b/language/lang_english/lang_permissions.php @@ -53,9 +53,118 @@ 'ROLE_FORUM_STANDARD_DESCRIPTION' => 'Can use most forum features.', 'ROLE_FORUM_NOACCESS' => 'No Access', 'ROLE_FORUM_NOACCES_DESCRIPTIONS' => 'Can neither see nor access the forum.', + 'ROLE_PLUGINS_FULL' => 'Full Access', + 'ROLE_PLUGINS_FULL_DESCRIPTION' => 'Can use all PLUGINS features. Not recommended for normal users.', + 'ROLE_PLUGINS_STANDARD' => 'Standard Access', + 'ROLE_PLUGINS_STANDARD_DESCRIPTION' => 'Can use most PLUGINS features.', + 'ROLE_PLUGINS_NOACCESS' => 'No Access', + 'ROLE_PLUGINS_NOACCES_DESCRIPTIONS' => 'Can neither see nor access the PLUGINS.', // ROLES - END ) ); +// Define categories and permission types +$lang = array_merge($lang, array( + 'permission_cat' => array( + 'actions' => 'Actions', + 'blocks' => 'Blocks', + 'cms' => 'CMS', + 'content' => 'Content', + 'forums' => 'Forums', + 'layouts' => 'Pages', + 'misc' => 'Misc', + 'permissions' => 'Permissions', + 'plugins_actions' => 'Plugins Actions', + 'pm' => 'Private messages', + 'polls' => 'Polls', + 'post' => 'Post', + 'post_actions' => 'Post actions', + 'posting' => 'Posting', + 'profile' => 'Profile', + 'settings' => 'Settings', + 'topic_actions' => 'Topic actions', + 'user_group' => 'Users & Groups', + ), + + // With defining 'global' here we are able to specify what is printed out if the permission is within the global scope. + 'permission_type' => array( + 'a_' => 'Admin permissions', + 'cms_' => 'CMS permissions', + 'f_' => 'Forum permissions', + 'm_' => 'Moderator permissions', + 'pl_' => 'Plugins permissions', + 'u_' => 'User permissions', + 'global' => array( + 'm_' => 'Global moderator permissions', + ), + ), + + ) +); + +// Admin Permissions +$lang = array_merge($lang, array( + 'acl_a_board' => array('lang' => 'Can alter board settings/check for updates', 'cat' => 'settings'), + 'acl_a_server' => array('lang' => 'Can alter server/communication settings', 'cat' => 'settings'), + + 'acl_a_user' => array('lang' => 'Can manage users
This also includes seeing the users browser agent within the viewonline list.', 'cat' => 'user_group'), + 'acl_a_group' => array('lang' => 'Can manage groups', 'cat' => 'user_group'), + + 'acl_a_modules' => array('lang' => 'Can manage modules', 'cat' => 'permissions'), + 'acl_a_viewauth' => array('lang' => 'Can view permission masks', 'cat' => 'permissions'), + 'acl_a_authgroups' => array('lang' => 'Can alter permissions for individual groups', 'cat' => 'permissions'), + 'acl_a_authusers' => array('lang' => 'Can alter permissions for individual users', 'cat' => 'permissions'), + 'acl_a_fauth' => array('lang' => 'Can alter forum permission class', 'cat' => 'permissions'), + 'acl_a_mauth' => array('lang' => 'Can alter moderator permission class', 'cat' => 'permissions'), + 'acl_a_aauth' => array('lang' => 'Can alter admin permission class', 'cat' => 'permissions'), + 'acl_a_uauth' => array('lang' => 'Can alter user permission class', 'cat' => 'permissions'), + 'acl_a_roles' => array('lang' => 'Can manage roles', 'cat' => 'permissions'), + ) +); + +// CMS Permissions +$lang = array_merge($lang, array( + 'acl_cms_view' => array('lang' => 'Can access CMS Management', 'cat' => 'cms'), + 'acl_cms_edit' => array('lang' => 'Can edit settings in CMS', 'cat' => 'cms'), + + 'acl_cms_l_add' => array('lang' => 'Can create CMS Pages', 'cat' => 'layouts'), + 'acl_cms_l_edit' => array('lang' => 'Can edit CMS Pages', 'cat' => 'layouts'), + 'acl_cms_l_delete' => array('lang' => 'Can delete CMS Pages', 'cat' => 'layouts'), + + 'acl_cms_b_add' => array('lang' => 'Can add blocks in CMS Pages', 'cat' => 'blocks'), + 'acl_cms_b_edit' => array('lang' => 'Can edit blocks in CMS Pages', 'cat' => 'blocks'), + 'acl_cms_b_delete' => array('lang' => 'Can delete blocks in CMS Pages', 'cat' => 'blocks'), + ) +); + +// Forum Permissions +$lang = array_merge($lang, array( + 'acl_f_html' => array('lang' => 'Can insert HTML in posts', 'cat' => 'post'), + + 'acl_f_topicdelete' => array('lang' => 'Can delete topics', 'cat' => 'actions'), + ) +); + +// Moderator Permissions +$lang = array_merge($lang, array( + 'acl_m_topicdelete' => array('lang' => 'Can delete topics', 'cat' => 'topic_actions'), + ) +); + +// Plugins Permissions +$lang = array_merge($lang, array( + 'acl_pl_input' => array('lang' => 'Can insert contents in Plugins', 'cat' => 'plugins_actions'), + 'acl_pl_edit' => array('lang' => 'Can edit content in Plugins', 'cat' => 'plugins_actions'), + 'acl_pl_delete' => array('lang' => 'Can remove content in Plugins', 'cat' => 'plugins_actions'), + ) +); + +// User Permissions +$lang = array_merge($lang, array( + 'acl_u_html' => array('lang' => 'Can insert HTML code in posts', 'cat' => 'post'), + ) +); + + ?> \ No newline at end of file diff --git a/link_register.php b/link_register.php index 17aaa4c9..6064ad03 100644 --- a/link_register.php +++ b/link_register.php @@ -26,7 +26,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/links.js.php b/links.js.php index cff1da8b..0d470715 100644 --- a/links.js.php +++ b/links.js.php @@ -59,7 +59,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/links.php b/links.php index 30344c3c..868e438d 100644 --- a/links.php +++ b/links.php @@ -24,7 +24,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/links_popup.php b/links_popup.php index b3eea662..03651595 100644 --- a/links_popup.php +++ b/links_popup.php @@ -22,7 +22,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/login_captcha.php b/login_captcha.php index 5f94235b..1a1aad41 100644 --- a/login_captcha.php +++ b/login_captcha.php @@ -40,7 +40,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/login_ip.php b/login_ip.php index 483b81ed..f1c56f82 100644 --- a/login_ip.php +++ b/login_ip.php @@ -23,7 +23,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management @@ -134,9 +134,10 @@ elseif((isset($_GET['logout']) || isset($_POST['logout'])) && $user->data['session_logged_in']) { // session id check - if (($sid == '') || ($sid != $user->data['session_id'])) + if (empty($sid) || ($sid != $user->data['session_id'])) { - message_die(GENERAL_ERROR, 'Invalid_session'); + //message_die(GENERAL_ERROR, 'INVALID_SESSION'); + trigger_error('INVALID_SESSION'); } if($user->data['session_logged_in']) { diff --git a/mail_digests.php b/mail_digests.php index c972877c..40d6be9a 100644 --- a/mail_digests.php +++ b/mail_digests.php @@ -39,7 +39,7 @@ // Start session management $user->session_begin(); - //$auth->acl($user->data); + $auth->acl($user->data); $user->setup(); // End session management @@ -58,7 +58,7 @@ { // Start session management $user->session_begin(); - //$auth->acl($user->data); + $auth->acl($user->data); $user->setup(); // End session management } diff --git a/memberlist.php b/memberlist.php index 76ba3ce8..66ac1d38 100644 --- a/memberlist.php +++ b/memberlist.php @@ -30,7 +30,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/modcp.php b/modcp.php index 369f5451..8235de15 100644 --- a/modcp.php +++ b/modcp.php @@ -202,13 +202,13 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management if($sid == '' || ($sid != $user->data['session_id'])) { - message_die(GENERAL_ERROR, 'Invalid_session'); + message_die(GENERAL_ERROR, 'INVALID_SESSION'); } if(isset($_POST['cancel'])) diff --git a/news_rss.php b/news_rss.php index 5da03174..c57f2057 100644 --- a/news_rss.php +++ b/news_rss.php @@ -30,7 +30,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/posted_img_list.php b/posted_img_list.php index e735a149..40880822 100644 --- a/posted_img_list.php +++ b/posted_img_list.php @@ -15,7 +15,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/posted_img_list_thumbnail.php b/posted_img_list_thumbnail.php index 5a76acb5..35c3d8cf 100644 --- a/posted_img_list_thumbnail.php +++ b/posted_img_list_thumbnail.php @@ -18,7 +18,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/posted_img_thumbnail.php b/posted_img_thumbnail.php index 900da5e4..7e2d473d 100644 --- a/posted_img_thumbnail.php +++ b/posted_img_thumbnail.php @@ -18,7 +18,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/posting.php b/posting.php index 1840dcf0..372fdc01 100644 --- a/posting.php +++ b/posting.php @@ -188,7 +188,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/printview.php b/printview.php index 7325504a..cfb8a4a3 100644 --- a/printview.php +++ b/printview.php @@ -23,7 +23,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/privmsg.php b/privmsg.php index 8c173851..36217d14 100644 --- a/privmsg.php +++ b/privmsg.php @@ -102,7 +102,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management @@ -1920,7 +1920,6 @@ 'L_SUBMIT' => $lang['Submit'], 'L_CANCEL' => $lang['Cancel'], 'L_POST_A' => $post_a, - 'L_FIND_USERNAME' => $lang['Find_username'], 'L_FIND' => $lang['Find'], 'L_DISABLE_HTML' => $lang['Disable_HTML_pm'], 'L_DISABLE_ACRO_AUTO' => $lang['Disable_ACRO_AUTO_pm'], diff --git a/profile.php b/profile.php index baaaaa1d..8e7f3da9 100644 --- a/profile.php +++ b/profile.php @@ -40,7 +40,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/profile_main.php b/profile_main.php index b8b99b44..80f543f9 100644 --- a/profile_main.php +++ b/profile_main.php @@ -16,7 +16,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/profile_options.php b/profile_options.php index e596ecec..9122a6ee 100644 --- a/profile_options.php +++ b/profile_options.php @@ -25,7 +25,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management @@ -182,7 +182,7 @@ // session id check if ($sid != $user->data['session_id']) { - message_die(GENERAL_ERROR, 'Invalid_session'); + message_die(GENERAL_ERROR, 'INVALID_SESSION'); } // init for error diff --git a/profile_view_popup.php b/profile_view_popup.php index 9be27e2a..64aefd96 100644 --- a/profile_view_popup.php +++ b/profile_view_popup.php @@ -15,7 +15,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/profile_view_user.php b/profile_view_user.php index 7bfbad54..0b8e30ed 100644 --- a/profile_view_user.php +++ b/profile_view_user.php @@ -15,7 +15,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/ranks.php b/ranks.php index 97c9f26d..ea872026 100644 --- a/ranks.php +++ b/ranks.php @@ -15,7 +15,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/rate.php b/rate.php index aec8fe59..9ef01ece 100644 --- a/rate.php +++ b/rate.php @@ -19,7 +19,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/recent.php b/recent.php index 4d46d82c..1e5d270e 100644 --- a/recent.php +++ b/recent.php @@ -20,7 +20,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/referrers.php b/referrers.php index e28831cc..96735a5c 100644 --- a/referrers.php +++ b/referrers.php @@ -22,7 +22,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/remove_cookies.php b/remove_cookies.php index 55c4c8f6..7a0a1c19 100644 --- a/remove_cookies.php +++ b/remove_cookies.php @@ -22,7 +22,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/rss.php b/rss.php index e8041b7f..5a188dd9 100644 --- a/rss.php +++ b/rss.php @@ -144,7 +144,7 @@ { // Start session management $user->session_begin(); - //$auth->acl($user->data); + $auth->acl($user->data); $user->setup(); // End session management $user_id = $user->data['user_id']; diff --git a/rss_news_help.php b/rss_news_help.php index d437e9ab..79cd9a55 100644 --- a/rss_news_help.php +++ b/rss_news_help.php @@ -15,7 +15,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/rules.php b/rules.php index 067f82b7..150ea700 100644 --- a/rules.php +++ b/rules.php @@ -15,7 +15,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/search.php b/search.php index de89e375..dec4725a 100644 --- a/search.php +++ b/search.php @@ -38,7 +38,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/share.php b/share.php index f64a8ed8..a5508338 100644 --- a/share.php +++ b/share.php @@ -15,7 +15,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/shoutbox.php b/shoutbox.php index 8c74e684..5da55b31 100644 --- a/shoutbox.php +++ b/shoutbox.php @@ -17,7 +17,7 @@ // Start session management $user->session_begin(false); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/shoutbox_max.php b/shoutbox_max.php index d0a2778e..18b19d9d 100644 --- a/shoutbox_max.php +++ b/shoutbox_max.php @@ -19,7 +19,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/shoutbox_view.php b/shoutbox_view.php index 8ce874b5..9594c35a 100644 --- a/shoutbox_view.php +++ b/shoutbox_view.php @@ -17,7 +17,7 @@ // Start session management $user->session_begin(false); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/show_post.php b/show_post.php index ff412943..380a2703 100644 --- a/show_post.php +++ b/show_post.php @@ -20,7 +20,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/sitemap.php b/sitemap.php index 5a1ee582..9612f8b4 100644 --- a/sitemap.php +++ b/sitemap.php @@ -22,7 +22,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/sitemap_tpl.php b/sitemap_tpl.php index 81342312..426a5b33 100644 --- a/sitemap_tpl.php +++ b/sitemap_tpl.php @@ -15,7 +15,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/smiley_creator.php b/smiley_creator.php index f27ce4f2..2c023914 100644 --- a/smiley_creator.php +++ b/smiley_creator.php @@ -15,7 +15,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/smileys.php b/smileys.php index cc307507..1a763c2a 100644 --- a/smileys.php +++ b/smileys.php @@ -16,7 +16,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/staff.php b/staff.php index cbe867f5..c5f8bbaf 100644 --- a/staff.php +++ b/staff.php @@ -18,7 +18,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/statistics.php b/statistics.php index 425c7314..d2f83619 100644 --- a/statistics.php +++ b/statistics.php @@ -29,7 +29,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/stopwords.php b/stopwords.php index 46684aae..f52cbed1 100644 --- a/stopwords.php +++ b/stopwords.php @@ -21,7 +21,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/subsc_forums.php b/subsc_forums.php index 63a9139e..d7d02fb8 100644 --- a/subsc_forums.php +++ b/subsc_forums.php @@ -15,7 +15,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/sudoku.php b/sudoku.php index d6a44009..af598456 100644 --- a/sudoku.php +++ b/sudoku.php @@ -23,7 +23,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/tags.php b/tags.php index 1d0bb859..82bb7972 100644 --- a/tags.php +++ b/tags.php @@ -15,7 +15,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/tellafriend.php b/tellafriend.php index debdcd9e..14e9af69 100644 --- a/tellafriend.php +++ b/tellafriend.php @@ -18,7 +18,7 @@ // Start session management $user->session_begin(); -//$auth->acl($user->data); +$auth->acl($user->data); $user->setup(); // End session management diff --git a/templates/common/acp/ip_header.tpl b/templates/common/acp/ip_header.tpl index 653c4681..481c71c7 100644 --- a/templates/common/acp/ip_header.tpl +++ b/templates/common/acp/ip_header.tpl @@ -7,7 +7,7 @@ -