[zi-cvs] packages/com.zzoss.zic/inc authentication.php,1.7,1.8
Sandro Zic <[email protected]> Tue, 06 Apr 2004 18:26:13 +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-serv10207/com.zzoss.zic/inc
Modified Files:
authentication.php
Log Message:
fixed win probs
Index: authentication.php
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.zic/inc/authentication.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** authentication.php 6 Apr 2004 18:04:22 -0000 1.7
--- authentication.php 6 Apr 2004 18:26:10 -0000 1.8
***************
*** 42,46 ****
$options['dsn'] = $GLOBALS['ZI']['installer_data_dir'].".htpasswd";
! $zi_auth = new Auth_HTTP("File", );
$zi_auth->setRealm('ZZ/OSS Installer Client (ZIC)');
$zi_auth->setCancelText(zi_cancel_text());
--- 42,46 ----
$options['dsn'] = $GLOBALS['ZI']['installer_data_dir'].".htpasswd";
! $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());
***************
*** 52,56 ****
// a dirty hack on checking if user has properly authenticated
// with PEAR::Auth previously
! if(!$_SESSION['PEAR_Auth']['registered'] || !isset($_SESSION['PEAR_Auth']['username'])){
header('Location: index.php');
exit;
--- 52,63 ----
// a dirty hack on checking if user has properly authenticated
// with PEAR::Auth previously
!
! // unfortunately, we cannot set the session name when using the file container,
! // because Auth::Auth() grabs the first char of the provided filepath as
! // the session name
! $zi_auth_name = $GLOBALS['ZI']['installer_data_dir'].".htpasswd";
! $zi_auth_name = $zi_auth_name[0];
!
! if(!$_SESSION[$zi_auth_name]['registered'] || !isset($_SESSION[$zi_auth_name]['username'])){
header('Location: index.php');
exit;
***************
*** 62,66 ****
function getUsername()
{
! return $_SESSION['/']['username'];
}
}
--- 69,75 ----
function getUsername()
{
! $zi_auth_name = $GLOBALS['ZI']['installer_data_dir'].".htpasswd";
! $zi_auth_name = $zi_auth_name[0];
! return $_SESSION[$zi_auth_name]['username'];
}
}
-------------------------------------------------------
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