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
@@ -11,35 +11,46 @@
|
||||
namespace IPS\core\modules\admin\activitystats;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
|
||||
use IPS\core\Statistics\Chart;
|
||||
use IPS\Dispatcher;
|
||||
use IPS\Dispatcher\Controller;
|
||||
use IPS\Http\Url;
|
||||
use IPS\Member;
|
||||
use IPS\Output;
|
||||
use IPS\Request;
|
||||
use IPS\Theme;
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Community Activity
|
||||
*/
|
||||
class _communityactivity extends \IPS\Dispatcher\Controller
|
||||
class communityactivity extends Controller
|
||||
{
|
||||
/**
|
||||
* @brief Has been CSRF-protected
|
||||
*/
|
||||
public static $csrfProtected = TRUE;
|
||||
public static bool $csrfProtected = TRUE;
|
||||
|
||||
/**
|
||||
* @brief Allow MySQL RW separation for efficiency
|
||||
*/
|
||||
public static $allowRWSeparation = TRUE;
|
||||
public static bool $allowRWSeparation = TRUE;
|
||||
|
||||
/**
|
||||
* Execute
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function execute()
|
||||
public function execute() : void
|
||||
{
|
||||
\IPS\Dispatcher::i()->checkAcpPermission( 'communityactivity_manage' );
|
||||
Dispatcher::i()->checkAcpPermission( 'communityactivity_manage' );
|
||||
parent::execute();
|
||||
}
|
||||
|
||||
@@ -49,20 +60,18 @@ class _communityactivity extends \IPS\Dispatcher\Controller
|
||||
* @return void
|
||||
* @note Activity includes posting, following, reacting
|
||||
*/
|
||||
protected function manage()
|
||||
protected function manage() : void
|
||||
{
|
||||
$chart = \IPS\core\Statistics\Chart::loadFromExtension( 'core', 'CommunityActivity' )->getChart( \IPS\Http\Url::internal( "app=core&module=activitystats&controller=communityactivity" ) );
|
||||
$chart = Chart::loadFromExtension( 'core', 'CommunityActivity' )->getChart( Url::internal( "app=core&module=activitystats&controller=communityactivity" ) );
|
||||
|
||||
if( \IPS\Request::i()->isAjax() )
|
||||
if( Request::i()->isAjax() )
|
||||
{
|
||||
\IPS\Output::i()->output = (string) $chart;
|
||||
Output::i()->output = (string) $chart;
|
||||
return;
|
||||
}
|
||||
|
||||
\IPS\Output::i()->title = \IPS\Member::loggedIn()->language()->addToStack('menu__core_activitystats_communityactivity');
|
||||
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate( 'stats' )->activitymessage();
|
||||
\IPS\Output::i()->output .= (string) $chart;
|
||||
Output::i()->title = Member::loggedIn()->language()->addToStack('menu__core_activitystats_communityactivity');
|
||||
Output::i()->output = Theme::i()->getTemplate( 'stats' )->activitymessage();
|
||||
Output::i()->output .= $chart;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user