diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css index 7c015f0dae..406047262c 100644 --- a/phpBB/adm/style/admin.css +++ b/phpBB/adm/style/admin.css @@ -714,6 +714,10 @@ option { color: #000; } +option.disabled-option { + color: #aaa; +} + .rtl option { padding: 0 0 0 1em; } diff --git a/phpBB/docs/AUTHORS b/phpBB/docs/AUTHORS index 799787cf42..eadc0f8711 100644 --- a/phpBB/docs/AUTHORS +++ b/phpBB/docs/AUTHORS @@ -9,21 +9,30 @@ Please see: http://www.phpbb.com/about/team/ for a list of all the people currently involved in phpBB. -phpBB Project Manager : theFinn (James Atkinson) +phpBB Project Manager : SHS` (Jonathan Stanley) -phpBB Lead Developers : Acyd Burn (Meik Sievertsen) - psoTFX (Paul S. Owen) [2001 - 09/2005] +phpBB Lead Developer : Acyd Burn (Meik Sievertsen) phpBB Developers : DavidMJ (David M.) + dhn (Dominik Dröscher) kellanved (Henry Sudhof) naderman (Nils Adermann) subBlue (Tom Beddard) Vic (Vic D'elfant) - BartVB (Bart van Bragt) - [11/2000 - 03/2006] - Ashe (Ludovic Arnaud) - [10/2002 - 11/2003, 06/2006 - 10/2006] - GrahamJE (Graham Eames) - [09/2005 - 11/2006] +-- Previous Contributors -- + +phpBB Project Manager : theFinn (James Atkinson) [Founder - 04/2007] + +phpBB Lead Developer : psoTFX (Paul S. Owen) [2001 - 09/2005] + +phpBB Developers : Ashe (Ludovic Arnaud) [10/2002 - 11/2003, 06/2006 - 10/2006] + BartVB (Bart van Bragt) [11/2000 - 03/2006] + GrahamJE (Graham Eames) [09/2005 - 11/2006] + + +-- Copyrights -- Original subSilver by subBlue Design, Tom Beddard, (c) 2001 phpBB Group prosilver by subBlue Design, Tom Beddard, (c) 2004 phpBB Group diff --git a/phpBB/docs/INSTALL.html b/phpBB/docs/INSTALL.html index 1e00c2f653..97678ca48f 100644 --- a/phpBB/docs/INSTALL.html +++ b/phpBB/docs/INSTALL.html @@ -212,7 +212,7 @@ p a {
  • Change the permissions on config.php to be writable by all (666 or -rw-rw-rw- within your FTP Client)
  • Change the permissions on the following directories to be writable by all (777 or -rwxrwxrwx within your FTP Client):
    store/, cache/, files/ and images/avatars/upload/.
  • -
  • Using your web browser visit the location you placed phpBB3 with the addition of install/index.php or pointing directly to install/, e.g. http://www.mydomain.com/phpBB2/install/, http://www.mydomain.com/forum/install/ etc.
  • +
  • Using your web browser visit the location you placed phpBB3 with the addition of install/index.php or pointing directly to install/, e.g. http://www.mydomain.com/phpBB3/install/, http://www.mydomain.com/forum/install/ etc.
  • Click the INSTALL tab, follow the steps and fill out all the requested information.
  • Change the permissions on config.php to be writable only by yourself (644 or -rw-r--r-- within your FTP Client)
  • phpBB3 should now be available, please MAKE SURE you read at least Section 6 below for important, security related post-installation instructions.
  • diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html index 2ddc8e9971..131f9049f3 100644 --- a/phpBB/docs/coding-guidelines.html +++ b/phpBB/docs/coding-guidelines.html @@ -1055,7 +1055,7 @@ trigger_error($user->lang['NO_FORUM']);
    -trigger_error('NO_APPROPRIATE_MODE', E_USER_ERROR);
    +trigger_error('NO_MODE', E_USER_ERROR);
     	

    Url formatting

    diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php index 9330157ea0..7ae04848d6 100644 --- a/phpBB/includes/acp/acp_forums.php +++ b/phpBB/includes/acp/acp_forums.php @@ -345,7 +345,7 @@ class acp_forums $start = request_var('start', $row2['min_topic_id']); - $batch_size = 3000; + $batch_size = 2000; $end = $start + $batch_size; // Sync all topics in batch mode... @@ -370,8 +370,8 @@ class acp_forums meta_refresh(0, $url); $template->assign_vars(array( - 'U_PROGRESS_BAR' => $this->u_action . "&action=progress_bar&start=$start&total={$row['forum_topics_real']}", - 'UA_PROGRESS_BAR' => str_replace('&', '&', $this->u_action) . "&action=progress_bar&start=$start&total={$row['forum_topics_real']}", + 'U_PROGRESS_BAR' => $this->u_action . "&action=progress_bar&start=$topics_done&total={$row['forum_topics_real']}", + 'UA_PROGRESS_BAR' => str_replace('&', '&', $this->u_action) . "&action=progress_bar&start=$topics_done&total={$row['forum_topics_real']}", 'S_CONTINUE_SYNC' => true, 'L_PROGRESS_EXPLAIN' => sprintf($user->lang['SYNC_IN_PROGRESS_EXPLAIN'], $topics_done, $row['forum_topics_real'])) ); @@ -933,7 +933,7 @@ class acp_forums if ($forum_data_sql['parent_id']) { - $sql = 'SELECT left_id, right_id + $sql = 'SELECT left_id, right_id, forum_type FROM ' . FORUMS_TABLE . ' WHERE forum_id = ' . $forum_data_sql['parent_id']; $result = $db->sql_query($sql); @@ -945,6 +945,12 @@ class acp_forums trigger_error($user->lang['PARENT_NOT_EXIST'] . adm_back_link($this->u_action . '&' . $this->parent_id), E_USER_WARNING); } + if ($row['forum_type'] == FORUM_LINK) + { + $errors[] = $user->lang['PARENT_IS_LINK_FORUM']; + return $errors; + } + $sql = 'UPDATE ' . FORUMS_TABLE . ' SET left_id = left_id + 2, right_id = right_id + 2 WHERE left_id > ' . $row['right_id']; @@ -1185,7 +1191,21 @@ class acp_forums */ function move_forum($from_id, $to_id) { - global $db; + global $db, $user; + + $to_data = $moved_ids = $errors = array(); + + // Check if we want to move to a parent with link type + if ($to_id > 0) + { + $to_data = $this->get_forum_info($to_id); + + if ($to_data['forum_type'] == FORUM_LINK) + { + $errors[] = $user->lang['PARENT_IS_LINK_FORUM']; + return $errors; + } + } $moved_forums = get_forum_branch($from_id, 'children', 'descending'); $from_data = $moved_forums[0]; @@ -1212,8 +1232,6 @@ class acp_forums if ($to_id > 0) { - $to_data = $this->get_forum_info($to_id); - // Resync new parents $sql = 'UPDATE ' . FORUMS_TABLE . " SET right_id = right_id + $diff, forum_parents = '' @@ -1256,6 +1274,8 @@ class acp_forums SET left_id = left_id $diff, right_id = right_id $diff, forum_parents = '' WHERE " . $db->sql_in_set('forum_id', $moved_ids); $db->sql_query($sql); + + return $errors; } /** diff --git a/phpBB/includes/acp/acp_permissions.php b/phpBB/includes/acp/acp_permissions.php index 4a1f209ea0..71c2c764ed 100644 --- a/phpBB/includes/acp/acp_permissions.php +++ b/phpBB/includes/acp/acp_permissions.php @@ -305,7 +305,7 @@ class acp_permissions $s_forum_options = ''; foreach ($forum_list as $f_id => $f_row) { - $s_forum_options .= ''; + $s_forum_options .= ''; } // Build subforum options diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index 1e8a7b8f3e..2dca5fa7b6 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -445,7 +445,9 @@ class acp_users break; case 'moveposts': - + + $user->add_lang('acp/forums'); + $new_forum_id = request_var('new_f', 0); if (!$new_forum_id) @@ -462,6 +464,24 @@ class acp_users return; } + // Is the new forum postable to? + $sql = 'SELECT forum_name, forum_type + FROM ' . FORUMS_TABLE . " + WHERE forum_id = $new_forum_id"; + $result = $db->sql_query($sql); + $forum_info = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + if (!$forum_info) + { + trigger_error($user->lang['NO_FORUM'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING); + } + + if ($forum_info['forum_type'] != FORUM_POST) + { + trigger_error($user->lang['MOVE_POSTS_NO_POSTABLE_FORUM'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING); + } + // Two stage? // Move topics comprising only posts from this user $topic_id_ary = $move_topic_ary = $move_post_ary = $new_topic_id_ary = array(); @@ -482,7 +502,7 @@ class acp_users if (sizeof($topic_id_ary)) { - $sql = 'SELECT topic_id, forum_id, topic_title, topic_replies, topic_replies_real + $sql = 'SELECT topic_id, forum_id, topic_title, topic_replies, topic_replies_real, topic_attachment FROM ' . TOPICS_TABLE . ' WHERE ' . $db->sql_in_set('topic_id', array_keys($topic_id_ary)); $result = $db->sql_query($sql); @@ -496,7 +516,7 @@ class acp_users else { $move_post_ary[$row['topic_id']]['title'] = $row['topic_title']; - $move_post_ary[$row['topic_id']]['attach'] = ($row['attach']) ? 1 : 0; + $move_post_ary[$row['topic_id']]['attach'] = ($row['topic_attachment']) ? 1 : 0; } $forum_id_ary[] = $row['forum_id']; @@ -567,12 +587,6 @@ class acp_users sync('forum', 'forum_id', $forum_id_ary); } - $sql = 'SELECT forum_name - FROM ' . FORUMS_TABLE . " - WHERE forum_id = $new_forum_id"; - $result = $db->sql_query($sql, 3600); - $forum_info = $db->sql_fetchrow($result); - $db->sql_freeresult($result); add_log('admin', 'LOG_USER_MOVE_POSTS', $user_row['username'], $forum_info['forum_name']); add_log('user', $user_id, 'LOG_USER_MOVE_POSTS_USER', $forum_info['forum_name']); diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 7782cba893..3bb3266528 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -3516,6 +3516,31 @@ function msg_handler($errno, $msg_text, $errfile, $errline) case E_USER_ERROR: + if (!empty($user) && !empty($user->lang)) + { + $msg_text = (!empty($user->lang[$msg_text])) ? $user->lang[$msg_text] : $msg_text; + $msg_title = (!isset($msg_title)) ? $user->lang['GENERAL_ERROR'] : ((!empty($user->lang[$msg_title])) ? $user->lang[$msg_title] : $msg_title); + + $l_return_index = sprintf($user->lang['RETURN_INDEX'], '', ''); + $l_notify = ''; + + if (!empty($config['board_contact'])) + { + $l_notify = '

    ' . sprintf($user->lang['NOTIFY_ADMIN_EMAIL'], $config['board_contact']) . '

    '; + } + } + else + { + $msg_title = 'General Error'; + $l_return_index = 'Return to index page'; + $l_notify = ''; + + if (!empty($config['board_contact'])) + { + $l_notify = '

    Please notify the board administrator or webmaster: ' . $config['board_contact'] . '

    '; + } + } + garbage_collection(); // Try to not call the adm page data... @@ -3538,19 +3563,16 @@ function msg_handler($errno, $msg_text, $errfile, $errline) echo ''; echo '
    '; echo ' '; echo '
    '; echo '
    '; - echo '

    General Error

    '; + echo '

    ' . $msg_title . '

    '; echo '
    ' . $msg_text . '
    '; - if (!empty($config['board_contact'])) - { - echo '

    Please notify the board administrator or webmaster: ' . $config['board_contact'] . '

    '; - } - + echo $l_notify; + echo '
    '; echo '
    '; echo '