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>
|
||||
|
||||
* 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() {
|
||||
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){
|
||||
$errn = 0;
|
||||
|
||||
db_process_sql_begin();
|
||||
|
||||
$values = array();
|
||||
foreach ($tags as $tag){
|
||||
//Protect against default insert
|
||||
|
@ -314,7 +316,7 @@ function tags_insert_policy_module_tag ($id_agent_module, $tags){
|
|||
if ($result_tag === false)
|
||||
$errn++;
|
||||
}
|
||||
|
||||
|
||||
if ($errn > 0){
|
||||
db_process_sql_rollback();
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue