浏览代码

Limit the transaction for the menu to SQLite.

Mark Crane 11 年之前
父节点
当前提交
7b34a3105b
共有 1 个文件被更改,包括 6 次插入2 次删除
  1. 6 2
      resources/classes/menu.php

+ 6 - 2
resources/classes/menu.php

@@ -59,7 +59,9 @@
 					}
 
 				//begin the transaction
-					$db->beginTransaction();
+					if ($db_type == "sqlite") {
+						$db->beginTransaction();
+					}
 
 				//use the app array to restore the default menu
 					foreach ($apps as $row) {
@@ -186,7 +188,9 @@
 					}
 
 				//commit the transaction
-					$db->commit();
+					if ($db_type == "sqlite") {
+						$db->commit();
+					}
 			} //end function
 
 			//restore the menu and group permissions