[zi-cvs] packages/com.zzoss.zic info_changelog.php,1.1,1.2
[email protected] Sun, 11 Jan 2004 08:26:01 -0800
| Newsgroups | gmane.comp.php.zzoss.installer.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/zzossinstaller/packages/com.zzoss.zic
In directory sc8-pr-cvs1:/tmp/cvs-serv6495
Modified Files:
info_changelog.php
Log Message:
added changelog for local distributions
Index: info_changelog.php
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.zic/info_changelog.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** info_changelog.php 22 Dec 2003 17:19:58 -0000 1.1
--- info_changelog.php 11 Jan 2004 16:25:58 -0000 1.2
***************
*** 1,158 ****
! <?php
! /*
! Copyright (C) 2001-2004 ZZOSS GbR, http://www.zzoss.com
!
! This library is free software; you can redistribute it and/or
! modify it under the terms of the GNU Lesser General Public
! License as published by the Free Software Foundation; either
! version 2.1 of the License, or (at your option) any later version.
!
! This library is distributed in the hope that it will be useful,
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! Lesser General Public License for more details.
!
! You should have received a copy of the GNU Lesser General Public
! License along with this library; if not, write to the Free Software
! Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! /**
! @version $Id$
! @copyright Copyright © 2001-2004 ZZ/OSS GbR, http://www.zzoss.com
! @license http://opensource.org/licenses/lgpl-license.php GNU Lesser General Public License
! */
!
! // execute init file
! require_once 'inc/init.php';
! include 'inc/info.php';
!
! switch($_REQUEST['type']){
! case 'distribution_remote':
! $header = 'Distribution';
!
! // load selected distribution
! $file = $GLOBALS['ZI']['data_dir'].'installer/remote_distributions.xml';
! $distributions_xml = new ZZOSS_Config(array('numeric' => array('distribution')));
! $distributions_xml->setFile($file);
! $distributions = $distributions_xml->query('/distributions/distribution');
! $distribution = $distributions[$_REQUEST["id"]];
! $file = $GLOBALS['ZI']['data_dir'].'installer/remote_distribution.xml';
! if(file_exists($file)) {
! unlink($file);
! }
! ZZOSS_InstallerUtils::downloadFile(
! $distribution["filelist"]["descriptor"]["#"],
! $file
! );
! if(file_exists($file)) {
! $distribution_config = new ZZOSS_Config(array('cache' => true, 'numeric' => array('release')));
! $distribution_config->setFile($file);
! $info = $distribution_config->query('/distribution');
! }
! break;
! case 'application_remote':
! $header = 'Application';
! // download application.xml
! $file = $GLOBALS['ZI']['data_dir'].'installer/remote_applications.xml';
! $file_application = $GLOBALS['ZI']['data_dir'].'installer/remote_application.xml';
! if(file_exists($file_application)) {
! unlink($file_application);
! }
! $remote_applications_xml = new ZZOSS_Config(array('numeric' => array('application','descriptor')));
! $remote_applications_xml->setFile($file);
! $remote_applications = $remote_applications_xml->query('/applications/application');
! $remote_application = $remote_applications[$_REQUEST["id"]];
! // download application.xml and packages.xml
! if(is_array($remote_application["filelist"]["descriptor"])) {
! foreach($remote_application["filelist"]["descriptor"] as $descriptor) {
! if($descriptor["@"]["role"] == 'application') {
! ZZOSS_InstallerUtils::downloadFile(
! $descriptor["#"],
! $file_application
! );
! }
! }
! }
! if(file_exists($file_application)) {
! $application_config = new ZZOSS_Config(array('numeric' => array('release')));
! $application_config->setFile($file_application);
! $info = $application_config->query('/application');
! }
! break;
! case 'application':
! $header = 'Application';
! // load selected package
! $application = $zi_registry->getApplicationById($_REQUEST["id"]);
! // make those items a numeric array where more than one element with the same name occurs
! // on the same level
! require_once 'ZZOSS_Config/Config.php';
! $info = ZZOSS_Config::prepareNumeric($application, array('release'));
! break;
! case 'package':
! $header = 'Package';
! $info = $zi_registry->getPackageById($_REQUEST["id"]);
! if($info["install"]["type"] == 'remote') {
! $info = $zi_registry->getPackageRemoteInfoById($_REQUEST['id']);
! }
! $info = ZZOSS_Config::prepareNumeric($info, array('release'));
! break;
! }
!
! $releases = $info['changelog']['release'];
!
! /***************************************************************************
! * PAGE CONTENT *
! ***************************************************************************/
!
! $zi_buttons['back'] = 'info.php'.zi_form_querystr();
!
! include 'themes/'.$GLOBALS['ZI']['theme'].'/header_popup.php';
! ?>
! <h1><?php echo $header; ?> Information</h1>
!
! <table class="list">
! <tr>
! <th colspan="4"><?php
! if($_REQUEST['type'] == 'package'){
! echo $info['name'].'-'.$info["release"][0]["version"].'<br/>'.$info["summary"];
! } else {
! echo $info["summary"].' '. $info["release"][0]["version"];
! }
! ?></th>
! </tr>
! <tr>
! <td class="label-top">Older Version</td>
! <td class="label-top">State</td>
! <td class="label-top">Release Date</td>
! <td class="label-top">Notes</td>
! </tr>
! <?php
! // show application information table
! foreach($releases as $release){
! if(strlen($release['version'])){
! ?>
! <tr>
! <td><?php echo $release['version']; ?></td>
! <td><?php echo $release['state']; ?></td>
! <td><?php echo $release['date']; ?></td>
! <td><?php echo zi_info_text($release['notes']); ?></td>
! </tr>
! <?php
! }
! }
! ?>
! </table>
! <div class="contextlink">
! <?php
! if(is_array($info["changelog"])) {
! ?>
! [ <a href="info.php<?php echo zi_form_querystr(); ?>">General Info</a> ]
! <?php
! }
! ?>
! </div>
! <?php
!
! include 'themes/'.$GLOBALS['ZI']['theme'].'/footer_popup.php';
! ?>
--- 1,167 ----
! <?php
! /*
! Copyright (C) 2001-2004 ZZOSS GbR, http://www.zzoss.com
!
! This library is free software; you can redistribute it and/or
! modify it under the terms of the GNU Lesser General Public
! License as published by the Free Software Foundation; either
! version 2.1 of the License, or (at your option) any later version.
!
! This library is distributed in the hope that it will be useful,
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
! Lesser General Public License for more details.
!
! You should have received a copy of the GNU Lesser General Public
! License along with this library; if not, write to the Free Software
! Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! */
!
! /**
! @version $Id$
! @copyright Copyright © 2001-2004 ZZ/OSS GbR, http://www.zzoss.com
! @license http://opensource.org/licenses/lgpl-license.php GNU Lesser General Public License
! */
!
! // execute init file
! require_once 'inc/init.php';
! include 'inc/info.php';
!
! switch($_REQUEST['type']){
! case 'distribution_remote':
! $header = 'Distribution';
!
! // load selected distribution
! $file = $GLOBALS['ZI']['installer_data_dir'].'installer/remote_distributions.xml';
! $distributions_xml = new ZZOSS_Config(array('numeric' => array('distribution')));
! $distributions_xml->setFile($file);
! $distributions = $distributions_xml->query('/distributions/distribution');
! $distribution = $distributions[$_REQUEST["id"]];
! $file = $GLOBALS['ZI']['installer_data_dir'].'installer/remote_distribution.xml';
! if(file_exists($file)) {
! unlink($file);
! }
! ZZOSS_InstallerUtils::downloadFile(
! $distribution["filelist"]["descriptor"]["#"],
! $file
! );
! if(file_exists($file)) {
! $distribution_config = new ZZOSS_Config(array('cache' => true, 'numeric' => array('release')));
! $distribution_config->setFile($file);
! $info = $distribution_config->query('/distribution');
! }
! break;
! case 'application_remote':
! $header = 'Application';
! // download application.xml
! $file = $GLOBALS['ZI']['installer_data_dir'].'installer/remote_applications.xml';
! $file_application = $GLOBALS['ZI']['installer_data_dir'].'installer/remote_application.xml';
! if(file_exists($file_application)) {
! unlink($file_application);
! }
! $remote_applications_xml = new ZZOSS_Config(array('numeric' => array('application','descriptor')));
! $remote_applications_xml->setFile($file);
! $remote_applications = $remote_applications_xml->query('/applications/application');
! $remote_application = $remote_applications[$_REQUEST["id"]];
! // download application.xml and packages.xml
! if(is_array($remote_application["filelist"]["descriptor"])) {
! foreach($remote_application["filelist"]["descriptor"] as $descriptor) {
! if($descriptor["@"]["role"] == 'application') {
! ZZOSS_InstallerUtils::downloadFile(
! $descriptor["#"],
! $file_application
! );
! }
! }
! }
! if(file_exists($file_application)) {
! $application_config = new ZZOSS_Config(array('numeric' => array('release')));
! $application_config->setFile($file_application);
! $info = $application_config->query('/application');
! }
! break;
! case 'distribution':
! $header = 'Distribution';
!
! // load selected package
! $distribution = $zi_registry->getDistribution($_REQUEST["distribution"]);
! // make those items a numeric array where more than one element with the same name occurs
! // on the same level
! require_once 'ZZOSS_Config/Config.php';
! $info = ZZOSS_Config::prepareNumeric($distribution, array('license', 'maintainer', 'holder','release'));
! break;
! case 'application':
! $header = 'Application';
! // load selected package
! $application = $zi_registry->getApplicationById($_REQUEST["id"]);
! // make those items a numeric array where more than one element with the same name occurs
! // on the same level
! require_once 'ZZOSS_Config/Config.php';
! $info = ZZOSS_Config::prepareNumeric($application, array('release'));
! break;
! case 'package':
! $header = 'Package';
! $info = $zi_registry->getPackageById($_REQUEST["id"]);
! if($info["install"]["type"] == 'remote') {
! $info = $zi_registry->getPackageRemoteInfoById($_REQUEST['id']);
! }
! $info = ZZOSS_Config::prepareNumeric($info, array('release'));
! break;
! }
! $releases = $info['changelog']['release'];
!
! /***************************************************************************
! * PAGE CONTENT *
! ***************************************************************************/
!
! $zi_buttons['back'] = 'info.php'.zi_form_querystr();
!
! include 'themes/'.$GLOBALS['ZI']['theme'].'/header_popup.php';
! ?>
! <h1><?php echo $header; ?> Information</h1>
!
! <table class="list">
! <tr>
! <th colspan="4"><?php
! if($_REQUEST['type'] == 'package'){
! echo $info['name'].'-'.$info["release"][0]["version"].'<br/>'.$info["summary"];
! } else {
! echo $info["summary"].' '. $info["release"][0]["version"];
! }
! ?></th>
! </tr>
! <tr>
! <td class="label-top">Older Version</td>
! <td class="label-top">State</td>
! <td class="label-top">Release Date</td>
! <td class="label-top">Notes</td>
! </tr>
! <?php
! // show application information table
! foreach($releases as $release){
! if(strlen($release['version'])){
! ?>
! <tr>
! <td><?php echo $release['version']; ?></td>
! <td><?php echo $release['state']; ?></td>
! <td><?php echo $release['date']; ?></td>
! <td><?php echo zi_info_text($release['notes']); ?></td>
! </tr>
! <?php
! }
! }
! ?>
! </table>
! <div class="contextlink">
! <?php
! if(is_array($info["changelog"])) {
! ?>
! [ <a href="info.php<?php echo zi_form_querystr(); ?>">General Info</a> ]
! <?php
! }
! ?>
! </div>
! <?php
!
! include 'themes/'.$GLOBALS['ZI']['theme'].'/footer_popup.php';
! ?>
-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html