diff options
Diffstat (limited to 'inc/poche/Database.class.php')
-rwxr-xr-x | inc/poche/Database.class.php | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/inc/poche/Database.class.php b/inc/poche/Database.class.php index 8d74f2ff..2c80b64b 100755 --- a/inc/poche/Database.class.php +++ b/inc/poche/Database.class.php | |||
@@ -11,12 +11,12 @@ | |||
11 | class Database { | 11 | class Database { |
12 | 12 | ||
13 | var $handle; | 13 | var $handle; |
14 | private $order = array( | 14 | private $order = array ( |
15 | 'ia' => 'ORDER BY entries.id', | 15 | 'ia' => 'ORDER BY entries.id', |
16 | 'id' => 'ORDER BY entries.id DESC', | 16 | 'id' => 'ORDER BY entries.id DESC', |
17 | 'ta' => 'ORDER BY lower(entries.title)', | 17 | 'ta' => 'ORDER BY lower(entries.title)', |
18 | 'td' => 'ORDER BY lower(entries.title) DESC', | 18 | 'td' => 'ORDER BY lower(entries.title) DESC', |
19 | 'default' => 'ORDER BY entries.id' | 19 | 'default' => 'ORDER BY entries.id' |
20 | ); | 20 | ); |
21 | 21 | ||
22 | function __construct() | 22 | function __construct() |
@@ -170,11 +170,11 @@ class Database { | |||
170 | public function login($username, $password, $isauthenticated = FALSE) | 170 | public function login($username, $password, $isauthenticated = FALSE) |
171 | { | 171 | { |
172 | if ($isauthenticated) { | 172 | if ($isauthenticated) { |
173 | $sql = "SELECT * FROM users WHERE username=?"; | 173 | $sql = "SELECT * FROM users WHERE username=?"; |
174 | $query = $this->executeQuery($sql, array($username)); | 174 | $query = $this->executeQuery($sql, array($username)); |
175 | } else { | 175 | } else { |
176 | $sql = "SELECT * FROM users WHERE username=? AND password=?"; | 176 | $sql = "SELECT * FROM users WHERE username=? AND password=?"; |
177 | $query = $this->executeQuery($sql, array($username, $password)); | 177 | $query = $this->executeQuery($sql, array($username, $password)); |
178 | } | 178 | } |
179 | $login = $query->fetchAll(); | 179 | $login = $query->fetchAll(); |
180 | 180 | ||