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\core;
|
||||
|
||||
/* 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;
|
||||
@@ -53,7 +53,7 @@ class _FrontNavigation
|
||||
{
|
||||
if( static::$instance === NULL )
|
||||
{
|
||||
$classname = get_called_class();
|
||||
$classname = \get_called_class();
|
||||
static::$instance = new $classname;
|
||||
}
|
||||
|
||||
@@ -72,13 +72,13 @@ class _FrontNavigation
|
||||
{
|
||||
$frontNavigation = array( 0 => array(), 1 => array() );
|
||||
$select = \IPS\Db::i()->select( '*', 'core_menu', NULL, 'position' );
|
||||
if ( count( $select ) )
|
||||
if ( \count( $select ) )
|
||||
{
|
||||
foreach ( $select as $item )
|
||||
{
|
||||
if ( \IPS\Application::appIsEnabled( $item['app'] ) )
|
||||
{
|
||||
$frontNavigation[ intval( $item['parent'] ) ][ $item['id'] ] = $item;
|
||||
$frontNavigation[ \intval( $item['parent'] ) ][ $item['id'] ] = $item;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -144,6 +144,7 @@ class _FrontNavigation
|
||||
'parent' => NULL,
|
||||
'permissions' => NULL,
|
||||
) );
|
||||
\IPS\Lang::saveCustom( 'core', "menu_item_1", \IPS\Member::loggedIn()->language()->get('default_menu_item_1') );
|
||||
|
||||
/* Activity */
|
||||
\IPS\Db::i()->insert( 'core_menu', array(
|
||||
@@ -155,6 +156,7 @@ class _FrontNavigation
|
||||
'parent' => NULL,
|
||||
'permissions' => NULL,
|
||||
) );
|
||||
\IPS\Lang::saveCustom( 'core', "menu_item_2", \IPS\Member::loggedIn()->language()->get('default_menu_item_2') );
|
||||
|
||||
/* Loop */
|
||||
$waiting = array();
|
||||
@@ -219,7 +221,7 @@ class _FrontNavigation
|
||||
'app' => $config['app'],
|
||||
'extension' => $config['key'],
|
||||
'config' => json_encode( isset( $config['config'] ) ? $config['config'] : array() ),
|
||||
'position' => ( intval( $position ) + 1 ),
|
||||
'position' => ( \intval( $position ) + 1 ),
|
||||
'parent' => $parent,
|
||||
'permissions' => NULL,
|
||||
'is_menu_child' => $isMenuChild,
|
||||
@@ -294,7 +296,7 @@ class _FrontNavigation
|
||||
$this->subBars = array();
|
||||
$frontNavigation = static::frontNavigation( $noStore );
|
||||
$parentIDs = array();
|
||||
// Changed so that empty sub bars don't add an array to their parent, allowing us to do count( $subBars ) and figure
|
||||
// Changed so that empty sub bars don't add an array to their parent, allowing us to do \count( $subBars ) and figure
|
||||
// out if there's any to show.
|
||||
foreach ( $frontNavigation[0] as $item )
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
namespace IPS\core\FrontNavigation;
|
||||
|
||||
/* 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;
|
||||
@@ -59,7 +59,7 @@ abstract class _FrontNavigationAbstract
|
||||
/**
|
||||
* Allow multiple instances?
|
||||
*
|
||||
* @return string
|
||||
* @return bool
|
||||
*/
|
||||
public static function allowMultiple()
|
||||
{
|
||||
@@ -69,8 +69,8 @@ abstract class _FrontNavigationAbstract
|
||||
/**
|
||||
* Get configuration fields
|
||||
*
|
||||
* @param array $configuration The existing configuration, if editing an existing item
|
||||
* @param int $id The ID number of the existing item, if editing
|
||||
* @param array $existingConfiguration The existing configuration, if editing an existing item
|
||||
* @param int $id The ID number of the existing item, if editing
|
||||
* @return array
|
||||
*/
|
||||
public static function configuration( $existingConfiguration, $id = NULL )
|
||||
@@ -82,6 +82,7 @@ abstract class _FrontNavigationAbstract
|
||||
* Parse configuration fields
|
||||
*
|
||||
* @param array $configuration The values received from the form
|
||||
* @param int $id The ID number of the existing item, if editing
|
||||
* @return array
|
||||
*/
|
||||
public static function parseConfiguration( $configuration, $id )
|
||||
|
||||
Whitespace-only changes.
Reference in new issue
Block a user