cvs: pear /Auth Auth.php package.xml /Auth/Frontend Html.php
| From: | Yavor Shahpasov | Date: | Sat, 03 Jul 2004 13:20:59 +0000 |
| Subject: | cvs: pear /Auth Auth.php package.xml /Auth/Frontend Html.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-21460@lists.php.net to get a copy of this message | ||
yavo Sat Jul 3 09:20:59 2004 EDT
Added files:
/pear/Auth/Frontend Html.php
Modified files:
/pear/Auth Auth.php package.xml
Log:
Pass by ref causes fatal error on php5 when string literal passed
http://cvs.php.net/diff.php/pear/Auth/Auth.php?r1=1.84&r2=1.85&ty=u
Index: pear/Auth/Auth.php
diff -u pear/Auth/Auth.php:1.84 pear/Auth/Auth.php:1.85
--- pear/Auth/Auth.php:1.84 Fri Jul 2 19:20:04 2004
+++ pear/Auth/Auth.php Sat Jul 3 09:20:58 2004
@@ -16,7 +16,7 @@
// | Authors: Martin Jansen <mj@php.net> |
// +----------------------------------------------------------------------+
//
-// $Id: Auth.php,v 1.84 2004/07/02 23:20:04 yavo Exp $
+// $Id: Auth.php,v 1.85 2004/07/03 13:20:58 yavo Exp $
//
define('AUTH_IDLED', -1);
@@ -33,7 +33,7 @@
*
* @author Martin Jansen <mj@php.net>
* @package Auth
- * @version $Revision: 1.84 $
+ * @version $Revision: 1.85 $
*/
class Auth {
@@ -233,7 +233,7 @@
* @param boolean Should the login form be displayed if neccessary?
* @return void
*/
- function Auth(&$storageDriver, $options = '', $loginFunction = '',
$showLogin = true)
+ function Auth($storageDriver, $options = '', $loginFunction = '',
$showLogin = true)
{
$this->applyAuthOptions($options);
@@ -680,7 +680,7 @@
function staticCheckAuth($options = null) {
static $staticAuth;
if(!isset($staticAuth)) {
- $staticAuth = new Auth('', $options);
+ $staticAuth = new Auth('null', $options);
}
return( $staticAuth->checkAuth() );
}
http://cvs.php.net/diff.php/pear/Auth/package.xml?r1=1.52&r2=1.53&ty=u
Index: pear/Auth/package.xml
diff -u pear/Auth/package.xml:1.52 pear/Auth/package.xml:1.53
--- pear/Auth/package.xml:1.52 Fri Jul 2 18:32:31 2004
+++ pear/Auth/package.xml Sat Jul 3 09:20:58 2004
@@ -60,7 +60,6 @@
]]>
</notes>
-
<filelist>
<file role="php" baseinstalldir="" name="Auth.php">
<replace from="@version@" to="version"
type="package-info"/>
@@ -74,6 +73,7 @@
<file role="doc" baseinstalldir="Auth"
name="README.Auth"/>
<dir name="Container" role="php" baseinstalldir="Auth">
<file name="DB.php"/>
+ <file name="DBLite.php"/>
<file name="File.php"/>
<file name="IMAP.php"/>
<file name="POP3.php"/>
@@ -85,6 +85,9 @@
<file name="SOAP.php"/>
<file name="vpopmail.php"/>
<file name="PEAR.php"/>
+ </dir>
+ <dir name="Frontend" role="php" baseinstalldir="Auth">
+ <file name="Html.php"/>
</dir>
<!-- The Test suite -->
http://cvs.php.net/co.php/pear/Auth/Frontend/Html.php?r=1.1&p=1
Index: pear/Auth/Frontend/Html.php
+++ pear/Auth/Frontend/Html.php
<?php
/**
* Standard Html Login form
*
*/
class Auth_Frontend_Html {
/**
* Displays the login form
*
* @param object The calling auth instance
* @return void
*/
function render(&$caller, $username = '') {
$server = &$caller->_importGlobalVariable('server');
echo '<center>'."\n";
if (!empty($caller->status) && $caller->status == AUTH_EXPIRED) {
echo '<i>Your session has expired. Please login
again!</i>'."\n";
} else if (!empty($caller->status) && $caller->status == AUTH_IDLED) {
echo '<i>You have been idle for too long. Please login
again!</i>'."\n";
} else if (!empty ($caller->status) && $caller->status == AUTH_WRONG_LOGIN) {
echo '<i>Wrong login data!</i>'."\n";
} else if (!empty ($caller->status) && $caller->status ==
AUTH_SECURITY_BREACH) {
echo '<i>Security problem detected. </i>'."\n";
}
#PEAR::raiseError('You are using the built-in login screen of PEAR::Auth.<br
/>See the <a href="http://pear.php.net/manual/">manual</a>
for details on how to create your own login function.', null);
echo '<form method="post" action="' .
$server['PHP_SELF'] . '">'."\n";
echo '<table border="0" cellpadding="2"
cellspacing="0" summary="login form">'."\n";
echo '<tr>'."\n";
echo ' <td colspan="2"
bgcolor="#eeeeee"><b>Login:</b></td>'."\n";
echo '</tr>'."\n";
echo '<tr>'."\n";
echo ' <td>Username:</td>'."\n";
echo ' <td><input type="text" name="username"
value="' . $username . '" /></td>'."\n";
echo '</tr>'."\n";
echo '<tr>'."\n";
echo ' <td>Password:</td>'."\n";
echo ' <td><input type="password" name="password"
/></td>'."\n";
echo '</tr>'."\n";
echo '<tr>'."\n";
echo ' <td colspan="2" bgcolor="#eeeeee"><input
type="submit" /></td>'."\n";
echo '</tr>'."\n";
echo '</table>'."\n";
echo '</form>'."\n";
echo '</center>'."\n\n";
}
}
?>