Removes article from Manufacturer config
19469
public function removeManufacturer()
    {
        $config = \OxidEsales\Eshop\Core\Registry::getConfig();
        $articleIds = $this->_getActionIds('oxarticles.oxid');
        $manufacturerId = $config->getRequestParameter('oxid');

        if (\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("all")) {
            $articleViewTable = $this->_getViewName('oxarticles');
            $articleIds = $this->_getAll($this->_addFilter("select $articleViewTable.oxid " . $this->_getQuery()));
        }

        if (is_array($articleIds) && !empty($articleIds)) {
            $query = $this->formManufacturerRemovalQuery($articleIds);
            \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->execute($query);

            $this->resetCounter("manufacturerArticle", $manufacturerId);
        }
    }
739523
private void removeRHExtension(Config config, RHExtension rhe, RHExtension replacementRH, boolean deleteExtension) throws PageException {
	ConfigImpl ci = ((ConfigImpl) config);
	Log logger = ci.getLog("deploy");

	// MUST check replacementRH everywhere

	try {
	    // remove the bundles
	    BundleDefinition[] candidatesToRemove = OSGiUtil.toBundleDefinitions(rhe.getBundles(EMPTY));
	    if (replacementRH != null) {
		// spare bundles used in the new extension as well
		Map<String, BundleDefinition> notRemove = toMap(OSGiUtil.toBundleDefinitions(replacementRH.getBundles(EMPTY)));
		List<BundleDefinition> tmp = new ArrayList<OSGiUtil.BundleDefinition>();
		String key;
		for (int i = 0; i < candidatesToRemove.length; i++) {
		    key = candidatesToRemove[i].getName() + "|" + candidatesToRemove[i].getVersionAsString();
		    if (notRemove.containsKey(key)) continue;
		    tmp.add(candidatesToRemove[i]);
		}
		candidatesToRemove = tmp.toArray(new BundleDefinition[tmp.size()]);
	    }
	    XMLConfigAdmin.cleanBundles(rhe, ci, candidatesToRemove);

	    // FLD
	    removeFLDs(logger, rhe.getFlds()); // MUST check if others use one of this fld

	    // TLD
	    removeTLDs(logger, rhe.getTlds()); // MUST check if others use one of this tld

	    // Tag
	    removeTags(logger, rhe.getTags());

	    // Functions
	    removeFunctions(logger, rhe.getFunctions());

	    // Event Gateway
	    removeEventGateways(logger, rhe.getEventGateways());

	    // context
	    removeContext(config, false, logger, rhe.getContexts()); // MUST check if others use one of this

	    // web contextS
	    removeWebContexts(config, false, logger, rhe.getWebContexts()); // MUST check if others use one of this

	    // applications
	    removeApplications(config, logger, rhe.getApplications()); // MUST check if others use one of this

	    // plugins
	    removePlugins(config, logger, rhe.getPlugins()); // MUST check if others use one of this

	    // remove cache handler
	    if (!ArrayUtil.isEmpty(rhe.getCacheHandlers())) {
		Iterator<Map<String, String>> itl = rhe.getCacheHandlers().iterator();
		Map<String, String> map;
		while (itl.hasNext()) {
		    map = itl.next();
		    ClassDefinition cd = RHExtension.toClassDefinition(config, map, null);
		    String _id = map.get("id");

		    if (!StringUtil.isEmpty(_id) && cd != null && cd.hasClass()) {
			_removeCacheHandler(_id);
			// reload=true;
		    }
		    logger.info("extension", "remove cache handler [" + cd + "] from extension [" + rhe.getName() + ":" + rhe.getVersion() + "]");
		}
	    }

	    // remove cache
	    if (!ArrayUtil.isEmpty(rhe.getCaches())) {
		Iterator<Map<String, String>> itl = rhe.getCaches().iterator();
		Map<String, String> map;
		while (itl.hasNext()) {
		    map = itl.next();
		    ClassDefinition cd = RHExtension.toClassDefinition(config, map, null);
		    if (cd != null && cd.isBundle()) {
			_removeCache(cd);
			// reload=true;
		    }
		    logger.info("extension", "remove cache handler [" + cd + "] from extension [" + rhe.getName() + ":" + rhe.getVersion() + "]");
		}
	    }

	    // remove Search
	    if (!ArrayUtil.isEmpty(rhe.getSearchs())) {
		Iterator<Map<String, String>> itl = rhe.getSearchs().iterator();
		Map<String, String> map;
		while (itl.hasNext()) {
		    map = itl.next();
		    ClassDefinition cd = RHExtension.toClassDefinition(config, map, null);
		    if (cd != null && cd.hasClass()) {
			_removeSearchEngine();
			// reload=true;
		    }
		    logger.info("extension", "remove search engine [" + cd + "] from extension [" + rhe.getName() + ":" + rhe.getVersion() + "]");
		}
	    }

	    // remove resource
	    if (!ArrayUtil.isEmpty(rhe.getResources())) {
		Iterator<Map<String, String>> itl = rhe.getResources().iterator();
		Map<String, String> map;
		while (itl.hasNext()) {
		    map = itl.next();
		    ClassDefinition cd = RHExtension.toClassDefinition(config, map, null);
		    String scheme = map.get("scheme");
		    if (cd != null && cd.hasClass()) {
			_removeResourceProvider(scheme);
		    }
		    logger.info("extension", "remove resource [" + cd + "] from extension [" + rhe.getName() + ":" + rhe.getVersion() + "]");
		}
	    }

	    // remove AMF
	    if (!ArrayUtil.isEmpty(rhe.getAMFs())) {
		Iterator<Map<String, String>> itl = rhe.getAMFs().iterator();
		Map<String, String> map;
		while (itl.hasNext()) {
		    map = itl.next();
		    ClassDefinition cd = RHExtension.toClassDefinition(config, map, null);
		    if (cd != null && cd.hasClass()) {
			_removeAMFEngine();
			// reload=true;
		    }
		    logger.info("extension", "remove search engine [" + cd + "] from extension [" + rhe.getName() + ":" + rhe.getVersion() + "]");
		}
	    }

	    // remove orm
	    if (!ArrayUtil.isEmpty(rhe.getOrms())) {
		Iterator<Map<String, String>> itl = rhe.getOrms().iterator();
		Map<String, String> map;
		while (itl.hasNext()) {
		    map = itl.next();
		    ClassDefinition cd = RHExtension.toClassDefinition(config, map, null);

		    if (cd != null && cd.hasClass()) {
			_removeORMEngine();
			// reload=true;
		    }
		    logger.info("extension", "remove orm engine [" + cd + "] from extension [" + rhe.getName() + ":" + rhe.getVersion() + "]");
		}
	    }

	    // remove webservice
	    if (!ArrayUtil.isEmpty(rhe.getWebservices())) {
		Iterator<Map<String, String>> itl = rhe.getWebservices().iterator();
		Map<String, String> map;
		while (itl.hasNext()) {
		    map = itl.next();
		    ClassDefinition cd = RHExtension.toClassDefinition(config, map, null);

		    if (cd != null && cd.hasClass()) {
			_removeWebserviceHandler();
			// reload=true;
		    }
		    logger.info("extension", "remove webservice handler [" + cd + "] from extension [" + rhe.getName() + ":" + rhe.getVersion() + "]");
		}
	    }

	    // remove monitor
	    if (!ArrayUtil.isEmpty(rhe.getMonitors())) {
		Iterator<Map<String, String>> itl = rhe.getMonitors().iterator();
		Map<String, String> map;
		String name;
		while (itl.hasNext()) {
		    map = itl.next();

		    // ClassDefinition cd = RHExtension.toClassDefinition(config,map);

		    // if(cd.hasClass()) {
		    _removeMonitor(map.get("type"), name = map.get("name"));
		    // reload=true;
		    // }
		    logger.info("extension", "remove monitor [" + name + "] from extension [" + rhe.getName() + ":" + rhe.getVersion() + "]");
		}
	    }

	    // remove jdbc
	    if (!ArrayUtil.isEmpty(rhe.getJdbcs())) {
		Iterator<Map<String, String>> itl = rhe.getJdbcs().iterator();
		Map<String, String> map;
		while (itl.hasNext()) {
		    map = itl.next();
		    ClassDefinition cd = RHExtension.toClassDefinition(config, map, null);
		    if (cd != null && cd.isBundle()) {
			_removeJDBCDriver(cd);
		    }
		    logger.info("extension", "remove JDBC Driver [" + cd + "] from extension [" + rhe.getName() + ":" + rhe.getVersion() + "]");
		}
	    }

	    // remove mapping
	    if (!ArrayUtil.isEmpty(rhe.getMappings())) {
		Iterator<Map<String, String>> itl = rhe.getMappings().iterator();
		Map<String, String> map;
		String virtual;
		while (itl.hasNext()) {
		    map = itl.next();
		    virtual = map.get("virtual");
		    _removeMapping(virtual);
		    logger.info("extension", "remove Mapping [" + virtual + "]");
		}
	    }

	    // remove event-gateway-instance
	    if (!ArrayUtil.isEmpty(rhe.getEventGatewayInstances())) {
		Iterator<Map<String, Object>> itl = rhe.getEventGatewayInstances().iterator();
		Map<String, Object> map;
		String id;
		while (itl.hasNext()) {
		    map = itl.next();
		    id = Caster.toString(map.get("id"), null);
		    if (!StringUtil.isEmpty(id)) {
			_removeGatewayEntry(id);
			logger.info("extension", "remove event gateway entry [" + id + "]");
		    }
		}
	    }

	    // Loop Files
	    ZipInputStream zis = new ZipInputStream(IOUtil.toBufferedInputStream(rhe.getExtensionFile().getInputStream()));
	    String type = ci instanceof ConfigWeb ? "web" : "server";
	    try {
		ZipEntry entry;
		String path;
		String fileName;
		Resource tmp;
		while ((entry = zis.getNextEntry()) != null) {
		    path = entry.getName();
		    fileName = fileName(entry);

		    // archives
		    if (!entry.isDirectory() && (startsWith(path, type, "archives") || startsWith(path, type, "mappings"))) {
			String sub = subFolder(entry);
			logger.log(Log.LEVEL_INFO, "extension", "remove archive " + sub + " registered as a mapping");
			tmp = SystemUtil.getTempFile(".lar", false);
			IOUtil.copy(zis, tmp, false);
			removeArchive(tmp);
		    }
		    zis.closeEntry();
		}
	    }
	    finally {
		IOUtil.closeEL(zis);
	    }

	    // now we can delete the extension
	    if (deleteExtension) rhe.getExtensionFile().delete();

	}
	catch (Throwable t) {
	    ExceptionUtil.rethrowIfNecessary(t);
	    // failed to uninstall, so we install it again
	    try {
		updateRHExtension(config, rhe.getExtensionFile(), true);
		// RHExtension.install(config, rhe.getExtensionFile());
	    }
	    catch (Throwable t2) {
		ExceptionUtil.rethrowIfNecessary(t2);
	    }
	    throw Caster.toPageException(t);
	}

    }
