Support custom save function
authorJoey Schulze <joey@infodrom.org>
Fri, 16 Apr 2010 10:02:19 +0000 (12:02 +0200)
committerJoey Schulze <joey@infodrom.org>
Fri, 16 Apr 2010 10:02:19 +0000 (12:02 +0200)
ajax/ajax.php

index 95e2034..185b5e4 100644 (file)
@@ -83,6 +83,9 @@ function format_decimal($value)
 
 function save($mask)
 {
 
 function save($mask)
 {
+  if (array_key_exists('save', $mask))
+    return $mask['save']($mask);
+
   if (empty($_POST['id']))
     return array('error' => 'Missing ID');
 
   if (empty($_POST['id']))
     return array('error' => 'Missing ID');