steffen: server/kolab-webadmin/kolab-webadmin/php/admin/include form.class.php, 1.24, 1.25
cvs at intevation.de
cvs at intevation.de
Wed Mar 29 12:52:16 CEST 2006
Author: steffen
Update of /kolabrepository/server/kolab-webadmin/kolab-webadmin/php/admin/include
In directory doto:/tmp/cvs-serv15445/kolab-webadmin/php/admin/include
Modified Files:
form.class.php
Log Message:
Fix for issue848 + some cleanup
Index: form.class.php
===================================================================
RCS file: /kolabrepository/server/kolab-webadmin/kolab-webadmin/php/admin/include/form.class.php,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- form.class.php 22 Feb 2006 00:36:27 -0000 1.24
+++ form.class.php 29 Mar 2006 10:52:14 -0000 1.25
@@ -89,7 +89,12 @@
case 'email':
$str .= '<tr>';
$str .= '<td>'.$value['name'].'</td>';
- list($uname,$domain) = split('@',$value['value']);
+ if( strpos($value['value'],'@')===false ) {
+ $uname = $value['value'];
+ $domain = '';
+ } else {
+ list($uname,$domain) = split('@',$value['value']);
+ }
if( ereg( 'readonly', $value['attrs'] ) ) {
$str .= '<td><p class="ctrl">'.MySmarty::htmlentities($value['value']).'</p><input name="user_'.$key.'" type="hidden" value="'.
MySmarty::htmlentities($uname).'" /><input name="domain_'.$key.'" type="hidden" value="'.
@@ -291,7 +296,7 @@
foreach( $va as $v ) {
//print "validating using $v <br/>";
if( $v == 'notempty' ) {
- debug("checking nonemptiness of $key: ".$_REQUEST[$key]." len=".strlen(trim($_REQUEST[$key])));
+ debug("checking nonemptiness of $key: ".KolabForm::getRequestVar($key)." len=".strlen(trim(KolabForm::getRequestVar($key))));
if( $value['type'] == 'aclselect' ) {
// ignore
} else if( $value['type'] == 'email' ) {
@@ -367,6 +372,13 @@
}
}
}
+
+ /* static */ function getRequestVar($var, $default = false)
+ {
+ if( isset($_REQUEST[$var]) ) return $_REQUEST[$var];
+ else return $default;
+ }
+
var $name;
var $template;
More information about the commits
mailing list