1228231
public function remove()
    {
        $f = json_decode(file_get_contents(FEnv::get("framework.root").
            "elements/config_files/core/apps.json"));
        foreach ($f as $one => $val) {
            if ($val->name == $this->name) {
                unset($f->$one);
                break;
            }
        }

        $f = json_encode($f, JSON_PRETTY_PRINT);
        file_put_contents(FEnv::get("framework.root")."elements/config_files/core/apps.json", $f);

        Server::delete(FEnv::get("framework.root")."apps/".$this->name, "directory");
        Server::delete(
            FEnv::get("framework.root")."public/components/apps/".strtolower($this->name),
            'directory'
        );
    }
523036
def _reset_config(self):
        
        self._has_loaded = False
        self._printer = None

        self._printer_name = None
        self._printer_config = None
987479
def purgeAutoSelected(self):
        """"""
        params = self._autoParams.allData()
        for p in params:
            comps_to_remove = []
            for comp in p['selection']:
                if self.indexByComponent(comp) is None:
                    comps_to_remove.append(comp)
            for orphaned in comps_to_remove:
                p['selection'].remove(orphaned)
685274
function removeAllComponents(title)
  {
    var len = __registered__.length,
        x = 0;
    for(x;x<len;x++)
    {
      if(__registered__[x].title === title) __registered__[x].destruct();
    }
  }
