@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | * Different environments will require different levels of error reporting. |
| 64 | 64 | * By default development will show errors but testing and live will hide them. |
| 65 | 65 | */ |
| 66 | -switch (ENVIRONMENT) |
|
| 66 | +switch(ENVIRONMENT) |
|
| 67 | 67 | { |
| 68 | 68 | case 'development': |
| 69 | 69 | error_reporting(-1); |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | case 'testing': |
| 80 | 80 | case 'production': |
| 81 | 81 | ini_set('display_errors', 0); |
| 82 | - if (version_compare(PHP_VERSION, '5.3', '>=')) |
|
| 82 | + if(version_compare(PHP_VERSION, '5.3', '>=')) |
|
| 83 | 83 | { |
| 84 | 84 | error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED); |
| 85 | 85 | } |
@@ -197,12 +197,12 @@ discard block |
||
| 197 | 197 | */ |
| 198 | 198 | |
| 199 | 199 | // Set the current directory correctly for CLI requests |
| 200 | -if (defined('STDIN')) |
|
| 200 | +if(defined('STDIN')) |
|
| 201 | 201 | { |
| 202 | 202 | chdir(dirname(__FILE__)); |
| 203 | 203 | } |
| 204 | 204 | |
| 205 | -if (($_temp = realpath($system_path)) !== FALSE) |
|
| 205 | +if(($_temp = realpath($system_path)) !== FALSE) |
|
| 206 | 206 | { |
| 207 | 207 | $system_path = $_temp.DIRECTORY_SEPARATOR; |
| 208 | 208 | } |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | } |
| 218 | 218 | |
| 219 | 219 | // Is the system path correct? |
| 220 | -if ( ! is_dir($system_path)) |
|
| 220 | +if(!is_dir($system_path)) |
|
| 221 | 221 | { |
| 222 | 222 | header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); |
| 223 | 223 | echo 'Your system folder path does not appear to be set correctly. Please open the following file and correct this: '.pathinfo(__FILE__, PATHINFO_BASENAME); |
@@ -242,9 +242,9 @@ discard block |
||
| 242 | 242 | define('SYSDIR', basename(BASEPATH)); |
| 243 | 243 | |
| 244 | 244 | // The path to the "application" directory |
| 245 | -if (is_dir($application_folder)) |
|
| 245 | +if(is_dir($application_folder)) |
|
| 246 | 246 | { |
| 247 | - if (($_temp = realpath($application_folder)) !== FALSE) |
|
| 247 | + if(($_temp = realpath($application_folder)) !== FALSE) |
|
| 248 | 248 | { |
| 249 | 249 | $application_folder = $_temp; |
| 250 | 250 | } |
@@ -257,7 +257,7 @@ discard block |
||
| 257 | 257 | ); |
| 258 | 258 | } |
| 259 | 259 | } |
| 260 | -elseif (is_dir(BASEPATH.$application_folder.DIRECTORY_SEPARATOR)) |
|
| 260 | +elseif(is_dir(BASEPATH.$application_folder.DIRECTORY_SEPARATOR)) |
|
| 261 | 261 | { |
| 262 | 262 | $application_folder = BASEPATH.strtr( |
| 263 | 263 | trim($application_folder, '/\\'), |
@@ -275,13 +275,13 @@ discard block |
||
| 275 | 275 | define('APPPATH', $application_folder.DIRECTORY_SEPARATOR); |
| 276 | 276 | |
| 277 | 277 | // The path to the "views" directory |
| 278 | -if ( ! isset($view_folder[0]) && is_dir(APPPATH.'views'.DIRECTORY_SEPARATOR)) |
|
| 278 | +if(!isset($view_folder[0]) && is_dir(APPPATH.'views'.DIRECTORY_SEPARATOR)) |
|
| 279 | 279 | { |
| 280 | 280 | $view_folder = APPPATH.'views'; |
| 281 | 281 | } |
| 282 | -elseif (is_dir($view_folder)) |
|
| 282 | +elseif(is_dir($view_folder)) |
|
| 283 | 283 | { |
| 284 | - if (($_temp = realpath($view_folder)) !== FALSE) |
|
| 284 | + if(($_temp = realpath($view_folder)) !== FALSE) |
|
| 285 | 285 | { |
| 286 | 286 | $view_folder = $_temp; |
| 287 | 287 | } |
@@ -294,7 +294,7 @@ discard block |
||
| 294 | 294 | ); |
| 295 | 295 | } |
| 296 | 296 | } |
| 297 | -elseif (is_dir(APPPATH.$view_folder.DIRECTORY_SEPARATOR)) |
|
| 297 | +elseif(is_dir(APPPATH.$view_folder.DIRECTORY_SEPARATOR)) |
|
| 298 | 298 | { |
| 299 | 299 | $view_folder = APPPATH.strtr( |
| 300 | 300 | trim($view_folder, '/\\'), |
@@ -15,17 +15,17 @@ discard block |
||
| 15 | 15 | $this->header_data['title'] = "Login"; |
| 16 | 16 | $this->header_data['page'] = "login"; |
| 17 | 17 | |
| 18 | - $this->form_validation->set_rules('identity', 'Identity', 'required|max_length[254]', array( |
|
| 18 | + $this->form_validation->set_rules('identity', 'Identity', 'required|max_length[254]', array( |
|
| 19 | 19 | 'required' => 'Please enter your username or email.', |
| 20 | 20 | 'max_length' => 'Invalid username.' |
| 21 | 21 | |
| 22 | 22 | )); |
| 23 | - $this->form_validation->set_rules('password', 'Password', 'required|max_length[64]', array( |
|
| 23 | + $this->form_validation->set_rules('password', 'Password', 'required|max_length[64]', array( |
|
| 24 | 24 | 'required' => 'Please enter your password.', |
| 25 | 25 | 'max_length' => 'Invalid password.' |
| 26 | 26 | )); |
| 27 | 27 | |
| 28 | - if ($isValid = $this->form_validation->run() === TRUE) { |
|
| 28 | + if($isValid = $this->form_validation->run() === TRUE) { |
|
| 29 | 29 | //form is valid |
| 30 | 30 | |
| 31 | 31 | //check if identity is email, if not then attempt to use grab from DB |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | $this->body_data['notices'] = validation_errors() ? validation_errors() : $this->session->flashdata('notices'); |
| 64 | 64 | //$errors = $this->form_validation->error_array(); |
| 65 | 65 | |
| 66 | - $this->body_data['form_create'] = array ( |
|
| 66 | + $this->body_data['form_create'] = array( |
|
| 67 | 67 | 'action' => 'user/login', |
| 68 | 68 | |
| 69 | 69 | 'role' => 'form' |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | 'is_unique_email' => 'Email already exists.' |
| 42 | 42 | )); |
| 43 | 43 | |
| 44 | - if ($isValid = $this->form_validation->run() === TRUE) { |
|
| 44 | + if($isValid = $this->form_validation->run() === TRUE) { |
|
| 45 | 45 | $email = $this->Auth->parse_email($this->input->post('email')); |
| 46 | 46 | |
| 47 | 47 | $this->body_data['email'] = $email; |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | //login wasn't valid, failed, or this is a fresh login attempt |
| 57 | - if(!$isValid){ |
|
| 57 | + if(!$isValid) { |
|
| 58 | 58 | //display the email validation form |
| 59 | 59 | |
| 60 | 60 | $this->global_data['notices'] = (validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata('message'))); |
@@ -92,14 +92,14 @@ discard block |
||
| 92 | 92 | if(!($email = $this->Auth->verification_check($verificationCode))) redirect('user/signup'); |
| 93 | 93 | |
| 94 | 94 | //validation is valid, proceed as normal |
| 95 | - $this->form_validation->set_rules('username', 'Username', 'required|min_length[4]|max_length[15]|valid_username|is_unique_username'); |
|
| 96 | - $this->form_validation->set_rules('password', 'Password', 'required|valid_password'); |
|
| 97 | - $this->form_validation->set_rules('password_confirm', 'Confirm Password', 'required|matches[password]'); |
|
| 98 | - $this->form_validation->set_rules('terms', 'Terms & Conditions', 'required'); |
|
| 95 | + $this->form_validation->set_rules('username', 'Username', 'required|min_length[4]|max_length[15]|valid_username|is_unique_username'); |
|
| 96 | + $this->form_validation->set_rules('password', 'Password', 'required|valid_password'); |
|
| 97 | + $this->form_validation->set_rules('password_confirm', 'Confirm Password', 'required|matches[password]'); |
|
| 98 | + $this->form_validation->set_rules('terms', 'Terms & Conditions', 'required'); |
|
| 99 | 99 | //TODO: timezone |
| 100 | 100 | //TODO: receive email |
| 101 | 101 | |
| 102 | - if ($isValid = $this->form_validation->run() === TRUE) { |
|
| 102 | + if($isValid = $this->form_validation->run() === TRUE) { |
|
| 103 | 103 | $username = $this->input->post('username'); |
| 104 | 104 | $password = $this->input->post('password'); |
| 105 | 105 | |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | //signup wasn't valid, failed, or this is a fresh signup attempt |
| 126 | - if(!$isValid){ |
|
| 126 | + if(!$isValid) { |
|
| 127 | 127 | //display the create user form |
| 128 | 128 | |
| 129 | 129 | $this->global_data['notices'] = (validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata('message'))); |
@@ -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> |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | |
| 26 | 26 | <div class="row"> |
| 27 | 27 | <div class="col-xs-6 col-sm-6 col-md-6"> |
| 28 | - <?=form_submit($form_submit);?> |
|
| 28 | + <?=form_submit($form_submit); ?> |
|
| 29 | 29 | </div> |
| 30 | 30 | <div class="col-xs-6 col-sm-6 col-md-6"> |
| 31 | 31 | <a href="<?=base_url('user/signup')?>" class="btn btn-lg btn-primary btn-block">Create an account</a> |
@@ -11,12 +11,12 @@ |
||
| 11 | 11 | <p>Filename: <?php echo $filepath; ?></p> |
| 12 | 12 | <p>Line Number: <?php echo $line; ?></p> |
| 13 | 13 | |
| 14 | -<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?> |
|
| 14 | +<?php if(defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?> |
|
| 15 | 15 | |
| 16 | 16 | <p>Backtrace:</p> |
| 17 | - <?php foreach (debug_backtrace() as $error): ?> |
|
| 17 | + <?php foreach(debug_backtrace() as $error): ?> |
|
| 18 | 18 | |
| 19 | - <?php if (isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?> |
|
| 19 | + <?php if(isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?> |
|
| 20 | 20 | |
| 21 | 21 | <p style="margin-left:10px"> |
| 22 | 22 | File: <?php echo $error['file'] ?><br /> |
@@ -11,12 +11,12 @@ |
||
| 11 | 11 | <p>Filename: <?php echo $exception->getFile(); ?></p> |
| 12 | 12 | <p>Line Number: <?php echo $exception->getLine(); ?></p> |
| 13 | 13 | |
| 14 | -<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?> |
|
| 14 | +<?php if(defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?> |
|
| 15 | 15 | |
| 16 | 16 | <p>Backtrace:</p> |
| 17 | - <?php foreach ($exception->getTrace() as $error): ?> |
|
| 17 | + <?php foreach($exception->getTrace() as $error): ?> |
|
| 18 | 18 | |
| 19 | - <?php if (isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?> |
|
| 19 | + <?php if(isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?> |
|
| 20 | 20 | |
| 21 | 21 | <p style="margin-left:10px"> |
| 22 | 22 | File: <?php echo $error['file']; ?><br /> |
@@ -7,11 +7,11 @@ |
||
| 7 | 7 | Filename: <?php echo $filepath, "\n"; ?> |
| 8 | 8 | Line Number: <?php echo $line; ?> |
| 9 | 9 | |
| 10 | -<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?> |
|
| 10 | +<?php if(defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?> |
|
| 11 | 11 | |
| 12 | 12 | Backtrace: |
| 13 | -<?php foreach (debug_backtrace() as $error): ?> |
|
| 14 | -<?php if (isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?> |
|
| 13 | +<?php foreach(debug_backtrace() as $error): ?> |
|
| 14 | +<?php if(isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?> |
|
| 15 | 15 | File: <?php echo $error['file'], "\n"; ?> |
| 16 | 16 | Line: <?php echo $error['line'], "\n"; ?> |
| 17 | 17 | Function: <?php echo $error['function'], "\n\n"; ?> |
@@ -7,11 +7,11 @@ |
||
| 7 | 7 | Filename: <?php echo $exception->getFile(), "\n"; ?> |
| 8 | 8 | Line Number: <?php echo $exception->getLine(); ?> |
| 9 | 9 | |
| 10 | -<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?> |
|
| 10 | +<?php if(defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === TRUE): ?> |
|
| 11 | 11 | |
| 12 | 12 | Backtrace: |
| 13 | -<?php foreach ($exception->getTrace() as $error): ?> |
|
| 14 | -<?php if (isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?> |
|
| 13 | +<?php foreach($exception->getTrace() as $error): ?> |
|
| 14 | +<?php if(isset($error['file']) && strpos($error['file'], realpath(BASEPATH)) !== 0): ?> |
|
| 15 | 15 | File: <?php echo $error['file'], "\n"; ?> |
| 16 | 16 | Line: <?php echo $error['line'], "\n"; ?> |
| 17 | 17 | Function: <?php echo $error['function'], "\n\n"; ?> |