diff --git a/htdocs/core/db/sqlite3.class.php b/htdocs/core/db/sqlite3.class.php index 3c95d9f73f7e05cfc5db435656c033f9c9010f62..50d9e5c9c794663c12d397c54c36529dff42b2dc 100644 --- a/htdocs/core/db/sqlite3.class.php +++ b/htdocs/core/db/sqlite3.class.php @@ -1255,11 +1255,14 @@ class DoliDBSqlite3 extends DoliDB * @param int $arg_count Arg count * @return void */ - private function addCustomFunction($name, $arg_count = -1) { - if ($this->db) { - $localname = __CLASS__ . '::' . 'db' . $name; + private function addCustomFunction($name, $arg_count = -1) + { + if ($this->db) + { + $newname=preg_replace('/_/','',$name); + $localname = __CLASS__ . '::' . 'db' . $newname; $reflectClass = new ReflectionClass(__CLASS__); - $reflectFunction = $reflectClass->getMethod('db' . $name); + $reflectFunction = $reflectClass->getMethod('db' . $newname); if ($arg_count < 0) { $arg_count = $reflectFunction->getNumberOfParameters(); } @@ -1333,7 +1336,7 @@ class DoliDBSqlite3 extends DoliDB * @param string $format la chaine de formatage * @return string La date formatee. */ - public static function dbdate_format($date, $format) + public static function dbdateformat($date, $format) { static $mysql_replacement; if (! isset($mysql_replacement)) {