Version 2.3.6
This commit is contained in:
1 parent
a3bb603c96
commit
19b38c7c74
764 files changed
+143731
-118164
No files matched your search
@@ -2,25 +2,17 @@
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.2.2
|
||||
| Invision Power Board
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Monday 05th of March 2007 10:10:54 PM
|
||||
| Release: e3790216629e5a2aaf37070b32237f06
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
| http://www.ibresource.ru/license
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
|
||||
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
|
||||
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2006-11-13 15:22:45 -0600 (Mon, 13 Nov 2006) $
|
||||
| > $Revision: 726 $
|
||||
| > $Date: 2007-12-17 18:07:20 -0500 (Mon, 17 Dec 2007) $
|
||||
| > $Revision: 1149 $
|
||||
| > $Author: bfarber $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
@@ -33,15 +25,14 @@
|
||||
*/
|
||||
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Íåâåðíûé âõîä</h1> Ó Âàñ íåò äîñòóïà ê äèðåêòèâå ýòîãî ôàéëà. Åñëè âû ïðîâîäèëè îáíîâëåíèÿ, óáåäèòåñü, ÷òî íå çàáûëè îáíîâèòü 'admin.php'.";
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly.";
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
class func_digest
|
||||
{
|
||||
# Global
|
||||
@@ -106,6 +97,9 @@ class func_digest
|
||||
$this->email = new emailer($this->root_path);
|
||||
$this->email->ipsclass =& $this->ipsclass;
|
||||
$this->email->email_init();
|
||||
|
||||
$this->ipsclass->forums->strip_invisible = 0;
|
||||
$this->ipsclass->forums->forums_init();
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
@@ -155,13 +149,90 @@ class func_digest
|
||||
|
||||
while( $t = $this->ipsclass->DB->fetch_row( $topic_query ) )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Test for group permissions
|
||||
//-----------------------------------------
|
||||
|
||||
$mgroup_others = "";
|
||||
$temp_mgroups = array();
|
||||
$mgroup_perms = array();
|
||||
|
||||
if( $t['mgroup_others'] )
|
||||
{
|
||||
$t['mgroup_others'] = $this->ipsclass->clean_perm_string( $t['mgroup_others'] );
|
||||
$temp_mgroups = explode( ",", $t['mgroup_others'] );
|
||||
|
||||
if( count($temp_mgroups) )
|
||||
{
|
||||
foreach( $temp_mgroups as $other_mgroup )
|
||||
{
|
||||
$mgroup_perms[] = $this->ipsclass->cache['group_cache'][ $other_mgroup ]['g_perm_id'];
|
||||
}
|
||||
}
|
||||
|
||||
if( count($mgroup_perms) )
|
||||
{
|
||||
$mgroup_others = ",".implode( ",", $mgroup_perms ).",";
|
||||
}
|
||||
}
|
||||
|
||||
$perm_id = ( $t['org_perm_id'] ) ? $t['org_perm_id'] : $this->ipsclass->cache['group_cache'][ $t['mgroup'] ]['g_perm_id'].$mgroup_others;
|
||||
|
||||
if ( $this->ipsclass->forums->forum_by_id[ $t['forum_id'] ]['read_perms'] != '*' )
|
||||
{
|
||||
if ( ! preg_match("/(^|,)".str_replace( ",", '|', $perm_id )."(,|$)/", $this->ipsclass->forums->forum_by_id[ $t['forum_id'] ]['read_perms'] ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Test for approved/approve perms
|
||||
//-----------------------------------------
|
||||
|
||||
if( $t['approved'] == 0 )
|
||||
{
|
||||
$mod = 0;
|
||||
|
||||
if( $this->ipsclass->cache['group_cache'][$t['mgroup']]['g_is_supmod'] == 1 )
|
||||
{
|
||||
$mod = 1;
|
||||
}
|
||||
else if ( count($this->ipsclass->cache['moderators']) )
|
||||
{
|
||||
$other_mgroups = array();
|
||||
|
||||
if( $t['mgroup_others'] )
|
||||
{
|
||||
$other_mgroups = explode( ",", $this->ipsclass->clean_perm_string( $t['mgroup_others'] ) );
|
||||
}
|
||||
|
||||
foreach( $this->ipsclass->cache['moderators'] as $moderators )
|
||||
{
|
||||
if ( $moderators['member_id'] == $t['id'] or $moderators['group_id'] == $t['mgroup'] )
|
||||
{
|
||||
$mod = 1;
|
||||
}
|
||||
else if( count($other_mgroups) AND in_array( $moderators['group_id'], $other_mgroups ) )
|
||||
{
|
||||
$mod = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( $mod == 0 )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
$main_output = "";
|
||||
$others_posted = 0;
|
||||
|
||||
if ( ! $cached[ $t['tid'] ] )
|
||||
{
|
||||
$topic_title = $t['title'];
|
||||
$forum_name = $this->ipsclass->cache['forum_cache'][ $t['forum_id'] ]['name'];
|
||||
$forum_name = $this->ipsclass->forums->forum_by_id[ $t['forum_id'] ]['name'];
|
||||
|
||||
//-----------------------------------------
|
||||
// Get posts...
|
||||
@@ -282,12 +353,50 @@ class func_digest
|
||||
|
||||
while( $t = $this->ipsclass->DB->fetch_row( $forum_query ) )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Test for group permissions
|
||||
//-----------------------------------------
|
||||
|
||||
$mgroup_others = "";
|
||||
$temp_mgroups = array();
|
||||
$mgroup_perms = array();
|
||||
|
||||
if( $t['mgroup_others'] )
|
||||
{
|
||||
$t['mgroup_others'] = $this->ipsclass->clean_perm_string( $t['mgroup_others'] );
|
||||
$temp_mgroups = explode( ",", $t['mgroup_others'] );
|
||||
|
||||
if( count($temp_mgroups) )
|
||||
{
|
||||
foreach( $temp_mgroups as $other_mgroup )
|
||||
{
|
||||
$mgroup_perms[] = $this->ipsclass->cache['group_cache'][ $other_mgroup ]['g_perm_id'];
|
||||
}
|
||||
}
|
||||
|
||||
if( count($mgroup_perms) )
|
||||
{
|
||||
$mgroup_others = ",".implode( ",", $mgroup_perms ).",";
|
||||
}
|
||||
}
|
||||
|
||||
$perm_id = ( $t['org_perm_id'] ) ? $t['org_perm_id'] : $this->ipsclass->cache['group_cache'][ $t['mgroup'] ]['g_perm_id'].$mgroup_others;
|
||||
|
||||
if ( $this->ipsclass->forums->forum_by_id[ $t['forum_id'] ]['read_perms'] != '*' )
|
||||
{
|
||||
if ( ! preg_match("/(^|,)".str_replace( ",", '|', $perm_id )."(,|$)/", $this->ipsclass->forums->forum_by_id[ $t['forum_id'] ]['read_perms'] ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$main_output = "";
|
||||
$others_posted = 0;
|
||||
|
||||
if ( !isset($cached[ $t['forum_id'] ]) OR !$cached[ $t['forum_id'] ] )
|
||||
{
|
||||
$forum_name = $this->ipsclass->cache['forum_cache'][ $t['forum_id'] ]['name'];
|
||||
$forum_name = $this->ipsclass->forums->forum_by_id[ $t['forum_id'] ]['name'];
|
||||
|
||||
//-----------------------------------------
|
||||
// Get topics...
|
||||
@@ -303,6 +412,46 @@ class func_digest
|
||||
|
||||
while( $p = $this->ipsclass->DB->fetch_row( $topic_query ) )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Test for approved/approve perms
|
||||
//-----------------------------------------
|
||||
|
||||
if( $p['approved'] == 0 )
|
||||
{
|
||||
$mod = 0;
|
||||
|
||||
if( $this->ipsclass->cache['group_cache'][$t['mgroup']]['g_is_supmod'] == 1 )
|
||||
{
|
||||
$mod = 1;
|
||||
}
|
||||
else if ( count($this->ipsclass->cache['moderators']) )
|
||||
{
|
||||
$other_mgroups = array();
|
||||
|
||||
if( $t['mgroup_others'] )
|
||||
{
|
||||
$other_mgroups = explode( ",", $this->ipsclass->clean_perm_string( $t['mgroup_others'] ) );
|
||||
}
|
||||
|
||||
foreach( $this->ipsclass->cache['moderators'] as $moderators )
|
||||
{
|
||||
if ( $moderators['member_id'] == $t['id'] or $moderators['group_id'] == $t['mgroup'] )
|
||||
{
|
||||
$mod = 1;
|
||||
}
|
||||
else if( count($other_mgroups) AND in_array( $moderators['group_id'], $other_mgroups ) )
|
||||
{
|
||||
$mod = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( $mod == 0 )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
$this->ipsclass->DB->cache_add_query( 'digest_get_forums_topics_posts', array(
|
||||
'tid' => $p['tid'],
|
||||
), 'sql_extra_queries' );
|
||||
|
||||
Reference in new issue
Block a user