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
@@ -12,16 +12,24 @@
|
||||
namespace IPS\core\setup\upg_107720;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
|
||||
use IPS\core\AdminNotification;
|
||||
use IPS\Http\Url;
|
||||
use IPS\Member\PrivacyAction;
|
||||
use IPS\Settings;
|
||||
use function count;
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.7.14 Beta 1 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
class Upgrade
|
||||
{
|
||||
/**
|
||||
* ...
|
||||
@@ -30,7 +38,7 @@ class _Upgrade
|
||||
*/
|
||||
public function step1()
|
||||
{
|
||||
\IPS\Member\PrivacyAction::resetDeletionAcpNotifications();
|
||||
PrivacyAction::resetDeletionAcpNotifications();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -42,7 +50,7 @@ class _Upgrade
|
||||
*/
|
||||
public function step2()
|
||||
{
|
||||
\IPS\Settings::i()->changeValues( array( 'x_hashtag' => \IPS\Settings::i()->twitter_hashtag ) );
|
||||
Settings::i()->changeValues( array( 'x_hashtag' => Settings::i()->twitter_hashtag ) );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -54,7 +62,7 @@ class _Upgrade
|
||||
*/
|
||||
public function step3()
|
||||
{
|
||||
if( \IPS\Settings::i()->site_social_profiles AND $links = json_decode( \IPS\Settings::i()->site_social_profiles, TRUE ) AND \count( $links ) )
|
||||
if( Settings::i()->site_social_profiles AND $links = json_decode( Settings::i()->site_social_profiles, TRUE ) AND count( $links ) )
|
||||
{
|
||||
$newLinks = [];
|
||||
|
||||
@@ -64,7 +72,7 @@ class _Upgrade
|
||||
if( mb_strpos( $link['value'], 'twitter' ) !== FALSE )
|
||||
{
|
||||
$link = [
|
||||
'key' => (string) \IPS\Http\Url::external( $link['key'] )->setHost('x.com'),
|
||||
'key' => (string) Url::external( $link['key'] )->setHost('x.com'),
|
||||
'value' => 'x'
|
||||
];
|
||||
}
|
||||
@@ -72,9 +80,9 @@ class _Upgrade
|
||||
$newLinks[] = $link;
|
||||
}
|
||||
|
||||
if( \count( $newLinks ) )
|
||||
if( count( $newLinks ) )
|
||||
{
|
||||
\IPS\Settings::i()->changeValues( array( 'site_social_profiles' => json_encode( $newLinks ) ) );
|
||||
Settings::i()->changeValues( array( 'site_social_profiles' => json_encode( $newLinks ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,7 +96,7 @@ class _Upgrade
|
||||
*/
|
||||
public function step4()
|
||||
{
|
||||
\IPS\core\AdminNotification::remove( 'core', 'ConfigurationError', 'marketplaceSetup' );
|
||||
AdminNotification::remove( 'core', 'ConfigurationError', 'marketplaceSetup' );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user