Permalink
Browse files

fixed bug #3495: ibase_timefmt() was removed from php 5

git-svn-id: http://svn.php.net/repository/pear/packages/MDB/trunk@179902 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
1 parent 5ff42fe commit cd00e8fbc5909a4ba52f526ef9db972be3c350e3 @quipo quipo committed Feb 16, 2005
Showing with 8 additions and 2 deletions.
  1. +8 −2 MDB/ibase.php
View
@@ -395,8 +395,14 @@ function _doConnect($database_name, $persistent)
$connection = @call_user_func_array($function, $params);
if ($connection > 0) {
- @ibase_timefmt("%Y-%m-%d %H:%M:%S", IBASE_TIMESTAMP);
- @ibase_timefmt("%Y-%m-%d", IBASE_DATE);
+ if (function_exists('ibase_timefmt')) {
+ @ibase_timefmt("%Y-%m-%d %H:%M:%S", IBASE_TIMESTAMP);
+ @ibase_timefmt("%Y-%m-%d", IBASE_DATE);
+ } else {
+ @ini_set("ibase.timestampformat", "%Y-%m-%d %H:%M:%S");
+ //@ini_set("ibase.timeformat", "%H:%M:%S");
+ @ini_set("ibase.dateformat", "%Y-%m-%d");
+ }
return $connection;
}
if (isset($php_errormsg)) {

0 comments on commit cd00e8f

Please sign in to comment.