Changeset 12016


Ignore:
Timestamp:
2007/03/29 12:50:42 (17 years ago)
Author:
kakinaka
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/dev/data/lib/slib.php

    r12015 r12016  
    527527function sfIsInt($value) { 
    528528    if($value != "" && strlen($value) <= INT_LEN && is_numeric($value)) { 
    529         return true; 
    530     } 
    531     return false; 
    532 } 
    533  
    534 // INT·¿¤ÎÀ°¿ô¥Á¥§¥Ã¥¯ 
    535 function sfIsRealInt($value) { 
    536     $int = (int) $value; 
    537     if($int!= "" && strlen($int) <= INT_LEN && is_int($int)) { 
    538529        return true; 
    539530    } 
     
    19371928    if(!$g_category_on) { 
    19381929        $g_category_on = true; 
    1939         if(sfIsRealInt($category_id) && sfIsRecord("dtb_category","category_id", $category_id)) { 
     1930        $category_id = (int) $category_id; 
     1931        $product_id = (int) $product_id; 
     1932        if(sfIsInt($category_id) && sfIsRecord("dtb_category","category_id", $category_id)) { 
    19401933            $g_category_id = $category_id; 
    1941         } else if (sfIsRealInt($product_id) && sfIsRecord("dtb_products","product_id", $product_id, "status = 1")) { 
     1934        } else if (sfIsInt($product_id) && sfIsRecord("dtb_products","product_id", $product_id, "status = 1")) { 
    19421935            $objQuery = new SC_Query(); 
    19431936            $where = "product_id = ?"; 
Note: See TracChangeset for help on using the changeset viewer.