/[smeserver]/rpms/php-pear-Log/sme8/xml2changelog
ViewVC logotype

Diff of /rpms/php-pear-Log/sme8/xml2changelog

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.2 by slords, Tue Sep 20 13:58:50 2011 UTC Revision 1.3 by slords, Mon Sep 26 00:10:27 2011 UTC
# Line 7  $file=array_shift($_SERVER['argv']); Line 7  $file=array_shift($_SERVER['argv']);
7  if (in_array("--debug", $_SERVER['argv'])) print_r($xml);  if (in_array("--debug", $_SERVER['argv'])) print_r($xml);
8    
9  if ($xml['version'] >= "2"){ // Package.xml V 2.0  if ($xml['version'] >= "2"){ // Package.xml V 2.0
10          printf("*** Version %s (%s) - API %s (%s) - %s\n\n%s\n\n",          $new = "";
11                  $xml->version->release, $xml->stability->release,          if (strlen(trim($xml->notes))>1) { // Ignore too short descr.
12                  $xml->version->api, $xml->stability->api,                  printf("++*** Version %s (%s) - API %s (%s) - %s\n\n%s\n\n",
13                  $xml->date, $xml->notes);                          $xml->version->release, $xml->stability->release,
14          $new=$xml->version->release;                          $xml->version->api, $xml->stability->api,
15                            $xml->date, $xml->notes);
16                    $new=$xml->version->release;
17            }
18    
19          if (isset($xml->changelog->release) && count($xml->changelog->release))          if (isset($xml->changelog->release) && count($xml->changelog->release)) {
20              foreach($xml->changelog->release as $rel) {                  $tab = array();
21                  $old=$rel->version->release;                  foreach($xml->changelog->release as $rel) {
22                  if ("$old" != "$new") {                          $old=$rel->version->release;
23                      printf("*** Version %s (%s) - API %s (%s) - %s\n\n%s\n\n",                          if ("$old" != "$new") {
24                          $rel->version->release, $rel->stability->release,                                  $tab[''.$rel->date] = $rel;
25                          $rel->version->api, $rel->stability->api,                          }
                         $rel->date, $rel->notes);  
26                  }                  }
27              }                  krsort($tab);
28                    foreach($tab as $rel) {
29                            printf("*** Version %s (%s) - API %s (%s) - %s\n\n%s\n\n",
30                                    $rel->version->release, $rel->stability->release,
31                                    $rel->version->api, $rel->stability->api,
32                                    $rel->date, $rel->notes);
33                    }
34            }
35  } else { // Package.xml V 1.0  } else { // Package.xml V 1.0
36          printf("* Version %s (%s) - %s\n\n%s\n\n",          printf("* Version %s (%s) - %s\n\n%s\n\n",
37                  $xml->release->version, $xml->release->state, $xml->release->date, $xml->release->notes);                  $xml->release->version, $xml->release->state, $xml->release->date, $xml->release->notes);


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed