@@ -9,7 +9,9 @@ |
||
| 9 | 9 | $this->header_data['title'] = 'Index'; |
| 10 | 10 | $this->header_data['page'] = 'index'; |
| 11 | 11 | |
| 12 | - if($this->User->logged_in()) redirect('user/dashboard'); |
|
| 12 | + if($this->User->logged_in()) { |
|
| 13 | + redirect('user/dashboard'); |
|
| 14 | + } |
|
| 13 | 15 | $this->_render_page('FrontPage'); |
| 14 | 16 | } |
| 15 | 17 | } |
@@ -6,7 +6,9 @@ |
||
| 6 | 6 | */ |
| 7 | 7 | namespace Deployer; |
| 8 | 8 | |
| 9 | -if(basename(getcwd()) !== 'manga-tracker') die('Bad CWD: Call from manga-tracker with dep -f=_scripts/deploy.php deploy'); |
|
| 9 | +if(basename(getcwd()) !== 'manga-tracker') { |
|
| 10 | + die('Bad CWD: Call from manga-tracker with dep -f=_scripts/deploy.php deploy'); |
|
| 11 | +} |
|
| 10 | 12 | |
| 11 | 13 | require 'recipe/cachetool.php'; //requires deployer/recipes |
| 12 | 14 | require 'recipe/codeigniter.php'; |
@@ -85,7 +85,9 @@ discard block |
||
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | $siteRateLimits[$row->site_class]++; |
| 88 | - if($siteRateLimits[$row->site_class] > $hardRateLimit) continue; |
|
| 88 | + if($siteRateLimits[$row->site_class] > $hardRateLimit) { |
|
| 89 | + continue; |
|
| 90 | + } |
|
| 89 | 91 | |
| 90 | 92 | usleep(500000); // Delay requests by .5 seconds. |
| 91 | 93 | if($siteRateLimits[$row->site_class] > 25) { |
@@ -175,8 +177,7 @@ discard block |
||
| 175 | 177 | |
| 176 | 178 | print " - Something went wrong?\n"; |
| 177 | 179 | } |
| 178 | - } |
|
| 179 | - else if(array_key_exists('status', $titleData)) { |
|
| 180 | + } else if(array_key_exists('status', $titleData)) { |
|
| 180 | 181 | // Series has probably been deleted. |
| 181 | 182 | |
| 182 | 183 | if($this->Tracker->title->updateTitleDataByID((int) $row->title_id, $titleData)) { |
@@ -186,8 +187,7 @@ discard block |
||
| 186 | 187 | |
| 187 | 188 | print " - Something went wrong?\n"; |
| 188 | 189 | } |
| 189 | - } |
|
| 190 | - else if($site->canHaveNoChapters) { |
|
| 190 | + } else if($site->canHaveNoChapters) { |
|
| 191 | 191 | // Previous statements failed, however site can have no chapters. |
| 192 | 192 | if($this->Tracker->title->updateTitleDataByID((int) $row->title_id, ['latest_chapter' => NULL])) { |
| 193 | 193 | print " - (No chapters found?)\n"; |
@@ -196,12 +196,10 @@ discard block |
||
| 196 | 196 | |
| 197 | 197 | print " - Something went wrong?\n"; |
| 198 | 198 | } |
| 199 | - } |
|
| 200 | - else { |
|
| 199 | + } else { |
|
| 201 | 200 | log_message('error', 'handleUpdate failed due to invalid titleData info?'); |
| 202 | 201 | } |
| 203 | - } |
|
| 204 | - else { |
|
| 202 | + } else { |
|
| 205 | 203 | // If TitleData does not exist, either something has broken, or we've set up the site wrong. |
| 206 | 204 | |
| 207 | 205 | //TODO: We should have some way to handle this in the site models. |