Commit 090d3476a6a733ecbb7c1cf17ca27fc964f0b274
1 parent
e56e710d
submit button check
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
src/app/backend/controllers/CustomersController.php
| ... | ... | @@ -21,7 +21,7 @@ class CustomersController extends \Phalcon\Mvc\Controller |
| 21 | 21 | $search_submit = $this->request->getPost('search_submit', 'string', NULL); |
| 22 | 22 | $this->session->set('search_name', $search_name); |
| 23 | 23 | $this->session->set('search_phone', $search_phone); |
| 24 | - if (!empty($search_name) && isset($search_phone)) { | |
| 24 | + if (!empty($search_name) && (!empty($search_phone) || $search_phone == '0')) { | |
| 25 | 25 | $data = $this->models->getCustomers()->getDataByNameAndPhone($search_name, $search_phone); |
| 26 | 26 | $total = 1; |
| 27 | 27 | } |
| ... | ... | @@ -29,7 +29,7 @@ class CustomersController extends \Phalcon\Mvc\Controller |
| 29 | 29 | $data = $this->models->getCustomers()->getDataByName($search_name); |
| 30 | 30 | $total = 1; |
| 31 | 31 | } |
| 32 | - elseif(isset($search_phone)) { | |
| 32 | + elseif(!empty($search_phone) || $search_phone == '0') { | |
| 33 | 33 | $data = $this->models->getCustomers()->getDataByPhone($search_phone); |
| 34 | 34 | $total = 1; |
| 35 | 35 | } | ... | ... |