diff --git a/administrator/components/com_joomlaupdate/config.xml b/administrator/components/com_joomlaupdate/config.xml index e7c334495ff63..d4b814bcba382 100644 --- a/administrator/components/com_joomlaupdate/config.xml +++ b/administrator/components/com_joomlaupdate/config.xml @@ -22,6 +22,21 @@ + + + + + + + + get('cachetimeout', 6, 'int'); - $cache_timeout = 3600 * $cache_timeout; + $cache_timeout = 3600 * JComponentHelper::getParams('com_installer')->get('cachetimeout', 6, 'int'); } - $updater = JUpdater::getInstance(); + $updater = JUpdater::getInstance(); + $minimumStability = JUpdater::STABILITY_STABLE; + $comJoomlaupdateParams = JComponentHelper::getParams('com_joomlaupdate'); + + if (in_array($comJoomlaupdateParams->get('updatesource', 'nochange'), array('testing', 'custom'))) + { + $minimumStability = $comJoomlaupdateParams->get('minimum_stability', JUpdater::STABILITY_STABLE); + } $reflection = new ReflectionObject($updater); $reflectionMethod = $reflection->getMethod('findUpdates'); @@ -128,11 +133,11 @@ public function refreshUpdates($force = false) if (count($methodParameters) >= 4) { // Reinstall support is available in JUpdater - $updater->findUpdates(700, $cache_timeout, JUpdater::STABILITY_STABLE, true); + $updater->findUpdates(700, $cache_timeout, $minimumStability, true); } else { - $updater->findUpdates(700, $cache_timeout, JUpdater::STABILITY_STABLE); + $updater->findUpdates(700, $cache_timeout, $minimumStability); } } @@ -187,10 +192,18 @@ public function getUpdateInformation() $ret['hasUpdate'] = true; } + $minimumStability = JUpdater::STABILITY_STABLE; + $comJoomlaupdateParams = JComponentHelper::getParams('com_joomlaupdate'); + + if (in_array($comJoomlaupdateParams->get('updatesource', 'nochange'), array('testing', 'custom'))) + { + $minimumStability = $comJoomlaupdateParams->get('minimum_stability', JUpdater::STABILITY_STABLE); + } + // Fetch the full update details from the update details URL. jimport('joomla.updater.update'); $update = new JUpdate; - $update->loadFromXML($updateObject->detailsurl); + $update->loadFromXML($updateObject->detailsurl, $minimumStability); $ret['object'] = $update; diff --git a/administrator/language/en-GB/en-GB.com_joomlaupdate.ini b/administrator/language/en-GB/en-GB.com_joomlaupdate.ini index e1d3cbfd37933..1d6bcaed1e3cb 100644 --- a/administrator/language/en-GB/en-GB.com_joomlaupdate.ini +++ b/administrator/language/en-GB/en-GB.com_joomlaupdate.ini @@ -4,6 +4,7 @@ ; Note : All ini files need to be saved as UTF-8 COM_JOOMLAUPDATE_CHECKED_UPDATES="Checked for updates." +COM_JOOMLAUPDATE_CONFIGURATION="Joomla Update: Options" COM_JOOMLAUPDATE_CONFIG_CUSTOMURL_DESC="This is a custom XML update source URL, used only when the "Update Source" option is set to "Custom URL"." COM_JOOMLAUPDATE_CONFIG_CUSTOMURL_LABEL="Custom URL" COM_JOOMLAUPDATE_CONFIG_SOURCES_DESC="Configure where Joomla gets its update information from." @@ -15,10 +16,16 @@ COM_JOOMLAUPDATE_CONFIG_UPDATESOURCE_DESC="The update channel Joomla will use to COM_JOOMLAUPDATE_CONFIG_UPDATESOURCE_LABEL="Update Channel" COM_JOOMLAUPDATE_CONFIG_UPDATESOURCE_NEXT="Joomla Next" COM_JOOMLAUPDATE_CONFIG_UPDATESOURCE_TESTING="Testing" -COM_JOOMLAUPDATE_CONFIGURATION="Joomla Update: Options" COM_JOOMLAUPDATE_FAILED_TO_CHECK_UPDATES="Failed to check for updates." -COM_JOOMLAUPDATE_TOOLBAR_CHECK="Check for Updates" +COM_JOOMLAUPDATE_MINIMUM_STABILITY_ALPHA="Alpha" +COM_JOOMLAUPDATE_MINIMUM_STABILITY_BETA="Beta" +COM_JOOMLAUPDATE_MINIMUM_STABILITY_DESC="The minimum stability of the extension updates you would like to see. Development is the least stable, Stable is production quality. If an extension doesn't specify a level it is assumed to be Stable." +COM_JOOMLAUPDATE_MINIMUM_STABILITY_DEV="Development" +COM_JOOMLAUPDATE_MINIMUM_STABILITY_LABEL="Minimum Stability" +COM_JOOMLAUPDATE_MINIMUM_STABILITY_RC="Release Candidate" +COM_JOOMLAUPDATE_MINIMUM_STABILITY_STABLE="Stable" COM_JOOMLAUPDATE_OVERVIEW="Joomla Update" +COM_JOOMLAUPDATE_TOOLBAR_CHECK="Check for Updates" COM_JOOMLAUPDATE_UPDATE_LOG_CLEANUP="Cleaning up after installation." COM_JOOMLAUPDATE_UPDATE_LOG_COMPLETE="Update to version %s is complete." ; The following two strings are deprecated and will be removed with 4.0 @@ -33,37 +40,37 @@ COM_JOOMLAUPDATE_UPDATE_LOG_URL="Downloading update file from %s." COM_JOOMLAUPDATE_VIEW_COMPLETE_HEADING="Joomla Version Update Status" COM_JOOMLAUPDATE_VIEW_COMPLETE_MESSAGE="Your site has been updated. Your Joomla version is now %s." COM_JOOMLAUPDATE_VIEW_DEFAULT_DOWNLOAD_IN_PROGRESS="Downloading update file. Please wait ..." -COM_JOOMLAUPDATE_VIEW_DEFAULT_NO_DOWNLOAD_URL="We can't find a download URL" -COM_JOOMLAUPDATE_VIEW_DEFAULT_NO_DOWNLOAD_URL_DESC="An update to Joomla %1$s was found, but it wasn't possible to fetch the download URL for that update. There are two possibilities why this happens:
- Your host doesn't support the minimum requirements for Joomla %1$s and there is no alternative download for your configuration available.
- There is a problem with the Joomla Update Server.

Please try to download the update package from the official Joomla download page and use the Upload and Update tab." -COM_JOOMLAUPDATE_VIEW_DEFAULT_NO_LIVE_UPDATE="Live Update is not available" -COM_JOOMLAUPDATE_VIEW_DEFAULT_NO_LIVE_UPDATE_DESC="There is a new version of the Joomla Update Component that needs to be installed first. Click here to update the component." COM_JOOMLAUPDATE_VIEW_DEFAULT_FTP_DIRECTORY="FTP Root" COM_JOOMLAUPDATE_VIEW_DEFAULT_FTP_HOSTNAME="FTP Host" COM_JOOMLAUPDATE_VIEW_DEFAULT_FTP_PASSWORD="FTP Password" COM_JOOMLAUPDATE_VIEW_DEFAULT_FTP_PORT="FTP Port" COM_JOOMLAUPDATE_VIEW_DEFAULT_FTP_USERNAME="FTP Username" COM_JOOMLAUPDATE_VIEW_DEFAULT_INFOURL="Additional Information" -COM_JOOMLAUPDATE_VIEW_DEFAULT_INSTALL_SELF_UPDATE_FIRST="You must update to the latest version of the Joomla Update Component before you can install the Joomla Core Update!" COM_JOOMLAUPDATE_VIEW_DEFAULT_INSTALLAGAIN="Reinstall Joomla core files" COM_JOOMLAUPDATE_VIEW_DEFAULT_INSTALLED="Installed Joomla version" COM_JOOMLAUPDATE_VIEW_DEFAULT_INSTALLUPDATE="Install the Update" +COM_JOOMLAUPDATE_VIEW_DEFAULT_INSTALL_SELF_UPDATE_FIRST="You must update to the latest version of the Joomla Update Component before you can update Joomla!" COM_JOOMLAUPDATE_VIEW_DEFAULT_LATEST="Latest Joomla version" +COM_JOOMLAUPDATE_VIEW_DEFAULT_METHOD="Installation method" COM_JOOMLAUPDATE_VIEW_DEFAULT_METHOD_DIRECT="Write files directly" COM_JOOMLAUPDATE_VIEW_DEFAULT_METHOD_FTP="Write files using FTP" COM_JOOMLAUPDATE_VIEW_DEFAULT_METHOD_HYBRID="Hybrid (use FTP only if needed)" -COM_JOOMLAUPDATE_VIEW_DEFAULT_METHOD="Installation method" COM_JOOMLAUPDATE_VIEW_DEFAULT_NOUPDATES="No updates available." COM_JOOMLAUPDATE_VIEW_DEFAULT_NOUPDATESNOTICE="You already have the latest Joomla version, %s." +COM_JOOMLAUPDATE_VIEW_DEFAULT_NO_DOWNLOAD_URL="We can't find a download URL" +COM_JOOMLAUPDATE_VIEW_DEFAULT_NO_DOWNLOAD_URL_DESC="An update to Joomla %1$s was found, but it wasn't possible to download that update. There are three possibilities why this happens:
- Your host doesn't support the minimum requirements for Joomla %1$s and there is no alternative download for your configuration available.
- The update to Joomla %1$s is not available for your stability level.
- There is a problem with the Joomla Update Server.

Please try to download the update package from the official Joomla download page and use the Upload and Update tab." +COM_JOOMLAUPDATE_VIEW_DEFAULT_NO_LIVE_UPDATE="Live Update is not available" +COM_JOOMLAUPDATE_VIEW_DEFAULT_NO_LIVE_UPDATE_DESC="There is a new version of the Joomla Update Component that needs to be installed first. Click here to update the component." COM_JOOMLAUPDATE_VIEW_DEFAULT_PACKAGE="Update package URL" COM_JOOMLAUPDATE_VIEW_DEFAULT_PACKAGE_REINSTALL="Reinstall package URL" COM_JOOMLAUPDATE_VIEW_DEFAULT_TAB_ONLINE="Live Update" COM_JOOMLAUPDATE_VIEW_DEFAULT_TAB_UPLOAD="Upload & Update" -COM_JOOMLAUPDATE_VIEW_DEFAULT_UPDATE_NOTICE="Before you update Joomla, ensure that the installed extensions are available for the new Joomla version.
You are strongly advised to make a backup of your installation before you start updating." COM_JOOMLAUPDATE_VIEW_DEFAULT_UPDATEFOUND="A Joomla update was found." COM_JOOMLAUPDATE_VIEW_DEFAULT_UPDATES_INFO_CUSTOM="You are on the "%s" update channel. This is not an official Joomla update channel." COM_JOOMLAUPDATE_VIEW_DEFAULT_UPDATES_INFO_DEFAULT="You are on the "%s" update channel. Through this channel you'll receive notifications for all updates of the current Joomla release (3.x)" COM_JOOMLAUPDATE_VIEW_DEFAULT_UPDATES_INFO_NEXT="You are on the "%s" update channel. Through this channel you'll receive notifications for all updates of the current Joomla release (3.x) and you will also be notified when the future major release (4.x) will be available. Before upgrading to 4.x you'll need to assess its compatibility with your environment." COM_JOOMLAUPDATE_VIEW_DEFAULT_UPDATES_INFO_TESTING="You are on the "%s" update channel. This channel is designed for testing new releases and fixes in Joomla.
It is only intended for JBS (Joomla Bug Squad™) members and others within the Joomla community who are testing. Do not use this setting on a production site." +COM_JOOMLAUPDATE_VIEW_DEFAULT_UPDATE_NOTICE="Before you update Joomla, ensure that the installed extensions are available for the new Joomla version.
You are strongly advised to make a backup of your installation before you start updating." COM_JOOMLAUPDATE_VIEW_DEFAULT_UPLOAD_INTRO="You can use this feature to update Joomla if your server is behind a firewall or otherwise unable to contact the update servers. First download the Joomla Upgrade Package in ZIP format from the official Joomla download page. Then use the fields below to upload and install it." COM_JOOMLAUPDATE_VIEW_PROGRESS="Update progress" COM_JOOMLAUPDATE_VIEW_UPDATE_BYTESEXTRACTED="Bytes extracted"