@@ -256,11 +256,21 @@ class Update
256256 protected $ stability ;
257257 protected $ supported_databases ;
258258 protected $ php_minimum ;
259+ protected $ folder ;
260+ protected $ changelogurl ;
259261 public $ sha256 ;
260262 public $ sha384 ;
261263 public $ sha512 ;
262264 protected $ section ;
263265
266+ /**
267+ * Joomla! target version used by the pre-update check
268+ *
269+ * @var string
270+ * @since __DEPLOY_VERSION__
271+ */
272+ private $ targetVersion ;
273+
264274 /**
265275 * Gets the reference to the current direct parent
266276 *
@@ -372,7 +382,7 @@ public function _endElement($parser, $name)
372382 if (
373383 isset ($ this ->currentUpdate ->targetplatform ->name )
374384 && $ product == $ this ->currentUpdate ->targetplatform ->name
375- && preg_match ('/^ ' . $ this ->currentUpdate ->targetplatform ->version . '/ ' , $ this ->get ( ' jversion.full ' , JVERSION ))
385+ && preg_match ('/^ ' . $ this ->currentUpdate ->targetplatform ->version . '/ ' , $ this ->getTargetVersion ( ))
376386 ) {
377387 // Collect information on updates which do not meet PHP and DB version requirements
378388 $ otherUpdateInfo = new \stdClass ();
@@ -690,4 +700,34 @@ protected function stabilityTagToInteger($tag)
690700
691701 return Updater::STABILITY_STABLE ;
692702 }
703+
704+ /**
705+ * Set extension's Joomla! target version
706+ *
707+ * @param string $version The target version
708+ *
709+ * @return void
710+ *
711+ * @since __DEPLOY_VERSION__
712+ */
713+ public function setTargetVersion ($ version )
714+ {
715+ $ this ->targetVersion = $ version ;
716+ }
717+
718+ /**
719+ * Get extension's Joomla! target version
720+ *
721+ * @return string
722+ *
723+ * @since __DEPLOY_VERSION__
724+ */
725+ public function getTargetVersion ()
726+ {
727+ if (!$ this ->targetVersion ) {
728+ return JVERSION ;
729+ }
730+
731+ return $ this ->targetVersion ;
732+ }
693733}
0 commit comments