Merge branch 'master' into 'devbyspi'
# Conflicts: # Layout/default/Device/Detail.php # Layout/default/Device/Form.php # Layout/default/Device/Index.php # application/Device/DeviceController.php # application/Device/DeviceModel.php # public/assets/css/datatables-std.css
This commit is contained in:
@@ -108,8 +108,8 @@ class DeviceModel
|
||||
$db = FronkDB::singleton();
|
||||
$where = self::getSqlFilter($filter);
|
||||
$res = $db->select("Device", "*", "$where ORDER BY name");
|
||||
if ($db->num_rows($res)) {
|
||||
while ($data = $db->fetch_object($res)) {
|
||||
if($db->num_rows($res)) {
|
||||
while($data = $db->fetch_object($res)) {
|
||||
$items[] = new Device($data);
|
||||
}
|
||||
}
|
||||
@@ -121,9 +121,9 @@ class DeviceModel
|
||||
$where = "1=1 ";
|
||||
|
||||
//var_dump($filter);exit;
|
||||
if (array_key_exists("pop_id", $filter)) {
|
||||
if(array_key_exists("pop_id", $filter)) {
|
||||
$popid = $filter['pop_id'];
|
||||
if (is_numeric($popid)) {
|
||||
if(is_numeric($popid)) {
|
||||
$where .= " AND pop_id=$popid";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user