@@ -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 Auth_Model extends CI_Model { |
4 | 4 | public function __construct() { |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | } |
61 | 61 | |
62 | 62 | $success = TRUE; |
63 | - } catch (Exception $e) { |
|
63 | + } catch(Exception $e) { |
|
64 | 64 | //echo 'Caught exception: ', $e->getMessage(), "\n"; |
65 | 65 | |
66 | 66 | //revert verification |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | //TODO: Remove from DB, send user error that verification expired. |
92 | 92 | } else { |
93 | 93 | //not expired, verification is valid, return email |
94 | - $return = $result->email; |
|
94 | + $return = $result->email; |
|
95 | 95 | } |
96 | 96 | } |
97 | 97 | return $return; |
@@ -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]); |
@@ -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'), |
@@ -17,48 +17,48 @@ |
||
17 | 17 | |
18 | 18 | // smiley image name width height alt |
19 | 19 | |
20 | - ':-)' => array('grin.gif', '19', '19', 'grin'), |
|
21 | - ':lol:' => array('lol.gif', '19', '19', 'LOL'), |
|
22 | - ':cheese:' => array('cheese.gif', '19', '19', 'cheese'), |
|
23 | - ':)' => array('smile.gif', '19', '19', 'smile'), |
|
24 | - ';-)' => array('wink.gif', '19', '19', 'wink'), |
|
25 | - ';)' => array('wink.gif', '19', '19', 'wink'), |
|
26 | - ':smirk:' => array('smirk.gif', '19', '19', 'smirk'), |
|
27 | - ':roll:' => array('rolleyes.gif', '19', '19', 'rolleyes'), |
|
28 | - ':-S' => array('confused.gif', '19', '19', 'confused'), |
|
29 | - ':wow:' => array('surprise.gif', '19', '19', 'surprised'), |
|
30 | - ':bug:' => array('bigsurprise.gif', '19', '19', 'big surprise'), |
|
31 | - ':-P' => array('tongue_laugh.gif', '19', '19', 'tongue laugh'), |
|
32 | - '%-P' => array('tongue_rolleye.gif', '19', '19', 'tongue rolleye'), |
|
33 | - ';-P' => array('tongue_wink.gif', '19', '19', 'tongue wink'), |
|
34 | - ':P' => array('raspberry.gif', '19', '19', 'raspberry'), |
|
35 | - ':blank:' => array('blank.gif', '19', '19', 'blank stare'), |
|
36 | - ':long:' => array('longface.gif', '19', '19', 'long face'), |
|
37 | - ':ohh:' => array('ohh.gif', '19', '19', 'ohh'), |
|
38 | - ':grrr:' => array('grrr.gif', '19', '19', 'grrr'), |
|
39 | - ':gulp:' => array('gulp.gif', '19', '19', 'gulp'), |
|
40 | - '8-/' => array('ohoh.gif', '19', '19', 'oh oh'), |
|
41 | - ':down:' => array('downer.gif', '19', '19', 'downer'), |
|
42 | - ':red:' => array('embarrassed.gif', '19', '19', 'red face'), |
|
43 | - ':sick:' => array('sick.gif', '19', '19', 'sick'), |
|
44 | - ':shut:' => array('shuteye.gif', '19', '19', 'shut eye'), |
|
45 | - ':-/' => array('hmm.gif', '19', '19', 'hmmm'), |
|
46 | - '>:(' => array('mad.gif', '19', '19', 'mad'), |
|
47 | - ':mad:' => array('mad.gif', '19', '19', 'mad'), |
|
48 | - '>:-(' => array('angry.gif', '19', '19', 'angry'), |
|
49 | - ':angry:' => array('angry.gif', '19', '19', 'angry'), |
|
50 | - ':zip:' => array('zip.gif', '19', '19', 'zipper'), |
|
51 | - ':kiss:' => array('kiss.gif', '19', '19', 'kiss'), |
|
52 | - ':ahhh:' => array('shock.gif', '19', '19', 'shock'), |
|
53 | - ':coolsmile:' => array('shade_smile.gif', '19', '19', 'cool smile'), |
|
54 | - ':coolsmirk:' => array('shade_smirk.gif', '19', '19', 'cool smirk'), |
|
55 | - ':coolgrin:' => array('shade_grin.gif', '19', '19', 'cool grin'), |
|
56 | - ':coolhmm:' => array('shade_hmm.gif', '19', '19', 'cool hmm'), |
|
57 | - ':coolmad:' => array('shade_mad.gif', '19', '19', 'cool mad'), |
|
58 | - ':coolcheese:' => array('shade_cheese.gif', '19', '19', 'cool cheese'), |
|
59 | - ':vampire:' => array('vampire.gif', '19', '19', 'vampire'), |
|
60 | - ':snake:' => array('snake.gif', '19', '19', 'snake'), |
|
61 | - ':exclaim:' => array('exclaim.gif', '19', '19', 'exclaim'), |
|
62 | - ':question:' => array('question.gif', '19', '19', 'question') |
|
20 | + ':-)' => array('grin.gif', '19', '19', 'grin'), |
|
21 | + ':lol:' => array('lol.gif', '19', '19', 'LOL'), |
|
22 | + ':cheese:' => array('cheese.gif', '19', '19', 'cheese'), |
|
23 | + ':)' => array('smile.gif', '19', '19', 'smile'), |
|
24 | + ';-)' => array('wink.gif', '19', '19', 'wink'), |
|
25 | + ';)' => array('wink.gif', '19', '19', 'wink'), |
|
26 | + ':smirk:' => array('smirk.gif', '19', '19', 'smirk'), |
|
27 | + ':roll:' => array('rolleyes.gif', '19', '19', 'rolleyes'), |
|
28 | + ':-S' => array('confused.gif', '19', '19', 'confused'), |
|
29 | + ':wow:' => array('surprise.gif', '19', '19', 'surprised'), |
|
30 | + ':bug:' => array('bigsurprise.gif', '19', '19', 'big surprise'), |
|
31 | + ':-P' => array('tongue_laugh.gif', '19', '19', 'tongue laugh'), |
|
32 | + '%-P' => array('tongue_rolleye.gif', '19', '19', 'tongue rolleye'), |
|
33 | + ';-P' => array('tongue_wink.gif', '19', '19', 'tongue wink'), |
|
34 | + ':P' => array('raspberry.gif', '19', '19', 'raspberry'), |
|
35 | + ':blank:' => array('blank.gif', '19', '19', 'blank stare'), |
|
36 | + ':long:' => array('longface.gif', '19', '19', 'long face'), |
|
37 | + ':ohh:' => array('ohh.gif', '19', '19', 'ohh'), |
|
38 | + ':grrr:' => array('grrr.gif', '19', '19', 'grrr'), |
|
39 | + ':gulp:' => array('gulp.gif', '19', '19', 'gulp'), |
|
40 | + '8-/' => array('ohoh.gif', '19', '19', 'oh oh'), |
|
41 | + ':down:' => array('downer.gif', '19', '19', 'downer'), |
|
42 | + ':red:' => array('embarrassed.gif', '19', '19', 'red face'), |
|
43 | + ':sick:' => array('sick.gif', '19', '19', 'sick'), |
|
44 | + ':shut:' => array('shuteye.gif', '19', '19', 'shut eye'), |
|
45 | + ':-/' => array('hmm.gif', '19', '19', 'hmmm'), |
|
46 | + '>:(' => array('mad.gif', '19', '19', 'mad'), |
|
47 | + ':mad:' => array('mad.gif', '19', '19', 'mad'), |
|
48 | + '>:-(' => array('angry.gif', '19', '19', 'angry'), |
|
49 | + ':angry:' => array('angry.gif', '19', '19', 'angry'), |
|
50 | + ':zip:' => array('zip.gif', '19', '19', 'zipper'), |
|
51 | + ':kiss:' => array('kiss.gif', '19', '19', 'kiss'), |
|
52 | + ':ahhh:' => array('shock.gif', '19', '19', 'shock'), |
|
53 | + ':coolsmile:' => array('shade_smile.gif', '19', '19', 'cool smile'), |
|
54 | + ':coolsmirk:' => array('shade_smirk.gif', '19', '19', 'cool smirk'), |
|
55 | + ':coolgrin:' => array('shade_grin.gif', '19', '19', 'cool grin'), |
|
56 | + ':coolhmm:' => array('shade_hmm.gif', '19', '19', 'cool hmm'), |
|
57 | + ':coolmad:' => array('shade_mad.gif', '19', '19', 'cool mad'), |
|
58 | + ':coolcheese:' => array('shade_cheese.gif', '19', '19', 'cool cheese'), |
|
59 | + ':vampire:' => array('vampire.gif', '19', '19', 'vampire'), |
|
60 | + ':snake:' => array('snake.gif', '19', '19', 'snake'), |
|
61 | + ':exclaim:' => array('exclaim.gif', '19', '19', 'exclaim'), |
|
62 | + ':question:' => array('question.gif', '19', '19', 'question') |
|
63 | 63 | |
64 | 64 | ); |
@@ -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 MY_Form_validation extends CI_Form_validation { |
4 | 4 | private $user_tables; |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | parent::__construct(); |
8 | 8 | log_message('debug', "MY_Form_validation Class Initialized"); |
9 | 9 | |
10 | - $this->CI =& get_instance(); |
|
10 | + $this->CI = & get_instance(); |
|
11 | 11 | $this->CI->config->load('ion_auth', TRUE); |
12 | 12 | $this->user_tables = $this->CI->config->item('tables', 'ion_auth'); |
13 | 13 | } |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | */ |
92 | 92 | public function isRuleValid(string $ruleName) : bool { |
93 | 93 | $isValid = FALSE; |
94 | - if(is_string($ruleName) && $this->has_rule($ruleName)){ |
|
94 | + if(is_string($ruleName) && $this->has_rule($ruleName)) { |
|
95 | 95 | $isValid = !in_array($ruleName, array_keys($this->error_array()), TRUE); |
96 | 96 | } |
97 | 97 | return $isValid; |
@@ -74,8 +74,8 @@ discard block |
||
74 | 74 | */ |
75 | 75 | public function __construct(&$db) { |
76 | 76 | // Assign the main CI object to $this->CI and load the file helper since we use it a lot |
77 | - $this->CI =& get_instance(); |
|
78 | - $this->db =& $db; |
|
77 | + $this->CI = & get_instance(); |
|
78 | + $this->db = & $db; |
|
79 | 79 | $this->CI->load->helper('file'); |
80 | 80 | |
81 | 81 | $this->check_path(); |
@@ -102,18 +102,18 @@ discard block |
||
102 | 102 | |
103 | 103 | // Add a trailing slash to the path if needed |
104 | 104 | $path = realpath($path) |
105 | - ? rtrim(realpath($path), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR |
|
106 | - : rtrim($path, '/') . '/'; |
|
105 | + ? rtrim(realpath($path), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR |
|
106 | + : rtrim($path, '/').'/'; |
|
107 | 107 | |
108 | 108 | if(!is_dir($path)) { |
109 | - log_message('debug', 'DB cache path error: ' . $path); |
|
109 | + log_message('debug', 'DB cache path error: '.$path); |
|
110 | 110 | |
111 | 111 | // If the path is wrong we'll turn off caching |
112 | 112 | return $this->db->cache_off(); |
113 | 113 | } |
114 | 114 | |
115 | 115 | if(!is_really_writable($path)) { |
116 | - log_message('debug', 'DB cache dir not writable: ' . $path); |
|
116 | + log_message('debug', 'DB cache dir not writable: '.$path); |
|
117 | 117 | |
118 | 118 | // If the path is not really writable we'll turn off caching |
119 | 119 | return $this->db->cache_off(); |
@@ -144,11 +144,11 @@ discard block |
||
144 | 144 | // BEGIN --- modification for supporting multi-level cache folders |
145 | 145 | |
146 | 146 | if(is_array($this->CI->config->item('multi_level_cache_folders'))) { |
147 | - $uri_md5 = md5($segment_one . '+' . $segment_two); |
|
147 | + $uri_md5 = md5($segment_one.'+'.$segment_two); |
|
148 | 148 | $layer = $this->get_folder_layers($uri_md5); |
149 | - $filepath = $this->db->cachedir . $segment_one.'/'.$segment_two . '/' . implode('/', $layer) . '/' . $uri_md5; |
|
149 | + $filepath = $this->db->cachedir.$segment_one.'/'.$segment_two.'/'.implode('/', $layer).'/'.$uri_md5; |
|
150 | 150 | } else { |
151 | - $filepath = $this->db->cachedir . $segment_one.'/'. $segment_two . '/' . md5($sql); |
|
151 | + $filepath = $this->db->cachedir.$segment_one.'/'.$segment_two.'/'.md5($sql); |
|
152 | 152 | } |
153 | 153 | |
154 | 154 | // END --- modification for supporting multi-level cache folders |
@@ -178,9 +178,9 @@ discard block |
||
178 | 178 | // BEGIN --- modification for supporting multi-level cache folders |
179 | 179 | |
180 | 180 | if(is_array($this->CI->config->item('multi_level_cache_folders'))) { |
181 | - $uri_md5 = md5($segment_one . '+' . $segment_two); |
|
181 | + $uri_md5 = md5($segment_one.'+'.$segment_two); |
|
182 | 182 | $layer = $this->get_folder_layers($uri_md5); |
183 | - $dir_path = $this->db->cachedir . $segment_one.'/'.$segment_two . '/' . implode('/', $layer) . '/'; |
|
183 | + $dir_path = $this->db->cachedir.$segment_one.'/'.$segment_two.'/'.implode('/', $layer).'/'; |
|
184 | 184 | |
185 | 185 | if(!is_dir($dir_path)) { |
186 | 186 | $old = umask(0); |
@@ -188,18 +188,18 @@ discard block |
||
188 | 188 | umask($old); |
189 | 189 | } |
190 | 190 | } else { |
191 | - $dir_path = $this->db->cachedir . $segment_one.'/'. $segment_two . '/'; |
|
191 | + $dir_path = $this->db->cachedir.$segment_one.'/'.$segment_two.'/'; |
|
192 | 192 | } |
193 | 193 | |
194 | 194 | $filename = md5($sql); |
195 | 195 | |
196 | 196 | // END --- modification for supporting multi-level cache folders |
197 | 197 | |
198 | - if(write_file($dir_path . $filename, serialize($object)) === FALSE) { |
|
198 | + if(write_file($dir_path.$filename, serialize($object)) === FALSE) { |
|
199 | 199 | return FALSE; |
200 | 200 | } |
201 | 201 | |
202 | - chmod($dir_path . $filename, 0640); |
|
202 | + chmod($dir_path.$filename, 0640); |
|
203 | 203 | |
204 | 204 | return TRUE; |
205 | 205 | } |
@@ -224,11 +224,11 @@ discard block |
||
224 | 224 | } |
225 | 225 | |
226 | 226 | if(is_array($this->CI->config->item('multi_level_cache_folders'))) { |
227 | - $uri_md5 = md5($segment_one . '+' . $segment_two); |
|
227 | + $uri_md5 = md5($segment_one.'+'.$segment_two); |
|
228 | 228 | $layer = $this->get_folder_layers($uri_md5); |
229 | - $dir_path = $this->db->cachedir . $segment_one.'/'.$segment_two . '/' . implode('/', $layer) . '/'; |
|
229 | + $dir_path = $this->db->cachedir.$segment_one.'/'.$segment_two.'/'.implode('/', $layer).'/'; |
|
230 | 230 | } else { |
231 | - $dir_path = $this->db->cachedir . $segment_one.'/'. $segment_two . '/'; |
|
231 | + $dir_path = $this->db->cachedir.$segment_one.'/'.$segment_two.'/'; |
|
232 | 232 | } |
233 | 233 | delete_files($dir_path, TRUE); |
234 | 234 | } |
@@ -22,7 +22,7 @@ |
||
22 | 22 | // if this class is already loaded before instantiating it. Loading it now |
23 | 23 | // makes sure our version is used when a controller enables query caching |
24 | 24 | if(!class_exists('CI_DB_Cache')) { |
25 | - @include(APPPATH . 'libraries/MY_DB_cache.php'); |
|
25 | + @include(APPPATH.'libraries/MY_DB_cache.php'); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | // call the parent method to retain the CI functionality |
@@ -1,7 +1,7 @@ |
||
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 | include_once APPPATH.'models/Tracker/Tracker_Base_Model.php'; |
4 | -foreach (glob(APPPATH.'models/Tracker/*.php') as $filename) { |
|
4 | +foreach(glob(APPPATH.'models/Tracker/*.php') as $filename) { |
|
5 | 5 | /** @noinspection PhpIncludeInspection */ |
6 | 6 | include_once $filename; |
7 | 7 | } |
@@ -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 | //http://english.stackexchange.com/a/141735 |
4 | 4 | class Tracker_Portation_Model extends Tracker_Base_Model { |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | |
56 | 56 | $arr = []; |
57 | 57 | if($query->num_rows() > 0) { |
58 | - foreach ($query->result() as $row) { |
|
58 | + foreach($query->result() as $row) { |
|
59 | 59 | $arr[$row->category][] = [ |
60 | 60 | 'site' => $row->site, |
61 | 61 | 'title_url' => $row->title_url, |