diff --git a/upload/ajax/change_tor_status.php b/upload/ajax/change_tor_status.php index 16bf26216..fe1dcfd43 100644 --- a/upload/ajax/change_tor_status.php +++ b/upload/ajax/change_tor_status.php @@ -10,7 +10,7 @@ if (!isset($this->request['attach_id'])) } if (!isset($this->request['status'])) { - $this->ajax_die('empty tor_status'); + $this->ajax_die('не выбран статус'); } $attach_id = (int) $this->request['attach_id']; $new_status = (int) $this->request['status']; @@ -72,4 +72,4 @@ if ($tor['tor_status'] != TOR_NOT_APPROVED && $tor['checked_user_id'] != $userda change_tor_status($attach_id, $new_status); $this->response['attach_id'] = $attach_id; -$this->response['status'] = $bb_cfg['tor_icons'][$new_status] .' '. $lang['TOR_STATUS_NAME'][$new_status]; \ No newline at end of file +$this->response['status'] = $bb_cfg['tor_icons'][$new_status] .' '. $lang['TOR_STATUS_NAME'][$new_status]. ' · ' . get_username($tor['checked_user_id']) . ' · '. delta_time(time()) . $lang['BACK']. ''; \ No newline at end of file diff --git a/upload/ajax/posts.php b/upload/ajax/posts.php index 7df1a5bb8..17065a1b3 100644 --- a/upload/ajax/posts.php +++ b/upload/ajax/posts.php @@ -159,7 +159,7 @@ switch($this->request['type']) $days_after_last_edit = $bb_cfg['dis_edit_tor_after_days']; $last_edit_time = max($post['post_time'], $post['post_edit_time']) + 86400*$days_after_last_edit; $disallowed_by_forum_perm = in_array($post['forum_id'], $bb_cfg['dis_edit_tor_forums']); - $disallowed_by_user_opt = bf($user->opt, 'user_opt', 'dis_edit_release'); + $disallowed_by_user_opt = bf($user->opt, 'user_opt', 'allow_post_edit'); if ($last_edit_time < TIMENOW && ($disallowed_by_forum_perm || $disallowed_by_user_opt)) { @@ -169,14 +169,14 @@ switch($this->request['type']) } } } - + $hidden_form = ''; $hidden_form .= ''; $hidden_form .= ''; $this->response['text'] = '
- '. $hidden_form .' + '. $hidden_form .'
diff --git a/upload/attach_mod/displaying_torrent.php b/upload/attach_mod/displaying_torrent.php index f199b247f..3e175eea9 100644 --- a/upload/attach_mod/displaying_torrent.php +++ b/upload/attach_mod/displaying_torrent.php @@ -219,7 +219,7 @@ if ($tor_reged && $tor_info) // torrent status mod 'TOR_STATUS_TEXT' => $lang['TOR_STATUS_NAME'][$tor_info['tor_status']], 'TOR_STATUS_ICON' => $bb_cfg['tor_icons'][$tor_info['tor_status']], - 'TOR_STATUS_BY' => ($cuid && $is_auth['auth_mod']) ? (' ·  ' . get_username($cuid) . '  ·  '. delta_time($tor_info['checked_time']) .' назад') : '', + 'TOR_STATUS_BY' => ($cuid && $is_auth['auth_mod']) ? (' · ' . get_username($cuid) . ' · '. delta_time($tor_info['checked_time']) . $lang['BACK'] . '') : '', 'TOR_STATUS_SELECT' => build_select('', array_flip($lang['TOR_STATUS_NAME']), TOR_APPROVED), //end torrent status mod diff --git a/upload/config.php b/upload/config.php index 3e72385fb..2952c85fd 100644 --- a/upload/config.php +++ b/upload/config.php @@ -57,8 +57,8 @@ $bb_cfg['css_ver'] = 1; // Increase number of revision after update $bb_cfg['tp_version'] = '2.0.2'; -$bb_cfg['tp_release_state'] = 'TP II r177'; -$bb_cfg['tp_release_date'] = '29-07-2011'; +$bb_cfg['tp_release_state'] = 'TP II r178'; +$bb_cfg['tp_release_date'] = '30-07-2011'; $bb_cfg['board_disabled_msg'] = 'форум временно отключен'; // 'forums temporarily disabled'; // show this msg if board has been disabled via ON/OFF trigger $bb_cfg['srv_overloaded_msg'] = "Извините, в данный момент сервер перегружен\nПопробуйте повторить запрос через несколько минут"; diff --git a/upload/includes/functions.php b/upload/includes/functions.php index bd9b6a4ef..a3eb3b1ea 100644 --- a/upload/includes/functions.php +++ b/upload/includes/functions.php @@ -280,6 +280,7 @@ $bf['user_opt'] = array( 'allow_topic' => 11, // Запрет на создание новых тем 'allow_post' => 12, // Запрет на отправку сообщений 'allow_post_edit' => 13, // Запрет на редактирование сообщений + 'view_profile' => 14, // Запрет на просмотр профиля гостям ); function bit2dec ($bit_num) diff --git a/upload/includes/ucp/usercp_register.php b/upload/includes/ucp/usercp_register.php index e7306c900..ee3684772 100644 --- a/upload/includes/ucp/usercp_register.php +++ b/upload/includes/ucp/usercp_register.php @@ -392,6 +392,7 @@ foreach ($profile_fields as $field => $can_edit) 'notify' => true, 'notify_pm' => true, 'hide_porn_forums' => true, + 'allow_post_edit' => true, ); foreach ($update_user_opt as $opt => $can_change_opt) { diff --git a/upload/includes/ucp/usercp_viewprofile.php b/upload/includes/ucp/usercp_viewprofile.php index c1f4ccc73..ddabb55d7 100644 --- a/upload/includes/ucp/usercp_viewprofile.php +++ b/upload/includes/ucp/usercp_viewprofile.php @@ -8,10 +8,6 @@ $datastore->enqueue(array( 'ranks', )); -if (!$userdata['session_logged_in']) -{ - redirect(append_sid("login.php?redirect={$_SERVER['REQUEST_URI']}", TRUE)); -} if (empty($_GET[POST_USERS_URL]) || $_GET[POST_USERS_URL] == ANONYMOUS) { bb_die($lang['NO_USER_ID_SPECIFIED']); @@ -21,6 +17,10 @@ if (!$profiledata = get_userdata($_GET[POST_USERS_URL])) bb_die($lang['NO_USER_ID_SPECIFIED']); } +if(bf($profiledata['user_opt'], 'user_opt', 'view_profile')) +{ meta_refresh(append_sid("login.php?redirect={$_SERVER['REQUEST_URI']}", true)); + bb_die(" {$profiledata['username']} "); } + // // Calculate the number of days this user has been a member ($memberdays) // Then calculate their posts per day