* adjust code.

This commit is contained in:
Catouse
2017-03-18 14:14:51 +08:00
parent d21721df96
commit 6914123274
+5 -3
View File
@@ -570,15 +570,17 @@ class product extends control
* @param string $method
* @param mix $extra
* @access public
* @return void
* @return void
*/
public function ajaxGetMatchedItems($keywords, $module, $method, $extra)
{
$products = $this->dao->select('*')->from(TABLE_PRODUCT)->where('deleted')->eq(0)->orderBy('`order` desc')->fetchAll();
$toPinyin = $this->product->toPinyin($products);
foreach($toPinyin as $key => $value) {
if(!strstr($value ,$keywords) && !strstr($key,$keywords)) {
foreach($toPinyin as $key => $value)
{
if(!strstr($value ,$keywords) && !strstr($key,$keywords))
{
unset($toPinyin[$key]);
}
}