// updated getSupplyOrderByReference

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11870 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
bMancone committed 2011-12-28 16:43:15 +00:00
1 parent 4296982118
commit f7735427fc
1 file changed
+4
+4
View File
@@ -432,6 +432,7 @@ class SupplyOrderCore extends ObjectModel
/** /**
* For a given id or reference, tells if the supply order exists * For a given id or reference, tells if the supply order exists
* @param int|string $match * @param int|string $match
* @return int id
*/ */
public static function exists($match) public static function exists($match)
{ {
@@ -464,6 +465,9 @@ class SupplyOrderCore extends ObjectModel
$query->where('so.reference = "'.pSQL($match).'"'); $query->where('so.reference = "'.pSQL($match).'"');
$id = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); $id = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query);
if ($id === false)
return false;
return (new SupplyOrder((int)$id)); return (new SupplyOrder((int)$id));
} }