diff --git a/administrator/components/com_joomlaupdate/tmpl/joomlaupdate/default.php b/administrator/components/com_joomlaupdate/tmpl/joomlaupdate/default.php index 38a8b4c3e3..7e9370f873 100644 --- a/administrator/components/com_joomlaupdate/tmpl/joomlaupdate/default.php +++ b/administrator/components/com_joomlaupdate/tmpl/joomlaupdate/default.php @@ -21,16 +21,9 @@ JText::script('COM_JOOMLAUPDATE_VIEW_DEFAULT_EXTENSION_WARNING_UNKNOWN'); $latestJoomlaVersion = $this->updateInfo['latest']; - -JFactory::getDocument()->addScriptDeclaration( -<< -
+
showUploadAndUpdate) : ?> $this->shouldDisplayPreUpdateCheck() ? 'pre-update-check' : 'online-update')); ?> shouldDisplayPreUpdateCheck()) : ?> diff --git a/media/com_joomlaupdate/js/default.js b/media/com_joomlaupdate/js/default.js index 8b4853aa15..e927a5e30f 100644 --- a/media/com_joomlaupdate/js/default.js +++ b/media/com_joomlaupdate/js/default.js @@ -97,7 +97,7 @@ Joomla = window.Joomla || {}; */ PreUpdateChecker.run = function () { // Get version of the available joomla update - PreUpdateChecker.joomlaTargetVersion = window.joomlaTargetVersion; + PreUpdateChecker.joomlaTargetVersion = document.getElementById('joomlaupdate-wrapper').getAttribute('data-joomla-target-version'); // Grab all extensions based on the selector set in the config object var $extensions = $(PreUpdateChecker.config.selector);