mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-05 07:07:51 +02:00
Merge revisions:
r8974, r8975, r8976, r8977, r8978, r8979 git-svn-id: file:///svn/phpbb/trunk@8980 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
89f1b88fe1
commit
9d9d61b1a2
@ -1333,18 +1333,21 @@ fieldset.permissions .permissions-switch {
|
||||
fieldset.permissions .padding {
|
||||
}
|
||||
|
||||
.permissions-switch {
|
||||
margin-top: -6px;
|
||||
font-size: .9em;
|
||||
}
|
||||
|
||||
.permissions-switch a {
|
||||
text-decoration: underline;
|
||||
font-size: 0.90em;
|
||||
}
|
||||
|
||||
.permissions-reset {
|
||||
margin-top: -6px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.permissions-reset a {
|
||||
font-size: .8em;
|
||||
font-size: .85em;
|
||||
}
|
||||
|
||||
/* Tabbed menu */
|
||||
|
@ -72,6 +72,13 @@ class acp_icons
|
||||
|
||||
foreach ($imglist as $path => $img_ary)
|
||||
{
|
||||
if (empty($img_ary))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
asort($img_ary, SORT_STRING);
|
||||
|
||||
foreach ($img_ary as $img)
|
||||
{
|
||||
$img_size = getimagesize(PHPBB_ROOT_PATH . $img_path . '/' . $path . $img);
|
||||
@ -98,6 +105,11 @@ class acp_icons
|
||||
}
|
||||
}
|
||||
closedir($dir);
|
||||
|
||||
if (!empty($_paks))
|
||||
{
|
||||
asort($_paks, SORT_STRING);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ if (!defined('IN_PHPBB'))
|
||||
*
|
||||
* Jabber class from Flyspray project
|
||||
*
|
||||
* @version class.jabber2.php 1488 2007-11-25
|
||||
* @version class.jabber2.php 1595 2008-09-19 (0.9.9)
|
||||
* @copyright 2006 Flyspray.org
|
||||
* @author Florian Schmitz (floele)
|
||||
*
|
||||
@ -35,6 +35,7 @@ class jabber
|
||||
private $timeout = 10;
|
||||
|
||||
private $server;
|
||||
private $connect_server;
|
||||
private $port;
|
||||
private $username;
|
||||
private $password;
|
||||
@ -50,9 +51,23 @@ class jabber
|
||||
*/
|
||||
function __construct($server, $port, $username, $password, $use_ssl = false)
|
||||
{
|
||||
$this->server = ($server) ? $server : 'localhost';
|
||||
$this->connect_server = ($server) ? $server : 'localhost';
|
||||
$this->port = ($port) ? $port : 5222;
|
||||
$this->username = $username;
|
||||
|
||||
// Get the server and the username
|
||||
if (strpos($username, '@') === false)
|
||||
{
|
||||
$this->server = $this->connect_server;
|
||||
$this->username = $username;
|
||||
}
|
||||
else
|
||||
{
|
||||
$jid = explode('@', $username, 2);
|
||||
|
||||
$this->username = $jid[0];
|
||||
$this->server = $jid[1];
|
||||
}
|
||||
|
||||
$this->password = $password;
|
||||
$this->use_ssl = ($use_ssl && self::can_use_ssl()) ? true : false;
|
||||
|
||||
@ -123,7 +138,7 @@ class jabber
|
||||
|
||||
$this->session['ssl'] = $this->use_ssl;
|
||||
|
||||
if ($this->open_socket($this->server, $this->port, $this->use_ssl))
|
||||
if ($this->open_socket($this->connect_server, $this->port, $this->use_ssl))
|
||||
{
|
||||
$this->send("<?xml version='1.0' encoding='UTF-8' ?" . ">\n");
|
||||
$this->send("<stream:stream to='{$this->server}' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>\n");
|
||||
@ -499,14 +514,7 @@ class jabber
|
||||
}
|
||||
|
||||
// better generate a cnonce, maybe it's needed
|
||||
$str = '';
|
||||
mt_srand((double)microtime()*10000000);
|
||||
|
||||
for ($i = 0; $i < 32; $i++)
|
||||
{
|
||||
$str .= chr(mt_rand(0, 255));
|
||||
}
|
||||
$decoded['cnonce'] = base64_encode($str);
|
||||
$decoded['cnonce'] = base64_encode(md5(uniqid(mt_rand(), true)));
|
||||
|
||||
// second challenge?
|
||||
if (isset($decoded['rspauth']))
|
||||
|
@ -763,20 +763,20 @@ function posting_gen_inline_attachments(&$attachment_data)
|
||||
/**
|
||||
* Generate inline attachment entry
|
||||
*/
|
||||
function posting_gen_attachment_entry($attachment_data, &$filename_data)
|
||||
function posting_gen_attachment_entry($attachment_data, &$filename_data, $show_attach_box = true)
|
||||
{
|
||||
global $template, $config, $user;
|
||||
global $template, $config, $user, $auth;
|
||||
|
||||
// Some default template variables
|
||||
$template->assign_vars(array(
|
||||
'S_SHOW_ATTACH_BOX' => true)
|
||||
);
|
||||
'S_SHOW_ATTACH_BOX' => $show_attach_box,
|
||||
'S_HAS_ATTACHMENTS' => sizeof($attachment_data),
|
||||
'FILESIZE' => $config['max_filesize'],
|
||||
'FILE_COMMENT' => (isset($filename_data['filecomment'])) ? $filename_data['filecomment'] : '',
|
||||
));
|
||||
|
||||
if (sizeof($attachment_data))
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_HAS_ATTACHMENTS' => true)
|
||||
);
|
||||
|
||||
// We display the posted attachments within the desired order.
|
||||
($config['display_order']) ? krsort($attachment_data) : ksort($attachment_data);
|
||||
|
||||
@ -806,11 +806,6 @@ function posting_gen_attachment_entry($attachment_data, &$filename_data)
|
||||
}
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'FILE_COMMENT' => $filename_data['filecomment'],
|
||||
'FILESIZE' => $config['max_filesize'])
|
||||
);
|
||||
|
||||
return sizeof($attachment_data);
|
||||
}
|
||||
|
||||
|
@ -1035,11 +1035,11 @@ function compose_pm($id, $mode, $action)
|
||||
// Build custom bbcodes array
|
||||
display_custom_bbcodes();
|
||||
|
||||
// Show attachment box for adding attachments if true
|
||||
$allowed = ($auth->acl_get('u_pm_attach') && $config['allow_pm_attach'] && $form_enctype);
|
||||
|
||||
// Attachment entry
|
||||
if ($auth->acl_get('u_pm_attach') && $config['allow_pm_attach'] && $form_enctype)
|
||||
{
|
||||
posting_gen_attachment_entry($attachment_data, $filename_data);
|
||||
}
|
||||
posting_gen_attachment_entry($attachment_data, $filename_data, $allowed);
|
||||
|
||||
// Message History
|
||||
if ($action == 'reply' || $action == 'quote' || $action == 'forward')
|
||||
|
@ -35,7 +35,7 @@ class ucp_remind
|
||||
|
||||
if ($submit)
|
||||
{
|
||||
$sql = 'SELECT user_id, username, user_email, user_jabber, user_notify_type, user_type, user_lang, user_inactive_reason
|
||||
$sql = 'SELECT user_id, username, user_permissions, user_email, user_jabber, user_notify_type, user_type, user_lang, user_inactive_reason
|
||||
FROM ' . USERS_TABLE . "
|
||||
WHERE user_email = '" . $db->sql_escape($email) . "'
|
||||
AND username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'";
|
||||
@ -65,6 +65,15 @@ class ucp_remind
|
||||
}
|
||||
}
|
||||
|
||||
// Check users permissions
|
||||
$auth2 = new auth();
|
||||
$auth2->acl($user_row);
|
||||
|
||||
if (!$auth2->acl_get('u_chgpasswd'))
|
||||
{
|
||||
trigger_error('NO_AUTH_PASSWORD_REMINDER');
|
||||
}
|
||||
|
||||
$server_url = generate_board_url();
|
||||
|
||||
$key_len = 54 - strlen($server_url);
|
||||
|
@ -470,8 +470,8 @@ $lang = array_merge($lang, array(
|
||||
'JAB_SETTINGS_CHANGED' => 'Jabber settings changed successfully.',
|
||||
'JAB_USE_SSL' => 'Use SSL to connect',
|
||||
'JAB_USE_SSL_EXPLAIN' => 'If enabled a secure connection is tried to be established. The Jabber port will be modified to 5223 if port 5222 is specified.',
|
||||
'JAB_USERNAME' => 'Jabber username',
|
||||
'JAB_USERNAME_EXPLAIN' => 'Specify a registered username. The username will not be checked for validity.',
|
||||
'JAB_USERNAME' => 'Jabber username or JID',
|
||||
'JAB_USERNAME_EXPLAIN' => 'Specify a registered username or a valid JID. The username will not be checked for validity. If you only specify a username, then your JID will be the username and the server you specified above. Else, specify a valid JID, for example user@jabber.org.',
|
||||
));
|
||||
|
||||
?>
|
@ -215,7 +215,7 @@ $lang = array_merge($lang, array(
|
||||
<li>Oracle</li>
|
||||
<li>IBM DB2</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<p>Only those databases supported on your server will be displayed.',
|
||||
'INSTALL_INTRO_NEXT' => 'To commence the installation, please press the button below.',
|
||||
'INSTALL_LOGIN' => 'Login',
|
||||
@ -283,7 +283,7 @@ $lang = array_merge($lang, array(
|
||||
'NO_LOCATION' => 'Cannot determine location. If you know Imagemagick is installed, you may specify the location later within your administration control panel',
|
||||
'NO_TABLES_FOUND' => 'No tables found.',
|
||||
|
||||
'OVERVIEW_BODY' => 'Welcome to phpBB3!<br /><br />phpBB™ is the most widely used open source bulletin board solution in the world. phpBB3 is the latest installment in a seven year long package lineup. Like its predecessors, phpBB3 is feature-rich, user-friendly, and fully supported by the phpBB Team. phpBB3 greatly improves on what made phpBB2 popular, and adds commonly requested features that were not present in previous versions. We hope it exceeds your expectations.<br /><br />This installation system will guide you through installing phpBB3, updating to the latest version of phpBB3 from past releases, as well as converting to phpBB3 from a different discussion board system (including phpBB2). For more information, we encourage you to read <a href="../docs/INSTALL.html">the installation guide</a>.<br /><br />To read the phpBB3 license or learn about obtaining support and our stance on it, please select the respective options from the side menu. To continue, please select the appropriate tab above.',
|
||||
'OVERVIEW_BODY' => 'Welcome to phpBB3!<br /><br />phpBB™ is the most widely used open source bulletin board solution in the world. phpBB3 is the latest installment in a package line started in 2000. Like its predecessors, phpBB3 is feature-rich, user-friendly, and fully supported by the phpBB Team. phpBB3 greatly improves on what made phpBB2 popular, and adds commonly requested features that were not present in previous versions. We hope it exceeds your expectations.<br /><br />This installation system will guide you through installing phpBB3, updating to the latest version of phpBB3 from past releases, as well as converting to phpBB3 from a different discussion board system (including phpBB2). For more information, we encourage you to read <a href="../docs/INSTALL.html">the installation guide</a>.<br /><br />To read the phpBB3 license or learn about obtaining support and our stance on it, please select the respective options from the side menu. To continue, please select the appropriate tab above.',
|
||||
|
||||
'PCRE_UTF_SUPPORT' => 'PCRE UTF-8 support',
|
||||
'PCRE_UTF_SUPPORT_EXPLAIN' => 'phpBB will <strong>not</strong> run if your PHP installation is not compiled with UTF-8 support in the PCRE extension.',
|
||||
|
@ -288,6 +288,7 @@ $lang = array_merge($lang, array(
|
||||
'NO_AUTH_EDIT_MESSAGE' => 'You are not authorised to edit private messages.',
|
||||
'NO_AUTH_FORWARD_MESSAGE' => 'You are not authorised to forward private messages.',
|
||||
'NO_AUTH_GROUP_MESSAGE' => 'You are not authorised to send private messages to groups.',
|
||||
'NO_AUTH_PASSWORD_REMINDER' => 'You are not authorised to request a new password.',
|
||||
'NO_AUTH_READ_HOLD_MESSAGE' => 'You are not authorised to read private messages that are on hold.',
|
||||
'NO_AUTH_READ_MESSAGE' => 'You are not authorised to read private messages.',
|
||||
'NO_AUTH_READ_REMOVED_MESSAGE' => 'You are not able to read this message because it was removed by the author.',
|
||||
|
@ -1326,12 +1326,11 @@ if (($mode == 'post' || ($mode == 'edit' && $post_id == $post_data['topic_first_
|
||||
);
|
||||
}
|
||||
|
||||
// Show attachment box for adding attachments if true
|
||||
$allowed = ($auth->acl_get('f_attach', $forum_id) && $auth->acl_get('u_attach') && $config['allow_attachments'] && $form_enctype);
|
||||
|
||||
// Attachment entry
|
||||
// Not using acl_gets here, because it is using OR logic
|
||||
if ($auth->acl_get('f_attach', $forum_id) && $auth->acl_get('u_attach') && $config['allow_attachments'] && $form_enctype)
|
||||
{
|
||||
posting_gen_attachment_entry($attachment_data, $filename_data);
|
||||
}
|
||||
posting_gen_attachment_entry($attachment_data, $filename_data, $allowed);
|
||||
|
||||
// Output page ...
|
||||
page_header($page_title);
|
||||
|
Loading…
x
Reference in New Issue
Block a user