Changeset 22092


Ignore:
Timestamp:
2012/11/11 03:01:48 (10 years ago)
Author:
Seasoft
Message:

#1903 (無駄な処理を改善する)

  • PHP の関数を使う
  • 参照を使う
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_12-dev/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Category.php

    r21867 r22092  
    156156            $this->root_parent_id[] = $arrParentID[0]; 
    157157            $arrDispID = array_merge($arrBrothersID, $arrChildrenID); 
    158             foreach ($arrRet as $key => $array) { 
    159                 foreach ($arrDispID as $val) { 
    160                     if ($array['category_id'] == $val) { 
    161                         $arrRet[$key]['display'] = 1; 
    162                         break; 
    163                     } 
     158            foreach($arrRet as &$arrCategory) { 
     159                if (in_array($arrCategory['category_id'], $arrDispID)) { 
     160                    $arrCategory['display'] = 1; 
    164161                } 
    165162            } 
Note: See TracChangeset for help on using the changeset viewer.