diff --git a/administrator/components/com_patchtester/language/en-GB/en-GB.com_patchtester.sys.ini b/administrator/components/com_patchtester/language/en-GB/en-GB.com_patchtester.sys.ini index 0ed71a7..3ec232f 100644 --- a/administrator/components/com_patchtester/language/en-GB/en-GB.com_patchtester.sys.ini +++ b/administrator/components/com_patchtester/language/en-GB/en-GB.com_patchtester.sys.ini @@ -6,5 +6,4 @@ COM_PATCHTESTER="Joomla! Patch Tester" COM_PATCHTESTER_COULD_NOT_INSTALL_OVERRIDES="Could not install the template overrides for the following templates: %s" COM_PATCHTESTER_COULD_NOT_REMOVE_OVERRIDES="Could not remove the template overrides for the following templates: %s" -COM_PATCHTESTER_ERROR_INSTALL_JVERSION="The Joomla! Patch Tester requires version %s or newer of the CMS" COM_PATCHTESTER_XML_DESCRIPTION="Component for pull request management testing" diff --git a/administrator/components/com_patchtester/patchtester.xml b/administrator/components/com_patchtester/patchtester.xml index 3377aa4..fc27eac 100644 --- a/administrator/components/com_patchtester/patchtester.xml +++ b/administrator/components/com_patchtester/patchtester.xml @@ -1,5 +1,5 @@ - + com_patchtester Joomla! Project 11-May-2016 diff --git a/administrator/components/com_patchtester/script.php b/administrator/components/com_patchtester/script.php index 42ed35c..d4bb79c 100644 --- a/administrator/components/com_patchtester/script.php +++ b/administrator/components/com_patchtester/script.php @@ -11,16 +11,8 @@ * * @since 2.0 */ -class Com_PatchtesterInstallerScript +class Com_PatchtesterInstallerScript extends JInstallerScript { - /** - * Minimum supported version of the CMS - * - * @var string - * @since 2.0 - */ - protected $minCmsVersion = '3.5'; - /** * Array of templates with supported overrides * @@ -30,25 +22,18 @@ class Com_PatchtesterInstallerScript protected $templateOverrides = array('hathor'); /** - * Function to act prior to installation process begins + * Extension script constructor. * - * @param string $type The action being performed - * @param JInstallerAdapterComponent $parent The class calling this method - * - * @return boolean True on success - * - * @since 2.0 + * @since __DEPLOY_VERSION__ */ - public function preflight($type, $parent) + public function __construct() { - if (version_compare(JVERSION, $this->minCmsVersion, 'lt')) - { - JFactory::getApplication()->enqueueMessage(JText::sprintf('COM_PATCHTESTER_ERROR_INSTALL_JVERSION', $this->minCmsVersion)); + $this->minimumJoomla = '3.6'; + $this->minimumPhp = JOOMLA_MINIMUM_PHP; - return false; - } - - return true; + $this->deleteFolders = array( + '/administrator/components/com_patchtester/PatchTester/Table', + ); } /** @@ -120,6 +105,21 @@ class Com_PatchtesterInstallerScript } } + /** + * Function to perform changes during postflight + * + * @param string $type The action being performed + * @param JInstallerAdapterComponent $parent The class calling this method + * + * @return void + * + * @since __DEPLOY_VERSION__ + */ + public function postflight($type, $parent) + { + $this->removeFiles(); + } + /** * Function to copy layout overrides for core templates at install or update *