Minor fixes to statement, services and internal things

Many misc updates
This commit is contained in:
Deon George
2011-10-14 16:44:12 +11:00
parent 7876a16413
commit 56c11507f4
71 changed files with 2192 additions and 677 deletions

View File

@@ -22,9 +22,9 @@ class lnApp_Sort {
*/
public static function MAsort(&$data,$sortby,$rev=0) {
// if the array to sort is null or empty, or our sortby is bad
if (! preg_match('/^[a-zA-Z0-9_]+(\([a-zA-Z0-9_,]*\))?$/',$sortby) || ! $data)
if (! preg_match('/^([a-zA-Z0-9_]+(\([a-zA-Z0-9_,]*\)(->[a-zA-Z0-9])?)?,?)+$/',$sortby) || ! $data)
return;
$code = '$c=0;';
foreach (explode(',',$sortby) as $key) {
@@ -83,7 +83,7 @@ class lnApp_Sort {
$code .= 'return $c;';
$result = create_function('$a, $b',$code);
uasort($data,$result);
}
}