diff options
author | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-07-16 10:09:00 +0000 |
---|---|---|
committer | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-07-16 10:09:00 +0000 |
commit | 9c1f6327bf84f4aafe17d6366521ef0e7ffd5765 (patch) | |
tree | 9156870fd46feea09f1bd483ff32a0025d7101e6 /frontends | |
parent | ed7c11afc6a47092d04df61a3c769ab6570f0116 (diff) | |
download | zabbix-9c1f6327bf84f4aafe17d6366521ef0e7ffd5765.tar.gz zabbix-9c1f6327bf84f4aafe17d6366521ef0e7ffd5765.tar.xz zabbix-9c1f6327bf84f4aafe17d6366521ef0e7ffd5765.zip |
- [DEV-137] small fixes (Artem)
- [DEV-137] perl script fixes against mysql {BLOB and TEXT columns cannot have DEFAULT values} (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@5831 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends')
-rw-r--r-- | frontends/php/events.php | 22 | ||||
-rw-r--r-- | frontends/php/hosts.php | 4 | ||||
-rw-r--r-- | frontends/php/include/db.inc.php | 24 |
3 files changed, 26 insertions, 24 deletions
diff --git a/frontends/php/events.php b/frontends/php/events.php index cbe9debf..b32f32ba 100644 --- a/frontends/php/events.php +++ b/frontends/php/events.php @@ -386,7 +386,13 @@ include_once "include/page_header.php"; if($table->GetNumRows() >= PAGE_SIZE){ $next = new Clink('Next '.PAGE_SIZE, 'events.php?next=1'.url_param('start'),'styled'); - } + } + + $navigation = array( + new CSpan(array('« ',$prev),'textcolorstyles'), + new CSpan(' | ','divider'), + new CSpan(array($next,' »'),'textcolorstyles') + ); $filterForm = new CFormTable(S_FILTER);//,'events.php?filter_set=1','POST',null,'sform'); $filterForm->AddOption('name','zbx_filter'); @@ -478,15 +484,13 @@ include_once "include/page_header.php"; $filterForm->AddItemToBottomRow(new CButton("filter_set",S_FILTER)); $filterForm->AddItemToBottomRow($reset); - } - $navigation = array( - new CSpan(array('« ',$prev),'textcolorstyles'), - new CSpan(' | ','divider'), - new CSpan(array($next,' »'),'textcolorstyles')); - - $filter = create_filter(S_FILTER,$navigation,$filterForm,'tr_filter',get_profile('web.events.filter.state',0)); - $filter->Show(); + $filter = create_filter(S_FILTER,$navigation,$filterForm,'tr_filter',get_profile('web.events.filter.state',0)); + $filter->Show(); + } + else{ + show_thin_table_header(SPACE,$navigation); + } //------- $table->Show(); diff --git a/frontends/php/hosts.php b/frontends/php/hosts.php index 0b7c0f2d..b7b2bca9 100644 --- a/frontends/php/hosts.php +++ b/frontends/php/hosts.php @@ -1276,14 +1276,14 @@ include_once 'include/page_header.php'; $host_list = array(); while($host = DBfetch($hosts)){ $style = ($host["status"] == HOST_STATUS_MONITORED)?NULL:'on'; - array_push($host_list, empty($host_list) ? '' : ', ', new CSpan($host["host"], $style)); + array_push($host_list, empty($host_list)?'':', ', new CSpan($host["host"], $style)); } $table->AddRow(array( new CCol(array( new CLink($template['host'],'hosts.php?form=update&hostid='. $template['hostid'].url_param('hostid').url_param('config'), 'action') ),'unknown'), - empty($host_list)?'-':$host_list + empty($host_list)?'-':new CCol($host_list,'wraptext') )); } diff --git a/frontends/php/include/db.inc.php b/frontends/php/include/db.inc.php index f4198945..fb4c46f1 100644 --- a/frontends/php/include/db.inc.php +++ b/frontends/php/include/db.inc.php @@ -151,7 +151,6 @@ if(!isset($DB)){ function DBclose(){ global $DB; - $result = false; if( isset($DB['DB']) && !empty($DB['DB']) ){ @@ -232,10 +231,10 @@ if(!isset($DB)){ if(isset($DB['DB']) && !empty($DB['DB'])) switch($DB['TYPE']){ case "MYSQL": - $result = DBexecute('begin;'); + $result = DBexecute('begin'); break; case "POSTGRESQL": - $result = DBexecute('begin;'); + $result = DBexecute('begin'); break; case "ORACLE": $result = true; @@ -244,7 +243,7 @@ if(!isset($DB)){ case "SQLITE3": if(1 == $DB['TRANSACTIONS']){ lock_db_access(); - $result = DBexecute('begin;'); + $result = DBexecute('begin'); } break; } @@ -297,17 +296,17 @@ if(!isset($DB)){ if( isset($DB['DB']) && !empty($DB['DB']) ) switch($DB['TYPE']){ case "MYSQL": - $result = DBexecute('commit;'); + $result = DBexecute('commit'); break; case "POSTGRESQL": - $result = DBexecute('commit;'); + $result = DBexecute('commit'); break; case "ORACLE": $result = ocicommit($DB['DB']); break; case "SQLITE3": - $result = DBexecute('commit;'); + $result = DBexecute('commit'); unlock_db_access(); break; } @@ -322,16 +321,16 @@ if(!isset($DB)){ if( isset($DB['DB']) && !empty($DB['DB']) ) switch($DB['TYPE']){ case "MYSQL": - $result = DBexecute('rollback;'); + $result = DBexecute('rollback'); break; case "POSTGRESQL": - $result = DBexecute('rollback;'); + $result = DBexecute('rollback'); break; case "ORACLE": $result = ocirollback($DB['DB']); break; case "SQLITE3": - $result = DBexecute('rollback;'); + $result = DBexecute('rollback'); unlock_db_access(); break; } @@ -357,9 +356,8 @@ if(!isset($DB)){ function &DBselect($query, $limit='NO'){ global $DB; - //COpt::savesqlrequest($query); - +//SDI('SQL: '.$query); $result = false; if( isset($DB['DB']) && !empty($DB['DB']) ) switch($DB['TYPE']){ @@ -434,7 +432,7 @@ if(!isset($DB)){ function DBexecute($query, $skip_error_messages=0){ global $DB; -//SDI($query); +//SDI('SQL Exec: '.$query); //COpt::savesqlrequest($query); $result = false; |