diff options
author | Florian Pritz <bluewind@xinu.at> | 2017-09-26 13:46:14 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2017-09-26 13:46:14 +0200 |
commit | 3ff6ffa3341c876b741feb66552cdd110b67872e (patch) | |
tree | 69e11cd0009ddd1346f2dc4cd8c47244368db28e /application/models | |
parent | bc2f7f596f727e204e8b8c5b849545745b3cbfaa (diff) | |
parent | 81a4c8c630ef59cffea0c24e64fb6fa7f09bfcf6 (diff) |
Merge CodeIgniter 3 support
Diffstat (limited to 'application/models')
-rw-r--r-- | application/models/Mfile.php (renamed from application/models/mfile.php) | 0 | ||||
-rw-r--r-- | application/models/Mmultipaste.php (renamed from application/models/mmultipaste.php) | 0 | ||||
-rw-r--r-- | application/models/Muser.php (renamed from application/models/muser.php) | 9 | ||||
-rw-r--r-- | application/models/index.html | 3 |
4 files changed, 8 insertions, 4 deletions
diff --git a/application/models/mfile.php b/application/models/Mfile.php index 977240c89..977240c89 100644 --- a/application/models/mfile.php +++ b/application/models/Mfile.php diff --git a/application/models/mmultipaste.php b/application/models/Mmultipaste.php index 52ea4dfb4..52ea4dfb4 100644 --- a/application/models/mmultipaste.php +++ b/application/models/Mmultipaste.php diff --git a/application/models/muser.php b/application/models/Muser.php index 1ee6c259a..e59572f82 100644 --- a/application/models/muser.php +++ b/application/models/Muser.php @@ -156,8 +156,7 @@ class Muser extends CI_Model { */ public function valid_email($email) { - $this->load->helper("email"); - return valid_email($email); + return $email === filter_var($email, FILTER_VALIDATE_EMAIL); } public function add_user($username, $password, $email, $referrer) @@ -276,7 +275,7 @@ class Muser extends CI_Model { function require_access($wanted_level = "full") { - if ($this->input->post("apikey") !== false) { + if ($this->input->post("apikey") !== null) { $this->apilogin($this->input->post("apikey")); } @@ -324,6 +323,10 @@ class Muser extends CI_Model { ->where('user', $userid) ->get()->row_array(); + if ($query === null) { + $query = []; + } + $extra_fields = array( "username" => $this->get_username(), "email" => $this->get_email($userid), diff --git a/application/models/index.html b/application/models/index.html index c942a79ce..b702fbc39 100644 --- a/application/models/index.html +++ b/application/models/index.html @@ -1,3 +1,4 @@ +<!DOCTYPE html> <html> <head> <title>403 Forbidden</title> @@ -7,4 +8,4 @@ <p>Directory access is forbidden.</p> </body> -</html>
\ No newline at end of file +</html> |