diff --git a/libraries/cms/installer/adapter/file.php b/libraries/cms/installer/adapter/file.php index 8e51a8bec20cb..fc184fbba7928 100644 --- a/libraries/cms/installer/adapter/file.php +++ b/libraries/cms/installer/adapter/file.php @@ -151,12 +151,10 @@ public function getElement($element = null) { if (!$element) { - // Ensure the element is a string - $element = (string) $this->getManifest()->name; - - // Filter the name for illegal characters - $element = str_replace('files_', '', JFilterInput::getInstance()->clean($element, 'cmd')); + $manifestPath = JPath::clean($this->parent->getPath('manifest')); + $element = preg_replace('/\.xml/', '', basename($manifestPath)); } + return $element; }