Version 4.1.19
This commit is contained in:
1 parent
28bd025b35
commit
2bd5025018
2674 files changed
+233518
-77766
No files matched your search
@@ -2,9 +2,9 @@
|
||||
/**
|
||||
* @brief Abstract class that Controllers should extend
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @package IPS Community Suite
|
||||
* @since 18 Feb 2013
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
@@ -60,7 +60,7 @@ abstract class _Controller
|
||||
{
|
||||
if ( method_exists( $this, $method ) )
|
||||
{
|
||||
return call_user_func( array( $this, $method ) );
|
||||
return $this->$method();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -82,7 +82,8 @@ abstract class _Controller
|
||||
{
|
||||
if ( method_exists( $this, \IPS\Request::i()->do ) or method_exists( $this, '__call' ) )
|
||||
{
|
||||
call_user_func( array( $this, \IPS\Request::i()->do ) );
|
||||
$method = \IPS\Request::i()->do;
|
||||
$this->$method();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -91,7 +92,14 @@ abstract class _Controller
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->manage();
|
||||
if ( method_exists( $this, 'manage' ) or method_exists( $this, '__call' ) )
|
||||
{
|
||||
$this->manage();
|
||||
}
|
||||
else
|
||||
{
|
||||
\IPS\Output::i()->error( 'page_not_found', '2S106/2', 404, '' );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,19 +128,20 @@ abstract class _Controller
|
||||
$commentClass = $class::$commentClass;
|
||||
if ( isset( $class::$archiveClass ) )
|
||||
{
|
||||
$item = call_user_func( array( $class, 'loadAndCheckPerms' ), \IPS\Request::i()->id );
|
||||
$item = $class::loadAndCheckPerms( \IPS\Request::i()->id );
|
||||
if ( $item->isArchived() )
|
||||
{
|
||||
$commentClass = $class::$archiveClass;
|
||||
}
|
||||
}
|
||||
|
||||
$content = call_user_func( array( $commentClass, 'loadAndCheckPerms' ), \IPS\Request::i()->embedComment );
|
||||
$content = $commentClass::loadAndCheckPerms( \IPS\Request::i()->embedComment );
|
||||
$title = $content->item()->mapped('title');
|
||||
}
|
||||
elseif( \IPS\Request::i()->embedReview )
|
||||
{
|
||||
$content = call_user_func( array( $class::$reviewClass, 'loadAndCheckPerms' ), \IPS\Request::i()->embedReview );
|
||||
$reviewClass = $class::$reviewClass;
|
||||
$content = $reviewClass::loadAndCheckPerms( \IPS\Request::i()->embedReview );
|
||||
$title = $content->item()->mapped('title');
|
||||
}
|
||||
else
|
||||
@@ -146,7 +155,7 @@ abstract class _Controller
|
||||
$params['do'] = \IPS\Request::i()->embedDo;
|
||||
}
|
||||
|
||||
$content = call_user_func( array( $class, 'loadAndCheckPerms' ), \IPS\Request::i()->id );
|
||||
$content = $class::loadAndCheckPerms( \IPS\Request::i()->id );
|
||||
$title = $content instanceof \IPS\Node\Model ? $content->_title : $content->mapped('title');
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user