Merge remote-tracking branch 'refs/remotes/origin/php8' into php8

This commit is contained in:
xiaomlove
2021-03-19 11:12:26 +08:00
2 changed files with 21 additions and 0 deletions

View File

@@ -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");
}
}
}

View File

@@ -147,6 +147,8 @@ if ($currentStep == 3) {
}
}
$update->runExtraQueries();
$update->nextStep();
} catch (\Exception $exception) {
$error = $exception->getMessage();