Version 3.2.3

This commit is contained in:
Neo committed 2025-12-19 00:34:03 -08:00
1 parent ae5c01cc78
commit 78706903a2
2641 files changed
+228363 -201264

No files matched your search

File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionboard.com/">IP.Board</a>
<a href="http://www.invisionpower.com">IP.Board</a>
</body>
</html>
+60 -48
View File
@@ -3,18 +3,18 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.1.4
* IP.Board v3.2.3
* Primary controller
* Last Updated: $LastChangedDate: 2010-10-22 16:22:45 -0400 (Fri, 22 Oct 2010) $
* Last Updated: $LastChangedDate: 2011-09-16 07:16:26 -0400 (Fri, 16 Sep 2011) $
* </pre>
*
* @author $Author: ips_terabyte $
* @author $Author: mmecham $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/community/board/license.html
* @license This is NULLED!
* @package IP.Board
* @link http://www.invisionpower.com
* @link http://hatynka.in
* @since 14th May 2003
* @version $Rev: 7019 $
* @version $Rev: 9496 $
*/
/**
@@ -31,10 +31,10 @@ class ipsController
/**
* Registry reference
*
* @access private
* @access protected
* @var object
*/
private $registry;
protected $registry;
/**
* Command
@@ -48,7 +48,7 @@ class ipsController
* Constructor
*
* @access private
* @return void
* @return @e void
*/
private function __construct() { }
@@ -56,7 +56,7 @@ class ipsController
* Public facing function to run the controller
*
* @access public
* @return void
* @return @e void
*/
static public function run()
{
@@ -69,7 +69,7 @@ class ipsController
* Initialize ipsRegistry and this class
*
* @access protected
* @return void
* @return @e void
*/
protected function init()
{
@@ -81,7 +81,7 @@ class ipsController
* Handle the incoming request using the command resolver
*
* @access protected
* @return void
* @return @e void
*/
protected function handleRequest()
{
@@ -94,10 +94,18 @@ class ipsController
catch( Exception $e )
{
$msg = $e->getMessage();
/* An error occured, so throw a 404 */
try
{
/* The following patch prevents links such as /admin/index.php?adsess=123&app=anyrandomnamehere&module=login&do=login-complete from loading
an ACP error screen complete with wrapper, which may expose the applications that are installed to an end user.
This issue was reported by Christopher Truncer via the IPS ticket system. */
if( IN_ACP AND !$this->registry->member()->getProperty('member_id') )
{
$this->registry->getClass('output')->silentRedirect( ipsRegistry::$settings['base_url'] );
}
$this->registry->getClass('output')->showError( 'incorrect_furl', 404, null, null, 404 );
}
catch( Exception $e )
@@ -126,21 +134,20 @@ class ipsController_CommandResolver
/**#@+
* Internal strings to remember
*
* @access private
* @access protected
* @var string
*/
private static $base_cmd;
private static $ajax_cmd;
private static $default_cmd;
private static $modules_dir = 'modules_public';
private static $class_dir = 'public';
protected static $base_cmd;
protected static $default_cmd;
protected static $modules_dir = 'modules_public';
protected static $class_dir = 'public';
/**#@-*/
/**
* Constructor
*
* @access public
* @return void
* @return @e void
*/
public function __construct()
{
@@ -173,29 +180,36 @@ class ipsController_CommandResolver
{
throw new Exception( "The specified application has been disabled" );
}
if ( !IN_ACP and !IPSLib::moduleIsEnabled( $module, IPS_APP_COMPONENT ) and $module != 'ajax' )
{
throw new Exception( "The specified module has been disabled" );
}
/* Got a section? */
if ( ! $section )
{
if ( file_exists( $filepath . 'defaultSection.php' ) )
if ( is_file( $filepath . 'defaultSection.php' ) )
{
$DEFAULT_SECTION = '';
require( $filepath . 'defaultSection.php' );
include( $filepath . 'defaultSection.php' );/*noLibHook*/
if ( $DEFAULT_SECTION )
{
$section = $DEFAULT_SECTION;
ipsRegistry::$current_section = $section;
}
}
}
$_classname = self::$class_dir . '_' . IPS_APP_COMPONENT . '_' . $module . '_';
/* Rarely used, let's leave file_exists which is faster for non-existent files */
if ( file_exists( $filepath . 'manualResolver.php' ) )
{
$classname = IPSLib::loadActionOverloader( $filepath . 'manualResolver.php' , $_classname . 'manualResolver' );
}
else if ( file_exists( $filepath . $section . '.php' ) )
else if ( is_file( $filepath . $section . '.php' ) )
{
$classname = IPSLib::loadActionOverloader( $filepath . $section . '.php' , $_classname . $section );
}
@@ -245,7 +259,7 @@ abstract class ipsCommand
* Constructor
*
* @access public
* @return void
* @return @e void
*/
final public function __construct()
{
@@ -256,7 +270,7 @@ abstract class ipsCommand
*
* @access public
* @param object ipsRegistry reference
* @return void
* @return @e void
*/
public function makeRegistryShortcuts( ipsRegistry $registry )
{
@@ -270,6 +284,8 @@ abstract class ipsCommand
$this->memberData =& $this->registry->member()->fetchMemberData();
$this->cache = $this->registry->cache();
$this->caches =& $this->registry->cache()->fetchCaches();
$this->memberData = IPSMember::setUpModerator( $this->memberData );
}
/**
@@ -277,10 +293,11 @@ abstract class ipsCommand
*
* @access public
* @param object ipsRegistry reference
* @return void
* @return @e void
*/
public function execute( ipsRegistry $registry )
{
//$registry->getClass('class_permissions')
$this->makeRegistryShortcuts( $registry );
$this->doExecute( $registry );
}
@@ -290,14 +307,14 @@ abstract class ipsCommand
*
* @access protected
* @param object ipsRegistry reference
* @return void
* @return @e void
*/
protected abstract function doExecute( ipsRegistry $registry );
}
/**
* Abstract class for handling ajax requests
**/
*/
abstract class ipsAjaxCommand
@@ -314,7 +331,9 @@ abstract class ipsAjaxCommand
protected $request;
protected $lang;
protected $member;
protected $memberData;
protected $cache;
protected $caches;
protected $ajax;
/**#@-*/
@@ -322,12 +341,12 @@ abstract class ipsAjaxCommand
* Constructor
*
* @access public
* @return void
* @return @e void
*/
final public function __construct()
{
}
/**
* Magic function to catch all the ajax methods
*
@@ -335,20 +354,11 @@ abstract class ipsAjaxCommand
* @param string $func Function name being called
* @param array $arguments Array of parameters
* @return mixed
**/
*/
public function __call( $func, $arguments )
{
if( method_exists( $this->ajax, $func ) )
{
foreach( $arguments as $k => $v )
{
if( is_string( $v ) )
{
/* Remove unused hook comments */
// $arguments[$k] = preg_replace( "#<!--hook\.([^\>]+?)-->#", '', $arguments[$k] );
}
}
return call_user_func_array( array( $this->ajax, $func ), $arguments );
}
}
@@ -358,8 +368,8 @@ abstract class ipsAjaxCommand
*
* @access public
* @param object ipsRegistry reference
* @return void
**/
* @return @e void
*/
public function makeRegistryShortcuts( ipsRegistry $registry )
{
/* Make registry objects */
@@ -373,6 +383,8 @@ abstract class ipsAjaxCommand
$this->cache = $this->registry->cache();
$this->caches =& $this->registry->cache()->fetchCaches();
$this->memberData = IPSMember::setUpModerator( $this->memberData );
$classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classAjax.php', 'classAjax' );
$this->ajax = new $classToLoad();
@@ -385,10 +397,10 @@ abstract class ipsAjaxCommand
*
* @access public
* @param object ipsRegistry reference
* @return void
**/
* @return @e void
*/
public function execute( ipsRegistry $registry )
{
{
/* Setup Shortcuts First */
$this->makeRegistryShortcuts( $registry );
@@ -411,7 +423,7 @@ abstract class ipsAjaxCommand
*
* @access protected
* @param object ipsRegistry reference
* @return void
* @return @e void
*/
protected abstract function doExecute( ipsRegistry $registry );
}
@@ -424,7 +436,7 @@ class ipsCommand_default extends ipsCommand
*
* @access protected
* @param object ipsRegistry reference
* @return void
* @return @e void
*/
protected function doExecute( ipsRegistry $registry )
{
@@ -452,7 +464,7 @@ class ipsCommand_default extends ipsCommand
// Uh oh, this is a big one.. (no forums app)
//-----------------------------------------
if ( ! file_exists( $filepath ) )
if ( ! is_file( $filepath ) )
{
$this->registry->getClass('output')->showError( array( 'command_file_missing', $filepath ), 401100, null, null, 404 );
}
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff