[zi-cvs] packages/com.zzoss.zic application_delete.php,1.6,1.7 packages_reset.php,1.5,1.6

Sandro Zic <[email protected]> Mon, 22 Mar 2004 08:25:28 +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-serv16433/com.zzoss.zic

Modified Files:
	application_delete.php packages_reset.php 
Log Message:
hide reset script only when explicitly specified (aka show it on first installation of dev app)

Index: packages_reset.php
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.zic/packages_reset.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** packages_reset.php	19 Mar 2004 12:18:16 -0000	1.5
--- packages_reset.php	22 Mar 2004 08:25:26 -0000	1.6
***************
*** 36,39 ****
--- 36,60 ----
      $buffer_output = false;
      
+     $application = $zi_registry->getApplication();
+     
+     require_once 'ZZOSS_Config/Config.php';
+     $application = ZZOSS_Config::prepareNumeric($application, array($pkg_type));
+ 
+     // if there are no plugins, we proceed
+     if(
+         (!isset($_REQUEST['widget_type']) || $_REQUEST['widget_type'] != 'popup') &&
+         !isset($application['release'][$pkg_type.'s'][$pkg_type])
+         ){
+         
+         if(isset($_REQUEST['mode']) && $_REQUEST['mode'] == 'dev'){
+             $url_next = 'packages.php'.zi_form_querystr();
+         } else {
+             $_REQUEST['type'] = 'package';
+             $url_next = 'packages.php'.zi_form_querystr();
+         }
+         header('Location: '.$url_next);
+         exit;
+     }
+     
      // check if this script is part of installation procedure
      if(isset($_REQUEST['mode']) && $_REQUEST['mode'] == 'dev' && !$zi_registry->isProcedure($pkg_type.'s_register')){
***************
*** 48,54 ****
          }
          $remove_installed_pkgs = false;
!         $buffer_output = true;
      }
! 
      function zi_default()
      {
--- 69,77 ----
          }
          $remove_installed_pkgs = false;
!         if($zi_registry->getProcedure($pkg_type.'s_register') == 'hide'){
!             $buffer_output = true;
!         }
      }
!      
      function zi_default()
      {
***************
*** 63,69 ****
      /***************************************************************************   
      * PAGE CONTENT                                                             *   
!     ***************************************************************************/   
! 
!     $application = $zi_registry->getApplication();
      
      $is_popup = false;
--- 86,90 ----
      /***************************************************************************   
      * PAGE CONTENT                                                             *   
!     ***************************************************************************/
      
      $is_popup = false;
***************
*** 87,97 ****
      $zi_registry->setPackageType($pkg_type);
      
!     require_once 'ZZOSS_Config/Config.php';
!     $application = ZZOSS_Config::prepareNumeric($application, array($pkg_type));
!     $packages = $application['release'][$pkg_type.'s'][$pkg_type];
      
!     if(!is_array($packages) || !count($packages)){
          ?>
!         <div class="warning">No packages defined in application.xml</div>
          <?php
      } else {
--- 108,120 ----
      $zi_registry->setPackageType($pkg_type);
      
!     $packages = array();
      
!     if(isset($application['release'][$pkg_type.'s'][$pkg_type])){
!         $packages = $application['release'][$pkg_type.'s'][$pkg_type];
!     }
!     
!     if(!count($packages)){
          ?>
!         <div class="warning">No <?php echo ucfirst($pkg_type); ?>s defined in application.xml</div>
          <?php
      } else {

Index: application_delete.php
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.zic/application_delete.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** application_delete.php	19 Mar 2004 12:58:40 -0000	1.6
--- application_delete.php	22 Mar 2004 08:25:26 -0000	1.7
***************
*** 35,39 ****
          global $zi_registry;
          
!         if($application = $zi_registry->getApplicationById($_REQUEST["id"])){
              //if(isset($_REQUEST['mode']) && $_REQUEST['mode'] != 'dev'){
                  $application_settings = $zi_registry->getApplicationSettings($application['name'].'-'.$application['release']['version']);
--- 35,39 ----
          global $zi_registry;
          
!         if($application = $zi_registry->getApplication()){
              //if(isset($_REQUEST['mode']) && $_REQUEST['mode'] != 'dev'){
                  $application_settings = $zi_registry->getApplicationSettings($application['name'].'-'.$application['release']['version']);
***************
*** 61,65 ****
              
              // remove application from registry
!             $zi_registry->removeApplication($application['name'].'-'.$application['release']['version']);
          }
  	}
--- 61,65 ----
              
              // remove application from registry
!             $zi_registry->removeApplication();
          }
  	}



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