Rewritten upgrade procedures, added fa_patch class, utf8 collation can be set before...
[fa-stable.git] / includes / ajax.inc
index b95d1928a353b702c882b1c266eed11b43b2e117..f71aaf47c987b2773af02ce0dd0e9ff506e39974 100644 (file)
@@ -1,4 +1,14 @@
 <?php
+/**********************************************************************
+    Copyright (C) FrontAccounting, LLC.
+       Released under the terms of the GNU General Public License, GPL, 
+       as published by the Free Software Foundation, either version 3 
+       of the License, or (at your option) any later version.
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
+    See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
+***********************************************************************/
 require_once($path_to_root. "/includes/JsHttpRequest.php");
 
 class Ajax extends JsHttpRequest {
@@ -8,7 +18,7 @@ class Ajax extends JsHttpRequest {
        
     function Ajax() 
     {
-         $this->JsHttpRequest($_SESSION['language']->encoding);
+         $this->JsHttpRequest(@$_SESSION['language']->encoding);
     }
        //
        //      This function is used in ctrl routines to activate
@@ -122,8 +132,8 @@ class Ajax extends JsHttpRequest {
                  if($com['n'] == 'up' && $com['t'] == '_page_body') {
                          $cmds = array($com);
                          foreach( $this->aCommands as $k=> $cmd) {
-                               if ($cmd['n'] == 'fc') {        // save focus
-                                       $cmds[] = $cmd; break;
+                               if ($cmd['n'] == 'fc' || $cmd['n'] == 'js') {   // save focus
+                                       $cmds[] = $cmd; //break;
                                }
                          }
                          $this->aCommands = $cmds;
@@ -149,4 +159,3 @@ function absolute_url($url)
 {
    return strpos($url, '..')===0 ? dirname($_SERVER['PHP_SELF']).'/'.$url : $url;
 }
-?>