mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-24 05:39:58 +09:00
update trunk and tag 1.4.2.0
git-svn-id: http://xe-core.googlecode.com/svn/trunk@7470 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
55e72e3b47
commit
fae67f375d
70 changed files with 7400 additions and 507 deletions
|
|
@ -167,18 +167,23 @@
|
|||
|
||||
// leave error log if an error occured (if __DEBUG_DB_OUTPUT__ is defined)
|
||||
if($this->isError()) {
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$log['module'] = $site_module_info->module;
|
||||
$log['act'] = Context::get('act');
|
||||
$log['query_id'] = $this->query_id;
|
||||
$log['time'] = date('Y-m-d H:i:s');
|
||||
$log['result'] = 'Failed';
|
||||
$log['errno'] = $this->errno;
|
||||
$log['errstr'] = $this->errstr;
|
||||
|
||||
if(__DEBUG_DB_OUTPUT__ == 1) {
|
||||
$debug_file = _XE_PATH_."files/_debug_db_query.php";
|
||||
$buff = sprintf("%s\n",print_r($log,true));
|
||||
$buff = array();
|
||||
if(!file_exists($debug_file)) $buff[] = '<?php exit(); ?>';
|
||||
$buff[] = print_r($log, true);
|
||||
|
||||
if($display_line) $buff = "\n<?php\n/*\n====================================\n".$buff."------------------------------------\n*/\n?>\n";
|
||||
|
||||
if(@!$fp = fopen($debug_file,"a")) return;
|
||||
fwrite($fp, $buff);
|
||||
if(@!$fp = fopen($debug_file, "a")) return;
|
||||
fwrite($fp, implode("\n", $buff)."\n\n");
|
||||
fclose($fp);
|
||||
}
|
||||
} else {
|
||||
|
|
@ -239,6 +244,7 @@
|
|||
**/
|
||||
function executeQuery($query_id, $args = NULL) {
|
||||
if(!$query_id) return new Object(-1, 'msg_invalid_queryid');
|
||||
$this->query_id = $query_id;
|
||||
|
||||
$id_args = explode('.', $query_id);
|
||||
if(count($id_args) == 2) {
|
||||
|
|
|
|||
|
|
@ -172,9 +172,27 @@
|
|||
function _fetch($result) {
|
||||
if(!$this->isConnected() || $this->isError() || !$result) return;
|
||||
|
||||
$col_types = cubrid_column_types ($result);
|
||||
$col_names = cubrid_column_names ($result);
|
||||
if (($max = count ($col_types)) == count ($col_names)) {
|
||||
$count = 0;
|
||||
while ($count < $max) {
|
||||
if (preg_match ("/^char/", $col_types[$count]) > 0) {
|
||||
$char_type_fields[] = $col_names[$count];
|
||||
}
|
||||
$count++;
|
||||
}
|
||||
}
|
||||
|
||||
while($tmp = cubrid_fetch($result, CUBRID_OBJECT)) {
|
||||
if (is_array ($char_type_fields)) {
|
||||
foreach ($char_type_fields as $val) {
|
||||
$tmp->{$val} = rtrim ($tmp->{$val});
|
||||
}
|
||||
}
|
||||
$output[] = $tmp;
|
||||
}
|
||||
unset ($char_type_fields);
|
||||
|
||||
if($result) cubrid_close_request($result);
|
||||
|
||||
|
|
@ -413,7 +431,7 @@
|
|||
foreach($val['condition'] as $v) {
|
||||
if(!isset($v['value'])) continue;
|
||||
if($v['value'] === '') continue;
|
||||
if(!in_array(gettype($v['value']), array('string', 'integer'))) continue;
|
||||
if(!in_array(gettype($v['value']), array('string', 'integer', 'double'))) continue;
|
||||
|
||||
$name = $v['column'];
|
||||
$operation = $v['operation'];
|
||||
|
|
@ -638,7 +656,7 @@
|
|||
}
|
||||
|
||||
$alias = $val['alias'] ? sprintf('"%s"',$val['alias']) : null;
|
||||
if(substr($name,-1) == '*') {
|
||||
if($name == '*') {
|
||||
$column_list[] = $name;
|
||||
} elseif(strpos($name,'.')===false && strpos($name,'(')===false) {
|
||||
$name = sprintf($click_count,$name);
|
||||
|
|
|
|||
|
|
@ -646,7 +646,7 @@
|
|||
foreach($val['condition'] as $v) {
|
||||
if(!isset($v['value'])) continue;
|
||||
if($v['value'] === '') continue;
|
||||
if(!in_array(gettype($v['value']), array('string', 'integer'))) continue;
|
||||
if(!in_array(gettype($v['value']), array('string', 'integer', 'double'))) continue;
|
||||
|
||||
$name = $v['column'];
|
||||
$operation = $v['operation'];
|
||||
|
|
|
|||
|
|
@ -422,7 +422,7 @@
|
|||
foreach($val['condition'] as $v) {
|
||||
if(!isset($v['value'])) continue;
|
||||
if($v['value'] === '') continue;
|
||||
if(!in_array(gettype($v['value']), array('string', 'integer'))) continue;
|
||||
if(!in_array(gettype($v['value']), array('string', 'integer', 'double'))) continue;
|
||||
|
||||
$name = $v['column'];
|
||||
if(preg_match('/^substr\(/i',$name)) $name = preg_replace('/^substr\(/i','substring(',$name);
|
||||
|
|
|
|||
|
|
@ -402,7 +402,7 @@
|
|||
foreach($val['condition'] as $v) {
|
||||
if(!isset($v['value'])) continue;
|
||||
if($v['value'] === '') continue;
|
||||
if(!in_array(gettype($v['value']), array('string', 'integer'))) continue;
|
||||
if(!in_array(gettype($v['value']), array('string', 'integer', 'double'))) continue;
|
||||
|
||||
$name = $v['column'];
|
||||
$operation = $v['operation'];
|
||||
|
|
|
|||
|
|
@ -411,7 +411,7 @@
|
|||
foreach($val['condition'] as $v) {
|
||||
if(!isset($v['value'])) continue;
|
||||
if($v['value'] === '') continue;
|
||||
if(!in_array(gettype($v['value']), array('string', 'integer'))) continue;
|
||||
if(!in_array(gettype($v['value']), array('string', 'integer', 'double'))) continue;
|
||||
|
||||
$name = $v['column'];
|
||||
$operation = $v['operation'];
|
||||
|
|
|
|||
|
|
@ -391,7 +391,7 @@
|
|||
foreach($val['condition'] as $v) {
|
||||
if(!isset($v['value'])) continue;
|
||||
if($v['value'] === '') continue;
|
||||
if(!in_array(gettype($v['value']), array('string', 'integer'))) continue;
|
||||
if(!in_array(gettype($v['value']), array('string', 'integer', 'double'))) continue;
|
||||
|
||||
$name = $v['column'];
|
||||
$operation = $v['operation'];
|
||||
|
|
|
|||
|
|
@ -527,7 +527,7 @@ class DBPostgresql extends DB
|
|||
continue;
|
||||
if ($v['value'] === '')
|
||||
continue;
|
||||
if (!in_array(gettype($v['value']), array('string', 'integer')))
|
||||
if (!in_array(gettype($v['value']), array('string', 'integer', 'double')))
|
||||
continue;
|
||||
|
||||
$name = $v['column'];
|
||||
|
|
|
|||
|
|
@ -383,7 +383,7 @@
|
|||
foreach($val['condition'] as $v) {
|
||||
if(!isset($v['value'])) continue;
|
||||
if($v['value'] === '') continue;
|
||||
if(!in_array(gettype($v['value']), array('string', 'integer'))) continue;
|
||||
if(!in_array(gettype($v['value']), array('string', 'integer', 'double'))) continue;
|
||||
|
||||
$name = $v['column'];
|
||||
$operation = $v['operation'];
|
||||
|
|
|
|||
|
|
@ -413,7 +413,7 @@
|
|||
foreach($val['condition'] as $v) {
|
||||
if(!isset($v['value'])) continue;
|
||||
if($v['value'] === '') continue;
|
||||
if(!in_array(gettype($v['value']), array('string', 'integer'))) continue;
|
||||
if(!in_array(gettype($v['value']), array('string', 'integer', 'double'))) continue;
|
||||
|
||||
$name = $v['column'];
|
||||
$operation = $v['operation'];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue