mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-07-03 14:44:24 +02:00
fix tbl_bandwidth error, make Hotspot and PPPOE list failed to load
This commit is contained in:
parent
efe7b8b8f8
commit
00d3295632
3 changed files with 16 additions and 5 deletions
|
@ -82,7 +82,12 @@ switch ($action) {
|
|||
. "&router=" . urlencode($router);
|
||||
|
||||
$bws = ORM::for_table('tbl_plans')->distinct()->select("id_bw")->where('tbl_plans.type', 'Hotspot')->findArray();
|
||||
$ui->assign('bws', ORM::for_table('tbl_bandwidth')->selects(["id", 'name_bw'])->where_in('id', array_column($bws, 'id_bw'))->findArray());
|
||||
$ids = array_column($bws, 'id_bw');
|
||||
if(count($ids)){
|
||||
$ui->assign('bws', ORM::for_table('tbl_bandwidth')->select("id")->select('name_bw')->where_id_in($ids)->findArray());
|
||||
}else{
|
||||
$ui->assign('bws', []);
|
||||
}
|
||||
$ui->assign('type2s', ORM::for_table('tbl_plans')->getEnum("plan_type"));
|
||||
$ui->assign('type3s', ORM::for_table('tbl_plans')->getEnum("typebp"));
|
||||
$ui->assign('valids', ORM::for_table('tbl_plans')->getEnum("validity_unit"));
|
||||
|
@ -446,8 +451,13 @@ switch ($action) {
|
|||
. "&status=" . urlencode($status)
|
||||
. "&router=" . urlencode($router);
|
||||
|
||||
$bws = ORM::for_table('tbl_plans')->distinct()->select("id_bw")->findArray();
|
||||
$ui->assign('bws', ORM::for_table('tbl_bandwidth')->selects(["id", 'name_bw'])->where_in('id', array_column($bws, 'id_bw'))->findArray());
|
||||
$bws = ORM::for_table('tbl_plans')->distinct()->select("id_bw")->where('tbl_plans.type', 'PPPOE')->findArray();
|
||||
$ids = array_column($bws, 'id_bw');
|
||||
if(count($ids)){
|
||||
$ui->assign('bws', ORM::for_table('tbl_bandwidth')->select("id")->select('name_bw')->where_id_in($ids)->findArray());
|
||||
}else{
|
||||
$ui->assign('bws', []);
|
||||
}
|
||||
$ui->assign('type2s', ORM::for_table('tbl_plans')->getEnum("plan_type"));
|
||||
$ui->assign('type3s', ORM::for_table('tbl_plans')->getEnum("typebp"));
|
||||
$ui->assign('valids', ORM::for_table('tbl_plans')->getEnum("validity_unit"));
|
||||
|
|
|
@ -511,5 +511,6 @@
|
|||
"Period": "Periode",
|
||||
"Rate": "Kecepatan",
|
||||
"Burst": "Meletus",
|
||||
"Router_Name___Location": "Nama\/Lokasi Router"
|
||||
"Router_Name___Location": "Nama\/Lokasi Router",
|
||||
"Extend": "Memperpanjang"
|
||||
}
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"version": "2024.6.21.2"
|
||||
"version": "2024.6.21.3"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue