summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@webtrees.net>2019-01-06 15:14:52 +0000
committerGreg Roach <fisharebest@webtrees.net>2019-01-06 15:14:52 +0000
commit40d1c6147bc7f80f7688bd958e612ae8db6a5fd0 (patch)
tree2b9001836ba0c7b83b497b3e97d88baedc8f168e /index.php
parent9dc7e9e3591406f239cf15f0cdb58517a816694f (diff)
downloadwebtrees-40d1c6147bc7f80f7688bd958e612ae8db6a5fd0.tar.gz
webtrees-40d1c6147bc7f80f7688bd958e612ae8db6a5fd0.tar.bz2
webtrees-40d1c6147bc7f80f7688bd958e612ae8db6a5fd0.zip
Use illuminate/database
Diffstat (limited to 'index.php')
-rw-r--r--index.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/index.php b/index.php
index 28f8a691e2..ee561c66bb 100644
--- a/index.php
+++ b/index.php
@@ -38,6 +38,7 @@ use Fisharebest\Webtrees\Tree;
use Fisharebest\Webtrees\User;
use Fisharebest\Webtrees\View;
use Fisharebest\Webtrees\Webtrees;
+use Illuminate\Database\Capsule\Manager as DB;
use League\Flysystem\Adapter\Local;
use League\Flysystem\Filesystem;
use Symfony\Component\HttpFoundation\Request;
@@ -146,7 +147,7 @@ if ($max_execution_time !== '' && strpos(ini_get('disable_functions'), 'set_time
Session::start();
// Note that the database/webservers may not be synchronised, so use DB time throughout.
-define('WT_TIMESTAMP', (int) Database::prepare("SELECT UNIX_TIMESTAMP()")->fetchOne());
+define('WT_TIMESTAMP', DB::select('SELECT UNIX_TIMESTAMP() AS unix_timestamp')[0]->unix_timestamp);
// Users get their own time-zone. Visitors get the site time-zone.
try {