[zi-cvs] packages/com.zzoss.zic application_done.php,1.14,1.15 application_update.php,1.6,1.7 application_update_confirm.php,1.2,1.3
Sandro Zic <[email protected]> Mon, 05 Apr 2004 09:58:18 +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-serv14292/com.zzoss.zic
Modified Files:
application_done.php application_update.php
application_update_confirm.php
Log Message:
make update work
Index: application_update.php
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.zic/application_update.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** application_update.php 3 Apr 2004 16:15:48 -0000 1.6
--- application_update.php 5 Apr 2004 09:58:16 -0000 1.7
***************
*** 39,44 ****
if (move_uploaded_file($_FILES['bundle']['tmp_name'], $data_dir.$_FILES['bundle']['name'] )) {
// Extract the bundle to temporary directory.
require_once 'ZZOSS_Package/Package.php';
! if(!$params = ZZOSS_Package::tmpBundle($data_dir.$_FILES['bundle']['name'])){
$_REQUEST['ZI_LOCATION_NEXT'] = 'application_update.php'.zi_form_querystr().'&error='.rawurlencode('Missing distribution.xml or application.xml');
return false;
--- 39,47 ----
if (move_uploaded_file($_FILES['bundle']['tmp_name'], $data_dir.$_FILES['bundle']['name'] )) {
// Extract the bundle to temporary directory.
+ $extract_dir = $zi_registry->getApplicationPath().'update'.DIRECTORY_SEPARATOR;
+ System::mkdir(array('-p', $extract_dir));
+
require_once 'ZZOSS_Package/Package.php';
! if(!$params = ZZOSS_Package::getBundleDescr($data_dir.$_FILES['bundle']['name'], $extract_dir)){
$_REQUEST['ZI_LOCATION_NEXT'] = 'application_update.php'.zi_form_querystr().'&error='.rawurlencode('Missing distribution.xml or application.xml');
return false;
***************
*** 57,61 ****
$application = $zi_registry->getApplication();
$_REQUEST['ZI_LOCATION_NEXT'] = 'application_update_confirm.php'.zi_form_querystr().
! '&update_src='.$params['src'].'&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.
--- 60,64 ----
$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.
Index: application_update_confirm.php
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.zic/application_update_confirm.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** application_update_confirm.php 29 Jan 2004 14:09:16 -0000 1.2
--- application_update_confirm.php 5 Apr 2004 09:58:16 -0000 1.3
***************
*** 33,45 ****
function zi_process()
{
! if(is_dir($_REQUEST['update_src'])){
! global $zi_registry;
// get the application settings of the old application.
$app_settings = $zi_registry->getApplicationSettings();
! ZZOSS_Package::extractDistribution($_REQUEST['update_src'], $zi_registry->getDir());
! //System::rm(array('-rf', $_REQUEST['update_src']));
// hide this application until installed
--- 33,47 ----
function zi_process()
{
! global $zi_registry;
! $extract_dir = $zi_registry->getApplicationPath().'update'.DIRECTORY_SEPARATOR;
!
! if(is_dir($extract_dir)){
// get the application settings of the old application.
$app_settings = $zi_registry->getApplicationSettings();
! ZZOSS_Package::extractDistribution($extract_dir, $zi_registry->getDir());
! //System::rm(array('-rf', $extract_dir));
// hide this application until installed
***************
*** 53,56 ****
--- 55,82 ----
$_REQUEST['id'] = $application['id'];
+ $procedures = array(
+ /*'settings' => 'on',*/
+ 'profile' => 'on',
+ 'plugins_manager' => 'on',
+ 'plugins_confirm' => 'on',
+ 'plugins_register' => 'hide',
+ 'plugins_deps' => 'on',
+ 'plugins_fileroles' => 'on',
+ 'plugins_build' => 'on',
+ 'packages_manager' => 'on',
+ 'packages_confirm' => 'on',
+ 'packages_register' => 'hide',
+ 'packages_deps' => 'on',
+ 'packages_fileroles' => 'on',
+ 'packages_build' => 'on'
+ );
+
+ if(isset($_REQUEST['mode']) && $_REQUEST['mode'] == 'dev'){
+ $procedures['plugins_register'] = 'on';
+ $procedures['packages_register'] = 'on';
+ }
+
+ $zi_registry->setProcedures($procedures);
+
$_REQUEST['ZI_LOCATION_NEXT'] = 'application_profile.php'.zi_form_querystr();
}
***************
*** 75,84 ****
</div>
<?php
! $file = $_REQUEST['update_src'].'application.xml';
$config = new ZZOSS_Config;
$config->setFile($file);
$application = $config->query('/application');
! $file = $_REQUEST['update_src'].'distribution.xml';
$config = new ZZOSS_Config;
$config->setFile($file);
--- 101,112 ----
</div>
<?php
! $extract_dir = $zi_registry->getApplicationPath().'update'.DIRECTORY_SEPARATOR;
!
! $file = $extract_dir.'application.xml';
$config = new ZZOSS_Config;
$config->setFile($file);
$application = $config->query('/application');
! $file = $extract_dir.'distribution.xml';
$config = new ZZOSS_Config;
$config->setFile($file);
***************
*** 95,112 ****
$content .= zi_info_td('Description', zi_info_text($info["description"]) );
! $content .= zi_info_td('Distribution', $distribution['summary'].' '.$distribution['release']['version']);
$content .= zi_info_td('UNIX Name', $info["name"] );
$content .= zi_info_td('Version', $info["release"]["version"] );
$content .= zi_info_td('Release Date', $info["release"]["date"] );
$content .= zi_info_td('State', zi_info_text($info["release"]["state"]) );
! $content .= zi_info_td('Homepage', zi_info_text($info['homepage']) );
$content .= zi_info_td('Licenses', zi_info_licenses($info["release"]["license"]) );
! $content .= zi_info_td('Copyrights', zi_info_copyrights($info["release"]["copyright"]['holder']) );
! $content .= zi_info_td('Maintainers', zi_info_maintainers($info["maintainers"]["maintainer"]) );
$content .= zi_info_td('Notes', zi_info_text($info["release"]["notes"]) );
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 $_REQUEST['update_src']; ?>"/>
<?php
--- 123,149 ----
$content .= zi_info_td('Description', zi_info_text($info["description"]) );
! if(isset($_REQUEST['type']) && $_REQUEST['type'] != 'distribution'){
! $distribution = $zi_registry->getDistribution();
! $content .= zi_info_td('Distribution', $distribution['summary'].' '.$distribution['release']['version']);
! }
$content .= zi_info_td('UNIX Name', $info["name"] );
$content .= zi_info_td('Version', $info["release"]["version"] );
$content .= zi_info_td('Release Date', $info["release"]["date"] );
$content .= zi_info_td('State', zi_info_text($info["release"]["state"]) );
! if(isset($info['homepage'])){
! $content .= zi_info_td('Homepage', zi_info_text($info['homepage']) );
! }
$content .= zi_info_td('Licenses', zi_info_licenses($info["release"]["license"]) );
! if(isset($info["release"]["copyright"]['holder'])){
! $content .= zi_info_td('Copyrights', zi_info_copyrights($info["release"]["copyright"]['holder']) );
! }
! if(isset($info["maintainers"]["maintainer"])){
! $content .= zi_info_td('Maintainers', zi_info_maintainers($info["maintainers"]["maintainer"]) );
! }
$content .= zi_info_td('Notes', zi_info_text($info["release"]["notes"]) );
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
Index: application_done.php
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.zic/application_done.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** application_done.php 4 Apr 2004 15:53:41 -0000 1.14
--- application_done.php 5 Apr 2004 09:58:16 -0000 1.15
***************
*** 73,77 ****
$zi_registry->setApplications($applications);
*/
! $zi_registry->setInstalledApplication($application);
$zi_registry->unsetHiddenApplication();
$zi_registry->refreshApplications();
--- 73,77 ----
$zi_registry->setApplications($applications);
*/
! $zi_registry->setInstalledApplication($application, $_REQUEST['application'], $_REQUEST['distribution']);
$zi_registry->unsetHiddenApplication();
$zi_registry->refreshApplications();
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click