1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-03 13:17:24 +02:00

Make remote-update notify xml more generic

This commit is contained in:
CaMer0n
2009-08-17 16:08:11 +00:00
parent 96cc442d50
commit cb8cc9fcb9

View File

@@ -10,9 +10,9 @@
| GNU General Public License (http://gnu.org). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/e107_handlers/theme_handler.php,v $ | $Source: /cvs_backup/e107_0.8/e107_handlers/theme_handler.php,v $
| $Revision: 1.46 $ | $Revision: 1.47 $
| $Date: 2009-08-17 14:40:22 $ | $Date: 2009-08-17 16:08:11 $
| $Author: secretr $ | $Author: e107coders $
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
@@ -1276,27 +1276,28 @@ class themeHandler{
if(substr($releaseUrl,-4) == ".php") if(substr($releaseUrl,-4) == ".php")
{ {
$releaseUrl .= "?name=".$curTheme."&ver".$curVersion; $releaseUrl .= "?folder=".$curTheme."&ver=".$curVersion;
} }
if($rawData = $xml -> loadXMLfile($releaseUrl, TRUE)) if($rawData = $xml -> loadXMLfile($releaseUrl, TRUE))
{ {
if(!$rawData['release'][1]) if(!$rawData['theme'][1])
{ {
$rawData['release'] = $rawData; $rawData['theme'] = $rawData;
} }
$txt = ""; $txt = "";
foreach($rawData['release'] as $val) foreach($rawData['theme'] as $val)
{ {
$name = $val['@attributes']['foldername']; $name = $val['@attributes']['name'];
$folder = $val['@attributes']['folder'];
$version = $val['@attributes']['version']; $version = $val['@attributes']['version'];
$url = $val['@attributes']['url']; $url = $val['@attributes']['url'];
if(($name == $curTheme) && version_compare($version,$curVersion)==1) if(($folder == $curTheme) && version_compare($version,$curVersion)==1)
{ {
$txt .= ADLAN_161." <a href='".$url."'>".$name ." v".$version."</a><br />"; $txt .= ADLAN_162." <a href='".$url."'>".$name ." v".$version."</a><br />";
break; break;
} }
} }