Commit e5bf68ad authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Add some unrelated missing functions that are still pending in my

devel tree.
parent 5019322b
...@@ -160,6 +160,12 @@ function TBvalid_gid($gid) { ...@@ -160,6 +160,12 @@ function TBvalid_gid($gid) {
return (strlen($gid) <= $TBDB_GIDLEN) && (strlen($gid) >= $TBDB_MINLEN) && return (strlen($gid) <= $TBDB_GIDLEN) && (strlen($gid) >= $TBDB_MINLEN) &&
preg_match("/^[a-zA-Z][-\w]+$/", $gid); preg_match("/^[a-zA-Z][-\w]+$/", $gid);
} }
function TBvalid_eid($eid) {
global $TBDB_EIDLEN, $TBDB_MINLEN;
return (strlen($eid) <= $TBDB_EIDLEN) && (strlen($eid) >= $TBDB_MINLEN) &&
preg_match("/^[a-zA-Z][-\w]+$/", $eid);
}
function TBvalid_phone($phone) { function TBvalid_phone($phone) {
global $TBDB_PHONELEN; global $TBDB_PHONELEN;
...@@ -172,6 +178,10 @@ function TBvalid_usrname($name) { ...@@ -172,6 +178,10 @@ function TBvalid_usrname($name) {
return (strlen($name) <= $TBDB_USRNAMELEN) && return (strlen($name) <= $TBDB_USRNAMELEN) &&
preg_match("/^[-\w\. ]+$/", $name); preg_match("/^[-\w\. ]+$/", $name);
} }
function TBvalid_description($token) {
return (strlen($token) <= 256) &&
preg_match("/^[\\040-\\176]*$/", $token);
}
function TBvalid_email($email) function TBvalid_email($email)
{ {
global $TBDB_EMAILLEN, $TBDB_MINLEN; global $TBDB_EMAILLEN, $TBDB_MINLEN;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment