Wrong email-adress field taken when emailing documents [0000035].
[fa-stable.git] / includes / ajax.inc
index 3ad2966e821ea4236ff6d2ae60b6119c4dd42217..135ee03df2dc91cd46d75d79d63a0d22f91adee3 100644 (file)
@@ -114,11 +114,18 @@ class Ajax extends JsHttpRequest {
                  }
                  else
                  if($com['n'] == 'up' && $com['t'] == '_page_body') {
-                         $this->aCommands = array($com);
+                         $cmds = array($com);
+                         foreach( $this->aCommands as $k=> $cmd) {
+                               if ($cmd['n'] == 'fc') {        // save focus
+                                       $cmds[] = $cmd; break;
+                               }
+                         }
+                         $this->aCommands = $cmds;
                          break;
                  }
                }
-//             display_error(htmlentities(print_r($this->aCommands, true)));
+//             display_error('Activate:'.htmlentities(print_r($this->triggers, true)));
+//             display_error('Commands :'.htmlentities(print_r($this->aCommands, true)));
            $GLOBALS['_RESULT'] = $this->aCommands;
 //         exit();
        }