правка багов git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@498 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
nanosimbiot 2013-04-10 18:12:05 +00:00
commit c2c05916cd
2 changed files with 11 additions and 12 deletions

View file

@ -440,16 +440,7 @@ if ($view == 'attachments')
WHERE a.attach_id IN (" . implode(', ', $attach_id) . ") " .
$order_by;
}
else if ($search_based)
{
// we are called from search
$attachments = search_attachments($order_by, $total_rows);
}
if (!$search_based)
{
if ( !($result = DB()->sql_query($sql)) )
if ( !($result = DB()->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Couldn\'t query attachments', '', __LINE__, __FILE__, $sql);
}
@ -458,6 +449,11 @@ if ($view == 'attachments')
$num_attach = DB()->num_rows($result);
DB()->sql_freeresult($result);
}
else
{
// we are called from search
$attachments = search_attachments($order_by, $total_rows);
}
if (sizeof($attachments) > 0)
{

View file

@ -311,8 +311,11 @@ foreach ($profile_fields as $field => $can_edit)
{
$errors[] = $err;
}
$pr_data['user_active'] = 0;
$db_data['user_active'] = 0;
if ($bb_cfg['require_activation'] == USER_ACTIVATION_SELF || $bb_cfg['require_activation'] == USER_ACTIVATION_ADMIN)
{
$pr_data['user_active'] = 0;
$db_data['user_active'] = 0;
}
$db_data['user_email'] = $email;
}
}