[zi-cvs] packages/com.zzoss.zic/inc authentication.php,1.5,1.6 init.php,1.9,1.10
Sandro Zic <[email protected]> Tue, 06 Apr 2004 14:45:20 +0000
| Newsgroups | gmane.comp.php.zzoss.installer.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/zzossinstaller/packages/com.zzoss.zic/inc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32569/com.zzoss.zic/inc
Modified Files:
authentication.php init.php
Log Message:
make plugins sandbox work
Index: authentication.php
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.zic/inc/authentication.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** authentication.php 22 Mar 2004 08:29:23 -0000 1.5
--- authentication.php 6 Apr 2004 14:45:17 -0000 1.6
***************
*** 34,48 ****
}
} else {
! // ask username and password of installation administrator
! //require_once "PEAR.php";
! require_once 'Auth/HTTP.php';
!
! $zi_auth = new Auth_HTTP("File", $GLOBALS['ZI']['installer_data_dir'].".htpasswd");
! $zi_auth->setRealm('ZZ/OSS Installer');
! $zi_auth->setCancelText(cancelText());
! $zi_auth->start();
}
! function cancelText()
{
// create a nice looking cancel text :)
--- 34,71 ----
}
} else {
! if(ZI_INIT_MODE != 'RE'){
! // ask username and password of installation administrator
! //require_once "PEAR.php";
! require_once 'Auth/HTTP.php';
!
! $zi_auth = new Auth_HTTP("File", $GLOBALS['ZI']['installer_data_dir'].".htpasswd");
! $zi_auth->setRealm('ZZ/OSS Installer Client (ZIC)');
! $zi_auth->setCancelText(zi_cancel_text());
! $zi_auth->start();
! } else {
! // keep the session going
! session_start();
!
! // a dirty hack on checking if user has properly authenticated
! // with PEAR::Auth previously
! if(!$_SESSION['/']['registered'] || !isset($_SESSION['/']['username'])){
! header('Location: index.php');
! exit;
! }
!
! // the following is a hack to make the getUsername() method available for the footer
! class ZZOSS_InstallerAuth
! {
! function getUsername()
! {
! return $_SESSION['/']['username'];
! }
! }
!
! $zi_auth = new ZZOSS_InstallerAuth;
! }
}
! function zi_cancel_text()
{
// create a nice looking cancel text :)
Index: init.php
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.zic/inc/init.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** init.php 26 Mar 2004 10:26:31 -0000 1.9
--- init.php 6 Apr 2004 14:45:17 -0000 1.10
***************
*** 24,27 ****
--- 24,32 ----
*/
+ // set default mode of framework
+ if(!defined('ZI_INIT_MODE')){
+ define('ZI_INIT_MODE', 'full');
+ }
+
// define parameters
$zi_phpversion_required = '4.3.0';
***************
*** 58,82 ****
set_magic_quotes_runtime(0);
! if (get_magic_quotes_gpc())
! {
! function stripslashes_recursive($element)
{
if (is_array($element)){
! return array_map("stripslashes_recursive", $element);
! } else{
return stripslashes($element);
}
}
!
// Add slashes to all incoming GET/POST/COOKIE data.
! $_REQUEST = array_map("stripslashes_recursive", $_REQUEST);
! $_GET = array_map("stripslashes_recursive", $_GET);
! $_POST = array_map("stripslashes_recursive", $_POST);
! $_COOKIE = array_map("stripslashes_recursive", $_COOKIE);
}
// Debugging
define('ZI_DEBUG', false);
- define('ZZOSS_INSTALLER_REGISTRY_DEBUG', false);
define('ZZOSS_PACKAGE_DEBUG', false);
define('ZZOSS_CONFIG_DEBUG', false);
--- 63,85 ----
set_magic_quotes_runtime(0);
! if(get_magic_quotes_gpc()){
! function zi_stripslashes_recursive($element)
{
if (is_array($element)){
! return array_map("zi_stripslashes_recursive", $element);
! } else{
return stripslashes($element);
}
}
!
// Add slashes to all incoming GET/POST/COOKIE data.
! $_REQUEST = array_map("zi_stripslashes_recursive", $_REQUEST);
! $_GET = array_map("zi_stripslashes_recursive", $_GET);
! $_POST = array_map("zi_stripslashes_recursive", $_POST);
! $_COOKIE = array_map("zi_stripslashes_recursive", $_COOKIE);
}
// Debugging
define('ZI_DEBUG', false);
define('ZZOSS_PACKAGE_DEBUG', false);
define('ZZOSS_CONFIG_DEBUG', false);
***************
*** 85,114 ****
ini_set('include_path', '.'.PATH_SEPARATOR.'lib');
! require_once 'PEAR.php';
!
! require_once 'ZZOSS_Error/Error.php';
!
! $options['production'] = false;
!
! $error =& new ZZOSS_Error($options);
! $error->setIdent('zic');
!
! if($options['production']){
! $error->setBehaviour(E_WARNING, ZZOSS_ERROR_B_EXIT + ZZOSS_ERROR_B_CLIENT + ZZOSS_ERROR_B_LOG);
! $error->setBehaviour(E_NOTICE, ZZOSS_ERROR_B_CONTINUE);
! $error->setBehaviour(E_USER_ERROR, ZZOSS_ERROR_B_EXIT + ZZOSS_ERROR_B_CLIENT + ZZOSS_ERROR_B_LOG);
! $error->setBehaviour(E_USER_WARNING, ZZOSS_ERROR_B_EXIT + ZZOSS_ERROR_B_CLIENT + ZZOSS_ERROR_B_LOG);
! $error->setBehaviour(E_USER_NOTICE, ZZOSS_ERROR_B_EXIT + ZZOSS_ERROR_B_CLIENT + ZZOSS_ERROR_B_LOG);
} else {
! $error->setBehaviour(E_WARNING, ZZOSS_ERROR_B_DEV + ZZOSS_ERROR_B_EXIT);
! $error->setBehaviour(E_NOTICE, ZZOSS_ERROR_B_DEV + ZZOSS_ERROR_B_EXIT);
! $error->setBehaviour(E_USER_ERROR, ZZOSS_ERROR_B_DEV + ZZOSS_ERROR_B_EXIT);
! $error->setBehaviour(E_USER_WARNING, ZZOSS_ERROR_B_DEV + ZZOSS_ERROR_B_EXIT);
! $error->setBehaviour(E_USER_NOTICE, ZZOSS_ERROR_B_DEV + ZZOSS_ERROR_B_EXIT);
}
- //$error->setLog('C:\WINDOWS\Temp\zzoss_error.log', ZZOSS_ERROR_ROTATE_MONTHLY);
- //$error->setRecipients('root@local');
-
// Default values for reserved variables that are used frequently.
$zi_auth = NULL;
--- 88,123 ----
ini_set('include_path', '.'.PATH_SEPARATOR.'lib');
! if(ZI_INIT_MODE == 'RE'){
! define('ZZOSS_INSTALLER_REGISTRY_DEBUG', false);
} else {
! define('ZZOSS_INSTALLER_REGISTRY_DEBUG', false);
!
! require_once 'PEAR.php';
!
! require_once 'ZZOSS_Error/Error.php';
!
! $options['production'] = false;
!
! $error =& new ZZOSS_Error($options);
! $error->setIdent('zic');
!
! if($options['production']){
! $error->setBehaviour(E_WARNING, ZZOSS_ERROR_B_EXIT + ZZOSS_ERROR_B_CLIENT + ZZOSS_ERROR_B_LOG);
! $error->setBehaviour(E_NOTICE, ZZOSS_ERROR_B_CONTINUE);
! $error->setBehaviour(E_USER_ERROR, ZZOSS_ERROR_B_EXIT + ZZOSS_ERROR_B_CLIENT + ZZOSS_ERROR_B_LOG);
! $error->setBehaviour(E_USER_WARNING, ZZOSS_ERROR_B_EXIT + ZZOSS_ERROR_B_CLIENT + ZZOSS_ERROR_B_LOG);
! $error->setBehaviour(E_USER_NOTICE, ZZOSS_ERROR_B_EXIT + ZZOSS_ERROR_B_CLIENT + ZZOSS_ERROR_B_LOG);
! } else {
! $error->setBehaviour(E_WARNING, ZZOSS_ERROR_B_DEV + ZZOSS_ERROR_B_EXIT);
! $error->setBehaviour(E_NOTICE, ZZOSS_ERROR_B_DEV + ZZOSS_ERROR_B_EXIT);
! $error->setBehaviour(E_USER_ERROR, ZZOSS_ERROR_B_DEV + ZZOSS_ERROR_B_EXIT);
! $error->setBehaviour(E_USER_WARNING, ZZOSS_ERROR_B_DEV + ZZOSS_ERROR_B_EXIT);
! $error->setBehaviour(E_USER_NOTICE, ZZOSS_ERROR_B_DEV + ZZOSS_ERROR_B_EXIT);
! }
!
! //$error->setLog('C:\WINDOWS\Temp\zzoss_error.log', ZZOSS_ERROR_ROTATE_MONTHLY);
! //$error->setRecipients('root@local');
}
// Default values for reserved variables that are used frequently.
$zi_auth = NULL;
-------------------------------------------------------
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