Version 3.2.3
This commit is contained in:
1 parent
ae5c01cc78
commit
78706903a2
2641 files changed
+228363
-201264
No files matched your search
@@ -2,19 +2,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Forums application initialization
|
||||
* Last Updated: $LastChangedDate: 2010-10-20 09:03:17 -0400 (Wed, 20 Oct 2010) $
|
||||
* Last Updated: $LastChangedDate: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://www.invisionpower.com
|
||||
* @link http://hatynka.in
|
||||
* @since 14th May 2003
|
||||
* @version $Rev: 7003 $
|
||||
* @version $Rev: 8644 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
@@ -45,7 +45,7 @@ class app_class_forums
|
||||
* Constructor
|
||||
*
|
||||
* @param object ipsRegistry reference
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
public function __construct( ipsRegistry $registry )
|
||||
{
|
||||
@@ -64,7 +64,7 @@ class app_class_forums
|
||||
{
|
||||
try
|
||||
{
|
||||
require_once( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/class_forums.php" );
|
||||
require_once( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/class_forums.php" );/*noLibHook*/
|
||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . "/sources/classes/forums/admin_forum_functions.php", 'admin_forum_functions', 'forums' );
|
||||
|
||||
$this->registry->setClass( 'class_forums', new $classToLoad( $registry ) );
|
||||
@@ -94,31 +94,25 @@ class app_class_forums
|
||||
// the skins...
|
||||
//---------------------------------------------------
|
||||
|
||||
if ( isset( $_GET['showtopic'] ) AND $_GET['showtopic'] != '' )
|
||||
if ( !empty( $_GET['showtopic'] ) )
|
||||
{
|
||||
/* Load tagging stuff */
|
||||
if ( ! $this->registry->isClassLoaded('tags') )
|
||||
{
|
||||
require_once( IPS_ROOT_PATH . 'sources/classes/tags/bootstrap.php' );/*noLibHook*/
|
||||
$this->registry->setClass( 'tags', classes_tags_bootstrap::run( 'forums', 'topics' ) );
|
||||
}
|
||||
|
||||
$this->request['t'] = intval( $_GET['showtopic'] );
|
||||
|
||||
if ( $this->settings['cpu_watch_update'] AND $this->memberData['member_id'] )
|
||||
{
|
||||
$this->DB->build( array( 'select' => 't.*',
|
||||
'from' => array( 'topics' => 't' ),
|
||||
'where' => 't.tid=' . $this->request['t'],
|
||||
'add_join' => array( array( 'select' => 'w.trid as trackingTopic',
|
||||
'from' => array( 'tracker' => 'w' ),
|
||||
'where' => 'w.topic_id=t.tid AND w.member_id=' . $this->memberData['member_id'],
|
||||
'type' => 'left' ) ) ) );
|
||||
$this->DB->execute();
|
||||
|
||||
$topic = $this->DB->fetch();
|
||||
}
|
||||
else
|
||||
{
|
||||
$topic = $this->DB->buildAndFetch( array( 'select' => '*',
|
||||
'from' => 'topics',
|
||||
'where' => "tid=" . $this->request['t'],
|
||||
) );
|
||||
}
|
||||
|
||||
$this->DB->build( array( 'select' => 't.*',
|
||||
'from' => array( 'topics' => 't' ),
|
||||
'where' => 't.tid=' . $this->request['t'],
|
||||
'add_join' => array( $this->registry->tags->getCacheJoin( array( 'meta_id_field' => 't.tid' ) ) ) ) );
|
||||
$this->DB->execute();
|
||||
|
||||
$topic = $this->DB->fetch();
|
||||
|
||||
$this->registry->getClass('class_forums')->topic_cache = $topic;
|
||||
|
||||
$this->request['f'] = $topic['forum_id'];
|
||||
@@ -139,11 +133,11 @@ class app_class_forums
|
||||
/**
|
||||
* Do some set up after ipsRegistry::init()
|
||||
*
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
public function afterOutputInit()
|
||||
{
|
||||
if ( isset( $_GET['showtopic'] ) AND $_GET['showtopic'] != '' AND is_array( $this->registry->getClass('class_forums')->topic_cache ) )
|
||||
if ( !empty( $_GET['showtopic'] ) AND is_array( $this->registry->getClass('class_forums')->topic_cache ) )
|
||||
{
|
||||
$topic = $this->registry->getClass('class_forums')->topic_cache;
|
||||
|
||||
@@ -165,7 +159,7 @@ class app_class_forums
|
||||
/* Store root doc URL */
|
||||
$this->registry->getClass('output')->storeRootDocUrl( $this->registry->getClass('output')->buildSEOUrl( 'showtopic=' . $topic['tid'], 'publicNoSession', $topic['title_seo'], 'showtopic' ) );
|
||||
}
|
||||
else if ( isset( $_GET['showforum'] ) AND $_GET['showforum'] != '' )
|
||||
else if ( !empty( $_GET['showforum'] ) )
|
||||
{
|
||||
$_GET['showforum'] = intval($_GET['showforum']);
|
||||
ipsRegistry::$request['showforum'] = intval(ipsRegistry::$request['showforum']);
|
||||
@@ -192,11 +186,8 @@ class app_class_forums
|
||||
$this->registry->getClass('output')->storeRootDocUrl( $this->registry->getClass('output')->buildSEOUrl( 'showforum=' . $data['id'], 'publicNoSession', $data['name_seo'], 'showforum' ) );
|
||||
}
|
||||
}
|
||||
else if ( isset( $_GET['showannouncement'] ) AND $_GET['showannouncement'] != '' )
|
||||
else if ( !empty( $_GET['showannouncement'] ) )
|
||||
{
|
||||
//$announce = $this->DB->buildAndFetch( array( 'select' => 'announce_id, announce_title',
|
||||
// 'from' => 'announcements',
|
||||
// 'where' => 'announce_id=' . intval( $_GET['showannouncement'] ) ) );
|
||||
$announce = $this->caches['announcements'][ intval( $_GET['showannouncement'] ) ];
|
||||
|
||||
if ( $announce['announce_id'] )
|
||||
|
||||
Reference in new issue
Block a user