コード例 #1
0
     }
     $new_global_user_perms = (double) $t_all_admin_tools | $t_all_forum_tools | $t_all_folder_mod | $t_all_links_mod | $t_all_banned | $t_confirm_email;
     if (perm_has_forumtools_access($uid) && $forum_tools_perm_count == 1) {
         if (!($new_global_user_perms & USER_PERM_FORUM_TOOLS)) {
             $error_msg_array[] = gettext("There must be at least 1 user with admin tools and forum tools access on all forums!");
             $valid = false;
         }
     }
     if (perm_has_global_admin_access($uid) && $admin_tools_perm_count == 1) {
         if (!($new_global_user_perms & USER_PERM_ADMIN_TOOLS)) {
             $error_msg_array[] = gettext("There must be at least 1 user with admin tools and forum tools access on all forums!");
             $valid = false;
         }
     }
     if ($valid && $new_global_user_perms != $global_user_perm) {
         if (perm_update_global_perms($uid, $new_global_user_perms)) {
             $global_user_perm = perm_get_global_user_permissions($uid);
         } else {
             $error_msg_array[] = gettext("Failed to update global user permissions");
             $valid = false;
         }
     }
 }
 // Local folder permissions
 if (forum_check_webtag_available($webtag)) {
     if (isset($_POST['t_update_perms_array']) && is_array($_POST['t_update_perms_array'])) {
         $t_update_perms_array = $_POST['t_update_perms_array'];
         $folder_array = perm_user_get_folders($uid);
         foreach ($t_update_perms_array as $fid) {
             $t_post_read = (double) isset($_POST['t_post_read'][$fid]) ? $_POST['t_post_read'][$fid] : 0;
             $t_post_create = (double) isset($_POST['t_post_create'][$fid]) ? $_POST['t_post_create'][$fid] : 0;
コード例 #2
0
    $valid = false;
    return;
}
if (!install_set_search_bots()) {
    $valid = false;
    return;
}
if (!install_set_timezones()) {
    $valid = false;
    return;
}
if (!($admin_uid = user_create($admin_username, $admin_password, $admin_username, $admin_email))) {
    $valid = false;
    return;
}
if (!perm_update_global_perms($admin_uid, USER_PERM_ADMIN_TOOLS | USER_PERM_FORUM_TOOLS)) {
    $valid = false;
    return;
}
if (!($forum_fid = forum_create($forum_webtag, 'A Beehive Forum', $admin_uid, $config['db_database'], FORUM_UNRESTRICTED))) {
    $valid = false;
    return;
}
if (!forum_update_default($forum_fid)) {
    $valid = false;
    return;
}
if (!perm_update_user_forum_permissions($forum_fid, $admin_uid, USER_PERM_ADMIN_TOOLS)) {
    $valid = false;
    return;
}