public function deleteComponentEntry($name)
	{
		if ($this->baseDb->tableExists('#__components'))
		{
			// Delete component entry
			$query = "DELETE FROM `#__components` WHERE `name` = " . $this->baseDb->quote($name);
			$this->baseDb->setQuery($query);
			$this->baseDb->query();

			$this->log(sprintf('Removed component entry for "%s"', $element));

			return true;
		}
		elseif ($this->baseDb->tableExists('#__extensions'))
		{
			$name = 'com_' . strtolower($name);
			// Delete component entry
			$query = "DELETE FROM `#__extensions` WHERE `name` = " . $this->baseDb->quote($name);
			$this->baseDb->setQuery($query);
			$this->baseDb->query();

			// Remove the component container in the assets table
			$asset = \Hubzero\Access\Asset::oneByName($name);
			if ($asset && $asset->get('id'))
			{
				$asset->destroy();
			}

			$this->log(sprintf('Removed extension entry for component "%s"', $element));

			if ($this->baseDb->tableExists('#__menu'))
			{
				// Check for an admin menu entry...if it's not there, create it
				$query = "DELETE FROM `#__menu` WHERE `menutype` = 'main' AND `title` = " . $this->baseDb->quote($name);
				$this->baseDb->setQuery($query);
				$this->baseDb->query();

				// Rebuild lft/rgt
				$this->rebuildMenu();

				$this->log(sprintf('Removed menu entry for component "%s"', $element));
			}

			return true;
		}

		return false;
	}
public function deleteComponentEntry($name)
	{
		if ($this->baseDb->tableExists('#__components'))
		{
			// Delete component entry
			$query = "DELETE FROM `#__components` WHERE `name` = " . $this->baseDb->quote($name);
			$this->baseDb->setQuery($query);
			$this->baseDb->query();

			$this->log(sprintf('Removed component entry for "%s"', $element));

			return true;
		}
		elseif ($this->baseDb->tableExists('#__extensions'))
		{
			$name = 'com_' . strtolower($name);
			// Delete component entry
			$query = "DELETE FROM `#__extensions` WHERE `name` = " . $this->baseDb->quote($name);
			$this->baseDb->setQuery($query);
			$this->baseDb->query();

			// Remove the component container in the assets table
			$asset = \Hubzero\Access\Asset::oneByName($name);
			if ($asset && $asset->get('id'))
			{
				$asset->destroy();
			}

			$this->log(sprintf('Removed extension entry for component "%s"', $element));

			if ($this->baseDb->tableExists('#__menu'))
			{
				// Check for an admin menu entry...if it's not there, create it
				$query = "DELETE FROM `#__menu` WHERE `menutype` = 'main' AND `title` = " . $this->baseDb->quote($name);
				$this->baseDb->setQuery($query);
				$this->baseDb->query();

				// Rebuild lft/rgt
				$this->rebuildMenu();

				$this->log(sprintf('Removed menu entry for component "%s"', $element));
			}

			return true;
		}

		return false;
	}
public function deleteComponentEntry ( $ name ) { if ( $ this -> baseDb -> tableExists ( '#__components' ) ) { // Delete component entry $ query = "DELETE FROM `#__components` WHERE `name` = " . $ this -> baseDb -> quote ( $ name ) ; $ this -> baseDb -> setQuery ( $ query ) ; $ this -> baseDb -> query ( ) ; $ this -> log ( sprintf ( 'Removed component entry for "%s"' , $ element ) ) ; return true ; } elseif ( $ this -> baseDb -> tableExists ( '#__extensions' ) ) { $ name = 'com_' . strtolower ( $ name ) ; // Delete component entry $ query = "DELETE FROM `#__extensions` WHERE `name` = " . $ this -> baseDb -> quote ( $ name ) ; $ this -> baseDb -> setQuery ( $ query ) ; $ this -> baseDb -> query ( ) ; // Remove the component container in the assets table $ asset = \ Hubzero \ Access \ Asset :: oneByName ( $ name ) ; if ( $ asset && $ asset -> get ( 'id' ) ) { $ asset -> destroy ( ) ; } $ this -> log ( sprintf ( 'Removed extension entry for component "%s"' , $ element ) ) ; if ( $ this -> baseDb -> tableExists ( '#__menu' ) ) { // Check for an admin menu entry...if it's not there, create it $ query = "DELETE FROM `#__menu` WHERE `menutype` = 'main' AND `title` = " . $ this -> baseDb -> quote ( $ name ) ; $ this -> baseDb -> setQuery ( $ query ) ; $ this -> baseDb -> query ( ) ; // Rebuild lft/rgt $ this -> rebuildMenu ( ) ; $ this -> log ( sprintf ( 'Removed menu entry for component "%s"' , $ element ) ) ; } return true ; } return false ; }
Remove component entries from the appropriate table, depending on the CMS version

@param   string  $name  Component name
@return  bool
Remove component entries from the appropriate table depending on the CMS version