Version 4.5.0
This commit is contained in:
1 parent
1a0c7fd3c2
commit
f79dcf067a
3791 files changed
+248032
-76372
No files matched your search
@@ -12,7 +12,7 @@
|
||||
namespace IPS\cms\Databases;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
@@ -72,7 +72,7 @@ class _Dispatcher extends \IPS\Dispatcher
|
||||
public function setDatabase( $databaseId )
|
||||
{
|
||||
/* Other areas rely on $this->databaseId being numeric */
|
||||
if ( ! is_numeric( $databaseId ) )
|
||||
if ( !\is_numeric( $databaseId ) )
|
||||
{
|
||||
$database = \IPS\cms\Databases::load( $databaseId, 'database_key' );
|
||||
$databaseId = $database->id;
|
||||
@@ -133,7 +133,7 @@ class _Dispatcher extends \IPS\Dispatcher
|
||||
{
|
||||
foreach( json_decode( $item['area_widgets'], TRUE ) as $block )
|
||||
{
|
||||
if ( $block['key'] === 'Database' and isset( $block['configuration']['database'] ) and intval( $block['configuration']['database'] ) === $this->databaseId )
|
||||
if ( $block['key'] === 'Database' and isset( $block['configuration']['database'] ) and \intval( $block['configuration']['database'] ) === $this->databaseId )
|
||||
{
|
||||
\IPS\cms\Pages\Page::$currentPage = \IPS\cms\Pages\Page::load( \IPS\Request::i()->pageID );
|
||||
}
|
||||
@@ -171,7 +171,9 @@ class _Dispatcher extends \IPS\Dispatcher
|
||||
{
|
||||
$path = '';
|
||||
}
|
||||
|
||||
|
||||
list( $path, $pageNumber ) = \IPS\cms\Pages\Page::getStrippedPagePath( $path );
|
||||
|
||||
$this->databaseId = $database->id;
|
||||
|
||||
if ( ! $database->use_categories )
|
||||
@@ -184,7 +186,7 @@ class _Dispatcher extends \IPS\Dispatcher
|
||||
{
|
||||
$this->module = 'category';
|
||||
}
|
||||
else if ( isset( \IPS\Request::i()->c ) AND is_numeric( \IPS\Request::i()->c ) )
|
||||
else if ( isset( \IPS\Request::i()->c ) AND \is_numeric( \IPS\Request::i()->c ) )
|
||||
{
|
||||
$this->categoryId = \IPS\Request::i()->c;
|
||||
$this->module = 'category';
|
||||
@@ -347,7 +349,7 @@ class _Dispatcher extends \IPS\Dispatcher
|
||||
$paramsToSet[ $k ] = $v;
|
||||
}
|
||||
}
|
||||
if ( count( $paramsToSet ) )
|
||||
if ( \count( $paramsToSet ) )
|
||||
{
|
||||
$correctUrl = $correctUrl->setQueryString( $paramsToSet );
|
||||
}
|
||||
@@ -362,6 +364,6 @@ class _Dispatcher extends \IPS\Dispatcher
|
||||
*/
|
||||
public function finish()
|
||||
{
|
||||
return (string) $this->output;
|
||||
return (string) $this->output ?: \IPS\Output::i()->output;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user