1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-05 15:16:16 +02:00

merge r8970 and r8971

git-svn-id: file:///svn/phpbb/trunk@8972 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen 2008-10-06 05:52:49 +00:00
parent 9a7804cb71
commit 89f1b88fe1
4 changed files with 35 additions and 25 deletions

View File

@ -197,7 +197,7 @@
<a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{S_ON_PAGE}</a> &bull; <span>{PAGINATION}</span>
</div>
<!-- ENDIF -->
<fieldset class="quick">
<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> &bull; <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}">
<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" />
{S_FORM_TOKEN}
</fieldset>

View File

@ -49,47 +49,57 @@ function gen_sort_selects(&$limit_days, &$sort_by_text, &$sort_days, &$sort_key,
$sorts = array(
'st' => array(
'selected' => $sort_days,
'key' => 'sort_days',
'default' => $def_st,
'options' => $limit_days,
'output' => &$s_limit_days,),
'output' => &$s_limit_days,
),
'sk' => array(
'selected' => $sort_key,
'key' => 'sort_key',
'default' => $def_sk,
'options' => $sort_by_text,
'output' => &$s_sort_key,),
'output' => &$s_sort_key,
),
'sd' => array(
'selected' => $sort_dir,
'key' => 'sort_dir',
'default' => $def_sd,
'options' => $sort_dir_text,
'output' => &$s_sort_dir,),
'output' => &$s_sort_dir,
),
);
$u_sort_param = '';
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.
// This ensures the values are always valid.
if (!isset($sort_ary['options'][$sort_ary['selected']]))
// This ensures the values are always valid. We also set $sort_dir/sort_key/etc. to the
// correct value, else the protection is void. ;)
if (!isset($sort_ary['options'][$selected]))
{
if ($sort_ary['default'] !== false)
{
$sort_ary['selected'] = $sort_ary['default'];
$selected = $$key = $sort_ary['default'];
}
else
{
@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 . '">';
foreach ($sort_ary['options'] as $option => $text)
{
$selected = ($sort_ary['selected']== $option) ? ' selected="selected"' : '';
$sort_ary['output'] .= '<option value="' . $option . '"' . $selected . '>' . $text . '</option>';
$sort_ary['output'] .= '<option value="' . $option . '"' . (($selected == $option) ? ' selected="selected"' : '') . '>' . $text . '</option>';
}
$sort_ary['output'] .= '</select>';
$u_sort_param .= ($sort_ary['selected'] !== $sort_ary['default']) ? ((strlen($u_sort_param)) ? '&amp;' : '') . "{$name}={$sort_ary['selected']}" : '';
$u_sort_param .= ($selected !== $sort_ary['default']) ? ((strlen($u_sort_param)) ? '&amp;' : '') . "{$name}={$selected}" : '';
}
return;

View File

@ -681,14 +681,14 @@ class queue
break;
}
}
if (!sizeof($this->queue_data))
{
@unlink($this->cache_file);
}
else
{
if ($fp = @fopen($this->cache_file, 'w'))
if ($fp = @fopen($this->cache_file, 'wb'))
{
@flock($fp, LOCK_EX);
fwrite($fp, "<?php\n\$this->queue_data = " . var_export($this->queue_data, true) . ";\n?>");
@ -711,11 +711,11 @@ class queue
{
return;
}
if (file_exists($this->cache_file))
{
include($this->cache_file);
foreach ($this->queue_data as $object => $data_ary)
{
if (isset($this->data[$object]) && sizeof($this->data[$object]))
@ -1045,7 +1045,7 @@ class smtp_class
$err_msg .= $message;
}
}
/**
* Log into server and get possible auth codes if neccessary
*/
@ -1106,7 +1106,7 @@ class smtp_class
return false;
}
// If EHLO fails, we try HELO
// If EHLO fails, we try HELO
$this->server_send("HELO {$local_host}");
if ($err_msg = $this->server_parse('250', __LINE__))
{
@ -1127,7 +1127,7 @@ class smtp_class
{
return false;
}
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';
@ -1288,7 +1288,7 @@ class smtp_class
}
$md5_challenge = base64_decode($this->responses[0]);
// Parse the md5 challenge - from AUTH_SASL (PEAR)
$tokens = array();
while (preg_match('/^([a-z-]+)=("[^"]+(?<!\\\)"|[^,]+)/i', $md5_challenge, $matches))

View File

@ -181,7 +181,7 @@ $sql_array = array(
'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)
{
$sql_array['FROM'][POSTS_TABLE] = 'p';