Version 4.6.0
This commit is contained in:
1 parent
f79dcf067a
commit
517a5e1f70
2036 files changed
+110041
-26162
No files matched your search
@@ -157,7 +157,23 @@ class _Application extends \IPS\Application
|
||||
/* Save installed domain to spam defense whitelist */
|
||||
$domain = rtrim( str_replace( 'www.', '', parse_url( \IPS\Settings::i()->base_url, PHP_URL_HOST ) ), '/' );
|
||||
\IPS\Db::i()->insert( 'core_spam_whitelist', array( 'whitelist_type' => 'domain', 'whitelist_content' => $domain, 'whitelist_date' => time(), 'whitelist_reason' => 'Invision Community Domain' ) );
|
||||
|
||||
|
||||
/* Generate VAPID keys for web push notifications */
|
||||
try
|
||||
{
|
||||
$vapid = \IPS\Notification::generateVapidKeys();
|
||||
\IPS\Settings::i()->changeValues( array( 'vapid_public_key' => $vapid['publicKey'], 'vapid_private_key' => $vapid['privateKey'] ) );
|
||||
}
|
||||
catch (\Exception $ex)
|
||||
{
|
||||
\IPS\Log::log( $ex, 'create_vapid_keys' );
|
||||
}
|
||||
|
||||
/* Install default ranks, rules and badges */
|
||||
\IPS\core\Achievements\Rule::importXml( $this->getApplicationPath() . "/data/achievements/rules.xml" );
|
||||
\IPS\core\Achievements\Rank::importXml( $this->getApplicationPath() . "/data/achievements/ranks.xml" );
|
||||
\IPS\core\Achievements\Badge::importXml( $this->getApplicationPath() . "/data/achievements/badges.xml" );
|
||||
|
||||
if ( \IPS\CIC2 )
|
||||
{
|
||||
\IPS\Cicloud\postInstall();
|
||||
@@ -177,7 +193,8 @@ class _Application extends \IPS\Application
|
||||
return (
|
||||
$module->key == 'system'
|
||||
and
|
||||
\in_array( $controller, array( 'login', 'register', 'lostpass', 'terms', 'ajax', 'privacy', 'editor', 'language', 'theme', 'redirect', 'guidelines', 'announcement', 'metatags', 'marketplace' ) )
|
||||
\in_array( $controller, array( 'login', 'register', 'lostpass', 'terms', 'ajax', 'privacy', 'editor',
|
||||
'language', 'theme', 'redirect', 'guidelines', 'announcement', 'metatags', 'marketplace', 'serviceworker', 'offline' ) )
|
||||
)
|
||||
or
|
||||
(
|
||||
@@ -207,12 +224,16 @@ class _Application extends \IPS\Application
|
||||
'announcement', // Announcements can be useful when the site is offline
|
||||
'redirect', // When email tracking is enabled we pass through here
|
||||
'marketplace', // Remote services needs to send data back
|
||||
'metatags', // Manifest
|
||||
'serviceworker', // Service Worker
|
||||
'offline', // Service Worker offline page
|
||||
) )
|
||||
or
|
||||
(
|
||||
$controller === 'ajax' and
|
||||
( $do === 'states' OR // Makes sure address input still works within the ACP otherwise the form to turn site back online is broken
|
||||
$do === 'passwordStrength' ) // Makes sure the password strength meter still works because it is used in the AdminCP and registration
|
||||
$do === 'passwordStrength' OR // Makes sure the password strength meter still works because it is used in the AdminCP and registration
|
||||
$do === 'getCsrfKey' ) // Makes sure we can still fetch the correct CSRF key for the ajax replacement
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user