Version 5.0.0 beta 1
This commit is contained in:
1 parent
25ddeb65d6
commit
15c7beabc5
6736 files changed
+627902
-497943
No files matched your search
@@ -12,25 +12,32 @@
|
||||
namespace IPS\forums\extensions\core\MobileNavigation;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
|
||||
use IPS\Application\Module;
|
||||
use IPS\core\MobileNavigation\MobileNavigationAbstract;
|
||||
use IPS\Http\Url;
|
||||
use IPS\Member;
|
||||
use function defined;
|
||||
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
header( ( $_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Mobile Navigation Extension: Topics
|
||||
*/
|
||||
class _Forums extends \IPS\core\MobileNavigation\MobileNavigationAbstract
|
||||
class Forums extends MobileNavigationAbstract
|
||||
{
|
||||
/**
|
||||
* Get Type Title which will display in the AdminCP Menu Manager
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function typeTitle()
|
||||
public static function typeTitle(): string
|
||||
{
|
||||
return \IPS\Member::loggedIn()->language()->addToStack('mobilenavigation_Forums');
|
||||
return Member::loggedIn()->language()->addToStack('mobilenavigation_Forums');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -38,9 +45,9 @@ class _Forums extends \IPS\core\MobileNavigation\MobileNavigationAbstract
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function canAccessContent()
|
||||
public function canAccessContent(): bool
|
||||
{
|
||||
return \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'forums', 'forums', 'front' ) );
|
||||
return Member::loggedIn()->canAccessModule( Module::get( 'forums', 'forums', 'front' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -48,19 +55,19 @@ class _Forums extends \IPS\core\MobileNavigation\MobileNavigationAbstract
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function title()
|
||||
public function title(): string
|
||||
{
|
||||
return \IPS\Member::loggedIn()->language()->addToStack('mobilenavigation_Forums');
|
||||
return Member::loggedIn()->language()->addToStack('mobilenavigation_Forums');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Link
|
||||
*
|
||||
* @return \IPS\Http\Url
|
||||
* @return Url|string
|
||||
*/
|
||||
public function link()
|
||||
public function link(): Url|string
|
||||
{
|
||||
return \IPS\Http\Url::internal( "app=forums&module=forums&controller=index&method=table", 'front', 'forums' );
|
||||
return Url::internal( "app=forums&module=forums&controller=index&method=table", 'front', 'forums' );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -68,7 +75,7 @@ class _Forums extends \IPS\core\MobileNavigation\MobileNavigationAbstract
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function icon()
|
||||
public function icon(): ?string
|
||||
{
|
||||
return 'LIST_ROWS';
|
||||
}
|
||||
|
||||
@@ -12,25 +12,32 @@
|
||||
namespace IPS\forums\extensions\core\MobileNavigation;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
|
||||
use IPS\Application\Module;
|
||||
use IPS\core\MobileNavigation\MobileNavigationAbstract;
|
||||
use IPS\Http\Url;
|
||||
use IPS\Member;
|
||||
use function defined;
|
||||
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
header( ( $_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Mobile Navigation Extension: Topics
|
||||
*/
|
||||
class _Topics extends \IPS\core\MobileNavigation\MobileNavigationAbstract
|
||||
class Topics extends MobileNavigationAbstract
|
||||
{
|
||||
/**
|
||||
* Get Type Title which will display in the AdminCP Menu Manager
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function typeTitle()
|
||||
public static function typeTitle(): string
|
||||
{
|
||||
return \IPS\Member::loggedIn()->language()->addToStack('mobilenavigation_Topics');
|
||||
return Member::loggedIn()->language()->addToStack('mobilenavigation_Topics');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -38,9 +45,9 @@ class _Topics extends \IPS\core\MobileNavigation\MobileNavigationAbstract
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function canAccessContent()
|
||||
public function canAccessContent(): bool
|
||||
{
|
||||
return \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'forums', 'forums', 'front' ) );
|
||||
return Member::loggedIn()->canAccessModule( Module::get( 'forums', 'forums', 'front' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -48,19 +55,19 @@ class _Topics extends \IPS\core\MobileNavigation\MobileNavigationAbstract
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function title()
|
||||
public function title(): string
|
||||
{
|
||||
return \IPS\Member::loggedIn()->language()->addToStack('mobilenavigation_Topics');
|
||||
return Member::loggedIn()->language()->addToStack('mobilenavigation_Topics');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Link
|
||||
*
|
||||
* @return \IPS\Http\Url
|
||||
* @return Url|string
|
||||
*/
|
||||
public function link()
|
||||
public function link(): Url|string
|
||||
{
|
||||
return \IPS\Http\Url::internal( "app=forums&module=forums&controller=index&method=fluid", 'front', 'forums' );
|
||||
return Url::internal( "app=forums&module=forums&controller=index&method=fluid", 'front', 'forums' );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -68,7 +75,7 @@ class _Topics extends \IPS\core\MobileNavigation\MobileNavigationAbstract
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function icon()
|
||||
public function icon(): ?string
|
||||
{
|
||||
return 'COMMENTS';
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user