[zi-cvs] packages/com.zzoss.zic dev_import_xml.php,NONE,1.1 dev_reset_data.php,NONE,1.1 TODO,1.4,1.5 applications.php,1.3,1.4 package.xml,1.5,1.6

[email protected] Sun, 04 Jan 2004 09:11:37 -0800
Newsgroups gmane.comp.php.zzoss.installer.cvs
Message-ID <[email protected]>
Update of /cvsroot/zzossinstaller/packages/com.zzoss.zic
In directory sc8-pr-cvs1:/tmp/cvs-serv6162/com.zzoss.zic

Modified Files:
	TODO applications.php package.xml 
Added Files:
	dev_import_xml.php dev_reset_data.php 
Log Message:
changed navigation of development section, starting with "Manage Applications" page

--- NEW FILE: dev_import_xml.php ---
<?php   
    /*
    Copyright (C) 2001-2004 ZZOSS GbR, http://www.zzoss.com

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this library; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    */
    
    /**
    @version $Id: dev_import_xml.php,v 1.1 2004/01/04 17:11:34 ordnas Exp $
    @copyright Copyright &copy; 2001-2004 ZZ/OSS GbR, http://www.zzoss.com
    @license http://opensource.org/licenses/lgpl-license.php GNU Lesser General Public License
    */

	// execute init file
	require_once 'inc/init.php';

	include 'themes/'.$GLOBALS['ZI']['theme'].'/header.php';
	
?>
<h1>Import XML</h1>

<!--
<p>
    [<a href="dev_distribution_import.php" title="Import Distribution">Import Distribution</a>]<br/>
    Add a distribution by importing its distribution.xml.
</p>
-->
<p>
    [<a href="dev_application_import.php?mode=dev" title="Add Application">Add Application</a>]<br/>
    Add an application by importing its distribution.xml, and application.xml.
</p>
<?php
	$zi_buttons['back'] = 'applications.php?mode=dev';
    
	include 'themes/'.$GLOBALS['ZI']['theme'].'/footer.php';
?>
--- NEW FILE: dev_reset_data.php ---
<?php   
    /*
    Copyright (C) 2001-2004 ZZOSS GbR, http://www.zzoss.com

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this library; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    */
    
    /**
    @version $Id: dev_reset_data.php,v 1.1 2004/01/04 17:11:34 ordnas Exp $
    @copyright Copyright &copy; 2001-2004 ZZ/OSS GbR, http://www.zzoss.com
    @license http://opensource.org/licenses/lgpl-license.php GNU Lesser General Public License
    */

	// execute init file
	require_once 'inc/init.php';

    /***************************************************************************   
    * DEVELOPER FUNCTIONS                                                      *   
    ***************************************************************************/   

	function dev_remove($file) {
		if(substr($file, 0, 3) == '../') {
			$str_file = substr($file, 3);
		} else {
			$str_file = $file;
		}
		if(is_dir($file)) {
			if(ZZOSS_InstallerUtils::rmdir($file)) {
				$msg = 'removed directory '.$str_file."\n";
			} else {
				$msg = 'error removing directory '.$str_file."\n";
			}
		} else
		if(file_exists($file)) {
			if(@unlink($file)) {
				$msg = 'removed file '.$str_file."\n";
			} else {
				$msg = 'error removing file '.$str_file."\n";
			}
		} else {
			if($str_file[strlen($str_file)]=='/') {
				$msg = 'directory '.$str_file.' does not exist'."\n";
			} else {
				$msg = 'file '.$str_file.' does not exist'."\n";
			}
		}
		return $msg;
	}

    /***************************************************************************   
    * PAGE CONTENT                                                             *   
    ***************************************************************************/   

	if(isset($_REQUEST["action"])) {
		switch($_REQUEST["action"]) {
			// remove login data
			case 'reset_login':
                $msg .= dev_remove($GLOBALS['ZI']['data_dir'].'.htpasswd');
				break;
			// reset installer
			case 'reset_installer':
    			$msg .= 'removed '.$GLOBALS['ZI']['data_dir']."\n";
				break;
		}
		$msg .= 'done.';
	}
	
	function zi_process()
	{
		// nothing to process
	}

	include 'themes/'.$GLOBALS['ZI']['theme'].'/header.php';
	
