[zi-cvs] packages/com.zzoss.installer.lib Registry.php,1.35,1.36

Sandro Zic <[email protected]> Mon, 17 May 2004 15:55:47 +0000
Newsgroups gmane.comp.php.zzoss.installer.cvs
Message-ID <[email protected]>
Update of /cvsroot/zzossinstaller/packages/com.zzoss.installer.lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24557/com.zzoss.installer.lib

Modified Files:
	Registry.php 
Log Message:
- perform update in a sandbox within the installer data directory:
    - copy the old app to the sandbox
    - install the new app to the sandbox
    - copy back the new app to the application root
    <- important when installer installs itself
    <- makes sure that update is only finalized if no errors occured

Index: Registry.php
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.installer.lib/Registry.php,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -d -r1.35 -r1.36
*** Registry.php	17 May 2004 09:54:50 -0000	1.35
--- Registry.php	17 May 2004 15:55:44 -0000	1.36
***************
*** 397,401 ****
      }
  
!     function getApplicationSettings($application = NULL, $distribution = NULL)
      {
          if(!is_null($distribution)){
--- 397,401 ----
      }
  
!     function getApplicationSettings($mode = '', $application = NULL, $distribution = NULL)
      {
          if(!is_null($distribution)){
***************
*** 405,415 ****
              $this->setApplication($application);
          }
! 
          // check for settings
!         $file = $this->application_path.'installer'.DIRECTORY_SEPARATOR.'application_settings.reg';
          if(!file_exists($file)) {
              return false;
          }
! 
          return ZZOSS_InstallerUtils::unserializeFromFile($file);
          return $this->application_settings = $array["ZI_VALUES"];
--- 405,419 ----
              $this->setApplication($application);
          }
!         
!         if(strlen($mode)){
!             $mode = '_'.$mode;
!         }
!         
          // check for settings
!         $file = $this->application_path.'installer'.DIRECTORY_SEPARATOR.'application_settings'.$mode.'.reg';
          if(!file_exists($file)) {
              return false;
          }
!         
          return ZZOSS_InstallerUtils::unserializeFromFile($file);
          return $this->application_settings = $array["ZI_VALUES"];
***************
*** 748,752 ****
          return false;
      }
! 
      function updateApplicationSettingsById($id, $data, $distribution = NULL)
      {
--- 752,756 ----
          return false;
      }
!     /*
      function updateApplicationSettingsById($id, $data, $distribution = NULL)
      {
***************
*** 764,769 ****
          return true;
      }
! 
!     function updateApplicationSettings($data, $application = NULL, $distribution = NULL)
      {
          if(!is_null($distribution)){
--- 768,773 ----
          return true;
      }
!     */
!     function updateApplicationSettings($data, $mode = '', $application = NULL, $distribution = NULL)
      {
          if(!is_null($distribution)){
***************
*** 773,779 ****
              $this->setApplication($application);
          }
! 
          //$application = $this->getApplication();
!      	$file = $this->getApplicationPath().'installer'.DIRECTORY_SEPARATOR.'application_settings.reg';
  		if(file_exists($file)) {
  			$old_settings = ZZOSS_InstallerUtils::unserializeFromFile( $file );
--- 777,787 ----
              $this->setApplication($application);
          }
!         
!         if(strlen($mode)){
!             $mode = '_'.$mode;
!         }
!         
          //$application = $this->getApplication();
!      	$file = $this->getApplicationPath().'installer'.DIRECTORY_SEPARATOR.'application_settings'.$mode.'.reg';
  		if(file_exists($file)) {
  			$old_settings = ZZOSS_InstallerUtils::unserializeFromFile( $file );
***************
*** 783,787 ****
          return true;
      }
! 
      function getApplicationSettingsById($id, $distribution = NULL)
      {
--- 791,795 ----
          return true;
      }
!     /*
      function getApplicationSettingsById($id, $distribution = NULL)
      {
***************
*** 798,802 ****
          return false;
      }
! 
      /**
      * @see refreshApplications()
--- 806,810 ----
          return false;
      }
!     */
      /**
      * @see refreshApplications()



-------------------------------------------------------
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