applications/vanilla/models/class.categorymodel.php
public function GetWhereCache($Where) {
      $Result = array();
      
      foreach (self::Categories() as $Index => $Row) {
         $Match = true;
         foreach ($Where as $Column => $Value) {
            $RowValue = GetValue($Column, $Row, NULL);
            
            if ($RowValue != $Value && !(is_array($Value) && in_array($RowValue, $Value))) {
               $Match = false;
               break;
            }
         }
         if ($Match)
            $Result[$Index] = $Row;
      }
      
      return $Result;
   }
public function GetWhereCache($Where) {
      $Result = array();
      
      foreach (self::Categories() as $Index => $Row) {
         $Match = true;
         foreach ($Where as $Column => $Value) {
            $RowValue = GetValue($Column, $Row, NULL);
            
            if ($RowValue != $Value && !(is_array($Value) && in_array($RowValue, $Value))) {
               $Match = false;
               break;
            }
         }
         if ($Match)
            $Result[$Index] = $Row;
      }
      
      return $Result;
   }
public function GetWhereCache ( $ Where ) { $ Result = array ( ) ; foreach ( self :: Categories ( ) as $ Index => $ Row ) { $ Match = true ; foreach ( $ Where as $ Column => $ Value ) { $ RowValue = GetValue ( $ Column , $ Row , NULL ) ; if ( $ RowValue != $ Value && ! ( is_array ( $ Value ) && in_array ( $ RowValue , $ Value ) ) ) { $ Match = false ; break ; } } if ( $ Match ) $ Result [ $ Index ] = $ Row ; } return $ Result ; }
A simplified version of GetWhere that polls the cache instead of the database.
@param array $Where
@return array
@since 2.2.2
A simplified version of GetWhere that polls the cache instead of the database .