Permalink
Browse files

Setup script: Remove config for specific scope ID

  • Loading branch information...
1 parent d5d8091 commit ce0d911e69ca2c8780db29ae74302c2910b93be8 @amenk committed Feb 26, 2014
Showing with 5 additions and 1 deletion.
  1. +5 −1 app/code/Magento/Core/Model/Resource/Setup.php
@@ -733,14 +733,18 @@ public function setConfigData($path, $value, $scope = \Magento\Core\Model\Store:
*
* @param string $path
* @param string $scope (default|stores|websites|config)
+ * @param int $scope_id
@ihor-sviziev

ihor-sviziev Feb 28, 2014

I think we should rename $scope_id to camel-case named variable, also it may be string.

* @return $this
*/
- public function deleteConfigData($path, $scope = null)
+ public function deleteConfigData($path, $scope = null, $scope_id = null)
{
$where = array('path = ?' => $path);
if (null !== $scope) {
$where['scope = ?'] = $scope;
}
+ if (null !== $scope_id) {
+ $where['scope_id = ?'] = $scope_id;
+ }
$this->getConnection()->delete($this->getTable('core_config_data'), $where);
return $this;
}

0 comments on commit ce0d911

Please sign in to comment.