Version 4.3.0
This commit is contained in:
1 parent
96997ddd8e
commit
fe1acf984a
1349 files changed
+116159
-67711
No files matched your search
@@ -1,25 +0,0 @@
|
||||
//<?php
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
class nexus_hook_allowStoreRegistrationGuests extends _HOOK_CLASS_
|
||||
{
|
||||
/**
|
||||
* Define that the page should load even if the user is banned and not logged in
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function notAllowedBannedPage()
|
||||
{
|
||||
if( $this->application->directory == 'nexus' AND \IPS\Settings::i()->nexus_reg_force AND ( $this->module->key == 'store' OR $this->module->key == 'checkout' ) )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return parent::notAllowedBannedPage();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
//<?php
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
class nexus_hook_frontDispatcher extends _HOOK_CLASS_
|
||||
{
|
||||
/**
|
||||
* Output the basic javascript files every page needs
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected static function baseJs()
|
||||
{
|
||||
parent::baseJs();
|
||||
|
||||
if ( !\IPS\Request::i()->isAjax() )
|
||||
{
|
||||
if ( \IPS\Settings::i()->gateways_counts and $decoded = json_decode( \IPS\Settings::i()->gateways_counts, TRUE ) and isset( $decoded['Stripe'] ) and $decoded['Stripe'] > 0 )
|
||||
{
|
||||
\IPS\Output::i()->jsFiles[] = 'https://js.stripe.com/v3/';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,11 +14,15 @@ class nexus_hook_register extends _HOOK_CLASS_
|
||||
* @return void
|
||||
*/
|
||||
protected function manage()
|
||||
{
|
||||
if ( \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'nexus', 'store' ) ) and ( \IPS\Settings::i()->nexus_reg_force or ( !isset( \IPS\Request::i()->noPurchase ) and \IPS\Db::i()->select( 'COUNT(*)', 'nexus_packages', 'p_reg=1' )->first() ) ) )
|
||||
{
|
||||
if ( \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'nexus', 'store' ) ) and ( \IPS\Settings::i()->nexus_reg_force or !isset( \IPS\Request::i()->noPurchase ) ) and \IPS\Db::i()->select( 'COUNT(*)', 'nexus_packages', 'p_reg=1' )->first() )
|
||||
{
|
||||
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( 'app=nexus&module=store&controller=store&do=register', 'front', 'store' ) );
|
||||
}
|
||||
else if ( \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'nexus', 'subscriptions' ) ) and ( \IPS\Settings::i()->nexus_subs_register ) )
|
||||
{
|
||||
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( 'app=nexus&module=subscriptions&controller=subscriptions®ister=1', 'front', 'nexus_subscriptions' ) );
|
||||
}
|
||||
|
||||
return call_user_func_array( 'parent::manage', func_get_args() );
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user