// Replace shop->addSqlRestriction() and shop->addSqlRestrictionOnLang() by static versions

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13618 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2012-02-27 12:15:30 +00:00
parent 2caf013a0f
commit c2cef61a5a
58 changed files with 210 additions and 241 deletions
+4 -4
View File
@@ -82,14 +82,14 @@ class StatsNewsletter extends ModuleGraph
$sql = 'SELECT COUNT(*) as customers
FROM `'._DB_PREFIX_.'customer`
WHERE 1
'.$this->sqlShopRestriction(Shop::SHARE_CUSTOMER).'
'.Shop::addSqlRestriction(Shop::SHARE_CUSTOMER).'
AND `newsletter_date_add` BETWEEN '.ModuleGraph::getDateBetween();
$result1 = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql);
$sql = 'SELECT COUNT(*) as visitors
FROM '._DB_PREFIX_.'newsletter
WHERE 1
'.$this->sqlShopRestriction().'
'.Shop::addSqlRestriction().'
AND `newsletter_date_add` BETWEEN '.ModuleGraph::getDateBetween();
$result2 = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql);
return array('customers' => $result1['customers'], 'visitors' => $result2['visitors'], 'both' => $result1['customers'] + $result2['visitors']);
@@ -105,13 +105,13 @@ class StatsNewsletter extends ModuleGraph
$this->_query = 'SELECT newsletter_date_add
FROM `'._DB_PREFIX_.'customer`
WHERE 1
'.$this->sqlShopRestriction(Shop::SHARE_CUSTOMER).'
'.Shop::addSqlRestriction(Shop::SHARE_CUSTOMER).'
AND `newsletter_date_add` BETWEEN ';
$this->_query2 = 'SELECT newsletter_date_add
FROM '._DB_PREFIX_.'newsletter
WHERE 1
'.$this->sqlShopRestriction(Shop::SHARE_CUSTOMER).'
'.Shop::addSqlRestriction(Shop::SHARE_CUSTOMER).'
AND `newsletter_date_add` BETWEEN ';
$this->setDateGraph($layers, true);
}