git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@178 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
pherum83 2011-07-29 23:25:54 +00:00
commit 2f7f5a5b65
7 changed files with 14 additions and 12 deletions

View file

@ -10,7 +10,7 @@ if (!isset($this->request['attach_id']))
} }
if (!isset($this->request['status'])) if (!isset($this->request['status']))
{ {
$this->ajax_die('empty tor_status'); $this->ajax_die('не выбран статус');
} }
$attach_id = (int) $this->request['attach_id']; $attach_id = (int) $this->request['attach_id'];
$new_status = (int) $this->request['status']; $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); change_tor_status($attach_id, $new_status);
$this->response['attach_id'] = $attach_id; $this->response['attach_id'] = $attach_id;
$this->response['status'] = $bb_cfg['tor_icons'][$new_status] .' '. $lang['TOR_STATUS_NAME'][$new_status]; $this->response['status'] = $bb_cfg['tor_icons'][$new_status] .' <b> '. $lang['TOR_STATUS_NAME'][$new_status]. '</b> &middot; <a class="med" href='. PROFILE_URL . $tor['checked_user_id'] . '>' . get_username($tor['checked_user_id']) . '</a> &middot; <i>'. delta_time(time()) . $lang['BACK']. '</i>';

View file

@ -159,7 +159,7 @@ switch($this->request['type'])
$days_after_last_edit = $bb_cfg['dis_edit_tor_after_days']; $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; $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_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)) if ($last_edit_time < TIMENOW && ($disallowed_by_forum_perm || $disallowed_by_user_opt))
{ {

View file

@ -219,7 +219,7 @@ if ($tor_reged && $tor_info)
// torrent status mod // torrent status mod
'TOR_STATUS_TEXT' => $lang['TOR_STATUS_NAME'][$tor_info['tor_status']], 'TOR_STATUS_TEXT' => $lang['TOR_STATUS_NAME'][$tor_info['tor_status']],
'TOR_STATUS_ICON' => $bb_cfg['tor_icons'][$tor_info['tor_status']], 'TOR_STATUS_ICON' => $bb_cfg['tor_icons'][$tor_info['tor_status']],
'TOR_STATUS_BY' => ($cuid && $is_auth['auth_mod']) ? ('&nbsp;&middot;&nbsp; <a href='. PROFILE_URL . $cuid . '>' . get_username($cuid) . '</a>&nbsp; &middot;&nbsp; <i>'. delta_time($tor_info['checked_time']) .' назад</i>') : '', 'TOR_STATUS_BY' => ($cuid && $is_auth['auth_mod']) ? ('<span title="'.bb_date($tor_info['checked_time'], 'd-M-Y H:i').'"> &middot; <a class="med" href='. PROFILE_URL . $cuid . '>' . get_username($cuid) . '</a> &middot; <i>'. delta_time($tor_info['checked_time']) . $lang['BACK'] . '</i></span>') : '',
'TOR_STATUS_SELECT' => build_select('', array_flip($lang['TOR_STATUS_NAME']), TOR_APPROVED), 'TOR_STATUS_SELECT' => build_select('', array_flip($lang['TOR_STATUS_NAME']), TOR_APPROVED),
//end torrent status mod //end torrent status mod

View file

@ -57,8 +57,8 @@ $bb_cfg['css_ver'] = 1;
// Increase number of revision after update // Increase number of revision after update
$bb_cfg['tp_version'] = '2.0.2'; $bb_cfg['tp_version'] = '2.0.2';
$bb_cfg['tp_release_state'] = 'TP II r177'; $bb_cfg['tp_release_state'] = 'TP II r178';
$bb_cfg['tp_release_date'] = '29-07-2011'; $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['board_disabled_msg'] = 'форум временно отключен'; // 'forums temporarily disabled'; // show this msg if board has been disabled via ON/OFF trigger
$bb_cfg['srv_overloaded_msg'] = "Извините, в данный момент сервер перегружен\nПопробуйте повторить запрос через несколько минут"; $bb_cfg['srv_overloaded_msg'] = "Извините, в данный момент сервер перегружен\nПопробуйте повторить запрос через несколько минут";

View file

@ -280,6 +280,7 @@ $bf['user_opt'] = array(
'allow_topic' => 11, // Запрет на создание новых тем 'allow_topic' => 11, // Запрет на создание новых тем
'allow_post' => 12, // Запрет на отправку сообщений 'allow_post' => 12, // Запрет на отправку сообщений
'allow_post_edit' => 13, // Запрет на редактирование сообщений 'allow_post_edit' => 13, // Запрет на редактирование сообщений
'view_profile' => 14, // Запрет на просмотр профиля гостям
); );
function bit2dec ($bit_num) function bit2dec ($bit_num)

View file

@ -392,6 +392,7 @@ foreach ($profile_fields as $field => $can_edit)
'notify' => true, 'notify' => true,
'notify_pm' => true, 'notify_pm' => true,
'hide_porn_forums' => true, 'hide_porn_forums' => true,
'allow_post_edit' => true,
); );
foreach ($update_user_opt as $opt => $can_change_opt) foreach ($update_user_opt as $opt => $can_change_opt)
{ {

View file

@ -8,10 +8,6 @@ $datastore->enqueue(array(
'ranks', '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) if (empty($_GET[POST_USERS_URL]) || $_GET[POST_USERS_URL] == ANONYMOUS)
{ {
bb_die($lang['NO_USER_ID_SPECIFIED']); 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']); 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) // Calculate the number of days this user has been a member ($memberdays)
// Then calculate their posts per day // Then calculate their posts per day