better datachecking in install.php
This patch automatically lowercases the superuser name like DokuWiki will do itself later on. It also fixes the email check and requires it to have at least an @ character. darcs-hash:20061004183516-7ad00-791df13131c2484cb08c840812688d83bdf807fa.gz
This commit is contained in:
parent
01ca51fc42
commit
e238607916
|
@ -212,10 +212,13 @@ function print_retry() {
|
|||
*
|
||||
* @author Andreas Gohr
|
||||
*/
|
||||
function check_data($d){
|
||||
function check_data(&$d){
|
||||
global $lang;
|
||||
global $error;
|
||||
|
||||
//autolowercase the username
|
||||
$d['superuser'] = strtolower($d['superuser']);
|
||||
|
||||
$ok = true;
|
||||
|
||||
// check input
|
||||
|
@ -240,7 +243,7 @@ function check_data($d){
|
|||
$error[] = sprintf($lang['i_badval'],$lang['fullname']);
|
||||
$ok = false;
|
||||
}
|
||||
if(empty($d['email']) || strstr($d['fullname'],':')){
|
||||
if(empty($d['email']) || strstr($d['email'],':') || !strstr($d['email'],'@')){
|
||||
$error[] = sprintf($lang['i_badval'],$lang['email']);
|
||||
$ok = false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue