Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- check_joomla_version.php 2014-09-30 13:45:25.464600000 -0500
- +++ check_joomla_version.php 2014-09-30 14:19:21.257705500 -0500
- @@ -25,6 +25,13 @@
- ***/
- $localVersionFile = "/var/www/joomla/libraries/cms/version/version.php";
- $remoteVersionUrl = "http://update.joomla.org/core/list.xml";
- +
- +// Define the base path.
- +// http://developer.joomla.org/manual/ch01s02.html
- +//
- +// JPATH_PLATFORM - The path to the Joomla Platform (where loader.php or
- +// platform.php is located, usually in the same folder as import.php).
- +define('JPATH_PLATFORM', '/var/www/libraries');
- // get local Joomla Version
- @@ -36,7 +43,16 @@
- // get remote Joomla Version
- $xml = simplexml_load_file($remoteVersionUrl);
- -$remoteJoomlaVersion = $xml->extension['version'];
- +
- +// Think ppr from Python - it prints out the structure
- +//print_r($xml);
- +
- +// Evidently the XML feed lists additional supported versions
- +// since the script was originally written. The first matching array
- +// is no longer the version we're interested in checking against.
- +// Now we want to grab the version element from the last extension array.
- +$extension_array_count = count($xml->extension);
- +$remoteJoomlaVersion = $xml->extension[$extension_array_count-1]['version'];
- // compare and return info
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement