summaryrefslogtreecommitdiffstats
path: root/frontends/php/include
diff options
context:
space:
mode:
authorartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-03-26 12:45:46 +0000
committerartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-03-26 12:45:46 +0000
commitfca93a0754ca3124185dbebbc2431c6c5f4d774b (patch)
treed1815c041d283075ce5d922a1b03976ed9fc8c59 /frontends/php/include
parent5a168b291edd7a299c77f5615f36531ae2fb0f0e (diff)
downloadzabbix-fca93a0754ca3124185dbebbc2431c6c5f4d774b.tar.gz
zabbix-fca93a0754ca3124185dbebbc2431c6c5f4d774b.tar.xz
zabbix-fca93a0754ca3124185dbebbc2431c6c5f4d774b.zip
- improvements for Oracle (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@5536 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include')
-rw-r--r--frontends/php/include/classes/ctable.inc.php2
-rw-r--r--frontends/php/include/db.inc.php8
-rw-r--r--frontends/php/include/perm.inc.php4
3 files changed, 6 insertions, 8 deletions
diff --git a/frontends/php/include/classes/ctable.inc.php b/frontends/php/include/classes/ctable.inc.php
index cd73df1e..72dc2718 100644
--- a/frontends/php/include/classes/ctable.inc.php
+++ b/frontends/php/include/classes/ctable.inc.php
@@ -68,8 +68,6 @@
}
else if(!is_null($el)){
parent::AddItem(new CCol($el));
- } else {
- parent::AddItem('<td></td>');
}
}
}
diff --git a/frontends/php/include/db.inc.php b/frontends/php/include/db.inc.php
index df1fdd52..6a4a86b6 100644
--- a/frontends/php/include/db.inc.php
+++ b/frontends/php/include/db.inc.php
@@ -282,7 +282,7 @@
$result = DBexecute('commit;');
break;
case "ORACLE":
- $result = ocicommit();
+ $result = ocicommit($DB);
$DB_TRANSACTIONS = 0;
break;
case "SQLITE3":
@@ -313,7 +313,7 @@
$result = DBexecute('rollback;');
break;
case "ORACLE":
- $result = ocirollback();
+ $result = ocirollback($DB);
$DB_TRANSACTIONS = 0;
break;
case "SQLITE3":
@@ -475,7 +475,7 @@
return $result;
}
- function DBfetch(&$cursor){
+ function DBfetch(&$cursor){
global $DB, $DB_TYPE;
$result = false;
@@ -492,7 +492,7 @@
if(ocifetchinto($cursor, $row, (OCI_ASSOC+OCI_RETURN_NULLS))){
$result = array();
foreach($row as $key => $value){
- $result[strtolower($key)] = $value;
+ $result[strtolower($key)] = (str_in_array(strtolower(ocicolumntype($cursor,$key)),array('varchar2','blob','clob')) && is_null($value))?'':$value;
}
}
break;
diff --git a/frontends/php/include/perm.inc.php b/frontends/php/include/perm.inc.php
index c319448d..4da32399 100644
--- a/frontends/php/include/perm.inc.php
+++ b/frontends/php/include/perm.inc.php
@@ -247,10 +247,10 @@ COpt::counter_up('perm');
// It seems that host details are not required by the logic
// $host_data += DBfetch(DBselect('select * from hosts where hostid='.$host_data['hostid']));
- if(is_null($host_data['nodeid'])) $host_data['nodeid'] = id2nodeid($host_data['hostid']);
+ if(empty($host_data['nodeid'])) $host_data['nodeid'] = id2nodeid($host_data['hostid']);
/* if no rights defined used node rights */
- if( (is_null($host_data['permission']) || is_null($host_data['userid'])) ){
+ if( (empty($host_data['permission']) || is_null($host_data['userid'])) ){
if( isset($processed[$host_data['hostid']]) )
continue;