[zi-cvs] packages/com.zzoss.zic application_delete.php,1.8,1.9
Sandro Zic <[email protected]> Mon, 17 May 2004 09:53:53 +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-serv7780
Modified Files:
application_delete.php
Log Message:
sophisticated delete options in development mode: keep installed files and keep application XML descriptor in registry
Index: application_delete.php
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.zic/application_delete.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** application_delete.php 3 Apr 2004 16:15:48 -0000 1.8
--- application_delete.php 17 May 2004 09:53:50 -0000 1.9
***************
*** 39,43 ****
$application_settings = $zi_registry->getApplicationSettings($application['name'].'-'.$application['release']['version']);
! if(isset($application_settings["application_root"]) && strlen($application_settings["application_root"])){
// First we delete the application root.
if(is_dir($application_settings["application_root"])){
--- 39,48 ----
$application_settings = $zi_registry->getApplicationSettings($application['name'].'-'.$application['release']['version']);
! if(
! isset($_REQUEST['ZI_VALUES']['files']) &&
! $_REQUEST['ZI_VALUES']['files'] == 'on' &&
! isset($application_settings["application_root"]) &&
! strlen($application_settings["application_root"])
! ){
// First we delete the application root.
if(is_dir($application_settings["application_root"])){
***************
*** 60,65 ****
//}
! // remove application from registry
! $zi_registry->removeApplication();
}
}
--- 65,74 ----
//}
! if(isset($_REQUEST['ZI_VALUES']['descriptor']) && $_REQUEST['ZI_VALUES']['descriptor'] == 'on'){
! // remove application from registry
! $zi_registry->removeApplication();
! } else {
! $zi_registry->resetApp();
! }
}
}
***************
*** 70,77 ****
--- 79,121 ----
include 'themes/'.$GLOBALS['ZI']['theme'].'/header.php';
+
+ $settings = $zi_registry->getApplicationSettings();
?>
<h1>Remove Application</h1>
<div class="warning">Are you sure, you want to remove this application?</div>
<?php
+ if(!isset($_REQUEST['ZI_VALUES'])){
+ $_REQUEST['ZI_VALUES']['descriptor'] = 'on';
+ $_REQUEST['ZI_VALUES']['files'] = 'on';
+ }
+ // delete options
+ if($GLOBALS['ZI']['mode'] == 'dev'){
+ // visible only in development mode
+ $widget = 'checkbox';
+ ?>
+ <table border="0" cellspacing="0" cellpadding="4">
+ <?php
+ } else {
+ $widget = 'hidden';
+ }
+
+ // installer widget class
+ require_once 'ZZOSS_Installer/Widget.php';
+ $zi_widget = new ZZOSS_InstallerWidget;
+ if(isset($zi_errors)){
+ $zi_widget->setErrors($zi_errors);
+ }
+
+ echo $zi_widget->add($widget, 'Descriptor', 'descriptor', array('info' => 'Remove the application XML descriptor from the registry.'));
+ if(isset($settings["application_root"]) && strlen($settings["application_root"]) && is_dir($settings["application_root"])){
+ echo $zi_widget->add($widget, 'Files', 'files', array('info' => 'Remove the installed files from the application root.'));
+ }
+
+ if($GLOBALS['ZI']['mode'] == 'dev'){
+ ?>
+ </table>
+ <?php
+ }
+
// load selected package
$application = $zi_registry->getApplication();
***************
*** 86,90 ****
// Show the installation paths if it is an installed application
if(isset($info['installed'])){
- $settings = $zi_registry->getApplicationSettings();
$content .= zi_info_td('Install Root', $settings['application_root']);
$content .= zi_info_td('Install URL', '<a href="'.$settings['application_url'].'" target="_blank">'.$settings['application_url'].'</a>');
--- 130,133 ----
-------------------------------------------------------
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