diff options
author | Florian Pritz <bluewind@xinu.at> | 2014-10-19 23:01:51 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2014-10-19 23:01:51 +0200 |
commit | 1abe7372404a9d65f3b59eda2d83e628267b366d (patch) | |
tree | e9820b18cb65240bb9549b5ed7ac78cc1d6cc59d /application/controllers | |
parent | dbb2247b82ab49c50f424c904ac98702507f1a8e (diff) |
Clean up the postgres changes
Style cleanup and some regression fixes
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/controllers')
-rw-r--r-- | application/controllers/file.php | 2 | ||||
-rw-r--r-- | application/controllers/user.php | 13 |
2 files changed, 7 insertions, 8 deletions
diff --git a/application/controllers/file.php b/application/controllers/file.php index b81900af2..62cf342b1 100644 --- a/application/controllers/file.php +++ b/application/controllers/file.php @@ -1009,7 +1009,7 @@ class File extends MY_Controller { ->from('files') ->where('date <', $oldest_time) ->or_where('('.$this->db->_protect_identifiers('user').' = 0 AND ' - .$this->db->_protect_identifiers('date')." < $oldest_session_time)") + .$this->db->_protect_identifiers('date')." < $oldest_session_time)") ->get()->result_array(); foreach($query as $row) { diff --git a/application/controllers/user.php b/application/controllers/user.php index 57c6498b1..b542f2b4c 100644 --- a/application/controllers/user.php +++ b/application/controllers/user.php @@ -148,10 +148,9 @@ class User extends MY_Controller { ->get()->result_array(); // Convert timestamp to unix timestamp - foreach ($query as & $record) - { - if ( ! empty($record['created'])) - { + // TODO: migrate database to integer timestamp and get rid of this + foreach ($query as &$record) { + if (!empty($record['created'])) { $record['created'] = strtotime($record['created']); } } @@ -389,11 +388,11 @@ class User extends MY_Controller { if (empty($error)) { $this->db->where('id', $userid) - ->update('users', [ + ->update('users', array( 'password' => $this->muser->hash_password($password) - ]); + )); - $this->db->where($key, $key) + $this->db->where('key', $key) ->delete('actions'); $this->load->view('header', $this->data); |