--- alx-src/branches/alx-web-060/mageupgrade.php 2011/07/05 16:24:21 2596
+++ alx-src/branches/alx-web-060/mageupgrade.php 2011/07/05 16:37:58 2597
@@ -66,30 +66,36 @@
echo '
';
if (array_key_exists("0", $out))
{
- foreach( $out as $i)
+ // tell that there are no updates if $out/$i is empty
+ if ( $out[1] == "")
{
- // element 0 is always 0
- if ($i=="0") continue;
-
- $row=explode("\n", $i);
- foreach( $row as $x)
+ echo "No updates available. The system is fully upgraded.";
+ } else {
+ foreach( $out as $i)
{
- //ignore empty rows
- //(the last one may empty)
- if ($x=="") continue;
+ // element 0 is always 0
+ if ($i=="0") continue;
+
+ $row=explode("\n", $i);
+ foreach( $row as $x)
+ {
+ //ignore empty rows
+ //(the last one may empty)
+ if ($x=="") continue;
- $item=explode(",",trim($x));
- $pcat=$item[0];
- $pname=$item[1];
- $pver=$item[2];
- $pbuild=$item[3];
+ $item=explode(",",trim($x));
+ $pcat=$item[0];
+ $pname=$item[1];
+ $pver=$item[2];
+ $pbuild=$item[3];
- echo '';
- echo ''.$pcat.'/'.$pname.'';
- echo ' | ';
- echo ' => [ '.$pver.'-'.$pbuild.' ] ';
- echo ' | ';
- echo '
';
+ echo '';
+ echo ''.$pcat.'/'.$pname.'';
+ echo ' | ';
+ echo ' => [ '.$pver.'-'.$pbuild.' ] ';
+ echo ' | ';
+ echo '
';
+ }
}
}
}