1102888
def remove_config_lock(name):
    '''
    

    '''
    ret = _default_ret(name)

    ret.update({
        'changes': __salt__['panos.remove_config_lock'](),
        'result': True
    })

    return ret
787870
@Override
    public boolean removeDefaultConfiguration(String pid, String id) throws ConfigUpdateException {
        return bundleProcessor.removeDefaultConfiguration(pid, id);
    }
873603
def removeProductFrom(self, userstore):
        
        def uninstall():
            #this is probably highly insufficient, but i don't know the
            #requirements
            i = userstore.findFirst(Installation,
                                    Installation.types == self.types)
            i.uninstall()
            i.deleteFromStore()
        userstore.transact(uninstall)
1113529
def disassociate_hosting_device_with_config_agent(
            self, client, config_agent_id, hosting_device_id):
        """"""
        return client.delete((ConfigAgentHandlingHostingDevice.resource_path +
                              CFG_AGENT_HOSTING_DEVICES + "/%s") % (
            config_agent_id, hosting_device_id))
554374
function removePlugin(config, pluginName) {
    var deps = config.getPluginDependencies();

    // For default plugin, we have to disable it instead of removing from the list
    if (isDefaultPlugin(pluginName)) {
        return togglePlugin(config, pluginName, false);
    }

    // Remove the dependency from the list
    deps = deps.filterNot(function(dep) {
        return dep.getName() === pluginName;
    });
    return config.setPluginDependencies(deps);
}
735541
function cleanUpPreviousConfig(location, app, callback) {
  var confRegex = new RegExp(app + ".*\\.conf");
  var removeConfig = function(fileName, rmCallback) {
    if (confRegex.test(fileName)) {
      return fs.unlink(location + '/' + fileName, rmCallback);
    } else {
      return rmCallback(null);
    }
  };

  fs.readdir(location, function(err, files) {
    async.forEach(files, removeConfig, callback);
  });
}
606619
function removeThis()
    {
        $itemOptionList = eZProductCollectionItemOption::fetchList( $this->attribute( 'id' ) );

        $db = eZDB::instance();
        $db->begin();
        foreach( $itemOptionList as $itemOption )
        {
            $itemOption->remove();
        }
        $this->remove();
        $db->commit();
    }
