|
13.04.2006, 21:41
Открываем includes/usercp_avatar.php
Находим (103):
PHP код:
if ( !preg_match('#^(http)|(ftp):\/\/#i', $avatar_filename) ) { $avatar_filename = 'http://' . $avatar_filename; }
Ниже добавляем:
PHP код:
$avatar_filename = substr($avatar_filename, 0, 100);
Открываем includes/usercp_register.php
Находим (135):
PHP код:
$signature = str_replace('<br />', "\n", $signature);
Заменяем на:
PHP код:
$signature = (isset($signature)) ? str_replace('<br />', "\n", $signature) : ''; $signature_bbcode_uid = '';
Находим и удаляем (298):
PHP код:
// Only compare one char if the zlib-extension is not loaded if (!@extension_loaded('zlib')) { $row['code'] = substr($row['code'], -1); }
Находим (519):
PHP код:
if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not update users table', '', __LINE__, __FILE__, $sql); }
Ниже добавляем:
PHP код:
// We remove all stored login keys since the password has been updated // and change the current one (if applicable) if ( !empty($passwd_sql) ) { session_reset_keys($user_id, $user_ip); }
Находим (788):
PHP код:
// // If an error occured we need to stripslashes on returned data // $username = stripslashes($username); $email = stripslashes($email);
Ниже добавляем:
Находим (813):
PHP код:
else if ( $mode == 'editprofile' && !isset($HTTP_POST_VARS['avatargallery']) && !isset($HTTP_POST_VARS['submitavatar']) && !isset($HTTP_POST_VARS['cancelavatar']) ) { $user_id = $userdata['user_id']; $username = $userdata['username']; $email = $userdata['user_email'];
Ниже добавляем:
Находим (1011):
PHP код:
$confirm_chars = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '1', '2', '3', '4', '5', '6', '7', '8', '9'); list($usec, $sec) = explode(' ', microtime()); mt_srand($sec * $usec); $max_chars = count($confirm_chars) - 1; $code = ''; for ($i = 0; $i < 6; $i++) { $code .= $confirm_chars[mt_rand(0, $max_chars)]; }
Заменяем на:
PHP код:
// Generate the required confirmation code // NB 0 (zero) could get confused with O (the letter) so we make change it $code = dss_rand(); $code = strtoupper(str_replace('0', 'o', substr($code, 6)));
Находим (1042):
PHP код:
'USERNAME' => $username, 'CUR_PASSWORD' => $cur_password, 'NEW_PASSWORD' => $new_password, 'PASSWORD_CONFIRM' => $password_confirm, 'EMAIL' => $email,
Заменяем на:
PHP код:
'USERNAME' => isset($username) ? $username : '', 'CUR_PASSWORD' => isset($cur_password) ? $cur_password : '', 'NEW_PASSWORD' => isset($new_password) ? $new_password : '', 'PASSWORD_CONFIRM' => isset($password_confirm) ? $password_confirm : '', 'EMAIL' => isset($email) ? $email : '',
Открываем modules/Forums/index.php
Находим (133):
PHP код:
while( $category_rows[] = $db->sql_fetchrow($result) );
Заменяем на:
PHP код:
while ($row = $db->sql_fetchrow($result)) { $category_rows[] = $row; }
Находим (318):
PHP код:
// Okay, let's build the index // for($i = 0; $i < $total_categories; $i++) { $cat_id = $category_rows[$i]['cat_id']; // // Should we display this category/forum set? // $display_forums = false; for($j = 0; $j < $total_forums; $j++) { if ( $is_auth_ary[$forum_data[$j]['forum_id']]['auth_view'] && $forum_data[$j]['cat_id'] == $cat_id ) { $display_forums = true; } } // // Yes, we should, so first dump out the category // title, then, if appropriate the forum list // if ( $display_forums )
Заменяем на:
PHP код:
// Let's decide which categories we should display // $display_categories = array(); for ($i = 0; $i < $total_forums; $i++ ) { if ($is_auth_ary[$forum_data[$i]['forum_id']]['auth_view']) { $display_categories[$forum_data[$i]['cat_id']] = true; } } // // Okay, let's build the index // for($i = 0; $i < $total_categories; $i++) { $cat_id = $category_rows[$i]['cat_id']; // // Yes, we should, so first dump out the category // title, then, if appropriate the forum list // if (isset($display_categories[$cat_id]) && $display_categories[$cat_id])
|
|