From 73b833ed6b74f43bb563dd0a3df64874cd8fde96 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Mon, 11 Apr 2016 12:02:26 +0200 Subject: [PATCH] KickstartForm: there is no dual on PostgreSQL --- application/forms/KickstartForm.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/application/forms/KickstartForm.php b/application/forms/KickstartForm.php index ee7491bb..1ea54571 100644 --- a/application/forms/KickstartForm.php +++ b/application/forms/KickstartForm.php @@ -155,16 +155,15 @@ class KickstartForm extends QuickForm $db = $resource->getDbAdapter(); try { - $query = $db->select()->from('dual', '(1)'); - $db->fetchOne($query); + $db->fetchOne('SELECT 1'); } catch (Exception $e) { $this->getElement('resource') ->addError('Could not connect to database: ' . $e->getMessage()); $hint = $this->translate( - 'Please make sure that your database grants enough permissions' - . ' and that you deployed the correct %s.' + 'Please make sure that your database exists and your user has' + . ' been granted enough permissions' ); $this->addHtmlHint($hint, array('name' => 'HINT_db_perms'));