Version 4.7.13
This commit is contained in:
1 parent
fd22d99e69
commit
7124a02564
954 files changed
+29277
-59308
No files matched your search
@@ -57,6 +57,10 @@ class _Application extends \IPS\Application
|
||||
}
|
||||
return $this->clubs;
|
||||
|
||||
case 'privacy':
|
||||
$where = ['action IN (?)', \IPS\Db::i()->in('action', [\IPS\Member\PrivacyAction::TYPE_REQUEST_DELETE, \IPS\Member\PrivacyAction::TYPE_REQUEST_PII] ) ];
|
||||
return \IPS\Db::i()->select( 'COUNT(*)', 'core_member_privacy_actions', $where)->first();
|
||||
|
||||
case 'themes':
|
||||
case 'applications':
|
||||
case 'plugins':
|
||||
@@ -80,6 +84,7 @@ class _Application extends \IPS\Application
|
||||
{
|
||||
unset( $menu['support'] );
|
||||
}
|
||||
|
||||
|
||||
$categories = ( new \IPS\core\modules\admin\marketplace\marketplace )->hierarchicalCategoryTree();
|
||||
|
||||
@@ -124,7 +129,17 @@ class _Application extends \IPS\Application
|
||||
'restriction' => 'licensekey_manage'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/* Add Community Hive */
|
||||
$menu['communityhive']['settings'] = array(
|
||||
'tab' => 'community',
|
||||
'module_url' => 'applications',
|
||||
'controller' => 'enhancements',
|
||||
'do' => 'edit&id=core_Hive',
|
||||
'restriction' => 'enhancements_manage',
|
||||
'menu_checks' => [ 'app' => 'ipshive' ] //intentionally bogus app
|
||||
);
|
||||
|
||||
return $menu;
|
||||
}
|
||||
|
||||
@@ -199,7 +214,7 @@ class _Application extends \IPS\Application
|
||||
$module->key == 'system'
|
||||
and
|
||||
\in_array( $controller, array( 'login', 'register', 'lostpass', 'terms', 'ajax', 'privacy', 'editor',
|
||||
'language', 'theme', 'redirect', 'guidelines', 'announcement', 'metatags', 'marketplace', 'serviceworker', 'offline' ) )
|
||||
'language', 'theme', 'redirect', 'guidelines', 'announcement', 'metatags', 'marketplace', 'serviceworker', 'offline', 'cookie' ) )
|
||||
)
|
||||
or
|
||||
(
|
||||
@@ -236,6 +251,7 @@ class _Application extends \IPS\Application
|
||||
'metatags', // Manifest
|
||||
'serviceworker', // Service Worker
|
||||
'offline', // Service Worker offline page
|
||||
'cookie'
|
||||
) )
|
||||
or
|
||||
(
|
||||
@@ -244,6 +260,8 @@ class _Application extends \IPS\Application
|
||||
$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
|
||||
)
|
||||
or
|
||||
in_array( $controller, ['terms', 'cookies'] ) // whitelist terms and cookies pages
|
||||
)
|
||||
);
|
||||
}
|
||||
@@ -611,7 +629,7 @@ class _Application extends \IPS\Application
|
||||
public function doMemberCheck(): ?\IPS\Http\Url
|
||||
{
|
||||
/* Need their name or email... */
|
||||
if( ( \IPS\Member::loggedIn()->real_name === '' or !\IPS\Member::loggedIn()->email ) and \IPS\Dispatcher::i()->controller !== 'register' and \IPS\Dispatcher::i()->controller !== 'login' )
|
||||
if( ( \IPS\Member::loggedIn()->real_name === '' or !\IPS\Member::loggedIn()->email ) and \IPS\Dispatcher::i()->controller !== 'register' and \IPS\Dispatcher::i()->controller !== 'login' and \IPS\Dispatcher::i()->controller !== 'cookies' )
|
||||
{
|
||||
return \IPS\Http\Url::internal( 'app=core&module=system&controller=register&do=complete' )->setQueryString( 'ref', base64_encode( \IPS\Request::i()->url() ) );
|
||||
}
|
||||
@@ -622,7 +640,8 @@ class _Application extends \IPS\Application
|
||||
\IPS\Dispatcher::i()->controller !== 'login' and
|
||||
\IPS\Dispatcher::i()->controller != 'redirect' and
|
||||
\IPS\Dispatcher::i()->controller !== 'store' and
|
||||
\IPS\Dispatcher::i()->controller !== 'checkout'
|
||||
\IPS\Dispatcher::i()->controller !== 'checkout' and
|
||||
\IPS\Dispatcher::i()->controller !== 'cookies'
|
||||
)
|
||||
{
|
||||
return \IPS\Http\Url::internal( 'app=core&module=system&controller=register&do=validating', 'front', 'register' );
|
||||
@@ -636,7 +655,7 @@ class _Application extends \IPS\Application
|
||||
else if (
|
||||
\IPS\Settings::i()->allow_reg AND
|
||||
!\IPS\Member::loggedIn()->members_bitoptions['profile_completed'] AND
|
||||
!\in_array( \IPS\Dispatcher::i()->controller, array( 'register', 'login', 'redirect', 'ajax', 'settings', 'checkout', 'pixabay', 'editor' ) ) AND
|
||||
!\in_array( \IPS\Dispatcher::i()->controller, array( 'register', 'login', 'redirect', 'ajax', 'settings', 'checkout', 'pixabay', 'editor', 'cookies' ) ) AND
|
||||
$completion = \IPS\Member::loggedIn()->profileCompletion() AND
|
||||
\count( $completion['required'] )
|
||||
)
|
||||
@@ -651,7 +670,7 @@ class _Application extends \IPS\Application
|
||||
}
|
||||
|
||||
/* Need to set up MFA... */
|
||||
if ( !\in_array( \IPS\Dispatcher::i()->controller, array( 'register', 'login', 'redirect', 'ajax', 'settings', 'embed' ) ) )
|
||||
if ( !\in_array( \IPS\Dispatcher::i()->controller, array( 'register', 'login', 'redirect', 'ajax', 'settings', 'embed', 'cookies' ) ) )
|
||||
{
|
||||
$haveAcceptableHandlers = FALSE;
|
||||
$haveConfiguredHandler = FALSE;
|
||||
@@ -685,7 +704,7 @@ class _Application extends \IPS\Application
|
||||
}
|
||||
|
||||
/* Need to reset password */
|
||||
if ( \IPS\Dispatcher::i()->controller !== 'settings' AND ( !isset( \IPS\Request::i()->area ) OR \IPS\Request::i()->area !== 'password' ) )
|
||||
if ( ( \IPS\Dispatcher::i()->controller !== 'settings' AND ( !isset( \IPS\Request::i()->area ) OR \IPS\Request::i()->area !== 'password' ) ) AND !( \IPS\Dispatcher::i()->controller == 'alerts' AND \IPS\Request::i()->do == 'dismiss' ) )
|
||||
{
|
||||
foreach( \IPS\Login::methods() AS $method )
|
||||
{
|
||||
@@ -710,4 +729,32 @@ class _Application extends \IPS\Application
|
||||
\IPS\core\extensions\core\CommunityEnhancements\Zapier::rebuildRESTApiPermissions();
|
||||
parent::installSettings();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of essential cookies which are set by this app.
|
||||
* Wildcards (*) can be used at the end of cookie names for PHP set cookies.
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function _getEssentialCookieNames(): array
|
||||
{
|
||||
$cookies = [ 'oauth_authorize', 'member_id', 'login_key', 'clearAutosave', 'lastSearch','device_key', 'IPSSessionFront', 'loggedIn', 'noCache', 'hasJS', 'cookie_consent', 'cookie_consent_optional' ];
|
||||
|
||||
if( \IPS\Settings::i()->guest_terms_bar )
|
||||
{
|
||||
$cookies[] = 'guestTermsDismissed';
|
||||
}
|
||||
|
||||
if( count( \IPS\Lang::getEnabledLanguages() ) > 1 )
|
||||
{
|
||||
$cookies[] = 'language';
|
||||
}
|
||||
|
||||
if( \IPS\Settings::i()->ref_on )
|
||||
{
|
||||
$cookies[] = 'referred_by';
|
||||
}
|
||||
|
||||
return $cookies;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user