mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
2011-08-25 Sergio Martin <sergio.martin@artica.es>
* include/db/mysql.php: Fixed a bug in the sql_commit function to reset the database to autocommit mode * include/functions_tags.php: Added a missed sql_begin call to the tags creation function git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4822 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
b19bc07599
commit
cd0033534b
@ -1,3 +1,11 @@
|
|||||||
|
2011-08-25 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
|
* include/db/mysql.php: Fixed a bug in the sql_commit
|
||||||
|
function to reset the database to autocommit mode
|
||||||
|
|
||||||
|
* include/functions_tags.php: Added a missed sql_begin call
|
||||||
|
to the tags creation function
|
||||||
|
|
||||||
2011-08-25 Javier Lanz <javier.lanz@artica.es>
|
2011-08-25 Javier Lanz <javier.lanz@artica.es>
|
||||||
|
|
||||||
* include/functions_config.php: Fixed checking if remote configuration
|
* include/functions_config.php: Fixed checking if remote configuration
|
||||||
|
@ -929,7 +929,7 @@ function mysql_db_process_sql_begin() {
|
|||||||
*/
|
*/
|
||||||
function mysql_db_process_sql_commit() {
|
function mysql_db_process_sql_commit() {
|
||||||
mysql_query ('COMMIT');
|
mysql_query ('COMMIT');
|
||||||
mysql_query ('SET AUTOCOMMIT = 0');
|
mysql_query ('SET AUTOCOMMIT = 1');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -302,6 +302,8 @@ function tags_insert_module_tag ($id_agent_module, $tags){
|
|||||||
function tags_insert_policy_module_tag ($id_agent_module, $tags){
|
function tags_insert_policy_module_tag ($id_agent_module, $tags){
|
||||||
$errn = 0;
|
$errn = 0;
|
||||||
|
|
||||||
|
db_process_sql_begin();
|
||||||
|
|
||||||
$values = array();
|
$values = array();
|
||||||
foreach ($tags as $tag){
|
foreach ($tags as $tag){
|
||||||
//Protect against default insert
|
//Protect against default insert
|
||||||
@ -314,7 +316,7 @@ function tags_insert_policy_module_tag ($id_agent_module, $tags){
|
|||||||
if ($result_tag === false)
|
if ($result_tag === false)
|
||||||
$errn++;
|
$errn++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($errn > 0){
|
if ($errn > 0){
|
||||||
db_process_sql_rollback();
|
db_process_sql_rollback();
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user