[*] BO : you can now disable automatic indexation of the products #PSCFV-3258
This commit is contained in:
+2
-2
@@ -4712,7 +4712,7 @@ class ProductCore extends ObjectModel
|
||||
public function addWs($autodate = true, $null_values = false)
|
||||
{
|
||||
$success = parent::add($autodate, $null_values);
|
||||
if ($success)
|
||||
if ($success && Configuration::get('PS_SEARCH_INDEXATION'))
|
||||
Search::indexation(false, $this->id);
|
||||
return $success;
|
||||
}
|
||||
@@ -4720,7 +4720,7 @@ class ProductCore extends ObjectModel
|
||||
public function updateWs($null_values = false)
|
||||
{
|
||||
$success = parent::update($null_values);
|
||||
if ($success)
|
||||
if ($success && Configuration::get('PS_SEARCH_INDEXATION'))
|
||||
Search::indexation(false, $this->id);
|
||||
return $success;
|
||||
}
|
||||
|
||||
+2
-1
@@ -200,7 +200,8 @@ class TagCore extends ObjectModel
|
||||
if ($result)
|
||||
{
|
||||
$result &= Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'product_tag (id_product, id_tag) VALUES '.implode(',', $ids));
|
||||
$result &= Search::indexation(false);
|
||||
if (Configuration::get('PS_SEARCH_INDEXATION'))
|
||||
$result &= Search::indexation(false);
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
|
||||
Reference in New Issue
Block a user