mirror of
https://github.com/phpbb/phpbb.git
synced 2025-03-13 20:28:44 +01:00
- a bunch of bugfixes. :P
git-svn-id: file:///svn/phpbb/trunk@5678 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
44c60cff4d
commit
21de871aff
@ -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}
|
||||
|
@ -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();
|
||||
|
@ -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;
|
||||
|
@ -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];
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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'))
|
||||
{
|
||||
|
@ -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 = '';
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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))
|
||||
|
@ -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'])
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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':
|
||||
|
@ -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)
|
||||
|
@ -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'],
|
||||
|
@ -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() . '-');
|
||||
|
@ -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)) : '';
|
||||
|
||||
|
@ -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,
|
||||
|
@ -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)) : '';
|
||||
|
||||
|
@ -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)) : '';
|
||||
|
||||
|
@ -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')
|
||||
|
@ -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,
|
||||
|
@ -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']);
|
||||
}
|
||||
}
|
||||
|
@ -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']}" : '')
|
||||
);
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
@ -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'] = '';
|
||||
|
@ -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,
|
||||
|
@ -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],
|
||||
|
@ -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,
|
||||
|
@ -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 '',
|
||||
|
@ -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,
|
||||
|
@ -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 #
|
||||
|
@ -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 '',
|
||||
|
@ -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 ...',
|
||||
|
@ -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',
|
||||
|
@ -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',
|
||||
|
@ -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.',
|
||||
|
||||
|
@ -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',
|
||||
|
@ -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');
|
||||
|
||||
|
@ -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');
|
||||
}
|
||||
//-->
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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),
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user