AntonLV %!s(int64=6) %!d(string=hai) anos
pai
achega
d266158f6f
Modificáronse 1 ficheiros con 1 adicións e 2 borrados
  1. 1 2
      modules/boonex/ads/classes/BxAdsDb.php

+ 1 - 2
modules/boonex/ads/classes/BxAdsDb.php

@@ -178,8 +178,7 @@ class BxAdsDb extends BxBaseModTextDb
 
             case 'collect_stats':
                 $sSelectClause = "`tc`.`id`, COUNT(`te`.`id`) AS `count`";
-                $sJoinClause = " LEFT JOIN `" . $CNF['TABLE_ENTRIES'] . "` AS `te` ON `tc`.`id`=`te`.`category`";
-                $sWhereClause = " AND `te`.`status`='active' AND `te`.`status_admin`='active' AND (`te`.`allow_view_to`='" . BX_DOL_PG_ALL . "' OR `te`.`allow_view_to`<0)";
+                $sJoinClause = $this->prepareAsString(" LEFT JOIN `" . $CNF['TABLE_ENTRIES'] . "` AS `te` ON `tc`.`id`=`te`.`category` AND `te`.`status`='active' AND `te`.`status_admin`='active' AND (`te`.`allow_view_to`=? OR `te`.`allow_view_to`<0)", BX_DOL_PG_ALL);
                 $sGroupClause = "`tc`.`id`";
                 break;
         }