313798
private void removeTables(StringBuilder article) {
        int tableStart = article.indexOf("{|");
        // Repeatedly loop while {| |} table markup still exists in the document
        while (tableStart >= 0) {
            // Find the matching closing |} if it exists.  Some wikipedia
            // text is malformated, with no matching table end. so take no
            // action in this case.
            int tableEnd = article.indexOf("|}", tableStart);
            if (tableEnd > tableStart) 
                article.delete(tableStart, tableEnd + 2);
            else 
                break;
            // Search for the next {| if it exists
            tableStart = article.indexOf("{|", tableStart);
        }
    }
215511
def _discard_config(self):
        """"""
        discard_candidate = "copy running-config {}".format(
            self._gen_full_path(self.candidate_cfg)
        )
        discard_merge = "copy null: {}".format(self._gen_full_path(self.merge_cfg))
        self.device.send_command_expect(discard_candidate)
        self.device.send_command_expect(discard_merge)
278108
function remove(conf) {
  var file = conf.get(ConfigKey.PIDFILE);
  // can be the empty string
  if(file) {
    log.notice('removing pid file %s', file);
    try {
      fs.unlinkSync(file);
    }catch(e) {
      log.warning('failed to remove pid file (%s): %s', file, e.message);
    }
  }
}
117310
public function removeOrphanProducts()
    {
        $write = $this->getConnection();
        $catalogTable = $this->getTable(Schema::EMAIL_CATALOG_TABLE);
        $select = $write->select();
        $select->reset()
            ->from(
                ['c' => $catalogTable],
                ['c.product_id']
            )
            ->joinLeft(
                [
                    'e' => $this->getTable(
                        'catalog_product_entity'
                    ),
                ],
                'c.product_id = e.entity_id'
            )
            ->where('e.entity_id is NULL');

        //delete sql statement
        $deleteSql = $select->deleteFromSelect('c');

        //run query
        $write->query($deleteSql);
    }