From: Geoffrey T. D. <da...@us...> - 2002-01-24 01:27:00
|
Update of /cvsroot/phpwiki/phpwiki/lib In directory usw-pr-cvs1:/tmp/cvs-serv26287/lib Modified Files: Template.php WikiUser.php main.php Log Message: Bug fix for sign-in code (when password required.) Other minor signin code cleanups. Index: Template.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/Template.php,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -r1.28 -r1.29 *** Template.php 2002/01/24 00:45:28 1.28 --- Template.php 2002/01/24 01:26:55 1.29 *************** *** 65,78 **** function _print ($val) { ! if (isa($val, 'Template')) { ! // Expand sub-template with defaults from this template. ! echo "<!-- Begin $val->_name -->\n"; ! $val->printExpansion($this->_vars); ! echo "<!-- End $val->_name -->\n"; ! } else PrintXML($val); } ! /** * Substitute HTML replacement text for tokens in template. --- 65,85 ---- function _print ($val) { ! if (isa($val, 'Template')) ! $this->_expandSubtemplate($val); else PrintXML($val); } ! ! function _expandSubtemplate (&$template) { ! // FIXME: big hack! ! if (!$template->_request) ! $template->_request = &$this->_request; ! ! echo "<!-- Begin $template->_name -->\n"; ! // Expand sub-template with defaults from this template. ! $template->printExpansion($this->_vars); ! echo "<!-- End $template->_name -->\n"; ! } ! /** * Substitute HTML replacement text for tokens in template. Index: WikiUser.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/WikiUser.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** WikiUser.php 2002/01/24 00:45:28 1.12 --- WikiUser.php 2002/01/24 01:26:55 1.13 *************** *** 118,122 **** } ! function PrintLoginForm ($args, $fail_message = false) { include_once('lib/Template.php'); --- 118,122 ---- } ! function PrintLoginForm (&$request, $args, $fail_message = false) { include_once('lib/Template.php'); Index: main.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/main.php,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -r1.31 -r1.32 *** main.php 2002/01/24 00:45:28 1.31 --- main.php 2002/01/24 01:26:55 1.32 *************** *** 179,183 **** // Login attempt failed. $fail_message = $user; ! WikiUser::PrintLoginForm($auth_args, $fail_message); $this->finish(); //NORETURN } --- 179,187 ---- // Login attempt failed. $fail_message = $user; ! // If no password was submitted, it's not really ! // a failure --- just need to prompt for password... ! if (!isset($auth_args['password'])) ! $fail_message = false; ! WikiUser::PrintLoginForm($this, $auth_args, $fail_message); $this->finish(); //NORETURN } |