mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 12:30:49 +08:00
Merge remote-tracking branch 'refs/remotes/origin/php8' into php8
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
namespace Nexus\Install;
|
||||
|
||||
use Nexus\Database\DB;
|
||||
|
||||
class Update extends Install
|
||||
{
|
||||
|
||||
@@ -45,4 +47,21 @@ class Update extends Install
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function runExtraQueries()
|
||||
{
|
||||
//custom field menu
|
||||
$url = 'fields.php';
|
||||
$table = 'adminpanel';
|
||||
$count = get_row_count($table, "where url = " . sqlesc($url));
|
||||
if ($count == 0) {
|
||||
$insert = [
|
||||
'name' => 'Custom Field Manage',
|
||||
'url' => $url,
|
||||
'info' => 'Manage custom fields',
|
||||
];
|
||||
$id = DB::insert($table, $insert);
|
||||
$this->doLog("[ADD CUSTOM FIELD MENU] insert: " . json_encode($insert) . " to table: $table, id: $id");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -147,6 +147,8 @@ if ($currentStep == 3) {
|
||||
}
|
||||
}
|
||||
|
||||
$update->runExtraQueries();
|
||||
|
||||
$update->nextStep();
|
||||
} catch (\Exception $exception) {
|
||||
$error = $exception->getMessage();
|
||||
|
||||
Reference in New Issue
Block a user