Version 4.5.0

This commit is contained in:
Neo committed 2025-12-19 05:51:58 -08:00
1 parent 1a0c7fd3c2
commit f79dcf067a
3791 files changed
+248032 -76372

No files matched your search

@@ -31,11 +31,24 @@ class _facebook extends \IPS\Dispatcher\Controller
{
if ( ! \IPS\Member::loggedIn()->member_id )
{
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( "app=core&module=system&controller=login", 'front', 'login' )->setQueryString( 'ref', base64_encode( \IPS\Http\Url::internal( 'app=core&module=system&controller=facebook' ) ) ) );
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( "app=core&module=system&controller=login", 'front', 'login' )->addRef( \IPS\Http\Url::internal( 'app=core&module=system&controller=facebook' ) ) );
}
/* Check the member has permission to manage promote settings */
if ( ! \IPS\Member::loggedIn()->hasAcpRestriction( 'core', 'promotion', 'promote_manage' ) )
{
\IPS\Output::i()->error( 'no_module_permission', '3C396/1', 403, '' );
}
$promote = \IPS\core\Promote::getPromoter( 'Facebook' );
$facebook = $promote::getLoginHandler();
/* Required handler present and enabled? */
if( $facebook === NULL )
{
\IPS\Output::i()->error( 'promote_facebook_setup_app', '3C396/2', 403, '' );
}
$url = \IPS\Http\Url::internal( 'app=core&module=system&controller=facebook' );
try
@@ -48,7 +61,7 @@ class _facebook extends \IPS\Dispatcher\Controller
'response_type' => 'code',
'redirect_uri' => (string) \IPS\Http\Url::internal( 'oauth/callback/', 'none' ),
'state' => $facebook->id . '-' . base64_encode( $url ) . '-' . \IPS\Session::i()->csrfKey . '-x',
'scope' => 'manage_pages publish_pages publish_to_groups'
'scope' => 'manage_pages publish_pages'
) );
\IPS\Output::i()->redirect( $target );