mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
- make sure the copyright/disclaimer is consistent
- two fixes... git-svn-id: file:///svn/phpbb/trunk@8061 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -1957,8 +1957,8 @@ function meta_refresh($time, $url)
|
||||
* @param boolean $check True for checking if confirmed (without any additional parameters) and false for displaying the confirm box
|
||||
* @param string $title Title/Message used for confirm box.
|
||||
* message text is _CONFIRM appended to title.
|
||||
* If title can not be found in user->lang a default one is displayed
|
||||
* If title_CONFIRM can not be found in user->lang the text given is used.
|
||||
* If title cannot be found in user->lang a default one is displayed
|
||||
* If title_CONFIRM cannot be found in user->lang the text given is used.
|
||||
* @param string $hidden Hidden variables
|
||||
* @param string $html_body Template used for confirm box
|
||||
* @param string $u_action Custom form action
|
||||
|
@@ -778,7 +778,7 @@ function move_pm($user_id, $message_limit, $move_msg_ids, $dest_folder, $cur_fol
|
||||
trigger_error('NOT_AUTHORISED');
|
||||
}
|
||||
|
||||
if ($row['pm_count'] + sizeof($move_msg_ids) > $message_limit)
|
||||
if ($message_limit && $row['pm_count'] + sizeof($move_msg_ids) > $message_limit)
|
||||
{
|
||||
$message = sprintf($user->lang['NOT_ENOUGH_SPACE_FOLDER'], $row['folder_name']) . '<br /><br />';
|
||||
$message .= sprintf($user->lang['CLICK_RETURN_FOLDER'], '<a href="' . append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&folder=' . $row['folder_id']) . '">', '</a>', $row['folder_name']);
|
||||
@@ -795,7 +795,7 @@ function move_pm($user_id, $message_limit, $move_msg_ids, $dest_folder, $cur_fol
|
||||
$num_messages = (int) $db->sql_fetchfield('num_messages');
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if ($num_messages + sizeof($move_msg_ids) > $message_limit)
|
||||
if ($message_limit && $num_messages + sizeof($move_msg_ids) > $message_limit)
|
||||
{
|
||||
$message = sprintf($user->lang['NOT_ENOUGH_SPACE_FOLDER'], $user->lang['PM_INBOX']) . '<br /><br />';
|
||||
$message .= sprintf($user->lang['CLICK_RETURN_FOLDER'], '<a href="' . append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&folder=inbox') . '">', '</a>', $user->lang['PM_INBOX']);
|
||||
@@ -1281,9 +1281,9 @@ function get_folder_status($folder_id, $folder)
|
||||
$return = array(
|
||||
'folder_name' => $folder['folder_name'],
|
||||
'cur' => $folder['num_messages'],
|
||||
'remaining' => $user->data['message_limit'] - $folder['num_messages'],
|
||||
'remaining' => ($user->data['message_limit']) ? $user->data['message_limit'] - $folder['num_messages'] : 0,
|
||||
'max' => $user->data['message_limit'],
|
||||
'percent' => ($user->data['message_limit'] > 0) ? round(($folder['num_messages'] / $user->data['message_limit']) * 100) : 100,
|
||||
'percent' => ($user->data['message_limit']) ? (($user->data['message_limit'] > 0) ? round(($folder['num_messages'] / $user->data['message_limit']) * 100) : 100) : 0,
|
||||
);
|
||||
|
||||
$return['message'] = sprintf($user->lang['FOLDER_STATUS_MSG'], $return['percent'], $return['cur'], $return['max']);
|
||||
|
@@ -427,7 +427,7 @@ class ucp_register
|
||||
$str = '';
|
||||
if (!$change_lang)
|
||||
{
|
||||
$sql = 'SELECT c.confirm_id
|
||||
$sql = 'SELECT c.session_id
|
||||
FROM ' . CONFIRM_TABLE . ' c
|
||||
LEFT JOIN ' . SESSIONS_TABLE . ' s ON (c.session_id = s.session_id)
|
||||
WHERE s.session_id IS NULL';
|
||||
@@ -438,14 +438,14 @@ class ucp_register
|
||||
$sql_in = array();
|
||||
do
|
||||
{
|
||||
$sql_in[] = (string) $row['confirm_id'];
|
||||
$sql_in[(string) $row['session_id']] = 1;
|
||||
}
|
||||
while ($row = $db->sql_fetchrow($result));
|
||||
|
||||
if (sizeof($sql_in))
|
||||
{
|
||||
$sql = 'DELETE FROM ' . CONFIRM_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('confirm_id', $sql_in) . '
|
||||
WHERE ' . $db->sql_in_set('session_id', array_keys($sql_in)) . '
|
||||
AND confirm_type = ' . CONFIRM_REG;
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
Reference in New Issue
Block a user