Version 2.2.0 RC-1
This commit is contained in:
1 parent
f73f8bff6d
commit
22f1b963ee
1034 files changed
+178610
-70897
No files matched your search
@@ -2,28 +2,18 @@
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.1.7
|
||||
| Invision Power Board
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2005 Invision Power Services, Inc.
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Tuesday 18th of July 2006 05:56:00 PM
|
||||
| Release: 52f408a29988b02f45b5e6f4ba5af0ae
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
| http://www.ibresource.ru/license
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
|
||||
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
|
||||
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2006-01-11 22:47:48 +0000 (Wed, 11 Jan 2006) $
|
||||
| > $Revision: 122 $
|
||||
| > $Author: bfarber $
|
||||
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
|
||||
| > $Revision: 567 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > Moderation core module
|
||||
@@ -39,7 +29,7 @@
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
@@ -51,7 +41,7 @@ class moderate
|
||||
|
||||
var $moderator = "";
|
||||
var $modfunc = "";
|
||||
var $forum = array();
|
||||
var $forum = array( 'id' => 0 );
|
||||
var $topic = array();
|
||||
|
||||
var $upload_dir = "";
|
||||
@@ -129,7 +119,7 @@ class moderate
|
||||
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'missing_files') );
|
||||
}
|
||||
|
||||
if ( $this->ipsclass->input['f'] AND ( $this->topic['forum_id'] != $this->ipsclass->input['f'] ) )
|
||||
if ( $this->ipsclass->input['f'] AND ( $this->topic['forum_id'] != $this->ipsclass->input['f'] ) )
|
||||
{
|
||||
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'missing_files') );
|
||||
}
|
||||
@@ -161,7 +151,7 @@ class moderate
|
||||
$this->ipsclass->Error( array( 'LEVEL' => 1,'MSG' => 'missing_files') );
|
||||
}
|
||||
|
||||
$this->ipsclass->input['st'] = intval($this->ipsclass->input['st']);
|
||||
$this->ipsclass->input['st'] = intval($this->ipsclass->input['st']) > 0 ? intval($this->ipsclass->input['st']) : 0;
|
||||
|
||||
//-----------------------------------------
|
||||
// Get the forum info based on the forum ID,
|
||||
@@ -175,7 +165,7 @@ class moderate
|
||||
// Are we a moderator?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $this->ipsclass->member['_moderator'][ $this->ipsclass->input['f'] ] )
|
||||
if ( isset( $this->ipsclass->member['_moderator'][ $this->ipsclass->input['f'] ]) AND $this->ipsclass->member['_moderator'][ $this->ipsclass->input['f'] ] )
|
||||
{
|
||||
$this->moderator = $this->ipsclass->member['_moderator'][ $this->ipsclass->input['f'] ];
|
||||
}
|
||||
@@ -341,7 +331,7 @@ class moderate
|
||||
// If we have any HTML to print, do so...
|
||||
|
||||
$this->ipsclass->print->add_output( $this->output );
|
||||
$this->ipsclass->print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 0, NAV => $this->nav ) );
|
||||
$this->ipsclass->print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 0, 'NAV' => $this->nav ) );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
@@ -350,7 +340,7 @@ class moderate
|
||||
|
||||
function edit_member()
|
||||
{
|
||||
$mid = intval($this->ipsclass->input['mid']);
|
||||
$mid = intval($this->ipsclass->input['mid']) ? intval($this->ipsclass->input['mid']) : intval($this->ipsclass->input['member']);
|
||||
|
||||
//-----------------------------------------
|
||||
// Check Permissions
|
||||
@@ -397,7 +387,7 @@ class moderate
|
||||
// Show Form?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! $this->ipsclass->input['checked'] )
|
||||
if ( !isset($this->ipsclass->input['checked']) OR !$this->ipsclass->input['checked'] )
|
||||
{
|
||||
$this->output .= $this->html_start_form( array( 1 => array( 'CODE' , 'editmember'),
|
||||
4 => array( 'mid' , $mid ),
|
||||
@@ -417,8 +407,6 @@ class moderate
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$editable['signature'] = $parser->pre_edit_parse( $member['signature'] );
|
||||
$editable['location'] = $member['location'];
|
||||
$editable['interests'] = $this->ipsclass->my_br2nl($member['interests']);
|
||||
@@ -498,19 +486,40 @@ class moderate
|
||||
'signature' => $this->ipsclass->input['signature'],
|
||||
);
|
||||
|
||||
if ($this->ipsclass->input['avatar'] == 1)
|
||||
if ( $this->ipsclass->input['avatar'] == 1 )
|
||||
{
|
||||
$bet['avatar_location'] = "";
|
||||
$bet['avatar_size'] = "";
|
||||
$this->bash_uploaded_avatars($mid);
|
||||
}
|
||||
|
||||
if ($this->ipsclass->input['photo'] == 1)
|
||||
if ( $this->ipsclass->input['photo'] == 1 )
|
||||
{
|
||||
$this->bash_uploaded_photos($mid);
|
||||
$bet['photo_type'] = '';
|
||||
$bet['photo_location'] = '';
|
||||
$bet['photo_dimensions'] = '';
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'profile_portal', 'where' => "pp_member_id=".intval($mid) ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
if ( $this->ipsclass->DB->get_num_rows() )
|
||||
{
|
||||
$this->ipsclass->DB->do_update( 'profile_portal', array( 'pp_main_photo' => '',
|
||||
'pp_main_width' => '',
|
||||
'pp_main_height' => '',
|
||||
'pp_thumb_photo' => '',
|
||||
'pp_thumb_width' => '',
|
||||
'pp_thumb_height' => '' ), 'pp_member_id='.$mid );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->ipsclass->DB->do_insert( 'profile_portal', array( 'pp_main_photo' => '',
|
||||
'pp_main_width' => '',
|
||||
'pp_main_height' => '',
|
||||
'pp_thumb_photo' => '',
|
||||
'pp_thumb_width' => '',
|
||||
'pp_thumb_height' => '',
|
||||
'pp_member_id' => $mid ) );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -587,7 +596,7 @@ class moderate
|
||||
$this->modules->on_profile_update($bet, $custom_fields);
|
||||
}
|
||||
|
||||
$this->moderate_log("Èçìåíåí ïðîôèëü ïîëüçîâàòåëÿ: {$member['members_display_name']}");
|
||||
$this->moderate_log("{$this->ipsclass->lang['acp_edited_profile']} {$member['members_display_name']}");
|
||||
|
||||
$this->ipsclass->boink_it( $this->ipsclass->base_url.'act=mod&CODE=editmember&auth_key='.$this->ipsclass->return_md5_check().'&mid='.$mid.'&tid='.time() );
|
||||
}
|
||||
@@ -633,7 +642,7 @@ class moderate
|
||||
|
||||
if ( $this->topic['tid'] )
|
||||
{
|
||||
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['cp_redirect_posts'], "showtopic=".$this->topic['tid'].'&st='.intval($this->ipsclass->input['st']) );
|
||||
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['cp_redirect_posts'], "showtopic=".$this->topic['tid'].'&st='.intval($this->ipsclass->input['st']) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -736,8 +745,8 @@ class moderate
|
||||
|
||||
$this->page_title = $this->ipsclass->lang['cmp_title'].": ".$this->topic['title'];
|
||||
|
||||
$this->nav = array ( "<a href='{$this->base_url}&act=SF&f={$this->forum['id']}'>{$this->forum['name']}</a>",
|
||||
"<a href='{$this->base_url}&act=ST&f={$this->forum['id']}&t={$this->topic['tid']}'>{$this->topic['title']}</a>"
|
||||
$this->nav = array ( "<a href='{$this->base_url}showforum={$this->forum['id']}'>{$this->forum['name']}</a>",
|
||||
"<a href='{$this->base_url}showtopic={$this->topic['tid']}'>{$this->topic['title']}</a>"
|
||||
);
|
||||
|
||||
$this->ipsclass->print->add_output( $this->output );
|
||||
@@ -797,6 +806,8 @@ class moderate
|
||||
}
|
||||
}
|
||||
|
||||
$ids = $this->ipsclass->clean_int_array( $ids );
|
||||
|
||||
$affected_ids = count($ids);
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -840,6 +851,52 @@ class moderate
|
||||
|
||||
$this->ipsclass->DB->do_update( 'posts', array( 'new_topic' => 0 ), "topic_id={$this->topic['tid']}" );
|
||||
|
||||
//-----------------------------------------
|
||||
// Is first post queued for new topic?
|
||||
//-----------------------------------------
|
||||
|
||||
$topic_approved = 1;
|
||||
|
||||
$this->ipsclass->DB->build_query( array( 'select' => 'pid, queued',
|
||||
'from' => 'posts',
|
||||
'where' => "topic_id={$move_to_topic['tid']}",
|
||||
'order' => 'pid ASC',
|
||||
'limit' => array(0,1),
|
||||
) );
|
||||
|
||||
$this->ipsclass->DB->exec_query();
|
||||
|
||||
$first_post = $this->ipsclass->DB->fetch_row();
|
||||
|
||||
if( $first_post['queued'] )
|
||||
{
|
||||
$this->ipsclass->DB->do_update( 'topics', array( 'approved' => 0 ), "tid={$move_to_topic['tid']}" );
|
||||
$this->ipsclass->DB->do_update( 'posts', array( 'queued' => 0 ), 'pid='.$first_post['pid'] );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Is first post queued for old topic?
|
||||
//-----------------------------------------
|
||||
|
||||
$topic_approved = 1;
|
||||
|
||||
$this->ipsclass->DB->build_query( array( 'select' => 'pid, queued',
|
||||
'from' => 'posts',
|
||||
'where' => "topic_id={$this->topic['tid']}",
|
||||
'order' => 'pid ASC',
|
||||
'limit' => array(0,1),
|
||||
) );
|
||||
|
||||
$this->ipsclass->DB->exec_query();
|
||||
|
||||
$other_first_post = $this->ipsclass->DB->fetch_row();
|
||||
|
||||
if( $other_first_post['queued'] )
|
||||
{
|
||||
$this->ipsclass->DB->do_update( 'topics', array( 'approved' => 0 ), "tid={$this->topic['tid']}" );
|
||||
$this->ipsclass->DB->do_update( 'posts', array( 'queued' => 0 ), 'pid='.$other_first_post['pid'] );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Rebuild the topics
|
||||
//-----------------------------------------
|
||||
@@ -858,7 +915,7 @@ class moderate
|
||||
$this->modfunc->forum_recount($move_to_topic['forum_id']);
|
||||
}
|
||||
|
||||
$this->moderate_log("Ñîîáùåíèÿ èç òåìû '{$this->topic['title']}' ïåðåìåùåíû â '{$move_to_topic['title']}'");
|
||||
$this->moderate_log( sprintf( $this->ipsclass->lang['acp_moved_posts'], $this->topic['title'], $move_to_topic['title'] ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -934,11 +991,11 @@ class moderate
|
||||
|
||||
if( $approve )
|
||||
{
|
||||
$this->moderate_log(count($this->pids)." îæèäàåìûõ ïóáëèêàöèè ñîîáùåíèé òåìû «{$this->topic['title']}» îïóáëèêîâàíî");
|
||||
$this->moderate_log( sprintf( $this->ipsclass->lang['acp_approved_posts'], count($this->pids), $this->topic['title'] ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->moderate_log(count($this->pids)." îæèäàåìûõ ïóáëèêàöèè ñîîáùåíèé òåìû «{$this->topic['title']}» óäàëåíî");
|
||||
$this->moderate_log( sprintf( $this->ipsclass->lang['acp_unapproved_posts'], count($this->pids), $this->topic['title'] ) );
|
||||
}
|
||||
|
||||
$this->modfunc->rebuild_topic( $this->topic['tid'] );
|
||||
@@ -1046,8 +1103,8 @@ class moderate
|
||||
|
||||
$this->page_title = $this->ipsclass->lang['st_top']." ".$this->topic['title'];
|
||||
|
||||
$this->nav = array ( "<a href='{$this->base_url}&act=SF&f={$this->forum['id']}'>{$this->forum['name']}</a>",
|
||||
"<a href='{$this->base_url}&act=ST&f={$this->forum['id']}&t={$this->topic['tid']}'>{$this->topic['title']}</a>"
|
||||
$this->nav = array ( "<a href='{$this->base_url}showforum={$this->forum['id']}'>{$this->forum['name']}</a>",
|
||||
"<a href='{$this->base_url}showtopic={$this->topic['tid']}'>{$this->topic['title']}</a>"
|
||||
);
|
||||
|
||||
$this->ipsclass->print->add_output( $this->output );
|
||||
@@ -1081,6 +1138,8 @@ class moderate
|
||||
}
|
||||
}
|
||||
|
||||
$ids = $this->ipsclass->clean_int_array( $ids );
|
||||
|
||||
$affected_ids = count($ids);
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -1140,6 +1199,29 @@ class moderate
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Is first post queued?
|
||||
//-----------------------------------------
|
||||
|
||||
$topic_approved = 1;
|
||||
|
||||
$this->ipsclass->DB->build_query( array( 'select' => 'pid, queued',
|
||||
'from' => 'posts',
|
||||
'where' => "pid IN($pid_string)",
|
||||
'order' => 'pid ASC',
|
||||
'limit' => array(0,1),
|
||||
) );
|
||||
|
||||
$this->ipsclass->DB->exec_query();
|
||||
|
||||
$first_post = $this->ipsclass->DB->fetch_row();
|
||||
|
||||
if( $first_post['queued'] )
|
||||
{
|
||||
$topic_approved = 0;
|
||||
$this->ipsclass->DB->do_update( 'posts', array( 'queued' => 0 ), 'pid='.$first_post['pid'] );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Complete a new dummy topic
|
||||
//-----------------------------------------
|
||||
@@ -1161,7 +1243,7 @@ class moderate
|
||||
'last_vote' => 0,
|
||||
'views' => 0,
|
||||
'forum_id' => $this->ipsclass->input['fid'],
|
||||
'approved' => 1,
|
||||
'approved' => $topic_approved,
|
||||
'pinned' => 0,
|
||||
) );
|
||||
|
||||
@@ -1204,11 +1286,11 @@ class moderate
|
||||
|
||||
if ( $this->trash_inuse )
|
||||
{
|
||||
$this->moderate_log("Ïðèìåíåíà êîðçèíà äëÿ óäàëÿåìîé òåìû: '{$this->topic['title']}'");
|
||||
$this->moderate_log("{$this->ipsclass->lang['acp_trashcan_post']} '{$this->topic['title']}'");
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->moderate_log("Ðàçäåëåíà òåìà: '{$this->topic['title']}'");
|
||||
$this->moderate_log("{$this->ipsclass->lang['acp_split_topic']} '{$this->topic['title']}'");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1295,7 +1377,9 @@ class moderate
|
||||
// Get Attachment Data
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( "select" => '*', 'from' => 'attachments', 'where' => "attach_pid IN (".implode(",", $this->pids).")" ) );
|
||||
$this->ipsclass->DB->simple_construct( array( "select" => '*',
|
||||
'from' => 'attachments',
|
||||
'where' => "attach_rel_module='post' AND attach_rel_id IN (".implode(",", $this->pids).")" ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
while( $row = $this->ipsclass->DB->fetch_row() )
|
||||
@@ -1414,15 +1498,18 @@ class moderate
|
||||
}
|
||||
}
|
||||
|
||||
$attach_keep = $this->ipsclass->clean_int_array( $attach_keep );
|
||||
$attach_kill = $this->ipsclass->clean_int_array( $attach_kill );
|
||||
|
||||
//-----------------------------------------
|
||||
// Keep
|
||||
//-----------------------------------------
|
||||
|
||||
if ( count( $attach_keep ) )
|
||||
{
|
||||
$this->ipsclass->DB->do_update( 'attachments',
|
||||
array( 'attach_pid' => $this->ipsclass->input['postdate'], 'attach_post_key' => $new_post_key, 'attach_member_id' => $author['id'] ),
|
||||
'attach_id IN('.implode(",",$attach_keep).')' );
|
||||
$this->ipsclass->DB->do_update( 'attachments', array( 'attach_rel_id' => $this->ipsclass->input['postdate'],
|
||||
'attach_post_key' => $new_post_key,
|
||||
'attach_member_id' => $author['id'] ), 'attach_id IN('.implode(",",$attach_keep).')' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -1572,9 +1659,9 @@ class moderate
|
||||
$this->modfunc->forum_recount( $this->forum['id'] );
|
||||
$this->modfunc->stats_recount();
|
||||
|
||||
$this->moderate_log("Îïóáëèêîâàíà òåìà (tid: ".$this->topic['tid'].")");
|
||||
$this->moderate_log( sprintf( $this->ipsclass->lang['acp_approve_topic'], $this->topic['tid'] ) );
|
||||
|
||||
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['redirect_modified'], "showtopic=".$this->topic['tid']."&st=".$this->ipsclass->input['st'] );
|
||||
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['redirect_modified'], "showtopic=".$this->topic['tid']."&st=".intval($this->ipsclass->input['st']) );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
@@ -1665,7 +1752,7 @@ class moderate
|
||||
|
||||
$this->modfunc->topic_move( $tid_array, $source, $moveto );
|
||||
|
||||
$this->moderate_log("Ïåðåìåùåíî íåñêîëüêî òåì");
|
||||
$this->moderate_log( $this->ipsclass->lang['acp_mass_moved'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// Show results or refresh..
|
||||
@@ -1693,13 +1780,14 @@ class moderate
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->input['check'] = 0;
|
||||
$this->ipsclass->input['dateline'] = round((time()-$this->ipsclass->input['dateline'])/24/60/60);
|
||||
$this->prune_start( $this->ipsclass->compiled_templates['skin_mod']->mod_simple_page( $this->ipsclass->lang['cp_results'], $this->ipsclass->lang['cp_result_move']. ($max) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
$link = "act=mod&f={$this->forum['id']}&CODE=prune_move&df={$this->ipsclass->input['df']}&pergo={$pergo}¤t={$maxdone}&max={$max}";
|
||||
$link .= "&starter={$starter}&state={$state}&posts={$posts}&dateline={$dateline}&ignore_pin={$ignore_pin}";
|
||||
$link .= "&auth_key=".$this->ipsclass->md5_check;
|
||||
$link = "act=mod&f={$this->forum['id']}&CODE=prune_move&df={$this->ipsclass->input['df']}&pergo={$pergo}&current={$maxdone}&max={$max}";
|
||||
$link .= "&starter={$starter}&state={$state}&posts={$posts}&dateline={$dateline}&ignore_pin={$ignore_pin}";
|
||||
$link .= "&auth_key=".$this->ipsclass->md5_check;
|
||||
$done = $current + $num_rows;
|
||||
$text = sprintf( $this->ipsclass->lang['cp_batch_done'], $done, $max - $done );
|
||||
|
||||
@@ -1785,7 +1873,7 @@ class moderate
|
||||
|
||||
$this->modfunc->topic_delete($tid_array);
|
||||
|
||||
$this->moderate_log("Ñîêðàùåí ôîðóì");
|
||||
$this->moderate_log( $this->ipsclass->lang['acp_pruned_forum'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// Show results or refresh..
|
||||
@@ -1802,9 +1890,9 @@ class moderate
|
||||
}
|
||||
else
|
||||
{
|
||||
$link = "act=mod&f={$this->forum['id']}&CODE=prune_finish&pergo={$pergo}¤t={$maxdone}&max={$max}";
|
||||
$link .= "&starter={$starter}&state={$state}&posts={$posts}&dateline={$dateline}&ignore_pin={$ignore_pin}";
|
||||
$link .= "&auth_key=".$this->ipsclass->md5_check;
|
||||
$link = "act=mod&f={$this->forum['id']}&CODE=prune_finish&pergo={$pergo}&current={$maxdone}&max={$max}";
|
||||
$link .= "&starter={$starter}&state={$state}&posts={$posts}&dateline={$dateline}&ignore_pin={$ignore_pin}";
|
||||
$link .= "&auth_key=".$this->ipsclass->md5_check;
|
||||
$done = $current + $num_rows;
|
||||
$text = sprintf( $this->ipsclass->lang['cp_batch_done'], $done, $max - $done );
|
||||
|
||||
@@ -1844,23 +1932,31 @@ class moderate
|
||||
return;
|
||||
}
|
||||
|
||||
$confirm_data = array( 'show' => '' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Check per go
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->input['pergo'] = $this->ipsclass->input['pergo'] ? $this->ipsclass->input['pergo'] : 50;
|
||||
$this->ipsclass->input['pergo'] = isset($this->ipsclass->input['pergo']) ? intval($this->ipsclass->input['pergo']) : 50;
|
||||
$this->ipsclass->input['posts'] = isset($this->ipsclass->input['posts']) ? intval($this->ipsclass->input['posts']) : '';
|
||||
$this->ipsclass->input['member'] = isset($this->ipsclass->input['member']) ? $this->ipsclass->input['member'] : '';
|
||||
$this->ipsclass->input['determine'] = isset($this->ipsclass->input['determine']) ? $this->ipsclass->input['determine'] : '';
|
||||
$this->ipsclass->input['dateline'] = isset($this->ipsclass->input['dateline']) ? $this->ipsclass->input['dateline'] : '';
|
||||
|
||||
//-----------------------------------------
|
||||
// Are we checking first?
|
||||
//-----------------------------------------
|
||||
|
||||
if ($this->ipsclass->input['check'] == 1)
|
||||
if ( isset($this->ipsclass->input['check']) AND $this->ipsclass->input['check'] == 1 )
|
||||
{
|
||||
$link = "&pergo=".$this->ipsclass->input['pergo'];
|
||||
$link = "&pergo=".$this->ipsclass->input['pergo'];
|
||||
$link_text = $this->ipsclass->lang['cp_prune_dorem'];
|
||||
|
||||
$tcount = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'COUNT(*) as tcount', 'from' => 'topics', 'where' => "approved=1 and forum_id={$this->forum['id']}" ) );
|
||||
|
||||
$db_query = "";
|
||||
|
||||
//-----------------------------------------
|
||||
// date...
|
||||
//-----------------------------------------
|
||||
@@ -1870,7 +1966,7 @@ class moderate
|
||||
$date = time() - $this->ipsclass->input['dateline']*60*60*24;
|
||||
$db_query .= " AND last_post < $date";
|
||||
|
||||
$link .= "&dateline=$date";
|
||||
$link .= "&dateline=$date";
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -1879,7 +1975,8 @@ class moderate
|
||||
|
||||
if ( $this->ipsclass->input['member'] )
|
||||
{
|
||||
$this->ipsclass->DB->query("SELECT id FROM ibf_members WHERE name='".$this->ipsclass->input['member']."'");
|
||||
$this->ipsclass->DB->build_query( array( 'select' => 'id', 'from' => 'members', 'where' => "name='".$this->ipsclass->input['member']."'" ) );
|
||||
$this->ipsclass->DB->exec_query();
|
||||
|
||||
if (! $mem = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
@@ -1889,7 +1986,7 @@ class moderate
|
||||
else
|
||||
{
|
||||
$db_query .= " AND starter_id='".$mem['id']."'";
|
||||
$link .= "&starter={$mem['id']}";
|
||||
$link .= "&starter={$mem['id']}";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1900,19 +1997,19 @@ class moderate
|
||||
if ($this->ipsclass->input['posts'])
|
||||
{
|
||||
$db_query .= " AND posts < '".$this->ipsclass->input['posts']."'";
|
||||
$link .= "&posts={$this->ipsclass->input['posts']}";
|
||||
$link .= "&posts={$this->ipsclass->input['posts']}";
|
||||
}
|
||||
|
||||
if ($this->ipsclass->input['topic_type'] != 'all')
|
||||
{
|
||||
$db_query .= " AND state='".$this->ipsclass->input['topic_type']."'";
|
||||
$link .= "&state={$this->ipsclass->input['topic_type']}";
|
||||
$link .= "&state={$this->ipsclass->input['topic_type']}";
|
||||
}
|
||||
|
||||
if ($this->ipsclass->input['ignore_pin'] == 1)
|
||||
{
|
||||
$db_query .= " AND pinned <> 1";
|
||||
$link .= "&ignore_pin=1";
|
||||
$link .= "&ignore_pin=1";
|
||||
}
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(*) as count',
|
||||
@@ -1929,7 +2026,7 @@ class moderate
|
||||
|
||||
if ($this->ipsclass->input['df'] == 'prune')
|
||||
{
|
||||
$link = "act=mod&f={$this->forum['id']}&CODE=prune_finish&".$link;
|
||||
$link = "act=mod&f={$this->forum['id']}&CODE=prune_finish&".$link;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1944,7 +2041,7 @@ class moderate
|
||||
return;
|
||||
}
|
||||
|
||||
$link = "act=mod&f={$this->forum['id']}&CODE=prune_move&df=".$this->ipsclass->input['df'].$link;
|
||||
$link = "act=mod&f={$this->forum['id']}&CODE=prune_move&df=".$this->ipsclass->input['df'].$link;
|
||||
$link_text = $this->ipsclass->lang['cp_prune_domove'];
|
||||
}
|
||||
|
||||
@@ -1954,7 +2051,7 @@ class moderate
|
||||
|
||||
$confirm_data = array( 'tcount' => $tcount['tcount'],
|
||||
'count' => $count['count'],
|
||||
'link' => $link . '&max='.$count['count'],
|
||||
'link' => $link . '&max='.$count['count'],
|
||||
'link_text' => $link_text,
|
||||
'show' => 1 );
|
||||
}
|
||||
@@ -1963,7 +2060,7 @@ class moderate
|
||||
|
||||
foreach( array( 'open', 'closed', 'link', 'all' ) as $type )
|
||||
{
|
||||
if ($this->ipsclass->input['topic_type'] == $type)
|
||||
if (isset($this->ipsclass->input['topic_type']) AND $this->ipsclass->input['topic_type'] == $type)
|
||||
{
|
||||
$selected = ' selected';
|
||||
}
|
||||
@@ -1990,9 +2087,9 @@ class moderate
|
||||
// before
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $this->ipsclass->input['df'] )
|
||||
if ( isset($this->ipsclass->input['df']) AND $this->ipsclass->input['df'] )
|
||||
{
|
||||
$html_forums = preg_replace( "/<option value=\"".intval($this->ipsclass->input['df'])."\"/", "<option value=\"".$this->ipsclass->input['df']."\" selected", $html_forums );
|
||||
$html_forums = preg_replace( "/<option value=\"".intval($this->ipsclass->input['df'])."\"/", "<option value=\"".$this->ipsclass->input['df']."\" selected='selected'", $html_forums );
|
||||
}
|
||||
|
||||
$this->output .= $this->ipsclass->compiled_templates['skin_mod']->prune_splash($this->forum, $html_forums, $select, $this->ipsclass->return_md5_check(), $confirm_data, $complete_html );
|
||||
@@ -2076,8 +2173,6 @@ class moderate
|
||||
|
||||
function multi_topic_merge()
|
||||
{
|
||||
global $std, $ibforums, $DB, $print;
|
||||
|
||||
$pass = 0;
|
||||
|
||||
if ($this->ipsclass->member['g_is_supmod'] == 1)
|
||||
@@ -2101,7 +2196,7 @@ class moderate
|
||||
|
||||
if ( count($this->tids) < 2 )
|
||||
{
|
||||
$this->moderate_error(); ### NEEDS CUSTOM MESSAGE
|
||||
$this->moderate_error('mt_not_enough');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2177,9 +2272,8 @@ class moderate
|
||||
|
||||
function multi_complete_checked_move()
|
||||
{
|
||||
global $std, $ibforums, $DB, $print;
|
||||
|
||||
$pass = 0;
|
||||
$add_link = 0;
|
||||
|
||||
if ($this->ipsclass->member['g_is_supmod'] == 1)
|
||||
{
|
||||
@@ -2200,6 +2294,11 @@ class moderate
|
||||
return;
|
||||
}
|
||||
|
||||
if( $this->ipsclass->input['leave'] == 'y' )
|
||||
{
|
||||
$add_link = 1;
|
||||
}
|
||||
|
||||
$dest_id = intval($this->ipsclass->input['df']);
|
||||
$source_id = $this->forum['id'];
|
||||
|
||||
@@ -2219,6 +2318,8 @@ class moderate
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->tids = $this->ipsclass->clean_int_array( $this->tids );
|
||||
|
||||
//-----------------------------------------
|
||||
// Check for input..
|
||||
@@ -2281,7 +2382,7 @@ class moderate
|
||||
}
|
||||
}
|
||||
|
||||
$this->modfunc->topic_move( $this->tids, $source_id, $dest_id );
|
||||
$this->modfunc->topic_move( $this->tids, $source_id, $dest_id, $add_link );
|
||||
|
||||
//-----------------------------------------
|
||||
// Resync the forums..
|
||||
@@ -2293,7 +2394,7 @@ class moderate
|
||||
$this->modfunc->forum_recount($source_id);
|
||||
$this->modfunc->forum_recount($dest_id);
|
||||
|
||||
$this->moderate_log("Ïåðåìåùåíû òåìû èç ôîðóìà $source_name â $dest_name");
|
||||
$this->moderate_log( sprintf( $this->ipsclass->lang['acp_moved_topics'], $source_name, $dest_name ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -2303,8 +2404,6 @@ class moderate
|
||||
|
||||
function multi_start_checked_move()
|
||||
{
|
||||
global $std, $ibforums, $DB, $print;
|
||||
|
||||
$pass = 0;
|
||||
|
||||
if ($this->ipsclass->member['g_is_supmod'] == 1)
|
||||
@@ -2351,7 +2450,7 @@ class moderate
|
||||
|
||||
$this->page_title = $this->ipsclass->lang['cp_ttitle'];
|
||||
|
||||
$this->nav = array ( "<a href='{$this->ipsclass->base_url}act=SF&f={$this->forum['id']}'>{$this->forum['name']}</a>" );
|
||||
$this->nav = array ( "<a href='{$this->ipsclass->base_url}showforum={$this->forum['id']}'>{$this->forum['name']}</a>" );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
@@ -2482,12 +2581,12 @@ class moderate
|
||||
|
||||
if ( $this->mm_data['topic_title_st'] )
|
||||
{
|
||||
$pre = preg_replace( "/'/", "\\'", $this->mm_data['topic_title_st'] );
|
||||
$pre = str_replace( "'", "\\\'", $this->mm_data['topic_title_st'] );
|
||||
}
|
||||
|
||||
if ( $this->mm_data['topic_title_end'] )
|
||||
{
|
||||
$end = preg_replace( "/'/", "\\'", $this->mm_data['topic_title_end'] );
|
||||
$end = str_replace( "'", "\\\'", $this->mm_data['topic_title_end'] );
|
||||
}
|
||||
|
||||
$this->ipsclass->DB->cache_add_query( 'moderate_concat_title', array( 'pre' => $pre,
|
||||
@@ -2563,7 +2662,7 @@ class moderate
|
||||
|
||||
$this->modfunc->forum_recount( $this->forum['id'] );
|
||||
|
||||
$this->moderate_log("Ïðèìåíåíà ìóëüòè-ìîäåðàöèÿ '{$this->mm_data['mm_title']}' íà ôîðóìå {$this->forum['name']}");
|
||||
$this->moderate_log( sprintf( $this->ipsclass->lang['acp_multi_mod'], $this->mm_data['mm_title'], $this->forum['name'] ) );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
@@ -2572,8 +2671,6 @@ class moderate
|
||||
|
||||
function multi_alter_topics($mod_action="", $sql="")
|
||||
{
|
||||
global $std, $ibforums, $DB, $print;
|
||||
|
||||
if ( ! $mod_action )
|
||||
{
|
||||
$this->moderate_error();
|
||||
@@ -2603,9 +2700,9 @@ class moderate
|
||||
|
||||
if ( $mod_action != 'delete_topic' )
|
||||
{
|
||||
$this->ipsclass->DB->simple_exec_query( array( 'update' => 'topics', 'set' => $sql, 'where' => "tid IN(".implode(",",$this->tids).")" ) );
|
||||
$this->ipsclass->DB->simple_exec_query( array( 'update' => 'topics', 'set' => $sql, 'where' => "tid IN(".implode(",",$this->tids).") AND state!='link'" ) );
|
||||
|
||||
$this->moderate_log("Îáúåäèíåíû òåìû ($sql) (".implode(",",$this->tids).")");
|
||||
$this->moderate_log( sprintf( $this->ipsclass->lang['acp_altered_topics'], $sql, implode(",",$this->tids) ) );
|
||||
|
||||
}
|
||||
else
|
||||
@@ -2620,12 +2717,12 @@ class moderate
|
||||
|
||||
$this->modfunc->topic_move($this->tids, $this->forum['id'], $this->trash_forum);
|
||||
$this->modfunc->forum_recount($this->trash_forum);
|
||||
$this->moderate_log("Ïðèìåíåíà êîðçèíà äëÿ óäàëåíèÿ òåìû ñ id:".implode(",",$this->tids));
|
||||
$this->moderate_log( $this->ipsclass->lang['acp_trashcan_topics']." ".implode(",",$this->tids) );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->modfunc->topic_delete($this->tids);
|
||||
$this->moderate_log("Óäàëåíû òåìû (èõ ID: ".implode(",",$this->tids).")");
|
||||
$this->moderate_log( sprintf( $this->ipsclass->lang['acp_deleted_topics'], implode(",",$this->tids) ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2732,8 +2829,8 @@ class moderate
|
||||
|
||||
$this->page_title = $this->topic['title'];
|
||||
|
||||
$this->nav = array ( "<a href='{$this->base_url}&act=SF&f={$this->forum['id']}'>{$this->forum['name']}</a>",
|
||||
"<a href='{$this->base_url}&act=ST&f={$this->forum['id']}&t={$this->topic['tid']}'>{$this->topic['title']}</a>"
|
||||
$this->nav = array ( "<a href='{$this->base_url}showforum={$this->forum['id']}'>{$this->forum['name']}</a>",
|
||||
"<a href='{$this->base_url}showtopic={$this->topic['tid']}'>{$this->topic['title']}</a>"
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2779,8 +2876,8 @@ class moderate
|
||||
|
||||
$this->page_title = $this->ipsclass->lang['mt_top']." ".$this->topic['title'];
|
||||
|
||||
$this->nav = array ( "<a href='{$this->base_url}&act=SF&f={$this->forum['id']}'>{$this->forum['name']}</a>",
|
||||
"<a href='{$this->base_url}&act=ST&f={$this->forum['id']}&t={$this->topic['tid']}'>{$this->topic['title']}</a>"
|
||||
$this->nav = array ( "<a href='{$this->base_url}showforum={$this->forum['id']}'>{$this->forum['name']}</a>",
|
||||
"<a href='{$this->base_url}showtopic={$this->topic['tid']}'>{$this->topic['title']}</a>"
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2875,9 +2972,20 @@ class moderate
|
||||
}
|
||||
else
|
||||
{
|
||||
$other_mgroups = array();
|
||||
|
||||
if( $this->ipsclass->member['mgroup_others'] )
|
||||
{
|
||||
$other_mgroups = explode( ",", $this->ipsclass->clean_perm_string( $this->ipsclass->member['mgroup_others'] ) );
|
||||
}
|
||||
|
||||
$other_mgroups[] = $this->ipsclass->member['mgroup'];
|
||||
|
||||
$mgroups = implode( ",", $other_mgroups );
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => 'mid',
|
||||
'from' => 'moderators',
|
||||
'where' => "forum_id=".$old_topic['forum_id']." AND (member_id='".$this->ipsclass->member['id']."' OR (is_group=1 AND group_id='".$this->ipsclass->member['mgroup']."'))" ) );
|
||||
'where' => "forum_id=".$old_topic['forum_id']." AND (member_id='".$this->ipsclass->member['id']."' OR (is_group=1 AND group_id IN(".$mgroups.")))" ) );
|
||||
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
@@ -2989,9 +3097,9 @@ class moderate
|
||||
$this->recount($old_topic['forum_id']);
|
||||
}
|
||||
|
||||
$this->moderate_log("Îáúåäèíåíû: òåìà '{$old_topic['title']}' è '{$this->topic['title']}'");
|
||||
$this->moderate_log( sprintf( $this->ipsclass->lang['acp_merged_topic'], $old_topic['title'], $this->topic['title'] ) );
|
||||
|
||||
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['mt_redirect'], "act=ST&f=".$this->forum['id']."&t=".$this->topic['tid'] );
|
||||
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['mt_redirect'], "showtopic=".$this->topic['tid'] );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
@@ -3041,8 +3149,8 @@ class moderate
|
||||
|
||||
$this->page_title = $this->ipsclass->lang['ts_title']." > ".$this->topic['title'];
|
||||
|
||||
$this->nav = array ( "<a href='{$this->base_url}&act=SF&f={$this->forum['id']}'>{$this->forum['name']}</a>",
|
||||
"<a href='{$this->base_url}&act=ST&f={$this->forum['id']}&t={$this->topic['tid']}'>{$this->topic['title']}</a>"
|
||||
$this->nav = array ( "<a href='{$this->base_url}showforum={$this->forum['id']}'>{$this->forum['name']}</a>",
|
||||
"<a href='{$this->base_url}showtopic={$this->topic['tid']}'>{$this->topic['title']}</a>"
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3070,7 +3178,7 @@ class moderate
|
||||
|
||||
$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'tracker', 'where' => "topic_id=".$this->topic['tid'] ) );
|
||||
|
||||
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['ts_redirect'], "act=ST&f=".$this->forum['id']."&t=".$this->topic['tid']."&st=".$this->ipsclass->input['st'] );
|
||||
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['ts_redirect'], "showtopic=".$this->topic['tid']."&st=".intval($this->ipsclass->input['st']) );
|
||||
}
|
||||
|
||||
|
||||
@@ -3118,8 +3226,8 @@ class moderate
|
||||
|
||||
$this->page_title = $this->ipsclass->lang['t_move'].": ".$this->topic['title'];
|
||||
|
||||
$this->nav = array ( "<a href='{$this->base_url}&act=SF&f={$this->forum['id']}'>{$this->forum['name']}</a>",
|
||||
"<a href='{$this->base_url}&act=ST&f={$this->forum['id']}&t={$this->topic['tid']}'>{$this->topic['title']}</a>"
|
||||
$this->nav = array ( "<a href='{$this->base_url}showforum={$this->forum['id']}'>{$this->forum['name']}</a>",
|
||||
"<a href='{$this->base_url}showtopic={$this->topic['tid']}'>{$this->topic['title']}</a>"
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3167,9 +3275,12 @@ class moderate
|
||||
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'move_same_forum' ) );
|
||||
}
|
||||
|
||||
$source = intval($this->ipsclass->input['sf']);
|
||||
$moveto = intval($this->ipsclass->input['move_id']);
|
||||
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => 'id, sub_can_post, name, redirect_on', 'from' => 'forums', 'where' => "id IN(".$this->ipsclass->input['sf'].",".$this->ipsclass->input['move_id'].")" ) );
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => 'id, sub_can_post, name, redirect_on', 'from' => 'forums', 'where' => "id IN(".$source.",".$moveto.")" ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
if ($this->ipsclass->DB->get_num_rows() != 2)
|
||||
@@ -3177,9 +3288,6 @@ class moderate
|
||||
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'move_no_forum' ) );
|
||||
}
|
||||
|
||||
$source = intval($this->ipsclass->input['sf']);
|
||||
$moveto = intval($this->ipsclass->input['move_id']);
|
||||
|
||||
$source_name = "";
|
||||
$dest_name = "";
|
||||
|
||||
@@ -3218,7 +3326,7 @@ class moderate
|
||||
|
||||
$this->ipsclass->input['t'] = $this->topic['tid'];
|
||||
|
||||
$this->moderate_log("Òåìà ïåðåìåùåíà èç $source_name â $dest_name");
|
||||
$this->moderate_log( sprintf( $this->ipsclass->lang['acp_moved_a_topic'], $source_name, $dest_name ) );
|
||||
|
||||
// Resync the forums..
|
||||
|
||||
@@ -3228,7 +3336,7 @@ class moderate
|
||||
$this->modfunc->forum_recount($source);
|
||||
$this->modfunc->forum_recount($moveto);
|
||||
|
||||
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['p_moved'], "act=SF&f=".$this->forum['id'] );
|
||||
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['p_moved'], "showforum=".$this->forum['id'] );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
@@ -3303,7 +3411,7 @@ class moderate
|
||||
$this->modfunc->forum_recount( $this->forum['id'] );
|
||||
}
|
||||
|
||||
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['post_deleted'], "act=ST&f=".$this->forum['id']."&t=".$this->topic['tid']."&st=".$this->ipsclass->input['st'] );
|
||||
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['post_deleted'], "showtopic=".$this->topic['tid']."&st=".intval($this->ipsclass->input['st']) );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
@@ -3356,8 +3464,8 @@ class moderate
|
||||
|
||||
$this->page_title = $this->ipsclass->lang['t_delete'].": ".$this->topic['title'];
|
||||
|
||||
$this->nav = array ( "<a href='{$this->base_url}&act=SF&f={$this->forum['id']}'>{$this->forum['name']}</a>",
|
||||
"<a href='{$this->base_url}&act=ST&f={$this->forum['id']}&t={$this->topic['tid']}'>{$this->topic['title']}</a>"
|
||||
$this->nav = array ( "<a href='{$this->base_url}showforum={$this->forum['id']}'>{$this->forum['name']}</a>",
|
||||
"<a href='{$this->base_url}showtopic={$this->topic['tid']}'>{$this->topic['title']}</a>"
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3422,15 +3530,15 @@ class moderate
|
||||
$this->modfunc->forum_recount($this->forum['id']);
|
||||
$this->modfunc->forum_recount($this->trash_forum);
|
||||
|
||||
$this->moderate_log("Ïðèìåíåíà êîðçèíà äëÿ óäàëåíèÿ òåìû ñ íîìåðîì id:".$this->topic['tid']);
|
||||
$this->moderate_log("{$this->ipsclass->lang['acp_trashcan_a_topic']} ".$this->topic['tid']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->modfunc->topic_delete($this->topic['tid']);
|
||||
$this->moderate_log("Òåìà óäàëåíà");
|
||||
$this->moderate_log( $this->ipsclass->lang['acp_deleted_a_topic'] );
|
||||
}
|
||||
|
||||
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['p_deleted'], "act=SF&f=".$this->forum['id'] );
|
||||
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['p_deleted'], "showforum=".$this->forum['id'] );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
@@ -3473,8 +3581,8 @@ class moderate
|
||||
|
||||
$this->page_title = $this->ipsclass->lang['t_edit'].": ".$this->topic['title'];
|
||||
|
||||
$this->nav = array ( "<a href='{$this->base_url}&act=SF&f={$this->forum['id']}'>{$this->forum['name']}</a>",
|
||||
"<a href='{$this->base_url}&act=ST&f={$this->forum['id']}&t={$this->topic['tid']}'>{$this->topic['title']}</a>"
|
||||
$this->nav = array ( "<a href='{$this->base_url}showforum={$this->forum['id']}'>{$this->forum['name']}</a>",
|
||||
"<a href='{$this->base_url}showtopic={$this->topic['tid']}'>{$this->topic['title']}</a>"
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3512,8 +3620,8 @@ class moderate
|
||||
$this->ipsclass->Error( array( 'LEVEL' => 2, 'MSG' => 'no_topic_title' ) );
|
||||
}
|
||||
|
||||
$topic_title = preg_replace( "/'/", "/\\'/", $this->ipsclass->input['TopicTitle'] );
|
||||
$topic_desc = preg_replace( "/'/", "/\\'/", $this->ipsclass->input['TopicDesc'] );
|
||||
$topic_title = str_replace( "'", "\\\'", $this->ipsclass->input['TopicTitle'] );
|
||||
$topic_desc = str_replace( "'", "\\\'", $this->ipsclass->input['TopicDesc'] );
|
||||
|
||||
$this->ipsclass->DB->do_update( 'topics', array( 'title' => $topic_title, 'description' => $topic_desc ), 'tid='.$this->topic['tid'] );
|
||||
|
||||
@@ -3522,11 +3630,16 @@ class moderate
|
||||
$this->ipsclass->DB->do_update( 'forums', array( 'last_title' => $topic_title ), 'id='.$this->forum['id'] );
|
||||
}
|
||||
|
||||
if ($this->topic['tid'] == $this->forum['newest_id'])
|
||||
{
|
||||
$this->ipsclass->DB->do_update( 'forums', array( 'newest_title' => $topic_title ), 'id='.$this->forum['id'] );
|
||||
}
|
||||
|
||||
$this->ipsclass->update_forum_cache();
|
||||
|
||||
$this->moderate_log("Ìîäåðàòîð èçìåíèë çàãîëîâîê òåìû: (ID: {$this->topic['tid']}) èç '{$this->topic['title']}' â '$topic_title'");
|
||||
$this->moderate_log( sprintf( $this->ipsclass->lang['acp_edit_title'], $this->topic['tid'], $this->topic['title'], $topic_title ) );
|
||||
|
||||
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['p_edited'], "act=SF&f=".$this->forum['id'] );
|
||||
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['p_edited'], "showforum=".$this->forum['id'] );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
@@ -3569,9 +3682,9 @@ class moderate
|
||||
|
||||
$this->modfunc->topic_open($this->topic['tid']);
|
||||
|
||||
$this->moderate_log("Òåìà îòêðûòà");
|
||||
$this->moderate_log( $this->ipsclass->lang['acp_opened_topic'] );
|
||||
|
||||
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['p_opened'], "act=ST&f=".$this->forum['id']."&t=".$this->topic['tid']."&st=".$this->ipsclass->input['st'] );
|
||||
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['p_opened'], "showtopic=".$this->topic['tid']."&st=".intval($this->ipsclass->input['st']) );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
@@ -3609,9 +3722,9 @@ class moderate
|
||||
|
||||
$this->modfunc->topic_close($this->topic['tid']);
|
||||
|
||||
$this->moderate_log("Òåìà çàêðûòà");
|
||||
$this->moderate_log( $this->ipsclass->lang['acp_locked_topic'] );
|
||||
|
||||
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['p_closed'], "act=SF&f=".$this->forum['id'] );
|
||||
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['p_closed'], "showforum=".$this->forum['id'] );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
@@ -3644,9 +3757,9 @@ class moderate
|
||||
|
||||
$this->modfunc->topic_pin($this->topic['tid']);
|
||||
|
||||
$this->moderate_log("Òåìà «ïîäíÿòà»");
|
||||
$this->moderate_log( $this->ipsclass->lang['acp_pinned_topic'] );
|
||||
|
||||
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['p_pinned'], "showtopic=".$this->topic['tid']."&st=".$this->ipsclass->input['st'] );
|
||||
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['p_pinned'], "showtopic=".$this->topic['tid']."&st=".intval($this->ipsclass->input['st']) );
|
||||
|
||||
}
|
||||
|
||||
@@ -3680,9 +3793,9 @@ class moderate
|
||||
|
||||
$this->modfunc->topic_unpin($this->topic['tid']);
|
||||
|
||||
$this->moderate_log("Òåìà «îïóùåíà»");
|
||||
$this->moderate_log( $this->ipsclass->lang['acp_unpinned_topic'] );
|
||||
|
||||
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['p_unpinned'], "act=ST&f=".$this->forum['id']."&t=".$this->topic['tid']."&st=".$this->ipsclass->input['st'] );
|
||||
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['p_unpinned'], "showtopic=".$this->topic['tid']."&st=".intval($this->ipsclass->input['st']) );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
@@ -3697,11 +3810,11 @@ class moderate
|
||||
|
||||
if ( count($ids) < 1 )
|
||||
{
|
||||
$this->moderate_error('cp_err_no_topics');
|
||||
$this->moderate_error('cp_error_no_topics');
|
||||
return;
|
||||
}
|
||||
|
||||
$ids = $this->ipsclass->clean_int_array( $ids );
|
||||
|
||||
$ids = $this->ipsclass->clean_int_array( $ids );
|
||||
|
||||
return $ids;
|
||||
}
|
||||
@@ -3718,11 +3831,11 @@ class moderate
|
||||
|
||||
if ( count($ids) < 1 )
|
||||
{
|
||||
$this->moderate_error('cp_err_no_topics');
|
||||
$this->moderate_error('cp_error_no_topics');
|
||||
return;
|
||||
}
|
||||
|
||||
$ids = $this->ipsclass->clean_int_array( $ids );
|
||||
|
||||
$ids = $this->ipsclass->clean_int_array( $ids );
|
||||
|
||||
return $ids;
|
||||
}
|
||||
@@ -3746,8 +3859,6 @@ class moderate
|
||||
|
||||
function moderate_log($title = 'unknown')
|
||||
{
|
||||
global $HTTP_REFERER, $QUERY_STRING;
|
||||
|
||||
$this->modfunc->add_moderate_log( $this->ipsclass->input['f'], $this->ipsclass->input['t'], $this->ipsclass->input['p'], $this->topic['title'], $title );
|
||||
}
|
||||
|
||||
@@ -3784,7 +3895,7 @@ class moderate
|
||||
|
||||
if ( count( $additional_tags ) )
|
||||
{
|
||||
foreach( $additional_tags as $k => $v )
|
||||
foreach( $additional_tags as $v )
|
||||
{
|
||||
$form .= "\n<input type='hidden' name='{$v[0]}' value='{$v[1]}'>";
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user