[zi-cvs] packages/com.zzoss.zic application_done.php,1.16,1.17 application_install.php,1.5,1.6 application_update.php,1.7,1.8 application_update_confirm.php,1.4,1.5 dev_index.php,1.2,1.3 package.xml,1.14,1.15 packages_config.php,1.1,1.2 packages_reset.php,1.11,1.12
Sandro Zic <[email protected]> Mon, 17 May 2004 09:55:25 +0000
| Newsgroups | gmane.comp.php.zzoss.installer.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/zzossinstaller/packages/com.zzoss.zic
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8203/com.zzoss.zic
Modified Files:
application_done.php application_install.php
application_update.php application_update_confirm.php
dev_index.php package.xml packages_config.php
packages_reset.php
Log Message:
make sure that update of app, esp. installer, works also if distribution version has changed
Index: packages_reset.php
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.zic/packages_reset.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** packages_reset.php 11 May 2004 13:35:13 -0000 1.11
--- packages_reset.php 17 May 2004 09:55:23 -0000 1.12
***************
*** 23,35 ****
@license http://opensource.org/licenses/lgpl-license.php GNU Lesser General Public License
*/
!
// execute init file
require_once 'inc/init.php';
!
$pkg_type = 'package';
if(isset($_REQUEST['type'])){
$pkg_type = $_REQUEST['type'];
}
!
$remove_installed_pkgs = true;
$remove_plugins = true;
--- 23,35 ----
@license http://opensource.org/licenses/lgpl-license.php GNU Lesser General Public License
*/
!
// execute init file
require_once 'inc/init.php';
!
$pkg_type = 'package';
if(isset($_REQUEST['type'])){
$pkg_type = $_REQUEST['type'];
}
!
$remove_installed_pkgs = true;
$remove_plugins = true;
Index: application_install.php
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.zic/application_install.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** application_install.php 6 Apr 2004 19:51:09 -0000 1.5
--- application_install.php 17 May 2004 09:55:23 -0000 1.6
***************
*** 40,43 ****
--- 40,59 ----
$redirect = 'applications.php';
} else {
+ /*
+ require_once 'ZZOSS_Transition/Transition.php';
+ $transition = new ZZOSS_Transition;
+ // settings
+ $transition->setState('application_settings.php'.zi_form_querystr(), 0);
+ // profile
+ $transition->setState('application_profile.php'.zi_form_querystr(), 1);
+ // plugins_register
+ $transition->setState('packages_reset.php'.zi_form_querystr().'&type=plugin', 2, array('hide'));
+ // plugins_manager
+ $transition->setState('packages.php'.zi_form_querystr().'&type=plugin', 3);
+ // plugins_confirm
+ $transition->setState('packages_confirm.php'.zi_form_querystr().'&type=plugin', 4);
+ // plugins_deps
+ $transition->setState('packages_dependencies.php'.zi_form_querystr().'&type=plugin', 5);
+ */
// installing new application in prod mode
$procedures = array(
Index: package.xml
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.zic/package.xml,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** package.xml 11 May 2004 12:44:28 -0000 1.14
--- package.xml 17 May 2004 09:55:23 -0000 1.15
***************
*** 92,95 ****
--- 92,96 ----
<file role="php" baseinstalldir="" name="packages_dependencies.php"/>
<file role="php" baseinstalldir="" name="packages_download.php"/>
+ <file role="php" baseinstalldir="" name="packages_manager.php"/>
<file role="php" baseinstalldir="" name="packages_process.php"/>
<file role="php" baseinstalldir="" name="packages_reset.php"/>
Index: application_update_confirm.php
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.zic/application_update_confirm.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** application_update_confirm.php 6 Apr 2004 19:11:57 -0000 1.4
--- application_update_confirm.php 17 May 2004 09:55:23 -0000 1.5
***************
*** 46,56 ****
// hide this application until installed
! $zi_registry->setHiddenApplication($_REQUEST['update_new']);
$zi_registry->refreshApplications();
! $application = $zi_registry->getApplication($_REQUEST['update_new']);
// register old application settings for new one
$zi_registry->updateApplicationSettings($app_settings);
- $_REQUEST['application'] = $application['name'].'-'.$application['release']['version'];
//$_REQUEST['id'] = $application['id'];
--- 46,58 ----
// hide this application until installed
! $zi_registry->setHiddenApplication($_REQUEST['new_app'], $_REQUEST['new_distri']);
$zi_registry->refreshApplications();
! $distribution = $zi_registry->getDistribution($_REQUEST['new_distri']);
! $_REQUEST['distribution'] = $distribution['name'].'-'.$distribution['release']['version'];
! $application = $zi_registry->getApplication($_REQUEST['new_app'], $_REQUEST['new_distri']);
! $_REQUEST['application'] = $application['name'].'-'.$application['release']['version'];
// register old application settings for new one
$zi_registry->updateApplicationSettings($app_settings);
//$_REQUEST['id'] = $application['id'];
***************
*** 98,102 ****
}
?>
! Are you sure, you want to update <br/>'<?php echo $_REQUEST['update_old_human'].' ('.$_REQUEST['update_old'].')'; ?>'<br/> with the application below?
</div>
<?php
--- 100,104 ----
}
?>
! Are you sure, you want to update <br/>'<?php echo $_REQUEST['update_old_human'].' ('.$_REQUEST['update_app'].')'; ?>'<br/> with the application below?
</div>
<?php
***************
*** 144,148 ****
echo zi_info_table($info["summary"].' '. $info["release"]["version"], $content);
?>
! <input type="hidden" name="update_new" value="<?php echo $_REQUEST['update_new']; ?>"/>
<input type="hidden" name="update_src" value="<?php echo $extract_dir; ?>"/>
<?php
--- 146,151 ----
echo zi_info_table($info["summary"].' '. $info["release"]["version"], $content);
?>
! <input type="hidden" name="new_distri" value="<?php echo $_REQUEST['new_distri']; ?>"/>
! <input type="hidden" name="new_app" value="<?php echo $_REQUEST['new_app']; ?>"/>
<input type="hidden" name="update_src" value="<?php echo $extract_dir; ?>"/>
<?php
Index: application_done.php
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.zic/application_done.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** application_done.php 6 Apr 2004 19:51:09 -0000 1.16
--- application_done.php 17 May 2004 09:55:23 -0000 1.17
***************
*** 61,65 ****
// if this is an update, remove the old application
! if(isset($_REQUEST['update_old'])){
$zi_registry->removeApplication($_REQUEST['update_old']);
}
--- 61,70 ----
// if this is an update, remove the old application
! if(isset($_REQUEST['update_distri']) && isset($_REQUEST['update_app'])){
! $zi_registry->removeApplication($_REQUEST['update_app'], $_REQUEST['update_distri']);
! }
!
! // keep this for compatibility reasons with ZIC <= 1.1.0dev1
! if(isset($_REQUEST['update_old']) && isset($_REQUEST['update_old'])){
$zi_registry->removeApplication($_REQUEST['update_old']);
}
Index: application_update.php
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.zic/application_update.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** application_update.php 5 Apr 2004 09:58:16 -0000 1.7
--- application_update.php 17 May 2004 09:55:23 -0000 1.8
***************
*** 47,64 ****
return false;
}
! $new_version = $params['application']['release']['version'];
$new_app = $params['application']['name'];
! // Get information of installed application
$application = $zi_registry->getApplication();
! $old_version = $application['release']['version'];
$old_app = $application['name'];
! if($new_version <= $old_version){
! $_REQUEST['ZI_LOCATION_NEXT'] = 'application_update.php'.zi_form_querystr().'&error='.rawurlencode('New version is older or the same (new '.$new_version.' <= old '.$old_version.')');
return false;
}
$application = $zi_registry->getApplication();
$_REQUEST['ZI_LOCATION_NEXT'] = 'application_update_confirm.php'.zi_form_querystr().
! '&update_old='.$old_app.'-'.$old_version.'&update_old_human='.rawurlencode($application["summary"].' '.$application['release']['version']).'&update_new='.$new_app.'-'.$new_version;
// Show warning if application names don't match.
--- 47,73 ----
return false;
}
!
! $new_distri_version = $params['distribution']['release']['version'];
! $new_distri = $params['distribution']['name'];
!
! $new_app_version = $params['application']['release']['version'];
$new_app = $params['application']['name'];
! // distribution of application that will be updated
! $distri = $zi_registry->getDistribution();
! $old_distri_version = $distri['release']['version'];
! $old_distri = $distri['name'];
!
! // information of application that will be updated
$application = $zi_registry->getApplication();
! $old_app_version = $application['release']['version'];
$old_app = $application['name'];
! if($new_app_version <= $old_app_version){
! $_REQUEST['ZI_LOCATION_NEXT'] = 'application_update.php'.zi_form_querystr().'&error='.rawurlencode('New version is older or the same (new '.$new_app_version.' <= old '.$old_app_version.')');
return false;
}
$application = $zi_registry->getApplication();
$_REQUEST['ZI_LOCATION_NEXT'] = 'application_update_confirm.php'.zi_form_querystr().
! '&update_distri='.$old_distri.'-'.$old_distri_version.'&update_app='.$old_app.'-'.$old_app_version.'&update_old_human='.rawurlencode($application["summary"].' '.$application['release']['version']).'&new_distri='.$new_distri.'-'.$new_distri_version.'&new_app='.$new_app.'-'.$new_app_version;
// Show warning if application names don't match.
Index: dev_index.php
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.zic/dev_index.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** dev_index.php 14 Jan 2004 15:41:27 -0000 1.2
--- dev_index.php 17 May 2004 09:55:23 -0000 1.3
***************
*** 85,89 ****
foreach($dirs as $dir) {
// now check which of the modules already installed
! if($dp = @opendir($dir)) {
while (false !== ($entry = readdir($dp))) {
if($entry != '.' && $entry != '..'){
--- 85,89 ----
foreach($dirs as $dir) {
// now check which of the modules already installed
! if(is_dir($dir) && $dp = opendir($dir)) {
while (false !== ($entry = readdir($dp))) {
if($entry != '.' && $entry != '..'){
Index: packages_config.php
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.zic/packages_config.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** packages_config.php 22 Dec 2003 17:19:58 -0000 1.1
--- packages_config.php 17 May 2004 09:55:23 -0000 1.2
***************
*** 181,185 ****
// scan directory for plugins
$dir = $component_params['path'].'zzoss_installer/';
! if($dp = @opendir($dir)) {
while (false !== ($entry = readdir($dp))) {
$plugin_dir = $dir.$entry;
--- 181,185 ----
// scan directory for plugins
$dir = $component_params['path'].'zzoss_installer/';
! if(is_dir($dir) && $dp = opendir($dir)) {
while (false !== ($entry = readdir($dp))) {
$plugin_dir = $dir.$entry;
-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click