mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-17 13:43:38 +09:00
- fixed admin upgrade scripts and upgrades pack validation;
This commit is contained in:
@@ -356,10 +356,20 @@ if ( ! class_exists( 'um\admin\core\Admin_Upgrade' ) ) {
|
||||
if ( empty( $_POST['pack'] ) ) {
|
||||
exit('');
|
||||
} else {
|
||||
ob_start();
|
||||
include_once $this->packages_dir . sanitize_text_field( $_POST['pack'] ) . DIRECTORY_SEPARATOR . 'init.php';
|
||||
ob_get_flush();
|
||||
exit;
|
||||
$pack = sanitize_text_field( $_POST['pack'] );
|
||||
if ( in_array( $pack, $this->necessary_packages, true ) ) {
|
||||
$file = $this->packages_dir . $pack . DIRECTORY_SEPARATOR . 'init.php';
|
||||
if ( file_exists( $file ) ) {
|
||||
ob_start();
|
||||
include_once $file;
|
||||
ob_get_flush();
|
||||
exit;
|
||||
} else {
|
||||
exit('');
|
||||
}
|
||||
} else {
|
||||
exit('');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -407,4 +417,4 @@ if ( ! class_exists( 'um\admin\core\Admin_Upgrade' ) ) {
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user