@@ -1,4 +1,4 @@ discard block |
||
| 1 | -<?php declare(strict_types=1); defined('BASEPATH') OR exit('No direct script access allowed'); |
|
| 1 | +<?php declare(strict_types = 1); defined('BASEPATH') OR exit('No direct script access allowed'); |
|
| 2 | 2 | |
| 3 | 3 | class User_Model extends CI_Model { |
| 4 | 4 | public $id; |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | if($query->num_rows() > 0) { |
| 72 | 72 | //username exists, grab email |
| 73 | 73 | $email = $query->row('email'); |
| 74 | - }else{ |
|
| 74 | + } else { |
|
| 75 | 75 | //username doesn't exist, return FALSE |
| 76 | 76 | $email = FALSE; |
| 77 | 77 | } |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | public function get_new_api_key() : string { |
| 104 | 104 | $api_key = NULL; |
| 105 | 105 | if($this->logged_in()) { |
| 106 | - $api_key = substr("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", mt_rand(0, 51), 1) . substr(md5((string) time()), 1); |
|
| 106 | + $api_key = substr("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", mt_rand(0, 51), 1).substr(md5((string) time()), 1); |
|
| 107 | 107 | |
| 108 | 108 | $this->db->where('id', $this->id); |
| 109 | 109 | $this->db->update('auth_users', ['api_key' => $api_key]); |
@@ -71,7 +71,7 @@ |
||
| 71 | 71 | if($query->num_rows() > 0) { |
| 72 | 72 | //username exists, grab email |
| 73 | 73 | $email = $query->row('email'); |
| 74 | - }else{ |
|
| 74 | + } else { |
|
| 75 | 75 | //username doesn't exist, return FALSE |
| 76 | 76 | $email = FALSE; |
| 77 | 77 | } |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare(strict_types=1); defined('BASEPATH') OR exit('No direct script access allowed'); |
|
| 1 | +<?php declare(strict_types=1); defined('BASEPATH') or exit('No direct script access allowed'); |
|
| 2 | 2 | |
| 3 | 3 | class User_Model extends CI_Model { |
| 4 | 4 | public $id; |
@@ -45,9 +45,9 @@ discard block |
||
| 45 | 45 | $this->load->database(); |
| 46 | 46 | |
| 47 | 47 | $query = $this->db->select('*') |
| 48 | - ->from('auth_users') |
|
| 49 | - ->where('username', $username) |
|
| 50 | - ->get(); |
|
| 48 | + ->from('auth_users') |
|
| 49 | + ->where('username', $username) |
|
| 50 | + ->get(); |
|
| 51 | 51 | |
| 52 | 52 | return (bool) $query->num_rows(); |
| 53 | 53 | } |
@@ -69,9 +69,9 @@ discard block |
||
| 69 | 69 | $this->load->database(); |
| 70 | 70 | |
| 71 | 71 | $query = $this->db->select('email') |
| 72 | - ->from('auth_users') |
|
| 73 | - ->where('username', $identity) |
|
| 74 | - ->get(); |
|
| 72 | + ->from('auth_users') |
|
| 73 | + ->where('username', $identity) |
|
| 74 | + ->get(); |
|
| 75 | 75 | |
| 76 | 76 | if($query->num_rows() > 0) { |
| 77 | 77 | //username exists, grab email |
@@ -89,9 +89,9 @@ discard block |
||
| 89 | 89 | $user = NULL; |
| 90 | 90 | |
| 91 | 91 | $query = $this->db->select('*') |
| 92 | - ->from('auth_users') |
|
| 93 | - ->where('username', $username) |
|
| 94 | - ->get(); |
|
| 92 | + ->from('auth_users') |
|
| 93 | + ->where('username', $username) |
|
| 94 | + ->get(); |
|
| 95 | 95 | |
| 96 | 96 | if($query->num_rows() > 0) { |
| 97 | 97 | $user = $query->row(); |
@@ -120,12 +120,12 @@ discard block |
||
| 120 | 120 | $api_key = NULL; |
| 121 | 121 | if($this->logged_in()) { |
| 122 | 122 | $this->db->select('api_key') |
| 123 | - ->where('id', $this->User->id) |
|
| 124 | - ->get('auth_users'); |
|
| 123 | + ->where('id', $this->User->id) |
|
| 124 | + ->get('auth_users'); |
|
| 125 | 125 | |
| 126 | 126 | $query = $this->db->select('api_key') |
| 127 | - ->where('id', $this->User->id) |
|
| 128 | - ->get('auth_users'); |
|
| 127 | + ->where('id', $this->User->id) |
|
| 128 | + ->get('auth_users'); |
|
| 129 | 129 | |
| 130 | 130 | if($query->num_rows() > 0) { |
| 131 | 131 | $api_key = $query->row('api_key'); |
@@ -137,9 +137,9 @@ discard block |
||
| 137 | 137 | |
| 138 | 138 | public function get_id_from_api_key(string $api_key) { |
| 139 | 139 | $query = $this->db->select('id') |
| 140 | - ->from('auth_users') |
|
| 141 | - ->where('api_key', $api_key) |
|
| 142 | - ->get(); |
|
| 140 | + ->from('auth_users') |
|
| 141 | + ->where('api_key', $api_key) |
|
| 142 | + ->get(); |
|
| 143 | 143 | |
| 144 | 144 | if($query->num_rows() > 0) { |
| 145 | 145 | $userID = $query->row('id'); |
@@ -201,12 +201,12 @@ discard block |
||
| 201 | 201 | } |
| 202 | 202 | public function hideLatestNotice() { |
| 203 | 203 | $idQuery = $this->db->select('1') |
| 204 | - ->where('user_id', $this->User->id) |
|
| 205 | - ->get('tracker_user_notices'); |
|
| 204 | + ->where('user_id', $this->User->id) |
|
| 205 | + ->get('tracker_user_notices'); |
|
| 206 | 206 | if($idQuery->num_rows() > 0) { |
| 207 | 207 | $success = (bool) $this->db->set('hidden_notice_id', '(SELECT id FROM tracker_notices ORDER BY id DESC LIMIT 1)', FALSE) |
| 208 | - ->where('user_id', $this->User->id) |
|
| 209 | - ->update('tracker_user_notices'); |
|
| 208 | + ->where('user_id', $this->User->id) |
|
| 209 | + ->update('tracker_user_notices'); |
|
| 210 | 210 | } else { |
| 211 | 211 | $success = (bool) $this->db->insert('tracker_user_notices', [ |
| 212 | 212 | 'user_id' => $this->User->id, |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php defined('BASEPATH') OR exit('No direct script access allowed'); |
|
| 1 | +<?php defined('BASEPATH') or exit('No direct script access allowed'); |
|
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | | ------------------------------------------------------------------- |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -defined('BASEPATH') OR exit('No direct script access allowed'); |
|
| 2 | +defined('BASEPATH') or exit('No direct script access allowed'); |
|
| 3 | 3 | |
| 4 | 4 | /* |
| 5 | 5 | |-------------------------------------------------------------------------- |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php defined('BASEPATH') OR exit('No direct script access allowed'); |
|
| 1 | +<?php defined('BASEPATH') or exit('No direct script access allowed'); |
|
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | |-------------------------------------------------------------------------- |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -defined('BASEPATH') OR exit('No direct script access allowed'); |
|
| 2 | +defined('BASEPATH') or exit('No direct script access allowed'); |
|
| 3 | 3 | |
| 4 | 4 | /* |
| 5 | 5 | | ------------------------------------------------------------------------- |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -defined('BASEPATH') OR exit('No direct script access allowed'); |
|
| 2 | +defined('BASEPATH') or exit('No direct script access allowed'); |
|
| 3 | 3 | |
| 4 | 4 | /* |
| 5 | 5 | | ------------------------------------------------------------------- |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php defined('BASEPATH') OR exit('No direct script access allowed'); |
|
| 1 | +<?php defined('BASEPATH') or exit('No direct script access allowed'); |
|
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | | ------------------------------------------------------------------------- |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | //TEMP |
| 80 | 80 | $route['user/dashboard_beta'] = 'User/DashboardBeta'; |
| 81 | 81 | |
| 82 | -$route['api/internal/get_list'] = 'API/Internal/GetList'; |
|
| 82 | +$route['api/internal/get_list'] = 'API/Internal/GetList'; |
|
| 83 | 83 | $route['api/internal/get_list/(all|reading|on-hold|plan-to-read|(custom(?:1|2|3)))'] = 'API/Internal/GetList/index/$1'; |
| 84 | 84 | |
| 85 | 85 | $route['ajax/username_check']['post'] = 'Ajax/UsernameCheck'; //rate limited |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | |
| 102 | 102 | $route['import_amr'] = 'Import_AMR'; |
| 103 | 103 | |
| 104 | -$route['report_issue'] = 'ReportIssue'; |
|
| 104 | +$route['report_issue'] = 'ReportIssue'; |
|
| 105 | 105 | |
| 106 | 106 | $route['stats'] = 'Stats'; |
| 107 | 107 | $route['help'] = 'Help'; |
@@ -76,7 +76,7 @@ |
||
| 76 | 76 | 'jpeg' => array('image/jpeg', 'image/pjpeg'), |
| 77 | 77 | 'jpg' => array('image/jpeg', 'image/pjpeg'), |
| 78 | 78 | 'jpe' => array('image/jpeg', 'image/pjpeg'), |
| 79 | - 'png' => array('image/png', 'image/x-png'), |
|
| 79 | + 'png' => array('image/png', 'image/x-png'), |
|
| 80 | 80 | 'tiff' => 'image/tiff', |
| 81 | 81 | 'tif' => 'image/tiff', |
| 82 | 82 | 'css' => array('text/css', 'text/plain'), |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php defined('BASEPATH') OR exit('No direct script access allowed'); |
|
| 1 | +<?php defined('BASEPATH') or exit('No direct script access allowed'); |
|
| 2 | 2 | |
| 3 | 3 | /* |
| 4 | 4 | | ------------------------------------------------------------------- |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -defined('BASEPATH') OR exit('No direct script access allowed'); |
|
| 2 | +defined('BASEPATH') or exit('No direct script access allowed'); |
|
| 3 | 3 | |
| 4 | 4 | $_doctypes = array( |
| 5 | 5 | 'xhtml11' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">', |