* finish task#516.

This commit is contained in:
wangchunsheng
2011-10-20 12:36:11 +00:00
parent ec30c7df2b
commit 9b8415e5ca
3 changed files with 46 additions and 7 deletions

View File

@@ -179,7 +179,13 @@ class productModel extends model
{
if($this->checkPriv($product))
{
if(strpos($mode, 'nocode') === false and $product->code) $product->name = strtoupper(substr($product->code, 0, 1)) . ':' . $product->name;
if(strpos($mode, 'nocode') === false and $product->code)
{
$firstChar = strtoupper(substr($product->code, 0, 1));
if(ord($firstChar) < 127) $product->name = $firstChar . ':' . $product->name;
}
$pairs[$product->id] = $product->name;
}
}