mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 14:23:57 -07:00
r182
Запрет на создание новых раздач если стоит статус недооформлено/неоформлено/сомнительно git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@182 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
parent
a33fef6e64
commit
fdda330f29
3 changed files with 22 additions and 3 deletions
|
@ -314,6 +314,8 @@ $bb_cfg['tor_cannot_edit'] = array(
|
||||||
TOR_CONSUMED => true,
|
TOR_CONSUMED => true,
|
||||||
TOR_DUP => true,
|
TOR_DUP => true,
|
||||||
);
|
);
|
||||||
|
// Запрет на создание новых раздач если стоит статус недооформлено/неоформлено/сомнительно
|
||||||
|
$bb_cfg['tor_cannot_new'] = array(TOR_NEED_EDIT, TOR_NO_DESC, TOR_DOUBTFUL);
|
||||||
|
|
||||||
// Table names
|
// Table names
|
||||||
define('BUF_TOPIC_VIEW', 'buf_topic_view');
|
define('BUF_TOPIC_VIEW', 'buf_topic_view');
|
||||||
|
|
|
@ -17,7 +17,7 @@ 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'))
|
if(bf($profiledata['user_opt'], 'user_opt', 'view_profile') && IS_GUEST)
|
||||||
{
meta_refresh(append_sid("login.php?redirect={$_SERVER['REQUEST_URI']}", true));
|
{
meta_refresh(append_sid("login.php?redirect={$_SERVER['REQUEST_URI']}", true));
|
||||||
bb_die("Пользователь {$profiledata['username']} запретил гостям просмотр своего профиля");
}
|
bb_die("Пользователь {$profiledata['username']} запретил гостям просмотр своего профиля");
}
|
||||||
|
|
||||||
|
|
|
@ -291,6 +291,23 @@ if (!$is_auth[$is_auth_type])
|
||||||
|
|
||||||
if ($mode == 'newtopic' && $topic_tpl && $post_info['topic_tpl_id'])
|
if ($mode == 'newtopic' && $topic_tpl && $post_info['topic_tpl_id'])
|
||||||
{
|
{
|
||||||
|
if($tor_status = join(',', $bb_cfg['tor_cannot_new']))
|
||||||
|
{
|
||||||
|
$sql = DB()->fetch_rowset("SELECT t.topic_title, t.topic_id, tor.tor_status
|
||||||
|
FROM ". BB_BT_TORRENTS ." tor, ". BB_TOPICS ." t
|
||||||
|
WHERE poster_id = {$userdata['user_id']}
|
||||||
|
AND tor.topic_id = t.topic_id
|
||||||
|
AND tor.tor_status IN ($tor_status)
|
||||||
|
ORDER BY tor.reg_time
|
||||||
|
");
|
||||||
|
|
||||||
|
$topics = '';
|
||||||
|
foreach($sql as $row)
|
||||||
|
{
|
||||||
|
$topics .= $bb_cfg['tor_icons'][$row['tor_status']] .'<a href="'. TOPIC_URL . $row['topic_id'] .'">'. $row['topic_title'] .'</a><div class="spacer_12"></div>';
|
||||||
|
}
|
||||||
|
if ($topics) bb_die($topics .'У вас есть неоформленный релиз, прежде чем создавать новый исправьте свой неоформленный.');
|
||||||
|
}
|
||||||
require(INC_DIR .'topic_templates.php');
|
require(INC_DIR .'topic_templates.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -802,9 +819,9 @@ $template->assign_vars(array(
|
||||||
'CAPTCHA_HTML' => (IS_GUEST) ? CAPTCHA()->get_html() : '',
|
'CAPTCHA_HTML' => (IS_GUEST) ? CAPTCHA()->get_html() : '',
|
||||||
'SUBJECT' => $subject,
|
'SUBJECT' => $subject,
|
||||||
'MESSAGE' => $message,
|
'MESSAGE' => $message,
|
||||||
|
|
||||||
'U_VIEWTOPIC' => ( $mode == 'reply' ) ? append_sid("viewtopic.php?" . POST_TOPIC_URL . "=$topic_id&postorder=desc") : '',
|
'U_VIEWTOPIC' => ( $mode == 'reply' ) ? append_sid("viewtopic.php?" . POST_TOPIC_URL . "=$topic_id&postorder=desc") : '',
|
||||||
|
|
||||||
'S_NOTIFY_CHECKED' => ( $notify_user ) ? 'checked="checked"' : '',
|
'S_NOTIFY_CHECKED' => ( $notify_user ) ? 'checked="checked"' : '',
|
||||||
'S_TYPE_TOGGLE' => $topic_type_toggle,
|
'S_TYPE_TOGGLE' => $topic_type_toggle,
|
||||||
'S_TOPIC_ID' => $topic_id,
|
'S_TOPIC_ID' => $topic_id,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue