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,50 +12,30 @@
|
||||
namespace IPS\nexus\extensions\core\Uninstall;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
|
||||
use IPS\Extensions\UninstallAbstract;
|
||||
use IPS\Settings;
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Uninstall callback
|
||||
*/
|
||||
class _DisablePOP
|
||||
class DisablePOP extends UninstallAbstract
|
||||
{
|
||||
/**
|
||||
* Code to execute before the application has been uninstalled
|
||||
*
|
||||
* @param string $application Application directory
|
||||
* @return array
|
||||
*/
|
||||
public function preUninstall( $application )
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Code to execute after the application has been uninstalled
|
||||
*
|
||||
* @param string $application Application directory
|
||||
* @return array
|
||||
*/
|
||||
public function postUninstall( $application )
|
||||
{
|
||||
/* Disable pop3 tasks */
|
||||
if ( \IPS\Settings::i()->pop3_server )
|
||||
{
|
||||
\IPS\Settings::i()->changeValues( array( 'pop3_server' => '' ) );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Code to execute when other applications or plugins are uninstalled
|
||||
*
|
||||
* @param string $application Application directory
|
||||
* @param int $plugin Plugin ID
|
||||
* @return void
|
||||
*/
|
||||
public function onOtherUninstall( $application=NULL, $plugin=NULL )
|
||||
public function postUninstall( string $application ) : void
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user