diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2006-03-21 19:23:34 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-03-21 19:23:34 +0000 |
commit | 21de871aff0392803dd98ab8a895fabac35f4219 (patch) | |
tree | aa052fe762be977462e92b755e59dacb0c4ea559 /phpBB | |
parent | 44c60cff4de351523f950ca7fac114d1a2769b82 (diff) | |
download | forums-21de871aff0392803dd98ab8a895fabac35f4219.tar forums-21de871aff0392803dd98ab8a895fabac35f4219.tar.gz forums-21de871aff0392803dd98ab8a895fabac35f4219.tar.bz2 forums-21de871aff0392803dd98ab8a895fabac35f4219.tar.xz forums-21de871aff0392803dd98ab8a895fabac35f4219.zip |
- a bunch of bugfixes. :P
git-svn-id: file:///svn/phpbb/trunk@5678 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
47 files changed, 200 insertions, 119 deletions
diff --git a/phpBB/adm/style/acp_language.html b/phpBB/adm/style/acp_language.html index 5779506339..c0a0e8e745 100644 --- a/phpBB/adm/style/acp_language.html +++ b/phpBB/adm/style/acp_language.html @@ -138,7 +138,7 @@ <tbody> <!-- IF S_EMAIL_FILE --> <tr> - <td class="row2" colspan="2" style="text-align: center;"><textarea name="entry" id="entry" cols="80" rows="20" style="width: 90%">{LANG}</textarea></td> + <td class="row2" colspan="2" style="text-align: center;"><textarea name="entry" id="entry" cols="80" rows="20">{LANG}</textarea></td> </tr> <!-- ELSE --> {TPL} diff --git a/phpBB/download.php b/phpBB/download.php index abc970ea88..9d2efdf9df 100644 --- a/phpBB/download.php +++ b/phpBB/download.php @@ -226,7 +226,13 @@ function send_file_to_browser($attachment, $upload_dir, $category) if (!$result) { - trigger_error('Unable to deliver file.<br />Error was: ' . $php_errormsg, E_USER_WARNING); + // PHP track_errors setting On? + if (!empty($php_errormsg)) + { + trigger_error('Unable to deliver file.<br />Error was: ' . $php_errormsg, E_USER_WARNING); + } + + trigger_error('Unable to deliver file.', E_USER_WARNING); } flush(); diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php index 8097e9b2d3..2c5f04faf1 100644 --- a/phpBB/includes/acp/acp_attachments.php +++ b/phpBB/includes/acp/acp_attachments.php @@ -756,6 +756,7 @@ class acp_attachments ORDER BY allow_group DESC, group_name'; $result = $db->sql_query($sql); + $act_deact = 'activate'; while ($row = $db->sql_fetchrow($result)) { $s_add_spacer = ($row['allow_group'] == 0 && $act_deact == 'deactivate') ? true : false; diff --git a/phpBB/includes/acp/acp_bbcodes.php b/phpBB/includes/acp/acp_bbcodes.php index efa0249ff7..a63eb58c2c 100644 --- a/phpBB/includes/acp/acp_bbcodes.php +++ b/phpBB/includes/acp/acp_bbcodes.php @@ -243,11 +243,11 @@ class acp_bbcodes ) ); + $pad = 0; + $modifiers = 'i'; + if (preg_match_all('/\{(' . implode('|', array_keys($tokens)) . ')[0-9]*\}/i', $msg_bbcode, $m)) { - $pad = 0; - $modifiers = 'i'; - foreach ($m[0] as $n => $token) { $token_type = $m[1][$n]; diff --git a/phpBB/includes/acp/acp_database.php b/phpBB/includes/acp/acp_database.php index b34e490734..bf14f6b1e2 100644 --- a/phpBB/includes/acp/acp_database.php +++ b/phpBB/includes/acp/acp_database.php @@ -129,12 +129,12 @@ class acp_database for ($j = 0; $j < $fields_cnt; $j++) { - $field_set[$j] = $field[$j]->name; + $field_set[$j] = $field[$j]->name; } $fields = implode(', ', $field_set); $values = array(); - $schema_insert = 'INSERT INTO ' . $name . ' (' . $fields . ') VALUES ('; + $schema_insert = 'INSERT INTO ' . $table_name . ' (' . $fields . ') VALUES ('; while ($row = mysqli_fetch_row($result)) { diff --git a/phpBB/includes/acp/acp_icons.php b/phpBB/includes/acp/acp_icons.php index 44e9f450a5..7b683186ee 100644 --- a/phpBB/includes/acp/acp_icons.php +++ b/phpBB/includes/acp/acp_icons.php @@ -208,8 +208,8 @@ class acp_icons $image_width = (isset($_POST['width'])) ? array_map('intval', $_POST['width']) : array(); $image_height = (isset($_POST['height'])) ? array_map('intval', $_POST['height']) : array(); $image_add = (isset($_POST['add_img'])) ? array_map('intval', $_POST['add_img']) : array(); - $image_emotion = request_var('emotion', ''); - $image_code = request_var('code', ''); + $image_emotion = request_var('emotion', array('' => '')); + $image_code = request_var('code', array('' => '')); $image_display_on_posting = (isset($_POST['display_on_posting'])) ? array_map('intval', $_POST['display_on_posting']) : array(); foreach ($images as $image) diff --git a/phpBB/includes/acp/acp_language.php b/phpBB/includes/acp/acp_language.php index 4bb5958501..dd769319f6 100644 --- a/phpBB/includes/acp/acp_language.php +++ b/phpBB/includes/acp/acp_language.php @@ -153,7 +153,7 @@ class acp_language 'S_CONNECTION_SUCCESS' => (request_var('test_connection', '') && $test_connection === true) ? true : false, 'S_CONNECTION_FAILED' => (request_var('test_connection', '') && $test_connection === false) ? true : false )); - break; + break; case 'update_details': @@ -302,7 +302,7 @@ class acp_language } } - $footer = ");\n\n?>"; + $footer = "));\n\n?>"; fwrite($fp, $footer); } @@ -592,6 +592,7 @@ class acp_language } else { + $help = array(); include($phpbb_root_path . $this->get_filename($lang_iso, $this->language_directory, $this->language_file, $file_from_store)); if ($is_help_file) @@ -1026,12 +1027,12 @@ $lang = array_merge($lang, array( { $tpl .= ' <tr> - <td class="row1" style="width: 10%; white-space: nowrap;">' . $key_prefix . '<b>' . $_key . '</b></td> + <td class="row1" style="white-space: nowrap;">' . $key_prefix . '<b>' . $_key . '</b></td> <td class="row2">'; if ($input_field) { - $tpl .= '<input type="text" name="entry[' . $key . '][' . $_key . ']" value="' . htmlspecialchars($_value) . '" style="width: 99%" />'; + $tpl .= '<input type="text" name="entry[' . $key . '][' . $_key . ']" value="' . htmlspecialchars($_value) . '" size="50" />'; } else { @@ -1051,12 +1052,12 @@ $lang = array_merge($lang, array( { $tpl .= ' <tr> - <td class="row1" style="width: 10%; white-space: nowrap;">' . $key_prefix . '<b>' . $key . '</b></td> + <td class="row1" style="white-space: nowrap;">' . $key_prefix . '<b>' . $key . '</b></td> <td class="row2">'; if ($input_field) { - $tpl .= '<input type="text" name="entry[' . $key . ']" value="' . htmlspecialchars($value) . '" style="width: 99%" />'; + $tpl .= '<input type="text" name="entry[' . $key . ']" value="' . htmlspecialchars($value) . '" size="50" />'; } else { diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php index a73a83e1bb..9c1c32fb24 100644 --- a/phpBB/includes/acp/acp_main.php +++ b/phpBB/includes/acp/acp_main.php @@ -131,8 +131,6 @@ class acp_main $messenger->save_queue(); - unset($email_list); - add_log('admin', 'LOG_INDEX_REMIND', implode(', ', $usernames)); unset($usernames); } @@ -343,6 +341,7 @@ class acp_main ); $log_data = array(); + $log_count = 0; if ($auth->acl_get('a_viewlogs')) { diff --git a/phpBB/includes/acp/acp_permissions.php b/phpBB/includes/acp/acp_permissions.php index f3020bcaf0..99143387d6 100644 --- a/phpBB/includes/acp/acp_permissions.php +++ b/phpBB/includes/acp/acp_permissions.php @@ -32,7 +32,8 @@ class acp_permissions $this->tpl_name = 'acp_permissions'; // Set some vars - $action = key(request_var('action', array('' => 0))); + $action = request_var('action', array('' => 0)); + $action = key($action); $action = (isset($_POST['psubmit'])) ? 'apply_permissions' : $action; $all_forums = request_var('all_forums', 0); @@ -218,7 +219,7 @@ class acp_permissions $template->assign_vars(array( 'S_SELECT_FORUM' => true, - 'S_FORUM_OPTIONS' => make_forum_select(false, false, true)) + 'S_FORUM_OPTIONS' => make_forum_select(false, false, true, false, false)) ); break; @@ -231,7 +232,7 @@ class acp_permissions continue 2; } - $forum_list = make_forum_select(false, false, true, false, true, true); + $forum_list = make_forum_select(false, false, true, false, false, true); // Build forum options $s_forum_options = ''; diff --git a/phpBB/includes/acp/acp_prune.php b/phpBB/includes/acp/acp_prune.php index f5972da0e9..1fd98af67f 100644 --- a/phpBB/includes/acp/acp_prune.php +++ b/phpBB/includes/acp/acp_prune.php @@ -295,7 +295,7 @@ class acp_prune { $sql = 'UPDATE ' . POSTS_TABLE . ' SET poster_id = ' . ANONYMOUS . ", post_username = '" . $db->sql_escape($usernames[$i]) . "' - WHERE user_id = " . $userids[$i]; + WHERE user_id = " . $user_ids[$i]; $db->sql_query($sql); } diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php index c5dc6ae154..d7fe6b4ff7 100644 --- a/phpBB/includes/acp/acp_styles.php +++ b/phpBB/includes/acp/acp_styles.php @@ -465,6 +465,7 @@ pagination_sep = \'{PAGINATION_SEP}\' 'polls' => array( 'poll_left', 'poll_center', 'poll_right',), ); + foreach ($imglist as $category => $img_ary) { if (in_array($imgname, $img_ary)) @@ -492,7 +493,7 @@ pagination_sep = \'{PAGINATION_SEP}\' $imgpath = preg_replace('/^([^\/]+\/)/', '{LANG}/', $imgpath) . $imgheight . $imgwidth; $sql = 'UPDATE ' . STYLES_IMAGE_TABLE . " - SET $imgname = '$imgpath' + SET $imgname = '" . $db->sql_escape($imgpath) . "' WHERE imageset_id = $style_id"; $db->sql_query($sql); @@ -1801,27 +1802,27 @@ pagination_sep = \'{PAGINATION_SEP}\' global $config, $db, $user; $element_ary = array('template', 'theme', 'imageset'); - + if (!$name) { - $error[] = $user->lang[$l_type . '_ERR_STYLE_NAME']; + $error[] = $user->lang['STYLE_ERR_STYLE_NAME']; } // Check if the character set is allowed if (!preg_match('/^[a-z0-9_\-\+ ]+$/i', $name)) { - $error[] = $user->lang[$l_type . '_ERR_NAME_CHARS']; + $error[] = $user->lang['STYLE_ERR_NAME_CHARS']; } // Check length settings if (strlen($name) > 30) { - $error[] = $user->lang[$l_type . '_ERR_NAME_LONG']; + $error[] = $user->lang['STYLE_ERR_NAME_LONG']; } if (strlen($copyright) > 60) { - $error[] = $user->lang[$l_type . '_ERR_COPY_LONG']; + $error[] = $user->lang['STYLE_ERR_COPY_LONG']; } // Check if the name already exist @@ -1834,7 +1835,7 @@ pagination_sep = \'{PAGINATION_SEP}\' if ($row) { - $error[] = $user->lang[$l_type . '_ERR_NAME_EXIST']; + $error[] = $user->lang['STYLE_ERR_NAME_EXIST']; } if (sizeof($error)) diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index 4dcf128452..653c33f5da 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -147,6 +147,17 @@ class acp_users trigger_error($user->lang['NO_ADMIN'] . adm_back_link($this->u_action . '&u=' . $user_id)); } + // Check if the user wants to remove himself or the guest user account + if ($user_id == ANONYMOUS) + { + trigger_error($user->lang['CANNOT_REMOVE_ANONYMOUS'] . adm_back_link($this->u_action . '&u=' . $user_id)); + } + + if ($user_id == $user->data['user_id']) + { + trigger_error($user->lang['CANNOT_REMOVE_YOURSELF'] . adm_back_link($this->u_action . '&u=' . $user_id)); + } + if (confirm_box(true)) { user_delete($delete_type, $user_id); @@ -1225,6 +1236,7 @@ class acp_users $avatar_select = basename(request_var('avatar_select', '')); $category = basename(request_var('category', '')); + $can_upload = (file_exists($phpbb_root_path . $config['avatar_path']) && is_writeable($phpbb_root_path . $config['avatar_path']) && $file_uploads) ? true : false; $data = array(); @@ -1320,8 +1332,6 @@ class acp_users $error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error); } - $can_upload = (file_exists($phpbb_root_path . $config['avatar_path']) && is_writeable($phpbb_root_path . $config['avatar_path']) && $file_uploads) ? true : false; - // Generate users avatar if ($user_row['user_avatar']) { diff --git a/phpBB/includes/db/mssql_odbc.php b/phpBB/includes/db/mssql_odbc.php index e87cc707f4..362083f2d9 100644 --- a/phpBB/includes/db/mssql_odbc.php +++ b/phpBB/includes/db/mssql_odbc.php @@ -208,7 +208,7 @@ class dbal_mssql_odbc extends dbal return $cache->sql_fetchrow($query_id); } - return ($query_id) ? @odbc_fetch_array($result_id) : false; + return ($query_id) ? @odbc_fetch_array($query_id) : false; } /** diff --git a/phpBB/includes/db/oracle.php b/phpBB/includes/db/oracle.php index 7de1de37c3..35a5a6a87c 100644 --- a/phpBB/includes/db/oracle.php +++ b/phpBB/includes/db/oracle.php @@ -409,7 +409,7 @@ class dbal_oracle extends dbal $success = @ociexecute($result, OCI_DEFAULT); $row = array(); - while (@ocifetchinto($query_id, $row, OCI_ASSOC + OCI_RETURN_NULLS)) + while (@ocifetchinto($result, $row, OCI_ASSOC + OCI_RETURN_NULLS)) { // Take the time spent on parsing rows into account } diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index e0fb5e51f2..3e136e6dd4 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1385,7 +1385,16 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa $redirect = request_var('redirect', "index.$phpEx$SID"); meta_refresh(3, $redirect); - $message = (($l_success) ? $l_success : $user->lang['LOGIN_REDIRECT']) . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $redirect . '">', '</a> '); + $message = ($l_success) ? $l_success : $user->lang['LOGIN_REDIRECT']; + + if ($admin) + { + $message .= '<br /><br />' . sprintf($user->lang['PROCEED_TO_ACP'], '<a href="' . $redirect . '">', '</a> '); + } + else + { + $message .= '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $redirect . '">', '</a> '); + } trigger_error($message); } @@ -1671,12 +1680,8 @@ function extension_allowed($forum_id, $extension, &$extensions) return (!in_array($forum_id, $check)) ? false : true; } - else - { - return ($forum_id == 0) ? false : true; - } - return false; + return ($forum_id == 0) ? false : true; } /** @@ -2403,7 +2408,7 @@ function get_backtrace() break; case 'resource': - $args[] = 'Resource(' . strstr($a, '#') . ')'; + $args[] = 'Resource(' . strstr($argument, '#') . ')'; break; case 'boolean': diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php index ec4b4a1fd0..74c3037bf0 100644 --- a/phpBB/includes/functions_messenger.php +++ b/phpBB/includes/functions_messenger.php @@ -394,7 +394,7 @@ class messenger foreach ($addresses as $address) { - $this->jabber->send_message($address, 'normal', NULL, array('body' => $msg)); + $this->jabber->send_message($address, 'normal', NULL, array('body' => $this->msg)); } sleep(1); @@ -528,6 +528,7 @@ class queue for ($i = 0; $i < $num_items; $i++) { + // Make variables available... extract(array_shift($this->queue_data[$object]['data'])); switch ($object) diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php index 7921e0a187..a81ea659e1 100644 --- a/phpBB/includes/functions_privmsgs.php +++ b/phpBB/includes/functions_privmsgs.php @@ -102,14 +102,11 @@ $global_rule_conditions = array( /** * Get all folder */ -function get_folder($user_id, &$folder, $folder_id = false) +function get_folder($user_id, $folder_id = false) { global $db, $user, $template; - if (!is_array($folder)) - { - $folder = array(); - } + $folder = array(); // Get folder informations $sql = 'SELECT folder_id, COUNT(msg_id) as num_messages, SUM(unread) as num_unread @@ -178,7 +175,7 @@ function get_folder($user_id, &$folder, $folder_id = false) ); } - return; + return $folder; } /** @@ -244,12 +241,14 @@ function check_rule(&$rules, &$rule_row, &$message_row, $user_id) { case ACTION_PLACE_INTO_FOLDER: return array('action' => $rule_row['rule_action'], 'folder_id' => $rule_row['rule_folder_id']); - break; + break; + case ACTION_MARK_AS_READ: case ACTION_MARK_AS_IMPORTANT: case ACTION_DELETE_MESSAGE: - return array('action' => $rule_row['rule_action'], 'unread' => $row['unread'], 'important' => $row['important']); - break; + return array('action' => $rule_row['rule_action'], 'unread' => $message_row['unread'], 'important' => $message_row['important']); + break; + default: return false; } @@ -1171,7 +1170,6 @@ function submit_pm($mode, $subject, &$data, $update_message, $put_in_outbox = tr 'enable_sig' => $data['enable_sig'], 'message_subject' => $subject, 'message_text' => $data['message'], - 'message_checksum' => $data['message_md5'], 'message_encoding' => $user->lang['ENCODING'], 'message_attachment'=> (isset($data['filename_data']['physical_filename']) && sizeof($data['filename_data'])) ? 1 : 0, 'bbcode_bitfield' => $data['bbcode_bitfield'], @@ -1191,7 +1189,6 @@ function submit_pm($mode, $subject, &$data, $update_message, $put_in_outbox = tr 'enable_sig' => $data['enable_sig'], 'message_subject' => $subject, 'message_text' => $data['message'], - 'message_checksum' => $data['message_md5'], 'message_encoding' => $user->lang['ENCODING'], 'message_attachment'=> (isset($data['filename_data']['physical_filename']) && sizeof($data['filename_data'])) ? 1 : 0, 'bbcode_bitfield' => $data['bbcode_bitfield'], diff --git a/phpBB/includes/functions_upload.php b/phpBB/includes/functions_upload.php index a53d31e2b4..2b4e680e54 100644 --- a/phpBB/includes/functions_upload.php +++ b/phpBB/includes/functions_upload.php @@ -578,7 +578,6 @@ class fileupload $file = new fileerror($user->lang[$this->error_prefix . 'EMPTY_REMOTE_DATA']); return $file; } - unset($url_ary); $tmp_path = (!@ini_get('safe_mode')) ? false : $phpbb_root_path . 'cache'; $filename = tempnam($tmp_path, unique_id() . '-'); diff --git a/phpBB/includes/mcp/mcp_forum.php b/phpBB/includes/mcp/mcp_forum.php index d3f9417df8..4c02830bcb 100644 --- a/phpBB/includes/mcp/mcp_forum.php +++ b/phpBB/includes/mcp/mcp_forum.php @@ -51,7 +51,11 @@ function mcp_forum_view($id, $mode, $action, $forum_info) $topics_per_page = ($forum_info['forum_topics_per_page']) ? $forum_info['forum_topics_per_page'] : $config['topics_per_page']; + $sort_days = $total = 0; + $sort_key = $sort_dir = ''; + $sort_by_sql = $sort_order_sql = array(); mcp_sorting('viewforum', $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $forum_id); + $forum_topics = ($total == -1) ? $forum_info['forum_topics'] : $total; $limit_time_sql = ($sort_days) ? 'AND t.topic_last_post_time >= ' . (time() - ($sort_days * 86400)) : ''; diff --git a/phpBB/includes/mcp/mcp_logs.php b/phpBB/includes/mcp/mcp_logs.php index 182f028a0f..4fc1c899c2 100755 --- a/phpBB/includes/mcp/mcp_logs.php +++ b/phpBB/includes/mcp/mcp_logs.php @@ -15,7 +15,7 @@ */ class mcp_logs { - + var $u_action; var $p_master; function mcp_main(&$p_master) @@ -36,7 +36,10 @@ class mcp_logs } // Set up general vars + + // Isn't this set above? :o $action = request_var('action', ''); + $start = request_var('start', 0); $deletemark = (isset($_POST['del_marked'])) ? true : false; $deleteall = (isset($_POST['del_all'])) ? true : false; @@ -111,7 +114,7 @@ class mcp_logs $template->assign_vars(array( 'S_ON_PAGE' => on_page($log_count, $config['topics_per_page'], $start), 'TOTAL_LOGS' => ($log_count == 1) ? $user->lang['TOTAL_LOG'] : sprintf($user->lang['TOTAL_LOGS'], $log_count), - 'PAGINATION' => generate_pagination($u_action . "&$u_sort_param", $log_count, $config['topics_per_page'], $start, true), + 'PAGINATION' => generate_pagination($this->u_action . "&$u_sort_param", $log_count, $config['topics_per_page'], $start, true), 'U_POST_ACTION' => "mcp.$phpEx$SID&i=$id&mode=$mode&u=$user_id", 'S_CLEAR_ALLOWED' => ($auth->acl_get('a_clearlogs')) ? true : false, diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php index ac35ecfe3b..a76e767ceb 100644 --- a/phpBB/includes/mcp/mcp_queue.php +++ b/phpBB/includes/mcp/mcp_queue.php @@ -181,7 +181,11 @@ class mcp_queue $forum_options .= '<option value="' . $row['forum_id'] . '"' . (($forum_id == $row['forum_id']) ? ' selected="selected"' : '') . '>' . $row['forum_name'] . '</option>'; } + $sort_days = $total = 0; + $sort_key = $sort_dir = ''; + $sort_by_sql = $sort_order_sql = array(); mcp_sorting($mode, $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $forum_id); + $forum_topics = ($total == -1) ? $forum_info['forum_topics'] : $total; $limit_time_sql = ($sort_days) ? 'AND t.topic_last_post_time >= ' . (time() - ($sort_days * 86400)) : ''; diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php index a3f4a26026..26b0bc6ecb 100755 --- a/phpBB/includes/mcp/mcp_reports.php +++ b/phpBB/includes/mcp/mcp_reports.php @@ -212,7 +212,11 @@ class mcp_reports $forum_options .= '<option value="' . $row['forum_id'] . '"' . (($forum_id == $row['forum_id']) ? ' selected="selected"' : '') . '>' . $row['forum_name'] . '</option>'; } + $sort_days = $total = 0; + $sort_key = $sort_dir = ''; + $sort_by_sql = $sort_order_sql = array(); mcp_sorting('reports', $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $forum_id, $topic_id); + $forum_topics = ($total == -1) ? $forum_info['forum_topics'] : $total; $limit_time_sql = ($sort_days) ? 'AND t.topic_last_post_time >= ' . (time() - ($sort_days * 86400)) : ''; diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php index 044c261873..a4bbca6e3b 100644 --- a/phpBB/includes/mcp/mcp_topic.php +++ b/phpBB/includes/mcp/mcp_topic.php @@ -60,6 +60,11 @@ function mcp_topic_view($id, $mode, $action) // Jumpbox, sort selects and that kind of things make_jumpbox($url . "&i=$id&mode=forum_view", $topic_info['forum_id'], false, 'm_'); $where_sql = ($action == 'reports') ? 'WHERE post_reported = 1 AND ' : 'WHERE'; + + + $sort_days = $total = 0; + $sort_key = $sort_dir = ''; + $sort_by_sql = $sort_order_sql = array(); mcp_sorting('viewtopic', $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $topic_info['forum_id'], $topic_id, $where_sql); $limit_time_sql = ($sort_days) ? 'AND t.topic_last_post_time >= ' . (time() - ($sort_days * 86400)) : ''; @@ -290,7 +295,11 @@ function split_topic($action, $topic_id, $to_forum_id, $subject) { if ($action == 'split_beyond') { + $sort_days = $total = 0; + $sort_key = $sort_dir = ''; + $sort_by_sql = $sort_order_sql = array(); mcp_sorting('viewtopic', $sort_days, $sort_key, $sort_dir, $sort_by_sql, $sort_order_sql, $total, $forum_id, $topic_id); + $limit_time_sql = ($sort_days) ? 'AND t.topic_last_post_time >= ' . (time() - ($sort_days * 86400)) : ''; if ($sort_order_sql{0} == 'u') diff --git a/phpBB/includes/mcp/mcp_warn.php b/phpBB/includes/mcp/mcp_warn.php index b852bdf9c8..98fa890dd3 100755 --- a/phpBB/includes/mcp/mcp_warn.php +++ b/phpBB/includes/mcp/mcp_warn.php @@ -349,13 +349,13 @@ function mcp_warn_user_view($id, $mode, $action) 'USERNAME' => $userrow['username'], 'USER_COLOR' => (!empty($userrow['user_colour'])) ? $userrow['user_colour'] : '', - 'RANK_TITLE' => $rank_title, + 'RANK_TITLE' => $userrow['rank_title'], 'JOINED' => $user->format_date($userrow['user_regdate'], $user->lang['DATE_FORMAT']), 'POSTS' => ($userrow['user_posts']) ? $userrow['user_posts'] : 0, 'WARNINGS' => ($userrow['user_warnings']) ? $userrow['user_warnings'] : 0, - 'AVATAR_IMG' => $avatar_img, - 'RANK_IMG' => $rank_img, + 'AVATAR_IMG' => $userrow['avatar_img'], + 'RANK_IMG' => $userrow['rank_img'], ) ); } @@ -378,7 +378,6 @@ function add_warning($userrow, $warning, $send_pm = true, $post_id = 0) $message_parser = new parse_message(); $message_parser->message = sprintf($lang['WARNING_PM_BODY'], $warning); - $message_md5 = md5($message_parser->message); $message_parser->parse(true, true, true, false, false, true); $pm_data = array( @@ -390,7 +389,6 @@ function add_warning($userrow, $warning, $send_pm = true, $post_id = 0) 'enable_smilies' => true, 'enable_urls' => false, 'icon_id' => 0, - 'message_md5' => (int) $message_md5, 'bbcode_bitfield' => (int) $message_parser->bbcode_bitfield, 'bbcode_uid' => $message_parser->bbcode_uid, 'message' => $message_parser->message, diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index 6a8a79d292..a478c8466e 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -638,12 +638,18 @@ class session { global $config; - if ($config['cookie_domain'] == 'localhost' || $config['cookie_domain'] == '127.0.0.1') + if (!$config['cookie_domain'] || $config['cookie_domain'] == 'localhost' || $config['cookie_domain'] == '127.0.0.1') { setcookie($config['cookie_name'] . '_' . $name, $cookiedata, $cookietime, $config['cookie_path']); } else { + // Firefox does not allow setting cookies with a domain containing no periods. + if (strpos($config['cookie_domain'], '.') === false) + { + $config['cookie_domain'] = '.' . $config['cookie_domain']; + } + setcookie($config['cookie_name'] . '_' . $name, $cookiedata, $cookietime, $config['cookie_path'], $config['cookie_domain'], $config['cookie_secure']); } } diff --git a/phpBB/includes/ucp/ucp_main.php b/phpBB/includes/ucp/ucp_main.php index 413ec5c1fb..3ee5d01eda 100644 --- a/phpBB/includes/ucp/ucp_main.php +++ b/phpBB/includes/ucp/ucp_main.php @@ -573,7 +573,7 @@ class ucp_main 'U_LAST_POST' => $view_topic_url . '&p=' . $row['topic_last_post_id'] . '#' . $row['topic_last_post_id'], 'U_LAST_POST_AUTHOR'=> ($row['topic_last_poster_id'] != ANONYMOUS && $row['topic_last_poster_id']) ? "{$phpbb_root_path}memberlist.$phpEx$SID&mode=viewprofile&u={$row['topic_last_poster_id']}" : '', 'U_VIEW_TOPIC' => $view_topic_url, - 'U_VIEW_FORUM' => "{$phpbb_root_path}viewforum.$phpEx$SID&f=$forum_id}", + 'U_VIEW_FORUM' => "{$phpbb_root_path}viewforum.$phpEx$SID&f={$forum_id}", 'U_MOVE_UP' => ($row['order_id'] != 1) ? "{$phpbb_root_path}ucp.$phpEx$SID&i=main&mode=bookmarks&move_up={$row['order_id']}" : '', 'U_MOVE_DOWN' => ($row['order_id'] != $max_order_id) ? "{$phpbb_root_path}ucp.$phpEx$SID&i=main&mode=bookmarks&move_down={$row['order_id']}" : '') ); diff --git a/phpBB/includes/ucp/ucp_pm.php b/phpBB/includes/ucp/ucp_pm.php index b4639c1788..7e2fb0a901 100644 --- a/phpBB/includes/ucp/ucp_pm.php +++ b/phpBB/includes/ucp/ucp_pm.php @@ -107,7 +107,7 @@ class ucp_pm case 'compose': $action = request_var('action', 'post'); - get_folder($user->data['user_id'], $folder); + get_folder($user->data['user_id']); if (!$auth->acl_get('u_sendpm')) { @@ -130,7 +130,7 @@ class ucp_pm $user->data['message_limit'] = (!$message_limit) ? $config['pm_max_msgs'] : $message_limit; - get_folder($user->data['user_id'], $folder); + get_folder($user->data['user_id']); include($phpbb_root_path . 'includes/ucp/ucp_pm_options.'.$phpEx); message_options($id, $mode, $global_privmsgs_rules, $global_rule_conditions); @@ -139,7 +139,8 @@ class ucp_pm break; case 'drafts': - get_folder($user->data['user_id'], $folder); + + get_folder($user->data['user_id']); $this->p_name = 'pm'; // Call another module... please do not try this at home... Hoochie Coochie Man @@ -300,7 +301,7 @@ class ucp_pm update_unread_status($message_row['unread'], $message_row['msg_id'], $user->data['user_id'], $folder_id); } - get_folder($user->data['user_id'], $folder, $folder_id); + $folder = get_folder($user->data['user_id'], $folder_id); $s_folder_options = $s_to_folder_options = ''; foreach ($folder as $f_id => $folder_ary) diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php index 851c06c2b6..fcdeb65541 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -342,7 +342,7 @@ function compose_pm($id, $mode, $action) $db->sql_freeresult($result); } - if ($action == 'edit' || $action == 'forward') + if ($action == 'edit') { $message_parser->bbcode_uid = $bbcode_uid; } @@ -444,20 +444,8 @@ function compose_pm($id, $mode, $action) // Parse Attachments - before checksum is calculated $message_parser->parse_attachments('fileupload', $action, 0, $submit, $preview, $refresh, true); - // Grab md5 'checksum' of new message - $message_md5 = md5($message_parser->message); - // Check checksum ... don't re-parse message if the same - $update_message = ($action != 'edit' || $message_md5 != $message_checksum || $status_switch || $preview) ? true : false; - - if ($update_message) - { - $message_parser->parse($enable_bbcode, $enable_urls, $enable_smilies, $img_status, $flash_status, true); - } - else - { - $message_parser->bbcode_bitfield = $bbcode_bitfield; - } + $message_parser->parse($enable_bbcode, $enable_urls, $enable_smilies, $img_status, $flash_status, true); if ($action != 'edit' && !$preview && !$refresh && $config['flood_interval'] && !$auth->acl_get('u_ignoreflood')) { @@ -504,7 +492,6 @@ function compose_pm($id, $mode, $action) 'enable_bbcode' => (bool) $enable_bbcode, 'enable_smilies' => (bool) $enable_smilies, 'enable_urls' => (bool) $enable_urls, - 'message_md5' => (int) $message_md5, 'bbcode_bitfield' => (int) $message_parser->bbcode_bitfield, 'bbcode_uid' => $message_parser->bbcode_uid, 'message' => $message_parser->message, @@ -787,7 +774,11 @@ function compose_pm($id, $mode, $action) 'S_POST_ACTION' => $s_action, 'S_HIDDEN_ADDRESS_FIELD'=> $s_hidden_address_field, - 'S_HIDDEN_FIELDS' => $s_hidden_fields) + 'S_HIDDEN_FIELDS' => $s_hidden_fields, + + 'S_CLOSE_PROGRESS_WINDOW' => isset($_POST['add_file']), + 'U_PROGRESS_BAR' => "{$phpbb_root_path}posting.$phpEx$SID&f=0&mode=popup", // do NOT replace & with & here + ) ); // Build custom bbcodes array @@ -821,7 +812,7 @@ function compose_pm($id, $mode, $action) */ function handle_message_list_actions(&$address_list, $remove_u, $remove_g, $add_to, $add_bcc) { - global $auth; + global $auth, $db; // Delete User [TO/BCC] if ($remove_u) diff --git a/phpBB/includes/ucp/ucp_pm_options.php b/phpBB/includes/ucp/ucp_pm_options.php index 41475b2f8b..40f8baba7a 100644 --- a/phpBB/includes/ucp/ucp_pm_options.php +++ b/phpBB/includes/ucp/ucp_pm_options.php @@ -281,6 +281,10 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit $sql = 'INSERT INTO ' . PRIVMSGS_RULES_TABLE . ' ' . $db->sql_build_array('INSERT', $rule_ary); $db->sql_query($sql); + // Update users message rules + $sql = 'UPDATE ' . USERS_TABLE . ' SET user_message_rules = 1 WHERE user_id = ' . $user->data['user_id']; + $db->sql_query($sql); + $message = $user->lang['RULE_ADDED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $redirect_url . '">', '</a>'); meta_refresh(3, $redirect_url); trigger_error($message); @@ -308,6 +312,21 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit $meta_info = "{$phpbb_root_path}ucp.$phpEx$SID&i=pm&mode=$mode"; $message = $user->lang['RULE_DELETED']; + // Reset user_message_rules if no more assigned + $sql = 'SELECT rule_id + FROM ' . PRIVMSGS_RULES_TABLE . ' + WHERE user_id = ' . $user->data['user_id']; + $result = $db->sql_query_limit($sql, 1); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + // Update users message rules + if ($row) + { + $sql = 'UPDATE ' . USERS_TABLE . ' SET user_message_rules = 0 WHERE user_id = ' . $user->data['user_id']; + $db->sql_query($sql); + } + meta_refresh(3, $meta_info); $message .= '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $meta_info . '">', '</a>'); trigger_error($message); diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php index 8b9d4d859d..bb8a89a879 100644 --- a/phpBB/includes/ucp/ucp_pm_viewmessage.php +++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php @@ -118,6 +118,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) // Assign inline attachments if (isset($attachments) && sizeof($attachments)) { + $update_count = array(); $unset_attachments = parse_inline_attachments($message, $attachments, $update_count, 0); // Needed to let not display the inlined attachments at the end of the message again @@ -125,6 +126,15 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) { unset($attachments[$index]); } + + // Update the attachment download counts + if (sizeof($update_count)) + { + $sql = 'UPDATE ' . ATTACHMENTS_TABLE . ' + SET download_count = download_count + 1 + WHERE attach_id IN (' . implode(', ', array_unique($update_count)) . ')'; + $db->sql_query($sql); + } } $user_info['sig'] = ''; diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql index f5c8986ee1..dfa2495282 100644 --- a/phpBB/install/schemas/firebird_schema.sql +++ b/phpBB/install/schemas/firebird_schema.sql @@ -366,7 +366,6 @@ CREATE TABLE phpbb_privmsgs ( message_text BLOB SUB_TYPE TEXT, message_edit_reason VARCHAR(100), message_edit_user INTEGER DEFAULT 0 NOT NULL, - message_checksum VARCHAR(32) NOT NULL, message_encoding VARCHAR(11) DEFAULT 'iso-8859-1' NOT NULL, message_attachment INTEGER DEFAULT 0 NOT NULL, bbcode_bitfield INTEGER DEFAULT 0 NOT NULL, @@ -766,7 +765,7 @@ CREATE TABLE phpbb_users ( user_lang VARCHAR(30) NOT NULL, user_timezone DOUBLE PRECISION DEFAULT 0 NOT NULL, user_dst INTEGER DEFAULT 0 NOT NULL, - user_dateformat VARCHAR(15) DEFAULT 'd M Y H:i' NOT NULL, + user_dateformat VARCHAR(30) DEFAULT 'd M Y H:i' NOT NULL, user_style INTEGER DEFAULT 0 NOT NULL, user_rank INTEGER DEFAULT 0 , user_colour VARCHAR(6) NOT NULL, diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql index 1f41d0ead3..bd6e6b59af 100644 --- a/phpBB/install/schemas/mssql_schema.sql +++ b/phpBB/install/schemas/mssql_schema.sql @@ -372,7 +372,6 @@ CREATE TABLE [phpbb_privmsgs] ( [message_text] [text] NULL , [message_edit_reason] [varchar] (100) NULL , [message_edit_user] [int] NOT NULL , - [message_checksum] [varchar] (32) NOT NULL , [message_encoding] [varchar] (11) NOT NULL , [message_attachment] [int] NOT NULL , [bbcode_bitfield] [int] NOT NULL , @@ -772,7 +771,7 @@ CREATE TABLE [phpbb_users] ( [user_lang] [varchar] (30) NOT NULL , [user_timezone] [float] NOT NULL , [user_dst] [int] NOT NULL , - [user_dateformat] [varchar] (15) NOT NULL , + [user_dateformat] [varchar] (30) NOT NULL , [user_style] [int] NOT NULL , [user_rank] [int] NULL , [user_colour] [varchar] (6) NOT NULL , @@ -1587,6 +1586,7 @@ ALTER TABLE [phpbb_topics] WITH NOCHECK ADD CONSTRAINT [DF_topics_topic_moved_id] DEFAULT (0) FOR [topic_moved_id], CONSTRAINT [DF_topics_topic_bumped] DEFAULT (0) FOR [topic_bumped], CONSTRAINT [DF_topics_topic_bumper] DEFAULT (0) FOR [topic_bumper], + CONSTRAINT [DF_topics_poll_title] DEFAULT ('') FOR [poll_title], CONSTRAINT [DF_topics_poll_start] DEFAULT (0) FOR [poll_start], CONSTRAINT [DF_topics_poll_length] DEFAULT (0) FOR [poll_length], CONSTRAINT [DF_topics_poll_max_options] DEFAULT (1) FOR [poll_max_options], diff --git a/phpBB/install/schemas/mysql_schema.sql b/phpBB/install/schemas/mysql_schema.sql index 2f5fa88bd1..be12faa9ab 100644 --- a/phpBB/install/schemas/mysql_schema.sql +++ b/phpBB/install/schemas/mysql_schema.sql @@ -434,7 +434,6 @@ CREATE TABLE phpbb_privmsgs ( message_text mediumtext, message_edit_reason varchar(100), message_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - message_checksum varchar(32) DEFAULT '' NOT NULL, message_encoding varchar(11) DEFAULT 'iso-8859-1' NOT NULL, message_attachment tinyint(1) DEFAULT '0' NOT NULL, bbcode_bitfield int(11) UNSIGNED DEFAULT '0' NOT NULL, @@ -813,7 +812,7 @@ CREATE TABLE phpbb_topics ( topic_moved_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, topic_bumped tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, topic_bumper mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, - poll_title varchar(255) NOT NULL, + poll_title varchar(255) DEFAULT '' NOT NULL, poll_start int(11) DEFAULT '0' NOT NULL, poll_length int(11) DEFAULT '0' NOT NULL, poll_max_options tinyint(4) UNSIGNED DEFAULT '1' NOT NULL, @@ -890,7 +889,7 @@ CREATE TABLE phpbb_users ( user_lang varchar(30) DEFAULT '' NOT NULL, user_timezone decimal(5,2) DEFAULT '0.0' NOT NULL, user_dst tinyint(1) DEFAULT '0' NOT NULL, - user_dateformat varchar(15) DEFAULT 'd M Y H:i' NOT NULL, + user_dateformat varchar(30) DEFAULT 'd M Y H:i' NOT NULL, user_style tinyint(4) DEFAULT '0' NOT NULL, user_rank int(11) DEFAULT '0', user_colour varchar(6) DEFAULT '' NOT NULL, diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql index 25ffabbb32..a181532783 100644 --- a/phpBB/install/schemas/oracle_schema.sql +++ b/phpBB/install/schemas/oracle_schema.sql @@ -864,7 +864,6 @@ CREATE TABLE phpbb_privmsgs ( message_text clob, message_edit_reason varchar2(100), message_edit_user number(8) DEFAULT '0' NOT NULL, - message_checksum varchar2(32) DEFAULT '', message_encoding varchar2(11) DEFAULT 'iso-8859-1', message_attachment number(1) DEFAULT '0' NOT NULL, bbcode_bitfield number(11) DEFAULT '0' NOT NULL, @@ -1551,7 +1550,7 @@ CREATE TABLE phpbb_topics ( topic_moved_id number(8) DEFAULT '0' NOT NULL, topic_bumped number(1) DEFAULT '0' NOT NULL, topic_bumper number(8) DEFAULT '0' NOT NULL, - poll_title varchar2(255), + poll_title varchar2(255) DEFAULT '' NOT NULL, poll_start number(11) DEFAULT '0' NOT NULL, poll_length number(11) DEFAULT '0' NOT NULL, poll_max_options number(4) DEFAULT '1' NOT NULL, @@ -1672,7 +1671,7 @@ CREATE TABLE phpbb_users ( user_lang varchar2(30) DEFAULT '', user_timezone number(5, 2) DEFAULT '1' NOT NULL, user_dst number(1) DEFAULT '0' NOT NULL, - user_dateformat varchar2(15) DEFAULT 'd M Y H:i', + user_dateformat varchar2(30) DEFAULT 'd M Y H:i', user_style number(4) DEFAULT '0' NOT NULL, user_rank number(11) DEFAULT '0', user_colour varchar2(6) DEFAULT '', diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql index c3bca14354..f695ab8be6 100644 --- a/phpBB/install/schemas/postgres_schema.sql +++ b/phpBB/install/schemas/postgres_schema.sql @@ -580,7 +580,6 @@ CREATE TABLE phpbb_privmsgs ( message_text text, message_edit_reason varchar(100), message_edit_user INT4 DEFAULT '0' NOT NULL, - message_checksum varchar(32) DEFAULT '' NOT NULL, message_encoding varchar(11) DEFAULT 'iso-8859-1' NOT NULL, message_attachment INT2 DEFAULT '0' NOT NULL, bbcode_bitfield INT4 DEFAULT '0' NOT NULL, @@ -1066,7 +1065,7 @@ CREATE TABLE phpbb_topics ( topic_moved_id INT4 DEFAULT '0' NOT NULL, topic_bumped INT2 DEFAULT '0' NOT NULL, topic_bumper INT4 DEFAULT '0' NOT NULL, - poll_title varchar(255) NOT NULL, + poll_title varchar(255) DEFAULT '' NOT NULL, poll_start INT4 DEFAULT '0' NOT NULL, poll_length INT4 DEFAULT '0' NOT NULL, poll_max_options INT2 DEFAULT '1' NOT NULL, @@ -1175,7 +1174,7 @@ CREATE TABLE phpbb_users ( user_lang varchar(30) DEFAULT '' NOT NULL, user_timezone decimal(5,2) DEFAULT '0.0' NOT NULL, user_dst INT2 DEFAULT '0' NOT NULL, - user_dateformat varchar(15) DEFAULT 'd M Y H:i' NOT NULL, + user_dateformat varchar(30) DEFAULT 'd M Y H:i' NOT NULL, user_style INT2 DEFAULT '0' NOT NULL, user_rank INT4 DEFAULT '0', user_colour varchar(6) DEFAULT '' NOT NULL, diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index cf5d06afd0..00db91bd2e 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -62,7 +62,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('cache_gc', '7200') INSERT INTO phpbb_config (config_name, config_value) VALUES ('chg_passforce', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('chg_passremind', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_domain', ''); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_name', 'phpbb22'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_name', 'phpbb3'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_path', '/'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_secure', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('coppa_enable', '1'); @@ -722,15 +722,15 @@ INSERT INTO phpbb_smilies (code, smiley_url, emotion, smiley_width, smiley_heigh # -- icons ... these are just some of those in CVS INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('misc/arrow_bold_rgt.gif', 19, 19, 1, 1); -INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smilies/redface_anim.gif', 19, 19, 9, 1); -INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smilies/mr_green.gif', 19, 19, 10, 1); +INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smile/redface_anim.gif', 19, 19, 9, 1); +INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smile/mr_green.gif', 19, 19, 10, 1); INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('misc/musical.gif', 19, 19, 4, 1); INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('misc/asterix.gif', 19, 19, 2, 1); INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('misc/square.gif', 19, 19, 3, 1); -INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smilies/alien_grn.gif', 19, 19, 5, 1); -INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smilies/idea.gif', 19, 19, 8, 1); -INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smilies/question.gif', 19, 19, 6, 1); -INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smilies/exclaim.gif', 19, 19, 7, 1); +INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smile/alien_grn.gif', 19, 19, 5, 1); +INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smile/idea.gif', 19, 19, 8, 1); +INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smile/question.gif', 19, 19, 6, 1); +INSERT INTO phpbb_icons (icons_url, icons_width, icons_height, icons_order, display_on_posting) VALUES ('smile/exclaim.gif', 19, 19, 7, 1); # MSSQL IDENTITY phpbb_search_wordlist ON # diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql index 9679f061ef..39f12d16a7 100644 --- a/phpBB/install/schemas/sqlite_schema.sql +++ b/phpBB/install/schemas/sqlite_schema.sql @@ -438,7 +438,6 @@ CREATE TABLE phpbb_privmsgs ( message_text mediumtext(16777215), message_edit_reason varchar(100), message_edit_user mediumint(8) NOT NULL DEFAULT '0', - message_checksum varchar(32) NOT NULL DEFAULT '', message_encoding varchar(11) NOT NULL DEFAULT 'iso-8859-1', message_attachment tinyint(1) NOT NULL DEFAULT '0', bbcode_bitfield int(11) NOT NULL DEFAULT '0', @@ -816,7 +815,7 @@ CREATE TABLE phpbb_topics ( topic_moved_id mediumint(8) NOT NULL DEFAULT '0', topic_bumped tinyint(1) NOT NULL DEFAULT '0', topic_bumper mediumint(8) NOT NULL DEFAULT '0', - poll_title varchar(255) NOT NULL, + poll_title varchar(255) NOT NULL DEFAULT '', poll_start int(11) NOT NULL DEFAULT '0', poll_length int(11) NOT NULL DEFAULT '0', poll_max_options tinyint(4) NOT NULL DEFAULT '1', @@ -894,7 +893,7 @@ CREATE TABLE phpbb_users ( user_lang varchar(30) NOT NULL DEFAULT '', user_timezone decimal(5,2) NOT NULL DEFAULT '0.0', user_dst tinyint(1) NOT NULL DEFAULT '0', - user_dateformat varchar(15) NOT NULL DEFAULT 'd M Y H:i', + user_dateformat varchar(30) NOT NULL DEFAULT 'd M Y H:i', user_style tinyint(4) NOT NULL DEFAULT '0', user_rank int(11) DEFAULT '0', user_colour varchar(6) NOT NULL DEFAULT '', diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php index 0ff39ff03f..fce5b98a7e 100644 --- a/phpBB/language/en/acp/common.php +++ b/phpBB/language/en/acp/common.php @@ -226,6 +226,7 @@ $lang = array_merge($lang, array( 'OFF' => 'OFF', 'ON' => 'ON', + 'PROCEED_TO_ACP' => 'Click %sHere%s to procced to the ACP', 'REMIND' => 'Remind', 'REORDER' => 'Reorder', 'RETURN_TO' => 'Return to ...', diff --git a/phpBB/language/en/acp/posting.php b/phpBB/language/en/acp/posting.php index 3d74524a15..b61291eec2 100644 --- a/phpBB/language/en/acp/posting.php +++ b/phpBB/language/en/acp/posting.php @@ -57,7 +57,7 @@ $lang = array_merge($lang, array( 'tokens' => array( 'TEXT' => 'Any text, including foreign characters, numbers, etc...', - 'NUMBER' => 'Any serie of digits', + 'NUMBER' => 'Any series of digits', 'EMAIL' => 'A valid email address', 'URL' => 'A valid URL using any protocol (http, ftp, etc... cannot be used for javascript exploits). If none is given, "http://" is prepended to to the string', 'LOCAL_URL' => 'A local URL. The URL must be relative to the topic page and cannot contain a server name or protocol', diff --git a/phpBB/language/en/acp/users.php b/phpBB/language/en/acp/users.php index 1ee251d080..e60a2b7181 100644 --- a/phpBB/language/en/acp/users.php +++ b/phpBB/language/en/acp/users.php @@ -33,7 +33,9 @@ $lang = array_merge($lang, array( 'BAN_SUCCESSFULL' => 'Ban entered successfully', - 'CONFIRM_EMAIL_EXPLAIN' => 'You only need to specify this if you are changing the users email address.', + 'CANNOT_REMOVE_ANONYMOUS' => 'You are not able to remove the guest user account.', + 'CANNOT_REMOVE_YOURSELF' => 'You are not allowed to remove your own user account.', + 'CONFIRM_EMAIL_EXPLAIN' => 'You only need to specify this if you are changing the users email address.', 'DELETE_POSTS' => 'Delete posts', 'DELETE_USER' => 'Delete user', diff --git a/phpBB/language/en/posting.php b/phpBB/language/en/posting.php index fa95420607..7ce961c6ae 100644 --- a/phpBB/language/en/posting.php +++ b/phpBB/language/en/posting.php @@ -153,6 +153,7 @@ $lang = array_merge($lang, array( 'POST_STORED_MOD' => 'Your message has been saved but requires approval', 'POST_TOPIC' => 'Post a new topic', 'POST_TOPIC_AS' => 'Post topic as', + 'PROGRESS_BAR' => 'Progress bar', 'QUOTE_DEPTH_EXCEEDED' => 'You may embed only %1$d quotes within each other.', diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php index 9dbfe00eaa..ec3d50d9bb 100644 --- a/phpBB/language/en/ucp.php +++ b/phpBB/language/en/ucp.php @@ -263,6 +263,7 @@ $lang = array_merge($lang, array( 'NO_FRIENDS' => 'No friends currently defined', 'NO_FRIENDS_OFFLINE' => 'No friends offline', 'NO_FRIENDS_ONLINE' => 'No friends online', + 'NO_GROUP_SELECTED' => 'No group specified', 'NO_IMPORTANT_NEWS' => 'No important announcements present', 'NO_MESSAGE' => 'Private Message could not be found', 'NO_NEW_FOLDER_NAME' => 'You have to specify a new folder name', diff --git a/phpBB/posting.php b/phpBB/posting.php index 12e6289ed5..371ce55e29 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -54,7 +54,7 @@ if ($cancel || ($current_time - $lastclick < 2 && $submit)) redirect($redirect); } -if (in_array($mode, array('post', 'reply', 'quote', 'edit', 'delete', 'popup')) && !$forum_id) +if (in_array($mode, array('post', 'reply', 'quote', 'edit', 'delete')) && !$forum_id) { trigger_error('NO_FORUM'); } @@ -106,9 +106,17 @@ switch ($mode) break; case 'popup': - $sql = 'SELECT forum_style - FROM ' . FORUMS_TABLE . ' - WHERE forum_id = ' . $forum_id; + if ($forum_id) + { + $sql = 'SELECT forum_style + FROM ' . FORUMS_TABLE . ' + WHERE forum_id = ' . $forum_id; + } + else + { + upload_popup(); + exit; + } break; default: @@ -1280,7 +1288,7 @@ function delete_post($mode, $post_id, $topic_id, $forum_id, &$data) if (sizeof($update_sql)) { $sql_data[TOPICS_TABLE] .= ', ' . implode(', ', $update_sql[$topic_id]); - $next_post_id = (int) str_replace('topic_last_post_id = ', '', $update[$topic_id][0]); + $next_post_id = (int) str_replace('topic_last_post_id = ', '', $update_sql[$topic_id][0]); } else { @@ -1315,6 +1323,7 @@ function delete_post($mode, $post_id, $topic_id, $forum_id, &$data) $sql_data[TOPICS_TABLE] = 'topic_replies_real = topic_replies_real - 1' . (($data['post_approved']) ? ', topic_replies = topic_replies - 1' : ''); $next_post_id = (int) $row['post_id']; + break; } $sql_data[USERS_TABLE] = ($auth->acl_get('f_postcount', $forum_id)) ? 'user_posts = user_posts - 1' : ''; @@ -1796,7 +1805,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u $update_sql = update_post_information('forum', $data['forum_id'], true); if (sizeof($update_sql)) { - $sql_data[FORUMS_TABLE]['stat'][] = implode(', ', $update_sql[$forum_id]); + $sql_data[FORUMS_TABLE]['stat'][] = implode(', ', $update_sql[$data['forum_id']]); } } @@ -1924,11 +1933,11 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u trigger_error($message); } -function upload_popup($forum_style) +function upload_popup($forum_style = 0) { global $template, $user; - $user->setup('posting', $forum_style); + ($forum_style) ? $user->setup('posting', $forum_style) : $user->setup('posting'); page_header('PROGRESS_BAR'); diff --git a/phpBB/styles/subSilver/template/posting_attach_body.html b/phpBB/styles/subSilver/template/posting_attach_body.html index caadd34f07..070e96f936 100644 --- a/phpBB/styles/subSilver/template/posting_attach_body.html +++ b/phpBB/styles/subSilver/template/posting_attach_body.html @@ -4,7 +4,7 @@ <!-- function popup_progress_bar() { - close_waitscreen = 0; + close_waitscreen = 0; window.open('{U_PROGRESS_BAR}', '_upload', 'HEIGHT=200,resizable=yes,scrollbars=no,WIDTH=400'); } //--> diff --git a/phpBB/styles/subSilver/template/posting_progress_bar.html b/phpBB/styles/subSilver/template/posting_progress_bar.html index d0943becfc..54e4322a09 100644 --- a/phpBB/styles/subSilver/template/posting_progress_bar.html +++ b/phpBB/styles/subSilver/template/posting_progress_bar.html @@ -27,7 +27,7 @@ <td> <table width="100%" border="0" cellspacing="1" cellpadding="4"> <tr> - <td valign="top" class="row1" align="center"><br /><span class="gen">{L_UPLOAD_IN_PROGRESS}</span><br /><br /><div style="align:center">{PROGRESS_BAR}</div><br /><br /><span class="genmed"><a href="javascript:window.close();">{L_CLOSE_WINDOW}</a></span><br /><br /></td> + <td valign="top" class="row1" align="center"><br /><span class="genmed">{L_UPLOAD_IN_PROGRESS}</span><br /><br /><div style="align:center">{PROGRESS_BAR}</div><br /><br /><span class="genmed"><a href="javascript:window.close();">{L_CLOSE_WINDOW}</a></span><br /><br /></td> </tr> </table> </td> diff --git a/phpBB/styles/subSilver/template/ucp_prefs_personal.html b/phpBB/styles/subSilver/template/ucp_prefs_personal.html index 670ddc8a15..6ba799fb8e 100644 --- a/phpBB/styles/subSilver/template/ucp_prefs_personal.html +++ b/phpBB/styles/subSilver/template/ucp_prefs_personal.html @@ -77,7 +77,7 @@ function dE(n,s){ <select name="dateoptions" id="dateoptions" onchange="if(this.value=='custom'){dE('custom_date',1);}else{dE('custom_date',-1);} if (this.value == 'custom') { document.getElementById('dateformat').value = '{DEFAULT_DATEFORMAT}'; } else { document.getElementById('dateformat').value = this.value; }"> {S_DATEFORMAT_OPTIONS} </select> - <div id="custom_date"<!-- IF not S_CUSTOM_DATEFORMAT --> style="display:none;"<!-- ENDIF -->><input type="text" name="dateformat" id="dateformat" value="{DATE_FORMAT}" maxlength="14" class="post" style="margin-top: 3px;" /></div> + <div id="custom_date"<!-- IF not S_CUSTOM_DATEFORMAT --> style="display:none;"<!-- ENDIF -->><input type="text" name="dateformat" id="dateformat" value="{DATE_FORMAT}" maxlength="30" class="post" style="margin-top: 3px;" /></div> </td> </tr> <tr> diff --git a/phpBB/viewonline.php b/phpBB/viewonline.php index a031c425c6..0519ed8b31 100644 --- a/phpBB/viewonline.php +++ b/phpBB/viewonline.php @@ -332,12 +332,14 @@ while ($row = $db->sql_fetchrow($result)) } $db->sql_freeresult($result); +// Refreshing the page every 60 seconds... +meta_refresh(60, "{$phpbb_root_path}viewonline.$phpEx$SID&sg=$show_guests&sk=$sort_key&sd=$sort_dir&start=$start"); + // Send data to template $template->assign_vars(array( 'TOTAL_REGISTERED_USERS_ONLINE' => sprintf($l_r_user_s, $logged_visible_online) . sprintf($l_h_user_s, $logged_hidden_online), 'TOTAL_GUEST_USERS_ONLINE' => sprintf($l_g_user_s, $guest_counter), 'LEGEND' => $legend, - 'META' => '<meta http-equiv="refresh" content="60; url=viewonline.' . $phpEx . $SID . '" />', 'PAGINATION' => $pagination, 'PAGE_NUMBER' => on_page($counter, $config['topics_per_page'], $start), |