")
+ * @return boolean true if email syntax is OK, false if KO or empty string
*/
function isValidEmail($address)
{
@@ -1234,9 +1251,10 @@ function isValidEmail($address)
}
/**
- * Return true if phone number syntax is ok.
- * @param address phone (Ex: "0601010101")
- * @return boolean true if phone syntax is OK, false if KO or empty string
+ * Return true if phone number syntax is ok
+ *
+ * @param string $address phone (Ex: "0601010101")
+ * @return boolean true if phone syntax is OK, false if KO or empty string
*/
function isValidPhone($address)
{
@@ -1245,10 +1263,11 @@ function isValidPhone($address)
/**
- * Make a strlen call. Works even if mbstring module not enabled.
- * @param $string
- * @param $stringencoding
- * @return int
+ * Make a strlen call. Works even if mbstring module not enabled
+ *
+ * @param string $string String to calculate length
+ * @param string $stringencoding Encoding of string
+ * @return int Length of string
*/
function dol_strlen($string,$stringencoding='UTF-8')
{
@@ -1260,6 +1279,7 @@ function dol_strlen($string,$stringencoding='UTF-8')
/**
* Make a substring. Works even in mbstring module not enabled
+ *
* @param $string
* @param $start
* @param $length
@@ -2566,9 +2586,9 @@ function getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $m
{
global $conf;
//print "$name, $file, $field, $begin, $options, $td, $sortfield, $sortorder
\n";
-
+
$out='';
-
+
if ($thead)
{
$out.= ''.$name.' | ';
@@ -2586,7 +2606,7 @@ function getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $m
$out.= '';
}
$out.= $name;
-
+
// If this is a sort field
if ($field)
{
@@ -2594,7 +2614,7 @@ function getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $m
$options=preg_replace('/sortorder=([a-zA-Z0-9,\s\.]+)/i','',$options);
$options=preg_replace('/&+/i','&',$options);
if (! preg_match('/^&/',$options)) $options='&'.$options;
-
+
//print " ";
$out.= ' ';
if (! $sortorder)
@@ -2624,7 +2644,7 @@ function getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $m
}
$out.= " | ";
}
-
+
return $out;
}