mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 12:07:23 +08:00
update run extra queries to add new menu
This commit is contained in:
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
namespace Nexus\Install;
|
namespace Nexus\Install;
|
||||||
|
|
||||||
|
use Nexus\Database\DB;
|
||||||
|
|
||||||
class Update extends Install
|
class Update extends Install
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -45,4 +47,21 @@ class Update extends Install
|
|||||||
return $data;
|
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();
|
$update->nextStep();
|
||||||
} catch (\Exception $exception) {
|
} catch (\Exception $exception) {
|
||||||
$error = $exception->getMessage();
|
$error = $exception->getMessage();
|
||||||
|
|||||||
Reference in New Issue
Block a user