/**
* Refreshes the extension table cache
*
* @return boolean Result of operation, true if updated, false on failure
*
* @since 3.1
*/
public function refreshManifestCache()
{
// Need to find to find where the XML file is since we don't store this normally
$client = ApplicationHelper::getClientInfo($this->parent->extension->client_id);
$short_element = str_replace('com_', '', $this->parent->extension->element);
$manifestPath = $client->path . '/components/' . $this->parent->extension->element . '/' . $short_element . '.xml';
$this->parent->manifest = $this->parent->isManifest($manifestPath);
$this->parent->setPath('manifest', $manifestPath);
$manifest_details = Installer::parseXMLInstallFile($this->parent->getPath('manifest'));
$this->parent->extension->manifest_cache = json_encode($manifest_details);
$this->parent->extension->name = $manifest_details['name'];
// Namespace is optional
if (isset($manifest_details['namespace'])) {
$this->parent->extension->namespace = $manifest_details['namespace'];
}
try {
return $this->parent->extension->store();
} catch (\RuntimeException $e) {
Log::add(Text::_('JLIB_INSTALLER_ERROR_COMP_REFRESH_MANIFEST_CACHE'), Log::WARNING, 'jerror');
return false;
}
}