Ignore:
Timestamp:
Sep 24, 2011, 12:05:07 PM (13 years ago)
Author:
grum
Message:

fix bugs
bug:2042 - Category map is not available if option "apply to subcategories" is not selected

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/GMaps/gmaps_root.class.inc.php

    r12212 r12213  
    235235        if($id!=0)
    236236        {
    237           $sql.=" AND pct.id = '$id' ";
     237          $sql.=" AND (pgcm.categoryId ='$id' or pct.id!='$id' AND pgcm.applySubCat='y') ";
    238238        }
    239239        else
    240240        {
    241           $sql.=" AND pgcm.categoryId = 0 ";
     241          $sql.=" AND pgcm.categoryId = 0 AND pgcm.applySubCat='y' ";
    242242        }
    243         $sql.=" AND pgcm.applySubCat='y'
    244               ORDER BY priorityRank DESC, pgmm.displayType ASC, pgcm.categoryId ASC, pgcm.imgSort ASC;";
     243        $sql.=" ORDER BY priorityRank DESC, pgmm.displayType ASC, pgcm.categoryId ASC, pgcm.imgSort ASC;";
    245244      }
    246245      elseif($mode==self::ID_MODE_MAP)
     
    259258        return(false);
    260259      }
    261 
    262260      $result=pwg_query($sql);
    263261
Note: See TracChangeset for help on using the changeset viewer.