aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/adm/style/acp_jabber.html4
-rw-r--r--phpBB/download.php24
-rw-r--r--phpBB/includes/acm/acm_file.php2
-rw-r--r--phpBB/includes/acp/acp_attachments.php2
-rw-r--r--phpBB/includes/acp/acp_forums.php2
-rw-r--r--phpBB/includes/acp/acp_jabber.php16
-rw-r--r--phpBB/includes/acp/acp_users.php1
-rw-r--r--phpBB/includes/bbcode.php8
-rw-r--r--phpBB/includes/db/dbal.php4
-rw-r--r--phpBB/includes/db/postgres.php2
-rw-r--r--phpBB/includes/functions.php2
-rw-r--r--phpBB/includes/functions_jabber.php4
-rw-r--r--phpBB/includes/functions_messenger.php2
-rw-r--r--phpBB/includes/functions_posting.php4
-rw-r--r--phpBB/includes/functions_privmsgs.php8
-rw-r--r--phpBB/includes/functions_profile_fields.php4
-rw-r--r--phpBB/includes/functions_upload.php18
-rw-r--r--phpBB/includes/functions_user.php2
-rw-r--r--phpBB/includes/message_parser.php5
-rw-r--r--phpBB/includes/search/fulltext_mysql.php4
-rw-r--r--phpBB/includes/session.php2
-rw-r--r--phpBB/includes/template.php2
-rw-r--r--phpBB/includes/ucp/ucp_pm_compose.php46
-rw-r--r--phpBB/includes/ucp/ucp_pm_viewmessage.php2
-rw-r--r--phpBB/includes/ucp/ucp_register.php4
-rw-r--r--phpBB/includes/ucp/ucp_resend.php2
-rw-r--r--phpBB/install/schemas/schema_data.sql1
-rw-r--r--phpBB/language/en/acp/board.php40
-rw-r--r--phpBB/language/en/posting.php2
-rw-r--r--phpBB/language/en/ucp.php1
-rw-r--r--phpBB/memberlist.php20
-rw-r--r--phpBB/posting.php52
-rw-r--r--phpBB/styles/subSilver/template/memberlist_view.html2
33 files changed, 193 insertions, 101 deletions
diff --git a/phpBB/adm/style/acp_jabber.html b/phpBB/adm/style/acp_jabber.html
index 8dee73c5b1..1f4e305f95 100644
--- a/phpBB/adm/style/acp_jabber.html
+++ b/phpBB/adm/style/acp_jabber.html
@@ -41,6 +41,10 @@
<dt><label for="jab_resource">{L_JAB_RESOURCE}:</label><br /><span>{L_JAB_RESOURCE_EXPLAIN}</span></dt>
<dd><input type="text" id="jab_resource" name="jab_resource" value="{JAB_RESOURCE}" /></dd>
</dl>
+ <dl>
+ <dt><label for="jab_package_size">{L_JAB_PACKAGE_SIZE}:</label><br /><span>{L_JAB_PACKAGE_SIZE_EXPLAIN}</span></dt>
+ <dd><input type="text" id="jab_package_size" name="jab_package_size" value="{JAB_PACKAGE_SIZE}" /></dd>
+ </dl>
</fieldset>
<fieldset class="submit-buttons">
diff --git a/phpBB/download.php b/phpBB/download.php
index f6a43b24c6..c7a1a46a5f 100644
--- a/phpBB/download.php
+++ b/phpBB/download.php
@@ -40,12 +40,13 @@ $sql = 'SELECT attach_id, in_message, post_msg_id, extension
FROM ' . ATTACHMENTS_TABLE . "
WHERE attach_id = $download_id";
$result = $db->sql_query_limit($sql, 1);
+$attachment = $db->sql_fetchrow($result);
+$db->sql_freeresult($result);
-if (!($attachment = $db->sql_fetchrow($result)))
+if (!$attachment)
{
trigger_error('ERROR_NO_ATTACHMENT');
}
-$db->sql_freeresult($result);
if ((!$attachment['in_message'] && !$config['allow_attachments']) || ($attachment['in_message'] && !$config['allow_pm_attach']))
{
@@ -105,12 +106,14 @@ $sql = 'SELECT attach_id, in_message, post_msg_id, extension, physical_filename,
FROM ' . ATTACHMENTS_TABLE . "
WHERE attach_id = $download_id";
$result = $db->sql_query_limit($sql, 1);
+$attachment = $db->sql_fetchrow($result);
+$db->sql_freeresult($result);
-if (!($attachment = $db->sql_fetchrow($result)))
+if (!$attachment)
{
trigger_error('ERROR_NO_ATTACHMENT');
}
-$db->sql_freeresult($result);
+
$attachment['physical_filename'] = basename($attachment['physical_filename']);
@@ -136,6 +139,7 @@ if ($download_mode == PHYSICAL_LINK)
}
redirect($config['upload_path'] . '/' . $attachment['physical_filename']);
+ exit;
}
else
{
@@ -160,7 +164,7 @@ function send_file_to_browser($attachment, $upload_dir, $category)
// Determine the Browser the User is using, because of some nasty incompatibilities.
// borrowed from phpMyAdmin. :)
- $user_agent = (!empty($_SERVER['HTTP_USER_AGENT'])) ? $_SERVER['HTTP_USER_AGENT'] : '';
+ $user_agent = $user->browser;
if (ereg('Opera(/| )([0-9].[0-9]{1,2})', $user_agent, $log_version))
{
@@ -278,7 +282,15 @@ function download_allowed()
}
// Check for own server...
- if (preg_match('#^.*?' . $config['server_name'] . '.*?$#i', $hostname))
+ $server_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : getenv('SERVER_NAME');
+
+ // Forcing server vars is the only way to specify/override the protocol
+ if ($config['force_server_vars'] || !$server_name)
+ {
+ $server_name = $config['server_name'];
+ }
+
+ if (preg_match('#^.*?' . preg_quote($server_name, '#') . '.*?$#i', $hostname))
{
$allowed = true;
}
diff --git a/phpBB/includes/acm/acm_file.php b/phpBB/includes/acm/acm_file.php
index c3567e05a4..69b89a4e2d 100644
--- a/phpBB/includes/acm/acm_file.php
+++ b/phpBB/includes/acm/acm_file.php
@@ -37,6 +37,8 @@ class acm
{
return false;
}
+
+ return true;
}
function unload()
diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php
index 688cb4d20f..cbee63aaf7 100644
--- a/phpBB/includes/acp/acp_attachments.php
+++ b/phpBB/includes/acp/acp_attachments.php
@@ -1323,7 +1323,7 @@ class acp_attachments
{
$hostlist_tmp[] = "'" . $row['site_hostname'] . "'";
}
- break;
+ // break;
}
while ($row = $db->sql_fetchrow($result));
diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php
index c81081f685..b4ff8ea854 100644
--- a/phpBB/includes/acp/acp_forums.php
+++ b/phpBB/includes/acp/acp_forums.php
@@ -966,6 +966,8 @@ class acp_forums
add_log('admin', 'LOG_FORUM_EDIT', $forum_data['forum_name']);
}
+
+ return $errors;
}
/**
diff --git a/phpBB/includes/acp/acp_jabber.php b/phpBB/includes/acp/acp_jabber.php
index ae178aca83..c62cede3df 100644
--- a/phpBB/includes/acp/acp_jabber.php
+++ b/phpBB/includes/acp/acp_jabber.php
@@ -36,12 +36,13 @@ class acp_jabber
$this->tpl_name = 'acp_jabber';
$this->page_title = 'ACP_JABBER_SETTINGS';
- $jab_enable = request_var('jab_enable', $config['jab_enable']);
- $jab_host = request_var('jab_host', $config['jab_host']);
- $jab_port = request_var('jab_port', $config['jab_port']);
- $jab_username = request_var('jab_username', $config['jab_username']);
- $jab_password = request_var('jab_password', $config['jab_password']);
- $jab_resource = request_var('jab_resource', $config['jab_resource']);
+ $jab_enable = request_var('jab_enable', $config['jab_enable']);
+ $jab_host = request_var('jab_host', $config['jab_host']);
+ $jab_port = request_var('jab_port', $config['jab_port']);
+ $jab_username = request_var('jab_username', $config['jab_username']);
+ $jab_password = request_var('jab_password', $config['jab_password']);
+ $jab_resource = request_var('jab_resource', $config['jab_resource']);
+ $jab_package_size = request_var('jab_package_size', $config['jab_package_size']);
$jabber = new jabber();
$error = array();
@@ -160,7 +161,8 @@ class acp_jabber
'JAB_PORT' => $new['jab_port'],
'JAB_USERNAME' => $new['jab_username'],
'JAB_PASSWORD' => $new['jab_password'],
- 'JAB_RESOURCE' => $new['jab_resource'])
+ 'JAB_RESOURCE' => $new['jab_resource'],
+ 'JAB_PACKAGE_SIZE' => $new['jab_package_size'])
);
}
}
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index 1a079b8e0d..63e5401203 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -621,6 +621,7 @@ class acp_users
{
$error[] = 'NEW_EMAIL_ERROR';
}
+ $error[] = 'NEW_EMAIL_ERROR';
// Which updates do we need to do?
$update_warning = ($user_row['user_warnings'] != $data['warnings']) ? true : false;
diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php
index 3c1e7babbf..98bdb3bfcc 100644
--- a/phpBB/includes/bbcode.php
+++ b/phpBB/includes/bbcode.php
@@ -50,7 +50,13 @@ class bbcode
if (!$this->bbcode_bitfield)
{
- return $message;
+ // Remove the uid from tags that have not been transformed into HTML
+ if ($this->bbcode_uid)
+ {
+ $message = str_replace(':' . $this->bbcode_uid, '', $message);
+ }
+
+ return;
}
$str = array('search' => array(), 'replace' => array());
diff --git a/phpBB/includes/db/dbal.php b/phpBB/includes/db/dbal.php
index 83e5b1beed..2d8d2e7624 100644
--- a/phpBB/includes/db/dbal.php
+++ b/phpBB/includes/db/dbal.php
@@ -341,7 +341,7 @@ class dbal
if (empty($_GET['explain']))
{
- return;
+ return false;
}
if (!$query && $this->query_hold != '')
@@ -516,6 +516,8 @@ class dbal
break;
}
+
+ return true;
}
}
diff --git a/phpBB/includes/db/postgres.php b/phpBB/includes/db/postgres.php
index 22481267e5..f9c2cd1388 100644
--- a/phpBB/includes/db/postgres.php
+++ b/phpBB/includes/db/postgres.php
@@ -331,6 +331,8 @@ class dbal_postgres extends dbal
unset($this->open_queries[(int) $query_id]);
return @pg_free_result($query_id);
}
+
+ return false;
}
/**
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 604d0d3870..07783b5876 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -1994,7 +1994,7 @@ function add_log()
break;
default:
- return;
+ return false;
}
$db->sql_query('INSERT INTO ' . LOG_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
diff --git a/phpBB/includes/functions_jabber.php b/phpBB/includes/functions_jabber.php
index 00d7a6c5ab..9fd0386511 100644
--- a/phpBB/includes/functions_jabber.php
+++ b/phpBB/includes/functions_jabber.php
@@ -760,7 +760,7 @@ class jabber
function get_info_from_iq_key($packet = NULL)
{
- return (is_array($packet)) ? $packet['iq']['#']['query'][0]['#']['key'][0]['#'] : false;
+ return (is_array($packet) && isset($packet['iq']['#']['query'][0]['#']['key'][0]['#'])) ? $packet['iq']['#']['query'][0]['#']['key'][0]['#'] : false;
}
function get_info_from_iq_error($packet = NULL)
@@ -1020,6 +1020,8 @@ class make_xml extends jabber
return $text;
}
+
+ return false;
}
function _preg_grep_keys($pattern, $array)
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index 50d8ae8fc6..c187bac96a 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -202,7 +202,7 @@ class messenger
if ($break)
{
- return;
+ return true;
}
switch ($method)
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 5d8f1dcb90..9d642457a4 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -178,6 +178,8 @@ function update_post_information($type, $ids, $return_update_sql = false)
WHERE {$type}_id = $update_id";
$db->sql_query($sql);
}
+
+ return;
}
/**
@@ -1263,7 +1265,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
// We do not handle erasing posts here
if ($mode == 'delete')
{
- return;
+ return false;
}
$current_time = time();
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php
index 4b5a43e2c8..ebbb119851 100644
--- a/phpBB/includes/functions_privmsgs.php
+++ b/phpBB/includes/functions_privmsgs.php
@@ -270,7 +270,7 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false)
if (!$user->data['user_new_privmsg'])
{
- return;
+ return 0;
}
$user_new_privmsg = (int) $user->data['user_new_privmsg'];
@@ -709,7 +709,7 @@ function handle_mark_actions($user_id, $mark_action)
if (!sizeof($msg_ids))
{
- return;
+ return false;
}
switch ($mark_action)
@@ -889,6 +889,8 @@ function delete_pm($user_id, $msg_ids, $folder_id)
WHERE msg_id IN (' . $delete_ids . ')';
$db->sql_query($sql);
}
+
+ return true;
}
/**
@@ -1099,7 +1101,7 @@ function submit_pm($mode, $subject, &$data, $update_message, $put_in_outbox = tr
// We do not handle erasing posts here
if ($mode == 'delete')
{
- return;
+ return false;
}
$current_time = time();
diff --git a/phpBB/includes/functions_profile_fields.php b/phpBB/includes/functions_profile_fields.php
index 6bea346ef3..4ab5cf39cb 100644
--- a/phpBB/includes/functions_profile_fields.php
+++ b/phpBB/includes/functions_profile_fields.php
@@ -414,6 +414,10 @@ class custom_profile
return $tpl_fields;
}
+ else
+ {
+ trigger_error('Wrong mode for custom profile', E_USER_ERROR);
+ }
}
/**
diff --git a/phpBB/includes/functions_upload.php b/phpBB/includes/functions_upload.php
index 8b59cfa5c7..678ca2b493 100644
--- a/phpBB/includes/functions_upload.php
+++ b/phpBB/includes/functions_upload.php
@@ -114,16 +114,11 @@ class filespec
function get($property)
{
- if ($this->init_error)
- {
- return;
- }
-
- if (!isset($this->$property))
+ if ($this->init_error || !isset($this->$property))
{
return false;
}
-
+
return $this->$property;
}
@@ -284,6 +279,8 @@ class filespec
$this->file_moved = true;
$this->additional_checks();
unset($this->upload);
+
+ return true;
}
function additional_checks()
@@ -302,13 +299,18 @@ class filespec
$max_filesize = ($this->upload->max_filesize >= 1048576) ? round($this->upload->max_filesize / 1048576 * 100) / 100 : (($this->upload->max_filesize >= 1024) ? round($this->upload->max_filesize / 1024 * 100) / 100 : $this->upload->max_filesize);
$this->error[] = sprintf($user->lang[$this->upload->error_prefix . 'WRONG_FILESIZE'], $max_filesize, $size_lang);
- return;
+
+ return false;
}
if (!$this->upload->valid_dimensions($this))
{
$this->error[] = sprintf($user->lang[$this->upload->error_prefix . 'WRONG_SIZE'], $this->upload->min_width, $this->upload->min_height, $this->upload->max_width, $this->upload->max_height, $this->width, $this->height);
+
+ return false;
}
+
+ return true;
}
}
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index d932ae312b..a012415643 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -20,7 +20,7 @@ function user_get_id_name(&$user_id_ary, &$username_ary)
// are neither array filled?
if ($user_id_ary && $username_ary)
{
- return;
+ return false;
}
else if (!$user_id_ary && !$username_ary)
{
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index 3060d76ed5..c961062ac8 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -823,7 +823,7 @@ class parse_message extends bbcode_firstpass
}
$this->message_status = 'parsed';
- return;
+ return false;
}
// Formatting text for display
@@ -864,7 +864,7 @@ class parse_message extends bbcode_firstpass
}
$this->message_status = 'display';
- return;
+ return false;
}
// Decode message to be placed back into form box
@@ -887,6 +887,7 @@ class parse_message extends bbcode_firstpass
}
$this->message_status = 'plain';
+ return false;
}
// Replace magic urls of form http://xxx.xxx., www.xxx. and xxx@xxx.xxx.
diff --git a/phpBB/includes/search/fulltext_mysql.php b/phpBB/includes/search/fulltext_mysql.php
index 86ee938d66..8b2abde4f5 100644
--- a/phpBB/includes/search/fulltext_mysql.php
+++ b/phpBB/includes/search/fulltext_mysql.php
@@ -648,6 +648,8 @@ class fulltext_mysql extends search_backend
}
$db->sql_query('TRUNCATE TABLE ' . SEARCH_TABLE);
+
+ return false;
}
/**
@@ -679,6 +681,8 @@ class fulltext_mysql extends search_backend
}
$db->sql_query('TRUNCATE TABLE ' . SEARCH_TABLE);
+
+ return false;
}
/**
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php
index 21a3e7f882..7c77a00e3f 100644
--- a/phpBB/includes/session.php
+++ b/phpBB/includes/session.php
@@ -1179,6 +1179,8 @@ class user extends session
$format = substr($format, 0, strpos($format, '|')) . '||' . substr(strrchr($format, '|'), 1);
return str_replace('||', $this->lang['datetime']['YESTERDAY'], strtr(@gmdate($format, $gmepoch + $this->timezone + $this->dst), $lang_dates));
}
+
+ return strtr(@gmdate(str_replace('|', '', $format), $gmepoch + $this->timezone + $this->dst), $lang_dates);
}
function get_iso_lang_id()
diff --git a/phpBB/includes/template.php b/phpBB/includes/template.php
index d8f78a77c1..0a6fb5598d 100644
--- a/phpBB/includes/template.php
+++ b/phpBB/includes/template.php
@@ -483,6 +483,8 @@ class template
$this->_tpldata[$blockname][$key] = array_merge($this->_tpldata[$blockname][$key], $vararray);
return true;
}
+
+ return false;
}
/**
diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php
index 66f98a70c5..9a33405725 100644
--- a/phpBB/includes/ucp/ucp_pm_compose.php
+++ b/phpBB/includes/ucp/ucp_pm_compose.php
@@ -39,8 +39,7 @@ function compose_pm($id, $mode, $action)
$preview = (isset($_POST['preview']));
$save = (isset($_POST['save']));
$load = (isset($_POST['load']));
- $cancel = (isset($_POST['cancel']));
- $confirm = (isset($_POST['confirm']));
+ $cancel = (isset($_POST['cancel']) && !isset($_POST['save']));
$delete = (isset($_POST['delete']));
$remove_u = (isset($_REQUEST['remove_u']));
@@ -362,24 +361,41 @@ function compose_pm($id, $mode, $action)
if ($subject && $message)
{
- $sql = 'INSERT INTO ' . DRAFTS_TABLE . ' ' . $db->sql_build_array('INSERT', array(
- 'user_id' => $user->data['user_id'],
- 'topic_id' => 0,
- 'forum_id' => 0,
- 'save_time' => $current_time,
- 'draft_subject' => $subject,
- 'draft_message' => $message));
- $db->sql_query($sql);
+ if (confirm_box(true))
+ {
+ $sql = 'INSERT INTO ' . DRAFTS_TABLE . ' ' . $db->sql_build_array('INSERT', array(
+ 'user_id' => $user->data['user_id'],
+ 'topic_id' => 0,
+ 'forum_id' => 0,
+ 'save_time' => $current_time,
+ 'draft_subject' => $subject,
+ 'draft_message' => $message));
+ $db->sql_query($sql);
- meta_refresh(3, "ucp.$phpEx$SID&i=pm&mode=$mode");
+ meta_refresh(3, "ucp.$phpEx$SID&i=pm&mode=$mode");
- $message = $user->lang['DRAFT_SAVED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], "<a href=\"ucp.$phpEx$SID&amp;i=pm&amp;mode=$mode\">", '</a>');
+ $message = $user->lang['DRAFT_SAVED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], "<a href=\"ucp.$phpEx$SID&amp;i=pm&amp;mode=$mode\">", '</a>');
- trigger_error($message);
+ trigger_error($message);
+ }
+ else
+ {
+ $s_hidden_fields = build_hidden_fields(array(
+ 'mode' => $mode,
+ 'action' => $action,
+ 'save' => true,
+ 'subject' => $subject,
+ 'message' => $message,
+ 'u' => $to_user_id,
+ 'g' => $to_group_id,
+ 'p' => $msg_id)
+ );
+
+ confirm_box(false, 'SAVE_DRAFT', $s_hidden_fields);
+ }
}
- unset($subject);
- unset($message);
+ unset($subject, $message);
}
// Load Draft
diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php
index b46aff5eba..4e644dffaa 100644
--- a/phpBB/includes/ucp/ucp_pm_viewmessage.php
+++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php
@@ -376,7 +376,7 @@ function get_user_informations($user_id, $user_row)
if (!$user_id)
{
- return;
+ return array();
}
if (empty($user_row))
diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php
index 28757cf3ca..3305ef8729 100644
--- a/phpBB/includes/ucp/ucp_register.php
+++ b/phpBB/includes/ucp/ucp_register.php
@@ -183,12 +183,12 @@ class ucp_register
{
if ($new_password != $password_confirm)
{
- $error[] = 'NEW_PASSWORD_ERROR';
+ $error[] = $user->lang['NEW_PASSWORD_ERROR'];
}
if ($email != $email_confirm)
{
- $error[] = 'NEW_EMAIL_ERROR';
+ $error[] = $user->lang['NEW_EMAIL_ERROR'];
}
}
diff --git a/phpBB/includes/ucp/ucp_resend.php b/phpBB/includes/ucp/ucp_resend.php
index 6809e84892..96278fd35a 100644
--- a/phpBB/includes/ucp/ucp_resend.php
+++ b/phpBB/includes/ucp/ucp_resend.php
@@ -51,6 +51,7 @@ class ucp_resend
{
$email_template = 'coppa_welcome_inactive';
}*/
+/*
if ($config['require_activation'] == USER_ACTIVATION_ADMIN)
{
$email_template = 'admin_welcome_inactive';
@@ -59,6 +60,7 @@ class ucp_resend
{
$email_template = 'user_welcome_inactive';
}
+*/
include_once($phpbb_root_path . 'includes/functions_messenger.'.$phpEx);
diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql
index bb58fe70a3..d9ded29751 100644
--- a/phpBB/install/schemas/schema_data.sql
+++ b/phpBB/install/schemas/schema_data.sql
@@ -106,6 +106,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('ip_check', '4');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_enable', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_host', '');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_password', '');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_package_size', '20');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_port', '5222');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_resource', '');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_username', '');
diff --git a/phpBB/language/en/acp/board.php b/phpBB/language/en/acp/board.php
index 673e057a6e..1b19b4e0ba 100644
--- a/phpBB/language/en/acp/board.php
+++ b/phpBB/language/en/acp/board.php
@@ -32,28 +32,28 @@ if (empty($lang) || !is_array($lang))
$lang = array_merge($lang, array(
'ACP_JABBER_SETTINGS_EXPLAIN' => 'Here you can enable and control the use Jabber for instant messaging and board notices. Jabber is an opensource protocol and therefore available for use by anyone. Some Jabber servers include gateways or transports which allow you to contact users on other networks. Not all servers offer all transports and changes in protocols can prevent transports from operating. Note that it may take several seconds to update Jabber account details, do not stop the script till completed!',
- 'JAB_ENABLE' => 'Enable Jabber',
- 'JAB_ENABLE_EXPLAIN' => 'Enables use of jabber messaging and notifications',
-
- 'JAB_SERVER' => 'Jabber server',
- 'JAB_SERVER_EXPLAIN' => 'See %sjabber.org%s for a list of servers',
- 'JAB_PORT' => 'Jabber port',
- 'JAB_PORT_EXPLAIN' => 'Leave blank unless you know it is not 5222',
- 'JAB_USERNAME' => 'Jabber username',
- 'JAB_USERNAME_EXPLAIN' => 'If this user is not registered it will be created if possible.',
- 'JAB_PASSWORD' => 'Jabber password',
- 'JAB_RESOURCE' => 'Jabber resource',
- 'JAB_RESOURCE_EXPLAIN' => 'The resource locates this particular connection, e.g. board, home, etc.',
-
- 'JAB_PASS_CHANGED' => 'Jabber password changed successfully',
- 'JAB_REGISTERED' => 'New account registered successfully',
- 'JAB_CHANGED' => 'Jabber account changed successfully',
- 'JAB_SETTINGS_CHANGED' => 'Jabber settings changed successfully',
-
- 'ERR_JAB_USERNAME' => 'The username specified already exists, please choose an alternative.',
- 'ERR_JAB_REGISTER' => 'An error occured trying to register this account, %s',
'ERR_JAB_PASSCHG' => 'Could not change password',
'ERR_JAB_PASSFAIL' => 'Password update failed, %s',
+ 'ERR_JAB_REGISTER' => 'An error occured trying to register this account, %s',
+ 'ERR_JAB_USERNAME' => 'The username specified already exists, please choose an alternative.',
+
+ 'JAB_CHANGED' => 'Jabber account changed successfully',
+ 'JAB_ENABLE' => 'Enable Jabber',
+ 'JAB_ENABLE_EXPLAIN' => 'Enables use of jabber messaging and notifications',
+ 'JAB_PACKAGE_SIZE' => 'Jabber Package Size',
+ 'JAB_PACKAGE_SIZE_EXPLAIN' => 'This is the number of messages sent in one package. If set to 0 the message is sent immediatly and gets not queued for later sending.',
+ 'JAB_PASSWORD' => 'Jabber password',
+ 'JAB_PASS_CHANGED' => 'Jabber password changed successfully',
+ 'JAB_PORT' => 'Jabber port',
+ 'JAB_PORT_EXPLAIN' => 'Leave blank unless you know it is not 5222',
+ 'JAB_REGISTERED' => 'New account registered successfully',
+ 'JAB_RESOURCE' => 'Jabber resource',
+ 'JAB_RESOURCE_EXPLAIN' => 'The resource locates this particular connection, e.g. board, home, etc.',
+ 'JAB_SERVER' => 'Jabber server',
+ 'JAB_SERVER_EXPLAIN' => 'See %sjabber.org%s for a list of servers',
+ 'JAB_SETTINGS_CHANGED' => 'Jabber settings changed successfully',
+ 'JAB_USERNAME' => 'Jabber username',
+ 'JAB_USERNAME_EXPLAIN' => 'If this user is not registered it will be created if possible.',
));
// Auth settings
diff --git a/phpBB/language/en/posting.php b/phpBB/language/en/posting.php
index a0586aa1d7..63b4678bef 100644
--- a/phpBB/language/en/posting.php
+++ b/phpBB/language/en/posting.php
@@ -159,6 +159,8 @@ $lang = array_merge($lang, array(
'SAVE' => 'Save',
'SAVE_DATE' => 'Saved at',
+ 'SAVE_DRAFT' => 'Save Draft',
+ 'SAVE_DRAFT_CONFIRM' => 'Please note that saved drafts only include the subject and the message, any other element will be removed. Do you want to save your draft now?',
'SMILIES' => 'Smilies',
'SMILIES_ARE_OFF' => 'Smilies are <u>OFF</u>',
'SMILIES_ARE_ON' => 'Smilies are <u>ON</u>',
diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php
index 7afffcb2af..9d1f1ce2c5 100644
--- a/phpBB/language/en/ucp.php
+++ b/phpBB/language/en/ucp.php
@@ -442,6 +442,7 @@ $lang = array_merge($lang, array(
'WATCHED_FORUMS' => 'Watched Forums',
'WATCHED_TOPICS' => 'Watched Topics',
'WRONG_ACTIVATION' => 'The activation key you supplied does not match any in the database',
+ 'WRONG_DATA_WEBSITE' => 'The website address has to be a valid url, including the protocol. For example http://www.example.com/.',
'YOUR_DETAILS' => 'Your activity',
'YOUR_FOES' => 'Your foes',
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index 3feb7daaa0..17560b2517 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -225,7 +225,7 @@ switch ($mode)
case 'jabber':
$lang = 'JABBER';
$sql_field = 'user_jabber';
- $s_select = (@extension_loaded('xml')) ? 'S_SEND_JABBER' : 'S_NO_SEND_JABBER';
+ $s_select = (@extension_loaded('xml') && $config['jab_enable']) ? 'S_SEND_JABBER' : 'S_NO_SEND_JABBER';
$s_action = "{$phpbb_root_path}memberlist.$phpEx$SID&amp;mode=contact&amp;action=$action&amp;u=$user_id";
break;
@@ -255,16 +255,16 @@ switch ($mode)
break;
case 'jabber':
- if ($submit && @extension_loaded('xml'))
+ if ($submit && @extension_loaded('xml') && $config['jab_enable'])
{
include_once($phpbb_root_path . 'includes/functions_messenger.'.$phpEx);
$subject = sprintf($user->lang['IM_JABBER_SUBJECT'], $user->data['username'], $config['server_name']);
$message = request_var('message', '', true);
- $messenger = new messenger();
+ $messenger = new messenger(false);
- $messenger->template('profile_send_email', $row['user_lang']);
+ $messenger->template('profile_send_im', $row['user_lang']);
$messenger->subject(html_entity_decode($subject));
$messenger->replyto($user->data['user_email']);
@@ -279,7 +279,6 @@ switch ($mode)
);
$messenger->send(NOTIFY_IM);
- $messenger->save_queue();
$s_select = 'S_SENT_JABBER';
}
@@ -1217,11 +1216,12 @@ function show_profile($data)
'POSTS' => ($data['user_posts']) ? $data['user_posts'] : 0,
'WARNINGS' => isset($data['user_warnings']) ? $data['user_warnings'] : 0,
- 'ONLINE_IMG' => ($online) ? $user->img('btn_online', 'ONLINE') : $user->img('btn_offline', 'OFFLINE'),
- 'S_ONLINE' => ($online) ? true : false,
- 'RANK_IMG' => $rank_img,
- 'RANK_IMG_SRC' => $rank_img_src,
- 'ICQ_STATUS_IMG'=> (!empty($data['user_icq'])) ? '<img src="http://web.icq.com/whitepages/online?icq=' . $data['user_icq'] . '&amp;img=5" width="18" height="18" border="0" />' : '',
+ 'ONLINE_IMG' => ($online) ? $user->img('btn_online', 'ONLINE') : $user->img('btn_offline', 'OFFLINE'),
+ 'S_ONLINE' => ($online) ? true : false,
+ 'RANK_IMG' => $rank_img,
+ 'RANK_IMG_SRC' => $rank_img_src,
+ 'ICQ_STATUS_IMG' => (!empty($data['user_icq'])) ? '<img src="http://web.icq.com/whitepages/online?icq=' . $data['user_icq'] . '&amp;img=5" width="18" height="18" border="0" />' : '',
+ 'S_JABBER_ENABLED' => ($config['jab_enable']) ? true : false,
'U_PROFILE' => "{$phpbb_root_path}memberlist.$phpEx$SID&amp;mode=viewprofile&amp;u=$user_id",
'U_SEARCH_USER' => ($auth->acl_get('u_search')) ? "{$phpbb_root_path}search.$phpEx$SID&amp;author=" . urlencode($username) . "&amp;sr=posts" : '',
diff --git a/phpBB/posting.php b/phpBB/posting.php
index ae0ac75e98..ed725e062e 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -37,8 +37,7 @@ $preview = (isset($_POST['preview'])) ? true : false;
$save = (isset($_POST['save'])) ? true : false;
$load = (isset($_POST['load'])) ? true : false;
$delete = (isset($_POST['delete'])) ? true : false;
-$cancel = (isset($_POST['cancel'])) ? true : false;
-$confirm = (isset($_POST['confirm'])) ? true : false;
+$cancel = (isset($_POST['cancel']) && !isset($_POST['save'])) ? true : false;
$refresh = (isset($_POST['add_file']) || isset($_POST['delete_file']) || isset($_POST['edit_comment']) || isset($_POST['cancel_unglobalise']) || $save || $load) ? true : false;
$mode = ($delete && !$preview && !$refresh && $submit) ? 'delete' : request_var('mode', '');
@@ -397,25 +396,42 @@ if ($save && $user->data['is_registered'] && $auth->acl_get('u_savedrafts'))
if ($subject && $message)
{
- $sql = 'INSERT INTO ' . DRAFTS_TABLE . ' ' . $db->sql_build_array('INSERT', array(
- 'user_id' => $user->data['user_id'],
- 'topic_id' => $topic_id,
- 'forum_id' => $forum_id,
- 'save_time' => $current_time,
- 'draft_subject' => $subject,
- 'draft_message' => $message)
- );
- $db->sql_query($sql);
+ if (confirm_box(true))
+ {
+ $sql = 'INSERT INTO ' . DRAFTS_TABLE . ' ' . $db->sql_build_array('INSERT', array(
+ 'user_id' => $user->data['user_id'],
+ 'topic_id' => $topic_id,
+ 'forum_id' => $forum_id,
+ 'save_time' => $current_time,
+ 'draft_subject' => $subject,
+ 'draft_message' => $message)
+ );
+ $db->sql_query($sql);
- $meta_info = ($mode == 'post') ? "{$phpbb_root_path}viewforum.$phpEx$SID&amp;f=$forum_id" : "{$phpbb_root_path}viewtopic.$phpEx$SID&amp;f=$forum_id&amp;t=$topic_id";
+ $meta_info = ($mode == 'post') ? "{$phpbb_root_path}viewforum.$phpEx$SID&amp;f=$forum_id" : "{$phpbb_root_path}viewtopic.$phpEx$SID&amp;f=$forum_id&amp;t=$topic_id";
- meta_refresh(3, $meta_info);
+ meta_refresh(3, $meta_info);
- $message = $user->lang['DRAFT_SAVED'] . '<br /><br />';
- $message .= ($mode != 'post') ? sprintf($user->lang['RETURN_TOPIC'], '<a href="' . $meta_info . '">', '</a>') . '<br /><br />' : '';
- $message .= sprintf($user->lang['RETURN_FORUM'], '<a href="' . $phpbb_root_path . 'viewforum.' . $phpEx . $SID . '&amp;f=' . $forum_id . '">', '</a>');
+ $message = $user->lang['DRAFT_SAVED'] . '<br /><br />';
+ $message .= ($mode != 'post') ? sprintf($user->lang['RETURN_TOPIC'], '<a href="' . $meta_info . '">', '</a>') . '<br /><br />' : '';
+ $message .= sprintf($user->lang['RETURN_FORUM'], '<a href="' . $phpbb_root_path . 'viewforum.' . $phpEx . $SID . '&amp;f=' . $forum_id . '">', '</a>');
- trigger_error($message);
+ trigger_error($message);
+ }
+ else
+ {
+ $s_hidden_fields = build_hidden_fields(array(
+ 'mode' => $mode,
+ 'save' => true,
+ 'f' => $forum_id,
+ 't' => $topic_id,
+ 'subject' => $subject,
+ 'message' => $message,
+ )
+ );
+
+ confirm_box(false, 'SAVE_DRAFT', $s_hidden_fields);
+ }
}
unset($subject, $message);
@@ -618,7 +634,7 @@ if ($submit || $preview || $refresh)
if (($result = validate_username(($mode == 'edit' && $post_data['post_username']) ? $post_data['post_username'] : $post_data['username'])) != false)
{
- $error[] = $result;
+ $error[] = $user->lang[$result];
}
}
diff --git a/phpBB/styles/subSilver/template/memberlist_view.html b/phpBB/styles/subSilver/template/memberlist_view.html
index 4839b42c2a..f0ff2d08dd 100644
--- a/phpBB/styles/subSilver/template/memberlist_view.html
+++ b/phpBB/styles/subSilver/template/memberlist_view.html
@@ -107,7 +107,7 @@
</tr>
<tr>
<td class="gen" nowrap="nowrap" align="right">{L_JABBER}: </td>
- <td><!-- IF U_JABBER --><a href="{U_JABBER}" onclick="popup('{U_JABBER}', 550, 320); return false">{JABBER_IMG}</a><!-- ENDIF --></td>
+ <td><!-- IF U_JABBER and S_JABBER_ENABLED --><a href="{U_JABBER}" onclick="popup('{U_JABBER}', 550, 320); return false">{JABBER_IMG}</a><!-- ELSEIF U_JABBER -->{JABBER_IMG}<!-- ENDIF --></td>
</tr>
</table></td>
<td class="row1"><table cellspacing="1" cellpadding="2" border="0">