mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
merge r8970 and r8971
git-svn-id: file:///svn/phpbb/trunk@8972 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
9a7804cb71
commit
89f1b88fe1
4 changed files with 35 additions and 25 deletions
|
@ -197,7 +197,7 @@
|
||||||
<a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> • <span>{PAGINATION}</span>
|
<a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> • <span>{PAGINATION}</span>
|
||||||
</div>
|
</div>
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
|
|
||||||
<fieldset class="quick">
|
<fieldset class="quick">
|
||||||
<input class="button2" type="submit" name="delmarked" value="{L_DELETE_MARKED}" />
|
<input class="button2" type="submit" name="delmarked" value="{L_DELETE_MARKED}" />
|
||||||
<p class="small"><a href="#" onclick="marklist('user_attachments', 'mark', true);">{L_MARK_ALL}</a> • <a href="#" onclick="marklist('user_attachments', 'mark', false);">{L_UNMARK_ALL}</a></p>
|
<p class="small"><a href="#" onclick="marklist('user_attachments', 'mark', true);">{L_MARK_ALL}</a> • <a href="#" onclick="marklist('user_attachments', 'mark', false);">{L_UNMARK_ALL}</a></p>
|
||||||
|
@ -215,7 +215,7 @@
|
||||||
<form id="select_forum" method="post" action="{U_ACTION}">
|
<form id="select_forum" method="post" action="{U_ACTION}">
|
||||||
|
|
||||||
<fieldset class="quick" style="text-align: left;">
|
<fieldset class="quick" style="text-align: left;">
|
||||||
{L_SELECT_FORUM}: <select name="f">{S_FORUM_OPTIONS}</select>
|
{L_SELECT_FORUM}: <select name="f">{S_FORUM_OPTIONS}</select>
|
||||||
<input class="button2" type="submit" value="{L_GO}" name="select" />
|
<input class="button2" type="submit" value="{L_GO}" name="select" />
|
||||||
{S_FORM_TOKEN}
|
{S_FORM_TOKEN}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
|
@ -49,47 +49,57 @@ function gen_sort_selects(&$limit_days, &$sort_by_text, &$sort_days, &$sort_key,
|
||||||
|
|
||||||
$sorts = array(
|
$sorts = array(
|
||||||
'st' => array(
|
'st' => array(
|
||||||
'selected' => $sort_days,
|
'key' => 'sort_days',
|
||||||
'default' => $def_st,
|
'default' => $def_st,
|
||||||
'options' => $limit_days,
|
'options' => $limit_days,
|
||||||
'output' => &$s_limit_days,),
|
'output' => &$s_limit_days,
|
||||||
|
),
|
||||||
|
|
||||||
'sk' => array(
|
'sk' => array(
|
||||||
'selected' => $sort_key,
|
'key' => 'sort_key',
|
||||||
'default' => $def_sk,
|
'default' => $def_sk,
|
||||||
'options' => $sort_by_text,
|
'options' => $sort_by_text,
|
||||||
'output' => &$s_sort_key,),
|
'output' => &$s_sort_key,
|
||||||
|
),
|
||||||
|
|
||||||
'sd' => array(
|
'sd' => array(
|
||||||
'selected' => $sort_dir,
|
'key' => 'sort_dir',
|
||||||
'default' => $def_sd,
|
'default' => $def_sd,
|
||||||
'options' => $sort_dir_text,
|
'options' => $sort_dir_text,
|
||||||
'output' => &$s_sort_dir,),
|
'output' => &$s_sort_dir,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
$u_sort_param = '';
|
$u_sort_param = '';
|
||||||
|
|
||||||
foreach ($sorts as $name => $sort_ary)
|
foreach ($sorts as $name => $sort_ary)
|
||||||
{
|
{
|
||||||
|
$key = $sort_ary['key'];
|
||||||
|
$selected = $$sort_ary['key'];
|
||||||
|
|
||||||
// Check if the key is selectable. If not, we reset to the default or first key found.
|
// Check if the key is selectable. If not, we reset to the default or first key found.
|
||||||
// This ensures the values are always valid.
|
// This ensures the values are always valid. We also set $sort_dir/sort_key/etc. to the
|
||||||
if (!isset($sort_ary['options'][$sort_ary['selected']]))
|
// correct value, else the protection is void. ;)
|
||||||
|
if (!isset($sort_ary['options'][$selected]))
|
||||||
{
|
{
|
||||||
if ($sort_ary['default'] !== false)
|
if ($sort_ary['default'] !== false)
|
||||||
{
|
{
|
||||||
$sort_ary['selected'] = $sort_ary['default'];
|
$selected = $$key = $sort_ary['default'];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@reset($sort_ary['options']);
|
@reset($sort_ary['options']);
|
||||||
$sort_ary['selected'] = key($sort_ary['options']);
|
$selected = $$key = key($sort_ary['options']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$sort_ary['output'] = '<select name="' . $name . '" id="' . $name . '">';
|
$sort_ary['output'] = '<select name="' . $name . '" id="' . $name . '">';
|
||||||
foreach ($sort_ary['options'] as $option => $text)
|
foreach ($sort_ary['options'] as $option => $text)
|
||||||
{
|
{
|
||||||
$selected = ($sort_ary['selected']== $option) ? ' selected="selected"' : '';
|
$sort_ary['output'] .= '<option value="' . $option . '"' . (($selected == $option) ? ' selected="selected"' : '') . '>' . $text . '</option>';
|
||||||
$sort_ary['output'] .= '<option value="' . $option . '"' . $selected . '>' . $text . '</option>';
|
|
||||||
}
|
}
|
||||||
$sort_ary['output'] .= '</select>';
|
$sort_ary['output'] .= '</select>';
|
||||||
$u_sort_param .= ($sort_ary['selected'] !== $sort_ary['default']) ? ((strlen($u_sort_param)) ? '&' : '') . "{$name}={$sort_ary['selected']}" : '';
|
|
||||||
|
$u_sort_param .= ($selected !== $sort_ary['default']) ? ((strlen($u_sort_param)) ? '&' : '') . "{$name}={$selected}" : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -681,14 +681,14 @@ class queue
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!sizeof($this->queue_data))
|
if (!sizeof($this->queue_data))
|
||||||
{
|
{
|
||||||
@unlink($this->cache_file);
|
@unlink($this->cache_file);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ($fp = @fopen($this->cache_file, 'w'))
|
if ($fp = @fopen($this->cache_file, 'wb'))
|
||||||
{
|
{
|
||||||
@flock($fp, LOCK_EX);
|
@flock($fp, LOCK_EX);
|
||||||
fwrite($fp, "<?php\n\$this->queue_data = " . var_export($this->queue_data, true) . ";\n?>");
|
fwrite($fp, "<?php\n\$this->queue_data = " . var_export($this->queue_data, true) . ";\n?>");
|
||||||
|
@ -711,11 +711,11 @@ class queue
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (file_exists($this->cache_file))
|
if (file_exists($this->cache_file))
|
||||||
{
|
{
|
||||||
include($this->cache_file);
|
include($this->cache_file);
|
||||||
|
|
||||||
foreach ($this->queue_data as $object => $data_ary)
|
foreach ($this->queue_data as $object => $data_ary)
|
||||||
{
|
{
|
||||||
if (isset($this->data[$object]) && sizeof($this->data[$object]))
|
if (isset($this->data[$object]) && sizeof($this->data[$object]))
|
||||||
|
@ -1045,7 +1045,7 @@ class smtp_class
|
||||||
$err_msg .= $message;
|
$err_msg .= $message;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Log into server and get possible auth codes if neccessary
|
* Log into server and get possible auth codes if neccessary
|
||||||
*/
|
*/
|
||||||
|
@ -1106,7 +1106,7 @@ class smtp_class
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If EHLO fails, we try HELO
|
// If EHLO fails, we try HELO
|
||||||
$this->server_send("HELO {$local_host}");
|
$this->server_send("HELO {$local_host}");
|
||||||
if ($err_msg = $this->server_parse('250', __LINE__))
|
if ($err_msg = $this->server_parse('250', __LINE__))
|
||||||
{
|
{
|
||||||
|
@ -1127,7 +1127,7 @@ class smtp_class
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($this->commands['AUTH']))
|
if (!isset($this->commands['AUTH']))
|
||||||
{
|
{
|
||||||
return (isset($user->lang['SMTP_NO_AUTH_SUPPORT'])) ? $user->lang['SMTP_NO_AUTH_SUPPORT'] : 'SMTP server does not support authentication';
|
return (isset($user->lang['SMTP_NO_AUTH_SUPPORT'])) ? $user->lang['SMTP_NO_AUTH_SUPPORT'] : 'SMTP server does not support authentication';
|
||||||
|
@ -1288,7 +1288,7 @@ class smtp_class
|
||||||
}
|
}
|
||||||
|
|
||||||
$md5_challenge = base64_decode($this->responses[0]);
|
$md5_challenge = base64_decode($this->responses[0]);
|
||||||
|
|
||||||
// Parse the md5 challenge - from AUTH_SASL (PEAR)
|
// Parse the md5 challenge - from AUTH_SASL (PEAR)
|
||||||
$tokens = array();
|
$tokens = array();
|
||||||
while (preg_match('/^([a-z-]+)=("[^"]+(?<!\\\)"|[^,]+)/i', $md5_challenge, $matches))
|
while (preg_match('/^([a-z-]+)=("[^"]+(?<!\\\)"|[^,]+)/i', $md5_challenge, $matches))
|
||||||
|
|
|
@ -181,7 +181,7 @@ $sql_array = array(
|
||||||
'FROM' => array(FORUMS_TABLE => 'f'),
|
'FROM' => array(FORUMS_TABLE => 'f'),
|
||||||
);
|
);
|
||||||
|
|
||||||
// The FROM-Order is quite important here, else t.* columns can not be correctly bound.
|
// The FROM-Order is quite important here, else t.* columns can not be correctly bound.
|
||||||
if ($post_id)
|
if ($post_id)
|
||||||
{
|
{
|
||||||
$sql_array['FROM'][POSTS_TABLE] = 'p';
|
$sql_array['FROM'][POSTS_TABLE] = 'p';
|
||||||
|
|
Loading…
Add table
Reference in a new issue