mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 03:57:22 +08:00
add back to top
This commit is contained in:
@@ -211,6 +211,17 @@ class Update extends Install
|
||||
$this->doLog("[ADD_ATTENDANCE_CARD_TO_USERS], migrateAttendanceLogs: $count");
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 1.7.0
|
||||
*
|
||||
* add amountattendancecard.php
|
||||
*/
|
||||
$menus = [
|
||||
['name' => 'Add Attendance card', 'url' => 'amountattendancecard.php', 'info' => 'Add Attendance card to certain classes'],
|
||||
];
|
||||
$table = 'sysoppanel';
|
||||
$this->addMenu($table, $menus);
|
||||
|
||||
}
|
||||
|
||||
public function runExtraMigrate()
|
||||
@@ -235,6 +246,17 @@ class Update extends Install
|
||||
|
||||
}
|
||||
|
||||
private function addMenu($table, array $menus)
|
||||
{
|
||||
foreach ($menus as $menu) {
|
||||
$count = get_row_count($table, "where url = " . sqlesc($menu['url']));
|
||||
if ($count == 0) {
|
||||
$id = NexusDB::insert($table, $menu);
|
||||
$this->doLog("[ADD MENU] insert: " . json_encode($menu) . " to table: $table, id: $id");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function listVersions()
|
||||
{
|
||||
|
||||
@@ -223,6 +223,7 @@ return array (
|
||||
'prolinkpoint' => '1',
|
||||
'prolinktime' => '600',
|
||||
'cancel_hr' => BonusLogs::DEFAULT_BONUS_CANCEL_ONE_HIT_AND_RUN,
|
||||
'attendance_card' => BonusLogs::DEFAULT_BONUS_BUY_ATTENDANCE_CARD,
|
||||
),
|
||||
'account' =>
|
||||
array (
|
||||
|
||||
Reference in New Issue
Block a user