Code Duplication    Length = 5-11 lines in 2 locations

application/models/Tracker/Tracker_Admin_Model.php 2 locations

@@ 116-126 (lines=11) @@
113
						if($dbTitleData = $this->Tracker->title->getID($titleURL, (int) $site['id'], FALSE, TRUE)) {
114
							if($this->sites->{$site['site_class']}->doCustomCheck($dbTitleData['latest_chapter'], $titleData['latest_chapter'])) {
115
								$titleID = $dbTitleData['id'];
116
								if($this->Tracker->title->updateByID((int) $titleID, $titleData['latest_chapter'])) {
117
									//Make sure last_checked is always updated on successful run.
118
									//CHECK: Is there a reason we aren't just doing this in updateByID?
119
									$this->db->set('last_checked', 'CURRENT_TIMESTAMP', FALSE)
120
									         ->where('id', $titleID)
121
									         ->update('tracker_titles');
122
123
									print " - ({$titleData['latest_chapter']})\n";
124
								} else {
125
									print " - Title doesn't exist? ($titleID)\n";
126
								}
127
							} else {
128
								print " - Failed Check (DB: '{$dbTitleData['latest_chapter']}' || UPDATE: '{$titleData['latest_chapter']}')\n";
129
							}
@@ 220-224 (lines=5) @@
217
					}
218
219
					//We might as well try to update as well.
220
					if($this->Tracker->title->updateByID((int) $row->id, $titleData['latest_chapter'])) {
221
						$this->db->set('last_checked', 'CURRENT_TIMESTAMP', FALSE)
222
						         ->where('id', $row->id)
223
						         ->update('tracker_titles');
224
					}
225
				} else {
226
					log_message('error', "{$row->title} failed to update title successfully");
227
					print " - FAILED TO PARSE\n";