Explorar o código

fix mysql error and tabs support ajax

stanley-king %!s(int64=8) %!d(string=hai) anos
pai
achega
83f2da9a22
Modificáronse 2 ficheiros con 3 adicións e 2 borrados
  1. 2 1
      core/framework/db/mysqli.php
  2. 1 1
      helper/index_tab.php

+ 2 - 1
core/framework/db/mysqli.php

@@ -14,6 +14,7 @@ require_once(BASE_CORE_PATH . '/framework/function/statistic_tm.php');
 class Db
 {
     const ErrUnConnect = 2006;
+    const ErrLock = 1205;
 
 	private static $link = array();
 	private static $iftransacte = true;
@@ -125,7 +126,7 @@ class Db
                 $error = "Db Error: no= error={$errno}" . mysqli_error(self::$link[$host]);
                 Log::record($error."\r\n".$sql,Log::ERR);
 
-                if($errno == self::ErrUnConnect)
+                if($errno == self::ErrUnConnect || $errno == self::ErrLock)
                 {
                     if($count > 0) return false;
                     self::closeLink($host);

+ 1 - 1
helper/index_tab.php

@@ -40,7 +40,7 @@ class index_tab
 
     public function tabs()
     {
-        if($_SESSION['is_lasted'])
+        if($_SESSION['is_lasted'] || $_SESSION['client_type'] == 'ajax')
         {
             if(StatesHelper::fetch_state('tags')) {
                 $this->init();