protected function _addModuleSettings($moduleSettings, $moduleId)
    {
        $config = Registry::getConfig();
        $shopId = $config->getShopId();
        if (is_array($moduleSettings)) {
            $diff = false;
            foreach ($moduleSettings as $setting) {

                $module = $this->getModuleConfigId($moduleId);
                $name = $setting["name"];
                $type = $setting["type"];

                if (isset($setting["value"]) && is_null($config->getConfigParam($name))){
                    $diff = true;
                    $value = $setting["value"];
                    $config->saveShopConfVar($type, $name, $value, $shopId, $module);
                    $this->output->debug("$moduleId: setting for '$name' fixed'");
                } ;
            }
            if ($diff) {
                $this->output->warning("$moduleId: settings fixed'");
                $this->needCacheClear = true;
            }
        }
    }
protected function _addModuleSettings($moduleSettings, $moduleId)
    {
        $config = Registry::getConfig();
        $shopId = $config->getShopId();
        if (is_array($moduleSettings)) {
            $diff = false;
            foreach ($moduleSettings as $setting) {

                $module = $this->getModuleConfigId($moduleId);
                $name = $setting["name"];
                $type = $setting["type"];

                if (isset($setting["value"]) && is_null($config->getConfigParam($name))){
                    $diff = true;
                    $value = $setting["value"];
                    $config->saveShopConfVar($type, $name, $value, $shopId, $module);
                    $this->output->debug("$moduleId: setting for '$name' fixed'");
                } ;
            }
            if ($diff) {
                $this->output->warning("$moduleId: settings fixed'");
                $this->needCacheClear = true;
            }
        }
    }
protected function _addModuleSettings ( $ moduleSettings , $ moduleId ) { $ config = Registry :: getConfig ( ) ; $ shopId = $ config -> getShopId ( ) ; if ( is_array ( $ moduleSettings ) ) { $ diff = false ; foreach ( $ moduleSettings as $ setting ) { $ module = $ this -> getModuleConfigId ( $ moduleId ) ; $ name = $ setting [ "name" ] ; $ type = $ setting [ "type" ] ; if ( isset ( $ setting [ "value" ] ) && is_null ( $ config -> getConfigParam ( $ name ) ) ) { $ diff = true ; $ value = $ setting [ "value" ] ; $ config -> saveShopConfVar ( $ type , $ name , $ value , $ shopId , $ module ) ; $ this -> output -> debug ( "$moduleId: setting for '$name' fixed'" ) ; } ; } if ( $ diff ) { $ this -> output -> warning ( "$moduleId: settings fixed'" ) ; $ this -> needCacheClear = true ; } } }
Adds settings to database.

@param array  $moduleSettings Module settings array
@param string $moduleId       Module id
Adds settings to database .