@@ -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 | ); |
@@ -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 |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | |
| 20 | 20 | <div class="row"> |
| 21 | 21 | <div class="col-xs-12 col-md-12"> |
| 22 | - <?=form_submit($form_submit);?> |
|
| 22 | + <?=form_submit($form_submit); ?> |
|
| 23 | 23 | </div> |
| 24 | 24 | </div> |
| 25 | 25 | </form> |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | |
| 20 | 20 | <div class="row"> |
| 21 | 21 | <div class="col-xs-12 col-md-12"> |
| 22 | - <?=form_submit($form_submit);?> |
|
| 22 | + <?=form_submit($form_submit); ?> |
|
| 23 | 23 | </div> |
| 24 | 24 | </div> |
| 25 | 25 | </form> |
@@ -16,16 +16,16 @@ discard block |
||
| 16 | 16 | $usedCategories = $this->Tracker->category->getUsed($this->User->id); |
| 17 | 17 | |
| 18 | 18 | //NOTE: The checkbox validation is handled in run() |
| 19 | - $this->form_validation->set_rules('category_custom_1_text', 'Custom Category 1 Text', 'trim|regex_match[/^[a-zA-Z0-9-_\\s]{0,16}$/]'); |
|
| 20 | - $this->form_validation->set_rules('category_custom_2_text', 'Custom Category 2 Text', 'trim|regex_match[/^[a-zA-Z0-9-_\\s]{0,16}$/]'); |
|
| 21 | - $this->form_validation->set_rules('category_custom_3_text', 'Custom Category 3 Text', 'trim|regex_match[/^[a-zA-Z0-9-_\\s]{0,16}$/]'); |
|
| 19 | + $this->form_validation->set_rules('category_custom_1_text', 'Custom Category 1 Text', 'trim|regex_match[/^[a-zA-Z0-9-_\\s]{0,16}$/]'); |
|
| 20 | + $this->form_validation->set_rules('category_custom_2_text', 'Custom Category 2 Text', 'trim|regex_match[/^[a-zA-Z0-9-_\\s]{0,16}$/]'); |
|
| 21 | + $this->form_validation->set_rules('category_custom_3_text', 'Custom Category 3 Text', 'trim|regex_match[/^[a-zA-Z0-9-_\\s]{0,16}$/]'); |
|
| 22 | 22 | $this->form_validation->set_rules('default_series_category', 'Default Series Category', 'required|is_valid_option_value[default_series_category]'); |
| 23 | - $this->form_validation->set_rules('list_sort_type', 'List Sort Type', 'required|is_valid_option_value[list_sort_type]'); |
|
| 24 | - $this->form_validation->set_rules('list_sort_order', 'List Sort Order', 'required|is_valid_option_value[list_sort_order]'); |
|
| 25 | - $this->form_validation->set_rules('theme', 'Theme', 'required|is_valid_option_value[theme]'); |
|
| 26 | - $this->form_validation->set_rules('mal_sync', 'MAL Sync', 'required|is_valid_option_value[mal_sync]'); |
|
| 23 | + $this->form_validation->set_rules('list_sort_type', 'List Sort Type', 'required|is_valid_option_value[list_sort_type]'); |
|
| 24 | + $this->form_validation->set_rules('list_sort_order', 'List Sort Order', 'required|is_valid_option_value[list_sort_order]'); |
|
| 25 | + $this->form_validation->set_rules('theme', 'Theme', 'required|is_valid_option_value[theme]'); |
|
| 26 | + $this->form_validation->set_rules('mal_sync', 'MAL Sync', 'required|is_valid_option_value[mal_sync]'); |
|
| 27 | 27 | |
| 28 | - if ($isValid = $this->form_validation->run() === TRUE) { |
|
| 28 | + if($isValid = $this->form_validation->run() === TRUE) { |
|
| 29 | 29 | foreach($customCategories as $categoryK => $category) { |
| 30 | 30 | if(!in_array($categoryK, $usedCategories)) { |
| 31 | 31 | $this->User_Options->set($category, $this->input->post($category) ? 'enabled' : 'disabled'); |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | |
| 39 | 39 | $this->User_Options->set('enable_live_countdown_timer', $this->input->post('enable_live_countdown_timer')); |
| 40 | 40 | |
| 41 | - $this->User_Options->set('list_sort_type', $this->input->post('list_sort_type')); |
|
| 41 | + $this->User_Options->set('list_sort_type', $this->input->post('list_sort_type')); |
|
| 42 | 42 | $this->User_Options->set('list_sort_order', $this->input->post('list_sort_order')); |
| 43 | 43 | |
| 44 | 44 | $this->User_Options->set('theme', $this->input->post('theme')); |
@@ -26,8 +26,8 @@ discard block |
||
| 26 | 26 | * URL: /ajax/update_inline |
| 27 | 27 | */ |
| 28 | 28 | public function update() : void { |
| 29 | - $this->form_validation->set_rules('id', 'Chapter ID', 'required|ctype_digit'); |
|
| 30 | - $this->form_validation->set_rules('chapter', 'Chapter', 'required'); |
|
| 29 | + $this->form_validation->set_rules('id', 'Chapter ID', 'required|ctype_digit'); |
|
| 30 | + $this->form_validation->set_rules('chapter', 'Chapter', 'required'); |
|
| 31 | 31 | |
| 32 | 32 | if($this->form_validation->run() === TRUE) { |
| 33 | 33 | $success = $this->Tracker->list->updateByID($this->userID, $this->input->post('id'), $this->input->post('chapter')); |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | * URL: /tag_update |
| 123 | 123 | */ |
| 124 | 124 | public function tag_update() : void { |
| 125 | - $this->form_validation->set_rules('id', 'Chapter ID', 'required|ctype_digit'); |
|
| 125 | + $this->form_validation->set_rules('id', 'Chapter ID', 'required|ctype_digit'); |
|
| 126 | 126 | $this->form_validation->set_rules('tag_string', 'Tag String', 'max_length[255]|is_valid_tag_string|not_equals[none]'); |
| 127 | 127 | |
| 128 | 128 | if($this->form_validation->run() === TRUE) { |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | * URL: /set_category |
| 170 | 170 | */ |
| 171 | 171 | public function set_category() : void { |
| 172 | - $this->form_validation->set_rules('id[]', 'List of IDs', 'required|ctype_digit'); |
|
| 172 | + $this->form_validation->set_rules('id[]', 'List of IDs', 'required|ctype_digit'); |
|
| 173 | 173 | $this->form_validation->set_rules('category', 'Category Name', 'required|is_valid_category'); |
| 174 | 174 | |
| 175 | 175 | if($this->form_validation->run() === TRUE) { |
@@ -215,8 +215,8 @@ discard block |
||
| 215 | 215 | * URL: /ajax/ignore_inline |
| 216 | 216 | */ |
| 217 | 217 | public function ignore() : void { |
| 218 | - $this->form_validation->set_rules('id', 'Chapter ID', 'required|ctype_digit'); |
|
| 219 | - $this->form_validation->set_rules('chapter', 'Chapter', 'required'); |
|
| 218 | + $this->form_validation->set_rules('id', 'Chapter ID', 'required|ctype_digit'); |
|
| 219 | + $this->form_validation->set_rules('chapter', 'Chapter', 'required'); |
|
| 220 | 220 | |
| 221 | 221 | if($this->form_validation->run() === TRUE) { |
| 222 | 222 | $success = $this->Tracker->list->ignoreByID($this->userID, $this->input->post('id'), $this->input->post('chapter')); |
@@ -238,8 +238,8 @@ discard block |
||
| 238 | 238 | * URL: /set_mal_id |
| 239 | 239 | */ |
| 240 | 240 | public function set_mal_id() : void { |
| 241 | - $this->form_validation->set_rules('id', 'Chapter ID', 'required|ctype_digit'); |
|
| 242 | - $this->form_validation->set_rules('mal_id', 'MAL ID', 'regex_match[/^[0-9]*$/]'); |
|
| 241 | + $this->form_validation->set_rules('id', 'Chapter ID', 'required|ctype_digit'); |
|
| 242 | + $this->form_validation->set_rules('mal_id', 'MAL ID', 'regex_match[/^[0-9]*$/]'); |
|
| 243 | 243 | |
| 244 | 244 | if($this->form_validation->run() === TRUE) { |
| 245 | 245 | $malID = (is_numeric($this->input->post('mal_id')) ? $this->input->post('mal_id') : NULL); |
@@ -16,12 +16,12 @@ discard block |
||
| 16 | 16 | $this->header_data['page'] = "forgot_password"; |
| 17 | 17 | |
| 18 | 18 | //TODO (RESEARCH): Should we allow username here too? |
| 19 | - $this->form_validation->set_rules('email', 'Email', 'required|valid_email', array( |
|
| 19 | + $this->form_validation->set_rules('email', 'Email', 'required|valid_email', array( |
|
| 20 | 20 | 'required' => 'Please enter your email.', |
| 21 | 21 | 'valid_email' => 'The email your entered is invalid.' |
| 22 | 22 | )); |
| 23 | 23 | |
| 24 | - if ($this->form_validation->run() === TRUE) { |
|
| 24 | + if($this->form_validation->run() === TRUE) { |
|
| 25 | 25 | //form is valid |
| 26 | 26 | |
| 27 | 27 | $identity = $this->ion_auth->where('email', $this->input->post('email'))->users()->row(); |
@@ -71,21 +71,21 @@ discard block |
||
| 71 | 71 | $this->header_data['page'] = "reset-password"; |
| 72 | 72 | |
| 73 | 73 | $user = $this->ion_auth->forgotten_password_check($code); |
| 74 | - if ($user) { |
|
| 74 | + if($user) { |
|
| 75 | 75 | //code is valid, show reset form or process reset |
| 76 | 76 | $min_password_length = $this->config->item('min_password_length', 'ion_auth'); |
| 77 | 77 | $max_password_length = $this->config->item('max_password_length', 'ion_auth'); |
| 78 | - $this->form_validation->set_rules('new_password', "Password", 'required|min_length['.$min_password_length.']|max_length['.$max_password_length.']'); |
|
| 78 | + $this->form_validation->set_rules('new_password', "Password", 'required|min_length['.$min_password_length.']|max_length['.$max_password_length.']'); |
|
| 79 | 79 | $this->form_validation->set_rules('new_password_confirm', "Password Confirm", 'required|matches[new_password]'); |
| 80 | 80 | |
| 81 | - if ($this->form_validation->run() === TRUE) { |
|
| 81 | + if($this->form_validation->run() === TRUE) { |
|
| 82 | 82 | //form is valid, process the password reset request |
| 83 | 83 | //TODO (Research): The original ion_auth auth.php sent the userid to the form, then matched it on return, is there any point to this? |
| 84 | 84 | |
| 85 | 85 | $identity = $user->{'email'}; |
| 86 | 86 | $change = $this->ion_auth->reset_password($identity, $this->input->post('new_password')); |
| 87 | 87 | |
| 88 | - if ($change) { |
|
| 88 | + if($change) { |
|
| 89 | 89 | //password changed successfully, redirect to login |
| 90 | 90 | $this->session->set_flashdata('notices', $this->ion_auth->messages()); |
| 91 | 91 | redirect("user/login", 'refresh'); |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | // break; |
| 27 | 27 | |
| 28 | 28 | case 'html': |
| 29 | - $this->body_data['trackerData'] = $trackerData['series']; |
|
| 29 | + $this->body_data['trackerData'] = $trackerData['series']; |
|
| 30 | 30 | |
| 31 | 31 | $this->header_data['show_header'] = FALSE; |
| 32 | 32 | $this->footer_data['show_footer'] = FALSE; |
@@ -62,12 +62,12 @@ discard block |
||
| 62 | 62 | if($show_404) show_404(); |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | - private function _walk_recursive_remove (array $array, callable $callback) : array { |
|
| 66 | - foreach ($array as $k => $v) { |
|
| 67 | - if (is_array($v)) { |
|
| 65 | + private function _walk_recursive_remove(array $array, callable $callback) : array { |
|
| 66 | + foreach($array as $k => $v) { |
|
| 67 | + if(is_array($v)) { |
|
| 68 | 68 | $array[$k] = $this->_walk_recursive_remove($v, $callback); |
| 69 | 69 | } else { |
| 70 | - if ($callback($v, $k)) { |
|
| 70 | + if($callback($v, $k)) { |
|
| 71 | 71 | unset($array[$k]); |
| 72 | 72 | } |
| 73 | 73 | } |