"fixed bug reported on the list: not working backup&restore because of blob columns: they get base64 encoded now"

This commit is contained in:
Ralf Becker 2007-06-03 17:57:40 +00:00
parent 71141e4b14
commit 5e59f78c8f

View File

@ -98,7 +98,7 @@
case 'sapdb':
case 'maxdb':
//$this->system_tables = '/^(sql_cursor.*|session_roles|activeconfiguration|cachestatistics|commandcachestatistics|commandstatistics|datastatistics|datavolumes|hotstandbycomponent|hotstandbygroup|instance|logvolumes|machineconfiguration|machineutilization|memoryallocatorstatistics|memoryholders|omslocks|optimizerinformation|sessions|snapshots|spinlockstatistics|version)$/i';
$this->egw_tables = '/^(egw_|phpgw_)/i';
$this->egw_tables = '/^(egw_|phpgw_|g2_)/i';
break;
}
}
@ -302,6 +302,10 @@
}
$arr[$key] = str_replace(BACKSLASH_TOKEN,'\\',str_replace(array('\\\\','\\n','\\r','\\"'),array(BACKSLASH_TOKEN,"\n","\r",'"'),substr($field,1,-1)));
}
elseif ($keys && (strlen($field) > 64 || !is_numeric($field) && $field != 'NULL'))
{
$arr[$key] = base64_decode($field);
}
else
{
$arr[$key] = $field == 'NULL' ? NULL : $field;
@ -330,6 +334,9 @@
case 'date':
case 'timestamp':
break;
case 'blob':
$data = base64_encode($data);
break;
default:
$data = '"'.str_replace(array('\\',"\n","\r",'"'),array('\\\\','\\n','\\r','\\"'),$data).'"';
break;