Completed
Push — master ( 638578...37612c )
by Angus
02:53
created
application/models/Tracker/Tracker_Favourites_Model.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -115,33 +115,33 @@
 block discarded – undo
115 115
 
116 116
 			////We need the series to be tracked
117 117
 			$idCQuery = $this->db->select('id')
118
-			                     ->where('user_id', $userID)
119
-			                     ->where('title_id', $titleID)
120
-			                     ->get('tracker_chapters');
118
+								 ->where('user_id', $userID)
119
+								 ->where('title_id', $titleID)
120
+								 ->get('tracker_chapters');
121 121
 			if(!($idCQuery->num_rows() > 0)) {
122 122
 				//NOTE: This pretty much repeats a lot of what we already did above. Is there a better way to do this?
123 123
 				$this->Tracker->list->update($userID, $site, $title, $chapter, FALSE);
124 124
 
125 125
 				$idCQuery = $this->db->select('id')
126
-				                     ->where('user_id', $userID)
127
-				                     ->where('title_id', $titleID)
128
-				                     ->get('tracker_chapters');
126
+									 ->where('user_id', $userID)
127
+									 ->where('title_id', $titleID)
128
+									 ->get('tracker_chapters');
129 129
 			}
130 130
 			if($idCQuery->num_rows() > 0) {
131 131
 				$idCQueryRow = $idCQuery->row();
132 132
 
133 133
 				//Check if it is already favourited
134 134
 				$idFQuery = $this->db->select('id')
135
-				                     ->where('chapter_id', $idCQueryRow->id)
136
-				                     ->where('chapter', $chapter)
137
-				                     ->get('tracker_favourites');
135
+									 ->where('chapter_id', $idCQueryRow->id)
136
+									 ->where('chapter', $chapter)
137
+									 ->get('tracker_favourites');
138 138
 				if($idFQuery->num_rows() > 0) {
139 139
 					//Chapter is already favourited, so remove it from DB
140 140
 					if($removeIfExists) {
141 141
 						$idFQueryRow = $idFQuery->row();
142 142
 
143 143
 						$isSuccess = (bool) $this->db->where('id', $idFQueryRow->id)
144
-						                             ->delete('tracker_favourites');
144
+													 ->delete('tracker_favourites');
145 145
 
146 146
 						if($isSuccess) {
147 147
 							$success = array(
Please login to merge, or discard this patch.