summaryrefslogtreecommitdiffstats
path: root/frontends/php/include
diff options
context:
space:
mode:
authorosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-12-19 14:37:15 +0000
committerosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-12-19 14:37:15 +0000
commitd43cdad7158fb7bcf8d05da5030b4cb01397f784 (patch)
tree5fe36d7066652da2ea1ebf88c0f4126f452ab7dd /frontends/php/include
parent37f6e0af8e60d91853063262753b165cfd35a2f8 (diff)
downloadzabbix-d43cdad7158fb7bcf8d05da5030b4cb01397f784.tar.gz
zabbix-d43cdad7158fb7bcf8d05da5030b4cb01397f784.tar.xz
zabbix-d43cdad7158fb7bcf8d05da5030b4cb01397f784.zip
minor changes [compiled version]
git-svn-id: svn://svn.zabbix.com/trunk@3612 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include')
-rw-r--r--frontends/php/include/db.inc.php17
-rw-r--r--frontends/php/include/forms.inc.php2
2 files changed, 18 insertions, 1 deletions
diff --git a/frontends/php/include/db.inc.php b/frontends/php/include/db.inc.php
index 8f5953c4..89adc68c 100644
--- a/frontends/php/include/db.inc.php
+++ b/frontends/php/include/db.inc.php
@@ -90,7 +90,9 @@
global $ZBX_SEM_ID;
if($ZBX_SEM_ID && function_exists('sem_acquire'))
+ {
sem_acquire($ZBX_SEM_ID);
+ }
}
}
@@ -105,6 +107,20 @@
}
}
+ if(!function_exists('free_db_access'))
+ {
+ function free_db_access()
+ {
+ global $ZBX_SEM_ID;
+
+ if($ZBX_SEM_ID && function_exists('sem_remove'))
+ sem_remove($ZBX_SEM_ID);
+
+ $ZBX_SEM_ID = false;
+ }
+ }
+
+
if(file_exists($DB_DATABASE))
{
$DB = sqlite3_open($DB_DATABASE);
@@ -146,6 +162,7 @@
case "SQLITE3":
$result = true;
sqlite3_close($DB);
+ free_db_access();
break;
default: break;
}
diff --git a/frontends/php/include/forms.inc.php b/frontends/php/include/forms.inc.php
index 82955f50..65f8b6c8 100644
--- a/frontends/php/include/forms.inc.php
+++ b/frontends/php/include/forms.inc.php
@@ -2887,7 +2887,7 @@
new CButton('add_template',S_ADD,
"return PopUp('popup.php?dstfrm=".$frmHost->GetName().
"&dstfld1=new_template&srctbl=templates&srcfld1=hostid&srcfld2=host".
- url_param($templates,false,'existed_templates')."',450,450)l",
+ url_param($templates,false,'existed_templates')."',450,450)",
'T')
));