Mise à jour des librairies Framework legacy

This commit is contained in:
Michael RICOIS 2015-01-21 08:11:14 +00:00
parent cf3933a7ab
commit a7b2f74323

View File

@ -23,7 +23,7 @@ class WDB
}
if ( $host === null ) {
$c = Zend_Registry::get('config');
$c = Zend_Registry::get('config');
$config = new Zend_Config(array(
'adapter' => $c->profil->db->metier->adapter,
'params' => array(
@ -122,7 +122,7 @@ class WDB
$query='UPDATE `'.$table.'` SET ';
while(isset($fields[$i])){
if($i>0) { $query.=', '; }
$query.=' `'.$fields[$i]."`='".checkaddslashes($values[$i])."'";
$query.=' '.$fields[$i]."='".$this->db->quote($values[$i])."'";
$i++;
}
$query = str_replace("'NULL'", 'NULL', $query);
@ -205,11 +205,7 @@ class WDB
} catch(Zend_Db_Exception $e) {
$this->errorCode = $e->getCode();
$this->errorMsg = $e->getMessage();
$fpErr = fopen(LOG_PATH.'/sqlerror.log','a');
fwrite($fpErr, date('YmdHis'). ' - '.$query .EOL);
fwrite($fpErr, date('YmdHis'). ' - '.$e->getCode().' - '. $e->getMessage().PHP_EOL);
file_put_contents(LOG_PATH.'/sqlerror.log', date('YmdHis')." - ".$query."\n".$e->getCode().':'. $e->getMessage());
return false;
}