?>
<h1>Reset Options</h1>
<?php
if(isset($msg)) {
	echo '<textarea style="width:95%;height: 100px" readonly>'.$msg.'</textarea>';
}
?>
<p>
    [<a href="<?php echo $_SERVER["PHP_SELF"].'?action=reset_login'; ?>" title="Reset Login">Reset Login</a>]<br/>
    Trigger a new autentication request.
</p>
<p>
    [<a href="<?php echo $_SERVER["PHP_SELF"].'?action=reset_installer'; ?>" title="Reset Installer">Reset Installer</a>]<br/>
    Reset installer to initial state (all data gets lost).
</p>
<?php
    $zi_buttons['back'] = 'applications.php?mode=dev';
	include 'themes/'.$GLOBALS['ZI']['theme'].'/footer.php';
?>
Index: TODO
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.zic/TODO,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** TODO	4 Jan 2004 13:26:55 -0000	1.4
--- TODO	4 Jan 2004 17:11:34 -0000	1.5
***************
*** 471,474 ****
--- 471,476 ----
  - handle errors if a file specified in package.xml filelist does not exist in dev_bundle_new.php
  
+ - if application root is not writeable error occures in application_settings.php, keep additional source paths
+ 
  ### Low Priority ###
  

Index: applications.php
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.zic/applications.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** applications.php	4 Jan 2004 13:26:55 -0000	1.3
--- applications.php	4 Jan 2004 17:11:34 -0000	1.4
***************
*** 100,111 ****
  	?>
  	<h1>Manage Applications</h1>
      <?php
!     if($GLOBALS['ZI']['mode'] == 'dev') {
          ?>
!         <p align="center">
!             [<a href="applications.php" title="Production">Production</a>] [<a href="applications.php?mode=dev" title="Development">Development</a>]
          </p>
-         <p><span class="label">Add Application: </span><input type="file" name="bundle"/><!--<br/>
-         Upload an application bundle to add it to the list of applications.--></p>
          <?php
      }
--- 100,113 ----
  	?>
  	<h1>Manage Applications</h1>
+     <p><span class="label">Load Bundle: </span><input type="file" name="bundle"/><!--<br/>
+         Upload an application bundle to add it to the list of applications.--></p>
      <?php
!     if($_REQUEST['mode'] == 'dev') {
          ?>
!         <p>
!             [<a href="dev_import_xml.php?mode=dev" title="Import XML">Import XML</a>] 
!             [<a href="dev_package.php?mode=dev" title="Package Tools">Package Tools</a>] 
!             [<a href="dev_reset_data.php?mode=dev" title="Reset Data">Reset Data</a>]
          </p>
          <?php
      }

Index: package.xml
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.zic/package.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** package.xml	4 Jan 2004 13:49:15 -0000	1.5
--- package.xml	4 Jan 2004 17:11:34 -0000	1.6
***************
*** 43,49 ****
              <file role="php" basinstalldir="" name="menu.php"/>
              <file role="php" basinstalldir="" name="TODO"/>
              <file role="php" basinstalldir="" name="packages.php"/>
              <file role="php" basinstalldir="" name="dev_package.php"/>
!             <file role="php" basinstalldir="" name="dev_index.php"/>
              <file role="php" basinstalldir="" name="distribution_download.php"/>
              <file role="php" basinstalldir="" name="dev_bundle_instant.php"/>
--- 43,51 ----
              <file role="php" basinstalldir="" name="menu.php"/>
              <file role="php" basinstalldir="" name="TODO"/>
+             <file role="php" basinstalldir="" name="dev_reset_data.php"/>
+             <file role="php" basinstalldir="" name="dev_import_xml.php"/>
              <file role="php" basinstalldir="" name="packages.php"/>
              <file role="php" basinstalldir="" name="dev_package.php"/>
!             <!--<file role="php" basinstalldir="" name="dev_index.php"/>-->
              <file role="php" basinstalldir="" name="distribution_download.php"/>
              <file role="php" basinstalldir="" name="dev_bundle_instant.php"/>




-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click